efficient-web-builder 67.0.0 → 67.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 +12 -0
- package/dist/editor/components/storefront-editor.css +47 -0
- package/dist/editor/lib/document/block-offer.d.ts +2 -0
- package/dist/editor/lib/document/block-offer.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +4 -12
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +11 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/document/blocks/general/Split/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Split/meta.js +2 -2
- package/dist/format/lib/document/easel-row-words.d.ts +2 -0
- package/dist/format/lib/document/easel-row-words.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +3 -1
- package/dist/format/lib/document/section-catalog.d.ts +5 -0
- package/dist/format/lib/document/section-catalog.js +10 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +3 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/fit-words.js +4 -2
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +6 -0
- package/dist/render/components/ViewHideRoot.js +1 -1
- package/dist/render/lib/content/block-size.d.ts +1 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-height.d.ts +5 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/package.json +4 -3
|
@@ -10,7 +10,7 @@ import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as n}from"efficient-easel/screen/li
|
|
|
10
10
|
var TABLET_MIN = ${n}, DESKTOP_MIN = ${r};
|
|
11
11
|
|
|
12
12
|
// A block's own answer (lib/content/block-size, the wrapper's attributes):
|
|
13
|
-
// the fit "wrap" | "shrink" | "line" and the floor, each with a tablet and a
|
|
13
|
+
// the fit "wrap" | "shrink" | "line" | "ellipsis" and the floor, each with a tablet and a
|
|
14
14
|
// phone twin. From 1100 the desktop's; from the tablet line (800 for a holder
|
|
15
15
|
// in a Box, marked edge; 720 outside one) the tablet's where it has one;
|
|
16
16
|
// under it the phone's, else the tablet's, else the desktop's. With no
|
|
@@ -32,7 +32,9 @@ import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as n}from"efficient-easel/screen/li
|
|
|
32
32
|
function modeOf(el) {
|
|
33
33
|
var mode = own(el, ${JSON.stringify(e.fit)}, ${JSON.stringify(e.fitTablet)}, ${JSON.stringify(e.fitPhone)});
|
|
34
34
|
if (mode === "wrap" || mode === "shrink") return mode;
|
|
35
|
-
|
|
35
|
+
// One line and Shorten (stored "ellipsis", which cuts its words with "..."):
|
|
36
|
+
// the block keeps its words at their set size, nothing shrinks.
|
|
37
|
+
if (mode === "line" || mode === "ellipsis") return "wrap";
|
|
36
38
|
return el.matches(SELECTOR) ? "shrink" : "wrap";
|
|
37
39
|
}
|
|
38
40
|
function floorOf(el, set) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SITE_SIDE as
|
|
1
|
+
import{SITE_SIDE as a}from"efficient-easel/screen/lib/content/length-units";import{BOX_TYPE as i}from"../document/container-blocks.js";import{headingTextSeed as m,labelTextSeed as S}from"../document/text-seeds.js";import{TICKER_SCAFFOLD_ITEMS as d}from"../document/blocks/general/Ticker/meta.js";import{specStripScaffold as h}from"../document/blocks/general/SpecStrip/meta.js";import{darkBandIndex as u,normalizeTheme as B}from"../theme.js";import{SPEC_PAD as E,SPEC_STRIP as g,SPEC_TEXT as _,STRIP_BOX as b,TICKER_PAD as l,TICKER_SMALL as R,TICKER_STRIP as C}from"./strip-shape.js";function o(t,e,n,c={}){return{type:t,props:{...e(t),id:n(t),...c}}}function P(t,e,n){return o(i,t,e,{...n,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}const s={Manifesto:(t,e)=>({type:i,props:{...t(i),id:e(i),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[o(i,t,e,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:a,sectionPaddingRight:a,content:[o("Text",t,e,S()),o("Text",t,e,m()),o("Text",t,e),o("Stats",t,e)]}),P(t,e,{direction:"column",name:"Picture",content:[]})]}}),Split:(t,e)=>({type:i,props:{...t(i),id:e(i),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[o(i,t,e,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[o("Text",t,e,S()),o("Text",t,e,m()),o("Text",t,e),o("ButtonBlock",t,e)]}),P(t,e,{direction:"column",name:"Image",content:[o("ImageBlock",t,e)]})]}}),Subscribe:(t,e)=>({type:i,props:{...t(i),id:e(i),direction:"column",name:"Subscribe",content:[o("Text",t,e,m()),o("Text",t,e),o("Form",t,e)]}}),Ticker:(t,e)=>x("Scrolling Bar",C,l,d.map(n=>({text:n.text,style:R,muted:!0})),t,e),SpecStrip:(t,e,n)=>x("Spec Strip",n?.theme?{...g,sectionAccent:u(B(n.theme))}:{...g,sectionBorder:{top:1}},E,h().map(c=>({text:c.text??"",style:_,muted:c.tone==="muted"})),t,e)};function x(t,e,n,c,p,T){return o(i,p,T,{...b,...e,blockSpacing:"gap",padV2:!0,name:t,sectionPaddingTop:n.top,sectionPaddingBottom:n.bottom,sectionPaddingTopPhone:n.topPhone,sectionPaddingBottomPhone:n.bottomPhone,content:c.map(r=>o("Text",p,T,{text:r.text,...r.muted?{tone:"dim"}:{},_partStyles:{text:r.style}}))})}function K(t){return Object.prototype.hasOwnProperty.call(s,t)?s[t]:null}export{s as SECTION_PRESETS,K as presetFor};
|
|
@@ -14,6 +14,12 @@ export type ViewHideTake = {
|
|
|
14
14
|
readonly scope: (element: ReactNode) => ReactNode;
|
|
15
15
|
};
|
|
16
16
|
export declare const NO_HIDE: ViewHideTake;
|
|
17
|
+
type HeightFillClaim = {
|
|
18
|
+
readonly className: string;
|
|
19
|
+
readonly views: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const HeightFillContext: import("react").Context<HeightFillClaim | null>;
|
|
22
|
+
export declare const heightFillClaim: (className: string, views: string) => HeightFillClaim | null;
|
|
17
23
|
export declare const viewHideClaim: (className: string, words: string, line?: {
|
|
18
24
|
readonly sectionClassName?: string;
|
|
19
25
|
readonly line?: ViewHideLineOf;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createContext as
|
|
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},v=f,p=u(null),h=(e,s)=>e?{className:e,views:s}:null,H=e=>l(a.Provider,{value:null},l(p.Provider,{value:null},l(w.Provider,{value:!0},e))),_=(e,s,n={})=>e?{className:e,words:s,...n}:null,x=(e,s)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:e.line==="edge"||e.line!=="section"&&s?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function E(){const e=r(a),s=r(p),n=r(d)!==null;if(e===null&&s===null)return v;const t=e===null?null:x(e,n);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:H}}function F(){const e=r(a),s=r(d)!==null;return e===null?"":x(e,s).className}const T=(e,s)=>s?e?`${e} ${s}`:s:e;function P(e){const s=E(),n=e.takes===!1?f:s,t={};let c=!1;for(const[o,i]of Object.entries(e))o==="as"||o==="takes"||o==="children"||(o==="className"?(t.className=T(i,n.className),c=!0):t[o]=i);return!c&&n.className&&(t.className=n.className),n.scope(l(e.as??"div",{...t,...n.attrs},e.children))}export{p as HeightFillContext,P as HideTaker,f as NO_HIDE,m as VIEW_HIDE_ATTR,a as ViewHideContext,h as heightFillClaim,F as usePeekViewHide,E as useTakeViewHide,_ as viewHideClaim,T as withViewHide};
|
|
@@ -21,7 +21,7 @@ export type BlockSizeLine = {
|
|
|
21
21
|
readonly atSectionLine?: boolean;
|
|
22
22
|
};
|
|
23
23
|
export declare function blockFillInCellClass(values: BlockSizeValues): string;
|
|
24
|
-
export declare function blockSizeOf(values: BlockSizeValues, { atSectionLine }?: BlockSizeLine): BlockSize | null;
|
|
24
|
+
export declare function blockSizeOf(values: BlockSizeValues, { atSectionLine: storedLine }?: BlockSizeLine): BlockSize | null;
|
|
25
25
|
export declare function blockSetsItsWidth(values: BlockSizeValues): boolean;
|
|
26
26
|
export declare function blockCanWidenPastCell(values: BlockSizeValues): boolean;
|
|
27
27
|
export declare function blockSizeValuesOf(props: Readonly<Record<string, unknown>>): BlockSizeValues;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BLOCK_FIXED_WIDTH as
|
|
1
|
+
import{BLOCK_FIXED_WIDTH as ee,BLOCK_SIZE_KEYS as te,parseBlockWidthFit as S,phoneKey as R,parseTextFit as L,tabletKey as z,viewKeyAt as M}from"efficient-easel/draw";import{sideLengthAt as ie}from"efficient-easel/screen/lib/content/length-units";import{TEXT_FIT_ATTR as m}from"../../../format/lib/fit-words.js";import{cssLengthOf as j}from"../../../format/lib/content/css-length.js";import{tierOfView as W}from"../../../format/lib/content/view-tier.js";const oe="sf-block-size",V=["width","minWidth","maxWidth"],Y=e=>`${e}Unit`,l=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,ne={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"}},U={desktop:{fill:"view-desktop:w-full view-desktop:[.flex-row>&]:grow",fixed:"view-desktop:w-[min(var(--sf-bw),100%)] view-desktop:basis-auto! view-desktop:grow-0! view-desktop:shrink-0"},tablet:{fill:"view-wide:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-wide:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-wide:max-view-desktop:basis-auto! view-wide:max-view-desktop:grow-0! view-wide:max-view-desktop:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},se={desktop:U.desktop,tablet:{fill:"view-tablet:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-tablet:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-tablet:max-view-desktop:basis-auto! view-tablet:max-view-desktop:grow-0! view-tablet:max-view-desktop:shrink-0"},phone:{fill:"max-view-tablet:w-full",fixed:"max-view-tablet:w-[min(var(--sf-bw-p),100%)] max-view-tablet:basis-auto! max-view-tablet:grow-0! max-view-tablet:shrink-0"}},we={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},de={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},ae={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)]"]}},E={minWidth:{desktop:["--sf-bmin","view-desktop:min-w-[var(--sf-bmin)]!"],tablet:["--sf-bmin-t","view-wide:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-desktop:max-w-[var(--sf-bmax)]"],tablet:["--sf-bmax-t","view-wide:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},pe={minWidth:{desktop:E.minWidth.desktop,tablet:["--sf-bmin-t","view-tablet:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-tablet:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:E.maxWidth.desktop,tablet:["--sf-bmax-t","view-tablet:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-tablet:max-w-[var(--sf-bmax-p)]"]}},fe=["widthFit",...V],X={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},N={desktop:"view-desktop:whitespace-nowrap view-desktop:[&_*]:whitespace-nowrap!",tablet:"view-wide:max-view-desktop:whitespace-nowrap view-wide:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},me={desktop:N.desktop,tablet:"view-tablet:max-view-desktop:whitespace-nowrap view-tablet:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-tablet:whitespace-nowrap max-view-tablet:[&_*]:whitespace-nowrap!"},Z={desktop:"view-wide:min-w-0 view-wide:[&_*]:overflow-hidden view-wide:[&_*]:text-ellipsis",phone:"max-view-wide:min-w-0 max-view-wide:[&_*]:overflow-hidden max-view-wide:[&_*]:text-ellipsis"},le={desktop:"view-desktop:min-w-0 view-desktop:[&_*]:overflow-hidden view-desktop:[&_*]:text-ellipsis",tablet:"view-wide:max-view-desktop:min-w-0 view-wide:max-view-desktop:[&_*]:overflow-hidden view-wide:max-view-desktop:[&_*]:text-ellipsis",phone:Z.phone},$={desktop:"view-wide:max-w-full",phone:"max-view-wide:max-w-full"},G={desktop:"view-desktop:max-w-full",tablet:"view-wide:max-view-desktop:max-w-full",phone:$.phone};function be(e){const n=q(e);return n.sides.filter(o=>n.mode[o]==="fill").map(o=>we[n.three?"three":"two"][o]).filter(Boolean).join(" ")}function q(e){const n=fe.some(s=>{const a=e[s]?.tablet;return s==="widthFit"?S(a)!==void 0:l(a)!==void 0}),o=n?["desktop","tablet","phone"]:["desktop","phone"],p=(s,a)=>{const t=s(a?.desktop),f=n?s(a?.tablet)??t:t;return{desktop:t,tablet:f,phone:s(a?.phone)??f}};return{three:n,sides:o,perSide:p,lengthPerSide:s=>{const a=Y(s),t={};for(const d of o)t[M(s,W(d))]=l(e[s]?.[d]),t[M(a,W(d))]=e.units?.[s]?.[d];const f=d=>ie(t,{length:s},a,W(d),"length")??void 0;return{desktop:f("desktop"),tablet:f("tablet"),phone:f("phone")}},mode:p(S,e.widthFit)}}function ke(e,{atSectionLine:n=!1}={}){const o=["desktop","tablet","phone"].some(i=>L(e.textFit?.[i])==="ellipsis"),p=n&&!o,k=p?se:U,s=p?pe:E,a=p?me:N,t=[],f={},d={},{three:T,sides:F,lengthPerSide:O,mode:J}=q(e),K=O("width");for(const i of F){const w=J[i];!w||w==="fit"||(t.push(T?k[i][w]:ne[i][w]),w==="fixed"&&(f[de[i]]=j(K[i]?.value??ee.fallback,K[i]?.unit)))}for(const i of V.filter(w=>w!=="width")){const w=O(i);for(const r of F){const c=w[r];if(c===void 0)continue;const[h,b]=T?s[i][r]:ae[i][r];f[h]=j(c.value,c.unit),t.push(b)}}const v=L(e.textFit?.desktop),u=L(e.textFit?.phone),C=i=>{const w=l(e.minFont?.[i]);return w===void 0?void 0:e.units?.minFont?.[i]==="vw"?`${w}vw`:String(w)},g=C("desktop"),I=C("phone"),B=L(e.textFit?.tablet),x=B!==v||u!==void 0?B:void 0,D=C("tablet"),A=D!==g||I!==void 0?D:void 0,H=l(e.maxWidth?.desktop),P=l(e.maxWidth?.tablet)??H,y={desktop:H!==void 0,tablet:P!==void 0,phone:(l(e.maxWidth?.phone)??P)!==void 0},_=(i,w,r)=>{if(w!=="line"&&w!=="ellipsis")return;const c=i==="tablet"?void 0:i,h=(b,Q)=>r||!c?b[i]:Q[c];if(w==="line"){t.push(h(a,X));return}if(t.push(h(N,X)),t.push(h(le,Z)),T&&!r&&i==="desktop")for(const b of["desktop","tablet"])y[b]||t.push(G[b]);else y[i]||t.push(h(G,$))};return x?(_("desktop",v,!0),_("tablet",x,!0),_("phone",u??x,!0)):(_("desktop",v,!1),_("phone",u??v,!1)),v&&(d[m.fit]=v),x&&(d[m.fitTablet]=x),u&&(d[m.fitPhone]=u),g!==void 0&&(d[m.min]=g),A!==void 0&&(d[m.minTablet]=A),I!==void 0&&(d[m.minPhone]=I),!p&&(x||A!==void 0)&&(d[m.edge]=""),t.length===0&&Object.keys(d).length===0?null:{className:[oe,...t].join(" "),style:f,attrs:d}}function ue(e){if(l(e.maxWidth?.desktop)!==void 0)return!0;const n=S(e.widthFit?.desktop);return n==="fill"||n==="fixed"}function _e(e){return["desktop","tablet","phone"].some(o=>{const p=S(e.widthFit?.[o]);return p==="fixed"||p==="fill"||l(e.minWidth?.[o])!==void 0})}function Se(e){const n={};for(const o of te){const p=e[o],k=e[z(o)],s=e[R(o)];(p!==void 0||k!==void 0||s!==void 0)&&(n[o]={desktop:p,tablet:k,phone:s});const a=Y(o),t={desktop:e[a],tablet:e[z(a)],phone:e[R(a)]};(t.desktop!==void 0||t.tablet!==void 0||t.phone!==void 0)&&((n.units??={})[o]=t)}return n}export{V as BLOCK_LENGTH_KEYS,oe as BLOCK_SIZE_CLASS,m as TEXT_FIT_ATTR,_e as blockCanWidenPastCell,be as blockFillInCellClass,Y as blockLengthUnitKey,ue as blockSetsItsWidth,ke as blockSizeOf,Se as blockSizeValuesOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{pictureHoverOf as m}from"../../../../../../format/lib/animation/hover.js";import g from"../../../../../components/Split.js";import{sectionFillsHeight as d}from"../../../../../../format/lib/content/section-min-height.js";import{hidableText as f}from"efficient-easel/draw";import{phHide as t,ctaHide as c}from"../../scaffold.js";import{SplitMeta as x,SPLIT_PH as i,IMGBTN_PH as o,splitImageOverlay as u}from"../../../../../../format/lib/document/blocks/general/Split/meta.js";function y(e,n,a){const l=t(e,o.text,a);if(l!==void 0)return{text:l,href:n||"#"}}const A={...x,render:e=>r(g,{eyebrow:t(e.eyebrow,i.eyebrow,e.editor),title:t(e.title,i.title,e.editor),body:t(e.body,i.body,e.editor),imageLabel:f(e.title)||i.title,imageSrc:e.imageSrc||void 0,reverse:e.reverse,uppercase:e.uppercase,textAlign:e.textAlign,textAlignTablet:e.textAlignTablet,textAlignPhone:e.textAlignPhone,cta:c(e.ctaText,e.ctaHref,e.editor),imageButton:y(e.imageBtnText,e.imageBtnHref,e.editor),textBgSrc:e.textBgSrc||void 0,textBgTint:(typeof e.overlay=="number"?e.overlay:60)/100,imageTint:u(e.imageOverlay)/100,grayscale:e.grayscale,pictureHover:m(e,"Split"),fillHeight:d(e)})};export{A as SplitRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as V}from"efficient-easel/draw";import{SITE_SIDE as K}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{INTRO_SIZE_UNIT_KEYS as Y,introSizeUnitsOf as x}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as j}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as X,token as n}from"./section-head-looks.js";import{labelStyle as G}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as T,DROP_COMMON as p,DROP_SIDE_PADDING as B,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as q,SAME_KEYS as y,SECTION_BOX as m,TEXT as b,fillFrom as H,lineSides as s,pictureCell as M,siteGutterOf as A,smallText as a,wrapperPad as O,wrapperPadKeys as I}from"./section-to-box-row-parts.js";const _=(e,t,o)=>{const k=r(e),f=r(t),S=(W,g)=>g&&g!=="px"?{[W]:g}:{};return{...k===void 0?{}:{size:k,...S(w.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(w.sizePhone,o?.phone)}}},Z=e=>j(e.layout)==="stacked",v=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,$={textStyle:"heading-1",sizeToken:{...X("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},J=[a("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:b,style:{...$,case:e?"upper":"none"},styleFrom:t=>{const o=x(t);return _(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...T,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=x(e);return _(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],E=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,Q=()=>({name:"Scroll-Over Text",skip:e=>Z(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...m,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:v(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...y.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>v(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:J,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(Y.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:E("Button color"),buttonTextColor:E("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},ee={textStyle:"body-1",...n("body",16),lineHeight:1.7},N=e=>({kind:"text",key:"body",props:{...T,maxWidth:520},style:{...ee,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},P=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},te=(e,t)=>{const o=P(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},z={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",oe=(e,t)=>({[e]:t,[V(e)]:t}),ne={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},R=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),ie=()=>({name:"Brand Text",boxProps:(e,t)=>({...m,...H("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...O(e,l),...P(e,100)}),box:[...y,...I(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:s({right:1}),sectionBorderPhone:s({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:K}),parts:[a("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:b,style:{...D,case:"none"},mark:"accentItalic"},N(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(R(e).length,1),3),...oe("sectionBorder",s({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:R,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:q,style:ne},a("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},M("Picture","imageSrc",z)],drop:{...p,grayscale:U,...B}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},re=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",se=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ae={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...M("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)?{darken:40,darkenStyle:"even"}:{},placement:"center",...z,sectionBorder:s(e?{left:1}:{right:1}),...C(e?"left":"right",A(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ae,style:{...G(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),C=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},de={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:re(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...te(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:se(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...C(o?"right":"left",A(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...a("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:b,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...N(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},le=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...m,...H("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...O(e,l),...P(e,72)}),box:[...y,...I(l)],parts:[L(!1),de,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",grayscale:U,...p,...B}}),ke={IntroBleed:Q(),Manifesto:ie(),Split:le()};export{ke as EDITORIAL_SECTION_TO_BOX};
|
|
1
|
+
import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as w}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as T}from"../../part-styles.js";import{parseIntroBleedLayout as X}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as G,token as n}from"./section-head-looks.js";import{labelStyle as q}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as H,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Z,SAME_KEYS as y,SECTION_BOX as m,TEXT as b,fillFrom as M,lineSides as a,pictureCell as O,siteGutterOf as A,smallText as s,wrapperPad as v,wrapperPadKeys as I}from"./section-to-box-row-parts.js";const _=(e,t,o)=>{const k=r(e),f=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...k===void 0?{}:{size:k,...S(T.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(T.sizePhone,o?.phone)}}},$=e=>X(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,J={textStyle:"heading-1",sizeToken:{...G("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},Q=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:b,style:{...J,case:e?"upper":"none"},styleFrom:t=>{const o=w(t);return _(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=w(e);return _(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],D=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ee=()=>({name:"Scroll-Over Text",skip:e=>$(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...m,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...y.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:Q,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:D("Button color"),buttonTextColor:D("Button text color"),...p}}),N={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},te={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...te,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},P=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},oe=(e,t)=>{const o=P(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},U={boxShapePhone:"landscape"},R="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",ne=(e,t)=>({[e]:t,[K(e)]:t}),ie={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},F=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),re=()=>({name:"Brand Text",boxProps:(e,t)=>({...m,...M("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,100)}),box:[...y,...I(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:b,style:{...N,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(F(e).length,1),3),...ne("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:F,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Z,style:ie},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},O("Picture","imageSrc",U)],drop:{...p,grayscale:R,...H}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},ae=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",se=e=>Math.min(Math.max(r(e.overlay)??60,0),100),L=e=>typeof e=="string"&&e.trim()!=="",de={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},C=e=>({...O("Picture","imageSrc",(t,o)=>({...L(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...U,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",A(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:de,style:{...q(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},le={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:ae(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...oe(e,72),gap:24,gapPhone:24,...L(e.textBgSrc)?{darken:se(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",A(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:b,style:N,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},he=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...m,...M("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,72)}),box:[...y,...I(l)],parts:[C(!1),le,C(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:R,...p,...H}}),Se={IntroBleed:ee(),Manifesto:re(),Split:he()};export{Se as EDITORIAL_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{boxJoin as
|
|
1
|
+
import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{boxJoin as s}from"./box-join.js";import{cardTemplateOnInsert as p}from"../../../../format/lib/document/passes/card-template-on-insert.js";import{cellWidth as c}from"./cell-width.js";import{clickableParts as f}from"./clickable-parts.js";import{cardCorners as l,sectionCorners as a}from"./corners.js";import{emptyHeadings as d}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as h}from"../../../../format/lib/document/passes/show-when-rows.js";import{headBox as S,headCore as u}from"./head-core.js";import{hiddenNodes as b}from"./hidden-nodes.js";import{showFor as g}from"./show-for.js";import{mediaValues as w}from"../../../../format/lib/document/passes/media-values.js";import{sectionAnchor as k}from"./section-anchor.js";import{blockEntrance as A,sectionAnimation as P}from"./section-animation.js";import{blockScroll as C,sectionScroll as B}from"./scroll-effect.js";import{sectionHeight as W,sectionHeightFillRoot as y}from"./section-height.js";import{cardSticky as G,sectionSticky as H}from"./section-sticky.js";import{sectionBorder as R}from"./borders.js";import{blockPadding as T,sectionPadding as x}from"./section-padding.js";import{sectionTheme as E,slideTheme as F}from"./section-theme.js";import{buttonAlignInRow as I,containedWidth as L,sectionWidth as O}from"./section-width.js";import{blockGroups as z,sectionGroups as D}from"../../../../format/lib/document/passes/settings-groups.js";import{slotsStartAfresh as J}from"./slots-start-afresh.js";import{openSlotDisallow as K,sectionGroupAllow as N}from"../../../../format/lib/document/passes/slot-rules.js";import{registryPassContext as go}from"../../../../format/lib/document/passes/registry-context.js";const V=[J,w,u,N,K,x,a,R,l,T,A,C,c,O,L,I,W,k,E,P,B,H,G,s,F,n,D,z,h,d,f,S,g,y,b,e,p];function So(r,m,o){const t=m;for(const i of V)i.applies(r,o,t)&&(o.inspector&&i.panel?.(t,r,o.inspector,o),i.draw?.(t,r,o));return m}export{V as BLOCK_PASSES,So as applyBlockPasses,go as registryPassContext};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import type { BlockPass } from "../../../../format/lib/document/passes/types.js";
|
|
1
|
+
import type { BlockPass, PassResolveFields } from "../../../../format/lib/document/passes/types.js";
|
|
2
|
+
export declare function heightFillOffered(data: {
|
|
3
|
+
props?: Record<string, unknown>;
|
|
4
|
+
}, params: Parameters<PassResolveFields>[1]): boolean;
|
|
2
5
|
export declare const sectionHeight: BlockPass;
|
|
6
|
+
export declare const sectionHeightFillRoot: BlockPass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{createElement as H}from"react";import{SECTION_MIN_HEIGHT_EXCLUDED as p,sectionHeightFillClass as F,sectionHeightFillViews as w,sectionHeightWrap as E}from"../../../../format/lib/content/section-min-height.js";import{CellWrap as x}from"../../../components/InBoxContext.js";import{HeightFillContext as C,heightFillClaim as _}from"../../../components/ViewHideRoot.js";import{drawsCopiesInTheBox as g}from"../../../../format/lib/content/copies-in-box.js";import{BOX_TYPE as M}from"../../../../format/lib/document/container-blocks.js";import{findParentNode as y}from"../../../../format/lib/document/passes/document-position.js";const c=["sectionHeightMode","sectionHeightModeTablet","sectionHeightModePhone"];function N(e,o){const i=e.props??{};return c.some(r=>i[r]==="fill")?!0:("parent"in o?o.parent:y(o.appState,i.id))?.type===M}const P={name:"sectionHeight",applies:(e,o,i)=>o.isSection(e)&&!p.has(e)&&!!i&&typeof i.render=="function",panel(e,o,i){const t=i.heightFields;e.fields={...e.fields,...t()};const r=t({fill:!0}),h=new WeakMap,u=s=>{if(!s||!c.some(l=>l in s))return s;let n=h.get(s);if(!n){n={...s};for(const l of c)l in n&&(n[l]=r[l]);h.set(s,n)}return n},a=e.resolveFields;e.resolveFields=(s,n)=>{const l=a?a(s,n):n.fields,f=d=>N(s??{},n)?u(d??n.fields):d;return l instanceof Promise?l.then(f):f(l)}},draw(e,o){const i=e.render;e.render=t=>{if(g(o,t))return i(t);const r=E(t);return r?m(x,{className:r.className,style:r.style,children:i(t)}):i(t)}}},W={name:"sectionHeightFillRoot",applies:P.applies,draw(e,o){const i=e.render;e.render=t=>{const r=g(o,t)?null:_(F(t),w(t).join(" "));return H(C.Provider,{value:r},i(t))}}};export{N as heightFillOffered,P as sectionHeight,W as sectionHeightFillRoot};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "67.
|
|
3
|
+
"version": "67.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,7 +42,7 @@
|
|
|
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:own-ui": "efficient-shell-ui-check",
|
|
45
|
+
"test:own-ui": "node node_modules/efficient-shell-checker/dist/bin/ui-check.js",
|
|
46
46
|
"test:media-hosts": "efficient-shell-media-host-check",
|
|
47
47
|
"build": "node scripts/build.mjs",
|
|
48
48
|
"verify:dist": "node scripts/verify-dist.mjs && node scripts/verify-published-entries.mjs",
|
|
@@ -72,8 +72,9 @@
|
|
|
72
72
|
"@types/node": "^20",
|
|
73
73
|
"@types/react": "^19",
|
|
74
74
|
"@types/react-dom": "^19",
|
|
75
|
-
"efficient-easel": "^34.
|
|
75
|
+
"efficient-easel": "^34.2.0",
|
|
76
76
|
"efficient-shell": "^12.33.0",
|
|
77
|
+
"efficient-shell-checker": "npm:efficient-shell@12.37.0",
|
|
77
78
|
"esbuild": "^0.28.0",
|
|
78
79
|
"happy-dom": "^20.14.5",
|
|
79
80
|
"isomorphic-dompurify": "^3.18.0",
|