efficient-web-builder 74.0.0 → 74.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.
Files changed (122) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/editor/components/PreviewFooterContext.d.ts +3 -1
  3. package/dist/editor/components/PreviewFooterContext.js +1 -1
  4. package/dist/editor/components/PreviewPartAnchors.d.ts +2 -1
  5. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  6. package/dist/editor/components/StorefrontEditor.js +1 -1
  7. package/dist/editor/components/storefront-editor.css +7 -0
  8. package/dist/editor/lib/document/blocks/general/ContactLocations/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/Footprint/fields.d.ts +3 -0
  10. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  11. package/dist/editor/lib/document/controls.d.ts +3 -0
  12. package/dist/editor/lib/document/controls.js +1 -1
  13. package/dist/editor/lib/document/own-pad-fields.d.ts +7 -1
  14. package/dist/editor/lib/document/own-pad-fields.js +1 -1
  15. package/dist/editor/lib/document/page-root-fields.d.ts +4 -0
  16. package/dist/editor/lib/document/page-root-fields.js +1 -1
  17. package/dist/editor/lib/document/page-root.d.ts +3 -2
  18. package/dist/editor/lib/document/page-root.js +2 -2
  19. package/dist/editor/lib/document/registry.js +1 -1
  20. package/dist/editor/lib/editor-document-adapter.d.ts +1 -0
  21. package/dist/editor/lib/editor-document-adapter.js +1 -1
  22. package/dist/editor/lib/pinned-chrome-doc.d.ts +1 -0
  23. package/dist/editor/lib/pinned-chrome-doc.js +1 -1
  24. package/dist/format/lib/build/module-specifiers.d.ts +8 -0
  25. package/dist/format/lib/build/module-specifiers.js +1 -1
  26. package/dist/format/lib/content/block-sources.d.ts +1 -0
  27. package/dist/format/lib/content/block-sources.js +1 -1
  28. package/dist/format/lib/content/borders.d.ts +2 -1
  29. package/dist/format/lib/content/borders.js +1 -1
  30. package/dist/format/lib/content/page-width.d.ts +15 -0
  31. package/dist/format/lib/content/page-width.js +1 -1
  32. package/dist/format/lib/content/section-css.d.ts +1 -1
  33. package/dist/format/lib/content/section-css.js +1 -1
  34. package/dist/format/lib/content/site-css.d.ts +5 -0
  35. package/dist/format/lib/content/site-css.js +1 -0
  36. package/dist/format/lib/content/site-offices.d.ts +7 -0
  37. package/dist/format/lib/content/site-offices.js +1 -0
  38. package/dist/format/lib/document/blocks/block-types.d.ts +1 -0
  39. package/dist/format/lib/document/passes/types.d.ts +4 -2
  40. package/dist/format/lib/editor-words-catalogue.d.ts +5 -0
  41. package/dist/format/lib/editor-words-catalogue.js +3 -3
  42. package/dist/format/lib/sections/strip-shape.d.ts +1 -0
  43. package/dist/format/lib/sections/strip-shape.js +1 -1
  44. package/dist/format/lib/source-rules/panel-colour-tokens.js +7 -7
  45. package/dist/format/lib/source-rules/site-gutter-once.d.ts +12 -0
  46. package/dist/format/lib/source-rules/site-gutter-once.js +23 -0
  47. package/dist/format/lib/theme.d.ts +2 -1
  48. package/dist/format/lib/theme.js +3 -3
  49. package/dist/render/components/Breadcrumb.d.ts +4 -1
  50. package/dist/render/components/Breadcrumb.js +1 -1
  51. package/dist/render/components/Cards.js +1 -1
  52. package/dist/render/components/ChartSection.js +1 -1
  53. package/dist/render/components/ContactLocations.js +2 -2
  54. package/dist/render/components/Countdown.js +1 -1
  55. package/dist/render/components/DocBody.js +5 -5
  56. package/dist/render/components/DocMasthead.js +1 -1
  57. package/dist/render/components/DocMetaCards.js +1 -1
  58. package/dist/render/components/FAQ.js +1 -1
  59. package/dist/render/components/FeaturedCover.js +1 -1
  60. package/dist/render/components/Flex.js +1 -1
  61. package/dist/render/components/Footprint.js +1 -1
  62. package/dist/render/components/HeroGroup.js +1 -1
  63. package/dist/render/components/HeroSingle.js +1 -1
  64. package/dist/render/components/HeroSlide.js +1 -1
  65. package/dist/render/components/ImageBlock.js +1 -1
  66. package/dist/render/components/KeyFeatures.js +1 -1
  67. package/dist/render/components/LongRead.js +1 -1
  68. package/dist/render/components/Manifesto.js +1 -1
  69. package/dist/render/components/Masthead.js +1 -1
  70. package/dist/render/components/MockupSection.js +1 -1
  71. package/dist/render/components/ParagraphsA.js +1 -1
  72. package/dist/render/components/PhoneMenuTools.d.ts +3 -1
  73. package/dist/render/components/PhoneMenuTools.js +1 -1
  74. package/dist/render/components/ProcessSteps.js +1 -1
  75. package/dist/render/components/Prose.js +1 -1
  76. package/dist/render/components/PublishedPartStylesContext.d.ts +2 -1
  77. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  78. package/dist/render/components/SectionHeader.js +1 -1
  79. package/dist/render/components/Series.js +1 -1
  80. package/dist/render/components/SideSpaceOnce.d.ts +6 -0
  81. package/dist/render/components/SideSpaceOnce.js +1 -0
  82. package/dist/render/components/SiteGutterFrame.js +1 -1
  83. package/dist/render/components/SiteOffices.d.ts +5 -0
  84. package/dist/render/components/SiteOffices.js +1 -0
  85. package/dist/render/components/SiteRootProps.d.ts +6 -0
  86. package/dist/render/components/SiteRootProps.js +1 -0
  87. package/dist/render/components/SpecStrip.d.ts +4 -1
  88. package/dist/render/components/SpecStrip.js +1 -1
  89. package/dist/render/components/Split.js +1 -1
  90. package/dist/render/components/StatsParagraph.js +1 -1
  91. package/dist/render/components/Testimonials.js +1 -1
  92. package/dist/render/components/Timeline.js +1 -1
  93. package/dist/render/components/TimelineTrack.js +1 -1
  94. package/dist/render/components/TitleWithButtons.js +1 -1
  95. package/dist/render/lib/content/section-edge.d.ts +1 -1
  96. package/dist/render/lib/content/section-edge.js +1 -1
  97. package/dist/render/lib/content/section-padding.d.ts +24 -14
  98. package/dist/render/lib/content/section-padding.js +1 -1
  99. package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
  100. package/dist/render/lib/document/blocks/general/ContactLocations/render.js +1 -1
  101. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  102. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  103. package/dist/render/lib/document/blocks/general/SpecStrip/render.js +1 -1
  104. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
  105. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  106. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  107. package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
  108. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  109. package/dist/render/lib/document/custom-css.d.ts +2 -1
  110. package/dist/render/lib/document/part-styles.d.ts +7 -4
  111. package/dist/render/lib/document/part-styles.js +2 -2
  112. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  113. package/dist/render/lib/document/passes/section-custom-css.d.ts +7 -0
  114. package/dist/render/lib/document/passes/section-custom-css.js +1 -1
  115. package/dist/render/lib/document/passes/section-padding.d.ts +2 -1
  116. package/dist/render/lib/document/passes/section-padding.js +1 -1
  117. package/dist/render/lib/document/passes/section-width.js +1 -1
  118. package/dist/render/lib/document/section-css-style.d.ts +3 -1
  119. package/dist/render/lib/document/section-css-style.js +1 -1
  120. package/dist/routine-index.json +1 -1
  121. package/dist/value-index.json +1 -1
  122. package/package.json +1 -1
@@ -1 +1 @@
1
- function f(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,n.endsWith(".d.ts")?e.ScriptKind.TS:e.ScriptKind.JS),i=[],o=t=>i.push({start:t.getStart(l)+1,end:t.getEnd()-1,text:t.text}),c=t=>{const r=t;if((e.isImportDeclaration(t)||e.isExportDeclaration(t))&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))o(r.moduleSpecifier);else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;a.length>0&&e.isStringLiteral(a[0])&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")&&o(a[0])}else if(e.isImportTypeNode(t)){const a=r.argument;e.isLiteralTypeNode(a)&&e.isStringLiteral(a.literal)&&o(a.literal)}else e.isModuleDeclaration(t)&&e.isStringLiteral(r.name)&&o(r.name);e.forEachChild(t,c)};return c(l),i.sort((t,r)=>r.start-t.start)}function S(e,n){const s=n.importClause;if(!s)return!1;if(s.isTypeOnly)return!0;if(s.name)return!1;const l=s.namedBindings;if(!l||e.isNamespaceImport(l))return!1;const{elements:i}=l;return i.length>0&&i.every(o=>o.isTypeOnly)}function m(e,n){const s=n;if(s.isTypeOnly)return!0;if(!s.exportClause||!e.isNamedExports(s.exportClause))return!1;const{elements:l}=s.exportClause;return l.length>0&&l.every(i=>i.isTypeOnly)}function x(e,n){return/\.tsx$/.test(n)?e.ScriptKind.TSX:/\.jsx$/.test(n)?e.ScriptKind.JSX:/\.[cm]?js$/.test(n)?e.ScriptKind.JS:e.ScriptKind.TS}function d(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,x(e,n)),i=[],o=t=>e.isStringLiteral(t)||e.isNoSubstitutionTemplateLiteral(t)?t.text:null,c=t=>{const r=t;if(e.isImportDeclaration(t)&&e.isStringLiteral(r.moduleSpecifier))S(e,t)||i.push(r.moduleSpecifier.text);else if(e.isExportDeclaration(t)&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))m(e,t)||i.push(r.moduleSpecifier.text);else if(e.isImportEqualsDeclaration(t)&&!r.isTypeOnly&&e.isExternalModuleReference(r.moduleReference)){const a=o(r.moduleReference.expression);a!==null&&i.push(a)}else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;if(a.length>0&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")){const u=o(a[0]);u!==null&&i.push(u)}}e.forEachChild(t,c)};return c(l),i}function g(e){const n=e.split("/");return e.startsWith("@")?n.slice(0,2).join("/"):n[0]}function y(e,n,s,l){let i=s,o=0;for(const c of f(e,n,s)){const t=l(c.text);t===null||t===c.text||(i=i.slice(0,c.start)+t+i.slice(c.end),o+=1)}return{text:i,rewritten:o}}function h(e,n){const s=e.split("/").slice(0,-1),l=n.split("/");let i=0;for(;i<s.length&&i<l.length-1&&s[i]===l[i];)i+=1;const o=s.length-i,c=l.slice(i).join("/");return o===0?`./${c}`:`${"../".repeat(o)}${c}`}export{m as exportIsTypeOnly,S as importIsTypeOnly,d as importsOf,f as moduleSpecifiers,g as packageNameOf,h as relativeSpecifier,y as relinkSpecifiers};
1
+ function x(e,r,s){const n=e.createSourceFile(r,s,e.ScriptTarget.Latest,!1,r.endsWith(".d.ts")?e.ScriptKind.TS:e.ScriptKind.JS),t=[],o=i=>t.push({start:i.getStart(n)+1,end:i.getEnd()-1,text:i.text}),a=i=>{const l=i;if((e.isImportDeclaration(i)||e.isExportDeclaration(i))&&l.moduleSpecifier&&e.isStringLiteral(l.moduleSpecifier))o(l.moduleSpecifier);else if(e.isCallExpression(i)){const c=l.arguments,p=l.expression;c.length>0&&e.isStringLiteral(c[0])&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")&&o(c[0])}else if(e.isImportTypeNode(i)){const c=l.argument;e.isLiteralTypeNode(c)&&e.isStringLiteral(c.literal)&&o(c.literal)}else e.isModuleDeclaration(i)&&e.isStringLiteral(l.name)&&o(l.name);e.forEachChild(i,a)};return a(n),t.sort((i,l)=>l.start-i.start)}function f(e,r){const s=r.importClause;if(!s)return!1;if(s.isTypeOnly)return!0;if(s.name)return!1;const n=s.namedBindings;if(!n||e.isNamespaceImport(n))return!1;const{elements:t}=n;return t.length>0&&t.every(o=>o.isTypeOnly)}function d(e,r){const s=r;if(s.isTypeOnly)return!0;if(!s.exportClause||!e.isNamedExports(s.exportClause))return!1;const{elements:n}=s.exportClause;return n.length>0&&n.every(t=>t.isTypeOnly)}function m(e,r){return/\.tsx$/.test(r)?e.ScriptKind.TSX:/\.jsx$/.test(r)?e.ScriptKind.JSX:/\.[cm]?js$/.test(r)?e.ScriptKind.JS:e.ScriptKind.TS}function S(e,r,s){const n=e.createSourceFile(r,s,e.ScriptTarget.Latest,!1,m(e,r)),t=[],o=i=>e.isStringLiteral(i)||e.isNoSubstitutionTemplateLiteral(i)?i.text:null,a=i=>{const l=i;if(e.isImportDeclaration(i)&&e.isStringLiteral(l.moduleSpecifier))f(e,i)||t.push(l.moduleSpecifier.text);else if(e.isExportDeclaration(i)&&l.moduleSpecifier&&e.isStringLiteral(l.moduleSpecifier))d(e,i)||t.push(l.moduleSpecifier.text);else if(e.isImportEqualsDeclaration(i)&&!l.isTypeOnly&&e.isExternalModuleReference(l.moduleReference)){const c=o(l.moduleReference.expression);c!==null&&t.push(c)}else if(e.isCallExpression(i)){const c=l.arguments,p=l.expression;if(c.length>0&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")){const u=o(c[0]);u!==null&&t.push(u)}}e.forEachChild(i,a)};return a(n),t}function g(e,r,s){const n=e.createSourceFile(r,s,e.ScriptTarget.Latest,!1,m(e,r)),t=[];for(const o of n.statements){const a=o;if(!e.isImportDeclaration(o)||!e.isStringLiteral(a.moduleSpecifier)||f(e,o))continue;const i=a.importClause?.namedBindings;if(!i||!e.isNamedImports(i))continue;const l=a.moduleSpecifier.text;for(const c of i.elements)c.isTypeOnly||t.push({spec:l,imported:(c.propertyName??c.name).text,local:c.name.text})}return t}function h(e,r,s){let n;if(r.startsWith("@/"))n=r.slice(2);else if(r.startsWith("./")||r.startsWith("../")){const t=s.split("/").slice(0,-1);for(const o of r.split("/"))o===".."?t.pop():o!=="."&&t.push(o);n=t.join("/")}else return null;for(const t of[`${n}.ts`,`${n}.tsx`,`${n}/index.ts`,`${n}/index.tsx`,n])if(e.has(t)&&/\.tsx?$/.test(t)&&!t.endsWith(".d.ts"))return t;return null}function y(e){const r=e.split("/");return e.startsWith("@")?r.slice(0,2).join("/"):r[0]}function T(e,r,s,n){let t=s,o=0;for(const a of x(e,r,s)){const i=n(a.text);i===null||i===a.text||(t=t.slice(0,a.start)+i+t.slice(a.end),o+=1)}return{text:t,rewritten:o}}function I(e,r){const s=e.split("/").slice(0,-1),n=r.split("/");let t=0;for(;t<s.length&&t<n.length-1&&s[t]===n[t];)t+=1;const o=s.length-t,a=n.slice(t).join("/");return o===0?`./${a}`:`${"../".repeat(o)}${a}`}export{d as exportIsTypeOnly,g as importBindingsOf,f as importIsTypeOnly,S as importsOf,x as moduleSpecifiers,y as packageNameOf,I as relativeSpecifier,T as relinkSpecifiers,h as sourcePathOf};
@@ -9,6 +9,7 @@ export declare const SHOP_PAYMENT_METHODS_SOURCE = "shop-payment-methods";
9
9
  export declare const DELIVERY_OPTIONS_SOURCE = "delivery-options";
10
10
  export declare const BLOG_CATEGORIES_SOURCE = "blog-categories";
11
11
  export declare const DEALERS_SOURCE = "dealers";
12
+ export declare const SITE_OFFICES_SOURCE = "site-offices";
12
13
  export type SourceRow = Readonly<Record<string, string>>;
13
14
  export interface SourceChoice {
14
15
  key: string;
@@ -1 +1 @@
1
- import{globalRegistry as f}from"../global-registry.js";import{nonEmptyString as p}from"../non-empty-string.js";import{slotFieldBlocks as u}from"./slot-field-blocks.js";const y="dataSource",w="dataSourceOptions",d="dataRows",A="countKey",U="counts",P="location-payment-methods",T="shop-payment-methods",v="delivery-options",B="blog-categories",m="dealers";function b(e){return typeof e.open=="function"}const l=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function L(e){return typeof e=="string"&&l.test(e)}const i=new Set([m]);function n(){return f("efficient.block-sources",()=>({sources:new Map,revision:0}))}const O=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),k=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),c=e=>typeof e=="string"&&e.trim()!=="";function h(e){if(!e||!c(e.label))return null;if(b(e))return{label:e.label.trim(),open:e.open};const t=e.href;return c(t)?{label:e.label.trim(),href:t.trim()}:null}function S(e){if(typeof e.key!="string"||!l.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(o=>typeof o!="string"||!o))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=e.blocks.find(o=>u().has(o));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);const r=h(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(o=>a(o)).filter(o=>o!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(O)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(k).map(o=>({...o}))}:{},...r?{edit:r}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(o=>typeof o=="string"&&o.trim()!=="").map(o=>o.trim())}:{}}}function N(e){const t=e.map(S),r=n();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function K(e){const t=[...n().sources.values()],r=[...t.filter(o=>!i.has(o.key)),...t.filter(o=>i.has(o.key))];return e===void 0?r:r.filter(o=>o.blocks.includes(e))}function E(e){return n().sources.get(e)??null}function I(e){return n().sources.get(e)?.choices??[]}function $(){return n().revision}function R(e){const t=e?.[y];return typeof t=="string"?t.trim():""}function a(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const s=p(o);s&&(t[r]=s)}return Object.keys(t).length?t:null}function _(e){const t=e?.[d];return Array.isArray(t)?t.map(a).filter(r=>r!==null):null}function D(e,t,r=[]){const o=_(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const s=E(R(e))?.sample;return{rows:s?.length?s:r,sample:!0}}export{w as BLOCK_SOURCE_OPTIONS_PROP,y as BLOCK_SOURCE_PROP,d as BLOCK_SOURCE_ROWS_PROP,B as BLOG_CATEGORIES_SOURCE,U as COUNTS_SOURCE,A as COUNT_KEY_PROP,m as DEALERS_SOURCE,v as DELIVERY_OPTIONS_SOURCE,P as LOCATION_PAYMENT_METHODS_SOURCE,T as SHOP_PAYMENT_METHODS_SOURCE,E as blockSourceSpec,K as blockSources,$ as blockSourcesRevision,R as declaredBlockSource,L as isBlockSourceKey,b as isSourceEditAction,N as registerBlockSources,_ as servedRows,I as sourceChoices,D as sourcedRows};
1
+ import{globalRegistry as f}from"../global-registry.js";import{nonEmptyString as p}from"../non-empty-string.js";import{slotFieldBlocks as u}from"./slot-field-blocks.js";const y="dataSource",A="dataSourceOptions",d="dataRows",U="countKey",T="counts",P="location-payment-methods",v="shop-payment-methods",B="delivery-options",I="blog-categories",m="dealers",O="site-offices";function S(e){return typeof e.open=="function"}const l=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function L(e){return typeof e=="string"&&l.test(e)}const i=new Set([m,O]);function n(){return f("efficient.block-sources",()=>({sources:new Map,revision:0}))}const b=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),k=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),c=e=>typeof e=="string"&&e.trim()!=="";function h(e){if(!e||!c(e.label))return null;if(S(e))return{label:e.label.trim(),open:e.open};const t=e.href;return c(t)?{label:e.label.trim(),href:t.trim()}:null}function E(e){if(typeof e.key!="string"||!l.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(o=>typeof o!="string"||!o))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=e.blocks.find(o=>u().has(o));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);const r=h(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(o=>a(o)).filter(o=>o!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(b)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(k).map(o=>({...o}))}:{},...r?{edit:r}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(o=>typeof o=="string"&&o.trim()!=="").map(o=>o.trim())}:{}}}function N(e){const t=e.map(E),r=n();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function K(e){const t=[...n().sources.values()],r=[...t.filter(o=>!i.has(o.key)),...t.filter(o=>i.has(o.key))];return e===void 0?r:r.filter(o=>o.blocks.includes(e))}function R(e){return n().sources.get(e)??null}function $(e){return n().sources.get(e)?.choices??[]}function D(){return n().revision}function _(e){const t=e?.[y];return typeof t=="string"?t.trim():""}function a(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const s=p(o);s&&(t[r]=s)}return Object.keys(t).length?t:null}function x(e){const t=e?.[d];return Array.isArray(t)?t.map(a).filter(r=>r!==null):null}function M(e,t,r=[]){const o=x(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const s=R(_(e))?.sample;return{rows:s?.length?s:r,sample:!0}}export{A as BLOCK_SOURCE_OPTIONS_PROP,y as BLOCK_SOURCE_PROP,d as BLOCK_SOURCE_ROWS_PROP,I as BLOG_CATEGORIES_SOURCE,T as COUNTS_SOURCE,U as COUNT_KEY_PROP,m as DEALERS_SOURCE,B as DELIVERY_OPTIONS_SOURCE,P as LOCATION_PAYMENT_METHODS_SOURCE,v as SHOP_PAYMENT_METHODS_SOURCE,O as SITE_OFFICES_SOURCE,R as blockSourceSpec,K as blockSources,D as blockSourcesRevision,_ as declaredBlockSource,L as isBlockSourceKey,S as isSourceEditAction,N as registerBlockSources,x as servedRows,$ as sourceChoices,M as sourcedRows};
@@ -1,6 +1,7 @@
1
1
  import type { CSSProperties } from "react";
2
2
  import { type LengthRow } from "efficient-easel/screen/lib/content/length-units";
3
- export declare const BORDER_MAX = 20;
3
+ import { BORDER_WIDTH_MAX as BORDER_MAX } from "efficient-easel/screen/lib/content/style-keys";
4
+ export { BORDER_MAX };
4
5
  export declare const BORDER_STYLES: readonly ["solid", "dashed", "dotted"];
5
6
  export type BorderStyle = (typeof BORDER_STYLES)[number];
6
7
  export declare const BORDER_SIDES: readonly ["top", "right", "bottom", "left"];
@@ -1 +1 @@
1
- import{viewKeyAt as p}from"efficient-easel/screen/lib/content/view-tiers";import{cssLengthOf as h,rowUnitKeys as m,storedUnit as E}from"./css-length.js";const x=20,O=["solid","dashed","dotted"],b=["top","right","bottom","left"],a="sf-section-border",B="sf-section-border-self",S=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,R=t=>typeof t=="number"&&Number.isFinite(t)?`${Math.min(x,Math.max(0,Math.round(t)))}px`:void 0,u={kind:"border",unitKey:"sectionBorderUnit"},w=m(u);function D(t){const e=u.unitKey;return{desktop:t[p(e,"desktop")],tablet:t[p(e,"tablet")],phone:t[p(e,"mobile")]}}const y=(t,e)=>e==="px"?R(t):typeof t=="number"&&Number.isFinite(t)?h(Math.max(0,t),e):void 0;function c(t,{phone:e=!1,tablet:r=!1,unit:o}={}){if(!t||typeof t!="object")return;const s=e?"-phone":r?"-tablet":"",n={},i=E(o);for(const d of b){const f=y(t[d],i)??y(t.width,i);f!==void 0&&(n[`--sf-border-${d}-width${s}`]=f)}return typeof t.style=="string"&&O.includes(t.style)&&(n[`--sf-border-style${s}`]=t.style),typeof t.color=="string"&&S.test(t.color)&&(n[`--sf-border-color${s}`]=t.color.toLowerCase()),Object.keys(n).length?n:void 0}function C(t){const{width:e,...r}=t;return typeof e!="number"?t:{...r,...Object.fromEntries(b.map(o=>[o,r[o]??e]))}}function I(t,e,r,o={}){const s=c(t,{unit:o.desktop}),n=c(r,{tablet:!0,unit:o.tablet}),i=c(r,{phone:!0,unit:o.tablet}),d=c(e,{phone:!0,unit:o.phone}),f=i||d?{...i,...d}:void 0;return s||n||f?{...s,...n,...f}:void 0}export{x as BORDER_MAX,b as BORDER_SIDES,O as BORDER_STYLES,a as SECTION_BORDER_CLASS,u as SECTION_BORDER_ROW,B as SECTION_BORDER_SELF_CLASS,w as SECTION_BORDER_UNIT_KEYS,C as borderBySide,c as borderVars,I as sectionBorderStyle,D as sectionBorderUnitsOf};
1
+ import{viewKeyAt as p}from"efficient-easel/screen/lib/content/view-tiers";import{BORDER_WIDTH_MAX as b}from"efficient-easel/screen/lib/content/style-keys";import{cssLengthOf as E,rowUnitKeys as h,storedUnit as O}from"./css-length.js";const R=["solid","dashed","dotted"],u=["top","right","bottom","left"],B="sf-section-border",D="sf-section-border-self",x=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,S=t=>typeof t=="number"&&Number.isFinite(t)?`${Math.min(b,Math.max(0,Math.round(t)))}px`:void 0,m={kind:"border",unitKey:"sectionBorderUnit"},w=h(m);function I(t){const e=m.unitKey;return{desktop:t[p(e,"desktop")],tablet:t[p(e,"tablet")],phone:t[p(e,"mobile")]}}const y=(t,e)=>e==="px"?S(t):typeof t=="number"&&Number.isFinite(t)?E(Math.max(0,t),e):void 0;function c(t,{phone:e=!1,tablet:r=!1,unit:o}={}){if(!t||typeof t!="object")return;const s=e?"-phone":r?"-tablet":"",n={},i=O(o);for(const d of u){const f=y(t[d],i)??y(t.width,i);f!==void 0&&(n[`--sf-border-${d}-width${s}`]=f)}return typeof t.style=="string"&&R.includes(t.style)&&(n[`--sf-border-style${s}`]=t.style),typeof t.color=="string"&&x.test(t.color)&&(n[`--sf-border-color${s}`]=t.color.toLowerCase()),Object.keys(n).length?n:void 0}function T(t){const{width:e,...r}=t;return typeof e!="number"?t:{...r,...Object.fromEntries(u.map(o=>[o,r[o]??e]))}}function C(t,e,r,o={}){const s=c(t,{unit:o.desktop}),n=c(r,{tablet:!0,unit:o.tablet}),i=c(r,{phone:!0,unit:o.tablet}),d=c(e,{phone:!0,unit:o.phone}),f=i||d?{...i,...d}:void 0;return s||n||f?{...s,...n,...f}:void 0}export{b as BORDER_MAX,u as BORDER_SIDES,R as BORDER_STYLES,B as SECTION_BORDER_CLASS,m as SECTION_BORDER_ROW,D as SECTION_BORDER_SELF_CLASS,w as SECTION_BORDER_UNIT_KEYS,T as borderBySide,c as borderVars,C as sectionBorderStyle,I as sectionBorderUnitsOf};
@@ -43,6 +43,10 @@ export declare const SITE_GUTTER_NARROW: {
43
43
  };
44
44
  export declare const SITE_GUTTER_SUBSTITUTIONS: ReadonlyArray<readonly [string, string]>;
45
45
  export declare function asMainGutters(html: string): string;
46
+ export declare const SIDE_SPACE_ONCE_PROP = "sideSpaceOnce";
47
+ export declare const SIDE_ONCE_ATTR = "data-sf-side";
48
+ export declare const SIDE_ONCE_VALUE = "once";
49
+ export declare function sideSpaceOnceAttr(rootProps: unknown): typeof SIDE_ONCE_VALUE | undefined;
46
50
  export declare const SITE_COLUMN_NARROW = "max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
47
51
  export declare function siteSideRoom<S extends SideSpace = "box">(sideSpace?: S): (typeof SIDE_ROOMS)[S];
48
52
  type SideSpace = "box" | "site";
@@ -52,16 +56,27 @@ declare const SIDE_ROOMS: {
52
56
  readonly value: "var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))";
53
57
  readonly edge: "[--sf-edge-g:var(--sf-pad-site)]";
54
58
  readonly frame: "max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";
59
+ readonly once: "[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]";
60
+ readonly onceFrame: "[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]";
61
+ readonly onceGutter: "[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]";
55
62
  };
56
63
  readonly site: {
57
64
  readonly className: "[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]";
58
65
  readonly value: "var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))";
59
66
  readonly edge: "[--sf-edge-g:var(--sf-pad-site)]";
60
67
  readonly frame: "max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
68
+ readonly once: "[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]";
69
+ readonly onceFrame: "[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]";
70
+ readonly onceGutter: "[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]";
61
71
  };
62
72
  };
63
73
  export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
64
74
  export declare const BOX_HOLDS_NO_GUTTER_CLASS = "[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";
75
+ export declare function sideOnceFrameHolds(sideSpace: SideSpace): string;
76
+ export declare const SIDE_ONCE_HOLDS_CLASS = "[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";
77
+ export declare const SIDE_ONCE_EDGE_SIDE_CLASS = "[[data-sf-side=once]_&]:[--sf-pad-site:inherit]";
78
+ export declare const SIDE_ONCE_EDGE_GUTTER_CLASS = "[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";
79
+ export declare function withSideOnce(className: string, on: boolean): string;
65
80
  export declare function withoutBoxHoldsNoGutter(html: string): string;
66
81
  export declare const EDITORIAL_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";
67
82
  export declare function normalizeSiteGutter(v?: number | null): number;
@@ -1 +1 @@
1
- import{siteLengthCss as u,siteLengthHeld as $,storedUnit as v}from"./css-length.js";import{convertLength as O,rowGrid as H}from"efficient-easel/screen/lib/content/length-units";const x={min:1e3,max:2e3,step:50,default:1600};function m(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function K(t,e){if(t!==!1)return null;const r=typeof e=="number"?e:x.default;return m(r)}const f="--sf-site-width",a=`var(${f},${x.default}px)`,Y="100vw",P=`max-w-[${a}]`,X=`max-w-[${x.default}px]`;function l(t){return typeof t!="number"||!Number.isFinite(t)?x.default:Math.round(Math.min(Math.max(t,x.min),x.max))}function q(t,e){const r=u(t,e,"size",x);if(r!==null)return{[f]:r};const n=l(t);return n===x.default?{}:{[f]:`${n}px`}}const i={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},c="--sf-site-gutter",s={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},b=H({kind:"spacing"},"vw",i).max;function d(t,e){return t<=e?`${t}px`:`min(${t}px, ${b}vw)`}const E="--sf-site-gutter-phone",M="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",G="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",o=`var(${c},${i.default}px)`,N=`px-[${o}]`,J=["px-10","px-[60px]"],p={md:`min(24px,${o})`,sm:`min(20px,${o})`,frame:`min(24px,${o})`,tabs:`min(16px,${o})`},D=[[`max-view-desktop:px-[${p.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${p.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${p.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${p.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${p.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${p.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${p.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${p.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${o}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${o})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${o})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${o})]`,"max-view-tablet:-mx-5"],[`-mx-[${o}]`,"-mx-10"],[N,"px-10"]];function Q(t){return D.reduce((e,[r,n])=>e.split(r).join(n),t)}const T="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Z(t){return L[t??"box"]}const S="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",R="[--sf-edge-g:var(--sf-pad-site)]",L={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:S,edge:R,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:S,edge:R,frame:T}},tt=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${T}`,w="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";function et(t){const e=w.replace(/&/g,"&amp;").replace(/>/g,"&gt;");return t.split(` ${e}`).join("").split(` ${w}`).join("")}const rt="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function C(t){return typeof t!="number"||!Number.isFinite(t)?i.default:Math.round(Math.min(Math.max(t,i.min),i.typedMax))}function nt(t,e){const r=u(t,e,"spacing",i);if(r!==null)return{[c]:r};const n=C(t);return n===i.default?{}:{[c]:d(n,i.max)}}function h(t){return typeof t!="number"||!Number.isFinite(t)?null:Math.round(Math.min(Math.max(t,s.min),s.typedMax))}function ot(t){return typeof t=="number"&&Number.isFinite(t)?l(t):null}function xt(t,e){const r=u(t,e,"spacing",s);if(r!==null)return{[E]:r};const n=h(t);return n===null?{}:{[E]:d(n,s.max)}}function it(t){return h(t)===null?"":`${M} ${G}`}function pt(t,e){const r=$(t,e,"spacing",i),n=r===null?C(t):O(r,v(e),"px","mobile",s);return Math.min(s.max,n)}function U(t=0){return`calc(${a}/2 - ${o}*2 - ${t}px)`}function st(t=0){return`max-w-[${U(t).replace(/ /g,"_")}]`}const A=a,at=`max-w-[${A}]`,ut=`max-w-[min(var(--sf-page-cap,${x.default}px),${x.default}px)]`,I="--sf-hero-cap",W=`var(${I},none)`,mt=`max-w-[${W}]`,V="--sf-hero-bleed-m",k="--sf-hero-bleed-w",y="--sf-hero-chrome-x",B="--sf-hero-chrome-cap";function ft(t){return t===!0?{[I]:A,[V]:"auto",[k]:"100%",[y]:"24px",[B]:"none"}:{}}const _=`calc(${a} - ${o}*2)`,ct=`max-w-[${_.replace(/ /g,"_")}]`,_t=P;function lt(t){return t!==!1?null:m(g)}const F="--sf-chrome-cap",g=`var(${F},${_})`,dt="data-page-width";function Et(t){return t==="full"?"full":null}function Tt(t){return t==="full"?null:m(t==="content"?_:g)}function St(t){if(t==="full")return"full";if(t==="content")return"content"}export{w as BOX_HOLDS_NO_GUTTER_CLASS,g as CHROME_CAP_READ,F as CHROME_CAP_VAR,_ as CHROME_WIDTH_CAP,ct as CHROME_WIDTH_CAP_CLASS,rt as EDITORIAL_COLUMN,Y as FULL_SECTION_WIDTH,W as HERO_BACKGROUND_CAP,mt as HERO_BACKGROUND_CAP_CLASS,I as HERO_BACKGROUND_VAR,V as HERO_BLEED_MARGIN_VAR,k as HERO_BLEED_WIDTH_VAR,A as HERO_CAP,at as HERO_CAP_CLASS,B as HERO_CHROME_CAP_VAR,y as HERO_CHROME_INSET_VAR,x as PAGE_WIDTH,dt as PAGE_WIDTH_ATTR,_t as PRE_CHROME_WIDTH_CAP_CLASS,ut as PRE_HERO_CAP_CLASS,J as PRE_SITE_GUTTER_CLASSES,X as PRE_SITE_WIDTH_CAP_CLASS,b as SIDE_SPACE_GUARD_VW,tt as SITE_COLUMN,T as SITE_COLUMN_NARROW,i as SITE_GUTTER,o as SITE_GUTTER_CAP,N as SITE_GUTTER_CLASS,p as SITE_GUTTER_NARROW,s as SITE_GUTTER_PHONE,M as SITE_GUTTER_PHONE_CLASS,G as SITE_GUTTER_PHONE_EDGE_CLASS,E as SITE_GUTTER_PHONE_VAR,D as SITE_GUTTER_SUBSTITUTIONS,c as SITE_GUTTER_VAR,a as SITE_WIDTH_CAP,P as SITE_WIDTH_CAP_CLASS,f as SITE_WIDTH_VAR,Q as asMainGutters,m as centredCap,Tt as chromeWidthStyle,ft as heroBackgroundTokens,ot as normalizeSectionContentMax,C as normalizeSiteGutter,h as normalizeSiteGutterPhone,l as normalizeSiteWidth,Et as pageWidthMarker,K as pageWidthStyle,St as resolveChromeWidth,it as siteGutterPhoneClass,pt as siteGutterPhoneFollows,xt as siteGutterPhoneTokens,nt as siteGutterTokens,U as siteHalfColumnCap,st as siteHalfColumnCapClass,Z as siteSideRoom,lt as siteWidthCapStyle,q as siteWidthTokens,et as withoutBoxHoldsNoGutter};
1
+ import{siteLengthCss as _,siteLengthHeld as P,storedUnit as b}from"./css-length.js";import{convertLength as D,rowGrid as G}from"efficient-easel/screen/lib/content/length-units";import{ownEntry as L}from"../own-entry.js";const s={min:1e3,max:2e3,step:50,default:1600};function d(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function ae(e,t){if(e!==!1)return null;const n=typeof t=="number"?t:s.default;return d(n)}const E="--sf-site-width",c=`var(${E},${s.default}px)`,pe="100vw",M=`max-w-[${c}]`,ue=`max-w-[${s.default}px]`;function v(e){return typeof e!="number"||!Number.isFinite(e)?s.default:Math.round(Math.min(Math.max(e,s.min),s.max))}function fe(e,t){const n=_(e,t,"size",s);if(n!==null)return{[E]:n};const r=v(e);return r===s.default?{}:{[E]:`${r}px`}}const i={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},l="--sf-site-gutter",a={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},U=G({kind:"spacing"},"vw",i).max;function w(e,t){return e<=t?`${e}px`:`min(${e}px, ${U}vw)`}const O="--sf-site-gutter-phone",W="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",y="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",o=`var(${l},${i.default}px)`,V=`px-[${o}]`,ce=["px-10","px-[60px]"],x={md:`min(24px,${o})`,sm:`min(20px,${o})`,frame:`min(24px,${o})`,tabs:`min(16px,${o})`},k=[[`max-view-desktop:px-[${x.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${x.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${x.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${x.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${x.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${x.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${x.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${x.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${o}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${o})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${o})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${o})]`,"max-view-tablet:-mx-5"],[`-mx-[${o}]`,"-mx-10"],[V,"px-10"]];function me(e){return k.reduce((t,[n,r])=>t.split(n).join(r),e)}const F="sideSpaceOnce",_e="data-sf-side",B="once";function de(e){if(!(!e||typeof e!="object"))return e[F]===!0?B:void 0}const T="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Ee(e){return u[e??"box"]}const m="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",p="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",S={"max-[960px]":m,"max-[900px]":m,"max-view-desktop":m,"max-[1100px]":m,"max-view-wide":p,"max-view-tablet":p,"max-[720px]":p,"max-[640px]":p,"max-[800px]":p},C="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",R="[--sf-edge-g:var(--sf-pad-site)]",u={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:C,edge:R,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:S["max-[960px]"],onceGutter:"[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:C,edge:R,frame:T,once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:S["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"}},le=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${T}`,h="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",j="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function Se(e){return`${j} ${u[e].onceGutter}`}const z="[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]",K="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",Y=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,X="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function Z(e){if(!e)return"";const t=[];for(const n of e.split(/\s+/)){const r=Y.exec(n)?.[1],f=r?L(S,r):void 0;f?t.push(f):n===X&&t.push(K)}return t.join(" ")}const ge="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",ve="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function q(e){if(!e)return"";const t=e.split(" "),n=["site","box"].find(r=>u[r].className.split(" ").every(f=>t.includes(f)));return n?`${z} ${u[n].once} ${u[n].onceGutter}`:""}function we(e,t){const n=t?[q(e),Z(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}function Oe(e){const t=h.replace(/&/g,"&amp;").replace(/>/g,"&gt;");return e.split(` ${t}`).join("").split(` ${h}`).join("")}const Te="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function I(e){return typeof e!="number"||!Number.isFinite(e)?i.default:Math.round(Math.min(Math.max(e,i.min),i.typedMax))}function Ce(e,t){const n=_(e,t,"spacing",i);if(n!==null)return{[l]:n};const r=I(e);return r===i.default?{}:{[l]:w(r,i.max)}}function A(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,a.min),a.typedMax))}function Re(e){return typeof e=="number"&&Number.isFinite(e)?v(e):null}function he(e,t){const n=_(e,t,"spacing",a);if(n!==null)return{[O]:n};const r=A(e);return r===null?{}:{[O]:w(r,a.max)}}function Ie(e){return A(e)===null?"":`${W} ${y}`}function Ae(e,t){const n=P(e,t,"spacing",i),r=n===null?I(e):D(n,b(t),"px","mobile",a);return Math.min(a.max,r)}function J(e=0){return`calc(${c}/2 - ${o}*2 - ${e}px)`}function $e(e=0){return`max-w-[${J(e).replace(/ /g,"_")}]`}const $=c,Ne=`max-w-[${$}]`,He=`max-w-[min(var(--sf-page-cap,${s.default}px),${s.default}px)]`,N="--sf-hero-cap",Q=`var(${N},none)`,Pe=`max-w-[${Q}]`,ee="--sf-hero-bleed-m",te="--sf-hero-bleed-w",ne="--sf-hero-chrome-x",re="--sf-hero-chrome-cap";function be(e){return e===!0?{[N]:$,[ee]:"auto",[te]:"100%",[ne]:"24px",[re]:"none"}:{}}const g=`calc(${c} - ${o}*2)`,De=`max-w-[${g.replace(/ /g,"_")}]`,Ge=M;function Le(e){return e!==!1?null:d(H)}const oe="--sf-chrome-cap",H=`var(${oe},${g})`,Me="data-page-width";function Ue(e){return e==="full"?"full":null}function We(e){return e==="full"?null:d(e==="content"?g:H)}function ye(e){if(e==="full")return"full";if(e==="content")return"content"}export{h as BOX_HOLDS_NO_GUTTER_CLASS,H as CHROME_CAP_READ,oe as CHROME_CAP_VAR,g as CHROME_WIDTH_CAP,De as CHROME_WIDTH_CAP_CLASS,Te as EDITORIAL_COLUMN,pe as FULL_SECTION_WIDTH,Q as HERO_BACKGROUND_CAP,Pe as HERO_BACKGROUND_CAP_CLASS,N as HERO_BACKGROUND_VAR,ee as HERO_BLEED_MARGIN_VAR,te as HERO_BLEED_WIDTH_VAR,$ as HERO_CAP,Ne as HERO_CAP_CLASS,re as HERO_CHROME_CAP_VAR,ne as HERO_CHROME_INSET_VAR,s as PAGE_WIDTH,Me as PAGE_WIDTH_ATTR,Ge as PRE_CHROME_WIDTH_CAP_CLASS,He as PRE_HERO_CAP_CLASS,ce as PRE_SITE_GUTTER_CLASSES,ue as PRE_SITE_WIDTH_CAP_CLASS,_e as SIDE_ONCE_ATTR,ve as SIDE_ONCE_EDGE_GUTTER_CLASS,ge as SIDE_ONCE_EDGE_SIDE_CLASS,z as SIDE_ONCE_HOLDS_CLASS,B as SIDE_ONCE_VALUE,U as SIDE_SPACE_GUARD_VW,F as SIDE_SPACE_ONCE_PROP,le as SITE_COLUMN,T as SITE_COLUMN_NARROW,i as SITE_GUTTER,o as SITE_GUTTER_CAP,V as SITE_GUTTER_CLASS,x as SITE_GUTTER_NARROW,a as SITE_GUTTER_PHONE,W as SITE_GUTTER_PHONE_CLASS,y as SITE_GUTTER_PHONE_EDGE_CLASS,O as SITE_GUTTER_PHONE_VAR,k as SITE_GUTTER_SUBSTITUTIONS,l as SITE_GUTTER_VAR,c as SITE_WIDTH_CAP,M as SITE_WIDTH_CAP_CLASS,E as SITE_WIDTH_VAR,me as asMainGutters,d as centredCap,We as chromeWidthStyle,be as heroBackgroundTokens,Re as normalizeSectionContentMax,I as normalizeSiteGutter,A as normalizeSiteGutterPhone,v as normalizeSiteWidth,Ue as pageWidthMarker,ae as pageWidthStyle,ye as resolveChromeWidth,Se as sideOnceFrameHolds,de as sideSpaceOnceAttr,Ie as siteGutterPhoneClass,Ae as siteGutterPhoneFollows,he as siteGutterPhoneTokens,Ce as siteGutterTokens,J as siteHalfColumnCap,$e as siteHalfColumnCapClass,Ee as siteSideRoom,Le as siteWidthCapStyle,fe as siteWidthTokens,we as withSideOnce,Oe as withoutBoxHoldsNoGutter};
@@ -1,3 +1,3 @@
1
1
  export declare const SECTION_CSS_SCOPE_ATTR = "data-sf-section-css";
2
2
  export declare const SECTION_CSS_KEY = "customCss";
3
- export declare function sectionCssOf(props: Record<string, unknown> | null | undefined): string;
3
+ export declare function sectionCssOf(props: Record<string, unknown> | null | undefined, key?: string): string;
@@ -1 +1 @@
1
- const n="data-sf-section-css",o="customCss";function c(s){const t=s?.[o];return typeof t=="string"&&t.trim()!==""?t:""}export{o as SECTION_CSS_KEY,n as SECTION_CSS_SCOPE_ATTR,c as sectionCssOf};
1
+ const c="data-sf-section-css",n="customCss";function e(s,o=n){const t=s?.[o];return typeof t=="string"&&t.trim()!==""?t:""}export{n as SECTION_CSS_KEY,c as SECTION_CSS_SCOPE_ATTR,e as sectionCssOf};
@@ -0,0 +1,5 @@
1
+ export declare const SITE_CSS_SCOPE_ATTR = "data-sf-site-css";
2
+ export declare const SITE_CSS_SCOPE_ID = "site";
3
+ export declare const SITE_CSS_KEY = "siteCustomCss";
4
+ export declare function siteCssOf(rootProps: unknown): string;
5
+ export declare function siteCssScopeAttr(rootProps: unknown): typeof SITE_CSS_SCOPE_ID | undefined;
@@ -0,0 +1 @@
1
+ import{sectionCssOf as s}from"./section-css.js";const i="data-sf-site-css",e="site",n="siteCustomCss";function S(t){return t&&typeof t=="object"?s(t,n):""}function C(t){return S(t)?e:void 0}export{n as SITE_CSS_KEY,i as SITE_CSS_SCOPE_ATTR,e as SITE_CSS_SCOPE_ID,S as siteCssOf,C as siteCssScopeAttr};
@@ -0,0 +1,7 @@
1
+ import { type BlockSourceSpec } from "./block-sources.js";
2
+ import type { ContactLocationCard } from "./contact.js";
3
+ import type { FootprintOffice } from "./footprint.js";
4
+ export declare const SITE_OFFICES_PROP = "siteOffices";
5
+ export declare function siteOfficesOf(rootProps: unknown): FootprintOffice[];
6
+ export declare function contactLocationOfOffice(office: FootprintOffice): ContactLocationCard;
7
+ export declare const SITE_OFFICES_BLOCK_SOURCE: BlockSourceSpec;
@@ -0,0 +1 @@
1
+ import{SITE_OFFICES_SOURCE as s}from"./block-sources.js";import{splitLegacyRegion as c}from"./contact.js";import{finiteNumber as i}from"../finite-number.js";const u="siteOffices",n=t=>typeof t=="string"?t:"",e=t=>i(t)??0;function a(t){if(!t||typeof t!="object"||Array.isArray(t))return null;const r=t;return{role:n(r.role),city:n(r.city),country:n(r.country),address:n(r.address),phone:n(r.phone),group:n(r.group),hq:r.hq===!0,lat:e(r.lat),lng:e(r.lng)}}function m(t){const r=t&&typeof t=="object"?t[u]:void 0;return Array.isArray(r)?r.map(a).filter(o=>o!==null):[]}function O(t){const{state:r,country:o}=t.country.includes(" · ")?c(t.country):{state:"",country:t.country.trim()};return{photo:"",group:t.group??"",groupName:"",name:t.city,state:r,country:o,timezone:"",address:t.address??"",phone:t.phone??"",hours:"",lat:t.lat,lng:t.lng,mapsUrl:""}}const d={key:s,label:"Site offices",blocks:["Footprint","ContactLocations"]};export{d as SITE_OFFICES_BLOCK_SOURCE,u as SITE_OFFICES_PROP,O as contactLocationOfOffice,m as siteOfficesOf};
@@ -15,6 +15,7 @@ export type BlockRender = Pick<Block, "label" | "defaultProps" | "render" | "inl
15
15
  bottom: number;
16
16
  };
17
17
  sitsInBox?: true;
18
+ partSizeCaps?: Readonly<Record<string, true>>;
18
19
  };
19
20
  export type BlockMeta = Omit<BlockRender, "render">;
20
21
  export type BlockFields = Pick<Block, "fields" | "resolveFields" | "resolveData"> & {
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType, ReactNode } from "react";
2
- import type { TextFit } from "efficient-easel/draw";
2
+ import type { TextFit, ViewTier } from "efficient-easel/draw";
3
3
  import type { AnimationTabKind } from "../../../../editor/lib/animation/fields.js";
4
4
  export type PassRenderProps = Record<string, unknown>;
5
5
  export type PassResolveFields = (data: {
@@ -27,6 +27,7 @@ export type PassBlock = {
27
27
  bottom: number;
28
28
  };
29
29
  sitsInBox?: true;
30
+ partSizeCaps?: Readonly<Record<string, true>>;
30
31
  resolveFields?: PassResolveFields;
31
32
  resolveData?: PassResolveData;
32
33
  render: (props: PassRenderProps) => ReactNode;
@@ -45,7 +46,7 @@ export type PassInspector = {
45
46
  unitKey?: string;
46
47
  fallback?: Partial<Record<"top" | "right" | "bottom" | "left", number>>;
47
48
  }) => FieldMap;
48
- ownPaddingFields?: (frameOf: (props: Record<string, unknown>) => number, note: (props: Record<string, unknown>, frame: number) => string | null, label?: string) => FieldMap;
49
+ ownPaddingFields?: (frameOf: (props: Record<string, unknown>) => number | Readonly<Record<ViewTier, number>>, note: (props: Record<string, unknown>, frame: number) => string | null, label?: string) => FieldMap;
49
50
  sectionShapeFields: () => FieldMap;
50
51
  cardShapeFields: () => FieldMap;
51
52
  cellWidthFields: () => FieldMap;
@@ -87,6 +88,7 @@ export type PassInspector = {
87
88
  styles: ReturnType<typeof import("../../../../render/lib/document/part-styles.js").readPartStyles>;
88
89
  motions?: ReturnType<typeof import("../../../../render/lib/animation/part-motion.js").readPartMotions>;
89
90
  type?: string;
91
+ sizeCaps?: Readonly<Record<string, true>>;
90
92
  children: ReactNode;
91
93
  }>;
92
94
  };
@@ -355,6 +355,7 @@ export declare const WEB_BUILDER_WORDS: {
355
355
  readonly "Couldn\u2019t open this section.": "Couldn’t open this section.";
356
356
  readonly "Couldn\u2019t reach {place}.": "Couldn’t reach {place}.";
357
357
  readonly Count: "Count";
358
+ readonly "Count side space once": "Count side space once";
358
359
  readonly Countdown: "Countdown";
359
360
  readonly Country: "Country";
360
361
  readonly "Country Switch": "Country Switch";
@@ -657,7 +658,9 @@ export declare const WEB_BUILDER_WORDS: {
657
658
  readonly "In its own box": "In its own box";
658
659
  readonly "In progress (main)": "In progress (main)";
659
660
  readonly "In the card": "In the card";
661
+ readonly "In the header": "In the header";
660
662
  readonly "In the list column": "In the list column";
663
+ readonly "In the menu": "In the menu";
661
664
  readonly "In the product": "In the product";
662
665
  readonly "In this issue": "In this issue";
663
666
  readonly "In this section": "In this section";
@@ -879,6 +882,7 @@ export declare const WEB_BUILDER_WORDS: {
879
882
  readonly "On this page": "On this page";
880
883
  readonly "On {count} pages": "On {count} pages";
881
884
  readonly "On: the pinned box stays on top, and the sections after it scroll under it.": "On: the pinned box stays on top, and the sections after it scroll under it.";
885
+ readonly "On: the site's Side space is counted once at each edge of every page. Off: as before.": "On: the site's Side space is counted once at each edge of every page. Off: as before.";
882
886
  readonly One: "One";
883
887
  readonly "One across": "One across";
884
888
  readonly "One colour from top to bottom": "One colour from top to bottom";
@@ -1143,6 +1147,7 @@ export declare const WEB_BUILDER_WORDS: {
1143
1147
  readonly Simple: "Simple";
1144
1148
  readonly Site: "Site";
1145
1149
  readonly "Site button color": "Site button color";
1150
+ readonly "Site offices": "Site offices";
1146
1151
  readonly "Site settings": "Site settings";
1147
1152
  readonly "Six across": "Six across";
1148
1153
  readonly "Six stagger": "Six stagger";