efficient-web-builder 73.1.0 → 74.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 (136) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/editor/components/CustomHtmlCodeWindow.d.ts +11 -0
  3. package/dist/editor/components/CustomHtmlCodeWindow.js +20 -0
  4. package/dist/editor/components/SectionThemePicker.d.ts +3 -2
  5. package/dist/editor/components/SectionThemePicker.js +1 -1
  6. package/dist/editor/components/SiteTextStylesField.d.ts +2 -1
  7. package/dist/editor/components/SiteTextStylesField.js +1 -1
  8. package/dist/editor/components/SlotChildRows.js +1 -1
  9. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  10. package/dist/editor/components/StorefrontEditor.js +1 -1
  11. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  12. package/dist/editor/components/WebsiteSettingsPanel.d.ts +2 -0
  13. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  14. package/dist/editor/components/storefront-editor.css +111 -0
  15. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/CustomHTML/fields.d.ts +6 -0
  17. package/dist/editor/lib/document/blocks/general/CustomHTML/fields.js +1 -0
  18. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  22. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +5 -0
  23. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  24. package/dist/editor/lib/document/controls.js +1 -1
  25. package/dist/editor/lib/document/custom-html-preview.d.ts +12 -0
  26. package/dist/editor/lib/document/custom-html-preview.js +1 -0
  27. package/dist/editor/lib/document/footer-blocks.js +1 -1
  28. package/dist/editor/lib/document/own-pad-fields.d.ts +5 -0
  29. package/dist/editor/lib/document/own-pad-fields.js +1 -0
  30. package/dist/editor/lib/document/passes/inspector.js +1 -1
  31. package/dist/editor/lib/editor-document-adapter.js +1 -1
  32. package/dist/format/lib/animation/hover.js +1 -1
  33. package/dist/format/lib/animation/loop.js +1 -1
  34. package/dist/format/lib/content/accordion-row-style.d.ts +3 -1
  35. package/dist/format/lib/content/accordion-row-style.js +1 -1
  36. package/dist/format/lib/content/box-layout.js +1 -1
  37. package/dist/format/lib/content/box-shape.d.ts +1 -1
  38. package/dist/format/lib/content/button-icon.d.ts +3 -1
  39. package/dist/format/lib/content/button-icon.js +1 -1
  40. package/dist/format/lib/content/card-place.d.ts +3 -1
  41. package/dist/format/lib/content/card-place.js +1 -1
  42. package/dist/format/lib/content/chat-launcher.js +1 -1
  43. package/dist/format/lib/content/container-direction.js +1 -1
  44. package/dist/format/lib/content/footprint.d.ts +22 -0
  45. package/dist/format/lib/content/footprint.js +1 -1
  46. package/dist/format/lib/content/image-fit.js +1 -1
  47. package/dist/format/lib/content/image-text-rows.d.ts +5 -2
  48. package/dist/format/lib/content/image-text-rows.js +1 -1
  49. package/dist/format/lib/content/list-number.js +1 -1
  50. package/dist/format/lib/content/list-position.js +1 -1
  51. package/dist/format/lib/content/text-tag.js +1 -1
  52. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  53. package/dist/format/lib/document/blocks/general/text-part-shapes.json +0 -6
  54. package/dist/format/lib/document/box-footer.js +1 -1
  55. package/dist/format/lib/document/custom-html-place.d.ts +19 -0
  56. package/dist/format/lib/document/custom-html-place.js +7 -0
  57. package/dist/format/lib/document/left-view.js +1 -1
  58. package/dist/format/lib/document/mockup-variant-fields.js +1 -1
  59. package/dist/format/lib/document/part-inks.d.ts +1 -0
  60. package/dist/format/lib/document/part-inks.js +1 -1
  61. package/dist/format/lib/document/passes/types.d.ts +1 -0
  62. package/dist/format/lib/document/section-groups.js +1 -1
  63. package/dist/format/lib/editor-words-catalogue.d.ts +28 -0
  64. package/dist/format/lib/editor-words-catalogue.js +5 -5
  65. package/dist/format/lib/hero-arrows.js +1 -1
  66. package/dist/format/lib/hero-group-placement.js +1 -1
  67. package/dist/format/lib/hero-media-layout.js +1 -1
  68. package/dist/format/lib/hero-phone-stack.d.ts +12 -0
  69. package/dist/format/lib/hero-phone-stack.js +1 -1
  70. package/dist/format/lib/hero-video.js +1 -1
  71. package/dist/format/lib/reel.js +1 -1
  72. package/dist/format/lib/sections/divider-style.js +1 -1
  73. package/dist/format/lib/sections/hero-overlay.js +1 -1
  74. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  75. package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
  76. package/dist/format/lib/sections/logo-look.js +1 -1
  77. package/dist/format/lib/sections/product-card-style.js +1 -1
  78. package/dist/format/lib/sections/section-eyebrow-look.js +1 -1
  79. package/dist/format/lib/sections/section-head-placement.d.ts +3 -1
  80. package/dist/format/lib/sections/section-head-placement.js +1 -1
  81. package/dist/format/lib/sections/section-head-style.js +1 -1
  82. package/dist/format/lib/sections/section-number-style.js +1 -1
  83. package/dist/format/lib/sections/ticker-style.js +1 -1
  84. package/dist/format/lib/text-style-face.d.ts +6 -0
  85. package/dist/format/lib/text-style-face.js +2 -1
  86. package/dist/format/lib/theme.d.ts +2 -1
  87. package/dist/format/lib/theme.js +4 -4
  88. package/dist/render/components/BoxTabPaneContext.d.ts +2 -3
  89. package/dist/render/components/BoxTabs.js +1 -1
  90. package/dist/render/components/ButtonBlock.d.ts +2 -0
  91. package/dist/render/components/ButtonBlock.js +1 -1
  92. package/dist/render/components/DealerFinder.d.ts +7 -1
  93. package/dist/render/components/DealerFinder.js +1 -1
  94. package/dist/render/components/Footprint.d.ts +6 -2
  95. package/dist/render/components/Footprint.js +1 -1
  96. package/dist/render/components/Heading.d.ts +1 -1
  97. package/dist/render/components/Heading.js +1 -1
  98. package/dist/render/components/HeroSection.d.ts +4 -1
  99. package/dist/render/components/HeroSection.js +1 -1
  100. package/dist/render/components/HeroSingle.d.ts +4 -1
  101. package/dist/render/components/HeroSingle.js +1 -1
  102. package/dist/render/components/HeroSlide.d.ts +3 -0
  103. package/dist/render/components/HeroSlide.js +1 -1
  104. package/dist/render/components/SideListLayout.d.ts +8 -2
  105. package/dist/render/components/SideListLayout.js +1 -1
  106. package/dist/render/components/SiteGutterFrame.js +1 -1
  107. package/dist/render/components/Text.d.ts +1 -1
  108. package/dist/render/components/Text.js +1 -1
  109. package/dist/render/lib/content/section-padding.d.ts +36 -2
  110. package/dist/render/lib/content/section-padding.js +1 -1
  111. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  112. package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
  113. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  114. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  115. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  116. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  117. package/dist/render/lib/document/blocks/general/LogoBlock/render.js +1 -1
  118. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  119. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  120. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  121. package/dist/render/lib/document/custom-css.d.ts +8 -2
  122. package/dist/render/lib/document/custom-css.js +3 -2
  123. package/dist/render/lib/document/header-clearance.js +1 -1
  124. package/dist/render/lib/document/header-ink.js +1 -1
  125. package/dist/render/lib/document/passes/section-padding.d.ts +4 -0
  126. package/dist/render/lib/document/passes/section-padding.js +1 -1
  127. package/dist/render/lib/document/sanitize.d.ts +4 -1
  128. package/dist/render/lib/document/sanitize.js +1 -1
  129. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  130. package/dist/routine-index.json +1 -0
  131. package/dist/value-index.json +1 -0
  132. package/package.json +29 -7
  133. package/dist/format/lib/document/blocks/general/CustomHTML/fields.d.ts +0 -2
  134. package/dist/format/lib/document/blocks/general/CustomHTML/fields.js +0 -1
  135. package/dist/format/lib/parse-option.d.ts +0 -3
  136. package/dist/format/lib/parse-option.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as Ve}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as $e,useRef as u,useState as y}from"react";import{markOverlayPortal as oe}from"../../format/lib/document/overlay-portal.js";import Be from"./Ticker.js";import{HeroSlideStyleContext as ze}from"./HeroSlide.js";import Xe from"./HeroArrows.js";import Ge from"./Reel.js";import{TICKER_PART_ATTR as Ye}from"./PreviewTickerContext.js";import{useReducedMotion as je}from"./useReducedMotion.js";import{heroHeightBox as qe,heroStoresRatio as Ke}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Fe}from"../lib/document/header-clearance.js";import{nextReel as Je,normaliseHeroReelShape as Qe,reelShown as Ue}from"../../format/lib/reel.js";import{arrowsShown as We,arrowStep as Ze}from"../../format/lib/hero-arrows.js";import{swipeEnabled as et,swipeStep as tt}from"../../format/lib/hero-swipe.js";import{videoControlShown as rt,videoHeld as ot}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ne}from"../../format/lib/editor-words.js";import{markedChildren as se}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as nt,TICKER_MOTION_PART as ce}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as st}from"../../format/lib/content/ink.js";import{HeroPartBox as ct,heroPartScroll as at}from"./HeroPictures.js";import{entranceDrawn as lt}from"../lib/animation/entrance.js";import{readPartMotion as it}from"../lib/animation/part-motion.js";import{scrim as ae}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const ut="Play video",dt="Hold video",mt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",ft=()=>ne("item"),le=new Map;function ht(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener(B,l),()=>d.removeEventListener(B,l)}function pt({slides:m,strip:l,alignment:d,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:ie,phoneSideways:ue,autoplay:z,autoplayInterval:H,showTicker:de,tickerItems:X,heightDesktop:me,heightTablet:fe,heightMobile:he,heightFixed:pe,heightFixedTablet:ve,heightFixedMobile:be,showPicker:xe,pickerShape:we,pickerPlacement:ke,showArrows:ye,arrowsShape:Ee,arrowsPlacement:ge,editing:s,partMotion:G}){const Y=qe({heightDesktop:me,heightTablet:fe,heightMobile:he,heightFixed:pe,heightFixedTablet:ve,heightFixedMobile:be}),{className:_e,style:Re}=Y,N=Ke(Y),j=(l?.blockCount??0)>0,Te=!j&&nt({showTicker:de,tickerItems:X}),q=(X??[]).map(e=>e?.text?.trim()?e.text:s?ft():"").filter(Boolean),Se=lt(it({_partMotion:G},ce)),Oe=at(G,ce),f=u(null),K=u(null),F=u(null),A=u(null),J=$e(),L=u(J),[E,He]=y([]),[Ne,Q]=y(0),x=u(0),[U,W]=y(!1),[Ae,Z]=y(null),[g,Le]=y(!1),M=je(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{Q(e),Z(o=>o===e?o:null),x.current=e,le.set(L.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||J;L.current=t;const r=le.get(t);typeof r=="number"&&(Q(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{He(o=>Je(o,se(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[_]),k(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||L.current;r.id&&r.id!==p||i(r.index,!0)};return ht(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Ne,0),Math.max(0,c-1)),P=Ae===a,C=Ue({shown:xe,count:c}),ee=We({shown:ye,count:c}),te=rt({editing:s,shown:a,slides:E}),Me=ot({editing:s,playing:g,controlShown:te}),R=et({count:c,editing:s}),h=u(null),w=u(null),Pe=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ce=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),De=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=tt(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||U||P||M||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,U,P,M,c,a,i]),k(()=>{const e=[K.current,F.current,A.current].filter(Boolean),t=e.map(o=>oe(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,re=I??p.closest("[data-idx]");if(!re)return;o.stopPropagation(),o.preventDefault();const V=I?Ze(I.dataset.heroNav,x.current,c):Number(re.dataset.idx);Number.isNaN(V)||(i(V,s),se(_(),"data-slide-name")[V]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,_,s]);const Ie=v(e=>{if(!e)return;const t=oe(e),r=o=>{o.stopPropagation(),o.preventDefault(),Le(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(ze.Provider,{value:{alignment:d,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:Me,phoneUpDown:ie,phoneSideways:ue,holdReel:()=>Z(a),reelHeld:P,shownSlide:a,ratioMin:N},children:$(Ve,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${_e} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Re,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onTouchStart:Pe,onTouchMove:Ce,onTouchEnd:De,...b("hero"),children:[n(m,{className:N?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),te&&n("div",{ref:Ie,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Fe} + 16px)`},children:$("button",{type:"button",className:mt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ne(g?dt:ut)]})}),(C||ee)&&$("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(Ge,{ref:K,slides:E,active:a,shape:Qe(we),placement:ke}),ee&&n(Xe,{ref:A,shape:Ee,placement:ge,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:F,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...b("dot")},t))}),j&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ae(.55),...st},...b("strip"),children:n(l,{})}),Te&&q.length>0&&n(vt,{editing:!!s,entrance:Se,scroll:Oe,children:n(Be,{items:q,backdrop:"dark-media"})})]})})}function vt({editing:m,entrance:l,scroll:d,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=m?{[Ye]:""}:void 0;return n(ct,{entrance:l,scroll:d,editing:m,className:S,attrs:O,style:{background:ae(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,dt as HERO_VIDEO_HOLD_LABEL,ut as HERO_VIDEO_PLAY_LABEL,pt as default,ht as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as ze}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as Xe,useRef as u,useState as y}from"react";import{markOverlayPortal as oe}from"../../format/lib/document/overlay-portal.js";import Ge from"./Ticker.js";import{HeroSlideStyleContext as Ye}from"./HeroSlide.js";import je from"./HeroArrows.js";import qe from"./Reel.js";import{TICKER_PART_ATTR as Ke}from"./PreviewTickerContext.js";import{useReducedMotion as Fe}from"./useReducedMotion.js";import{heroHeightBox as Je,heroStoresRatio as Qe}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ue}from"../lib/document/header-clearance.js";import{nextReel as We,normaliseHeroReelShape as Ze,reelShown as et}from"../../format/lib/reel.js";import{arrowsShown as tt,arrowStep as rt}from"../../format/lib/hero-arrows.js";import{swipeEnabled as ot,swipeStep as nt}from"../../format/lib/hero-swipe.js";import{videoControlShown as st,videoHeld as ct}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ne}from"../../format/lib/editor-words.js";import{markedChildren as se}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as at,TICKER_MOTION_PART as ce}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as lt}from"../../format/lib/content/ink.js";import{HeroPartBox as it,heroPartScroll as ut}from"./HeroPictures.js";import{entranceDrawn as dt}from"../lib/animation/entrance.js";import{readPartMotion as mt}from"../lib/animation/part-motion.js";import{scrim as ae}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const ft="Play video",ht="Hold video",pt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",vt=()=>ne("item"),le=new Map;function bt(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener(B,l),()=>d.removeEventListener(B,l)}function xt({slides:m,strip:l,alignment:d,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,autoplay:z,autoplayInterval:H,showTicker:he,tickerItems:X,heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke,showPicker:ye,pickerShape:Ee,pickerPlacement:ge,showArrows:_e,arrowsShape:Re,arrowsPlacement:Te,editing:s,partMotion:G}){const Y=Je({heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke}),{className:Se,style:Oe}=Y,N=Qe(Y),j=(l?.blockCount??0)>0,He=!j&&at({showTicker:he,tickerItems:X}),q=(X??[]).map(e=>e?.text?.trim()?e.text:s?vt():"").filter(Boolean),Ne=dt(mt({_partMotion:G},ce)),Ae=ut(G,ce),f=u(null),K=u(null),F=u(null),A=u(null),J=Xe(),L=u(J),[E,Le]=y([]),[Me,Q]=y(0),x=u(0),[U,W]=y(!1),[Pe,Z]=y(null),[g,Ce]=y(!1),M=Fe(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{Q(e),Z(o=>o===e?o:null),x.current=e,le.set(L.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||J;L.current=t;const r=le.get(t);typeof r=="number"&&(Q(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{Le(o=>We(o,se(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[_]),k(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||L.current;r.id&&r.id!==p||i(r.index,!0)};return bt(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Me,0),Math.max(0,c-1)),P=Pe===a,C=et({shown:ye,count:c}),ee=tt({shown:_e,count:c}),te=st({editing:s,shown:a,slides:E}),De=ct({editing:s,playing:g,controlShown:te}),R=ot({count:c,editing:s}),h=u(null),w=u(null),Ie=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ve=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),$e=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=nt(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||U||P||M||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,U,P,M,c,a,i]),k(()=>{const e=[K.current,F.current,A.current].filter(Boolean),t=e.map(o=>oe(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,re=I??p.closest("[data-idx]");if(!re)return;o.stopPropagation(),o.preventDefault();const V=I?rt(I.dataset.heroNav,x.current,c):Number(re.dataset.idx);Number.isNaN(V)||(i(V,s),se(_(),"data-slide-name")[V]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,_,s]);const Be=v(e=>{if(!e)return;const t=oe(e),r=o=>{o.stopPropagation(),o.preventDefault(),Ce(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Ye.Provider,{value:{alignment:d,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:De,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,holdReel:()=>Z(a),reelHeld:P,shownSlide:a,ratioMin:N},children:$(ze,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Se} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Oe,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onTouchStart:Ie,onTouchMove:Ve,onTouchEnd:$e,...b("hero"),children:[n(m,{className:N?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),te&&n("div",{ref:Be,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ue} + 16px)`},children:$("button",{type:"button",className:pt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ne(g?ht:ft)]})}),(C||ee)&&$("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(qe,{ref:K,slides:E,active:a,shape:Ze(Ee),placement:ge}),ee&&n(je,{ref:A,shape:Re,placement:Te,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:F,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...b("dot")},t))}),j&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ae(.55),...lt},...b("strip"),children:n(l,{})}),He&&q.length>0&&n(wt,{editing:!!s,entrance:Ne,scroll:Ae,children:n(Ge,{items:q,backdrop:"dark-media"})})]})})}function wt({editing:m,entrance:l,scroll:d,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=m?{[Ke]:""}:void 0;return n(it,{entrance:l,scroll:d,editing:m,className:S,attrs:O,style:{background:ae(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,ht as HERO_VIDEO_HOLD_LABEL,ft as HERO_VIDEO_PLAY_LABEL,xt as default,bt as subscribeSliderGoto};
@@ -1,6 +1,9 @@
1
1
  import { type SlotComponent } from "efficient-easel/blocks";
2
2
  import { type HeroMediaType } from "../../format/lib/hero-media-layout.js";
3
3
  export interface HeroSingleProps {
4
+ phoneWordsTop?: number;
5
+ phoneWordsBottom?: number;
6
+ phoneBoxGap?: number;
4
7
  overlay?: number;
5
8
  overlayColor?: string;
6
9
  overlayPosition?: string;
@@ -32,4 +35,4 @@ export interface HeroSingleProps {
32
35
  editing?: boolean;
33
36
  partMotion?: Record<string, unknown>;
34
37
  }
35
- export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
38
+ export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, phoneWordsTop, phoneWordsBottom, phoneBoxGap, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as k}from"react/jsx-runtime";import{HideTaker as oe}from"./ViewHideRoot.js";import{useRef as re,useState as te}from"react";import ie from"./HeroPoster.js";import{HeroMediaLayer as se,heroMediaReading as ae,HeroPickArea as ne,heroPartEntrance as le,heroPartHover as ce,heroPartScroll as me,heroPictureOrigins as ue,HeroPictureHover as he,heroPicturesHover as de,HeroTint as fe,HeroTwoPictures as pe}from"./HeroPictures.js";import{HeroVideoBackdrop as ge,HeroVideoPlayer as ve}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as ye,heroStoresRatio as He}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as xe,overlayGradient as Pe}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as be}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as u}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as we}from"../../format/lib/hero-media-layout.js";import Te from"./PhotoHoverSheet.js";import{partAttr as h}from"../../format/lib/content/part-names.js";function _e({overlay:A=100,overlayColor:I=u,overlayPosition:L=xe,mediaType:d=we.HeroSingle,mediaSrc:s,poster:f,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p=u,tintOpacity:g=0,heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,boxes:v,videoSource:M,youtubeUrl:B,videoPlayback:D,mediaLayout:Y,mediaLayoutPhone:F,mediaImage2:C,objectPosition2:U,objectPosition2Phone:$,objectPosition2Tablet:G,tintColor2:K=u,tintOpacity2:q=0,editing:o=!1,partMotion:r}){const y=ye({heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:J,style:Q}=y,H=He(y),c=d==="video",x=c?i(s):void 0,P=c?i(f):i(s)??i(f),{fromYouTube:b,onClick:w,youTubeId:T,backgroundFile:_,desktopLayout:W,phoneLayout:X,twoPictures:S}=ae({isVideo:c,videoSource:M,videoPlayback:D,youtubeUrl:B,mediaLayout:Y,mediaLayoutPhone:F}),[E,Z]=te(!1),m=!E,ee=re(null),t=d==="video"?"media":"image",N=de(r);return k(oe,{as:"section",ref:ee,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${J} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:Q,...N.hostAttrs,...h("hero"),children:[e(Te,{sheet:N.sheet}),e(se,{partMotion:r,editing:o,children:S?e(pe,{desktopLayout:W,phoneLayout:X,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p,tintOpacity:g},second:{src:C,objectPosition:U,objectPositionPhone:$,objectPositionTablet:G,tintColor:K,tintOpacity:q}}):e(ne,{part:t,editing:o,entrance:t==="image"?le(r,"image"):null,scroll:t==="image"?me(r,"image"):null,origins:ue({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(he,{treatment:t==="image"?ce(r,"image"):{},children:[e(ie,{videoSrc:_?x:void 0,posterSrc:P,showVideo:_,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),b&&e(ge,{youTubeId:T,ownPoster:!!P,background:!w,editing:o})]})})}),w&&e(ve,{youTubeId:T,fileSrc:b?void 0:x,playing:E,onPlay:()=>Z(!0),editing:o}),m&&!S&&e(fe,{color:p,opacity:g}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:Pe(I,L),opacity:Math.min(Math.max(A,0),100)/100},...h("overlay")}),m&&v&&e("div",{className:[H?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:be,...h("hero-content"),children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{_e as default};
1
+ "use client";import{jsx as e,jsxs as k}from"react/jsx-runtime";import{heroPhoneWordsStyle as ie}from"../../format/lib/hero-phone-stack.js";import{HideTaker as se}from"./ViewHideRoot.js";import{useRef as ae,useState as ne}from"react";import le from"./HeroPoster.js";import{HeroMediaLayer as ce,heroMediaReading as me,HeroPickArea as he,heroPartEntrance as ue,heroPartHover as de,heroPartScroll as fe,heroPictureOrigins as pe,HeroPictureHover as ge,heroPicturesHover as ve,HeroTint as ye,HeroTwoPictures as He}from"./HeroPictures.js";import{HeroVideoBackdrop as Pe,HeroVideoPlayer as xe}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as be,heroStoresRatio as we}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as Te,overlayGradient as Se}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as _e}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as h}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as Ee}from"../../format/lib/hero-media-layout.js";import Ne from"./PhotoHoverSheet.js";import{partAttr as u}from"../../format/lib/content/part-names.js";function ke({overlay:A=100,overlayColor:I=h,overlayPosition:L=Te,mediaType:d=Ee.HeroSingle,mediaSrc:s,poster:f,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p=h,tintOpacity:g=0,heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,phoneWordsTop:M,phoneWordsBottom:B,phoneBoxGap:D,boxes:v,videoSource:Y,youtubeUrl:F,videoPlayback:C,mediaLayout:U,mediaLayoutPhone:$,mediaImage2:G,objectPosition2:K,objectPosition2Phone:W,objectPosition2Tablet:q,tintColor2:J=h,tintOpacity2:Q=0,editing:o=!1,partMotion:r}){const y=be({heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:X,style:Z}=y,H=we(y),c=d==="video",P=c?i(s):void 0,x=c?i(f):i(s)??i(f),{fromYouTube:b,onClick:w,youTubeId:T,backgroundFile:S,desktopLayout:ee,phoneLayout:oe,twoPictures:_}=me({isVideo:c,videoSource:Y,videoPlayback:C,youtubeUrl:F,mediaLayout:U,mediaLayoutPhone:$}),[E,re]=ne(!1),m=!E,te=ae(null),t=d==="video"?"media":"image",N=ve(r);return k(se,{as:"section",ref:te,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${X} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:Z,...N.hostAttrs,...u("hero"),children:[e(Ne,{sheet:N.sheet}),e(ce,{partMotion:r,editing:o,children:_?e(He,{desktopLayout:ee,phoneLayout:oe,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p,tintOpacity:g},second:{src:G,objectPosition:K,objectPositionPhone:W,objectPositionTablet:q,tintColor:J,tintOpacity:Q}}):e(he,{part:t,editing:o,entrance:t==="image"?ue(r,"image"):null,scroll:t==="image"?fe(r,"image"):null,origins:pe({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(ge,{treatment:t==="image"?de(r,"image"):{},children:[e(le,{videoSrc:S?P:void 0,posterSrc:x,showVideo:S,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),b&&e(Pe,{youTubeId:T,ownPoster:!!x,background:!w,editing:o})]})})}),w&&e(xe,{youTubeId:T,fileSrc:b?void 0:P,playing:E,onPlay:()=>re(!0),editing:o}),m&&!_&&e(ye,{color:p,opacity:g}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:Se(I,L),opacity:Math.min(Math.max(A,0),100)/100},...u("overlay")}),m&&v&&e("div",{className:[H?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{..._e,...ie(M,B,D)},...u("hero-content"),children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{ke as default};
@@ -9,6 +9,9 @@ export interface HeroSlideStyle {
9
9
  textureColor?: string;
10
10
  phoneUpDown?: string;
11
11
  phoneSideways?: string;
12
+ phoneWordsTop?: number;
13
+ phoneWordsBottom?: number;
14
+ phoneBoxGap?: number;
12
15
  quietVideo?: boolean;
13
16
  holdReel?: () => void;
14
17
  reelHeld?: boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{useTakeViewHide as Te,withViewHide as be}from"./ViewHideRoot.js";import{createContext as ke,useContext as Ee,useEffect as Ae,useRef as _e,useState as Y}from"react";import Le from"./HeroPoster.js";import{HeroMediaLayer as Oe,heroMediaReading as Ne,HeroPickArea as Ie,heroPartEntrance as Re,heroPartHover as Ve,heroPartScroll as Ce,heroPictureOrigins as De,HeroPictureHover as je,heroPicturesHover as ze,HeroTint as Fe,HeroTwoPictures as Be}from"./HeroPictures.js";import{HeroVideoBackdrop as $e,HeroVideoPlayer as Me}from"./HeroVideoPlay.js";import{BelowFirstScreen as Ye,useFirstScreenPlace as qe}from"../lib/first-screen.js";import{markedChildren as Ue}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Ge}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Ke,heroTextureShown as Je}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Qe}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as q}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as We}from"../../format/lib/hero-media-layout.js";import{overlayGradient as Xe,slideOverlayState as Ze}from"../../format/lib/sections/hero-overlay.js";import eo from"./PhotoHoverSheet.js";import{partAttr as g}from"../../format/lib/content/part-names.js";const oo=ke({});function ro({name:w,process:d,mediaType:U=We.HeroSlide,mediaSrc:c,videoSpeed:H,poster:T,mediaAv1:G,mediaSrcPhone:K,mediaAv1Phone:J,posterPhone:Q,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:b=q,tintOpacity:k=0,groups:E,editing:i=!1,themeClassName:A,themeStyle:W,overlayColor:X,overlayPosition:Z,mediaLayout:ee,mediaLayoutPhone:oe,mediaImage2:re,objectPosition2:te,objectPosition2Phone:ie,objectPosition2Tablet:ne,tintColor2:se=q,tintOpacity2:ae=0,videoSource:le,youtubeUrl:de,videoPlayback:ce,partMotion:n,laterSlide:m=!1}){const h=Te(),{alignment:to="left",textureOpacity:_,textureOn:ue,textureColor:fe,quietVideo:pe,phoneUpDown:me,phoneSideways:he,holdReel:ve,reelHeld:ye,shownSlide:v,ratioMin:L}=Ee(oo),Se=qe(),O=m&&Se==="first",N=_e(null),[xe,Pe]=Y(v===void 0?void 0:!1);Ae(()=>{const P=N.current;Pe(v===void 0||!P?void 0:Ue(P.closest(".hero-track"),"data-slide-name")[v]===P)});const o=U==="video",y=o?r(c):void 0,I=o?r(T):r(c)??r(T),t=o?{av1:r(G),phone:r(K),av1Phone:r(J),poster:r(Q)}:{},ge=typeof H=="number"?H/100:1,{fromYouTube:s,onClick:R,youTubeId:V,backgroundFile:a,desktopLayout:we,phoneLayout:He,twoPictures:C}=Ne({isVideo:o,videoSource:le,videoPlayback:ce,youtubeUrl:de,mediaLayout:ee,mediaLayoutPhone:oe}),[S,D]=Y(!1);S&&ye===!1&&D(!1);const x=!S,l=Ze({overlayColor:X,overlayPosition:Z},fe),j=o?null:Re(n,"image"),z=o?null:Ce(n,"image"),F=ze(n),B=e(je,{treatment:o?{}:Ve(n,"image"),children:e(Le,{videoSrc:a?y:void 0,videoAv1Src:a?t.av1:void 0,videoSrcPhone:a?t.phone:void 0,videoAv1SrcPhone:a?t.av1Phone:void 0,posterSrc:I,posterSrcPhone:t.poster,showVideo:a,playbackRate:ge,objectPosition:u,objectPositionPhone:o?void 0:f,objectPositionTablet:o?void 0:p,quiet:pe,slideShown:xe,laterSlide:m,laterOfLead:O})}),$=M("section",{ref:N,className:be(`${L?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${A?` ${A}`:""}`,h.className),...h.attrs,style:W,"data-slide-name":w??"","data-slide-process":d??"","data-slide-media":a&&y?"video":"still",...F.hostAttrs,...g("slide"),children:[e(eo,{sheet:F.sheet}),e(Oe,{partMotion:n,editing:i,children:C?e(Be,{laterSlide:m,desktopLayout:we,phoneLayout:He,editing:i,partMotion:n,first:{src:c,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:b,tintOpacity:k},second:{src:re,objectPosition:te,objectPositionPhone:ie,objectPositionTablet:ne,tintColor:se,tintOpacity:ae}}):s||j||z?M(Ie,{part:o?"media":"image",editing:i,entrance:j,scroll:z,origins:De({objectPosition:u,objectPositionTablet:p,objectPositionPhone:f}),className:"absolute inset-0 z-[1]",children:[B,s&&e($e,{youTubeId:V,ownPoster:!!I,background:!R,editing:i})]}):B}),R&&e(Me,{youTubeId:V,fileSrc:s?void 0:y,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:S,onPlay:()=>{D(!0),ve?.()},editing:i}),x&&!C&&e(Fe,{color:b,opacity:k,passClicks:!1}),x&&Je(ue)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:l.own?Xe(l.color,l.position??void 0):Ke(l.color),..._!==void 0?{opacity:_/100}:null},...g("overlay")}),x&&e("div",{className:[L?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Qe,...Ge(me,he)},...g("hero-content"),children:E&&e(E,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return h.scope(O?e(Ye,{children:$}):$)}const wo=Array.from({length:3},(w,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{wo as HERO_SLIDE_SEEDS,oo as HeroSlideStyleContext,ro as default};
1
+ "use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{useTakeViewHide as Ee,withViewHide as Ae}from"./ViewHideRoot.js";import{createContext as _e,useContext as Le,useEffect as Oe,useRef as Ne,useState as W}from"react";import Ie from"./HeroPoster.js";import{HeroMediaLayer as Re,heroMediaReading as Ve,HeroPickArea as Ce,heroPartEntrance as Be,heroPartHover as De,heroPartScroll as je,heroPictureOrigins as ze,HeroPictureHover as Fe,heroPicturesHover as $e,HeroTint as Me,HeroTwoPictures as We}from"./HeroPictures.js";import{HeroVideoBackdrop as Ye,HeroVideoPlayer as qe}from"./HeroVideoPlay.js";import{BelowFirstScreen as Ge,useFirstScreenPlace as Ue}from"../lib/first-screen.js";import{markedChildren as Ke}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Je,heroPhoneWordsStyle as Qe}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Xe,heroTextureShown as Ze}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as eo}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as Y}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as oo}from"../../format/lib/hero-media-layout.js";import{overlayGradient as ro,slideOverlayState as to}from"../../format/lib/sections/hero-overlay.js";import io from"./PhotoHoverSheet.js";import{partAttr as w}from"../../format/lib/content/part-names.js";const no=_e({});function so({name:g,process:d,mediaType:q=oo.HeroSlide,mediaSrc:c,videoSpeed:H,poster:T,mediaAv1:G,mediaSrcPhone:U,mediaAv1Phone:K,posterPhone:J,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:b=Y,tintOpacity:k=0,groups:E,editing:i=!1,themeClassName:A,themeStyle:Q,overlayColor:X,overlayPosition:Z,mediaLayout:ee,mediaLayoutPhone:oe,mediaImage2:re,objectPosition2:te,objectPosition2Phone:ie,objectPosition2Tablet:ne,tintColor2:se=Y,tintOpacity2:le=0,videoSource:ae,youtubeUrl:de,videoPlayback:ce,partMotion:n,laterSlide:h=!1}){const m=Ee(),{alignment:lo="left",textureOpacity:_,textureOn:fe,textureColor:ue,quietVideo:pe,phoneUpDown:he,phoneSideways:me,phoneWordsTop:ve,phoneWordsBottom:ye,phoneBoxGap:Se,holdReel:xe,reelHeld:Pe,shownSlide:v,ratioMin:L}=Le(no),we=Ue(),O=h&&we==="first",N=Ne(null),[ge,He]=W(v===void 0?void 0:!1);Oe(()=>{const P=N.current;He(v===void 0||!P?void 0:Ke(P.closest(".hero-track"),"data-slide-name")[v]===P)});const o=q==="video",y=o?r(c):void 0,I=o?r(T):r(c)??r(T),t=o?{av1:r(G),phone:r(U),av1Phone:r(K),poster:r(J)}:{},Te=typeof H=="number"?H/100:1,{fromYouTube:s,onClick:R,youTubeId:V,backgroundFile:l,desktopLayout:be,phoneLayout:ke,twoPictures:C}=Ve({isVideo:o,videoSource:ae,videoPlayback:ce,youtubeUrl:de,mediaLayout:ee,mediaLayoutPhone:oe}),[S,B]=W(!1);S&&Pe===!1&&B(!1);const x=!S,a=to({overlayColor:X,overlayPosition:Z},ue),D=o?null:Be(n,"image"),j=o?null:je(n,"image"),z=$e(n),F=e(Fe,{treatment:o?{}:De(n,"image"),children:e(Ie,{videoSrc:l?y:void 0,videoAv1Src:l?t.av1:void 0,videoSrcPhone:l?t.phone:void 0,videoAv1SrcPhone:l?t.av1Phone:void 0,posterSrc:I,posterSrcPhone:t.poster,showVideo:l,playbackRate:Te,objectPosition:f,objectPositionPhone:o?void 0:u,objectPositionTablet:o?void 0:p,quiet:pe,slideShown:ge,laterSlide:h,laterOfLead:O})}),$=M("section",{ref:N,className:Ae(`${L?"relative flex min-h-full w-full flex-col overflow-clip":"relative h-full w-full overflow-hidden"}${A?` ${A}`:""}`,m.className),...m.attrs,style:Q,"data-slide-name":g??"","data-slide-process":d??"","data-slide-media":l&&y?"video":"still",...z.hostAttrs,...w("slide"),children:[e(io,{sheet:z.sheet}),e(Re,{partMotion:n,editing:i,children:C?e(We,{laterSlide:h,desktopLayout:be,phoneLayout:ke,editing:i,partMotion:n,first:{src:c,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:b,tintOpacity:k},second:{src:re,objectPosition:te,objectPositionPhone:ie,objectPositionTablet:ne,tintColor:se,tintOpacity:le}}):s||D||j?M(Ce,{part:o?"media":"image",editing:i,entrance:D,scroll:j,origins:ze({objectPosition:f,objectPositionTablet:p,objectPositionPhone:u}),className:"absolute inset-0 z-[1]",children:[F,s&&e(Ye,{youTubeId:V,ownPoster:!!I,background:!R,editing:i})]}):F}),R&&e(qe,{youTubeId:V,fileSrc:s?void 0:y,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:S,onPlay:()=>{B(!0),xe?.()},editing:i}),x&&!C&&e(Me,{color:b,opacity:k,passClicks:!1}),x&&Ze(fe)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:a.own?ro(a.color,a.position??void 0):Xe(a.color),..._!==void 0?{opacity:_/100}:null},...w("overlay")}),x&&e("div",{className:[L?"sf-hero-group-layer relative z-[3] mx-auto w-full flex-1 max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...eo,...Je(he,me),...Qe(ve,ye,Se)},...w("hero-content"),children:E&&e(E,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return m.scope(O?e(Ge,{children:$}):$)}const ko=Array.from({length:3},(g,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{ko as HERO_SLIDE_SEEDS,no as HeroSlideStyleContext,so as default};
@@ -1,11 +1,16 @@
1
1
  import type { ReactNode, Ref } from "react";
2
2
  import type { ListPosition } from "../../format/lib/content/list-position.js";
3
- export declare function sideListGridClass(position: Exclude<ListPosition, "below">): string;
3
+ export declare function sideListGridClass(position: Exclude<ListPosition, "below">, fullHeight?: boolean): string;
4
+ export declare const SIDE_LIST_CAP_CLASS = "max-h-[480px]";
4
5
  export declare const SIDE_LIST_SCROLL_CLASS = "max-h-[480px] overflow-y-auto overscroll-contain max-view-wide:max-h-none";
5
6
  export declare const SIDE_LIST_REACH_CLASS = "-mx-3 px-3";
6
7
  export declare const SIDE_ROW_REACH_CLASS = "-mx-3";
8
+ export declare const SIDE_MAP_FIXED_HEIGHT_CLASS = "h-[480px]";
9
+ export declare const SIDE_MAP_STACKED_HEIGHT_CLASS = "max-view-wide:h-[320px]";
7
10
  export declare const SIDE_MAP_CLASS = "h-[480px] max-view-wide:h-[320px]";
8
- export default function SideListLayout({ position, attrs, head, list, listRef, listAttrs, map, rowsReachOut, }: {
11
+ export declare const SIDE_MAP_FULL_CLASS = "h-full";
12
+ export declare function sideMapClass(fullHeight: boolean): string;
13
+ export default function SideListLayout({ position, attrs, head, list, listRef, listAttrs, map, rowsReachOut, fullHeight, }: {
9
14
  position: Exclude<ListPosition, "below">;
10
15
  attrs: Readonly<Record<string, string>>;
11
16
  head?: ReactNode;
@@ -14,4 +19,5 @@ export default function SideListLayout({ position, attrs, head, list, listRef, l
14
19
  listAttrs?: Readonly<Record<string, string>>;
15
20
  map: ReactNode;
16
21
  rowsReachOut?: boolean;
22
+ fullHeight?: boolean;
17
23
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as i}from"react/jsx-runtime";const c={left:"grid-cols-[minmax(260px,360px)_1fr]",right:"grid-cols-[1fr_minmax(260px,360px)]"};function l(e){return["grid items-start gap-6 max-view-wide:grid-cols-1",c[e]].join(" ")}const s="max-h-[480px] overflow-y-auto overscroll-contain max-view-wide:max-h-none",S="-mx-3 px-3",w="-mx-3",L="h-[480px] max-view-wide:h-[320px]";function _({position:e,attrs:o,head:x,list:a,listRef:t,listAttrs:d,map:n,rowsReachOut:m=!1}){return i("div",{...o,className:l(e),children:[i("div",{className:["min-w-0",e==="right"?"order-2":"","max-view-wide:order-2"].join(" "),children:[x,r("div",{ref:t,...d,className:m?`${s} ${S}`:s,children:a})]}),r("div",{className:["min-w-0",e==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:n})]})}export{S as SIDE_LIST_REACH_CLASS,s as SIDE_LIST_SCROLL_CLASS,L as SIDE_MAP_CLASS,w as SIDE_ROW_REACH_CLASS,_ as default,l as sideListGridClass};
1
+ import{jsx as r,jsxs as o}from"react/jsx-runtime";const l={left:"grid-cols-[minmax(260px,360px)_1fr]",right:"grid-cols-[1fr_minmax(260px,360px)]"};function m(e,i=!1){return[`grid ${i?"items-stretch":"items-start"} gap-6 max-view-wide:grid-cols-1`,l[e]].join(" ")}const L="max-h-[480px]",p=`${L} overflow-y-auto overscroll-contain max-view-wide:max-h-none`,A="-mx-3 px-3",h="-mx-3",C="h-[480px]",I="max-view-wide:h-[320px]",a=`${C} ${I}`,v="h-full",w="absolute inset-0";function D(e){return e?v:a}function E({position:e,attrs:i,head:n,list:d,listRef:x,listAttrs:S,map:t,rowsReachOut:c=!1,fullHeight:s=!1}){const _=[s?"":p,c?A:""].filter(Boolean).join(" ");return o("div",{...i,className:m(e,s),children:[o("div",{className:["min-w-0",e==="right"?"order-2":"","max-view-wide:order-2"].join(" "),children:[n,r("div",{ref:x,...S,className:_||void 0,children:d})]}),s?o("div",{className:["relative min-w-0",e==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:[r("div",{"data-side-map-floor":"","aria-hidden":"true",className:a}),r("div",{className:w,children:t})]}):r("div",{className:["min-w-0",e==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:t})]})}export{L as SIDE_LIST_CAP_CLASS,A as SIDE_LIST_REACH_CLASS,p as SIDE_LIST_SCROLL_CLASS,a as SIDE_MAP_CLASS,C as SIDE_MAP_FIXED_HEIGHT_CLASS,v as SIDE_MAP_FULL_CLASS,I as SIDE_MAP_STACKED_HEIGHT_CLASS,h as SIDE_ROW_REACH_CLASS,E as default,m as sideListGridClass,D as sideMapClass};
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as G}from"react/jsx-runtime";import{useTakeViewHide as Q,withViewHide as H}from"./ViewHideRoot.js";import{createContext as c,useContext as o}from"react";import{rootPadAttrs as Y,wrapperPadAttrs as Z}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as b,SECTION_BORDER_SELF_CLASS as ee}from"../../format/lib/content/borders.js";import{BOX_HOLDS_NO_GUTTER_CLASS as te}from"../../format/lib/content/page-width.js";import{drawsSiteGutter as ne}from"../../format/lib/content/site-gutter.js";import{groundBeyond as oe}from"../lib/content/section-edge.js";const f=c(!1);function ve(){return o(f)}function Se({children:e}){return t(f.Provider,{value:!0,children:e})}const _=c(!1);function xe({children:e}){return t(_.Provider,{value:!0,children:e})}const k=c(null);function Ce({ground:e,children:n}){return t(k.Provider,{value:e,children:n})}const O=c(!1);function re(){return o(O)}function Ne({atTop:e,nested:n}){return t(G,{children:re()?n:e})}const m=c(void 0);function ge({children:e}){return t(m.Provider,{value:null,children:e})}function se(){return o(m)===void 0&&!o(O)&&!o(f)}function Be({own:e,followed:n}){return t(G,{children:se()?e():n()})}const V=c(null);function Pe({value:e,children:n}){return t(V.Provider,{value:e,children:n})}function Ge({draw:e}){return t(G,{children:e(o(V))})}function _e(){return o(m)??null}function ie({contained:e,framedClass:n,fillClass:W,columnClass:R,style:A,tabLabel:U,pad:i,border:a,outerAttrs:E,box:h=!1,edge:X=!1,outerStyle:p,outerClass:w,bleed:v=!1,siteSide:q=!1,part:y,children:I}){const z=o(f),S=o(_),l=ne(e,z),s=l&&!S,u=Q(),L=!!(a&&s),d=L?w:H(w??"",u.className)||void 0,x=L||!u.className?E:{...E,...u.attrs},C=i&&!s?Y(i.values,i.frame):null,N=a&&!s?a:null,g=h&&!v?te:null,B=[s?n:W,s?g:null,C?.className,N?ee:null].filter(Boolean).join(" "),$=le(v&&s,C||N?{...A,...C?.style,...N}:A),J=o(m),K=o(k),M=h&&X&&J===void 0?{gutter:l,...i?{pad:i.values}:{},beyond:l&&S?oe(K):"0px",...q&&l?{site:!0}:{}}:null,T=h?t(O.Provider,{value:!0,children:t(m.Provider,{value:M,children:I})}):I,P=l?t(f.Provider,{value:!0,children:T}):T,r=i&&s?Z(i.values):null,j=x&&Object.keys(x).length>0?x:null,F=t("div",{...r?null:j,className:!r&&d?B?`${B} ${d}`:d:B,style:r||!p?$:{...$,...p},"data-tab-label":U,...r?null:y,children:S?t(_.Provider,{value:!1,children:l&&!v?t("div",{className:g?`${R} ${g}`:R,children:P}):P}):P}),D=r?t("div",{...j,className:d?`${r.className} ${d}`:r.className,style:p?{...r.style,...p}:r.style,...y,children:F}):F;return u.scope(a&&s?t("div",{className:H(b,u.className),style:{display:"contents",...a},...u.attrs,children:D}):D)}function le(e,n){return e?{...n,paddingLeft:0,paddingRight:0}:n}export{Ce as GroundStopsAt,Se as InsideSiteColumn,Ne as NestedBoxChoice,ge as NotASectionEdge,Ge as SectionGroupChoice,Pe as SectionGroupWidthsProvider,Be as SectionRootChoice,xe as SplitBandAndColumn,ie as default,re as useInsideBox,ve as useInsideSiteGutter,_e as useSectionEdge,se as useSectionRoot};
1
+ "use client";import{jsx as t,Fragment as P}from"react/jsx-runtime";import{useTakeViewHide as Y,withViewHide as k}from"./ViewHideRoot.js";import{createContext as u,useContext as o}from"react";import{framePadAttrs as Z}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as b,SECTION_BORDER_SELF_CLASS as ee}from"../../format/lib/content/borders.js";import{BOX_HOLDS_NO_GUTTER_CLASS as te}from"../../format/lib/content/page-width.js";import{drawsSiteGutter as ne}from"../../format/lib/content/site-gutter.js";import{groundBeyond as oe}from"../lib/content/section-edge.js";const a=u(!1);function ve(){return o(a)}function Se({children:e}){return t(a.Provider,{value:!0,children:e})}const _=u(!1);function xe({children:e}){return t(_.Provider,{value:!0,children:e})}const V=u(null);function Ce({ground:e,children:n}){return t(V.Provider,{value:e,children:n})}const O=u(!1);function re(){return o(O)}function Ne({atTop:e,nested:n}){return t(P,{children:re()?n:e})}const f=u(void 0);function ge({children:e}){return t(f.Provider,{value:null,children:e})}function ie(){return o(f)===void 0&&!o(O)&&!o(a)}function Be({own:e,followed:n}){return t(P,{children:ie()?e():n()})}const W=u(null);function Ge({value:e,children:n}){return t(W.Provider,{value:e,children:n})}function Pe({draw:e}){return t(P,{children:e(o(W))})}function _e(){return o(f)??null}function se({contained:e,framedClass:n,fillClass:U,columnClass:R,style:A,tabLabel:X,pad:m,border:c,outerAttrs:E,box:h=!1,edge:q=!1,outerStyle:p,outerClass:w,bleed:v=!1,siteSide:z=!1,part:y,children:I}){const J=o(a),S=o(_),s=ne(e,J),i=s&&!S,l=Y(),L=!!(c&&i),d=L?w:k(w??"",l.className)||void 0,x=L||!l.className?E:{...E,...l.attrs},$=m?Z(m,i):null,C=$?.root??null,N=c&&!i?c:null,g=h&&!v?te:null,B=[i?n:U,i?g:null,C?.className,N?ee:null].filter(Boolean).join(" "),T=le(v&&i,C||N?{...A,...C?.style,...N}:A),K=o(f),M=o(V),Q=h&&q&&K===void 0?{gutter:s,...m?{pad:m.values}:{},beyond:s&&S?oe(M):"0px",...z&&s?{site:!0}:{}}:null,j=h?t(O.Provider,{value:!0,children:t(f.Provider,{value:Q,children:I})}):I,G=s?t(a.Provider,{value:!0,children:j}):j,r=$?.outer??null,F=x&&Object.keys(x).length>0?x:null,D=t("div",{...r?null:F,className:!r&&d?B?`${B} ${d}`:d:B,style:r||!p?T:{...T,...p},"data-tab-label":X,...r?null:y,children:S?t(_.Provider,{value:!1,children:s&&!v?t("div",{className:g?`${R} ${g}`:R,children:G}):G}):G}),H=r?t("div",{...F,className:d?`${r.className} ${d}`:r.className,style:p?{...r.style,...p}:r.style,...y,children:D}):D;return l.scope(c&&i?t("div",{className:k(b,l.className),style:{display:"contents",...c},...l.attrs,children:H}):H)}function le(e,n){return e?{...n,paddingLeft:0,paddingRight:0}:n}export{Ce as GroundStopsAt,Se as InsideSiteColumn,Ne as NestedBoxChoice,ge as NotASectionEdge,Pe as SectionGroupChoice,Ge as SectionGroupWidthsProvider,Be as SectionRootChoice,xe as SplitBandAndColumn,se as default,re as useInsideBox,ve as useInsideSiteGutter,_e as useSectionEdge,ie as useSectionRoot};
@@ -1,4 +1,4 @@
1
- import type { PadValues } from "../lib/content/section-padding.js";
1
+ import { type PadValues } from "../lib/content/section-padding.js";
2
2
  import { type HeadingLevel } from "./Heading.js";
3
3
  import { type BlockAlign as Align } from "../../format/lib/content/block-align.js";
4
4
  type Tone = "default" | "dim";
@@ -1 +1 @@
1
- import{jsx as r,jsxs as A,Fragment as M}from"react/jsx-runtime";import w from"./BlockFrame.js";import{partAttr as m}from"../../format/lib/content/part-names.js";import{renderGold as $,renderHeadline as U,renderPlain as O,splitParagraphs as D}from"./goldPhrases.js";import{headingLook as X}from"./Heading.js";import{alignViewClasses as V,BLOCK_ALIGN_PLACE as T}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as W}from"./InBoxContext.js";import{textTagOf as Z}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as q,kickerLead as J}from"../lib/content/page-contents.js";import{isTextStyleId as Q}from"../lib/document/part-styles.js";import{faceClassOf as P}from"../../format/lib/text-style-face.js";import{useMirroredCopy as Y}from"./MirrorContext.js";import{mirroredTextClasses as j}from"../../format/lib/content/mirror-cards.js";import ee from"./PartStyledKind.js";import z from"./PostDate.js";import{SiteLink as te}from"../lib/site-runtime.js";import{markupHoldsLink as re}from"../../format/lib/markup.js";const x={bodyUpTo800:"max-view-wide:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},ae="underline underline-offset-2",n=e=>e?` ${e}`:"";function ne(e,l,c,s){const f=V("place",e,l,c,{atSectionLine:!s});return f?` ${f}`:""}const se={left:`text-left${n(T.left)}`,center:`text-left${n(T.center)}`,right:`text-left${n(T.right)}`},oe=`max-w-[380px] ${x.bodySmall} leading-[1.5] opacity-80 ${x.bodyUpTo800}`,ie={default:"text-fg",dim:"text-fg-dim"};function le(e){return String(Math.min(Number(e.slice(8)),6))}function de({text:e,labelId:l,number:c,align:s,alignTablet:f,alignPhone:I,tone:b,contained:N,hero:K=!1,pad:p,tag:R,textStyle:k,ownWidth:B=!1,partAlign:L,onLine:u=!1,partKey:S,partDeclare:F=!1,plain:h=!1,href:_,date:d}){const G=t=>S?r(ee,{kind:S,declare:F,children:t}):t,v=_&&!re(e)?_:void 0,g=t=>G(v?r(te,{href:v,className:ae,newTab:"auto",children:t}):t),C=Y(),H=W();if(K)return r("p",{className:oe,children:$(e)});const o=c?r("span",{[q]:"",children:J(c)}):void 0,i=Q(k)?k:void 0,E=`${i?`${P({id:i})} `:""}${B?"":"max-w-[680px] "}whitespace-pre-line ${i==="body-5"?x.label:x.bodyLarge} leading-[1.7]${n(s?se[s]:"")}${ne(s,f,I,H)}${n(b?ie[b]:"")}${n(j(C,s,L))}`,y=Z(R);if(i?.startsWith("heading-")){const t=le(i),a=X(t,P({id:i}));return r(w,{contained:N,className:u?"":"py-6",pad:p?{values:p,frame:u?0:24}:void 0,part:m("text-block"),children:A(y,{id:l,className:`${a.className}${n(j(C,void 0,L))}`,style:a.style,...m("text"),children:[o,g(d?r(z,{at:d}):U(e.trim(),!1,h))]})})}return r(w,{contained:N,className:u?"":"py-4",pad:p?{values:p,frame:u?0:16}:void 0,part:m("text-block"),children:y==="p"&&!d?D(e).map((t,a)=>r("p",{id:a===0?l:void 0,className:E,...m("text"),children:g(h?O(t,a===0?o:void 0):$(t,!1,a===0?o:void 0))},a)):r(y,{id:l,className:E,...m("text"),children:g(d?A(M,{children:[o,r(z,{at:d})]}):h?O(e.trim(),o):$(e.trim(),!1,o))})})}export{de as default,le as headingLevelOfStyle};
1
+ import{jsx as r,jsxs as w,Fragment as U}from"react/jsx-runtime";import{BLOCK_PAD_FRAME as p,ownPadOf as O}from"../lib/content/section-padding.js";import P from"./BlockFrame.js";import{partAttr as m}from"../../format/lib/content/part-names.js";import{renderGold as y,renderHeadline as X,renderPlain as K,splitParagraphs as V}from"./goldPhrases.js";import{headingLook as W}from"./Heading.js";import{alignViewClasses as Z,BLOCK_ALIGN_PLACE as $}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as q}from"./InBoxContext.js";import{textTagOf as J}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as Q,kickerLead as Y}from"../lib/content/page-contents.js";import{isTextStyleId as ee}from"../lib/document/part-styles.js";import{faceClassOf as R}from"../../format/lib/text-style-face.js";import{useMirroredCopy as te}from"./MirrorContext.js";import{mirroredTextClasses as j}from"../../format/lib/content/mirror-cards.js";import re from"./PartStyledKind.js";import z from"./PostDate.js";import{SiteLink as ne}from"../lib/site-runtime.js";import{markupHoldsLink as oe}from"../../format/lib/markup.js";const x={bodyUpTo800:"max-view-wide:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},ie="underline underline-offset-2",o=e=>e?` ${e}`:"";function ae(e,l,c,i){const f=Z("place",e,l,c,{atSectionLine:!i});return f?` ${f}`:""}const se={left:`text-left${o($.left)}`,center:`text-left${o($.center)}`,right:`text-left${o($.right)}`},le=`max-w-[380px] ${x.bodySmall} leading-[1.5] opacity-80 ${x.bodyUpTo800}`,de={default:"text-fg",dim:"text-fg-dim"};function me(e){return String(Math.min(Number(e.slice(8)),6))}function ce({text:e,labelId:l,number:c,align:i,alignTablet:f,alignPhone:B,tone:L,contained:T,hero:F=!1,pad:b,tag:I,textStyle:k,ownWidth:M=!1,partAlign:_,onLine:N=!1,partKey:S,partDeclare:D=!1,plain:h=!1,href:C,date:d}){const G=t=>S?r(re,{kind:S,declare:D,children:t}):t,E=C&&!oe(e)?C:void 0,g=t=>G(E?r(ne,{href:E,className:ie,newTab:"auto",children:t}):t),A=te(),H=q();if(F)return r("p",{className:le,children:y(e)});const a=c?r("span",{[Q]:"",children:Y(c)}):void 0,s=ee(k)?k:void 0,v=`${s?`${R({id:s})} `:""}${M?"":"max-w-[680px] "}whitespace-pre-line ${s==="body-5"?x.label:x.bodyLarge} leading-[1.7]${o(i?se[i]:"")}${ae(i,f,B,H)}${o(L?de[L]:"")}${o(j(A,i,_))}`,u=J(I);if(s?.startsWith("heading-")){const t=me(s),n=W(t,R({id:s}));return r(P,{contained:T,...O(b,N?p.line:p.heading),part:m("text-block"),children:w(u,{id:l,className:`${n.className}${o(j(A,void 0,_))}`,style:n.style,...m("text"),children:[a,g(d?r(z,{at:d}):X(e.trim(),!1,h))]})})}return r(P,{contained:T,...O(b,N?p.line:p.text),part:m("text-block"),children:u==="p"&&!d?V(e).map((t,n)=>r("p",{id:n===0?l:void 0,className:v,...m("text"),children:g(h?K(t,n===0?a:void 0):y(t,!1,n===0?a:void 0))},n)):r(u,{id:l,className:v,...m("text"),children:g(d?w(U,{children:[a,r(z,{at:d})]}):h?K(e.trim(),a):y(e.trim(),!1,a))})})}export{ce as default,me as headingLevelOfStyle};
@@ -7,6 +7,8 @@ export declare const SECTION_PADDING: {
7
7
  readonly step: 10;
8
8
  };
9
9
  export declare function sectionPadStyle(pt: unknown, pb: unknown, unit?: unknown, frame?: number): CSSProperties | undefined;
10
+ type SideFrames = (side: "top" | "bottom", tier: ViewTier) => number;
11
+ type TierFrames = Readonly<Record<ViewTier, number>>;
10
12
  export declare const PAD_TOP_PHONE_CLASS = "sf-pad-top-phone";
11
13
  export declare const PAD_BOTTOM_PHONE_CLASS = "sf-pad-bottom-phone";
12
14
  export declare const PAD_TOP_PHONE_VAR = "--sf-pad-t-phone";
@@ -41,11 +43,11 @@ export type PadUnits = {
41
43
  tablet?: unknown;
42
44
  phone?: unknown;
43
45
  };
44
- export declare function sideViewLengths(desktop: number | SiteSide | undefined, tablet: number | SiteSide | undefined, phone: number | SiteSide | undefined, units?: PadUnits, frame?: number): {
46
+ export declare function sideViewLengths(desktop: number | SiteSide | undefined, tablet: number | SiteSide | undefined, phone: number | SiteSide | undefined, units?: PadUnits, frame?: number | TierFrames): {
45
47
  tablet?: string;
46
48
  phone?: string;
47
49
  };
48
- export declare function padSideAttrs(inline: PadSides, phone: PadSides, tablet?: PadSides, desktop?: PadSides, units?: PadUnits, frame?: number, sideSpace?: "box" | "site"): {
50
+ export declare function padSideAttrs(inline: PadSides, phone: PadSides, tablet?: PadSides, desktop?: PadSides, units?: PadUnits, frame?: number | SideFrames, sideSpace?: "box" | "site"): {
49
51
  classes: string[];
50
52
  style: CSSProperties;
51
53
  };
@@ -98,6 +100,7 @@ export type PadValues = {
98
100
  unitTablet?: unknown;
99
101
  unitPhone?: unknown;
100
102
  frame?: number;
103
+ totals?: readonly string[];
101
104
  sideSpace?: "box" | "site";
102
105
  };
103
106
  export declare const SECTION_PAD_KEYS: {
@@ -108,6 +111,36 @@ export declare const SECTION_PAD_KEYS: {
108
111
  };
109
112
  export declare const BAND_TO_SECTION_PAD: ReadonlyArray<readonly [string, string]>;
110
113
  export declare function padValuesOf(props: Record<string, unknown>, keys?: Record<"top" | "bottom" | "left" | "right", string>, sides?: boolean, unitKey?: string | undefined): PadValues;
114
+ export declare const PAD_TOTAL_KEY = "padTotal";
115
+ export declare function padTotalKeys(keys?: Record<"top" | "bottom", string>): string[];
116
+ export declare const TEXT_PAD_FRAME = 16;
117
+ export declare const HEADING_PAD_FRAME = 24;
118
+ export declare const BLOCK_PAD_FRAME: {
119
+ readonly text: 16;
120
+ readonly heading: 24;
121
+ readonly line: 0;
122
+ };
123
+ export declare const FRAME_CLASS: Readonly<Record<number, string>>;
124
+ export declare function ownPadOf(pad: PadValues | undefined, frame: number): {
125
+ className: string;
126
+ pad?: {
127
+ values: PadValues;
128
+ frame: number;
129
+ };
130
+ };
131
+ export declare function framePadAttrs(pad: {
132
+ values: PadValues;
133
+ frame: number;
134
+ }, drawsGutter: boolean): {
135
+ root: {
136
+ className: string;
137
+ style: CSSProperties;
138
+ } | null;
139
+ outer: {
140
+ className: string;
141
+ style: CSSProperties;
142
+ } | null;
143
+ };
111
144
  export declare function wrapperPadAttrs(v: PadValues): {
112
145
  className: string;
113
146
  style: CSSProperties;
@@ -116,3 +149,4 @@ export declare function rootPadAttrs(v: PadValues, frame: number): {
116
149
  className: string;
117
150
  style: CSSProperties;
118
151
  } | null;
152
+ export {};
@@ -1 +1 @@
1
- import{storedUnit as M}from"../../../format/lib/content/css-length.js";import{phoneKey as O,resolveViewValue as U,tabletKey as L,viewKeyAt as _}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as N,SITE_SIDE as j,convertLength as Y,isLengthUnit as k,isSiteSide as B,sideLengthAt as K,sideValueAt as $,withLength as g}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as R}from"../../../format/lib/content/page-width.js";import{viewRules as q}from"../../../format/lib/content/view-overrides.js";import{finiteNumber as f}from"../../../format/lib/finite-number.js";const z={min:10,max:200,step:10};function J(t,o,e,n=0){const s=f(t),i=f(o);if(s===void 0&&i===void 0)return;const d=h(e),r=p=>p===void 0?void 0:d==="px"?p:g(p,d,n);return{paddingTop:r(s),paddingBottom:r(i)}}const h=t=>M(t),Q="sf-pad-top-phone",W="sf-pad-bottom-phone",X="--sf-pad-t-phone",Z="--sf-pad-b-phone",v="sf-pad-left-phone",tt="sf-pad-right-phone",ot="--sf-pad-l-phone",et="--sf-pad-r-phone",nt="sf-pad-top-tablet",st="sf-pad-bottom-tablet",it="sf-pad-left-tablet",dt="sf-pad-right-tablet",rt="--sf-pad-t-tablet",pt="--sf-pad-b-tablet",at="--sf-pad-l-tablet",ft="--sf-pad-r-tablet",C="sf-section-pad";function S(t){const o={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},e=J(t.top,t.bottom,t.unit,t.frame),n=mt({left:t.left,right:t.right},{top:t.topPhone,bottom:t.bottomPhone,left:t.leftPhone,right:t.rightPhone},{top:t.topTablet,bottom:t.bottomTablet,left:t.leftTablet,right:t.rightTablet},{top:t.top,bottom:t.bottom,left:t.left,right:t.right},o,t.frame,t.sideSpace);return e===void 0&&!n.classes.length&&!Object.keys(n.style).length?null:{className:[C,...n.classes].join(" "),style:{...e,...n.style}}}const ct=t=>B(t)?t:f(t),ut=[["top","paddingTop",[nt,rt],[Q,X]],["bottom","paddingBottom",[st,pt],[W,Z]],["left","paddingLeft",[it,at],[v,ot]],["right","paddingRight",[dt,ft],[tt,et]]];function I(t,o,e){return!k(o)||o==="px"?t:Y(t,"px",o,e,{min:0,max:z.max,step:1})}function lt(t,o,e,n={},s=0){const i=(m,u)=>{if(u==="px")return`${m}px`;const c=g(m,u,s);return typeof c=="number"?`${c}px`:c},d={n:t,[L("n")]:o,[O("n")]:e,u:n.desktop,[L("u")]:n.tablet,[O("u")]:n.phone},r=U("spacing",f(t),f(o),f(e),q()),p=(m,u,c)=>{if($(d,{side:"n"},m,"side",["side"])?.value===j)return R().value;const l=K(d,{side:"n"},"u",m,"side");if(!l)return;const A=u!==null&&!c&&l.unit==="px"&&typeof r[u]=="number";return i(A?r[u]:l.value,l.unit)},P=p("desktop",null,!0),b={},T=p("tablet","tablet",o!==void 0);T!==void 0&&(o!==void 0||T!==P)&&(b.tablet=T);const a=p("mobile","phone",e!==void 0);return a!==void 0&&(e!==void 0||a!==P)&&(b.phone=a),b}function mt(t,o,e={},n=t,s={},i=0,d="box"){const r={},p={},P=[],b=R(d);let T=!1;for(const[a,m,...u]of ut){const c=a==="left"||a==="right"?ct:f,l=c(t[a]),A=a==="top"||a==="bottom"?i:0;B(l)?(r[m]=b.value,T=!0):l!==void 0&&(r[m]=h(s.desktop)==="px"?l:g(l,h(s.desktop),A));const w=lt(c(n[a]),c(e[a]),c(o[a]),s,A);for(const[y,[F,G]]of[["tablet",u[0]],["phone",u[1]]]){const x=w[y];x!==void 0&&(P.push(F),p[G]=x,x===b.value&&(T=!0))}}return T&&P.push(...b.className.split(" ")),{classes:P,style:{...r,...p}}}function V(t,o,e){const n=f(t)??e,s=f(o);return n===void 0?s:s===void 0?n:n+s}function St(t,o={}){return{top:V(t.padTop,t.sectionPaddingTop,o.top),bottom:V(t.padBottom,t.sectionPaddingBottom,o.bottom)}}const H={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},E="padUnit";function bt(t,o){const e=t[E],n=(s,i,d)=>{const r=f(s)??(d===void 0?void 0:I(d,e,"desktop")),p=f(i);return p===void 0?r:(r??0)+I(p,e,"desktop")};return{top:n(t.padTop,t.sectionPaddingTop,o.top),bottom:n(t.padBottom,t.sectionPaddingBottom,o.bottom)}}function Et(t,o,e={}){const n=bt(t,o),s={...Tt(t,H,!0,E),top:n.top,bottom:n.bottom};e.noTop&&Object.assign(s,{top:0,topTablet:void 0,topPhone:void 0});const i=S(s),d=i?i.className.split(" ").filter(r=>r!==C):[];return{...d.length?{className:d.join(" ")}:{},style:i?.style??{}}}const D={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},Dt=[...["top","bottom","left","right"].map(t=>[H[t],D[t]]),[E,N]].flatMap(([t,o])=>[[t,o],...["tablet","mobile"].map(e=>[_(t,e),_(o,e)])]);function Tt(t,o=D,e=!0,n=o===D?N:void 0){const s={};if(n){t[n]!==void 0&&(s.unit=t[n]);for(const i of["tablet","mobile"])t[_(n,i)]!==void 0&&(s[_("unit",i)]=t[_(n,i)])}for(const i of e?["top","bottom","left","right"]:["top","bottom"]){s[i]=t[o[i]];for(const d of["tablet","mobile"])s[_(i,d)]=t[_(o[i],d)]}return s}function Ot(t){return S(t)}function Lt(t,o){const e=(n,s)=>typeof n!="number"?void 0:h(s)==="px"?n+o:n;return S({...t,frame:o,top:e(t.top,t.unit),bottom:e(t.bottom,t.unit),topTablet:e(t.topTablet,t.unitTablet),bottomTablet:e(t.bottomTablet,t.unitTablet),topPhone:e(t.topPhone,t.unitPhone),bottomPhone:e(t.bottomPhone,t.unitPhone)})}export{H as BAND_PAD_KEYS,E as BAND_PAD_UNIT_KEY,Dt as BAND_TO_SECTION_PAD,W as PAD_BOTTOM_PHONE_CLASS,Z as PAD_BOTTOM_PHONE_VAR,st as PAD_BOTTOM_TABLET_CLASS,pt as PAD_BOTTOM_TABLET_VAR,v as PAD_LEFT_PHONE_CLASS,ot as PAD_LEFT_PHONE_VAR,it as PAD_LEFT_TABLET_CLASS,at as PAD_LEFT_TABLET_VAR,tt as PAD_RIGHT_PHONE_CLASS,et as PAD_RIGHT_PHONE_VAR,dt as PAD_RIGHT_TABLET_CLASS,ft as PAD_RIGHT_TABLET_VAR,Q as PAD_TOP_PHONE_CLASS,X as PAD_TOP_PHONE_VAR,nt as PAD_TOP_TABLET_CLASS,rt as PAD_TOP_TABLET_VAR,z as SECTION_PADDING,C as SECTION_PAD_CLASS,D as SECTION_PAD_KEYS,Et as bandPadAttrs,bt as bandTopBottom,I as padDefaultIn,mt as padSideAttrs,ct as padSideValue,Tt as padValuesOf,St as resolveSectionPadding,Lt as rootPadAttrs,S as sectionPadAttrs,J as sectionPadStyle,lt as sideViewLengths,Ot as wrapperPadAttrs};
1
+ import{storedUnit as X}from"../../../format/lib/content/css-length.js";import{VIEW_TIERS as R,phoneKey as I,resolveViewValue as q,tabletKey as y,viewKeyAt as b}from"efficient-easel/draw";import{ownEntry as z}from"../../../format/lib/own-entry.js";import{SECTION_PAD_UNIT_KEY as C,SITE_SIDE as J,convertLength as Q,isLengthUnit as Z,isSiteSide as V,sideLengthAt as v,sideValueAt as tt,withLength as S}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as k}from"../../../format/lib/content/page-width.js";import{viewRules as ot}from"../../../format/lib/content/view-overrides.js";import{finiteNumber as l}from"../../../format/lib/finite-number.js";const et={min:10,max:200,step:10};function nt(t,o,e,s=0){const n=l(t),d=l(o);if(n===void 0&&d===void 0)return;const i=E(e),r=p=>p===void 0?void 0:i==="px"?p:S(p,i,s);return{paddingTop:r(n),paddingBottom:r(d)}}const E=t=>X(t),st={top:"top",bottom:"bottom"};function it(t,o,e,s){const n=l(t),d=l(o);if(n===void 0&&d===void 0)return;const i=E(e),r=(p,m)=>p===void 0?void 0:i==="px"?p:S(p,i,m);return{paddingTop:r(n,s("top","desktop")),paddingBottom:r(d,s("bottom","desktop"))}}const dt="sf-pad-top-phone",rt="sf-pad-bottom-phone",pt="--sf-pad-t-phone",at="--sf-pad-b-phone",lt="sf-pad-left-phone",ft="sf-pad-right-phone",ct="--sf-pad-l-phone",ut="--sf-pad-r-phone",bt="sf-pad-top-tablet",mt="sf-pad-bottom-tablet",Tt="sf-pad-left-tablet",At="sf-pad-right-tablet",_t="--sf-pad-t-tablet",Pt="--sf-pad-b-tablet",ht="--sf-pad-l-tablet",xt="--sf-pad-r-tablet",w="sf-section-pad";function N(t){const o={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},e=t.totals?.length?(d,i)=>t.totals.includes(b(d,i))?0:t.frame??0:t.frame,s=typeof e=="function"?it(t.top,t.bottom,t.unit,e):nt(t.top,t.bottom,t.unit,t.frame),n=Dt({left:t.left,right:t.right},{top:t.topPhone,bottom:t.bottomPhone,left:t.leftPhone,right:t.rightPhone},{top:t.topTablet,bottom:t.bottomTablet,left:t.leftTablet,right:t.rightTablet},{top:t.top,bottom:t.bottom,left:t.left,right:t.right},o,e,t.sideSpace);return s===void 0&&!n.classes.length&&!Object.keys(n.style).length?null:{className:[w,...n.classes].join(" "),style:{...s,...n.style}}}const gt=t=>V(t)?t:l(t),Et=[["top","paddingTop",[bt,_t],[dt,pt]],["bottom","paddingBottom",[mt,Pt],[rt,at]],["left","paddingLeft",[Tt,ht],[lt,ct]],["right","paddingRight",[At,xt],[ft,ut]]];function H(t,o,e){return!Z(o)||o==="px"?t:Q(t,"px",o,e,{min:0,max:et.max,step:1})}function St(t,o,e,s={},n=0){const d={desktop:!0,tablet:o!==void 0,mobile:e!==void 0},i={desktop:["desktop"],tablet:["tablet","desktop"],mobile:["mobile","tablet","desktop"]},r=a=>typeof n=="object"?n[a]:n,p=(a,u,h)=>{if(u==="px")return`${a}px`;const x=i[h].find(O=>d[O])??"desktop",g=S(a,u,r(x));return typeof g=="number"?`${g}px`:g},m={n:t,[y("n")]:o,[I("n")]:e,u:s.desktop,[y("u")]:s.tablet,[I("u")]:s.phone},A=q("spacing",l(t),l(o),l(e),ot()),T=(a,u,h)=>{if(tt(m,{side:"n"},a,"side",["side"])?.value===J)return k().value;const x=v(m,{side:"n"},"u",a,"side");if(!x)return;const g=u!==null&&!h&&x.unit==="px"&&typeof A[u]=="number";return p(g?A[u]:x.value,x.unit,a)},f=T("desktop",null,!0),_={},P=T("tablet","tablet",o!==void 0);P!==void 0&&(o!==void 0||P!==f)&&(_.tablet=P);const c=T("mobile","phone",e!==void 0);return c!==void 0&&(e!==void 0||c!==f)&&(_.phone=c),_}function Dt(t,o,e={},s=t,n={},d=0,i="box"){const r={},p={},m=[],A=k(i);let T=!1;for(const[f,_,...P]of Et){const c=f==="left"||f==="right"?gt:l,a=c(t[f]),u=z(st,f),h=u?typeof d=="function"?{desktop:d(u,"desktop"),tablet:d(u,"tablet"),mobile:d(u,"mobile")}:d:0,x=typeof h=="object"?h.desktop:h;V(a)?(r[_]=A.value,T=!0):a!==void 0&&(r[_]=E(n.desktop)==="px"?a:S(a,E(n.desktop),x));const g=St(c(s[f]),c(e[f]),c(o[f]),n,h);for(const[O,[$,W]]of[["tablet",P[0]],["phone",P[1]]]){const L=g[O];L!==void 0&&(m.push($),p[W]=L,L===A.value&&(T=!0))}}return T&&m.push(...A.className.split(" ")),{classes:m,style:{...r,...p}}}function M(t,o,e){const s=l(t)??e,n=l(o);return s===void 0?n:n===void 0?s:s+n}function Mt(t,o={}){return{top:M(t.padTop,t.sectionPaddingTop,o.top),bottom:M(t.padBottom,t.sectionPaddingBottom,o.bottom)}}const F={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},B="padUnit";function Ot(t,o){const e=t[B],s=(n,d,i)=>{const r=l(n)??(i===void 0?void 0:H(i,e,"desktop")),p=l(d);return p===void 0?r:(r??0)+H(p,e,"desktop")};return{top:s(t.padTop,t.sectionPaddingTop,o.top),bottom:s(t.padBottom,t.sectionPaddingBottom,o.bottom)}}function Ft(t,o,e={}){const s=Ot(t,o),n={...Lt(t,F,!0,B),top:s.top,bottom:s.bottom};e.noTop&&Object.assign(n,{top:0,topTablet:void 0,topPhone:void 0});const d=N(n),i=d?d.className.split(" ").filter(r=>r!==w):[];return{...i.length?{className:i.join(" ")}:{},style:d?.style??{}}}const D={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},jt=[...["top","bottom","left","right"].map(t=>[F[t],D[t]]),[B,C]].flatMap(([t,o])=>[[t,o],...["tablet","mobile"].map(e=>[b(t,e),b(o,e)])]);function Lt(t,o=D,e=!0,s=o===D?C:void 0){const n={};if(s){t[s]!==void 0&&(n.unit=t[s]);for(const i of["tablet","mobile"])t[b(s,i)]!==void 0&&(n[b("unit",i)]=t[b(s,i)])}for(const i of e?["top","bottom","left","right"]:["top","bottom"]){n[i]=t[o[i]];for(const r of["tablet","mobile"])n[b(i,r)]=t[b(o[i],r)]}const d=t[Nt];if(Array.isArray(d)){const i=j.flatMap(r=>R.filter(p=>d.includes(b(o[r],p))).map(p=>b(r,p)));i.length&&(n.totals=i)}return n}const Nt="padTotal",j=["top","bottom"];function Gt(t=D){return j.flatMap(o=>R.map(e=>b(t[o],e)))}const G=16,K=24,Bt={text:G,heading:K,line:0},Rt={[G]:"py-4",[K]:"py-6",[Bt.line]:""};function Kt(t,o){return{className:Rt[o]??"",...t?{pad:{values:t,frame:o}}:{}}}function Ut(t,o){if(!o)return{root:Y(t.values,t.frame),outer:null};if(!t.values.totals?.length)return{root:null,outer:U(t.values)};const e=t.values,{top:s,bottom:n,topTablet:d,bottomTablet:i,topPhone:r,bottomPhone:p,left:m,right:A,leftTablet:T,rightTablet:f,leftPhone:_,rightPhone:P,...c}=e;return{root:Y({...c,top:s,bottom:n,topTablet:d,bottomTablet:i,topPhone:r,bottomPhone:p},t.frame),outer:U({...c,totals:void 0,left:m,right:A,leftTablet:T,rightTablet:f,leftPhone:_,rightPhone:P})}}function U(t){return N(t)}function Y(t,o){const e=(s,n,d)=>typeof s!="number"?void 0:E(n)==="px"&&!t.totals?.includes(d)?s+o:s;return N({...t,frame:o,top:e(t.top,t.unit,"top"),bottom:e(t.bottom,t.unit,"bottom"),topTablet:e(t.topTablet,t.unitTablet,"topTablet"),bottomTablet:e(t.bottomTablet,t.unitTablet,"bottomTablet"),topPhone:e(t.topPhone,t.unitPhone,"topPhone"),bottomPhone:e(t.bottomPhone,t.unitPhone,"bottomPhone")})}export{F as BAND_PAD_KEYS,B as BAND_PAD_UNIT_KEY,jt as BAND_TO_SECTION_PAD,Bt as BLOCK_PAD_FRAME,Rt as FRAME_CLASS,K as HEADING_PAD_FRAME,rt as PAD_BOTTOM_PHONE_CLASS,at as PAD_BOTTOM_PHONE_VAR,mt as PAD_BOTTOM_TABLET_CLASS,Pt as PAD_BOTTOM_TABLET_VAR,lt as PAD_LEFT_PHONE_CLASS,ct as PAD_LEFT_PHONE_VAR,Tt as PAD_LEFT_TABLET_CLASS,ht as PAD_LEFT_TABLET_VAR,ft as PAD_RIGHT_PHONE_CLASS,ut as PAD_RIGHT_PHONE_VAR,At as PAD_RIGHT_TABLET_CLASS,xt as PAD_RIGHT_TABLET_VAR,dt as PAD_TOP_PHONE_CLASS,pt as PAD_TOP_PHONE_VAR,bt as PAD_TOP_TABLET_CLASS,_t as PAD_TOP_TABLET_VAR,Nt as PAD_TOTAL_KEY,et as SECTION_PADDING,w as SECTION_PAD_CLASS,D as SECTION_PAD_KEYS,G as TEXT_PAD_FRAME,Ft as bandPadAttrs,Ot as bandTopBottom,Ut as framePadAttrs,Kt as ownPadOf,H as padDefaultIn,Dt as padSideAttrs,gt as padSideValue,Gt as padTotalKeys,Lt as padValuesOf,Mt as resolveSectionPadding,Y as rootPadAttrs,N as sectionPadAttrs,nt as sectionPadStyle,St as sideViewLengths,U as wrapperPadAttrs};
@@ -1 +1 @@
1
- import{jsx as n,Fragment as O}from"react/jsx-runtime";import{CardRowDrawn as T}from"../../../../../components/CardRowContext.js";import j from"../../../../../components/ButtonBlock.js";import{CARD_ROW_LINK_PROP as y,namedRowField as a}from"../../../../../../format/lib/content/card-template.js";import{namedLinkHrefRewrite as k}from"../../../../../../format/lib/links/link-href-rewrites.js";import{CTA_PH as v}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as A}from"../../scaffold.js";import{phoneKey as D}from"efficient-easel/draw";import{ButtonBlockMeta as E}from"../../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";const z={...E,render:o=>{const{label:m,href:c,variant:b,align:d,alignTablet:f,alignPhone:s,contained:h,arrow:u,icon:g,iconPosition:w,widthFit:P,buttonColor:B,buttonTextColor:C,editor:r}=o,F=Object.fromEntries(Object.entries(o).filter(([t])=>t==="buttonFillOpacity"||t==="buttonBorder"||t==="buttonCorners"||t==="buttonCornerSides"||t.startsWith("buttonPadding"))),i=k(o),R=i?{hrefRewrite:i}:{},e=(t,l)=>n(j,{label:A(t,v.text,r)??"",href:l,variant:b,align:d,alignTablet:f,alignPhone:s,contained:h,arrow:u,icon:g,iconPosition:w,widthFit:P,widthFitPhone:o[D("widthFit")],buttonColor:B,buttonTextColor:C,...F,...R}),_=a(o),x=a(o,y);return!_&&!x?e(m,c):n(T,{type:"ButtonBlock",props:o,children:(t,l,p)=>p&&!r?.isEditing&&!(typeof t.label=="string"&&t.label.trim())?n(O,{}):e(t.label,t.href)})}};export{z as ButtonBlockRender};
1
+ import{jsx as n,Fragment as p}from"react/jsx-runtime";import{CardRowDrawn as T}from"../../../../../components/CardRowContext.js";import j from"../../../../../components/ButtonBlock.js";import{CARD_ROW_LINK_PROP as k,namedRowField as l}from"../../../../../../format/lib/content/card-template.js";import{namedLinkHrefRewrite as y}from"../../../../../../format/lib/links/link-href-rewrites.js";import{CTA_PH as v}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as A}from"../../scaffold.js";import{phoneKey as D}from"efficient-easel/draw";import{padValuesOf as E}from"../../../../content/section-padding.js";import{ButtonBlockMeta as H}from"../../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";const G={...H,render:o=>{const{label:m,href:c,variant:d,align:f,alignTablet:b,alignPhone:s,contained:u,arrow:h,icon:g,iconPosition:w,widthFit:P,buttonColor:B,buttonTextColor:C,editor:r}=o,F=Object.fromEntries(Object.entries(o).filter(([t])=>t==="buttonFillOpacity"||t==="buttonBorder"||t==="buttonCorners"||t==="buttonCornerSides"||t.startsWith("buttonPadding"))),i=y(o),R=i?{hrefRewrite:i}:{},e=(t,a)=>n(j,{label:A(t,v.text,r)??"",href:a,variant:d,align:f,alignTablet:b,alignPhone:s,contained:u,arrow:h,icon:g,iconPosition:w,widthFit:P,widthFitPhone:o[D("widthFit")],buttonColor:B,buttonTextColor:C,...F,...R,blockPad:E(o)}),_=l(o),x=l(o,k);return!_&&!x?e(m,c):n(T,{type:"ButtonBlock",props:o,children:(t,a,O)=>O&&!r?.isEditing&&!(typeof t.label=="string"&&t.label.trim())?n(p,{}):e(t.label,t.href)})}};export{G as ButtonBlockRender};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{HideTaker as m}from"../../../../../components/ViewHideRoot.js";import{CUSTOM_HTML_SCOPE_ATTR as p,scopeCustomCss as T,splitCustomHtml as l}from"../../../custom-css.js";import{CustomHTMLMeta as u}from"../../../../../../format/lib/document/blocks/general/CustomHTML/meta.js";const a={...u,render:({html:n,id:t})=>{const{css:r,markup:s}=l(n??""),o=r?T(r,String(t??"")):"";return o?e(m,{[p]:t,dangerouslySetInnerHTML:{__html:`<style>${o}</style>${s}`}}):e(m,{dangerouslySetInnerHTML:{__html:s}})}};export{a as CustomHTMLRender};
1
+ import{jsx as e}from"react/jsx-runtime";import{HideTaker as o}from"../../../../../components/ViewHideRoot.js";import{CUSTOM_HTML_SCOPE_ATTR as s,customHtmlDrawn as T}from"../../../custom-css.js";import{CustomHTMLMeta as _}from"../../../../../../format/lib/document/blocks/general/CustomHTML/meta.js";const p={..._,render:({html:n,id:r})=>{const{scoped:m,inner:t}=T(n??"",String(r??""));return m?e(o,{[s]:r,dangerouslySetInnerHTML:{__html:t}}):e(o,{dangerouslySetInnerHTML:{__html:t}})}};export{p as CustomHTMLRender};
@@ -1 +1 @@
1
- import{jsx as f}from"react/jsx-runtime";import{bandPadAttrs as l}from"../../../../content/section-padding.js";import{innerPaddingFallback as u}from"../../../passes/section-padding.js";import h from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as y,footprintOfficeOfRow as T}from"../../../../../../format/lib/content/footprint.js";import{DEALERS_SOURCE as s,declaredBlockSource as c,sourcedRows as g}from"../../../../../../format/lib/content/block-sources.js";import{parseDealerListPosition as S}from"../../../../dealer-source.js";import{hidableText as m}from"efficient-easel/draw";import{parseSectionHeadPlacement as O}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as P,phHide as a}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{CARD_TEMPLATE_SLOT as w}from"../../../../../../format/lib/content/card-template.js";import{cardPressTitlesOf as C}from"../../../card-press-titles.js";import{FootprintMeta as R,FOOTPRINT_PH as d}from"../../../../../../format/lib/document/blocks/general/Footprint/meta.js";const b=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!0},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!1}],x=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),hq:"true"},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address")}];function E(t){const i=()=>P(t.offices,b(),t.editor),r=c(t);if(!r||r===s)return i();const n=t.editor?.isEditing===!0,o=g(t,n,x());return!o.sample&&!o.rows.length?i():o.rows.map(T)}const v={...R,render:t=>{const i=O(t.headPlacement)==="own-box",r=o=>i?void 0:o,n=E(t);return f(h,{sectionNumber:r(a(t.sectionNumber,d.sectionNumber,t.editor)),heading:r(a(t.heading,d.heading,t.editor)),tagline:r(a(t.tagline,d.tagline,t.editor)),omitHead:i,offices:n,mapTheme:t.mapTheme??y.mapTheme,bandPad:l(t,u("Footprint"),{noTop:i}),editing:t.editor?.isEditing,dealers:c(t)===s,search:t.search===!0,searchHint:m(t.searchHint),noMatchText:m(t.noMatchText),listPosition:S(t.listPosition),showDistance:t.showDistance!==!1,template:t.template,ownerId:String(t.id??""),pressTitles:C(t,w)})}};export{v as FootprintRender};
1
+ import{jsx as m}from"react/jsx-runtime";import{bandPadAttrs as l}from"../../../../content/section-padding.js";import{innerPaddingFallback as h}from"../../../passes/section-padding.js";import u from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as y,footprintHeadInList as g,footprintListColumns as T,footprintListPosition as S,footprintMapHeight as O,footprintOfficeOfRow as w,footprintShows as C}from"../../../../../../format/lib/content/footprint.js";import{DEALERS_SOURCE as s,declaredBlockSource as c,sourcedRows as P}from"../../../../../../format/lib/content/block-sources.js";import{hidableText as f}from"efficient-easel/draw";import{parseSectionHeadPlacement as H}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as R,phHide as a}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{CARD_TEMPLATE_SLOT as b}from"../../../../../../format/lib/content/card-template.js";import{cardPressTitlesOf as x}from"../../../card-press-titles.js";import{FootprintMeta as E,FOOTPRINT_PH as d}from"../../../../../../format/lib/document/blocks/general/Footprint/meta.js";const F=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!0},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!1}],L=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),hq:"true"},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address")}];function _(t){const i=()=>R(t.offices,F(),t.editor),o=c(t);if(!o||o===s)return i();const n=t.editor?.isEditing===!0,r=P(t,n,L());return!r.sample&&!r.rows.length?i():r.rows.map(w)}const J={...E,render:t=>{const i=H(t.headPlacement)==="own-box",o=r=>i?void 0:r,n=_(t);return m(u,{sectionNumber:o(a(t.sectionNumber,d.sectionNumber,t.editor)),heading:o(a(t.heading,d.heading,t.editor)),tagline:o(a(t.tagline,d.tagline,t.editor)),omitHead:i,offices:n,mapTheme:t.mapTheme??y.mapTheme,bandPad:l(t,h("Footprint"),{noTop:i}),editing:t.editor?.isEditing,dealers:c(t)===s,search:t.search===!0,searchHint:f(t.searchHint),noMatchText:f(t.noMatchText),listPosition:S(t),showDistance:t.showDistance!==!1,shows:C(t),listColumns:T(t),mapHeight:O(t),headInList:g(t),template:t.template,ownerId:String(t.id??""),pressTitles:x(t,b)})}};export{J as FootprintRender};
@@ -1 +1 @@
1
- import{jsx as H}from"react/jsx-runtime";import P from"../../../../../components/HeroSection.js";import{HeroMeta as j}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const A={...j,render:({slides:e,strip:t,alignment:i,textureOpacity:o,showTexture:r,textureColor:h,phoneUpDown:a,phoneSideways:s,autoplay:p,autoplayInterval:n,showTicker:l,tickerItems:c,heightDesktop:m,heightTablet:d,heightMobile:g,heightFixed:w,heightFixedTablet:x,heightFixedMobile:k,showPicker:u,pickerShape:b,pickerPlacement:y,showArrows:M,arrowsShape:S,arrowsPlacement:T,_partMotion:f,editor:F})=>H(P,{slides:e,strip:t,alignment:i,textureOpacity:o,showTexture:r,textureColor:h,phoneUpDown:a,phoneSideways:s,autoplay:p,autoplayInterval:n,showTicker:l,tickerItems:c,heightDesktop:m,heightTablet:d,heightMobile:g,heightFixed:w,heightFixedTablet:x,heightFixedMobile:k,showPicker:u,pickerShape:b,pickerPlacement:y,showArrows:M,arrowsShape:S,arrowsPlacement:T,editing:F?.isEditing,partMotion:f})};export{A as HeroRender};
1
+ import{jsx as B}from"react/jsx-runtime";import D from"../../../../../components/HeroSection.js";import{HeroMeta as I}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const C={...I,render:({slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:s,phoneWordsBottom:n,phoneBoxGap:l,autoplay:d,autoplayInterval:m,showTicker:c,tickerItems:x,heightDesktop:g,heightTablet:w,heightMobile:k,heightFixed:u,heightFixedTablet:T,heightFixedMobile:b,showPicker:y,pickerShape:M,pickerPlacement:S,showArrows:f,arrowsShape:F,arrowsPlacement:H,_partMotion:P,editor:j})=>B(D,{slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:s,phoneWordsBottom:n,phoneBoxGap:l,autoplay:d,autoplayInterval:m,showTicker:c,tickerItems:x,heightDesktop:g,heightTablet:w,heightMobile:k,heightFixed:u,heightFixedTablet:T,heightFixedMobile:b,showPicker:y,pickerShape:M,pickerPlacement:S,showArrows:f,arrowsShape:F,arrowsPlacement:H,editing:j?.isEditing,partMotion:P})};export{C as HeroRender};
@@ -1 +1 @@
1
- import{jsx as I}from"react/jsx-runtime";import U from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as V}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{viewFocusValues as d}from"../../../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as r}from"../../../../../../format/lib/hero-media-layout.js";import{editorVideoFrame as _}from"../../../../../../format/lib/hero-video.js";const A={...V,render:i=>{const{mediaType:e,mediaImage:m,mediaVideo:a,poster:l,tintColor:g,tintOpacity:h,overlay:s,overlayColor:b,overlayPosition:c,heightDesktop:u,heightMobile:y,heightFixed:p,heightFixedTablet:P,heightFixedMobile:f,boxes:v,videoSource:x,youtubeUrl:F,videoPlayback:j,mediaLayout:k,mediaLayoutPhone:C,mediaImage2:M,tintColor2:S,tintOpacity2:O,_partMotion:T,editor:n,id:H}=i,o=d(i,r.image),t=d(i,r.image2),L=e==="image"?void 0:_(H,a,n?.metadata);return I(U,{mediaType:e,videoSource:x,youtubeUrl:F,videoPlayback:j,mediaLayout:k,mediaLayoutPhone:C,mediaImage2:M||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:S,tintOpacity2:O,mediaSrc:(e==="image"?m:a)||void 0,poster:l||L||void 0,objectPosition:e==="image"?o.desktop:void 0,objectPositionPhone:e==="image"?o.phone:void 0,objectPositionTablet:e==="image"?o.tablet:void 0,tintColor:g,tintOpacity:e==="image"?h:0,overlay:s,overlayColor:b,overlayPosition:c,heightDesktop:u,heightMobile:y,heightFixed:p,heightFixedTablet:P,heightFixedMobile:f,boxes:v,editing:n?.isEditing,partMotion:T})}};export{A as HeroSingleRender};
1
+ import{jsx as U}from"react/jsx-runtime";import V from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as _}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{viewFocusValues as d}from"../../../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as r}from"../../../../../../format/lib/hero-media-layout.js";import{editorVideoFrame as w}from"../../../../../../format/lib/hero-video.js";const A={..._,render:o=>{const{mediaType:e,mediaImage:m,mediaVideo:a,poster:h,tintColor:l,tintOpacity:p,overlay:s,overlayColor:g,overlayPosition:b,heightDesktop:c,heightMobile:u,heightFixed:y,heightFixedTablet:P,heightFixedMobile:f,phoneWordsTop:x,phoneWordsBottom:v,phoneBoxGap:F,boxes:j,videoSource:T,youtubeUrl:k,videoPlayback:C,mediaLayout:M,mediaLayoutPhone:S,mediaImage2:O,tintColor2:B,tintOpacity2:H,_partMotion:L,editor:n,id:W}=o,i=d(o,r.image),t=d(o,r.image2),I=e==="image"?void 0:w(W,a,n?.metadata);return U(V,{mediaType:e,videoSource:T,youtubeUrl:k,videoPlayback:C,mediaLayout:M,mediaLayoutPhone:S,mediaImage2:O||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:B,tintOpacity2:H,mediaSrc:(e==="image"?m:a)||void 0,poster:h||I||void 0,objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:l,tintOpacity:e==="image"?p:0,overlay:s,overlayColor:g,overlayPosition:b,heightDesktop:c,heightMobile:u,heightFixed:y,heightFixedTablet:P,heightFixedMobile:f,phoneWordsTop:x,phoneWordsBottom:v,phoneBoxGap:F,boxes:j,editing:n?.isEditing,partMotion:L})}};export{A as HeroSingleRender};
@@ -1 +1 @@
1
- import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";const h="relative overflow-hidden h-full min-h-[560px] max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",x="relative overflow-hidden grow shrink-0 max-view-wide:shrink basis-0 min-h-[560px] max-view-desktop:basis-auto max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",w=new Set(["auto","dark","light"]),t=e=>s(e).text.trim();function p(e){return a(l,{...e,takesViewHide:!0,boxClass:d()?.fillingColumn?x:h})}const C={...c,render:e=>{const o=Number(e.lat),i=Number(e.lng),n=e.editor?.isEditing===!0;if(!n&&!u(o,i))return a(m,{});const r=e.mapTheme;return a(p,{name:t(e.name),state:t(e.state),country:t(e.country),lat:o,lng:i,mapsUrl:t(e.mapsUrl),mapTheme:w.has(r)?r:"auto",editing:n})}};export{C as LocationMapRender};
1
+ import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";import{parseOption as x}from"efficient-shell/format";const h="relative overflow-hidden h-full min-h-[560px] max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",p="relative overflow-hidden grow shrink-0 max-view-wide:shrink basis-0 min-h-[560px] max-view-desktop:basis-auto max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",w=new Set(["auto","dark","light"]),t=e=>s(e).text.trim();function f(e){return a(l,{...e,takesViewHide:!0,boxClass:d()?.fillingColumn?p:h})}const L={...c,render:e=>{const o=Number(e.lat),i=Number(e.lng),n=e.editor?.isEditing===!0;if(!n&&!u(o,i))return a(m,{});const r=e.mapTheme;return a(f,{name:t(e.name),state:t(e.state),country:t(e.country),lat:o,lng:i,mapsUrl:t(e.mapsUrl),mapTheme:x([...w],"auto",r),editing:n})}};export{L as LocationMapRender};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import a from"../../../../../components/LogoBlock.js";import{CardRowDrawn as s}from"../../../../../components/CardRowContext.js";import{readHidable as g}from"efficient-easel/draw";import{readLogoColor as h}from"../../../../../../format/lib/logo/logo-color.js";import{LogoBlockMeta as u}from"../../../../../../format/lib/document/blocks/general/LogoBlock/meta.js";const j={...u,render:t=>e(s,{type:"LogoBlock",props:t,children:({src:n,alt:d,href:i,heightPx:l,reverse:f,customColor:m,align:o,alignTablet:c,alignPhone:p})=>{const r=h(f,m);return e(a,{src:n||void 0,alt:g(d).text||void 0,href:i||void 0,heightPx:l,reverse:r.reverse,color:r.color,align:o==="left"||o==="center"||o==="right"?o:void 0,alignTablet:c,alignPhone:p})}})};export{j as LogoBlockRender};
1
+ import{jsx as r}from"react/jsx-runtime";import g from"../../../../../components/LogoBlock.js";import{CardRowDrawn as p}from"../../../../../components/CardRowContext.js";import{readHidable as s}from"efficient-easel/draw";import{readLogoColor as h}from"../../../../../../format/lib/logo/logo-color.js";import{blockAlignOf as k}from"../../../../../../format/lib/content/block-align.js";import{LogoBlockMeta as x}from"../../../../../../format/lib/document/blocks/general/LogoBlock/meta.js";const w={...x,render:e=>r(p,{type:"LogoBlock",props:e,children:({src:l,alt:n,href:t,heightPx:i,reverse:m,customColor:d,align:a,alignTablet:f,alignPhone:c})=>{const o=h(m,d);return r(g,{src:l||void 0,alt:s(n).text||void 0,href:t||void 0,heightPx:i,reverse:o.reverse,color:o.color,align:k(a),alignTablet:f,alignPhone:c})}})};export{w as LogoBlockRender};
@@ -1,2 +1,2 @@
1
- import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as C,TEXT as h,smallText as R}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as F}from"../../../content/box-stack-line.js";import{PHONE_EDGE as K}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";function E(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const oe={standard:64,editorial:60,simple:36,essay:28,shelf:20},z={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function U(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function re(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=L({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const b={[F]:w},m={top:0,right:0,bottom:1,left:0};import{token as de}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>R(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=K,j=w,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),N={...M,align:"right",alignPhone:"left",...C},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:N,style:{...x(e),color:"labels"}}),O=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?$(D()):{},...n.style}}}}},$=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function v(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(v)}}function G(e,t){const n=u(z,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[O(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[O(t.title,`Three ranges,
2
- one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...N,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function y(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>y(n,t))}:e}function L(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...b},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...b},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},y(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[H("maxWidth")]:j,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[H("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],X=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function Q(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>X(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function ae(e){return E(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,V={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function se(e){const t=p.get(e);if(t)return t;const n=U(e),i=E(e),o=i==="editorial"?L(n):i==="simple"?B(n,V):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?Q(n):G(e,n);return p.set(e,o),o}export{b as EDITORIAL_LINE,oe as HEAD_BELOW,V as SIMPLE_HEADING_LOOK,re as editorialHeadTree,_ as fluidToken,E as headLookOf,ae as headReads,se as headTree,v as headWordsOnPhoneLine,de as token,y as withAccentItalic};
1
+ import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as R,TEXT as h,smallText as C}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as K}from"../../../content/box-stack-line.js";import{PHONE_EDGE as F}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";import{parseOption as z}from"efficient-shell/format";const U=["standard","editorial","simple","essay"];function E(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return z(U,"standard",t)}const se={standard:64,editorial:60,simple:36,essay:28,shelf:20},j={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function $(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function le(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=y({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const O={[K]:w},m={top:0,right:0,bottom:1,left:0};import{token as he}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>C(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=F,v=w,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),b={...M,align:"right",alignPhone:"left",...R},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:b,style:{...x(e),color:"labels"}}),N=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?G(D()):{},...n.style}}}}},G=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function X(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(X)}}function Q(e,t){const n=u(j,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[N(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[N(t.title,`Three ranges,
2
+ one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...b,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function L(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>L(n,t))}:e}function y(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...O},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...O},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},L(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[H("maxWidth")]:v,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[H("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],V=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function q(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>V(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function ce(e){return E(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,J={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function de(e){const t=p.get(e);if(t)return t;const n=$(e),i=E(e),o=i==="editorial"?y(n):i==="simple"?B(n,J):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?q(n):Q(e,n);return p.set(e,o),o}export{O as EDITORIAL_LINE,se as HEAD_BELOW,J as SIMPLE_HEADING_LOOK,le as editorialHeadTree,_ as fluidToken,E as headLookOf,ce as headReads,de as headTree,X as headWordsOnPhoneLine,he as token,L as withAccentItalic};
@@ -1 +1 @@
1
- import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as X}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as T}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{SECTION_PIN_STOP_KEY as q,SECTION_PIN_STOP_SCREEN as Z}from"../../../../../format/lib/content/section-sticky.js";import{fluidToken as $,token as n}from"./section-head-looks.js";import{labelStyle as J}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as O,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Q,SAME_KEYS as m,SECTION_BOX as y,TEXT as P,fillFrom as _,lineSides as a,pictureCell as H,siteGutterOf as A,smallText as s,wrapperPad as I,wrapperPadKeys as M}from"./section-to-box-row-parts.js";const v=(e,t,o)=>{const k=r(e),f=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...k===void 0?{}:{size:k,...S(w.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(w.sizePhone,o?.phone)}}},ee=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,te={textStyle:"heading-1",sizeToken:{...$("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},oe=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...te,case:e?"upper":"none"},styleFrom:t=>{const o=T(t);return v(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=T(e);return v(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],N=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ne=()=>({name:"Scroll-Over Text",skip:e=>ee(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile),[q]:Z}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:oe,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:N("Button color"),buttonTextColor:N("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},ie={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...ie,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},re=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",ae=(e,t)=>({[e]:t,[K(e)]:t}),se={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},C=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),de=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...I(e,l),...b(e,100)}),box:[...m,...M(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...D,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(C(e).length,1),3),...ae("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:C,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Q,style:se},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},H("Picture","imageSrc",R)],drop:{...p,grayscale:U,...O}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},le=e=>e.textAlign==="center"||e.textAlign==="right"?X[e.textAlign]:"stretch",he=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ge={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...H("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",A(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ge,style:{...J(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},ce={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:le(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...re(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:he(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",A(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},pe=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...I(e,l),...b(e,72)}),box:[...m,...M(l)],parts:[L(!1),ce,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...O}}),Oe={IntroBleed:ne(),Manifesto:de(),Split:pe()};export{Oe as EDITORIAL_SECTION_TO_BOX};
1
+ import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as X}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as T}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{SECTION_PIN_STOP_KEY as q,SECTION_PIN_STOP_SCREEN as Z}from"../../../../../format/lib/content/section-sticky.js";import{fluidToken as $,token as n}from"./section-head-looks.js";import{labelStyle as J}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as O,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Q,SAME_KEYS as m,SECTION_BOX as y,TEXT as P,fillFrom as _,lineSides as a,pictureCell as H,siteGutterOf as I,smallText as s,wrapperPad as M,wrapperPadKeys as A}from"./section-to-box-row-parts.js";import{parseOption as ee}from"efficient-shell/format";const v=(e,t,o)=>{const f=r(e),k=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...f===void 0?{}:{size:f,...S(w.size,o?.desktop)},...k===void 0?{}:{sizePhone:k,...S(w.sizePhone,o?.phone)}}},te=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,oe={textStyle:"heading-1",sizeToken:{...$("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},ne=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...oe,case:e?"upper":"none"},styleFrom:t=>{const o=T(t);return v(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=T(e);return v(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],N=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ie=()=>({name:"Scroll-Over Text",skip:e=>te(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile),[q]:Z}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:ne,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:N("Button color"),buttonTextColor:N("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},re={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...re,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},ae=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",se=(e,t)=>({[e]:t,[K(e)]:t}),de={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},C=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),le=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,100)}),box:[...m,...A(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...D,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(C(e).length,1),3),...se("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:C,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Q,style:de},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},H("Picture","imageSrc",R)],drop:{...p,grayscale:U,...O}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},he=e=>e.textAlign==="center"||e.textAlign==="right"?X[e.textAlign]:"stretch",ge=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ce={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...H("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",I(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ce,style:{...J(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},pe={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:he(e),placement:ee(["left","center","right"],"left",e.textAlign),...ae(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:ge(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",I(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},ue=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,72)}),box:[...m,...A(l)],parts:[L(!1),pe,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...O}}),He={IntroBleed:ie(),Manifesto:le(),Split:ue()};export{He as EDITORIAL_SECTION_TO_BOX};