efficient-web-builder 67.2.0 → 67.3.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 (64) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/editor/components/useSectionToBoxPass.d.ts +4 -0
  3. package/dist/editor/components/useSectionToBoxPass.js +1 -1
  4. package/dist/editor/lib/document/add-palette.js +1 -1
  5. package/dist/editor/lib/document/add-target.js +1 -1
  6. package/dist/editor/lib/document/block-offer.js +1 -1
  7. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  8. package/dist/editor/lib/document/controls.js +1 -1
  9. package/dist/editor/lib/document/field-groups.js +1 -1
  10. package/dist/editor/lib/document/heading-outline.js +1 -1
  11. package/dist/editor/lib/document/slot-new-children.js +1 -1
  12. package/dist/editor/lib/host-document-bridge.js +1 -1
  13. package/dist/editor/lib/sections/city-presets.js +1 -1
  14. package/dist/editor/lib/sections/new-section-node.js +1 -1
  15. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  16. package/dist/editor/lib/sections/text-layouts.js +1 -1
  17. package/dist/format/lib/content/box-layout.js +1 -1
  18. package/dist/format/lib/content/mirror-cards.js +1 -1
  19. package/dist/format/lib/content/section-width.js +1 -1
  20. package/dist/format/lib/document/box-footer.js +1 -1
  21. package/dist/format/lib/document/container-blocks.js +1 -1
  22. package/dist/format/lib/document/media-drop.js +1 -1
  23. package/dist/format/lib/document/part-inks.js +1 -1
  24. package/dist/format/lib/document/part-records.js +1 -1
  25. package/dist/format/lib/document/passes/catalogue-labels.js +1 -1
  26. package/dist/format/lib/document/passes/media-values.js +1 -1
  27. package/dist/format/lib/document/row-hand.js +1 -1
  28. package/dist/format/lib/document/section-catalog.js +3 -3
  29. package/dist/format/lib/document/source-bound-parts.js +1 -1
  30. package/dist/format/lib/document/templateFields.js +1 -1
  31. package/dist/format/lib/document/theme-slots.js +1 -1
  32. package/dist/format/lib/editor-words.js +1 -1
  33. package/dist/format/lib/logo/logo-size.d.ts +5 -0
  34. package/dist/format/lib/logo/logo-size.js +1 -1
  35. package/dist/format/lib/own-entry.d.ts +2 -0
  36. package/dist/format/lib/own-entry.js +1 -0
  37. package/dist/format/lib/preview-header-settings.d.ts +3 -0
  38. package/dist/format/lib/sections/active-press-context.js +1 -1
  39. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  40. package/dist/format/lib/sections/section-eyebrow-look.js +1 -1
  41. package/dist/format/lib/sections/section-head-placement.js +1 -1
  42. package/dist/format/lib/sections/section-presets.d.ts +2 -0
  43. package/dist/format/lib/sections/section-presets.js +1 -1
  44. package/dist/format/lib/sections/section-text-kinds.js +1 -1
  45. package/dist/format/lib/sections/section-text-regions.js +1 -1
  46. package/dist/format/lib/source-rules/editor-words.js +3 -3
  47. package/dist/format/lib/source-rules/import-time-work.js +4 -4
  48. package/dist/format/lib/source-rules/own-key-reads.d.ts +26 -0
  49. package/dist/format/lib/source-rules/own-key-reads.js +7 -0
  50. package/dist/render/components/Logo.d.ts +2 -1
  51. package/dist/render/components/Logo.js +1 -1
  52. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  53. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  54. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  55. package/dist/render/lib/document/head-core-boxes.js +1 -1
  56. package/dist/render/lib/document/migrate-legacy.js +1 -1
  57. package/dist/render/lib/document/part-styles.js +2 -2
  58. package/dist/render/lib/document/passes/section-animation.js +1 -1
  59. package/dist/render/lib/document/passes/section-padding.js +1 -1
  60. package/dist/render/lib/document/passes/section-width.js +1 -1
  61. package/dist/render/lib/document/slot-counts.js +1 -1
  62. package/dist/render/lib/document/slot-specs.js +1 -1
  63. package/dist/render/lib/sections/section-to-box.js +1 -1
  64. package/package.json +1 -1
@@ -1 +1 @@
1
- import{BOX_TYPE as e}from"../../../format/lib/document/container-blocks.js";import{cardsTemplateNodes as f}from"../../../format/lib/document/blocks/general/Cards/card-seed.js";import{ARTICLE_BODY_BLOCK as T,articleBodyTemplateNodes as p}from"../../../format/lib/document/article-body-seed.js";import{SLOT_SECTION_SPECS as h}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as a}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as m,SPLITTABLE_SECTIONS as t,canSplitHead as u}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as E}from"./text-layouts.js";import{activePressContext as C}from"../../../format/lib/sections/active-press-context.js";function A(r,{nodeDefaults:i,newNodeId:o,sectionLabel:l,blockIsOffered:s}){const S=E(r);if(S)return S(i,o,C());if(u(r)&&s(e)&&s(m))return{type:e,props:{...i(e),id:o(e),direction:"column",name:`${l(r)} section`,content:[{type:m,props:{...i(m),id:o(m),...t[r]?.headStyle?{headStyle:t[r].headStyle}:{},...t[r]?.headRowGap?{rowGap:t[r].headRowGap}:{},...t[r]?.headDescriptionSize?{descriptionSize:t[r].headDescriptionSize}:{},...a(r)!==a(m)?{eyebrowLook:a(r)}:{}}},{type:r,props:{...i(r),id:o(r),headPlacement:"own-box",...n(r,o)}}]}};if(h[r]?.fixed===!0)return{type:r,props:{...i(r),id:o(r),layout:"boxes"}};const c=n(r,o);return Object.keys(c).length?{type:r,props:{...i(r),id:o(r),...c}}:null}function n(r,i){return r==="Cards"?{template:f(o=>i(o))}:r===T?{template:p(o=>i(o))}:{}}export{A as newSectionNode};
1
+ import{BOX_TYPE as m}from"../../../format/lib/document/container-blocks.js";import{cardsTemplateNodes as f}from"../../../format/lib/document/blocks/general/Cards/card-seed.js";import{ARTICLE_BODY_BLOCK as T,articleBodyTemplateNodes as E}from"../../../format/lib/document/article-body-seed.js";import{SLOT_SECTION_SPECS as h}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as n}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as e,SPLITTABLE_SECTIONS as u,canSplitHead as C}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as _}from"./text-layouts.js";import{activePressContext as d}from"../../../format/lib/sections/active-press-context.js";import{ownEntry as S}from"../../../format/lib/own-entry.js";function Y(r,{nodeDefaults:i,newNodeId:o,sectionLabel:l,blockIsOffered:s}){const a=_(r);if(a)return a(i,o,d());if(C(r)&&s(m)&&s(e)){const t=S(u,r);return{type:m,props:{...i(m),id:o(m),direction:"column",name:`${l(r)} section`,content:[{type:e,props:{...i(e),id:o(e),...t?.headStyle?{headStyle:t.headStyle}:{},...t?.headRowGap?{rowGap:t.headRowGap}:{},...t?.headDescriptionSize?{descriptionSize:t.headDescriptionSize}:{},...n(r)!==n(e)?{eyebrowLook:n(r)}:{}}},{type:r,props:{...i(r),id:o(r),headPlacement:"own-box",...p(r,o)}}]}}}if(S(h,r)?.fixed===!0)return{type:r,props:{...i(r),id:o(r),layout:"boxes"}};const c=p(r,o);return Object.keys(c).length?{type:r,props:{...i(r),id:o(r),...c}}:null}function p(r,i){return r==="Cards"?{template:f(o=>i(o))}:r===T?{template:E(o=>i(o))}:{}}export{Y as newSectionNode};
@@ -1,3 +1,3 @@
1
- import{migrateLegacyPageData as R}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as E}from"../../../format/lib/document/renamed-props.js";import{listToWrite as C,setStyleValues as D}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as L,bandPresetIndex as j}from"../../../format/lib/theme.js";import{convertSection as F,convertSectionsInPage as I,sectionToBoxRow as N,sectionToBoxTypes as H}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as W}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as v}from"./hero-ticker-to-strip.js";function G(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function se(e){const t=n=>typeof n=="string"?n:null,i=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:i,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{},..."site_gutter_unit"in e?{siteGutterUnit:t(e.site_gutter_unit)}:{},..."site_gutter_phone_unit"in e?{siteGutterPhoneUnit:t(e.site_gutter_phone_unit)}:{}}}const U=new Set([null,"authored"]);function J(e,t){const i=C(t),n=i.filter(o=>e.includes(o.id)&&o.values.letterCase===void 0).map(o=>o.id);return{list:n.reduce((o,d)=>D(o,d,{letterCase:"upper"}),i),changed:n.length>0}}function z(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return B(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!U.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:i,changed:n}=J(e.styles,t.textStyles?t.textStylesList??null:null);return n?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:i}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function B(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const n=i[e.page];if(!n)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(j(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=L(n);return{send:{kind:e.kind,page:e.page,index:i.length,preset:s,themePresets:[...i,s]}}}const O={Hero:v,HeroSingle:e=>{const t=W(e),i=v(t.node),n=s=>s in e.props;return{node:i.node,carried:[...t.carried,...i.carried.filter(s=>n(s.key))],dropped:[...t.dropped,...i.dropped.filter(s=>n(s.key))]}}};function Y(e,t){if(!t.length||!Array.isArray(e.content))return e;let i=!1;const n=e.content.map(s=>!s||!t.includes(s.type)?s:(i=!0,O[s.type](s).node));return i?{...e,content:n}:e}function M(e){const t=e?.content;return Array.isArray(t)?E(R(e)):e}function ne(e,t={}){const i=[...t.types??H()],n=i.filter(a=>!N(a)&&!(a in O)),s=new Set(i.filter(a=>a in O)),o=new Set(i.filter(a=>N(a))),d=[],l=[],p={},m={},P=new Map((t.sites??[]).map(a=>[`${a.schema}/${a.site}`,a])),w=new Map,c=(a,$,r)=>{const _=`${a.schema}/${a.site}`;let k=w.get(_);k||w.set(_,k={...a,facts:!!$,writes:[],undecided:[],notNeeded:[]});const u=z(r,$);if("send"in u){const y=k.writes.find(S=>JSON.stringify(S.write)===JSON.stringify(u.send));y?y.nodes+=1:k.writes.push({write:u.send,reason:r.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[b,f]="undecided"in u?[k.undecided,u.undecided]:[k.notNeeded,u.notNeeded],h=b.find(y=>y.kind===r.kind&&y.why===f);h?h.nodes+=1:b.push({kind:r.kind,why:f,nodes:1})};for(const a of e){const $=M(a.layout)?.content;Array.isArray($)&&$.forEach((r,_)=>{if(r&&typeof r.type=="string"&&s.has(r.type)){const g=O[r.type](r),x={page:a.label,index:_,type:r.type,id:String(r.props?.id??""),carried:g.carried,dropped:g.dropped};t.draw&&(x.before=t.draw(r),x.after=t.draw(g.node),x.sameMarkup=x.before===x.after),d.push(x);const A=p[r.type]??={nodes:0,pages:0,dropped:{}};A.nodes+=1,(m[r.type]??=new Set).add(a.label),A.pages=m[r.type].size;for(const T of g.dropped)A.dropped[T.key]=(A.dropped[T.key]??0)+1;return}if(!r||typeof r.type!="string"||!o.has(r.type))return;const k=N(r.type),u=G(a.label),b=u?P.get(`${u.schema}/${u.site}`):void 0,f=F(r,k,b?{site:b}:{});if(f.skipped!==void 0){l.push({page:a.label,index:_,type:r.type,id:String(r.props?.id??""),why:f.skipped});return}if(u)for(const g of f.siteWrites)c(u,b,g);const h={page:a.label,index:_,type:r.type,id:String(r.props?.id??""),carried:f.carried,dropped:f.dropped},y=t.draw;y&&(h.before=y(r),h.after=f.nodes.map(y).join(""),h.sameMarkup=h.before===h.after),d.push(h);const S=p[r.type]??={nodes:0,pages:0,dropped:{}};S.nodes+=1,(m[r.type]??=new Set).add(a.label),S.pages=m[r.type].size;for(const g of f.dropped)S.dropped[g.key]=(S.dropped[g.key]??0)+1})}return{types:i,noRow:n,pages:e.length,nodes:d,skipped:l,byType:p,sites:[...w.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(i=>{const n=`${t.schema}/${t.siteName(i.site)}/${i.slug}`;return[{label:`${n} (draft)`,layout:i.layout},{label:`${n} (published)`,layout:i.published_layout}]})}function re(e,t){const i=t.types.filter(s=>N(s)),n=t.types.filter(s=>s in O);return e.map(s=>{const o={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...o,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=M(s.layout),l=Array.isArray(d?.content)?d.content:[],p=[],m=[];for(const c of l){if(c&&n.includes(c.type)){p.push({type:c.type,id:String(c.props?.id??"")});continue}if(!c||!i.includes(c.type))continue;const a=String(c.props?.id??""),$=N(c.type).skip?.(c.props);$===void 0?p.push({type:c.type,id:a}):m.push({type:c.type,id:a,why:$})}if(!p.length)return{...o,converted:p,skipped:m};const P=I(d,i,t.site?{site:t.site}:{}),w=Y(P,n);return{...o,patch:{layout:w,expected_updated_at:s.layout_updated_at},converted:p,skipped:m}})}function oe(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}const V=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function de(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const o=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${o} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const o=n.get(s.type)??n.set(s.type,new Map).get(s.type);o.set(s.why,(o.get(s.why)??0)+1)}for(const[s,o]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[d,l]of o)t.push(`- ×${l}: ${d}`)}}for(const[n,s]of Object.entries(e.byType)){const o=Object.entries(s.dropped);if(!o.length)continue;t.push("",`## ${n} — dropped`,"");const d=new Map;for(const l of e.nodes)if(l.type===n)for(const p of l.dropped)d.set(p.key,p.why);for(const[l,p]of o)t.push(`- \`${l}\` ×${p}: ${d.get(l)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,o=n.facts?"yes":"NO";for(const d of n.writes)t.push(`| ${s} | ${o} | ${V(d.write)} | send | ${d.nodes} | ${d.reason} |`);for(const d of n.undecided)t.push(`| ${s} | ${o} | ${d.kind} | UNDECIDED | ${d.nodes} | ${d.why} |`);for(const d of n.notNeeded)t.push(`| ${s} | ${o} | ${d.kind} | not needed | ${d.nodes} | ${d.why} |`)}}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
1
+ import{migrateLegacyPageData as D}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as L}from"../../../format/lib/document/renamed-props.js";import{listToWrite as j,setStyleValues as F}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as I,bandPresetIndex as H}from"../../../format/lib/theme.js";import{convertSection as W,convertSectionsInPage as G,sectionToBoxRow as N,sectionToBoxTypes as U}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as J}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as P}from"./hero-ticker-to-strip.js";import{ownEntry as T,hasOwnEntry as R}from"../../../format/lib/own-entry.js";function z(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function oe(e){const t=n=>typeof n=="string"?n:null,i=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:i,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{},..."site_gutter_unit"in e?{siteGutterUnit:t(e.site_gutter_unit)}:{},..."site_gutter_phone_unit"in e?{siteGutterPhoneUnit:t(e.site_gutter_phone_unit)}:{}}}const B=new Set([null,"authored"]);function Y(e,t){const i=j(t),n=i.filter(r=>e.includes(r.id)&&r.values.letterCase===void 0).map(r=>r.id);return{list:n.reduce((r,d)=>F(r,d,{letterCase:"upper"}),i),changed:n.length>0}}function V(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return q(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!B.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:i,changed:n}=Y(e.styles,t.textStyles?t.textStylesList??null:null);return n?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:i}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function q(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const n=i[e.page];if(!n)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(H(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=I(n);return{send:{kind:e.kind,page:e.page,index:i.length,preset:s,themePresets:[...i,s]}}}const v={Hero:P,HeroSingle:e=>{const t=J(e),i=P(t.node),n=s=>s in e.props;return{node:i.node,carried:[...t.carried,...i.carried.filter(s=>n(s.key))],dropped:[...t.dropped,...i.dropped.filter(s=>n(s.key))]}}};function K(e,t){if(!t.length||!Array.isArray(e.content))return e;let i=!1;const n=e.content.map(s=>{const r=s&&t.includes(s.type)?T(v,s.type):void 0;return r?(i=!0,r(s).node):s});return i?{...e,content:n}:e}function C(e){const t=e?.content;return Array.isArray(t)?L(D(e)):e}function de(e,t={}){const i=[...t.types??U()],n=i.filter(a=>!N(a)&&!R(v,a)),s=new Map(i.flatMap(a=>{const f=T(v,a);return f?[[a,f]]:[]})),r=new Set(i.filter(a=>N(a))),d=[],l=[],p={},m={},M=new Map((t.sites??[]).map(a=>[`${a.schema}/${a.site}`,a])),w=new Map,c=(a,f,o)=>{const _=`${a.schema}/${a.site}`;let y=w.get(_);y||w.set(_,y={...a,facts:!!f,writes:[],undecided:[],notNeeded:[]});const $=V(o,f);if("send"in $){const u=y.writes.find(x=>JSON.stringify(x.write)===JSON.stringify($.send));u?u.nodes+=1:y.writes.push({write:$.send,reason:o.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[k,b]="undecided"in $?[y.undecided,$.undecided]:[y.notNeeded,$.notNeeded],h=k.find(u=>u.kind===o.kind&&u.why===b);h?h.nodes+=1:k.push({kind:o.kind,why:b,nodes:1})};for(const a of e){const f=C(a.layout)?.content;Array.isArray(f)&&f.forEach((o,_)=>{const y=o&&typeof o.type=="string"?s.get(o.type):void 0;if(y){const g=y(o),S={page:a.label,index:_,type:o.type,id:String(o.props?.id??""),carried:g.carried,dropped:g.dropped};t.draw&&(S.before=t.draw(o),S.after=t.draw(g.node),S.sameMarkup=S.before===S.after),d.push(S);const A=p[o.type]??={nodes:0,pages:0,dropped:{}};A.nodes+=1,(m[o.type]??=new Set).add(a.label),A.pages=m[o.type].size;for(const E of g.dropped)A.dropped[E.key]=(A.dropped[E.key]??0)+1;return}if(!o||typeof o.type!="string"||!r.has(o.type))return;const $=N(o.type),k=z(a.label),b=k?M.get(`${k.schema}/${k.site}`):void 0,h=W(o,$,b?{site:b}:{});if(h.skipped!==void 0){l.push({page:a.label,index:_,type:o.type,id:String(o.props?.id??""),why:h.skipped});return}if(k)for(const g of h.siteWrites)c(k,b,g);const u={page:a.label,index:_,type:o.type,id:String(o.props?.id??""),carried:h.carried,dropped:h.dropped},x=t.draw;x&&(u.before=x(o),u.after=h.nodes.map(x).join(""),u.sameMarkup=u.before===u.after),d.push(u);const O=p[o.type]??={nodes:0,pages:0,dropped:{}};O.nodes+=1,(m[o.type]??=new Set).add(a.label),O.pages=m[o.type].size;for(const g of h.dropped)O.dropped[g.key]=(O.dropped[g.key]??0)+1})}return{types:i,noRow:n,pages:e.length,nodes:d,skipped:l,byType:p,sites:[...w.values()],siteFacts:[...t.sites??[]]}}function ae(e,t){return e.flatMap(i=>{const n=`${t.schema}/${t.siteName(i.site)}/${i.slug}`;return[{label:`${n} (draft)`,layout:i.layout},{label:`${n} (published)`,layout:i.published_layout}]})}function pe(e,t){const i=t.types.filter(s=>N(s)),n=t.types.filter(s=>R(v,s));return e.map(s=>{const r={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...r,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=C(s.layout),l=Array.isArray(d?.content)?d.content:[],p=[],m=[];for(const c of l){if(c&&n.includes(c.type)){p.push({type:c.type,id:String(c.props?.id??"")});continue}if(!c||!i.includes(c.type))continue;const a=String(c.props?.id??""),f=N(c.type).skip?.(c.props);f===void 0?p.push({type:c.type,id:a}):m.push({type:c.type,id:a,why:f})}if(!p.length)return{...r,converted:p,skipped:m};const M=G(d,i,t.site?{site:t.site}:{}),w=K(M,n);return{...r,patch:{layout:w,expected_updated_at:s.layout_updated_at},converted:p,skipped:m}})}function ce(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}const Q=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function le(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const r=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${r} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const r=n.get(s.type)??n.set(s.type,new Map).get(s.type);r.set(s.why,(r.get(s.why)??0)+1)}for(const[s,r]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[d,l]of r)t.push(`- ×${l}: ${d}`)}}for(const[n,s]of Object.entries(e.byType)){const r=Object.entries(s.dropped);if(!r.length)continue;t.push("",`## ${n} — dropped`,"");const d=new Map;for(const l of e.nodes)if(l.type===n)for(const p of l.dropped)d.set(p.key,p.why);for(const[l,p]of r)t.push(`- \`${l}\` ×${p}: ${d.get(l)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,r=n.facts?"yes":"NO";for(const d of n.writes)t.push(`| ${s} | ${r} | ${Q(d.write)} | send | ${d.nodes} | ${d.reason} |`);for(const d of n.undecided)t.push(`| ${s} | ${r} | ${d.kind} | UNDECIDED | ${d.nodes} | ${d.why} |`);for(const d of n.notNeeded)t.push(`| ${s} | ${r} | ${d.kind} | not needed | ${d.nodes} | ${d.why} |`)}}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
2
2
  `)+`
3
- `}export{O as HERO_MOVES,de as dryRunMarkdown,ne as dryRunSections,J as headingCaseList,re as pageEdits,ie as pagesFromCliExport,se as siteFactsFromRead,G as siteOfLabel,oe as siteWritesFile};
3
+ `}export{v as HERO_MOVES,le as dryRunMarkdown,de as dryRunSections,Y as headingCaseList,pe as pageEdits,ae as pagesFromCliExport,oe as siteFactsFromRead,z as siteOfLabel,ce as siteWritesFile};
@@ -1 +1 @@
1
- import{convertSection as T,pressesAsBox as f,SECTION_TO_BOX_PRESS as _,sectionToBoxRow as P}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as x,presetFor as k}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as B,TEXT_PRESS_STARTERS as C}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{SECTION_CATALOG as g}from"../../../format/lib/document/section-catalog.js";import{statsBoxSeed as l,statsPressSeed as L,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as w,logosPressStarter as A,paymentPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as X}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{tabBarPressStarter as D}from"../../../render/lib/document/blocks/general/section-to-box-rows-tabbar.js";import{milestoneTimelinePressStarter as G,storyTimelinePressStarter as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as U}from"../../../format/lib/document/seed-parts.js";import{isNodeList as u}from"efficient-easel/data";const M=Object.keys(B),E={Logos:A,DocMasthead:X,DocTabs:D,Timeline:I,TimelineTrack:G},W={PaymentBadges:j,PaymentLogosBlock:w};function S(t,s,r){const o={};for(const n of Object.keys(s(t.type)))o[n]=void 0;for(const[n,e]of Object.entries(t.props))o[n]=u(e)?e.map(p=>S(p,s,r)):e;return o.id=r(t.type),{type:t.type,props:o}}const O=t=>({...t?.theme?{theme:t.theme}:{},press:!0});function b(t,s,r=0,o=()=>({})){return(n,e,p)=>{const{nodes:c}=T({type:t,props:{...n(t),...o(),id:e(t)}},s,O(p));return S(c[r],n,e)}}const Y={Stats:H,Cards:$};function $(){const t=P("Cards");if(!t)return null;const s=b("Cards",t,0,v);return(r,o,n)=>{const e=s(r,o,n);return{...e,props:{...e.props,name:"Cards section"}}}}function H(){const t=P("StatsParagraph");return t?(s,r,o)=>{const{nodes:n}=T({type:"StatsParagraph",props:{...s("StatsParagraph"),...L(),id:r("StatsParagraph")}},t,O(o)),e=n[0],p=u(e.props.content)?e.props.content.filter(m=>m.props?.cardStyle===void 0):[],c=y(l(N(),"table")),i=p.map(h),a=S({...e,props:{...e.props,content:[...i,c]}},s,r);return{...a,props:{...a.props,name:"Stats section"}}}:null}function h(t){return t.props?.name==="Words"?{...t,props:{...t.props,widthFitPhone:"fill"}}:u(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(h)}}:t}const y=t=>U([t],(s,r)=>`${s}-seed-${r}`)[0];function q(t,s){if(!f(t,s))return null;const r=Y[t];if(r)return r();const o=P(t);return o?b(t,o,0,E[t]??C[t]??W[t]):null}function z(t){return(s,r,o)=>{const n=e=>{if(e.type==="Stats"){const i=S(y(l([],"list")),s,r);return{...i,props:{...i.props,name:"Numbers"}}}let p=!1;const c={};for(const[i,a]of Object.entries(e.props))if(u(a)){const m=a.map(n);p||=m.some((d,R)=>d!==a[R]),c[i]=m}else c[i]=a;return p?{type:e.type,props:c}:e};return n(t(s,r,o))}}function ct(t,s=_){const r=k(t);return r?z(r):q(t,s)}const J=t=>g.some(s=>s.key==="structure"&&s.sections.some(r=>r.type===t));function it(){return[...Object.keys(x),...M.filter(t=>f(t)&&!J(t)),...Object.keys(E).filter(t=>f(t))]}export{E as MERGE_LAYOUTS,M as TEXT_LAYOUTS,b as conversionPreset,ct as layoutPresetFor,it as layoutTypes};
1
+ import{convertSection as l,pressesAsBox as P,SECTION_TO_BOX_PRESS as k,sectionToBoxRow as T}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as x,presetFor as B}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as C,TEXT_PRESS_STARTERS as g}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{SECTION_CATALOG as w}from"../../../format/lib/document/section-catalog.js";import{statsBoxSeed as E,statsPressSeed as L,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as A,logosPressStarter as j,paymentPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as X}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as D}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{tabBarPressStarter as G}from"../../../render/lib/document/blocks/general/section-to-box-rows-tabbar.js";import{milestoneTimelinePressStarter as I,storyTimelinePressStarter as U}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as M}from"../../../format/lib/document/seed-parts.js";import{isNodeList as u}from"efficient-easel/data";import{ownEntry as S}from"../../../format/lib/own-entry.js";const W=Object.keys(C),O={Logos:j,DocMasthead:D,DocTabs:G,Timeline:U,TimelineTrack:I},Y={PaymentBadges:v,PaymentLogosBlock:A};function f(t,s,r){const o={};for(const n of Object.keys(s(t.type)))o[n]=void 0;for(const[n,e]of Object.entries(t.props))o[n]=u(e)?e.map(p=>f(p,s,r)):e;return o.id=r(t.type),{type:t.type,props:o}}const y=t=>({...t?.theme?{theme:t.theme}:{},...t?.site?{site:t.site}:{},press:!0});function b(t,s,r=0,o=()=>({})){return(n,e,p)=>{const{nodes:i}=l({type:t,props:{...n(t),...o(),id:e(t)}},s,y(p));return f(i[r],n,e)}}const $={Stats:q,Cards:H};function H(){const t=T("Cards");if(!t)return null;const s=b("Cards",t,0,X);return(r,o,n)=>{const e=s(r,o,n);return{...e,props:{...e.props,name:"Cards section"}}}}function q(){const t=T("StatsParagraph");return t?(s,r,o)=>{const{nodes:n}=l({type:"StatsParagraph",props:{...s("StatsParagraph"),...L(),id:r("StatsParagraph")}},t,y(o)),e=n[0],p=u(e.props.content)?e.props.content.filter(m=>m.props?.cardStyle===void 0):[],i=d(E(N(),"table")),a=p.map(h),c=f({...e,props:{...e.props,content:[...a,i]}},s,r);return{...c,props:{...c.props,name:"Stats section"}}}:null}function h(t){return t.props?.name==="Words"?{...t,props:{...t.props,widthFitPhone:"fill"}}:u(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(h)}}:t}const d=t=>M([t],(s,r)=>`${s}-seed-${r}`)[0];function z(t,s){if(!P(t,s))return null;const r=S($,t);if(r)return r();const o=T(t);return o?b(t,o,0,S(O,t)??S(g,t)??S(Y,t)):null}function J(t){return(s,r,o)=>{const n=e=>{if(e.type==="Stats"){const a=f(d(E([],"list")),s,r);return{...a,props:{...a.props,name:"Numbers"}}}let p=!1;const i={};for(const[a,c]of Object.entries(e.props))if(u(c)){const m=c.map(n);p||=m.some((R,_)=>R!==c[_]),i[a]=m}else i[a]=c;return p?{type:e.type,props:i}:e};return n(t(s,r,o))}}function ct(t,s=k){const r=B(t);return r?J(r):z(t,s)}const K=t=>w.some(s=>s.key==="structure"&&s.sections.some(r=>r.type===t));function mt(){return[...Object.keys(x),...W.filter(t=>P(t)&&!K(t)),...Object.keys(O).filter(t=>P(t))]}export{O as MERGE_LAYOUTS,W as TEXT_LAYOUTS,b as conversionPreset,ct as layoutPresetFor,mt as layoutTypes};
@@ -1 +1 @@
1
- import{PARENT_BOX_IS_NOT_CARD_RULE as B}from"./box-card-rule.js";import{isStripBox as f}from"./box-separator.js";import{viewOverrides as R}from"./view-overrides.js";const oe={sectionPaddingTop:0,sectionPaddingBottom:0},c={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function de(e,i){const s=typeof e=="string"&&e in c?c[e]:"",t=typeof i=="string"&&i in v?v[i]:"";return[s,t].filter(Boolean).join(" ")}function P(e){return e===!0||e==="wrap"?"flex-wrap":""}const I={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},H={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},M={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},X={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},$={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function o(e,i){return typeof i=="string"&&Object.prototype.hasOwnProperty.call(e,i)?i:void 0}function h(e,i,s){const t=R("same",e,i,s),a={};return t.tablet!==void 0&&t.tablet!==e&&(a.tablet=t.tablet),t.phone!==void 0&&t.phone!==e&&(a.phone=t.phone),a}function m(e,i,s){return[e.tablet?i[e.tablet]:"",e.phone?s[e.phone]:""].filter(Boolean).join(" ")}function U(e,i,s){return h(o(c,e)??"start",o(c,i),o(c,s))}function re(e,i,s){return m(U(e,i,s),I,H)}function le(e,i,s){const t=o(v,e)??"stretch";if(t==="stretch")return"";const a=h(t,o(v,i),o(v,s));return m(a,M,X)}function _(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function ce(e,i){const s=P(e)===""?"nowrap":"wrap",t=_(i);return t&&t!==s?$[t]:""}const ve="Block widths",g=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],j="data-sf-box-items",W=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${j}\\][^\\s"'\`]*`,"g");function xe(e){return e.replace(W,"")}const pe=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function fe(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const u=4,S=10;function F(e,i){if(!Number.isInteger(i)||i<2||i>u||e.length!==i-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const s=[];let t=0;return e.forEach((a,n)=>{const w=100-t-S*(i-1-n),x=Math.min(w,Math.max(S,Math.round(a)));s.push(x),t+=x}),s}function k(e,i,s){if(!Array.isArray(i))return;const t=F(i,s),a=t?[...t,100-t.reduce((w,x)=>w+x,0)]:[],n={};for(let w=0;w<u;w+=1)n[`--${e}-${w+1}`]=a[w]??1;return n}function he(e,i,s){const t=k("sf-share",e,s),a=k("sf-share-tablet",i,s);return t||a?{...t,...a}:void 0}function G(e,i){const s=Array.from({length:i},()=>1),t=g.find(w=>w.value===e);if(!t?.weights||i<1)return s;const[a,n]=t.weights;return a>1&&(s[0]=a),n>1&&(s[i-1]=n),s}function me(e,i){if(typeof e!="string"||!(e in p)||e==="equal")return e;const s=G(e,i),t=s.reduce((a,n)=>a+n,0);return s.slice(0,-1).map(a=>Math.round(a/t*100))}const d="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:d,bigLeft:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${d} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${d} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${d} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},q=`${d} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function D(e){return Array.isArray(e)?q:typeof e=="string"?p[e]??"":""}const _e={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},B,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},O="view-wide:max-view-desktop:flex-row!",r=`${O} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,A={content:`${O} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},V=`${r} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function K(e){return Array.isArray(e)||typeof e=="string"&&e in A?e:null}function be(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||C(e.columns)!==""||L(e.columnsTablet)!=="")return"";const i=K(e.shareTablet);return i===null?"":typeof i=="string"?A[i]:V}const J="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function ge(e){return D(e)===""?J:""}const ue="Columns",Se=1,ke=3,b={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Oe=g.filter(e=>e.value==="content"||e.value==="equal"),Ae="equal",Ce=1,Le=6,l="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",Y={1:`${l} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function C(e){return typeof e=="number"?Y[e]??"":""}const Q={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function L(e){return typeof e=="number"?Q[e]??"":""}function Ne(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columnsTablet)}function Ee(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":C(e.columns)}const N={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},E={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Te=Object.keys(N).map(Number),ye=Object.keys(E).map(Number);function Be(e,i,s=!1){const t=typeof e=="number"?N[e]??"":"",a=E[Number(i)]??"";return!t&&!a?"":[t,a,s?"gap-y-0!":""].filter(Boolean).join(" ")}const z="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",Z={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ee="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function ie(e,i){return(_(e)??_(i)??"wrap")==="nowrap"}function Re(e,i,s,t){const a=b[Number(e)];if(!a)return"max-view-wide:flex-col";const n=ie(s,t);return T(e,i)?n?ee:z:n?Z[Number(e)]:a}function Pe(e,i){return Number(e)in b&&!T(e,i)}function T(e,i){return Number(e)in b&&i==="content"}const Ie="Block spacing",He=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],te="sf-box-gap-only";function Me(e){return e==="gap"?te:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},se={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Xe(e,i,s){const t=n=>o(y,n),a=h(e==="gap"?"gap":"each",t(i),t(s));return m(a,y,se)}export{Te as ACCORDION_COLUMN_COUNTS,ye as ACCORDION_PHONE_COLUMN_COUNTS,v as BOX_ALIGN_CLASS,Ie as BOX_BLOCK_SPACING_LABEL,He as BOX_BLOCK_SPACING_POINTS,Le as BOX_COLUMNS_MAX,Ce as BOX_COLUMNS_MIN,te as BOX_GAP_ONLY_CLASS,_e as BOX_GIVES_PICTURES_A_HEIGHT,j as BOX_ITEMS_ATTR,ue as BOX_PHONE_ROW_LABEL,ke as BOX_PHONE_ROW_MAX,Se as BOX_PHONE_ROW_MIN,pe as BOX_SHARE_CHOICES,ve as BOX_SHARE_LABEL,Ae as BOX_SHARE_PHONE_DEFAULT,Oe as BOX_SHARE_PHONE_POINTS,g as BOX_SHARE_POINTS,oe as NESTED_BOX_PADDING,Be as boxAccordionColumnsClass,le as boxAlignViewClasses,Me as boxBlockSpacingClass,Xe as boxBlockSpacingViewClasses,C as boxColumnsClass,ge as boxFitContentClass,U as boxJustifyViewAnswers,re as boxJustifyViewClasses,de as boxLayoutClasses,Pe as boxPhoneCellsShareLine,Re as boxPhoneRowClasses,T as boxPhoneRowFits,ie as boxPhoneRowOneLine,Ee as boxRowColumnsClass,Ne as boxRowTabletColumnsClass,be as boxRowTabletShareClass,fe as boxShareChoiceOf,D as boxShareClasses,K as boxShareTabletOf,he as boxShareVars,me as boxShareWidthsOf,L as boxTabletColumnsClass,P as boxWrapClass,ce as boxWrapTabletClass,_ as boxWrapWordOf,xe as withoutBoxItemsHalf};
1
+ import{PARENT_BOX_IS_NOT_CARD_RULE as R}from"./box-card-rule.js";import{isStripBox as f}from"./box-separator.js";import{viewOverrides as P}from"./view-overrides.js";import{hasOwnEntry as m}from"../own-entry.js";const re={sectionPaddingTop:0,sectionPaddingBottom:0},c={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function le(e,i){const s=typeof e=="string"&&m(c,e)?c[e]:"",t=typeof i=="string"&&m(v,i)?v[i]:"";return[s,t].filter(Boolean).join(" ")}function I(e){return e===!0||e==="wrap"?"flex-wrap":""}const H={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},M={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},X={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},$={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},U={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function o(e,i){return typeof i=="string"&&m(e,i)?i:void 0}function h(e,i,s){const t=P("same",e,i,s),a={};return t.tablet!==void 0&&t.tablet!==e&&(a.tablet=t.tablet),t.phone!==void 0&&t.phone!==e&&(a.phone=t.phone),a}function _(e,i,s){return[e.tablet?i[e.tablet]:"",e.phone?s[e.phone]:""].filter(Boolean).join(" ")}function W(e,i,s){return h(o(c,e)??"start",o(c,i),o(c,s))}function ce(e,i,s){return _(W(e,i,s),H,M)}function ve(e,i,s){const t=o(v,e)??"stretch";if(t==="stretch")return"";const a=h(t,o(v,i),o(v,s));return _(a,X,$)}function b(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function xe(e,i){const s=I(e)===""?"nowrap":"wrap",t=b(i);return t&&t!==s?U[t]:""}const pe="Block widths",u=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],j="data-sf-box-items",F=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${j}\\][^\\s"'\`]*`,"g");function fe(e){return e.replace(F,"")}const me=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function he(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const S=4,k=10;function G(e,i){if(!Number.isInteger(i)||i<2||i>S||e.length!==i-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const s=[];let t=0;return e.forEach((a,n)=>{const w=100-t-k*(i-1-n),x=Math.min(w,Math.max(k,Math.round(a)));s.push(x),t+=x}),s}function O(e,i,s){if(!Array.isArray(i))return;const t=G(i,s),a=t?[...t,100-t.reduce((w,x)=>w+x,0)]:[],n={};for(let w=0;w<S;w+=1)n[`--${e}-${w+1}`]=a[w]??1;return n}function _e(e,i,s){const t=O("sf-share",e,s),a=O("sf-share-tablet",i,s);return t||a?{...t,...a}:void 0}function q(e,i){const s=Array.from({length:i},()=>1),t=u.find(w=>w.value===e);if(!t?.weights||i<1)return s;const[a,n]=t.weights;return a>1&&(s[0]=a),n>1&&(s[i-1]=n),s}function be(e,i){if(typeof e!="string"||!(e in p)||e==="equal")return e;const s=q(e,i),t=s.reduce((a,n)=>a+n,0);return s.slice(0,-1).map(a=>Math.round(a/t*100))}const d="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:d,bigLeft:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${d} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${d} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${d} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},D=`${d} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function V(e){return Array.isArray(e)?D:typeof e=="string"?p[e]??"":""}const ge={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},R,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},A="view-wide:max-view-desktop:flex-row!",r=`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,C={content:`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},K=`${r} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function J(e){return Array.isArray(e)||typeof e=="string"&&e in C?e:null}function ue(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||L(e.columns)!==""||N(e.columnsTablet)!=="")return"";const i=J(e.shareTablet);return i===null?"":typeof i=="string"?C[i]:K}const Y="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function Se(e){return V(e)===""?Y:""}const ke="Columns",Oe=1,Ae=3,g={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Ce=u.filter(e=>e.value==="content"||e.value==="equal"),Le="equal",Ne=1,Ee=6,l="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",Q={1:`${l} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function L(e){return typeof e=="number"?Q[e]??"":""}const z={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function N(e){return typeof e=="number"?z[e]??"":""}function Te(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":N(e.columnsTablet)}function Be(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columns)}const E={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},T={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},ye=Object.keys(E).map(Number),Re=Object.keys(T).map(Number);function Pe(e,i,s=!1){const t=typeof e=="number"?E[e]??"":"",a=T[Number(i)]??"";return!t&&!a?"":[t,a,s?"gap-y-0!":""].filter(Boolean).join(" ")}const Z="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",ee={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ie="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function te(e,i){return(b(e)??b(i)??"wrap")==="nowrap"}function Ie(e,i,s,t){const a=g[Number(e)];if(!a)return"max-view-wide:flex-col";const n=te(s,t);return B(e,i)?n?ie:Z:n?ee[Number(e)]:a}function He(e,i){return Number(e)in g&&!B(e,i)}function B(e,i){return Number(e)in g&&i==="content"}const Me="Block spacing",Xe=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],se="sf-box-gap-only";function $e(e){return e==="gap"?se:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ae={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Ue(e,i,s){const t=n=>o(y,n),a=h(e==="gap"?"gap":"each",t(i),t(s));return _(a,y,ae)}export{ye as ACCORDION_COLUMN_COUNTS,Re as ACCORDION_PHONE_COLUMN_COUNTS,v as BOX_ALIGN_CLASS,Me as BOX_BLOCK_SPACING_LABEL,Xe as BOX_BLOCK_SPACING_POINTS,Ee as BOX_COLUMNS_MAX,Ne as BOX_COLUMNS_MIN,se as BOX_GAP_ONLY_CLASS,ge as BOX_GIVES_PICTURES_A_HEIGHT,j as BOX_ITEMS_ATTR,ke as BOX_PHONE_ROW_LABEL,Ae as BOX_PHONE_ROW_MAX,Oe as BOX_PHONE_ROW_MIN,me as BOX_SHARE_CHOICES,pe as BOX_SHARE_LABEL,Le as BOX_SHARE_PHONE_DEFAULT,Ce as BOX_SHARE_PHONE_POINTS,u as BOX_SHARE_POINTS,re as NESTED_BOX_PADDING,Pe as boxAccordionColumnsClass,ve as boxAlignViewClasses,$e as boxBlockSpacingClass,Ue as boxBlockSpacingViewClasses,L as boxColumnsClass,Se as boxFitContentClass,W as boxJustifyViewAnswers,ce as boxJustifyViewClasses,le as boxLayoutClasses,He as boxPhoneCellsShareLine,Ie as boxPhoneRowClasses,B as boxPhoneRowFits,te as boxPhoneRowOneLine,Be as boxRowColumnsClass,Te as boxRowTabletColumnsClass,ue as boxRowTabletShareClass,he as boxShareChoiceOf,V as boxShareClasses,J as boxShareTabletOf,_e as boxShareVars,be as boxShareWidthsOf,N as boxTabletColumnsClass,I as boxWrapClass,xe as boxWrapTabletClass,b as boxWrapWordOf,fe as withoutBoxItemsHalf};
@@ -1 +1 @@
1
- import{boxIsCard as s}from"./box-background.js";import"./box-card-rule.js";import{boxColumnsClass as d,boxJustifyViewAnswers as u,boxShareClasses as l,boxTabletColumnsClass as w,boxWrapClass as c}from"./box-layout.js";import{isStripBox as p}from"./box-separator.js";const h="Mirror cards",m="off",P=[{value:m,label:"Off"},{value:"even",label:"Even cards"},{value:"odd",label:"Odd cards"}],M={even:"Cards 2, 4, 6 draw the other way round",odd:"Cards 1, 3, 5 draw the other way round"};function n(e){return e==="even"||e==="odd"?e:null}function W(e){return n(e)??void 0}function j(e){return e.inCopy&&!e.nestedCopy&&!e.underBox}function B(e,r,t){return!r||e.direction!=="row"||t||p("row",e.separator)||e.loop==="scroll"||e.line===!0||s(e)||d(e.columns)!==""||w(e.columnsTablet)!==""?!1:!(l(e.share)===""&&c(e.wrap)!=="")}function E(e,r){const t=n(e);return!t||typeof r!="number"||!Number.isInteger(r)||r<0?!1:t==="even"?r%2===1:r%2===0}const L="view-wide:flex-row-reverse",C={left:"view-wide:ml-auto!",right:"view-wide:ml-0!"},v={left:"view-wide:text-right!",right:"view-wide:text-left!"},R={start:"view-wide:justify-end!",end:"view-wide:justify-start!"},_={start:"view-wide:items-end!",end:"view-wide:items-start!"},A={start:"view-wide:max-view-desktop:justify-end!",end:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!"},o=(e,r)=>typeof r=="string"&&Object.prototype.hasOwnProperty.call(e,r)?e[r]:"";function b(e,r,t){return e?[o(C,r),o(v,t)].filter(Boolean).join(" "):""}function g(e,r,t,f,a){if(!e)return"";if(r==="row"){const i=u(t,a,void 0).tablet;return[o(R,t),i?A[i]:""].filter(Boolean).join(" ")}return r==="column"?o(_,f):""}function S(e,r){return r||e.direction!==void 0&&e.direction!=="column"||e.loop==="scroll"||s(e)?!1:d(e.columns)===""}function k(e,r){const t=n(e.mirrorCards);return t&&S(e,r)?{mirror:t}:null}export{h as MIRROR_CARDS_LABEL,m as MIRROR_CARDS_OFF,P as MIRROR_CARDS_OPTIONS,M as MIRROR_CARDS_TITLES,L as MIRROR_ROW_CLASS,k as boxChildrenHand,E as isMirroredCopy,B as mirrorCardsActs,n as mirrorCardsOf,W as mirrorCardsWrite,S as mirrorChildrenActs,g as mirroredBoxClass,b as mirroredTextClasses,j as ownsCard};
1
+ import{boxIsCard as s}from"./box-background.js";import"./box-card-rule.js";import{boxColumnsClass as d,boxJustifyViewAnswers as a,boxShareClasses as l,boxTabletColumnsClass as w,boxWrapClass as c}from"./box-layout.js";import{isStripBox as m}from"./box-separator.js";import{ownEntry as p}from"../own-entry.js";const M="Mirror cards",C="off",P=[{value:C,label:"Off"},{value:"even",label:"Even cards"},{value:"odd",label:"Odd cards"}],W={even:"Cards 2, 4, 6 draw the other way round",odd:"Cards 1, 3, 5 draw the other way round"};function o(e){return e==="even"||e==="odd"?e:null}function B(e){return o(e)??void 0}function L(e){return e.inCopy&&!e.nestedCopy&&!e.underBox}function j(e,r,t){return!r||e.direction!=="row"||t||m("row",e.separator)||e.loop==="scroll"||e.line===!0||s(e)||d(e.columns)!==""||w(e.columnsTablet)!==""?!1:!(l(e.share)===""&&c(e.wrap)!=="")}function b(e,r){const t=o(e);return!t||typeof r!="number"||!Number.isInteger(r)||r<0?!1:t==="even"?r%2===1:r%2===0}const g="view-wide:flex-row-reverse",v={left:"view-wide:ml-auto!",right:"view-wide:ml-0!"},R={left:"view-wide:text-right!",right:"view-wide:text-left!"},_={start:"view-wide:justify-end!",end:"view-wide:justify-start!"},A={start:"view-wide:items-end!",end:"view-wide:items-start!"},S={start:"view-wide:max-view-desktop:justify-end!",end:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!"},n=(e,r)=>(typeof r=="string"?p(e,r):void 0)??"";function k(e,r,t){return e?[n(v,r),n(R,t)].filter(Boolean).join(" "):""}function D(e,r,t,f,u){if(!e)return"";if(r==="row"){const i=a(t,u,void 0).tablet;return[n(_,t),i?S[i]:""].filter(Boolean).join(" ")}return r==="column"?n(A,f):""}function x(e,r){return r||e.direction!==void 0&&e.direction!=="column"||e.loop==="scroll"||s(e)?!1:d(e.columns)===""}function F(e,r){const t=o(e.mirrorCards);return t&&x(e,r)?{mirror:t}:null}export{M as MIRROR_CARDS_LABEL,C as MIRROR_CARDS_OFF,P as MIRROR_CARDS_OPTIONS,W as MIRROR_CARDS_TITLES,g as MIRROR_ROW_CLASS,F as boxChildrenHand,b as isMirroredCopy,j as mirrorCardsActs,o as mirrorCardsOf,B as mirrorCardsWrite,x as mirrorChildrenActs,D as mirroredBoxClass,k as mirroredTextClasses,L as ownsCard};
@@ -1 +1 @@
1
- import{storedUnit as u}from"./css-length.js";import{normalizeSectionContentMax as s}from"./page-width.js";const l=["page","full"],T=["full","page"],M={full:"Full",page:"Content"},p="inherit",g=t=>typeof t=="string"&&l.includes(t),b=t=>t===p;function h(t,e){return b(t.widthMode)?{mode:"full",inherited:!0}:g(t.widthMode)?{mode:t.widthMode,inherited:!1}:{mode:e,inherited:e==="full"}}function S(t){return h(t,"page").mode==="full"}const k={CustomHTML:"rawMarkup",Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"},W=["Ticker","CategoryBar","DocTabs","Header","Footer"];function O(t){return Object.prototype.hasOwnProperty.call(k,t)}const n={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},F={kind:"size",unitKey:n.contentMaxUnit};function x(t){const e=t[n.contentMaxUnit],c=u(e),a=t[n.contentMax],r=c==="px"?s(a):typeof a=="number"&&Number.isFinite(a)&&a>0?a:null,d=o(t[n.content])??(r===null?null:"content");return{background:o(t[n.background]),content:d,contentMax:d==="content"?r:null,contentMaxUnit:c}}function I(t){const e=x(t);return e.content===null&&t.fullWidth===!0?{...e,content:"full"}:e}function y(t){return t.background!==null||t.content!==null}const H=t=>({[n.background]:t}),B=t=>t==="full"?{[n.content]:t,[n.contentMax]:void 0,[n.contentMaxUnit]:void 0}:{[n.content]:t},_=t=>({[n.content]:"content",[n.contentMax]:t}),D=t=>t==="background"?{[n.background]:void 0}:{[n.content]:void 0,[n.contentMax]:void 0,[n.contentMaxUnit]:void 0},i="siteWidths",f=t=>t==="full"||t==="content";function o(t){return f(t)?t:null}function E(t,e){return{[i]:{background:o(t),content:o(e)}}}function w(t){const c=t.editor?.metadata?.[i];return{background:o(c?.background),content:o(c?.content)}}export{W as NO_WIDTH_ROWS,F as SECTION_CONTENT_MAX_ROW,T as SECTION_WIDTH_CHOICES,k as SECTION_WIDTH_FAMILY,n as SECTION_WIDTH_KEYS,i as SITE_WIDTHS_KEY,M as WIDTH_CHOICE_LABEL,p as WIDTH_INHERIT,l as WIDTH_MODES,I as chromeOwnWidth,y as hasOwnSectionWidth,O as hasWidthFamily,b as isInheritValue,o as normalizeSiteBackground,x as ownSectionWidth,h as resolveWidth,H as sectionBackgroundPatch,_ as sectionContentMaxPatch,B as sectionContentPatch,S as sectionRunsFullWidth,D as sectionWidthResetPatch,E as siteWidthsMetadata,w as siteWidthsOf};
1
+ import{storedUnit as u}from"./css-length.js";import{normalizeSectionContentMax as s}from"./page-width.js";import{hasOwnEntry as l}from"../own-entry.js";const p=["page","full"],S=["full","page"],W={full:"Full",page:"Content"},g="inherit",b=t=>typeof t=="string"&&p.includes(t),h=t=>t===g;function k(t,e){return h(t.widthMode)?{mode:"full",inherited:!0}:b(t.widthMode)?{mode:t.widthMode,inherited:!1}:{mode:e,inherited:e==="full"}}function F(t){return k(t,"page").mode==="full"}const x={CustomHTML:"rawMarkup",Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"},I=["Ticker","CategoryBar","DocTabs","Header","Footer"];function O(t){return l(x,t)}const n={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},y={kind:"size",unitKey:n.contentMaxUnit};function m(t){const e=t[n.contentMaxUnit],c=u(e),a=t[n.contentMax],r=c==="px"?s(a):typeof a=="number"&&Number.isFinite(a)&&a>0?a:null,d=o(t[n.content])??(r===null?null:"content");return{background:o(t[n.background]),content:d,contentMax:d==="content"?r:null,contentMaxUnit:c}}function H(t){const e=m(t);return e.content===null&&t.fullWidth===!0?{...e,content:"full"}:e}function B(t){return t.background!==null||t.content!==null}const _=t=>({[n.background]:t}),D=t=>t==="full"?{[n.content]:t,[n.contentMax]:void 0,[n.contentMaxUnit]:void 0}:{[n.content]:t},E=t=>({[n.content]:"content",[n.contentMax]:t}),w=t=>t==="background"?{[n.background]:void 0}:{[n.content]:void 0,[n.contentMax]:void 0,[n.contentMaxUnit]:void 0},i="siteWidths",f=t=>t==="full"||t==="content";function o(t){return f(t)?t:null}function P(t,e){return{[i]:{background:o(t),content:o(e)}}}function R(t){const c=t.editor?.metadata?.[i];return{background:o(c?.background),content:o(c?.content)}}export{I as NO_WIDTH_ROWS,y as SECTION_CONTENT_MAX_ROW,S as SECTION_WIDTH_CHOICES,x as SECTION_WIDTH_FAMILY,n as SECTION_WIDTH_KEYS,i as SITE_WIDTHS_KEY,W as WIDTH_CHOICE_LABEL,g as WIDTH_INHERIT,p as WIDTH_MODES,H as chromeOwnWidth,B as hasOwnSectionWidth,O as hasWidthFamily,h as isInheritValue,o as normalizeSiteBackground,m as ownSectionWidth,k as resolveWidth,_ as sectionBackgroundPatch,E as sectionContentMaxPatch,D as sectionContentPatch,F as sectionRunsFullWidth,w as sectionWidthResetPatch,P as siteWidthsMetadata,R as siteWidthsOf};
@@ -1 +1 @@
1
- import{FOOTER_LOGO_PX as O}from"../logo/logo-size.js";import{resolveContainerGap as _}from"../content/container-gap.js";import{NESTED_BOX_PADDING as m}from"../content/box-layout.js";import{finiteNumber as a}from"../finite-number.js";import{isNodeList as y}from"efficient-easel/data";import{hiddenKeyOf as P}from"efficient-easel/screen/lib/content/view-hide";import{templateOnInsert as L}from"../content/card-template.js";import{buildSectionGroup as x,SITE_FOOTER_TYPE as A}from"./section-groups.js";const d="Flex",S={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},w={FooterPayment:"PaymentLogosBlock"},I=o=>{const{id:e,...s}=o;return s},h=o=>typeof o=="string"?o:"",g={sm:12,md:13,lg:15},W={sm:{mark:16,words:g.sm},md:{mark:20,words:g.md}},b="md",E=1.5,B={size:13,lineHeight:E,width:280},N=14,G=40,R=o=>o==="center"||o==="right"?o:"left";function D(o){const e={},s=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(const[t,i]of s){const c=a(o[t]);c&&(e[i]=c)}return e}function k(o,e,s){const t=s(o,I(e));if(Array.isArray(e.template))return{...t,props:{...t.props,template:T(e.template,String(t.props.id))}};if(e.template!==void 0)return t;const i=L(o,t.props);return i===t.props?t:{...t,props:i}}function T(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))y(r)&&(i[c]=T(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=S[o.type]??w[o.type];if(c)return[k(c,t,e)];switch(o.type){case"FooterLogo":{const r=R(t.align),n=e("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(O*((a(t.widthPct)??100)/100)),href:"/",align:r,...D(t)}),p=h(t.tagline).trim();return p?[n,e("Text",{text:p,tone:"dim",align:r,_partStyles:{text:{...B}}})]:[n]}case"FooterText":{const r=typeof t.size=="string"&&t.size in g?t.size:b;return[e("Text",{text:h(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:g[r],lineHeight:E}}})]}case"FooterDivider":{const r=a(t.thickness),n=a(t.lengthPct);return[e("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{[P("mobile")]:!0}:{}})]}case"FooterGroup":{const r=Array.isArray(t.blocks)?t.blocks:[];return[e(d,{direction:t.direction==="horizontal"?"row":"column",gap:_("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 Y(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:G,content:l}),r=[];let n=[];for(const l of i){const u=F(l,e,t);if(l.type==="FooterDivider"){n.length&&r.push(c(n)),n=[],r.push(...u);continue}u.length<=1?n.push(...u):n.push(e(d,{direction:"column",gap:N,align:"stretch",...m,content:u}))}(n.length||!r.length)&&r.push(c(n));const p=e(d,{direction:"column",content:[e("LegalLineBlock")]}),f=x(A,s,[...r,p]);return{...f,props:{...f.props,...o?.props?.width==="full"?{fullWidth:!0}:{}}}}export{W as FOOTER_MARK_SIZES,g as FOOTER_TEXT_PX,Y 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{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 +1 @@
1
- import{BOX_LABEL as n,SECTION_CATALOG as p}from"./section-catalog.js";const o="content",L="Flex",s="Text & media",i="Layout & structure",c=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"},{type:"Contents",label:"Contents"}],y=[...c,{type:"ListSearch",label:"List search"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats",retired:!0},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos",retired:!0},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:s})),u=(p.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:i})),r=[...y,...u],l=[...c,{type:"HeroGroup",label:n}],S=l.map(e=>e.type),E=1,O=l.filter(e=>e.type!=="HeroGroup");function b(e){return e<E?l:O}const C={Flex:{slot:o,choices:()=>r},Grid:{slot:o,choices:()=>r},HeroGroup:{slot:o,choices:b}};function T(e,a=0){const t=C[e];return t?{slot:t.slot,choices:t.choices(a)}:null}export{L as BOX_TYPE,o as CONTAINER_BLOCKS_SLOT,r as CONTAINER_BLOCK_CHOICES,S as HERO_GROUP_BLOCK_TYPES,E as HERO_GROUP_NEST_DEPTH,T as containerBlocksFor};
1
+ import{BOX_LABEL as n,SECTION_CATALOG as p}from"./section-catalog.js";import{ownEntry as s}from"../own-entry.js";const o="content",T="Flex",i="Text & media",y="Layout & structure",c=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"},{type:"Contents",label:"Contents"}],E=[...c,{type:"ListSearch",label:"List search"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats",retired:!0},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos",retired:!0},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:i})),u=(p.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:y})),r=[...E,...u],l=[...c,{type:"HeroGroup",label:n}],B=l.map(e=>e.type),O=1,b=l.filter(e=>e.type!=="HeroGroup");function C(e){return e<O?l:b}const _={Flex:{slot:o,choices:()=>r},Grid:{slot:o,choices:()=>r},HeroGroup:{slot:o,choices:C}};function m(e,a=0){const t=s(_,e);return t?{slot:t.slot,choices:t.choices(a)}:null}export{T as BOX_TYPE,o as CONTAINER_BLOCKS_SLOT,r as CONTAINER_BLOCK_CHOICES,B as HERO_GROUP_BLOCK_TYPES,O as HERO_GROUP_NEST_DEPTH,m as containerBlocksFor};
@@ -1 +1 @@
1
- import e from"./media-manifest.json";import{boxNamesRowPicture as r}from"../content/box-background.js";import{rowBound as i}from"../content/card-template.js";import{BOX_TYPE as p}from"./container-blocks.js";const c=e.mediaFields,m=/video|poster|focal|phone/i;function n(o){return(c[o]??[]).find(t=>!t.includes("[]")&&!m.test(t))??null}function a(o){const t=n(o.type);return o.type!==p?t&&i(o.type,o.props,t)?{fromData:!0}:t:r(o.props)?{fromData:!0}:t}const d={adds:{kind:"block",type:"ImageBlock"},kinds:["image"],pictureOf:a,create:(o,t)=>({type:"ImageBlock",props:{...t.nodeDefaults("ImageBlock"),id:t.newNodeId("ImageBlock"),src:o.url}})};export{d as WEBSITE_MEDIA_DROP,n as mainPicturePath};
1
+ import r from"./media-manifest.json";import{boxNamesRowPicture as e}from"../content/box-background.js";import{rowBound as i}from"../content/card-template.js";import{BOX_TYPE as p}from"./container-blocks.js";import{ownEntry as m}from"../own-entry.js";const n=r.mediaFields,c=/video|poster|focal|phone/i;function a(o){return(m(n,o)??[]).find(t=>!t.includes("[]")&&!c.test(t))??null}function s(o){const t=a(o.type);return o.type!==p?t&&i(o.type,o.props,t)?{fromData:!0}:t:e(o.props)?{fromData:!0}:t}const E={adds:{kind:"block",type:"ImageBlock"},kinds:["image"],pictureOf:s,create:(o,t)=>({type:"ImageBlock",props:{...t.nodeDefaults("ImageBlock"),id:t.newNodeId("ImageBlock"),src:o.url}})};export{E as WEBSITE_MEDIA_DROP,a as mainPicturePath};
@@ -1 +1 @@
1
- import{parseHexColor as u}from"efficient-shell/format";import{COLOR_SLOTS as a,FILL_COLOR_SLOTS as O,colorRole as w,fillColorRole as m}from"efficient-shell/markup";import{themeSlotOf as p,UNREAD_INK as L}from"./theme-slots.js";function e(t){return p(t)?.ink??""}function I(t){if(typeof t!="string")return null;const o=m(t.trim());return o?.kind==="slot"&&e(o.slot)?o.slot:null}const d={accent:"main",labels:"muted"};function S(t){return Object.hasOwn(d,t)?d[t]:t}function N(t){if(!t)return"";if(t.startsWith("#"))return u(t)===t.toLowerCase()?t:"";const o=w(S(t));return o?.kind==="slot"?e(o.slot):""}function b(t,o=a){return o.flatMap(n=>{const r=p(n);return r?.ink?[{name:n,label:r.label(),value:t?.[n]||L}]:[]})}function _(t){const o=m(S(t));return o?.kind==="slot"?e(o.slot):""}function R(t){const o=t?.trim();return o?O.find(n=>e(n)===o)??null:null}function T(t){const o={},n=t.ownerDocument,r=n?.defaultView;if(!n||!r)return o;const x=r.getComputedStyle(t),l=n.createElement("canvas").getContext("2d");for(const c of a){const f=e(c);if(!f)continue;const C=f.replace(/^var\((--[\w-]+)\)$/,"$1"),s=x.getPropertyValue(C).trim();if(!s)continue;let i=k(s);!i&&l&&(l.fillStyle="#000000",l.fillStyle=s,i=k(String(l.fillStyle))),i&&(o[c]=i)}return o}function k(t){const o=t.trim().toLowerCase();if(o.startsWith("#"))return u(o);const n=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return n?`#${n.slice(1,4).map(r=>Math.min(255,Number(r)).toString(16).padStart(2,"0")).join("")}`:null}export{_ as fillInkCss,I as fillSlotNamed,R as fillSlotOfInk,e as inkTokenOf,S as partColourName,N as partInkCss,b as partThemeColors,T as readInks};
1
+ import{parseHexColor as u}from"efficient-shell/format";import{COLOR_SLOTS as a,FILL_COLOR_SLOTS as C,colorRole as O,fillColorRole as m}from"efficient-shell/markup";import{themeSlotOf as p,UNREAD_INK as w}from"./theme-slots.js";import{ownEntry as L}from"../own-entry.js";function e(t){return p(t)?.ink??""}function _(t){if(typeof t!="string")return null;const o=m(t.trim());return o?.kind==="slot"&&e(o.slot)?o.slot:null}const y={accent:"main",labels:"muted"};function d(t){return L(y,t)??t}function b(t){if(!t)return"";if(t.startsWith("#"))return u(t)===t.toLowerCase()?t:"";const o=O(d(t));return o?.kind==="slot"?e(o.slot):""}function R(t,o=a){return o.flatMap(n=>{const r=p(n);return r?.ink?[{name:n,label:r.label(),value:t?.[n]||w}]:[]})}function E(t){const o=m(d(t));return o?.kind==="slot"?e(o.slot):""}function T(t){const o=t?.trim();return o?C.find(n=>e(n)===o)??null:null}function D(t){const o={},n=t.ownerDocument,r=n?.defaultView;if(!n||!r)return o;const k=r.getComputedStyle(t),l=n.createElement("canvas").getContext("2d");for(const c of a){const f=e(c);if(!f)continue;const x=f.replace(/^var\((--[\w-]+)\)$/,"$1"),s=k.getPropertyValue(x).trim();if(!s)continue;let i=S(s);!i&&l&&(l.fillStyle="#000000",l.fillStyle=s,i=S(String(l.fillStyle))),i&&(o[c]=i)}return o}function S(t){const o=t.trim().toLowerCase();if(o.startsWith("#"))return u(o);const n=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return n?`#${n.slice(1,4).map(r=>Math.min(255,Number(r)).toString(16).padStart(2,"0")).join("")}`:null}export{E as fillInkCss,_ as fillSlotNamed,T as fillSlotOfInk,e as inkTokenOf,d as partColourName,b as partInkCss,R as partThemeColors,D as readInks};
@@ -1 +1 @@
1
- function i(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function a(t,r){return i(t?.[r])??{}}function d(t,r,e){const n=a(t,r);return Object.hasOwn(n,e)?i(n[e])??{}:{}}function b(t,r,e,n){const{[e]:u,...o}=a(t,r),c=n?{...o,[e]:n}:o,{[r]:f,...s}=t;return Object.keys(c).length?{...s,[r]:c}:s}export{i as plainRecord,b as propsWithPartRecord,d as readPartRecord,a as readPartRecords};
1
+ import{ownEntry as f}from"../own-entry.js";function i(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function a(t,r){return i(t?.[r])??{}}function x(t,r,n){const o=a(t,r);return i(f(o,n))??{}}function R(t,r,n,o){const{[n]:u,...e}=a(t,r),c=o?{...e,[n]:o}:e,{[r]:d,...s}=t;return Object.keys(c).length?{...s,[r]:c}:s}export{i as plainRecord,R as propsWithPartRecord,x as readPartRecord,a as readPartRecords};
@@ -1 +1 @@
1
- import{SECTION_LABELS as e}from"../section-catalog.js";const t={name:"catalogueLabel",applies:a=>Object.prototype.hasOwnProperty.call(e,a),draw(a,l){a.label=e[l]}};export{t as catalogueLabel};
1
+ import{SECTION_LABELS as o}from"../section-catalog.js";import{hasOwnEntry as r,ownEntry as t}from"../../own-entry.js";const m={name:"catalogueLabel",applies:a=>r(o,a),draw(a,e){a.label=t(o,e)}};export{m as catalogueLabel};
@@ -1 +1 @@
1
- import{isMediaValueObject as o,mapAtMediaPath as i}from"../../media-value.js";import s from"../media-manifest.json";const a=s.mediaFields,d=e=>o(e)?e.src:e;function m(e,r){let t=r;for(const n of a[e]??[])t=i(t,n,d);return t}const f={name:"mediaValues",applies:(e,r,t)=>typeof t?.render=="function"&&(a[e]?.length??0)>0,draw(e,r){const t=e.render;e.render=n=>t(m(r,n))}};export{m as mediaPropsDrawn,f as mediaValues};
1
+ import{isMediaValueObject as i,mapAtMediaPath as s}from"../../media-value.js";import d from"../media-manifest.json";import{ownEntry as o}from"../../own-entry.js";const a=d.mediaFields,m=e=>i(e)?e.src:e;function p(e,t){let r=t;for(const n of o(a,e)??[])r=s(r,n,m);return r}const u={name:"mediaValues",applies:(e,t,r)=>typeof r?.render=="function"&&(o(a,e)?.length??0)>0,draw(e,t){const r=e.render;e.render=n=>r(p(t,n))}};export{p as mediaPropsDrawn,u as mediaValues};
@@ -1 +1 @@
1
- import{isNodeList as d}from"efficient-easel/data";import{boxCardProps as y}from"../content/box-background.js";import{boxChildrenHand as a}from"../content/mirror-cards.js";import{imageTextRowsHand as l}from"../content/image-text-rows.js";import{cardCopyPlace as C,cardTemplateCardOwner as h}from"../content/card-template.js";import{BOX_TYPE as f,CONTAINER_BLOCKS_SLOT as c}from"./container-blocks.js";import{findParentNode as x}from"./passes/document-position.js";const m={ProcessSteps:{slot:"boxes",hand:l}},u=(n,r,o)=>d(n.props?.[r])&&(n.props?.[r]).some(t=>t?.props?.id===o);function b(n,r){const o=x(n,r);if(o===void 0)return;if(o!==null){const s=typeof o.type=="string"?o.type:"";if(s===f&&u(o,c,r)){const i=C(n,o.props?.id)?.inCopy===!0;return a(y(o.props??{},i),i)}const e=m[s];if(e&&u(o,e.slot,r))return e.hand(o.props??{})}const t=h(n,r),p=t&&typeof t.type=="string"?m[t.type]:void 0;return p&&t?p.hand(t.props??{}):null}function g(n){const r=n?.[c];return d(r)&&r.some(o=>o?.type===f)}export{b as handedRowOf,g as holdsABox};
1
+ import{isNodeList as d}from"efficient-easel/data";import{boxCardProps as a}from"../content/box-background.js";import{boxChildrenHand as l}from"../content/mirror-cards.js";import{imageTextRowsHand as C}from"../content/image-text-rows.js";import{cardCopyPlace as h,cardTemplateCardOwner as x}from"../content/card-template.js";import{BOX_TYPE as f,CONTAINER_BLOCKS_SLOT as m}from"./container-blocks.js";import{findParentNode as O}from"./passes/document-position.js";import{ownEntry as c}from"../own-entry.js";const u={ProcessSteps:{slot:"boxes",hand:C}},y=(n,r,o)=>d(n.props?.[r])&&(n.props?.[r]).some(t=>t?.props?.id===o);function A(n,r){const o=O(n,r);if(o===void 0)return;if(o!==null){const s=typeof o.type=="string"?o.type:"";if(s===f&&y(o,m,r)){const i=h(n,o.props?.id)?.inCopy===!0;return l(a(o.props??{},i),i)}const e=c(u,s);if(e&&y(o,e.slot,r))return e.hand(o.props??{})}const t=x(n,r),p=t&&typeof t.type=="string"?c(u,t.type):void 0;return p&&t?p.hand(t.props??{}):null}function B(n){const r=n?.[m];return d(r)&&r.some(o=>o?.type===f)}export{A as handedRowOf,B as holdsABox};
@@ -1,4 +1,4 @@
1
- const m=["general","commerce","service"],o=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function y(){return Object.fromEntries(o.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}const l="2027-02-05",s={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
1
+ import{ownEntry as s}from"../own-entry.js";const b=["general","commerce","service"],o=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function g(){return Object.fromEntries(o.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}const d="2027-02-05",n={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
2
2
 
3
3
  WHAT REPLACES IT: Tab Bar, a Box pinned under the header that stays above the sections after it, with a line below, holding the Menu block (One row, Menu style Tabs, Current page). Set the Menu's content to Blog categories: the blog's own categories, most posts first, each with its count in its cell (the host seeds the count card, Count on). Its converter row (\`section-to-box-rows-tabbar\` \`categoryBar\`, OFF) draws that bar for a stored page that moves later.
4
4
 
@@ -28,7 +28,7 @@ WHAT REPLACES IT: a Cards section with Card style set to Label only. Every cell
28
28
 
29
29
  WHAT A MERCHANT LOSES on a NEW Label only section: nothing this section had. It GAINS the Cards head split (its head can move into a box of its own), which Key Features never had: that head draws the shared \`simple\` head, eyebrow ABOVE the heading, where Key Features drew it beside.
30
30
 
31
- THE TYPE KEY STAYS AND SO DOES THE COMPONENT, until the stored nodes move (delete date ${l}). Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`},DeliveryOptions:{label:"Delivery Options",note:"Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids — Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).\n\nWHAT REPLACES IT: Cards with Card content set to Delivery options, drawn from its card template: the backend's `delivery-options` rows (name, price, time, note), one card each, in the website's own currency. The one Highlighted card row and the Highlight badge replace the per-option Highlight switch.\n\nWHAT A MERCHANT LOSES: more than one highlighted option (Lewis approved ONE Highlighted card row, 2026-10-10). No stored node held two.\n\nNO CONVERTER ROW: 0 DeliveryOptions nodes on the US sites, draft or published (read only, 2026-11-04). This entry is its reason in the guard (`scripts/test-section-to-box.tsx` §5).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks). A Delivery Options anywhere still renders through it and can still be edited; no document is rewritten.\n\nDELETE DATE 2026-12-18: the retired component in efficient-storefront-blocks (`components/DeliveryOptions`, `DeliveryOptionsSource`, `blocks/commerce/DeliveryOptions`) goes then, in a storefront-blocks follow-up. 0 stored DeliveryOptions nodes on the 34 US pages, draft or published (read only, 2026-11-08), and no converter row is coming."},Series:{label:"Recurring Columns",note:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids — Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
31
+ THE TYPE KEY STAYS AND SO DOES THE COMPONENT, until the stored nodes move (delete date ${d}). Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`},DeliveryOptions:{label:"Delivery Options",note:"Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids — Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).\n\nWHAT REPLACES IT: Cards with Card content set to Delivery options, drawn from its card template: the backend's `delivery-options` rows (name, price, time, note), one card each, in the website's own currency. The one Highlighted card row and the Highlight badge replace the per-option Highlight switch.\n\nWHAT A MERCHANT LOSES: more than one highlighted option (Lewis approved ONE Highlighted card row, 2026-10-10). No stored node held two.\n\nNO CONVERTER ROW: 0 DeliveryOptions nodes on the US sites, draft or published (read only, 2026-11-04). This entry is its reason in the guard (`scripts/test-section-to-box.tsx` §5).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks). A Delivery Options anywhere still renders through it and can still be edited; no document is rewritten.\n\nDELETE DATE 2026-12-18: the retired component in efficient-storefront-blocks (`components/DeliveryOptions`, `DeliveryOptionsSource`, `blocks/commerce/DeliveryOptions`) goes then, in a storefront-blocks follow-up. 0 stored DeliveryOptions nodes on the 34 US pages, draft or published (read only, 2026-11-08), and no converter row is coming."},Series:{label:"Recurring Columns",note:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids — Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
32
32
 
33
33
  WHAT REPLACES IT: Cards drawn from its card template. A column's number is Number, its "Right Top Text" Corner note, its title Card title, its words Card body, its count and label one Count, and the one \`viewLabel\` a plain Text typed once in the template, so every card shows it; the background is the Box's. The converter row (\`section-to-box-rows-cards.ts\`, OFF) lays down that Cards inside a Box.
34
34
 
@@ -70,4 +70,4 @@ WHAT A MERCHANT LOSES: the label as a section of its own, with its fixed head ("
70
70
 
71
71
  NO CONVERTER ROW: 0 EU Tyre Labels are stored on the US and AU sites (inovit_us and inovit_au, \`layout\` and \`published_layout\`; read only, 2026-11-10). Old sites stay as they are (owner, 2026-11-06).
72
72
 
73
- THE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks EuTyreLabels). A stored EU Tyre Label still renders through it and can still be edited, its width, heading level, settings groups and cover included; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items · Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. ⛔ A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},d=Object.fromEntries(Object.entries(s).map(([e,t])=>[e,t.note])),b=["Grid","Spacer","TyreFitment"],g=Array.from(new Set([...o.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(d)])),c=Object.fromEntries(Object.entries(s).map(([e,t])=>[e,t.label])),T={...c,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.label])))},h={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},a={...h,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.set])))},w={DocTabs:{set:"service",reason:"the Tab Bar press holds the Menu block, whose only source is a Console menu; a stored bar's typed tabs need nothing, so the Tab Bar stays general"}};function E(e){return Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0}function r(e){return Object.keys(a).filter(t=>a[t]===e).sort()}const S=r("general"),f=r("commerce"),O=r("service"),p="Flex",n="Box",v=`${n}es`;function u(e){return e==="section"?"Blank section":n}function A(e,t,i){return e===p?u(t):i}export{g as ALL_SECTION_TYPES,m as BLOCK_SETS,n as BOX_LABEL,v as BOX_LABEL_PLURAL,f as COMMERCE_BLOCKS,S as GENERAL_BLOCKS,l as KEY_FEATURES_DELETE_BY,p as LEVEL_NAMED_TYPE,w as PRESS_NEEDS_SET,b as RETIRED_NESTABLE_SECTIONS,d as RETIRED_SECTIONS,c as RETIRED_SECTION_LABELS,o as SECTION_CATALOG,T as SECTION_LABELS,O as SERVICE_BLOCKS,h as UNLISTED_BLOCK_SETS,E as blockSetOf,r as blocksInSet,y as buildBlockCategories,A as labelAtLevel,u as labelForFlex};
73
+ THE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks EuTyreLabels). A stored EU Tyre Label still renders through it and can still be edited, its width, heading level, settings groups and cover included; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items · Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. ⛔ A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},c=Object.fromEntries(Object.entries(n).map(([e,t])=>[e,t.note])),T=["Grid","Spacer","TyreFitment"],w=Array.from(new Set([...o.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(c)])),h=Object.fromEntries(Object.entries(n).map(([e,t])=>[e,t.label])),E={...h,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.label])))},p={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},a={...p,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.set])))},S={DocTabs:{set:"service",reason:"the Tab Bar press holds the Menu block, whose only source is a Console menu; a stored bar's typed tabs need nothing, so the Tab Bar stays general"}};function f(e){return s(a,e)}function r(e){return Object.keys(a).filter(t=>s(a,t)===e).sort()}const O=r("general"),v=r("commerce"),A=r("service"),u="Flex",i="Box",C=`${i}es`;function m(e){return e==="section"?"Blank section":i}function k(e,t,l){return e===u?m(t):l}export{w as ALL_SECTION_TYPES,b as BLOCK_SETS,i as BOX_LABEL,C as BOX_LABEL_PLURAL,v as COMMERCE_BLOCKS,O as GENERAL_BLOCKS,d as KEY_FEATURES_DELETE_BY,u as LEVEL_NAMED_TYPE,S as PRESS_NEEDS_SET,T as RETIRED_NESTABLE_SECTIONS,c as RETIRED_SECTIONS,h as RETIRED_SECTION_LABELS,o as SECTION_CATALOG,E as SECTION_LABELS,A as SERVICE_BLOCKS,p as UNLISTED_BLOCK_SETS,f as blockSetOf,r as blocksInSet,g as buildBlockCategories,k as labelAtLevel,m as labelForFlex};
@@ -1 +1 @@
1
- import{CUSTOM_FIELD_VALUES as n}from"./neutralization-contracts.js";import{HYDRATED_LISTS as u,SNAPSHOT_OBJECTS as c}from"./snapshot-contracts.js";import{nonEmptyString as s}from"../non-empty-string.js";function O(){const o=new Set([...Object.keys(c),...Object.keys(u)]);for(const[t,e]of Object.entries(n))for(const r of Object.values(e))r.verb==="snapshot"&&o.add(t);return[...o].sort()}function p(o){const t=new Set([...Object.keys(c[o]??{}),...u[o]??[]]);for(const[e,r]of Object.entries(n[o]??{}))r.verb==="snapshot"&&t.add(e);return[...t].sort()}const d={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},m={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},b="Open",g={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function a(o){const e=o?.source?.slug;return s(e)}function l(o){return d[o]??null}function y(o,t){const e=l(o);return e&&p(o).includes(t)?e:null}function E(o){const e=o?.menu?.id;return s(e)}export{d as PART_SOURCES,g as SOURCE_ACTIONS,b as SOURCE_ACTION_LABEL,m as SOURCE_LINES,p as hydratedPropsOf,y as partSourceNoteFor,l as partSourceOf,O as sourceBoundBlocks,E as sourceMenuIdOf,a as sourceSlugOf};
1
+ import{CUSTOM_FIELD_VALUES as u}from"./neutralization-contracts.js";import{HYDRATED_LISTS as c,SNAPSHOT_OBJECTS as s}from"./snapshot-contracts.js";import{nonEmptyString as p}from"../non-empty-string.js";import{ownEntry as r}from"../own-entry.js";function b(){const o=new Set([...Object.keys(s),...Object.keys(c)]);for(const[t,e]of Object.entries(u))for(const n of Object.values(e))n.verb==="snapshot"&&o.add(t);return[...o].sort()}function d(o){const t=new Set([...Object.keys(r(s,o)??{}),...r(c,o)??[]]);for(const[e,n]of Object.entries(r(u,o)??{}))n.verb==="snapshot"&&t.add(e);return[...t].sort()}const l={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},g={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},a="Open",y={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function E(o){const e=o?.source?.slug;return p(e)}function f(o){return r(l,o)??null}function C(o,t){const e=f(o);return e&&d(o).includes(t)?e:null}function x(o){const e=o?.menu?.id;return p(e)}export{l as PART_SOURCES,y as SOURCE_ACTIONS,a as SOURCE_ACTION_LABEL,g as SOURCE_LINES,d as hydratedPropsOf,C as partSourceNoteFor,f as partSourceOf,b as sourceBoundBlocks,x as sourceMenuIdOf,E as sourceSlugOf};
@@ -1 +1 @@
1
- import{isMediaValueObject as d,mapAtMediaPath as m}from"../media-value.js";import f from"./media-manifest.json";const i=f.mediaFields,c=f.snapshotObjects,a=f.hydratedLists;function y(r){return typeof r=="string"||d(r)?"":Array.isArray(r)?[]:r&&typeof r=="object"?null:r}function p(r,e){if(Array.isArray(r))return r.map(t=>p(t,e));if(!r||typeof r!="object")return r;const n=r,o={};for(const t of e)t in n&&(o[t]=n[t]);return o}function A(r,e){let n=e;for(const t of i[r]??[])n=m(n,t,y);const o=c[r];if(o)for(const[t,s]of Object.entries(o))t in n&&(n={...n,[t]:p(n[t],s.keep)});for(const t of a[r]??[])Array.isArray(n[t])&&(n={...n,[t]:[]});return n}function h(r,e){return typeof e!="function"?e:n=>e(A(r,n))}function j(r,e){if(!e)return r;const n=r,o={};for(const[t,s]of Object.entries(n.components)){const u=(i[t]?.length??0)>0||c[t]||a[t];o[t]=u&&s.render?{...s,render:h(t,s.render)}:s}return{...n,components:o}}export{j as withTemplateMediaPlaceholders};
1
+ import{isMediaValueObject as m,mapAtMediaPath as y}from"../media-value.js";import s from"./media-manifest.json";import{ownEntry as i}from"../own-entry.js";const c=s.mediaFields,a=s.snapshotObjects,p=s.hydratedLists;function A(r){return typeof r=="string"||m(r)?"":Array.isArray(r)?[]:r&&typeof r=="object"?null:r}function u(r,o){if(Array.isArray(r))return r.map(t=>u(t,o));if(!r||typeof r!="object")return r;const n=r,e={};for(const t of o)t in n&&(e[t]=n[t]);return e}function h(r,o){let n=o;for(const t of i(c,r)??[])n=y(n,t,A);const e=i(a,r);if(e)for(const[t,f]of Object.entries(e))t in n&&(n={...n,[t]:u(n[t],f.keep)});for(const t of i(p,r)??[])Array.isArray(n[t])&&(n={...n,[t]:[]});return n}function b(r,o){return typeof o!="function"?o:n=>o(h(r,n))}function M(r,o){if(!o)return r;const n=r,e={};for(const[t,f]of Object.entries(n.components)){const d=(i(c,t)?.length??0)>0||i(a,t)||i(p,t);e[t]=d&&f.render?{...f,render:b(t,f.render)}:f}return{...n,components:e}}export{M as withTemplateMediaPlaceholders};
@@ -1 +1 @@
1
- import{parseHexColor as f}from"efficient-shell/format";import{FILL_COLOR_SLOTS as p}from"efficient-shell/markup";import{say as o}from"../editor-words.js";import{SECTION_PALETTE as h}from"../content/ink.js";import{COLOUR_TOKEN as a}from"../word-styles.js";import{normalizeTheme as T}from"../theme.js";const l=e=>{const n=h.find(t=>t.role===e);return n?`var(${n.token})`:""},b=e=>l(e)?`var(--theme-${e})`:"",m={main:{ink:a.accent,page:a.accent,key:"accent",label:()=>o("Main"),words:e=>o("Theme {n} main color",{n:e})},text:{ink:a.text,page:a.text,key:"text",label:()=>o("Text"),words:e=>o("Theme {n} text color",{n:e})},background:{ink:l("bg"),page:b("bg"),key:"background",label:()=>o("Background"),words:e=>o("Theme {n} background",{n:e})},muted:{ink:a.labels,page:a.labels,key:"muted",label:()=>o("Muted"),words:e=>o("Theme {n} muted color",{n:e})},surface:{ink:l("surface"),page:l("surface"),key:"surface",label:()=>o("Surface"),words:e=>o("Theme {n} surface color",{n:e})}};function i(e){return Object.hasOwn(m,e)?m[e]:void 0}const x="#9ca3af";function g(e,n,t){const r=i(e);return r?{hex:f(n[r.key]??"")??"",words:r.words(t)}:null}function C(e,n){return p.flatMap(t=>{const r=g(t,e,n);return r&&i(t)?.ink?[{name:t,label:r.words,value:r.hex||x}]:[]})}const w=["main","text","background"];function I(e){const n=new Set,t=[];return T(e).themes.forEach((r,d)=>{for(const k of w){const c=i(k),u=c?r[c.key]:void 0,s=typeof u=="string"&&u?f(u):null;!c||!s||n.has(s)||(n.add(s),t.push({value:s,label:c.words(d+1)}))}}),t}export{x as UNREAD_INK,C as fillThemeColors,g as slotFill,I as themePresets,i as themeSlotOf};
1
+ import{parseHexColor as m}from"efficient-shell/format";import{FILL_COLOR_SLOTS as p}from"efficient-shell/markup";import{say as o}from"../editor-words.js";import{SECTION_PALETTE as k}from"../content/ink.js";import{COLOUR_TOKEN as a}from"../word-styles.js";import{normalizeTheme as h}from"../theme.js";import{ownEntry as T}from"../own-entry.js";const l=e=>{const r=k.find(t=>t.role===e);return r?`var(${r.token})`:""},x=e=>l(e)?`var(--theme-${e})`:"",b={main:{ink:a.accent,page:a.accent,key:"accent",label:()=>o("Main"),words:e=>o("Theme {n} main color",{n:e})},text:{ink:a.text,page:a.text,key:"text",label:()=>o("Text"),words:e=>o("Theme {n} text color",{n:e})},background:{ink:l("bg"),page:x("bg"),key:"background",label:()=>o("Background"),words:e=>o("Theme {n} background",{n:e})},muted:{ink:a.labels,page:a.labels,key:"muted",label:()=>o("Muted"),words:e=>o("Theme {n} muted color",{n:e})},surface:{ink:l("surface"),page:l("surface"),key:"surface",label:()=>o("Surface"),words:e=>o("Theme {n} surface color",{n:e})}};function i(e){return T(b,e)}const g="#9ca3af";function w(e,r,t){const n=i(e);return n?{hex:m(r[n.key]??"")??"",words:n.words(t)}:null}function v(e,r){return p.flatMap(t=>{const n=w(t,e,r);return n&&i(t)?.ink?[{name:t,label:n.words,value:n.hex||g}]:[]})}const y=["main","text","background"];function M(e){const r=new Set,t=[];return h(e).themes.forEach((n,f)=>{for(const d of y){const s=i(d),u=s?n[s.key]:void 0,c=typeof u=="string"&&u?m(u):null;!s||!c||r.has(c)||(r.add(c),t.push({value:c,label:s.words(f+1)}))}}),t}export{g as UNREAD_INK,v as fillThemeColors,w as slotFill,M as themePresets,i as themeSlotOf};
@@ -1 +1 @@
1
- import{nonEmptyString as i}from"./non-empty-string.js";const u="en";let e=null,c=u,l=null;function a(r,t,o){e=r??null,c=t||u,l=o??null}function x(){return l}function s(){return c}function E(){return e}function f(r,t){return t?r.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(o,n)=>Object.prototype.hasOwnProperty.call(t,n)?String(t[n]):o):r}function d(r,t){const o=e?e[r]:void 0;if(typeof o=="function"){try{const n=i(o(t??{}));if(n)return n}catch{}return f(r,t)}return f(i(o)??r,t)}function y(r,t,o,n){return d(o===1?r:t,{...n,n:o})}export{u as EDITOR_WORDS_DEFAULT_LOCALE,a as configureEditorWords,x as editorEaselWords,E as editorWords,s as editorWordsLocale,f as fillWords,d as say,y as sayCount};
1
+ import{nonEmptyString as i}from"./non-empty-string.js";import{hasOwnEntry as p,ownEntry as u}from"./own-entry.js";const f="en";let e=null,c=f,d=null;function s(t,r,n){e=t??null,c=r||f,d=n??null}function y(){return d}function W(){return c}function m(){return e}function l(t,r){return r?t.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(n,o)=>p(r,o)?String(u(r,o)):n):t}function E(t,r){const n=e?u(e,t):void 0;if(typeof n=="function"){try{const o=i(n(r??{}));if(o)return o}catch{}return l(t,r)}return l(i(n)??t,r)}function L(t,r,n,o){return E(n===1?t:r,{...o,n})}export{f as EDITOR_WORDS_DEFAULT_LOCALE,s as configureEditorWords,y as editorEaselWords,m as editorWords,W as editorWordsLocale,l as fillWords,E as say,L as sayCount};
@@ -6,4 +6,9 @@ export declare const HEADER_LOGO_PX: {
6
6
  export declare const FOOTER_LOGO_PX = 44;
7
7
  export declare const HEADER_LOGO_PX_MIN = 16;
8
8
  export declare const HEADER_LOGO_PX_MAX = 140;
9
+ export declare const HEADER_LOGO_GRID: {
10
+ readonly min: 16;
11
+ readonly max: 140;
12
+ readonly step: 1;
13
+ };
9
14
  export declare const LOGO_BLOCK_PX_MAX: number;
@@ -1 +1 @@
1
- const _={small:54,medium:66,large:84},O=44,o=16,t=140,e=O*4;export{O as FOOTER_LOGO_PX,_ as HEADER_LOGO_PX,t as HEADER_LOGO_PX_MAX,o as HEADER_LOGO_PX_MIN,e as LOGO_BLOCK_PX_MAX};
1
+ const o={small:54,medium:66,large:84},O=44,_=16,t=140,e={min:_,max:t,step:1},E=O*4;export{O as FOOTER_LOGO_PX,e as HEADER_LOGO_GRID,o as HEADER_LOGO_PX,t as HEADER_LOGO_PX_MAX,_ as HEADER_LOGO_PX_MIN,E as LOGO_BLOCK_PX_MAX};
@@ -0,0 +1,2 @@
1
+ export declare function ownEntry<V>(map: Readonly<Record<string, V>>, key: string): V | undefined;
2
+ export declare function hasOwnEntry(map: Readonly<Record<string, unknown>>, key: string): boolean;
@@ -0,0 +1 @@
1
+ function r(n,t){return Object.hasOwn(n,t)?n[t]:void 0}function e(n,t){return Object.hasOwn(n,t)}export{e as hasOwnEntry,r as ownEntry};
@@ -1,3 +1,4 @@
1
+ import type { LengthUnit } from "efficient-easel/screen/lib/content/length-units";
1
2
  export type PreviewHeaderSettings = {
2
3
  logoUrl: string | null;
3
4
  reverseLogo: boolean;
@@ -6,6 +7,7 @@ export type PreviewHeaderSettings = {
6
7
  logoPosition: "left" | "center" | "right";
7
8
  logoSize: "small" | "medium" | "large";
8
9
  logoSizePx: number | null;
10
+ logoSizeUnit?: LengthUnit | null;
9
11
  menuItems: {
10
12
  label: string;
11
13
  url: string;
@@ -19,6 +21,7 @@ export type PreviewHeaderSettings = {
19
21
  menuPosition: "left" | "center" | "right" | "beside";
20
22
  menuRow: "top" | "bottom" | "inline";
21
23
  menuGapPx?: number | null;
24
+ menuGapUnit?: LengthUnit | null;
22
25
  searchEnabled: boolean;
23
26
  searchPosition: "left" | "right";
24
27
  searchRow: "top" | "bottom";
@@ -1 +1 @@
1
- let e={};function n(t){return e=t?.theme?{theme:t.theme}:{},e}function r(t){e===t&&(e={})}function o(){return e}export{o as activePressContext,r as clearActivePressContext,n as setActivePressContext};
1
+ let t={};function i(e){return t={...e?.theme?{theme:e.theme}:{},...e?.site?{site:e.site}:{}},t}function n(e){t===e&&(t={})}function r(){return t}export{r as activePressContext,n as clearActivePressContext,i as setActivePressContext};