efficient-web-builder 62.0.0 → 64.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  3. package/dist/editor/lib/animation/fields.js +1 -1
  4. package/dist/editor/lib/animation/loop-fields.js +1 -1
  5. package/dist/editor/lib/animation/scroll-fields.d.ts +3 -0
  6. package/dist/editor/lib/animation/scroll-fields.js +1 -0
  7. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  8. package/dist/editor/lib/document/card-display-chips.d.ts +3 -2
  9. package/dist/editor/lib/document/card-display-chips.js +1 -1
  10. package/dist/editor/lib/document/card-row-fields.js +1 -1
  11. package/dist/editor/lib/document/controls.d.ts +7 -2
  12. package/dist/editor/lib/document/controls.js +1 -1
  13. package/dist/editor/lib/document/field-groups.js +1 -1
  14. package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -1
  15. package/dist/editor/lib/document/part-motion-canvas.js +1 -1
  16. package/dist/format/lib/animation/hover.d.ts +4 -2
  17. package/dist/format/lib/animation/hover.js +1 -1
  18. package/dist/format/lib/animation/loop.d.ts +1 -0
  19. package/dist/format/lib/animation/loop.js +1 -1
  20. package/dist/format/lib/animation/mark-zoom.d.ts +11 -0
  21. package/dist/format/lib/animation/mark-zoom.js +1 -0
  22. package/dist/format/lib/animation/scroll.d.ts +20 -0
  23. package/dist/format/lib/animation/scroll.js +1 -0
  24. package/dist/format/lib/content/block-sources.js +1 -1
  25. package/dist/format/lib/content/box-shape.d.ts +1 -1
  26. package/dist/format/lib/content/card-state.d.ts +11 -1
  27. package/dist/format/lib/content/card-state.js +1 -1
  28. package/dist/format/lib/content/card-template.d.ts +10 -5
  29. package/dist/format/lib/content/card-template.js +1 -1
  30. package/dist/format/lib/content/image-aspect.d.ts +6 -0
  31. package/dist/format/lib/content/image-aspect.js +1 -1
  32. package/dist/format/lib/content/section-sticky.d.ts +29 -13
  33. package/dist/format/lib/content/section-sticky.js +1 -1
  34. package/dist/format/lib/content/slot-field-blocks.d.ts +1 -0
  35. package/dist/format/lib/content/slot-field-blocks.js +1 -0
  36. package/dist/format/lib/document/blocks/block-types.d.ts +2 -0
  37. package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
  38. package/dist/format/lib/document/blocks/general/ContactLocations/meta.js +1 -1
  39. package/dist/format/lib/document/blocks/general/FeaturedCover/meta.js +1 -1
  40. package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +1 -0
  41. package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
  42. package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
  43. package/dist/format/lib/document/blocks/general/ImageBlock/meta.js +1 -1
  44. package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +2 -2
  45. package/dist/format/lib/document/blocks/general/LogoBlock/meta.js +1 -1
  46. package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
  47. package/dist/format/lib/document/blocks/general/LongRead/meta.js +1 -1
  48. package/dist/format/lib/document/blocks/general/Manifesto/meta.js +1 -1
  49. package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
  50. package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
  51. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  52. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  53. package/dist/format/lib/document/blocks/general/Split/meta.js +1 -1
  54. package/dist/format/lib/document/blocks/general/Timeline/meta.js +1 -1
  55. package/dist/format/lib/document/easel-row-words.d.ts +7 -0
  56. package/dist/format/lib/document/easel-row-words.js +1 -1
  57. package/dist/format/lib/document/passes/types.d.ts +5 -1
  58. package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
  59. package/dist/format/lib/editor-words-catalogue.js +4 -4
  60. package/dist/format/lib/editor-words-kept.js +1 -1
  61. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  62. package/dist/format/lib/source-rules/no-hard-coded-option-rows.d.ts +30 -0
  63. package/dist/format/lib/source-rules/no-hard-coded-option-rows.js +1 -0
  64. package/dist/render/components/Banner.js +1 -1
  65. package/dist/render/components/CardRowContext.d.ts +1 -0
  66. package/dist/render/components/CardRowContext.js +1 -1
  67. package/dist/render/components/ContactLocations.js +2 -2
  68. package/dist/render/components/HeroPictures.d.ts +22 -2
  69. package/dist/render/components/HeroPictures.js +1 -1
  70. package/dist/render/components/HeroSection.js +1 -1
  71. package/dist/render/components/HeroSingle.js +1 -1
  72. package/dist/render/components/HeroSlide.js +1 -1
  73. package/dist/render/components/ImageBlock.js +1 -1
  74. package/dist/render/components/InBoxContext.d.ts +2 -1
  75. package/dist/render/components/InBoxContext.js +1 -1
  76. package/dist/render/components/IntroBleed.d.ts +1 -2
  77. package/dist/render/components/IntroBleed.js +1 -1
  78. package/dist/render/components/LogoBlock.js +1 -1
  79. package/dist/render/components/Logos.js +1 -1
  80. package/dist/render/components/PictureZoom.d.ts +24 -0
  81. package/dist/render/components/PictureZoom.js +1 -0
  82. package/dist/render/components/Placeholder.js +1 -1
  83. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  84. package/dist/render/components/ScrollEffect.d.ts +14 -0
  85. package/dist/render/components/ScrollEffect.js +1 -0
  86. package/dist/render/components/ScrollProgressArm.d.ts +5 -0
  87. package/dist/render/components/ScrollProgressArm.js +1 -0
  88. package/dist/render/components/SectionAnimation.d.ts +4 -0
  89. package/dist/render/components/SectionAnimation.js +1 -1
  90. package/dist/render/components/SectionHeader.js +1 -1
  91. package/dist/render/components/Text.d.ts +2 -1
  92. package/dist/render/components/Text.js +1 -1
  93. package/dist/render/components/goldPhrases.d.ts +2 -1
  94. package/dist/render/components/goldPhrases.js +3 -2
  95. package/dist/render/lib/animation/part-motion.d.ts +4 -1
  96. package/dist/render/lib/animation/part-motion.js +2 -2
  97. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  98. package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
  99. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  100. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  101. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  102. package/dist/render/lib/document/page-frame.d.ts +2 -1
  103. package/dist/render/lib/document/page-frame.js +1 -1
  104. package/dist/render/lib/document/part-styles.d.ts +9 -0
  105. package/dist/render/lib/document/part-styles.js +2 -2
  106. package/dist/render/lib/document/passes/index.js +1 -1
  107. package/dist/render/lib/document/passes/scroll-effect.d.ts +3 -0
  108. package/dist/render/lib/document/passes/scroll-effect.js +1 -0
  109. package/dist/render/lib/document/passes/section-sticky.js +1 -1
  110. package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
  111. package/package.json +3 -3
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as A}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const B=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(A()),...Object.keys(A())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...A()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=B.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return B.some(t=>d[t]in e)}function Oe(e){const t=B.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,B as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
@@ -1,4 +1,5 @@
1
1
  import { type SeenEntrance } from "../../../render/components/SectionAnimation.js";
2
+ import { type ScrollView } from "../../../format/lib/animation/scroll.js";
2
3
  import { PART_LIFT_ATTR, type PartMotion } from "../../../render/lib/animation/part-motion.js";
3
4
  export { PART_LIFT_ATTR };
4
5
  export type SeenPartEntrances = Map<string, SeenEntrance>;
@@ -6,4 +7,4 @@ type StampedPart = {
6
7
  element: HTMLElement;
7
8
  partKey: string;
8
9
  };
9
- export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, phone: boolean, seen: SeenPartEntrances): () => void;
10
+ export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, viewOrPhone: ScrollView | boolean, seen: SeenPartEntrances): () => void;
@@ -1 +1 @@
1
- import{ENTRANCE_ATTR as h,playEntrance as x}from"efficient-shell/format";import{entranceReplay as w}from"../../../render/components/SectionAnimation.js";import{entranceOf as l}from"../../../render/lib/animation/entrance.js";import{PART_LIFT_ATTR as u,drawPartEntrance as A,ensurePartLiftSheet as T,firstOnPage as b,partBoxOf as g,partMotionDrawn as E}from"../../../render/lib/animation/part-motion.js";const y=new WeakMap;function v(a,p,d,m){const c=[],f=new Map;for(const{partKey:e}of a){if(f.has(e))continue;const t=p(e)??{},s=l(t,"desktop"),o=l(t,"phone"),n=m.get(e),r=n?w.next(n,s,o,d):null;m.set(e,r?r.seen:w.seed(s,o)),f.set(e,r?.play??!1)}const i=new Map,K=a.filter(e=>!a.some(t=>t!==e&&t.partKey===e.partKey&&t.element.contains(e.element)));for(const e of K){const t=g(e.element);t&&i.set(t,[...i.get(t)??[],e])}for(const[e,t]of i){const s=n=>E(p(n.partKey)??{}),o=b(t.filter(n=>s(n).entrance));if(o){const n=p(o.partKey)??{};c.push(A(e,l(n,d?"phone":"desktop")));const r=y.get(e);y.set(e,o.partKey),(f.get(o.partKey)||r!==void 0&&r!==o.partKey)&&e.hasAttribute(h)&&x(e)}else y.delete(e);t.some(n=>s(n).hover==="lift")&&(T(e.ownerDocument),e.setAttribute(u,""),c.push(()=>e.removeAttribute(u)))}return()=>c.forEach(e=>e())}export{u as PART_LIFT_ATTR,v as paintPartMotion};
1
+ import{ENTRANCE_ATTR as b,playEntrance as k}from"efficient-shell/format";import{entranceReplay as A}from"../../../render/components/SectionAnimation.js";import{entranceOf as y}from"../../../render/lib/animation/entrance.js";import{scrollOf as x}from"../../../format/lib/animation/scroll.js";import{PART_LIFT_ATTR as d,drawPartEntrance as E,drawPartScroll as M,ensurePartLiftSheet as R,firstOnPage as T,partBoxOf as P,partMotionDrawn as _}from"../../../render/lib/animation/part-motion.js";const h=new WeakMap;function C(c,r,f,m){const i=typeof f=="boolean"?f?"phone":"desktop":f,w=i==="phone",p=[],l=new Map;for(const{partKey:e}of c){if(l.has(e))continue;const t=r(e)??{},s=y(t,"desktop"),n=y(t,"phone"),a=m.get(e),o=a?A.next(a,s,n,w):null;m.set(e,o?o.seen:A.seed(s,n)),l.set(e,o?.play??!1)}const u=new Map,g=c.filter(e=>!c.some(t=>t!==e&&t.partKey===e.partKey&&t.element.contains(e.element)));for(const e of g){const t=P(e.element);t&&u.set(t,[...u.get(t)??[],e])}for(const[e,t]of u){const s=o=>_(r(o.partKey)??{}),n=T(t.filter(o=>s(o).entrance));if(n){const o=r(n.partKey)??{};p.push(E(e,y(o,w?"phone":"desktop")));const K=h.get(e);h.set(e,n.partKey),(l.get(n.partKey)||K!==void 0&&K!==n.partKey)&&e.hasAttribute(b)&&k(e)}else h.delete(e);const a=e.hasAttribute(b)?void 0:T(t.filter(o=>x(r(o.partKey)??{},i).effect!=="none"));a&&p.push(M(e,x(r(a.partKey)??{},i))),t.some(o=>s(o).hover==="lift")&&(R(e.ownerDocument),e.setAttribute(d,""),p.push(()=>e.removeAttribute(d)))}return()=>p.forEach(e=>e())}export{d as PART_LIFT_ATTR,C as paintPartMotion};
@@ -1,3 +1,4 @@
1
+ import { type MediaZone } from "efficient-easel/screen/lib/content/media-zones";
1
2
  import { type HoverKind, type ShowWhenRule } from "efficient-shell/format";
2
3
  export declare const HOVER_KEY = "hover";
3
4
  export declare const HOVER_GROUP_KEY = "_gHover";
@@ -42,8 +43,9 @@ export type CardHoverDrawn = {
42
43
  delay: number;
43
44
  media?: CardHoverMedia;
44
45
  };
45
- export declare const HOVER_MEDIA_KINDS: readonly ["photos", "lifestyle", "renderings", "accessories", "others"];
46
- export type HoverMediaKind = (typeof HOVER_MEDIA_KINDS)[number];
46
+ type ImageMediaZone = Exclude<MediaZone, "videos">;
47
+ export type HoverMediaKind = Exclude<ImageMediaZone, "rendering"> | "renderings";
48
+ export declare const HOVER_MEDIA_KINDS: readonly HoverMediaKind[];
47
49
  export declare const HOVER_MEDIA_KIND_LABELS: Readonly<Record<HoverMediaKind, string>>;
48
50
  export declare const HOVER_MEDIA_GROUPS: readonly ["finish", "first"];
49
51
  export type HoverMediaGroup = (typeof HOVER_MEDIA_GROUPS)[number];
@@ -1 +1 @@
1
- import{HOVER_MOTION as H,hoverKindsOf as c,motionSeconds as a}from"efficient-shell/format";import{ANGLE_RANGE as g}from"../content/box-angle.js";import{finiteNumber as u}from"../finite-number.js";const i="hover",z="_gHover",I={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},s="highlight",S="Highlight",Z=["none",s],F={none:I.none,[s]:S};function A(e){return e[i]===s?s:"none"}const W="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",j="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function q(e,n){return A(e)!==s?null:{"--sf-hl-bg":n("surface"),"--sf-hl-ink":n("main")}}const V=c(["none","lift"]);function J(e){const n=e[i];return V.includes(n)?n:"none"}const x=c(["none","nextImage","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},f="spinOnHover",h=g,E={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},Q=Object.keys(E);function D(e){return E[e]??"none"}const L=H.rotateFallbackDeg,k=["photos","lifestyle","renderings","accessories","others"],$={photos:"Product photos",lifestyle:"Lifestyle photos",renderings:"Renderings",accessories:"Accessories",others:"Others"},N=["finish","first"],ee={finish:"Same finish",first:"First group"},C=["card","picture"],ne={card:"Whole card",picture:"Picture"},d={kind:"photos",group:"finish",cover:"card"},l=(e,n,o)=>e.includes(n)?n:o;function O(e){return{kind:l(k,e[r.mediaKind],d.kind),group:l(N,e[r.mediaGroup],d.group),cover:l(C,e[r.cover],d.cover)}}function oe(){return{field:r.kind,is:"nextImage"}}function K(e,n){const o=e[r.kind];if(x.includes(o))return o;const t=e[f];return typeof t=="boolean"?t?"rotate":"none":n}function T(e){const n=u(e);return n===void 0?L:Math.min(h.max,Math.max(h.min,n))}function te(e,n){const o=D(n),t=K(e,o);return{kind:t,angle:t==="rotate"?T(e[r.angle]):null,duration:a("hover","duration",t==="rotate"?e[r.duration]:void 0),delay:a("hover","delay",t==="rotate"?e[r.delay]:void 0),...t==="nextImage"?{media:O(e)}:{}}}function re(e){const n={field:r.kind,in:[...x]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:n},e==="rotate"?{not:{field:f,is:!1}}:{field:f,is:!0}]}]}}const R=c(["none","mono"]),G=c(["none","nextImage","mono"]),v={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},ie=Object.keys(v);function M(e){return v[e]??"none"}const m={zoom:"hoverZoom",darken:"hoverDarken"},p={min:100,max:150,step:1,unit:"%"};function y(e){const n=u(e[m.zoom]);if(n===void 0)return null;const o=Math.min(p.max,Math.max(p.min,n));return o===p.min?null:String(o/100)}function B(e){const n=u(e[m.darken]);return n!==void 0&&n>0?n:null}const P=["ImageBlock"];function U(e,n,o=R){const t=e[i];return o.includes(t)?t:n}function se(e,n=""){const o=P.includes(n)?G:R,t=U(e,M(n),o),_=t==="mono";return{kind:t,duration:a("hover","duration",_?e[r.duration]:void 0),delay:a("hover","delay",_?e[r.delay]:void 0),...t==="nextImage"?{media:O(e)}:b(e)}}function b(e){const n=y(e),o=B(e);return{...n?{zoom:n}:{},...o?{darken:o}:{}}}function ce(){return{not:{field:i,is:"nextImage"}}}function ae(e){return e==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}function ue(e){return e==="none"?{field:i,is:"mono"}:{not:{field:i,in:["none","nextImage"]}}}export{s as BOX_HIGHLIGHT,W as BOX_HIGHLIGHT_CLASS,j as BOX_HIGHLIGHT_OVER_ROW_INK_CLASS,Z as BOX_HOVER_KINDS,F as BOX_HOVER_LABELS,h as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,x as CARD_HOVER_KINDS,Q as CARD_HOVER_SECTIONS,L as CARD_HOVER_TURN,S as HIGHLIGHT_LABEL,z as HOVER_GROUP_KEY,i as HOVER_KEY,I as HOVER_KIND_LABELS,C as HOVER_MEDIA_COVERS,ne as HOVER_MEDIA_COVER_LABELS,d as HOVER_MEDIA_DEFAULTS,N as HOVER_MEDIA_GROUPS,ee as HOVER_MEDIA_GROUP_LABELS,k as HOVER_MEDIA_KINDS,$ as HOVER_MEDIA_KIND_LABELS,P as NEXT_PICTURE_BLOCKS,G as NEXT_PICTURE_HOVER_KINDS,f as OLD_SPIN_KEY,V as PART_HOVER_KINDS,ie as PICTURE_HOVER_BLOCKS,m as PICTURE_HOVER_KEYS,R as PICTURE_HOVER_KINDS,p as PICTURE_HOVER_ZOOM,q as boxHighlightStyle,A as boxHoverOf,T as cardHoverAngleOf,K as cardHoverKindOf,O as cardHoverMediaOf,te as cardHoverOf,D as cardHoverResting,re as cardRotatesRule,oe as cardShowsNextRule,J as hoverOf,B as pictureHoverDarkenOf,U as pictureHoverKindOf,ce as pictureHoverMoveRule,se as pictureHoverOf,M as pictureHoverResting,ae as pictureHoverRunsRule,ue as pictureHoverTimedRule,y as pictureHoverZoomOf};
1
+ import{MEDIA_ZONES as g,MEDIA_ZONE_LABELS as I}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as S,hoverKindsOf as a,motionSeconds as s}from"efficient-shell/format";import{ANGLE_RANGE as A}from"../content/box-angle.js";import{finiteNumber as u}from"../finite-number.js";const i="hover",q="_gHover",D={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},c="highlight",L="Highlight",J=["none",c],Q={none:D.none,[c]:L};function V(e){return e[i]===c?c:"none"}const $="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",ee="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function ne(e,n){return V(e)!==c?null:{"--sf-hl-bg":n("surface"),"--sf-hl-ink":n("main")}}const k=a(["none","lift"]);function oe(e){const n=e[i];return k.includes(n)?n:"none"}const E=a(["none","nextImage","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},f="spinOnHover",O=A,x={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},te=Object.keys(x);function N(e){return x[e]??"none"}const C=S.rotateFallbackDeg,K=e=>e==="rendering"?"renderings":e,T=e=>e==="renderings"?"rendering":e,m=Object.freeze(g.filter(e=>e!=="videos").map(K)),re=Object.freeze(Object.fromEntries(m.map(e=>[e,I[T(e)]]))),G=["finish","first"],ie={finish:"Same finish",first:"First group"},M=["card","picture"],ce={card:"Whole card",picture:"Picture"},d={kind:"photos",group:"finish",cover:"card"},l=(e,n,o)=>e.includes(n)?n:o;function R(e){return{kind:l(m,e[r.mediaKind],d.kind),group:l(G,e[r.mediaGroup],d.group),cover:l(M,e[r.cover],d.cover)}}function ae(){return{field:r.kind,is:"nextImage"}}function B(e,n){const o=e[r.kind];if(E.includes(o))return o;const t=e[f];return typeof t=="boolean"?t?"rotate":"none":n}function P(e){const n=u(e);return n===void 0?C:Math.min(O.max,Math.max(O.min,n))}function se(e,n){const o=N(n),t=B(e,o);return{kind:t,angle:t==="rotate"?P(e[r.angle]):null,duration:s("hover","duration",t==="rotate"?e[r.duration]:void 0),delay:s("hover","delay",t==="rotate"?e[r.delay]:void 0),...t==="nextImage"?{media:R(e)}:{}}}function ue(e){const n={field:r.kind,in:[...E]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:n},e==="rotate"?{not:{field:f,is:!1}}:{field:f,is:!0}]}]}}const v=a(["none","mono"]),b=a(["none","nextImage","mono"]),h={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},fe=Object.keys(h);function y(e){return h[e]??"none"}const H={zoom:"hoverZoom",darken:"hoverDarken"},p={min:100,max:150,step:1,unit:"%"};function U(e){const n=u(e[H.zoom]);if(n===void 0)return null;const o=Math.min(p.max,Math.max(p.min,n));return o===p.min?null:String(o/100)}function X(e){const n=u(e[H.darken]);return n!==void 0&&n>0?n:null}const Z=["ImageBlock"];function z(e,n,o=v){const t=e[i];return o.includes(t)?t:n}function de(e,n=""){const o=Z.includes(n)?b:v,t=z(e,y(n),o),_=t==="mono";return{kind:t,duration:s("hover","duration",_?e[r.duration]:void 0),delay:s("hover","delay",_?e[r.delay]:void 0),...t==="nextImage"?{media:R(e)}:j(e)}}function j(e){const n=U(e),o=X(e);return{...n?{zoom:n}:{},...o?{darken:o}:{}}}function le(){return{not:{field:i,is:"nextImage"}}}function pe(e){return e==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}function _e(e){return e==="none"?{field:i,is:"mono"}:{not:{field:i,in:["none","nextImage"]}}}export{c as BOX_HIGHLIGHT,$ as BOX_HIGHLIGHT_CLASS,ee as BOX_HIGHLIGHT_OVER_ROW_INK_CLASS,J as BOX_HOVER_KINDS,Q as BOX_HOVER_LABELS,O as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,E as CARD_HOVER_KINDS,te as CARD_HOVER_SECTIONS,C as CARD_HOVER_TURN,L as HIGHLIGHT_LABEL,q as HOVER_GROUP_KEY,i as HOVER_KEY,D as HOVER_KIND_LABELS,M as HOVER_MEDIA_COVERS,ce as HOVER_MEDIA_COVER_LABELS,d as HOVER_MEDIA_DEFAULTS,G as HOVER_MEDIA_GROUPS,ie as HOVER_MEDIA_GROUP_LABELS,m as HOVER_MEDIA_KINDS,re as HOVER_MEDIA_KIND_LABELS,Z as NEXT_PICTURE_BLOCKS,b as NEXT_PICTURE_HOVER_KINDS,f as OLD_SPIN_KEY,k as PART_HOVER_KINDS,fe as PICTURE_HOVER_BLOCKS,H as PICTURE_HOVER_KEYS,v as PICTURE_HOVER_KINDS,p as PICTURE_HOVER_ZOOM,ne as boxHighlightStyle,V as boxHoverOf,P as cardHoverAngleOf,B as cardHoverKindOf,R as cardHoverMediaOf,se as cardHoverOf,N as cardHoverResting,ue as cardRotatesRule,ae as cardShowsNextRule,oe as hoverOf,X as pictureHoverDarkenOf,z as pictureHoverKindOf,le as pictureHoverMoveRule,de as pictureHoverOf,y as pictureHoverResting,pe as pictureHoverRunsRule,_e as pictureHoverTimedRule,U as pictureHoverZoomOf};
@@ -7,6 +7,7 @@ export declare const LOOP_OPTIONS: readonly {
7
7
  value: Loop;
8
8
  }[];
9
9
  export declare function parseLoop(value: unknown): Loop;
10
+ export declare const LOOP_GROUP_KEY = "_gLoop";
10
11
  export declare const LOOP_SCROLLS: ShowWhenRule;
11
12
  export type LoopDirection = "left" | "right" | "up" | "down";
12
13
  export declare const DEFAULT_LOOP_DIRECTION: LoopDirection;
@@ -1 +1 @@
1
- import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const i="none",u=[{label:"None",value:"none"},{label:"Marquee",value:"scroll"}];function x(o){return r(u,i,o)}const D={field:"loop",is:"scroll"},O="left",a=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],c={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function _(o){return r(a,O,o)}function d(o){return o==="up"||o==="down"}function N(o){return l("loop","duration",o.loopDuration!=null?o.loopDuration:o.speed)}const E=e.loop.duration.default,f=e.loop.delay.default;function I(o){return l("loop","delay",o.loopDelay)}function T(o,n,t=f){return`${c[o]} ${n}s ${p.loop}${t?` ${t}s`:""} infinite`}export{f as DEFAULT_LOOP_DELAY,O as DEFAULT_LOOP_DIRECTION,E as DEFAULT_LOOP_SECONDS,a as LOOP_DIRECTION_OPTIONS,i as LOOP_NONE,u as LOOP_OPTIONS,D as LOOP_SCROLLS,d as isVerticalLoop,T as loopAnimation,I as loopDelayOf,N as loopSecondsOf,x as parseLoop,_ as parseLoopDirection};
1
+ import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const O="none",i=[{label:"None",value:"none"},{label:"Marquee",value:"scroll"}];function _(o){return r(i,O,o)}const x="_gLoop",D={field:"loop",is:"scroll"},u="left",c=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],a={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function d(o){return r(c,u,o)}function E(o){return o==="up"||o==="down"}function N(o){return l("loop","duration",o.loopDuration!=null?o.loopDuration:o.speed)}const I=e.loop.duration.default,f=e.loop.delay.default;function P(o){return l("loop","delay",o.loopDelay)}function T(o,n,t=f){return`${a[o]} ${n}s ${p.loop}${t?` ${t}s`:""} infinite`}export{f as DEFAULT_LOOP_DELAY,u as DEFAULT_LOOP_DIRECTION,I as DEFAULT_LOOP_SECONDS,c as LOOP_DIRECTION_OPTIONS,x as LOOP_GROUP_KEY,O as LOOP_NONE,i as LOOP_OPTIONS,D as LOOP_SCROLLS,E as isVerticalLoop,T as loopAnimation,P as loopDelayOf,N as loopSecondsOf,_ as parseLoop,d as parseLoopDirection};
@@ -0,0 +1,11 @@
1
+ export declare const MARK_GAP_PX = 4;
2
+ export interface MarkRect {
3
+ readonly left: number;
4
+ readonly top: number;
5
+ readonly width: number;
6
+ readonly height: number;
7
+ }
8
+ export declare function markZoomCap(mark: MarkRect, others: readonly {
9
+ rect: MarkRect;
10
+ mark: boolean;
11
+ }[], zoom: number): number;
@@ -0,0 +1 @@
1
+ const x=4;function s(h,i,e,n){return i<=0?1/0:n?2*(h-4)/(i+e):2*(h-e/2-4)/i}function g(h,i,e){const n=t=>t.width>0&&t.height>0;if(!n(h)||i.some(t=>t.mark&&!n(t.rect)))return 1;const a=h.left+h.width/2,d=h.top+h.height/2;let o=e;for(const{rect:t,mark:c}of i){const f=Math.abs(t.left+t.width/2-a),M=Math.abs(t.top+t.height/2-d),r=Math.max(s(f,h.width,t.width,c),s(M,h.height,t.height,c));o=Math.min(o,Math.max(1,r))}return o}export{x as MARK_GAP_PX,g as markZoomCap};
@@ -0,0 +1,20 @@
1
+ import { type ScrollValue } from "efficient-shell/format";
2
+ export declare const SCROLL_KEYS: {
3
+ readonly effect: "scroll";
4
+ readonly zoom: "scrollZoom";
5
+ readonly start: "scrollStart";
6
+ readonly end: "scrollEnd";
7
+ };
8
+ export declare const SCROLL_GROUP_KEY = "_gScroll";
9
+ export declare const SCROLL_CUSTOMIZE_KEY = "_cScroll";
10
+ export type ScrollView = "desktop" | "tablet" | "phone";
11
+ export declare const scrollViewKey: (key: string, view: ScrollView) => string;
12
+ export declare const SCROLL_STORE_KEYS: readonly string[];
13
+ type Props = Readonly<Record<string, unknown>>;
14
+ export declare function scrollOf(props: Props, view: ScrollView): ScrollValue;
15
+ export type ScrollViews = Readonly<Record<ScrollView, ScrollValue>>;
16
+ export declare function scrollDrawn(props: Props): ScrollViews | null;
17
+ export type ScrollOrigins = Readonly<Partial<Record<ScrollView, string>>>;
18
+ export declare function scrollOrigins(points: Readonly<Partial<Record<ScrollView, string>>>): ScrollOrigins;
19
+ export declare function scrollOriginsOf(props: Props, focusKey: string): ScrollOrigins;
20
+ export {};
@@ -0,0 +1 @@
1
+ import{FOLLOW_RULES as O,phoneKey as S,resolveViewValue as m,tabletKey as L}from"efficient-easel/screen/lib/content/view-tiers";import{parseFocal as b,formatFocal as h,readScroll as x}from"efficient-shell/format";import{viewFocusValues as _}from"../content/picture-focus-rows.js";const n={effect:"scroll",zoom:"scrollZoom",start:"scrollStart",end:"scrollEnd"},C="_gScroll",V="_cScroll",f=["desktop","tablet","phone"],l=(t,o)=>o==="phone"?S(t):o==="tablet"?L(t):t,F=Object.values(n).flatMap(t=>f.map(o=>l(t,o))),c=t=>t===null||t===""?void 0:t,u=(t,o,e)=>m("same",c(t),c(o),c(e),O);function r(t,o,e){return u(t[l(o,"desktop")],t[l(o,"tablet")],t[l(o,"phone")])[e]}function s(t,o){return x(r(t,n.effect,o),r(t,n.zoom,o),r(t,n.start,o),r(t,n.end,o))}function Y(t){const o={desktop:s(t,"desktop"),tablet:s(t,"tablet"),phone:s(t,"phone")};return f.every(e=>o[e].effect==="none")?null:o}function E(t){const o=u(t.desktop,t.tablet,t.phone),e=i=>{const a=o[i];if(typeof a!="string")return;const{x:d,y:p}=b(a);return h(d,p)};return{desktop:e("desktop"),tablet:e("tablet"),phone:e("phone")}}function k(t,o){return E(_(t,o))}export{V as SCROLL_CUSTOMIZE_KEY,C as SCROLL_GROUP_KEY,n as SCROLL_KEYS,F as SCROLL_STORE_KEYS,Y as scrollDrawn,s as scrollOf,E as scrollOrigins,k as scrollOriginsOf,l as scrollViewKey};
@@ -1 +1 @@
1
- import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";const f="dataSource",x="dataSourceOptions",p="dataRows",_="countKey",g="counts",A="location-payment-methods",C="shop-payment-methods",w="delivery-options";function u(e){return typeof e.open=="function"}const y=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function s(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const m=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),b=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),i=e=>typeof e=="string"&&e.trim()!=="";function O(e){if(!e||!i(e.label))return null;if(u(e))return{label:e.label.trim(),open:e.open};const t=e.href;return i(t)?{label:e.label.trim(),href:t.trim()}:null}function d(e){if(typeof e.key!="string"||!y.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=O(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>l(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(m)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(b).map(r=>({...r}))}:{},...t?{edit:t}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(r=>typeof r=="string"&&r.trim()!=="").map(r=>r.trim())}:{}}}function P(e){const t=e.map(d),r=s();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function v(e){const t=[...s().sources.values()];return e===void 0?t:t.filter(r=>r.blocks.includes(e))}function h(e){return s().sources.get(e)??null}function T(e){return s().sources.get(e)?.choices??[]}function U(){return s().revision}function S(e){const t=e?.[f];return typeof t=="string"?t.trim():""}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const n=a(o);n&&(t[r]=n)}return Object.keys(t).length?t:null}function k(e){const t=e?.[p];return Array.isArray(t)?t.map(l).filter(r=>r!==null):null}function N(e,t,r=[]){const o=k(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const n=h(S(e))?.sample;return{rows:n?.length?n:r,sample:!0}}export{x as BLOCK_SOURCE_OPTIONS_PROP,f as BLOCK_SOURCE_PROP,p as BLOCK_SOURCE_ROWS_PROP,g as COUNTS_SOURCE,_ as COUNT_KEY_PROP,w as DELIVERY_OPTIONS_SOURCE,A as LOCATION_PAYMENT_METHODS_SOURCE,C as SHOP_PAYMENT_METHODS_SOURCE,h as blockSourceSpec,v as blockSources,U as blockSourcesRevision,S as declaredBlockSource,u as isSourceEditAction,P as registerBlockSources,k as servedRows,T as sourceChoices,N as sourcedRows};
1
+ import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";import{slotFieldBlocks as f}from"./slot-field-blocks.js";const p="dataSource",g="dataSourceOptions",u="dataRows",w="countKey",A="counts",C="location-payment-methods",P="shop-payment-methods",v="delivery-options";function y(e){return typeof e.open=="function"}const m=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function n(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const d=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),b=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),l=e=>typeof e=="string"&&e.trim()!=="";function h(e){if(!e||!l(e.label))return null;if(y(e))return{label:e.label.trim(),open:e.open};const t=e.href;return l(t)?{label:e.label.trim(),href:t.trim()}:null}function k(e){if(typeof e.key!="string"||!m.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=e.blocks.find(r=>f().has(r));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);const o=h(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>i(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(d)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(b).map(r=>({...r}))}:{},...o?{edit:o}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(r=>typeof r=="string"&&r.trim()!=="").map(r=>r.trim())}:{}}}function T(e){const t=e.map(k),o=n();for(const r of t)o.sources.set(r.key,r);t.length&&(o.revision+=1)}function U(e){const t=[...n().sources.values()];return e===void 0?t:t.filter(o=>o.blocks.includes(e))}function O(e){return n().sources.get(e)??null}function N(e){return n().sources.get(e)?.choices??[]}function B(){return n().revision}function S(e){const t=e?.[p];return typeof t=="string"?t.trim():""}function i(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[o,r]of Object.entries(e)){const s=a(r);s&&(t[o]=s)}return Object.keys(t).length?t:null}function E(e){const t=e?.[u];return Array.isArray(t)?t.map(i).filter(o=>o!==null):null}function K(e,t,o=[]){const r=E(e);if(r!==null&&(r.length||!t))return{rows:r,sample:!1};if(!t)return{rows:[],sample:!1};const s=O(S(e))?.sample;return{rows:s?.length?s:o,sample:!0}}export{g as BLOCK_SOURCE_OPTIONS_PROP,p as BLOCK_SOURCE_PROP,u as BLOCK_SOURCE_ROWS_PROP,A as COUNTS_SOURCE,w as COUNT_KEY_PROP,v as DELIVERY_OPTIONS_SOURCE,C as LOCATION_PAYMENT_METHODS_SOURCE,P as SHOP_PAYMENT_METHODS_SOURCE,O as blockSourceSpec,U as blockSources,B as blockSourcesRevision,S as declaredBlockSource,y as isSourceEditAction,T as registerBlockSources,E as servedRows,N as sourceChoices,K as sourcedRows};
@@ -1,4 +1,4 @@
1
- export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "poster" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story")[];
1
+ export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
2
2
  export type BoxShape = (typeof BOX_SHAPES)[number];
3
3
  export declare function boxShapeOf(value: unknown): BoxShape;
4
4
  export declare function boxShapeClass(value: unknown): string;
@@ -1,3 +1,4 @@
1
+ import type { CSSProperties } from "react";
1
2
  import type { SourceRow } from "./block-sources.js";
2
3
  declare const CARD_ROW_STATES: readonly ["selected", "highlighted"];
3
4
  type CardRowStateName = (typeof CARD_ROW_STATES)[number];
@@ -10,9 +11,15 @@ export declare const CARD_STATE_PICKED_CLASS = "pointer-events-none absolute ins
10
11
  export declare const CARD_STATE_PICKED_BAR_CLASS = "absolute inset-y-0 left-0 w-[3px] bg-accent";
11
12
  export declare const CARD_STATE_PICKED_WASH_CLASS = "absolute -inset-[2px] -z-[1] bg-[color-mix(in_oklab,var(--accent)_14%,transparent)]";
12
13
  export declare const CARD_ACTION_HOVER_CLASS = "after:pointer-events-none after:absolute after:inset-0 hover:after:border-2 hover:after:border-accent";
14
+ export declare const CARD_STATE_PICKED_INK: Readonly<Record<string, string>>;
13
15
  export declare function cardStatePicked(state: CardRowState | undefined | null): boolean;
14
16
  export declare function cardStateValue(state: CardRowState | undefined | null): string;
15
- export declare function cardStateAttrs(state: CardRowState | undefined | null, line?: CardStateLine): Record<string, string>;
17
+ export type CardStateAttrs = {
18
+ [attribute: string]: string | CSSProperties | undefined;
19
+ className?: string;
20
+ style?: CSSProperties;
21
+ };
22
+ export declare function cardStateAttrs(state: CardRowState | undefined | null, line?: CardStateLine): CardStateAttrs;
16
23
  export declare const CARD_BADGE_FIELD = "badge";
17
24
  export declare function keyedRows(rows: readonly SourceRow[], keys?: readonly {
18
25
  key: string;
@@ -31,8 +38,11 @@ export declare function highlightOf(props: Record<string, unknown>): {
31
38
  };
32
39
  export type CardItemAction = {
33
40
  readonly press: () => void;
41
+ readonly label?: string;
42
+ readonly disabled?: boolean;
34
43
  };
35
44
  export declare function cardItemAction(item: unknown): CardItemAction | undefined;
36
45
  export declare const CARD_ACTION_ATTR = "data-sf-card-press";
37
46
  export declare const CARD_ACTION_CLASS = "absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent appearance-none bg-transparent border-0 p-0 m-0 cursor-pointer";
47
+ export declare const CARD_ACTION_OFF_CLASS = "absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent appearance-none bg-transparent border-0 p-0 m-0";
38
48
  export {};
@@ -1 +1 @@
1
- import{BOX_LINK_CLASS as c}from"./box-link.js";import{cardKeyOf as f}from"./card-template.js";const d=["selected","highlighted"],p="data-sf-card-state",b="pointer-events-none absolute inset-0 border border-accent",g="pointer-events-none absolute inset-x-0 bottom-0 border-b-2 border-accent",h="pointer-events-none absolute inset-0 border-2 border-accent outline outline-1 -outline-offset-1 outline-accent",T="absolute inset-y-0 left-0 w-[3px] bg-accent",x="absolute -inset-[2px] -z-[1] bg-[color-mix(in_oklab,var(--accent)_14%,transparent)]",R="after:pointer-events-none after:absolute after:inset-0 hover:after:border-2 hover:after:border-accent";function u(e){return e?.selected===!0}function A(e){return e?d.filter(r=>e[r]===!0).join(" "):""}function D(e,r="frame"){const t=A(e);return t?{[p]:t,className:r==="frame"&&u(e)?"relative isolate":"relative"}:{}}const _={highlighted:!0},l={},a="badge";function E(e,r=[]){return e.map((t,n)=>({...t,key:t.key||r[n]?.key||f(t,n)}))}function m(e){return!e||typeof e!="object"?!1:Object.entries(e).some(([r,t])=>r==="key"||r===a||r==="state"?!1:typeof t=="string"?t.trim()!=="":Array.isArray(t)?t.length>0:t!=null&&typeof t!="function")}function y(e,{chosen:r,badge:t}){const n=r.trim(),s=n?e.findIndex(o=>o.key===n):-1;return{rows:e.map((o,i)=>({...o,[a]:i===s?t:""})),states:e.map((o,i)=>i===s?_:l)}}function I(e){return{chosen:typeof e.highlightedCard=="string"?e.highlightedCard.trim():"",badge:typeof e.highlightBadge=="string"?e.highlightBadge:""}}function L(e){if(!e||typeof e!="object")return;const r=e.press;return typeof r=="function"?{press:r}:void 0}const O="data-sf-card-press",N=`${c} appearance-none bg-transparent border-0 p-0 m-0 cursor-pointer`;export{O as CARD_ACTION_ATTR,N as CARD_ACTION_CLASS,R as CARD_ACTION_HOVER_CLASS,a as CARD_BADGE_FIELD,p as CARD_STATE_ATTR,b as CARD_STATE_LINE_CLASS,T as CARD_STATE_PICKED_BAR_CLASS,h as CARD_STATE_PICKED_CLASS,x as CARD_STATE_PICKED_WASH_CLASS,g as CARD_STATE_UNDER_LINE_CLASS,L as cardItemAction,D as cardStateAttrs,u as cardStatePicked,A as cardStateValue,I as highlightOf,E as keyedRows,y as markedRows,m as rowHoldsContent};
1
+ import{BOX_LINK_CLASS as u}from"./box-link.js";import{cardKeyOf as A}from"./card-template.js";import{INK as p}from"./ink.js";const _=["selected","highlighted"],a="data-sf-card-state",m="pointer-events-none absolute inset-0 border border-accent",D="pointer-events-none absolute inset-x-0 bottom-0 border-b-2 border-accent",E="pointer-events-none absolute inset-0 border-2 border-accent outline outline-1 -outline-offset-1 outline-accent",R="absolute inset-y-0 left-0 w-[3px] bg-accent",I="absolute -inset-[2px] -z-[1] bg-[color-mix(in_oklab,var(--accent)_14%,transparent)]",y="after:pointer-events-none after:absolute after:inset-0 hover:after:border-2 hover:after:border-accent",c=e=>{const r=p.find(t=>t.role===e)?.token;if(!r)throw new Error(`card-state: the palette has no ink token for "${e}"`);return r},l={[c("muted")]:`var(${c("fg")})`};function C(e){return e?.selected===!0}function S(e){return e?_.filter(r=>e[r]===!0).join(" "):""}function L(e,r="frame"){const t=S(e);return t?r==="frame"&&C(e)?{[a]:t,className:"relative isolate",style:{...l}}:{[a]:t,className:"relative"}:{}}const b={highlighted:!0},T={},f="badge";function N(e,r=[]){return e.map((t,n)=>({...t,key:t.key||r[n]?.key||A(t,n)}))}function k(e){return!e||typeof e!="object"?!1:Object.entries(e).some(([r,t])=>r==="key"||r===f||r==="state"?!1:typeof t=="string"?t.trim()!=="":Array.isArray(t)?t.length>0:t!=null&&typeof t!="function")}function O(e,{chosen:r,badge:t}){const n=r.trim(),i=n?e.findIndex(o=>o.key===n):-1;return{rows:e.map((o,s)=>({...o,[f]:s===i?t:""})),states:e.map((o,s)=>s===i?b:T)}}function K(e){return{chosen:typeof e.highlightedCard=="string"?e.highlightedCard.trim():"",badge:typeof e.highlightBadge=="string"?e.highlightBadge:""}}function B(e){if(!e||typeof e!="object")return;const{press:r,pressLabel:t,pressDisabled:n}=e;if(typeof r=="function")return{press:r,...typeof t=="string"&&t.trim()!==""?{label:t}:null,...n===!0?{disabled:!0}:null}}const H="data-sf-card-press",d=`${u} appearance-none bg-transparent border-0 p-0 m-0`,v=`${d} cursor-pointer`,P=d;export{H as CARD_ACTION_ATTR,v as CARD_ACTION_CLASS,y as CARD_ACTION_HOVER_CLASS,P as CARD_ACTION_OFF_CLASS,f as CARD_BADGE_FIELD,a as CARD_STATE_ATTR,m as CARD_STATE_LINE_CLASS,R as CARD_STATE_PICKED_BAR_CLASS,E as CARD_STATE_PICKED_CLASS,l as CARD_STATE_PICKED_INK,I as CARD_STATE_PICKED_WASH_CLASS,D as CARD_STATE_UNDER_LINE_CLASS,B as cardItemAction,L as cardStateAttrs,C as cardStatePicked,S as cardStateValue,K as highlightOf,N as keyedRows,O as markedRows,k as rowHoldsContent};
@@ -27,10 +27,12 @@ export interface CardRowFieldSpec {
27
27
  everySource?: boolean;
28
28
  fields?: readonly CardRowFieldSpec[];
29
29
  mark?: "accentItalic";
30
+ plain?: true;
30
31
  }
31
32
  export interface CardTemplateSlotSpec {
32
33
  slot: string;
33
34
  label?: string;
35
+ fields?: readonly CardRowFieldSpec[];
34
36
  }
35
37
  export interface CardTemplateSpec {
36
38
  block: string;
@@ -59,24 +61,26 @@ export declare function cardTemplateSlotNames(type: unknown): readonly string[];
59
61
  export declare function isCardTemplateSlot(type: unknown, slot: string): boolean;
60
62
  export declare function cardTemplateSlotLabel(type: unknown, slot: string): string | null;
61
63
  export declare function cardTemplateFields(type: string, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
62
- export declare function defaultListField(type: unknown): string;
63
- export declare function cardListShows(props: Record<string, unknown> | null | undefined, ownerType: unknown): string;
64
+ export declare function defaultListField(type: unknown, slot?: string): string;
65
+ export declare function cardListShows(props: Record<string, unknown> | null | undefined, ownerType: unknown, slot?: string): string;
64
66
  export declare function cardTemplateFieldsOf(owner: {
65
67
  type?: unknown;
66
68
  props?: Record<string, unknown>;
67
- } | null | undefined, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
69
+ } | null | undefined, kind?: CardRowFieldKind, slot?: string): readonly CardRowFieldSpec[];
68
70
  export declare function cardTemplateField(type: string | undefined, key: string, owner?: {
69
71
  type?: unknown;
70
72
  props?: Record<string, unknown>;
71
- } | null): CardRowFieldSpec | null;
73
+ } | null, slot?: string): CardRowFieldSpec | null;
72
74
  export declare function rowFieldSpec(copy: {
73
75
  ownerType?: string;
76
+ slot?: string;
74
77
  fields?: readonly CardRowFieldSpec[];
75
78
  owner?: {
76
79
  type?: unknown;
77
80
  props?: Record<string, unknown>;
78
81
  } | null;
79
82
  } | null | undefined, key: string): CardRowFieldSpec | null;
83
+ export declare function rowFieldWordsArePlain(copy: Parameters<typeof rowFieldSpec>[0], key: string): boolean;
80
84
  export declare function namedRowField(props: Record<string, unknown> | null | undefined, prop?: string): string;
81
85
  export declare function cardKeyOf(row: SourceRow, index: number): string;
82
86
  export declare function cardRow(value: unknown): SourceRow;
@@ -88,12 +92,13 @@ export declare function rowPartByKey(type: string, props: Record<string, unknown
88
92
  export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
89
93
  export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
90
94
  export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
91
- export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[]): Record<string, unknown>;
95
+ export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[], slot?: string): Record<string, unknown>;
92
96
  type DocNode = {
93
97
  type?: unknown;
94
98
  props?: Record<string, unknown>;
95
99
  };
96
100
  export declare function cardTemplateOwner(appState: unknown, id: unknown): DocNode | null | undefined;
101
+ export declare function cardTemplateSlotOf(appState: unknown, id: unknown): string | null | undefined;
97
102
  export declare function cardTemplateCardOwner(appState: unknown, id: unknown): DocNode | null | undefined;
98
103
  export declare function cardCopyPlace(appState: unknown, id: unknown): CardCopyPlace | undefined;
99
104
  export declare function cardListFieldsOf(appState: unknown, list: {
@@ -1 +1 @@
1
- import{blockSourceSpec as x,declaredBlockSource as w}from"./block-sources.js";import{isNodeList as S}from"efficient-easel/data";import{BOX_TYPE as C}from"../document/container-blocks.js";import{globalRegistry as _}from"../global-registry.js";import{nonEmptyString as T}from"../non-empty-string.js";import{accentItalicRuns as A}from"../markup.js";import{withCardsTemplate as I}from"../document/cards-template-on-read.js";import{withCardListTemplate as E}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as F,withArticleBodyTemplate as P}from"../document/article-body-seed.js";import{withLogosTemplate as D}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as v}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintSideTemplate as W}from"../document/blocks/general/Footprint/card-seed.js";const B="template",M="Card template",y="CardList",h=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",N="rowLinkField";function be(){return{type:"slot",allow:[...h]}}const K=h.filter(e=>e!=="ButtonBlock"),L="items",R="itemFields";function ke(){return{type:"slot",allow:[...K]}}const j=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>v(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ"},{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=>W(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>I("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:y,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>D(e)},{block:y,fields:[{key:"badge",label:"Highlight badge",everySource:!0}],typedRows:L,seed:e=>E(e)},{block:F,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>P(e)}];function a(){return _("efficient.card-templates",()=>new Map(j.map(e=>[e.block,e])))}function ge(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=T(o.label);n.some(s=>s.slot===o.slot)||n.push(l?{slot:o.slot,label:l}:{slot:o.slot})}const i=T(t.typedRows);a().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function H(e,t){const r=e?a().get(e)?.seed:void 0;return r?r(t):t}function xe(e,t){const r=U(e),n=(r.length?r:[B]).filter(s=>t[s]===void 0||Array.isArray(t[s])&&t[s].length===0);if(!n.length)return t;const i={...t};for(const s of n)delete i[s];const o=e?a().get(e)?.seedOnInsert:void 0,l=o?o(i):H(e,i);return l===i?t:l}function we(){for(const e of a().values())if(e.blocks?.length)return!0;return!1}function Te(e){return a().get(e)?.blocks??[]}function Be(e){for(const t of a().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function he(e){return typeof e=="string"&&a().get(e)?.typedRows||""}function Le(e){return typeof e=="string"&&a().get(e)?.linesBetween===!0}function Re(e){return typeof e=="string"&&a().has(e)}const Y=[{slot:B}];function m(e){if(typeof e!="string")return[];const t=a().get(e);return t?t.slots??Y:[]}function U(e){return m(e).map(t=>t.slot)}function $(e,t){return m(e).some(r=>r.slot===t)}function Oe(e,t){const r=m(e).find(n=>n.slot===t);return r?r.label??M:null}function Q(e,t){const r=a().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function q(e){return typeof e=="string"?Q(e,"list")[0]?.key??"":""}function V(e,t){return b(e)||q(t)}function O(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=a().get(r)?.fields??[],i=x(w(e?.props))?.fields,o=i?.length?[...i.map(l=>({...l})),...n.filter(l=>l.everySource&&!i.some(s=>s.key===l.key))]:n;return t?o.filter(l=>(l.kind??"text")===t):o}function X(e,t,r){return e?r?O(r).find(n=>n.key===t)??null:a().get(e)?.fields.find(n=>n.key===t)??null:null}function z(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??X(e.ownerType,t,e.owner)}function b(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function Se(e,t){return e.key||String(t+1)}function Ce(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}const G="hideWhenRowEmpty";function _e(e,t){const r=e[G];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const k={Text:{text:p},ImageBlock:{src:p},ButtonBlock:{label:p,href:N},LogoBlock:{alt:p},Breadcrumb:{currentCrumb:p}},Ae=k,J=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Ie(e,t,r){return Z(e,t,r)&&!J.has(`${e}.${r}`)}function Z(e,t,r){return ee(e,t,r)!==""}function ee(e,t,r){const n=k[e]?.[r];return n?b(t,n):""}function te(e,t){return!t||!e?null:e[t]??""}function Ee(e,t,r,n,i){if(!r)return t;let o=null;for(const[l,s]of Object.entries(k[e]??{})){const f=b(t,s),c=te(r,f);c!==null&&(o??={...t},o[l]=z({ownerType:n,fields:i},f)?.mark==="accentItalic"?A(c):c)}return o??t}function g(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(o,l)=>{for(const s of o){if(s?.props?.id===t)return l;for(const[f,c]of Object.entries(s?.props??{})){if(!S(c))continue;const u=$(s.type,f)?{owner:s,direct:!0,nested:l!==null,underBox:!1}:l&&{owner:l.owner,direct:!1,nested:l.nested,underBox:l.underBox||s.type===C},d=n(c,u);if(d!==void 0)return d}}},i=n(r,null);return i===void 0?null:i}function re(e,t){const r=g(e,t);return r&&r.owner}function Fe(e,t){const r=g(e,t);return r&&(r.direct?r.owner:null)}function Pe(e,t){const r=g(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function De(e,t,r){if(t?.type!==y)return[];const n=re(e,t.props?.id);if(!n){const l=x(w(t.props))?.fields,s=l?.length?l.map(u=>({...u})):ne(t.props),f=(a().get(y)?.fields??[]).filter(u=>u.everySource&&!s.some(d=>d.key===u.key)),c=[...s,...f];return r?c.filter(u=>(u.kind??"text")===r):c}const i=V(t.props,n.type),o=i&&O(n,"list").find(l=>l.key===i)?.fields||[];return r?o.filter(l=>(l.kind??"text")===r):o}function ve(e,t){return{[p]:"",[L]:e.map(r=>({...r})),[R]:t.map(r=>({...r}))}}function ne(e,t){const r=e?.[R];if(!Array.isArray(r))return[];const n=r.flatMap(i=>{if(!i||typeof i!="object")return[];const{key:o,label:l,kind:s,multiline:f,alt:c,next:u}=i;if(typeof o!="string"||!o||typeof l!="string")return[];const d=s==="image"||s==="link"||s==="colour"?s:void 0;return[{key:o,label:l,...d?{kind:d}:{},...f===!0?{multiline:!0}:{},...typeof c=="string"&&c?{alt:c}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(i=>(i.kind??"text")===t):n}export{G as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,K as CARD_LIST_ITEM_BLOCKS,L as CARD_LIST_ROWS,y as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,N as CARD_ROW_LINK_PROP,h as CARD_TEMPLATE_BLOCKS,M as CARD_TEMPLATE_LABEL,B as CARD_TEMPLATE_SLOT,Ae as ROW_BOUND_PROPS,J as ROW_PART_BY_WORDS,Pe as cardCopyPlace,Se as cardKeyOf,De as cardListFieldsOf,ke as cardListItemSlot,ve as cardListProps,V as cardListShows,Ce as cardRow,Te as cardTemplateBlocks,Fe as cardTemplateCardOwner,X as cardTemplateField,Q as cardTemplateFields,O as cardTemplateFieldsOf,Le as cardTemplateLinesBetween,re as cardTemplateOwner,be as cardTemplateSlot,Oe as cardTemplateSlotLabel,U as cardTemplateSlotNames,he as cardTemplateTypedRows,we as cardTemplatesNameBlocks,q as defaultListField,Re as hasCardTemplate,Be as isCardTemplateBlock,$ as isCardTemplateSlot,b as namedRowField,ge as registerCardTemplates,Z as rowBound,ee as rowFieldOf,z as rowFieldSpec,te as rowFieldText,Ee as rowFilledProps,Ie as rowPartByKey,_e as templateBoxIsEmpty,xe as templateOnInsert,H as templateOnRead};
1
+ import{blockSources as E,blockSourceSpec as w,declaredBlockSource as T}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{isNodeList as I}from"efficient-easel/data";import{BOX_TYPE as F}from"../document/container-blocks.js";import{globalRegistry as P}from"../global-registry.js";import{nonEmptyString as B}from"../non-empty-string.js";import{accentItalicRuns as D}from"../markup.js";import{withCardsTemplate as v}from"../document/cards-template-on-read.js";import{withCardListTemplate as W}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as M,withArticleBodyTemplate as N}from"../document/article-body-seed.js";import{withLogosTemplate as K}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as j}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintSideTemplate as H}from"../document/blocks/general/Footprint/card-seed.js";const L="template",Y="Card template",m="CardList",S=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",$="rowLinkField";function he(){return{type:"slot",allow:[...S]}}const U=S.filter(e=>e!=="ButtonBlock"),O="items",R="itemFields";function Be(){return{type:"slot",allow:[...U]}}const Q=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>j(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>H(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>v("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:m,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>K(e)},{block:m,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:O,seed:e=>W(e)},{block:M,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>N(e)}];function f(){return P("efficient.card-templates",()=>new Map(Q.map(e=>[e.block,e])))}function Le(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const o=[];for(const r of t.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${t.block} names an empty block.`);o.some(l=>l.type===r.type)||o.push({type:r.type,label:r.label||r.type})}const n=[];for(const r of t.slots??[]){if(typeof r?.slot!="string"||!r.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=B(r.label),c=Array.isArray(r.fields)?{fields:r.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===r.slot)||n.push({slot:r.slot,...l?{label:l}:null,...c})}const s=n.some(r=>r.fields);if(s&&(t.fields.some(r=>r.everySource)||E(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=B(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(r=>({...r})),blocks:o,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function q(e,t){const o=e?f().get(e)?.seed:void 0;return o?o(t):t}function Se(e,t){const o=X(e),n=(o.length?o:[L]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,r=i?i(s):q(e,s);return r===s?t:r}function Oe(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Re(e){return f().get(e)?.blocks??[]}function Ae(e){for(const t of f().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function Ce(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function _e(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ee(e){return typeof e=="string"&&f().has(e)}const V=[{slot:L}];function y(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??V:[]}function X(e){return y(e).map(t=>t.slot)}function z(e,t){return y(e).some(o=>o.slot===t)}function Ie(e,t){const o=y(e).find(n=>n.slot===t);return o?o.label??Y:null}function b(e,t){return t?y(e).find(o=>o.slot===t)?.fields:void 0}function G(e,t){const o=f().get(e)?.fields??[];return t?o.filter(n=>(n.kind??"text")===t):o}function J(e,t){if(typeof e!="string")return"";const o=b(e,t);return(o?o.filter(n=>n.kind==="list"):G(e,"list"))[0]?.key??""}function Z(e,t,o){return x(e)||J(t,o)}function A(e,t,o){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=b(n,o);if(s)return t?s.filter(c=>(c.kind??"text")===t):s;const i=f().get(n)?.fields??[],r=w(T(e?.props))?.fields,l=r?.length?[...r.map(c=>({...c})),...i.filter(c=>c.everySource&&!r.some(a=>a.key===c.key))]:i;return t?l.filter(c=>(c.kind??"text")===t):l}function ee(e,t,o,n){if(!e)return null;const s=b(e,n);return s?s.find(i=>i.key===t)??null:o?A(o).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function C(e,t){return!e||!t?null:e.fields?.find(o=>o.key===t)??ee(e.ownerType,t,e.owner,e.slot)}function Fe(e,t){return C(e,t)?.plain===!0}function x(e,t=p){const o=e?.[t];return typeof o=="string"?o.trim():""}function Pe(e,t){return e.key||String(t+1)}function De(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[o,n]of Object.entries(e))typeof n=="string"&&(t[o]=n);return t}const te="hideWhenRowEmpty";function ve(e,t){const o=e[te];return!t||!Array.isArray(o)||!o.length?!1:o.every(n=>typeof n!="string"||!t[n]?.trim())}const g={Text:{text:p},ImageBlock:{src:p},ButtonBlock:{label:p,href:$},LogoBlock:{alt:p},Breadcrumb:{currentCrumb:p}},We=g,oe=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Me(e,t,o){return re(e,t,o)&&!oe.has(`${e}.${o}`)}function re(e,t,o){return ne(e,t,o)!==""}function ne(e,t,o){const n=g[e]?.[o];return n?x(t,n):""}function le(e,t){return!t||!e?null:e[t]??""}function Ne(e,t,o,n,s,i){if(!o)return t;let r=null;for(const[l,c]of Object.entries(g[e]??{})){const a=x(t,c),u=le(o,a);u!==null&&(r??={...t},r[l]=C({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?D(u):u)}return r??t}function k(e,t){const o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const n=(i,r)=>{for(const l of i){if(l?.props?.id===t)return r;for(const[c,a]of Object.entries(l?.props??{})){if(!I(a))continue;const u=z(l.type,c)?{owner:l,slot:c,direct:!0,nested:r!==null,underBox:!1}:r&&{owner:r.owner,slot:r.slot,direct:!1,nested:r.nested,underBox:r.underBox||l.type===F},d=n(a,u);if(d!==void 0)return d}}},s=n(o,null);return s===void 0?null:s}function se(e,t){const o=k(e,t);return o&&o.owner}function ie(e,t){const o=k(e,t);return o&&o.slot}function Ke(e,t){const o=k(e,t);return o&&(o.direct?o.owner:null)}function je(e,t){const o=k(e,t);if(o!==void 0)return o===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:o.nested,underBox:o.underBox}}function He(e,t,o){if(t?.type!==m)return[];const n=se(e,t.props?.id);if(!n){const l=w(T(t.props))?.fields,c=l?.length?l.map(d=>({...d})):ce(t.props),a=(f().get(m)?.fields??[]).filter(d=>d.everySource&&!c.some(_=>_.key===d.key)),u=[...c,...a];return o?u.filter(d=>(d.kind??"text")===o):u}const s=ie(e,t.props?.id)??void 0,i=Z(t.props,n.type,s),r=i&&A(n,"list",s).find(l=>l.key===i)?.fields||[];return o?r.filter(l=>(l.kind??"text")===o):r}function Ye(e,t){return{[p]:"",[O]:e.map(o=>({...o})),[R]:t.map(o=>({...o}))}}function ce(e,t){const o=e?.[R];if(!Array.isArray(o))return[];const n=o.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:r,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof r!="string")return[];const d=l==="image"||l==="link"||l==="colour"?l:void 0;return[{key:i,label:r,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(s=>(s.kind??"text")===t):n}export{te as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,U as CARD_LIST_ITEM_BLOCKS,O as CARD_LIST_ROWS,m as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,$ as CARD_ROW_LINK_PROP,S as CARD_TEMPLATE_BLOCKS,Y as CARD_TEMPLATE_LABEL,L as CARD_TEMPLATE_SLOT,We as ROW_BOUND_PROPS,oe as ROW_PART_BY_WORDS,je as cardCopyPlace,Pe as cardKeyOf,He as cardListFieldsOf,Be as cardListItemSlot,Ye as cardListProps,Z as cardListShows,De as cardRow,Re as cardTemplateBlocks,Ke as cardTemplateCardOwner,ee as cardTemplateField,G as cardTemplateFields,A as cardTemplateFieldsOf,_e as cardTemplateLinesBetween,se as cardTemplateOwner,he as cardTemplateSlot,Ie as cardTemplateSlotLabel,X as cardTemplateSlotNames,ie as cardTemplateSlotOf,Ce as cardTemplateTypedRows,Oe as cardTemplatesNameBlocks,J as defaultListField,Ee as hasCardTemplate,Ae as isCardTemplateBlock,z as isCardTemplateSlot,x as namedRowField,Le as registerCardTemplates,re as rowBound,ne as rowFieldOf,C as rowFieldSpec,le as rowFieldText,Fe as rowFieldWordsArePlain,Ne as rowFilledProps,Me as rowPartByKey,ve as templateBoxIsEmpty,Se as templateOnInsert,q as templateOnRead};
@@ -37,6 +37,12 @@ export declare function imageFillRowClasses(from: ImageFillFrom): {
37
37
  img: string;
38
38
  figure: string;
39
39
  };
40
+ export declare const FILLS_ITS_FRAME: {
41
+ readonly img: string;
42
+ };
43
+ export declare function pictureLayerClass(fill: {
44
+ readonly img: string;
45
+ } | null | undefined): string;
40
46
  export declare const isImageRatio: (value: unknown) => value is ImageRatio;
41
47
  export declare function imageRatioAspect(value: unknown): string | null;
42
48
  export declare function imageWidthFollowsBox(drawn: unknown, phone: unknown, fit: "cover" | "contain"): boolean;
@@ -1 +1 @@
1
- import{BOX_GIVES_PICTURES_A_HEIGHT as v}from"./box-layout.js";import{imageIsCropped as w,parseImageFit as n}from"./image-fit.js";import{SHAPE_TABLE as p}from"./gallery-card-layout.js";const f=p.map(e=>e.image),a="fill",P={label:"Fill row",value:a,showWhen:v},r="4/3",u={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},x={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:u,tablet:u,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function S(e,i,t){return i&&!o(t)?"all":e??"wide"}function m(e){return x[e]}const _={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},g={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},A={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},L={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},c=e=>f.includes(e),o=c;function h(e){const i=c(e)?p.find(t=>t.image===e)?.ratio:null;return i?`${i[0]} / ${i[1]}`:null}function k(e,i,t){return t==="contain"?!0:[e,i??e].every(s=>s!==a&&(!c(s)||s==="auto"))}function C(e,i){return e===a&&!i?r:e}function B(e){return e===a?r:o(e)?e:void 0}function l(e,i){return o(i)?i===e?null:i:e===a?r:null}function O(e,i){const t=l(e,i);return w(e,"cover")||t!==null&&w(t,"cover")}function I(e,i,t){return n(e,"cover")==="cover"&&O(i,t)}function W(e,i,t,s){return e==="desktop"?I(i,t,s):n(i,"cover")!=="cover"?!1:d(e==="tablet"?t:l(t,s)??t)}const d=e=>e===a||o(e)&&e!=="auto";function T(e,i,t="wide"){return e===a&&t==="all"?m("all").frame:i===null?o(e)?_[e]:"":[e===a?m(t).frame:o(e)?g[e]:"",e===a&&t==="desktop"?L[i]:A[i]].filter(Boolean).join(" ")}export{a as FILL_ROW,P as FILL_ROW_OPTION,T as imageAspectClasses,C as imageAspectDrawn,O as imageAspectDrawsARatio,l as imageAspectPhoneOf,B as imageAspectPhoneRest,S as imageFillFrom,m as imageFillRowClasses,I as imageFocalPointActs,W as imageFocalPointActsIn,h as imageRatioAspect,k as imageWidthFollowsBox,c as isImageRatio};
1
+ import{BOX_GIVES_PICTURES_A_HEIGHT as f}from"./box-layout.js";import{imageIsCropped as w,parseImageFit as n}from"./image-fit.js";import{SHAPE_TABLE as p}from"./gallery-card-layout.js";const x=p.map(e=>e.image),a="fill",S={label:"Fill row",value:a,showWhen:f},r="4/3",u={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},l={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:u,tablet:u,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function h(e,t,i){return t&&!o(i)?"all":e??"wide"}function m(e){return l[e]}const C=l.all;function P(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}const _={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},g={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},A={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},L={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},c=e=>x.includes(e),o=c;function k(e){const t=c(e)?p.find(i=>i.image===e)?.ratio:null;return t?`${t[0]} / ${t[1]}`:null}function B(e,t,i){return i==="contain"?!0:[e,t??e].every(s=>s!==a&&(!c(s)||s==="auto"))}function T(e,t){return e===a&&!t?r:e}function W(e){return e===a?r:o(e)?e:void 0}function d(e,t){return o(t)?t===e?null:t:e===a?r:null}function I(e,t){const i=d(e,t);return w(e,"cover")||i!==null&&w(i,"cover")}function O(e,t,i){return n(e,"cover")==="cover"&&I(t,i)}function b(e,t,i,s){return e==="desktop"?O(t,i,s):n(t,"cover")!=="cover"?!1:v(e==="tablet"?i:d(i,s)??i)}const v=e=>e===a||o(e)&&e!=="auto";function H(e,t,i="wide"){return e===a&&i==="all"?m("all").frame:t===null?o(e)?_[e]:"":[e===a?m(i).frame:o(e)?g[e]:"",e===a&&i==="desktop"?L[t]:A[t]].filter(Boolean).join(" ")}export{C as FILLS_ITS_FRAME,a as FILL_ROW,S as FILL_ROW_OPTION,H as imageAspectClasses,T as imageAspectDrawn,I as imageAspectDrawsARatio,d as imageAspectPhoneOf,W as imageAspectPhoneRest,h as imageFillFrom,m as imageFillRowClasses,O as imageFocalPointActs,b as imageFocalPointActsIn,k as imageRatioAspect,B as imageWidthFollowsBox,c as isImageRatio,P as pictureLayerClass};
@@ -1,4 +1,5 @@
1
1
  import type { CSSProperties } from "react";
2
+ import { type ShowWhenRule } from "efficient-shell/format";
2
3
  export declare const SECTION_STICK_LABEL = "Stick to top";
3
4
  export declare const SECTION_STICK_DISTANCE: {
4
5
  readonly min: 0;
@@ -6,17 +7,19 @@ export declare const SECTION_STICK_DISTANCE: {
6
7
  readonly step: 4;
7
8
  readonly fallback: 0;
8
9
  };
9
- export declare const SECTION_STICK_CLASS = "sf-section-stick";
10
- export declare const SCROLL_OVER_CLASS = "sf-scroll-over";
11
- export declare const SECTION_STICK_TABLET_ON_CLASS = "sf-section-stick-tablet-on";
12
- export declare const SECTION_STICK_TABLET_OFF_CLASS = "sf-section-stick-tablet-off";
13
- export declare const SECTION_STICK_PHONE_ON_CLASS = "sf-section-stick-phone-on";
14
- export declare const SECTION_STICK_PHONE_OFF_CLASS = "sf-section-stick-phone-off";
15
- export declare const SECTION_STICK_VARS: {
16
- readonly desktop: "--sf-stick-distance";
17
- readonly tablet: "--sf-stick-distance-tablet";
18
- readonly phone: "--sf-stick-distance-phone";
10
+ export declare const SECTION_PIN_LABEL = "Pin while scrolling";
11
+ export declare const SECTION_PIN_GROUP = "Scroll";
12
+ export declare const SECTION_PIN_VARS: {
13
+ readonly distance: "--sf-pin-distance";
14
+ readonly position: "--sf-pin-position";
15
+ readonly on: "--sf-pin-on";
16
+ readonly length: "--sf-pin-length";
17
+ readonly header: "--sf-pin-header";
19
18
  };
19
+ export declare const SECTION_PIN_SCREENS_KEY = "stickTopScreens";
20
+ export declare const SECTION_PIN_SCREENS_KEYS: readonly string[];
21
+ export declare const SECTION_PIN_SCREENS_LABEL = "Screens";
22
+ export declare const PIN_AT_SCREEN_TOP: ReadonlySet<string>;
20
23
  export declare const SECTION_STICK_EXCLUDED: ReadonlySet<string>;
21
24
  export type SectionStickProps = {
22
25
  stickTop?: unknown;
@@ -25,20 +28,33 @@ export type SectionStickProps = {
25
28
  stickTopDistanceTablet?: unknown;
26
29
  stickTopPhone?: unknown;
27
30
  stickTopDistancePhone?: unknown;
31
+ stickTopScreens?: unknown;
32
+ stickTopScreensTablet?: unknown;
33
+ stickTopScreensPhone?: unknown;
34
+ sticky?: unknown;
28
35
  };
36
+ export declare const INTRO_OLD_STICKY_PINS: ShowWhenRule;
29
37
  export declare function hasTabletStick(props: SectionStickProps): boolean;
30
38
  export declare function hasPhoneStick(props: SectionStickProps): boolean;
31
- export declare function resolveSectionStick(props: SectionStickProps): {
39
+ export declare function resolveSectionStick(props: SectionStickProps, opts?: {
40
+ intro?: boolean;
41
+ }): {
32
42
  desktop: boolean;
33
43
  desktopDistance: number;
44
+ desktopScreens: number;
34
45
  tablet: boolean;
35
46
  tabletDistance: number;
47
+ tabletScreens: number;
36
48
  ownTablet: boolean;
37
49
  phone: boolean;
38
50
  phoneDistance: number;
51
+ phoneScreens: number;
39
52
  ownPhone: boolean;
40
53
  };
41
- export declare function sectionStickAttrs(props: SectionStickProps): {
42
- className: string;
54
+ export declare function sectionPinAttrs(props: SectionStickProps, opts?: {
55
+ atScreenTop?: boolean;
56
+ track?: boolean;
57
+ }): {
58
+ attrs: Record<string, string>;
43
59
  style: CSSProperties;
44
60
  } | null;
@@ -1 +1 @@
1
- import{finiteNumber as k}from"../finite-number.js";const E="Stick to top",c={min:0,max:200,step:4,fallback:0},l="sf-section-stick",O="sf-scroll-over",r="sf-section-stick-tablet-on",C="sf-section-stick-tablet-off",_="sf-section-stick-phone-on",h="sf-section-stick-phone-off",i={desktop:"--sf-stick-distance",tablet:"--sf-stick-distance-tablet",phone:"--sf-stick-distance-phone"},d=new Set(["CategoryBar","DocTabs","IntroBleed","Contents"]);function a(e){const t=k(e)??c.fallback;return Math.min(c.max,Math.max(c.min,Math.round(t)))}function b(e){return typeof e.stickTopTablet=="boolean"}function u(e){return typeof e.stickTopPhone=="boolean"}function x(e){const t=e.stickTop===!0,n=a(e.stickTopDistance),o=b(e),p=o?e.stickTopTablet===!0:t,S=o?a(e.stickTopDistanceTablet):n,s=u(e),T=s?e.stickTopPhone===!0:p,f=s?a(e.stickTopDistancePhone):S;return{desktop:t,desktopDistance:n,tablet:p,tabletDistance:S,ownTablet:o,phone:T,phoneDistance:f,ownPhone:s}}function N(e){const t=x(e);if(!t.desktop&&!t.tablet&&!t.phone)return null;const n=[l],o={};return t.desktop&&(o[i.desktop]=`${t.desktopDistance}px`),t.ownTablet&&(n.push(t.tablet?r:C),t.tablet&&(o[i.tablet]=`${t.tabletDistance}px`)),(t.ownPhone||t.ownTablet||t.phone!==t.desktop)&&(n.push(t.phone?_:h),t.phone&&(o[i.phone]=`${t.phoneDistance}px`)),t.desktop||n.push("sf-section-stick-desktop-off"),{className:n.join(" "),style:o}}export{O as SCROLL_OVER_CLASS,l as SECTION_STICK_CLASS,c as SECTION_STICK_DISTANCE,d as SECTION_STICK_EXCLUDED,E as SECTION_STICK_LABEL,h as SECTION_STICK_PHONE_OFF_CLASS,_ as SECTION_STICK_PHONE_ON_CLASS,C as SECTION_STICK_TABLET_OFF_CLASS,r as SECTION_STICK_TABLET_ON_CLASS,i as SECTION_STICK_VARS,u as hasPhoneStick,b as hasTabletStick,x as resolveSectionStick,N as sectionStickAttrs};
1
+ import{pinAttrs as _,readPin as h}from"efficient-shell/format";import{finiteNumber as E}from"../finite-number.js";import{viewVarSplit as I}from"./view-var-split.js";const g="Stick to top",f={min:0,max:200,step:4,fallback:0},A="Pin while scrolling",L="Scroll",o={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",header:"--sf-pin-header"},N="stickTopScreens",w=[N,"stickTopScreensTablet","stickTopScreensPhone"],K="Screens",R=new Set(["IntroBleed"]),$=new Set(["CategoryBar","DocTabs","Contents"]);function x(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}const d=e=>h(!0,e).length,B={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function b(e){const s=E(e)??f.fallback;return Math.min(f.max,Math.max(f.min,Math.round(s)))}function C(e){return typeof e.stickTopTablet=="boolean"}function P(e){return typeof e.stickTopPhone=="boolean"}function y(e,s={}){const t=s.intro?x(e):e.stickTop===!0,T=b(e.stickTopDistance),k=d(e.stickTopScreens),i=C(e),c=i?e.stickTopTablet===!0:t,p=i?b(e.stickTopDistanceTablet):T,r=i?d(e.stickTopScreensTablet):k,a=P(e),n=a?e.stickTopPhone===!0:c,l=a?b(e.stickTopDistancePhone):p,S=a?d(e.stickTopScreensPhone):r;return{desktop:t,desktopDistance:T,desktopScreens:k,tablet:c,tabletDistance:p,tabletScreens:r,ownTablet:i,phone:n,phoneDistance:l,phoneScreens:S,ownPhone:a}}function V(e,s={}){const t=y(e,{intro:s.atScreenTop});if(!t.desktop&&!t.tablet&&!t.phone)return null;const T=s.atScreenTop===!0&&typeof e.stickTop!="boolean",k=t.desktop&&t.desktopScreens>0||t.tablet&&t.tabletScreens>0||t.phone&&t.phoneScreens>0,i=s.track===!0&&!T&&k,c=(n,l,S,u)=>I({tabletClass:"",tabletVar:`${n}-tablet`,phoneClass:"",phoneVar:`${n}-phone`},l,S,u).style,p={...s.atScreenTop?{[o.header]:"0px"}:{},[o.distance]:`${t.desktopDistance}px`,...c(o.distance,`${t.desktopDistance}px`,`${t.tabletDistance}px`,`${t.phoneDistance}px`)};if(i){const n=S=>S?"1":"0",l={...p,...t.desktop?{}:{[o.on]:"0"},...c(o.on,n(t.desktop),n(t.tablet),n(t.phone)),[o.length]:String(t.desktopScreens),...c(o.length,String(t.desktopScreens),String(t.tabletScreens),String(t.phoneScreens))};return{attrs:_(h(!0),"track").attrs,style:l}}const r=n=>n?"sticky":"static",a={...p,...t.desktop?{}:{[o.position]:"static"},...c(o.position,r(t.desktop),r(t.tablet),r(t.phone))};return{attrs:_(h(!0),"stick").attrs,style:a}}export{B as INTRO_OLD_STICKY_PINS,R as PIN_AT_SCREEN_TOP,L as SECTION_PIN_GROUP,A as SECTION_PIN_LABEL,N as SECTION_PIN_SCREENS_KEY,w as SECTION_PIN_SCREENS_KEYS,K as SECTION_PIN_SCREENS_LABEL,o as SECTION_PIN_VARS,f as SECTION_STICK_DISTANCE,$ as SECTION_STICK_EXCLUDED,g as SECTION_STICK_LABEL,P as hasPhoneStick,C as hasTabletStick,y as resolveSectionStick,V as sectionPinAttrs};
@@ -0,0 +1 @@
1
+ export declare function slotFieldBlocks(): Set<string>;
@@ -0,0 +1 @@
1
+ import{globalRegistry as e}from"../global-registry.js";function t(){return e("efficient.slot-field-blocks",()=>new Set)}export{t as slotFieldBlocks};