efficient-web-builder 47.0.0 → 47.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/editor/components/BlockGapField.d.ts +15 -1
- package/dist/editor/components/BlockGapField.js +1 -1
- package/dist/editor/components/DuplicateToPageMenu.d.ts +2 -0
- package/dist/editor/components/DuplicateToPageMenu.js +1 -1
- package/dist/editor/components/SideSpaceField.d.ts +31 -1
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +10 -0
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/lib/animation/AnimationDurationRow.d.ts +4 -0
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/loop-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +33 -0
- package/dist/editor/lib/document/card-display-chips.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +13 -0
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/live-number-field.d.ts +12 -0
- package/dist/editor/lib/document/live-number-field.js +1 -0
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/editor-document-adapter.d.ts +5 -1
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/editor/lib/sections/section-dry-run.d.ts +34 -0
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/format/lib/animation/index.d.ts +1 -0
- package/dist/format/lib/animation/index.js +1 -1
- package/dist/format/lib/content/block-sources.d.ts +9 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +12 -1
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +1 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +9 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/count-numbers.d.ts +7 -0
- package/dist/format/lib/content/count-numbers.js +1 -0
- package/dist/format/lib/content/page-width.d.ts +11 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +1 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/content/site-gutter.d.ts +6 -0
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/document/easel-row-words.d.ts +1 -0
- package/dist/format/lib/document/easel-row-words.js +1 -1
- package/dist/format/lib/document/panel-bands.d.ts +1 -0
- package/dist/format/lib/document/panel-bands.js +1 -1
- package/dist/format/lib/document/passes/settings-groups.js +1 -1
- package/dist/format/lib/document/site-gap-fields.d.ts +1 -1
- package/dist/format/lib/document/site-gap-fields.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +5 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/fit-words.js +4 -3
- package/dist/format/lib/sections/strip-shape.d.ts +1 -0
- package/dist/format/lib/sections/strip-shape.js +1 -1
- package/dist/format/lib/site-theme-row.d.ts +2 -0
- package/dist/format/lib/site-twin-row.d.ts +5 -0
- package/dist/format/lib/site-twin-row.js +1 -0
- package/dist/format/lib/source-rules/flat-theme-palette.js +1 -1
- package/dist/format/lib/source-rules/one-loop-module.js +3 -3
- package/dist/render/components/BlockFrame.d.ts +2 -1
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/CountRowsContext.d.ts +8 -0
- package/dist/render/components/CountRowsContext.js +1 -0
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +4 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +1 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +9 -1
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +10 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Text.d.ts +2 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/lib/animation/LoopTrack.d.ts +2 -2
- package/dist/render/lib/animation/LoopTrack.js +1 -1
- package/dist/render/lib/content/block-size.d.ts +2 -0
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/section-edge.d.ts +10 -0
- package/dist/render/lib/content/section-edge.js +1 -0
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +5 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +5 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{defaultTextStyles as _}from"efficient-easel/text-styles/model";import{headingDefaultPx as T}from"../../../render/components/Heading.js";import{headingLevelOfStyle as M}from"../../../render/components/Text.js";import{listToWrite as A,setStyleValues as D}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as L,bandPresetIndex as R}from"../../../format/lib/theme.js";import{convertSection as z,sectionToBoxRow as N,sectionToBoxTypes as E}from"../../../render/lib/sections/section-to-box.js";const P={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function X(e,t,i=_()){const d=s=>t==="heading"?T(M(s)):P[s];let n;for(const{id:s,kind:r}of i){const o=r===t?d(s):void 0;if(o===void 0)continue;const l=Math.abs(o-e),c=n?Math.abs(n.px-e):1/0;(l<c||l===c&&n&&o>n.px)&&(n={id:s,px:o})}if(!n)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return n.id}function C(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function K(e){const t=d=>typeof d=="string"?d: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}:{}}}const j=new Set([null,"authored"]);function v(e,t){const i=A(t),d=i.filter(s=>e.includes(s.id)&&s.values.letterCase===void 0).map(s=>s.id);return{list:d.reduce((s,r)=>D(s,r,{letterCase:"upper"}),i),changed:d.length>0}}function B(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 F(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!j.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:d}=v(e.styles,t.textStyles?t.textStylesList??null:null);return d?{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 F(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const d=i[e.page];if(!d)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(R(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const n=L(d);return{send:{kind:e.kind,page:e.page,index:i.length,preset:n,themePresets:[...i,n]}}}function Q(e,t={}){const i=[...t.types??E()],d=i.filter(p=>!N(p)),n=new Set(i.filter(p=>N(p))),s=[],r=[],o={},l={},c=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),$=new Map,k=(p,m,a)=>{const b=`${p.schema}/${p.site}`;let g=$.get(b);g||$.set(b,g={...p,facts:!!m,writes:[],undecided:[],notNeeded:[]});const h=B(a,m);if("send"in h){const u=g.writes.find(x=>JSON.stringify(x.write)===JSON.stringify(h.send));u?u.nodes+=1:g.writes.push({write:h.send,reason:a.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[w,f]="undecided"in h?[g.undecided,h.undecided]:[g.notNeeded,h.notNeeded],y=w.find(u=>u.kind===a.kind&&u.why===f);y?y.nodes+=1:w.push({kind:a.kind,why:f,nodes:1})};for(const p of e){const m=p.layout?.content;Array.isArray(m)&&m.forEach((a,b)=>{if(!a||typeof a.type!="string"||!n.has(a.type))return;const g=N(a.type),h=C(p.label),w=h?c.get(`${h.schema}/${h.site}`):void 0,f=z(a,g,w?{site:w}:{});if(f.skipped!==void 0){r.push({page:p.label,index:b,type:a.type,id:String(a.props?.id??""),why:f.skipped});return}if(h)for(const S of f.siteWrites)k(h,w,S);const y={page:p.label,index:b,type:a.type,id:String(a.props?.id??""),carried:f.carried,dropped:f.dropped,restyled:f.restyled},u=t.draw;u&&(y.before=u(a),y.after=f.nodes.map(u).join(""),y.sameMarkup=y.before===y.after),s.push(y);const x=o[a.type]??={nodes:0,pages:0,dropped:{}};x.nodes+=1,(l[a.type]??=new Set).add(p.label),x.pages=l[a.type].size;for(const S of f.dropped)x.dropped[S.key]=(x.dropped[S.key]??0)+1})}return{types:i,noRow:d,pages:e.length,nodes:s,skipped:r,byType:o,sites:[...$.values()],siteFacts:[...t.sites??[]]}}function Z(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}function I(e){const t=new Map;for(const i of e.nodes)for(const d of i.restyled){const n=d.textStyle??"none",s=P[n],r=d.size??s,o=d.sizePhone??d.size??s;if(r===void 0||o===void 0)continue;const l=d.was.size,c=d.was.sizePhone??d.was.size,$=[i.type,d.key,n,l,c,r,o].join("|"),k=t.get($);k?k.nodes+=1:t.set($,{type:i.type,key:d.key,textStyle:n,oldPx:l,oldPhonePx:c,newPx:r,newPhonePx:o,diff:r-l,diffPhone:o-c,nodes:1})}return[...t.values()]}const O=e=>e>0?`+${e}`:String(e),W=e=>_().find(t=>t.id===e)?.name??e,Y=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 ee(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[o,l]of r)t.push(`- ×${l}: ${o}`)}}for(const[n,s]of Object.entries(e.byType)){const r=Object.entries(s.dropped);if(!r.length)continue;t.push("",`## ${n} — dropped`,"");const o=new Map;for(const l of e.nodes)if(l.type===n)for(const c of l.dropped)o.set(c.key,c.why);for(const[l,c]of r)t.push(`- \`${l}\` ×${c}: ${o.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 o of n.writes)t.push(`| ${s} | ${r} | ${Y(o.write)} | send | ${o.nodes} | ${o.reason} |`);for(const o of n.undecided)t.push(`| ${s} | ${r} | ${o.kind} | UNDECIDED | ${o.nodes} | ${o.why} |`);for(const o of n.notNeeded)t.push(`| ${s} | ${r} | ${o.kind} | not needed | ${o.nodes} | ${o.why} |`)}}const i=I(e);if(i.length){const n=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],s=o=>`| ${o.type} | \`${o.key}\` | ${o.oldPx} (${o.oldPhonePx}) | ${W(o.textStyle)} | ${o.newPx} (${o.newPhonePx}) | ${O(o.diff)} (${O(o.diffPhone)}) | ${o.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...n,...i.map(s));const r=i.filter(o=>Math.abs(o.diff)>2||Math.abs(o.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),r.length?t.push(...n,...r.map(s)):t.push("None.")}const d=e.nodes.filter(n=>n.sameMarkup!==void 0);if(d.length){const n=d.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${d.length} (a hint; the pixels decide).`)}return t.join(`
|
|
1
|
+
import{defaultTextStyles as N}from"efficient-easel/text-styles/model";import{headingDefaultPx as A}from"../../../render/components/Heading.js";import{headingLevelOfStyle as M}from"../../../render/components/Text.js";import{migrateLegacyPageData as D}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as v}from"../../../format/lib/document/renamed-props.js";import{listToWrite as E,setStyleValues as L}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as R,bandPresetIndex as z}from"../../../format/lib/theme.js";import{convertSection as C,convertSectionsInPage as j,sectionToBoxRow as S,sectionToBoxTypes as F}from"../../../render/lib/sections/section-to-box.js";const P={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function se(e,t,d=N()){const i=s=>t==="heading"?A(M(s)):P[s];let n;for(const{id:s,kind:r}of d){const o=r===t?i(s):void 0;if(o===void 0)continue;const a=Math.abs(o-e),c=n?Math.abs(n.px-e):1/0;(a<c||a===c&&n&&o>n.px)&&(n={id:s,px:o})}if(!n)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return n.id}function B(e){const[t,d]=e.split("/");return t&&d?{schema:t,site:d}:void 0}function ne(e){const t=i=>typeof i=="string"?i:null,d=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:d,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}:{}}}const I=new Set([null,"authored"]);function W(e,t){const d=E(t),i=d.filter(s=>e.includes(s.id)&&s.values.letterCase===void 0).map(s=>s.id);return{list:i.reduce((s,r)=>L(s,r,{letterCase:"upper"}),d),changed:i.length>0}}function Y(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 J(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!I.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:d,changed:i}=W(e.styles,t.textStyles?t.textStylesList??null:null);return i?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:d}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function J(e,t){const d=t?.themePresets;if(!t||!d)return{undecided:"the site's theme presets were not read"};const i=d[e.page];if(!i)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(z(d,e.page)>=0)return{notNeeded:"the site already has the band preset"};const n=R(i);return{send:{kind:e.kind,page:e.page,index:d.length,preset:n,themePresets:[...d,n]}}}function O(e){const t=e?.content;return Array.isArray(t)?v(D(e)):e}function oe(e,t={}){const d=[...t.types??F()],i=d.filter(p=>!S(p)),n=new Set(d.filter(p=>S(p))),s=[],r=[],o={},a={},c=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),f=new Map,m=(p,w,l)=>{const k=`${p.schema}/${p.site}`;let $=f.get(k);$||f.set(k,$={...p,facts:!!w,writes:[],undecided:[],notNeeded:[]});const h=Y(l,w);if("send"in h){const g=$.writes.find(b=>JSON.stringify(b.write)===JSON.stringify(h.send));g?g.nodes+=1:$.writes.push({write:h.send,reason:l.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[x,y]="undecided"in h?[$.undecided,h.undecided]:[$.notNeeded,h.notNeeded],u=x.find(g=>g.kind===l.kind&&g.why===y);u?u.nodes+=1:x.push({kind:l.kind,why:y,nodes:1})};for(const p of e){const w=O(p.layout)?.content;Array.isArray(w)&&w.forEach((l,k)=>{if(!l||typeof l.type!="string"||!n.has(l.type))return;const $=S(l.type),h=B(p.label),x=h?c.get(`${h.schema}/${h.site}`):void 0,y=C(l,$,x?{site:x}:{});if(y.skipped!==void 0){r.push({page:p.label,index:k,type:l.type,id:String(l.props?.id??""),why:y.skipped});return}if(h)for(const _ of y.siteWrites)m(h,x,_);const u={page:p.label,index:k,type:l.type,id:String(l.props?.id??""),carried:y.carried,dropped:y.dropped,restyled:y.restyled},g=t.draw;g&&(u.before=g(l),u.after=y.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),s.push(u);const b=o[l.type]??={nodes:0,pages:0,dropped:{}};b.nodes+=1,(a[l.type]??=new Set).add(p.label),b.pages=a[l.type].size;for(const _ of y.dropped)b.dropped[_.key]=(b.dropped[_.key]??0)+1})}return{types:d,noRow:i,pages:e.length,nodes:s,skipped:r,byType:o,sites:[...f.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(d=>{const i=`${t.schema}/${t.siteName(d.site)}/${d.slug}`;return[{label:`${i} (draft)`,layout:d.layout},{label:`${i} (published)`,layout:d.published_layout}]})}function de(e,t){const d=t.types.filter(i=>S(i));return e.map(i=>{const n={id:i.id,slug:i.slug};if(JSON.stringify(i.layout)!==JSON.stringify(i.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const s=O(i.layout),r=Array.isArray(s?.content)?s.content:[],o=[],a=[];for(const f of r){if(!f||!d.includes(f.type))continue;const m=String(f.props?.id??""),p=S(f.type).skip?.(f.props);p===void 0?o.push({type:f.type,id:m}):a.push({type:f.type,id:m,why:p})}if(!o.length)return{...n,converted:o,skipped:a};const c=j(s,d,t.site?{site:t.site}:{});return{...n,patch:{layout:c,expected_updated_at:i.layout_updated_at},converted:o,skipped:a}})}function re(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(d=>d.write)}))}function U(e){const t=new Map;for(const d of e.nodes)for(const i of d.restyled){const n=i.textStyle??"none",s=P[n],r=i.size??s,o=i.sizePhone??i.size??s;if(r===void 0||o===void 0)continue;const a=i.was.size,c=i.was.sizePhone??i.was.size,f=[d.type,i.key,n,a,c,r,o].join("|"),m=t.get(f);m?m.nodes+=1:t.set(f,{type:d.type,key:i.key,textStyle:n,oldPx:a,oldPhonePx:c,newPx:r,newPhonePx:o,diff:r-a,diffPhone:o-c,nodes:1})}return[...t.values()]}const T=e=>e>0?`+${e}`:String(e),G=e=>N().find(t=>t.id===e)?.name??e,H=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 ae(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[o,a]of r)t.push(`- ×${a}: ${o}`)}}for(const[n,s]of Object.entries(e.byType)){const r=Object.entries(s.dropped);if(!r.length)continue;t.push("",`## ${n} — dropped`,"");const o=new Map;for(const a of e.nodes)if(a.type===n)for(const c of a.dropped)o.set(c.key,c.why);for(const[a,c]of r)t.push(`- \`${a}\` ×${c}: ${o.get(a)}`)}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 o of n.writes)t.push(`| ${s} | ${r} | ${H(o.write)} | send | ${o.nodes} | ${o.reason} |`);for(const o of n.undecided)t.push(`| ${s} | ${r} | ${o.kind} | UNDECIDED | ${o.nodes} | ${o.why} |`);for(const o of n.notNeeded)t.push(`| ${s} | ${r} | ${o.kind} | not needed | ${o.nodes} | ${o.why} |`)}}const d=U(e);if(d.length){const n=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],s=o=>`| ${o.type} | \`${o.key}\` | ${o.oldPx} (${o.oldPhonePx}) | ${G(o.textStyle)} | ${o.newPx} (${o.newPhonePx}) | ${T(o.diff)} (${T(o.diffPhone)}) | ${o.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...n,...d.map(s));const r=d.filter(o=>Math.abs(o.diff)>2||Math.abs(o.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),r.length?t.push(...n,...r.map(s)):t.push("None.")}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{P as BODY_STYLE_PX_AT_DEFAULTS,
|
|
3
|
+
`}export{P as BODY_STYLE_PX_AT_DEFAULTS,U as bodyStyleRows,ae as dryRunMarkdown,oe as dryRunSections,W as headingCaseList,se as nearestTextStyle,de as pageEdits,ie as pagesFromCliExport,ne as siteFactsFromRead,B as siteOfLabel,re as siteWritesFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./loop.js";
|
|
1
|
+
export*from"./loop.js";const o="_gEntrance";export{o as ENTRANCE_GROUP_KEY};
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
export declare const BLOCK_SOURCE_PROP = "dataSource";
|
|
2
2
|
export declare const BLOCK_SOURCE_OPTIONS_PROP = "dataSourceOptions";
|
|
3
3
|
export declare const BLOCK_SOURCE_ROWS_PROP = "dataRows";
|
|
4
|
+
export declare const COUNT_KEY_PROP = "countKey";
|
|
5
|
+
export declare const COUNTS_SOURCE = "counts";
|
|
4
6
|
export type SourceRow = Readonly<Record<string, string>>;
|
|
7
|
+
export interface SourceChoice {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
5
12
|
export interface BlockSourceSpec {
|
|
6
13
|
key: string;
|
|
7
14
|
label: string;
|
|
8
15
|
blocks: readonly string[];
|
|
9
16
|
sample?: readonly SourceRow[];
|
|
17
|
+
choices?: readonly SourceChoice[];
|
|
10
18
|
}
|
|
11
19
|
export declare function registerBlockSources(sources: readonly BlockSourceSpec[]): void;
|
|
12
20
|
export declare function blockSources(block?: string): readonly BlockSourceSpec[];
|
|
13
21
|
export declare function blockSourceSpec(key: string): BlockSourceSpec | null;
|
|
22
|
+
export declare function sourceChoices(key: string): readonly SourceChoice[];
|
|
14
23
|
export declare function blockSourcesRevision(): number;
|
|
15
24
|
export declare function declaredBlockSource(props?: Record<string, unknown> | null): string;
|
|
16
25
|
export declare function servedRows(props?: Record<string, unknown> | null): readonly SourceRow[] | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nonEmptyString as c}from"../non-empty-string.js";const i="dataSource",
|
|
1
|
+
import{nonEmptyString as c}from"../non-empty-string.js";const i="dataSource",m="dataSourceOptions",a="dataRows",S="countKey",d="counts",u=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,f=Symbol.for("efficient.block-sources");function s(){const e=globalThis;return e[f]??={sources:new Map,revision:0}}const p=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!=="");function y(e){if(typeof e.key!="string"||!u.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(t=>typeof t!="string"||!t))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(t=>l(t)).filter(t=>t!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(p)}:{}}}function x(e){const t=e.map(y),o=s();for(const r of t)o.sources.set(r.key,r);t.length&&(o.revision+=1)}function R(e){const t=[...s().sources.values()];return e===void 0?t:t.filter(o=>o.blocks.includes(e))}function k(e){return s().sources.get(e)??null}function g(e){return s().sources.get(e)?.choices??[]}function w(){return s().revision}function b(e){const t=e?.[i];return typeof t=="string"?t.trim():""}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[o,r]of Object.entries(e)){const n=c(r);n&&(t[o]=n)}return Object.keys(t).length?t:null}function h(e){const t=e?.[a];return Array.isArray(t)?t.map(l).filter(o=>o!==null):null}function C(e,t,o=[]){const r=h(e);if(r!==null&&(r.length||!t))return{rows:r,sample:!1};if(!t)return{rows:[],sample:!1};const n=k(b(e))?.sample;return{rows:n?.length?n:o,sample:!0}}export{m as BLOCK_SOURCE_OPTIONS_PROP,i as BLOCK_SOURCE_PROP,a as BLOCK_SOURCE_ROWS_PROP,d as COUNTS_SOURCE,S as COUNT_KEY_PROP,k as blockSourceSpec,R as blockSources,w as blockSourcesRevision,b as declaredBlockSource,x as registerBlockSources,h as servedRows,g as sourceChoices,C as sourcedRows};
|
|
@@ -50,7 +50,18 @@ export declare const BOX_SHARE_PHONE_POINTS: ({
|
|
|
50
50
|
readonly weights: readonly [1, 1];
|
|
51
51
|
})[];
|
|
52
52
|
export declare const BOX_SHARE_PHONE_DEFAULT = "equal";
|
|
53
|
-
export declare
|
|
53
|
+
export declare const BOX_COLUMNS_MIN = 1;
|
|
54
|
+
export declare const BOX_COLUMNS_MAX = 6;
|
|
55
|
+
export declare function boxColumnsClass(columns: unknown): string;
|
|
56
|
+
export declare function boxRowColumnsClass(box: {
|
|
57
|
+
direction?: unknown;
|
|
58
|
+
separator?: unknown;
|
|
59
|
+
loop?: unknown;
|
|
60
|
+
line?: unknown;
|
|
61
|
+
columns?: unknown;
|
|
62
|
+
}): string;
|
|
63
|
+
export declare function boxPhoneRowOneLine(wrapPhone: unknown): boolean;
|
|
64
|
+
export declare function boxPhoneRowClasses(perRow: unknown, sharePhone?: unknown, wrapPhone?: unknown): string;
|
|
54
65
|
export declare function boxPhoneRowFits(perRow: unknown, sharePhone: unknown): boolean;
|
|
55
66
|
export declare const BOX_BLOCK_SPACING_LABEL = "Block spacing";
|
|
56
67
|
export declare const BOX_BLOCK_SPACING_POINTS: readonly [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{isStripBox as x}from"./box-separator.js";const A={sectionPaddingTop:0,sectionPaddingBottom:0},i={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function N(e,t){const s=typeof e=="string"&&e in i?i[e]:"",o=typeof t=="string"&&t in p?p[t]:"";return[s,o].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const E="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],n="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",_={equal:n,bigLeft:`${n} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${n} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${n} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${n} [&>*:last-child]:min-[800px]:grow-[3]`,twoThree:`${n} [&>*:first-child]:min-[800px]:grow-[2] [&>*:last-child]:min-[800px]:grow-[3]`};function g(e){return typeof e=="string"?_[e]??"":""}const m="[&>*]:min-[800px]:basis-[content]";function v(e){return g(e)===""?m:""}const P="Columns",R=1,d=3,l={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},X=c.filter(e=>e.value==="content"||e.value==="equal"),H="equal",T=1,I=6,a="min-[800px]:flex-wrap [&>*]:min-[800px]:min-w-0 [&>*]:min-[800px]:grow-0!",f={1:`${a} [&>*]:min-[800px]:basis-[calc(100%/1)]!`,2:`${a} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${a} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${a} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${a} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${a} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function u(e){return typeof e=="number"?f[e]??"":""}function $(e){return e.direction!=="row"||x(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":u(e.columns)}const b="max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:grow-0 [&>*]:max-[800px]:basis-[content]",O={2:"max-[800px]:flex-nowrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-[800px]:flex-nowrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},S="max-[800px]:flex-nowrap [&>*]:max-[800px]:grow-0 [&>*]:max-[800px]:basis-[content]";function w(e){return e===!1||e==="nowrap"}function W(e,t,s){const o=l[Number(e)];if(!o)return"max-[800px]:flex-col";const r=w(s);return L(e,t)?r?S:b:r?O[Number(e)]:o}function L(e,t){return Number(e)in l&&t==="content"}const y="Block spacing",F=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],h="sf-box-gap-only";function M(e){return e==="gap"?h:""}export{y as BOX_BLOCK_SPACING_LABEL,F as BOX_BLOCK_SPACING_POINTS,I as BOX_COLUMNS_MAX,T as BOX_COLUMNS_MIN,h as BOX_GAP_ONLY_CLASS,P as BOX_PHONE_ROW_LABEL,d as BOX_PHONE_ROW_MAX,R as BOX_PHONE_ROW_MIN,E as BOX_SHARE_LABEL,H as BOX_SHARE_PHONE_DEFAULT,X as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,A as NESTED_BOX_PADDING,M as boxBlockSpacingClass,u as boxColumnsClass,v as boxFitContentClass,N as boxLayoutClasses,W as boxPhoneRowClasses,L as boxPhoneRowFits,w as boxPhoneRowOneLine,$ as boxRowColumnsClass,g as boxShareClasses,B as boxWrapClass};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseTickerSeparator as a,SEPARATOR_GLYPH as l,separatorScaleClass as f,TICKER_SEPARATOR_OPTIONS as c}from"../sections/ticker-style.js";const d=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function
|
|
1
|
+
import{parseTickerSeparator as a,SEPARATOR_GLYPH as l,separatorScaleClass as f,TICKER_SEPARATOR_OPTIONS as c}from"../sections/ticker-style.js";const d=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function i(h){return c.some(e=>e.value===h)?a(h):void 0}const n="overflow-hidden [&>*]:shrink-0 [&>*]:max-[800px]:basis-[content] [&>*+*]:relative [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:absolute [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:top-1/2 [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:left-[calc(var(--sf-gap-len,0px)/-2)] [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:max-[800px]:before:left-[calc(var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))/-2)] [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:-translate-x-1/2 [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:-translate-y-1/2 [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:leading-none [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:text-accent [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:text-[length:var(--sf-sep-size,1em)] [&>*+*_:is(p,h1,h2,h3,h4,h5,h6):first-child]:before:content-[var(--sf-sep-mark)]";function t(h,e){return h==="row"&&i(e)!==void 0}function x(h,e){return t(h,e)?n:""}const p="[&>*:last-child]:relative [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:absolute [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:top-1/2 [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:right-[calc(var(--sf-gap-len,0px)/-2)] [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:max-[800px]:after:right-[calc(var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))/-2)] [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:translate-x-1/2 [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:-translate-y-1/2 [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:leading-none [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:text-accent [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:text-[length:var(--sf-sep-size,1em)] [&>*:last-child_:is(p,h1,h2,h3,h4,h5,h6):first-child]:after:content-[var(--sf-sep-mark)]";function _(h,e){return t(h,e)?p:""}function S(h,e){if(!t(h,e))return{};const s=i(e),r=/^text-\[(.+)\]$/.exec(f("small",s))?.[1];return{"--sf-sep-mark":JSON.stringify(l[s]),...r?{"--sf-sep-size":r}:{}}}export{d as BOX_SEPARATOR_POINTS,x as boxSeparatorClasses,i as boxSeparatorOf,_ as boxSeparatorSeamClass,S as boxSeparatorStyle,t as isStripBox};
|
|
@@ -33,4 +33,5 @@ type DocNode = {
|
|
|
33
33
|
props?: Record<string, unknown>;
|
|
34
34
|
};
|
|
35
35
|
export declare function cardTemplateOwner(appState: unknown, id: unknown): DocNode | null | undefined;
|
|
36
|
+
export declare function cardTemplateCardOwner(appState: unknown, id: unknown): DocNode | null | undefined;
|
|
36
37
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNodeList as
|
|
1
|
+
import{isNodeList as k}from"efficient-easel/data";const w="template",L="Card template",y=["Text","ImageBlock","ButtonBlock","Flex"],i="rowField",A="rowLinkField";function B(){return{type:"slot",allow:[...y]}}const O=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}],d=Symbol.for("efficient.card-templates");function f(){const t=globalThis;let e=t[d];return e||(e=new Map(O.map(n=>[n.block,n])),t[d]=e),e}function g(t){for(const e of t){if(typeof e.block!="string"||!e.block)throw new Error("A card template names no block.");f().set(e.block,{block:e.block,fields:e.fields.map(n=>({...n}))})}}function R(t){return typeof t=="string"&&f().has(t)}function C(t,e){const n=f().get(t)?.fields??[];return e?n.filter(o=>(o.kind??"text")===e):n}function P(t,e){return t?f().get(t)?.fields.find(n=>n.key===e)??null:null}function p(t,e=i){const n=t?.[e];return typeof n=="string"?n.trim():""}function F(t){const e={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[n,o]of Object.entries(t))typeof o=="string"&&(e[n]=o);return e}const m={Text:{text:i},ImageBlock:{src:i},ButtonBlock:{label:i,href:A}};function D(t,e,n){const o=m[t]?.[n];return!!(o&&p(e,o))}function _(t,e){return!e||!t?null:t[e]??""}function h(t,e,n){if(!n)return e;let o=null;for(const[l,s]of Object.entries(m[t]??{})){const r=_(n,p(e,s));r!==null&&(o??={...e},o[l]=r)}return o??e}function x(t,e){const n=t?.data?.content;if(!Array.isArray(n)||typeof e!="string")return;const o=(s,r)=>{for(const c of s){if(c?.props?.id===e)return r;for(const[T,u]of Object.entries(c?.props??{})){if(!k(u))continue;const b=T===w&&R(c.type)?{owner:c,direct:!0}:r&&{owner:r.owner,direct:!1},a=o(u,b);if(a!==void 0)return a}}},l=o(n,null);return l===void 0?null:l}function S(t,e){const n=x(t,e);return n&&n.owner}function I(t,e){const n=x(t,e);return n&&(n.direct?n.owner:null)}export{i as CARD_ROW_FIELD_PROP,A as CARD_ROW_LINK_PROP,y as CARD_TEMPLATE_BLOCKS,L as CARD_TEMPLATE_LABEL,w as CARD_TEMPLATE_SLOT,F as cardRow,I as cardTemplateCardOwner,P as cardTemplateField,C as cardTemplateFields,S as cardTemplateOwner,B as cardTemplateSlot,R as hasCardTemplate,p as namedRowField,g as registerCardTemplates,D as rowBound,_ as rowFieldText,h as rowFilledProps};
|
|
@@ -22,6 +22,12 @@ export declare const SITE_BLOCK_GAP: {
|
|
|
22
22
|
};
|
|
23
23
|
export declare function normalizeSiteBlockGap(v?: number | null): number | null;
|
|
24
24
|
export declare function siteBlockGapTokens(v?: number | null): Record<string, string>;
|
|
25
|
+
export declare const SITE_BLOCK_GAP_PHONE_VAR = "--sf-block-gap-phone";
|
|
26
|
+
export declare const SITE_BLOCK_GAP_PHONE_REM_VAR = "--sf-block-gap-phone-rem";
|
|
27
|
+
export declare const SITE_BLOCK_GAP_ON_PHONE_VAR = "--sf-block-gap-on-phone";
|
|
28
|
+
export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-[720px]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
|
|
29
|
+
export declare function siteBlockGapPhoneTokens(v?: number | null): Record<string, string>;
|
|
30
|
+
export declare function siteBlockGapPhoneClass(v?: number | null): string;
|
|
25
31
|
export declare const GAP_ZONE_CLASS = "sf-gap-zone";
|
|
26
32
|
export declare const GAP_LENGTH_VAR = "--sf-gap-len";
|
|
27
33
|
export declare function hasOwnContainerGap(container: GapContainer, value: unknown): boolean;
|
|
@@ -32,7 +38,9 @@ export declare const CONTAINER_GAP_PHONE: {
|
|
|
32
38
|
readonly step: 2;
|
|
33
39
|
};
|
|
34
40
|
export declare function hasOwnPhoneGap(value: unknown): value is number;
|
|
35
|
-
export declare function
|
|
41
|
+
export declare function halfDesktopGap(px: number): number;
|
|
42
|
+
export declare function followsSitePhoneGap(container: GapContainer, desktop: unknown, sitePhone: unknown): sitePhone is number;
|
|
43
|
+
export declare function resolvePhoneContainerGap(container: GapContainer, phone: unknown, desktop: unknown, siteGap?: number | null, sitePhone?: number | null): number;
|
|
36
44
|
export declare function containerGapProps(container: GapContainer, value: unknown, axis: GapAxis, phone?: unknown): {
|
|
37
45
|
className: string;
|
|
38
46
|
style: CSSProperties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const k="sf.gapContainer",r={min:-32,max:64,step:2},_={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},f={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},N=new Set(["Events","GalleryB"]);function u(n,t,o){if(typeof t=="number"&&Number.isFinite(t)&&t>=r.min)return t;if(typeof t=="string"){const e=_[n]?.[t];if(typeof e=="number")return e}return typeof o=="number"&&Number.isFinite(o)?o:f[n]}const g="sf-gap-overlap",O="--sf-gap-overlap",x="--sf-block-gap",b="--sf-block-gap-rem",i={min:0,max:r.max,step:r.step};function a(n){if(typeof n!="number"||!Number.isFinite(n))return null;const t=Math.min(Math.max(Math.round(n),i.min),i.max);return t-t%i.step}function y(n){const t=a(n);return t===null?{}:{[x]:`${t}px`,[b]:`${t/16}rem`}}const C="--sf-block-gap-phone",R="--sf-block-gap-phone-rem",L="--sf-block-gap-on-phone",S="max-[720px]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function B(n){const t=a(n);return t===null?{}:{[C]:`${t}px`,[R]:`${t/16}rem`}}function V(n){return a(n)===null?"":S}const m="sf-gap-zone",A="--sf-gap-len";function G(n,t){return typeof t=="number"&&Number.isFinite(t)&&t>=r.min?!0:typeof t=="string"&&typeof _[n]?.[t]=="number"}const P="--sf-gap-len-phone",h={min:0,max:r.max,step:r.step};function c(n){return typeof n=="number"&&Number.isFinite(n)&&n>=h.min}function I(n){return n/2}function T(n,t,o){return c(o)&&!G(n,t)}function d(n,t,o,e,p){return c(t)?t:T(n,o,p)?p:I(u(n,o,e))}const $={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function F(n,t,o,e){const p=c(e)?{[P]:`${e}px`}:{};if(!G(n,t)){const l=`${f[n]}px`,E=N.has(n)?`var(--sf-card-gap, ${l})`:l;return{className:` ${m}`,style:{[A]:`var(${x}, ${E})`,[P]:`var(${L})`,...p}}}const s=u(n,t);return s>=0?{className:` ${m}`,style:{[A]:`${s}px`,...p}}:{className:` ${g} ${$[o]}`,style:{gap:"0px",[O]:`${-s/2}px`}}}export{N as CARD_GRID_CONTAINERS,r as CONTAINER_GAP,f as CONTAINER_GAP_BUILT_IN,_ as CONTAINER_GAP_LEGACY,h as CONTAINER_GAP_PHONE,k as GAP_FIELD_CONTAINER,A as GAP_LENGTH_VAR,g as GAP_OVERLAP_CLASS,O as GAP_OVERLAP_VAR,P as GAP_PHONE_LENGTH_VAR,m as GAP_ZONE_CLASS,i as SITE_BLOCK_GAP,L as SITE_BLOCK_GAP_ON_PHONE_VAR,S as SITE_BLOCK_GAP_PHONE_CLASS,R as SITE_BLOCK_GAP_PHONE_REM_VAR,C as SITE_BLOCK_GAP_PHONE_VAR,b as SITE_BLOCK_GAP_REM_VAR,x as SITE_BLOCK_GAP_VAR,F as containerGapProps,T as followsSitePhoneGap,I as halfDesktopGap,G as hasOwnContainerGap,c as hasOwnPhoneGap,a as normalizeSiteBlockGap,u as resolveContainerGap,d as resolvePhoneContainerGap,V as siteBlockGapPhoneClass,B as siteBlockGapPhoneTokens,y as siteBlockGapTokens};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SourceRow } from "./block-sources.js";
|
|
2
|
+
export declare function linkedCount(props?: Record<string, unknown> | null): string;
|
|
3
|
+
export declare function countWords(value: string): string;
|
|
4
|
+
export declare function countNumber(key: string, served: readonly SourceRow[] | null): string | null;
|
|
5
|
+
export declare function countsReachText(content: unknown, id: unknown): boolean;
|
|
6
|
+
export declare function settleCountSources<T>(layout: T): T;
|
|
7
|
+
export declare function settleCountNode<T>(node: T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNodeList as i}from"efficient-easel/data";import{namedRowField as C}from"./card-template.js";import{BLOCK_SOURCE_PROP as d,COUNT_KEY_PROP as N,COUNTS_SOURCE as c,declaredBlockSource as l,sourceChoices as _}from"./block-sources.js";const a="Flex";function R(e){if(C(e))return"";const t=e?.[N];return typeof t=="string"?t.trim():""}const E=new Intl.NumberFormat("en-US");function S(e){return/^\d+$/.test(e)?E.format(Number(e)):e}function y(e,t){const r=t?t.find(n=>n.key===e)?.value:_(c).find(n=>n.key===e)?.value;return r===void 0?null:S(r)}function m(e){const t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&R(t)!=="",n=t;for(const[u,s]of Object.entries(t)){if(!i(s))continue;const p=s.map(m);p.some(f=>f.names)&&(r=!0),p.some((f,O)=>f.node!==s[O])&&(n={...n,[u]:p.map(f=>f.node)})}if(e.type!==a)return{node:n===t?e:{...e,props:n},names:r};const o=l(n);if(r&&!o&&(n={...n,[d]:c}),!r&&o===c){const{[d]:u,...s}=n;n=s}return{node:n===t?e:{...e,props:n},names:!1}}function x(e,t,r){for(const n of e){if(n?.props?.id===t)return r;for(const o of Object.values(n?.props??{})){if(!i(o))continue;const u=x(o,t,n.type===a?n:r);if(u!==void 0)return u}}}function B(e,t){if(!i(e))return!0;const r=x(e,t,null);if(r===void 0)return!0;if(r===null)return!1;const n=l(r.props);return!n||n===c}function P(e){const t=e?.content;if(!i(t))return e;const r=t.map(m);return r.every((n,o)=>n.node===t[o])?e:{...e,content:r.map(n=>n.node)}}function T(e){return m(e).node}export{y as countNumber,S as countWords,B as countsReachText,R as linkedCount,T as settleCountNode,P as settleCountSources};
|
|
@@ -20,6 +20,13 @@ export declare const SITE_GUTTER: {
|
|
|
20
20
|
readonly default: 40;
|
|
21
21
|
};
|
|
22
22
|
export declare const SITE_GUTTER_VAR = "--sf-site-gutter";
|
|
23
|
+
export declare const SITE_GUTTER_PHONE: {
|
|
24
|
+
readonly min: 0;
|
|
25
|
+
readonly max: 24;
|
|
26
|
+
readonly step: 4;
|
|
27
|
+
};
|
|
28
|
+
export declare const SITE_GUTTER_PHONE_VAR = "--sf-site-gutter-phone";
|
|
29
|
+
export declare const SITE_GUTTER_PHONE_CLASS = "max-[720px]:[--sf-site-gutter:var(--sf-site-gutter-phone)]!";
|
|
23
30
|
export declare const SITE_GUTTER_CAP: string;
|
|
24
31
|
export declare const SITE_GUTTER_CLASS: string;
|
|
25
32
|
export declare const PRE_SITE_GUTTER_CLASSES: readonly ["px-10", "px-[60px]"];
|
|
@@ -35,6 +42,10 @@ export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)]
|
|
|
35
42
|
export declare const EDITORIAL_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";
|
|
36
43
|
export declare function normalizeSiteGutter(v?: number | null): number;
|
|
37
44
|
export declare function siteGutterTokens(v?: number | null): Record<string, string>;
|
|
45
|
+
export declare function normalizeSiteGutterPhone(v?: number | null): number | null;
|
|
46
|
+
export declare function siteGutterPhoneTokens(v?: number | null): Record<string, string>;
|
|
47
|
+
export declare function siteGutterPhoneClass(v?: number | null): string;
|
|
48
|
+
export declare function siteGutterPhoneFollows(gutter?: number | null): number;
|
|
38
49
|
export declare function siteHalfColumnCap(dividerPx?: number): string;
|
|
39
50
|
export declare function siteHalfColumnCapClass(dividerPx?: number): string;
|
|
40
51
|
export declare const HERO_CAP: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n={min:1e3,max:2e3,step:50,default:1600};function u(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function w(t,e){if(t!==!1)return null;const a=typeof e=="number"?e:n.default;return u(a)}const s="--sf-site-width",o=`var(${s},${n.default}px)`,C=`max-w-[${o}]`,D=`max-w-[${n.default}px]`;function S(t){return typeof t!="number"||!Number.isFinite(t)?n.default:Math.round(Math.min(Math.max(t,n.min),n.max))}function U(t){const e=S(t);return e===n.default?{}:{[s]:`${e}px`}}const p={min:0,max:80,step:4,default:40},_="--sf-site-gutter",i={min:0,max:24,step:4},A="--sf-site-gutter-phone",h="max-[720px]:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",x=`var(${_},${p.default}px)`,$=`px-[${x}]`,W=["px-10","px-[60px]"],r={md:`min(24px,${x})`,sm:`min(20px,${x})`,frame:`min(24px,${x})`,tabs:`min(16px,${x})`},d=[[`max-[1100px]:px-[${r.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${r.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${r.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${r.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${r.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${r.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${r.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${r.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${x}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${x})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${x})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${x})]`,"max-[720px]:-mx-5"],[`-mx-[${x}]`,"-mx-10"],[$,"px-10"]];function L(t){return d.reduce((e,[a,R])=>e.split(a).join(R),t)}const N="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",b="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";function c(t){return typeof t!="number"||!Number.isFinite(t)?p.default:Math.round(Math.min(Math.max(t,p.min),p.max))}function V(t){const e=c(t);return e===p.default?{}:{[_]:`${e}px`}}function f(t){return typeof t!="number"||!Number.isFinite(t)?null:Math.round(Math.min(Math.max(t,i.min),i.max))}function v(t){const e=f(t);return e===null?{}:{[A]:`${e}px`}}function y(t){return f(t)===null?"":h}function B(t){return Math.min(i.max,c(t))}function H(t=0){return`calc(${o}/2 - ${x}*2 - ${t}px)`}function k(t=0){return`max-w-[${H(t).replace(/ /g,"_")}]`}const l=o,F=`max-w-[${l}]`,z=`max-w-[min(var(--sf-page-cap,${n.default}px),${n.default}px)]`,E="--sf-hero-cap",I=`var(${E},none)`,K=`max-w-[${I}]`,O="--sf-hero-bleed-m",P="--sf-hero-bleed-w",G="--sf-hero-chrome-x",M="--sf-hero-chrome-cap";function j(t){return t===!0?{[E]:l,[O]:"auto",[P]:"100%",[G]:"24px",[M]:"none"}:{}}const m=`calc(${o} - ${x}*2)`,q=`max-w-[${m.replace(/ /g,"_")}]`,J=C;function Q(t){return t!==!1?null:u(T)}const g="--sf-chrome-cap",T=`var(${g},${m})`,X="data-page-width";function Y(t){return t==="full"?"full":null}function Z(t){return t==="full"?null:u(t==="content"?m:T)}function tt(t){if(t==="full")return"full";if(t==="content")return"content"}export{T as CHROME_CAP_READ,g as CHROME_CAP_VAR,m as CHROME_WIDTH_CAP,q as CHROME_WIDTH_CAP_CLASS,b as EDITORIAL_COLUMN,I as HERO_BACKGROUND_CAP,K as HERO_BACKGROUND_CAP_CLASS,E as HERO_BACKGROUND_VAR,O as HERO_BLEED_MARGIN_VAR,P as HERO_BLEED_WIDTH_VAR,l as HERO_CAP,F as HERO_CAP_CLASS,M as HERO_CHROME_CAP_VAR,G as HERO_CHROME_INSET_VAR,n as PAGE_WIDTH,X as PAGE_WIDTH_ATTR,J as PRE_CHROME_WIDTH_CAP_CLASS,z as PRE_HERO_CAP_CLASS,W as PRE_SITE_GUTTER_CLASSES,D as PRE_SITE_WIDTH_CAP_CLASS,N as SITE_COLUMN,p as SITE_GUTTER,x as SITE_GUTTER_CAP,$ as SITE_GUTTER_CLASS,r as SITE_GUTTER_NARROW,i as SITE_GUTTER_PHONE,h as SITE_GUTTER_PHONE_CLASS,A as SITE_GUTTER_PHONE_VAR,d as SITE_GUTTER_SUBSTITUTIONS,_ as SITE_GUTTER_VAR,o as SITE_WIDTH_CAP,C as SITE_WIDTH_CAP_CLASS,s as SITE_WIDTH_VAR,L as asMainGutters,u as centredCap,Z as chromeWidthStyle,j as heroBackgroundTokens,c as normalizeSiteGutter,f as normalizeSiteGutterPhone,S as normalizeSiteWidth,Y as pageWidthMarker,w as pageWidthStyle,tt as resolveChromeWidth,y as siteGutterPhoneClass,B as siteGutterPhoneFollows,v as siteGutterPhoneTokens,V as siteGutterTokens,H as siteHalfColumnCap,k as siteHalfColumnCapClass,Q as siteWidthCapStyle,U as siteWidthTokens};
|
|
@@ -7,6 +7,7 @@ export declare const SECTION_STICK_DISTANCE: {
|
|
|
7
7
|
readonly fallback: 0;
|
|
8
8
|
};
|
|
9
9
|
export declare const SECTION_STICK_CLASS = "sf-section-stick";
|
|
10
|
+
export declare const SCROLL_OVER_CLASS = "sf-scroll-over";
|
|
10
11
|
export declare const SECTION_STICK_PHONE_ON_CLASS = "sf-section-stick-phone-on";
|
|
11
12
|
export declare const SECTION_STICK_PHONE_OFF_CLASS = "sf-section-stick-phone-off";
|
|
12
13
|
export declare const SECTION_STICK_VARS: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{finiteNumber as
|
|
1
|
+
import{finiteNumber as r}from"../finite-number.js";const _="Stick to top",s={min:0,max:200,step:4,fallback:0},a="sf-section-stick",u="sf-scroll-over",k="sf-section-stick-phone-on",f="sf-section-stick-phone-off",c={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},x=new Set(["CategoryBar","DocTabs","IntroBleed"]);function i(o){const t=r(o)??s.fallback;return Math.min(s.max,Math.max(s.min,Math.round(t)))}function h(o){return typeof o.stickTopPhone=="boolean"}function C(o){const t=o.stickTop===!0,n=i(o.stickTopDistance),e=h(o),p=e?o.stickTopPhone===!0:t,S=e?i(o.stickTopDistancePhone):n;return{desktop:t,desktopDistance:n,phone:p,phoneDistance:S,ownPhone:e}}function I(o){const t=C(o);if(!t.desktop&&!t.phone)return null;const n=[a],e={};return t.desktop&&(e[c.desktop]=`${t.desktopDistance}px`),(t.ownPhone||t.phone!==t.desktop)&&(n.push(t.phone?k:f),t.phone&&(e[c.phone]=`${t.phoneDistance}px`)),t.desktop||n.push("sf-section-stick-desktop-off"),{className:n.join(" "),style:e}}export{u as SCROLL_OVER_CLASS,a as SECTION_STICK_CLASS,s as SECTION_STICK_DISTANCE,x as SECTION_STICK_EXCLUDED,_ as SECTION_STICK_LABEL,f as SECTION_STICK_PHONE_OFF_CLASS,k as SECTION_STICK_PHONE_ON_CLASS,c as SECTION_STICK_VARS,h as hasPhoneStick,C as resolveSectionStick,I as sectionStickAttrs};
|
|
@@ -8,5 +8,11 @@ export interface BoxPlace {
|
|
|
8
8
|
insideGutter: boolean;
|
|
9
9
|
inBox: boolean;
|
|
10
10
|
}
|
|
11
|
+
export declare function boxRunsEdgeToEdge(props: {
|
|
12
|
+
loop?: unknown;
|
|
13
|
+
direction?: unknown;
|
|
14
|
+
scrollDirection?: unknown;
|
|
15
|
+
bgImage?: unknown;
|
|
16
|
+
}): boolean;
|
|
11
17
|
export declare function siteDrawsGutter(siteContent: unknown): boolean;
|
|
12
18
|
export declare function boxPlaceOf(content: unknown, id: unknown, site: boolean): BoxPlace | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNodeList as
|
|
1
|
+
import{isNodeList as l}from"efficient-easel/data";import{isVerticalLoop as g}from"../animation/loop.js";import{isBackgroundBox as p}from"./box-background.js";const G=new Set(["Flex","Grid"]);function b(t){return typeof t=="string"&&G.has(t)}const m="contentWidth",B="full",O="content";function E(t){const n=t?.[m];return n===B?!1:n===O?!0:void 0}function F(t,n){return t&&!n}function T(t){return t.loop==="scroll"&&t.direction!=="tabs"&&!p(typeof t.bgImage=="string"?t.bgImage:null)&&!g(t.scrollDirection)}function w(t){return t!=="full"}function A(t,n,i){if(!Array.isArray(t)||typeof n!="string")return;const u=(d,o)=>{for(const s of d){const e=s?.props??{};if(e.id===n)return o;const r=b(s?.type),x=r&&(o.inBox?E(e)??i:i),a={insideGutter:o.insideGutter||x||r&&T(e),inBox:o.inBox||r};for(const f of Object.values(e)){if(!l(f))continue;const c=u(f,a);if(c!==void 0)return c}}};return u(t,{insideGutter:!1,inBox:!1})}export{m as BOX_GUTTER_KEY,B as BOX_GUTTER_OFF,O as BOX_GUTTER_ON,E as boxGutterOf,A as boxPlaceOf,T as boxRunsEdgeToEdge,F as drawsSiteGutter,b as isFrameContainer,w as siteDrawsGutter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={fillColor:"Fill color",textFit:"When the text does not fit",wrap:"Wrap",shrink:"Shrink to fit"};export{t as EASEL_ROW_WORDS};
|
|
1
|
+
const t={fillColor:"Fill color",textFit:"When the text does not fit",wrap:"Wrap",shrink:"Shrink to fit",line:"One line"};export{t as EASEL_ROW_WORDS};
|
|
@@ -10,5 +10,6 @@ export declare const TEXT_BAND_KEY = " text";
|
|
|
10
10
|
export declare const TEXT_BAND_TITLE = "Text";
|
|
11
11
|
export declare function bandIsDropped(band: DrawnBand): boolean;
|
|
12
12
|
export declare function droppedBands(bands: readonly DrawnBand[]): string[];
|
|
13
|
+
export declare function loneDesignBand(bands: readonly DrawnBand[], loose: readonly BandRow[]): string | null;
|
|
13
14
|
export declare function withoutBands<T extends Record<string, unknown>>(fields: T, keys: ReadonlySet<string>): T;
|
|
14
15
|
export declare function sameKeys(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s=" text",f="Text";function l(e){const t=e.rows.filter(o=>o.shown);return t.length===0||t.length===1&&t[0].labelled}function u(e){return e.filter(l).map(t=>t.key)}function i(e,t){const o=e.filter(n=>!l(n));if(o.length!==1)return null;const r=e.filter(l).flatMap(n=>n.rows);return[...t,...r].some(n=>n.shown)?null:o[0].rows.filter(n=>n.shown).length>1?o[0].key:null}function p(e,t){let o=null;for(const r of t){const n=e[r];!n||n.marker!==!0||typeof n.fold!="string"||(o??={...e},o[r]={...n,fold:!1})}return o??e}function c(e,t){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}export{s as TEXT_BAND_KEY,f as TEXT_BAND_TITLE,l as bandIsDropped,u as droppedBands,i as loneDesignBand,c as sameKeys,p as withoutBands};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{ENTRANCE_GROUP_KEY as i}from"../../animation/index.js";const r=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe","Countdown"]),l={name:"sectionGroups",applies:(e,o)=>o.isSection(e)&&(r.has(e)||o.isHostBlock(e)),panel(e,o,t){const s=t.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,o))}},a=new Set(["HeroSlide","HeroGroup"]),c={name:"blockGroups",applies:(e,o,t)=>a.has(e)||!o.isSection(e)&&i in(t?.fields??{}),panel(e,o,t){const s=t.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,o))}};export{c as blockGroups,l as sectionGroups};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Config } from "efficient-easel/blocks";
|
|
2
|
-
export declare function withSiteBlockGapFields(config: Config, siteGap: number | null): Config;
|
|
2
|
+
export declare function withSiteBlockGapFields(config: Config, siteGap: number | null, siteGapPhone?: number | null): Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GAP_FIELD_CONTAINER as
|
|
1
|
+
import{GAP_FIELD_CONTAINER as f}from"../content/container-gap.js";function p(t){return!!t&&typeof t=="object"&&typeof t[f]=="string"}function l(t,c,s){if(!t)return t;let e=null;for(const[o,n]of Object.entries(t))p(n)&&(e??={...t},e[o]={...n,siteGap:c,siteGapPhone:s});return e??t}function a(t,c,s=null){const e=t;let o=!1;const n={};for(const[i,r]of Object.entries(e.components)){const u=l(r.fields,c,s);if(u===r.fields){n[i]=r;continue}o=!0,n[i]={...r,fields:u}}return o?{...t,components:n}:t}export{a as withSiteBlockGapFields};
|
|
@@ -296,6 +296,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
296
296
|
readonly "Column 4 title": "Column 4 title";
|
|
297
297
|
readonly "Column {n}": "Column {n}";
|
|
298
298
|
readonly Columns: "Columns";
|
|
299
|
+
readonly "Connect to a live number": "Connect to a live number";
|
|
299
300
|
readonly "Contact / Locations": "Contact / Locations";
|
|
300
301
|
readonly "Contact Form": "Contact Form";
|
|
301
302
|
readonly "Contact, FAQ & forms": "Contact, FAQ & forms";
|
|
@@ -661,6 +662,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
661
662
|
readonly Live: "Live";
|
|
662
663
|
readonly "Live chat": "Live chat";
|
|
663
664
|
readonly "Live chat settings belong to a website.": "Live chat settings belong to a website.";
|
|
665
|
+
readonly "Live numbers": "Live numbers";
|
|
664
666
|
readonly "Loading versions": "Loading versions";
|
|
665
667
|
readonly "Loading\u2026": "Loading…";
|
|
666
668
|
readonly "Location name": "Location name";
|
|
@@ -774,6 +776,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
774
776
|
readonly "On this page": "On this page";
|
|
775
777
|
readonly "On {count} pages": "On {count} pages";
|
|
776
778
|
readonly One: "One";
|
|
779
|
+
readonly "One line": "One line";
|
|
777
780
|
readonly "One row": "One row";
|
|
778
781
|
readonly "One then four": "One then four";
|
|
779
782
|
readonly "Only the size follows a site style. This section sets its own font, weight and letter case.": "Only the size follows a site style. This section sets its own font, weight and letter case.";
|
|
@@ -1139,6 +1142,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
1139
1142
|
readonly "This is the only card in the section.": "This is the only card in the section.";
|
|
1140
1143
|
readonly "This page": "This page";
|
|
1141
1144
|
readonly "This page has no look of its own to set.": "This page has no look of its own to set.";
|
|
1145
|
+
readonly "This page is read-only.": "This page is read-only.";
|
|
1142
1146
|
readonly "This part is no longer here.": "This part is no longer here.";
|
|
1143
1147
|
readonly "This part's settings did not open.": "This part's settings did not open.";
|
|
1144
1148
|
readonly "This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.": "This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.";
|
|
@@ -1190,6 +1194,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
1190
1194
|
readonly Ungrouped: "Ungrouped";
|
|
1191
1195
|
readonly Unit: "Unit";
|
|
1192
1196
|
readonly "Unit labels": "Unit labels";
|
|
1197
|
+
readonly Unlink: "Unlink";
|
|
1193
1198
|
readonly Up: "Up";
|
|
1194
1199
|
readonly "Up and down": "Up and down";
|
|
1195
1200
|
readonly Upcoming: "Upcoming";
|