efficient-web-builder 59.2.0 → 60.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/storefront-editor.css +21 -7
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -1
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +4 -2
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/card-row-fields.d.ts +3 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/mirror-cards-field.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +23 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +3 -1
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +7 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-card-rule.d.ts +7 -0
- package/dist/format/lib/content/box-card-rule.js +1 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-phone-place.d.ts +4 -4
- package/dist/format/lib/content/box-phone-place.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/box-side-space.d.ts +2 -1
- package/dist/format/lib/content/box-side-space.js +1 -1
- package/dist/format/lib/content/button-icon.d.ts +3 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +9 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/cell-picture-sizes.js +1 -1
- package/dist/format/lib/content/footprint.d.ts +2 -0
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +6 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/hover-media.d.ts +30 -0
- package/dist/format/lib/content/hover-media.js +1 -0
- package/dist/format/lib/content/image-aspect.d.ts +3 -3
- package/dist/format/lib/content/image-aspect.js +1 -1
- package/dist/format/lib/content/ink.d.ts +3 -0
- package/dist/format/lib/content/ink.js +1 -1
- package/dist/format/lib/content/list-position.d.ts +3 -0
- package/dist/format/lib/content/list-position.js +1 -0
- package/dist/format/lib/content/list-query.d.ts +2 -0
- package/dist/format/lib/content/list-query.js +1 -1
- package/dist/format/lib/content/mirror-cards.d.ts +3 -0
- package/dist/format/lib/content/mirror-cards.js +1 -1
- package/dist/format/lib/content/part-display.d.ts +2 -1
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/site-gutter.d.ts +2 -0
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/content/view-hide-class.d.ts +5 -2
- package/dist/format/lib/content/view-hide-class.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +2 -1
- package/dist/format/lib/content/view-lines.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +3 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +7 -0
- package/dist/format/lib/document/card-content-switch.js +1 -1
- package/dist/format/lib/document/panel-only.d.ts +2 -0
- package/dist/format/lib/document/panel-only.js +1 -0
- package/dist/format/lib/document/row-hand.js +1 -1
- package/dist/format/lib/document/section-catalog.d.ts +2 -1
- package/dist/format/lib/document/section-catalog.js +10 -10
- package/dist/format/lib/document/section-descriptions.js +1 -1
- package/dist/format/lib/document/seed-shape.d.ts +2 -0
- package/dist/format/lib/document/seed-shape.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +21 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/fit-words.d.ts +1 -0
- package/dist/format/lib/fit-words.js +9 -8
- package/dist/format/lib/sized-image.js +1 -1
- package/dist/format/lib/source-rules/one-phone-edge.d.ts +13 -0
- package/dist/format/lib/source-rules/one-phone-edge.js +8 -0
- package/dist/format/lib/source-rules/published-mounts.d.ts +22 -0
- package/dist/format/lib/source-rules/published-mounts.js +58 -0
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -2
- package/dist/format/lib/source-rules/support/ts-program.d.ts +4 -0
- package/dist/format/lib/source-rules/support/ts-program.js +2 -0
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +3 -3
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +5 -2
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/Flex.d.ts +2 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroArrows.d.ts +6 -3
- package/dist/render/components/HeroArrows.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HoverMediaLayer.d.ts +9 -0
- package/dist/render/components/HoverMediaLayer.js +1 -0
- package/dist/render/components/InBoxContext.d.ts +3 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/ListSearchBox.d.ts +2 -1
- package/dist/render/components/ListSearchBox.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.d.ts +2 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +4 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SideListLayout.d.ts +14 -0
- package/dist/render/components/SideListLayout.js +1 -0
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +7 -1
- package/dist/render/components/ViewHideRoot.js +1 -1
- package/dist/render/lib/content/block-size.d.ts +4 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/box-cell-bound.js +1 -1
- package/dist/render/lib/content/box-shared-columns.js +1 -1
- package/dist/render/lib/content/box-stack-line.d.ts +1 -0
- package/dist/render/lib/content/box-stack-line.js +1 -1
- package/dist/render/lib/content/view-values.d.ts +2 -0
- package/dist/render/lib/content/view-values.js +1 -1
- package/dist/render/lib/dealer-source.d.ts +3 -2
- package/dist/render/lib/dealer-source.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +3 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/hidden-nodes.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/published-passes.d.ts +13 -0
- package/dist/render/lib/document/published-passes.js +1 -0
- package/dist/render/lib/document/text-parts.d.ts +1 -0
- package/dist/render/lib/document/text-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +4 -0
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as z,jsx as o,jsxs as lo}from"react/jsx-runtime";import{useContext as yt,useId as Ot}from"react";import vt from"./BoxTabs.js";import{AccordionRowStyleContext as Eo,BoxTabPaneContext as Fo,useAccordionRowStyle as Lt,useBoxPaneKind as Nt,useFirstCopyOpens as kt,useIsTabPane as Bt}from"./BoxTabPaneContext.js";import Et,{ACCORDION_COUNTER_RESET as Ft}from"./BoxAccordionRow.js";import{ACCORDION_MARK_SHEET as Tt}from"./AccordionMark.js";import{accordionRowStyleOf as It}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as Dt,boxPhoneOrder as gt}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as ze,InBoxContext as Ye,useCellOfStretchedRow as Ht,useFillsCell as Mt}from"./InBoxContext.js";import Vt,{InsideSiteColumn as qe,useInsideSiteGutter as Gt,useSectionRoot as Wt}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Xt}from"./BoxSurfaceContext.js";import jt from"./PictureWash.js";import{BoxCellContext as Qe,NoCellBound as Kt}from"./BoxCellContext.js";import{boxCellFractions as Ut}from"../lib/content/box-cell-bound.js";import{boundOf as Jt}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as zt}from"./PhoneMenuTools.js";import{useCardRow as Yt}from"./CardRowContext.js";import{cardLineBetween as To,framesItsCards as qt}from"../../format/lib/content/card-place.js";import{rowFieldText as Qt}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as Zt,MirrorContext as on,RowHandContext as Ze,boxPlace as en,useHandedMirrorAbove as sn,useHandedRows as tn,useMirroredCopy as nn,useUnderCardBox as rn}from"./MirrorContext.js";import{boxChildrenHand as ln,isMirroredCopy as cn,mirrorCardsActs as os,mirrorCardsOf as an,mirroredBoxClass as dn,MIRROR_ROW_CLASS as un,ownsCard as mn}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as Io,frameGutterOf as fn}from"./BlockFrame.js";import{boxSideSpaceOf as Cn}from"../../format/lib/content/box-side-space.js";import{containerGapProps as es}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as bn,boxAlignViewClasses as hn,boxBlockSpacingClass as xn,boxBlockSpacingViewClasses as pn,boxJustifyViewClasses as Sn,boxWrapTabletClass as wn,boxFitContentClass as Pn,boxAccordionColumnsClass as ss,boxRowColumnsClass as $n,boxRowTabletColumnsClass as Rn,boxRowTabletShareClass as _n,boxPhoneCellsShareLine as An,boxPhoneRowClasses as Y,boxPhoneRowFits as yn,boxShareClasses as M,boxShareVars as On,boxWrapClass as vn,BOX_GAP_ONLY_CLASS as Ln}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Nn,boxSeparatorSeamClass as kn,boxSeparatorStyle as Bn,isStripBox as En}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Fn,DEFAULT_LOOP_DIRECTION as Tn,DEFAULT_LOOP_SECONDS as In,isVerticalLoop as Dn}from"../../format/lib/animation/index.js";import{LoopTrack as gn}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as _,BOX_OWNS_SIDES_CLASS as Hn,boxDarkenStyle as Mn,boxPaintOf as Vn,boxFillViews as Gn,boxPlacementClasses as Wn,boxSwatchFill as Xn,boxWashViews as jn,CARD_SHADOW_CLASS as Kn,isBackgroundBox as ts}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as Un,boxShadowOnAnyView as Jn,boxShadowViewAttrs as zn}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Yn,drawsSiteGutter as qn}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Qn,boxShapeClasses as Zn}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as or}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as er,BOX_LINK_ATTR as ns,BOX_LINK_CLASS as rs,BOX_LINKED_CLASS as sr,boxJumpBlocksClass as tr,boxJumpCss as nr,boxJumpSlug as rr,boxLinkOf as lr}from"../../format/lib/content/box-link.js";import{SiteLink as ir}from"../lib/site-runtime.js";import{sectionBorderStyle as ls}from"../../format/lib/content/borders.js";import{finiteNumber as A}from"../../format/lib/finite-number.js";import{padDefaultIn as y,sectionPadAttrs as cr}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as io}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as ar}from"../../format/lib/content/ink.js";import{sizedBackground as Do}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as dr,resolveImageTreatment as ur}from"../../format/lib/content/image-treatment.js";import{BOX_HIGHLIGHT_CLASS as mr}from"../../format/lib/animation/hover.js";import{BoxRail as fr,BoxRailStop as Cr,RAIL_STOPS_CLASS as br,useTimelineRail as hr}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as xr,sharedColumnsClasses as pr,sharedColumnsCss as Sr,sharedRowsClasses as wr,sharedRowsCss as Pr}from"../lib/content/box-shared-columns.js";import $r from"./PhotoHoverSheet.js";import{stackGutterClass as Rr,stackLineCss as _r,stackOuterClass as Ar,stackRowClass as yr,storedStackLine as Or}from"../lib/content/box-stack-line.js";const go={"--sf-site-gutter":"0px"},vr={overflowX:"clip",overflowY:"visible"},Lr={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},Nr={desktop:!1,phone:!1},is="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",Ho=u=>u==null||u==="",Mo=u=>!Ho(u)&&Number(u)===0;function kr({children:u}){return o(z,{children:u(Ot())})}function Br({direction:u,label:cs,tabShape:as,gap:Vo,gapPhone:ds,gapTablet:co,justify:V,align:O,wrap:q,share:us,sharePhone:G,shareTablet:E,wrapPhone:ms,orderPhone:fs,phoneRow:x,columns:m,columnsTablet:v,separator:f,stackBelow:Go,blockSpacing:Wo,bgImage:L,bgImagePhone:Xo,pictureHover:Cs,darken:jo,darkenStyle:Ko,darkenTablet:bs,darkenPhone:hs,darkenStyleTablet:xs,darkenStylePhone:ps,placement:Ss,padV2:Uo=!1,border:ws,borderTablet:Ps,borderPhone:$s,pad:n={},contained:ao=!0,fillHeight:N=!1,shadow:uo,shadowTablet:Jo,shadowPhone:zo,justifyTablet:Yo,justifyPhone:Rs,alignTablet:_s,alignPhone:As,wrapTablet:qo,blockSpacingTablet:ys,blockSpacingPhone:Os,loop:b,scrollDirection:mo=Tn,loopSeconds:vs=In,loopDelay:Ls=Fn,editing:F=!1,fillColor:Qo,fillColorTablet:Ns,fillColorPhone:ks,swatch:Bs,line:p,upcoming:Es,link:Fs,rowLink:Zo,highlight:Ts,boxShape:oe,boxShapePhone:Is,boxShapeTablet:Ds,angle:gs,jumpHighlight:Hs,anchor:Ms,sharedSides:i=Nr,sharedRows:Vs=!1,boxId:T,slotCount:Gs,mirrorCards:ee,content:c,rowTitle:fo,startsOpen:Ws,rowStyle:Xs,sideSpace:js}){const t=Yt(),se=yt(Qe),Ks=sn(),te=rn()&&!(Ks&&t!==null),S=tn(),w=mn({inCopy:t!==null,nestedCopy:t?.nested===!0,underBox:te}),ne=To(ws,t,w),re=To(Ps,t,w),le=To($s,t,w),ie=t===null&&!te&&S?.ids&&T?S.ids.indexOf(T):-1,Q=ie>=0&&S&&T?en(S,T,ie):-1,h=Q>=0?S?.hand??null:w&&S?.copies===!0?S.hand:null,e=h?.row?"row":u,d=h?.row?h.row.share:us,Us=h?.row?h.row.phoneReverse?[...c.blockIds??[]].reverse():void 0:fs,Z=Vs&&!h?.row,I=F?"":lr(Zo&&t?Qt(t.row,Zo):Fs),P=N?"":Zn(oe,Is,Ds),Js=!N&&Qn(oe)!=="",k=rr(Hs,Ms),ce=Xn({swatch:Bs},t?.row),oo=ce??Vn(Qo),D=ce?{className:"",style:{}}:Gn(Qo,Ns,ks),ae=oo||D.className?{...oo?{backgroundColor:oo}:{},...D.style}:void 0,de=hr(),eo=p===!0&&e!=="tabs"&&e!=="accordion",r=ts(L),ue=or(gs),me=r?void 0:ae,Co=r?null:Ts??null,zs=ue||Co?{...me,...ue,...Co}:me,so=zt(),Ys=Wt(),qs=Bt(),fe=Nt(),Qs=Lt(),Zs=kt(),l=e==="accordion",Ce=It(Xs),W=l&&Ce==="numbered",bo=Mt(),ot=Ht(),g=En(e,f),a=b==="scroll"&&e!=="tabs"&&!l,et=nn(),to=w||Q>=0&&h!==null,be=h?h.mirror:ee,st=Q>=0?Q:t?.index,ho=w&&qt(t?.ownerType),he=os({direction:e,separator:f,loop:b,line:p,bgImage:L,columns:m,columnsTablet:v,share:d,wrap:q},to,i.desktop)&&cn(be,st),tt=os({direction:e,separator:f,loop:b,line:p,bgImage:L,columns:m,columnsTablet:v,share:d,wrap:q},to,i.desktop)&&an(be)!==null,H=$n({direction:e,separator:f,loop:b,line:p,columns:m}),$=Rn({direction:e,separator:f,loop:b,line:p,columnsTablet:v}),X=_n({direction:e,separator:f,loop:b,line:p,columns:m,columnsTablet:v,share:d,shareTablet:E}),no=Cn(js)==="site",xo=fn(no),C=e==="row"&&!r&&!g&&!a&&!eo&&$===""&&X===""?Or(Go):void 0,nt=Gt(),ro=pr(i,c.blockCount??0,C),rt=(ro&&(!t||t.index===0)?Sr(i,c.blockCount??0,C):"")+(Z&&(!t||t.index===0)?Pr(Z,c.blockCount??0):""),xe=wr(Z,c.blockCount??0),pe=$!==""?Number(v)>=2:X===""||M(E)!=="",po=$!==""||X!=="",lt=po&&!($!==""&&Number(v)<2),Se=e==="row"&&!g&&!a&&p!==!0,So=Se&&!i.phone&&!i.desktop?Dt(gt(Us,c.blockIds??[]),{tabletKeepsRow:lt,editing:F}):void 0,we=So!==void 0&&!F,it=H!==""?Number(m)>=2:M(d)!=="",Pe=!r&&!l&&!tt&&!i.desktop&&!i.phone,wo=Pe&&!a?Sn(V,Yo,Rs):"",$e=r||to?"":dn(et,e,a?void 0:V,O,wo?Yo:void 0),ct=Pe&&e==="row"?hn(O,_s,As):"",at=!a&&!l&&H===""&&$===""&&!i.desktop?wn(q,qo):"",Re=[l?"":M(d),e==="row"?Pn(d):"",H,$,X,xn(l?"gap":Wo),Nn(e,f),l&&!W?"border-t border-line":"",wo,ct,at,l?"":pn(Wo,ys,Os),l?ss(m,x,W):"",W?Ft:""].filter(Boolean).join(" "),dt=Re?` ${Re}`:"",_e=["flex",e==="row"?g||a?"flex-row":`flex-row ${Y(x,G,ms,qo)}`:"flex-col",vn(a||l?!1:q),r?Wn(Ss??"center",e):bn(a||l?void 0:V,l?void 0:O)+($e?` ${$e}`:"")].join(" ")+dt,j=N||r||P||bo?` ${io}`:"",Po=Js?` ${P}`:P?`${j} ${P}`:j,Ae=ot&&e==="column"&&!r&&!a&&M(d)===""&&(typeof V=="string"&&V!=="start"||wo!==""),ye=j||(Ae?` ${io}`:""),$o=I?` ${sr}`:"",Ro=r||so||Uo?"":" py-6",ut=C===void 0?"":` ${yr(C)}`,Oe=C===void 0||no?"":` ${Rr(C)}`,_o=C===void 0?"":` ${Ar(C)}`,mt=`${Io}${Ro} ${xo}${Po}${$o}${Oe}${_o}`,ft=so?`${Po}${$o}${_o}`.trim():`w-full${Ro}${Po}${$o}${_o}`,K=W&&ss(m,x)===""?es("Flex",0,"block"):es("Flex",Vo,e==="row"?"inline":"block",ds,g||a?void 0:co),ve=On(d,E,e==="row"?c.blockCount??0:0),Le=g?{...K.style,...Bn(e,f)}:K.style,Ct=ve?{...Le,...ve}:Le,Ao=(s="")=>o(c,{className:`${_e}${he?` ${un}`:""}${K.className}${ye}${ut}${s?` ${s}`:""}${eo?` ${br}`:""}${k?` ${tr(k)}`:""}${ro}${xe}`,style:Ct,minEmptyHeight:120,...So?{cell:So}:null}),Ne=Dn(mo)?"":kn(e,f),ke=a?o(gn,{direction:mo,seconds:vs,delay:Ls,editing:F,copy:s=>Ao(s&&Ne?`${s} ${Ne}`:s)}):W?lo(z,{children:[o("style",{children:Tt}),Ao()]}):Ao(),yo=e==="tabs"?o(vt,{className:`${_e}${K.className}${bo&&!N&&!r&&!P?"":j}`,style:K.style,shape:as,children:ke}):ke,Oo=l?o(Fo.Provider,{value:"accordion",children:o(Eo.Provider,{value:Ce,children:yo})}):fe?o(Fo.Provider,{value:!1,children:o(Eo.Provider,{value:"plain",children:yo})}):yo,Be=e==="row"&&!r&&(O===void 0||O==="stretch"),bt={stretchedRow:Be,fillingColumn:e==="column"&&(bo||Ae),columnsRow:H!==""||$!==""||ro!==""||xe!==""||e==="row"&&(Array.isArray(d)||Array.isArray(E))||we,...we?{phoneCells:!0}:null,...Be&&Se&&(c.blockCount??0)>=2&&it?{picturesFillRow:!0}:null,...po?{fillFrom:pe?"tablet":"desktop"}:null,...An(x,G)&&(!po||pe)?{phoneRowFills:!0}:null,...T?{id:T}:null},Ee=t===null?ln({direction:e,loop:b,bgImage:L,columns:m,mirrorCards:ee},!1):null,Fe=Ee?o(Ze.Provider,{value:{hand:Ee,ids:c.blockIds??[],boxes:[]},children:Oo}):S?o(Ze.Provider,{value:null,children:Oo}):Oo,Te=o(Ye.Provider,{value:bt,children:o(ze.Provider,{value:!1,children:to?o(on.Provider,{value:he,children:o(Zt.Provider,{value:!w,children:Fe})}):Fe})}),ht=fo?.blockCount??0,Ie=fe==="accordion"&&!!fo&&(F||ht>0)?o(Et,{startsOpen:Ws===!0||Zs&&w&&t?.index===0,editing:F,numbered:Qs==="numbered",title:o(Ye.Provider,{value:Lr,children:o(ze.Provider,{value:!1,children:o(Fo.Provider,{value:!1,children:o(Eo.Provider,{value:"plain",children:o(fo,{className:`min-w-0 flex-1 ${Ln}`,minEmptyHeight:24})})})})}),children:Te}):Te,vo=eo?o(fr,{row:e==="row",stops:c.blockCount??0,children:Ie}):Ie,xt=cs?.trim()||(qs?"":void 0),pt={values:n,frame:Ro?24:0},St=s=>de?o(Cr,{on:de,future:Es===!0,children:s}):s,wt=s=>I.startsWith("/")?o(ir,{href:I,className:rs,"aria-labelledby":s,[ns]:""}):o("a",{href:I,className:rs,"aria-labelledby":s,[ns]:""}),De=(k?nr(k):"")+rt+(C===void 0||t&&t.index!==0?"":_r(C,{gutter:!no})),ge=De?o("style",{dangerouslySetInnerHTML:{__html:De}}):null,U=Yn({loop:b,direction:e,scrollDirection:mo,bgImage:L}),Pt=i.desktop&&ro!==""&&!oo&&!D.className&&!ls(ne,le,re)&&!Jn(uo,Jo,zo)&&!I&&!P&&!N&&!k&&!qn(ao&&!U,nt)&&Mo(Vo)&&(Ho(co)||Mo(co))&&Uo&&Object.values(n).every(s=>Ho(s)||Mo(s)),$t=s=>({...Pt?{[xr]:""}:null,...r?null:{...Un(uo),...zn(uo,Jo,zo)},...k?{[er]:k}:null,...s?{id:s}:null}),He=H!==""?Number(m):0,Rt=Y(x,G)===Y(void 0),_t=(e==="column"||e==="row"&&!g&&!a&&(He===1&&Rt||He===0&&c.blockCount===1))&&!r&&!eo&&!so,Me=r&&Ys&&!so,Ve=(s,R)=>St(o(Vt,{contained:ao&&!U,style:U?go:void 0,framedClass:mt,fillClass:ft,columnClass:`${Io} ${xo}${ye}${Oe}`,tabLabel:xt,pad:r?void 0:pt,border:ls(ne,le,re),outerAttrs:$t(R),box:!0,edge:_t,outerStyle:zs,outerClass:r?void 0:[D.className,Co?mr:""].filter(Boolean).join(" ")||void 0,bleed:Me,siteSide:no,children:ge||R?lo(z,{children:[ge,R?wt(R):null,U?o(qe,{children:s}):s]}):U?o(qe,{children:s}):s})),Lo=s=>I?o(kr,{children:R=>Ve(s,R)}):Ve(s),Ge=s=>se.bound?o(Kt,{children:s}):s;if(!r){const s=O===void 0||O==="stretch",R=(M(d)!==""||H!==""||$!=="")&&!yn(x,G)&&!(X!==""&&M(E)==="")&&(s||Y(x)!==Y(void 0));if(!(e==="row"?R:e==="column"&&s))return Lo(Ge(vo));const Je=Ut({direction:e,separator:f,loop:b,line:p,share:d,shareTablet:E,sharePhone:G,phoneRow:x,columns:m,columnsTablet:v,stackBelow:Go,shared:i.desktop||i.phone||Z,count:Gs}),At={hasWidth:!0,...Je?{bound:Jt(Je,se.bound)}:null};return Lo(o(Qe.Provider,{value:At,children:vo}))}const J=Mn(jo,Ko),No=jn({darken:jo,darkenStyle:Ko,darkenTablet:bs,darkenStyleTablet:xs,darkenPhone:hs,darkenStylePhone:ps}),We=[ho?"rounded-[inherit]":"",No.className].filter(Boolean).join(" "),ko=ts(Xo),Xe=ko?{"--sf-box-bg":Do(L??""),"--sf-box-bg-p":Do(Xo??"")}:{backgroundImage:Do(L??""),backgroundSize:"cover",backgroundPosition:"center"},je=ur(void 0,void 0,Cs),B=je.className?je:null,Bo=cr({...n,top:A(n.top)??y(_.desktop,n.unit,"desktop"),bottom:A(n.bottom)??y(_.desktop,n.unit,"desktop"),topPhone:A(n.topPhone)??y(_.phone,n.unitPhone,"mobile"),bottomPhone:A(n.bottomPhone)??y(_.phone,n.unitPhone,"mobile"),left:A(n.left)??y(_.side,n.unit,"desktop"),right:A(n.right)??y(_.side,n.unit,"desktop"),leftPhone:A(n.leftPhone)??y(_.sidePhone,n.unitPhone,"mobile"),rightPhone:A(n.rightPhone)??y(_.sidePhone,n.unitPhone,"mobile")}),Ke=o("div",{className:`relative z-[1] ${Hn} ${Bo?.className??""}${N||P?` ${io}`:""}`.trimEnd(),style:J?{...Bo?.style,...go,...ar}:{...Bo?.style,...go},children:Ge(vo)}),Ue=Me&&ao?o("div",{className:`${Io} ${xo}${N||P?` ${io}`:""}`,children:Ke}):Ke;return Lo(o(z,{children:lo("div",{className:`relative isolate overflow-hidden ${Kn}${j}${ko&&!B?` ${is}`:""}${D.className?` ${D.className}`:""}`,style:{...ho?vr:{},...ae,...B?{}:Xe},...B?{[dr]:""}:{},children:[B&&lo(z,{children:[o($r,{sheet:B.sheet}),o("div",{"aria-hidden":!0,className:`absolute inset-0${ho?" rounded-[inherit]":""}${ko?` ${is}`:""} ${B.className}`,style:{...Xe,...B.style??{}}})]}),o(jt,{wash:J&&No.className?{...J,...No.style}:J,...We?{className:We}:{}}),J?o(Xt,{children:Ue}):Ue]})}))}export{Br as default};
|
|
1
|
+
import{Fragment as q,jsx as e,jsxs as de}from"react/jsx-runtime";import{useContext as Ht,useId as Vt}from"react";import Gt from"./BoxTabs.js";import{AccordionRowStyleContext as Fe,BoxTabPaneContext as Te,useAccordionRowStyle as Mt,useBoxPaneKind as Wt,useFirstCopyOpens as Xt,useIsTabPane as jt}from"./BoxTabPaneContext.js";import Kt,{ACCORDION_COUNTER_RESET as Ut}from"./BoxAccordionRow.js";import{ACCORDION_MARK_SHEET as Jt}from"./AccordionMark.js";import{accordionRowStyleOf as zt}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as Yt,boxPhoneOrder as qt}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as os,InBoxContext as ss,useCellOfStretchedRow as Qt,useFillsCell as Zt}from"./InBoxContext.js";import er,{InsideSiteColumn as ts,useInsideSiteGutter as or,useSectionRoot as sr}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as tr}from"./BoxSurfaceContext.js";import rr from"./PictureWash.js";import{BoxCellContext as rs,NoCellBound as nr}from"./BoxCellContext.js";import{boxCellFractions as lr}from"../lib/content/box-cell-bound.js";import{boundOf as ir}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as cr}from"./PhoneMenuTools.js";import{useCardRow as ar}from"./CardRowContext.js";import{cardLineBetween as De,framesItsCards as dr}from"../../format/lib/content/card-place.js";import{rowFieldText as ur}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as mr,MirrorContext as fr,RowHandContext as ns,boxPlace as Cr,useHandedMirrorAbove as br,useHandedRows as hr,useMirroredCopy as Sr,useUnderCardBox as wr}from"./MirrorContext.js";import{boxChildrenHand as xr,isMirroredCopy as pr,mirrorCardsActs as ls,mirrorCardsOf as Pr,mirroredBoxClass as _r,MIRROR_ROW_CLASS as $r,ownsCard as Rr}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as He,frameGutterOf as Or}from"./BlockFrame.js";import{BOX_SIDE_SPACE_SITE as yr,boxSideSpaceOf as Ar}from"../../format/lib/content/box-side-space.js";import{containerGapProps as is}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as vr,boxAlignViewClasses as Lr,boxBlockSpacingClass as kr,boxBlockSpacingViewClasses as Nr,boxJustifyViewClasses as Ir,boxWrapTabletClass as gr,boxFitContentClass as Br,boxAccordionColumnsClass as cs,boxRowColumnsClass as Er,boxRowTabletColumnsClass as Fr,boxRowTabletShareClass as Tr,boxPhoneCellsShareLine as Dr,boxPhoneRowClasses as Q,boxPhoneRowFits as Hr,boxShareClasses as M,boxShareVars as Vr,boxWrapClass as Gr,BOX_GAP_ONLY_CLASS as Mr}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Wr,boxSeparatorSeamClass as Xr,boxSeparatorStyle as jr,isStripBox as Kr}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Ur,DEFAULT_LOOP_DIRECTION as Jr,DEFAULT_LOOP_SECONDS as zr,isVerticalLoop as Yr}from"../../format/lib/animation/index.js";import{LoopTrack as qr}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as O,BOX_OWNS_SIDES_CLASS as Qr,boxDarkenStyle as Zr,boxPaintOf as en,boxFillViews as on,boxPlacementClasses as sn,boxCardProps as tn,boxIsCard as as,boxRowPicture as rn,boxSwatchFill as nn,boxWashViews as ln,CARD_SHADOW_CLASS as cn,isBackgroundBox as ds}from"../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as S}from"../../format/lib/content/box-card-rule.js";import{boxShadowAttrs as an,boxShadowOnAnyView as dn,boxShadowViewAttrs as un}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as mn,drawsSiteGutter as fn}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Cn,boxShapeClasses as bn}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as hn}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as Sn,BOX_LINK_ATTR as us,BOX_LINK_CLASS as ms,BOX_LINKED_CLASS as wn,boxJumpBlocksClass as xn,boxJumpCss as pn,boxJumpSlug as Pn,boxLinkOf as _n}from"../../format/lib/content/box-link.js";import{SiteLink as $n}from"../lib/site-runtime.js";import{sectionBorderStyle as fs}from"../../format/lib/content/borders.js";import{finiteNumber as y}from"../../format/lib/finite-number.js";import{padDefaultIn as A,sectionPadAttrs as Rn}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as ue}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as On,rowFillInkStyle as yn}from"../../format/lib/content/ink.js";import{sizedBackground as Ve}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as An,resolveImageTreatment as vn}from"../../format/lib/content/image-treatment.js";import{BOX_HIGHLIGHT_CLASS as Ln,BOX_HIGHLIGHT_OVER_ROW_INK_CLASS as kn}from"../../format/lib/animation/hover.js";import{BoxRail as Nn,BoxRailStop as In,RAIL_STOPS_CLASS as gn,useTimelineRail as Bn}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as En,sharedColumnsClasses as Fn,sharedColumnsCss as Tn,sharedRowsClasses as Dn,sharedRowsCss as Hn}from"../lib/content/box-shared-columns.js";import Vn from"./PhotoHoverSheet.js";import{stackGutterClass as Gn,stackLineCss as Mn,stackOuterClass as Wn,stackRowClass as Xn,storedStackLine as jn}from"../lib/content/box-stack-line.js";const Ge={"--sf-site-gutter":"0px"},Kn={overflowX:"clip",overflowY:"visible"},Un={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},Cs={desktop:!1,phone:!1},bs="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-wide:bg-[image:var(--sf-box-bg-p)]",Me=u=>u==null||u==="",We=u=>!Me(u)&&Number(u)===0;function Jn({children:u}){return e(q,{children:u(Vt())})}function zn({direction:u,label:hs,tabShape:Ss,gap:Xe,gapPhone:ws,gapTablet:me,justify:W,align:v,wrap:Z,share:xs,sharePhone:X,shareTablet:B,wrapPhone:ps,orderPhone:Ps,phoneRow:w,columns:m,columnsTablet:E,separator:f,stackBelow:je,blockSpacing:Ke,bgImage:_s,bgImagePhone:$s,rowImage:Rs,pictureHover:Os,darken:Ue,darkenStyle:Je,darkenTablet:ys,darkenPhone:As,darkenStyleTablet:vs,darkenStylePhone:Ls,placement:ks,padV2:ze=!1,border:Ns,borderTablet:Is,borderPhone:gs,pad:r={},contained:fe=!0,fillHeight:L=!1,shadow:Ce,shadowTablet:Ye,shadowPhone:qe,justifyTablet:Qe,justifyPhone:Bs,alignTablet:Es,alignPhone:Fs,wrapTablet:Ze,blockSpacingTablet:Ts,blockSpacingPhone:Ds,loop:b,scrollDirection:be=Jr,loopSeconds:Hs=zr,loopDelay:Vs=Ur,editing:F=!1,fillColor:eo,fillColorTablet:Gs,fillColorPhone:Ms,swatch:Ws,line:x,upcoming:Xs,link:js,rowLink:oo,highlight:Ks,boxShape:so,boxShapePhone:Us,boxShapeTablet:Js,angle:zs,jumpHighlight:Ys,anchor:qs,sharedSides:Qs=Cs,sharedRows:Zs=!1,boxId:T,slotCount:et,mirrorCards:to,content:i,rowTitle:he,startsOpen:ot,rowStyle:st,sideSpace:tt}){const t=ar(),k=tn({[S]:Rs},t!==null)[S],ro=as({[S]:k}),c=ro?Cs:Qs,rt=ro?!1:Zs,no=rn({[S]:k},t?.row),p=no??_s,lo=no===null?$s:void 0,io=Ht(rs),nt=br(),co=wr()&&!(nt&&t!==null),P=hr(),_=Rr({inCopy:t!==null,nestedCopy:t?.nested===!0,underBox:co}),ao=De(Ns,t,_),uo=De(Is,t,_),mo=De(gs,t,_),fo=t===null&&!co&&P?.ids&&T?P.ids.indexOf(T):-1,ee=fo>=0&&P&&T?Cr(P,T,fo):-1,h=ee>=0?P?.hand??null:_&&P?.copies===!0?P.hand:null,o=h?.row?"row":u,d=h?.row?h.row.share:xs,lt=h?.row?h.row.phoneReverse?[...i.blockIds??[]].reverse():void 0:Ps,oe=rt&&!h?.row,D=F?"":_n(oo&&t?ur(t.row,oo):js),$=L?"":bn(so,Us,Js),it=!L&&Cn(so)!=="",N=Pn(Ys,qs),Se=nn({swatch:Ws},t?.row),se=Se??en(eo),H=Se?{className:"",style:{}}:on(eo,Gs,Ms),Co=yn(Se),bo=se||H.className?{...se?{backgroundColor:se}:{},...H.style,...Co}:void 0,ho=Bn(),te=x===!0&&o!=="tabs"&&o!=="accordion",n=as({bgImage:p,[S]:k}),So=hn(zs),wo=n?void 0:bo,re=n?null:Ks??null,ct=So||re?{...wo,...So,...re}:wo,ne=cr(),at=sr(),dt=jt(),xo=Wt(),ut=Mt(),mt=Xt(),l=o==="accordion",po=zt(st),j=l&&po==="numbered",we=Zt(),ft=Qt(),V=Kr(o,f),a=b==="scroll"&&o!=="tabs"&&!l,Ct=Sr(),le=_||ee>=0&&h!==null,Po=h?h.mirror:to,bt=ee>=0?ee:t?.index,xe=_&&dr(t?.ownerType),_o=ls({direction:o,separator:f,loop:b,line:x,bgImage:p,[S]:k,columns:m,columnsTablet:E,share:d,wrap:Z},le,c.desktop)&&pr(Po,bt),ht=ls({direction:o,separator:f,loop:b,line:x,bgImage:p,[S]:k,columns:m,columnsTablet:E,share:d,wrap:Z},le,c.desktop)&&Pr(Po)!==null,G=Er({direction:o,separator:f,loop:b,line:x,columns:m}),I=Fr({direction:o,separator:f,loop:b,line:x,columnsTablet:E}),K=Tr({direction:o,separator:f,loop:b,line:x,columns:m,columnsTablet:E,share:d,shareTablet:B}),ie=Ar(tt)===yr,pe=Or(ie),C=o==="row"&&!n&&!V&&!a&&!te&&I===""&&K===""?jn(je):void 0,St=or(),ce=Fn(c,i.blockCount??0,C),wt=(ce&&(!t||t.index===0)?Tn(c,i.blockCount??0,C):"")+(oe&&(!t||t.index===0)?Hn(oe,i.blockCount??0):""),$o=Dn(oe,i.blockCount??0),Ro=I!==""?Number(E)>=2:K===""||M(B)!=="",Oo=I!==""||K!=="",yo=o==="row"&&!V&&!a&&x!==!0,Pe=yo&&!c.phone&&!c.desktop?Yt(qt(lt,i.blockIds??[]),{editing:F}):void 0,Ao=Pe!==void 0&&!F,xt=G!==""?Number(m)>=2:M(d)!=="",vo=!n&&!l&&!ht&&!c.desktop&&!c.phone,ae=vo&&!a?Ir(W,Qe,Bs):"",_e=n||le?"":_r(Ct,o,a?void 0:W,v,ae?Qe:void 0),pt=/view-wide:max-view-desktop:justify-/.test(_e)?ae.split(" ").filter(s=>!s.startsWith("view-wide:max-view-desktop:justify-")).join(" "):ae,Pt=vo&&o==="row"?Lr(v,Es,Fs):"",_t=!a&&!l&&G===""&&I===""&&!c.desktop?gr(Z,Ze):"",Lo=[l?"":M(d),o==="row"?Br(d):"",G,I,K,kr(l?"gap":Ke),Wr(o,f),l&&!j?"border-t border-line":"",pt,Pt,_t,l?"":Nr(Ke,Ts,Ds),l?cs(m,w,j):"",j?Ut:""].filter(Boolean).join(" "),$t=Lo?` ${Lo}`:"",ko=["flex",o==="row"?V||a?"flex-row":`flex-row ${Q(w,X,ps,Ze)}`:"flex-col",Gr(a||l?!1:Z),n?sn(ks??"center",o):vr(a||l?void 0:W,l?void 0:v)+(_e?` ${_e}`:"")].join(" ")+$t,U=L||n||$||we?` ${ue}`:"",$e=it?` ${$}`:$?`${U} ${$}`:U,No=ft&&o==="column"&&!n&&!a&&M(d)===""&&(typeof W=="string"&&W!=="start"||ae!==""),Io=U||(No?` ${ue}`:""),Re=D?` ${wn}`:"",Oe=n||ne||ze?"":" py-6",Rt=C===void 0?"":` ${Xn(C)}`,go=C===void 0||ie?"":` ${Gn(C)}`,ye=C===void 0?"":` ${Wn(C)}`,Ot=`${He}${Oe} ${pe}${$e}${Re}${go}${ye}`,yt=ne?`${$e}${Re}${ye}`.trim():`w-full${Oe}${$e}${Re}${ye}`,J=j&&cs(m,w)===""?is("Flex",0,"block"):is("Flex",Xe,o==="row"?"inline":"block",ws,V||a?void 0:me),Bo=Vr(d,B,o==="row"?i.blockCount??0:0),Eo=V?{...J.style,...jr(o,f)}:J.style,At=Bo?{...Eo,...Bo}:Eo,Ae=(s="")=>e(i,{className:`${ko}${_o?` ${$r}`:""}${J.className}${Io}${Rt}${s?` ${s}`:""}${te?` ${gn}`:""}${N?` ${xn(N)}`:""}${ce}${$o}`,style:At,minEmptyHeight:120,...Pe?{cell:Pe}:null}),Fo=Yr(be)?"":Xr(o,f),To=a?e(qr,{direction:be,seconds:Hs,delay:Vs,editing:F,copy:s=>Ae(s&&Fo?`${s} ${Fo}`:s)}):j?de(q,{children:[e("style",{children:Jt}),Ae()]}):Ae(),ve=o==="tabs"?e(Gt,{className:`${ko}${J.className}${we&&!L&&!n&&!$?"":U}`,style:J.style,shape:Ss,children:To}):To,Le=l?e(Te.Provider,{value:"accordion",children:e(Fe.Provider,{value:po,children:ve})}):xo?e(Te.Provider,{value:!1,children:e(Fe.Provider,{value:"plain",children:ve})}):ve,Do=o==="row"&&!n&&(v===void 0||v==="stretch"),vt={stretchedRow:Do,fillingColumn:o==="column"&&(we||No),columnsRow:G!==""||I!==""||ce!==""||$o!==""||o==="row"&&(Array.isArray(d)||Array.isArray(B))||Ao,...Ao?{phoneCells:!0}:null,...Do&&yo&&(i.blockCount??0)>=2&&xt?{picturesFillRow:!0}:null,...Oo&&!Ro?{fillFrom:"desktop"}:null,...Dr(w,X)&&(!Oo||Ro)?{phoneRowFills:!0}:null,...T?{id:T}:null},Ho=t===null?xr({direction:o,loop:b,bgImage:p,[S]:k,columns:m,mirrorCards:to},!1):null,Vo=Ho?e(ns.Provider,{value:{hand:Ho,ids:i.blockIds??[],boxes:[]},children:Le}):P?e(ns.Provider,{value:null,children:Le}):Le,Go=e(ss.Provider,{value:vt,children:e(os.Provider,{value:!1,children:le?e(fr.Provider,{value:_o,children:e(mr.Provider,{value:!_,children:Vo})}):Vo})}),Lt=he?.blockCount??0,Mo=xo==="accordion"&&!!he&&(F||Lt>0)?e(Kt,{startsOpen:ot===!0||mt&&_&&t?.index===0,editing:F,numbered:ut==="numbered",title:e(ss.Provider,{value:Un,children:e(os.Provider,{value:!1,children:e(Te.Provider,{value:!1,children:e(Fe.Provider,{value:"plain",children:e(he,{className:`min-w-0 flex-1 ${Mr}`,minEmptyHeight:24})})})})}),children:Go}):Go,ke=te?e(Nn,{row:o==="row",stops:i.blockCount??0,children:Mo}):Mo,kt=hs?.trim()||(dt?"":void 0),Nt={values:r,frame:Oe?24:0},It=s=>ho?e(In,{on:ho,future:Xs===!0,children:s}):s,gt=s=>D.startsWith("/")?e($n,{href:D,className:ms,"aria-labelledby":s,[us]:""}):e("a",{href:D,className:ms,"aria-labelledby":s,[us]:""}),Wo=(N?pn(N):"")+wt+(C===void 0||t&&t.index!==0?"":Mn(C,{gutter:!ie})),Xo=Wo?e("style",{dangerouslySetInnerHTML:{__html:Wo}}):null,z=mn({loop:b,direction:o,scrollDirection:be,bgImage:p,[S]:k}),Bt=c.desktop&&ce!==""&&!se&&!H.className&&!fs(ao,mo,uo)&&!dn(Ce,Ye,qe)&&!D&&!$&&!L&&!N&&!fn(fe&&!z,St)&&We(Xe)&&(Me(me)||We(me))&&ze&&Object.values(r).every(s=>Me(s)||We(s)),Et=s=>({...Bt?{[En]:""}:null,...n?null:{...an(Ce),...un(Ce,Ye,qe)},...N?{[Sn]:N}:null,...s?{id:s}:null}),jo=G!==""?Number(m):0,Ft=Q(w,X)===Q(void 0),Tt=(o==="column"||o==="row"&&!V&&!a&&(jo===1&&Ft||jo===0&&i.blockCount===1))&&!n&&!te&&!ne,Ko=n&&at&&!ne,Uo=(s,R)=>It(e(er,{contained:fe&&!z,style:z?Ge:void 0,framedClass:Ot,fillClass:yt,columnClass:`${He} ${pe}${Io}${go}`,tabLabel:kt,pad:n?void 0:Nt,border:fs(ao,mo,uo),outerAttrs:Et(R),box:!0,edge:Tt,outerStyle:ct,outerClass:n?void 0:[H.className,re?Ln:"",re&&Co?kn:""].filter(Boolean).join(" ")||void 0,bleed:Ko,siteSide:ie,children:Xo||R?de(q,{children:[Xo,R?gt(R):null,z?e(ts,{children:s}):s]}):z?e(ts,{children:s}):s})),Ne=s=>D?e(Jn,{children:R=>Uo(s,R)}):Uo(s),Jo=s=>io.bound?e(nr,{children:s}):s;if(!n){const s=v===void 0||v==="stretch",R=(M(d)!==""||G!==""||I!=="")&&!Hr(w,X)&&!(K!==""&&M(B)==="")&&(s||Q(w)!==Q(void 0));if(!(o==="row"?R:o==="column"&&s))return Ne(Jo(ke));const es=lr({direction:o,separator:f,loop:b,line:x,share:d,shareTablet:B,sharePhone:X,phoneRow:w,columns:m,columnsTablet:E,stackBelow:je,shared:c.desktop||c.phone||oe,count:et}),Dt={hasWidth:!0,...es?{bound:ir(es,io.bound)}:null};return Ne(e(rs.Provider,{value:Dt,children:ke}))}const Ie=ds(p),Y=Ie?Zr(Ue,Je):null,ge=Ie?ln({darken:Ue,darkenStyle:Je,darkenTablet:ys,darkenStyleTablet:vs,darkenPhone:As,darkenStylePhone:Ls}):{className:"",style:{}},zo=[xe?"rounded-[inherit]":"",ge.className].filter(Boolean).join(" "),Be=ds(lo),Yo=Ie?Be?{"--sf-box-bg":Ve(p??""),"--sf-box-bg-p":Ve(lo??"")}:{backgroundImage:Ve(p??""),backgroundSize:"cover",backgroundPosition:"center"}:{},qo=vn(void 0,void 0,Os),g=qo.className?qo:null,Ee=Rn({...r,top:y(r.top)??A(O.desktop,r.unit,"desktop"),bottom:y(r.bottom)??A(O.desktop,r.unit,"desktop"),topPhone:y(r.topPhone)??A(O.phone,r.unitPhone,"mobile"),bottomPhone:y(r.bottomPhone)??A(O.phone,r.unitPhone,"mobile"),left:y(r.left)??A(O.side,r.unit,"desktop"),right:y(r.right)??A(O.side,r.unit,"desktop"),leftPhone:y(r.leftPhone)??A(O.sidePhone,r.unitPhone,"mobile"),rightPhone:y(r.rightPhone)??A(O.sidePhone,r.unitPhone,"mobile")}),Qo=e("div",{className:`relative z-[1] ${Qr} ${Ee?.className??""}${L||$?` ${ue}`:""}`.trimEnd(),style:Y?{...Ee?.style,...Ge,...On}:{...Ee?.style,...Ge},children:Jo(ke)}),Zo=Ko&&fe?e("div",{className:`${He} ${pe}${L||$?` ${ue}`:""}`,children:Qo}):Qo;return Ne(e(q,{children:de("div",{className:`relative isolate overflow-hidden ${cn}${U}${Be&&!g?` ${bs}`:""}${H.className?` ${H.className}`:""}`,style:{...xe?Kn:{},...bo,...g?{}:Yo},...g?{[An]:""}:{},children:[g&&de(q,{children:[e(Vn,{sheet:g.sheet}),e("div",{"aria-hidden":!0,className:`absolute inset-0${xe?" rounded-[inherit]":""}${Be?` ${bs}`:""} ${g.className}`,style:{...Yo,...g.style??{}}})]}),e(rr,{wash:Y&&ge.className?{...Y,...ge.style}:Y,...zo?{className:zo}:{}}),Y?e(tr,{children:Zo}):Zo]})}))}export{zn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as p}from"react/jsx-runtime";import{HideTaker as P}from"./ViewHideRoot.js";import{useEffect as E,useMemo as D,useState as j}from"react";import{CardTemplateRows as F}from"./CardRowContext.js";import{footprintCardRow as I,footprintPins as q,footprintSearchText as Q}from"../../format/lib/content/footprint.js";import{LIST_KEY_ATTR as W,LIST_ROW_ATTR as X,LIST_TEXT_ATTR as Y}from"../../format/lib/content/list-query.js";import{parseListPosition as Z}from"../../format/lib/content/list-position.js";import{bucketByGroup as J,groupColsClass as U}from"../../format/lib/locations-grid.js";import V from"./EditorialSectionHead.js";import{LocationGroupHeader as ee}from"./LocationGroupHeader.js";import{renderGold as te,renderHeadline as le}from"./goldPhrases.js";import re from"./PartStyledText.js";import{say as G}from"../../format/lib/editor-words.js";import{parseFootprintSource as ne}from"../lib/dealer-source.js";import ae from"./DealerFinder.js";import ie from"./ListSearchBox.js";import oe,{SIDE_MAP_CLASS as se}from"./SideListLayout.js";import ce from"./SiteMap.js";import{InsideSiteColumn as H}from"./SiteGutterFrame.js";const n={bodySmall:"text-[length:var(--size-body,10px)]",bodyLarge:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"};function me({sectionNumber:d="",heading:c="",tagline:h="",offices:r=[],mapTheme:x="auto",padTop:y,padBottom:v,editing:i,omitHead:L=!1,source:$,search:o=!1,searchHint:f="",noMatchText:a="",listPosition:w="below",showDistance:u=!0,template:A,ownerId:S=""}){const k=ne($)==="dealers",N=Z(w),z=typeof y=="number"?y:120,B=typeof v=="number"?v:120,[g,b]=j(null),K=r.length===0&&!k&&!d&&!c&&!h;if(E(()=>{b(e=>e!==null&&e>=r.length?null:e)},[r]),K&&!i)return null;const C=J(r,e=>String(e.group??""),()=>""),O=(e,l)=>{const s=g===l,m=e.href&&e.linkLabel?{href:e.href,label:e.linkLabel}:null,T=p("button",{type:"button",onClick:()=>b(l),"aria-pressed":s,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",s?"outline-accent":"outline-transparent hover:outline-line",m?"w-full pb-11":""].filter(Boolean).join(" "),children:[p("span",{className:`flex items-center gap-2.5 font-mono ${n.labelSmall} uppercase tracking-[0.28em]`,children:[e.hq&&t("span",{className:`border border-accent bg-accent px-1.5 py-0.5 ${n.bodySmall} text-bg`,children:"HQ"}),e.role&&t("span",{className:"text-accent",children:e.role})]}),e.city&&t("span",{className:`font-display ${n.bodyLarge} font-medium leading-[1.2] tracking-[-0.01em] text-fg`,children:t(re,{value:e.city,children:e.city})}),e.country&&t("span",{className:`font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.country}),e.address&&t("span",{className:`font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:te(e.address)})]},m?void 0:l);return m?p("div",{className:"relative flex",children:[T,t("a",{href:m.href,className:`absolute bottom-5 left-6 font-mono ${n.labelSmall} uppercase tracking-[0.24em] text-accent hover:underline`,children:`→ ${m.label}`})]},l):T},_=C.flatMap(e=>e.items),M=e=>t("div",{className:"mt-12 flex flex-col gap-8",children:C.map((l,s)=>p("div",{children:[l.key&&t(ee,{groupKey:l.key,count:l.items.length}),t("div",{className:["grid gap-[2px] bg-bg",U(l.items.length),l.items.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":l.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:e(l)})]},l.key?`g:${l.key}`:`ungrouped:${s}`))});return t(P,{as:"section",className:"relative z-[2] bg-bg",children:p("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:z,paddingBottom:B},children:[!L&&(d||c||h)&&t(V,{num:d,title:c?le(c):void 0,desc:h||void 0,spaceBelow:"mb-12"}),k?t(ae,{mapLabel:c.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,search:o,searchHint:f,noMatchText:a,listPosition:w,showDistance:u,editing:i}):N!=="below"?t(oe,{position:N,attrs:{"data-footprint-list":N},head:o?t("div",{className:"mb-4",children:t(ie,{hint:f,noMatchText:a,listKey:`${S}:offices`,editing:i})}):null,listAttrs:o?{[W]:`${S}:offices`}:void 0,list:t(H,{children:t(F,{ownerId:S,ownerType:"Footprint",Template:A,rows:r.map(I),states:r.map((e,l)=>g===l?{selected:!0}:void 0),actions:r.map((e,l)=>({press:()=>b(l)})),copyAttrs:e=>({[X]:"",[Y]:Q(r[e.index])}),fallback:null,children:e=>e})}),map:t(R,{offices:r,mapLabel:c.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,activeIndex:g,onSelect:b,editing:i,frame:`sf-card relative w-full overflow-hidden border border-line ${se}`})}):t(R,{offices:r,mapLabel:c.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,activeIndex:g,onSelect:b,editing:i}),!k&&N==="below"&&r.length>0&&t(F,{ownerId:S,ownerType:"Footprint",Template:A,rows:_.map(({item:e})=>I(e)),states:_.map(({index:e})=>g===e?{selected:!0}:void 0),actions:_.map(({index:e})=>({press:()=>b(e)})),fallback:M(e=>e.items.map(({item:l,index:s})=>O(l,s))),children:e=>{const l=e;let s=0;return t(H,{children:M(m=>{const T=l.slice(s,s+m.items.length);return s+=m.items.length,T})})}}),!k&&r.length===0&&i&&t("p",{className:`mt-8 font-mono ${n.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:G("Add an office in the inspector")})]})})}function R({offices:d,mapLabel:c,mapTheme:h,activeIndex:r,onSelect:x,editing:y,frame:v}){const i=D(()=>q(d),[d]),[L,$]=j(null),o=r===null?null:String(r),f=o!==null&&i.some(u=>u.key===o);if(E(()=>{o!==null&&f&&$(u=>({key:o,n:(u?.n??0)+1}))},[o,f]),i.length===0)return y?t("div",{className:"relative flex aspect-[16/9] w-full items-center justify-center overflow-hidden border border-line bg-bg px-6 text-center max-view-tablet:aspect-[4/5]",children:t("span",{className:`font-mono ${n.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:G("Add office coordinates to plot the map")})}):null;const a=f&&r!==null?d[r]:null,w=a?p("div",{className:"flex items-start gap-3 border border-line bg-bg px-3.5 py-2.5 text-fg shadow-[0_8px_24px_rgba(0,0,0,.4)]",children:[p("div",{className:"min-w-0 flex-1",children:[p("div",{className:`flex items-center gap-2 font-mono ${n.labelSmall} uppercase tracking-[0.28em]`,children:[a.hq&&t("span",{className:`bg-accent px-1.5 py-px ${n.bodySmall} text-bg`,children:"HQ"}),a.role&&t("span",{className:"text-accent",children:a.role})]}),a.city&&t("div",{className:`mt-1.5 font-display ${n.bodyLarge} font-medium leading-[1.2] text-fg`,children:a.city}),a.country&&t("div",{className:`mt-1 font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:a.country})]}),t("button",{type:"button",onClick:()=>x(null),"aria-label":"Close",className:"-mr-1 grid h-6 w-6 shrink-0 place-items-center text-fg-dim hover:text-fg",children:t("svg",{"aria-hidden":!0,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:t("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}):null;return t(ce,{pins:i,mapTheme:h,ariaLabel:c||"Offices",className:v??"sf-card relative aspect-[16/9] w-full overflow-hidden border border-line max-view-tablet:aspect-[4/5]",selectedKey:f?o:null,focus:L,onSelect:u=>x(Number(u)),card:w})}export{me as default};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { Ref } from "react";
|
|
2
|
-
import { type HeroArrowShape } from "../../format/lib/hero-arrows.js";
|
|
1
|
+
import type { MouseEvent, Ref } from "react";
|
|
2
|
+
import { type HeroArrowDirection, type HeroArrowShape } from "../../format/lib/hero-arrows.js";
|
|
3
3
|
export interface HeroArrowsProps {
|
|
4
4
|
shape?: HeroArrowShape | string;
|
|
5
5
|
placement?: string;
|
|
6
6
|
ref?: Ref<HTMLDivElement>;
|
|
7
|
+
labels?: Readonly<Record<HeroArrowDirection, string>>;
|
|
8
|
+
onPress?: (direction: HeroArrowDirection, event: MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
+
sides?: boolean;
|
|
7
10
|
}
|
|
8
|
-
export default function HeroArrows({ shape, placement, ref }: HeroArrowsProps): import("react").JSX.Element;
|
|
11
|
+
export default function HeroArrows({ shape, placement, ref, labels, onPress, sides }: HeroArrowsProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{UiIcon as p}from"efficient-easel/draw/client";import{arrowButtonClass as m,arrowsRailClass as i,HERO_ARROW_DIRECTIONS as v,HERO_ARROW_LABELS as d}from"../../format/lib/hero-arrows.js";const R={prev:"pointer-events-auto absolute left-3 top-1/2 -translate-y-1/2",next:"pointer-events-auto absolute right-3 top-1/2 -translate-y-1/2"};function c({shape:n,placement:l,ref:s,labels:u=d,onPress:a,sides:r=!1}){const o=m(n);return t("div",{ref:s,className:r?void 0:i(l),style:{color:"var(--overlay-fg)"},children:v.map(e=>t("button",{type:"button","data-hero-nav":e,"aria-label":u[e],className:r?`${R[e]} ${o}`:o,onClick:a?f=>a(e,f):void 0,children:t(p,{name:"chevron-right",size:18,rounded:!0,style:e==="prev"?{rotate:"180deg"}:void 0})},e))})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as u,jsx as r,jsxs as c}from"react/jsx-runtime";import b from"./HeroPoster.js";import{SectionAnimation as h}from"./SectionAnimation.js";import{resolveMedia as P}from"../lib/media.js";import{HERO_MEDIA_PARTS as w,HERO_PART_ATTR as x}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as v}from"../lib/animation/part-motion.js";import{pictureHoverOf as T}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as H,SITE_PHOTO_CSS as j,resolveImageTreatment as _}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as k,normaliseMediaLayout as
|
|
1
|
+
"use client";import{Fragment as u,jsx as r,jsxs as c}from"react/jsx-runtime";import b from"./HeroPoster.js";import{SectionAnimation as h}from"./SectionAnimation.js";import{resolveMedia as P}from"../lib/media.js";import{HERO_MEDIA_PARTS as w,HERO_PART_ATTR as x}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as v}from"../lib/animation/part-motion.js";import{pictureHoverOf as T}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as H,SITE_PHOTO_CSS as j,resolveImageTreatment as _}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as k,normaliseMediaLayout as S,resolvePhoneLayout as N}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as O,normaliseVideoSource as A,parseYouTubeId as R}from"../../format/lib/hero-video.js";import{hidableText as C}from"efficient-easel/draw";import{viewHideClass as E}from"../../format/lib/content/view-hide-class.js";const V={one:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-1",side:"max-view-tablet:grid-cols-2 max-view-tablet:grid-rows-1",stacked:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-2"},I={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function Q(e){const o=e.isVideo&&A(e.videoSource)==="youtube",i=e.isVideo&&O(e.videoPlayback)==="click",a=o?R(C(e.youtubeUrl)):null,t=S(e.mediaLayout);return{fromYouTube:o,onClick:i,youTubeId:a,backgroundFile:e.isVideo&&!o&&!i,desktopLayout:t,phoneLayout:N(e.mediaLayoutPhone,t),twoPictures:!e.isVideo&&k(e)>1}}function d(e,o){return y(v({_partMotion:e},o))}function l(e,o){return _(void 0,void 0,T(v({_partMotion:e},o)))}function W(e){return w.some(i=>l(e,i).className)?{hostAttrs:{[H]:""},sheet:j}:{}}function f({treatment:e,children:o}){return e.className?r("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):r(u,{children:o})}function p({color:e,opacity:o,passClicks:i=!0}){return o>0?r("div",{className:i?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function g({part:e,editing:o,marked:i=!0,entrance:a,className:t,children:n}){const s=o&&i?{[x]:e}:void 0;return a?r(h,{desktop:a.desktop,phone:a.phone,editing:o,boxClass:t,boxAttrs:s,children:n}):r("div",{className:t,...s,children:n})}function X({partMotion:e,editing:o,children:i}){const a=d(e,"media"),t=l(e,"media"),n=t.className?r("div",{className:`absolute inset-0 z-[1] ${t.className}`,...t.style?{style:t.style}:{},children:i}):i;return a?r(h,{desktop:a.desktop,phone:a.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:n}):r(u,{children:n})}function Z({desktopLayout:e,phoneLayout:o,editing:i,marked:a=!0,partMotion:t,first:n,second:s,laterSlide:m=!1}){return c("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${I[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[r(g,{part:"image",editing:i,marked:a,entrance:d(t,"image"),className:"relative overflow-hidden",children:c(f,{treatment:l(t,"image"),children:[r(b,{posterSrc:P(n.src),showVideo:!1,laterSlide:m,objectPosition:n.objectPosition,objectPositionPhone:n.objectPositionPhone,objectPositionTablet:n.objectPositionTablet}),r(p,{color:n.tintColor,opacity:n.tintOpacity})]})}),r(g,{part:"image2",editing:i,marked:a,entrance:d(t,"image2"),className:`relative overflow-hidden ${E({desktop:e==="one",tablet:e==="one",mobile:o==="one"},{atSectionLine:!0})}`.trimEnd(),children:c(f,{treatment:l(t,"image2"),children:[r(b,{posterSrc:P(s.src),showVideo:!1,laterSlide:m,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone,objectPositionTablet:s.objectPositionTablet}),r(p,{color:s.tintColor,opacity:s.tintOpacity})]})})]})}export{X as HeroMediaLayer,g as HeroPickArea,f as HeroPictureHover,p as HeroTint,Z as HeroTwoPictures,Q as heroMediaReading,d as heroPartEntrance,l as heroPartHover,W as heroPicturesHover};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HoverMediaCover } from "../../format/lib/animation/hover.js";
|
|
2
|
+
import { type HoverMediaPick } from "../../format/lib/content/hover-media.js";
|
|
3
|
+
export interface HoverMediaLayerProps {
|
|
4
|
+
media: HoverMediaPick | null;
|
|
5
|
+
name: string;
|
|
6
|
+
cover?: HoverMediaCover;
|
|
7
|
+
ground?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function HoverMediaLayer({ media, name, cover, ground }: HoverMediaLayerProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as A,jsxs as I,Fragment as k}from"react/jsx-runtime";import{useEffect as T,useRef as W,useState as p}from"react";import $ from"./HeroArrows.js";import{arrowStep as z,HERO_ARROW_DIRECTIONS as Y}from"../../format/lib/hero-arrows.js";import{hoverArrowLabel as q,hoverMediaCount as V}from"../../format/lib/content/hover-media.js";import{CARD_COPY_ATTR as B,PHOTO_HOST_ATTR as G}from"../../format/lib/content/image-treatment.js";import{useDeferredPicture as J}from"../lib/first-screen.js";import{sizedImage as j}from"../../format/lib/sized-image.js";const K=200,H="data-hover-media-anchor";function Q(r){const i=r.closest(`[${B}]`);for(let o=r.parentElement;o;o=o.parentElement){const u=!i?.contains(o)&&[...o.children].some(h=>h.matches("a[href]"));if(o.hasAttribute(G)||u)return o.querySelectorAll(`[${H}]`).length===1?o:null}return null}const U={card:"pointer-events-none absolute inset-0 z-20 overflow-hidden rounded-[inherit] transition-opacity duration-200 motion-reduce:transition-none",picture:"pointer-events-none absolute inset-0 z-20 overflow-hidden transition-opacity duration-200 motion-reduce:transition-none"},X={cover:"h-full w-full object-cover",contain:"h-full w-full object-contain"};function M(r){const i=j(r,{fallbackWidth:960});return i.src===r?{src:r}:{src:i.src,srcSet:`${i.src} 1x, ${j(r,{fallbackWidth:1280}).src} 2x`}}const P=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: hover) and (pointer: fine)").matches;function Z({media:r,name:i,cover:o="card",ground:u}){const v=W(null),h=J(),[c,w]=p(!1),[D,S]=p(!1),[l,L]=p(0),[E,_]=p(!1),f=r?.urls??[],s=f.length;if(T(()=>{const n=v.current;if(!n||s===0)return;const e=Q(n)??n.parentElement;if(!e)return;let t,m=!1;const y=()=>{t!==void 0&&clearTimeout(t),t=void 0,w(!1),S(!1),L(0),_(!1),m=!1},O=a=>{a.pointerType!=="mouse"||!P()||(t!==void 0&&clearTimeout(t),t=setTimeout(()=>{t=void 0,w(!0)},K))},R=a=>{if(a.pointerType==="mouse"){if(!m&&e.contains(document.activeElement)){t!==void 0&&clearTimeout(t),t=void 0;return}y()}},b=()=>{m=!0},x=()=>{!m&&P()&&w(!0)},g=a=>{const C=a.relatedTarget;(!C||!e.contains(C))&&y()};return e.addEventListener("pointerenter",O),e.addEventListener("pointerleave",R),e.addEventListener("pointerdown",b),e.addEventListener("focusin",x),e.addEventListener("focusout",g),()=>{t!==void 0&&clearTimeout(t),e.removeEventListener("pointerenter",O),e.removeEventListener("pointerleave",R),e.removeEventListener("pointerdown",b),e.removeEventListener("focusin",x),e.removeEventListener("focusout",g)}},[s]),T(()=>{if(!c)return;const n=requestAnimationFrame(()=>S(!0));return()=>cancelAnimationFrame(n)},[c]),T(()=>{if(!c||!E||s<2)return;const n=new Image,e=M(f[(l+1)%s]);e.srcSet&&(n.srcset=e.srcSet),n.src=e.src},[c,E,l,s,f]),!r||s===0)return null;const d=c?M(f[Math.min(l,s-1)]):null,F=(n,e)=>{e.preventDefault(),e.stopPropagation(),_(!0),L(t=>z(n,t,s))},N=Object.fromEntries(Y.map(n=>[n,q(n,i)]));return I(k,{children:[A("span",{ref:v,className:"sr-only","aria-live":"polite",[H]:"",children:c&&E?V(l,s):""}),d?I("div",{"data-hover-media":"","data-hover-cover":o,className:U[o],style:{opacity:D?1:0,...u?{backgroundColor:u}:{}},children:[A("img",{src:d.src,...d.srcSet?{srcSet:d.srcSet}:{},alt:"",decoding:"async",...h,className:X[r.fit]}),s>1?A($,{shape:"solid",sides:!0,labels:N,onPress:F}):null]}):null]})}export{Z as default};
|
|
@@ -26,6 +26,9 @@ export declare function CellWrap({ className, style, attrs, children, }: {
|
|
|
26
26
|
attrs?: Record<string, string>;
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
}): ReactNode;
|
|
29
|
+
export declare function CardCopyCell({ children }: {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}): import("react").JSX.Element;
|
|
29
32
|
export declare function SlotsStartAfresh({ children }: {
|
|
30
33
|
children: ReactNode;
|
|
31
34
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as l}from"react/jsx-runtime";import{createContext as a,useContext as t}from"react";import{SECTION_FILL_CLASS as C}from"../../format/lib/content/section-min-height.js";import{useTakeViewHide as p,withViewHide as v}from"./ViewHideRoot.js";const x={stretchedRow:!1,fillingColumn:!1},r=a(null),y=()=>t(r)!==null,B=()=>t(r),F=()=>t(r)?.id??null,c=a(!1);function h(){const e=t(r)?.stretchedRow===!0,o=t(c);return e&&!o}const m=()=>t(c);function w(){const e=t(r),o=h(),n=m();return{fill:n?` ${C}`:"",inner:s=>{const i=o||n?l(c.Provider,{value:!0,children:s}):s;return e?.columnsRow?l(r.Provider,{value:{...e,columnsRow:!1},children:i}):i}}}function L({className:e,style:o,attrs:n,children:s}){const{fill:i,inner:u}=w(),d=p();return d.scope(l("div",{className:v(`${e}${i}`,d.className),...o?{style:o}:{},...n,...d.attrs,children:u(s)}))}const f=a(!1);function A({children:e}){return l(f.Provider,{value:!0,children:l(c.Provider,{value:!0,children:e})})}function H({children:e}){const o=t(r),n=t(f),s=t(c),i=n&&s,u=o===null?null:o.id===void 0?x:{...x,id:o.id};return l(r.Provider,{value:u,children:l(f.Provider,{value:!1,children:l(c.Provider,{value:i,children:e})})})}export{A as CardCopyCell,c as CellFillContext,L as CellWrap,r as InBoxContext,H as SlotsStartAfresh,B as useBoxCell,F as useBoxId,w as useCellLayer,h as useCellOfStretchedRow,m as useFillsCell,y as useInBox};
|
|
@@ -3,5 +3,6 @@ export interface ListSearchBoxProps {
|
|
|
3
3
|
noMatchText?: string;
|
|
4
4
|
listKey?: string;
|
|
5
5
|
editing?: boolean;
|
|
6
|
+
takesViewHide?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export default function ListSearchBox({ hint, noMatchText, listKey, editing }: ListSearchBoxProps): import("react").JSX.Element;
|
|
8
|
+
export default function ListSearchBox({ hint, noMatchText, listKey, editing, takesViewHide }: ListSearchBoxProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as o,jsxs as u}from"react/jsx-runtime";import{HideTaker as d}from"./ViewHideRoot.js";import{useRef as p,useState as m}from"react";import{narrowList as x}from"../../format/lib/content/list-query.js";function b({hint:e,noMatchText:s,listKey:t,editing:n=!1,takesViewHide:l=!1}){const r=p(null),[i,c]=m(!1);return u(d,{ref:r,takes:l,className:"w-full",children:[o("input",{type:"search",...e?{"aria-label":e}:{},placeholder:e,readOnly:n,onChange:f=>{if(!r.current||!t)return;const a=f.currentTarget.value;c(x(r.current,t,a)===0&&a.trim()!=="")},className:"w-full border-b border-line bg-transparent py-4 font-body text-[length:var(--size-body,16px)] text-fg placeholder:text-fg-dim focus:border-accent focus:outline-none"}),o("p",{hidden:!i,role:"status","aria-live":"polite",className:"pt-4 text-[length:var(--size-body,15px)] text-fg-dim",children:s})]})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as D,NO_HIDE as C,useTakeViewHide as B,withViewHide as k}from"./ViewHideRoot.js";import{useContext as T}from"react";import{SiteLink as W}from"../lib/site-runtime.js";import j,{FOOTER_LOGO_PX as y,WORDMARK_FIT_FLOOR_PX as F}from"./Logo.js";import{media as R}from"../lib/media.js";import{BoxSurfaceContext as P}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as A}from"./BoxCellContext.js";import{useInSiteHeader as M}from"./PhoneMenuTools.js";import{useSiteLogo as V}from"./SiteLogoContext.js";import{useLogoWall as z}from"./LogoWallContext.js";import{LogoWallMark as E}from"./Logos.js";import{useCardRow as G}from"./CardRowContext.js";import{alignViewClasses as I,BLOCK_ALIGN_JUSTIFY as K}from"../../format/lib/content/block-align.js";import{useInBox as X}from"./InBoxContext.js";function J(s){const o=z(),t=G();if(!o)return e(U,{...s});const m=(s.src??"").trim();return e(D,{className:"text-center",children:e(E,{src:m||void 0,alt:s.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:t?.row.kind})})}function U({src:s,alt:o,href:t,heightPx:m=y,reverse:H=!0,align:i,alignTablet:u,alignPhone:w,color:g=null}){const n=V(),p=(s??"").trim(),l=p?{src:R(p),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},v=T(P),x=M(),O=A(),r=!x&&O,a=B(),L={atSectionLine:!X()},N=!!(i||r||I("justify",i,u,w,L)),c=N?C:a,d=t||r?C:c,f=e(j,{variant:"footer",sizePx:m,src:l.src,reverse:H,color:g,reversedSrc:l.reversedSrc,inkIsDark:l.inkIsDark,wordmark:l.wordmark,siteName:n.siteName,fitToContainer:x,fitWordmarkToContainer:r,fitFloorPx:r?F:void 0,...v?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{}}),S=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",h=t?e(W,{href:t,className:k(S,c.className),...c.attrs,children:f}):r?e("span",{className:k(S,c.className),...c.attrs,children:f}):f;if(!N)return a.scope(h);const _=["flex min-w-0",i?K[i]:"",I("justify",i,u,w,L),r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return a.scope(e("div",{className:k(_,a.className),...a.attrs,children:h}))}export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as d,Fragment as K}from"react/jsx-runtime";import{PagePicture as h}from"../lib/first-screen.js";import{PaymentMark as y,paymentMarkItems as P}from"efficient-shell/icons/payment";import D from"./BlockFrame.js";import{renderChrome as Y,renderGold as A,renderHeadline as Z}from"./goldPhrases.js";import{LogoWallProvider as M}from"./LogoWallContext.js";import{EMPTY_ELSE_CLASS as U,EMPTY_HIDES_CLASS as J,EmptyHidesStyle as V}from"../lib/content/empty-hides.js";import{media as S}from"../lib/media.js";import{sizedImage as v}from"../../format/lib/sized-image.js";import{stripMarkup as _}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as X}from"../../format/lib/sections/logo-look.js";import{paymentRowMark as W}from"../lib/sections/payment-rows.js";import{alignViewClasses as q,BLOCK_ALIGN_JUSTIFY as H,blockAlignOf as Q}from"../../format/lib/content/block-align.js";import{FOOTER_MARK_SIZES as C}from"../../format/lib/document/box-footer.js";import{say as ee}from"../../format/lib/editor-words.js";const R={label:"text-[length:var(--size-label,13px)]"},f="sf-logo-wall",te="sf-logo-items",ne="flex flex-wrap items-center",re=(t,e,s)=>{const r=Q(t)??"center";return[ne,H[r],q("justify",r,e,s)].filter(Boolean).join(" ")},$="plain",g={plain:{x:3.5,y:2},cards:{x:.75,y:.75},marks:{x:.75,y:.5}},
|
|
1
|
+
import{jsx as n,jsxs as d,Fragment as K}from"react/jsx-runtime";import{PagePicture as h}from"../lib/first-screen.js";import{PaymentMark as y,paymentMarkItems as P}from"efficient-shell/icons/payment";import D from"./BlockFrame.js";import{renderChrome as Y,renderGold as A,renderHeadline as Z}from"./goldPhrases.js";import{LogoWallProvider as M}from"./LogoWallContext.js";import{EMPTY_ELSE_CLASS as U,EMPTY_HIDES_CLASS as J,EmptyHidesStyle as V}from"../lib/content/empty-hides.js";import{media as S}from"../lib/media.js";import{sizedImage as v}from"../../format/lib/sized-image.js";import{stripMarkup as _}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as X}from"../../format/lib/sections/logo-look.js";import{paymentRowMark as W}from"../lib/sections/payment-rows.js";import{alignViewClasses as q,BLOCK_ALIGN_JUSTIFY as H,blockAlignOf as Q}from"../../format/lib/content/block-align.js";import{FOOTER_MARK_SIZES as C}from"../../format/lib/document/box-footer.js";import{say as ee}from"../../format/lib/editor-words.js";const R={label:"text-[length:var(--size-label,13px)]"},f="sf-logo-wall",te="sf-logo-items",ne="flex flex-wrap items-center",re=(t,e,s)=>{const r=Q(t)??"center";return[ne,H[r],q("justify",r,e,s,{atSectionLine:!0})].filter(Boolean).join(" ")},$="plain",g={plain:{x:3.5,y:2},cards:{x:.75,y:.75},marks:{x:.75,y:.5}},L=t=>({columnGap:`${g[t].x}rem`,rowGap:`${g[t].y}rem`}),w=(t,e)=>`calc((100% - ${(t-1)*g[e].x}rem) / ${t})`;function se({items:t,contained:e,heading:s,columns:r,grayscale:c,logoHeight:o,bandPadding:a,logos:i,look:l=X,omitHead:m=!1,cards:p,align:u,alignTablet:j,alignPhone:k,labelledBy:G}){const x=re(u,j,k),N=l==="marks",B=r!=null?{flex:`0 0 ${w(r,$)}`}:void 0,O=!m;return d(D,{contained:e,fillWidth:N&&m?"w-auto max-w-full":void 0,className:O&&a==null?"py-10":"",style:!O||a==null?void 0:{paddingTop:`${a}px`,paddingBottom:`${a}px`},children:[!m&&s!=null&&s!==""?n("h2",{className:`mb-8 text-center font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Z(s,!1)}):null,d(le,{listed:N,labelledBy:G,children:[p!==void 0?d(M,{value:{look:l,logoHeight:o,grayscale:c},children:[r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${w(r,l)}}`}):null,n("div",{className:[f,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:L(l),children:p})]}):i?d(M,{value:{look:l,logoHeight:o,grayscale:c},children:[n(V,{}),r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${w(r,l)}}`}):null,n(i,{className:[f,J,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:L(l),minEmptyHeight:80})]}):null,p!==void 0?null:n("div",{className:`${te} ${U} ${x}`,style:L($),children:(t??[]).map((b,F)=>n("div",{className:"text-center",style:B,children:n(ce,{src:b.src,alt:b.alt,look:$,logoHeight:o,grayscale:c})},F))})]})]})}function le({listed:t,labelledBy:e,children:s}){return t?n("div",{className:"contents",role:"list",...e?{"aria-labelledby":e}:{"aria-label":ee("Ways to pay")},children:s}):n(K,{children:s})}const E="font-mono text-[12px] uppercase tracking-[0.18em]";function z(t){const e=P({name:_(t)});return!e.length||e.length===1&&e[0].kind==="words"&&!e[0].glyph?[]:e}function I(t){const e=z(t);return e.length?n("span",{className:"flex items-center gap-3",children:e.map((s,r)=>n(y,{item:s,size:20,className:E},r))}):null}const ae=C.sm.mark,ie=Object.values(C),oe=t=>ie.reduce((e,s)=>Math.abs(s.mark-t)<Math.abs(e.mark-t)?s:e).words;function ce({src:t,alt:e,look:s,logoHeight:r,grayscale:c,kind:o,mark:a}){if(s==="marks"){const i=r??ae,l=!t&&o!==void 0?W({label:e,kind:o}):null,m=l?[l]:!t&&e?z(e):[];return n("span",{role:"listitem",className:"flex items-center gap-3",style:{fontSize:`${oe(i)}px`},children:a||(m.length?m.map((p,u)=>n(y,{item:p,size:i},u)):t?n(h,{...T(S(t)),alt:_(e||""),className:"w-auto",style:{height:`${i}px`}}):e&&n("span",{children:A(e)}))})}if(s==="cards"){const i=!t&&o!==void 0?W({label:e,kind:o}):null;return n("div",{className:"sf-card flex h-10 items-center border border-line bg-surface px-4",children:a||(i?n(y,{item:i,size:20,className:E}):!t&&e&&I(e)?I(e):t?n(h,{...T(S(t)),alt:_(e||""),className:c===!1?"max-h-5 w-auto opacity-90":"max-h-5 w-auto opacity-90 grayscale"}):e&&n("span",{className:E,children:A(e)}))})}return t?n(h,{...me(S(t)),alt:e,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",r==null?"h-7":"",c===!1?"":"grayscale"].filter(Boolean).join(" "),style:r==null?void 0:{height:`${r}px`}}):n("span",{className:`font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Y(e||"Logo")})}function T(t){const e=v(t,{fallbackWidth:320,maxWidth:640});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"120px"}:{src:t}}function me(t){const e=v(t,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:t}}export{E as CARD_WORDS_CLASS,ce as LogoWallMark,se as default};
|
|
@@ -2,11 +2,12 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
import { type PartStyles, type PublishedPartRule } from "../lib/document/part-styles.js";
|
|
3
3
|
import { type PartMotion } from "../lib/animation/part-motion.js";
|
|
4
4
|
import type { PartNeedle } from "../lib/document/text-parts.js";
|
|
5
|
-
export declare function PublishedPartStyles({ needles, styles, motions, type, children, }: {
|
|
5
|
+
export declare function PublishedPartStyles({ needles, styles, motions, type, atEdge, children, }: {
|
|
6
6
|
needles: PartNeedle[];
|
|
7
7
|
styles: PartStyles;
|
|
8
8
|
motions?: Readonly<Record<string, PartMotion>>;
|
|
9
9
|
type?: string;
|
|
10
|
+
atEdge?: boolean;
|
|
10
11
|
children: ReactNode;
|
|
11
12
|
}): import("react").JSX.Element;
|
|
12
13
|
export declare function usePartEntrance(rule: PublishedPartRule | null): import("react").RefObject<HTMLSpanElement | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as S,jsx as a,jsxs as C}from"react/jsx-runtime";import{createContext as x,useContext as f,useEffect as b,useId as v,useMemo as O,useRef as w}from"react";import{armEntrance as A}from"efficient-shell/format";import{blockDrawsTextStyle as F,partRuleForKind as g,partRuleForText as M,partStyleCss as k,publishedPartStyles as j}from"../lib/document/part-styles.js";import{usePhoneWidth as I}from"./SectionAnimation.js";import{useInBox as K}from"./InBoxContext.js";import{styleKeyForPart as L}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as N,PART_LIFT_ATTR as E,drawPartEntrance as B,ensurePartLiftSheet as D,firstOnPage as $,partBoxOf as H,partMotionDrawn as J,partMoves as W}from"../lib/animation/part-motion.js";const p=x(null),R=x(null),T=x(null);function te({needles:t,styles:n,motions:e=N,type:r,atEdge:d=!1,children:m}){const c=v(),s=K()||d,h=JSON.stringify([c,t,n,e,r]),o=O(()=>{const l=Object.keys(e).filter(u=>W(e[u]));return j(t,n,c,u=>L(r,u),u=>F(r,u),u=>l.includes(u)?J(e[u]):null,l)},[h]);if(!o)return a(S,{children:m});const i=k(o,{inBox:s});return C(S,{children:[i&&a("style",{href:`${Y}${c}-${q(i)}`,precedence:y,dangerouslySetInnerHTML:{__html:i.replace(/</g,"\\3c ")}}),a(p.Provider,{value:o,children:m})]})}const P=new WeakMap;function _(t,n){const e=$(n.filter(r=>r.arm));for(const r of n)r===e||!r.undo||(r.undo(),r.undo=void 0);e?.arm&&!e.undo&&(e.undo=e.arm()),n.some(r=>r.lift)?(D(t.ownerDocument),t.setAttribute(E,"")):t.removeAttribute(E)}function ne(t){const n=w(null),e=t?.motion?.entrance??null,r=t?.motion?.hover==="lift",d=I(n,e!==null),m=JSON.stringify(e);return b(()=>{const c=n.current,s=H(c?.parentElement??null);if(!e&&!r||!c||!s)return;const h=e?()=>{const l=B(s,d?e.phone:e.desktop),u=A(s);return()=>{u?.(),l()}}:null,o=P.get(s)??[];P.set(s,o);const i={element:c,arm:h,lift:r};return o.push(i),_(s,o),()=>{const l=o.indexOf(i);l<0||(o.splice(l,1),i.undo?.(),i.undo=void 0,_(s,o),o.length||P.delete(s))}},[m,r,d]),n}const y="sf-part-styles",Y=`${y}-`;function q(t){let n=2166136261;for(let e=0;e<t.length;e+=1)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function re(t){const n=f(p),e=f(R),r=M(n,t);return r&&r.stamp!==e?r:null}function oe(t){return g(f(p),t)}function se({stamp:t,children:n}){return a(R.Provider,{value:t,children:n})}function ue({children:t}){const n=f(p);return a(T.Provider,{value:n,children:t})}function ie(t){return g(f(T),t)}export{se as ClaimedStamp,y as PART_STYLES_PRECEDENCE,te as PublishedPartStyles,ue as SharedPartKinds,ne as usePartEntrance,oe as usePublishedPartKindRule,re as usePublishedPartRule,ie as usePublishedSharedKindRule};
|
|
@@ -2,7 +2,7 @@ import { type CSSProperties, type ReactNode } from "react";
|
|
|
2
2
|
import { type EntranceValue } from "efficient-shell/format";
|
|
3
3
|
import { ENTRANCE_WRAPPER_CLASS } from "../lib/animation/entrance.js";
|
|
4
4
|
export { ENTRANCE_WRAPPER_CLASS };
|
|
5
|
-
export declare function SectionAnimation({ desktop, phone, editing, boxClass, boxAttrs, boxStyle, takesViewHide, children, }: {
|
|
5
|
+
export declare function SectionAnimation({ desktop, phone, editing, boxClass, boxAttrs, boxStyle, takesViewHide, atEdge, children, }: {
|
|
6
6
|
desktop: EntranceValue;
|
|
7
7
|
phone: EntranceValue;
|
|
8
8
|
editing: boolean;
|
|
@@ -10,6 +10,7 @@ export declare function SectionAnimation({ desktop, phone, editing, boxClass, bo
|
|
|
10
10
|
boxAttrs?: Readonly<Record<string, string>>;
|
|
11
11
|
boxStyle?: CSSProperties;
|
|
12
12
|
takesViewHide?: boolean;
|
|
13
|
+
atEdge?: boolean;
|
|
13
14
|
children: ReactNode;
|
|
14
15
|
}): ReactNode;
|
|
15
16
|
export type SeenEntrance = {
|
|
@@ -23,6 +24,7 @@ export declare const entranceReplay: {
|
|
|
23
24
|
seen: SeenEntrance;
|
|
24
25
|
};
|
|
25
26
|
};
|
|
27
|
+
export declare function phoneMediaOf(atEdge: boolean): string;
|
|
26
28
|
export declare function usePhoneWidth(ref: {
|
|
27
29
|
current: HTMLElement | null;
|
|
28
|
-
}, enabled?: boolean): boolean;
|
|
30
|
+
}, enabled?: boolean, atEdge?: boolean): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as g}from"react/jsx-runtime";import{NO_HIDE as v,useTakeViewHide as D,withViewHide as H}from"./ViewHideRoot.js";import{useEffect as w,useRef as N,useState as M}from"react";import{armEntrance as R,entranceAttrs as k,playEntrance as I}from"efficient-shell/format";import{EDGE_PHONE_MEDIA as J,PHONE_MEDIA as L}from"../lib/content/view-values.js";import{useCellLayer as V,useInBox as $}from"./InBoxContext.js";import{ENTRANCE_WRAPPER_CLASS as O}from"../lib/animation/entrance.js";function F({desktop:e,phone:t,editing:r,boxClass:o,boxAttrs:n,boxStyle:s,takesViewHide:a=!1,atEdge:i=!1,children:c}){const u=N(null),d=V(),x=D(),f=a?x:v,l=C(u,!0,i),A=l?t:e,{attrs:P,style:y}=k(A),h=N(m.seed(e,t)),S=JSON.stringify(e),_=JSON.stringify(t);return w(()=>{const p=u.current;if(p){if(r){const E=m.next(h.current,e,t,l);h.current=E.seen,E.play&&I(p);return}return R(p)}},[S,_,l,r]),f.scope(g("div",{ref:u,className:H(`${O}${d.fill}${o?` ${o}`:""}`,f.className),...n,...f.attrs,...P,...Object.keys(y).length||s?{style:{...s,...y}}:{},children:d.inner(c)}))}const m={seed(e,t){return{desktop:JSON.stringify(e),phone:JSON.stringify(t)}},next(e,t,r,o){const n=m.seed(t,r);return{play:o?n.phone!==e.phone:n.desktop!==e.desktop,seen:n}}};function j(e){return e?J:L}function C(e,t=!0,r=!1){const[o,n]=M(!1),s=j($()||r);return w(()=>{if(!t)return;const a=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!a?.matchMedia)return;const i=a.matchMedia(s),c=()=>n(i.matches);return c(),i.addEventListener("change",c),()=>i.removeEventListener("change",c)},[e,t,s]),o}export{O as ENTRANCE_WRAPPER_CLASS,F as SectionAnimation,m as entranceReplay,j as phoneMediaOf,C as usePhoneWidth};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
|
+
import type { ListPosition } from "../../format/lib/content/list-position.js";
|
|
3
|
+
export declare function sideListGridClass(position: Exclude<ListPosition, "below">): string;
|
|
4
|
+
export declare const SIDE_LIST_SCROLL_CLASS = "max-h-[480px] overflow-y-auto overscroll-contain max-view-wide:max-h-none";
|
|
5
|
+
export declare const SIDE_MAP_CLASS = "h-[480px] max-view-wide:h-[320px]";
|
|
6
|
+
export default function SideListLayout({ position, attrs, head, list, listRef, listAttrs, map, }: {
|
|
7
|
+
position: Exclude<ListPosition, "below">;
|
|
8
|
+
attrs: Readonly<Record<string, string>>;
|
|
9
|
+
head?: ReactNode;
|
|
10
|
+
list: ReactNode;
|
|
11
|
+
listRef?: Ref<HTMLDivElement>;
|
|
12
|
+
listAttrs?: Readonly<Record<string, string>>;
|
|
13
|
+
map: ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";const n={left:"grid-cols-[minmax(260px,360px)_1fr]",right:"grid-cols-[1fr_minmax(260px,360px)]"};function m(i){return["grid items-start gap-6 max-view-wide:grid-cols-1",n[i]].join(" ")}const c="max-h-[480px] overflow-y-auto overscroll-contain max-view-wide:max-h-none",h="h-[480px] max-view-wide:h-[320px]";function l({position:i,attrs:s,head:a,list:d,listRef:o,listAttrs:x,map:t}){return r("div",{...s,className:m(i),children:[r("div",{className:["min-w-0",i==="right"?"order-2":"","max-view-wide:order-2"].join(" "),children:[a,e("div",{ref:o,...x,className:c,children:d})]}),e("div",{className:["min-w-0",i==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:t})]})}export{c as SIDE_LIST_SCROLL_CLASS,h as SIDE_MAP_CLASS,l as default,m as sideListGridClass};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alignViewAnswers as V,alignViewClasses as X}from"../../format/lib/content/block-align.js";import{SiteLink as $}from"../lib/site-runtime.js";import G from"./Btn.js";import{resolveImageTreatment as Z}from"../../format/lib/content/image-treatment.js";import
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alignViewAnswers as V,alignViewClasses as X}from"../../format/lib/content/block-align.js";import{SiteLink as $}from"../lib/site-runtime.js";import G from"./Btn.js";import{resolveImageTreatment as Z}from"../../format/lib/content/image-treatment.js";import L from"./Placeholder.js";import{useSitePhotography as D}from"./SitePhotographyContext.js";import K from"./SectionEyebrow.js";import{renderGold as s,renderHeadline as R,splitParagraphs as Y}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as q}from"../../format/lib/content/ink.js";import{scrim as J}from"../../format/lib/content/scrim.js";import{SECTION_FILL_CLASS as Q}from"../../format/lib/content/section-min-height.js";import{HALF_SIZES as E}from"../../format/lib/sized-image.js";const a={headingMediumUpTo800:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",labelUpTo800:"max-view-wide:text-[length:var(--size-label,12px)]",headingMedium:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,13px)]"},z={words:{left:"min-[961px]:pl-[max(60px,calc(100%_-_var(--sf-content-cap,200%)/2_+_60px))]",right:"min-[961px]:pr-[max(60px,calc(100%_-_var(--sf-content-cap,200%)/2_+_60px))]"},buttons:{left:"min-[961px]:pl-[max(var(--sf-site-gutter,40px),calc(100%_-_var(--sf-content-cap,200%)/2_+_var(--sf-site-gutter,40px)))]",right:"min-[961px]:pr-[max(var(--sf-site-gutter,40px),calc(100%_-_var(--sf-content-cap,200%)/2_+_var(--sf-site-gutter,40px)))]"}};function W({imageLabel:x,imageSrc:f,imageTint:v=.4,imageObjectPosition:S,eyebrow:h,title:b,body:g,cta:c,reverse:n=!1,uppercase:T=!1,textAlign:m="left",textAlignTablet:w,textAlignPhone:u,textBgSrc:p,textBgLabel:I,textBgTint:_=.6,textBgObjectPosition:M,featureBar:r,imageButton:l,grayscale:C,pictureHover:P,fillHeight:O=!1}){const y=Z(C,D(),P),N={left:{items:"",text:"",cta:"self-start"},center:{items:"items-center",text:"text-center",cta:"self-center"},right:{items:"items-end",text:"text-right",cta:"self-end"}},d=N[m]??N.left,j={left:{items:"view-tablet:max-view-desktop:items-stretch",cta:"view-tablet:max-view-desktop:self-start"},center:{items:"view-tablet:max-view-desktop:items-center",cta:"view-tablet:max-view-desktop:self-center"},right:{items:"view-tablet:max-view-desktop:items-end",cta:"view-tablet:max-view-desktop:self-end"}},k={left:{items:"max-view-tablet:items-stretch",cta:"max-view-tablet:self-start"},center:{items:"max-view-tablet:items-center",cta:"max-view-tablet:self-center"},right:{items:"max-view-tablet:items-end",cta:"max-view-tablet:self-end"}},t=V(m,w,u),o={text:X("text",m,w,u,{atSectionLine:!0}),items:[t.tablet&&j[t.tablet].items,t.phone&&k[t.phone].items].filter(Boolean).join(" "),cta:[t.tablet&&j[t.tablet].cta,t.phone&&k[t.phone].cta].filter(Boolean).join(" ")},U=n?"right":"left",F=n?"left":"right";return e("section",{className:"relative z-[2] bg-bg p-0",children:i("div",{className:["grid min-h-[72vh] grid-cols-2 border-t border-b border-line","max-[960px]:grid-cols-1","max-[960px]:min-h-0",n?"min-[961px]:[direction:rtl]":"",...O?[Q]:[]].join(" "),children:[i("div",{className:"sf-card relative flex items-center justify-center overflow-hidden bg-surface [direction:ltr] max-[960px]:aspect-[4/3] max-[960px]:order-2",style:n?{borderLeft:"1px solid var(--site-line)"}:{borderRight:"1px solid var(--site-line)"},children:[e(L,{label:x,src:f,objectPosition:S,treatment:y,sizes:E}),f&&v>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${v})`}}),(r||l)&&i("div",{className:`pointer-events-none absolute inset-0 z-[3] flex flex-col items-center justify-center gap-4 px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${z.buttons[U]}`,children:[r&&i($,{href:r.href,className:`pointer-events-auto inline-flex items-center justify-center gap-3 border px-7 py-4 font-mono ${a.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors max-view-wide:gap-2 max-view-wide:px-5 max-view-wide:py-3 ${a.labelUpTo800}`,style:{borderColor:"color-mix(in srgb, var(--overlay-fg) 30%, transparent)",color:"color-mix(in srgb, var(--overlay-fg) 85%, transparent)",background:J(.45)},children:[e("span",{children:s(r.wheel)}),e("span",{"aria-hidden":!0,style:{opacity:.55},children:"·"}),e("span",{children:s(r.category)}),e("span",{"aria-hidden":!0,children:"→"}),e("span",{children:s(r.cta??"Shop now")})]}),l&&i($,{href:l.href,className:`pointer-events-auto inline-flex items-center justify-center gap-2 border px-7 py-4 font-mono ${a.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors hover:bg-[color-mix(in_srgb,var(--overlay-fg)_10%,transparent)] max-view-wide:gap-2 max-view-wide:px-5 max-view-wide:py-3 ${a.labelUpTo800}`,style:{borderColor:"color-mix(in srgb, var(--overlay-fg) 50%, transparent)",color:"color-mix(in srgb, var(--overlay-fg) 95%, transparent)",background:"transparent"},children:[e("span",{children:s(l.text??"Learn more")}),e("span",{"aria-hidden":!0,children:"→"})]})]})]}),i("div",{className:"relative overflow-hidden [direction:ltr] max-[960px]:order-1",children:[p&&i("div",{className:"absolute inset-0","aria-hidden":!0,children:[e(L,{label:I??x,src:p,objectPosition:M,treatment:y,sizes:E}),_>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${_})`}})]}),e("div",{className:`relative z-[2] flex h-full min-h-full flex-col px-[60px] py-[100px] max-[960px]:px-6 max-[960px]:py-[60px] ${z.words[F]}`,style:p?q:void 0,children:i("div",{className:["flex flex-1 flex-col justify-center gap-6",d.items,d.text,o.items,o.text].filter(Boolean).join(" "),children:[h&&e(K,{text:h,size:14}),b&&e("h2",{className:[`font-heading2 ${a.headingMedium} font-normal leading-[1.05] tracking-[-0.03em]`,`${a.headingMediumUpTo800} max-view-wide:leading-[1]`,T?"uppercase":""].join(" "),children:R(b,!1)}),g&&Y(g).map((A,H)=>e("p",{className:[`max-w-[520px] ${a.body} leading-[1.7]`,"text-fg-dim"].join(" "),children:s(A)},H)),c.text&&e("div",{className:`mt-2 ${d.cta}${o.cta?` ${o.cta}`:""}`,children:e(G,{href:c.href,variant:"primary",children:s(c.text)})})]})})]})]})})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as z}from"react/jsx-runtime";import S from"./BlockFrame.js";import{renderGold as h,renderHeadline as B,splitParagraphs as R}from"./goldPhrases.js";import{headingLook as A}from"./Heading.js";import{alignViewClasses as I}from"../../format/lib/content/block-align.js";import{useInBox as M}from"./InBoxContext.js";import{textTagOf as U}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as G,kickerLead as H}from"../lib/content/page-contents.js";import{isTextStyleId as K}from"../lib/document/part-styles.js";import{faceClassOf as C}from"../../format/lib/text-style-face.js";import{useMirroredCopy as P}from"./MirrorContext.js";import{mirroredTextClasses as k}from"../../format/lib/content/mirror-cards.js";import F from"./PartStyledKind.js";const m={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)]"},f=e=>e?` ${e}`:"";function V(e,i,n,r){const l=I("place",e,i,n,{atSectionLine:!r});return l?` ${l}`:""}const W={left:"text-left",center:"text-left mx-auto",right:"text-left ml-auto"},X=`max-w-[380px] ${m.bodySmall} leading-[1.5] opacity-80 ${m.bodyUpTo800}`,Z={default:"text-fg",dim:"text-fg-dim"};function q(e){return String(Math.min(Number(e.slice(8)),6))}function D({text:e,labelId:i,number:n,align:r,alignTablet:l,alignPhone:w,tone:g,contained:y,hero:E=!1,pad:d,tag:_,textStyle:$,ownWidth:L=!1,partAlign:T,onLine:c=!1,partKey:b,partDeclare:O=!1}){const p=s=>b?t(F,{kind:b,declare:O,children:s}):s,N=P(),j=M();if(E)return t("p",{className:X,children:h(e)});const x=n?t("span",{[G]:"",children:H(n)}):void 0,a=K($)?$:void 0,v=`${a?`${C({id:a})} `:""}${L?"":"max-w-[680px] "}whitespace-pre-line ${a==="body-5"?m.label:m.bodyLarge} leading-[1.7]${f(r?W[r]:"")}${V(r,l,w,j)}${f(g?Z[g]:"")}${f(k(N,r,T))}`,u=U(_);if(a?.startsWith("heading-")){const s=q(a),o=A(s,C({id:a}));return t(S,{contained:y,className:c?"":"py-6",pad:d?{values:d,frame:c?0:24}:void 0,children:z(u,{id:i,className:`${o.className}${f(k(N,void 0,T))}`,style:o.style,children:[x,p(B(e.trim(),!1))]})})}return t(S,{contained:y,className:c?"":"py-4",pad:d?{values:d,frame:c?0:16}:void 0,children:u==="p"?R(e).map((s,o)=>t("p",{id:o===0?i:void 0,className:v,children:p(h(s,!1,o===0?x:void 0))},o)):t(u,{id:i,className:v,children:p(h(e.trim(),!1,x))})})}export{D as default,q as headingLevelOfStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as m}from"react/jsx-runtime";import{HideTaker as k}from"./ViewHideRoot.js";import{alignViewClasses as y}from"../../format/lib/content/block-align.js";import{SiteLink as j}from"../lib/site-runtime.js";import{renderHeadline as N}from"./goldPhrases.js";import{say as
|
|
1
|
+
import{jsx as r,jsxs as m}from"react/jsx-runtime";import{HideTaker as k}from"./ViewHideRoot.js";import{alignViewClasses as y}from"../../format/lib/content/block-align.js";import{SiteLink as j}from"../lib/site-runtime.js";import{renderHeadline as N}from"./goldPhrases.js";import{say as L}from"../../format/lib/editor-words.js";function _({title:n,buttons:x,padTop:o,padBottom:l,buttonsAlign:s,buttonsAlignTablet:d,buttonsAlignPhone:f,editing:p=!1}={}){const c=typeof o=="number"?o:140,g=typeof l=="number"?l:140,i=(x??[]).filter(t=>p||(t.label??"").trim()),e=!!(n??"").trim(),a=!e&&(s==="center"||s==="left")?s:null,h=e?"":y("items",a??"right",d,f,{atSectionLine:!0});return!p&&!e&&i.length===0?null:r(k,{as:"section",className:"relative z-[2] bg-bg",children:m("div",{className:[a==="center"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":a==="left"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-start gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_auto] items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:grid-cols-1 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",h].filter(Boolean).join(" "),style:{paddingTop:c,paddingBottom:g},children:[a===null&&!e&&i.length>0&&r("div",{"aria-hidden":!0,className:"max-view-desktop:hidden"}),e&&r("h2",{className:"max-w-[1000px] font-display text-[length:min(var(--size-headingLarge,clamp(48px,7vw,108px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.94] tracking-[-0.035em] text-fg",children:N(n??"")}),i.length>0&&r("div",{className:"flex min-w-[280px] flex-col gap-3.5 max-view-desktop:min-w-0",children:i.map((t,v)=>{const u=(t.label??"").trim()||L("Button label"),b=t.href||"#",w=t.variant==="primary";return m(j,{href:b,className:["flex items-center justify-between gap-6 px-7 py-5","font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] transition-colors",w?"border border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg":"border border-line text-fg hover:border-accent hover:text-accent"].join(" "),children:[u," ",r("span",{"aria-hidden":!0,children:"→"})]},v)})})]})})}export{_ as default};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
type ViewHideClaim = {
|
|
3
3
|
readonly className: string;
|
|
4
|
+
readonly sectionClassName?: string;
|
|
4
5
|
readonly words: string;
|
|
6
|
+
readonly line?: ViewHideLineOf;
|
|
5
7
|
};
|
|
8
|
+
export type ViewHideLineOf = "edge" | "section" | "by-box";
|
|
6
9
|
export declare const ViewHideContext: import("react").Context<ViewHideClaim | null>;
|
|
7
10
|
export declare const VIEW_HIDE_ATTR = "data-sf-view-hide";
|
|
8
11
|
export type ViewHideTake = {
|
|
@@ -11,7 +14,10 @@ export type ViewHideTake = {
|
|
|
11
14
|
readonly scope: (element: ReactNode) => ReactNode;
|
|
12
15
|
};
|
|
13
16
|
export declare const NO_HIDE: ViewHideTake;
|
|
14
|
-
export declare const viewHideClaim: (className: string, words: string
|
|
17
|
+
export declare const viewHideClaim: (className: string, words: string, line?: {
|
|
18
|
+
readonly sectionClassName?: string;
|
|
19
|
+
readonly line?: ViewHideLineOf;
|
|
20
|
+
}) => ViewHideClaim | null;
|
|
15
21
|
export declare function useTakeViewHide(): ViewHideTake;
|
|
16
22
|
export declare function usePeekViewHide(): string;
|
|
17
23
|
export declare const withViewHide: (className: string | undefined, hide: string) => string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createContext as
|
|
1
|
+
"use client";import{createContext as m,createElement as l,useContext as r}from"react";import{InBoxContext as d}from"./InBoxContext.js";const a=m(null),w="data-sf-view-hide",u=e=>l(a.Provider,{value:null},e),N={className:"",attrs:{},scope:u},p=N,E=(e,s,t={})=>e?{className:e,words:s,...t}:null,f=(e,s)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:e.line==="edge"||e.line!=="section"&&s?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function x(){const e=r(a),s=r(d)!==null;if(e===null)return p;const t=f(e,s);return{className:t.className,attrs:{[w]:t.words},scope:u}}function v(){const e=r(a),s=r(d)!==null;return e===null?"":f(e,s).className}const C=(e,s)=>s?e?`${e} ${s}`:s:e;function V(e){const s=x(),t=e.takes===!1?N:s,o={};let c=!1;for(const[n,i]of Object.entries(e))n==="as"||n==="takes"||n==="children"||(n==="className"?(o.className=C(i,t.className),c=!0):o[n]=i);return!c&&t.className&&(o.className=t.className),t.scope(l(e.as??"div",{...o,...t.attrs},e.children))}export{V as HideTaker,N as NO_HIDE,w as VIEW_HIDE_ATTR,a as ViewHideContext,v as usePeekViewHide,x as useTakeViewHide,E as viewHideClaim,C as withViewHide};
|
|
@@ -13,8 +13,11 @@ export type BlockSize = {
|
|
|
13
13
|
style: Record<string, string>;
|
|
14
14
|
attrs: Record<string, string>;
|
|
15
15
|
};
|
|
16
|
+
export type BlockSizeLine = {
|
|
17
|
+
readonly atSectionLine?: boolean;
|
|
18
|
+
};
|
|
16
19
|
export declare function blockFillInCellClass(values: BlockSizeValues): string;
|
|
17
|
-
export declare function blockSizeOf(values: BlockSizeValues): BlockSize | null;
|
|
20
|
+
export declare function blockSizeOf(values: BlockSizeValues, { atSectionLine }?: BlockSizeLine): BlockSize | null;
|
|
18
21
|
export declare function blockSetsItsWidth(values: BlockSizeValues): boolean;
|
|
19
22
|
export declare function blockCanWidenPastCell(values: BlockSizeValues): boolean;
|
|
20
23
|
export declare function blockSizeValuesOf(props: Readonly<Record<string, unknown>>): BlockSizeValues;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BLOCK_FIXED_WIDTH as
|
|
1
|
+
import{BLOCK_FIXED_WIDTH as K,BLOCK_SIZE_KEYS as y,parseBlockWidthFit as b,phoneKey as H,parseTextFit as u,tabletKey as z}from"efficient-easel/draw";import{TEXT_FIT_ATTR as d}from"../../../format/lib/fit-words.js";const P="sf-block-size",p=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,M={desktop:{fill:"view-wide:w-full view-wide:[.flex-row>&]:grow",fixed:"view-wide:w-[min(var(--sf-bw),100%)] view-wide:basis-auto! view-wide:grow-0! view-wide:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},L={desktop:{fill:"view-desktop:w-full view-desktop:[.flex-row>&]:grow",fixed:"view-desktop:w-[min(var(--sf-bw),100%)] view-desktop:basis-auto! view-desktop:grow-0! view-desktop:shrink-0"},tablet:{fill:"view-wide:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-wide:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-wide:max-view-desktop:basis-auto! view-wide:max-view-desktop:grow-0! view-wide:max-view-desktop:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},j={desktop:L.desktop,tablet:{fill:"view-tablet:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-tablet:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-tablet:max-view-desktop:basis-auto! view-tablet:max-view-desktop:grow-0! view-tablet:max-view-desktop:shrink-0"},phone:{fill:"max-view-tablet:w-full",fixed:"max-view-tablet:w-[min(var(--sf-bw-p),100%)] max-view-tablet:basis-auto! max-view-tablet:grow-0! max-view-tablet:shrink-0"}},R={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},V={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},X={minWidth:{desktop:["--sf-bmin","view-wide:min-w-[var(--sf-bmin)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-wide:max-w-[var(--sf-bmax)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},_={minWidth:{desktop:["--sf-bmin","view-desktop:min-w-[var(--sf-bmin)]!"],tablet:["--sf-bmin-t","view-wide:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-desktop:max-w-[var(--sf-bmax)]"],tablet:["--sf-bmax-t","view-wide:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},Y={minWidth:{desktop:_.minWidth.desktop,tablet:["--sf-bmin-t","view-tablet:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-tablet:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:_.maxWidth.desktop,tablet:["--sf-bmax-t","view-tablet:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-tablet:max-w-[var(--sf-bmax-p)]"]}},Z=["widthFit","width","minWidth","maxWidth"],F={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},E={desktop:"view-desktop:whitespace-nowrap view-desktop:[&_*]:whitespace-nowrap!",tablet:"view-wide:max-view-desktop:whitespace-nowrap view-wide:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},$={desktop:E.desktop,tablet:"view-tablet:max-view-desktop:whitespace-nowrap view-tablet:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-tablet:whitespace-nowrap max-view-tablet:[&_*]:whitespace-nowrap!"};function J(e){const i=N(e);return i.sides.filter(o=>i.mode[o]==="fill").map(o=>R[i.three?"three":"two"][o]).filter(Boolean).join(" ")}function N(e){const i=Z.some(w=>{const t=e[w]?.tablet;return w==="widthFit"?b(t)!==void 0:p(t)!==void 0}),o=i?["desktop","tablet","phone"]:["desktop","phone"],s=(w,t)=>{const f=w(t?.desktop),n=i?w(t?.tablet)??f:f;return{desktop:f,tablet:n,phone:w(t?.phone)??n}};return{three:i,sides:o,perSide:s,mode:s(b,e.widthFit)}}function Q(e,{atSectionLine:i=!1}={}){const o=i?j:L,s=i?Y:_,w=i?$:E,t=[],f={},n={},{three:S,sides:I,perSide:T,mode:A}=N(e),O=T(p,e.width);for(const a of I){const m=A[a];!m||m==="fit"||(t.push(S?o[a][m]:M[a][m]),m==="fixed"&&(f[V[a]]=`${O[a]??K.fallback}px`))}for(const a of["minWidth","maxWidth"]){const m=T(p,e[a]);for(const k of I){const C=m[k];if(C===void 0)continue;const[B,D]=S?s[a][k]:X[a][k];f[B]=`${C}px`,t.push(D)}}const r=u(e.textFit?.desktop),x=u(e.textFit?.phone),v=p(e.minFont?.desktop),h=p(e.minFont?.phone),W=u(e.textFit?.tablet),l=W!==r||x!==void 0?W:void 0,g=p(e.minFont?.tablet),c=g!==v||h!==void 0?g:void 0;return l?(r==="line"&&t.push(w.desktop),l==="line"&&t.push(w.tablet),(x??l)==="line"&&t.push(w.phone)):(r==="line"&&t.push(F.desktop),(x??r)==="line"&&t.push(F.phone)),r&&(n[d.fit]=r),l&&(n[d.fitTablet]=l),x&&(n[d.fitPhone]=x),v!==void 0&&(n[d.min]=String(v)),c!==void 0&&(n[d.minTablet]=String(c)),h!==void 0&&(n[d.minPhone]=String(h)),!i&&(l||c!==void 0)&&(n[d.edge]=""),t.length===0&&Object.keys(n).length===0?null:{className:[P,...t].join(" "),style:f,attrs:n}}function U(e){if(p(e.maxWidth?.desktop)!==void 0)return!0;const i=b(e.widthFit?.desktop);return i==="fill"||i==="fixed"}function ee(e){return["desktop","tablet","phone"].some(o=>{const s=b(e.widthFit?.[o]);return s==="fixed"||s==="fill"||p(e.minWidth?.[o])!==void 0})}function ie(e){const i={};for(const o of y){const s=e[o],w=e[z(o)],t=e[H(o)];(s!==void 0||w!==void 0||t!==void 0)&&(i[o]={desktop:s,tablet:w,phone:t})}return i}export{P as BLOCK_SIZE_CLASS,d as TEXT_FIT_ATTR,ee as blockCanWidenPastCell,J as blockFillInCellClass,U as blockSetsItsWidth,Q as blockSizeOf,ie as blockSizeValuesOf};
|