efficient-web-builder 59.3.0 → 60.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -1
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +4 -2
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +23 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +9 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/footprint.d.ts +2 -0
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/hover-media.d.ts +30 -0
- package/dist/format/lib/content/hover-media.js +1 -0
- package/dist/format/lib/content/ink.d.ts +3 -0
- package/dist/format/lib/content/ink.js +1 -1
- package/dist/format/lib/content/list-position.d.ts +3 -0
- package/dist/format/lib/content/list-position.js +1 -0
- package/dist/format/lib/content/list-query.d.ts +2 -0
- package/dist/format/lib/content/list-query.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +3 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +7 -0
- package/dist/format/lib/document/card-content-switch.js +1 -1
- package/dist/format/lib/document/panel-only.d.ts +2 -0
- package/dist/format/lib/document/panel-only.js +1 -0
- package/dist/format/lib/document/seed-shape.d.ts +2 -0
- package/dist/format/lib/document/seed-shape.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +14 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/source-rules/published-mounts.d.ts +11 -1
- package/dist/format/lib/source-rules/published-mounts.js +57 -9
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -2
- package/dist/format/lib/source-rules/support/ts-program.d.ts +4 -0
- package/dist/format/lib/source-rules/support/ts-program.js +2 -0
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +3 -3
- package/dist/render/components/CardRowContext.d.ts +5 -2
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroArrows.d.ts +6 -3
- package/dist/render/components/HeroArrows.js +1 -1
- package/dist/render/components/HoverMediaLayer.d.ts +9 -0
- package/dist/render/components/HoverMediaLayer.js +1 -0
- package/dist/render/components/ListSearchBox.d.ts +2 -1
- package/dist/render/components/ListSearchBox.js +1 -1
- package/dist/render/components/SideListLayout.d.ts +14 -0
- package/dist/render/components/SideListLayout.js +1 -0
- package/dist/render/lib/dealer-source.d.ts +3 -2
- package/dist/render/lib/dealer-source.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
- package/dist/render/lib/document/text-parts.d.ts +1 -0
- package/dist/render/lib/document/text-parts.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_WIDTH_KEYS as L}from"../../../../../format/lib/content/section-width.js";import{phoneKey as v}from"efficient-easel/draw";import{BOX as w,INNER_BOX as
|
|
1
|
+
import{SECTION_WIDTH_KEYS as L}from"../../../../../format/lib/content/section-width.js";import{phoneKey as v}from"efficient-easel/draw";import{BOX as w,INNER_BOX as U,LABEL_FACE as N,TEXT as k,boxPadding as M,fillSlot as _,token as y}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_KEYS as F}from"../../../animation/entrance.js";import{CARD_HOVER_KEYS as B}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as K}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as X}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as G}from"../../../content/section-padding.js";import{ButtonBlockMeta as Y}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as V}from"../../passes/section-padding.js";import{finiteNumber as p}from"../../../../../format/lib/finite-number.js";import{convertTheme as P,hasWords as j}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as $}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as A}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as J}from"efficient-shell/format";import{convertLength as z,isLengthUnit as q}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as Q,surfacePresetIndex as Z,surfaceTwoTone as tt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as ot}from"../../../../../format/lib/content/view-hide-class.js";const E=t=>q(t)?t:"px",r=(t,o,e,n)=>o===e?t:z(t,o,e,n,{min:0,max:200,step:4});import{BOX as eo,DIM as no,INNER_BOX as io,TEXT as so}from"../../../../../format/lib/document/seed-parts.js";const kt={textFit:"line",textFitPhone:"wrap"},et={...k,[K]:""},{label:At,href:Ct,...nt}=Y.defaultProps,Ht=nt,Rt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},Dt={...w,sectionAccent:0},Wt={sectionAccent:-1},Lt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation",...ot,...Object.values(F).flatMap(t=>[t,v(t)]),"widthFit","widthFitTablet","widthFitPhone","width","widthTablet","widthPhone","minWidth","minWidthTablet","minWidthPhone","maxWidth","maxWidthTablet","maxWidthPhone",...Object.values(L)],c="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",vt={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:c,fullWidth:c,pageWidth:c,backgroundWidth:c,contentWidth:c,contentMax:c},wt=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 it(t,o){const e=p(t.sectionPaddingTop)??0,n=p(t.sectionPaddingBottom)??0,i=p(t.sectionPaddingTopTablet),s=p(t.sectionPaddingBottomTablet),l=E(t.sectionPaddingUnit),g=E(t.sectionPaddingUnitTablet),T=E(t.sectionPaddingUnitPhone),O=(h,a,x,m)=>{const d=p(h);if(d!==void 0)return d+r(m,"px",T,"mobile");const I=a===void 0?{n:x,unit:l}:{n:a,unit:g};return r(I.n,I.unit,T,"mobile")+r(m,"px",T,"mobile")},S=(h,a,x,m,d)=>a!==void 0?{[h]:a+r(d??m,"px",g,"tablet")}:d===void 0?{}:{[h]:r(x,l,g,"tablet")+r(d,"px",g,"tablet")};return{sectionPaddingTop:e+r(o.top,"px",l,"desktop"),sectionPaddingBottom:n+r(o.bottom,"px",l,"desktop"),...S("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...S("sectionPaddingBottomTablet",s,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:O(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:O(t.sectionPaddingBottomPhone,s,n,o.bottomPhone)}}const Mt=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>it(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function f(t,o){const e=G(t,V[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const yt=t=>[["padTop","sectionPaddingTop",(o,e)=>f(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>f(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>f(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>f(e,t).sectionPaddingBottom]],st={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},Ft=t=>o=>j(o.props[t])?[st]:[],rt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:k,...o?{style:o}:{}}),Kt=t=>({kind:"group",name:"Chip",props:{...U,..._("main"),...M(6,14)},parts:[rt(t,{color:"background",...y("label",12),weight:600,letterSpacing:.16})]}),C=t=>t.background!=="transparent",dt=(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},H={align:"right",alignPhone:"left"},ct=(t,o,e)=>{const n=i=>dt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,s)=>s!==void 0&&n(s)!=="",box:[[t,"text",(i,s)=>n(s)],[o,"text",(i,s)=>n(s)]],props:e}},Xt=(t,o,e,n={})=>ct(t,o,{...et,...H,...n,_partStyles:{text:{...N,color:"labels",...e,case:N.case,...H}}}),u=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:P(o)?.selected??0,R="var(--site-surface-2)",D=(t,o)=>P(o)?.themes[u(t.sectionAccent??0,o)],at=(t,o)=>(e,n)=>{if(!o?.(e,n))return _(t);const i=D(e,n)?.[t];return i?{fillColor:i}:{}},Gt=(t,o)=>b(t,o)>=0,W=t=>t.startsWith("#")&&J(t)!==null,Yt=(t,o,e)=>{const n=t?.trim();if(n&&W(n))return{fillColor:n};const i=A(n);if(i)return _(i);const s=n===R?D(o,e):void 0;return s?{fillColor:tt(s)}:{}},Vt=t=>{const o=t?.trim();return!o||o==="transparent"||o===$||A(o)||o===R||W(o)?void 0:"it paints a colour that no Box Fill can hold"},b=(t,o)=>{const e=P(o)?.themes;return e&&C(t)?Q(e,u(t.sectionAccent,o)):-1},jt=(t,o,e)=>{const n=b(o,e);return n>=0?n:t},$t=(t,o)=>{const e=P(o)?.themes,n=e?Z(e,u(t,o)):-1;return n>=0?n:t},Jt=(t,o)=>{const e=b(t,o);return e>=0?{sectionAccent:e}:{}},zt=(t,o)=>C(t.props)&&b(t.props,o)<0?[{kind:"band-preset",page:u(t.props.sectionAccent,o)}]:[],qt=t=>X(t.site?.siteGutter),pt=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),Qt=t=>({top:0,right:0,bottom:0,left:0,...t}),Zt=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,s)=>({...U,...pt,...at("surface")(i,s),...typeof e=="function"?e(i,s):e}),box:[[o,"bgImage"],B.kind,B.duration,B.delay],parts:n});export{kt as AUTO_COLUMN,eo as BOX,Ht as BUTTON,no as DIM,vt as DROP_COMMON,wt as DROP_SIDE_PADDING,Wt as FOLLOW_THE_BOX,st as HEADING_CASE_UPPER,io as INNER_BOX,pt as NO_PAD,et as NUMBER_TEXT,H as RIGHT_WORDS,Lt as SAME_KEYS,Dt as SECTION_BOX,Rt as SH_LINK,so as TEXT,jt as bandAccent,b as bandIndex,u as bandPage,Jt as bandProps,zt as bandWrites,at as fillFrom,Vt as fillNoBoxHolds,Kt as filledChip,Ft as headingCaseOf,f as innerPad,yt as innerPadKeys,Xt as leadLine,ct as leadText,Qt as lineSides,dt as numberAndUnit,Gt as onBandPreset,Yt as ownFill,Zt as pictureCell,D as sectionPage,qt as siteGutterOf,rt as smallText,$t as surfaceAccent,it as wrapperPad,Mt as wrapperPadKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DIM as
|
|
1
|
+
import{DIM as g,DROP_COMMON as n,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as a,INNER_BOX as o,SAME_KEYS as _,SECTION_BOX as k,TEXT as y,filledChip as u,smallText as P,surfaceAccent as c,wrapperPad as C,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{token as r}from"../../../../../format/lib/document/seed-parts.js";import{phoneKey as E}from"efficient-easel/draw";import{CHART_OWN_BOX_WORDS as x}from"../../../../../format/lib/document/blocks/general/Chart/meta.js";import{MOCKUP_OWN_BOX_WORDS as S}from"../../../../../format/lib/document/blocks/general/Mockup/meta.js";const i={top:76,bottom:76,topPhone:76,bottomPhone:76},d=()=>({kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[{kind:"group",name:"Chip row",props:{...o,direction:"row",phoneRow:2,[E("share")]:"content"},parts:[u("eyebrow")]},{kind:"text",key:"title",role:"heading",props:y,style:{textStyle:"heading-2",...r("headingMedium",44,32),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"body",props:{...g,maxWidth:435},style:{textStyle:"body-1",...r("body",15),lineHeight:1.625}}]}),m=e=>(t,p)=>({...k,sectionAccent:c(t.sectionAccent??0,p),direction:"row",align:"center",gap:56,gapPhone:56,share:e,sectionBorder:{top:1,bottom:1},...C(t,i)}),O=[..._.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,p)=>c(e,p)],...b(i)],f=()=>({name:"Chart",boxProps:m([42]),box:O,parts:[d(),{kind:"group",name:"Chart",props:{...o,gap:16,gapPhone:16},keepEmpty:!0,parts:[{kind:"core",keep:"rest",props:a},P("caption",{color:"muted",...r("label",10),letterSpacing:.14})]}],pressKeepsEmpty:[...x],drop:{...n,...s}}),h=e=>e.align==="left",l={kind:"group",name:"Card",keepEmpty:!0,props:o,parts:[{kind:"core",keep:"rest",props:a}]},w=()=>({name:"Mockup Card",boxProps:m("equal"),box:O,parts:[{...l,when:h},d(),{...l,when:e=>!h(e)}],pressKeepsEmpty:[...S],drop:{...n,...s}}),M={Chart:f(),Mockup:w()};export{M as PROOF_SECTION_TO_BOX};
|
|
@@ -31,6 +31,7 @@ export declare function partNeedles(fields: Record<string, unknown> | undefined,
|
|
|
31
31
|
export declare function canTypeOnCanvas(part: {
|
|
32
32
|
offPage: boolean;
|
|
33
33
|
hidden: boolean;
|
|
34
|
+
panelOnly?: boolean;
|
|
34
35
|
}): boolean;
|
|
35
36
|
export type SectionTextPart = {
|
|
36
37
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{decodePartId as
|
|
1
|
+
import{decodePartId as w,encodePartId as E}from"efficient-easel/draw";import{stripMarkup as y}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as R,SCAFFOLD_FIELD_MARKER as A,TEXT_FIELD_MARKER as p}from"efficient-easel/draw";import{readHidable as h}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as L}from"efficient-easel/draw";import{isStructuralTextProp as _}from"../../../format/lib/document/neutralization-contracts.js";import{fieldInOwnBox as I}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as S}from"../../../format/lib/document/panel-only.js";import{partRowTexts as j}from"./part-rows.js";import{nonEmptyString as N}from"../../../format/lib/non-empty-string.js";const Q="data-sf-part",U="data-sf-region-part",V="data-sf-part-row";function Z(t,e){return`${t}[${e}]`}const v="data-sf-part-kind",F="data-sf-part-style-owner",k="data-sf-part-style-kind";function tt(t){for(let e=t;e;e=e.parentElement){const r=e.getAttribute(F),o=e.getAttribute(k);if(r&&o)return{owner:r,kind:o};if(e.getAttribute("data-easel-block"))return null}return null}const b=2;function O(t){return y(t).replace(/\s+/gu,"")}function l(t,e,r){const o=t[p];if(o){if(o.control==="textList"){const i=o.itemKey??"text";if(!Array.isArray(e))return;for(const s of e){const c=s?.[i];typeof c=="string"&&r.push(c)}return}const{text:n}=h(e);n?r.push(n):o.placeholder&&r.push(o.placeholder);return}if(!t[R]){if(t.type==="text"||t.type==="textarea"){const n=N(e);n&&r.push(n);return}if(t.arrayFields&&Array.isArray(e)){for(const n of e)for(const[i,s]of Object.entries(t.arrayFields))l(s,n?.[i],r);return}if(t.objectFields&&e&&typeof e=="object")for(const[n,i]of Object.entries(t.objectFields))l(i,e[n],r)}}function K(t){if(!t||typeof t!="object")return!1;const e=t;return e[R]?!1:!!e[p]||e.type==="text"||e.type==="textarea"}function P(t,e){const r=t[p];return r?.label?r.label:typeof t.label=="string"?t.label:e}function D(t){const e=t.indexOf(" (");return(e>0?t.slice(0,e):t).trim()}function et(t,e,r){if(!t)return[];const o=[];for(const[n,i]of Object.entries(t)){if(!i||typeof i!="object"||_(n))continue;const s=i,c=[];l(s,e?.[n],c),!c.length&&s[A]!==void 0&&l(s,s[A],c);const a=P(s,n);if(r?.(n)&&K(s)){c.length&&o.push({key:n,label:a,texts:[],keyed:!0});continue}const u=new Set;for(const{row:x,text:f}of j(s,e?.[n])){const m=O(f);m.length<b||(u.add(m),o.push({key:n,label:a,texts:[m],row:x}))}const T=new Set(u),d=[];for(const x of c){const f=O(x);f.length<b||T.has(f)||(T.add(f),d.push(f))}d.length&&o.push({key:n,label:a,texts:d})}return o}function M(t){return!t.offPage&&!t.hidden&&t.panelOnly!==!0}const C=L;function g(t,e){if(!e||typeof e!="object"||_(t)||I(e))return null;const r=e[p];return!r||!C.includes(r.control)?null:r}function rt(t,e){const r=g(t,e);return r!==null&&r.identifier!==!0}function nt(t,e){if(!t)return[];const r=[];for(const[o,n]of Object.entries(t)){const i=g(o,n);if(!i)continue;const{text:s,hidden:c}=h(e?.[o]);if(M({offPage:i.offPage===!0,hidden:!!c,panelOnly:S(n)}))continue;const a=s||i.placeholder||"",u=y(a).replace(/\s+/gu," ").trim();r.push({key:o,label:D(P(n,o)),preview:u,offPage:i.offPage===!0,identifier:i.identifier===!0,hidden:!!c})}return r}export{Q as PART_ATTR,v as PART_KIND_ATTR,V as PART_ROW_ATTR,k as PART_STYLE_KIND_ATTR,F as PART_STYLE_OWNER_ATTR,U as REGION_PART_ATTR,M as canTypeOnCanvas,w as decodePartId,E as encodePartId,Z as encodePartRow,g as entryPartMetaOf,rt as fieldDrawsEntryRow,K as holdsAuthoredText,O as normalizePartText,D as partHeadLabel,P as partLabel,et as partNeedles,tt as partStyleOwnerOf,nt as sectionTextParts};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "60.0.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",
|