efficient-web-builder 69.5.0 → 70.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/editor/components/SiteFields.js +1 -1
  3. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  4. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  5. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
  9. package/dist/editor/lib/document/box-fields.d.ts +1 -1
  10. package/dist/editor/lib/document/box-footer-rows.js +1 -1
  11. package/dist/editor/lib/document/field-groups.js +1 -1
  12. package/dist/editor/lib/host-document-bridge.js +1 -1
  13. package/dist/format/lib/build/module-specifiers.d.ts +11 -0
  14. package/dist/format/lib/build/module-specifiers.js +1 -1
  15. package/dist/format/lib/content/box-background.d.ts +1 -7
  16. package/dist/format/lib/content/box-background.js +1 -1
  17. package/dist/format/lib/content/box-darken-styles.d.ts +7 -0
  18. package/dist/format/lib/content/box-darken-styles.js +1 -0
  19. package/dist/format/lib/content/box-shape.d.ts +1 -1
  20. package/dist/format/lib/content/card-row-keys.d.ts +10 -0
  21. package/dist/format/lib/content/card-row-keys.js +1 -1
  22. package/dist/format/lib/content/card-template.d.ts +1 -11
  23. package/dist/format/lib/content/card-template.js +1 -1
  24. package/dist/format/lib/content/count-numbers.js +1 -1
  25. package/dist/format/lib/content/section-sticky.d.ts +3 -3
  26. package/dist/format/lib/content/site-gutter.js +1 -1
  27. package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
  28. package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
  29. package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
  30. package/dist/format/lib/document/blocks/general/Footprint/meta.js +1 -1
  31. package/dist/format/lib/document/blocks/general/OrderSummary/meta.js +1 -1
  32. package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
  33. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  34. package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
  35. package/dist/format/lib/document/box-footer.js +1 -1
  36. package/dist/format/lib/document/node-lists.d.ts +4 -0
  37. package/dist/format/lib/document/node-lists.js +1 -1
  38. package/dist/format/lib/document/passes/document-position.js +1 -1
  39. package/dist/format/lib/source-rules/panel-one-arrow.js +1 -1
  40. package/dist/format/lib/source-rules/support/panel-select-cascade.d.ts +1 -1
  41. package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -1
  42. package/dist/render/lib/content/page-contents.js +1 -1
  43. package/dist/render/lib/document/slot-counts.js +1 -1
  44. package/package.json +5 -5
  45. package/dist/format/lib/document/panel-bands.d.ts +0 -15
  46. package/dist/format/lib/document/panel-bands.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 70.0.0 - 2026-11-17
4
+
5
+ From main at `92b8eb71`: #767, #771. A major: both PRs are `!`. The peers rise to `efficient-easel` `^35.0.0` and `efficient-shell` `^13.17.0`. The module `lib/document/panel-bands` is removed. No stored key or value moves.
6
+
7
+ **For hosts:**
8
+ - Install efficient-easel 35.0.0 or later and efficient-shell 13.17.0 or later with this release.
9
+ - A host that imports `efficient-web-builder/format/lib/document/panel-bands` (`bandIsDropped`, `droppedBands`, `loneDesignBand`, `withoutBands`, `sameKeys`, `BandRow`, `DrawnBand`, `TEXT_BAND_KEY`, `TEXT_BAND_TITLE`) stops compiling. The one-row band rule is efficient-easel 35's Inspector; the text box band key is `LEAD_BAND_KEY` from `efficient-easel/fields`. efficient-storefront-blocks `scripts/test-single-row-group-headings.tsx` imports `bandIsDropped` and is re-pointed in its bump (eff-erp/efficient-storefront-blocks#591).
10
+
11
+ ### Changed
12
+
13
+ - **BREAKING: walks over a node's lists read the declared slot order** (#767). A node's declared slots come first, in draw order, then any other node list in efficient-easel `storedKeyOrder`, so the editor and the shop give the same answer (before, the editor read insertion order and the shop jsonb order). One helper in `lib/document/node-lists`. `CARD_TEMPLATE_BLOCKS`, `cardTemplateSlot`, `CARD_LIST_ITEM_BLOCKS` and `cardListItemSlot` move to the leaf `lib/content/card-row-keys`, and `BOX_DARKEN_STYLES` to the new leaf `lib/content/box-darken-styles`; `card-template` and `box-background` still export them.
14
+ - **BREAKING: the Box's "Link to" row is in its own Link group, just before Anchor** (#771). `DESIGN_GROUPS`, `DesignGroup` and `DESIGN_GROUP_KEY` are efficient-easel's again (`lib/document/field-groups`), so their type gains `'Link'`; a host `Record<DesignGroup, X>` adds a `Link` entry. `PLACE_WORDS` gains `Link`. The website's copy of the one-row band rule (`lib/document/panel-bands`) is deleted; `SiteFields` passes only the text box band.
15
+
3
16
  ## 69.5.0 - 2026-11-17
4
17
 
5
18
  From main at `e660b33f`: #768, #769, #770, #772. A minor: no `!`, no export is removed, no export changes its type, the peers stay `efficient-easel` `^34.3.0` and `efficient-shell` `^13.3.0`. New exports only. No stored key or value moves: stored Contact / Locations, Hero Single and Scroll-Over Text nodes still draw the old sections. `forMediaType`, the `marked` prop of `HeroPickArea` / `HeroTwoPictures` and the phrase "Tint opacity" are deprecated (delete by 2026-12-18, in a major).
@@ -1 +1 @@
1
- "use client";import{jsx as d,Fragment as de,jsxs as ie}from"react/jsx-runtime";import{createContext as ue,useContext as fe,useLayoutEffect as V,useMemo as g,useRef as W,useState as F}from"react";import{useEasel as q,useSelectedFields as pe}from"efficient-easel/easel";import{fieldShownInView as me,Inspector as we,planFields as P}from"efficient-easel/fields";import{BUCKET_ICONS as he,RowPropsContext as be}from"../lib/document/controls.js";import{panelTab as ge}from"../../format/lib/document/panel-tabs.js";import{BUCKETS as ye}from"../lib/document/field-groups.js";import{say as xe}from"../../format/lib/editor-words.js";import{SameInEveryViewNote as Se}from"./SameInEveryViewNote.js";import{usePreviewDevice as ve}from"efficient-easel/draw/client";import{deviceField as Be}from"efficient-easel/screen/lib/document/device-fields";import{showWhenContext as Ce,visibleFields as U}from"../../render/lib/document/show-when.js";import{fieldsOfPart as Te}from"../../render/lib/document/hero-media-parts.js";import{bandIsDropped as ke,droppedBands as Ee,loneDesignBand as De,sameKeys as _e,TEXT_BAND_KEY as O,TEXT_BAND_TITLE as Fe,withoutBands as Pe}from"../../format/lib/document/panel-bands.js";const I=new Map,y=new Set;function X(o,r){const p=new Map;for(const t of o.querySelectorAll(".es-insp-row[data-field]"))p.set(t.getAttribute("data-field")??"",t);const i=[];for(const[t,h]of r)i.push({key:t,rows:h.map(x=>{const l=p.get(x),b=!!l&&[...l.children].some(S=>!S.hidden),m=l?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:b,labelled:b&&!!m}})});return i}const Oe=Object.fromEntries(ye.map(o=>{const r=he[o];return[o,d(r,{},o)]})),Y=ue(null),Ie={_partBody:Be("each",{type:"custom",render:()=>d(Re,{})})};function Re(){return d(de,{children:fe(Y)})}function He({entries:o,entryCount:r=0,part:p=null,omit:i,motion:t,body:h,itemWord:x}){const{id:l,fields:b,values:m,readOnly:S,onChange:G}=pe(),a=g(()=>t?{...m,...t.values}:m,[m,t?.values]),H=(e,n)=>t?.keys.has(e)?t.onChange(e,n):G(e,n),v=ve(),{appState:R,config:z}=q(e=>e),B=Ce(v,z,R.data.content??[],R.ui.itemSelector),C=h===void 0?Te(b,p):Ie,j=g(()=>{const e=i?.length?Object.fromEntries(Object.entries(C).filter(([n])=>!i.includes(n))):C;return t?{...e,...t.fields}:e},[C,i,t?.fields]),w=U(j,a,B),[J,Q]=F(()=>new Set(y)),[T,Z]=F(()=>new Set),A=W(null),{bandRows:ee,designBands:te,looseRows:ne}=g(()=>{const e=new Map,n=new Set,f=[];for(const s of P(w).rows){if(!s.fold){s.bucket==="Design"&&f.push(s.name);continue}const c=e.get(s.fold.key)??[];c.push(s.name),e.set(s.fold.key,c),s.bucket==="Design"&&n.add(s.fold.key)}return{bandRows:e,designBands:n,looseRows:new Map([["",f]])}},[w]),k=me({},v),M={key:O,rows:Array.from({length:k?r:0},()=>({shown:!0,labelled:!0}))};V(()=>{const e=A.current?.parentElement;if(!e)return;const n=X(e,ee),f=new Set(Ee(n)),s=De([M,...n.filter(c=>te.has(c.key))],X(e,ne)[0].rows);s&&f.add(s),Z(c=>_e(c,f)?c:f)});const se=g(()=>Pe(w,T),[w,T]),oe=!ke(M)&&!T.has(O)?{key:O,title:Fe}:void 0,K=q(e=>e.selectedItem)!==null,N=t?.part??p??"",E=`${l}:${N}:${String(v)}`,[re,le]=F(()=>({tab:I.get(E)})),$=`${l}:${N}`,D=W(null),_={...B,node:a},L=P(w,{values:a,context:_}).buckets,u=ge({allTabs:K,remembered:I.get(E),inherited:D.current?.panel===$?D.current.tab:re.tab,buckets:L,hasText:k&&r>0}),ae=!k&&!L.includes(u)&&(P(U(j,a,{...B,device:"desktop"}),{values:a,context:{..._,device:"desktop"}}).buckets.includes(u)||u==="Design"&&r>0);V(()=>{D.current={panel:$,tab:u}});const ce=u==="Design";return d(Y.Provider,{value:h??null,children:d(be.Provider,{value:t?a:null,children:ie(we,{fields:se,values:a,onChange:H,readOnly:S,allTabs:K,showWhenContext:_,context:{itemWord:x},tab:u,onTab:e=>{I.set(E,e),le({tab:e})},tabIcons:Oe,idPrefix:l,ariaLabel:xe("Section settings"),lead:ce?o:null,leadFold:oe,closedFolds:J,onFold:(e,n)=>{n?y.delete(e):y.add(e),Q(new Set(y))},children:[d("span",{ref:A,hidden:!0}),ae&&d(Se,{})]})})})}export{He as SiteFields,Oe as TAB_ICONS};
1
+ "use client";import{jsx as s,Fragment as X}from"react/jsx-runtime";import{createContext as q,useContext as z,useLayoutEffect as J,useMemo as B,useRef as Q,useState as O}from"react";import{useEasel as D,useSelectedFields as Z}from"efficient-easel/easel";import{fieldShownInView as ee,Inspector as te,LEAD_BAND_KEY as ne,planFields as I}from"efficient-easel/fields";import{BUCKET_ICONS as se,RowPropsContext as oe}from"../lib/document/controls.js";import{panelTab as re}from"../../format/lib/document/panel-tabs.js";import{BUCKETS as le}from"../lib/document/field-groups.js";import{say as ce}from"../../format/lib/editor-words.js";import{SameInEveryViewNote as ae}from"./SameInEveryViewNote.js";import{usePreviewDevice as de}from"efficient-easel/draw/client";import{deviceField as ie}from"efficient-easel/screen/lib/document/device-fields";import{showWhenContext as ue,visibleFields as k}from"../../render/lib/document/show-when.js";import{fieldsOfPart as fe}from"../../render/lib/document/hero-media-parts.js";const pe="Text",x=new Map,a=new Set,me=Object.fromEntries(le.map(l=>{const c=se[l];return[l,s(c,{},l)]})),j=q(null),he={_partBody:ie("each",{type:"custom",render:()=>s(be,{})})};function be(){return s(X,{children:z(j)})}function Oe({entries:l,entryCount:c=0,part:w=null,omit:d,motion:t,body:C,itemWord:A}){const{id:i,fields:K,values:u,readOnly:N,onChange:$}=Z(),n=B(()=>t?{...u,...t.values}:u,[u,t?.values]),L=(e,r)=>t?.keys.has(e)?t.onChange(e,r):$(e,r),f=de(),{appState:g,config:M}=D(e=>e),p=ue(f,M,g.data.content??[],g.ui.itemSelector),m=C===void 0?fe(K,w):he,y=B(()=>{const e=d?.length?Object.fromEntries(Object.entries(m).filter(([r])=>!d.includes(r))):m;return t?{...e,...t.fields}:e},[m,d,t?.fields]),S=k(y,n,p),[R,V]=O(()=>new Set(a)),T=ee({},f),W={key:ne,title:pe},E=D(e=>e.selectedItem)!==null,F=t?.part??w??"",h=`${i}:${F}:${String(f)}`,[U,Y]=O(()=>({tab:x.get(h)})),P=`${i}:${F}`,b=Q(null),v={...p,node:n},_=I(S,{values:n,context:v}).buckets,o=re({allTabs:E,remembered:x.get(h),inherited:b.current?.panel===P?b.current.tab:U.tab,buckets:_,hasText:T&&c>0}),G=!T&&!_.includes(o)&&(I(k(y,n,{...p,device:"desktop"}),{values:n,context:{...v,device:"desktop"}}).buckets.includes(o)||o==="Design"&&c>0);J(()=>{b.current={panel:P,tab:o}});const H=o==="Design";return s(j.Provider,{value:C??null,children:s(oe.Provider,{value:t?n:null,children:s(te,{fields:S,values:n,onChange:L,readOnly:N,allTabs:E,showWhenContext:v,context:{itemWord:A},tab:o,onTab:e=>{x.set(h,e),Y({tab:e})},tabIcons:me,idPrefix:i,ariaLabel:ce("Section settings"),lead:H?l:null,leadFold:W,closedFolds:R,onFold:(e,r)=>{r?a.delete(e):a.add(e),V(new Set(a))},children:G&&s(ae,{})})})})}export{Oe as SiteFields,me as TAB_ICONS};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as S}from"react/jsx-runtime";import{ButtonIcon as B,ButtonIconIcon as C,IconAfterTextIcon as _,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as O}from"efficient-easel/panel";import{useSelectedFields as m}from"efficient-easel/easel";import{buttonFieldSet as k}from"efficient-easel/screen/lib/document/button-fields";import{VIEW_KEY_ACCESS as F}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as v,Segmented as N}from"efficient-shell/ui";import{shellGlyphOf as R}from"../../../shell-glyph.js";import{StorefrontTextLinkField as P}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as W,buttonIconChoice as L,buttonIconSide as E,buttonWidth as A}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as j,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as U}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as z,siteButtonPaint as p,siteButtonRadiusPx as D}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as K,buttonWordsEntryField as G,hidableText as H,inOwnBox as V,linkField as Y,plainText as q,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as J}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as h}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as M,pickerNoneIcon as Q,rowSay as X,ShellIconWord as b}from"../../../box-fields.js";import{CARD_ROW_FACTS as Z,cardRowField as $,cardRowFields as ee,cardRowLinkField as oe,typedLinkField as te}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as ne}from"../../../../../../format/lib/content/card-template.js";import{consentWordsKept as ie,withConsentWordsRow as re}from"../../../consent-words-field.js";const d=e=>R(e==="none"?"no-symbol":e),se=W.map(e=>({value:e,icon:e==="none"?Q(d(e),t(b,{value:e})):d(e)})),I=q("Button");function le({value:e,onChange:n}){const o=m(),i=o.values.href,s=typeof e=="string"?e:e&&typeof e=="object"&&"text"in e?String(e.text??""):"";return o.fields&&"href"in o.fields?t(P,{label:"Button",icon:t(B,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>o.onChange("href",l)}):I.render({value:s,field:{label:"Button"},onChange:l=>n(H(l))})}function ce({value:e,onChange:n}){const o=m(),i=L(e,o.values.arrow),s=E(o.values.iconPosition),l=A(o.values.widthFit)==="fill",g=d("icon-at-end");return t(O,{label:r("Icon"),icon:t(C,{size:18}),value:i==="none"?void 0:t(b,{value:i}),children:S("div",{className:"flex items-center gap-2",children:[t(v,{label:r("Icon"),value:i,options:se,onChange:n}),i!=="none"&&t(N,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:y=>o.onChange("iconPosition",y),options:[{value:"before",icon:t(w,{size:16}),label:t("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:t(_,{size:16}),label:t("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:g,label:t("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>p(a().theme),T=k({lengthUnits:M,follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[e]=f("variant"),[n]=f("buttonColor"),{theme:o}=a(),i=u({variant:e,buttonColor:n}).border.width,s=U(n)??(e==="ghost"?z(o).text:p(o).fill);return{width:i,color:s}},useCorners:()=>D(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:J,resetTo:e=>K(e,r("Styles")),padding:{fallback:j,tablet:!0},phone:F,say:X});function ae(e,n){const o=Object.keys(e);return Object.fromEntries(o.slice(0,o.indexOf(n)+1).map(i=>[i,e[i]]))}const Pe={fields:{label:V(I,e=>t(le,{value:e.value,onChange:e.onChange})),labelText:G("label"),href:te({...Y("Button link"),...c("label")}),consentWords:ie("label"),_gButton:h("Button"),rowField:$("Shows","text"),[ne]:oe(),...ae(T,"_dDesign"),_gStyle:h("Style"),variant:c("buttonColor"),icon:{type:"custom",render:e=>t(ce,{value:e.value,onChange:e.onChange})},iconPosition:c("icon"),arrow:c("icon"),...T},resolveFields:(e,n)=>re(ee(n.fields,e,n),e.props,"label",["href"]),showWhenFacts:Z};export{Pe as ButtonBlockFields};
1
+ import{jsx as t,jsxs as y}from"react/jsx-runtime";import{ButtonIcon as B,ButtonIconIcon as C,IconAfterTextIcon as _,IconBeforeTextIcon as O}from"efficient-easel/icons";import{SettingsField as w}from"efficient-easel/panel";import{useSelectedFields as d}from"efficient-easel/easel";import{buttonFieldSet as k}from"efficient-easel/screen/lib/document/button-fields";import{VIEW_KEY_ACCESS as F}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as v,Segmented as N}from"efficient-shell/ui";import{shellGlyphOf as R}from"../../../shell-glyph.js";import{StorefrontTextLinkField as P}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as E,buttonIconChoice as W,buttonIconSide as L,buttonWidth as A}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as j,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as U}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as D,siteButtonPaint as p,siteButtonRadiusPx as z}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as G,buttonWordsEntryField as K,hidableText as H,inOwnBox as Y,linkField as V,plainText as q,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as J}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as h}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as M}from"efficient-easel/screen/lib/document/field-buckets";import{LENGTH_UNITS_TABLE as Q,pickerNoneIcon as X,rowSay as Z,ShellIconWord as b}from"../../../box-fields.js";import{CARD_ROW_FACTS as $,cardRowField as oo,cardRowFields as eo,cardRowLinkField as to,typedLinkField as no}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as io}from"../../../../../../format/lib/content/card-template.js";import{consentWordsKept as ro,withConsentWordsRow as so}from"../../../consent-words-field.js";const m=o=>R(o==="none"?"no-symbol":o),lo=E.map(o=>({value:o,icon:o==="none"?X(m(o),t(b,{value:o})):m(o)})),I=q("Button");function co({value:o,onChange:n}){const e=d(),i=e.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e.fields&&"href"in e.fields?t(P,{label:"Button",icon:t(B,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>e.onChange("href",l)}):I.render({value:s,field:{label:"Button"},onChange:l=>n(H(l))})}function ao({value:o,onChange:n}){const e=d(),i=W(o,e.values.arrow),s=L(e.values.iconPosition),l=A(e.values.widthFit)==="fill",T=m("icon-at-end");return t(w,{label:r("Icon"),icon:t(C,{size:18}),value:i==="none"?void 0:t(b,{value:i}),children:y("div",{className:"flex items-center gap-2",children:[t(v,{label:r("Icon"),value:i,options:lo,onChange:n}),i!=="none"&&t(N,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:g=>e.onChange("iconPosition",g),options:[{value:"before",icon:t(O,{size:16}),label:t("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:t(_,{size:16}),label:t("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:T,label:t("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>p(a().theme),S=k({lengthUnits:Q,follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[n]=f("buttonColor"),{theme:e}=a(),i=u({variant:o,buttonColor:n}).border.width,s=U(n)??(o==="ghost"?D(e).text:p(e).fill);return{width:i,color:s}},useCorners:()=>z(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:J,resetTo:o=>G(o,r("Styles")),padding:{fallback:j,tablet:!0},phone:F,say:Z});function fo(o,n){const e=Object.keys(o);return Object.fromEntries(e.slice(0,e.indexOf(n)+1).map(i=>[i,o[i]]))}const Lo={fields:{label:Y(I,o=>t(co,{value:o.value,onChange:o.onChange})),labelText:K("label"),href:no({...V("Button link"),...c("label")}),consentWords:ro("label"),_gButton:h("Button"),rowField:oo("Shows","text"),[io]:to(),...fo(S,M.Design),_gStyle:h("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>t(ao,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...S},resolveFields:(o,n)=>so(eo(n.fields,o,n),o.props,"label",["href"]),showWhenFacts:$};export{Lo as ButtonBlockFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{phoneKey as i,tabletKey as l}from"efficient-easel/draw";import{keptByRow as ko}from"efficient-easel/screen/lib/document/style-fields";import{BOX_CARD_PAD as E,BOX_FILL_FADE_PROP as Fo,BOX_SWATCH_PROP as Ho,boxCardProps as Wo,boxIsCard as I}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as yo,BOX_IS_NOT_CARD_RULE as Bo,BOX_ROW_IMAGE_PROP as xo}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Uo,cardRowField as M,cardRowFields as Mo,cardRowLinkField as Ko,typedLinkField as Xo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Go,cardCopyPlace as K,cardTemplateCardOwner as Yo}from"../../../../../../format/lib/content/card-template.js";import{BOX_SHOW_KEY as vo,HOVER_GROUP_KEY as jo,HOVER_KEY as T}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as Vo,BOX_NEXT_PICTURE_ROW as Jo}from"../../../../animation/hover-fields.js";import{darkenFields as zo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as qo,REEL_SHAPE_LABELS as Qo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as X,CARD_LIST_STYLE_PICTURES as Zo,TAB_SHAPE_PICTURES as $o}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as A,CARD_STYLE_POINTS as oe,applyCardStyle as ee,isCardStyle as ne}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as te,ClockIcon as re,CropIcon as G,GapIcon as ie,MediaLayoutStackedIcon as Y,LineBetweenIcon as le,LineSolidIcon as ae,ListIcon as se,NumberedListIcon as v,ShadowIcon as de,StylesIcon as j,TableIcon as V,TargetIcon as ce,WrapIcon as J}from"efficient-easel/icons";import{boxBlockSpacingField as _e,boxFillField as pe,boxColumnsFields as Oe,boxShareField as Se,boxSharePhoneField as me,boxShareTabletField as fe,containerDirectionField as Re,containerGapRows as he,linkField as ue,plainText as Ce,swapPadding as z,toggle as c,upload as q,withPanelOnly as Ae}from"../../../controls.js";import{BOX_STACK_LINE as g,BOX_STACK_RANGE as R,STACK_BELOW_PROP as N}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as Q,boxShapeOf as we}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as Ee}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as Z}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as $}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as Te,ACCORDION_PHONE_COLUMN_COUNTS as Ne,BOX_COLUMNS_MAX as P,BOX_COLUMNS_MIN as b,boxPhoneRowOneLine as De,boxWrapWordOf as oo}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as eo}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as no,VIEW_KEY_ACCESS as s,group as h,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Le,boxAlignField as Ie,boxJustifyField as ge,boxWrapField as D,iconPickerRow as k,placementField as Pe,select as F,sidesPaddingFields as to,slider as ro}from"../../../box-fields.js";import{withRowRules as be,withShowWhen as H}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ke}from"../../../separator-field.js";import{LOOP_SCROLLS as Fe}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as He,TICKER_JOIN_OPTIONS as We}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as io}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as lo}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as ye}from"../../../box-side-space-field.js";import{accordionOnSet as Be}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as xe,ACCORDION_ROW_STYLE_PROP as L}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as ao}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as Ue,CONTAINER_BLOCKS_SLOT as Me}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as Ke}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Xe,ON_A_CARD as so,ON_A_PICTURE_OR_CARD as Ge,cardDisplayField as W}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Ye,MIRROR_CARDS_MIRRORS as ve,mirrorCardsField as je}from"../../../mirror-cards-field.js";import{handedRowOf as co}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Ve,showForField as Je,showForFields as ze}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as u,SHARED_COLUMNS_LABEL as _o,SHARED_COLUMNS_OFF as po,sharedColumnsDrawn as Oo,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as qe,SHARED_COLUMNS_POINTS as Qe,sharedRowsDrawn as Ze}from"../../../../../../render/lib/content/box-shared-columns.js";const mo=yo,fo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},$e={field:"direction",is:"tabs"},on={field:"line",in:[!0,!1]},en={field:"anchor",set:!0},y=["fixed","screen","fill"],nn={not:{any:[{field:"sectionHeightMode",in:y},{field:"sectionHeightModeTablet",in:y},{field:"sectionHeightModePhone",in:y}]}},tn={context:"parent.line",is:!0},_={not:{field:"direction",is:"accordion"}},Ro={field:"direction",is:"accordion"},ho={any:[_,{not:{field:L,in:["numbered","chevron"]}},{field:"columns",in:[...Te]},{field:"phoneRow",in:[...Ne]}]},uo="notAccordionRow",rn={not:{context:uo,is:!0}},ln={[uo]:(o,e)=>e.parent?.props?.direction!=="accordion"},B={field:"direction",is:"row",default:"row"},p={not:Fe},O={all:[B,p,{not:{field:"separator",in:eo.map(o=>o.value)}},{not:{field:"line",is:!0}}]},an={field:"direction",is:"column"},Co={all:[O,...["columns",l("columns")].map(o=>({not:{field:o,in:Array.from({length:P},(e,n)=>n+b)}}))]},sn={all:[p,{not:{all:[B,{field:"separator",in:eo.map(o=>o.value)}]}}]},x={not:{all:[O,{field:"columns",in:Array.from({length:P},(o,e)=>e+b)}]}},dn="sharedColumnsFits",Ao="sharedColumnsMisfit",wo="sharedColumnsDraws",Eo="sharedColumnsPhoneDraws";function S(o,e){return Wo(o.props??{},K(e.appState,o.props?.id)?.inCopy!==!1)}const cn={[dn]:(o,e)=>So(S(o,e)),[Ao]:(o,e)=>!So(S(o,e)),[wo]:(o,e)=>Oo(S(o,e)).desktop,[Eo]:(o,e)=>Oo(S(o,e)).phone};function To(o){return{all:[{not:{context:Ao,is:!0}},{any:[so,{field:o,set:!0}]}]}}const m={not:{context:wo,is:!0}},C={not:{context:Eo,is:!0}},No="sharedRowsDraws",_n={[No]:(o,e)=>Ze(S(o,e))&&co(e.appState,o.props?.id)?.row===void 0},w={not:{context:No,is:!0}},pn={any:[m,C]},U=Bo,On={not:{context:ve,is:!0}},Do="rowHanded",Sn={not:{context:Do,is:!0}},mn={[Do]:(o,e)=>{const n=co(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Lo={all:[_,U,m,C,On]},fn={field:"direction",is:"row"},Rn={field:"align",in:["start","center","end"]},hn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function un(){const{darken:o,darkenStyle:e}=zo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Io={not:{all:[O,{field:l("columns"),in:Array.from({length:P},(o,e)=>e+b)}]}};function Cn(){const o=c(no,!1,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:t=>n.onChange(t===void 0?void 0:t?"wrap":"nowrap")})}}function An(){const o=c(no,!0,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>{const t=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!De(void 0,t?n.follows:void 0),followsNoView:!t,onChange:f=>n.onChange(f===void 0?void 0:f?"wrap":"nowrap")})}}}const go={hint:g},Po={all:[U,{any:[an,{all:[O,Io,{not:{all:[Co,{field:l("share"),set:!0}]}}]}]}]},wn=H(a("desktop",ro("Narrows below",r(Y,{}),R.min,R.max,R.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),Po);function En(o,e){const n=o;return!(N in n)||e.direction!=="column"?o:{...n,[N]:wn}}const Rt={fields:be({_gContent:h("Content"),rowTitle:ao.rowTitle,content:ao.content,_gCardDisplay:h("Display"),cardDisplay:W("desktop"),cardDisplayTablet:W("tablet"),cardDisplayPhone:W("mobile"),showFor:Je(),_gLayout:h("Layout"),direction:Re("Flex"),tabShape:k("Tab shape",r(j,{}),qo.map(o=>({label:Qo[o],value:o,picture:$o[o]})),"tabs",{columns:2,cell:X}),mirrorCards:je(),[N]:a("desktop",ro("Stacks below",r(Y,{}),R.min,R.max,R.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[lo]:ye(),startsOpen:a("desktop",c("Starts open",!1,r(te,{}))),[L]:a("desktop",k("Row style",r(v,{}),xe.map(o=>({...o,picture:o.value==="numbered"?r(v,{}):r(se,{})})),"plain",{columns:2})),label:Ae(Ce("Tab name")),...he("Flex"),...d("justify",ge(),s),...d("align",Ie(),s),...(()=>{const o=d("wrap",D(),s,{phoneRow:An()}),e=d("wrap",D(),s,{phoneRow:Cn()});return{wrap:e.wrap,[l("wrap")]:e[l("wrap")],[i("wrap")]:o[i("wrap")]}})(),[i("order")]:Ke(),...d("boxShape",$("Box shape",r(G,{}),Z(Q),"shape","auto"),s,{phoneRow:$("Box shape",r(G,{}),Z(Q),"shape","auto",{phoneRest:o=>we(o)})}),[Ee]:a("desktop",Le(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:ke(r(le,{size:18}),"none"),[A]:a("desktop",k("Card style",r(j,{}),oe.map(o=>({...o,picture:Zo[o.value]})),"table",{columns:2,cell:X})),share:a("desktop",Se()),[l("share")]:fe(),[i("share")]:me(),[u]:a("desktop",F(_o,r(V,{}),[...Qe],po)),[i(u)]:a("mobile",F(_o,r(V,{}),[...qe],po)),...Oe(),...d("blockSpacing",_e(),s),line:c("Line",!1,r(ae,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,r(re,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:F("Join",r(ie,{}),We,He),_gShadow:h("Shadow"),...d("shadow",c("Shadow",!1,r(de,{})),s),...d("fillColor",pe(),s),[Ho]:M("Fill content","colour"),[Fo]:ko("fillColor"),_gBackground:h("Background image"),bgImage:a("desktop",q("Image","image/*")),bgImagePhone:a("mobile",q("Image","image/*")),[xo]:M("Image content","image",{content:!0}),...un(),placement:Pe("Content position"),_gLink:h("Link"),link:Xo(ue("Link to")),[Go]:Ko(),jumpHighlight:c("Highlight when a link jumps here",!1,r(ce,{}),"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"],mo],[[i("share")],{all:[fo,C]}],[[u],To(u)],[[i(u)],To(i(u))],[[i("wrap")],{all:[fo,p,C,w]}],[[i("order")],{all:[O,C,m]}],[["phoneRow"],C],[[L],{all:[Ro,{not:{field:L,is:"chevron"}}]}],[["tabShape"],$e],[["rowTitle","startsOpen"],rn],[["align","blockSpacing",l("blockSpacing"),i("blockSpacing")],_],[[l("justify"),i("justify")],{all:[p,Lo,w]}],[[l("align"),i("align")],{all:[fn,Rn,Lo]}],[[l("wrap")],{all:[p,x,Io,m,_,w]}],[[l("shadow"),i("shadow")],U],[[l("darken"),i("darken"),l("darkenStyle"),i("darkenStyle")],{all:[mo,hn]}],[["separator"],B],[[A],{field:A,set:!0}],[["columns"],{any:[O,Ro]}],[[l("columns")],O],[[N],Po],[[l("gap")],{all:[sn,ho]}],[["gap",i("gap")],ho],[["justify"],{all:[p,pn,_,w]}],[["wrap"],{all:[p,x,m,_,w]}],[["share"],{all:[x,m,_]}],[[l("share")],{all:[Co,m]}],[["line"],on],[["upcoming"],tn],[["jumpHighlight"],en],[["boxShape",l("boxShape"),i("boxShape")],nn],[["direction","share",i("order")],Sn],[["join"],io],[[lo],io]]),resolveData:(o,e)=>{const n=o.props,t=n[A];return e.changed?.[A]===!0&&ne(t)?{...o,props:ee(n,t,Ue,Me)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Be(n)}:o},resolveFields:(o,e)=>{const n=K(e.appState,o.props?.id)?.inCopy===!0,t=n&&Yo(e.appState,o.props?.id)===null;return En(Dn(Ln(ze(In(o,{...e,fields:Mo(e.fields,o,e)}),o.props),S(o,e),n),t),o.props)},showWhenFacts:{...Uo,...Xe,...Ye,...mn,...cn,..._n,...Ve,...ln}},Tn=H(Vo,so),Nn=["darken","darkenStyle",jo,vo];function Dn(o,e){if(!e)return o;const n={...o};for(const t of Nn){if(!(t in n))continue;const{showWhen:f,...bo}=n[t];n[t]=bo}return n}function Ln(o,e,n=!1){const t=o;return T in t&&I(e)&&n?{...t,[T]:H(Jo,Ge)}:!(T in t)||I(e)?o:{...t,[T]:Tn}}function In(...[o,e]){const{fields:n}=e;{if(I(S(o,e))){const f=to({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return z(n,f)}return o.props.padV2!==!0?z(n,to({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{Rt as FlexFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{phoneKey as i,tabletKey as l}from"efficient-easel/draw";import{keptByRow as ko}from"efficient-easel/screen/lib/document/style-fields";import{BOX_CARD_PAD as E,BOX_FILL_FADE_PROP as Fo,BOX_SWATCH_PROP as Ho,boxCardProps as Wo,boxIsCard as I}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as yo,BOX_IS_NOT_CARD_RULE as Bo,BOX_ROW_IMAGE_PROP as xo}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Uo,cardRowField as M,cardRowFields as Mo,cardRowLinkField as Ko,typedLinkField as Xo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Go,cardCopyPlace as K,cardTemplateCardOwner as Yo}from"../../../../../../format/lib/content/card-template.js";import{BOX_SHOW_KEY as vo,HOVER_GROUP_KEY as jo,HOVER_KEY as T}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as Vo,BOX_NEXT_PICTURE_ROW as Jo}from"../../../../animation/hover-fields.js";import{darkenFields as zo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as qo,REEL_SHAPE_LABELS as Qo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as X,CARD_LIST_STYLE_PICTURES as Zo,TAB_SHAPE_PICTURES as $o}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as A,CARD_STYLE_POINTS as oe,applyCardStyle as ee,isCardStyle as ne}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as te,ClockIcon as re,CropIcon as G,GapIcon as ie,MediaLayoutStackedIcon as Y,LineBetweenIcon as le,LineSolidIcon as ae,ListIcon as se,NumberedListIcon as v,ShadowIcon as de,StylesIcon as j,TableIcon as V,TargetIcon as ce,WrapIcon as J}from"efficient-easel/icons";import{boxBlockSpacingField as _e,boxFillField as pe,boxColumnsFields as Oe,boxShareField as Se,boxSharePhoneField as me,boxShareTabletField as fe,containerDirectionField as Re,containerGapRows as he,linkField as ue,plainText as Ce,swapPadding as z,toggle as c,upload as q,withPanelOnly as Ae}from"../../../controls.js";import{BOX_STACK_LINE as g,BOX_STACK_RANGE as h,STACK_BELOW_PROP as N}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as Q,boxShapeOf as we}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as Ee}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as Z}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as $}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as Te,ACCORDION_PHONE_COLUMN_COUNTS as Ne,BOX_COLUMNS_MAX as P,BOX_COLUMNS_MIN as b,boxPhoneRowOneLine as De,boxWrapWordOf as oo}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as eo}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as no,VIEW_KEY_ACCESS as s,group as _,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Le,boxAlignField as Ie,boxJustifyField as ge,boxWrapField as D,iconPickerRow as k,placementField as Pe,select as F,sidesPaddingFields as to,slider as ro}from"../../../box-fields.js";import{withRowRules as be,withShowWhen as H}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ke}from"../../../separator-field.js";import{LOOP_SCROLLS as Fe}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as He,TICKER_JOIN_OPTIONS as We}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as io}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as lo}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as ye}from"../../../box-side-space-field.js";import{accordionOnSet as Be}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as xe,ACCORDION_ROW_STYLE_PROP as L}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as ao}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as Ue,CONTAINER_BLOCKS_SLOT as Me}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as Ke}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Xe,ON_A_CARD as so,ON_A_PICTURE_OR_CARD as Ge,cardDisplayField as W}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Ye,MIRROR_CARDS_MIRRORS as ve,mirrorCardsField as je}from"../../../mirror-cards-field.js";import{handedRowOf as co}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Ve,showForField as Je,showForFields as ze}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as u,SHARED_COLUMNS_LABEL as _o,SHARED_COLUMNS_OFF as po,sharedColumnsDrawn as Oo,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as qe,SHARED_COLUMNS_POINTS as Qe,sharedRowsDrawn as Ze}from"../../../../../../render/lib/content/box-shared-columns.js";const mo=yo,fo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},$e={field:"direction",is:"tabs"},on={field:"line",in:[!0,!1]},en={field:"anchor",set:!0},y=["fixed","screen","fill"],nn={not:{any:[{field:"sectionHeightMode",in:y},{field:"sectionHeightModeTablet",in:y},{field:"sectionHeightModePhone",in:y}]}},tn={context:"parent.line",is:!0},p={not:{field:"direction",is:"accordion"}},Ro={field:"direction",is:"accordion"},ho={any:[p,{not:{field:L,in:["numbered","chevron"]}},{field:"columns",in:[...Te]},{field:"phoneRow",in:[...Ne]}]},uo="notAccordionRow",rn={not:{context:uo,is:!0}},ln={[uo]:(o,e)=>e.parent?.props?.direction!=="accordion"},B={field:"direction",is:"row",default:"row"},O={not:Fe},S={all:[B,O,{not:{field:"separator",in:eo.map(o=>o.value)}},{not:{field:"line",is:!0}}]},an={field:"direction",is:"column"},Co={all:[S,...["columns",l("columns")].map(o=>({not:{field:o,in:Array.from({length:P},(e,n)=>n+b)}}))]},sn={all:[O,{not:{all:[B,{field:"separator",in:eo.map(o=>o.value)}]}}]},x={not:{all:[S,{field:"columns",in:Array.from({length:P},(o,e)=>e+b)}]}},dn="sharedColumnsFits",Ao="sharedColumnsMisfit",wo="sharedColumnsDraws",Eo="sharedColumnsPhoneDraws";function m(o,e){return Wo(o.props??{},K(e.appState,o.props?.id)?.inCopy!==!1)}const cn={[dn]:(o,e)=>So(m(o,e)),[Ao]:(o,e)=>!So(m(o,e)),[wo]:(o,e)=>Oo(m(o,e)).desktop,[Eo]:(o,e)=>Oo(m(o,e)).phone};function To(o){return{all:[{not:{context:Ao,is:!0}},{any:[so,{field:o,set:!0}]}]}}const f={not:{context:wo,is:!0}},C={not:{context:Eo,is:!0}},No="sharedRowsDraws",_n={[No]:(o,e)=>Ze(m(o,e))&&co(e.appState,o.props?.id)?.row===void 0},w={not:{context:No,is:!0}},pn={any:[f,C]},U=Bo,On={not:{context:ve,is:!0}},Do="rowHanded",Sn={not:{context:Do,is:!0}},mn={[Do]:(o,e)=>{const n=co(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Lo={all:[p,U,f,C,On]},fn={field:"direction",is:"row"},Rn={field:"align",in:["start","center","end"]},hn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function un(){const{darken:o,darkenStyle:e}=zo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Io={not:{all:[S,{field:l("columns"),in:Array.from({length:P},(o,e)=>e+b)}]}};function Cn(){const o=c(no,!1,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:t=>n.onChange(t===void 0?void 0:t?"wrap":"nowrap")})}}function An(){const o=c(no,!0,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>{const t=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!De(void 0,t?n.follows:void 0),followsNoView:!t,onChange:R=>n.onChange(R===void 0?void 0:R?"wrap":"nowrap")})}}}const go={hint:g},Po={all:[U,{any:[an,{all:[S,Io,{not:{all:[Co,{field:l("share"),set:!0}]}}]}]}]},wn=H(a("desktop",ro("Narrows below",r(Y,{}),h.min,h.max,h.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),Po);function En(o,e){const n=o;return!(N in n)||e.direction!=="column"?o:{...n,[N]:wn}}const Rt={fields:be({_gContent:_("Content"),rowTitle:ao.rowTitle,content:ao.content,_gCardDisplay:_("Display"),cardDisplay:W("desktop"),cardDisplayTablet:W("tablet"),cardDisplayPhone:W("mobile"),showFor:Je(),_gLayout:_("Layout"),direction:Re("Flex"),tabShape:k("Tab shape",r(j,{}),qo.map(o=>({label:Qo[o],value:o,picture:$o[o]})),"tabs",{columns:2,cell:X}),mirrorCards:je(),[N]:a("desktop",ro("Stacks below",r(Y,{}),h.min,h.max,h.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[lo]:ye(),startsOpen:a("desktop",c("Starts open",!1,r(te,{}))),[L]:a("desktop",k("Row style",r(v,{}),xe.map(o=>({...o,picture:o.value==="numbered"?r(v,{}):r(se,{})})),"plain",{columns:2})),label:Ae(Ce("Tab name")),...he("Flex"),...d("justify",ge(),s),...d("align",Ie(),s),...(()=>{const o=d("wrap",D(),s,{phoneRow:An()}),e=d("wrap",D(),s,{phoneRow:Cn()});return{wrap:e.wrap,[l("wrap")]:e[l("wrap")],[i("wrap")]:o[i("wrap")]}})(),[i("order")]:Ke(),...d("boxShape",$("Box shape",r(G,{}),Z(Q),"shape","auto"),s,{phoneRow:$("Box shape",r(G,{}),Z(Q),"shape","auto",{phoneRest:o=>we(o)})}),[Ee]:a("desktop",Le(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:ke(r(le,{size:18}),"none"),[A]:a("desktop",k("Card style",r(j,{}),oe.map(o=>({...o,picture:Zo[o.value]})),"table",{columns:2,cell:X})),share:a("desktop",Se()),[l("share")]:fe(),[i("share")]:me(),[u]:a("desktop",F(_o,r(V,{}),[...Qe],po)),[i(u)]:a("mobile",F(_o,r(V,{}),[...qe],po)),...Oe(),...d("blockSpacing",_e(),s),line:c("Line",!1,r(ae,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,r(re,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:F("Join",r(ie,{}),We,He),_gShadow:_("Shadow"),...d("shadow",c("Shadow",!1,r(de,{})),s),...d("fillColor",pe(),s),[Ho]:M("Fill content","colour"),[Fo]:ko("fillColor"),_gBackground:_("Background image"),bgImage:a("desktop",q("Image","image/*")),bgImagePhone:a("mobile",q("Image","image/*")),[xo]:M("Image content","image",{content:!0}),...un(),placement:Pe("Content position"),_gLink:_("Link"),link:Xo(ue("Link to")),[Go]:Ko(),_gJump:_("Anchor"),jumpHighlight:c("Highlight when a link jumps here",!1,r(ce,{}),"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"],mo],[[i("share")],{all:[fo,C]}],[[u],To(u)],[[i(u)],To(i(u))],[[i("wrap")],{all:[fo,O,C,w]}],[[i("order")],{all:[S,C,f]}],[["phoneRow"],C],[[L],{all:[Ro,{not:{field:L,is:"chevron"}}]}],[["tabShape"],$e],[["rowTitle","startsOpen"],rn],[["align","blockSpacing",l("blockSpacing"),i("blockSpacing")],p],[[l("justify"),i("justify")],{all:[O,Lo,w]}],[[l("align"),i("align")],{all:[fn,Rn,Lo]}],[[l("wrap")],{all:[O,x,Io,f,p,w]}],[[l("shadow"),i("shadow")],U],[[l("darken"),i("darken"),l("darkenStyle"),i("darkenStyle")],{all:[mo,hn]}],[["separator"],B],[[A],{field:A,set:!0}],[["columns"],{any:[S,Ro]}],[[l("columns")],S],[[N],Po],[[l("gap")],{all:[sn,ho]}],[["gap",i("gap")],ho],[["justify"],{all:[O,pn,p,w]}],[["wrap"],{all:[O,x,f,p,w]}],[["share"],{all:[x,f,p]}],[[l("share")],{all:[Co,f]}],[["line"],on],[["upcoming"],tn],[["jumpHighlight"],en],[["boxShape",l("boxShape"),i("boxShape")],nn],[["direction","share",i("order")],Sn],[["join"],io],[[lo],io]]),resolveData:(o,e)=>{const n=o.props,t=n[A];return e.changed?.[A]===!0&&ne(t)?{...o,props:ee(n,t,Ue,Me)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Be(n)}:o},resolveFields:(o,e)=>{const n=K(e.appState,o.props?.id)?.inCopy===!0,t=n&&Yo(e.appState,o.props?.id)===null;return En(Dn(Ln(ze(In(o,{...e,fields:Mo(e.fields,o,e)}),o.props),m(o,e),n),t),o.props)},showWhenFacts:{...Uo,...Xe,...Ye,...mn,...cn,..._n,...Ve,...ln}},Tn=H(Vo,so),Nn=["darken","darkenStyle",jo,vo];function Dn(o,e){if(!e)return o;const n={...o};for(const t of Nn){if(!(t in n))continue;const{showWhen:R,...bo}=n[t];n[t]=bo}return n}function Ln(o,e,n=!1){const t=o;return T in t&&I(e)&&n?{...t,[T]:H(Jo,Ge)}:!(T in t)||I(e)?o:{...t,[T]:Tn}}function In(...[o,e]){const{fields:n}=e;{if(I(m(o,e))){const R=to({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return z(n,R)}return o.props.padV2!==!0?z(n,to({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{Rt as FlexFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{ColumnWidthsIcon as T,ColumnsIcon as E,LayoutIcon as P,MediaLayoutStackedIcon as O,PlacementIcon as b}from"efficient-easel/icons";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{cardImageFields as I,text as s,textarea as R}from"../../../controls.js";import{group as n,section as m}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as h,segmented as i,slider as C}from"../../../box-fields.js";import{IMAGE_TEXT_ARRANGEMENT_PICTURES as A,LAYOUT_CELL as L}from"../../../choice-pictures.js";import{BLOCK_SOURCE_EDIT_PROP as x,blockSourceEditField as N,blockSourceField as w,blockSourceFields as v}from"../../../block-source-fields.js";import{declaredBlockSource as a}from"../../../../../../format/lib/content/block-sources.js";import{ARRANGEMENT_OPTIONS as F,IMAGE_WIDTH_OPTIONS as D,PHONE_ORDER_OPTIONS as G}from"../../../../../../format/lib/content/image-text-rows.js";import{PROCESS_STEPS_TYPE as c,imageTextRowTemplate as H}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/row-seed.js";import{CARD_TEMPLATE_SLOT as l}from"../../../../../../format/lib/content/card-row-keys.js";import{SPLITTABLE_SECTIONS as M,headFieldsForPlacement as W}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as k}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";import{isNodeList as p}from"efficient-easel/data";import{seedNodeId as B}from"../../../../../../format/lib/document/seed-parts.js";import{PROCESS_PH as u,ProcessStepsSlots as d}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const S={field:"arrangement",in:["rows-left","rows-right"]},_="drawsLegacySteps",f={not:{context:_,is:!0}},Y={[_]:e=>{const o=e.props??{};return!a(o)&&!p(o.boxes)}},U=e=>e?.data?.root?.props??null,me={fields:y({_gSource:n("Source"),dataSource:w("Item content","Manual"),[x]:N(),_sHeader:m("Header"),_gContent:n("Content"),num:s("Number",u.num),title:s("Heading",u.title),description:R("Body",k.body),boxes:d.boxes,[l]:d[l],_dDesign:m("Design"),arrangement:h("Arrangement",r(P,{}),F.map(e=>({label:e.label,hint:e.hint,value:e.value,picture:A[e.value]})),"columns",{columns:3,cell:L}),imageWidth:i("Image width",r(T,{}),D.map(e=>({label:e.label,value:e.value})),"half"),phoneOrder:g("mobile",i("Order",r(O,{}),G.map(e=>({label:e.label,value:e.value})),"picture")),columns:C("Columns",r(E,{}),2,4,1,3),...I(),cardText:i("Text position",r(b,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below")},[[["cardText"],{not:{field:"boxes",set:!0}}],[["arrangement"],f],[["imageWidth","phoneOrder"],{all:[S,f]}],[["columns"],{not:S}]]),showWhenFacts:Y,resolveFields:(e,o)=>v(c,W(o.fields,e.props.headPlacement,M.ProcessSteps.headRows),e.props,{root:U(o.appState)}),resolveData:(e,o)=>{const t=e.props;return o?.changed?.dataSource!==!0||!a(t)||p(t[l])?e:{...e,props:{...t,[l]:H(B(t,c))}}}};export{me as ProcessStepsFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{ColumnWidthsIcon as E,ColumnsIcon as T,LayoutIcon as P,MediaLayoutStackedIcon as O,PlacementIcon as I}from"efficient-easel/icons";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{cardImageFields as g,text as s,textarea as R}from"../../../controls.js";import{group as m,section as n}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as h}from"efficient-easel/screen/lib/document/field-buckets";import{iconPickerRow as C,segmented as i,slider as A}from"../../../box-fields.js";import{IMAGE_TEXT_ARRANGEMENT_PICTURES as L,LAYOUT_CELL as N}from"../../../choice-pictures.js";import{BLOCK_SOURCE_EDIT_PROP as x,blockSourceEditField as w,blockSourceField as v,blockSourceFields as F}from"../../../block-source-fields.js";import{declaredBlockSource as a}from"../../../../../../format/lib/content/block-sources.js";import{ARRANGEMENT_OPTIONS as D,IMAGE_WIDTH_OPTIONS as G,PHONE_ORDER_OPTIONS as H}from"../../../../../../format/lib/content/image-text-rows.js";import{PROCESS_STEPS_TYPE as c,imageTextRowTemplate as M}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/row-seed.js";import{CARD_TEMPLATE_SLOT as l}from"../../../../../../format/lib/content/card-row-keys.js";import{SPLITTABLE_SECTIONS as W,headFieldsForPlacement as k}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as Y}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";import{isNodeList as p}from"efficient-easel/data";import{seedNodeId as B}from"../../../../../../format/lib/document/seed-parts.js";import{PROCESS_PH as u,ProcessStepsSlots as d}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const S={field:"arrangement",in:["rows-left","rows-right"]},_="drawsLegacySteps",f={not:{context:_,is:!0}},U={[_]:e=>{const o=e.props??{};return!a(o)&&!p(o.boxes)}},j=e=>e?.data?.root?.props??null,ce={fields:y({_gSource:m("Source"),dataSource:v("Item content","Manual"),[x]:w(),_sHeader:n("Header"),_gContent:m("Content"),num:s("Number",u.num),title:s("Heading",u.title),description:R("Body",Y.body),boxes:d.boxes,[l]:d[l],[h.Design]:n("Design"),arrangement:C("Arrangement",r(P,{}),D.map(e=>({label:e.label,hint:e.hint,value:e.value,picture:L[e.value]})),"columns",{columns:3,cell:N}),imageWidth:i("Image width",r(E,{}),G.map(e=>({label:e.label,value:e.value})),"half"),phoneOrder:b("mobile",i("Order",r(O,{}),H.map(e=>({label:e.label,value:e.value})),"picture")),columns:A("Columns",r(T,{}),2,4,1,3),...g(),cardText:i("Text position",r(I,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below")},[[["cardText"],{not:{field:"boxes",set:!0}}],[["arrangement"],f],[["imageWidth","phoneOrder"],{all:[S,f]}],[["columns"],{not:S}]]),showWhenFacts:U,resolveFields:(e,o)=>F(c,k(o.fields,e.props.headPlacement,W.ProcessSteps.headRows),e.props,{root:j(o.appState)}),resolveData:(e,o)=>{const t=e.props;return o?.changed?.dataSource!==!0||!a(t)||p(t[l])?e:{...e,props:{...t,[l]:M(B(t,c))}}}};export{ce as ProcessStepsFields};
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{SquareIcon as s}from"efficient-easel/icons";import{text as d,textarea as o,toggle as m}from"../../../controls.js";import{group as n,section as p}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as l,headFieldsForPlacement as a}from"../../../../../../format/lib/sections/section-head-placement.js";import{PROSE_PH as e}from"../../../../../../format/lib/document/blocks/general/Prose/meta.js";const x={fields:{_gContent:n("Content"),eyebrow:d("Eyebrow",e.eyebrow),title:o("Heading",e.title),body:o("Body",e.body),_dDesign:p("Design"),topBorder:m("Top border",!0,i(s,{}))},resolveFields:(r,{fields:t})=>a(t,r.props.headPlacement,l.Prose.headRows)};export{x as ProseFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{SquareIcon as s}from"efficient-easel/icons";import{text as m,textarea as o,toggle as d}from"../../../controls.js";import{group as p,section as n}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as l}from"efficient-easel/screen/lib/document/field-buckets";import{SPLITTABLE_SECTIONS as a,headFieldsForPlacement as f}from"../../../../../../format/lib/sections/section-head-placement.js";import{PROSE_PH as e}from"../../../../../../format/lib/document/blocks/general/Prose/meta.js";const c={fields:{_gContent:p("Content"),eyebrow:m("Eyebrow",e.eyebrow),title:o("Heading",e.title),body:o("Body",e.body),[l.Design]:n("Design"),topBorder:d("Top border",!0,i(s,{}))},resolveFields:(r,{fields:t})=>f(t,r.props.headPlacement,a.Prose.headRows)};export{c as ProseFields};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{ClockIcon as g,EyeIcon as u}from"efficient-easel/icons";import{backgroundField as d,copyText as y,plainTextarea as m,text as o,textarea as p,toggle as T,upload as I}from"../../../controls.js";import{group as s,section as i}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as b}from"../../../box-fields.js";import{LAYOUT_CELL as f,TIMELINE_PICTURES as r}from"../../../choice-pictures.js";import{ctaField as _}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as k}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{withRowRules as E}from"../../../../../../render/lib/document/show-when.js";import{TIMELINE_PH as e}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";const c={field:"layout",is:"track"},C={not:c},M={fields:E({_dLayout:i("Layout"),layout:b("Display",l(u,{}),[{label:"Split",hint:"Split (editorial aside)",value:"split",picture:r.split},{label:"Spine",hint:"Spine (single rail)",value:"spine",picture:r.spine},{label:"Alternating",hint:"Alternating (zig-zag)",value:"alternating",picture:r.alternating},{label:"Track",hint:"Track (year rail)",value:"track",picture:r.track}],"split",{columns:2,cell:f}),_dDesign:i("Design"),background:d("Background color",k.TimelineTrack),_sHeader:i("Header"),_gContent:s("Content"),eyebrow:o("Eyebrow",e.eyebrow),title:p("Heading",e.title),intro:p("Intro",e.intro),imageSrc:I("Image","image/*"),imageCaption:o("Image caption",e.imageCaption),imageMeta:o("Image meta",e.imageMeta),_gButton:s("Button"),..._,_sEntries:i("Timeline entries"),entries:{type:"array",label:"Entries",arrayFields:{date:y("Sub-title"),title:m("Title"),body:m("Body")},defaultItemProps:{date:"",title:"",body:""},getItemSummary:t=>t?.date||t?.title||"Entry"}},[[["imageSrc","imageCaption","imageMeta"],C],[["background"],c]]),resolveFields:(t,{fields:a})=>{if(t.props.layout!=="track")return a;const n=a.entries;return{...a,entries:{...n,arrayFields:{...n?.arrayFields,future:T("Upcoming",!1,l(g,{}))}}}}};export{M as TimelineFields};
1
+ import{jsx as l}from"react/jsx-runtime";import{ClockIcon as u,EyeIcon as d}from"efficient-easel/icons";import{backgroundField as y,copyText as T,plainTextarea as m,text as o,textarea as p,toggle as I,upload as f}from"../../../controls.js";import{group as s,section as i}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as c}from"efficient-easel/screen/lib/document/field-buckets";import{iconPickerRow as b}from"../../../box-fields.js";import{LAYOUT_CELL as E,TIMELINE_PICTURES as r}from"../../../choice-pictures.js";import{ctaField as _}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as k}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{withRowRules as C}from"../../../../../../render/lib/document/show-when.js";import{TIMELINE_PH as e}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";const g={field:"layout",is:"track"},S={not:g},P={fields:C({[c.Layout]:i("Layout"),layout:b("Display",l(d,{}),[{label:"Split",hint:"Split (editorial aside)",value:"split",picture:r.split},{label:"Spine",hint:"Spine (single rail)",value:"spine",picture:r.spine},{label:"Alternating",hint:"Alternating (zig-zag)",value:"alternating",picture:r.alternating},{label:"Track",hint:"Track (year rail)",value:"track",picture:r.track}],"split",{columns:2,cell:E}),[c.Design]:i("Design"),background:y("Background color",k.TimelineTrack),_sHeader:i("Header"),_gContent:s("Content"),eyebrow:o("Eyebrow",e.eyebrow),title:p("Heading",e.title),intro:p("Intro",e.intro),imageSrc:f("Image","image/*"),imageCaption:o("Image caption",e.imageCaption),imageMeta:o("Image meta",e.imageMeta),_gButton:s("Button"),..._,_sEntries:i("Timeline entries"),entries:{type:"array",label:"Entries",arrayFields:{date:T("Sub-title"),title:m("Title"),body:m("Body")},defaultItemProps:{date:"",title:"",body:""},getItemSummary:t=>t?.date||t?.title||"Entry"}},[[["imageSrc","imageCaption","imageMeta"],S],[["background"],g]]),resolveFields:(t,{fields:a})=>{if(t.props.layout!=="track")return a;const n=a.entries;return{...a,entries:{...n,arrayFields:{...n?.arrayFields,future:I("Upcoming",!1,l(u,{}))}}}}};export{P as TimelineFields};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{ClockIcon as s}from"efficient-easel/icons";import{backgroundField as n,plainText as d,plainTextarea as o,text as m,textarea as i,toggle as p}from"../../../controls.js";import{section as e}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as T,headFieldsForPlacement as c}from"../../../../../../format/lib/sections/section-head-placement.js";import{ctaField as f}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as u}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as r}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const E={fields:{_sHeader:e("Header"),eyebrow:m("Eyebrow",r.eyebrow),title:i("Heading",r.title),intro:i("Body",r.intro),_sEntries:e("Milestones"),entries:{type:"array",label:"Milestones",arrayFields:{date:d("Year"),title:o("Title"),blurb:o("Body"),future:p("Upcoming",!1,l(s,{}))},defaultItemProps:{date:"",title:"",blurb:"",future:!1},getItemSummary:t=>t?.date||t?.title||"Milestone"},_sButton:e("Button"),...f,_dDesign:e("Design"),background:n("Background color",u.TimelineTrack),_dLayout:e("Layout")},resolveFields:(t,{fields:a})=>c(a,t.props.headPlacement,T.TimelineTrack.headRows)};export{E as TimelineTrackFields};
1
+ import{jsx as s}from"react/jsx-runtime";import{ClockIcon as m}from"efficient-easel/icons";import{backgroundField as n,plainText as d,plainTextarea as o,text as p,textarea as i,toggle as f}from"../../../controls.js";import{section as e}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as a}from"efficient-easel/screen/lib/document/field-buckets";import{SPLITTABLE_SECTIONS as T,headFieldsForPlacement as c}from"../../../../../../format/lib/sections/section-head-placement.js";import{ctaField as u}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as _}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as r}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const L={fields:{_sHeader:e("Header"),eyebrow:p("Eyebrow",r.eyebrow),title:i("Heading",r.title),intro:i("Body",r.intro),_sEntries:e("Milestones"),entries:{type:"array",label:"Milestones",arrayFields:{date:d("Year"),title:o("Title"),blurb:o("Body"),future:f("Upcoming",!1,s(m,{}))},defaultItemProps:{date:"",title:"",blurb:"",future:!1},getItemSummary:t=>t?.date||t?.title||"Milestone"},_sButton:e("Button"),...u,[a.Design]:e("Design"),background:n("Background color",_.TimelineTrack),[a.Layout]:e("Layout")},resolveFields:(t,{fields:l})=>c(l,t.props.headPlacement,T.TimelineTrack.headRows)};export{L as TimelineTrackFields};
@@ -3,7 +3,7 @@ import { boxFieldBuilders, type BoxFieldSay } from "efficient-easel/screen/lib/d
3
3
  import type { ShowWhenRule } from "efficient-shell/format";
4
4
  type Rows = ReturnType<typeof boxFieldBuilders>;
5
5
  export declare const rowSay: BoxFieldSay;
6
- export declare const LENGTH_UNITS_TABLE: Readonly<Record<"size" | "spacing" | "gap" | "radius" | "fontSize" | "letterSpacing" | "position" | "border" | "height" | "breakpoint", readonly ("px" | "%" | "vw")[]>>;
6
+ export declare const LENGTH_UNITS_TABLE: Readonly<Record<"border" | "spacing" | "gap" | "size" | "radius" | "fontSize" | "letterSpacing" | "position" | "height" | "breakpoint", readonly ("%" | "px" | "vw")[]>>;
7
7
  export declare const slider: Rows["slider"];
8
8
  export declare const select: Rows["select"];
9
9
  export declare const Segmented: Rows["Segmented"];
@@ -1 +1 @@
1
- import{isNodeList as c}from"efficient-easel/data";import{registerGeneralSectionRows as f}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{convertSection as m,sectionToBoxRow as u}from"../../../render/lib/sections/section-to-box.js";const l=["FooterPayment"];function n(o,r){const{id:e,...t}=o.props;for(const[i,p]of Object.entries(t))c(p)&&(t[i]=p.map(s=>n(s,r)));return r(o.type,t)}const R=(o,r)=>{if(!l.includes(o.type))return null;f();const e=u(o.type);return e?m({type:o.type,props:{...o.props}},e).nodes.map(t=>n(t,r)):null};export{l as FOOTER_ROW_TYPES,R as convertFooterBlock};
1
+ import{nodeListKeys as i}from"../../../format/lib/document/node-lists.js";import{registerGeneralSectionRows as c}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{convertSection as m,sectionToBoxRow as f}from"../../../render/lib/sections/section-to-box.js";const u=["FooterPayment"];function n(o,t){const{id:e,...r}=o.props;for(const p of i(o))r[p]=r[p].map(s=>n(s,t));return t(o.type,r)}const R=(o,t)=>{if(!u.includes(o.type))return null;c();const e=f(o.type);return e?m({type:o.type,props:{...o.props}},e).nodes.map(r=>n(r,t)):null};export{u as FOOTER_ROW_TYPES,R as convertFooterBlock};
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,designGroupHeader as x,foldMarker as W,foldMetaOf as C,quietMarker as z,heightFields as w,sectionShapeFields as E,sectionThemeFields as O,stickFields as P,widthField as D}from"./controls.js";import{group as q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as J,deviceMetaOf as $}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as S,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as g,hasOwnEntry as V}from"../../../format/lib/own-entry.js";const A=Q;function X(t){return t==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",R={"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",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",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"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"},H={"AlloyWheelsListing._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function F(t,e,o){const a=`${t}.${e}`;return g(G,a)??g(H,a)??g(R,o)}function pe(t,e,o){const a=F(t,e,o);return a?X(a):void 0}function ee(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function _(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=$(a),b=C(h?h.inner:a),l=b?g(R,b.label):void 0;if(l)for(const y of ee(l))e.includes(y)||e.push(y)}return e}const ge=[..._(T({tablet:!0,siteSide:!0}),D("full"),w(),m(),P()),...Object.keys(T({tablet:!0,siteSide:!0})),...Object.keys(D("full")),...Object.keys(w()),...Object.keys(m()),...Object.keys(P())],ye=[..._(O()),...Object.keys(O())],ke=[..._(E()),...Object.keys(E())],Se=[..._(B()),...Object.keys(B())],_e=Object.keys(Y()),ve=Object.keys(U()),te={"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)","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 t={...T({tablet:!0,siteSide:!0}),...D("full"),...w(),...m(),...O(),...E(),...B()};for(const e of Object.keys(M)){const o=C(t[e]),a=o?g(R,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 "${e}", 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 ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...S.map(t=>[p[t],t])]);function ae(t){const e=`${t}.`;return Object.keys(te).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function ie(t,e){const o=$(t),a=q(e);return o?J(o.tier,a):a}function re(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?W(e,o.label):z(e):e}function j(t){return t==="Design"?S:["Animation"]}function fe(t,e){const o=[],a=new Set(ae(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ne.has(n))throw new Error(`${e}.${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=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${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)&&(b=!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)||V(M,n)){const s=F(e,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${e}.${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)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=F(e,n,i.label);if(!u)throw new Error(`${e}.${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 ${[...S,"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:ie(r,i.label)]]})}const y=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${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=b?[]:[...a].filter(n=>!h.has(n));if(v.length)throw new Error(`${e}: 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 I=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>I.has(r))),k={};for(const n of f){k[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!I.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"&&(k[p[r]]=x(r));for(const u of i)for(const[s,N]of u.entries)k[s]=re(r,N)}}return k}function me(t){return d.Design in t?t:{[d.Design]:L("Design",null),[p.Content]:x("Content"),...t}}function Le(t){return A.some(e=>d[e]in t)}function we(t){const e=A.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=L(a,a===e[0]?e:null);return o}export{G as BLOCK_KEY_GROUP,A as BUCKETS,d as BUCKET_KEY,_e as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,S as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,R as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,te as RETIRED,Se as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,fe as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,Le as hasBucketTabs,_ as headerKeysOf,ee as headerKeysOfPlace,F as placeOf,we as reseatBucketTabs,ae as retiredHeadings,me as seatDesignBucket};
1
+ import{anchorFields as E,bucketHeader as w,cardMediaFields as W,cardShowFields as z,designGroupHeader as $,foldMarker as J,foldMetaOf as C,quietMarker as q,heightFields as O,sectionShapeFields as D,sectionThemeFields as T,stickFields as H,widthField as B}from"./controls.js";import{group as Q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as A}from"./box-fields.js";import{deviceField as V,deviceMetaOf as K}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as F}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as _,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as l,DESIGN_GROUP_KEY as g}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as p,hasOwnEntry as M}from"../../../format/lib/own-entry.js";const R=X;function Z(n){return n==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",x={"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",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",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"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"},j={"AlloyWheelsListing._gCards":"Design","Flex._gLink":"Link"},N={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function I(n,e,o){const i=`${n}.${e}`;return p(N,i)??p(j,i)??p(x,o)}function pe(n,e,o){const i=I(n,e,o);return i?Z(i):void 0}function te(n){return n==="Animation"?[l.Animation]:[l.Design,g[n]]}function v(...n){const e=[];for(const o of n)for(const i of Object.values(o)){const s=K(i),h=C(s?s.inner:i),u=h?p(x,h.label):void 0;if(u)for(const y of te(u))e.includes(y)||e.push(y)}return e}const ye=[...v(A({tablet:!0,siteSide:!0}),B("full"),O(),E(),H()),...Object.keys(A({tablet:!0,siteSide:!0})),...Object.keys(B("full")),...Object.keys(O()),...Object.keys(E()),...Object.keys(H())],ke=[...v(T()),...Object.keys(T())],Se=[...v(D()),...Object.keys(D())],_e=[...v(F()),...Object.keys(F())],ve=Object.keys(W()),fe=Object.keys(z()),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)","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)","Flex._gLink":"repeated the Link group heading above it (owner 2026-11-17)","Flex._gJump":"repeated the Anchor group heading above it (owner 2026-11-17)","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)"},Y={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Link:["Link"],Anchor:["Anchor"],Animation:["Animation"]},P={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const n={...A({tablet:!0,siteSide:!0}),...B("full"),...O(),...E(),...T(),...D(),...F()};for(const e of Object.keys(P)){const o=C(n[e]),i=o?p(x,o.label):void 0;if(!o||o.level!==2||!i||!Y[i].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", 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([[l.Design,"Content"],[l.Animation,"Animation"],..._.map(n=>[g[n],n])]);function ie(n){const e=`${n}.`;return Object.keys(ne).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function re(n,e){const o=K(n),i=Q(e);return o?V(o.tier,i):i}function de(n,e){const o=C(e);return o?n==="Content"||n==="Animation"?J(e,o.label):q(e):e}function U(n){return n==="Design"?_:["Animation"]}function me(n,e){const o=[],i=new Set(ie(e)),s=new Set;let h=!1,u=null;for(const[t,d]of Object.entries(n)){const a=C(d);if(oe.has(t))throw new Error(`${e}.${t}: 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 from efficient-easel's DESIGN_GROUP_KEY (\`[DESIGN_GROUP_KEY.Design]: section("Design")\`).`);const c=ae.get(t);if(c!==void 0){if(a?.level!==1)throw new Error(`${e}.${t}: that key is reserved for the ${c} heading of the settings panel, but this field is ${a?`a level-${a.level} "${a.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(t===l.Design||t===l.Animation)&&(h=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!a){u||o.push(u={place:"Content",entries:[]}),u.entries.push([t,d]);continue}if(i.has(t)||M(P,t)){const r=I(e,t,a.label);if(a.level!==2||!r||!Y[r].includes(a.label))throw new Error(`${e}.${t}: ${i.has(t)?"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-${a.level} "${a.label}" header in the ${r??"(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.`);i.has(t)&&s.add(t),o.push(u={place:r,entries:[],uniform:M(P,t)});continue}const b=I(e,t,a.label);if(!b)throw new Error(`${e}.${t}: the inspector group "${a.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[..._,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:b,entries:[[t,a.level===2?d:re(d,a.label)]]})}const y=new Set(Object.entries(n).filter(([,t])=>C(t)).map(([t])=>t));for(const[t,d]of[["BLOCK_KEY_GROUP",N],["KEY_GROUP",j]]){const a=Object.keys(d).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1))&&!i.has(c.slice(e.length+1)));if(a.length)throw new Error(`${e}: ${t} (lib/document/field-groups.ts) lists ${JSON.stringify(a)}, 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 f=h?[]:[...i].filter(t=>!s.has(t));if(f.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.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 G=new Set(o.filter(t=>t.entries.length>0).map(t=>t.place)),m=R.filter(t=>U(t).some(d=>G.has(d))),k={};for(const t of m){k[l[t]]=w(t,t===m[0]?m:null);for(const d of U(t)){if(!G.has(d))continue;const a=o.filter(r=>r.place===d),c=a.findIndex(r=>r.adopted);c>0&&a.unshift(...a.splice(c,1));const b=a.filter(r=>r.uniform);if(b.length>0){const r=a.filter(L=>!L.uniform),S=a[0]?.adopted?1:0;a.splice(0,a.length,...r.slice(0,S),...b,...r.slice(S))}t==="Design"&&(k[g[d]]=$(d));for(const r of a)for(const[S,L]of r.entries)k[S]=de(d,L)}}return k}function Le(n){return l.Design in n?n:{[l.Design]:w("Design",null),[g.Content]:$("Content"),...n}}function Ee(n){return R.some(e=>l[e]in n)}function we(n){const e=R.filter(i=>l[i]in n);if(e.length===0)return n;const o={...n};for(const i of e)o[l[i]]=w(i,i===e[0]?e:null);return o}export{N as BLOCK_KEY_GROUP,R as BUCKETS,l as BUCKET_KEY,ve as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,_ as DESIGN_GROUPS,g as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,P as INJECTED_RETIRED,j as KEY_GROUP,x as LABEL_GROUP,ye as LAYOUT_FIELD_KEYS,Y as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,Se as SECTION_SHAPE_FIELD_KEYS,ke as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,pe as bucketOf,Z as bucketOfPlace,Ee as hasBucketTabs,v as headerKeysOf,te as headerKeysOfPlace,I as placeOf,we as reseatBucketTabs,ie as retiredHeadings,Le as seatDesignBucket};
@@ -1 +1 @@
1
- import{FIELD_DESCRIPTION_MARKER as j}from"efficient-easel/screen/lib/host";import{isNode as y,isNodeList as v}from"efficient-easel/data";import{RETIRED_SECTIONS as E}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as O}from"./sections/text-layouts.js";import{hasOwnEntry as x}from"../../format/lib/own-entry.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function w(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function d(r,t,e,o){r.forEach((s,l)=>{if(y(s)){o.push({node:s,list:r,index:l,parent:t,slot:e});for(const[i,n]of Object.entries(s.props))v(n)&&d(n,s,i,o)}})}function F(r){const t=[];d(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&d(e,null,"",t);return t}function h(r,t){return F(r).find(e=>String(e.node.props.id)===t)}function L(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),l=o.parent?`${u(r,o.parent.type)} · ${w(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:l,path:""}}const S=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 C(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[j]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const l=e?.options??t.options;Array.isArray(l)&&(o.options=S(l));for(const i of["arrayFields","objectFields"]){const n=e?.[i]??t[i];n&&typeof n=="object"&&(o[i]=k(n))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=C(o);s&&(t[e]=s)}return t}function T(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 x(E,r)}function g(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function R(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 b(r,t){return r.findIndex(e=>y(e)&&String(e.props.id)===t)}function A(r,t,e){const o=t||e;if(!o)return r.length;const s=b(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function B(r,t,e,o,s={}){const l=structuredClone(t),i=Array.isArray(l.content)?l.content:l.content=[];try{e.forEach((n,_)=>{const a=c=>{throw new Error(`change ${_+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(l,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=R(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=O(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=>g(r,p),o,s):{type:n.type,props:{...g(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(A(i,n.after,n.before),0,$);break}case"remove_block":{const c=b(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=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(A(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:l}}export{B as applyPageEdits,u as blockLabel,T as describeBlocks,L as describeSelection};
1
+ import{FIELD_DESCRIPTION_MARKER as E}from"efficient-easel/screen/lib/host";import{isNode as y}from"efficient-easel/data";import{nodeListKeys as j}from"../../format/lib/document/node-lists.js";import{RETIRED_SECTIONS as v}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as O}from"./sections/text-layouts.js";import{hasOwnEntry as x}from"../../format/lib/own-entry.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function w(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function d(r,t,e,o){r.forEach((s,l)=>{if(y(s)){o.push({node:s,list:r,index:l,parent:t,slot:e});for(const i of j(s))d(s.props[i],s,i,o)}})}function F(r){const t=[];d(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&d(e,null,"",t);return t}function h(r,t){return F(r).find(e=>String(e.node.props.id)===t)}function T(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),l=o.parent?`${u(r,o.parent.type)} · ${w(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:l,path:""}}const S=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 C(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[E]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const l=e?.options??t.options;Array.isArray(l)&&(o.options=S(l));for(const i of["arrayFields","objectFields"]){const n=e?.[i]??t[i];n&&typeof n=="object"&&(o[i]=k(n))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=C(o);s&&(t[e]=s)}return t}function B(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 x(v,r)}function g(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function R(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 b(r,t){return r.findIndex(e=>y(e)&&String(e.props.id)===t)}function A(r,t,e){const o=t||e;if(!o)return r.length;const s=b(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function K(r,t,e,o,s={}){const l=structuredClone(t),i=Array.isArray(l.content)?l.content:l.content=[];try{e.forEach((n,_)=>{const a=c=>{throw new Error(`change ${_+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(l,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=R(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=O(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=>g(r,p),o,s):{type:n.type,props:{...g(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(A(i,n.after,n.before),0,$);break}case"remove_block":{const c=b(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=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(A(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:l}}export{K as applyPageEdits,u as blockLabel,B as describeBlocks,T as describeSelection};
@@ -16,6 +16,8 @@ export interface TypeScriptApi {
16
16
  ScriptKind: {
17
17
  JS: number;
18
18
  TS: number;
19
+ TSX: number;
20
+ JSX: number;
19
21
  };
20
22
  SyntaxKind: {
21
23
  ImportKeyword: number;
@@ -29,8 +31,17 @@ export interface TypeScriptApi {
29
31
  isLiteralTypeNode(node: SyntaxNode): boolean;
30
32
  isModuleDeclaration(node: SyntaxNode): boolean;
31
33
  isStringLiteral(node: unknown): boolean;
34
+ isNoSubstitutionTemplateLiteral(node: unknown): boolean;
35
+ isImportEqualsDeclaration(node: SyntaxNode): boolean;
36
+ isExternalModuleReference(node: unknown): boolean;
37
+ isNamespaceImport(node: unknown): boolean;
38
+ isNamedExports(node: unknown): boolean;
32
39
  }
33
40
  export declare function moduleSpecifiers(ts: TypeScriptApi, fileName: string, text: string): ModuleSpecifier[];
41
+ export declare function importIsTypeOnly(ts: TypeScriptApi, node: SyntaxNode): boolean;
42
+ export declare function exportIsTypeOnly(ts: TypeScriptApi, node: SyntaxNode): boolean;
43
+ export declare function importsOf(ts: TypeScriptApi, fileName: string, text: string): string[];
44
+ export declare function packageNameOf(spec: string): string;
34
45
  export declare function relinkSpecifiers(ts: TypeScriptApi, fileName: string, text: string, retarget: (spec: string) => string | null): {
35
46
  text: string;
36
47
  rewritten: number;
@@ -1 +1 @@
1
- function u(e,a,s){const c=e.createSourceFile(a,s,e.ScriptTarget.Latest,!1,a.endsWith(".d.ts")?e.ScriptKind.TS:e.ScriptKind.JS),i=[],r=t=>i.push({start:t.getStart(c)+1,end:t.getEnd()-1,text:t.text}),n=t=>{const o=t;if((e.isImportDeclaration(t)||e.isExportDeclaration(t))&&o.moduleSpecifier&&e.isStringLiteral(o.moduleSpecifier))r(o.moduleSpecifier);else if(e.isCallExpression(t)){const l=o.arguments,p=o.expression;l.length>0&&e.isStringLiteral(l[0])&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")&&r(l[0])}else if(e.isImportTypeNode(t)){const l=o.argument;e.isLiteralTypeNode(l)&&e.isStringLiteral(l.literal)&&r(l.literal)}else e.isModuleDeclaration(t)&&e.isStringLiteral(o.name)&&r(o.name);e.forEachChild(t,n)};return n(c),i.sort((t,o)=>o.start-t.start)}function f(e,a,s,c){let i=s,r=0;for(const n of u(e,a,s)){const t=c(n.text);t===null||t===n.text||(i=i.slice(0,n.start)+t+i.slice(n.end),r+=1)}return{text:i,rewritten:r}}function S(e,a){const s=e.split("/").slice(0,-1),c=a.split("/");let i=0;for(;i<s.length&&i<c.length-1&&s[i]===c[i];)i+=1;const r=s.length-i,n=c.slice(i).join("/");return r===0?`./${n}`:`${"../".repeat(r)}${n}`}export{u as moduleSpecifiers,S as relativeSpecifier,f as relinkSpecifiers};
1
+ function f(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,n.endsWith(".d.ts")?e.ScriptKind.TS:e.ScriptKind.JS),i=[],o=t=>i.push({start:t.getStart(l)+1,end:t.getEnd()-1,text:t.text}),c=t=>{const r=t;if((e.isImportDeclaration(t)||e.isExportDeclaration(t))&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))o(r.moduleSpecifier);else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;a.length>0&&e.isStringLiteral(a[0])&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")&&o(a[0])}else if(e.isImportTypeNode(t)){const a=r.argument;e.isLiteralTypeNode(a)&&e.isStringLiteral(a.literal)&&o(a.literal)}else e.isModuleDeclaration(t)&&e.isStringLiteral(r.name)&&o(r.name);e.forEachChild(t,c)};return c(l),i.sort((t,r)=>r.start-t.start)}function S(e,n){const s=n.importClause;if(!s)return!1;if(s.isTypeOnly)return!0;if(s.name)return!1;const l=s.namedBindings;if(!l||e.isNamespaceImport(l))return!1;const{elements:i}=l;return i.length>0&&i.every(o=>o.isTypeOnly)}function m(e,n){const s=n;if(s.isTypeOnly)return!0;if(!s.exportClause||!e.isNamedExports(s.exportClause))return!1;const{elements:l}=s.exportClause;return l.length>0&&l.every(i=>i.isTypeOnly)}function x(e,n){return/\.tsx$/.test(n)?e.ScriptKind.TSX:/\.jsx$/.test(n)?e.ScriptKind.JSX:/\.[cm]?js$/.test(n)?e.ScriptKind.JS:e.ScriptKind.TS}function d(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,x(e,n)),i=[],o=t=>e.isStringLiteral(t)||e.isNoSubstitutionTemplateLiteral(t)?t.text:null,c=t=>{const r=t;if(e.isImportDeclaration(t)&&e.isStringLiteral(r.moduleSpecifier))S(e,t)||i.push(r.moduleSpecifier.text);else if(e.isExportDeclaration(t)&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))m(e,t)||i.push(r.moduleSpecifier.text);else if(e.isImportEqualsDeclaration(t)&&!r.isTypeOnly&&e.isExternalModuleReference(r.moduleReference)){const a=o(r.moduleReference.expression);a!==null&&i.push(a)}else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;if(a.length>0&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")){const u=o(a[0]);u!==null&&i.push(u)}}e.forEachChild(t,c)};return c(l),i}function g(e){const n=e.split("/");return e.startsWith("@")?n.slice(0,2).join("/"):n[0]}function y(e,n,s,l){let i=s,o=0;for(const c of f(e,n,s)){const t=l(c.text);t===null||t===c.text||(i=i.slice(0,c.start)+t+i.slice(c.end),o+=1)}return{text:i,rewritten:o}}function h(e,n){const s=e.split("/").slice(0,-1),l=n.split("/");let i=0;for(;i<s.length&&i<l.length-1&&s[i]===l[i];)i+=1;const o=s.length-i,c=l.slice(i).join("/");return o===0?`./${c}`:`${"../".repeat(o)}${c}`}export{m as exportIsTypeOnly,S as importIsTypeOnly,d as importsOf,f as moduleSpecifiers,g as packageNameOf,h as relativeSpecifier,y as relinkSpecifiers};
@@ -12,13 +12,7 @@ export declare const BOX_DARKEN: {
12
12
  readonly fallback: 0;
13
13
  readonly unit: "%";
14
14
  };
15
- export declare const BOX_DARKEN_STYLES: readonly [{
16
- readonly label: "Even";
17
- readonly value: "even";
18
- }, {
19
- readonly label: "From the bottom";
20
- readonly value: "bottom";
21
- }];
15
+ export { BOX_DARKEN_STYLES } from "./box-darken-styles.js";
22
16
  export declare const BOX_CARD_PAD: {
23
17
  readonly desktop: 20;
24
18
  readonly phone: 20;
@@ -1 +1 @@
1
- import{parseHexColor as C}from"efficient-shell/format";import{fillColorRole as P}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as c}from"./box-card-rule.js";import{boxLayoutClasses as D}from"./box-layout.js";import{namedRowField as u,rowFieldText as S}from"./card-template.js";import{fillInkCss as y,fillSlotNamed as I,inkTokenOf as L,partColourName as E}from"../document/part-inks.js";import{scrim as f}from"./scrim.js";import{viewVarSplit as _}from"./view-var-split.js";const q="sf-card",J="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",g={min:0,max:100,step:5,fallback:0,unit:"%"},N=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],B="68%",Q={desktop:20,phone:20,side:40,sidePhone:24},U="sf-box-sides",Z={min:0,max:200,step:10};function R(t){return typeof t=="string"&&t.trim()!==""}function v(t){return R(typeof t?.bgImage=="string"?t.bgImage:null)||F(t)}function F(t){return u(t,c)!==""}function tt(t,e){return e||!F(t)?t:{...t,[c]:""}}function et(t,e){const n=S(e,u(t,c))?.trim();return n||null}function O(t,e){const o=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(o)||o<=0)return null;const l=(Math.min(g.max,Math.max(g.min,o))/100).toFixed(2);return e!=="bottom"?{background:f(Number(l))}:{background:`linear-gradient(0deg, ${f(Number(l))} 0%, ${f(0)} ${B})`}}const k=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],ot="fillFade",m=k[1].value,T=t=>t===m?m:k[0].value,X=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function nt(t){return T(t)!==m?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${X.map(o=>`color-mix(in srgb, var(--bg) ${o.mix}, transparent) ${o.at}`).join(", ")})`}}const A=t=>typeof t=="string"?C(t.trim()):null,p=t=>{const e=A(t);if(e!==null||typeof t!="string")return e;const o=t.trim();return o&&!o.startsWith("#")&&y(o)||null},rt=t=>{if(typeof t!="string")return null;const e=P(E(t.trim()));return e?.kind==="slot"?e.slot:null},W="swatch";function lt(t,e){if(!e)return null;const o=S(e,u(t,W)),n=I(o);return A(o)??(n&&L(n)||null)}const V={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function at(t,e,o){return _(V,p(t),p(e),p(o))}const w={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function st(t){const e=O(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const o=(r,i)=>String(O(r,i)?.background??"none"),n=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,l=r=>N.some(i=>i.value===r)?r:void 0,[a,s,d,x]=[n(t.darkenTablet),l(t.darkenStyleTablet),n(t.darkenPhone),l(t.darkenStylePhone)],b=a??t.darken,h=s??t.darkenStyle;return _(w,String(e.background),a!==void 0||s!==void 0?o(b,h):null,d!==void 0||x!==void 0?o(d??b,x??h):null)}function it(t,e){const o={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[n,l]=o[t]??o.center,[a,s]=e==="column"?[l,n]:[n,l];return D(a,s)}export{Q as BOX_CARD_PAD,Z as BOX_CARD_SIDE,g as BOX_DARKEN,N as BOX_DARKEN_STYLES,k as BOX_FILL_FADES,ot as BOX_FILL_FADE_PROP,V as BOX_FILL_VIEWS,U as BOX_OWNS_SIDES_CLASS,W as BOX_SWATCH_PROP,w as BOX_WASH_VIEWS,J as CARD_NO_LIFT_CLASS,q as CARD_SHADOW_CLASS,tt as boxCardProps,O as boxDarkenStyle,T as boxFillFadeOf,nt as boxFillFadeStyle,A as boxFillOf,rt as boxFillSlot,at as boxFillViews,v as boxIsCard,F as boxNamesRowPicture,p as boxPaintOf,it as boxPlacementClasses,et as boxRowPicture,lt as boxSwatchFill,st as boxWashViews,R as isBackgroundBox};
1
+ import{parseHexColor as C}from"efficient-shell/format";import{fillColorRole as D}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as c}from"./box-card-rule.js";import{boxLayoutClasses as P}from"./box-layout.js";import{namedRowField as u,rowFieldText as h}from"./card-template.js";import{fillInkCss as y,fillSlotNamed as L,inkTokenOf as E,partColourName as I}from"../document/part-inks.js";import{scrim as f}from"./scrim.js";import{viewVarSplit as _}from"./view-var-split.js";import{BOX_DARKEN_STYLES as N}from"./box-darken-styles.js";const J="sf-card",Q="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",g={min:0,max:100,step:5,fallback:0,unit:"%"};import{BOX_DARKEN_STYLES as mt}from"./box-darken-styles.js";const B="68%",U={desktop:20,phone:20,side:40,sidePhone:24},Z="sf-box-sides",v={min:0,max:200,step:10};function R(t){return typeof t=="string"&&t.trim()!==""}function tt(t){return R(typeof t?.bgImage=="string"?t.bgImage:null)||O(t)}function O(t){return u(t,c)!==""}function et(t,e){return e||!O(t)?t:{...t,[c]:""}}function ot(t,e){const n=h(e,u(t,c))?.trim();return n||null}function F(t,e){const o=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(o)||o<=0)return null;const l=(Math.min(g.max,Math.max(g.min,o))/100).toFixed(2);return e!=="bottom"?{background:f(Number(l))}:{background:`linear-gradient(0deg, ${f(Number(l))} 0%, ${f(0)} ${B})`}}const k=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],nt="fillFade",m=k[1].value,T=t=>t===m?m:k[0].value,X=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function rt(t){return T(t)!==m?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${X.map(o=>`color-mix(in srgb, var(--bg) ${o.mix}, transparent) ${o.at}`).join(", ")})`}}const A=t=>typeof t=="string"?C(t.trim()):null,p=t=>{const e=A(t);if(e!==null||typeof t!="string")return e;const o=t.trim();return o&&!o.startsWith("#")&&y(o)||null},lt=t=>{if(typeof t!="string")return null;const e=D(I(t.trim()));return e?.kind==="slot"?e.slot:null},W="swatch";function at(t,e){if(!e)return null;const o=h(e,u(t,W)),n=L(o);return A(o)??(n&&E(n)||null)}const V={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function st(t,e,o){return _(V,p(t),p(e),p(o))}const w={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function it(t){const e=F(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const o=(r,i)=>String(F(r,i)?.background??"none"),n=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,l=r=>N.some(i=>i.value===r)?r:void 0,[a,s,d,x]=[n(t.darkenTablet),l(t.darkenStyleTablet),n(t.darkenPhone),l(t.darkenStylePhone)],b=a??t.darken,S=s??t.darkenStyle;return _(w,String(e.background),a!==void 0||s!==void 0?o(b,S):null,d!==void 0||x!==void 0?o(d??b,x??S):null)}function ct(t,e){const o={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[n,l]=o[t]??o.center,[a,s]=e==="column"?[l,n]:[n,l];return P(a,s)}export{U as BOX_CARD_PAD,v as BOX_CARD_SIDE,g as BOX_DARKEN,mt as BOX_DARKEN_STYLES,k as BOX_FILL_FADES,nt as BOX_FILL_FADE_PROP,V as BOX_FILL_VIEWS,Z as BOX_OWNS_SIDES_CLASS,W as BOX_SWATCH_PROP,w as BOX_WASH_VIEWS,Q as CARD_NO_LIFT_CLASS,J as CARD_SHADOW_CLASS,et as boxCardProps,F as boxDarkenStyle,T as boxFillFadeOf,rt as boxFillFadeStyle,A as boxFillOf,lt as boxFillSlot,st as boxFillViews,tt as boxIsCard,O as boxNamesRowPicture,p as boxPaintOf,ct as boxPlacementClasses,ot as boxRowPicture,at as boxSwatchFill,it as boxWashViews,R as isBackgroundBox};
@@ -0,0 +1,7 @@
1
+ export declare const BOX_DARKEN_STYLES: readonly [{
2
+ readonly label: "Even";
3
+ readonly value: "even";
4
+ }, {
5
+ readonly label: "From the bottom";
6
+ readonly value: "bottom";
7
+ }];
@@ -0,0 +1 @@
1
+ const e=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];export{e as BOX_DARKEN_STYLES};
@@ -1,4 +1,4 @@
1
- export declare const BOX_SHAPES: ("auto" | "square" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
1
+ export declare const BOX_SHAPES: ("auto" | "tall" | "square" | "wide" | "landscape" | "portrait" | "video" | "panorama" | "story" | "poster" | "screen")[];
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;
@@ -3,3 +3,13 @@ export declare const CARD_ROW_LINK_PROP = "rowLinkField";
3
3
  export declare const CARD_TEMPLATE_SLOT = "template";
4
4
  export declare const CARD_LIST_TYPE = "CardList";
5
5
  export declare const BOX_HIDE_WHEN_ROW_EMPTY = "hideWhenRowEmpty";
6
+ export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
7
+ export declare function cardTemplateSlot(): {
8
+ type: "slot";
9
+ allow: string[];
10
+ };
11
+ export declare const CARD_LIST_ITEM_BLOCKS: ("Flex" | "Text" | "ImageBlock")[];
12
+ export declare function cardListItemSlot(): {
13
+ type: "slot";
14
+ allow: string[];
15
+ };
@@ -1 +1 @@
1
- const t="rowField",_="rowLinkField",o="template",e="CardList",R="hideWhenRowEmpty";export{R as BOX_HIDE_WHEN_ROW_EMPTY,e as CARD_LIST_TYPE,t as CARD_ROW_FIELD_PROP,_ as CARD_ROW_LINK_PROP,o as CARD_TEMPLATE_SLOT};
1
+ const r="rowField",_="rowLinkField",l="template",n="CardList",c="hideWhenRowEmpty",t=["Text","ImageBlock","ButtonBlock","Flex"];function p(){return{type:"slot",allow:[...t]}}const e=t.filter(o=>o!=="ButtonBlock");function L(){return{type:"slot",allow:[...e]}}export{c as BOX_HIDE_WHEN_ROW_EMPTY,e as CARD_LIST_ITEM_BLOCKS,n as CARD_LIST_TYPE,r as CARD_ROW_FIELD_PROP,_ as CARD_ROW_LINK_PROP,t as CARD_TEMPLATE_BLOCKS,l as CARD_TEMPLATE_SLOT,L as cardListItemSlot,p as cardTemplateSlot};
@@ -1,19 +1,9 @@
1
1
  import { type SourceRow } from "./block-sources.js";
2
2
  import type { CardCopyPlace } from "./mirror-cards.js";
3
3
  export declare const CARD_TEMPLATE_LABEL = "Card template";
4
- export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
5
- export { BOX_HIDE_WHEN_ROW_EMPTY, CARD_LIST_TYPE, CARD_ROW_FIELD_PROP, CARD_ROW_LINK_PROP, CARD_TEMPLATE_SLOT } from "./card-row-keys.js";
6
- export declare function cardTemplateSlot(): {
7
- type: "slot";
8
- allow: string[];
9
- };
10
- export declare const CARD_LIST_ITEM_BLOCKS: ("Flex" | "Text" | "ImageBlock")[];
4
+ export { BOX_HIDE_WHEN_ROW_EMPTY, CARD_LIST_TYPE, CARD_ROW_FIELD_PROP, CARD_ROW_LINK_PROP, CARD_LIST_ITEM_BLOCKS, CARD_TEMPLATE_BLOCKS, CARD_TEMPLATE_SLOT, cardListItemSlot, cardTemplateSlot } from "./card-row-keys.js";
11
5
  export declare const CARD_LIST_ROWS = "items";
12
6
  export declare const CARD_LIST_FIELDS = "itemFields";
13
- export declare function cardListItemSlot(): {
14
- type: "slot";
15
- allow: string[];
16
- };
17
7
  export type CardRowFieldKind = "text" | "image" | "link" | "list" | "colour" | "date";
18
8
  export type CardRowFieldKinds = CardRowFieldKind | readonly CardRowFieldKind[];
19
9
  export declare function fieldsOfKind(fields: readonly CardRowFieldSpec[], kind?: CardRowFieldKinds): readonly CardRowFieldSpec[];
@@ -1 +1 @@
1
- import{blockSources as Y,blockSourceSpec as O,declaredBlockSource as R}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{isNodeList as v}from"efficient-easel/data";import{BOX_TYPE as W}from"../document/container-blocks.js";import{globalRegistry as M}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as N}from"../markup.js";import{BOX_HIDE_WHEN_ROW_EMPTY as K,CARD_LIST_TYPE as k,CARD_ROW_FIELD_PROP as p,CARD_ROW_LINK_PROP as y,CARD_TEMPLATE_SLOT as B}from"./card-row-keys.js";import{withCardsTemplate as H}from"../document/cards-template-on-read.js";import{CARDS_TYPE as L}from"../document/blocks/general/Cards/card-seed.js";import{ORDER_SUMMARY_TYPE as $}from"../document/blocks/general/OrderSummary/block-type.js";import{PROCESS_STEPS_TYPE as j}from"../document/blocks/general/ProcessSteps/row-seed.js";import{withCardListTemplate as U}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as Q,withArticleBodyTemplate as X}from"../document/article-body-seed.js";import{LOGOS_TYPE as q,withLogosTemplate as V}from"../document/blocks/general/Logos/card-seed.js";import{FAQ_TYPE as G,withFaqTemplate as z}from"../document/blocks/general/FAQ/card-seed.js";import{FOOTPRINT_TYPE as J,withFootprintListTemplate as Z}from"../document/blocks/general/Footprint/card-seed.js";const ee="Card template",E=["Text","ImageBlock","ButtonBlock","Flex"];import{BOX_HIDE_WHEN_ROW_EMPTY as st,CARD_LIST_TYPE as it,CARD_ROW_FIELD_PROP as at,CARD_ROW_LINK_PROP as ct,CARD_TEMPLATE_SLOT as ft}from"./card-row-keys.js";function Fe(){return{type:"slot",allow:[...E]}}const te=E.filter(e=>e!=="ButtonBlock"),A="items",P="itemFields";function Ye(){return{type:"slot",allow:[...te]}}function m(e,t){if(!t)return e;const r=typeof t=="string"?[t]:t;return e.filter(n=>r.includes(n.kind??"text"))}const re=[{block:$,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:G,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>z(e)},{block:J,typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>Z(e)},{block:L,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,plain:!0}],seed:e=>H(L,e)},{block:j,fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:k,label:"Card list"}]},{block:q,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>V(e)},{block:k,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>U(e)},{block:Q,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>X(e)}];function f(){return M("efficient.card-templates",()=>new Map(re.map(e=>[e.block,e])))}function ve(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.`);if(o.type===D)throw new Error(`The card template of ${t.block} names "${D}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=S(o.label),c=Array.isArray(o.fields)?{fields:o.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...c})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||Y(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=S(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function oe(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function We(e,t){const r=le(e),n=(r.length?r:[B]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):oe(e,s);return o===s?t:o}function Me(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ne(e){return f().get(e)?.blocks??[]}function Ke(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function He(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function $e(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function je(e){return typeof e=="string"&&f().has(e)}const ne=[{slot:B}];function b(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??ne:[]}function le(e){return b(e).map(t=>t.slot)}function se(e,t){return b(e).some(r=>r.slot===t)}function Ue(e,t){const r=b(e).find(n=>n.slot===t);return r?r.label??ee:null}function g(e,t){return t?b(e).find(r=>r.slot===t)?.fields:void 0}function ie(e,t){const r=f().get(e)?.fields??[];return m(r,t)}function ae(e,t){if(typeof e!="string")return"";const r=g(e,t);return(r?m(r,"list"):ie(e,"list"))[0]?.key??""}function ce(e,t,r){return _(e)||ae(t,r)}function C(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=g(n,r);if(s)return m(s,t);const i=f().get(n)?.fields??[],o=O(R(e?.props))?.fields,l=o?.length?[...o.map(c=>({...c})),...i.filter(c=>c.everySource&&!o.some(a=>a.key===c.key))]:i;return m(l,t)}function fe(e,t,r,n){if(!e)return null;const s=g(e,n);return s?s.find(i=>i.key===t)??null:r?C(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function x(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??fe(e.ownerType,t,e.owner,e.slot)}function Qe(e,t){return x(e,t)?.plain===!0}function Xe(e,t){return x(e,t)?.kind==="date"}function _(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function qe(e,t){return e.key||String(t+1)}function Ve(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 Ge(e,t){const r=e[K];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},ze=w,ue=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Je(e,t,r){return de(e,t,r)&&!ue.has(`${e}.${r}`)}function de(e,t,r){return pe(e,t,r)!==""}function pe(e,t,r){const n=w[e]?.[r];return n?_(t,n):""}function I(e,t){return!t||!e?null:e[t]??""}function me(e,t){return I(e,t)?.trim()||void 0}function Ze(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,c]of Object.entries(w[e]??{})){const a=_(t,c),u=I(r,a);if(u!==null){if(o??={...t},c===y){o[l]=me(r,a);continue}o[l]=x({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?N(u):u}}return o??t}function T(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const[c,a]of Object.entries(l?.props??{})){if(!v(a))continue;const u=se(l.type,c)?{owner:l,slot:c,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===W},d=n(a,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function ye(e,t){const r=T(e,t);return r&&r.owner}function ke(e,t){const r=T(e,t);return r&&r.slot}function et(e,t){const r=T(e,t);return r&&(r.direct?r.owner:null)}function tt(e,t){const r=T(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function rt(e,t,r){if(t?.type!==k)return[];const n=ye(e,t.props?.id);if(!n){const l=O(R(t.props))?.fields,c=l?.length?l.map(d=>({...d})):be(t.props),a=(f().get(k)?.fields??[]).filter(d=>d.everySource&&!c.some(F=>F.key===d.key)),u=[...c,...a];return m(u,r)}const s=ke(e,t.props?.id)??void 0,i=ce(t.props,n.type,s),o=i&&C(n,"list",s).find(l=>l.key===i)?.fields||[];return m(o,r)}function ot(e,t){return{[p]:"",[A]:e.map(r=>({...r})),[P]:t.map(r=>({...r}))}}function be(e,t){const r=e?.[P];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return m(n,t)}const D="HostPart";export{st as BOX_HIDE_WHEN_ROW_EMPTY,P as CARD_LIST_FIELDS,te as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,it as CARD_LIST_TYPE,at as CARD_ROW_FIELD_PROP,ct as CARD_ROW_LINK_PROP,E as CARD_TEMPLATE_BLOCKS,ee as CARD_TEMPLATE_LABEL,ft as CARD_TEMPLATE_SLOT,D as HOST_PART_TYPE,ze as ROW_BOUND_PROPS,ue as ROW_PART_BY_WORDS,tt as cardCopyPlace,qe as cardKeyOf,rt as cardListFieldsOf,Ye as cardListItemSlot,ot as cardListProps,ce as cardListShows,Ve as cardRow,Ne as cardTemplateBlocks,et as cardTemplateCardOwner,fe as cardTemplateField,ie as cardTemplateFields,C as cardTemplateFieldsOf,$e as cardTemplateLinesBetween,ye as cardTemplateOwner,Fe as cardTemplateSlot,Ue as cardTemplateSlotLabel,le as cardTemplateSlotNames,ke as cardTemplateSlotOf,He as cardTemplateTypedRows,Me as cardTemplatesNameBlocks,ae as defaultListField,m as fieldsOfKind,je as hasCardTemplate,Ke as isCardTemplateBlock,se as isCardTemplateSlot,_ as namedRowField,ve as registerCardTemplates,de as rowBound,Xe as rowFieldIsDate,pe as rowFieldOf,x as rowFieldSpec,I as rowFieldText,Qe as rowFieldWordsArePlain,Ze as rowFilledProps,me as rowLinkText,Je as rowPartByKey,Ge as templateBoxIsEmpty,We as templateOnInsert,oe as templateOnRead};
1
+ import{blockSources as F,blockSourceSpec as O,declaredBlockSource as R}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{nodeListKeys as Y}from"../document/node-lists.js";import{BOX_TYPE as v}from"../document/container-blocks.js";import{globalRegistry as W}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as M}from"../markup.js";import{BOX_HIDE_WHEN_ROW_EMPTY as K,CARD_LIST_TYPE as b,CARD_ROW_FIELD_PROP as p,CARD_ROW_LINK_PROP as y,CARD_TEMPLATE_SLOT as L}from"./card-row-keys.js";import{withCardsTemplate as N}from"../document/cards-template-on-read.js";import{CARDS_TYPE as E}from"../document/blocks/general/Cards/card-seed.js";import{ORDER_SUMMARY_TYPE as H}from"../document/blocks/general/OrderSummary/block-type.js";import{PROCESS_STEPS_TYPE as $}from"../document/blocks/general/ProcessSteps/row-seed.js";import{withCardListTemplate as U}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as j,withArticleBodyTemplate as Q}from"../document/article-body-seed.js";import{LOGOS_TYPE as X,withLogosTemplate as q}from"../document/blocks/general/Logos/card-seed.js";import{FAQ_TYPE as V,withFaqTemplate as G}from"../document/blocks/general/FAQ/card-seed.js";import{FOOTPRINT_TYPE as z,withFootprintListTemplate as J}from"../document/blocks/general/Footprint/card-seed.js";const Z="Card template";import{BOX_HIDE_WHEN_ROW_EMPTY as rt,CARD_LIST_TYPE as ot,CARD_ROW_FIELD_PROP as nt,CARD_ROW_LINK_PROP as lt,CARD_LIST_ITEM_BLOCKS as st,CARD_TEMPLATE_BLOCKS as it,CARD_TEMPLATE_SLOT as at,cardListItemSlot as ct,cardTemplateSlot as ft}from"./card-row-keys.js";const A="items",B="itemFields";function m(e,t){if(!t)return e;const r=typeof t=="string"?[t]:t;return e.filter(n=>r.includes(n.kind??"text"))}const ee=[{block:H,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:V,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>G(e)},{block:z,typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>J(e)},{block:E,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,plain:!0}],seed:e=>N(E,e)},{block:$,fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:b,label:"Card list"}]},{block:X,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>q(e)},{block:b,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>U(e)},{block:j,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>Q(e)}];function f(){return W("efficient.card-templates",()=>new Map(ee.map(e=>[e.block,e])))}function Ie(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.`);if(o.type===I)throw new Error(`The card template of ${t.block} names "${I}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=S(o.label),a=Array.isArray(o.fields)?{fields:o.fields.map(c=>({...c}))}:null;n.some(c=>c.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...a})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||F(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=S(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function te(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function De(e,t){const r=oe(e),n=(r.length?r:[L]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):te(e,s);return o===s?t:o}function Fe(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ye(e){return f().get(e)?.blocks??[]}function ve(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function We(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function Me(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ke(e){return typeof e=="string"&&f().has(e)}const re=[{slot:L}];function k(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??re:[]}function oe(e){return k(e).map(t=>t.slot)}function ne(e,t){return k(e).some(r=>r.slot===t)}function Ne(e,t){const r=k(e).find(n=>n.slot===t);return r?r.label??Z:null}function g(e,t){return t?k(e).find(r=>r.slot===t)?.fields:void 0}function le(e,t){const r=f().get(e)?.fields??[];return m(r,t)}function se(e,t){if(typeof e!="string")return"";const r=g(e,t);return(r?m(r,"list"):le(e,"list"))[0]?.key??""}function ie(e,t,r){return x(e)||se(t,r)}function P(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=g(n,r);if(s)return m(s,t);const i=f().get(n)?.fields??[],o=O(R(e?.props))?.fields,l=o?.length?[...o.map(a=>({...a})),...i.filter(a=>a.everySource&&!o.some(c=>c.key===a.key))]:i;return m(l,t)}function ae(e,t,r,n){if(!e)return null;const s=g(e,n);return s?s.find(i=>i.key===t)??null:r?P(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function _(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??ae(e.ownerType,t,e.owner,e.slot)}function He(e,t){return _(e,t)?.plain===!0}function $e(e,t){return _(e,t)?.kind==="date"}function x(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function Ue(e,t){return e.key||String(t+1)}function je(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 Qe(e,t){const r=e[K];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},Xe=w,ce=new Set(["ButtonBlock.label","LogoBlock.alt"]);function qe(e,t,r){return fe(e,t,r)&&!ce.has(`${e}.${r}`)}function fe(e,t,r){return ue(e,t,r)!==""}function ue(e,t,r){const n=w[e]?.[r];return n?x(t,n):""}function C(e,t){return!t||!e?null:e[t]??""}function de(e,t){return C(e,t)?.trim()||void 0}function Ve(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,a]of Object.entries(w[e]??{})){const c=x(t,a),u=C(r,c);if(u!==null){if(o??={...t},a===y){o[l]=de(r,c);continue}o[l]=_({ownerType:n,fields:s,slot:i},c)?.mark==="accentItalic"?M(u):u}}return o??t}function T(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const a of Y(l??{})){const c=l.props[a],u=ne(l.type,a)?{owner:l,slot:a,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===v},d=n(c,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function pe(e,t){const r=T(e,t);return r&&r.owner}function me(e,t){const r=T(e,t);return r&&r.slot}function Ge(e,t){const r=T(e,t);return r&&(r.direct?r.owner:null)}function ze(e,t){const r=T(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function Je(e,t,r){if(t?.type!==b)return[];const n=pe(e,t.props?.id);if(!n){const l=O(R(t.props))?.fields,a=l?.length?l.map(d=>({...d})):ye(t.props),c=(f().get(b)?.fields??[]).filter(d=>d.everySource&&!a.some(D=>D.key===d.key)),u=[...a,...c];return m(u,r)}const s=me(e,t.props?.id)??void 0,i=ie(t.props,n.type,s),o=i&&P(n,"list",s).find(l=>l.key===i)?.fields||[];return m(o,r)}function Ze(e,t){return{[p]:"",[A]:e.map(r=>({...r})),[B]:t.map(r=>({...r}))}}function ye(e,t){const r=e?.[B];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:a,alt:c,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...a===!0?{multiline:!0}:{},...typeof c=="string"&&c?{alt:c}:{},...typeof u=="string"&&u?{next:u}:{}}]});return m(n,t)}const I="HostPart";export{rt as BOX_HIDE_WHEN_ROW_EMPTY,B as CARD_LIST_FIELDS,st as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,ot as CARD_LIST_TYPE,nt as CARD_ROW_FIELD_PROP,lt as CARD_ROW_LINK_PROP,it as CARD_TEMPLATE_BLOCKS,Z as CARD_TEMPLATE_LABEL,at as CARD_TEMPLATE_SLOT,I as HOST_PART_TYPE,Xe as ROW_BOUND_PROPS,ce as ROW_PART_BY_WORDS,ze as cardCopyPlace,Ue as cardKeyOf,Je as cardListFieldsOf,ct as cardListItemSlot,Ze as cardListProps,ie as cardListShows,je as cardRow,Ye as cardTemplateBlocks,Ge as cardTemplateCardOwner,ae as cardTemplateField,le as cardTemplateFields,P as cardTemplateFieldsOf,Me as cardTemplateLinesBetween,pe as cardTemplateOwner,ft as cardTemplateSlot,Ne as cardTemplateSlotLabel,oe as cardTemplateSlotNames,me as cardTemplateSlotOf,We as cardTemplateTypedRows,Fe as cardTemplatesNameBlocks,se as defaultListField,m as fieldsOfKind,Ke as hasCardTemplate,ve as isCardTemplateBlock,ne as isCardTemplateSlot,x as namedRowField,Ie as registerCardTemplates,fe as rowBound,$e as rowFieldIsDate,ue as rowFieldOf,_ as rowFieldSpec,C as rowFieldText,He as rowFieldWordsArePlain,Ve as rowFilledProps,de as rowLinkText,qe as rowPartByKey,Qe as templateBoxIsEmpty,De as templateOnInsert,te as templateOnRead};
@@ -1 +1 @@
1
- import{isNodeList as c}from"efficient-easel/data";import{mapEachNode as S,mapNodeLists as T}from"../document/node-lists.js";import{CARD_LIST_ROWS as _,CARD_LIST_TYPE as E,namedRowField as y}from"./card-template.js";import{BLOCK_SOURCE_PROP as N,COUNT_KEY_PROP as u,COUNTS_SOURCE as i,declaredBlockSource as O,sourceChoices as U}from"./block-sources.js";const C="Flex";function x(t,n){return y(t)?typeof t?.[u]=="string"?p(n?.[u]):"":p(t?.[u])}const p=t=>typeof t=="string"?t.trim():"",L=t=>t.type===E&&Array.isArray(t.props?.[_])&&t.props[_].some(n=>p(n?.[u])!==""),P=new Intl.NumberFormat("en-US");function A(t){return/^\d+$/.test(t)?P.format(Number(t)):t}function h(t,n){const r=n?n.find(e=>e.key===t)?.value:U(i).find(e=>e.key===t)?.value;return r===void 0?null:A(r)}const B={[u]:"any"};function m(t,n=!1){const r=t.props;if(!r)return{node:t,names:!1};let e=t.type==="Text"&&(x(r)!==""||n&&x(r,B)!=="");const s=n||L(t);let o=T(t,d=>S(d,f=>{const l=m(f,s);return l.names&&(e=!0),l.node})).props;if(t.type!==C)return{node:o===r?t:{...t,props:o},names:e};const a=O(o);if(e&&!a&&(o={...o,[N]:i}),!e&&a===i){const{[N]:d,...f}=o;o=f}return{node:o===r?t:{...t,props:o},names:!1}}function R(t,n,r){for(const e of t){if(e?.props?.id===n)return r;for(const s of Object.values(e?.props??{})){if(!c(s))continue;const o=R(s,n,e.type===C?e:r);if(o!==void 0)return o}}}function v(t,n){if(!c(t))return!0;const r=R(t,n,null);if(r===void 0)return!0;if(r===null)return!1;const e=O(r.props);return!e||e===i}function F(t){const n=t?.content;if(!c(n))return t;const r=n.map(e=>m(e));return r.every((e,s)=>e.node===n[s])?t:{...t,content:r.map(e=>e.node)}}function I(t){return m(t).node}export{h as countNumber,A as countWords,v as countsReachText,x as linkedCount,I as settleCountNode,F as settleCountSources};
1
+ import{isNodeList as l}from"efficient-easel/data";import{mapEachNode as S,mapNodeLists as T,nodeListsOf as E}from"../document/node-lists.js";import{CARD_LIST_ROWS as _,CARD_LIST_TYPE as y,namedRowField as L}from"./card-template.js";import{BLOCK_SOURCE_PROP as N,COUNT_KEY_PROP as u,COUNTS_SOURCE as i,declaredBlockSource as O,sourceChoices as U}from"./block-sources.js";const C="Flex";function x(t,n){return L(t)?typeof t?.[u]=="string"?c(n?.[u]):"":c(t?.[u])}const c=t=>typeof t=="string"?t.trim():"",P=t=>t.type===y&&Array.isArray(t.props?.[_])&&t.props[_].some(n=>c(n?.[u])!==""),A=new Intl.NumberFormat("en-US");function B(t){return/^\d+$/.test(t)?A.format(Number(t)):t}function F(t,n){const r=n?n.find(e=>e.key===t)?.value:U(i).find(e=>e.key===t)?.value;return r===void 0?null:B(r)}const W={[u]:"any"};function p(t,n=!1){const r=t.props;if(!r)return{node:t,names:!1};let e=t.type==="Text"&&(x(r)!==""||n&&x(r,W)!=="");const s=n||P(t);let o=T(t,a=>S(a,f=>{const d=p(f,s);return d.names&&(e=!0),d.node})).props;if(t.type!==C)return{node:o===r?t:{...t,props:o},names:e};const m=O(o);if(e&&!m&&(o={...o,[N]:i}),!e&&m===i){const{[N]:a,...f}=o;o=f}return{node:o===r?t:{...t,props:o},names:!1}}function R(t,n,r){for(const e of t){if(e?.props?.id===n)return r;for(const s of E(e??{})){const o=R(s,n,e.type===C?e:r);if(o!==void 0)return o}}}function I(t,n){if(!l(t))return!0;const r=R(t,n,null);if(r===void 0)return!0;if(r===null)return!1;const e=O(r.props);return!e||e===i}function k(t){const n=t?.content;if(!l(n))return t;const r=n.map(e=>p(e));return r.every((e,s)=>e.node===n[s])?t:{...t,content:r.map(e=>e.node)}}function v(t){return p(t).node}export{F as countNumber,B as countWords,I as countsReachText,x as linkedCount,v as settleCountNode,k as settleCountSources};
@@ -70,16 +70,16 @@ export declare function resolveSectionStick(props: SectionStickProps, opts?: {
70
70
  }): {
71
71
  desktop: boolean;
72
72
  desktopDistance: number;
73
- desktopUnit: "px" | "%" | "vw";
73
+ desktopUnit: "%" | "px" | "vw";
74
74
  desktopScreens: number;
75
75
  tablet: boolean;
76
76
  tabletDistance: number;
77
- tabletUnit: "px" | "%" | "vw";
77
+ tabletUnit: "%" | "px" | "vw";
78
78
  tabletScreens: number;
79
79
  ownTablet: boolean;
80
80
  phone: boolean;
81
81
  phoneDistance: number;
82
- phoneUnit: "px" | "%" | "vw";
82
+ phoneUnit: "%" | "px" | "vw";
83
83
  phoneScreens: number;
84
84
  ownPhone: boolean;
85
85
  };
@@ -1 +1 @@
1
- import{isNodeList as g}from"efficient-easel/data";import{isVerticalLoop as h}from"../animation/loop.js";import{boxCardProps as l,boxIsCard as B}from"./box-background.js";import"./box-card-rule.js";import{isCardTemplateSlot as R}from"./card-template.js";import{SECTION_WIDTH_FAMILY as A,hasWidthFamily as C,ownSectionWidth as x,siteWidthsOf as F}from"./section-width.js";const W=new Set(["Flex","Grid"]);function m(t){return typeof t=="string"&&W.has(t)}const I="contentWidth",N="full",S="content";function k(t){const n=t?.[I];return n===N?!1:n===S?!0:void 0}function Y(t,n){return t&&!n}function O(t){return t.loop==="scroll"&&t.direction!=="tabs"&&t.direction!=="accordion"&&!B(t)&&!h(t.scrollDirection)}function s(t,n){return m(t)&&O(l(n,!1))?x({}):x(n)}function j(t,n){return typeof t!="string"||!C(t)||A[t]==="rawMarkup"?s(t,n).background??"full":s(t,n).background??F(n).background}function H(t){return t!=="full"}function K(t,n,b){if(!Array.isArray(t)||typeof n!="string")return;const f=(G,r,_,w,c)=>{for(const e of G){const o=e?.props??{};if(o.id===n)return r;const i=m(e?.type),u=(w?s(e?.type,o).content:null)==="content"?!0:_,T=i&&(r.inBox?k(o)??u:u),E={insideGutter:r.insideGutter||T||i&&O(l(o,c)),inBox:r.inBox||i};for(const[p,d]of Object.entries(o)){if(!g(d))continue;const a=f(d,E,u,!1,c||R(e?.type,p));if(a!==void 0)return a}}};return f(t,{insideGutter:!1,inBox:!1},b,!0,!1)}export{I as BOX_GUTTER_KEY,N as BOX_GUTTER_OFF,S as BOX_GUTTER_ON,k as boxGutterOf,K as boxPlaceOf,O as boxRunsEdgeToEdge,Y as drawsSiteGutter,m as isFrameContainer,s as ownNodeWidth,j as sectionGroundAnswer,H as siteDrawsGutter};
1
+ import{nodeListKeys as g}from"../document/node-lists.js";import{isVerticalLoop as h}from"../animation/loop.js";import{boxCardProps as l,boxIsCard as B}from"./box-background.js";import"./box-card-rule.js";import{isCardTemplateSlot as R}from"./card-template.js";import{SECTION_WIDTH_FAMILY as y,hasWidthFamily as A,ownSectionWidth as x,siteWidthsOf as C}from"./section-width.js";const F=new Set(["Flex","Grid"]);function m(t){return typeof t=="string"&&F.has(t)}const W="contentWidth",I="full",S="content";function k(t){const n=t?.[W];return n===I?!1:n===S?!0:void 0}function K(t,n){return t&&!n}function O(t){return t.loop==="scroll"&&t.direction!=="tabs"&&t.direction!=="accordion"&&!B(t)&&!h(t.scrollDirection)}function u(t,n){return m(t)&&O(l(n,!1))?x({}):x(n)}function Y(t,n){return typeof t!="string"||!A(t)||y[t]==="rawMarkup"?u(t,n).background??"full":u(t,n).background??C(n).background}function H(t){return t!=="full"}function V(t,n,G){if(!Array.isArray(t)||typeof n!="string")return;const f=(_,e,b,p,c)=>{for(const r of _){const o=r?.props??{};if(o.id===n)return e;const i=m(r?.type),s=(p?u(r?.type,o).content:null)==="content"?!0:b,w=i&&(e.inBox?k(o)??s:s),T={insideGutter:e.insideGutter||w||i&&O(l(o,c)),inBox:e.inBox||i};for(const d of g({type:r?.type,props:o})){const E=o[d],a=f(E,T,s,!1,c||R(r?.type,d));if(a!==void 0)return a}}};return f(t,{insideGutter:!1,inBox:!1},G,!0,!1)}export{W as BOX_GUTTER_KEY,I as BOX_GUTTER_OFF,S as BOX_GUTTER_ON,k as boxGutterOf,V as boxPlaceOf,O as boxRunsEdgeToEdge,K as drawsSiteGutter,m as isFrameContainer,u as ownNodeWidth,Y as sectionGroundAnswer,H as siteDrawsGutter};
@@ -1 +1 @@
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};
1
+ import{cardListItemSlot as t}from"../../../../content/card-row-keys.js";const e={template:t()},l={label:"Card list",inline:!0,fields:e,defaultProps:{rowField:""}};export{l as CardListMeta,e as CardListSlots};
@@ -1 +1 @@
1
- import{cardTemplateSlot as e}from"../../../../content/card-template.js";const l={eyebrow:"Label",title:"Section *heading.*"},t={template:e()},r={label:"Cards",fields:t,defaultProps:{eyebrow:"",title:"",items:[],columns:3}};export{l as CARDS_PH,r as CardsMeta,t as CardsSlots};
1
+ import{cardTemplateSlot as e}from"../../../../content/card-row-keys.js";const l={eyebrow:"Label",title:"Section *heading.*"},t={template:e()},r={label:"Cards",fields:t,defaultProps:{eyebrow:"",title:"",items:[],columns:3}};export{l as CARDS_PH,r as CardsMeta,t as CardsSlots};
@@ -1 +1 @@
1
- import{PH as e}from"../../placeholders.js";import{cardTemplateSlot as t}from"../../../../content/card-template.js";const n={num:e.sectionNumber,title:"Frequently *asked.*",link:"View all questions"},l={template:t()},r={label:"Q&A",inline:!0,fields:l,defaultProps:{num:"",title:"",linkText:"",linkHref:"/faq",defaultOpen:!0,items:[]}};export{r as FAQMeta,l as FAQSlots,n as FAQ_PH};
1
+ import{PH as e}from"../../placeholders.js";import{cardTemplateSlot as t}from"../../../../content/card-row-keys.js";const n={num:e.sectionNumber,title:"Frequently *asked.*",link:"View all questions"},l={template:t()},r={label:"Q&A",inline:!0,fields:l,defaultProps:{num:"",title:"",linkText:"",linkHref:"/faq",defaultOpen:!0,items:[]}};export{r as FAQMeta,l as FAQSlots,n as FAQ_PH};
@@ -1,2 +1,2 @@
1
- import{FOOTPRINT_DEFAULTS as e}from"../../../../content/footprint.js";import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as o}from"../../../../content/card-template.js";const s={sectionNumber:t.sectionNumber,heading:`${t.heading}
1
+ import{FOOTPRINT_DEFAULTS as e}from"../../../../content/footprint.js";import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as o}from"../../../../content/card-row-keys.js";const s={sectionNumber:t.sectionNumber,heading:`${t.heading}
2
2
  *${t.accent}*`,tagline:t.body},a={template:o()},p={label:"Locations Map",fields:a,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:e.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};export{s as FOOTPRINT_PH,p as FootprintMeta,a as FootprintSlots};
@@ -1 +1 @@
1
- import{cardTemplateSlot as t}from"../../../../content/card-template.js";const o={title:"Order summary",note:"A short reassurance note under the total."},e={template:t()},a={label:"Order Table",fields:e,defaultProps:{eyebrow:"",title:"",rows:[],subRows:[],totalLabel:"",totalAmount:"",note:"",contained:!0}};export{o as ORDER_SUMMARY_PH,a as OrderSummaryMeta,e as OrderSummarySlots};
1
+ import{cardTemplateSlot as t}from"../../../../content/card-row-keys.js";const o={title:"Order summary",note:"A short reassurance note under the total."},e={template:t()},a={label:"Order Table",fields:e,defaultProps:{eyebrow:"",title:"",rows:[],subRows:[],totalLabel:"",totalAmount:"",note:"",contained:!0}};export{o as ORDER_SUMMARY_PH,a as OrderSummaryMeta,e as OrderSummarySlots};
@@ -1 +1 @@
1
- import{BOX_DARKEN_STYLES as t}from"../../../../content/box-background.js";import{POST_CARD_HEIGHT as r,POST_CARD_LAYOUT_FALLBACK as o}from"../../../../post-card-layout.js";import{PH as e}from"../../placeholders.js";const d={title:"Add a *headline* for this post.",excerpt:"A short summary of the post — one or two sentences.",category:e.category,date:e.date,readLabel:"0 min read"},m={label:"Post Card",drawsPictures:!0,defaultProps:{source:null,image:"",title:"",excerpt:"",href:"",category:"",date:"",readLabel:"",layout:o,showCover:!0,placement:"bottom-left",darken:55,darkenStyle:t[0].value,minHeight:r.fallback}};export{d as POSTCARD_PH,m as PostCardMeta};
1
+ import{BOX_DARKEN_STYLES as t}from"../../../../content/box-darken-styles.js";import{POST_CARD_HEIGHT as r,POST_CARD_LAYOUT_FALLBACK as o}from"../../../../post-card-layout.js";import{PH as e}from"../../placeholders.js";const d={title:"Add a *headline* for this post.",excerpt:"A short summary of the post — one or two sentences.",category:e.category,date:e.date,readLabel:"0 min read"},m={label:"Post Card",drawsPictures:!0,defaultProps:{source:null,image:"",title:"",excerpt:"",href:"",category:"",date:"",readLabel:"",layout:o,showCover:!0,placement:"bottom-left",darken:55,darkenStyle:t[0].value,minHeight:r.fallback}};export{d as POSTCARD_PH,m as PostCardMeta};
@@ -1 +1 @@
1
- import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as e}from"../../../../content/card-template.js";import{PROCESS_COLUMNS_SLOT as o}from"./column-seed.js";const m={num:t.sectionNumber,title:t.headingAccent,description:t.body,cta:t.viewAll},s={[o]:{type:"slot"},template:e()},c={label:"Image & Text Columns",drawsPictures:!0,fields:s,defaultProps:{num:"",title:"",description:"",columns:3,padTop:120,padBottom:120}};export{m as PROCESS_PH,c as ProcessStepsMeta,s as ProcessStepsSlots};
1
+ import{PH as t}from"../../placeholders.js";import{cardTemplateSlot as e}from"../../../../content/card-row-keys.js";import{PROCESS_COLUMNS_SLOT as o}from"./column-seed.js";const m={num:t.sectionNumber,title:t.headingAccent,description:t.body,cta:t.viewAll},s={[o]:{type:"slot"},template:e()},c={label:"Image & Text Columns",drawsPictures:!0,fields:s,defaultProps:{num:"",title:"",description:"",columns:3,padTop:120,padBottom:120}};export{m as PROCESS_PH,c as ProcessStepsMeta,s as ProcessStepsSlots};
@@ -1 +1 @@
1
- import{CARD_LIST_TYPE as c,CARD_ROW_FIELD_PROP as m}from"../../../../content/card-row-keys.js";import{BOX_TYPE as r,CONTAINER_BLOCKS_SLOT as s}from"../../../container-blocks.js";import{DIM as l,INNER_BOX as a,TEXT as g,labelStyle as d,seedNodes as P,token as T,slotSeedIds as _}from"../../../seed-parts.js";import{rowFieldTextSeed as p}from"../Cards/card-seed.js";import{withCardListTemplate as f}from"../CardList/item-seed.js";import{isNodeList as E}from"efficient-easel/data";const b="ProcessSteps",u={eyebrow:"eyebrow",title:"title",copy:"copy",image:"image",tag:"tag",specs:"specs"},e=u,w=()=>({type:r,props:{...a,name:"Row",direction:"row",share:"equal",align:"center",gap:48,sectionPaddingTop:60,sectionPaddingBottom:60,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60},slots:{[s]:[{type:r,props:{...a,name:"Picture",direction:"column",gap:12},slots:{[s]:[{type:"ImageBlock",props:{[m]:e.image,aspect:"1/1",fit:"contain"}},p(e.tag,{...l,tag:"p"},d(11))]}},{type:r,props:{...a,name:"Words",direction:"column",gap:16},slots:{[s]:[p(e.eyebrow,{...g,tag:"p"},{...d(13),color:"accent"}),p(e.title,{...g,tag:"h2"},{textStyle:"heading-2",...T("headingMedium",42,28),lineHeight:1.1,letterSpacing:-.02}),p(e.copy,{...l,tag:"p"},{textStyle:"body-1",...T("body",15),lineHeight:1.6}),{type:c,props:{[m]:e.specs}}]}}]}});function y(i){return i.map(o=>{let t=o.props;for(const[S,n]of Object.entries(t))E(n)&&(t={...t,[S]:y(n)});return o.type===c?{...o,props:f(t)}:{...o,props:t}})}function B(i){return y(P([w()],_(i,"row")))}export{u as IMAGE_TEXT_ROW_FIELDS,b as PROCESS_STEPS_TYPE,w as imageTextRowSeed,B as imageTextRowTemplate};
1
+ import{CARD_LIST_TYPE as c,CARD_ROW_FIELD_PROP as m}from"../../../../content/card-row-keys.js";import{BOX_TYPE as r,CONTAINER_BLOCKS_SLOT as s}from"../../../container-blocks.js";import{DIM as g,INNER_BOX as a,TEXT as l,labelStyle as d,seedNodes as S,token as y,slotSeedIds as P}from"../../../seed-parts.js";import{rowFieldTextSeed as p}from"../Cards/card-seed.js";import{withCardListTemplate as _}from"../CardList/item-seed.js";import{nodeListKeys as E}from"../../../node-lists.js";const L="ProcessSteps",f={eyebrow:"eyebrow",title:"title",copy:"copy",image:"image",tag:"tag",specs:"specs"},e=f,w=()=>({type:r,props:{...a,name:"Row",direction:"row",share:"equal",align:"center",gap:48,sectionPaddingTop:60,sectionPaddingBottom:60,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60},slots:{[s]:[{type:r,props:{...a,name:"Picture",direction:"column",gap:12},slots:{[s]:[{type:"ImageBlock",props:{[m]:e.image,aspect:"1/1",fit:"contain"}},p(e.tag,{...g,tag:"p"},d(11))]}},{type:r,props:{...a,name:"Words",direction:"column",gap:16},slots:{[s]:[p(e.eyebrow,{...l,tag:"p"},{...d(13),color:"accent"}),p(e.title,{...l,tag:"h2"},{textStyle:"heading-2",...y("headingMedium",42,28),lineHeight:1.1,letterSpacing:-.02}),p(e.copy,{...g,tag:"p"},{textStyle:"body-1",...y("body",15),lineHeight:1.6}),{type:c,props:{[m]:e.specs}}]}}]}});function T(i){return i.map(t=>{let o=t.props;for(const n of E(t))o={...o,[n]:T(o[n])};return t.type===c?{...t,props:_(o)}:{...t,props:o}})}function b(i){return T(S([w()],P(i,"row")))}export{f as IMAGE_TEXT_ROW_FIELDS,L as PROCESS_STEPS_TYPE,w as imageTextRowSeed,b as imageTextRowTemplate};
@@ -1 +1 @@
1
- import{FOOTER_LOGO_PX as _}from"../logo/logo-size.js";import{resolveContainerGap as y}from"../content/container-gap.js";import{NESTED_BOX_PADDING as m}from"../content/box-layout.js";import{finiteNumber as u}from"../finite-number.js";import{isNodeList as P}from"efficient-easel/data";import{hiddenKeyOf as L}from"efficient-easel/screen/lib/content/view-hide";import{templateOnInsert as x}from"../content/card-template.js";import{buildSectionGroup as w,SITE_FOOTER_TYPE as A}from"./section-groups.js";import{hasOwnEntry as S,ownEntry as h}from"../own-entry.js";const d="Flex",I={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},b={FooterPayment:"PaymentLogosBlock"},B=o=>{const{id:e,...s}=o;return s},E=o=>typeof o=="string"?o:"",g={sm:12,md:13,lg:15},j={sm:{mark:16,words:g.sm},md:{mark:20,words:g.md}},N="md",T=1.5,G={size:13,lineHeight:T,width:280},R=14,D=40,k=o=>o==="center"||o==="right"?o:"left";function M(o){const e={},s=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(const[t,i]of s){const c=u(o[t]);c&&(e[i]=c)}return e}function X(o,e,s){const t=s(o,B(e));if(Array.isArray(e.template))return{...t,props:{...t.props,template:O(e.template,String(t.props.id))}};if(e.template!==void 0)return t;const i=x(o,t.props);return i===t.props?t:{...t,props:i}}function O(o,e,s={at:0}){return o.map(t=>{const i={...t.props,id:`${e}~t${s.at++}`};for(const[c,r]of Object.entries(i))P(r)&&(i[c]=O(r,e,s));return{...t,props:i}})}function F(o,e,s){const t=o.props??{},i=s?.(o,e);if(i)return i;const c=h(I,o.type)??h(b,o.type);if(c)return[X(c,t,e)];switch(o.type){case"FooterLogo":{const r=k(t.align),n=e("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(_*((u(t.widthPct)??100)/100)),href:"/",align:r,...M(t)}),p=E(t.tagline).trim();return p?[n,e("Text",{text:p,tone:"dim",align:r,_partStyles:{text:{...G}}})]:[n]}case"FooterText":{const r=typeof t.size=="string"&&S(g,t.size)?t.size:N;return[e("Text",{text:E(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:g[r],lineHeight:T}}})]}case"FooterDivider":{const r=u(t.thickness),n=u(t.lengthPct);return[e("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{[L("mobile")]:!0}:{}})]}case"FooterGroup":{const r=Array.isArray(t.blocks)?t.blocks:[];return[e(d,{direction:t.direction==="horizontal"?"row":"column",gap:y("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"||t.align==="stretch"?t.align:"start",...m,content:r.flatMap(n=>F(n,e,s))})]}default:return[]}}function q(o,e,s,t){const i=o&&Array.isArray(o.props?.blocks)?o.props.blocks:[],c=l=>e(d,{direction:"row",wrap:!0,share:"equal",gap:D,content:l}),r=[];let n=[];for(const l of i){const a=F(l,e,t);if(l.type==="FooterDivider"){n.length&&r.push(c(n)),n=[],r.push(...a);continue}a.length<=1?n.push(...a):n.push(e(d,{direction:"column",gap:R,align:"stretch",...m,content:a}))}(n.length||!r.length)&&r.push(c(n));const p=e(d,{direction:"column",content:[e("LegalLineBlock")]}),f=w(A,s,[...r,p]);return{...f,props:{...f.props,...o?.props?.width==="full"?{fullWidth:!0}:{}}}}export{j as FOOTER_MARK_SIZES,g as FOOTER_TEXT_PX,q as boxFooterFromFooter,F as pageBlocksFromFooterBlock};
1
+ import{FOOTER_LOGO_PX as _}from"../logo/logo-size.js";import{resolveContainerGap as y}from"../content/container-gap.js";import{NESTED_BOX_PADDING as m}from"../content/box-layout.js";import{finiteNumber as u}from"../finite-number.js";import{nodeListKeys as P}from"./node-lists.js";import{hiddenKeyOf as L}from"efficient-easel/screen/lib/content/view-hide";import{templateOnInsert as x}from"../content/card-template.js";import{buildSectionGroup as w,SITE_FOOTER_TYPE as A}from"./section-groups.js";import{hasOwnEntry as S,ownEntry as h}from"../own-entry.js";const d="Flex",I={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},B={FooterPayment:"PaymentLogosBlock"},b=o=>{const{id:e,...s}=o;return s},E=o=>typeof o=="string"?o:"",g={sm:12,md:13,lg:15},q={sm:{mark:16,words:g.sm},md:{mark:20,words:g.md}},G="md",T=1.5,N={size:13,lineHeight:T,width:280},R=14,D=40,k=o=>o==="center"||o==="right"?o:"left";function M(o){const e={},s=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(const[t,i]of s){const c=u(o[t]);c&&(e[i]=c)}return e}function X(o,e,s){const t=s(o,b(e));if(Array.isArray(e.template))return{...t,props:{...t.props,template:F(e.template,String(t.props.id))}};if(e.template!==void 0)return t;const i=x(o,t.props);return i===t.props?t:{...t,props:i}}function F(o,e,s={at:0}){return o.map(t=>{const i={...t.props,id:`${e}~t${s.at++}`};for(const c of P(t))i[c]=F(i[c],e,s);return{...t,props:i}})}function O(o,e,s){const t=o.props??{},i=s?.(o,e);if(i)return i;const c=h(I,o.type)??h(B,o.type);if(c)return[X(c,t,e)];switch(o.type){case"FooterLogo":{const r=k(t.align),n=e("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(_*((u(t.widthPct)??100)/100)),href:"/",align:r,...M(t)}),p=E(t.tagline).trim();return p?[n,e("Text",{text:p,tone:"dim",align:r,_partStyles:{text:{...N}}})]:[n]}case"FooterText":{const r=typeof t.size=="string"&&S(g,t.size)?t.size:G;return[e("Text",{text:E(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:g[r],lineHeight:T}}})]}case"FooterDivider":{const r=u(t.thickness),n=u(t.lengthPct);return[e("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{[L("mobile")]:!0}:{}})]}case"FooterGroup":{const r=Array.isArray(t.blocks)?t.blocks:[];return[e(d,{direction:t.direction==="horizontal"?"row":"column",gap:y("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"||t.align==="stretch"?t.align:"start",...m,content:r.flatMap(n=>O(n,e,s))})]}default:return[]}}function V(o,e,s,t){const i=o&&Array.isArray(o.props?.blocks)?o.props.blocks:[],c=l=>e(d,{direction:"row",wrap:!0,share:"equal",gap:D,content:l}),r=[];let n=[];for(const l of i){const a=O(l,e,t);if(l.type==="FooterDivider"){n.length&&r.push(c(n)),n=[],r.push(...a);continue}a.length<=1?n.push(...a):n.push(e(d,{direction:"column",gap:R,align:"stretch",...m,content:a}))}(n.length||!r.length)&&r.push(c(n));const p=e(d,{direction:"column",content:[e("LegalLineBlock")]}),f=w(A,s,[...r,p]);return{...f,props:{...f.props,...o?.props?.width==="full"?{fullWidth:!0}:{}}}}export{q as FOOTER_MARK_SIZES,g as FOOTER_TEXT_PX,V as boxFooterFromFooter,O as pageBlocksFromFooterBlock};
@@ -1,8 +1,12 @@
1
+ import type { BlockMeta } from "./blocks/block-types.js";
1
2
  type Props = Record<string, unknown>;
2
3
  export type ListNode = {
3
4
  type?: unknown;
4
5
  props?: Props;
5
6
  };
7
+ export declare function registerDeclaredSlots(metas: Readonly<Record<string, Pick<BlockMeta, "fields">>>): void;
8
+ export declare function nodeListKeys(node: ListNode): string[];
9
+ export declare function nodeListsOf<N extends ListNode = ListNode>(node: ListNode): N[][];
6
10
  export declare function mapEachNode<N>(list: readonly N[], fn: (node: N, index: number) => N): N[];
7
11
  export declare function mapNodeLists<N extends ListNode>(node: N, fn: (list: ListNode[], key: string) => ListNode[]): N;
8
12
  export declare function mapPageContent<T>(data: T, fn: (content: ListNode[]) => ListNode[]): T;
@@ -1 +1 @@
1
- import{isNodeList as p}from"efficient-easel/data";function l(n,r){let t=null;return n.forEach((e,o)=>{const c=r(e,o);c!==e&&((t??=n.slice())[o]=c)}),t??n}function a(n,r){let t=null;for(const[e,o]of Object.entries(n.props??{})){if(!p(o))continue;const c=r(o,e);c!==o&&((t??={...n.props})[e]=c)}return t?{...n,props:t}:n}function f(n,r){const t=n;if(!t||!Array.isArray(t.content))return n;const e=r(t.content);return e===t.content?n:{...t,content:e}}function m(n,r){const t=f(n,r),e=n?.zones;if(!e||typeof e!="object")return t;let o=null;for(const[c,s]of Object.entries(e)){if(!Array.isArray(s))continue;const i=r(s);i!==s&&((o??={...e})[c]=i)}return o?{...t,zones:o}:t}export{l as mapEachNode,a as mapNodeLists,f as mapPageContent,m as mapPageLists};
1
+ import{isNodeList as f,slotsOf as y,storedKeyOrder as m}from"efficient-easel/data";import{GENERAL_METAS as d}from"./blocks/general/metas.js";const l={};let O=null;function u(){return O??={components:{...d,...l}}}function h(o){const n=u().components;for(const[t,e]of Object.entries(o)){const r=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;if(r&&r.fields!==e.fields)throw new Error(`lib/document/node-lists: "${t}" already declares its slots`);l[t]=e,n[t]=e}}function a(o){const n=o.props??{},t=typeof o.type=="string"?o.type:"",e=u(),s=t!==""&&Object.prototype.hasOwnProperty.call(e.components,t)?y({type:t,props:n},e).map(c=>c.slot).filter(c=>!c.includes(".")):[],p=s.filter(c=>f(n[c])),i=m(Object.keys(n).filter(c=>!s.includes(c)&&f(n[c])));return[...p,...i]}function w(o){const n=o.props??{};return a(o).map(t=>n[t])}function A(o,n){let t=null;return o.forEach((e,r)=>{const s=n(e,r);s!==e&&((t??=o.slice())[r]=s)}),t??o}function L(o,n){let t=null;for(const e of a(o)){const r=o.props[e],s=n(r,e);s!==r&&((t??={...o.props})[e]=s)}return t?{...o,props:t}:o}function x(o,n){const t=o;if(!t||!Array.isArray(t.content))return o;const e=n(t.content);return e===t.content?o:{...t,content:e}}function g(o,n){const t=x(o,n),e=o?.zones;if(!e||typeof e!="object")return t;let r=null;for(const[s,p]of Object.entries(e)){if(!Array.isArray(p))continue;const i=n(p);i!==p&&((r??={...e})[s]=i)}return r?{...t,zones:r}:t}export{A as mapEachNode,L as mapNodeLists,x as mapPageContent,g as mapPageLists,a as nodeListKeys,w as nodeListsOf,h as registerDeclaredSlots};
@@ -1 +1 @@
1
- import{isNodeList as u}from"efficient-easel/data";function a(e,t){const n=e.props?.id,o=t.appState?.data?.content;return!Array.isArray(o)||typeof n!="string"?!0:!o.some(r=>r?.props?.id===n)}const l={not:{context:"heldByANode",is:!0}};function y(e,t){return"parent"in t?t.parent!=null:!!f(t.appState,e.props?.id)}function f(e,t){const n=e?.data?.content;if(!Array.isArray(n)||typeof t!="string")return;const o=(r,p)=>{for(const i of r){if(i?.props?.id===t)return p;for(const d of Object.values(i?.props??{}))if(u(d)){const s=o(d,i);if(s!==void 0)return s}}};return o(n,null)}export{l as NOT_HELD_BY_A_NODE,f as findParentNode,y as heldByANode,a as isNestedNode};
1
+ import{nodeListsOf as u}from"../node-lists.js";function a(n,t){const o=n.props?.id,e=t.appState?.data?.content;return!Array.isArray(e)||typeof o!="string"?!0:!e.some(r=>r?.props?.id===o)}const l={not:{context:"heldByANode",is:!0}};function y(n,t){return"parent"in t?t.parent!=null:!!p(t.appState,n.props?.id)}function p(n,t){const o=n?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const e=(r,s)=>{for(const i of r){if(i?.props?.id===t)return s;for(const f of u(i??{})){const d=e(f,i);if(d!==void 0)return d}}};return e(o,null)}export{l as NOT_HELD_BY_A_NODE,p as findParentNode,y as heldByANode,a as isNestedNode};
@@ -1 +1 @@
1
- import{isRuleSource as T,ruleChecks as G}from"./rule.js";import{readRules as _}from"./support/css-rules.js";import{stripComments as V}from"./support/css-source.js";import{applicable as q,census as J,deriveShapes as L,derefVars as Q,importsOf as B,readVars as U,resolve as D,splitDecls as O}from"./support/panel-select-cascade.js";const y="--sf-select-arrow",z=["background-image","background-size","background-repeat","background-position"],I=l=>/(^|[\s,>+~(])select(?![\w-])/.test(l);function X(l,a){return typeof a!="string"?{sheet:a,ours:!1}:{sheet:l.find(o=>o.path===a),ours:!0}}const Y=l=>l.filter(a=>/\.(tsx?|mts)$/.test(a.path)&&!T(a.path)),R=(l,a)=>l===`@/${a}`||l.endsWith(`/${a}`)||l===`./${a.split("/").pop()}`;function ne(l,a,o,n){const k=new Set;for(const S of o){const w=a.find(r=>r.path===S);if(w)for(const r of B(l,w))r.endsWith(".css")&&!R(r,n)&&!r.startsWith("@/")&&!r.startsWith(".")&&k.add(r)}return[...k].sort()}function oe(l,a,o){const{check:n,report:k}=G("panel one arrow"),{sheet:S,ours:w}=X(a,o.panelSheet),r=S?.path??(typeof o.panelSheet=="string"?o.panelSheet:o.panelSheet.path),{population:g,helperDeclared:K}=J(l,Y(a),o.selectHelper),N=g.filter(e=>e.engineDrawn),p=g.filter(e=>!e.engineDrawn);a.some(e=>e.path===o.selectHelper.file)&&n(`${o.selectHelper.file} declares the house \`select\` helper`,K,"the census has no helper to resolve (B) against"),n(`the panel draws house-drawn selects (${p.length}, at least ${o.houseDrawnFloor})`,p.length>=o.houseDrawnFloor&&(p.length>0||o.houseDrawnFloor===0),`${p.length} found: ${p.map(e=>`${e.file}:${e.line}`).join(", ")||"(none)"} — with none, this card's rows do not exist and §3 passes empty`);const b=V(S?.text??""),$=U(b);n(`${r} was read`,b.length>1e4,`${b.length} bytes`);const x=_(b),i=L(g,b),W=i.reduce((e,t)=>e+t.rows,0);n(`every house-drawn select is in exactly one shape, and no engine-drawn field is in any (${i.map(e=>e.name).join(", ")})`,W===p.length,`shapes hold ${W} row(s), the census found ${p.length} house-drawn`);const u=new Map,F=new Map,v=[],E=[];for(const e of i){const t=q(x,e,r,0,"rest"),s=q(x,e,r,0,"hover");v.push(...t.unreadable,...s.unreadable),E.push(...s.undecided);const c={appearance:D(t.applied,"appearance",$).value};for(const d of z)c[d]=D(t.applied,d,$).value;c["@from"]=D(t.applied,"background-image",$).from,u.set(e.name,c);const m={};for(const d of z)m[d]=D(s.applied,d,$).value;F.set(e.name,m)}const f=(e,t)=>e.get(t.name);n("every rule that can reach a panel select was understood",v.length===0,`could not parse: ${[...new Set(v)].slice(0,4).join(" · ")}${v.length>4?` (+${v.length-4} more)`:""} — a rule this model skips is a rule it lies about`);for(const e of i){const t=f(u,e);n(`${e.name}: the browser draws no arrow of its own (appearance: none)`,t.appearance==="none",`appearance resolves to \`${t.appearance}\` on ${e.rows} row(s) — the platform arrow is still painted, so an added image would sit beside it`)}for(const e of i){const t=f(u,e);n(`${e.name}: an arrow IS drawn`,/url\(/.test(t["background-image"]),`background-image resolves to \`${t["background-image"]}\` on ${e.rows} row(s) — a row with no arrow reads as a stylesheet that failed to load, and taking the arrow away undoes the owner's 2026-09-01 ruling`)}const M=f(u,i[0]);for(const e of["appearance",...z]){const t=i.filter(s=>f(u,s)[e]!==M[e]);n(`every shape resolves the same \`${e}\``,t.length===0,`${i[0].name} (${i[0].rows} row(s)) says \`${M[e].slice(0,44)}\`, but `+t.map(s=>`${s.name} (${s.rows} row(s)) says \`${f(u,s)[e].slice(0,44)}\``).join("; "))}const A=e=>e["background-repeat"]!=="no-repeat"||e["background-size"]==="auto";for(const e of i){const t=f(u,e);n(`${e.name}: the arrow is never tiled (66397)`,!A(t),`repeat=${t["background-repeat"]} size=${t["background-size"]} — a full-size tile repeats ~2.5x across a 248px row and draws a bar of triangles`)}for(const e of i){const t=f(F,e);n(`${e.name}: the arrow is never tiled under the pointer either (66397)`,/url\(/.test(t["background-image"])&&!A(t),`hovered image=${t["background-image"].slice(0,40)} repeat=${t["background-repeat"]} size=${t["background-size"]} — this is the dark bar with three triangles, in the state it was filed in`)}const H=E.filter(e=>O(e.decls).some(t=>t.prop==="background"||z.includes(t.prop)));if(n("no rule this model cannot judge decides a hovered arrow property",H.length===0,`${[...new Set(H.map(e=>`@media ${e.media} { ${e.selector} }`))].join(" · ")} — an unjudged media query holding one of these properties makes (e) a guess`),w){const e=x.flatMap(t=>t.selector.split(",").map(s=>s.trim()).filter(s=>I(s)).filter(()=>O(t.decls).some(s=>s.prop==="background")).map(s=>t.media?`${t.media} { ${s} }`:s));n("no rule that names the `select` element uses the `background` shorthand",e.length===0,`${e.join(" · ")} — a shorthand resets background-size/-repeat/-position/-image; set \`background-color\` instead (card 66397)`)}if(o.editorEntries!==void 0){const e=new Set;for(const c of o.editorEntries){const m=a.find(h=>h.path===c),d=m?B(l,m):[];n(`${c} loads ${r}`,d.some(h=>R(h,r)),m?"§3 resolves the panel stylesheet's cascade, and this editor does not load it":"the entry is not among the files");for(const h of d)h.endsWith(".css")&&!R(h,r)&&e.add(h)}const t=[],s=[];for(const c of e){const d=(c.startsWith("@/")?a.find(h=>h.path===c.slice(2))?.text:void 0)??o.loadedSheets?.[c]??null;if(d===null){s.push(c);continue}for(const h of _(V(d)))for(const C of h.selector.split(","))I(C)&&t.push(`${c}: ${C.trim()}`)}n(`every other stylesheet the editors load was read (${e.size})`,s.length===0,`could not resolve ${s.join(", ")} — a sheet this rule cannot open is a cascade it cannot rule out`),n("no other stylesheet the editors load has a rule naming the `select` element",t.length===0,`${t.slice(0,4).join(" · ")}${t.length>4?` (+${t.length-4} more)`:""} — §3 resolves ${r} alone, so this rule is invisible to every answer above`)}const j=Q($.get(y)??"",$);if(w){const e=x.flatMap(t=>O(t.decls)).filter(t=>t.prop===y);n(`${r} declares \`${y}\` exactly once, as an image`,e.length===1&&/^url\(/.test(j),`${e.length} declaration(s), value \`${j.slice(0,60)||"(none)"}\` — the one arrow needs one definition`)}for(const e of i){const t=f(u,e)["background-image"];n(`${e.name}: the arrow it draws is \`var(${y})\`, glyph for glyph`,j!==""&&t===j,`resolves \`${t.slice(0,60)}\` — a redrawn arrow is the SS seat's call, made once in \`${y}\`, not in a rule of its own`)}const P=p.flatMap(e=>e.classes.filter(t=>/^(appearance-|bg-(none|\[|gradient|linear|radial|conic))/.test(t)).map(t=>`${e.file}:${e.line} \`${t}\``));return n("no panel select decides its arrow with a utility class",P.length===0,`${P.join(", ")} — §3 reads only ${r}`),n(`the population came from the program, not from a number typed here (${g.length}, at least ${o.populationFloor})`,g.length>=o.populationFloor&&g.length>0,`${g.length} dropdowns found (${p.length} house-drawn, ${N.length} engine-drawn) — a census that collapses to a handful means the walk stopped reading`),k()}export{Y as censusFiles,ne as editorPackageSheets,I as namesSelectElement,oe as panelOneArrow,X as panelSheetOf};
1
+ import{isRuleSource as N,ruleChecks as G}from"./rule.js";import{readRules as _}from"./support/css-rules.js";import{stripComments as T}from"./support/css-source.js";import{applicable as V,census as J,deriveShapes as L,derefVars as Q,readVars as U,resolve as D,splitDecls as O}from"./support/panel-select-cascade.js";import{importsOf as q}from"../build/module-specifiers.js";const y="--sf-select-arrow",z=["background-image","background-size","background-repeat","background-position"],B=l=>/(^|[\s,>+~(])select(?![\w-])/.test(l);function X(l,a){return typeof a!="string"?{sheet:a,ours:!1}:{sheet:l.find(o=>o.path===a),ours:!0}}const Y=l=>l.filter(a=>/\.(tsx?|mts)$/.test(a.path)&&!N(a.path)),R=(l,a)=>l===`@/${a}`||l.endsWith(`/${a}`)||l===`./${a.split("/").pop()}`;function oe(l,a,o,n){const k=new Set;for(const S of o){const $=a.find(r=>r.path===S);if($)for(const r of q(l,$.path,$.text))r.endsWith(".css")&&!R(r,n)&&!r.startsWith("@/")&&!r.startsWith(".")&&k.add(r)}return[...k].sort()}function ae(l,a,o){const{check:n,report:k}=G("panel one arrow"),{sheet:S,ours:$}=X(a,o.panelSheet),r=S?.path??(typeof o.panelSheet=="string"?o.panelSheet:o.panelSheet.path),{population:m,helperDeclared:I}=J(l,Y(a),o.selectHelper),K=m.filter(e=>e.engineDrawn),p=m.filter(e=>!e.engineDrawn);a.some(e=>e.path===o.selectHelper.file)&&n(`${o.selectHelper.file} declares the house \`select\` helper`,I,"the census has no helper to resolve (B) against"),n(`the panel draws house-drawn selects (${p.length}, at least ${o.houseDrawnFloor})`,p.length>=o.houseDrawnFloor&&(p.length>0||o.houseDrawnFloor===0),`${p.length} found: ${p.map(e=>`${e.file}:${e.line}`).join(", ")||"(none)"} — with none, this card's rows do not exist and §3 passes empty`);const b=T(S?.text??""),w=U(b);n(`${r} was read`,b.length>1e4,`${b.length} bytes`);const x=_(b),i=L(m,b),W=i.reduce((e,t)=>e+t.rows,0);n(`every house-drawn select is in exactly one shape, and no engine-drawn field is in any (${i.map(e=>e.name).join(", ")})`,W===p.length,`shapes hold ${W} row(s), the census found ${p.length} house-drawn`);const u=new Map,F=new Map,v=[],E=[];for(const e of i){const t=V(x,e,r,0,"rest"),s=V(x,e,r,0,"hover");v.push(...t.unreadable,...s.unreadable),E.push(...s.undecided);const c={appearance:D(t.applied,"appearance",w).value};for(const d of z)c[d]=D(t.applied,d,w).value;c["@from"]=D(t.applied,"background-image",w).from,u.set(e.name,c);const g={};for(const d of z)g[d]=D(s.applied,d,w).value;F.set(e.name,g)}const f=(e,t)=>e.get(t.name);n("every rule that can reach a panel select was understood",v.length===0,`could not parse: ${[...new Set(v)].slice(0,4).join(" · ")}${v.length>4?` (+${v.length-4} more)`:""} — a rule this model skips is a rule it lies about`);for(const e of i){const t=f(u,e);n(`${e.name}: the browser draws no arrow of its own (appearance: none)`,t.appearance==="none",`appearance resolves to \`${t.appearance}\` on ${e.rows} row(s) — the platform arrow is still painted, so an added image would sit beside it`)}for(const e of i){const t=f(u,e);n(`${e.name}: an arrow IS drawn`,/url\(/.test(t["background-image"]),`background-image resolves to \`${t["background-image"]}\` on ${e.rows} row(s) — a row with no arrow reads as a stylesheet that failed to load, and taking the arrow away undoes the owner's 2026-09-01 ruling`)}const M=f(u,i[0]);for(const e of["appearance",...z]){const t=i.filter(s=>f(u,s)[e]!==M[e]);n(`every shape resolves the same \`${e}\``,t.length===0,`${i[0].name} (${i[0].rows} row(s)) says \`${M[e].slice(0,44)}\`, but `+t.map(s=>`${s.name} (${s.rows} row(s)) says \`${f(u,s)[e].slice(0,44)}\``).join("; "))}const A=e=>e["background-repeat"]!=="no-repeat"||e["background-size"]==="auto";for(const e of i){const t=f(u,e);n(`${e.name}: the arrow is never tiled (66397)`,!A(t),`repeat=${t["background-repeat"]} size=${t["background-size"]} — a full-size tile repeats ~2.5x across a 248px row and draws a bar of triangles`)}for(const e of i){const t=f(F,e);n(`${e.name}: the arrow is never tiled under the pointer either (66397)`,/url\(/.test(t["background-image"])&&!A(t),`hovered image=${t["background-image"].slice(0,40)} repeat=${t["background-repeat"]} size=${t["background-size"]} — this is the dark bar with three triangles, in the state it was filed in`)}const H=E.filter(e=>O(e.decls).some(t=>t.prop==="background"||z.includes(t.prop)));if(n("no rule this model cannot judge decides a hovered arrow property",H.length===0,`${[...new Set(H.map(e=>`@media ${e.media} { ${e.selector} }`))].join(" · ")} — an unjudged media query holding one of these properties makes (e) a guess`),$){const e=x.flatMap(t=>t.selector.split(",").map(s=>s.trim()).filter(s=>B(s)).filter(()=>O(t.decls).some(s=>s.prop==="background")).map(s=>t.media?`${t.media} { ${s} }`:s));n("no rule that names the `select` element uses the `background` shorthand",e.length===0,`${e.join(" · ")} — a shorthand resets background-size/-repeat/-position/-image; set \`background-color\` instead (card 66397)`)}if(o.editorEntries!==void 0){const e=new Set;for(const c of o.editorEntries){const g=a.find(h=>h.path===c),d=g?q(l,g.path,g.text):[];n(`${c} loads ${r}`,d.some(h=>R(h,r)),g?"§3 resolves the panel stylesheet's cascade, and this editor does not load it":"the entry is not among the files");for(const h of d)h.endsWith(".css")&&!R(h,r)&&e.add(h)}const t=[],s=[];for(const c of e){const d=(c.startsWith("@/")?a.find(h=>h.path===c.slice(2))?.text:void 0)??o.loadedSheets?.[c]??null;if(d===null){s.push(c);continue}for(const h of _(T(d)))for(const C of h.selector.split(","))B(C)&&t.push(`${c}: ${C.trim()}`)}n(`every other stylesheet the editors load was read (${e.size})`,s.length===0,`could not resolve ${s.join(", ")} — a sheet this rule cannot open is a cascade it cannot rule out`),n("no other stylesheet the editors load has a rule naming the `select` element",t.length===0,`${t.slice(0,4).join(" · ")}${t.length>4?` (+${t.length-4} more)`:""} — §3 resolves ${r} alone, so this rule is invisible to every answer above`)}const j=Q(w.get(y)??"",w);if($){const e=x.flatMap(t=>O(t.decls)).filter(t=>t.prop===y);n(`${r} declares \`${y}\` exactly once, as an image`,e.length===1&&/^url\(/.test(j),`${e.length} declaration(s), value \`${j.slice(0,60)||"(none)"}\` — the one arrow needs one definition`)}for(const e of i){const t=f(u,e)["background-image"];n(`${e.name}: the arrow it draws is \`var(${y})\`, glyph for glyph`,j!==""&&t===j,`resolves \`${t.slice(0,60)}\` — a redrawn arrow is the SS seat's call, made once in \`${y}\`, not in a rule of its own`)}const P=p.flatMap(e=>e.classes.filter(t=>/^(appearance-|bg-(none|\[|gradient|linear|radial|conic))/.test(t)).map(t=>`${e.file}:${e.line} \`${t}\``));return n("no panel select decides its arrow with a utility class",P.length===0,`${P.join(", ")} — §3 reads only ${r}`),n(`the population came from the program, not from a number typed here (${m.length}, at least ${o.populationFloor})`,m.length>=o.populationFloor&&m.length>0,`${m.length} dropdowns found (${p.length} house-drawn, ${K.length} engine-drawn) — a census that collapses to a handful means the walk stopped reading`),k()}export{Y as censusFiles,oe as editorPackageSheets,B as namesSelectElement,ae as panelOneArrow,X as panelSheetOf};
@@ -1,7 +1,7 @@
1
1
  import type * as TS from "typescript";
2
2
  import type { SourceFile } from "../rule.js";
3
3
  import type { Rule } from "./css-rules.js";
4
- export declare function importsOf(ts: typeof TS, file: SourceFile): string[];
4
+ export declare const importsOf: (ts: typeof TS, file: SourceFile) => string[];
5
5
  export type PanelSelect = {
6
6
  file: string;
7
7
  line: number;
@@ -1 +1 @@
1
- import{isScript as A,programOf as L}from"./ts-program.js";function N(e,i){const r=e.createSourceFile(i.path,i.text,e.ScriptTarget.Latest,!0),n=[],s=o=>{(e.isImportDeclaration(o)||e.isExportDeclaration(o))&&o.moduleSpecifier&&e.isStringLiteral(o.moduleSpecifier)&&n.push(o.moduleSpecifier.text),e.isCallExpression(o)&&(o.expression.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(o.expression)&&o.expression.text==="require")&&o.arguments.length>0&&e.isStringLiteral(o.arguments[0])&&n.push(o.arguments[0].text),o.forEachChild(s)};return s(r),n}function Z(e,i,r){const n=L(e,i),s=n.getTypeChecker();let o;n.getSourceFile(`/${r.file}`)?.forEachChild(a=>{if(e.isFunctionDeclaration(a)&&a.name?.text==="select"&&(o=a),e.isVariableStatement(a))for(const p of a.declarationList.declarations)e.isIdentifier(p.name)&&p.name.text==="select"&&(o=p)});const t=new Set(r.modules??[]),l=a=>{if(!e.isImportSpecifier(a))return!1;const p=a.parent.parent.parent;return(a.propertyName??a.name).text==="select"&&e.isStringLiteral(p.moduleSpecifier)&&t.has(p.moduleSpecifier.text)},u=[];for(const a of n.getSourceFiles()){if(a.isDeclarationFile)continue;const p=a.fileName.slice(1),g=c=>a.getLineAndCharacterOfPosition(c.getStart()).line+1;let S=!1;const m=c=>{e.isStringLiteral(c)&&/(^|\s)sf-[a-z0-9-]/.test(c.text)&&(S=!0),e.isImportDeclaration(c)&&e.isStringLiteral(c.moduleSpecifier)&&/^(editor-shell|efficient-easel)(\/|$)/.test(c.moduleSpecifier.text)&&(S=!0),c.forEachChild(m)};m(a);const h=c=>{if(e.isPropertyAssignment(c)&&e.isIdentifier(c.name)&&c.name.text==="type"&&e.isStringLiteral(c.initializer)&&c.initializer.text==="select"&&u.push({file:p,line:g(c),kind:'field: type "select"',engineDrawn:!0,classes:[]}),e.isCallExpression(c)&&e.isIdentifier(c.expression)){const d=s.getSymbolAtLocation(c.expression),x=d&&d.flags&e.SymbolFlags.Alias?s.getAliasedSymbol(d):d;[...d?.declarations??[],...x?.declarations??[]].some(f=>o!==void 0&&f===o||l(f))&&u.push({file:p,line:g(c),kind:"field: select() helper",engineDrawn:!0,classes:[]})}if(e.isJsxOpeningLikeElement(c)&&c.tagName.getText()==="select"&&S&&p!==r.file){const d=c.attributes.properties.find(b=>e.isJsxAttribute(b)&&e.isIdentifier(b.name)&&b.name.text==="className"),x=d&&d.initializer&&e.isStringLiteral(d.initializer)?d.initializer.text:"";u.push({file:p,line:g(c),kind:"element: <select> in panel markup",engineDrawn:!1,classes:x.split(/\s+/).filter(Boolean)})}c.forEachChild(h)};h(a)}return{population:u,helperDeclared:o!==void 0}}const w=(e,i)=>e[0]-i[0]||e[1]-i[1]||e[2]-i[2],M=e=>`(${e[0]},${e[1]},${e[2]})`;function v(e){const i=[];let r=0,n=null,s="";const o=()=>{const t=s.indexOf(":");t>0&&i.push({prop:s.slice(0,t).trim(),value:s.slice(t+1).trim()}),s=""};for(const t of e){if(n){s+=t,t===n&&(n=null);continue}if(t==='"'||t==="'")n=t;else if(t==="(")r+=1;else if(t===")")r=Math.max(0,r-1);else if(t===";"&&r===0){o();continue}s+=t}return o(),i}function I(e){const i=[];let r=0,n="";for(const s of e){if(s==="("&&(r+=1),s===")"&&(r-=1),r===0&&/[\s>+~]/.test(s)){n.trim()&&i.push(n.trim()),n="";continue}n+=s}return n.trim()&&i.push(n.trim()),i}function C(e){let i=e.trim();const r=[],n=[];let s=null;const o=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(i);for(o&&(s=o[0],i=i.slice(o[0].length));i.length;){let t;if(t=/^\.([A-Za-z0-9_-]+)/.exec(i))r.push(t[1]);else if(t=/^:(focus-visible|focus-within|hover|focus|active|checked|disabled)\b/.exec(i))n.push(t[1]);else if(t=/^:dir\([^)]*\)/.exec(i))n.push("dir");else if(t=/^:not\(\[([A-Za-z-]+)\]\)/.exec(i))r.push(`@not-${t[1]}`);else if(t=/^\[([A-Za-z-]+)(?:[~^$*|]?=[^\]]*)?\]/.exec(i))n.push(`[${t[1]}]`);else if(t=/^:has\(([^)]*)\)/.exec(i)){if(!/^\s*>?\s*[a-z]+\s*$/.test(t[1]))return null;r.push("@has-type")}else return null;i=i.slice(t[0].length)}return{type:s,classes:r,needsState:n}}const D=e=>e.reduce((i,r)=>[i[0],i[1]+r.classes.filter(n=>n!=="@has-type").length+r.needsState.length,i[2]+(r.type?1:0)+(r.classes.includes("@has-type")?1:0)],[0,0,0]);function E(e){if(e===null)return!0;let i=!0;for(const r of e.replace(/^@media\s*/i,"").split(/\s+and\s+/i)){const n=r.trim().replace(/^\(|\)$/g,"").trim(),s=/^([a-z-]+)\s*:\s*(.+)$/.exec(n);if(!s)return null;const o=s[1],t=s[2].trim();if(o==="hover"||o==="any-hover"){if(t==="hover")continue;return t==="none"?!1:null}if(o==="pointer"||o==="any-pointer"){if(t==="fine")continue;return t==="coarse"||t==="none"?!1:null}i=null}return i}const T=e=>e??"(no media query)";function W(e,i,r,n,s="rest"){const o=[],t=[],l=[],u=s==="hover"?new Set(["hover"]):new Set;return e.forEach((a,p)=>{const g=s==="rest"?a.media===null:E(a.media);for(const S of a.selector.split(",")){const m=S.trim();if(!m||!/(^|[\s,>+~])select\b/.test(m)&&!i.own.some(f=>m.includes(`.${f}`)))continue;const h=I(m).map(C),c=h[h.length-1];if(h.some(f=>f===null)||!c){t.push(`${r}: ${m}`);continue}const d=h;if(c.type&&c.type!=="select")continue;const x=c.classes.filter(f=>!f.startsWith("@"));if(!(!x.every(f=>i.own.includes(f))||!c.type&&x.length===0||!c.needsState.every(f=>u.has(f))||!d.slice(0,-1).every(f=>(!f.type||f.type==="div")&&f.classes.filter(y=>!y.startsWith("@")).every(y=>i.ancestors.includes(y))&&f.needsState.every(y=>u.has(y))))&&g!==!1){if(g===null){l.push({sheet:r,selector:m,media:a.media??"",decls:a.decls});continue}o.push({spec:D(d),order:n+p,decls:a.decls,selector:m,sheet:r})}}}),{applied:o,unreadable:t,undecided:l}}const k={appearance:"auto","background-image":"none","background-size":"auto","background-repeat":"repeat","background-position":"0% 0%","background-color":"transparent","border-color":"currentcolor"};function $(e){const i=e.replace(/url\([\s\S]*?\)/g," "),r=/var\(--[A-Za-z0-9-]+(?:\s*,[^()]*)?\)|#[0-9a-fA-F]{3,8}\b|(?:rgba?|hsla?|color-mix|color)\([^()]*(?:\([^()]*\)[^()]*)*\)|\b(?:transparent|currentcolor|white|black)\b/i.exec(i);return r?r[0]:null}function j(e){const i=new Map;for(const r of v(e.replace(/[^{}]*\{|\}/g,";")))r.prop.startsWith("--")&&i.set(r.prop,r.value);return i}function z(e,i,r=0){if(r>8)return e;let n=!1;const s=e.replace(/var\(\s*(--[A-Za-z0-9-]+)\s*(?:,([^()]*(?:\([^()]*\)[^()]*)*))?\)/g,(o,t)=>{const l=i.get(t);return l===void 0?o:(n=!0,l)});return n?z(s,i,r+1):s}function q(e,i,r=new Map){let n=null;const s=(t,l)=>{(!n||w(t.spec,n.spec)>0||w(t.spec,n.spec)===0&&t.order>=n.order)&&(n={value:l.trim(),from:`${t.sheet} { ${t.selector} }`,spec:t.spec,order:t.order})};for(const t of e)for(const l of v(t.decls)){if(l.prop===i||i==="appearance"&&l.prop==="-webkit-appearance"){s(t,l.value);continue}if(l.prop==="border"&&i==="border-color"){s(t,$(l.value)??k[i]);continue}if(l.prop!=="background"||!i.startsWith("background-"))continue;const u=l.value;s(t,i==="background-image"?/url\([\s\S]*?\)|linear-gradient\([\s\S]*?\)|image-set\([\s\S]*?\)/.exec(u)?.[0]??"none":i==="background-repeat"?/\b(no-repeat|repeat-x|repeat-y|round|space|repeat)\b/.exec(u)?.[0]??"repeat":i==="background-color"?$(u)??k[i]:k[i])}const o=n??{value:k[i],from:"(nothing declares one)"};return{value:z(o.value,r),from:o.from}}const O=["sf-editor","sf-body","sf-panel","sf-insp-body","sf-styles","sf-field","es-field","sf-copybox"];function J(e,i){const r=e.filter(t=>!t.engineDrawn),n=t=>new RegExp(`\\.${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(i),s=t=>[...t.classes].filter(n).sort().join(" "),o=new Set([""]);for(const t of r)o.add(s(t));return[...o].sort().map(t=>({name:t?`house .${t.split(" ").join(".")}`:"house (bare)",own:t?t.split(" "):[],ancestors:[...O],rows:r.filter(l=>s(l)===t).length}))}function K(e,i,r){const n=new Map;for(const s of r)n.set(s,[]);for(const s of i){if(!A(s.path))continue;const o=e.createSourceFile(s.path,s.text,e.ScriptTarget.Latest,!0),t=l=>{if(e.isJsxAttribute(l)&&e.isIdentifier(l.name)&&l.name.text==="className"&&l.initializer&&e.isStringLiteral(l.initializer)){const u=l.initializer.text.split(/\s+/).filter(Boolean);for(const a of r)u.includes(a)&&n.get(a)?.push(s.path)}l.forEachChild(t)};t(o)}return n}export{O as ANCESTORS,k as INITIAL,W as applicable,Z as census,K as chainInMarkup,$ as colorIn,C as compound,z as derefVars,J as deriveShapes,N as importsOf,E as mediaHolds,T as mediaLabel,j as readVars,q as resolve,w as specCmp,D as specOf,M as specStr,I as splitCombinators,v as splitDecls};
1
+ import{isScript as A,programOf as L}from"./ts-program.js";import{importsOf as C}from"../../build/module-specifiers.js";const M=(i,t)=>C(i,t.path,t.text);function T(i,t,n){const s=L(i,t),r=s.getTypeChecker();let c;s.getSourceFile(`/${n.file}`)?.forEachChild(a=>{if(i.isFunctionDeclaration(a)&&a.name?.text==="select"&&(c=a),i.isVariableStatement(a))for(const p of a.declarationList.declarations)i.isIdentifier(p.name)&&p.name.text==="select"&&(c=p)});const e=new Set(n.modules??[]),l=a=>{if(!i.isImportSpecifier(a))return!1;const p=a.parent.parent.parent;return(a.propertyName??a.name).text==="select"&&i.isStringLiteral(p.moduleSpecifier)&&e.has(p.moduleSpecifier.text)},u=[];for(const a of s.getSourceFiles()){if(a.isDeclarationFile)continue;const p=a.fileName.slice(1),g=o=>a.getLineAndCharacterOfPosition(o.getStart()).line+1;let b=!1;const m=o=>{i.isStringLiteral(o)&&/(^|\s)sf-[a-z0-9-]/.test(o.text)&&(b=!0),i.isImportDeclaration(o)&&i.isStringLiteral(o.moduleSpecifier)&&/^(editor-shell|efficient-easel)(\/|$)/.test(o.moduleSpecifier.text)&&(b=!0),o.forEachChild(m)};m(a);const h=o=>{if(i.isPropertyAssignment(o)&&i.isIdentifier(o.name)&&o.name.text==="type"&&i.isStringLiteral(o.initializer)&&o.initializer.text==="select"&&u.push({file:p,line:g(o),kind:'field: type "select"',engineDrawn:!0,classes:[]}),i.isCallExpression(o)&&i.isIdentifier(o.expression)){const d=r.getSymbolAtLocation(o.expression),x=d&&d.flags&i.SymbolFlags.Alias?r.getAliasedSymbol(d):d;[...d?.declarations??[],...x?.declarations??[]].some(f=>c!==void 0&&f===c||l(f))&&u.push({file:p,line:g(o),kind:"field: select() helper",engineDrawn:!0,classes:[]})}if(i.isJsxOpeningLikeElement(o)&&o.tagName.getText()==="select"&&b&&p!==n.file){const d=o.attributes.properties.find(S=>i.isJsxAttribute(S)&&i.isIdentifier(S.name)&&S.name.text==="className"),x=d&&d.initializer&&i.isStringLiteral(d.initializer)?d.initializer.text:"";u.push({file:p,line:g(o),kind:"element: <select> in panel markup",engineDrawn:!1,classes:x.split(/\s+/).filter(Boolean)})}o.forEachChild(h)};h(a)}return{population:u,helperDeclared:c!==void 0}}const k=(i,t)=>i[0]-t[0]||i[1]-t[1]||i[2]-t[2],W=i=>`(${i[0]},${i[1]},${i[2]})`;function w(i){const t=[];let n=0,s=null,r="";const c=()=>{const e=r.indexOf(":");e>0&&t.push({prop:r.slice(0,e).trim(),value:r.slice(e+1).trim()}),r=""};for(const e of i){if(s){r+=e,e===s&&(s=null);continue}if(e==='"'||e==="'")s=e;else if(e==="(")n+=1;else if(e===")")n=Math.max(0,n-1);else if(e===";"&&n===0){c();continue}r+=e}return c(),t}function I(i){const t=[];let n=0,s="";for(const r of i){if(r==="("&&(n+=1),r===")"&&(n-=1),n===0&&/[\s>+~]/.test(r)){s.trim()&&t.push(s.trim()),s="";continue}s+=r}return s.trim()&&t.push(s.trim()),t}function O(i){let t=i.trim();const n=[],s=[];let r=null;const c=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(t);for(c&&(r=c[0],t=t.slice(c[0].length));t.length;){let e;if(e=/^\.([A-Za-z0-9_-]+)/.exec(t))n.push(e[1]);else if(e=/^:(focus-visible|focus-within|hover|focus|active|checked|disabled)\b/.exec(t))s.push(e[1]);else if(e=/^:dir\([^)]*\)/.exec(t))s.push("dir");else if(e=/^:not\(\[([A-Za-z-]+)\]\)/.exec(t))n.push(`@not-${e[1]}`);else if(e=/^\[([A-Za-z-]+)(?:[~^$*|]?=[^\]]*)?\]/.exec(t))s.push(`[${e[1]}]`);else if(e=/^:has\(([^)]*)\)/.exec(t)){if(!/^\s*>?\s*[a-z]+\s*$/.test(e[1]))return null;n.push("@has-type")}else return null;t=t.slice(e[0].length)}return{type:r,classes:n,needsState:s}}const D=i=>i.reduce((t,n)=>[t[0],t[1]+n.classes.filter(s=>s!=="@has-type").length+n.needsState.length,t[2]+(n.type?1:0)+(n.classes.includes("@has-type")?1:0)],[0,0,0]);function E(i){if(i===null)return!0;let t=!0;for(const n of i.replace(/^@media\s*/i,"").split(/\s+and\s+/i)){const s=n.trim().replace(/^\(|\)$/g,"").trim(),r=/^([a-z-]+)\s*:\s*(.+)$/.exec(s);if(!r)return null;const c=r[1],e=r[2].trim();if(c==="hover"||c==="any-hover"){if(e==="hover")continue;return e==="none"?!1:null}if(c==="pointer"||c==="any-pointer"){if(e==="fine")continue;return e==="coarse"||e==="none"?!1:null}t=null}return t}const j=i=>i??"(no media query)";function J(i,t,n,s,r="rest"){const c=[],e=[],l=[],u=r==="hover"?new Set(["hover"]):new Set;return i.forEach((a,p)=>{const g=r==="rest"?a.media===null:E(a.media);for(const b of a.selector.split(",")){const m=b.trim();if(!m||!/(^|[\s,>+~])select\b/.test(m)&&!t.own.some(f=>m.includes(`.${f}`)))continue;const h=I(m).map(O),o=h[h.length-1];if(h.some(f=>f===null)||!o){e.push(`${n}: ${m}`);continue}const d=h;if(o.type&&o.type!=="select")continue;const x=o.classes.filter(f=>!f.startsWith("@"));if(!(!x.every(f=>t.own.includes(f))||!o.type&&x.length===0||!o.needsState.every(f=>u.has(f))||!d.slice(0,-1).every(f=>(!f.type||f.type==="div")&&f.classes.filter(y=>!y.startsWith("@")).every(y=>t.ancestors.includes(y))&&f.needsState.every(y=>u.has(y))))&&g!==!1){if(g===null){l.push({sheet:n,selector:m,media:a.media??"",decls:a.decls});continue}c.push({spec:D(d),order:s+p,decls:a.decls,selector:m,sheet:n})}}}),{applied:c,unreadable:e,undecided:l}}const v={appearance:"auto","background-image":"none","background-size":"auto","background-repeat":"repeat","background-position":"0% 0%","background-color":"transparent","border-color":"currentcolor"};function $(i){const t=i.replace(/url\([\s\S]*?\)/g," "),n=/var\(--[A-Za-z0-9-]+(?:\s*,[^()]*)?\)|#[0-9a-fA-F]{3,8}\b|(?:rgba?|hsla?|color-mix|color)\([^()]*(?:\([^()]*\)[^()]*)*\)|\b(?:transparent|currentcolor|white|black)\b/i.exec(t);return n?n[0]:null}function P(i){const t=new Map;for(const n of w(i.replace(/[^{}]*\{|\}/g,";")))n.prop.startsWith("--")&&t.set(n.prop,n.value);return t}function z(i,t,n=0){if(n>8)return i;let s=!1;const r=i.replace(/var\(\s*(--[A-Za-z0-9-]+)\s*(?:,([^()]*(?:\([^()]*\)[^()]*)*))?\)/g,(c,e)=>{const l=t.get(e);return l===void 0?c:(s=!0,l)});return s?z(r,t,n+1):r}function V(i,t,n=new Map){let s=null;const r=(e,l)=>{(!s||k(e.spec,s.spec)>0||k(e.spec,s.spec)===0&&e.order>=s.order)&&(s={value:l.trim(),from:`${e.sheet} { ${e.selector} }`,spec:e.spec,order:e.order})};for(const e of i)for(const l of w(e.decls)){if(l.prop===t||t==="appearance"&&l.prop==="-webkit-appearance"){r(e,l.value);continue}if(l.prop==="border"&&t==="border-color"){r(e,$(l.value)??v[t]);continue}if(l.prop!=="background"||!t.startsWith("background-"))continue;const u=l.value;r(e,t==="background-image"?/url\([\s\S]*?\)|linear-gradient\([\s\S]*?\)|image-set\([\s\S]*?\)/.exec(u)?.[0]??"none":t==="background-repeat"?/\b(no-repeat|repeat-x|repeat-y|round|space|repeat)\b/.exec(u)?.[0]??"repeat":t==="background-color"?$(u)??v[t]:v[t])}const c=s??{value:v[t],from:"(nothing declares one)"};return{value:z(c.value,n),from:c.from}}const F=["sf-editor","sf-body","sf-panel","sf-insp-body","sf-styles","sf-field","es-field","sf-copybox"];function q(i,t){const n=i.filter(e=>!e.engineDrawn),s=e=>new RegExp(`\\.${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(t),r=e=>[...e.classes].filter(s).sort().join(" "),c=new Set([""]);for(const e of n)c.add(r(e));return[...c].sort().map(e=>({name:e?`house .${e.split(" ").join(".")}`:"house (bare)",own:e?e.split(" "):[],ancestors:[...F],rows:n.filter(l=>r(l)===e).length}))}function B(i,t,n){const s=new Map;for(const r of n)s.set(r,[]);for(const r of t){if(!A(r.path))continue;const c=i.createSourceFile(r.path,r.text,i.ScriptTarget.Latest,!0),e=l=>{if(i.isJsxAttribute(l)&&i.isIdentifier(l.name)&&l.name.text==="className"&&l.initializer&&i.isStringLiteral(l.initializer)){const u=l.initializer.text.split(/\s+/).filter(Boolean);for(const a of n)u.includes(a)&&s.get(a)?.push(r.path)}l.forEachChild(e)};e(c)}return s}export{F as ANCESTORS,v as INITIAL,J as applicable,T as census,B as chainInMarkup,$ as colorIn,O as compound,z as derefVars,q as deriveShapes,M as importsOf,E as mediaHolds,j as mediaLabel,P as readVars,V as resolve,k as specCmp,D as specOf,W as specStr,I as splitCombinators,w as splitDecls};
@@ -1 +1 @@
1
- import{readHidable as g}from"efficient-easel/draw";import{isNodeList as _}from"efficient-easel/data";import{mapEachNode as b,mapNodeLists as y}from"../../../format/lib/document/node-lists.js";import{anchorSlug as M}from"../../../format/lib/content/anchor-name.js";import{namedRowField as I}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{resolveContainerDirection as S}from"../../../format/lib/content/container-direction.js";import{listNumberIn as B,readListNumberForm as F}from"../../../format/lib/content/list-number.js";import{nodeHiddenEverywhere as a}from"../../../format/lib/content/view-hide-class.js";import{stripMarkup as K}from"../../../format/lib/markup.js";const l="Contents",d="Flex",x="Text",L="numberForm",v="_contentsEntries",U="_kickerNumber",tt="data-sf-kicker-number",D=t=>g(t).text.trim(),N=t=>M(t?.anchor),k=t=>String(t.props?.id??""),H=t=>!g(t.props?.text).hidden&&!P(t.props)&&!I(t.props);function u(t){return Object.values(t.props??{}).filter(_)}function R(t){for(const o of u(t))for(const n of o){if(a(n.props??{}))continue;if(n.type===x&&H(n))return n;if(n.type===x)continue;const s=R(n);if(s)return s}}function T(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||T(n))))}const h=t=>t.type===d&&S(d,t.props?.direction)==="row";function C(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||!h(n)&&C(n))))}function W(t){const o=[],n=(s,r)=>{for(const e of s){if(!e||a(e.props??{}))continue;if(e.type===l){r.open={contents:e,sections:r.waiting??[]},r.waiting=null,o.push(r.open);continue}if(h(e)&&C(e)){const c={inRow:!0,open:null,waiting:[]};for(const p of u(e))n(p,c);r.inRow||(r.open=null);continue}const i=r.open?.sections??r.waiting;if(e.type===d&&N(e.props)&&i&&!T(e)){i.push({box:e,kicker:R(e)});continue}for(const c of u(e))n(c,r)}};return n(t,{inRow:!1,open:null,waiting:null}),o}function X(t){return t.map(o=>({label:o.kicker?K(D(o.kicker.props?.text)):"",anchor:N(o.box.props)}))}function Y(t){const o=t?.length?W(t):[];if(!o.length)return null;const n=new Map,s=new Map;for(const r of o){const e=k(r.contents);e&&n.set(e,X(r.sections));const i=F(r.contents.props?.[L]);r.sections.forEach((c,p)=>{const f=c.kicker?k(c.kicker):"";f&&s.set(f,B(i,p))})}return{entries:n,numbers:s}}const nt=t=>t.endsWith(".")?`${t} `:`${t} · `;function ot(t){const o=t;if(!o?.content?.length)return t;const n=Y(o.content);if(!n)return t;const{entries:s,numbers:r}=n,e=i=>{const c=y(i,O=>b(O,e));let p=c.props??{},f=c!==i;const m=k(i),w=m?s.get(m):void 0;w&&(p={...p,[v]:w},f=!0);const E=m?r.get(m):void 0;return E&&(p={...p,[U]:E},f=!0),f?{...i,props:p}:i};return{...o,content:o.content.map(e)}}export{v as CONTENTS_ENTRIES_PROP,L as CONTENTS_NUMBER_FORM_KEY,tt as KICKER_NUMBER_ATTR,U as KICKER_NUMBER_PROP,nt as kickerLead,Y as pageContentsDrawing,ot as withPageContents};
1
+ import{readHidable as g}from"efficient-easel/draw";import{mapEachNode as _,mapNodeLists as b,nodeListsOf as y}from"../../../format/lib/document/node-lists.js";import{anchorSlug as M}from"../../../format/lib/content/anchor-name.js";import{namedRowField as I}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{resolveContainerDirection as S}from"../../../format/lib/content/container-direction.js";import{listNumberIn as B,readListNumberForm as F}from"../../../format/lib/content/list-number.js";import{nodeHiddenEverywhere as a}from"../../../format/lib/content/view-hide-class.js";import{stripMarkup as K}from"../../../format/lib/markup.js";const l="Contents",d="Flex",x="Text",L="numberForm",v="_contentsEntries",U="_kickerNumber",Z="data-sf-kicker-number",D=t=>g(t).text.trim(),N=t=>M(t?.anchor),k=t=>String(t.props?.id??""),H=t=>!g(t.props?.text).hidden&&!P(t.props)&&!I(t.props),u=t=>y(t);function R(t){for(const o of u(t))for(const n of o){if(a(n.props??{}))continue;if(n.type===x&&H(n))return n;if(n.type===x)continue;const i=R(n);if(i)return i}}function T(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||T(n))))}const h=t=>t.type===d&&S(d,t.props?.direction)==="row";function C(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||!h(n)&&C(n))))}function W(t){const o=[],n=(i,r)=>{for(const e of i){if(!e||a(e.props??{}))continue;if(e.type===l){r.open={contents:e,sections:r.waiting??[]},r.waiting=null,o.push(r.open);continue}if(h(e)&&C(e)){const c={inRow:!0,open:null,waiting:[]};for(const p of u(e))n(p,c);r.inRow||(r.open=null);continue}const s=r.open?.sections??r.waiting;if(e.type===d&&N(e.props)&&s&&!T(e)){s.push({box:e,kicker:R(e)});continue}for(const c of u(e))n(c,r)}};return n(t,{inRow:!1,open:null,waiting:null}),o}function X(t){return t.map(o=>({label:o.kicker?K(D(o.kicker.props?.text)):"",anchor:N(o.box.props)}))}function Y(t){const o=t?.length?W(t):[];if(!o.length)return null;const n=new Map,i=new Map;for(const r of o){const e=k(r.contents);e&&n.set(e,X(r.sections));const s=F(r.contents.props?.[L]);r.sections.forEach((c,p)=>{const f=c.kicker?k(c.kicker):"";f&&i.set(f,B(s,p))})}return{entries:n,numbers:i}}const tt=t=>t.endsWith(".")?`${t} `:`${t} · `;function nt(t){const o=t;if(!o?.content?.length)return t;const n=Y(o.content);if(!n)return t;const{entries:i,numbers:r}=n,e=s=>{const c=b(s,O=>_(O,e));let p=c.props??{},f=c!==s;const m=k(s),w=m?i.get(m):void 0;w&&(p={...p,[v]:w},f=!0);const E=m?r.get(m):void 0;return E&&(p={...p,[U]:E},f=!0),f?{...s,props:p}:s};return{...o,content:o.content.map(e)}}export{v as CONTENTS_ENTRIES_PROP,L as CONTENTS_NUMBER_FORM_KEY,Z as KICKER_NUMBER_ATTR,U as KICKER_NUMBER_PROP,tt as kickerLead,Y as pageContentsDrawing,nt as withPageContents};
@@ -1 +1 @@
1
- import{isNode as w,isNodeList as y}from"efficient-easel/data";import{hidableText as S,readHidable as _}from"efficient-easel/draw";import{blockSizeValuesOf as h}from"../content/block-size.js";import{nodeHiddenEverywhere as R,nodeViewHideClass as b}from"../../../format/lib/content/view-hide-class.js";import{CARD_ROW_FIELD_PROP as x,isCardTemplateSlot as g,namedRowField as C,ROW_BOUND_PROPS as E}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as P}from"../../../format/lib/content/box-show-for-choices.js";import{ownEntry as p}from"../../../format/lib/own-entry.js";const O="slotCounts",d=t=>!_(t).hidden&&S(t).trim()!=="",F=t=>typeof t=="string"&&t.trim()!=="",N={Flex:()=>!0,PostCard:()=>!0,ImageBlock:t=>F(t.src),Text:t=>d(t.text),Heading:t=>d(t.text),Eyebrow:t=>d(t.eyebrow)},W=["widthFit","width","minWidth"],u=t=>y(t);function A(t){if(Array.isArray(t.content))return u(t.content)?t.content:null;const e=Object.values(t).filter(u);return e.length===1?e[0]:null}function I(t,e){return[...new Set([x,...Object.values(p(E,t)??{})])].some(o=>C(e,o)!=="")}function D(t){const e=t.props??{},n=p(N,t.type);if(!n||!n(e)||I(t.type,e)||b(e))return!1;const o=e[P];if(o!=null&&o!=="")return!1;const r=h(e);return!W.some(s=>r[s]!==void 0)}function H(t){let e=0;for(const n of t)if(!R(n.props??{})){if(!D(n))return;e+=1}return e>0?e:void 0}function j(t){const e={},n=new Set,o=new Set,r=(s,a)=>{if(Array.isArray(s))for(const i of s){if(!w(i))continue;const f=i.props.id;typeof f=="string"&&(n.has(f)?o:n).add(f);const l=a?null:A(i.props);if(typeof f=="string"&&l){const c=H(l);c!==void 0&&(e[f]=c)}for(const[c,m]of Object.entries(i.props))u(m)&&r(m,a||g(i.type,c))}};r(t,!1);for(const s of o)delete e[s];return e}function K(t,e){return{...t??{},[O]:j(e)}}function V(t){const n=t.editor?.metadata?.[O],o=t.id,r=typeof o=="string"&&n&&typeof n=="object"?n[o]:void 0;return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}export{N as DRAWS_FOR_SURE,O as SLOT_COUNTS_KEY,V as slotCountOf,j as slotCountsOf,K as withSlotCounts};
1
+ import{isNode as w,isNodeList as y}from"efficient-easel/data";import{nodeListKeys as O}from"../../../format/lib/document/node-lists.js";import{hidableText as S,readHidable as _}from"efficient-easel/draw";import{blockSizeValuesOf as h}from"../content/block-size.js";import{nodeHiddenEverywhere as R,nodeViewHideClass as b}from"../../../format/lib/content/view-hide-class.js";import{CARD_ROW_FIELD_PROP as x,isCardTemplateSlot as g,namedRowField as C,ROW_BOUND_PROPS as E}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as P}from"../../../format/lib/content/box-show-for-choices.js";import{ownEntry as l}from"../../../format/lib/own-entry.js";const m="slotCounts",c=t=>!_(t).hidden&&S(t).trim()!=="",F=t=>typeof t=="string"&&t.trim()!=="",N={Flex:()=>!0,PostCard:()=>!0,ImageBlock:t=>F(t.src),Text:t=>c(t.text),Heading:t=>c(t.text),Eyebrow:t=>c(t.eyebrow)},W=["widthFit","width","minWidth"],p=t=>y(t);function A(t){if(Array.isArray(t.content))return p(t.content)?t.content:null;const e=Object.values(t).filter(p);return e.length===1?e[0]:null}function I(t,e){return[...new Set([x,...Object.values(l(E,t)??{})])].some(o=>C(e,o)!=="")}function D(t){const e=t.props??{},n=l(N,t.type);if(!n||!n(e)||I(t.type,e)||b(e))return!1;const o=e[P];if(o!=null&&o!=="")return!1;const r=h(e);return!W.some(s=>r[s]!==void 0)}function H(t){let e=0;for(const n of t)if(!R(n.props??{})){if(!D(n))return;e+=1}return e>0?e:void 0}function L(t){const e={},n=new Set,o=new Set,r=(s,u)=>{if(Array.isArray(s))for(const i of s){if(!w(i))continue;const f=i.props.id;typeof f=="string"&&(n.has(f)?o:n).add(f);const a=u?null:A(i.props);if(typeof f=="string"&&a){const d=H(a);d!==void 0&&(e[f]=d)}for(const d of O(i))r(i.props[d],u||g(i.type,d))}};r(t,!1);for(const s of o)delete e[s];return e}function V(t,e){return{...t??{},[m]:L(e)}}function Y(t){const n=t.editor?.metadata?.[m],o=t.id,r=typeof o=="string"&&n&&typeof n=="object"?n[o]:void 0;return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}export{N as DRAWS_FOR_SURE,m as SLOT_COUNTS_KEY,Y as slotCountOf,L as slotCountsOf,V as withSlotCounts};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "69.5.0",
3
+ "version": "70.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",
@@ -54,8 +54,8 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@tabler/icons-react": "^3.46.0",
57
- "efficient-easel": "^34.3.0",
58
- "efficient-shell": "^13.3.0",
57
+ "efficient-easel": "^35.0.0",
58
+ "efficient-shell": "^13.17.0",
59
59
  "isomorphic-dompurify": "^3.18.0",
60
60
  "next": ">=16",
61
61
  "react": ">=19",
@@ -73,8 +73,8 @@
73
73
  "@types/node": "^20",
74
74
  "@types/react": "^19",
75
75
  "@types/react-dom": "^19",
76
- "efficient-easel": "^34.3.2",
77
- "efficient-shell": "^13.3.0",
76
+ "efficient-easel": "^35.0.0",
77
+ "efficient-shell": "^13.17.0",
78
78
  "efficient-shell-checker": "npm:efficient-shell@12.37.0",
79
79
  "esbuild": "^0.28.0",
80
80
  "happy-dom": "^20.14.5",
@@ -1,15 +0,0 @@
1
- export interface BandRow {
2
- shown: boolean;
3
- labelled: boolean;
4
- }
5
- export interface DrawnBand {
6
- key: string;
7
- rows: readonly BandRow[];
8
- }
9
- export declare const TEXT_BAND_KEY = " text";
10
- export declare const TEXT_BAND_TITLE = "Text";
11
- export declare function bandIsDropped(band: DrawnBand): boolean;
12
- export declare function droppedBands(bands: readonly DrawnBand[]): string[];
13
- export declare function loneDesignBand(bands: readonly DrawnBand[], loose: readonly BandRow[]): string | null;
14
- export declare function withoutBands<T extends Record<string, unknown>>(fields: T, keys: ReadonlySet<string>): T;
15
- export declare function sameKeys(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean;
@@ -1 +0,0 @@
1
- const s=" text",f="Text";function l(e){const t=e.rows.filter(o=>o.shown);return t.length===0||t.length===1&&t[0].labelled}function u(e){return e.filter(l).map(t=>t.key)}function i(e,t){const o=e.filter(n=>!l(n));if(o.length!==1)return null;const r=e.filter(l).flatMap(n=>n.rows);return[...t,...r].some(n=>n.shown)?null:o[0].rows.filter(n=>n.shown).length>1?o[0].key:null}function p(e,t){let o=null;for(const r of t){const n=e[r];!n||n.marker!==!0||typeof n.fold!="string"||(o??={...e},o[r]={...n,fold:!1})}return o??e}function c(e,t){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}export{s as TEXT_BAND_KEY,f as TEXT_BAND_TITLE,l as bandIsDropped,u as droppedBands,i as loneDesignBand,c as sameKeys,p as withoutBands};