efficient-web-builder 67.8.1 → 68.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/dist/editor/components/BlockGapField.d.ts +4 -1
- package/dist/editor/components/BlockGapField.js +1 -1
- package/dist/editor/components/CornersField.d.ts +3 -1
- package/dist/editor/components/CornersField.js +1 -1
- package/dist/editor/components/SideSpaceField.d.ts +5 -1
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +0 -5
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +6 -1
- package/dist/editor/components/useSiteLengthRow.d.ts +15 -0
- package/dist/editor/components/useSiteLengthRow.js +1 -0
- package/dist/editor/lib/content/site-length-rows.d.ts +15 -0
- package/dist/editor/lib/content/site-length-rows.js +1 -0
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +2 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/choice-pictures.d.ts +2 -0
- package/dist/editor/lib/document/choice-pictures.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/shape-picker.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +2 -0
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/container-gap.d.ts +1 -0
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/css-length.d.ts +5 -6
- package/dist/format/lib/content/css-length.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +25 -11
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/grid-span.d.ts +4 -0
- package/dist/format/lib/content/grid-span.js +1 -1
- package/dist/format/lib/content/image-text-rows.d.ts +1 -0
- package/dist/format/lib/content/image-text-rows.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +2 -1
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +3 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +7 -0
- package/dist/format/lib/content/view-lines.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +2 -0
- package/dist/format/lib/editor-words-catalogue.js +2 -2
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/source-rules/site-length-writes.d.ts +18 -0
- package/dist/format/lib/source-rules/site-length-writes.js +2 -0
- package/dist/format/lib/theme.d.ts +5 -0
- package/dist/format/lib/theme.js +1 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +2 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +6 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +3 -1
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +2 -1
- package/dist/render/components/ViewHideRoot.js +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- 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-docbody.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/package.json +10 -6
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { type DrawLine } from "../../format/lib/content/view-lines.js";
|
|
2
3
|
type ViewHideClaim = {
|
|
3
4
|
readonly className: string;
|
|
4
5
|
readonly sectionClassName?: string;
|
|
5
6
|
readonly words: string;
|
|
6
7
|
readonly line?: ViewHideLineOf;
|
|
7
8
|
};
|
|
8
|
-
export type ViewHideLineOf =
|
|
9
|
+
export type ViewHideLineOf = DrawLine;
|
|
9
10
|
export declare const ViewHideContext: import("react").Context<ViewHideClaim | null>;
|
|
10
11
|
export declare const VIEW_HIDE_ATTR = "data-sf-view-hide";
|
|
11
12
|
export type ViewHideTake = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createContext as u,createElement as l,useContext as r}from"react";import{CellFillContext as w,InBoxContext as d}from"./InBoxContext.js";import{SECTION_HEIGHT_FILL_ATTR as C}from"../../format/lib/content/section-min-height.js";const a=u(null),m="data-sf-view-hide",N=e=>l(a.Provider,{value:null},e),f={className:"",attrs:{},scope:N},
|
|
1
|
+
"use client";import{createContext as u,createElement as l,useContext as r}from"react";import{CellFillContext as w,InBoxContext as d}from"./InBoxContext.js";import{SECTION_HEIGHT_FILL_ATTR as C}from"../../format/lib/content/section-min-height.js";import{drawsAtEdge as v}from"../../format/lib/content/view-lines.js";const a=u(null),m="data-sf-view-hide",N=e=>l(a.Provider,{value:null},e),f={className:"",attrs:{},scope:N},H=f,p=u(null),F=(e,s)=>e?{className:e,views:s}:null,E=e=>l(a.Provider,{value:null},l(p.Provider,{value:null},l(w.Provider,{value:!0},e))),P=(e,s,o={})=>e?{className:e,words:s,...o}:null,x=(e,s)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:v(e.line??"by-box",s)?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function T(){const e=r(a),s=r(p),o=r(d)!==null;if(e===null&&s===null)return H;const t=e===null?null:x(e,o);return s===null?{className:t.className,attrs:{[m]:t.words},scope:N}:{className:t?`${t.className} ${s.className}`:s.className,attrs:{...t?{[m]:t.words}:{},[C]:s.views},scope:E}}function V(){const e=r(a),s=r(d)!==null;return e===null?"":x(e,s).className}const k=(e,s)=>s?e?`${e} ${s}`:s:e;function $(e){const s=T(),o=e.takes===!1?f:s,t={};let c=!1;for(const[n,i]of Object.entries(e))n==="as"||n==="takes"||n==="children"||(n==="className"?(t.className=k(i,o.className),c=!0):t[n]=i);return!c&&o.className&&(t.className=o.className),o.scope(l(e.as??"div",{...t,...o.attrs},e.children))}export{p as HeightFillContext,$ as HideTaker,f as NO_HIDE,m as VIEW_HIDE_ATTR,a as ViewHideContext,F as heightFillClaim,V as usePeekViewHide,T as useTakeViewHide,P as viewHideClaim,k as withViewHide};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FULL_SECTION_WIDTH as v,SITE_WIDTH_CAP as b,siteSideRoom as u}from"../../../format/lib/content/page-width.js";import{padSideAttrs as $}from"./section-padding.js";const y=" [--sf-edge-t:max(0px,calc(var(--sf-site-width,1600px)_-_100%_-_2_*_var(--sf-edge-g)))] [--sf-edge-al:min(var(--sf-edge-l),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-r))))] [--sf-edge-ar:min(var(--sf-edge-r),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-l))))]",h="[--sf-edge-g:0px] [--sf-edge-al:var(--sf-edge-l)] [--sf-edge-ar:var(--sf-edge-r)]",E="[--sf-edge-l:var(--sf-edge-ld,0px)] [--sf-edge-r:var(--sf-edge-rd,0px)] max-view-desktop:[--sf-edge-l:var(--sf-edge-lt,var(--sf-edge-ld,0px))] max-view-desktop:[--sf-edge-r:var(--sf-edge-rt,var(--sf-edge-rd,0px))] max-view-
|
|
1
|
+
import{FULL_SECTION_WIDTH as v,SITE_WIDTH_CAP as b,siteSideRoom as u}from"../../../format/lib/content/page-width.js";import{padSideAttrs as $}from"./section-padding.js";const y=" [--sf-edge-t:max(0px,calc(var(--sf-site-width,1600px)_-_100%_-_2_*_var(--sf-edge-g)))] [--sf-edge-al:min(var(--sf-edge-l),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-r))))] [--sf-edge-ar:min(var(--sf-edge-r),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-l))))]",h="[--sf-edge-g:0px] [--sf-edge-al:var(--sf-edge-l)] [--sf-edge-ar:var(--sf-edge-r)]",E="[--sf-edge-l:var(--sf-edge-ld,0px)] [--sf-edge-r:var(--sf-edge-rd,0px)] max-view-desktop:[--sf-edge-l:var(--sf-edge-lt,var(--sf-edge-ld,0px))] max-view-desktop:[--sf-edge-r:var(--sf-edge-rt,var(--sf-edge-rd,0px))] max-view-wide:[--sf-edge-l:var(--sf-edge-lp,var(--sf-edge-lt,var(--sf-edge-ld,0px)))] max-view-wide:[--sf-edge-r:var(--sf-edge-rp,var(--sf-edge-rt,var(--sf-edge-rd,0px)))]",i="max-w-[100vw]",N=`ml-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-al)))] mr-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-ar)))] w-[calc(100%_+_2_*_var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-ar))] ${i}`;function _(s){const r={},e=s.pad??{},g=$({left:e.left,right:e.right},{left:e.leftPhone,right:e.rightPhone},{left:e.leftTablet,right:e.rightTablet},{left:e.left,right:e.right},{desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},0,s.site?"site":"box"),t=g.style;for(const[f,x]of[["l","paddingLeft"],["r","paddingRight"]]){const n=t[x];n!==void 0&&(r[`--sf-edge-${f}d`]=typeof n=="number"?`${n}px`:String(n));const c=t[`--sf-pad-${f}-tablet`],o=t[`--sf-pad-${f}-phone`];c!==void 0&&(r[`--sf-edge-${f}t`]=String(c)),o!==void 0&&(r[`--sf-edge-${f}p`]=String(o))}const a=u(s.site?"site":"box"),d=g.classes.includes(a.className.split(" ")[0]);return{className:`${s.gutter?`${a.className} ${a.edge}${y}`:`${h}${d?` ${a.className}`:""}`} ${E}`,style:r}}function D(s){const{className:r,style:e}=_(s);return{className:`${r} ${N}`,...Object.keys(e).length?{style:e}:{}}}const p="[--sf-edge-bl:max(0px,min(calc(var(--sf-edge-beyond)_+_(var(--sf-edge-l)_-_var(--sf-edge-r))_/_2),calc(2_*_var(--sf-edge-beyond))))] [--sf-edge-br:max(0px,min(calc(var(--sf-edge-beyond)_+_(var(--sf-edge-r)_-_var(--sf-edge-l))_/_2),calc(2_*_var(--sf-edge-beyond))))]";function S(s){const r=_(s).style,e=a=>{const d=r[`--sf-edge-${a}d`]??"0px",l=r[`--sf-edge-${a}t`]??d;return[d,l,r[`--sf-edge-${a}p`]??l]},[g,t]=[e("l"),e("r")];return g.every((a,d)=>a===t[d])}const m="--sf-edge-beyond";function R(s){return`max(0px,calc((${s===null?v:`min(${v},${s})`} - ${b}) / 2))`}function B(s){const r=s.beyond;return r===void 0||r==="0px"?null:{className:S(s)?"mx-[calc(-1_*_var(--sf-edge-beyond))] px-[var(--sf-edge-beyond)]":`${p} ml-[calc(-1_*_var(--sf-edge-bl))] mr-[calc(-1_*_var(--sf-edge-br))] pl-[var(--sf-edge-bl)] pr-[var(--sf-edge-br)]`,style:{[m]:r}}}const w=`${p} ml-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-bl)))] mr-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-ar)_+_var(--sf-edge-br)))] w-[calc(100%_+_2_*_var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-ar)_+_var(--sf-edge-bl)_+_var(--sf-edge-br))] pl-[calc(var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-bl))] pr-[calc(var(--sf-edge-g)_+_var(--sf-edge-ar)_+_var(--sf-edge-br))] ${i}`;function I(s){const{className:r,style:e}=_(s);return{className:`${r} ${w}`,style:{...e,[m]:s.beyond??"0px"}}}export{m as EDGE_BEYOND_VAR,R as groundBeyond,D as sectionEdgeAttrs,I as sectionEdgeBandAttrs,B as sectionEdgeBeyondAttrs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{siteLengthHeld as G,storedUnit as
|
|
1
|
+
import{siteLengthHeld as G,storedUnit as b}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as M}from"../../../../../format/lib/content/section-width.js";import{CELL_SPAN_KEYS as W}from"../../../../../format/lib/content/grid-span.js";import{BLOCK_LENGTH_KEYS as C,blockLengthUnitKey as Y}from"../../../content/block-size.js";import{viewStoreKeys as F}from"../../../../../format/lib/animation/views.js";import{BOX as v,INNER_BOX as I,LABEL_FACE as U,TEXT as R,boxPadding as w,fillSlot as O,token as X}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as V,LEGACY_ENTRANCE_KEY as $}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as j}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as z}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as J}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as q}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as S}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as Q}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as Z,SITE_GUTTER_PHONE as tt,normalizeSiteGutter as ot,normalizeSiteGutterPhone as et,siteGutterPhoneFollows as nt}from"../../../../../format/lib/content/page-width.js";import{BAND_TO_SECTION_PAD as A,bandTopBottom as it}from"../../../content/section-padding.js";import{ButtonBlockMeta as rt}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{innerPaddingFallback as st}from"../../passes/section-padding.js";import{finiteNumber as u}from"../../../../../format/lib/finite-number.js";import{convertTheme as x,hasWords as dt}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as ct}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as H}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as at}from"efficient-shell/format";import{convertLength as pt}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as lt,surfacePresetIndex as mt,surfaceTwoTone as gt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as Pt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as ft}from"../../../../../format/lib/content/view-tier.js";const s=(t,o,e,n)=>o===e?t:pt(t,o,e,n,{min:0,max:200,step:4});import{BOX as Bo,DIM as No,INNER_BOX as Co,TEXT as Io}from"../../../../../format/lib/document/seed-parts.js";const qt={textFit:"line",textFitPhone:"wrap"},ht={...R,[Q]:""},{label:Qt,href:Zt,...ut}=rt.defaultProps,to=ut,oo={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},eo={...v,sectionAccent:0},no={sectionAccent:-1},io=[...W,"sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",J.unitKey,...q,...z,"anchor",$,...Pt,...V,...j,...F(["widthFit",...C,...C.map(Y)]),...Object.values(M)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",ro={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},so=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function Tt(t,o){const e=u(t.sectionPaddingTop)??0,n=u(t.sectionPaddingBottom)??0,i=u(t.sectionPaddingTopTablet),r=u(t.sectionPaddingBottomTablet),c=b(t.sectionPaddingUnit),l=b(t.sectionPaddingUnitTablet),m=b(t.sectionPaddingUnitPhone),f=(g,a,h,p)=>{const d=u(g);if(d!==void 0)return d+s(p,"px",m,"mobile");const N=a===void 0?{n:h,unit:c}:{n:a,unit:l};return s(N.n,N.unit,m,"mobile")+s(p,"px",m,"mobile")},T=(g,a,h,p,d)=>a!==void 0?{[g]:a+s(d??p,"px",l,"tablet")}:d===void 0?{}:{[g]:s(h,c,l,"tablet")+s(d,"px",l,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...T("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...T("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:f(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:f(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const co=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>Tt(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function B(t,o){const e={};for(const[i,r]of A)t[i]!==void 0&&(e[r]=t[i]);const n=it(t,st(o));return{...e,sectionPaddingTop:n.top,sectionPaddingBottom:n.bottom}}const ao=t=>[...A.map(([o,e])=>[o,e,(n,i)=>B(i,t)[e]]),["sectionPaddingTop","sectionPaddingTop",(o,e)=>B(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>B(e,t).sectionPaddingBottom]],bt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},po=t=>o=>dt(o.props[t])?[bt]:[],xt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),lo=t=>({kind:"group",name:"Chip",props:{...I,...O("main"),...w(6,14)},parts:[xt(t,{color:"background",...X("label",12),weight:600,letterSpacing:.16})]}),L=t=>t.background!=="transparent",_t=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},k={align:"right",alignPhone:"left"},Et=(t,o,e)=>{const n=i=>_t(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},mo=(t,o,e,n={})=>Et(t,o,{...ht,...k,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...k}}}),_=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:x(o)?.selected??0,K="var(--site-surface-2)",y=(t,o)=>x(o)?.themes[_(t.sectionAccent??0,o)],Ot=(t,o)=>(e,n)=>{if(!o?.(e,n))return O(t);const i=y(e,n)?.[t];return i?{fillColor:i}:{}},go=(t,o)=>E(t,o)>=0,D=t=>t.startsWith("#")&&at(t)!==null,Po=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};const i=H(n);if(i)return O(i);const r=n===K?y(o,e):void 0;return r?{fillColor:gt(r)}:{}},fo=t=>{const o=t?.trim();return!o||o==="transparent"||o===ct||H(o)||o===K||D(o)?void 0:"it paints a colour that no Box Fill can hold"},E=(t,o)=>{const e=x(o)?.themes;return e&&L(t)?lt(e,_(t.sectionAccent,o)):-1},ho=(t,o,e)=>{const n=E(o,e);return n>=0?n:t},uo=(t,o)=>{const e=x(o)?.themes,n=e?mt(e,_(t,o)):-1;return n>=0?n:t},To=(t,o)=>{const e=E(t,o);return e>=0?{sectionAccent:e}:{}},bo=(t,o)=>L(t.props)&&E(t.props,o)<0?[{kind:"band-preset",page:_(t.props.sectionAccent,o)}]:[],xo=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:l}=t.site??{},m=ft(o),f=(g,a,h)=>{const p=b(a),d=G(g,p,"spacing",h);return d===null?null:s(d,p,"px",m)},T=o==="desktop"?f(i,r,Z)??ot(i):f(c,l,tt)??et(c)??nt(i,r);return s(Math.min(n,T),"px",e,m)},St=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),_o=t=>({top:0,right:0,bottom:0,left:0,...t}),Eo=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...St,...Ot("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],S.kind,S.duration,S.delay],parts:n});export{qt as AUTO_COLUMN,Bo as BOX,to as BUTTON,No as DIM,ro as DROP_COMMON,so as DROP_SIDE_PADDING,no as FOLLOW_THE_BOX,bt as HEADING_CASE_UPPER,Co as INNER_BOX,St as NO_PAD,ht as NUMBER_TEXT,k as RIGHT_WORDS,io as SAME_KEYS,eo as SECTION_BOX,oo as SH_LINK,Io as TEXT,ho as bandAccent,E as bandIndex,_ as bandPage,To as bandProps,bo as bandWrites,Ot as fillFrom,fo as fillNoBoxHolds,lo as filledChip,po as headingCaseOf,B as innerPad,ao as innerPadKeys,mo as leadLine,Et as leadText,_o as lineSides,_t as numberAndUnit,go as onBandPreset,Po as ownFill,Eo as pictureCell,y as sectionPage,xo as siteGutterOf,xt as smallText,uo as surfaceAccent,Tt as wrapperPad,co as wrapperPadKeys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseBlocks as k,sectionAnchorIds as y,shownSections as _}from"../../../../components/DocBody.js";import{SECTION_WIDTH_KEYS as P}from"../../../../../format/lib/content/section-width.js";import{
|
|
2
|
-
`)}:{kind:"p",text:o.text}),s={...
|
|
1
|
+
import{parseBlocks as k,sectionAnchorIds as y,shownSections as _}from"../../../../components/DocBody.js";import{SECTION_WIDTH_KEYS as P}from"../../../../../format/lib/content/section-width.js";import{CELL_SPAN_KEYS as b}from"../../../../../format/lib/content/grid-span.js";import{STACK_BELOW_PROP as S}from"../../../content/box-stack-line.js";import{DIM as p,DROP_COMMON as f,INNER_BOX as e,SECTION_BOX as x,TEXT as r,smallText as a,wrapperPad as B,wrapperPadKeys as O}from"./section-to-box-row-parts.js";import{fluidToken as E,token as T}from"./section-head-looks.js";import{labelStyle as D}from"../../../../../format/lib/document/seed-parts.js";import{VIEW_HIDE_KEYS as I}from"../../../../../format/lib/content/view-hide-class.js";const c={top:80,bottom:80,topPhone:60,bottomPhone:60},d=18,l=18,m=8,u=10,i=t=>typeof t=="string"&&t.trim()!=="",h=t=>_(t.sections),w=t=>k(typeof t.body=="string"?t.body:"").map(o=>o.type==="ul"?{kind:"ul",text:o.items.map(n=>`- ${n}`).join(`
|
|
2
|
+
`)}:{kind:"p",text:o.text}),s={...D(12),letterSpacing:.3,color:"accent",lineHeight:1.5},g={textStyle:"body-1",fontRole:"accent",...T("body",17)},C=[a("label",s),{...a("title",s),when:(t,o)=>!i(o?.label)},{kind:"block",type:"Text",when:(t,o)=>!i(o?.label)&&!i(o?.title),props:{...r,text:"Section",_partStyles:{text:s}}},{kind:"group",name:"Heading",props:{...e,sectionPaddingBottom:m,sectionPaddingBottomPhone:m},parts:[{kind:"group",name:"Heading line",props:{...e,sectionBorder:{bottom:1},sectionPaddingBottom:l,sectionPaddingBottomPhone:l},parts:[{kind:"text",key:"heading",role:"heading",props:r,style:{textStyle:"heading-2",...E("headingMedium",28,3.5,44),case:"upper",weight:500,lineHeight:1.04,letterSpacing:-.025}}]}]},{kind:"list",key:"body",name:"Body",flat:!0,of:w,parts:[{kind:"text",key:"text",props:p,style:{...g,lineHeight:1.7},when:(t,o)=>o?.kind==="p"},{kind:"text",key:"text",props:p,style:{...g,lineHeight:1.65,paragraphSpacing:u},when:(t,o)=>o?.kind==="ul"}]}],A=900,N={name:"Document Text",boxProps:t=>({...x,direction:"row",gap:80,gapPhone:40,[S]:A,sectionBorder:{bottom:1},...B(t,c)}),box:["anchor","sectionAccent",...b,...I,...Object.values(P),...O(c)],parts:[{kind:"block",type:"Contents",props:t=>({title:t.tocTitle??"",sticky:!0,widthFit:"fixed",width:240,widthFitPhone:"fill"})},{kind:"group",name:"Sections",props:{...e,gap:64,gapPhone:64,widthFit:"fill"},parts:[{kind:"list",key:"sections",name:"Section",of:t=>h(t),props:{...e,gap:d,gapPhone:d},item:(t,o,n)=>({props:{anchor:y(h(n))[o]??`section-${o+1}`}}),parts:C}]}],reads:{tocTitle:"the Contents block's Heading"},drop:{...f,stickyTop:"the Contents block draws DocBody's default (120px); 0 live nodes store it"}},X={DocBody:N};export{X as DOCBODY_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tabletKey as D}from"efficient-easel/draw";import{SECTION_WIDTH_KEYS as W}from"../../../../../format/lib/content/section-width.js";import{SECTION_BOX_SLOT as
|
|
1
|
+
import{tabletKey as D}from"efficient-easel/draw";import{SECTION_WIDTH_KEYS as W}from"../../../../../format/lib/content/section-width.js";import{CELL_SPAN_KEYS as j}from"../../../../../format/lib/content/grid-span.js";import{SECTION_BOX_SLOT as G,SECTION_BOX_TYPE as K}from"../../../sections/section-to-box.js";import{BUTTON as k,DIM as i,DROP_COMMON as v,DROP_SIDE_PADDING as X,INNER_BOX as o,SAME_KEYS as Y,SECTION_BOX as f,SH_LINK as S,TEXT as p,bandAccent as $,bandIndex as z,bandPage as U,bandProps as P,bandWrites as F,smallText as c,wrapperPad as l}from"./section-to-box-row-parts.js";import{EDITORIAL_LINE as x,editorialHeadTree as V,token as d}from"./section-head-looks.js";import{boxPadding as m,labelStyle as q}from"../../../../../format/lib/document/seed-parts.js";import{readAnchorName as J}from"../../../../../format/lib/content/anchor-name.js";import{declaredBlockSource as T}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as Q,splitLegacyRegion as w}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as Z}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as ee}from"../../../../../format/lib/map-styles.js";import{VIEW_HIDE_KEYS as te}from"../../../../../format/lib/content/view-hide-class.js";const r=e=>typeof e=="string"?e:e==null?"":String(e),h=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>r(e.group),B=e=>`loc-${e}`,_=e=>r(e.state).trim()||w(r(e.region)).state,O=e=>r(e.country).trim()||w(r(e.region)).country,E=e=>[_(e),O(e)].filter(Boolean).join(" · "),oe=e=>h(e).some(t=>r(t.photo).trim()!==""),ne=e=>h(e).some(t=>ee(Number(t.lat),Number(t.lng))),re=(e,t)=>h(e).filter(n=>s(n)===s(t)).length,ae=(e,t)=>re(e,t)===1?"wide":Q(e.imageShape),y={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,a=(e,t={})=>({...q(e),...t}),u={top:1,right:1,bottom:1,left:1},b={...o,direction:"row",share:"equal",gap:0},ie=e=>t=>t>g(t)?{...o,gap:0}:{...b,...t>1?{phoneRow:e}:{}},se={kind:"group",name:"Gallery",props:{...o,gap:20,_hidden:!0},when:oe,parts:[{kind:"group",name:"Gallery head",props:{...o,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[c("galleryKicker",a(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right",alignPhone:"left"},style:a(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...o,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...o,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:u,...m(12,12)},item:(e,t,n)=>({props:{...r(e.photo).trim()?{bgImage:r(e.photo),hover:"mono"}:{},link:`#${B(t)}`,boxShape:ae(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:a(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[c("label",a(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:ie(2),perRow:g,rowName:"Row",rowProps:{...b,phoneRow:2}}}]}]},pe={kind:"group",name:"Words",props:{...o,gap:12,gapPhone:12,...m(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...o,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...d("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:a(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(t,n)=>E(n)]),when:(e,t)=>E(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...o,sectionBorder:u,...m(6,10)},parts:[{kind:"text",key:"timezone",props:{...i,textFit:"line"},style:a(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:i,style:{textStyle:"body-5",fontRole:"heading",...d("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,_partStyles:{label:a(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>Z(r(e))??"#"]],when:(e,t)=>r(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:a(12,{letterSpacing:.18,lineHeight:1.7})}]},ce={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,n)=>_(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},le={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[ce]},de={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:u,jumpHighlight:!0,sectionAccent:z(e,t)>=0?U(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:B(t)}}),parts:[pe,le],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:r(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...o,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>r(t?.key).trim()!=="",parts:[c("key",a(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...d("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:i,style:a(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[D("columns")]:1})}},C=a(10,{letterSpacing:.25}),me={kind:"block",type:K,props:{...o,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:ne,slot:G,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...i,text:"Location coordinates ©",_partStyles:{text:C}}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...C,color:"labels"}}}}]},I=(e,t)=>Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]])),M=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],H=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],A=e=>e.map(t=>[t,t,(n,R)=>l(R,y)[t]]),L=["sectionAccent","sectionAccent",$],ge=[...j,...te,...Object.values(W)],he={name:"City pictures",skip:e=>T(e)?`fed by the data source "${T(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...f,direction:"column",gap:40,anchor:"studios",...x,...I(l(e,y),M),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...P(e,t)}),box:[...Y.filter(e=>e!=="sectionAccent"&&e!=="anchor"),L,["anchor","anchor",e=>J(e).trim()?e:"studios"],...A(M)],parts:[V("sectionNumber","heading","tagline"),se],also:[{name:"City maps",boxProps:(e,t)=>({...f,direction:"column",gap:40,sectionBorder:{bottom:1},...x,sectionPaddingTop:0,sectionPaddingTopPhone:0,...I(l(e,y),H),...P(e,t)}),box:[...ge,L,...A(H)],parts:[de,me]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:F,drop:{...v,...X,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},Ne={ContactLocations:he};export{Ne as LOCATIONS_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as s}from"../../../sections/section-to-box.js";import{DIM as x,DROP_COMMON as
|
|
1
|
+
import{hasWords as s}from"../../../sections/section-to-box.js";import{DIM as x,DROP_COMMON as g,DROP_SIDE_PADDING as h,INNER_BOX as r,SAME_KEYS as P,SECTION_BOX as f,TEXT as a,smallText as O,wrapperPad as i,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{finiteNumber as L}from"../../../../../format/lib/finite-number.js";import{markBoxProps as w,token as R}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as A,logosScaffoldItems as B}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as b}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as N,paymentScaffoldAssurances as C,paymentScaffoldBadges as I}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as n,BLOCK_SOURCE_PROP as t}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as k}from"../../../../../format/lib/content/card-template.js";import{legacyBlockAlignOf as M}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{CELL_SPAN_KEYS as D}from"../../../../../format/lib/content/grid-span.js";import{SECTION_ACCENT_INHERIT as F}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as K,FOOTER_TEXT_PX as v}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as X}from"efficient-easel/draw";const l={contained:!1},p=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(W,m)=>s(m?.src)||s(m?.[e])}]}]}),c=o=>{const e=L(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},Y={...O("heading",{color:"labels",letterSpacing:.2}),props:{...a,align:"center"}},z={name:"Logos",boxProps:o=>({...f,direction:"column",gap:32,...i(o,c(o))}),box:[...P,..._(c),["bandPadding","sectionPaddingTop",(o,e)=>i(e,c(e)).sectionPaddingTop]],parts:[Y,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:l,slots:p("items","alt")}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},G={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:w(4,"main",{sectionCorners:2})},E={top:24,bottom:24,topPhone:24,bottomPhone:24},j={name:"Payment Methods",boxProps:o=>({...f,direction:"column",...i(o,E)}),box:[...P,..._(E)],parts:[{kind:"group",name:"Methods",props:{...r,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...O("heading",{color:"labels"}),props:{...a,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:o=>s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}},props:{...l,look:"cards",grayscale:!1},slots:o=>({...p("badges","label"),...s(o[t])?{[k]:[b()]}:{}})},{kind:"group",name:"Reassurance",props:{...r,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[d("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:o=>(Array.isArray(o.assurances)?o.assurances:[]).filter(e=>s(e?.text)),props:{...r,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[d("share")]:"content"},item:o=>X(o.text).hidden?{props:{_hidden:!0}}:{},parts:[G,{kind:"text",key:"text",props:{...a,align:"center"},style:{...R("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},U={left:"start",center:"center",right:"end"},S=o=>M(o.align)??"left",T=o=>o.size==="md"?"md":"sm",y=12,u={name:"Payment logos",boxProps:o=>({...r,direction:"row",wrap:!0,align:"center",justify:U[S(o)],gap:y,gapPhone:y,phoneRow:2,[d("share")]:"content"}),box:[...D],parts:[{kind:"text",key:"lead",props:x,styleFrom:o=>({size:v[T(o)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:o=>({logoHeight:K[T(o)].mark,align:S(o),...s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}})},props:{...l,look:"marks",grayscale:!1,sectionAccent:F},slots:o=>({...p("methods","label"),...s(o[t])?{[k]:[b()]}:{}})}],drop:{size:"read as the wall's Logo height (S 16, M 20) and the lead's size (the footer size table, 12 / 13)",align:"read as the Box's justify and the wall's own Alignment (start is left, end is right)",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}},po={Logos:z,PaymentBadges:j,FooterPayment:u,PaymentLogosBlock:u},co=()=>({heading:A.heading,items:B()}),mo=()=>({heading:N.heading,badges:I(),assurances:C()}),go=()=>({...H,methods:[]});export{po as LOGOS_SECTION_TO_BOX,go as footerPaymentPressStarter,co as logosPressStarter,mo as paymentPressStarter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import{parseBlockWidthFit as K,phoneKey as c,tabletKey as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{parseBlockWidthFit as K,phoneKey as c,tabletKey as o}from"efficient-easel/draw";import{blockCanWidenPastCell as L,blockFillInCellClass as X,blockSizeOf as B,blockSizeValuesOf as v,blockCanvasWidthAttrs as G}from"../../content/block-size.js";import{NoCellBound as Z}from"../../../components/BoxCellContext.js";import{CellWrap as U,useBoxCell as Y,useDrawsAtEdge as $}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as M,boxRowColumnsClass as k,boxShareClasses as C,boxShareTabletOf as V,boxTabletColumnsClass as q}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as J}from"../../../../format/lib/content/container-direction.js";import{BOX_TYPE as Q,containerBlocksFor as tt}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as et}from"../part-styles.js";import{addShowWhenFacts as it,withRowRules as _}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as nt}from"./cell-width.js";import{findParentNode as st}from"../../../../format/lib/document/passes/document-position.js";const rt=new Set(["Text","Heading"]),ot=new Set(["h1","h2","h3","h4","h5","h6"]);function z(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&ot.has(e.tag)?!0:et(e,"text").textStyle?.startsWith("heading-")===!0}const a={not:{context:"blockOutsideBox",is:!0}},E={all:[a,{not:{context:"boxSharesWidth",is:!0}}]},N={all:[a,{not:{context:"boxSharesWidthPhone",is:!0}}]},y={all:[a,{not:{context:"boxSharesWidthTablet",is:!0}}]};function I(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}function H(t,e,i){return{any:[{field:c(t),is:e},{all:[{field:c(t),set:!1},i??{field:t,is:e}]}]}}const R={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},lt=[[["_gBlockSize","minWidth",o("minWidth"),c("minWidth"),"maxWidth",o("maxWidth"),c("maxWidth")],a],[["widthFit"],E],[[o("widthFit")],y],[[c("widthFit")],N],[["width"],{all:[E,{field:"widthFit",is:"fixed"}]}],[[o("width")],{all:[y,I("widthFit","fixed")]}],[[c("width")],{all:[N,H("widthFit","fixed")]}]],D=I("textFit","shrink",R),A=[[["_gText","textFit",o("textFit"),c("textFit")],a],[["minFont"],{all:[a,R]}],[[o("minFont")],{all:[a,D]}],[[c("minFont")],{all:[a,H("textFit","shrink",D)]}]],p=(t,e)=>st(e.appState,t.props?.id),S=t=>!!t&&typeof t.type=="string"&&tt(t.type)!==null,T=t=>(t.type==="Flex"||t.type==="HeroGroup")&&J(t.type,t.props?.direction)==="row",g=t=>{const e=K(t);return e!==void 0&&e!=="fit"},ct={blockOutsideBox:(t,e)=>!S(p(t,e)),boxSharesWidth:(t,e)=>{const i=p(t,e);return!S(i)||!T(i)?!1:k({...i.props,direction:"row"})!==""?!0:C(i.props?.share)!==""&&!g(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=p(t,e);if(!S(i)||!T(i))return!1;if(q(i.props?.[o("columns")])!==""||k({...i.props,direction:"row"})!=="")return!0;const n=V(i.props?.[o("share")])??i.props?.share;return C(n)!==""&&!g(t.props?.[o("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=p(t,e);if(!S(i)||!T(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!M(n,i.props?.[c("share")])&&!g(t.props?.[c("widthFit")]??t.props?.widthFit)}},at=t=>/^_[gds][A-Z]/.test(t);function dt(t,e,i){const n=Object.entries(t),s=n.findIndex(([l])=>l===e);if(s===-1)return null;let r=s+1;for(;r<n.length&&!at(n[r][0]);)r++;return Object.fromEntries([...n.slice(0,r),...Object.entries(i),...n.slice(r)])}function j(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function ht(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:s,...r}=i;return j(e,n.indexOf("_dSize")+1,r)}return ut.has(t)&&n.includes("_gSpacing")?j(e,n.indexOf("_gSpacing"),i):{...e,...i}}const ut=new Set(["Text","Heading"]);function ft(t,e){const{_gText:i,...n}=e;return dt(t,"_gText",n)??{...t,...e}}function xt(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const s of["textFit",o("textFit"),c("textFit")])s in n&&(n[s]=t[s]);e.set(i,n)}return n}}const zt={name:"blockSize",applies:(t,e,i)=>nt.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=rt.has(e),{text:s}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:r}=i.blockSizeFields({tablet:!0});let l=ht(e,t.fields??{},_(r,lt));if(n){const d=_(s,A);if(l=ft(l,d),e==="Text"){const f=_(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,A),h=xt(f),u=t.resolveFields,b=(x,w)=>{const F=u?u(x,w):w.fields,W=O=>z(e,x?.props??{})?h(O??w.fields):O;return F instanceof Promise?F.then(W):W(F)};t.resolveFields=b}}t.fields=l,it(t,{...ct,textWrapsByDefault:d=>!z(e,d.props??{})})},draw(t,e){pt(t,e)}};function pt(t,e){const i=t.render;t.render=n=>{const s=v(n),r=B(s),l=i(n),d=r&&B(s,{atSectionLine:!0});return r===null?l:m(St,{size:r,sectionSize:d??r,atEdge:e===Q,canvasAttrs:n.editor?.isEditing?G(s):P,inCell:X(s),widens:L(s),children:l})}}const P={};function St({size:t,sectionSize:e,atEdge:i,canvasAttrs:n,inCell:s,widens:r,children:l}){const d=Y(),f=$(i?"edge":"by-box"),h=f?t:e,u=h.className,b=d?.phoneCells===!0,x=r?m(Z,{children:l}):l;return m(U,{className:b&&s?`${u} ${s}`:u,...Object.keys(h.style).length?{style:h.style}:{},attrs:f&&n!==P?{...h.attrs,...n}:h.attrs,children:x})}export{zt as blockSize,z as textShrinksByDefault};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{GRID_ROW_SPAN_ATTR as f,GRID_SPAN_ATTR as _,resolveGridRowSpan as a,resolveGridSpan as S}from"../../../../format/lib/content/grid-span.js";import{withRowsShownWhen as c}from"../../../../format/lib/document/show-when-attach.js";import{CONTAINER_BLOCK_CHOICES as m}from"../../../../format/lib/document/container-blocks.js";import{RETIRED_NESTABLE_SECTIONS as p}from"../../../../format/lib/document/section-catalog.js";import{BOX_MAY_HOLD as O}from"../../../../format/lib/document/passes/slot-rules.js";const E=Array.from(new Set([...m.map(e=>e.type),...O])),R=Array.from(new Set([...E,...p,"GalleryItem"])),T={not:{context:"parentOffersPositions",is:!1}},u={name:"cellWidth",applies:(e,t,r)=>R.includes(e)&&!!r&&typeof r.render=="function",panel(e,t,r){const n=r.cellWidthFields;e.fields={...e.fields,...n()},e.fields=c(e.fields??{},Object.keys(n()),T)},draw(e){const t=e.render;e.render=r=>{const n=S(r.gridSpan),i=a(r.gridRowSpan),l=t(r);if(n==null&&i==null)return l;const o={};return n!=null&&(o[_]=String(n)),i!=null&&(o[f]=String(i)),s(d,{className:"sf-grid-cell",...o,children:l})}}};export{E as BOX_BLOCK_KEYS,T as CELL_WIDTH_SHOW_WHEN,u as cellWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as o,jsxs as i}from"react/jsx-runtime";import{HideTaker as
|
|
1
|
+
import{jsx as r,Fragment as o,jsxs as i}from"react/jsx-runtime";import{HideTaker as d,usePeekViewHide as p,withViewHide as h}from"../../../components/ViewHideRoot.js";import{anchorSlug as t}from"../../../../format/lib/content/anchor-name.js";import{useBoxCell as m,useDrawsAtEdge as g,useFillsCell as x}from"../../../components/InBoxContext.js";import{drawsCopiesInTheBox as u}from"../../../../format/lib/content/copies-in-box.js";const w="!grow-0 !shrink-0 !basis-0",_=["[.sf-gap-zone>&]:w-0","[.sf-gap-zone>&]:h-0","[.sf-gap-zone>&]:-mb-[var(--sf-gap-len)]","[.sf-gap-zone>&]:-mr-[var(--sf-gap-len)]","[@media(min-width:800px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(min-width:800px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(max-width:799.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]","[@media(max-width:799.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]"].join(" "),A="flex flex-col w-full min-w-0 [&>*]:grow";function l({anchor:e}){const a=t(e),n=g(),s=p();return a?r("span",{id:a,className:h(n?`sf-section-anchor ${w} ${_}`:"sf-section-anchor",s),"aria-hidden":"true"}):null}function C({anchor:e,copiesInBox:a,children:n}){const s=m()?.columnsRow===!0,c=x(),f=t(e)!=="";return a?r(o,{children:n}):s&&!c&&f?i(d,{className:A,children:[r(l,{anchor:e}),n]}):i(o,{children:[r(l,{anchor:e}),n]})}const b={name:"sectionAnchor",applies:(e,a,n)=>a.isSection(e)&&!!n&&typeof n.render=="function",panel(e,a,n){const s=n.anchorFields;e.fields={...e.fields,...s()}},draw(e,a){e.defaultProps={...e.defaultProps,anchor:""};const n=e.render;e.render=s=>r(C,{anchor:s.anchor,copiesInBox:u(a,s),children:n(s)})}};export{_ as ANCHOR_GAP_BACK_CLASS,w as SECTION_ANCHOR_IN_BOX_CLASS,b as sectionAnchor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as p}from"react/jsx-runtime";import{createElement as H}from"react";import{SECTION_MIN_HEIGHT_EXCLUDED as F,sectionHeightFillClass as E,sectionHeightFillViews as _,sectionHeightWrap as w}from"../../../../format/lib/content/section-min-height.js";import{CellWrap as x}from"../../../components/InBoxContext.js";import{HeightFillContext as C,heightFillClaim as T}from"../../../components/ViewHideRoot.js";import{drawsCopiesInTheBox as u}from"../../../../format/lib/content/copies-in-box.js";import{BOX_TYPE as g}from"../../../../format/lib/document/container-blocks.js";import{EDGE_LINE_ATTRS as M}from"../../../../format/lib/content/view-lines.js";import{findParentNode as N}from"../../../../format/lib/document/passes/document-position.js";const c=["sectionHeightMode","sectionHeightModeTablet","sectionHeightModePhone"];function I(e,n){const i=e.props??{};return c.some(r=>i[r]==="fill")?!0:("parent"in n?n.parent:N(n.appState,i.id))?.type===g}const P={name:"sectionHeight",applies:(e,n,i)=>n.isSection(e)&&!F.has(e)&&!!i&&typeof i.render=="function",panel(e,n,i){const t=i.heightFields;e.fields={...e.fields,...t()};const r=t({fill:!0}),a=new WeakMap,m=s=>{if(!s||!c.some(l=>l in s))return s;let o=a.get(s);if(!o){o={...s};for(const l of c)l in o&&(o[l]=r[l]);a.set(s,o)}return o},h=e.resolveFields;e.resolveFields=(s,o)=>{const l=h?h(s,o):o.fields,f=d=>I(s??{},o)?m(d??o.fields):d;return l instanceof Promise?l.then(f):f(l)}},draw(e,n){const i=e.render;e.render=t=>{if(u(n,t))return i(t);const r=w(t);return r?p(x,{className:r.className,style:r.style,...n===g?{attrs:M}:null,children:i(t)}):i(t)}}},b={name:"sectionHeightFillRoot",applies:P.applies,draw(e,n){const i=e.render;e.render=t=>{const r=u(n,t)?null:T(E(t),_(t).join(" "));return H(C.Provider,{value:r},i(t))}}};export{I as heightFillOffered,P as sectionHeight,b as sectionHeightFillRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as _}from"react/jsx-runtime";import{HideTaker as E}from"../../../components/ViewHideRoot.js";import{LineChoice as w}from"../../../components/InBoxContext.js";import{isBackgroundBox as T}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as D}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as d,BAND_PAD_UNIT_KEY as I,SECTION_PAD_KEYS as x,padValuesOf as A,sectionPadAttrs as N}from"../../content/section-padding.js";import{sectionFillPassClass as S}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as O,drawsCopiesInTheBox as h}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as m}from"../../../../format/lib/own-entry.js";const g={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120}},V=new Set(Object.keys(g));function l(e,t){return t?.innerPadding??m(g,e)}const X=e=>l(e)??{},v=e=>m({DetailRows:{top:100,bottom:100}},e),b=new Set(["Flex","Text","Heading","ImageBlock"]),B=new Set(["Divider"]),C=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),p=new Set(["ProductGrid"]);function c(e,t,n=!1){const r=e.render;e.render=i=>{if(t?.(i))return r(i);const o=N({...A(i,x,n),sideSpace:D(i.sideSpace)}),f=r(i);if(!o)return f;const P=a=>_(E,{className:a?`${o.className} ${a}`:o.className,style:o.style,children:f}),s=S(i,{atSectionLine:!0}),u=S(i);return s===u?P(s):_(w,{line:"by-box",draw:a=>P(a?u:s)})}}const y={name:"sectionPadding",applies:(e,t,n)=>t.isSection(e)&&!C.has(e)&&!!n&&typeof n.render=="function",panel(e,t,n){const r=l(t,e);if(r){e.fields={...e.fields,...n.sidesPaddingFields({keys:d,unitKey:I,fallback:r,tablet:!0,siteSide:!0})};return}if(p.has(t))return;const i=[d.top,d.bottom].filter(o=>e.fields!=null&&o in e.fields);if(i.length)throw new Error(`section-padding: ${t} declares its own ${i.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){if(!l(t,e)){if(p.has(t)){c(e);return}b.has(t)||B.has(t)||c(e,t==="Flex"?n=>T(n.bgImage):O.has(t)?n=>h(t,n):void 0,!0)}}},F=["Heading","Text","ImageBlock"],L=["LogoBlock"],G={name:"blockPadding",applies:(e,t,n)=>(F.includes(e)||L.includes(e))&&!!n&&typeof n.render=="function",panel(e,t,n){e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){b.has(t)||c(e,void 0,!0)}};export{B as PADS_ITS_OWN_SPACE,b as PAD_ON_ROOT,V as SECTION_PAD_INNER,g as SECTION_PAD_INNER_DEFAULTS,G as blockPadding,X as innerPaddingFallback,v as ownPairDefault,y as sectionPadding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{HideTaker as s}from"../../../components/ViewHideRoot.js";import{LineChoice as X}from"../../../components/InBoxContext.js";import{BOX_TYPE as q}from"../../../../format/lib/document/container-blocks.js";import{INTRO_EDGE_CLASS as z}from"../../../../format/lib/sections/intro-bleed-layout.js";import{cssLengthOf as G}from"../../../../format/lib/content/css-length.js";import{resolveContainerDirection as J}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as Q,HERO_CHROME_CAP_VAR as Z,HERO_CHROME_INSET_VAR as tt,FULL_SECTION_WIDTH as nt,SITE_WIDTH_CAP as _,centredCap as v,heroBackgroundTokens as et}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as D,SECTION_WIDTH_KEYS as F,hasOwnSectionWidth as ot,hasWidthFamily as it,resolveWidth as L,siteWidthsOf as rt}from"../../../../format/lib/content/section-width.js";import{boxCardProps as ct}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as lt}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as dt,boxGutterOf as ut,boxPlaceOf as st,boxRunsEdgeToEdge as at,isFrameContainer as C,ownNodeWidth as ft,sectionGroundAnswer as ht,siteDrawsGutter as _t}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as Nt}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as H,NestedBoxChoice as wt,SectionGroupChoice as Ct,SectionGroupWidthsProvider as Et,SectionRootChoice as Ot,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as P}from"../../../components/BlockFrame.js";import{sectionFillPassClass as x}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as Tt}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as E,withRowsShownWhen as O}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as mt,heldByANode as St,isNestedNode as xt,NOT_HELD_BY_A_NODE as y}from"../../../../format/lib/document/passes/document-position.js";import{ownEntry as U}from"../../../../format/lib/own-entry.js";const N="--sf-sw-site",pt="--sf-sw-content",Rt="--sf-bg-cap",At="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",A=({own:n,content:t,siteContent:e})=>n===!0&&t==="full"&&e!=="full",k="contents view-wide:[--sf-site-width:100vw]",W=({held:n},t,e)=>n?e:d(s,{className:t,children:e}),Wt=`contents view-wide:[--sf-site-width:100vw] ${z} view-wide:[--sf-site-gutter:var(--intro-edge)]`,I=(n,t,e)=>t==="content"?`min(${G(n,e)},var(${N}))`:G(n,e);function T({content:n,contentMax:t,contentMaxUnit:e},o){return n==="full"?o!=="content"?nt:null:t===null?null:I(t,o,e)}function m(n,t){return t===null?n:d(s,{className:"contents",style:{[N]:_},children:d(s,{className:At,style:{[pt]:t},children:n})})}const It="--sf-content-cap",bt="contents max-view-wide:[--sf-content-cap:none]";function gt({content:n,contentMax:t,contentMaxUnit:e},o){return n==="full"?null:t!==null?I(t,o,e):o==="content"?null:`var(${N})`}function Bt(n,t){return t===null?n:d(s,{className:"contents",style:{[N]:_},children:d(s,{className:bt,style:{[It]:t},children:n})})}const V=`var(${N},${_})`,h=(n,t,e="")=>n==="content"?d(s,{className:e||void 0,style:v(_),children:d(H,{ground:V,children:t})}):t;function $(n,t,e,o,c){if(A(e))return h(o,W(e,k,d(M,{children:n({...t,contained:!0})})),c);if(e.content==="full")return h(o,n({...t,contained:!1}),c);const i=T(e,o);return o==="content"&&i===null&&!e.own?n({...t,contained:!0}):h(o,m(d(M,{children:n({...t,contained:!0})}),i),c)}function Gt(n,t,e,o,c){if(e==="hero"){const l=m(n(t),T(o,o.band));return o.band==="full"?d(s,{style:{[Q]:"none",[tt]:"initial",[Z]:"initial"},children:l}):o.band==="content"?d(s,{style:et(!0),children:l}):l}const i=o.band??"full",r=x(t,{atSectionLine:!c});if(e==="rawMarkup"){if(o.content==="full")return h(i,n(t),r);const l=o.contentMax===null?_:I(o.contentMax,i,o.contentMaxUnit);return d(s,{className:"contents",style:{[N]:_},children:h(i,d(s,{className:r||void 0,style:v(l),children:n(t)}),r)})}if(e==="scrollOver"){const l=o.content==="full",u=A(o)?W(o,Wt,n({...t,fullWidth:!1})):m(n({...t,fullWidth:l}),l?null:T(o,i));return i==="content"?d(s,{className:"contents",style:{[Rt]:_},children:u}):u}switch(e){case"both":return h(i,Bt(n(t),gt(o,i)),r);case"contained":return $(n,t,o,i,r);case"contentColumn":case"contentFull":case"productGrid":{const l=A(o),u=o.content==="full"&&!l?"full":"page",a=l?W(o,k,n({...t,widthMode:u})):m(n({...t,widthMode:u}),o.content==="full"?null:T(o,i));return e==="productGrid"&&!o.own?i==="content"?d(s,{className:r?`${P} ${r}`:P,children:a}):a:h(i,a,r)}default:return h(i,m(n(t),T(o,i)),r)}}function Y(n,t,e,o,c){const i=c===q?"edge":"by-box",r=l=>Gt(n,t,e,o,l);return i==="edge"?r(!0):x(t)===x(t,{atSectionLine:!0})?r(!1):d(X,{line:i,draw:r})}function vt(n,t){const e=U(D,t);if(!e)return;const o=n.render;n.render=c=>{const i=rt(c),r={band:i.background,content:i.content??"content",contentMax:null},l=()=>e==="rawMarkup"?o(c):d(Ct,{draw:f=>f?.background==="content"?d(H,{ground:V,children:u(f)}):u(f)}),u=f=>{const w=f?{...r,band:f.background==="content"?r.band:f.background??r.band,content:f.content??r.content,own:f.background==="full"||f.content!==null,held:!0,siteContent:r.content}:r,R=Y(o,c,e,w,t);if(!C(t))return R;const g=ut(c),B=g===void 0?w.content:g?"content":"full";return B===w.content?R:d(wt,{atTop:R,nested:$(o,c,{...w,content:B,own:!1},w.band??"full",x(c))})},a=ft(t,c);if(!ot(a))return l();const S=e==="rawMarkup",b=ht(t,c),j=a.content??(S?"full":r.content),p={band:b,content:b==="content"?"content":j,contentMax:a.contentMax,contentMaxUnit:a.contentMaxUnit,own:!S,siteContent:r.content};return d(Ot,{own:()=>d(Et,{value:{background:p.band,content:p.content},children:Y(o,c,e,p,t)}),followed:l})}}const Dt={all:[y,{not:{context:"runsEdgeToEdge",is:!0}}]},un={name:"sectionWidth",applies:(n,t,e)=>it(n)&&!!e&&typeof e.render=="function",panel(n,t,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:U(D,t)==="rawMarkup"}),c=C(t)?e.boxGutterFields():{},i={...n.fields,...c,...o},r=C(t)?K(t,n,i,[dt]):i;E(n,{heldByANode:St}),C(t)&&E(n,{runsEdgeToEdge:(l,u)=>at(ct(l.props??{},lt(u.appState,l.props?.id)?.inCopy!==!1))}),n.fields=O(r,[F.background,F.content],C(t)?Dt:y)},draw(n,t){vt(n,t)}};function Ft(n,t){if(!n||!("widthMode"in n))return n;const e={...n},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:t.mode,inherited:t.inherited}),e}const Lt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),sn={name:"containedWidth",applies:(n,t,e)=>Lt.has(n)&&!!e&&typeof e.render=="function",panel(n,t,e){const o=e.widthField;n.fields=K(t,n,{...n.fields,...o("page")});const c=n.resolveFields;n.resolveFields=(i,r)=>{const l=c?c(i,r):r.fields,u=L(i?.props??{},"page"),a=S=>Ft(S,u);return l&&typeof l.then=="function"?l.then(a):a(l)}},draw(n){const t=n.render;n.render=e=>{const{mode:o}=L(e,"page");return t({...e,contained:o!=="full"})}}},Ht={not:{context:"inHeroGroupRow",is:!0}},an={name:"buttonAlignInRow",applies:n=>n==="ButtonBlock",panel(n){const t=n;t.fields=O(t.fields??{},["align"],Ht),E(t,{inHeroGroupRow:(e,o)=>{const c=mt(o.appState,e.props?.id);return!!c&&c.type==="HeroGroup"&&J("HeroGroup",c.props?.direction)==="row"}})}};function Mt(n){return Object.values(n).some(t=>!!t&&typeof t=="object"&&t.type==="slot")}const Pt={any:[]},yt={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Ut={not:{context:"widthCappedByParent",is:!0}};function K(n,t,e,o=["widthMode"]){if(n==="ButtonBlock")return O(e,["_gWidth",...o],Pt);if(Mt(e)){const c=(i,r)=>st(r.appState?.data?.content,i.props?.id,_t(Nt()));return E(t,{outsideBox:(i,r)=>c(i,r)?.inBox!==!0,insideSiteGutter:(i,r)=>c(i,r)?.insideGutter}),O(e,o,yt)}return E(t,{widthCappedByParent:(c,i)=>"parent"in i?Tt(i.parent):xt({props:c.props??{}},i)}),O(e,o,Ut)}export{Rt as SECTION_BACKGROUND_VAR,bt as SECTION_CONTENT_CAP_CLASS,It as SECTION_CONTENT_CAP_VAR,At as SECTION_CONTENT_CLASS,pt as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,an as buttonAlignInRow,sn as containedWidth,un as sectionWidth,Ft as widthModeFields};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "68.1.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -42,19 +42,20 @@
|
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
43
|
"test:boundary": "node scripts/test-boundary.mjs",
|
|
44
44
|
"test:screen": "node scripts/test-screen-in-easel.mjs",
|
|
45
|
+
"test:browser": "efficient-shell-browser-check --dir tests/browser --tailwind tests/browser/shell-ui.tailwind.css --css node_modules/efficient-easel/dist/screen/screen.css --css src/components/storefront-editor.css",
|
|
45
46
|
"test:own-ui": "node node_modules/efficient-shell-checker/dist/bin/ui-check.js",
|
|
46
47
|
"test:media-hosts": "efficient-shell-media-host-check",
|
|
47
48
|
"build": "node scripts/build.mjs",
|
|
48
49
|
"verify:dist": "node scripts/verify-dist.mjs && node scripts/verify-published-entries.mjs",
|
|
49
|
-
"verify": "pnpm run typecheck && pnpm run test:boundary && pnpm run test:screen && pnpm run test:own-ui && pnpm run test:media-hosts && pnpm run test:guards && pnpm run build && pnpm run verify:dist",
|
|
50
|
+
"verify": "pnpm run typecheck && pnpm run test:boundary && pnpm run test:screen && pnpm run test:own-ui && pnpm run test:media-hosts && pnpm run test:guards && pnpm run test:browser && pnpm run build && pnpm run verify:dist",
|
|
50
51
|
"test:guards": "tsc --noEmit -p scripts/tsconfig.json && node scripts/run-guards.mjs",
|
|
51
52
|
"words": "TSX_TSCONFIG_PATH=scripts/tsconfig.json tsx scripts/write-editor-words.ts",
|
|
52
53
|
"text-parts": "TSX_TSCONFIG_PATH=scripts/tsconfig.json tsx scripts/write-text-part-shapes.ts"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"@tabler/icons-react": "^3.46.0",
|
|
56
|
-
"efficient-easel": "^34.
|
|
57
|
-
"efficient-shell": "^
|
|
57
|
+
"efficient-easel": "^34.3.0",
|
|
58
|
+
"efficient-shell": "^13.0.0",
|
|
58
59
|
"isomorphic-dompurify": "^3.18.0",
|
|
59
60
|
"next": ">=16",
|
|
60
61
|
"react": ">=19",
|
|
@@ -68,21 +69,24 @@
|
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@tabler/icons-react": "^3.46.0",
|
|
72
|
+
"@tailwindcss/cli": "^4.3.3",
|
|
71
73
|
"@tanstack/react-query": "^5.100.9",
|
|
72
74
|
"@types/node": "^20",
|
|
73
75
|
"@types/react": "^19",
|
|
74
76
|
"@types/react-dom": "^19",
|
|
75
|
-
"efficient-easel": "^34.
|
|
76
|
-
"efficient-shell": "^
|
|
77
|
+
"efficient-easel": "^34.3.0",
|
|
78
|
+
"efficient-shell": "^13.0.0",
|
|
77
79
|
"efficient-shell-checker": "npm:efficient-shell@12.37.0",
|
|
78
80
|
"esbuild": "^0.28.0",
|
|
79
81
|
"happy-dom": "^20.14.5",
|
|
80
82
|
"isomorphic-dompurify": "^3.18.0",
|
|
81
83
|
"maplibre-gl": "6.11.2",
|
|
82
84
|
"next": "16.2.11",
|
|
85
|
+
"playwright": "^1.63.0",
|
|
83
86
|
"react": "19.2.4",
|
|
84
87
|
"react-dom": "19.2.4",
|
|
85
88
|
"simple-icons": "^16.26.0",
|
|
89
|
+
"tailwindcss": "^4.3.3",
|
|
86
90
|
"tsx": "4.22.3",
|
|
87
91
|
"typescript": "^5"
|
|
88
92
|
}
|