efficient-web-builder 51.0.0 → 53.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 +66 -0
- package/dist/editor/components/ChatSettingsPanel.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +7 -7
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PartTextBox.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/PreviewPartStyleContext.d.ts +2 -2
- package/dist/editor/components/SectionTextPartBridge.js +1 -1
- package/dist/editor/components/SiteAccentField.js +1 -1
- package/dist/editor/components/SiteTextStylesField.d.ts +3 -2
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +82 -64
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/ColourControl.d.ts +11 -8
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/shared-fields.d.ts +5 -0
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +23 -2
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/choice-pictures.d.ts +21 -0
- package/dist/editor/lib/document/choice-pictures.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +33 -9
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/hidable-rows-drawn.d.ts +1 -0
- package/dist/editor/lib/document/hidable-rows-drawn.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/part-panel-rows.d.ts +1 -0
- package/dist/editor/lib/document/part-panel-rows.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/document/separator-field.d.ts +9 -1
- package/dist/editor/lib/document/separator-field.js +1 -1
- package/dist/editor/lib/document/shape-picker.d.ts +37 -0
- package/dist/editor/lib/document/shape-picker.js +1 -0
- package/dist/editor/lib/document/show-for-field.d.ts +6 -0
- package/dist/editor/lib/document/show-for-field.js +1 -0
- package/dist/format/lib/animation/hover.d.ts +0 -2
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/borders.d.ts +4 -2
- package/dist/format/lib/content/borders.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +21 -6
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -5
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/box-show-for-choices.d.ts +9 -0
- package/dist/format/lib/content/box-show-for-choices.js +1 -0
- package/dist/format/lib/content/button-icon.d.ts +1 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-state.d.ts +8 -0
- package/dist/format/lib/content/card-state.js +1 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +45 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +47 -0
- package/dist/format/lib/content/image-aspect.js +1 -0
- package/dist/format/lib/content/list-number.d.ts +11 -0
- package/dist/format/lib/content/list-number.js +1 -1
- package/dist/format/lib/content/phone-focus.d.ts +4 -1
- package/dist/format/lib/content/phone-focus.js +1 -1
- package/dist/format/lib/content/record-row.d.ts +14 -0
- package/dist/format/lib/content/record-row.js +1 -0
- package/dist/format/lib/content/record-types.d.ts +1 -1
- package/dist/format/lib/content/record-types.js +1 -1
- package/dist/format/lib/content/section-background.d.ts +10 -3
- package/dist/format/lib/content/section-background.js +1 -1
- package/dist/format/lib/content/section-height.d.ts +8 -0
- package/dist/format/lib/content/section-height.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +17 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +9 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +2 -2
- package/dist/format/lib/document/card-template-layers.d.ts +1 -1
- package/dist/format/lib/document/card-template-layers.js +1 -1
- package/dist/format/lib/document/media-manifest.json +5 -2
- package/dist/format/lib/document/mockup-variant-fields.d.ts +1 -0
- package/dist/format/lib/document/mockup-variant-fields.js +1 -1
- package/dist/format/lib/document/part-inks.d.ts +5 -10
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +1 -0
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/document/section-descriptions.js +1 -1
- package/dist/format/lib/document/show-when-attach.d.ts +2 -1
- package/dist/format/lib/document/show-when-attach.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +25 -14
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/fonts.js +1 -1
- package/dist/format/lib/sections/divider-style.d.ts +4 -0
- package/dist/format/lib/sections/divider-style.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +2 -2
- package/dist/format/lib/source-rules/mirrored-rows-agree.js +4 -4
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.d.ts +4 -0
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.js +37 -20
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.d.ts +7 -0
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.js +2 -0
- package/dist/format/lib/source-rules/support/part-slider-call-sites.d.ts +0 -1
- package/dist/format/lib/source-rules/support/part-slider-call-sites.js +6 -6
- package/dist/format/lib/text-styles/site-text-colours.d.ts +4 -0
- package/dist/format/lib/text-styles/site-text-colours.js +1 -0
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +3 -3
- package/dist/format/lib/word-styles.d.ts +0 -1
- package/dist/format/lib/word-styles.js +1 -1
- package/dist/render/components/Breadcrumb.d.ts +2 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +6 -3
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/ContentsList.d.ts +4 -1
- package/dist/render/components/ContentsList.js +1 -1
- package/dist/render/components/CurrentRecord.d.ts +23 -0
- package/dist/render/components/CurrentRecord.js +1 -0
- package/dist/render/components/Flex.d.ts +3 -2
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +2 -0
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroPoster.d.ts +2 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +3 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +3 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +5 -3
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +3 -0
- package/dist/render/components/SiteGutterFrame.d.ts +1 -0
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/goldPhrases.js +2 -2
- package/dist/render/lib/content/block-size.d.ts +3 -0
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/box-shared-columns.js +1 -1
- package/dist/render/lib/content/box-show-for.d.ts +14 -0
- package/dist/render/lib/content/box-show-for.js +1 -0
- package/dist/render/lib/content/page-contents.d.ts +1 -0
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/content/picture-focus-rows.d.ts +13 -0
- package/dist/render/lib/content/picture-focus-rows.js +1 -0
- package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +2 -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-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +21 -7
- 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/borders.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/show-for.d.ts +2 -0
- package/dist/render/lib/document/passes/show-for.js +1 -0
- package/dist/render/lib/document/show-when.d.ts +1 -1
- package/dist/render/lib/document/show-when.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
- package/dist/editor/components/PartInkControl.d.ts +0 -7
- package/dist/editor/components/PartInkControl.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as j,jsx as e,jsxs as to}from"react/jsx-runtime";import{useId as zs}from"react";import{parseHexColor as Js}from"efficient-shell/format";import Ks from"./BoxTabs.js";import{BoxTabPaneContext as Ys,useIsTabPane as Vs}from"./BoxTabPaneContext.js";import{CellFillContext as qs,InBoxContext as Qs,useCellOfStretchedRow as Zs,useFillsCell as oe}from"./InBoxContext.js";import se,{InsideSiteColumn as Zo,useInsideSiteGutter as ee,useSectionRoot as te}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as re}from"./BoxSurfaceContext.js";import ne from"./PictureWash.js";import{BoxCellWidthContext as le}from"./BoxCellWidthContext.js";import{useInSiteHeader as ae}from"./PhoneMenuTools.js";import{useCardRow as ce}from"./CardRowContext.js";import{framesItsCards as me}from"../../format/lib/content/card-place.js";import{MirrorContext as ie,useMirroredCopy as ue,useUnderCardBox as de}from"./MirrorContext.js";import{isMirroredCopy as fe,mirrorCardsActs as Ce,mirroredBoxClass as Se,MIRROR_ROW_CLASS as pe,ownsCard as be}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as ro,FRAME_GUTTER as no}from"./BlockFrame.js";import{containerGapProps as xe}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as he,boxBlockSpacingClass as $e,boxFitContentClass as _e,boxRowColumnsClass as ye,boxRowTabletColumnsClass as Pe,boxRowTabletShareClass as Re,boxPhoneCellsShareLine as Ae,boxPhoneRowClasses as E,boxPhoneRowFits as Le,boxShareClasses as _,boxShareVars as we,boxWrapClass as Oe}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Be,boxSeparatorSeamClass as Ne,boxSeparatorStyle as ve,isStripBox as Ee}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Te,DEFAULT_LOOP_DIRECTION as ke,DEFAULT_LOOP_SECONDS as Fe,isVerticalLoop as ge}from"../../format/lib/animation/index.js";import{LoopTrack as De}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as i,BOX_OWNS_SIDES_CLASS as Ie,boxDarkenStyle as Me,boxPlacementClasses as We,CARD_SHADOW_CLASS as je,isBackgroundBox as os}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as ss}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as He,drawsSiteGutter as Ue}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Xe,boxShapeClasses as Ge}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as ze,BOX_LINK_ATTR as es,BOX_LINK_CLASS as ts,BOX_LINKED_CLASS as Je,boxJumpBlocksClass as Ke,boxJumpCss as Ye,boxJumpSlug as Ve,boxLinkOf as qe}from"../../format/lib/content/box-link.js";import{SiteLink as Qe}from"../lib/site-runtime.js";import{sectionBorderStyle as rs}from"../../format/lib/content/borders.js";import{finiteNumber as u}from"../../format/lib/finite-number.js";import{sectionPadAttrs as Ze}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as H}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as ot}from"../../format/lib/content/ink.js";import{sizedBackground as lo}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as st,resolveImageTreatment as et}from"../../format/lib/content/image-treatment.js";import{BoxRail as tt,BoxRailStop as rt,RAIL_STOPS_CLASS as nt,useTimelineRail as lt}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as at,sharedColumnsClasses as ct,sharedColumnsCss as mt}from"../lib/content/box-shared-columns.js";import it from"./PhotoHoverSheet.js";const ao={"--sf-site-gutter":"0px"},ut={overflowX:"clip",overflowY:"visible"},dt={desktop:!1,phone:!1},ns="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",co=o=>o==null||o==="",mo=o=>!co(o)&&Number(o)===0;function ft({children:o}){return e(j,{children:o(zs())})}function Ct({direction:o,label:ls,tabShape:as,gap:io,gapPhone:cs,gapTablet:U,justify:T,align:p,wrap:uo,share:n,sharePhone:k,shareTablet:y,wrapPhone:ms,phoneRow:P,columns:R,columnsTablet:F,separator:a,blockSpacing:is,bgImage:A,bgImagePhone:fo,pictureHover:us,darken:ds,darkenStyle:fs,placement:Cs,padV2:Co=!1,border:So,borderTablet:po,borderPhone:bo,pad:r={},contained:X=!0,fillHeight:d=!1,shadow:xo,loop:b,scrollDirection:G=ke,loopSeconds:Ss=Fe,loopDelay:ps=Te,editing:ho=!1,fillColor:$o,line:x,upcoming:bs,link:xs,boxShape:_o,boxShapePhone:hs,boxShapeTablet:$s,jumpHighlight:_s,anchor:ys,sharedSides:g=dt,boxId:yo,mirrorCards:Ps,content:f}){const h=ho?"":qe(xs),c=d?"":Ge(_o,hs,$s),Rs=!d&&Xe(_o)!=="",C=Ve(_s,ys),z=typeof $o=="string"?Js($o.trim()):null,Po=z?{backgroundColor:z}:void 0,Ro=lt(),J=x===!0&&o!=="tabs",t=os(A),D=ae(),As=te(),Ao=Vs(),K=oe(),Ls=Zs(),L=Ee(o,a),l=b==="scroll"&&o!=="tabs",$=ce(),ws=ue(),Os=de(),I=be({inCopy:$!==null,nestedCopy:$?.nested===!0,underBox:Os}),Y=I&&me($?.ownerType),Lo=Ce({direction:o,separator:a,loop:b,line:x,bgImage:A,columns:R,columnsTablet:F,share:n,wrap:uo},I,g.desktop)&&fe(Ps,$?.index),wo=t||I?"":Se(ws,o,l?void 0:T,p),w=ye({direction:o,separator:a,loop:b,line:x,columns:R}),O=Pe({direction:o,separator:a,loop:b,line:x,columnsTablet:F}),M=Re({direction:o,separator:a,loop:b,line:x,columns:R,columnsTablet:F,share:n,shareTablet:y}),Bs=ee(),W=ct(g,f.blockCount??0),Ns=W&&(!$||$.index===0)?mt(g,f.blockCount??0):"",Oo=O!==""?Number(F)>=2:M===""||_(y)!=="",Bo=O!==""||M!=="",vs=o==="row"&&!L&&!l&&x!==!0,Es=w!==""?Number(R)>=2:_(n)!=="",No=[_(n),o==="row"?_e(n):"",w,O,M,$e(is),Be(o,a)].filter(Boolean).join(" "),Ts=No?` ${No}`:"",vo=["flex",o==="row"?L||l?"flex-row":`flex-row ${E(P,k,ms)}`:"flex-col",Oe(l?!1:uo),t?We(Cs??"center",o):he(l?void 0:T,p)+(wo?` ${wo}`:"")].join(" ")+Ts,B=d||t||c||K?` ${H}`:"",V=Rs?` ${c}`:c?`${B} ${c}`:B,Eo=Ls&&o==="column"&&!t&&!l&&_(n)===""&&typeof T=="string"&&T!=="start",To=B||(Eo?` ${H}`:""),q=h?` ${Je}`:"",Q=t||D||Co?"":" py-6",ks=`${ro}${Q} ${no}${V}${q}`,Fs=D?`${V}${q}`.trim():`w-full${Q}${V}${q}`,N=xe("Flex",io,o==="row"?"inline":"block",cs,L||l?void 0:U),ko=we(n,y,o==="row"?f.blockCount??0:0),Fo=L?{...N.style,...ve(o,a)}:N.style,gs=ko?{...Fo,...ko}:Fo,go=(s="")=>e(f,{className:`${vo}${Lo?` ${pe}`:""}${N.className}${To}${s?` ${s}`:""}${J?` ${nt}`:""}${C?` ${Ke(C)}`:""}${W}`,style:gs,minEmptyHeight:120}),Do=ge(G)?"":Ne(o,a),Io=l?e(De,{direction:G,seconds:Ss,delay:ps,editing:ho,copy:s=>go(s&&Do?`${s} ${Do}`:s)}):go(),Mo=o==="tabs"?e(Ks,{className:`${vo}${N.className}${K&&!d&&!t&&!c?"":B}`,style:N.style,shape:as,children:Io}):Io,Wo=Ao?e(Ys.Provider,{value:!1,children:Mo}):Mo,jo=o==="row"&&!t&&(p===void 0||p==="stretch"),Ds={stretchedRow:jo,fillingColumn:o==="column"&&(K||Eo),columnsRow:w!==""||O!==""||W!==""||o==="row"&&(Array.isArray(n)||Array.isArray(y)),...jo&&vs&&(f.blockCount??0)>=2&&Es?{picturesFillRow:!0}:null,...Bo?{fillFrom:Oo?"tablet":"desktop"}:null,...Ae(P,k)&&(!Bo||Oo)?{phoneRowFills:!0}:null,...yo?{id:yo}:null},Ho=e(Qs.Provider,{value:Ds,children:e(qs.Provider,{value:!1,children:I?e(ie.Provider,{value:Lo,children:Wo}):Wo})}),Z=J?e(tt,{row:o==="row",stops:f.blockCount??0,children:Ho}):Ho,Is=ls?.trim()||(Ao?"":void 0),Ms={values:r,frame:Q?24:0},Ws=s=>Ro?e(rt,{on:Ro,future:bs===!0,children:s}):s,js=s=>h.startsWith("/")?e(Qe,{href:h,className:ts,"aria-labelledby":s,[es]:""}):e("a",{href:h,className:ts,"aria-labelledby":s,[es]:""}),Uo=(C?Ye(C):"")+Ns,Xo=Uo?e("style",{dangerouslySetInnerHTML:{__html:Uo}}):null,v=He({loop:b,direction:o,scrollDirection:G,bgImage:A}),Hs=g.desktop&&W!==""&&!z&&!rs(So,bo,po)&&Object.keys(ss(xo)).length===0&&!h&&!c&&!d&&!C&&!Ue(X&&!v,Bs)&&mo(io)&&(co(U)||mo(U))&&Co&&Object.values(r).every(s=>co(s)||mo(s)),Us=s=>({...Hs?{[at]:""}:null,...t?null:ss(xo),...C?{[ze]:C}:null,...s?{id:s}:null}),Go=w!==""?Number(R):0,Xs=E(P,k)===E(void 0),Gs=(o==="column"||o==="row"&&!L&&!l&&(Go===1&&Xs||Go===0&&f.blockCount===1))&&!t&&!J&&!D,zo=t&&As&&!D,Jo=(s,m)=>Ws(e(se,{contained:X&&!v,style:v?ao:void 0,framedClass:ks,fillClass:Fs,columnClass:`${ro} ${no}${To}`,tabLabel:Is,pad:t?void 0:Ms,border:rs(So,bo,po),outerAttrs:Us(m),box:!0,edge:Gs,outerStyle:t?void 0:Po,bleed:zo,children:Xo||m?to(j,{children:[Xo,m?js(m):null,v?e(Zo,{children:s}):s]}):v?e(Zo,{children:s}):s})),Ko=s=>h?e(ft,{children:m=>Jo(s,m)}):Jo(s);if(!t){const s=p===void 0||p==="stretch",m=(_(n)!==""||w!==""||O!=="")&&!Le(P,k)&&!(M!==""&&_(y)==="")&&(s||E(P)!==E(void 0));return Ko((o==="row"?m:o==="column"&&s)?e(le.Provider,{value:!0,children:Z}):Z)}const oo=Me(ds,fs),so=os(fo),Yo=so?{"--sf-box-bg":lo(A??""),"--sf-box-bg-p":lo(fo??"")}:{backgroundImage:lo(A??""),backgroundSize:"cover",backgroundPosition:"center"},Vo=et(void 0,void 0,us),S=Vo.className?Vo:null,eo=Ze({...r,top:u(r.top)??i.desktop,bottom:u(r.bottom)??i.desktop,topPhone:u(r.topPhone)??i.phone,bottomPhone:u(r.bottomPhone)??i.phone,left:u(r.left)??i.side,right:u(r.right)??i.side,leftPhone:u(r.leftPhone)??i.sidePhone,rightPhone:u(r.rightPhone)??i.sidePhone}),qo=e("div",{className:`relative z-[1] ${Ie} ${eo?.className??""}${d||c?` ${H}`:""}`.trimEnd(),style:oo?{...eo?.style,...ao,...ot}:{...eo?.style,...ao},children:Z}),Qo=zo&&X?e("div",{className:`${ro} ${no}${d||c?` ${H}`:""}`,children:qo}):qo;return Ko(e(j,{children:to("div",{className:`relative isolate overflow-hidden ${je}${B}${so&&!S?` ${ns}`:""}`,style:{...Y?ut:{},...Po,...S?{}:Yo},...S?{[st]:""}:{},children:[S&&to(j,{children:[e(it,{sheet:S.sheet}),e("div",{"aria-hidden":!0,className:`absolute inset-0${Y?" rounded-[inherit]":""}${so?` ${ns}`:""} ${S.className}`,style:{...Yo,...S.style??{}}})]}),e(ne,{wash:oo,...Y?{className:"rounded-[inherit]"}:{}}),oo?e(re,{children:Qo}):Qo]})}))}export{Ct as default};
|
|
@@ -60,6 +60,7 @@ export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, m
|
|
|
60
60
|
src?: string;
|
|
61
61
|
objectPosition?: string;
|
|
62
62
|
objectPositionPhone?: string;
|
|
63
|
+
objectPositionTablet?: string;
|
|
63
64
|
tintColor: string;
|
|
64
65
|
tintOpacity: number;
|
|
65
66
|
};
|
|
@@ -67,6 +68,7 @@ export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, m
|
|
|
67
68
|
src?: string;
|
|
68
69
|
objectPosition?: string;
|
|
69
70
|
objectPositionPhone?: string;
|
|
71
|
+
objectPositionTablet?: string;
|
|
70
72
|
tintColor: string;
|
|
71
73
|
tintOpacity: number;
|
|
72
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as m,jsx as
|
|
1
|
+
"use client";import{Fragment as m,jsx as r,jsxs as l}from"react/jsx-runtime";import u from"./HeroPoster.js";import{SectionAnimation as b}from"./SectionAnimation.js";import{resolveMedia as h}from"../lib/media.js";import{HERO_MEDIA_PARTS as g,HERO_PART_ATTR as v}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as P}from"../lib/animation/part-motion.js";import{pictureHoverOf as T}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as w,SITE_PHOTO_CSS as j,resolveImageTreatment as H}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as _,normaliseMediaLayout as k,resolvePhoneLayout as N}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as O,normaliseVideoSource as S,parseYouTubeId as A}from"../../format/lib/hero-video.js";import{hidableText as R}from"efficient-easel/draw";const V={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},C={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&&S(e.videoSource)==="youtube",i=e.isVideo&&O(e.videoPlayback)==="click",n=o?A(R(e.youtubeUrl)):null,t=k(e.mediaLayout);return{fromYouTube:o,onClick:i,youTubeId:n,backgroundFile:e.isVideo&&!o&&!i,desktopLayout:t,phoneLayout:N(e.mediaLayoutPhone,t),twoPictures:!e.isVideo&&_(e)>1}}function d(e,o){return y(P({_partMotion:e},o))}function c(e,o){return H(void 0,void 0,T(P({_partMotion:e},o)))}function B(e){return g.some(i=>c(e,i).className)?{hostAttrs:{[w]:""},sheet:j}:{}}function p({treatment:e,children:o}){return e.className?r("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):r(m,{children:o})}function x({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 f({part:e,editing:o,marked:i=!0,entrance:n,className:t,children:a}){const s=o&&i?{[v]:e}:void 0;return n?r(b,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:t,boxAttrs:s,children:a}):r("div",{className:t,...s,children:a})}function J({partMotion:e,editing:o,children:i}){const n=d(e,"media"),t=c(e,"media"),a=t.className?r("div",{className:`absolute inset-0 z-[1] ${t.className}`,...t.style?{style:t.style}:{},children:i}):i;return n?r(b,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:a}):r(m,{children:a})}function Q({desktopLayout:e,phoneLayout:o,editing:i,marked:n=!0,partMotion:t,first:a,second:s}){return l("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${C[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[r(f,{part:"image",editing:i,marked:n,entrance:d(t,"image"),className:"relative overflow-hidden",children:l(p,{treatment:c(t,"image"),children:[r(u,{posterSrc:h(a.src),showVideo:!1,objectPosition:a.objectPosition,objectPositionPhone:a.objectPositionPhone,objectPositionTablet:a.objectPositionTablet}),r(x,{color:a.tintColor,opacity:a.tintOpacity})]})}),r(f,{part:"image2",editing:i,marked:n,entrance:d(t,"image2"),className:`relative overflow-hidden${o==="one"?" max-[719px]:hidden":""}${e==="one"?" view-tablet:hidden":""}`,children:l(p,{treatment:c(t,"image2"),children:[r(u,{posterSrc:h(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone,objectPositionTablet:s.objectPositionTablet}),r(x,{color:s.tintColor,opacity:s.tintOpacity})]})})]})}export{J as HeroMediaLayer,f as HeroPickArea,p as HeroPictureHover,x as HeroTint,Q as HeroTwoPictures,q as heroMediaReading,d as heroPartEntrance,c as heroPartHover,B as heroPicturesHover};
|
|
@@ -5,7 +5,8 @@ interface HeroPosterProps {
|
|
|
5
5
|
playbackRate?: number;
|
|
6
6
|
objectPosition?: string;
|
|
7
7
|
objectPositionPhone?: string;
|
|
8
|
+
objectPositionTablet?: string;
|
|
8
9
|
quiet?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export default function HeroPoster({ videoSrc, posterSrc, showVideo, playbackRate, objectPosition, objectPositionPhone, quiet, }: HeroPosterProps): import("react").JSX.Element;
|
|
11
|
+
export default function HeroPoster({ videoSrc, posterSrc, showVideo, playbackRate, objectPosition, objectPositionPhone, objectPositionTablet, quiet, }: HeroPosterProps): import("react").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useEffect as m,useRef as
|
|
1
|
+
"use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useEffect as m,useRef as L,useState as a}from"react";import{SiteImage as P}from"../lib/site-runtime.js";import R from"./HeroHeldFrame.js";import{hasAv1Variant as A,isExternalMediaUrl as H}from"../lib/media.js";import{sizedImage as S}from"../../format/lib/sized-image.js";import{phoneFocus as _}from"../../format/lib/content/phone-focus.js";const $=.5;function M({videoSrc:d,posterSrc:f,showVideo:p=!0,playbackRate:v=$,objectPosition:l="50% 50%",objectPositionPhone:I,objectPositionTablet:g,quiet:y=!1}){const n=_(I,g),e=f||"",t=d||"",[c,u]=a(!1),[j,w]=a(!1),[k,F]=a(!1),[C,E]=a(!1),[b,h]=a(!1),z=L(null);m(()=>{u(!1),w(!1),F(!1),E(!1)},[d,f]),m(()=>{if(typeof window>"u")return;const s=()=>{const r=window;r.requestIdleCallback?r.requestIdleCallback(()=>h(!0),{timeout:2e3}):setTimeout(()=>h(!0),800)};if(document.readyState==="complete"){s();return}return window.addEventListener("load",s,{once:!0}),()=>window.removeEventListener("load",s)},[]),m(()=>{const s=z.current;if(!s)return;const r=()=>{s.playbackRate=v};return r(),s.addEventListener("loadedmetadata",r),()=>s.removeEventListener("loadedmetadata",r)},[d,v]);const x=H(e),i=e&&x&&!j?S(e):{src:e};return N("div",{className:"absolute inset-0 z-[1]",children:[o("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),e&&(x?o("img",{src:i.src,...i.srcSet?{srcSet:i.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>i.srcSet?w(!0):u(!0)},e):o(P,{src:e,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>u(!0)},e)),p&&!y&&t&&b&&!k&&N("video",{ref:z,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:l},onError:()=>F(!0),children:[A(t)&&o("source",{src:t.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),o("source",{src:t,type:"video/mp4"})]},t),p&&y&&t&&b&&!C&&(!e||c)&&o(R,{src:t,objectPosition:l,onError:()=>E(!0)},t)]})}export{M as default};
|
|
@@ -23,6 +23,7 @@ interface Props {
|
|
|
23
23
|
text?: string;
|
|
24
24
|
}[];
|
|
25
25
|
heightDesktop?: number;
|
|
26
|
+
heightTablet?: number;
|
|
26
27
|
heightMobile?: number;
|
|
27
28
|
showPicker?: boolean;
|
|
28
29
|
pickerShape?: HeroReelShape;
|
|
@@ -33,4 +34,4 @@ interface Props {
|
|
|
33
34
|
editing?: boolean;
|
|
34
35
|
partMotion?: Record<string, unknown>;
|
|
35
36
|
}
|
|
36
|
-
export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
|
|
37
|
+
export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as P}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as
|
|
1
|
+
"use client";import{jsx as n,jsxs as P}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as Ne,useRef as d,useState as k}from"react";import{markOverlayPortal as W}from"../../format/lib/document/overlay-portal.js";import Ae from"./Ticker.js";import{HeroSlideStyleContext as He}from"./HeroSlide.js";import Le from"./HeroArrows.js";import Me from"./Reel.js";import{TICKER_PART_ATTR as Ce}from"./PreviewTickerContext.js";import{useReducedMotion as Pe}from"./useReducedMotion.js";import{heroHeightBox as De}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ie}from"../lib/document/header-clearance.js";import{nextReel as Ve,normaliseHeroReelShape as $e,reelShown as ze}from"../../format/lib/reel.js";import{arrowsShown as Xe,arrowStep as Be}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ge,swipeStep as Ye}from"../../format/lib/hero-swipe.js";import{videoControlShown as je,videoHeld as qe}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as D}from"efficient-easel/draw";import{say as Z}from"../../format/lib/editor-words.js";import{markedChildren as ee}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as Ke,TICKER_MOTION_PART as Fe}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as Je}from"../../format/lib/content/ink.js";import{SectionAnimation as Qe}from"./SectionAnimation.js";import{entranceDrawn as Ue}from"../lib/animation/entrance.js";import{readPartMotion as We}from"../lib/animation/part-motion.js";import{scrim as te}from"../../format/lib/content/scrim.js";const Ze="Play video",et="Hold video",tt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",rt=()=>Z("item"),re=new Map;function ot(m,a){const l=m?.ownerDocument?.defaultView;if(l)return l.addEventListener(D,a),()=>l.removeEventListener(D,a)}function nt({slides:m,strip:a,alignment:l,textureOpacity:y,showTexture:E,textureColor:g,phoneUpDown:oe,phoneSideways:ne,autoplay:I,autoplayInterval:S,showTicker:se,tickerItems:V,heightDesktop:ce,heightTablet:ae,heightMobile:le,showPicker:ie,pickerShape:ue,pickerPlacement:de,showArrows:me,arrowsShape:fe,arrowsPlacement:he,editing:s,partMotion:pe}){const{className:ve,style:be}=De({heightDesktop:ce,heightTablet:ae,heightMobile:le}),$=(a?.blockCount??0)>0,xe=!$&&Ke({showTicker:se,tickerItems:V}),z=(V??[]).map(e=>e?.text?.trim()?e.text:s?rt():"").filter(Boolean),we=Ue(We({_partMotion:pe},Fe)),f=d(null),X=d(null),B=d(null),G=d(null),Y=Ne(),N=d(Y),[_,ke]=k([]),[ye,j]=k(0),b=d(0),[q,K]=k(!1),[Ee,F]=k(null),[R,ge]=k(!1),A=Pe(),T=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{j(e),F(o=>o===e?o:null),b.current=e,re.set(N.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||Y;N.current=t;const r=re.get(t);typeof r=="number"&&(j(r),b.current=r)},[]),w(()=>{const e=T();if(!e)return;const t=()=>{ke(o=>Ve(o,ee(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[T]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||N.current;r.id&&r.id!==p||i(r.index,!0)};return ot(f.current,e)},[s,i]);const c=_.length,u=Math.min(Math.max(ye,0),Math.max(0,c-1)),H=Ee===u,L=ze({shown:ie,count:c}),J=Xe({shown:me,count:c}),Q=je({editing:s,shown:u,slides:_}),_e=qe({editing:s,playing:R,controlShown:Q}),O=Ge({count:c,editing:s}),h=d(null),x=d(null),Re=v(e=>{if(h.current=null,x.current=null,!O||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[O]),Te=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Oe=v(()=>{const e=h.current,t=x.current;if(h.current=null,x.current=null,!O||!e||!t)return;const r=Ye(t.x-e.x,t.y-e.y,b.current,c);r!==b.current&&i(r)},[O,c,i]);w(()=>{if(s||!I||q||H||A||c<=1)return;const t=Math.max(1,typeof S=="number"?S:6)*1e3,r=window.setTimeout(()=>i((u+1)%c),t);return()=>window.clearTimeout(r)},[s,I,S,q,H,A,c,u,i]),w(()=>{const e=[X.current,B.current,G.current].filter(Boolean),t=e.map(o=>W(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),U=M??p.closest("[data-idx]");if(!U)return;o.stopPropagation(),o.preventDefault();const C=M?Be(M.dataset.heroNav,b.current,c):Number(U.dataset.idx);Number.isNaN(C)||(i(C,s),ee(T(),"data-slide-name")[C]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,T,s]);const Se=v(e=>{if(!e)return;const t=W(e),r=o=>{o.stopPropagation(),o.preventDefault(),ge(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(He.Provider,{value:{alignment:l,textureOpacity:y,textureOn:E,textureColor:g,quietVideo:_e,phoneUpDown:oe,phoneSideways:ne,holdReel:()=>F(u),reelHeld:H},children:P("div",{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${ve} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:be,onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),onTouchStart:Re,onTouchMove:Te,onTouchEnd:Oe,children:[n(m,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${u*100}%)`,transition:A?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Q&&n("div",{ref:Se,"data-hero-video-control":R?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ie} + 16px)`},children:P("button",{type:"button",className:tt,children:[n("span",{"aria-hidden":"true",children:R?"❚❚":"▶"}),Z(R?et:Ze)]})}),(L||J)&&P("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[L&&n(Me,{ref:X,slides:_,active:u,shape:$e(ue),placement:de}),J&&n(Le,{ref:G,shape:fe,placement:he})]}),L&&n("div",{ref:B,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:_.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===u?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),$&&a&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:te(.55),...Je},children:n(a,{})}),xe&&z.length>0&&n(st,{editing:!!s,entrance:we,children:n(Ae,{items:z,backdrop:"dark-media"})})]})})}function st({editing:m,entrance:a,children:l}){const y="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",E=m?{[Ce]:""}:void 0,g={background:te(.55)};return a?n(Qe,{desktop:a.desktop,phone:a.phone,editing:m,boxClass:y,boxAttrs:E,boxStyle:g,children:l}):n("div",{className:y,...E,style:g,children:l})}export{D as HERO_SLIDER_GOTO_EVENT,et as HERO_VIDEO_HOLD_LABEL,Ze as HERO_VIDEO_PLAY_LABEL,nt as default,ot as subscribeSliderGoto};
|
|
@@ -8,6 +8,7 @@ export interface HeroSingleProps {
|
|
|
8
8
|
poster?: string;
|
|
9
9
|
objectPosition?: string;
|
|
10
10
|
objectPositionPhone?: string;
|
|
11
|
+
objectPositionTablet?: string;
|
|
11
12
|
tintColor?: string;
|
|
12
13
|
tintOpacity?: number;
|
|
13
14
|
heightDesktop?: number;
|
|
@@ -18,6 +19,7 @@ export interface HeroSingleProps {
|
|
|
18
19
|
mediaImage2?: string;
|
|
19
20
|
objectPosition2?: string;
|
|
20
21
|
objectPosition2Phone?: string;
|
|
22
|
+
objectPosition2Tablet?: string;
|
|
21
23
|
tintColor2?: string;
|
|
22
24
|
tintOpacity2?: number;
|
|
23
25
|
videoSource?: string;
|
|
@@ -26,4 +28,4 @@ export interface HeroSingleProps {
|
|
|
26
28
|
editing?: boolean;
|
|
27
29
|
partMotion?: Record<string, unknown>;
|
|
28
30
|
}
|
|
29
|
-
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
|
|
31
|
+
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as _}from"react/jsx-runtime";import{useRef as J,useState as Q}from"react";import W from"./HeroPoster.js";import{HeroMediaLayer as X,heroMediaReading as Z,HeroPickArea as ee,heroPartEntrance as oe,heroPartHover as re,HeroPictureHover as te,heroPicturesHover as se,HeroTint as ie,HeroTwoPictures as ae}from"./HeroPictures.js";import{HeroVideoBackdrop as ne,HeroVideoPlayer as ce}from"./HeroVideoPlay.js";import{resolveMedia as t}from"../lib/media.js";import{heroHeightBox as le}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as me,overlayGradient as de}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as ue}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as c}from"../../format/lib/content/tint.js";import he from"./PhotoHoverSheet.js";function fe({overlay:L=100,overlayColor:j=c,overlayPosition:k=me,mediaType:l="image",mediaSrc:s,poster:m,objectPosition:d,objectPositionPhone:u,objectPositionTablet:h,tintColor:f=c,tintOpacity:p=0,heightDesktop:I,heightMobile:S,boxes:v,videoSource:E,youtubeUrl:A,videoPlayback:V,mediaLayout:O,mediaLayoutPhone:z,mediaImage2:M,objectPosition2:R,objectPosition2Phone:D,objectPosition2Tablet:F,tintColor2:Y=c,tintOpacity2:B=0,editing:o=!1,partMotion:r}){const{className:C,style:U}=le({heightDesktop:I,heightMobile:S}),i=l==="video",g=i?t(s):void 0,y=i?t(m):t(s)??t(m),{fromYouTube:b,onClick:P,youTubeId:H,backgroundFile:x,desktopLayout:G,phoneLayout:K,twoPictures:w}=Z({isVideo:i,videoSource:E,videoPlayback:V,youtubeUrl:A,mediaLayout:O,mediaLayoutPhone:z}),[T,$]=Q(!1),a=!T,q=J(null),n=l==="video"?"media":"image",N=se(r);return _("section",{ref:q,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${C} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:U,...N.hostAttrs,children:[e(he,{sheet:N.sheet}),e(X,{partMotion:r,editing:o,children:w?e(ae,{desktopLayout:G,phoneLayout:K,editing:o,partMotion:r,first:{src:s,objectPosition:d,objectPositionPhone:u,objectPositionTablet:h,tintColor:f,tintOpacity:p},second:{src:M,objectPosition:R,objectPositionPhone:D,objectPositionTablet:F,tintColor:Y,tintOpacity:B}}):e(ee,{part:n,editing:o,entrance:n==="image"?oe(r,"image"):null,className:"absolute inset-0 z-[1]",children:_(te,{treatment:n==="image"?re(r,"image"):{},children:[e(W,{videoSrc:x?g:void 0,posterSrc:y,showVideo:x,objectPosition:d,objectPositionPhone:u,objectPositionTablet:h}),b&&e(ne,{youTubeId:H,ownPoster:!!y,background:!P,editing:o})]})})}),P&&e(ce,{youTubeId:H,fileSrc:b?void 0:g,playing:T,onPlay:()=>$(!0),editing:o}),a&&!w&&e(ie,{color:f,opacity:p}),a&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:de(j,k),opacity:Math.min(Math.max(L,0),100)/100}}),a&&v&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:ue,children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{fe as default};
|
|
@@ -22,6 +22,7 @@ export interface HeroSlideProps {
|
|
|
22
22
|
poster?: string;
|
|
23
23
|
objectPosition?: string;
|
|
24
24
|
objectPositionPhone?: string;
|
|
25
|
+
objectPositionTablet?: string;
|
|
25
26
|
tintColor?: string;
|
|
26
27
|
tintOpacity?: number;
|
|
27
28
|
themeClassName?: string;
|
|
@@ -35,6 +36,7 @@ export interface HeroSlideProps {
|
|
|
35
36
|
mediaImage2?: string;
|
|
36
37
|
objectPosition2?: string;
|
|
37
38
|
objectPosition2Phone?: string;
|
|
39
|
+
objectPosition2Tablet?: string;
|
|
38
40
|
tintColor2?: string;
|
|
39
41
|
tintOpacity2?: number;
|
|
40
42
|
videoSource?: string;
|
|
@@ -42,5 +44,5 @@ export interface HeroSlideProps {
|
|
|
42
44
|
videoPlayback?: string;
|
|
43
45
|
partMotion?: Record<string, unknown>;
|
|
44
46
|
}
|
|
45
|
-
export default function HeroSlide({ name, process, mediaType, mediaSrc, videoSpeed, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, groups: Groups, editing, themeClassName, themeStyle, overlayColor, overlayPosition, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, videoSource, youtubeUrl, videoPlayback, partMotion, }: HeroSlideProps): import("react").JSX.Element;
|
|
47
|
+
export default function HeroSlide({ name, process, mediaType, mediaSrc, videoSpeed, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, groups: Groups, editing, themeClassName, themeStyle, overlayColor, overlayPosition, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, videoSource, youtubeUrl, videoPlayback, partMotion, }: HeroSlideProps): import("react").JSX.Element;
|
|
46
48
|
export declare const HERO_SLIDE_SEEDS: Record<string, unknown>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{createContext as se,useContext as ae,useState as ne}from"react";import le from"./HeroPoster.js";import{HeroMediaLayer as de,heroMediaReading as ce,HeroPickArea as ue,heroPartEntrance as pe,heroPartHover as fe,HeroPictureHover as me,heroPicturesHover as he,HeroTint as ye,HeroTwoPictures as ve}from"./HeroPictures.js";import{HeroVideoBackdrop as xe,HeroVideoPlayer as ge}from"./HeroVideoPlay.js";import{resolveMedia as s}from"../lib/media.js";import{heroPhoneStackStyle as be}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as He,heroTextureShown as Pe}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Se}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as C}from"../../format/lib/content/tint.js";import{overlayGradient as we,slideOverlayState as ke}from"../../format/lib/sections/hero-overlay.js";import Te from"./PhotoHoverSheet.js";const Ee=se({});function Le({name:f,process:a,mediaType:O="video",mediaSrc:n,videoSpeed:m,poster:h,objectPosition:y,objectPositionPhone:v,objectPositionTablet:x,tintColor:g=C,tintOpacity:b=0,groups:H,editing:t=!1,themeClassName:P,themeStyle:V,overlayColor:A,overlayPosition:D,mediaLayout:R,mediaLayoutPhone:z,mediaImage2:q,objectPosition2:B,objectPosition2Phone:F,objectPosition2Tablet:M,tintColor2:U=C,tintOpacity2:Y=0,videoSource:$,youtubeUrl:G,videoPlayback:K,partMotion:r}){const{alignment:_e="left",textureOpacity:S,textureOn:J,textureColor:Q,quietVideo:W,phoneUpDown:X,phoneSideways:Z,holdReel:ee,reelHeld:oe}=ae(Ee),o=O==="video",l=o?s(n):void 0,w=o?s(h):s(n)??s(h),te=typeof m=="number"?m/100:1,{fromYouTube:d,onClick:k,youTubeId:T,backgroundFile:c,desktopLayout:re,phoneLayout:ie,twoPictures:E}=ce({isVideo:o,videoSource:$,videoPlayback:K,youtubeUrl:G,mediaLayout:R,mediaLayoutPhone:z}),[u,L]=ne(!1);u&&oe===!1&&L(!1);const p=!u,i=ke({overlayColor:A,overlayPosition:D},Q),_=o?null:pe(r,"image"),j=he(r),I=e(me,{treatment:o?{}:fe(r,"image"),children:e(le,{videoSrc:c?l:void 0,posterSrc:w,showVideo:c,playbackRate:te,objectPosition:y,objectPositionPhone:o?void 0:v,objectPositionTablet:o?void 0:x,quiet:W})});return N("section",{className:P?`relative h-full w-full overflow-hidden ${P}`:"relative h-full w-full overflow-hidden",style:V,"data-slide-name":f??"","data-slide-process":a??"","data-slide-media":c&&l?"video":"still",...j.hostAttrs,children:[e(Te,{sheet:j.sheet}),e(de,{partMotion:r,editing:t,children:E?e(ve,{desktopLayout:re,phoneLayout:ie,editing:t,marked:!1,partMotion:r,first:{src:n,objectPosition:y,objectPositionPhone:v,objectPositionTablet:x,tintColor:g,tintOpacity:b},second:{src:q,objectPosition:B,objectPositionPhone:F,objectPositionTablet:M,tintColor:U,tintOpacity:Y}}):d||_?N(ue,{part:o?"media":"image",editing:t,marked:!1,entrance:_,className:"absolute inset-0 z-[1]",children:[I,d&&e(xe,{youTubeId:T,ownPoster:!!w,background:!k,editing:t})]}):I}),k&&e(ge,{youTubeId:T,fileSrc:d?void 0:l,playing:u,onPlay:()=>{L(!0),ee?.()},editing:t}),p&&!E&&e(ye,{color:g,opacity:b,passClicks:!1}),p&&Pe(J)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:i.own?we(i.color,i.position??void 0):He(i.color),...S!==void 0?{opacity:S/100}:null}}),p&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",t?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Se,...be(X,Z)},children:H&&e(H,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const Fe=Array.from({length:3},(f,a)=>({name:`Slide ${a+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{Fe as HERO_SLIDE_SEEDS,Ee as HeroSlideStyleContext,Le as default};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { type ImageAspect } from "../../format/lib/content/image-aspect.js";
|
|
1
2
|
import { type ImageFit } from "../../format/lib/content/image-fit.js";
|
|
2
3
|
import type { PictureHoverDrawn } from "../../format/lib/animation/hover.js";
|
|
3
4
|
import type { PadValues } from "../lib/content/section-padding.js";
|
|
4
|
-
type Aspect = "auto" | "21/9" | "16/9" | "4/3" | "1/1";
|
|
5
5
|
interface ImageBlockProps {
|
|
6
6
|
editing?: boolean;
|
|
7
7
|
src: string;
|
|
8
8
|
alt: string;
|
|
9
|
-
aspect:
|
|
9
|
+
aspect: ImageAspect;
|
|
10
|
+
aspectPhone?: unknown;
|
|
10
11
|
caption?: string;
|
|
11
12
|
contained: boolean;
|
|
12
13
|
grayscale?: boolean;
|
|
@@ -18,10 +19,11 @@ interface ImageBlockProps {
|
|
|
18
19
|
fit?: ImageFit;
|
|
19
20
|
focal?: string;
|
|
20
21
|
focalPhone?: string;
|
|
22
|
+
focalTablet?: string;
|
|
21
23
|
corners?: number;
|
|
22
24
|
cornerSides?: string[] | null;
|
|
23
25
|
pad?: PadValues;
|
|
24
26
|
ownSize?: boolean;
|
|
25
27
|
}
|
|
26
|
-
export default function ImageBlock({ src, alt, aspect, contained, grayscale, pictureHover, nextSrc, darken, darkenStyle, href, fit, focal, focalPhone, corners, cornerSides, pad, ownSize, editing, }: ImageBlockProps): import("react").JSX.Element | null;
|
|
28
|
+
export default function ImageBlock({ src, alt, aspect: storedAspect, aspectPhone, contained, grayscale, pictureHover, nextSrc, darken, darkenStyle, href, fit, focal, focalPhone, focalTablet, corners, cornerSides, pad, ownSize, editing, }: ImageBlockProps): import("react").JSX.Element | null;
|
|
27
29
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as
|
|
1
|
+
import{jsx as e,Fragment as F,jsxs as O}from"react/jsx-runtime";import{SiteLink as ne}from"../lib/site-runtime.js";import me from"./BlockFrame.js";import{useBoxCell as ce,useFillsCell as fe}from"./InBoxContext.js";import{useInsideSiteGutter as de,useSectionEdge as ue}from"./SiteGutterFrame.js";import{useSitePhotography as he}from"./SitePhotographyContext.js";import{media as T}from"../lib/media.js";import{CONTENT_SIZES as j,sizedImage as z}from"../../format/lib/sized-image.js";import{imageCornerStyle as pe}from"../../format/lib/content/image-corners.js";import{FILL_ROW as ge,imageAspectClasses as Se,imageFillFrom as Ne,imageAspectDrawn as ye,imageAspectDrawsARatio as Ce,imageFocalPointActs as Fe,imageFocalPointActsIn as P,imageAspectPhoneOf as be,imageFillRowClasses as we}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as Ae}from"../../format/lib/content/site-gutter.js";import{imageFitClass as U,parseImageFit as _e}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as $e}from"../../format/lib/content/section-min-height.js";import{NEXT_PICTURE_CLASS as Ie,PICTURE_FRAME_CLASS as xe,PICTURE_WASH_CLASS as ke,PICTURE_ZOOM_CLASS as ve,PICTURE_ZOOM_VAR as Re,resolveImageTreatment as Ee,resolveNextPicture as Le}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as W}from"../../format/lib/content/box-background.js";import{phoneFocus as Oe}from"../../format/lib/content/phone-focus.js";import{say as Te}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as je}from"../lib/content/section-edge.js";import B from"./PhotoHoverSheet.js";import ze from"./PictureWash.js";function Pe({src:o,alt:G,aspect:D,aspectPhone:l,contained:b,grayscale:M,pictureHover:r,nextSrc:w,darken:Z,darkenStyle:A,href:V,fit:X,focal:_,focalPhone:q,focalTablet:J,corners:K,cornerSides:Q,pad:$,ownSize:Y=!1,editing:I=!1}){const c=Ee(M,he(),r),S=ce(),H=fe(),t=ye(D,S?.picturesFillRow===!0),f=t===ge,x=Ne(S?.fillFrom,S?.phoneRowFills===!0,l),d=f?we(x):null,ee=be(t,l),a=_e(X,"cover"),k=pe(K,Q),se=Fe(a,t,l),i=Oe(P("mobile",a,t,l)?q:void 0,P("tablet",a,t,l)?J:void 0),u={...c.style??{},..._&&se?{objectPosition:_}:{},...i.style},h=o?z(T(o)):null,s=Le(r),n=s&&w?z(T(w)):null,p=s?r?.zoom??null:null,te=W(Z,A),v=s&&r?.darken?W(r.darken,A):null,N=!!(s&&(n||p||v)),R=N?{...s?.style??{},...p?{[Re]:p}:{}}:{},le=s&&n?e(F,{children:e("img",{src:n.src,...n.srcSet?{srcSet:n.srcSet,sizes:j}:{},alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",className:`absolute inset-0 h-full w-full bg-surface ${U(a)}${i.className?` ${i.className}`:""} ${s.className}`,...Object.keys(u).length?{style:u}:{}})}):null,y=o&&h?O(F,{children:[e("img",{src:h.src,...h.srcSet?{srcSet:h.srcSet,sizes:j}:{},alt:G,className:`${d?`${d.img} `:""}h-full w-full ${Ce(t,l)?U(a):""}${c.className?` ${c.className}`:""}${i.className?` ${i.className}`:""}`,...Object.keys(u).length?{style:u}:{}}),le]}):null,C=y?O(F,{children:[e(B,{sheet:c.sheet}),N&&s?e(B,{sheet:s.sheet,name:Ie}):null,p?e("div",{className:`${f?"absolute inset-0":"relative h-full w-full"} ${ve}`,children:y}):y,e(ze,{wash:te,hover:v,className:`pointer-events-none ${ke}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:Te("Image — set a path")}),g=(V??"").trim(),oe=g&&o?g.startsWith("/")?e(ne,{href:g,className:"block h-full w-full",children:C}):e("a",{href:g,className:"block h-full w-full",children:C}):C,E=ue(),re=de(),m=E&&!Y?je(E):null,L=$?{values:$,frame:f?0:24}:void 0,ae=L!==void 0&&Ae(m?!1:b,re),ie=f?H||I||ae?$e:"":"py-6";return!o&&!I?null:e(me,{contained:m?!1:b,className:ie,pad:L,...m?{fillWidth:m.className,style:m.style}:{},children:e("figure",{...d?{className:d.figure}:{},children:e("div",{className:`relative w-full overflow-hidden bg-surface ${Se(t,ee,x)}${N?` ${xe}`:""}`,...k||Object.keys(R).length?{style:{...k,...R}}:{},children:oe})})})}export{Pe as default};
|
|
@@ -3,6 +3,9 @@ export type BoxCell = {
|
|
|
3
3
|
stretchedRow: boolean;
|
|
4
4
|
fillingColumn: boolean;
|
|
5
5
|
columnsRow?: boolean;
|
|
6
|
+
picturesFillRow?: boolean;
|
|
7
|
+
fillFrom?: "tablet" | "desktop";
|
|
8
|
+
phoneRowFills?: boolean;
|
|
6
9
|
id?: string;
|
|
7
10
|
};
|
|
8
11
|
export declare const InBoxContext: import("react").Context<BoxCell | null>;
|
|
@@ -8,6 +8,7 @@ export declare function InsideSiteColumn({ children }: {
|
|
|
8
8
|
export declare function SplitBandAndColumn({ children }: {
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
}): import("react").JSX.Element;
|
|
11
|
+
export declare function useInsideBox(): boolean;
|
|
11
12
|
export declare function NestedBoxChoice({ atTop, nested }: {
|
|
12
13
|
atTop: ReactNode;
|
|
13
14
|
nested: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,Fragment as T}from"react/jsx-runtime";import{createContext as f,useContext as t}from"react";import{rootPadAttrs as k,wrapperPadAttrs as q}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as z,SECTION_BORDER_SELF_CLASS as H}from"../../format/lib/content/borders.js";import{drawsSiteGutter as J}from"../../format/lib/content/site-gutter.js";const
|
|
1
|
+
"use client";import{jsx as e,Fragment as T}from"react/jsx-runtime";import{createContext as f,useContext as t}from"react";import{rootPadAttrs as k,wrapperPadAttrs as q}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as z,SECTION_BORDER_SELF_CLASS as H}from"../../format/lib/content/borders.js";import{drawsSiteGutter as J}from"../../format/lib/content/site-gutter.js";const l=f(!1);function Z(){return t(l)}function $({children:n}){return e(l.Provider,{value:!0,children:n})}const h=f(!1);function b({children:n}){return e(h.Provider,{value:!0,children:n})}const S=f(!1);function K(){return t(S)}function ee({atTop:n,nested:r}){return e(T,{children:K()?r:n})}const u=f(void 0);function ne({children:n}){return e(u.Provider,{value:null,children:n})}function te(){return t(u)===void 0&&!t(S)&&!t(l)}function oe(){return t(u)??null}function M({contained:n,framedClass:r,fillClass:j,columnClass:w,style:C,tabLabel:y,pad:o,border:c,outerAttrs:m,box:g=!1,edge:A=!1,outerStyle:a,bleed:N=!1,children:B}){const F=t(l),P=t(h),d=J(n,F),s=d&&!P,v=o&&!s?k(o.values,o.frame):null,p=c&&!s?c:null,G=[s?r:j,v?.className,p?H:null].filter(Boolean).join(" "),E=Q(N&&s,v||p?{...C,...v?.style,...p}:C),L=t(u),D=g&&A&&L===void 0?{gutter:d,...o?{pad:o.values}:{}}:null,I=g?e(S.Provider,{value:!0,children:e(u.Provider,{value:D,children:B})}):B,x=d?e(l.Provider,{value:!0,children:I}):I,i=o&&s?q(o.values):null,R=m&&Object.keys(m).length>0?m:null,O=e("div",{...i?null:R,className:G,style:i||!a?E:{...E,...a},"data-tab-label":y,children:P?e(h.Provider,{value:!1,children:d&&!N?e("div",{className:w,children:x}):x}):x}),_=i?e("div",{...R,className:i.className,style:a?{...i.style,...a}:i.style,children:O}):O;return c&&s?e("div",{className:z,style:{display:"contents",...c},children:_}):_}function Q(n,r){return n?{...r,paddingLeft:0,paddingRight:0}:r}export{$ as InsideSiteColumn,ee as NestedBoxChoice,ne as NotASectionEdge,b as SplitBandAndColumn,M as default,K as useInsideBox,Z as useInsideSiteGutter,oe as useSectionEdge,te as useSectionRoot};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as a,jsx as t}from"react/jsx-runtime";import{Fragment as h}from"react";import{
|
|
2
|
-
`);return t(f,{value:e,children:s.map((r,c)=>a("span",{children:[
|
|
1
|
+
import{jsxs as a,jsx as t}from"react/jsx-runtime";import{Fragment as h}from"react";import{linePrefix as N,storefrontLines as L}from"../../format/lib/markup.js";import{WORD_STYLE_ATTR as _,WORD_STYLE_BY_KIND as S}from"../../format/lib/word-styles.js";import{partInkCss as g}from"../../format/lib/document/part-inks.js";import f from"./PartStyledText.js";import{withRMark as d}from"./RMark.js";function E(e,n=!1,s){const r=m(n),c=L(e);if(c.length===1){const[i]=c,o=N(i),b=o?C(o,i.children):i.children;return a(f,{value:e,children:[s,u(b,r)]})}const l=[];return c.forEach((i,o)=>{if(i.bullet){l.push(t("span",{"data-sf-bullet":"",className:k,children:u(i.children,r)},o));return}if(i.number!=null){l.push(a("span",{"data-sf-number":i.number,className:T,children:[a("span",{className:R,children:[i.number,"."]}),u(i.children,r)]},o));return}o>0&&!A(c[o-1])&&l.push(t("br",{},`br${o}`)),l.push(t(h,{children:u(i.children,r)},o))}),a(f,{value:e,children:[s,l]})}const k="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['·']",T="relative block pl-[2em]",R="absolute left-0 w-[1.6em] text-right tabular-nums";function A(e){return e.bullet||e.number!=null}const B="text-accent underline underline-offset-[0.18em]";function C(e,n){const[s,...r]=n;return s?.kind==="text"?[{kind:"text",text:`${e}${s.text}`},...r]:[{kind:"text",text:e},...n]}function I(e){return g(e)||void 0}function u(e,n){const s=[];let r=!1;return e.forEach((c,l)=>{if(c.kind==="text"){s.push(t("span",{children:d(c.text)},l)),r=!0;return}r||s.push(t("span",{},`e${l}`)),s.push(x(c,l,n)),r=!1}),r||s.push(t("span",{},"end")),s}function p(e,n){return e.length===1&&e[0].kind==="text"?d(e[0].text):e.map((s,r)=>s.kind==="text"?t(h,{children:d(s.text)},r):x(s,r,n))}function P(e,n=!1){return u(e,m(n))}function m(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function U(e){return t(f,{value:e,children:t("span",{children:e})})}function x(e,n,s){if(e.kind==="link")return t("a",{href:e.href,className:B,children:p(e.children,s)},n);const r=p(e.children,s),c=S[e.kind];if(c)return t("span",{[_]:c,children:r},n);switch(e.kind){case"underline":return t("u",{children:r},n);case"sup":return t("sup",{children:r},n);case"sub":return t("sub",{children:r},n);case"color":{const l=I(e.color);return l?t("span",{style:{color:l},children:r},n):t("span",{children:r},n)}case"accent":case"highlight":return t("em",{className:s,children:r},n);case"bold":return t("strong",{className:"font-semibold",children:r},n);case"italic":return t("em",{className:"italic",children:r},n);case"strike":return t("s",{className:"line-through",children:r},n);default:return t("span",{children:r},n)}}function Y(e,n=!0){const s=e.split(`
|
|
2
|
+
`);return t(f,{value:e,children:s.map((r,c)=>a("span",{children:[E(r,n),c<s.length-1?t("br",{}):null]},c))})}function v(e){return e.split(/\n\s*\n/).map(n=>n.trim()).filter(Boolean)}export{U as renderChrome,E as renderGold,Y as renderHeadline,P as renderMarkupNodes,v as splitParagraphs};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type BlockSizeKey } from "efficient-easel/draw";
|
|
2
2
|
export declare const BLOCK_SIZE_CLASS = "sf-block-size";
|
|
3
|
+
export declare const BLOCK_SHOW_KEY = "show";
|
|
4
|
+
export declare const blockPhoneHideClass: (props: Readonly<Record<string, unknown>>) => string;
|
|
3
5
|
export declare const TEXT_FIT_ATTR: {
|
|
4
6
|
readonly fit: "data-fit";
|
|
5
7
|
readonly fitPhone: "data-fit-phone";
|
|
@@ -8,6 +10,7 @@ export declare const TEXT_FIT_ATTR: {
|
|
|
8
10
|
};
|
|
9
11
|
export type BlockSizeTwin = {
|
|
10
12
|
desktop?: unknown;
|
|
13
|
+
tablet?: unknown;
|
|
11
14
|
phone?: unknown;
|
|
12
15
|
};
|
|
13
16
|
export type BlockSizeValues = Partial<Record<BlockSizeKey, BlockSizeTwin>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BLOCK_FIXED_WIDTH as
|
|
1
|
+
import{BLOCK_FIXED_WIDTH as T,BLOCK_SIZE_KEYS as F,parseBlockWidthFit as x,phoneKey as v,parseTextFit as k,tabletKey as g}from"efficient-easel/draw";import{partDisplayClass as L}from"../../../format/lib/content/part-display.js";const C="sf-block-size",E="show",N=e=>L(void 0,{block:e[v(E)]!==!1},"block"),r={fit:"data-fit",fitPhone:"data-fit-phone",min:"data-fit-min",minPhone:"data-fit-min-phone"},d=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,K={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"}},O={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-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"}},y={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},A={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)]"]}},D={minWidth:{desktop:["--sf-bmin","view-desktop:min-w-[var(--sf-bmin)]!"],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:["--sf-bmax","view-desktop:max-w-[var(--sf-bmax)]"],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)]"]}},H=["widthFit","width","minWidth","maxWidth"],u={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"};function z(e){const n=[],s={},o={},w=H.some(t=>{const i=e[t]?.tablet;return t==="widthFit"?x(i)!==void 0:d(i)!==void 0}),f=w?["desktop","tablet","phone"]:["desktop","phone"],b=(t,i)=>{const a=t(i?.desktop),m=w?t(i?.tablet)??a:a;return{desktop:a,tablet:m,phone:t(i?.phone)??m}},_=b(x,e.widthFit),S=b(d,e.width);for(const t of f){const i=_[t];!i||i==="fit"||(n.push(w?O[t][i]:K[t][i]),i==="fixed"&&(s[y[t]]=`${S[t]??T.fallback}px`))}for(const t of["minWidth","maxWidth"]){const i=b(d,e[t]);for(const a of f){const m=i[a];if(m===void 0)continue;const[W,I]=w?D[t][a]:A[t][a];s[W]=`${m}px`,n.push(I)}}const p=k(e.textFit?.desktop),l=k(e.textFit?.phone),c=d(e.minFont?.desktop),h=d(e.minFont?.phone);return p==="line"&&n.push(u.desktop),(l??p)==="line"&&n.push(u.phone),p&&(o[r.fit]=p),l&&(o[r.fitPhone]=l),c!==void 0&&(o[r.min]=String(c)),h!==void 0&&(o[r.minPhone]=String(h)),n.length===0&&Object.keys(o).length===0?null:{className:[C,...n].join(" "),style:s,attrs:o}}function Y(e){if(d(e.maxWidth?.desktop)!==void 0)return!0;const n=x(e.widthFit?.desktop);return n==="fill"||n==="fixed"}function j(e){const n={};for(const s of F){const o=e[s],w=e[g(s)],f=e[v(s)];(o!==void 0||w!==void 0||f!==void 0)&&(n[s]={desktop:o,tablet:w,phone:f})}return n}export{E as BLOCK_SHOW_KEY,C as BLOCK_SIZE_CLASS,r as TEXT_FIT_ATTR,N as blockPhoneHideClass,Y as blockSetsItsWidth,z as blockSizeOf,j as blockSizeValuesOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REPEAT_ATTRIBUTE as l,phoneKey as f,tabletKey as b}from"efficient-easel/draw";import{parseLoop as C}from"../../../format/lib/animation/loop.js";import{finiteNumber as S}from"../../../format/lib/finite-number.js";import{isBackgroundBox as _}from"../../../format/lib/content/box-background.js";import{isStripBox as g}from"../../../format/lib/content/box-separator.js";import{BOX_ALIGN_CLASS as r,boxRowColumnsClass as
|
|
1
|
+
import{REPEAT_ATTRIBUTE as l,phoneKey as f,tabletKey as b}from"efficient-easel/draw";import{parseLoop as C}from"../../../format/lib/animation/loop.js";import{finiteNumber as S}from"../../../format/lib/finite-number.js";import{isBackgroundBox as _}from"../../../format/lib/content/box-background.js";import{isStripBox as g}from"../../../format/lib/content/box-separator.js";import{CARD_STATE_ATTR as A}from"../../../format/lib/content/card-state.js";import{BOX_ALIGN_CLASS as r,boxRowColumnsClass as E,boxRowTabletColumnsClass as x}from"../../../format/lib/content/box-layout.js";const i="sharedColumns",$="shared",c="own",u="scroll",B="Row columns",K=[{value:c,label:"Each row"},{value:$,label:"Shared"}],F=[{value:c,label:"Each row"},{value:u,label:"Shared, scroll"}],O="(width >= 800px)",R="(width < 800px)";function N(t){const o={direction:t.direction,separator:t.separator,loop:C(t.loop),line:t.line};return o.direction==="row"&&!g(o.direction,o.separator)&&o.loop!=="scroll"&&o.line!==!0&&!_(typeof t.bgImage=="string"?t.bgImage:void 0)&&E({...o,columns:t.columns})===""&&x({...o,columnsTablet:t[b("columns")]})===""}function y(t){return Array.isArray(t)?t.filter(o=>typeof o?.type=="string").length:S(t?.blockCount)??0}function w(t){return N(t)&&a(y(t.content))>0?T(t[i],t[f(i)]):{desktop:!1,phone:!1}}const a=t=>Number.isInteger(t)&&t>0?t:0,d=t=>`sf-shared-cols-${t}`,m=t=>`sf-shared-cols-phone-${t}`;function T(t,o){return{desktop:t===$,phone:o===u}}function G(t,o){const n=a(o);return n?`${t.desktop?` ${d(n)}`:""}${t.phone?` ${m(n)}`:""}`:""}function p(t){const o=`[${l}]`;return`:has(> ${o} ${t}):not(:has(> ${o} ${o} ${t}))`}function h(t,o,n=""){const e=p(t);return`${e}{display:grid;grid-template-columns:${o};column-gap:0${n}}${e}>:not(:has(${t})):not(${t}){grid-column:1/-1}${e} :has(${t}),${e} ${t}{display:grid;grid-template-columns:subgrid;grid-column:1/-1;min-width:0}`}const L="data-sf-shared-plain";function D(t){const o=`[${l}]`,n=`[${L}]`,e=p(t)+`:not(:has(> :not(${o}) > :not(${n}) ${t})):not(:has(> ${o} > * > :not(${n}) ${t})):not(:has(:not(${n}) > :not(${n}) > ${t})):not(:has(> ${o}[${A}]))`,s=`${e}>:not(style):not(:has(${t})):not(${t})`;return`${e}{display:table;width:100%;border-collapse:collapse}${e}>:has(${t}),${e}>${o}>:has(${t}),${e} ${n}:has(${t}),${e} ${n}>:has(${t}){display:contents}${e} ${t}{display:table-row}${e} ${t}>*{display:table-cell;width:auto;vertical-align:top}${e} ${t}.${r.center}>*{vertical-align:middle}${e} ${t}.${r.end}>*{vertical-align:bottom}${s}{display:table-caption;caption-side:bottom}${s}:has(~ ${o}){caption-side:top}`}function X(t,o){const n=a(o);if(!n)return"";let e="";if(t.desktop){const s=`.${d(n)}`;e+=`@media ${O}{${h(s,`repeat(${n},auto)`)}${D(s)}}`}return t.phone&&(e+=`@media ${R}{${h(`.${m(n)}`,`repeat(${n},minmax(max-content,auto))`,";overflow-x:auto")}}`),e}export{i as SHARED_COLUMNS_KEY,B as SHARED_COLUMNS_LABEL,c as SHARED_COLUMNS_OFF,F as SHARED_COLUMNS_PHONE_POINTS,K as SHARED_COLUMNS_POINTS,L as SHARED_PLAIN_ATTR,G as sharedColumnsClasses,X as sharedColumnsCss,w as sharedColumnsDrawn,N as sharedColumnsFits};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface SelectedRanges {
|
|
3
|
+
selected: readonly string[];
|
|
4
|
+
known: readonly string[];
|
|
5
|
+
}
|
|
6
|
+
export declare const SelectedRangesProvider: import("react").Provider<SelectedRanges | null>;
|
|
7
|
+
export declare const useSelectedRanges: () => readonly string[] | null;
|
|
8
|
+
export declare function boxDrawsForRange(name: string | undefined, selected: readonly string[] | null, known: readonly string[]): boolean;
|
|
9
|
+
export declare const useInHiddenBox: () => boolean;
|
|
10
|
+
export declare function ShowForGate({ name, editing, children }: {
|
|
11
|
+
name: string | undefined;
|
|
12
|
+
editing: boolean;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}): ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as s,createElement as l,useContext as r}from"react";const o=s(null),i=s(!1),x=o.Provider,a=()=>r(o)?.selected??null;function d(e,t,n){return e===void 0||e===""||t===null||t.length===0||!n.includes(e)?!0:t.includes(e)}const f=()=>r(i);function p({name:e,editing:t,children:n}){const u=r(o);return t||d(e,u?.selected??null,u?.known??[])?n:l("div",{hidden:!0,style:{display:"none"}},l(i.Provider,{value:!0},n))}export{x as SelectedRangesProvider,p as ShowForGate,d as boxDrawsForRange,f as useInHiddenBox,a as useSelectedRanges};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ContentsEntry } from "../../components/ContentsList.js";
|
|
2
|
+
export declare const CONTENTS_NUMBER_FORM_KEY = "numberForm";
|
|
2
3
|
export declare const CONTENTS_ENTRIES_PROP = "_contentsEntries";
|
|
3
4
|
export declare const KICKER_NUMBER_PROP = "_kickerNumber";
|
|
4
5
|
export declare const KICKER_NUMBER_ATTR = "data-sf-kicker-number";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readHidable as
|
|
1
|
+
import{readHidable as x}from"efficient-easel/draw";import{isNodeList as h}from"efficient-easel/data";import{anchorSlug as M}from"../../../format/lib/content/anchor-name.js";import{namedRowField as I}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{resolveContainerDirection as S}from"../../../format/lib/content/container-direction.js";import{listNumberIn as B,readListNumberForm as F}from"../../../format/lib/content/list-number.js";import{stripMarkup as K}from"../../../format/lib/markup.js";const a="Contents",l="Flex",E="Text",v="numberForm",L="_contentsEntries",U="_kickerNumber",V="data-sf-kicker-number",j=n=>x(n).text.trim(),_=n=>M(n?.anchor),d=n=>String(n.props?.id??""),D=n=>!x(n.props?.text).hidden&&!P(n.props)&&!I(n.props);function u(n){return Object.values(n.props??{}).filter(h)}function R(n){for(const o of u(n))for(const t of o){if(t.props?._hidden)continue;if(t.type===E&&D(t))return t;if(t.type===E)continue;const s=R(t);if(s)return s}}function T(n){return u(n).some(o=>o.some(t=>t&&!t.props?._hidden&&(t.type===a||T(t))))}const N=n=>n.type===l&&S(l,n.props?.direction)==="row";function C(n){return u(n).some(o=>o.some(t=>t&&!t.props?._hidden&&(t.type===a||!N(t)&&C(t))))}function W(n){const o=[],t=(s,r)=>{for(const e of s){if(!e||e.props?._hidden)continue;if(e.type===a){r.open={contents:e,sections:r.waiting??[]},r.waiting=null,o.push(r.open);continue}if(N(e)&&C(e)){const i={inRow:!0,open:null,waiting:[]};for(const p of u(e))t(p,i);r.inRow||(r.open=null);continue}const c=r.open?.sections??r.waiting;if(e.type===l&&_(e.props)&&c&&!T(e)){c.push({box:e,kicker:R(e)});continue}for(const i of u(e))t(i,r)}};return t(n,{inRow:!1,open:null,waiting:null}),o}function X(n){return n.map(o=>({label:o.kicker?K(j(o.kicker.props?.text)):"",anchor:_(o.box.props)}))}function Y(n){const o=n?.length?W(n):[];if(!o.length)return null;const t=new Map,s=new Map;for(const r of o){const e=d(r.contents);e&&t.set(e,X(r.sections));const c=F(r.contents.props?.[v]);r.sections.forEach((i,p)=>{const f=i.kicker?d(i.kicker):"";f&&s.set(f,B(c,p))})}return{entries:t,numbers:s}}const Z=n=>n.endsWith(".")?`${n} `:`${n} · `;function nn(n){const o=n;if(!o?.content?.length)return n;const t=Y(o.content);if(!t)return n;const{entries:s,numbers:r}=t,e=c=>{let i=c.props??{},p=!1;for(const[O,m]of Object.entries(i)){if(!h(m))continue;const g=m.map(e);g.some((b,y)=>b!==m[y])&&(i={...i,[O]:g},p=!0)}const f=d(c),k=f?s.get(f):void 0;k&&(i={...i,[L]:k},p=!0);const w=f?r.get(f):void 0;return w&&(i={...i,[U]:w},p=!0),p?{...c,props:i}:c};return{...o,content:o.content.map(e)}}export{L as CONTENTS_ENTRIES_PROP,v as CONTENTS_NUMBER_FORM_KEY,V as KICKER_NUMBER_ATTR,U as KICKER_NUMBER_PROP,Z as kickerLead,Y as pageContentsDrawing,nn as withPageContents};
|