efficient-web-builder 55.1.0 → 55.2.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 +27 -0
- package/dist/editor/lib/document/block-source-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/part-anchors.js +1 -1
- package/dist/editor/lib/host-document-bridge.d.ts +4 -1
- package/dist/editor/lib/host-document-bridge.js +1 -1
- package/dist/editor/lib/sections/text-layouts.d.ts +2 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/content/block-sources.d.ts +6 -1
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/card-state.d.ts +6 -0
- package/dist/format/lib/content/card-state.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +8 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/footprint.d.ts +1 -0
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/Footprint/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
- package/dist/format/lib/document/blocks/general/Logos/meta.d.ts +7 -0
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/section-catalog.js +6 -2
- package/dist/format/lib/editor-words-kept.d.ts +1 -0
- package/dist/format/lib/editor-words-kept.js +1 -0
- package/dist/format/lib/fonts.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -2
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Flex.d.ts +2 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.d.ts +4 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +2 -2
- package/dist/render/components/PartStyledKind.d.ts +2 -1
- package/dist/render/components/PartStyledKind.js +1 -1
- package/dist/render/components/Text.d.ts +3 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/lib/content/box-shared-columns.d.ts +6 -0
- package/dist/render/lib/content/box-shared-columns.js +1 -1
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-fitment.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-fitment.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/text-parts.d.ts +2 -1
- package/dist/render/lib/document/text-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +2 -0
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 55.2.0 - 2026-11-06
|
|
4
|
+
|
|
5
|
+
From main at `38004144`: #551, #527, #555, #556, #558, #552, #563, #559, #564, #561, #562. A minor: no `!` in any title, the peers stay `efficient-easel` `^28.2.0` and `efficient-shell` `^12.13.0`, no module is deleted or moved and no declared export is removed. No stored key or value moves: `SECTION_TO_BOX_ON` stays empty, so every stored node draws as before; only a NEW insert changes.
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- Take efficient-storefront-blocks 0.86.0 or later: a new Fitment Form insert lays down its `FitmentPicker` and `StockFitment` blocks (#556, blocks #395).
|
|
9
|
+
- Take this release together with the efficient-storefront-blocks Product Grid card template: a host that bumps web-builder alone sees the grid's Cards fold under Content (#552).
|
|
10
|
+
- The Jost row (#527) has no face loader here: storefront-blocks must add the Jost loader in the same bump (its `package/build.mjs` throws on a row with no loader).
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **New inserts draw as a Box** for Form and Photo Submission Form (#551), the Locations Map with one card template of real parts (#555) and the Fitment Form (#556: head, `FitmentPicker`, `StockFitment`, button). `HOST_ROW_HEAD_TYPES` loses `FitmentFinder`. A template `ButtonBlock` whose row leaves its words empty draws nothing (#555).
|
|
15
|
+
- **A Card list item can act** (#562). A data block gives an item a `press` function; the copy draws one empty `<button data-sf-card-press>` over itself, named by the copy's words, `aria-pressed` from its `selected` state. New exports `CARD_ACTION_CLASS`, `cardItemAction`. Never from stored data, never in the editor. The Locations Map legend uses it.
|
|
16
|
+
- **Shared rows** (#552): `sharedRows: "shared"` on a Stacked card Box puts its parts on the rows of the host's grid (`SHARED_ROWS_LIST_CLASS`), so every card in a grid row lines up. Unset draws as before. The grid card template's parts (`ProductPicture`, `ProductEyebrow`, `ProductName`, `ProductSpecs`, `ProductBuy`) join the commerce set.
|
|
17
|
+
- **A block source's edit link can be an action** (#558): `{ label, open }` beside `{ label, href }`. New exports `SourceEditAction`, `isSourceEditAction`.
|
|
18
|
+
- **Jost in the font list** (#527).
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **Related Products leaves the Add menu** (#552): a Product Grid with "Show the current product's related" on is the one related grid. A stored node still draws. `ProductGrid._gCards` leaves `KEY_GROUP`.
|
|
23
|
+
- **Testimonials leaves the Add menu; Logos is a Layouts row** (#563). A new logo wall is a Box of real blocks. The AI insert path refuses every retired type; `describeBlocks` marks them `retired: true`.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **A row-bound Text takes its part style by key** (#561), so a 1-character row value ("8", "%") draws its part's size and colour.
|
|
28
|
+
- Test only: stored Ticker and Spec Strip output is pinned (#559); the Box path baseline drops Logos from `withoutC` (#564).
|
|
29
|
+
|
|
3
30
|
## 55.1.0 - 2026-11-06
|
|
4
31
|
|
|
5
32
|
From main at `868416f8`: #548, #550, #553, #530. A minor: additions only, no `!` in any title. The peers stay `efficient-easel` `^28.2.0` and `efficient-shell` `^12.13.0`. No declared export is removed (`CardRowFieldKind` gains `"list"`; the Box phone-place class strings gain their Card list twin). No stored key or value moves.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import{ListIcon as C}from"efficient-easel/icons";import E from"../../components/SourceStatus.js";import{say as $}from"../../../format/lib/editor-words.js";import{NoControlMark as W,noControlField as j}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{BLOCK_SOURCE_PROP as w,blockSourceSpec as L,blockSources as R,blockSourcesRevision as d,declaredBlockSource as B,isSourceEditAction as F}from"../../../format/lib/content/block-sources.js";import{select as K}from"./box-fields.js";import{withShowWhen as P}from"../../../render/lib/document/show-when.js";function V(e,t){return K(e,f(C,{}),[{label:t,value:""}],"")}const U="_sourceEdit";function X(){return j({type:"custom",render:()=>f(W,{})},"always")}const y=new Map,g=new WeakMap,v=(e,t)=>({type:"custom",render:()=>f(E,{compact:!0,status:"ok",hint:$("Where this content is edited."),edit:{label:e,onClick:t}})});function I(e){if(F(e)){let o=g.get(e.open);o||g.set(e.open,o=new Map);let s=o.get(e.label);return s||o.set(e.label,s=v(e.label,e.open)),s}const t=`${e.label}\0${e.href}`;let n=y.get(t);return n||(n=v(e.label,()=>window.open(e.href,"_blank","noopener")),y.set(t,n)),n}const O=new WeakMap;let _=-1,m={};const M=new WeakMap;function N(e,t,n){_!==d()&&(_=d(),m={});let o=O.get(t);(!o||M.get(o)!==m)&&(o=new Map,M.set(o,m),O.set(t,o));const s=R(e),r=n&&!s.some(c=>c.key===n)?n:"",l=`${e}\0${r}`;let i=o.get(l);return i||(i={...t,options:[...t.options,...s.map(c=>({label:c.label,value:c.key})),...r?[{label:r,value:r}]:[]]},o.set(l,i)),i}const k=new WeakMap,A={not:{field:w,set:!0}};function Y(e,t,n,o={}){const s=t[w];if(!s)return t;const r=B(n),l=R(e).length>0||r!=="",i=l?N(e,s,r):null;let c=k.get(t);c||k.set(t,c=new Map);const b=`${d()}\0${l?"1":"0"}\0${r}\0${(o.hides??[]).join(",")}`,S=c.get(b);if(S)return S;const x=new Set(o.hides??[]),h=r?L(r)?.edit:void 0,u={};for(const[a,p]of Object.entries(t))a===w?i&&(u[a]=i):a===U?h&&(u[a]=I(h)):u[a]=x.has(a)&&p&&typeof p=="object"?P(p,A):p;return c.set(b,u),u}export{U as BLOCK_SOURCE_EDIT_PROP,A as NO_BLOCK_SOURCE,X as blockSourceEditField,V as blockSourceField,Y as blockSourceFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{phoneKey as n,tabletKey as t}from"efficient-easel/draw";import{BOX_CARD_PAD as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{phoneKey as n,tabletKey as t}from"efficient-easel/draw";import{BOX_CARD_PAD as A,isBackgroundBox as to}from"../../../../../../format/lib/content/box-background.js";import{darkenFields as ro}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as io,REEL_SHAPE_LABELS as ao}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as lo,TAB_SHAPE_PICTURES as so}from"../../../choice-pictures.js";import{deviceField as c}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as co,ClockIcon as po,CropIcon as N,MediaLayoutStackedIcon as So,LineBetweenIcon as _o,LineSolidIcon as mo,ShadowIcon as ho,StylesIcon as Oo,TableIcon as F,TargetIcon as fo,WrapIcon as Ro}from"efficient-easel/icons";import{boxBlockSpacingField as Ao,boxFillField as uo,boxColumnsFields as wo,boxShareField as go,boxSharePhoneField as Co,boxShareTabletField as Eo,containerDirectionField as To,containerGapRows as bo,linkField as Do,plainText as Lo,swapPadding as k,toggle as _,upload as I,withPanelOnly as No}from"../../../controls.js";import{BOX_STACK_LINE as H,BOX_STACK_RANGE as w,STACK_BELOW_PROP as x}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as P,boxShapeOf as Fo}from"../../../../../../format/lib/content/box-shape.js";import{shapeLines as B}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as W}from"../../../shape-picker.js";import{BOX_COLUMNS_MAX as g,BOX_COLUMNS_MIN as C,boxPhoneRowOneLine as ko,boxWrapWordOf as Io}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as y}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as Ho,VIEW_KEY_ACCESS as l,group as m,phoneTwinFields as a}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as xo,boxJustifyField as Po,boxWrapField as u,iconPickerRow as Bo,placementField as Wo,select as M,sidesPaddingFields as U,slider as yo}from"../../../box-fields.js";import{withRowRules as Mo}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Uo}from"../../../separator-field.js";import{LOOP_SCROLLS as Ko}from"../../../../../../format/lib/animation/index.js";import{accordionOnSet as Xo}from"../../../box-accordion-seed.js";import{FlexSlots as K}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{boxPhoneOrderField as jo}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as vo,ON_A_CARD as Go,cardDisplayField as Yo}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Vo,MIRROR_CARDS_MIRRORS as Jo,mirrorCardsField as zo}from"../../../mirror-cards-field.js";import{SHOW_FOR_FACTS as qo,showForField as Qo,showForFields as Zo}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as h,SHARED_COLUMNS_LABEL as X,SHARED_COLUMNS_OFF as j,sharedColumnsDrawn as v,sharedColumnsFits as G,SHARED_COLUMNS_PHONE_POINTS as $o,SHARED_COLUMNS_POINTS as oe,sharedRowsDrawn as ee}from"../../../../../../render/lib/content/box-shared-columns.js";const E={field:"bgImage",set:!0},Y={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},ne={field:"direction",is:"tabs"},te={field:"line",in:[!0,!1]},re={field:"anchor",set:!0},T=["fixed","screen"],ie={not:{any:[{field:"sectionHeightMode",in:T},{field:"sectionHeightModeTablet",in:T},{field:"sectionHeightModePhone",in:T}]}},ae={context:"parent.line",is:!0},d={not:{field:"direction",is:"accordion"}},V="notAccordionRow",le={not:{context:V,is:!0}},se={[V]:(o,e)=>e.parent?.props?.direction!=="accordion"},b={field:"direction",is:"row",default:"row"},p={not:Ko},O={all:[b,p,{not:{field:"separator",in:y.map(o=>o.value)}},{not:{field:"line",is:!0}}]},J={all:[O,...["columns",t("columns")].map(o=>({not:{field:o,in:Array.from({length:g},(e,r)=>r+C)}}))]},ce={all:[p,{not:{all:[b,{field:"separator",in:y.map(o=>o.value)}]}}]},D={not:{all:[O,{field:"columns",in:Array.from({length:g},(o,e)=>e+C)}]}},de="sharedColumnsFits",z="sharedColumnsMisfit",q="sharedColumnsDraws",Q="sharedColumnsPhoneDraws",pe={[de]:o=>G(o.props??{}),[z]:o=>!G(o.props??{}),[q]:o=>v(o.props??{}).desktop,[Q]:o=>v(o.props??{}).phone};function Z(o){return{all:[{not:{context:z,is:!0}},{any:[Go,{field:o,set:!0}]}]}}const S={not:{context:q,is:!0}},f={not:{context:Q,is:!0}},$="sharedRowsDraws",Se={[$]:o=>ee(o.props??{})},R={not:{context:$,is:!0}},_e={any:[S,f]},L={not:E},me={not:{context:Jo,is:!0}},oo={all:[d,L,S,f,me]},he={field:"direction",is:"row"},Oe={field:"align",in:["start","center","end"]},fe={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function Re(){const{darken:o,darkenStyle:e}=ro();return{...a("darken",o,l),...a("darkenStyle",e,l)}}const eo={not:{all:[O,{field:t("columns"),in:Array.from({length:g},(o,e)=>e+C)}]}};function Ae(){const o=_(Ho,!1,i(Ro,{})),e=r=>{const s=Io(r);return s===void 0?void 0:s==="wrap"};return{...u(),render:r=>o.render({...r,value:e(r.value),follows:e(r.follows)??!1,onChange:s=>r.onChange(s===void 0?void 0:s?"wrap":"nowrap")})}}function ue(o){return{...o,render:e=>o.render({...e,value:ko(e.value)?"nowrap":"wrap"})}}const ze={fields:Mo({_gContent:m("Content"),rowTitle:K.rowTitle,content:K.content,_gCardDisplay:m("Display"),cardDisplay:Yo(),showFor:Qo(),_gLayout:m("Layout"),direction:To("Flex"),tabShape:Bo("Tab shape",i(Oo,{}),io.map(o=>({label:ao[o],value:o,picture:so[o]})),"tabs",{columns:2,cell:lo}),mirrorCards:zo(),[x]:c("desktop",yo("Stacks below",i(So,{}),w.min,w.max,w.step,H,"px",{clear:{hint:H},hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),startsOpen:c("desktop",_("Starts open",!1,i(co,{}))),label:No(Lo("Tab name")),...bo("Flex"),...a("justify",Po(),l),...a("align",xo(),l),...(()=>{const o=a("wrap",u(),void 0,{phoneRow:ue(u())}),e=a("wrap",u(),l,{phoneRow:Ae()});return{wrap:o.wrap,[t("wrap")]:e[t("wrap")],[n("wrap")]:o[n("wrap")]}})(),[n("order")]:jo(),...a("boxShape",W("Box shape",i(N,{}),B(P),"shape","auto"),l,{phoneRow:W("Box shape",i(N,{}),B(P),"shape","auto",{phoneRest:o=>Fo(o)})}),separator:Uo(i(_o,{size:18}),"none"),share:c("desktop",go()),[t("share")]:Eo(),[n("share")]:Co(),[h]:c("desktop",M(X,i(F,{}),[...oe],j)),[n(h)]:c("mobile",M(X,i(F,{}),[...$o],j)),...wo(),...a("blockSpacing",Ao(),l),line:_("Line",!1,i(mo,{}),"A line across the blocks, with a dot on each."),upcoming:_("Upcoming",!1,i(po,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:m("Shadow"),...a("shadow",_("Shadow",!1,i(ho,{})),l),...a("fillColor",uo(),l),_gBackground:m("Background image"),bgImage:c("desktop",I("Image","image/*")),bgImagePhone:c("mobile",I("Image","image/*")),...Re(),placement:Wo("Content position"),_gLink:m("Link"),link:Do("Link to"),jumpHighlight:_("Highlight when a link jumps here",!1,i(fo,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],E],[[n("share")],{all:[Y,f]}],[[h],Z(h)],[[n(h)],Z(n(h))],[[n("wrap")],{all:[Y,p,f,R]}],[[n("order")],{all:[O,f,S]}],[["phoneRow"],{all:[f,d]}],[["tabShape"],ne],[["rowTitle","startsOpen"],le],[["align","blockSpacing",t("blockSpacing"),n("blockSpacing")],d],[[t("justify"),n("justify")],{all:[p,oo,R]}],[[t("align"),n("align")],{all:[he,Oe,oo]}],[[t("wrap")],{all:[p,D,eo,S,d,R]}],[[t("shadow"),n("shadow")],L],[[t("darken"),n("darken"),t("darkenStyle"),n("darkenStyle")],{all:[E,fe]}],[["separator"],b],[["columns",t("columns")],O],[[x],{all:[O,L,eo,{not:{all:[J,{field:t("share"),set:!0}]}}]}],[[t("gap")],ce],[["justify"],{all:[p,_e,d,R]}],[["wrap"],{all:[p,D,S,d,R]}],[["share"],{all:[D,S,d]}],[[t("share")],{all:[J,S]}],[["line"],te],[["upcoming"],ae],[["jumpHighlight"],re],[["boxShape",t("boxShape"),n("boxShape")],ie]]),resolveData:(o,e)=>{const r=o.props;return r.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Xo(r)}:o},resolveFields:(o,e)=>Zo(we(o,e),o.props),showWhenFacts:{...vo,...Vo,...pe,...Se,...qo,...se}};function we(...[o,{fields:e}]){{const r=o.props;if(to(r.bgImage)){const no=U({fallback:{top:A.desktop,bottom:A.desktop,left:A.side,right:A.side},tablet:!0});return k(e,no)}return o.props.padV2!==!0?k(e,U({fallback:{top:24,bottom:24},tablet:!0})):e}}export{ze as FlexFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{FOOTPRINT_DEFAULTS as O}from"../../../../../../format/lib/content/footprint.js";import{HeadquartersIcon as _,LayoutIcon as E,LocationIcon as I,SearchIcon as P,StoreIcon as k,ThemeIcon as C}from"efficient-easel/icons";import{CoordsField as x,copyText as D,plainText as l,sourceField as N,text as u,textarea as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{FOOTPRINT_DEFAULTS as O}from"../../../../../../format/lib/content/footprint.js";import{HeadquartersIcon as _,LayoutIcon as E,LocationIcon as I,SearchIcon as P,StoreIcon as k,ThemeIcon as C}from"efficient-easel/icons";import{CoordsField as x,copyText as D,plainText as l,sourceField as N,text as u,textarea as h,toggle as f}from"../../../controls.js";import{group as a,section as A}from"efficient-easel/screen/lib/document/box-fields";import{segmented as m}from"../../../box-fields.js";import{withShowWhen as n}from"../../../../../../render/lib/document/show-when.js";import{needsGeocodeWork as H,resolveGeocodeRows as B}from"../../../geocode-resolve.js";import{SPLITTABLE_SECTIONS as M,headFieldsForPlacement as W}from"../../../../../../format/lib/sections/section-head-placement.js";import{innerSpacingFields as U}from"../../shared-fields.js";import{BLOCK_SOURCE_PROP as g,blockSources as j,blockSourcesRevision as w}from"../../../../../../format/lib/content/block-sources.js";import{FOOTPRINT_PH as d,FootprintSlots as q}from"../../../../../../format/lib/document/blocks/general/Footprint/meta.js";const z={field:"source",is:"typed",default:"typed"},c={field:"source",is:"dealers",default:"typed"},b={all:[c,{field:"search",is:!0,default:!1}]},y=[{label:"Typed in",value:"typed"},{label:"Dealers",value:"dealers"}],G=new Set(y.map(e=>e.value)),R=e=>m("Source",i(k,{}),e,"typed");function v(e){const o=typeof e=="string"?e.trim():"";return o&&!G.has(o)&&/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/.test(o)?o:""}const S=new Map;let F=-1;function K(e){const o=j("Footprint"),t=e&&!o.some(s=>s.key===e)?e:"";if(!o.length&&!t)return null;F!==w()&&(F=w(),S.clear());let r=S.get(t);return r||(r=R([...y,...o.map(s=>({label:s.label,value:s.key})),...t?[{label:t,value:t}]:[]]),S.set(t,r)),r}const T=new WeakMap;function Q(e,o){const t=K(o);if(!t)return e;let r=T.get(e);r||T.set(e,r=new Map);let s=r.get(t);return s||(s={...e,source:t},r.set(t,s)),s}const ne={fields:{_gContent:a("Section"),sectionNumber:u("Section number",d.sectionNumber),heading:h("Heading",d.heading),tagline:h("Body",d.tagline),_gOffices:a("Offices"),source:R(y),offices:n({type:"array",label:"Offices",arrayFields:{role:l("Role"),city:l("City"),country:l("Region · country"),address:D("Address"),group:l("Group"),hq:f("HQ",!1,i(_,{})),geocode:N(x,{label:"Coordinates"})},defaultItemProps:{role:"Sales & Distribution",city:"City",country:"Country",address:"",group:"",hq:!1,lat:0,lng:0},getItemSummary:e=>e?.city||"Office"},z),...q,mapTheme:m("Map theme",i(C,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],O.mapTheme),_gSearch:a("Search"),search:n(f("Show",!1,i(P,{})),c),searchHint:n(u("Hint","Type a postcode or address"),b),noMatchText:n(u("No match","No place found. Try another postcode."),b),_gList:a("List"),listPosition:n(m("Position",i(E,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),c),showDistance:n(f("Distance",!0,i(I,{})),c),_dLayout:A("Layout"),...U("Footprint")},resolveData:async e=>{const o=v(e.props.source);(e.props[g]??"")!==o&&(e={...e,props:{...e.props,[g]:o}});const t=e.props,r=t.offices??[];if(!H(r))return e;const s=await B(r,p=>[p.address,p.city,p.country].map(L=>String(L??"").replace(/\*/g,"").trim()).filter(Boolean).join(", "));return{...e,props:{...t,offices:s}}},resolveFields:(e,{fields:o})=>W(Q(o,v(e.props.source)),e.props.headPlacement,M.Footprint.headRows)};export{ne as FootprintFields,v as footprintBlockSource};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{BlackAndWhiteIcon as a,ColumnsIcon as r,HeightIcon as i,PaddingYIcon as m,StylesIcon as n}from"efficient-easel/icons";import{plainText as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{BlackAndWhiteIcon as a,ColumnsIcon as r,HeightIcon as i,PaddingYIcon as m,StylesIcon as n}from"efficient-easel/icons";import{plainText as g,textarea as s,toggle as O,upload as _,withPanelOnly as c}from"../../../controls.js";import{group as l}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as d,slider as t}from"../../../box-fields.js";import{LAYOUT_CELL as p,LOGO_LOOK_PICTURES as L}from"../../../choice-pictures.js";import{DEFAULT_LOGO_LOOK as S,LOGO_LOOK_OPTIONS as f}from"../../../../../../format/lib/sections/logo-look.js";import{HEAD_ROWS_SHOW_WHEN as h,OWN_BOX_ROWS_SHOW_WHEN as u}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";import{LOGOS_PH as H,LogosSlots as I}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const W=["items","heading","bandPadding"],N=["look"],A={fields:y({_gContent:l("Content"),heading:s("Heading",H.heading),items:{type:"array",label:"Logos",arrayFields:{src:_("Image","image/*"),alt:c(g("Name / alt"))},getItemSummary:o=>o.alt||o.src||"logo"},logos:I.logos,_gStyle:l("Style"),columns:t("Columns",e(r,{}),3,6,1,5),logoHeight:t("Logo height",e(i,{}),20,72,2,28,"px"),bandPadding:t("Space above and below",e(m,{}),16,120,4,40,"px"),grayscale:O("Black and white logos",!0,e(a,{})),look:d("Logo style",e(n,{}),f.map(o=>({...o,picture:L[o.value]})),S,{columns:2,cell:p})},[[W,h],[N,u]])};export{A as LogosFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assembleGeneralBlocks: () => Record<"
|
|
2
|
-
export declare const generalBlocks: Record<"
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Testimonials" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
+
export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Testimonials" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of G(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{encodePartKey as
|
|
1
|
+
import{encodePartKey as O}from"../../../format/lib/document/part-key.js";import{HERO_MEDIA_PART_LABELS as U,HERO_PART_ATTR as z,heroPartId as J,readHeroPartId as Q}from"../../../render/lib/document/hero-media-parts.js";import{TICKER_PART_ATTR as N,TICKER_PART_LABEL as V,readTickerPartId as X,tickerPartId as Y}from"../../../render/components/PreviewTickerContext.js";import{BLOCK_ATTRIBUTE as T}from"efficient-easel/canvas";import{decodeLocationPartId as Z,encodeLocationPartId as tt}from"../../../render/components/PreviewLocationPartContext.js";import{PART_ATTR as b,PART_KIND_ATTR as et,PART_ROW_ATTR as v,REGION_PART_ATTR as _,decodePartId as nt,encodePartId as E,encodePartRow as ot,normalizePartText as rt,partHeadLabel as st}from"../../../render/lib/document/text-parts.js";const B="data-sf-part-label";function C(c,o){return c.closest(`[${T}]`)?.getAttribute(T)===o}function H(c,o,r){const s=c.querySelectorAll("*"),l=new Map(r.map(t=>[t.key,st(t.label)])),a=[],u=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!C(e,o))continue;const i=e.getAttribute(et);if(!i)continue;const n=l.get(i);a.push({element:e,partId:E(o,i),...n?{label:n}:{}}),u.add(e)}const f=[],g=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!C(e,o)||u.has(e))continue;const i=rt(e.textContent??"");if(!i)continue;const n=e.closest(`[${v}]`)?.getAttribute(v)||null;n&&g.add(n.replace(/\[\d+\]$/u,"")),f.push({element:e,text:i,row:n})}const P=t=>f.filter(e=>e.row===ot(t.key,t.row.index)),R=f.filter(t=>t.row===null),m=t=>t.row&&g.has(t.key)?P(t):g.size?R:f,h=new Map,w=[],I=t=>t.row?`${t.key}.${t.row.rowKey}`:null,S=new Map;for(const t of r){const e=I(t);if(!e||g.has(t.key))continue;const i=S.get(e);i?i.push(t):S.set(e,[t])}const K=new Set;for(const[t,e]of S){if(e.length<2)continue;const i=e.flatMap(d=>d.texts);if(new Set(i).size===i.length)continue;const n=m(e[0]).filter(d=>i.includes(d.text));if(n.length!==e.length)continue;const A=[...e].sort((d,x)=>(d.row?.index??0)-(x.row?.index??0));for(let d=0;d<A.length;d+=1){const x=A[d],p=n[d].element,y={key:x.key,partKey:O(x.key,x.row),exact:!0},k=h.get(p);k?k.push(y):(h.set(p,[y]),w.push(p))}K.add(t)}const $=new Map;for(const t of r){if(K.has(I(t)??""))continue;const e=O(t.key,t.row);for(const i of t.texts)for(const n of m(t)){if(n.text!==i)continue;const A=$.get(n.element);A?A.add(e):$.set(n.element,new Set([e]))}}const G=(t,e)=>[...$].some(([i,n])=>i!==t&&!n.has(e)&&i.contains(t));for(const t of r){if(K.has(I(t)??""))continue;const e=O(t.key,t.row);for(const i of t.texts){const n=[];let A=null;for(const p of m(t))p.text===i?G(p.element,e)||n.push(p.element):!n.length&&p.text.includes(i)&&(!A||p.text.length<=A.length)&&(A={element:p.element,length:p.text.length});const d=n.length?n:A?[A.element]:[],x=d.filter(p=>!d.some(y=>y!==p&&p.contains(y)));for(const p of x){const y={key:t.key,partKey:e,exact:n.length>0},k=h.get(p);k?k.push(y):(h.set(p,[y]),w.push(p))}}}const L=[...a];for(const t of w){const e=h.get(t)??[],i=e.some(n=>n.exact)?e.filter(n=>n.exact):e;if(new Set(i.map(n=>n.partKey)).size===1){const n=l.get(i[0].key);L.push({element:t,partId:E(o,i[0].partKey),...n?{label:n}:{}});continue}new Set(i.map(n=>n.key)).size===1&&L.push({element:t,partId:E(o,i[0].key)})}return L}function M(c,o,r){const s=c.querySelectorAll(`[${b}]`);for(let a=0;a<s.length;a+=1){const u=s[a];C(u,o)&&(u.removeAttribute(b),u.removeAttribute(B))}const l=[];for(const{element:a,partId:u,label:f}of r)a.setAttribute(b,u),f&&a.setAttribute(B,f),l.push(a);return l}function dt(c,o,r,s,l,a=()=>null){let u=null,f=null,g=null;const P=()=>{const R=r(),m=R?.getAttribute(T)??null;if(!R||!m)return!1;u=m;let h=H(c,m,o);return l(R,m,M(c,m,h)),g=a(()=>{const w=H(c,m,o);ct(h,w)||(h=w,l(R,m,M(c,m,w)))}),!0};return P()||(f=s(()=>{(u||P())&&(f?.(),f=null)})),()=>{f?.(),f=null,g?.(),g=null,u&&M(c,u,[])}}function ct(c,o){return c.length===o.length&&c.every((r,s)=>r.element===o[s].element&&r.partId===o[s].partId)}function mt(c,o){const r=c?.closest?.(`[${b}],[${_}]`),s=r?.getAttribute(b)??r?.getAttribute(_),l=s?nt(s):null;if(r&&s&&l?.nodeId===o&&l.propKey)return{id:s,element:r,whole:F(r,s),label:W(r,s)};const a=c?.closest?.(j.slice(2).map(g=>`[${g}]`).join(","));if(!a)return null;const f=a.closest?.(`[${T}]`)?.getAttribute(T)===o?D(a,o):null;return f?{id:f,element:a,whole:F(a,f),label:W(a,f)}:null}function W(c,o){const r=Z(o);if(r)return r.part==="map"?"Map":r.part==="city"?"City":"Image";const s=Q(o);return s?U[s.part]:X(o)?V:c.getAttribute(B)??void 0}const q="data-loc-pick",j=[b,_,z,N,q];function D(c,o){const r=c.getAttribute(b)??c.getAttribute(_);if(r)return r;const s=c.getAttribute(z);if(s)return J(o,s);if(c.getAttribute(N)!==null)return Y(o);const l=c.getAttribute(q)?.split(":");return l&&(l[1]==="image"||l[1]==="map"||l[1]==="city")&&/^\d+$/.test(l[0])?tt(o,Number(l[0]),l[1]):null}function F(c,o){const r=c.closest?.(`[${T}]`),s=r?.getAttribute(T);if(!r||!s)return!1;const l=new Set;for(const a of r.querySelectorAll(j.map(u=>`[${u}]`).join(","))){if(a.closest?.(`[${T}]`)!==r)continue;const u=D(a,s);u&&l.add(u)}return l.size===1&&l.has(o)}export{q as LOCATION_PICK_ATTR,B as PART_LABEL_ATTR,M as applyPartStamps,dt as engagePartAnchors,F as isOnlyPart,W as partLabelOf,mt as partOfBlockAt,H as resolvePartStamps};
|
|
@@ -14,7 +14,10 @@ type BlockConfig = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare function blockLabel(config: BlockConfig, type: string): string;
|
|
16
16
|
export declare function describeSelection(config: BlockConfig, document: AnyDocument, selectedId: string | null | undefined): EaselSelection | null;
|
|
17
|
-
export declare function describeBlocks(config: BlockConfig): Record<string,
|
|
17
|
+
export declare function describeBlocks(config: BlockConfig): Record<string, DescribedBlockType>;
|
|
18
|
+
export type DescribedBlockType = EaselBlockType & {
|
|
19
|
+
retired?: true;
|
|
20
|
+
};
|
|
18
21
|
export type ApplyResult<D> = {
|
|
19
22
|
ok: true;
|
|
20
23
|
document: D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FIELD_DESCRIPTION_MARKER as
|
|
1
|
+
import{FIELD_DESCRIPTION_MARKER as $}from"efficient-easel/screen/lib/host";import{isNode as d}from"efficient-easel/data";import{RETIRED_SECTIONS as j}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as v}from"./sections/text-layouts.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function O(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function b(r,t,e,o){r.forEach((s,i)=>{if(d(s)){o.push({node:s,list:r,index:i,parent:t,slot:e});for(const[n,l]of Object.entries(s.props))Array.isArray(l)&&l.some(d)&&b(l,s,n,o)}})}function E(r){const t=[];b(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&b(e,null,"",t);return t}function h(r,t){return E(r).find(e=>String(e.node.props.id)===t)}function P(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),i=o.parent?`${u(r,o.parent.type)} · ${O(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:i,path:""}}const x=r=>r.filter(t=>!!t&&typeof t=="object"&&"value"in t).map(t=>typeof t.label=="string"?{value:t.value,label:t.label}:{value:t.value});function w(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[$]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const i=e?.options??t.options;Array.isArray(i)&&(o.options=x(i));for(const n of["arrayFields","objectFields"]){const l=e?.[n]??t[n];l&&typeof l=="object"&&(o[n]=k(l))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=w(o);s&&(t[e]=s)}return t}function N(r){const t={};for(const[e,o]of Object.entries(r.components))o&&(t[e]={label:u(r,e),fields:k(o.fields),...m(e)?{retired:!0}:{}});return t}function m(r){return Object.prototype.hasOwnProperty.call(j,r)}function A(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function F(r,t){let e=r;for(const o of t?t.split("."):[]){const s=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(o);if(!s||!e||typeof e!="object")return null;e=e[s[1]],s[2]!==void 0&&(e=Array.isArray(e)?e[Number(s[2])]:void 0)}return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function y(r,t){return r.findIndex(e=>d(e)&&String(e.props.id)===t)}function g(r,t,e){const o=t||e;if(!o)return r.length;const s=y(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function z(r,t,e,o){const s=structuredClone(t),i=Array.isArray(s.content)?s.content:s.content=[];try{e.forEach((n,l)=>{const a=c=>{throw new Error(`change ${l+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(s,n.block_id)??a(`there is no block ${n.block_id}`);"id"in n.props&&a("a block's id is never changed");const f=F(c.node.props,n.path)??a(`there is no ${n.path} in that block`);Object.assign(f,structuredClone(n.props));break}case"insert_block":{r.components[n.type]??a(`there is no block type ${n.type}`),m(n.type)&&a(`${u(r,n.type)} is retired: it is no longer added (a page that holds one keeps it)`);const c=v(n.type),f=Object.keys(n.props??{}).filter(p=>p!=="id");c&&f.length&&a(`${u(r,n.type)} is laid down as a Box of blocks: insert it with no props, then change its blocks`);const _=c?c(p=>A(r,p),o):{type:n.type,props:{...A(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(g(i,n.after,n.before),0,_);break}case"remove_block":{const c=y(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`),i.splice(c,1);break}case"move_block":{const c=y(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(g(i,n.after,n.before),0,f);break}default:a(`"${n.op}" is not a change this editor makes`)}})}catch(n){return{ok:!1,reason:n instanceof Error?n.message:String(n)}}return{ok:!0,document:s}}export{z as applyPageEdits,u as blockLabel,N as describeBlocks,P as describeSelection};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type SectionToBoxRow } from "../../../render/lib/sections/section-to-box.js";
|
|
2
2
|
import { type SectionPreset } from "../../../format/lib/sections/section-presets.js";
|
|
3
3
|
export declare const TEXT_LAYOUTS: readonly string[];
|
|
4
|
-
export declare
|
|
4
|
+
export declare const MERGE_LAYOUTS: Readonly<Record<string, () => Readonly<Record<string, unknown>>>>;
|
|
5
|
+
export declare function conversionPreset(type: string, row: SectionToBoxRow, piece?: number, starter?: () => Readonly<Record<string, unknown>>): SectionPreset;
|
|
5
6
|
export declare function layoutPresetFor(type: string, press?: readonly string[]): SectionPreset | null;
|
|
6
7
|
export declare function layoutTypes(): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{convertSection as u,pressesAsBox as
|
|
1
|
+
import{convertSection as u,pressesAsBox as c,SECTION_TO_BOX_PRESS as O,sectionToBoxRow as T}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as m,presetFor as E}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as S}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{logosPressStarter as _}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{isNodeList as l}from"efficient-easel/data";const x=Object.keys(S),p={Logos:_};function f(r,o,t){const e={};for(const s of Object.keys(o(r.type)))e[s]=void 0;for(const[s,n]of Object.entries(r.props))e[s]=l(n)?n.map(i=>f(i,o,t)):n;return e.id=t(r.type),{type:r.type,props:e}}function k(r,o,t=0,e=()=>({})){return(s,n)=>{const{nodes:i}=u({type:r,props:{...s(r),...e(),id:n(r)}},o,{press:!0});return f(i[t],s,n)}}function P(r,o){if(!c(r,o))return null;const t=T(r);return t?k(r,t,0,p[r]):null}function R(r,o=O){return E(r)??P(r,o)}function A(){return[...Object.keys(m),...x.filter(r=>c(r)),...Object.keys(p).filter(r=>c(r))]}export{p as MERGE_LAYOUTS,x as TEXT_LAYOUTS,k as conversionPreset,R as layoutPresetFor,A as layoutTypes};
|
|
@@ -16,7 +16,7 @@ export interface BlockSourceSpec {
|
|
|
16
16
|
sample?: readonly SourceRow[];
|
|
17
17
|
choices?: readonly SourceChoice[];
|
|
18
18
|
fields?: readonly SourceFieldSpec[];
|
|
19
|
-
edit?: SourceEditLink;
|
|
19
|
+
edit?: SourceEditLink | SourceEditAction;
|
|
20
20
|
}
|
|
21
21
|
export interface SourceFieldSpec {
|
|
22
22
|
key: string;
|
|
@@ -27,6 +27,11 @@ export interface SourceEditLink {
|
|
|
27
27
|
label: string;
|
|
28
28
|
href: string;
|
|
29
29
|
}
|
|
30
|
+
export interface SourceEditAction {
|
|
31
|
+
label: string;
|
|
32
|
+
open: () => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function isSourceEditAction(link: SourceEditLink | SourceEditAction): link is SourceEditAction;
|
|
30
35
|
export declare function registerBlockSources(sources: readonly BlockSourceSpec[]): void;
|
|
31
36
|
export declare function blockSources(block?: string): readonly BlockSourceSpec[];
|
|
32
37
|
export declare function blockSourceSpec(key: string): BlockSourceSpec | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{globalRegistry as
|
|
1
|
+
import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";const f="dataSource",R="dataSourceOptions",u="dataRows",E="countKey",A="counts";function p(e){return typeof e.open=="function"}const y=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function s(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const b=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),m=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),l=e=>typeof e=="string"&&e.trim()!=="";function k(e){if(!e||!l(e.label))return null;if(p(e))return{label:e.label.trim(),open:e.open};const t=e.href;return l(t)?{label:e.label.trim(),href:t.trim()}:null}function h(e){if(typeof e.key!="string"||!y.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=k(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>i(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(b)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(m).map(r=>({...r}))}:{},...t?{edit:t}:{}}}function C(e){const t=e.map(h),r=s();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function _(e){const t=[...s().sources.values()];return e===void 0?t:t.filter(r=>r.blocks.includes(e))}function d(e){return s().sources.get(e)??null}function v(e){return s().sources.get(e)?.choices??[]}function w(){return s().revision}function O(e){const t=e?.[f];return typeof t=="string"?t.trim():""}function i(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const n=a(o);n&&(t[r]=n)}return Object.keys(t).length?t:null}function S(e){const t=e?.[u];return Array.isArray(t)?t.map(i).filter(r=>r!==null):null}function P(e,t,r=[]){const o=S(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const n=d(O(e))?.sample;return{rows:n?.length?n:r,sample:!0}}export{R as BLOCK_SOURCE_OPTIONS_PROP,f as BLOCK_SOURCE_PROP,u as BLOCK_SOURCE_ROWS_PROP,A as COUNTS_SOURCE,E as COUNT_KEY_PROP,d as blockSourceSpec,_ as blockSources,w as blockSourcesRevision,O as declaredBlockSource,p as isSourceEditAction,C as registerBlockSources,S as servedRows,v as sourceChoices,P as sourcedRows};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BOX_SHAPES: ("square" | "video" | "
|
|
1
|
+
export declare const BOX_SHAPES: ("square" | "video" | "auto" | "poster" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story")[];
|
|
2
2
|
export type BoxShape = (typeof BOX_SHAPES)[number];
|
|
3
3
|
export declare function boxShapeOf(value: unknown): BoxShape;
|
|
4
4
|
export declare function boxShapeClass(value: unknown): string;
|
|
@@ -7,4 +7,10 @@ export type CardStateLine = "frame" | "under";
|
|
|
7
7
|
export declare const CARD_STATE_UNDER_LINE_CLASS = "pointer-events-none absolute inset-x-0 bottom-0 border-b-2 border-accent";
|
|
8
8
|
export declare function cardStateValue(state: CardRowState | undefined | null): string;
|
|
9
9
|
export declare function cardStateAttrs(state: CardRowState | undefined | null): Record<string, string>;
|
|
10
|
+
export type CardItemAction = {
|
|
11
|
+
readonly press: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function cardItemAction(item: unknown): CardItemAction | undefined;
|
|
14
|
+
export declare const CARD_ACTION_ATTR = "data-sf-card-press";
|
|
15
|
+
export declare const CARD_ACTION_CLASS = "absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent appearance-none bg-transparent border-0 p-0 m-0 cursor-pointer";
|
|
10
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{BOX_LINK_CLASS as r}from"./box-link.js";const n=["selected","highlighted"],o="data-sf-card-state",a="pointer-events-none absolute inset-0 border border-accent",p="pointer-events-none absolute inset-x-0 bottom-0 border-b-2 border-accent";function s(e){return e?n.filter(t=>e[t]===!0).join(" "):""}function A(e){const t=s(e);return t?{[o]:t,className:"relative"}:{}}function d(e){if(!e||typeof e!="object")return;const t=e.press;return typeof t=="function"?{press:t}:void 0}const i="data-sf-card-press",u=`${r} appearance-none bg-transparent border-0 p-0 m-0 cursor-pointer`;export{i as CARD_ACTION_ATTR,u as CARD_ACTION_CLASS,o as CARD_STATE_ATTR,a as CARD_STATE_LINE_CLASS,p as CARD_STATE_UNDER_LINE_CLASS,d as cardItemAction,A as cardStateAttrs,s as cardStateValue};
|
|
@@ -10,6 +10,11 @@ export declare function cardTemplateSlot(): {
|
|
|
10
10
|
type: "slot";
|
|
11
11
|
allow: string[];
|
|
12
12
|
};
|
|
13
|
+
export declare const CARD_LIST_ITEM_BLOCKS: ("Flex" | "Text" | "ImageBlock")[];
|
|
14
|
+
export declare function cardListItemSlot(): {
|
|
15
|
+
type: "slot";
|
|
16
|
+
allow: string[];
|
|
17
|
+
};
|
|
13
18
|
export type CardRowFieldKind = "text" | "image" | "link" | "list";
|
|
14
19
|
export interface CardRowFieldSpec {
|
|
15
20
|
key: string;
|
|
@@ -56,6 +61,9 @@ export declare function namedRowField(props: Record<string, unknown> | null | un
|
|
|
56
61
|
export declare function cardKeyOf(row: SourceRow, index: number): string;
|
|
57
62
|
export declare function cardRow(value: unknown): SourceRow;
|
|
58
63
|
export declare function rowNextPicture(item: unknown, next: string | undefined, cover?: string): string;
|
|
64
|
+
export declare const ROW_BOUND_PROPS: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
65
|
+
export declare const ROW_PART_BY_WORDS: ReadonlySet<string>;
|
|
66
|
+
export declare function rowPartByKey(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
|
|
59
67
|
export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
|
|
60
68
|
export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
|
|
61
69
|
export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSourceSpec as
|
|
1
|
+
import{blockSourceSpec as w,declaredBlockSource as B}from"./block-sources.js";import{isNodeList as R}from"efficient-easel/data";import{BOX_TYPE as C}from"../document/container-blocks.js";import{globalRegistry as O}from"../global-registry.js";import{nonEmptyString as k}from"../non-empty-string.js";import{accentItalicRuns as L}from"../markup.js";import{withCardsTemplate as _}from"../document/cards-template-on-read.js";import{withCardListTemplate as A}from"../document/blocks/general/CardList/item-seed.js";const h="template",J="Card template",b="CardList",x=["Text","ImageBlock","ButtonBlock","Flex"],f="rowField",S="rowLinkField";function Z(){return{type:"slot",allow:[...x]}}const P=x.filter(e=>e!=="ButtonBlock");function ee(){return{type:"slot",allow:[...P]}}const E=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ"},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}]},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>_("Cards",e)},{block:b,fields:[],seed:e=>A(e)}];function c(){return O("efficient.card-templates",()=>new Map(E.map(e=>[e.block,e])))}function te(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(i=>i.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=k(t.typedRows);c().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:r,typedRows:n,...t.seed?{seed:t.seed}:{}})}}function F(e,t){const r=e?c().get(e)?.seed:void 0;return r?r(t):t}function re(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:n,...o}=t,i=F(e,o);return i===o?t:i}function ne(){for(const e of c().values())if(e.blocks?.length)return!0;return!1}function oe(e){return c().get(e)?.blocks??[]}function le(e){for(const t of c().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function ie(e){return typeof e=="string"&&c().get(e)?.typedRows||""}function I(e){return typeof e=="string"&&c().has(e)}function D(e,t){const r=c().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function M(e){return typeof e=="string"?D(e,"list")[0]?.key??"":""}function N(e,t){return a(e)||M(t)}function g(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=c().get(r)?.fields??[],o=w(B(e?.props))?.fields,i=o?.length?[...o.map(l=>({...l})),...n.filter(l=>l.everySource&&!o.some(s=>s.key===l.key))]:n;return t?i.filter(l=>(l.kind??"text")===t):i}function v(e,t,r){return e?r?g(r).find(n=>n.key===t)??null:c().get(e)?.fields.find(n=>n.key===t)??null:null}function a(e,t=f){const r=e?.[t];return typeof r=="string"?r.trim():""}function se(e,t){return e.key||String(t+1)}function ce(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}function ue(e,t,r=""){const n=t&&e&&typeof e=="object"?e[t]:void 0;if(!Array.isArray(n))return"";for(const o of n){const i=typeof o=="string"?o:o?.src,l=k(typeof i=="string"?i.trim():void 0);if(l&&l!==r.trim())return l}return""}const d={Text:{text:f},ImageBlock:{src:f},ButtonBlock:{label:f,href:S},Breadcrumb:{currentCrumb:f}},fe=d,W=new Set(["ButtonBlock.label"]);function ae(e,t,r){return j(e,t,r)&&!W.has(`${e}.${r}`)}function j(e,t,r){return K(e,t,r)!==""}function K(e,t,r){const n=d[e]?.[r];return n?a(t,n):""}function U(e,t){return!t||!e?null:e[t]??""}function de(e,t,r,n){if(!r)return t;let o=null;for(const[i,l]of Object.entries(d[e]??{})){const s=a(t,l),u=U(r,s);u!==null&&(o??={...t},o[i]=n&&v(n,s)?.mark==="accentItalic"?L(u):u)}return o??t}function p(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,l)=>{for(const s of i){if(s?.props?.id===t)return l;for(const[u,y]of Object.entries(s?.props??{})){if(!R(y))continue;const T=u===h&&I(s.type)?{owner:s,direct:!0,nested:l!==null,underBox:!1}:l&&{owner:l.owner,direct:!1,nested:l.nested,underBox:l.underBox||s.type===C},m=n(y,T);if(m!==void 0)return m}}},o=n(r,null);return o===void 0?null:o}function Y(e,t){const r=p(e,t);return r&&r.owner}function pe(e,t){const r=p(e,t);return r&&(r.direct?r.owner:null)}function ye(e,t){const r=p(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function me(e,t,r){if(t?.type!==b)return[];const n=Y(e,t.props?.id),o=n?N(t.props,n.type):"",i=o&&n&&g(n,"list").find(l=>l.key===o)?.fields||[];return r?i.filter(l=>(l.kind??"text")===r):i}export{P as CARD_LIST_ITEM_BLOCKS,b as CARD_LIST_TYPE,f as CARD_ROW_FIELD_PROP,S as CARD_ROW_LINK_PROP,x as CARD_TEMPLATE_BLOCKS,J as CARD_TEMPLATE_LABEL,h as CARD_TEMPLATE_SLOT,fe as ROW_BOUND_PROPS,W as ROW_PART_BY_WORDS,ye as cardCopyPlace,se as cardKeyOf,me as cardListFieldsOf,ee as cardListItemSlot,N as cardListShows,ce as cardRow,oe as cardTemplateBlocks,pe as cardTemplateCardOwner,v as cardTemplateField,D as cardTemplateFields,g as cardTemplateFieldsOf,Y as cardTemplateOwner,Z as cardTemplateSlot,ie as cardTemplateTypedRows,ne as cardTemplatesNameBlocks,M as defaultListField,I as hasCardTemplate,le as isCardTemplateBlock,a as namedRowField,te as registerCardTemplates,j as rowBound,K as rowFieldOf,U as rowFieldText,de as rowFilledProps,ue as rowNextPicture,ae as rowPartByKey,re as templateOnInsert,F as templateOnRead};
|
|
@@ -15,6 +15,7 @@ export interface FootprintOffice {
|
|
|
15
15
|
linkLabel?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare function footprintOfficeOfRow(row: Readonly<Record<string, string>>): FootprintOffice;
|
|
18
|
+
export declare function footprintCardRow(office: FootprintOffice): Record<string, string>;
|
|
18
19
|
export interface FootprintContent {
|
|
19
20
|
sectionNumber: string;
|
|
20
21
|
heading: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasMapCoords as a,mapCoordOfText as
|
|
1
|
+
import{hasMapCoords as a,mapCoordOfText as e}from"../map-styles.js";const s=/^https?:\/\//i;function h(t){const r=(t.href??"").trim(),n=(t.linkLabel??"").trim();return{role:t.role??"",city:t.city??"",country:t.country??"",address:t.address??"",hq:t.hq==="true",lat:e(t.lat),lng:e(t.lng),...r&&n&&s.test(r)?{href:r,linkLabel:n}:{}}}function i(t){const r=n=>typeof n=="string"?n:"";return{badge:t.hq?"HQ":"",role:r(t.role),city:r(t.city),country:r(t.country),address:r(t.address),...t.href&&t.linkLabel?{href:t.href,linkLabel:t.linkLabel}:{}}}const p={sectionNumber:"",heading:"",tagline:"",mapTheme:"auto"};function u(t){const r=[];return t.forEach((n,l)=>{a(n.lat,n.lng)&&r.push({key:String(l),label:n.city||n.role||"Office",lat:n.lat,lng:n.lng,glyph:"",tone:"",...n.hq?{badge:"HQ"}:{}})}),r}export{p as FOOTPRINT_DEFAULTS,i as footprintCardRow,h as footprintOfficeOfRow,u as footprintPins};
|
|
@@ -2,7 +2,7 @@ export declare const RESPONSIVE_RULES: "v1" | "v2";
|
|
|
2
2
|
export declare const VIEW_LINE_PX: {
|
|
3
3
|
readonly "view-tablet": 720;
|
|
4
4
|
readonly "view-desktop": 1100;
|
|
5
|
-
readonly "view-wide":
|
|
5
|
+
readonly "view-wide": 720 | 800;
|
|
6
6
|
};
|
|
7
7
|
export type ViewLine = keyof typeof VIEW_LINE_PX;
|
|
8
8
|
export declare function breakpointOf(variant: string): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cardListItemSlot as t}from"../../../../content/card-template.js";const e={template:t()},l={label:"Card list",inline:!0,fields:e,defaultProps:{rowField:""}};export{l as CardListMeta,e as CardListSlots};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BOX_TYPE as r,CONTAINER_BLOCKS_SLOT as p}from"../../../container-blocks.js";import{DIM as o,INNER_BOX as a,TEXT as i,boxPadding as d,token as l}from"../../../seed-parts.js";import{rowFieldTextSeed as t}from"../Cards/card-seed.js";import{CARD_ROW_FIELD_PROP as n,CARD_ROW_LINK_PROP as f}from"../../../../content/card-template.js";const e={...l("label",11),letterSpacing:.2,case:"upper"},O={textStyle:"body-1",...l("body",18),weight:500,lineHeight:1.2},c=()=>({type:r,props:{...a,gap:8,gapPhone:8,...d(20,24,20,20),name:"Office"},slots:{[p]:[t("badge",{...i,tag:"p",widthFit:"fill"},e,!0),t("role",{...i,tag:"p",widthFit:"fill"},e,!0),t("city",{...i,tag:"p",widthFit:"fill"},O),t("country",{...o,tag:"p",widthFit:"fill"},e),t("address",{...o,tag:"p",widthFit:"fill"},e),{type:"ButtonBlock",props:{variant:"link",label:"",href:"",[n]:"linkLabel",[f]:"href"}}]}});export{c as footprintCardSeed};
|