efficient-web-builder 69.4.0 → 70.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/editor/components/SiteFields.js +1 -1
  3. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  4. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  5. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  14. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +19 -0
  15. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  16. package/dist/editor/lib/document/box-fields.d.ts +1 -1
  17. package/dist/editor/lib/document/box-footer-rows.js +1 -1
  18. package/dist/editor/lib/document/controls.d.ts +9 -1
  19. package/dist/editor/lib/document/controls.js +1 -1
  20. package/dist/editor/lib/document/field-groups.js +1 -1
  21. package/dist/editor/lib/host-document-bridge.js +1 -1
  22. package/dist/editor/lib/sections/city-presets.d.ts +1 -1
  23. package/dist/editor/lib/sections/city-presets.js +1 -1
  24. package/dist/editor/lib/sections/insert-box-path.d.ts +8 -0
  25. package/dist/editor/lib/sections/insert-box-path.js +1 -0
  26. package/dist/editor/lib/sections/menu-presets.d.ts +2 -0
  27. package/dist/editor/lib/sections/menu-presets.js +1 -0
  28. package/dist/format/lib/build/module-specifiers.d.ts +11 -0
  29. package/dist/format/lib/build/module-specifiers.js +1 -1
  30. package/dist/format/lib/content/box-background.d.ts +1 -7
  31. package/dist/format/lib/content/box-background.js +1 -1
  32. package/dist/format/lib/content/box-darken-styles.d.ts +7 -0
  33. package/dist/format/lib/content/box-darken-styles.js +1 -0
  34. package/dist/format/lib/content/box-shape.d.ts +1 -1
  35. package/dist/format/lib/content/card-row-keys.d.ts +10 -0
  36. package/dist/format/lib/content/card-row-keys.js +1 -1
  37. package/dist/format/lib/content/card-template.d.ts +1 -11
  38. package/dist/format/lib/content/card-template.js +1 -1
  39. package/dist/format/lib/content/count-numbers.js +1 -1
  40. package/dist/format/lib/content/picture-focus-rows.js +1 -1
  41. package/dist/format/lib/content/section-sticky.d.ts +3 -3
  42. package/dist/format/lib/content/site-gutter.js +1 -1
  43. package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
  44. package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
  45. package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
  46. package/dist/format/lib/document/blocks/general/Footprint/meta.js +1 -1
  47. package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
  48. package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
  49. package/dist/format/lib/document/blocks/general/OrderSummary/meta.js +1 -1
  50. package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
  51. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  52. package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
  53. package/dist/format/lib/document/box-footer.js +1 -1
  54. package/dist/format/lib/document/media-manifest.json +2 -1
  55. package/dist/format/lib/document/node-lists.d.ts +4 -0
  56. package/dist/format/lib/document/node-lists.js +1 -1
  57. package/dist/format/lib/document/passes/document-position.js +1 -1
  58. package/dist/format/lib/document/section-catalog.js +19 -3
  59. package/dist/format/lib/editor-words-kept.js +1 -1
  60. package/dist/format/lib/hero-media-layout.d.ts +12 -0
  61. package/dist/format/lib/hero-media-layout.js +1 -1
  62. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  63. package/dist/format/lib/source-rules/editor-words.js +1 -1
  64. package/dist/format/lib/source-rules/panel-one-arrow.js +1 -1
  65. package/dist/format/lib/source-rules/support/panel-select-cascade.d.ts +1 -1
  66. package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -1
  67. package/dist/render/components/HeroSingle.d.ts +2 -1
  68. package/dist/render/components/HeroSingle.js +1 -1
  69. package/dist/render/components/HeroSlide.d.ts +2 -1
  70. package/dist/render/components/HeroSlide.js +1 -1
  71. package/dist/render/lib/content/page-contents.js +1 -1
  72. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  73. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  74. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  75. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +1 -0
  76. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  77. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  78. package/dist/render/lib/document/hero-media-parts.d.ts +6 -4
  79. package/dist/render/lib/document/hero-media-parts.js +1 -1
  80. package/dist/render/lib/document/slot-counts.js +1 -1
  81. package/dist/render/lib/sections/section-to-box.js +1 -1
  82. package/package.json +5 -5
  83. package/dist/format/lib/document/panel-bands.d.ts +0 -15
  84. package/dist/format/lib/document/panel-bands.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import type * as TS from "typescript";
2
2
  import type { SourceFile } from "../rule.js";
3
3
  import type { Rule } from "./css-rules.js";
4
- export declare function importsOf(ts: typeof TS, file: SourceFile): string[];
4
+ export declare const importsOf: (ts: typeof TS, file: SourceFile) => string[];
5
5
  export type PanelSelect = {
6
6
  file: string;
7
7
  line: number;
@@ -1 +1 @@
1
- import{isScript as A,programOf as L}from"./ts-program.js";function N(e,i){const r=e.createSourceFile(i.path,i.text,e.ScriptTarget.Latest,!0),n=[],s=o=>{(e.isImportDeclaration(o)||e.isExportDeclaration(o))&&o.moduleSpecifier&&e.isStringLiteral(o.moduleSpecifier)&&n.push(o.moduleSpecifier.text),e.isCallExpression(o)&&(o.expression.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(o.expression)&&o.expression.text==="require")&&o.arguments.length>0&&e.isStringLiteral(o.arguments[0])&&n.push(o.arguments[0].text),o.forEachChild(s)};return s(r),n}function Z(e,i,r){const n=L(e,i),s=n.getTypeChecker();let o;n.getSourceFile(`/${r.file}`)?.forEachChild(a=>{if(e.isFunctionDeclaration(a)&&a.name?.text==="select"&&(o=a),e.isVariableStatement(a))for(const p of a.declarationList.declarations)e.isIdentifier(p.name)&&p.name.text==="select"&&(o=p)});const t=new Set(r.modules??[]),l=a=>{if(!e.isImportSpecifier(a))return!1;const p=a.parent.parent.parent;return(a.propertyName??a.name).text==="select"&&e.isStringLiteral(p.moduleSpecifier)&&t.has(p.moduleSpecifier.text)},u=[];for(const a of n.getSourceFiles()){if(a.isDeclarationFile)continue;const p=a.fileName.slice(1),g=c=>a.getLineAndCharacterOfPosition(c.getStart()).line+1;let S=!1;const m=c=>{e.isStringLiteral(c)&&/(^|\s)sf-[a-z0-9-]/.test(c.text)&&(S=!0),e.isImportDeclaration(c)&&e.isStringLiteral(c.moduleSpecifier)&&/^(editor-shell|efficient-easel)(\/|$)/.test(c.moduleSpecifier.text)&&(S=!0),c.forEachChild(m)};m(a);const h=c=>{if(e.isPropertyAssignment(c)&&e.isIdentifier(c.name)&&c.name.text==="type"&&e.isStringLiteral(c.initializer)&&c.initializer.text==="select"&&u.push({file:p,line:g(c),kind:'field: type "select"',engineDrawn:!0,classes:[]}),e.isCallExpression(c)&&e.isIdentifier(c.expression)){const d=s.getSymbolAtLocation(c.expression),x=d&&d.flags&e.SymbolFlags.Alias?s.getAliasedSymbol(d):d;[...d?.declarations??[],...x?.declarations??[]].some(f=>o!==void 0&&f===o||l(f))&&u.push({file:p,line:g(c),kind:"field: select() helper",engineDrawn:!0,classes:[]})}if(e.isJsxOpeningLikeElement(c)&&c.tagName.getText()==="select"&&S&&p!==r.file){const d=c.attributes.properties.find(b=>e.isJsxAttribute(b)&&e.isIdentifier(b.name)&&b.name.text==="className"),x=d&&d.initializer&&e.isStringLiteral(d.initializer)?d.initializer.text:"";u.push({file:p,line:g(c),kind:"element: <select> in panel markup",engineDrawn:!1,classes:x.split(/\s+/).filter(Boolean)})}c.forEachChild(h)};h(a)}return{population:u,helperDeclared:o!==void 0}}const w=(e,i)=>e[0]-i[0]||e[1]-i[1]||e[2]-i[2],M=e=>`(${e[0]},${e[1]},${e[2]})`;function v(e){const i=[];let r=0,n=null,s="";const o=()=>{const t=s.indexOf(":");t>0&&i.push({prop:s.slice(0,t).trim(),value:s.slice(t+1).trim()}),s=""};for(const t of e){if(n){s+=t,t===n&&(n=null);continue}if(t==='"'||t==="'")n=t;else if(t==="(")r+=1;else if(t===")")r=Math.max(0,r-1);else if(t===";"&&r===0){o();continue}s+=t}return o(),i}function I(e){const i=[];let r=0,n="";for(const s of e){if(s==="("&&(r+=1),s===")"&&(r-=1),r===0&&/[\s>+~]/.test(s)){n.trim()&&i.push(n.trim()),n="";continue}n+=s}return n.trim()&&i.push(n.trim()),i}function C(e){let i=e.trim();const r=[],n=[];let s=null;const o=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(i);for(o&&(s=o[0],i=i.slice(o[0].length));i.length;){let t;if(t=/^\.([A-Za-z0-9_-]+)/.exec(i))r.push(t[1]);else if(t=/^:(focus-visible|focus-within|hover|focus|active|checked|disabled)\b/.exec(i))n.push(t[1]);else if(t=/^:dir\([^)]*\)/.exec(i))n.push("dir");else if(t=/^:not\(\[([A-Za-z-]+)\]\)/.exec(i))r.push(`@not-${t[1]}`);else if(t=/^\[([A-Za-z-]+)(?:[~^$*|]?=[^\]]*)?\]/.exec(i))n.push(`[${t[1]}]`);else if(t=/^:has\(([^)]*)\)/.exec(i)){if(!/^\s*>?\s*[a-z]+\s*$/.test(t[1]))return null;r.push("@has-type")}else return null;i=i.slice(t[0].length)}return{type:s,classes:r,needsState:n}}const D=e=>e.reduce((i,r)=>[i[0],i[1]+r.classes.filter(n=>n!=="@has-type").length+r.needsState.length,i[2]+(r.type?1:0)+(r.classes.includes("@has-type")?1:0)],[0,0,0]);function E(e){if(e===null)return!0;let i=!0;for(const r of e.replace(/^@media\s*/i,"").split(/\s+and\s+/i)){const n=r.trim().replace(/^\(|\)$/g,"").trim(),s=/^([a-z-]+)\s*:\s*(.+)$/.exec(n);if(!s)return null;const o=s[1],t=s[2].trim();if(o==="hover"||o==="any-hover"){if(t==="hover")continue;return t==="none"?!1:null}if(o==="pointer"||o==="any-pointer"){if(t==="fine")continue;return t==="coarse"||t==="none"?!1:null}i=null}return i}const T=e=>e??"(no media query)";function W(e,i,r,n,s="rest"){const o=[],t=[],l=[],u=s==="hover"?new Set(["hover"]):new Set;return e.forEach((a,p)=>{const g=s==="rest"?a.media===null:E(a.media);for(const S of a.selector.split(",")){const m=S.trim();if(!m||!/(^|[\s,>+~])select\b/.test(m)&&!i.own.some(f=>m.includes(`.${f}`)))continue;const h=I(m).map(C),c=h[h.length-1];if(h.some(f=>f===null)||!c){t.push(`${r}: ${m}`);continue}const d=h;if(c.type&&c.type!=="select")continue;const x=c.classes.filter(f=>!f.startsWith("@"));if(!(!x.every(f=>i.own.includes(f))||!c.type&&x.length===0||!c.needsState.every(f=>u.has(f))||!d.slice(0,-1).every(f=>(!f.type||f.type==="div")&&f.classes.filter(y=>!y.startsWith("@")).every(y=>i.ancestors.includes(y))&&f.needsState.every(y=>u.has(y))))&&g!==!1){if(g===null){l.push({sheet:r,selector:m,media:a.media??"",decls:a.decls});continue}o.push({spec:D(d),order:n+p,decls:a.decls,selector:m,sheet:r})}}}),{applied:o,unreadable:t,undecided:l}}const k={appearance:"auto","background-image":"none","background-size":"auto","background-repeat":"repeat","background-position":"0% 0%","background-color":"transparent","border-color":"currentcolor"};function $(e){const i=e.replace(/url\([\s\S]*?\)/g," "),r=/var\(--[A-Za-z0-9-]+(?:\s*,[^()]*)?\)|#[0-9a-fA-F]{3,8}\b|(?:rgba?|hsla?|color-mix|color)\([^()]*(?:\([^()]*\)[^()]*)*\)|\b(?:transparent|currentcolor|white|black)\b/i.exec(i);return r?r[0]:null}function j(e){const i=new Map;for(const r of v(e.replace(/[^{}]*\{|\}/g,";")))r.prop.startsWith("--")&&i.set(r.prop,r.value);return i}function z(e,i,r=0){if(r>8)return e;let n=!1;const s=e.replace(/var\(\s*(--[A-Za-z0-9-]+)\s*(?:,([^()]*(?:\([^()]*\)[^()]*)*))?\)/g,(o,t)=>{const l=i.get(t);return l===void 0?o:(n=!0,l)});return n?z(s,i,r+1):s}function q(e,i,r=new Map){let n=null;const s=(t,l)=>{(!n||w(t.spec,n.spec)>0||w(t.spec,n.spec)===0&&t.order>=n.order)&&(n={value:l.trim(),from:`${t.sheet} { ${t.selector} }`,spec:t.spec,order:t.order})};for(const t of e)for(const l of v(t.decls)){if(l.prop===i||i==="appearance"&&l.prop==="-webkit-appearance"){s(t,l.value);continue}if(l.prop==="border"&&i==="border-color"){s(t,$(l.value)??k[i]);continue}if(l.prop!=="background"||!i.startsWith("background-"))continue;const u=l.value;s(t,i==="background-image"?/url\([\s\S]*?\)|linear-gradient\([\s\S]*?\)|image-set\([\s\S]*?\)/.exec(u)?.[0]??"none":i==="background-repeat"?/\b(no-repeat|repeat-x|repeat-y|round|space|repeat)\b/.exec(u)?.[0]??"repeat":i==="background-color"?$(u)??k[i]:k[i])}const o=n??{value:k[i],from:"(nothing declares one)"};return{value:z(o.value,r),from:o.from}}const O=["sf-editor","sf-body","sf-panel","sf-insp-body","sf-styles","sf-field","es-field","sf-copybox"];function J(e,i){const r=e.filter(t=>!t.engineDrawn),n=t=>new RegExp(`\\.${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(i),s=t=>[...t.classes].filter(n).sort().join(" "),o=new Set([""]);for(const t of r)o.add(s(t));return[...o].sort().map(t=>({name:t?`house .${t.split(" ").join(".")}`:"house (bare)",own:t?t.split(" "):[],ancestors:[...O],rows:r.filter(l=>s(l)===t).length}))}function K(e,i,r){const n=new Map;for(const s of r)n.set(s,[]);for(const s of i){if(!A(s.path))continue;const o=e.createSourceFile(s.path,s.text,e.ScriptTarget.Latest,!0),t=l=>{if(e.isJsxAttribute(l)&&e.isIdentifier(l.name)&&l.name.text==="className"&&l.initializer&&e.isStringLiteral(l.initializer)){const u=l.initializer.text.split(/\s+/).filter(Boolean);for(const a of r)u.includes(a)&&n.get(a)?.push(s.path)}l.forEachChild(t)};t(o)}return n}export{O as ANCESTORS,k as INITIAL,W as applicable,Z as census,K as chainInMarkup,$ as colorIn,C as compound,z as derefVars,J as deriveShapes,N as importsOf,E as mediaHolds,T as mediaLabel,j as readVars,q as resolve,w as specCmp,D as specOf,M as specStr,I as splitCombinators,v as splitDecls};
1
+ import{isScript as A,programOf as L}from"./ts-program.js";import{importsOf as C}from"../../build/module-specifiers.js";const M=(i,t)=>C(i,t.path,t.text);function T(i,t,n){const s=L(i,t),r=s.getTypeChecker();let c;s.getSourceFile(`/${n.file}`)?.forEachChild(a=>{if(i.isFunctionDeclaration(a)&&a.name?.text==="select"&&(c=a),i.isVariableStatement(a))for(const p of a.declarationList.declarations)i.isIdentifier(p.name)&&p.name.text==="select"&&(c=p)});const e=new Set(n.modules??[]),l=a=>{if(!i.isImportSpecifier(a))return!1;const p=a.parent.parent.parent;return(a.propertyName??a.name).text==="select"&&i.isStringLiteral(p.moduleSpecifier)&&e.has(p.moduleSpecifier.text)},u=[];for(const a of s.getSourceFiles()){if(a.isDeclarationFile)continue;const p=a.fileName.slice(1),g=o=>a.getLineAndCharacterOfPosition(o.getStart()).line+1;let b=!1;const m=o=>{i.isStringLiteral(o)&&/(^|\s)sf-[a-z0-9-]/.test(o.text)&&(b=!0),i.isImportDeclaration(o)&&i.isStringLiteral(o.moduleSpecifier)&&/^(editor-shell|efficient-easel)(\/|$)/.test(o.moduleSpecifier.text)&&(b=!0),o.forEachChild(m)};m(a);const h=o=>{if(i.isPropertyAssignment(o)&&i.isIdentifier(o.name)&&o.name.text==="type"&&i.isStringLiteral(o.initializer)&&o.initializer.text==="select"&&u.push({file:p,line:g(o),kind:'field: type "select"',engineDrawn:!0,classes:[]}),i.isCallExpression(o)&&i.isIdentifier(o.expression)){const d=r.getSymbolAtLocation(o.expression),x=d&&d.flags&i.SymbolFlags.Alias?r.getAliasedSymbol(d):d;[...d?.declarations??[],...x?.declarations??[]].some(f=>c!==void 0&&f===c||l(f))&&u.push({file:p,line:g(o),kind:"field: select() helper",engineDrawn:!0,classes:[]})}if(i.isJsxOpeningLikeElement(o)&&o.tagName.getText()==="select"&&b&&p!==n.file){const d=o.attributes.properties.find(S=>i.isJsxAttribute(S)&&i.isIdentifier(S.name)&&S.name.text==="className"),x=d&&d.initializer&&i.isStringLiteral(d.initializer)?d.initializer.text:"";u.push({file:p,line:g(o),kind:"element: <select> in panel markup",engineDrawn:!1,classes:x.split(/\s+/).filter(Boolean)})}o.forEachChild(h)};h(a)}return{population:u,helperDeclared:c!==void 0}}const k=(i,t)=>i[0]-t[0]||i[1]-t[1]||i[2]-t[2],W=i=>`(${i[0]},${i[1]},${i[2]})`;function w(i){const t=[];let n=0,s=null,r="";const c=()=>{const e=r.indexOf(":");e>0&&t.push({prop:r.slice(0,e).trim(),value:r.slice(e+1).trim()}),r=""};for(const e of i){if(s){r+=e,e===s&&(s=null);continue}if(e==='"'||e==="'")s=e;else if(e==="(")n+=1;else if(e===")")n=Math.max(0,n-1);else if(e===";"&&n===0){c();continue}r+=e}return c(),t}function I(i){const t=[];let n=0,s="";for(const r of i){if(r==="("&&(n+=1),r===")"&&(n-=1),n===0&&/[\s>+~]/.test(r)){s.trim()&&t.push(s.trim()),s="";continue}s+=r}return s.trim()&&t.push(s.trim()),t}function O(i){let t=i.trim();const n=[],s=[];let r=null;const c=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(t);for(c&&(r=c[0],t=t.slice(c[0].length));t.length;){let e;if(e=/^\.([A-Za-z0-9_-]+)/.exec(t))n.push(e[1]);else if(e=/^:(focus-visible|focus-within|hover|focus|active|checked|disabled)\b/.exec(t))s.push(e[1]);else if(e=/^:dir\([^)]*\)/.exec(t))s.push("dir");else if(e=/^:not\(\[([A-Za-z-]+)\]\)/.exec(t))n.push(`@not-${e[1]}`);else if(e=/^\[([A-Za-z-]+)(?:[~^$*|]?=[^\]]*)?\]/.exec(t))s.push(`[${e[1]}]`);else if(e=/^:has\(([^)]*)\)/.exec(t)){if(!/^\s*>?\s*[a-z]+\s*$/.test(e[1]))return null;n.push("@has-type")}else return null;t=t.slice(e[0].length)}return{type:r,classes:n,needsState:s}}const D=i=>i.reduce((t,n)=>[t[0],t[1]+n.classes.filter(s=>s!=="@has-type").length+n.needsState.length,t[2]+(n.type?1:0)+(n.classes.includes("@has-type")?1:0)],[0,0,0]);function E(i){if(i===null)return!0;let t=!0;for(const n of i.replace(/^@media\s*/i,"").split(/\s+and\s+/i)){const s=n.trim().replace(/^\(|\)$/g,"").trim(),r=/^([a-z-]+)\s*:\s*(.+)$/.exec(s);if(!r)return null;const c=r[1],e=r[2].trim();if(c==="hover"||c==="any-hover"){if(e==="hover")continue;return e==="none"?!1:null}if(c==="pointer"||c==="any-pointer"){if(e==="fine")continue;return e==="coarse"||e==="none"?!1:null}t=null}return t}const j=i=>i??"(no media query)";function J(i,t,n,s,r="rest"){const c=[],e=[],l=[],u=r==="hover"?new Set(["hover"]):new Set;return i.forEach((a,p)=>{const g=r==="rest"?a.media===null:E(a.media);for(const b of a.selector.split(",")){const m=b.trim();if(!m||!/(^|[\s,>+~])select\b/.test(m)&&!t.own.some(f=>m.includes(`.${f}`)))continue;const h=I(m).map(O),o=h[h.length-1];if(h.some(f=>f===null)||!o){e.push(`${n}: ${m}`);continue}const d=h;if(o.type&&o.type!=="select")continue;const x=o.classes.filter(f=>!f.startsWith("@"));if(!(!x.every(f=>t.own.includes(f))||!o.type&&x.length===0||!o.needsState.every(f=>u.has(f))||!d.slice(0,-1).every(f=>(!f.type||f.type==="div")&&f.classes.filter(y=>!y.startsWith("@")).every(y=>t.ancestors.includes(y))&&f.needsState.every(y=>u.has(y))))&&g!==!1){if(g===null){l.push({sheet:n,selector:m,media:a.media??"",decls:a.decls});continue}c.push({spec:D(d),order:s+p,decls:a.decls,selector:m,sheet:n})}}}),{applied:c,unreadable:e,undecided:l}}const v={appearance:"auto","background-image":"none","background-size":"auto","background-repeat":"repeat","background-position":"0% 0%","background-color":"transparent","border-color":"currentcolor"};function $(i){const t=i.replace(/url\([\s\S]*?\)/g," "),n=/var\(--[A-Za-z0-9-]+(?:\s*,[^()]*)?\)|#[0-9a-fA-F]{3,8}\b|(?:rgba?|hsla?|color-mix|color)\([^()]*(?:\([^()]*\)[^()]*)*\)|\b(?:transparent|currentcolor|white|black)\b/i.exec(t);return n?n[0]:null}function P(i){const t=new Map;for(const n of w(i.replace(/[^{}]*\{|\}/g,";")))n.prop.startsWith("--")&&t.set(n.prop,n.value);return t}function z(i,t,n=0){if(n>8)return i;let s=!1;const r=i.replace(/var\(\s*(--[A-Za-z0-9-]+)\s*(?:,([^()]*(?:\([^()]*\)[^()]*)*))?\)/g,(c,e)=>{const l=t.get(e);return l===void 0?c:(s=!0,l)});return s?z(r,t,n+1):r}function V(i,t,n=new Map){let s=null;const r=(e,l)=>{(!s||k(e.spec,s.spec)>0||k(e.spec,s.spec)===0&&e.order>=s.order)&&(s={value:l.trim(),from:`${e.sheet} { ${e.selector} }`,spec:e.spec,order:e.order})};for(const e of i)for(const l of w(e.decls)){if(l.prop===t||t==="appearance"&&l.prop==="-webkit-appearance"){r(e,l.value);continue}if(l.prop==="border"&&t==="border-color"){r(e,$(l.value)??v[t]);continue}if(l.prop!=="background"||!t.startsWith("background-"))continue;const u=l.value;r(e,t==="background-image"?/url\([\s\S]*?\)|linear-gradient\([\s\S]*?\)|image-set\([\s\S]*?\)/.exec(u)?.[0]??"none":t==="background-repeat"?/\b(no-repeat|repeat-x|repeat-y|round|space|repeat)\b/.exec(u)?.[0]??"repeat":t==="background-color"?$(u)??v[t]:v[t])}const c=s??{value:v[t],from:"(nothing declares one)"};return{value:z(c.value,n),from:c.from}}const F=["sf-editor","sf-body","sf-panel","sf-insp-body","sf-styles","sf-field","es-field","sf-copybox"];function q(i,t){const n=i.filter(e=>!e.engineDrawn),s=e=>new RegExp(`\\.${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(t),r=e=>[...e.classes].filter(s).sort().join(" "),c=new Set([""]);for(const e of n)c.add(r(e));return[...c].sort().map(e=>({name:e?`house .${e.split(" ").join(".")}`:"house (bare)",own:e?e.split(" "):[],ancestors:[...F],rows:n.filter(l=>r(l)===e).length}))}function B(i,t,n){const s=new Map;for(const r of n)s.set(r,[]);for(const r of t){if(!A(r.path))continue;const c=i.createSourceFile(r.path,r.text,i.ScriptTarget.Latest,!0),e=l=>{if(i.isJsxAttribute(l)&&i.isIdentifier(l.name)&&l.name.text==="className"&&l.initializer&&i.isStringLiteral(l.initializer)){const u=l.initializer.text.split(/\s+/).filter(Boolean);for(const a of n)u.includes(a)&&s.get(a)?.push(r.path)}l.forEachChild(e)};e(c)}return s}export{F as ANCESTORS,v as INITIAL,J as applicable,T as census,B as chainInMarkup,$ as colorIn,O as compound,z as derefVars,q as deriveShapes,M as importsOf,E as mediaHolds,j as mediaLabel,P as readVars,V as resolve,k as specCmp,D as specOf,W as specStr,I as splitCombinators,w as splitDecls};
@@ -1,9 +1,10 @@
1
1
  import { type SlotComponent } from "efficient-easel/blocks";
2
+ import { type HeroMediaType } from "../../format/lib/hero-media-layout.js";
2
3
  export interface HeroSingleProps {
3
4
  overlay?: number;
4
5
  overlayColor?: string;
5
6
  overlayPosition?: string;
6
- mediaType?: "video" | "image";
7
+ mediaType?: HeroMediaType;
7
8
  mediaSrc?: string;
8
9
  poster?: string;
9
10
  objectPosition?: string;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as k}from"react/jsx-runtime";import{HideTaker as ee}from"./ViewHideRoot.js";import{useRef as oe,useState as re}from"react";import te from"./HeroPoster.js";import{HeroMediaLayer as ie,heroMediaReading as se,HeroPickArea as ae,heroPartEntrance as ne,heroPartHover as le,heroPartScroll as ce,heroPictureOrigins as me,HeroPictureHover as ue,heroPicturesHover as de,HeroTint as he,HeroTwoPictures as fe}from"./HeroPictures.js";import{HeroVideoBackdrop as pe,HeroVideoPlayer as ge}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as ve,heroStoresRatio as ye}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as xe,overlayGradient as He}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as Pe}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as u}from"../../format/lib/content/tint.js";import be from"./PhotoHoverSheet.js";function we({overlay:L=100,overlayColor:I=u,overlayPosition:E=xe,mediaType:d="image",mediaSrc:s,poster:h,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f=u,tintOpacity:p=0,heightDesktop:A,heightMobile:O,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,boxes:g,videoSource:R,youtubeUrl:M,videoPlayback:B,mediaLayout:D,mediaLayoutPhone:F,mediaImage2:Y,objectPosition2:C,objectPosition2Phone:U,objectPosition2Tablet:$,tintColor2:G=u,tintOpacity2:K=0,editing:o=!1,partMotion:r}){const v=ve({heightDesktop:A,heightMobile:O,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:q,style:J}=v,y=ye(v),c=d==="video",x=c?i(s):void 0,H=c?i(h):i(s)??i(h),{fromYouTube:P,onClick:b,youTubeId:w,backgroundFile:T,desktopLayout:Q,phoneLayout:W,twoPictures:N}=se({isVideo:c,videoSource:R,videoPlayback:B,youtubeUrl:M,mediaLayout:D,mediaLayoutPhone:F}),[S,X]=re(!1),m=!S,Z=oe(null),t=d==="video"?"media":"image",_=de(r);return k(ee,{as:"section",ref:Z,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${q} max-w-[var(--sf-hero-cap,none)] ${y?"overflow-clip":"overflow-hidden"}`,style:J,..._.hostAttrs,children:[e(be,{sheet:_.sheet}),e(ie,{partMotion:r,editing:o,children:N?e(fe,{desktopLayout:Q,phoneLayout:W,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f,tintOpacity:p},second:{src:Y,objectPosition:C,objectPositionPhone:U,objectPositionTablet:$,tintColor:G,tintOpacity:K}}):e(ae,{part:t,editing:o,entrance:t==="image"?ne(r,"image"):null,scroll:t==="image"?ce(r,"image"):null,origins:me({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(ue,{treatment:t==="image"?le(r,"image"):{},children:[e(te,{videoSrc:T?x:void 0,posterSrc:H,showVideo:T,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),P&&e(pe,{youTubeId:w,ownPoster:!!H,background:!b,editing:o})]})})}),b&&e(ge,{youTubeId:w,fileSrc:P?void 0:x,playing:S,onPlay:()=>X(!0),editing:o}),m&&!N&&e(he,{color:f,opacity:p}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:He(I,E),opacity:Math.min(Math.max(L,0),100)/100}}),m&&g&&e("div",{className:[y?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:Pe,children:e(g,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{we as default};
1
+ "use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{HideTaker as ee}from"./ViewHideRoot.js";import{useRef as oe,useState as re}from"react";import te from"./HeroPoster.js";import{HeroMediaLayer as ie,heroMediaReading as se,HeroPickArea as ae,heroPartEntrance as ne,heroPartHover as le,heroPartScroll as ce,heroPictureOrigins as me,HeroPictureHover as ue,heroPicturesHover as de,HeroTint as he,HeroTwoPictures as fe}from"./HeroPictures.js";import{HeroVideoBackdrop as pe,HeroVideoPlayer as ge}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as ve,heroStoresRatio as ye}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as He,overlayGradient as xe}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as Pe}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as u}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as be}from"../../format/lib/hero-media-layout.js";import we from"./PhotoHoverSheet.js";function Te({overlay:k=100,overlayColor:I=u,overlayPosition:L=He,mediaType:d=be.HeroSingle,mediaSrc:s,poster:h,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f=u,tintOpacity:p=0,heightDesktop:A,heightMobile:O,heightFixed:R,heightFixedTablet:V,heightFixedMobile:j,boxes:g,videoSource:z,youtubeUrl:M,videoPlayback:B,mediaLayout:D,mediaLayoutPhone:Y,mediaImage2:F,objectPosition2:C,objectPosition2Phone:U,objectPosition2Tablet:$,tintColor2:G=u,tintOpacity2:K=0,editing:o=!1,partMotion:r}){const v=ve({heightDesktop:A,heightMobile:O,heightFixed:R,heightFixedTablet:V,heightFixedMobile:j}),{className:q,style:J}=v,y=ye(v),c=d==="video",H=c?i(s):void 0,x=c?i(h):i(s)??i(h),{fromYouTube:P,onClick:b,youTubeId:w,backgroundFile:T,desktopLayout:Q,phoneLayout:W,twoPictures:_}=se({isVideo:c,videoSource:z,videoPlayback:B,youtubeUrl:M,mediaLayout:D,mediaLayoutPhone:Y}),[S,X]=re(!1),m=!S,Z=oe(null),t=d==="video"?"media":"image",E=de(r);return N(ee,{as:"section",ref:Z,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${q} max-w-[var(--sf-hero-cap,none)] ${y?"overflow-clip":"overflow-hidden"}`,style:J,...E.hostAttrs,children:[e(we,{sheet:E.sheet}),e(ie,{partMotion:r,editing:o,children:_?e(fe,{desktopLayout:Q,phoneLayout:W,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f,tintOpacity:p},second:{src:F,objectPosition:C,objectPositionPhone:U,objectPositionTablet:$,tintColor:G,tintOpacity:K}}):e(ae,{part:t,editing:o,entrance:t==="image"?ne(r,"image"):null,scroll:t==="image"?ce(r,"image"):null,origins:me({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:N(ue,{treatment:t==="image"?le(r,"image"):{},children:[e(te,{videoSrc:T?H:void 0,posterSrc:x,showVideo:T,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),P&&e(pe,{youTubeId:w,ownPoster:!!x,background:!b,editing:o})]})})}),b&&e(ge,{youTubeId:w,fileSrc:P?void 0:H,playing:S,onPlay:()=>X(!0),editing:o}),m&&!_&&e(he,{color:f,opacity:p}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:xe(I,L),opacity:Math.min(Math.max(k,0),100)/100}}),m&&g&&e("div",{className:[y?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:Pe,children:e(g,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{Te as default};
@@ -1,6 +1,7 @@
1
1
  import type { CSSProperties } from "react";
2
2
  import type { SlotComponent } from "efficient-easel/blocks";
3
3
  import { type HeroCopyAlignment } from "../../format/lib/hero-group-placement.js";
4
+ import { type HeroMediaType } from "../../format/lib/hero-media-layout.js";
4
5
  export interface HeroSlideStyle {
5
6
  alignment?: HeroCopyAlignment;
6
7
  textureOpacity?: number;
@@ -18,7 +19,7 @@ export declare const HeroSlideStyleContext: import("react").Context<HeroSlideSty
18
19
  export interface HeroSlideProps {
19
20
  name?: string;
20
21
  process?: string;
21
- mediaType?: "video" | "image";
22
+ mediaType?: HeroMediaType;
22
23
  mediaSrc?: string;
23
24
  videoSpeed?: number;
24
25
  poster?: string;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as B}from"react/jsx-runtime";import{useTakeViewHide as He,withViewHide as ke}from"./ViewHideRoot.js";import{createContext as be,useContext as Te,useEffect as Ee,useRef as Le,useState as q}from"react";import Ae from"./HeroPoster.js";import{HeroMediaLayer as Oe,heroMediaReading as _e,HeroPickArea as Ne,heroPartEntrance as Ve,heroPartHover as Ce,heroPartScroll as Ie,heroPictureOrigins as Re,HeroPictureHover as je,heroPicturesHover as ze,HeroTint as De,HeroTwoPictures as Fe}from"./HeroPictures.js";import{HeroVideoBackdrop as $e,HeroVideoPlayer as Be}from"./HeroVideoPlay.js";import{BelowFirstScreen as qe,useFirstScreenPlace as Me}from"../lib/first-screen.js";import{markedChildren as Ue}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Ye}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Ge,heroTextureShown as Ke}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Je}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as M}from"../../format/lib/content/tint.js";import{overlayGradient as Qe,slideOverlayState as We}from"../../format/lib/sections/hero-overlay.js";import Xe from"./PhotoHoverSheet.js";const Ze=be({});function eo({name:w,process:d,mediaType:U="video",mediaSrc:c,videoSpeed:P,poster:H,mediaAv1:Y,mediaSrcPhone:G,mediaAv1Phone:K,posterPhone:J,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:k=M,tintOpacity:b=0,groups:T,editing:i=!1,themeClassName:E,themeStyle:Q,overlayColor:W,overlayPosition:X,mediaLayout:Z,mediaLayoutPhone:ee,mediaImage2:oe,objectPosition2:re,objectPosition2Phone:te,objectPosition2Tablet:ie,tintColor2:ne=M,tintOpacity2:se=0,videoSource:ae,youtubeUrl:le,videoPlayback:de,partMotion:n,laterSlide:m=!1}){const h=He(),{alignment:oo="left",textureOpacity:L,textureOn:ce,textureColor:ue,quietVideo:fe,phoneUpDown:pe,phoneSideways:me,holdReel:he,reelHeld:ve,shownSlide:v,ratioMin:A}=Te(Ze),ye=Me(),O=m&&ye==="first",_=Le(null),[Se,xe]=q(v===void 0?void 0:!1);Ee(()=>{const g=_.current;xe(v===void 0||!g?void 0:Ue(g.closest(".hero-track"),"data-slide-name")[v]===g)});const o=U==="video",y=o?r(c):void 0,N=o?r(H):r(c)??r(H),t=o?{av1:r(Y),phone:r(G),av1Phone:r(K),poster:r(J)}:{},ge=typeof P=="number"?P/100:1,{fromYouTube:s,onClick:V,youTubeId:C,backgroundFile:a,desktopLayout:we,phoneLayout:Pe,twoPictures:I}=_e({isVideo:o,videoSource:ae,videoPlayback:de,youtubeUrl:le,mediaLayout:Z,mediaLayoutPhone:ee}),[S,R]=q(!1);S&&ve===!1&&R(!1);const x=!S,l=We({overlayColor:W,overlayPosition:X},ue),j=o?null:Ve(n,"image"),z=o?null:Ie(n,"image"),D=ze(n),F=e(je,{treatment:o?{}:Ce(n,"image"),children:e(Ae,{videoSrc:a?y:void 0,videoAv1Src:a?t.av1:void 0,videoSrcPhone:a?t.phone:void 0,videoAv1SrcPhone:a?t.av1Phone:void 0,posterSrc:N,posterSrcPhone:t.poster,showVideo:a,playbackRate:ge,objectPosition:u,objectPositionPhone:o?void 0:f,objectPositionTablet:o?void 0:p,quiet:fe,slideShown:Se,laterSlide:m,laterOfLead:O})}),$=B("section",{ref:_,className:ke(`${A?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${E?` ${E}`:""}`,h.className),...h.attrs,style:Q,"data-slide-name":w??"","data-slide-process":d??"","data-slide-media":a&&y?"video":"still",...D.hostAttrs,children:[e(Xe,{sheet:D.sheet}),e(Oe,{partMotion:n,editing:i,children:I?e(Fe,{laterSlide:m,desktopLayout:we,phoneLayout:Pe,editing:i,marked:!1,partMotion:n,first:{src:c,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:k,tintOpacity:b},second:{src:oe,objectPosition:re,objectPositionPhone:te,objectPositionTablet:ie,tintColor:ne,tintOpacity:se}}):s||j||z?B(Ne,{part:o?"media":"image",editing:i,marked:!1,entrance:j,scroll:z,origins:Re({objectPosition:u,objectPositionTablet:p,objectPositionPhone:f}),className:"absolute inset-0 z-[1]",children:[F,s&&e($e,{youTubeId:C,ownPoster:!!N,background:!V,editing:i})]}):F}),V&&e(Be,{youTubeId:C,fileSrc:s?void 0:y,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:S,onPlay:()=>{R(!0),he?.()},editing:i}),x&&!I&&e(De,{color:k,opacity:b,passClicks:!1}),x&&Ke(ce)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:l.own?Qe(l.color,l.position??void 0):Ge(l.color),...L!==void 0?{opacity:L/100}:null}}),x&&e("div",{className:[A?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Je,...Ye(pe,me)},children:T&&e(T,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return h.scope(O?e(qe,{children:$}):$)}const So=Array.from({length:3},(w,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{So as HERO_SLIDE_SEEDS,Ze as HeroSlideStyleContext,eo as default};
1
+ "use client";import{jsx as e,jsxs as $}from"react/jsx-runtime";import{useTakeViewHide as He,withViewHide as Te}from"./ViewHideRoot.js";import{createContext as be,useContext as ke,useEffect as Ee,useRef as _e,useState as M}from"react";import Ae from"./HeroPoster.js";import{HeroMediaLayer as Le,heroMediaReading as Oe,HeroPickArea as Ne,heroPartEntrance as Ie,heroPartHover as Re,heroPartScroll as Ve,heroPictureOrigins as Ce,HeroPictureHover as De,heroPicturesHover as je,HeroTint as ze,HeroTwoPictures as Fe}from"./HeroPictures.js";import{HeroVideoBackdrop as Be,HeroVideoPlayer as $e}from"./HeroVideoPlay.js";import{BelowFirstScreen as Me,useFirstScreenPlace as Ye}from"../lib/first-screen.js";import{markedChildren as qe}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Ue}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Ge,heroTextureShown as Ke}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Je}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as Y}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as Qe}from"../../format/lib/hero-media-layout.js";import{overlayGradient as We,slideOverlayState as Xe}from"../../format/lib/sections/hero-overlay.js";import Ze from"./PhotoHoverSheet.js";const eo=be({});function oo({name:g,process:d,mediaType:q=Qe.HeroSlide,mediaSrc:c,videoSpeed:w,poster:H,mediaAv1:U,mediaSrcPhone:G,mediaAv1Phone:K,posterPhone:J,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:T=Y,tintOpacity:b=0,groups:k,editing:i=!1,themeClassName:E,themeStyle:Q,overlayColor:W,overlayPosition:X,mediaLayout:Z,mediaLayoutPhone:ee,mediaImage2:oe,objectPosition2:re,objectPosition2Phone:te,objectPosition2Tablet:ie,tintColor2:ne=Y,tintOpacity2:se=0,videoSource:ae,youtubeUrl:le,videoPlayback:de,partMotion:n,laterSlide:m=!1}){const h=He(),{alignment:ro="left",textureOpacity:_,textureOn:ce,textureColor:ue,quietVideo:fe,phoneUpDown:pe,phoneSideways:me,holdReel:he,reelHeld:ve,shownSlide:v,ratioMin:A}=ke(eo),ye=Ye(),L=m&&ye==="first",O=_e(null),[Se,xe]=M(v===void 0?void 0:!1);Ee(()=>{const P=O.current;xe(v===void 0||!P?void 0:qe(P.closest(".hero-track"),"data-slide-name")[v]===P)});const o=q==="video",y=o?r(c):void 0,N=o?r(H):r(c)??r(H),t=o?{av1:r(U),phone:r(G),av1Phone:r(K),poster:r(J)}:{},Pe=typeof w=="number"?w/100:1,{fromYouTube:s,onClick:I,youTubeId:R,backgroundFile:a,desktopLayout:ge,phoneLayout:we,twoPictures:V}=Oe({isVideo:o,videoSource:ae,videoPlayback:de,youtubeUrl:le,mediaLayout:Z,mediaLayoutPhone:ee}),[S,C]=M(!1);S&&ve===!1&&C(!1);const x=!S,l=Xe({overlayColor:W,overlayPosition:X},ue),D=o?null:Ie(n,"image"),j=o?null:Ve(n,"image"),z=je(n),F=e(De,{treatment:o?{}:Re(n,"image"),children:e(Ae,{videoSrc:a?y:void 0,videoAv1Src:a?t.av1:void 0,videoSrcPhone:a?t.phone:void 0,videoAv1SrcPhone:a?t.av1Phone:void 0,posterSrc:N,posterSrcPhone:t.poster,showVideo:a,playbackRate:Pe,objectPosition:u,objectPositionPhone:o?void 0:f,objectPositionTablet:o?void 0:p,quiet:fe,slideShown:Se,laterSlide:m,laterOfLead:L})}),B=$("section",{ref:O,className:Te(`${A?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${E?` ${E}`:""}`,h.className),...h.attrs,style:Q,"data-slide-name":g??"","data-slide-process":d??"","data-slide-media":a&&y?"video":"still",...z.hostAttrs,children:[e(Ze,{sheet:z.sheet}),e(Le,{partMotion:n,editing:i,children:V?e(Fe,{laterSlide:m,desktopLayout:ge,phoneLayout:we,editing:i,partMotion:n,first:{src:c,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:T,tintOpacity:b},second:{src:oe,objectPosition:re,objectPositionPhone:te,objectPositionTablet:ie,tintColor:ne,tintOpacity:se}}):s||D||j?$(Ne,{part:o?"media":"image",editing:i,entrance:D,scroll:j,origins:Ce({objectPosition:u,objectPositionTablet:p,objectPositionPhone:f}),className:"absolute inset-0 z-[1]",children:[F,s&&e(Be,{youTubeId:R,ownPoster:!!N,background:!I,editing:i})]}):F}),I&&e($e,{youTubeId:R,fileSrc:s?void 0:y,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:S,onPlay:()=>{C(!0),he?.()},editing:i}),x&&!V&&e(ze,{color:T,opacity:b,passClicks:!1}),x&&Ke(ce)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:l.own?We(l.color,l.position??void 0):Ge(l.color),..._!==void 0?{opacity:_/100}:null}}),x&&e("div",{className:[A?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Je,...Ue(pe,me)},children:k&&e(k,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return h.scope(L?e(Me,{children:B}):B)}const Po=Array.from({length:3},(g,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{Po as HERO_SLIDE_SEEDS,eo as HeroSlideStyleContext,oo as default};
@@ -1 +1 @@
1
- import{readHidable as g}from"efficient-easel/draw";import{isNodeList as _}from"efficient-easel/data";import{mapEachNode as b,mapNodeLists as y}from"../../../format/lib/document/node-lists.js";import{anchorSlug as M}from"../../../format/lib/content/anchor-name.js";import{namedRowField as I}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{resolveContainerDirection as S}from"../../../format/lib/content/container-direction.js";import{listNumberIn as B,readListNumberForm as F}from"../../../format/lib/content/list-number.js";import{nodeHiddenEverywhere as a}from"../../../format/lib/content/view-hide-class.js";import{stripMarkup as K}from"../../../format/lib/markup.js";const l="Contents",d="Flex",x="Text",L="numberForm",v="_contentsEntries",U="_kickerNumber",tt="data-sf-kicker-number",D=t=>g(t).text.trim(),N=t=>M(t?.anchor),k=t=>String(t.props?.id??""),H=t=>!g(t.props?.text).hidden&&!P(t.props)&&!I(t.props);function u(t){return Object.values(t.props??{}).filter(_)}function R(t){for(const o of u(t))for(const n of o){if(a(n.props??{}))continue;if(n.type===x&&H(n))return n;if(n.type===x)continue;const s=R(n);if(s)return s}}function T(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||T(n))))}const h=t=>t.type===d&&S(d,t.props?.direction)==="row";function C(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||!h(n)&&C(n))))}function W(t){const o=[],n=(s,r)=>{for(const e of s){if(!e||a(e.props??{}))continue;if(e.type===l){r.open={contents:e,sections:r.waiting??[]},r.waiting=null,o.push(r.open);continue}if(h(e)&&C(e)){const c={inRow:!0,open:null,waiting:[]};for(const p of u(e))n(p,c);r.inRow||(r.open=null);continue}const i=r.open?.sections??r.waiting;if(e.type===d&&N(e.props)&&i&&!T(e)){i.push({box:e,kicker:R(e)});continue}for(const c of u(e))n(c,r)}};return n(t,{inRow:!1,open:null,waiting:null}),o}function X(t){return t.map(o=>({label:o.kicker?K(D(o.kicker.props?.text)):"",anchor:N(o.box.props)}))}function Y(t){const o=t?.length?W(t):[];if(!o.length)return null;const n=new Map,s=new Map;for(const r of o){const e=k(r.contents);e&&n.set(e,X(r.sections));const i=F(r.contents.props?.[L]);r.sections.forEach((c,p)=>{const f=c.kicker?k(c.kicker):"";f&&s.set(f,B(i,p))})}return{entries:n,numbers:s}}const nt=t=>t.endsWith(".")?`${t} `:`${t} · `;function ot(t){const o=t;if(!o?.content?.length)return t;const n=Y(o.content);if(!n)return t;const{entries:s,numbers:r}=n,e=i=>{const c=y(i,O=>b(O,e));let p=c.props??{},f=c!==i;const m=k(i),w=m?s.get(m):void 0;w&&(p={...p,[v]:w},f=!0);const E=m?r.get(m):void 0;return E&&(p={...p,[U]:E},f=!0),f?{...i,props:p}:i};return{...o,content:o.content.map(e)}}export{v as CONTENTS_ENTRIES_PROP,L as CONTENTS_NUMBER_FORM_KEY,tt as KICKER_NUMBER_ATTR,U as KICKER_NUMBER_PROP,nt as kickerLead,Y as pageContentsDrawing,ot as withPageContents};
1
+ import{readHidable as g}from"efficient-easel/draw";import{mapEachNode as _,mapNodeLists as b,nodeListsOf as y}from"../../../format/lib/document/node-lists.js";import{anchorSlug as M}from"../../../format/lib/content/anchor-name.js";import{namedRowField as I}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{resolveContainerDirection as S}from"../../../format/lib/content/container-direction.js";import{listNumberIn as B,readListNumberForm as F}from"../../../format/lib/content/list-number.js";import{nodeHiddenEverywhere as a}from"../../../format/lib/content/view-hide-class.js";import{stripMarkup as K}from"../../../format/lib/markup.js";const l="Contents",d="Flex",x="Text",L="numberForm",v="_contentsEntries",U="_kickerNumber",Z="data-sf-kicker-number",D=t=>g(t).text.trim(),N=t=>M(t?.anchor),k=t=>String(t.props?.id??""),H=t=>!g(t.props?.text).hidden&&!P(t.props)&&!I(t.props),u=t=>y(t);function R(t){for(const o of u(t))for(const n of o){if(a(n.props??{}))continue;if(n.type===x&&H(n))return n;if(n.type===x)continue;const i=R(n);if(i)return i}}function T(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||T(n))))}const h=t=>t.type===d&&S(d,t.props?.direction)==="row";function C(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||!h(n)&&C(n))))}function W(t){const o=[],n=(i,r)=>{for(const e of i){if(!e||a(e.props??{}))continue;if(e.type===l){r.open={contents:e,sections:r.waiting??[]},r.waiting=null,o.push(r.open);continue}if(h(e)&&C(e)){const c={inRow:!0,open:null,waiting:[]};for(const p of u(e))n(p,c);r.inRow||(r.open=null);continue}const s=r.open?.sections??r.waiting;if(e.type===d&&N(e.props)&&s&&!T(e)){s.push({box:e,kicker:R(e)});continue}for(const c of u(e))n(c,r)}};return n(t,{inRow:!1,open:null,waiting:null}),o}function X(t){return t.map(o=>({label:o.kicker?K(D(o.kicker.props?.text)):"",anchor:N(o.box.props)}))}function Y(t){const o=t?.length?W(t):[];if(!o.length)return null;const n=new Map,i=new Map;for(const r of o){const e=k(r.contents);e&&n.set(e,X(r.sections));const s=F(r.contents.props?.[L]);r.sections.forEach((c,p)=>{const f=c.kicker?k(c.kicker):"";f&&i.set(f,B(s,p))})}return{entries:n,numbers:i}}const tt=t=>t.endsWith(".")?`${t} `:`${t} · `;function nt(t){const o=t;if(!o?.content?.length)return t;const n=Y(o.content);if(!n)return t;const{entries:i,numbers:r}=n,e=s=>{const c=b(s,O=>_(O,e));let p=c.props??{},f=c!==s;const m=k(s),w=m?i.get(m):void 0;w&&(p={...p,[v]:w},f=!0);const E=m?r.get(m):void 0;return E&&(p={...p,[U]:E},f=!0),f?{...s,props:p}:s};return{...o,content:o.content.map(e)}}export{v as CONTENTS_ENTRIES_PROP,L as CONTENTS_NUMBER_FORM_KEY,Z as KICKER_NUMBER_ATTR,U as KICKER_NUMBER_PROP,tt as kickerLead,Y as pageContentsDrawing,nt as withPageContents};
@@ -1 +1 @@
1
- import{jsx as H}from"react/jsx-runtime";import I from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as V}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{viewFocusValues as d}from"../../../../../../format/lib/content/picture-focus-rows.js";import{editorVideoFrame as w}from"../../../../../../format/lib/hero-video.js";const q={...V,render:o=>{const{mediaType:e,mediaImage:r,mediaVideo:a,poster:m,tintColor:l,tintOpacity:g,overlay:h,overlayColor:s,overlayPosition:c,heightDesktop:b,heightMobile:u,heightFixed:y,heightFixedTablet:p,heightFixedMobile:P,boxes:f,videoSource:v,youtubeUrl:x,videoPlayback:F,mediaLayout:j,mediaLayoutPhone:k,mediaImage2:M,tintColor2:C,tintOpacity2:S,_partMotion:T,editor:n,id:L}=o,i=d(o,"imageFocal"),t=d(o,"imageFocal2"),O=e==="image"?void 0:w(L,a,n?.metadata);return H(I,{mediaType:e,videoSource:v,youtubeUrl:x,videoPlayback:F,mediaLayout:j,mediaLayoutPhone:k,mediaImage2:M||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:C,tintOpacity2:S,mediaSrc:(e==="image"?r:a)||void 0,poster:m||O||void 0,objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:l,tintOpacity:e==="image"?g:0,overlay:h,overlayColor:s,overlayPosition:c,heightDesktop:b,heightMobile:u,heightFixed:y,heightFixedTablet:p,heightFixedMobile:P,boxes:f,editing:n?.isEditing,partMotion:T})}};export{q as HeroSingleRender};
1
+ import{jsx as I}from"react/jsx-runtime";import U from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as V}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{viewFocusValues as d}from"../../../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as r}from"../../../../../../format/lib/hero-media-layout.js";import{editorVideoFrame as _}from"../../../../../../format/lib/hero-video.js";const A={...V,render:i=>{const{mediaType:e,mediaImage:m,mediaVideo:a,poster:l,tintColor:g,tintOpacity:h,overlay:s,overlayColor:b,overlayPosition:c,heightDesktop:u,heightMobile:y,heightFixed:p,heightFixedTablet:P,heightFixedMobile:f,boxes:v,videoSource:x,youtubeUrl:F,videoPlayback:j,mediaLayout:k,mediaLayoutPhone:C,mediaImage2:M,tintColor2:S,tintOpacity2:O,_partMotion:T,editor:n,id:H}=i,o=d(i,r.image),t=d(i,r.image2),L=e==="image"?void 0:_(H,a,n?.metadata);return I(U,{mediaType:e,videoSource:x,youtubeUrl:F,videoPlayback:j,mediaLayout:k,mediaLayoutPhone:C,mediaImage2:M||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:S,tintOpacity2:O,mediaSrc:(e==="image"?m:a)||void 0,poster:l||L||void 0,objectPosition:e==="image"?o.desktop:void 0,objectPositionPhone:e==="image"?o.phone:void 0,objectPositionTablet:e==="image"?o.tablet:void 0,tintColor:g,tintOpacity:e==="image"?h:0,overlay:s,overlayColor:b,overlayPosition:c,heightDesktop:u,heightMobile:y,heightFixed:p,heightFixedTablet:P,heightFixedMobile:f,boxes:v,editing:n?.isEditing,partMotion:T})}};export{A as HeroSingleRender};
@@ -1 +1 @@
1
- import{jsx as Y}from"react/jsx-runtime";import q from"../../../../../components/HeroSlide.js";import{nestedAccentValue as z,sectionThemeWrap as B}from"../../../../../../format/lib/content/section-surface.js";import{phHide as G}from"../../scaffold.js";import{HeroSlideMeta as J}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{editorVideoFrame as g,loadingStill as v}from"../../../../../../format/lib/hero-video.js";import{mediaValueSrc as r}from"../../../../../../format/lib/media-value.js";import{LATER_SLIDES_KEY as Q}from"../../../../first-screen.js";import{viewFocusValues as b}from"../../../../../../format/lib/content/picture-focus-rows.js";const ae={...J,render:i=>{const{name:S,process:A,mediaType:e,mediaVideo:m,mediaVideoAv1:F,mediaVideoPhone:V,mediaVideoAv1Phone:j,mediaImage:C,poster:s,posterPhone:L,loadingShows:c,videoFrame:k,videoFramePhone:T,mediaSrc:l,videoSpeed:u,tintColor:E,overlay:H,groups:I,editor:o,overlayColor:p,overlayPosition:f,mediaLayout:_,mediaLayoutPhone:w,mediaImage2:x,tintColor2:M,tintOpacity2:O,videoSource:N,youtubeUrl:R,videoPlayback:U,_partMotion:D,id:t,...y}=i,n=b(i,"imageFocal"),d=b(i,"imageFocal2"),h=o?.metadata?.[Q],K=g(t,m||l,o?.metadata),a=e==="image"?void 0:r(V)||void 0,W=a?g(t,a,o?.metadata):void 0,P=B({...y,sectionAccent:z(y.sectionAccent)});return Y(q,{themeClassName:P?.className,themeStyle:P?.style,name:S||void 0,process:G(A,"Label",o),mediaType:e,mediaSrc:(e==="image"?C:m||l)||void 0,videoSpeed:typeof u=="number"?u:void 0,poster:v({loadingShows:c,poster:s,videoFrame:k||K}),mediaAv1:e==="image"?void 0:r(F)||void 0,mediaSrcPhone:a,mediaAv1Phone:e==="image"?void 0:r(j)||void 0,posterPhone:e==="image"?void 0:v({loadingShows:c,poster:s,posterPhone:L,videoFramePhone:T||W},"phone"),objectPosition:e==="image"?n.desktop:void 0,objectPositionPhone:e==="image"?n.phone:void 0,objectPositionTablet:e==="image"?n.tablet:void 0,tintColor:E,tintOpacity:e==="image"?H:0,groups:I,editing:o?.isEditing,overlayColor:typeof p=="string"?p:void 0,overlayPosition:typeof f=="string"?f:void 0,mediaLayout:_,mediaLayoutPhone:w,mediaImage2:x||void 0,objectPosition2:d.desktop,objectPosition2Phone:d.phone,objectPosition2Tablet:d.tablet,tintColor2:M,tintOpacity2:O,videoSource:N,youtubeUrl:R,videoPlayback:U,partMotion:D,...Array.isArray(h)&&h.includes(t)?{laterSlide:!0}:{}})}};export{ae as HeroSlideRender};
1
+ import{jsx as B}from"react/jsx-runtime";import{HERO_FOCUS as S,heroMediaType as G}from"../../../../../../format/lib/hero-media-layout.js";import J from"../../../../../components/HeroSlide.js";import{nestedAccentValue as Q,sectionThemeWrap as X}from"../../../../../../format/lib/content/section-surface.js";import{phHide as Z}from"../../scaffold.js";import{HeroSlideMeta as $}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{editorVideoFrame as b,loadingStill as g}from"../../../../../../format/lib/hero-video.js";import{mediaValueSrc as r}from"../../../../../../format/lib/media-value.js";import{LATER_SLIDES_KEY as ee}from"../../../../first-screen.js";import{viewFocusValues as A}from"../../../../../../format/lib/content/picture-focus-rows.js";const le={...$,render:i=>{const{name:F,process:V,mediaType:j,mediaVideo:m,mediaVideoAv1:C,mediaVideoPhone:L,mediaVideoAv1Phone:T,mediaImage:k,poster:s,posterPhone:H,loadingShows:c,videoFrame:E,videoFramePhone:I,mediaSrc:l,videoSpeed:p,tintColor:O,overlay:_,groups:w,editor:o,overlayColor:u,overlayPosition:f,mediaLayout:M,mediaLayoutPhone:x,mediaImage2:R,tintColor2:U,tintOpacity2:N,videoSource:D,youtubeUrl:K,videoPlayback:W,_partMotion:Y,id:t,...y}=i,h=G("HeroSlide",j),e=h==="image",n=A(i,S.image),d=A(i,S.image2),P=o?.metadata?.[ee],q=b(t,m||l,o?.metadata),a=e?void 0:r(L)||void 0,z=a?b(t,a,o?.metadata):void 0,v=X({...y,sectionAccent:Q(y.sectionAccent)});return B(J,{themeClassName:v?.className,themeStyle:v?.style,name:F||void 0,process:Z(V,"Label",o),mediaType:h,mediaSrc:(e?k:m||l)||void 0,videoSpeed:typeof p=="number"?p:void 0,poster:g({loadingShows:c,poster:s,videoFrame:E||q}),mediaAv1:e?void 0:r(C)||void 0,mediaSrcPhone:a,mediaAv1Phone:e?void 0:r(T)||void 0,posterPhone:e?void 0:g({loadingShows:c,poster:s,posterPhone:H,videoFramePhone:I||z},"phone"),objectPosition:e?n.desktop:void 0,objectPositionPhone:e?n.phone:void 0,objectPositionTablet:e?n.tablet:void 0,tintColor:O,tintOpacity:e?_:0,groups:w,editing:o?.isEditing,overlayColor:typeof u=="string"?u:void 0,overlayPosition:typeof f=="string"?f:void 0,mediaLayout:M,mediaLayoutPhone:x,mediaImage2:R||void 0,objectPosition2:d.desktop,objectPosition2Phone:d.phone,objectPosition2Tablet:d.tablet,tintColor2:U,tintOpacity2:N,videoSource:D,youtubeUrl:K,videoPlayback:W,partMotion:Y,...Array.isArray(P)&&P.includes(t)?{laterSlide:!0}:{}})}};export{le as HeroSlideRender};
@@ -1 +1 @@
1
- import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as X}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as Y}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as w}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as T}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as q,token as n}from"./section-head-looks.js";import{labelStyle as Z}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as H,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as $,SAME_KEYS as m,SECTION_BOX as y,TEXT as b,fillFrom as O,lineSides as a,pictureCell as A,siteGutterOf as M,smallText as s,wrapperPad as v,wrapperPadKeys as _}from"./section-to-box-row-parts.js";const I=(e,t,o)=>{const k=r(e),f=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...k===void 0?{}:{size:k,...S(T.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(T.sizePhone,o?.phone)}}},J=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,Q={textStyle:"heading-1",sizeToken:{...q("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},ee=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:b,style:{...Q,case:e?"upper":"none"},styleFrom:t=>{const o=w(t);return I(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=w(e);return I(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],D=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,te=()=>({name:"Scroll-Over Text",skip:e=>J(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:ee,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:D("Button color"),buttonTextColor:D("Button text color"),...p}}),N={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},oe={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...oe,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},P=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},ne=(e,t)=>{const o=P(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",ie=(e,t)=>({[e]:t,[K(e)]:t}),re={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},F=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),ae=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,...O("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,100)}),box:[...m,..._(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:X}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:b,style:{...N,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(F(e).length,1),3),...ie("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:F,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:$,style:re},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},A("Picture","imageSrc",R)],drop:{...p,grayscale:U,...H}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},se=e=>e.textAlign==="center"||e.textAlign==="right"?Y[e.textAlign]:"stretch",de=e=>Math.min(Math.max(r(e.overlay)??60,0),100),L=e=>typeof e=="string"&&e.trim()!=="",le={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},C=e=>({...A("Picture","imageSrc",(t,o)=>({...L(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",M(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:le,style:{...Z(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},he={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:se(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...ne(e,72),gap:24,gapPhone:24,...L(e.textBgSrc)?{darken:de(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",M(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:b,style:N,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},ge=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,...O("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...v(e,l),...P(e,72)}),box:[...m,..._(l)],parts:[C(!1),he,C(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...H}}),we={IntroBleed:te(),Manifesto:ae(),Split:ge()};export{we as EDITORIAL_SECTION_TO_BOX};
1
+ import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as X}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as T}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{SECTION_PIN_STOP_KEY as q,SECTION_PIN_STOP_SCREEN as Z}from"../../../../../format/lib/content/section-sticky.js";import{fluidToken as $,token as n}from"./section-head-looks.js";import{labelStyle as J}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as O,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Q,SAME_KEYS as m,SECTION_BOX as y,TEXT as P,fillFrom as _,lineSides as a,pictureCell as H,siteGutterOf as A,smallText as s,wrapperPad as I,wrapperPadKeys as M}from"./section-to-box-row-parts.js";const v=(e,t,o)=>{const k=r(e),f=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...k===void 0?{}:{size:k,...S(w.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(w.sizePhone,o?.phone)}}},ee=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,te={textStyle:"heading-1",sizeToken:{...$("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},oe=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...te,case:e?"upper":"none"},styleFrom:t=>{const o=T(t);return v(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=T(e);return v(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],N=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ne=()=>({name:"Scroll-Over Text",skip:e=>ee(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile),[q]:Z}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:oe,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:N("Button color"),buttonTextColor:N("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},ie={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...ie,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},re=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",ae=(e,t)=>({[e]:t,[K(e)]:t}),se={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},C=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),de=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...I(e,l),...b(e,100)}),box:[...m,...M(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...D,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(C(e).length,1),3),...ae("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:C,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Q,style:se},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},H("Picture","imageSrc",R)],drop:{...p,grayscale:U,...O}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},le=e=>e.textAlign==="center"||e.textAlign==="right"?X[e.textAlign]:"stretch",he=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ge={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...H("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",A(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ge,style:{...J(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},ce={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:le(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...re(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:he(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",A(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},pe=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...I(e,l),...b(e,72)}),box:[...m,...M(l)],parts:[L(!1),ce,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...O}}),Oe={IntroBleed:ne(),Manifesto:de(),Split:pe()};export{Oe as EDITORIAL_SECTION_TO_BOX};
@@ -1,2 +1,3 @@
1
1
  import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
2
+ export declare const CITY_PHOTO_WALL_HIDDEN = true;
2
3
  export declare const LOCATIONS_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
@@ -1 +1 @@
1
- import{tabletKey as D}from"efficient-easel/draw";import{SECTION_WIDTH_KEYS as W}from"../../../../../format/lib/content/section-width.js";import{CELL_SPAN_KEYS as j}from"../../../../../format/lib/content/grid-span.js";import{SECTION_BOX_SLOT as G,SECTION_BOX_TYPE as K}from"../../../sections/section-to-box.js";import{BUTTON as k,DIM as i,DROP_COMMON as v,DROP_SIDE_PADDING as X,INNER_BOX as o,SAME_KEYS as Y,SECTION_BOX as f,SH_LINK as S,TEXT as p,bandAccent as $,bandIndex as z,bandPage as U,bandProps as P,bandWrites as F,smallText as c,wrapperPad as l}from"./section-to-box-row-parts.js";import{EDITORIAL_LINE as x,editorialHeadTree as V,token as d}from"./section-head-looks.js";import{boxPadding as m,labelStyle as q}from"../../../../../format/lib/document/seed-parts.js";import{readAnchorName as J}from"../../../../../format/lib/content/anchor-name.js";import{declaredBlockSource as T}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as Q,splitLegacyRegion as w}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as Z}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as ee}from"../../../../../format/lib/map-styles.js";import{VIEW_HIDE_KEYS as te}from"../../../../../format/lib/content/view-hide-class.js";const r=e=>typeof e=="string"?e:e==null?"":String(e),h=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>r(e.group),B=e=>`loc-${e}`,_=e=>r(e.state).trim()||w(r(e.region)).state,O=e=>r(e.country).trim()||w(r(e.region)).country,E=e=>[_(e),O(e)].filter(Boolean).join(" · "),oe=e=>h(e).some(t=>r(t.photo).trim()!==""),ne=e=>h(e).some(t=>ee(Number(t.lat),Number(t.lng))),re=(e,t)=>h(e).filter(n=>s(n)===s(t)).length,ae=(e,t)=>re(e,t)===1?"wide":Q(e.imageShape),y={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,a=(e,t={})=>({...q(e),...t}),u={top:1,right:1,bottom:1,left:1},b={...o,direction:"row",share:"equal",gap:0},ie=e=>t=>t>g(t)?{...o,gap:0}:{...b,...t>1?{phoneRow:e}:{}},se={kind:"group",name:"Gallery",props:{...o,gap:20,_hidden:!0},when:oe,parts:[{kind:"group",name:"Gallery head",props:{...o,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[c("galleryKicker",a(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right",alignPhone:"left"},style:a(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...o,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...o,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:u,...m(12,12)},item:(e,t,n)=>({props:{...r(e.photo).trim()?{bgImage:r(e.photo),hover:"mono"}:{},link:`#${B(t)}`,boxShape:ae(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:a(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[c("label",a(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:ie(2),perRow:g,rowName:"Row",rowProps:{...b,phoneRow:2}}}]}]},pe={kind:"group",name:"Words",props:{...o,gap:12,gapPhone:12,...m(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...o,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...d("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:a(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(t,n)=>E(n)]),when:(e,t)=>E(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...o,sectionBorder:u,...m(6,10)},parts:[{kind:"text",key:"timezone",props:{...i,textFit:"line"},style:a(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:i,style:{textStyle:"body-5",fontRole:"heading",...d("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,_partStyles:{label:a(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>Z(r(e))??"#"]],when:(e,t)=>r(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:a(12,{letterSpacing:.18,lineHeight:1.7})}]},ce={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,n)=>_(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},le={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[ce]},de={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:u,jumpHighlight:!0,sectionAccent:z(e,t)>=0?U(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:B(t)}}),parts:[pe,le],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:r(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...o,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>r(t?.key).trim()!=="",parts:[c("key",a(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...d("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:i,style:a(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[D("columns")]:1})}},C=a(10,{letterSpacing:.25}),me={kind:"block",type:K,props:{...o,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:ne,slot:G,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...i,text:"Location coordinates ©",_partStyles:{text:C}}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...C,color:"labels"}}}}]},I=(e,t)=>Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]])),M=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],H=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],A=e=>e.map(t=>[t,t,(n,R)=>l(R,y)[t]]),L=["sectionAccent","sectionAccent",$],ge=[...j,...te,...Object.values(W)],he={name:"City pictures",skip:e=>T(e)?`fed by the data source "${T(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...f,direction:"column",gap:40,anchor:"studios",...x,...I(l(e,y),M),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...P(e,t)}),box:[...Y.filter(e=>e!=="sectionAccent"&&e!=="anchor"),L,["anchor","anchor",e=>J(e).trim()?e:"studios"],...A(M)],parts:[V("sectionNumber","heading","tagline"),se],also:[{name:"City maps",boxProps:(e,t)=>({...f,direction:"column",gap:40,sectionBorder:{bottom:1},...x,sectionPaddingTop:0,sectionPaddingTopPhone:0,...I(l(e,y),H),...P(e,t)}),box:[...ge,L,...A(H)],parts:[de,me]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:F,drop:{...v,...X,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},Ne={ContactLocations:he};export{Ne as LOCATIONS_SECTION_TO_BOX};
1
+ import{tabletKey as D}from"efficient-easel/draw";import{SECTION_WIDTH_KEYS as W}from"../../../../../format/lib/content/section-width.js";import{CELL_SPAN_KEYS as j}from"../../../../../format/lib/content/grid-span.js";import{SECTION_BOX_SLOT as G,SECTION_BOX_TYPE as K}from"../../../sections/section-to-box.js";import{BUTTON as k,DIM as i,DROP_COMMON as v,DROP_SIDE_PADDING as Y,INNER_BOX as o,SAME_KEYS as X,SECTION_BOX as f,SH_LINK as S,TEXT as p,bandAccent as $,bandIndex as z,bandPage as U,bandProps as P,bandWrites as F,smallText as c,wrapperPad as l}from"./section-to-box-row-parts.js";import{EDITORIAL_LINE as x,editorialHeadTree as V,token as d}from"./section-head-looks.js";import{boxPadding as m,labelStyle as q}from"../../../../../format/lib/document/seed-parts.js";import{readAnchorName as J}from"../../../../../format/lib/content/anchor-name.js";import{declaredBlockSource as T}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as Q,splitLegacyRegion as _}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as Z}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as ee}from"../../../../../format/lib/map-styles.js";import{VIEW_HIDE_KEYS as te}from"../../../../../format/lib/content/view-hide-class.js";const r=e=>typeof e=="string"?e:e==null?"":String(e),h=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>r(e.group),w=e=>`loc-${e}`,B=e=>r(e.state).trim()||_(r(e.region)).state,O=e=>r(e.country).trim()||_(r(e.region)).country,E=e=>[B(e),O(e)].filter(Boolean).join(" · "),oe=e=>h(e).some(t=>r(t.photo).trim()!==""),ne=e=>h(e).some(t=>ee(Number(t.lat),Number(t.lng))),re=(e,t)=>h(e).filter(n=>s(n)===s(t)).length,ae=(e,t)=>re(e,t)===1?"wide":Q(e.imageShape),y={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,a=(e,t={})=>({...q(e),...t}),u={top:1,right:1,bottom:1,left:1},b={...o,direction:"row",share:"equal",gap:0},ie=e=>t=>t>g(t)?{...o,gap:0}:{...b,...t>1?{phoneRow:e}:{}},se=!0,pe={kind:"group",name:"Gallery",props:{...o,gap:20,...se?{_hidden:!0}:{}},when:oe,parts:[{kind:"group",name:"Gallery head",props:{...o,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[c("galleryKicker",a(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right",alignPhone:"left"},style:a(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...o,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...o,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:u,...m(12,12)},item:(e,t,n)=>({props:{...r(e.photo).trim()?{bgImage:r(e.photo),hover:"mono"}:{},link:`#${w(t)}`,boxShape:ae(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:a(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[c("label",a(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:ie(2),perRow:g,rowName:"Row",rowProps:{...b,phoneRow:2}}}]}]},ce={kind:"group",name:"Words",props:{...o,gap:12,gapPhone:12,...m(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...o,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...d("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:a(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(t,n)=>E(n)]),when:(e,t)=>E(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...o,sectionBorder:u,...m(6,10)},parts:[{kind:"text",key:"timezone",props:{...i,textFit:"line"},style:a(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:i,style:{textStyle:"body-5",fontRole:"heading",...d("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,_partStyles:{label:a(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>Z(r(e))??"#"]],when:(e,t)=>r(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:a(12,{letterSpacing:.18,lineHeight:1.7})}]},le={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,n)=>B(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},de={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[le]},me={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:u,jumpHighlight:!0,sectionAccent:z(e,t)>=0?U(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:w(t)}}),parts:[ce,de],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:r(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...o,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>r(t?.key).trim()!=="",parts:[c("key",a(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...d("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:i,style:a(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[D("columns")]:1})}},C=a(10,{letterSpacing:.25}),ge={kind:"block",type:K,props:{...o,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:ne,slot:G,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...i,text:"Location coordinates ©",_partStyles:{text:C}}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...C,color:"labels"}}}}]},I=(e,t)=>Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]])),H=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],M=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],L=e=>e.map(t=>[t,t,(n,R)=>l(R,y)[t]]),A=["sectionAccent","sectionAccent",$],he=[...j,...te,...Object.values(W)],ye={name:"City pictures",skip:e=>T(e)?`fed by the data source "${T(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...f,direction:"column",gap:40,anchor:"studios",...x,...I(l(e,y),H),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...P(e,t)}),box:[...X.filter(e=>e!=="sectionAccent"&&e!=="anchor"),A,["anchor","anchor",e=>J(e).trim()?e:"studios"],...L(H)],parts:[V("sectionNumber","heading","tagline"),pe],also:[{name:"City maps",boxProps:(e,t)=>({...f,direction:"column",gap:40,sectionBorder:{bottom:1},...x,sectionPaddingTop:0,sectionPaddingTopPhone:0,...I(l(e,y),M),...P(e,t)}),box:[...he,A,...L(M)],parts:[me,ge]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:F,drop:{...v,...Y,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},Ce={ContactLocations:ye};export{se as CITY_PHOTO_WALL_HIDDEN,Ce as LOCATIONS_SECTION_TO_BOX};
@@ -1 +1 @@
1
- import{hasWords as L,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as T,DIM as f,DROP_COMMON as s,DROP_SIDE_PADDING as O,INNER_BOX as o,leadLine as D,SAME_KEYS as d,SECTION_BOX as p,TEXT as l,innerPad as y,siteGutterOf as w,innerPadKeys as B,smallText as P,wrapperPad as _,wrapperPadKeys as u}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as W}from"./section-to-box-rows-cards.js";import{storedUnit as k}from"../../../../../format/lib/content/css-length.js";import{finiteNumber as M}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as G}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as U}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as F}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as K}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as Y}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as j}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as z}from"./section-to-box-rows-pageheader.js";import{TAB_BAR_SECTION_TO_BOX as q}from"./section-to-box-rows-tabbar.js";import{DOCBODY_SECTION_TO_BOX as J}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Q}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as V}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as Z}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as $}from"./section-to-box-rows-proof.js";import{INTEGRATIONS_SECTION_TO_BOX as ee}from"./section-to-box-rows-integrations.js";import{PROMO_SECTION_TO_BOX as te}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as oe}from"./section-to-box-rows-fitment.js";import{fluidToken as ne,headTree as E,token as i}from"./section-head-looks.js";import{CTA_PH as b,PH as ie,phAccentAsMarks as m}from"../../../../../format/lib/document/blocks/placeholders.js";import{PROSE_PH as S}from"../../../../../format/lib/document/blocks/general/Prose/meta.js";import{PARAGRAPHS_A_PH as g}from"../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";import{BANNER_PH as re}from"../../../../../format/lib/document/blocks/general/Banner/meta.js";import{TITLE_WITH_BUTTONS_PH as ae,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as se}from"../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";import{SECTION_HEADER_PH as a}from"../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";import{boxPadding as de,fillSlot as pe}from"../../../../../format/lib/document/seed-parts.js";const x={top:72,bottom:72,topPhone:72,bottomPhone:72},le={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},..._(e,x)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...u(x)],parts:[E("Prose"),{kind:"text",key:"body",props:f,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...O,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},N={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},I=(e,n)=>n?.variant==="primary",A=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:I,variant:"primary",style:{letterSpacing:.3},props:{...T,...N,...n}},{kind:"button",key:"label",href:"href",when:(r,h)=>!I(r,h),variant:"ghost",style:{letterSpacing:.3},props:{...T,...N,...n}}]}),c=e=>L(e.title),he={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:c(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...y(e,"TitleWithButtons")}),box:[...d,...B("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...ne("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035},mark:"accentItalic"}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...c(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[A(c,{widthFit:"fill",iconPosition:"end"}),A(e=>!c(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function me(e,n){const r=w(n,{to:k(e.sectionPaddingUnit)}),h=w(n,{view:"phone",to:k(e.sectionPaddingUnitPhone),maxPx:20});return{sectionPaddingLeft:r,sectionPaddingRight:r,sectionPaddingLeftPhone:h,sectionPaddingRightPhone:h}}const H={top:40,bottom:64,topPhone:24,bottomPhone:36},ge={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,..._(e,H),...me(e,n)}),box:[...d,...u(H)],parts:[E("SectionHeader")],drop:{...s,...O,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},R={...o,direction:"row",share:[67],gap:32},C={...o,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},v=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),ce={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...y(e,"ParagraphsA")}),box:[...d,...B("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...R,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[P("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},v("Stats column",o,{kind:"group",name:"Stats",props:{...C,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[D("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...R,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},v("Note column",{...o,justify:"end"},{kind:"group",name:"Founders",props:{...C,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:f,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},P("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},X={top:24,bottom:24,topPhone:24,bottomPhone:24},Te={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,..._(e,X)}),box:[...d,"contained",...u(X)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...pe("surface"),...de(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(M(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[P("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",...i("headingMedium",44,32)}},{kind:"text",key:"body",props:{...l,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6,...i("body",16)}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:T}]}],drop:{...s,...O}},Oe={Prose:le,TitleWithButtons:he,SectionHeader:ge,ParagraphsA:ce,Banner:Te},je={Prose:()=>({eyebrow:S.eyebrow,title:m(S.title),body:S.body}),TitleWithButtons:()=>({title:m(ae.title),buttons:se.map(e=>({...e}))}),SectionHeader:()=>({num:a.num,title:m(a.title),description:a.description,linkText:a.linkText,linkHref:b.href}),ParagraphsA:()=>({eyebrow:g.eyebrow,lead:ie.body,foundersHeading:g.foundersHeading,foundersBody:g.foundersBody,attribution:g.attribution}),Banner:()=>({...re,ctaText:b.text,ctaHref:b.href}),ProcessSteps:()=>({num:a.num,title:m(a.title)})};function ze(){t(Oe),t(G),t(U),t(W),t(F),t(K),t(Y),t(j),t(z),t(q),t(J),t(Q),t(V),t(Z),t(oe),t($),t(ee),t(te)}export{Oe as GENERAL_SECTION_TO_BOX,je as TEXT_PRESS_STARTERS,ze as registerGeneralSectionRows};
1
+ import{hasWords as D,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as O,DIM as S,DROP_COMMON as s,DROP_SIDE_PADDING as P,INNER_BOX as o,leadLine as W,SAME_KEYS as d,SECTION_BOX as p,TEXT as l,innerPad as w,siteGutterOf as B,innerPadKeys as k,smallText as _,wrapperPad as b,wrapperPadKeys as u}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as M}from"./section-to-box-rows-cards.js";import{storedUnit as E}from"../../../../../format/lib/content/css-length.js";import{finiteNumber as G}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as U}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as F}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as K}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as Y}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as j}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as z}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as q}from"./section-to-box-rows-pageheader.js";import{TAB_BAR_SECTION_TO_BOX as J}from"./section-to-box-rows-tabbar.js";import{DOCBODY_SECTION_TO_BOX as Q}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as V}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as Z}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as $}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as ee}from"./section-to-box-rows-proof.js";import{INTEGRATIONS_SECTION_TO_BOX as te}from"./section-to-box-rows-integrations.js";import{PROMO_SECTION_TO_BOX as oe}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as ne}from"./section-to-box-rows-fitment.js";import{fluidToken as ie,headTree as x,token as i}from"./section-head-looks.js";import{CTA_PH as h,PH as re,phAccentAsMarks as m}from"../../../../../format/lib/document/blocks/placeholders.js";import{PROSE_PH as f}from"../../../../../format/lib/document/blocks/general/Prose/meta.js";import{PARAGRAPHS_A_PH as c}from"../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";import{BANNER_PH as ae}from"../../../../../format/lib/document/blocks/general/Banner/meta.js";import{TITLE_WITH_BUTTONS_PH as se,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as de}from"../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";import{SECTION_HEADER_PH as a}from"../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";import{INTRO_PH as y}from"../../../../../format/lib/document/blocks/general/IntroBleed/meta.js";import{boxPadding as pe,fillSlot as le}from"../../../../../format/lib/document/seed-parts.js";const N={top:72,bottom:72,topPhone:72,bottomPhone:72},he={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...b(e,N)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...u(N)],parts:[x("Prose"),{kind:"text",key:"body",props:S,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...P,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},I={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},H=(e,n)=>n?.variant==="primary",A=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:H,variant:"primary",style:{letterSpacing:.3},props:{...O,...I,...n}},{kind:"button",key:"label",href:"href",when:(r,g)=>!H(r,g),variant:"ghost",style:{letterSpacing:.3},props:{...O,...I,...n}}]}),T=e=>D(e.title),me={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:T(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...w(e,"TitleWithButtons")}),box:[...d,...k("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...ie("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035},mark:"accentItalic"}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...T(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[A(T,{widthFit:"fill",iconPosition:"end"}),A(e=>!T(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function ge(e,n){const r=B(n,{to:E(e.sectionPaddingUnit)}),g=B(n,{view:"phone",to:E(e.sectionPaddingUnitPhone),maxPx:20});return{sectionPaddingLeft:r,sectionPaddingRight:r,sectionPaddingLeftPhone:g,sectionPaddingRightPhone:g}}const R={top:40,bottom:64,topPhone:24,bottomPhone:36},ce={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...b(e,R),...ge(e,n)}),box:[...d,...u(R)],parts:[x("SectionHeader")],drop:{...s,...P,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},C={...o,direction:"row",share:[67],gap:32},v={...o,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},X=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),Te={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...w(e,"ParagraphsA")}),box:[...d,...k("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...C,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[_("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},X("Stats column",o,{kind:"group",name:"Stats",props:{...v,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[W("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...C,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},X("Note column",{...o,justify:"end"},{kind:"group",name:"Founders",props:{...v,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:S,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},_("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},L={top:24,bottom:24,topPhone:24,bottomPhone:24},Oe={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...b(e,L)}),box:[...d,"contained",...u(L)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...le("surface"),...pe(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(G(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[_("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",...i("headingMedium",44,32)}},{kind:"text",key:"body",props:{...l,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6,...i("body",16)}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:O}]}],drop:{...s,...P}},Pe={Prose:he,TitleWithButtons:me,SectionHeader:ce,ParagraphsA:Te,Banner:Oe},qe={Prose:()=>({eyebrow:f.eyebrow,title:m(f.title),body:f.body}),TitleWithButtons:()=>({title:m(se.title),buttons:de.map(e=>({...e}))}),SectionHeader:()=>({num:a.num,title:m(a.title),description:a.description,linkText:a.linkText,linkHref:h.href}),ParagraphsA:()=>({eyebrow:c.eyebrow,lead:re.body,foundersHeading:c.foundersHeading,foundersBody:c.foundersBody,attribution:c.attribution}),Banner:()=>({...ae,ctaText:h.text,ctaHref:h.href}),ProcessSteps:()=>({num:a.num,title:m(a.title)}),IntroBleed:()=>({eyebrow:y.eyebrow,title:m(y.title),body:y.body,ctaText:h.text,ctaHref:h.href})};function Je(){t(Pe),t(U),t(F),t(M),t(K),t(Y),t(j),t(z),t(q),t(J),t(Q),t(V),t(Z),t($),t(ne),t(ee),t(te),t(oe)}export{Pe as GENERAL_SECTION_TO_BOX,qe as TEXT_PRESS_STARTERS,Je as registerGeneralSectionRows};
@@ -1,4 +1,5 @@
1
1
  import { type ShowWhenRule } from "./show-when.js";
2
+ import { type HeroMediaType } from "../../../format/lib/hero-media-layout.js";
2
3
  export declare const HERO_MEDIA_PARTS: readonly ["media", "image", "image2"];
3
4
  export type HeroMediaPart = (typeof HERO_MEDIA_PARTS)[number];
4
5
  export declare const HERO_MEDIA_PART_LABELS: Readonly<Record<HeroMediaPart, string>>;
@@ -12,7 +13,8 @@ export declare const VIDEO_FILE_LABEL = "Video file";
12
13
  export declare const VIDEO_FILE_PROMPT = "Upload a video file";
13
14
  export declare const AV1_FILE_LABEL = "AV1 file";
14
15
  export declare const AV1_FILE_PROMPT = "Upload an AV1 file";
15
- export declare function forMediaType(type: "image" | "video", fallback: "image" | "video"): {
16
+ export declare function mediaTypeShownWhen(type: HeroMediaType, fallback: HeroMediaType): ShowWhenRule;
17
+ export declare function forMediaType(type: HeroMediaType, fallback: HeroMediaType): {
16
18
  readonly field: "mediaType";
17
19
  readonly is: "video" | "image";
18
20
  readonly default: "video" | "image";
@@ -20,9 +22,9 @@ export declare function forMediaType(type: "image" | "video", fallback: "image"
20
22
  export declare const HERO_MEDIA_PART_TYPES: ReadonlySet<string>;
21
23
  export declare function inPart<F extends object>(part: HeroMediaPart, field: F): F;
22
24
  export declare function heroMediaFields<F extends Record<string, unknown>>(fields: F, { parts, onlyFor, fallback, rules, }: {
23
- parts?: Partial<Record<HeroMediaPart, readonly (keyof F & string)[]>>;
24
- onlyFor: Record<"image" | "video", readonly (keyof F & string)[]>;
25
- fallback: "image" | "video";
25
+ parts?: Partial<Record<HeroMediaPart, readonly string[]>>;
26
+ onlyFor: Record<HeroMediaType, readonly string[]>;
27
+ fallback: HeroMediaType;
26
28
  rules?: Partial<Record<keyof F & string, ShowWhenRule>>;
27
29
  }): F;
28
30
  export declare function fieldPartOf(field: unknown): HeroMediaPart | null;
@@ -1 +1 @@
1
- import{withShowWhen as s}from"./show-when.js";import{heroPictureCount as c}from"../../../format/lib/hero-media-layout.js";const f=["media","image","image2"],u={media:"Media",image:"Image",image2:"Image 2"},P={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function l(e,t){return e==="image"&&c(t)>1?"Image 1":u[e]}const I="Video file",A="Upload a video file",O="AV1 file",R="Upload an AV1 file";function m(e,t){return{field:"mediaType",is:e,default:t}}const _=new Set(["HeroSingle"]),d="heroPart";function E(e,t){return{...t,[d]:e}}function T(e,{parts:t={},onlyFor:i,fallback:p,rules:a}){const n={...e};for(const o of["image","video"])for(const r of i[o])n[r]=s(n[r],m(o,p));for(const[o,r]of Object.entries(a??{}))r&&(n[o]=s(n[o],r));for(const o of f)for(const r of t[o]??[])n[r]=E(o,n[r]);return n}function g(e){const t=e?.[d];return f.includes(t)?t:null}function L(e,t){const i={};for(const[p,a]of Object.entries(e))g(a)===t&&(i[p]=a);return i}function M(e){if(!_.has(e.type))return[];const t=[{part:"media",label:u.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(t.push({part:"image",label:l("image",e.props),depth:1}),c(e.props)>1&&t.push({part:"image2",label:l("image2",e.props),depth:1})),t}function y(e,t){return`${e}::${t}`}function H(e){if(!e)return null;const t=e.lastIndexOf("::");if(t<=0)return null;const i=e.slice(t+2);return f.includes(i)?{nodeId:e.slice(0,t),part:i}:null}const V="data-sf-hero-part";export{O as AV1_FILE_LABEL,R as AV1_FILE_PROMPT,f as HERO_MEDIA_PARTS,u as HERO_MEDIA_PART_LABELS,_ as HERO_MEDIA_PART_TYPES,V as HERO_PART_ATTR,P as HERO_PART_MODE,I as VIDEO_FILE_LABEL,A as VIDEO_FILE_PROMPT,g as fieldPartOf,L as fieldsOfPart,m as forMediaType,T as heroMediaFields,M as heroMediaRows,y as heroPartId,l as heroPartLabel,E as inPart,H as readHeroPartId};
1
+ import{shownForOption as h,withShowWhen as l}from"./show-when.js";import{HERO_ABSENT_MEDIA_TYPE as _,HERO_MEDIA_TYPES as f,heroMediaType as O,heroPictureCount as u}from"../../../format/lib/hero-media-layout.js";const s=["media","image","image2"],d={media:"Media",image:"Image",image2:"Image 2"},M={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function m(e,t){return e==="image"&&u(t)>1?"Image 1":d[e]}const y="Video file",w="Upload a video file",L="AV1 file",b="Upload an AV1 file";function P(e,t){return h("mediaType",f,t,[e])}function H(e,t){return{field:"mediaType",is:e,default:t}}const x=new Set(Object.keys(_)),E="heroPart";function A(e,t){return{...t,[E]:e}}function D(e,{parts:t={},onlyFor:r,fallback:p,rules:a}){const i={...e},c=[...Object.values(t).flat(),...f.flatMap(o=>r[o])].filter(o=>!(o in e));if(c.length)throw new Error(`heroMediaFields: ${c.join(", ")} is not a row of this block`);for(const o of f)for(const n of r[o])i[n]=l(i[n],P(o,p));for(const[o,n]of Object.entries(a??{}))n&&(i[o]=l(i[o],n));for(const o of s)for(const n of t[o]??[])i[n]=A(o,i[n]);return i}function I(e){const t=e?.[E];return s.includes(t)?t:null}function S(e,t){const r={};for(const[p,a]of Object.entries(e))I(a)===t&&(r[p]=a);return r}function k(e){if(!x.has(e.type))return[];const t=[{part:"media",label:d.media,depth:0}];return O(e.type,e.props.mediaType)!=="video"&&(t.push({part:"image",label:m("image",e.props),depth:1}),u(e.props)>1&&t.push({part:"image2",label:m("image2",e.props),depth:1})),t}function V(e,t){return`${e}::${t}`}function F(e){if(!e)return null;const t=e.lastIndexOf("::");if(t<=0)return null;const r=e.slice(t+2);return s.includes(r)?{nodeId:e.slice(0,t),part:r}:null}const j="data-sf-hero-part";export{L as AV1_FILE_LABEL,b as AV1_FILE_PROMPT,s as HERO_MEDIA_PARTS,d as HERO_MEDIA_PART_LABELS,x as HERO_MEDIA_PART_TYPES,j as HERO_PART_ATTR,M as HERO_PART_MODE,y as VIDEO_FILE_LABEL,w as VIDEO_FILE_PROMPT,I as fieldPartOf,S as fieldsOfPart,H as forMediaType,D as heroMediaFields,k as heroMediaRows,V as heroPartId,m as heroPartLabel,A as inPart,P as mediaTypeShownWhen,F as readHeroPartId};
@@ -1 +1 @@
1
- import{isNode as w,isNodeList as y}from"efficient-easel/data";import{hidableText as S,readHidable as _}from"efficient-easel/draw";import{blockSizeValuesOf as h}from"../content/block-size.js";import{nodeHiddenEverywhere as R,nodeViewHideClass as b}from"../../../format/lib/content/view-hide-class.js";import{CARD_ROW_FIELD_PROP as x,isCardTemplateSlot as g,namedRowField as C,ROW_BOUND_PROPS as E}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as P}from"../../../format/lib/content/box-show-for-choices.js";import{ownEntry as p}from"../../../format/lib/own-entry.js";const O="slotCounts",d=t=>!_(t).hidden&&S(t).trim()!=="",F=t=>typeof t=="string"&&t.trim()!=="",N={Flex:()=>!0,PostCard:()=>!0,ImageBlock:t=>F(t.src),Text:t=>d(t.text),Heading:t=>d(t.text),Eyebrow:t=>d(t.eyebrow)},W=["widthFit","width","minWidth"],u=t=>y(t);function A(t){if(Array.isArray(t.content))return u(t.content)?t.content:null;const e=Object.values(t).filter(u);return e.length===1?e[0]:null}function I(t,e){return[...new Set([x,...Object.values(p(E,t)??{})])].some(o=>C(e,o)!=="")}function D(t){const e=t.props??{},n=p(N,t.type);if(!n||!n(e)||I(t.type,e)||b(e))return!1;const o=e[P];if(o!=null&&o!=="")return!1;const r=h(e);return!W.some(s=>r[s]!==void 0)}function H(t){let e=0;for(const n of t)if(!R(n.props??{})){if(!D(n))return;e+=1}return e>0?e:void 0}function j(t){const e={},n=new Set,o=new Set,r=(s,a)=>{if(Array.isArray(s))for(const i of s){if(!w(i))continue;const f=i.props.id;typeof f=="string"&&(n.has(f)?o:n).add(f);const l=a?null:A(i.props);if(typeof f=="string"&&l){const c=H(l);c!==void 0&&(e[f]=c)}for(const[c,m]of Object.entries(i.props))u(m)&&r(m,a||g(i.type,c))}};r(t,!1);for(const s of o)delete e[s];return e}function K(t,e){return{...t??{},[O]:j(e)}}function V(t){const n=t.editor?.metadata?.[O],o=t.id,r=typeof o=="string"&&n&&typeof n=="object"?n[o]:void 0;return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}export{N as DRAWS_FOR_SURE,O as SLOT_COUNTS_KEY,V as slotCountOf,j as slotCountsOf,K as withSlotCounts};
1
+ import{isNode as w,isNodeList as y}from"efficient-easel/data";import{nodeListKeys as O}from"../../../format/lib/document/node-lists.js";import{hidableText as S,readHidable as _}from"efficient-easel/draw";import{blockSizeValuesOf as h}from"../content/block-size.js";import{nodeHiddenEverywhere as R,nodeViewHideClass as b}from"../../../format/lib/content/view-hide-class.js";import{CARD_ROW_FIELD_PROP as x,isCardTemplateSlot as g,namedRowField as C,ROW_BOUND_PROPS as E}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as P}from"../../../format/lib/content/box-show-for-choices.js";import{ownEntry as l}from"../../../format/lib/own-entry.js";const m="slotCounts",c=t=>!_(t).hidden&&S(t).trim()!=="",F=t=>typeof t=="string"&&t.trim()!=="",N={Flex:()=>!0,PostCard:()=>!0,ImageBlock:t=>F(t.src),Text:t=>c(t.text),Heading:t=>c(t.text),Eyebrow:t=>c(t.eyebrow)},W=["widthFit","width","minWidth"],p=t=>y(t);function A(t){if(Array.isArray(t.content))return p(t.content)?t.content:null;const e=Object.values(t).filter(p);return e.length===1?e[0]:null}function I(t,e){return[...new Set([x,...Object.values(l(E,t)??{})])].some(o=>C(e,o)!=="")}function D(t){const e=t.props??{},n=l(N,t.type);if(!n||!n(e)||I(t.type,e)||b(e))return!1;const o=e[P];if(o!=null&&o!=="")return!1;const r=h(e);return!W.some(s=>r[s]!==void 0)}function H(t){let e=0;for(const n of t)if(!R(n.props??{})){if(!D(n))return;e+=1}return e>0?e:void 0}function L(t){const e={},n=new Set,o=new Set,r=(s,u)=>{if(Array.isArray(s))for(const i of s){if(!w(i))continue;const f=i.props.id;typeof f=="string"&&(n.has(f)?o:n).add(f);const a=u?null:A(i.props);if(typeof f=="string"&&a){const d=H(a);d!==void 0&&(e[f]=d)}for(const d of O(i))r(i.props[d],u||g(i.type,d))}};r(t,!1);for(const s of o)delete e[s];return e}function V(t,e){return{...t??{},[m]:L(e)}}function Y(t){const n=t.editor?.metadata?.[m],o=t.id,r=typeof o=="string"&&n&&typeof n=="object"?n[o]:void 0;return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}export{N as DRAWS_FOR_SURE,m as SLOT_COUNTS_KEY,Y as slotCountOf,L as slotCountsOf,V as withSlotCounts};
@@ -1 +1 @@
1
- import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ce}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as E}from"../../../format/lib/own-entry.js";const v=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(A,o)&&E(A,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=s}}function Re(t){return E(A,t)}const Y=new Set(["id"]),P={},W=[],fe={ProductGrid:["ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductRef","ProductSpecs"],Events:[],Collections:["CollectionCard"],GalleryB:["GalleryItem"],ContactRouting:[],ReviewForm:[],AppointmentBooking:["BookingBox"],Reviews:["RatingBlock"],CheckoutCTA:[],AlloyWheelsListing:["ProductBuy","ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductSpecs"],SpecTable:["EuTyreLabelBlock","WheelDiagram"]},le=Object.keys(fe),pe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...le,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Integrations","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Ae(t){for(const[o,s]of Object.entries(t)){if(R(P,o)&&E(P,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);P[o]=s}}function Le(t){return E(P,t)}function He(){return Object.keys(P)}function ue(t){return R(P,t)&&W.includes(t)}function Fe(t,o=pe){return R(P,t)&&(o.includes(t)||ue(t))}function We(t){const o=E(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const K=t=>Z(t),Ke=t=>K(t).text.trim()!=="";function he(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const a=s.indexOf(r);return`${s.slice(0,a)}==${r}==${s.slice(a+r.length)}${o===-1?"":t.slice(o)}`}const ye=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function me(t,o,s,r){const c={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&c.align===void 0&&(c.align=r),Object.keys(c).length?{_partStyles:{text:c}}:{}}function ke(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?E(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,a={}){const c={...o};for(const u of t){const[m,$,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const C=j?j(s[m],s,a):s[m];C===void 0?delete c[$]:c[$]=C,r(m,$,C===void 0)}return c}function be(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=a=>{for(const c of a??[])o.add(typeof c=="string"?c:c[0])},r=a=>{for(const c of a)switch(c.kind){case"text":case"image":o.add(c.key),c.kind==="image"&&c.alt&&o.add(c.alt);break;case"button":o.add(c.key),o.add(c.href),typeof c.variant=="object"&&o.add(c.variant.key);break;case"list":o.add(c.key);break;case"group":case"block":s(c.box),r(c.parts??[]);break;case"core":if(c.keep!=="rest"&&c.keep.forEach(u=>o.add(u)),Object.keys(c.rename??{}).forEach(u=>o.add(u)),c.derive?.reads.forEach(u=>o.add(u)),typeof c.slots!="function")for(const u of Object.values(c.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const a of[t,...t.also??[]])s(a.box),r(a.parts);return o}const ge=t=>re(t.headPlacement)==="own-box";function xe(t){return ge(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function we(t,o){const s=t[o];return Array.isArray(s)&&s.some(a=>!!a&&typeof a=="object"&&typeof a.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function Be(t){const o=new Set,s=r=>{for(const a of r)if(a.kind==="group"||a.kind==="block")s(a.parts??[]);else if(a.kind==="core"&&a.slots&&typeof a.slots!="function")for(const[c,u]of Object.entries(a.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(c)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function Se(t,o,s){if(!s.press)for(const r of Be(t)){const a=we(o,r);if(a!==void 0)return a}}function Q(t,o,s={}){const r=t.props,a=(o.ownBoxConverts?void 0:xe(r))??Se(o,r,s)??o.skip?.(r);if(a!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:a};const c=String(r.id??t.type),u=[],m=[],$=new Set,j=(n,i)=>{u.push({key:n,home:i}),$.add(n)},C=r._partStyles??{},L=be(o);let M=0;const w=(n,i)=>({type:n,props:{...i,id:`${c}~${n}-${++M}`}}),X=(n,i,b,y,g,l,B)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&B(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,f)=>B(d,f?`nothing — the old value draws nothing (${y}: no ${h})`:`${l}${y}: ${h}`),s)},q=n=>ce(n,i=>`${c}~${i}-${++M}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},l=y.map((f,x)=>{const p=f??{},k=n.item?.(p,x,r)??{},S=I(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?S.map(T=>({...T,props:{...T.props,...k.props,id:T.props.id}})):S:[w(v,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:S})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,p)=>{const k=x.items.map(O=>O.item),S=f.parts?I(f.parts,f.head?.(k,r)??{},!1,`group ${p+1}: `):[],T=x.items.map(O=>l[O.index]),H=f.perRow?.(k.length,r),N=Number.isInteger(H)&&H>=1?H:1,F=[];if(f.perRow&&N<T.length)for(let O=0;O*N<T.length;O++)F.push(T.slice(O*N,(O+1)*N).flat());return w(v,{name:`${f.name} ${p+1}`,...f.props??{},[_]:[...S,w(v,{name:`${f.itemsName} ${p+1}`,...f.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(v,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[_]:O})):T.flat()})]})})}const B=n.perRow?.(r),e=n.perRow?Number.isInteger(B)&&B>=1?B:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return l.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let f=0;f*e<l.length;f++){const x=l.slice(f*e,(f+1)*e).flat(),p=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;h.push(w(v,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...d,[_]:[...x,...Array.from({length:p},(k,S)=>w(v,{name:`Empty ${S+1}`,...n.rowFiller,[_]:[]}))]}))}return h},I=(n,i,b,y)=>{const g=[],l=(e,d)=>b?j(e,d):void 0,B=e=>b?C[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=K(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){l(e.key,"nothing — empty words draw nothing, so no block");break}const h=ye(e.role??"body"),{_partStyles:f,...x}=h,p=me(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,B(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?he(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=K(i[e.key]);if(!d.text.trim()){l(e.key,"nothing — no words, no button"),l(e.href,"nothing — no button to link"),typeof e.variant=="object"&&l(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",f={...e.style??{},...B(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...ke(e.variant,i),...Object.keys(f).length?{_partStyles:{label:f}}:{},...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Button block: its words`),l(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),l(e.key,`${y}Image block: its picture`),e.alt&&l(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,l));break}case"group":{const d=I(e.parts,i,b,y),h=X(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,l);h&&g.push(w(v,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?I(e.parts,i,b,y):[],h=X(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,l);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(i).filter(p=>!L.has(p)&&!(p in h)):e.keep;for(const p of f)i[p]!==void 0&&(h[p]=i[p],l(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!L.has(k)&&l(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&l("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(C).filter(([k])=>!L.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],l(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&l(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(S=>"kind"in S?D(S,i,l):q([S]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=I(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},l=V(n.box??[],g,r,(B,e,d)=>j(B,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:v,props:{name:n.name,...l,[_]:y,id:de(c,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),$.add(n));for(const n of Object.keys(r))Y.has(n)||$.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function Me(t,o=W,s={}){const r=t.content;if(!Array.isArray(r))return t;let a=!1;const c=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?E(P,u.type):void 0;if(!m)return[u];const $=Q(u,m,s);return $.skipped!==void 0?[u]:(a=!0,$.nodes)});return a?{...t,content:c}:t}function Xe(t,o=W,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((a,c)=>{const u=a&&typeof a.type=="string"&&o.includes(a.type)?E(P,a.type):void 0;if(!u)return;const m=Q(a,u,s);m.skipped===void 0&&r.push({index:c,node:m.node,nodes:m.nodes})}),r}export{fe as HOST_PRESS_BLOCKS,le as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,v as SECTION_BOX_TYPE,W as SECTION_TO_BOX_ON,pe as SECTION_TO_BOX_PRESS,Re as boxNativeReason,Q as convertSection,Me as convertSectionsInPage,Ie as convertTheme,ue as convertsToBox,we as filledTemplateHold,Ke as hasWords,ge as headInOwnBox,We as headParts,xe as ownBoxHold,Fe as pressesAsBox,Ne as registerBoxNativeSections,Ae as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Le as sectionToBoxRow,He as sectionToBoxTypes};
1
+ import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ce}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as E}from"../../../format/lib/own-entry.js";const v=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(A,o)&&E(A,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=s}}function Re(t){return E(A,t)}const Y=new Set(["id"]),P={},W=[],le={ProductGrid:["ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductRef","ProductSpecs"],Events:[],Collections:["CollectionCard"],GalleryB:["GalleryItem"],ContactRouting:[],ReviewForm:[],AppointmentBooking:["BookingBox"],Reviews:["RatingBlock"],CheckoutCTA:[],AlloyWheelsListing:["ProductBuy","ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductSpecs"],SpecTable:["EuTyreLabelBlock","WheelDiagram"],FitmentTable:[]},fe=Object.keys(le),pe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ContactLocations","ProcessSteps",...fe,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Integrations","Countdown","FeaturedCover","IntroBleed","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Ae(t){for(const[o,s]of Object.entries(t)){if(R(P,o)&&E(P,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);P[o]=s}}function Le(t){return E(P,t)}function He(){return Object.keys(P)}function ue(t){return R(P,t)&&W.includes(t)}function Fe(t,o=pe){return R(P,t)&&(o.includes(t)||ue(t))}function We(t){const o=E(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const K=t=>Z(t),Ke=t=>K(t).text.trim()!=="";function he(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const a=s.indexOf(r);return`${s.slice(0,a)}==${r}==${s.slice(a+r.length)}${o===-1?"":t.slice(o)}`}const ye=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function me(t,o,s,r){const c={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&c.align===void 0&&(c.align=r),Object.keys(c).length?{_partStyles:{text:c}}:{}}function ke(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?E(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,a={}){const c={...o};for(const u of t){const[m,$,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const C=j?j(s[m],s,a):s[m];C===void 0?delete c[$]:c[$]=C,r(m,$,C===void 0)}return c}function be(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=a=>{for(const c of a??[])o.add(typeof c=="string"?c:c[0])},r=a=>{for(const c of a)switch(c.kind){case"text":case"image":o.add(c.key),c.kind==="image"&&c.alt&&o.add(c.alt);break;case"button":o.add(c.key),o.add(c.href),typeof c.variant=="object"&&o.add(c.variant.key);break;case"list":o.add(c.key);break;case"group":case"block":s(c.box),r(c.parts??[]);break;case"core":if(c.keep!=="rest"&&c.keep.forEach(u=>o.add(u)),Object.keys(c.rename??{}).forEach(u=>o.add(u)),c.derive?.reads.forEach(u=>o.add(u)),typeof c.slots!="function")for(const u of Object.values(c.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const a of[t,...t.also??[]])s(a.box),r(a.parts);return o}const ge=t=>re(t.headPlacement)==="own-box";function xe(t){return ge(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function we(t,o){const s=t[o];return Array.isArray(s)&&s.some(a=>!!a&&typeof a=="object"&&typeof a.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function Be(t){const o=new Set,s=r=>{for(const a of r)if(a.kind==="group"||a.kind==="block")s(a.parts??[]);else if(a.kind==="core"&&a.slots&&typeof a.slots!="function")for(const[c,u]of Object.entries(a.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(c)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function Se(t,o,s){if(!s.press)for(const r of Be(t)){const a=we(o,r);if(a!==void 0)return a}}function Q(t,o,s={}){const r=t.props,a=(o.ownBoxConverts?void 0:xe(r))??Se(o,r,s)??o.skip?.(r);if(a!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:a};const c=String(r.id??t.type),u=[],m=[],$=new Set,j=(n,i)=>{u.push({key:n,home:i}),$.add(n)},C=r._partStyles??{},L=be(o);let M=0;const w=(n,i)=>({type:n,props:{...i,id:`${c}~${n}-${++M}`}}),X=(n,i,b,y,g,f,B)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&B(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,l)=>B(d,l?`nothing — the old value draws nothing (${y}: no ${h})`:`${f}${y}: ${h}`),s)},q=n=>ce(n,i=>`${c}~${i}-${++M}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},f=y.map((l,x)=>{const p=l??{},k=n.item?.(p,x,r)??{},S=I(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?S.map(T=>({...T,props:{...T.props,...k.props,id:T.props.id}})):S:[w(v,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:S})]});if(n.groups){const l=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),l.of,l.of).map((x,p)=>{const k=x.items.map(O=>O.item),S=l.parts?I(l.parts,l.head?.(k,r)??{},!1,`group ${p+1}: `):[],T=x.items.map(O=>f[O.index]),H=l.perRow?.(k.length,r),N=Number.isInteger(H)&&H>=1?H:1,F=[];if(l.perRow&&N<T.length)for(let O=0;O*N<T.length;O++)F.push(T.slice(O*N,(O+1)*N).flat());return w(v,{name:`${l.name} ${p+1}`,...l.props??{},[_]:[...S,w(v,{name:`${l.itemsName} ${p+1}`,...l.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(v,{name:`${l.rowName??`${l.itemsName} row`} ${U+1}`,...l.rowProps??{},[_]:O})):T.flat()})]})})}const B=n.perRow?.(r),e=n.perRow?Number.isInteger(B)&&B>=1?B:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return f.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let l=0;l*e<f.length;l++){const x=f.slice(l*e,(l+1)*e).flat(),p=n.rowFiller?e-f.slice(l*e,(l+1)*e).length:0;h.push(w(v,{name:`${n.rowName??`${n.name} row`} ${l+1}`,...d,[_]:[...x,...Array.from({length:p},(k,S)=>w(v,{name:`Empty ${S+1}`,...n.rowFiller,[_]:[]}))]}))}return h},I=(n,i,b,y)=>{const g=[],f=(e,d)=>b?j(e,d):void 0,B=e=>b?C[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=K(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){f(e.key,"nothing — empty words draw nothing, so no block");break}const h=ye(e.role??"body"),{_partStyles:l,...x}=h,p=me(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,B(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?he(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),f(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=K(i[e.key]);if(!d.text.trim()){f(e.key,"nothing — no words, no button"),f(e.href,"nothing — no button to link"),typeof e.variant=="object"&&f(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",l={...e.style??{},...B(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...ke(e.variant,i),...Object.keys(l).length?{_partStyles:{label:l}}:{},...d.hidden?{_hidden:!0}:{}})),f(e.key,`${y}Button block: its words`),f(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&f(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){f(e.key,"nothing — no picture, no block"),e.alt&&f(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),f(e.key,`${y}Image block: its picture`),e.alt&&f(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,f));break}case"group":{const d=I(e.parts,i,b,y),h=X(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,f);h&&g.push(w(v,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?I(e.parts,i,b,y):[],h=X(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,f);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},l=e.keep==="rest"?Object.keys(i).filter(p=>!L.has(p)&&!(p in h)):e.keep;for(const p of l)i[p]!==void 0&&(h[p]=i[p],f(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!L.has(k)&&f(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&f("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(C).filter(([k])=>!L.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],f(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&f(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(S=>"kind"in S?D(S,i,f):q([S]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=I(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},f=V(n.box??[],g,r,(B,e,d)=>j(B,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:v,props:{name:n.name,...f,[_]:y,id:de(c,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),$.add(n));for(const n of Object.keys(r))Y.has(n)||$.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function Me(t,o=W,s={}){const r=t.content;if(!Array.isArray(r))return t;let a=!1;const c=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?E(P,u.type):void 0;if(!m)return[u];const $=Q(u,m,s);return $.skipped!==void 0?[u]:(a=!0,$.nodes)});return a?{...t,content:c}:t}function Xe(t,o=W,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((a,c)=>{const u=a&&typeof a.type=="string"&&o.includes(a.type)?E(P,a.type):void 0;if(!u)return;const m=Q(a,u,s);m.skipped===void 0&&r.push({index:c,node:m.node,nodes:m.nodes})}),r}export{le as HOST_PRESS_BLOCKS,fe as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,v as SECTION_BOX_TYPE,W as SECTION_TO_BOX_ON,pe as SECTION_TO_BOX_PRESS,Re as boxNativeReason,Q as convertSection,Me as convertSectionsInPage,Ie as convertTheme,ue as convertsToBox,we as filledTemplateHold,Ke as hasWords,ge as headInOwnBox,We as headParts,xe as ownBoxHold,Fe as pressesAsBox,Ne as registerBoxNativeSections,Ae as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Le as sectionToBoxRow,He as sectionToBoxTypes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "69.4.0",
3
+ "version": "70.0.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -54,8 +54,8 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@tabler/icons-react": "^3.46.0",
57
- "efficient-easel": "^34.3.0",
58
- "efficient-shell": "^13.3.0",
57
+ "efficient-easel": "^35.0.0",
58
+ "efficient-shell": "^13.17.0",
59
59
  "isomorphic-dompurify": "^3.18.0",
60
60
  "next": ">=16",
61
61
  "react": ">=19",
@@ -73,8 +73,8 @@
73
73
  "@types/node": "^20",
74
74
  "@types/react": "^19",
75
75
  "@types/react-dom": "^19",
76
- "efficient-easel": "^34.3.2",
77
- "efficient-shell": "^13.3.0",
76
+ "efficient-easel": "^35.0.0",
77
+ "efficient-shell": "^13.17.0",
78
78
  "efficient-shell-checker": "npm:efficient-shell@12.37.0",
79
79
  "esbuild": "^0.28.0",
80
80
  "happy-dom": "^20.14.5",