efficient-web-builder 59.3.0 → 60.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.
- package/CHANGELOG.md +29 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -1
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +4 -2
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +23 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +9 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/footprint.d.ts +2 -0
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/hover-media.d.ts +30 -0
- package/dist/format/lib/content/hover-media.js +1 -0
- package/dist/format/lib/content/ink.d.ts +3 -0
- package/dist/format/lib/content/ink.js +1 -1
- package/dist/format/lib/content/list-position.d.ts +3 -0
- package/dist/format/lib/content/list-position.js +1 -0
- package/dist/format/lib/content/list-query.d.ts +2 -0
- package/dist/format/lib/content/list-query.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +3 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +7 -0
- package/dist/format/lib/document/card-content-switch.js +1 -1
- package/dist/format/lib/document/panel-only.d.ts +2 -0
- package/dist/format/lib/document/panel-only.js +1 -0
- package/dist/format/lib/document/seed-shape.d.ts +2 -0
- package/dist/format/lib/document/seed-shape.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +14 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/source-rules/published-mounts.d.ts +11 -1
- package/dist/format/lib/source-rules/published-mounts.js +57 -9
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -2
- package/dist/format/lib/source-rules/support/ts-program.d.ts +4 -0
- package/dist/format/lib/source-rules/support/ts-program.js +2 -0
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +3 -3
- package/dist/render/components/CardRowContext.d.ts +5 -2
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroArrows.d.ts +6 -3
- package/dist/render/components/HeroArrows.js +1 -1
- package/dist/render/components/HoverMediaLayer.d.ts +9 -0
- package/dist/render/components/HoverMediaLayer.js +1 -0
- package/dist/render/components/ListSearchBox.d.ts +2 -1
- package/dist/render/components/ListSearchBox.js +1 -1
- package/dist/render/components/SideListLayout.d.ts +14 -0
- package/dist/render/components/SideListLayout.js +1 -0
- package/dist/render/lib/dealer-source.d.ts +3 -2
- package/dist/render/lib/dealer-source.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
- package/dist/render/lib/document/text-parts.d.ts +1 -0
- package/dist/render/lib/document/text-parts.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1 @@
|
|
|
1
|
-
function N(
|
|
2
|
-
`};return t.createProgram({rootNames:[...r.keys()],options:s,host:o})}function M(t,i,r){const n=E(t,i),s=n.getTypeChecker();let o;n.getSourceFile(`/${r.file}`)?.forEachChild(a=>{if(t.isFunctionDeclaration(a)&&a.name?.text==="select"&&(o=a),t.isVariableStatement(a))for(const p of a.declarationList.declarations)t.isIdentifier(p.name)&&p.name.text==="select"&&(o=p)});const e=new Set(r.modules??[]),c=a=>{if(!t.isImportSpecifier(a))return!1;const p=a.parent.parent.parent;return(a.propertyName??a.name).text==="select"&&t.isStringLiteral(p.moduleSpecifier)&&e.has(p.moduleSpecifier.text)},u=[];for(const a of n.getSourceFiles()){if(a.isDeclarationFile)continue;const p=a.fileName.slice(1),g=l=>a.getLineAndCharacterOfPosition(l.getStart()).line+1;let S=!1;const m=l=>{t.isStringLiteral(l)&&/(^|\s)sf-[a-z0-9-]/.test(l.text)&&(S=!0),t.isImportDeclaration(l)&&t.isStringLiteral(l.moduleSpecifier)&&/^(editor-shell|efficient-easel)(\/|$)/.test(l.moduleSpecifier.text)&&(S=!0),l.forEachChild(m)};m(a);const h=l=>{if(t.isPropertyAssignment(l)&&t.isIdentifier(l.name)&&l.name.text==="type"&&t.isStringLiteral(l.initializer)&&l.initializer.text==="select"&&u.push({file:p,line:g(l),kind:'field: type "select"',engineDrawn:!0,classes:[]}),t.isCallExpression(l)&&t.isIdentifier(l.expression)){const d=s.getSymbolAtLocation(l.expression),x=d&&d.flags&t.SymbolFlags.Alias?s.getAliasedSymbol(d):d;[...d?.declarations??[],...x?.declarations??[]].some(f=>o!==void 0&&f===o||c(f))&&u.push({file:p,line:g(l),kind:"field: select() helper",engineDrawn:!0,classes:[]})}if(t.isJsxOpeningLikeElement(l)&&l.tagName.getText()==="select"&&S&&p!==r.file){const d=l.attributes.properties.find(b=>t.isJsxAttribute(b)&&t.isIdentifier(b.name)&&b.name.text==="className"),x=d&&d.initializer&&t.isStringLiteral(d.initializer)?d.initializer.text:"";u.push({file:p,line:g(l),kind:"element: <select> in panel markup",engineDrawn:!1,classes:x.split(/\s+/).filter(Boolean)})}l.forEachChild(h)};h(a)}return{population:u,helperDeclared:o!==void 0}}const v=(t,i)=>t[0]-i[0]||t[1]-i[1]||t[2]-i[2],O=t=>`(${t[0]},${t[1]},${t[2]})`;function $(t){const i=[];let r=0,n=null,s="";const o=()=>{const e=s.indexOf(":");e>0&&i.push({prop:s.slice(0,e).trim(),value:s.slice(e+1).trim()}),s=""};for(const e of t){if(n){s+=e,e===n&&(n=null);continue}if(e==='"'||e==="'")n=e;else if(e==="(")r+=1;else if(e===")")r=Math.max(0,r-1);else if(e===";"&&r===0){o();continue}s+=e}return o(),i}function A(t){const i=[];let r=0,n="";for(const s of t){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(t){let i=t.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 e;if(e=/^\.([A-Za-z0-9_-]+)/.exec(i))r.push(e[1]);else if(e=/^:(focus-visible|focus-within|hover|focus|active|checked|disabled)\b/.exec(i))n.push(e[1]);else if(e=/^:dir\([^)]*\)/.exec(i))n.push("dir");else if(e=/^:not\(\[([A-Za-z-]+)\]\)/.exec(i))r.push(`@not-${e[1]}`);else if(e=/^\[([A-Za-z-]+)(?:[~^$*|]?=[^\]]*)?\]/.exec(i))n.push(`[${e[1]}]`);else if(e=/^:has\(([^)]*)\)/.exec(i)){if(!/^\s*>?\s*[a-z]+\s*$/.test(e[1]))return null;r.push("@has-type")}else return null;i=i.slice(e[0].length)}return{type:s,classes:r,needsState:n}}const D=t=>t.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 F(t){if(t===null)return!0;let i=!0;for(const r of t.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],e=s[2].trim();if(o==="hover"||o==="any-hover"){if(e==="hover")continue;return e==="none"?!1:null}if(o==="pointer"||o==="any-pointer"){if(e==="fine")continue;return e==="coarse"||e==="none"?!1:null}i=null}return i}const T=t=>t??"(no media query)";function Z(t,i,r,n,s="rest"){const o=[],e=[],c=[],u=s==="hover"?new Set(["hover"]):new Set;return t.forEach((a,p)=>{const g=s==="rest"?a.media===null:F(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=A(m).map(C),l=h[h.length-1];if(h.some(f=>f===null)||!l){e.push(`${r}: ${m}`);continue}const d=h;if(l.type&&l.type!=="select")continue;const x=l.classes.filter(f=>!f.startsWith("@"));if(!(!x.every(f=>i.own.includes(f))||!l.type&&x.length===0||!l.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){c.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:e,undecided:c}}const w={appearance:"auto","background-image":"none","background-size":"auto","background-repeat":"repeat","background-position":"0% 0%","background-color":"transparent","border-color":"currentcolor"};function z(t){const i=t.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 W(t){const i=new Map;for(const r of $(t.replace(/[^{}]*\{|\}/g,";")))r.prop.startsWith("--")&&i.set(r.prop,r.value);return i}function L(t,i,r=0){if(r>8)return t;let n=!1;const s=t.replace(/var\(\s*(--[A-Za-z0-9-]+)\s*(?:,([^()]*(?:\([^()]*\)[^()]*)*))?\)/g,(o,e)=>{const c=i.get(e);return c===void 0?o:(n=!0,c)});return n?L(s,i,r+1):s}function j(t,i,r=new Map){let n=null;const s=(e,c)=>{(!n||v(e.spec,n.spec)>0||v(e.spec,n.spec)===0&&e.order>=n.order)&&(n={value:c.trim(),from:`${e.sheet} { ${e.selector} }`,spec:e.spec,order:e.order})};for(const e of t)for(const c of $(e.decls)){if(c.prop===i||i==="appearance"&&c.prop==="-webkit-appearance"){s(e,c.value);continue}if(c.prop==="border"&&i==="border-color"){s(e,z(c.value)??w[i]);continue}if(c.prop!=="background"||!i.startsWith("background-"))continue;const u=c.value;s(e,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"?z(u)??w[i]:w[i])}const o=n??{value:w[i],from:"(nothing declares one)"};return{value:L(o.value,r),from:o.from}}const I=["sf-editor","sf-body","sf-panel","sf-insp-body","sf-styles","sf-field","es-field","sf-copybox"];function K(t,i){const r=t.filter(e=>!e.engineDrawn),n=e=>new RegExp(`\\.${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(i),s=e=>[...e.classes].filter(n).sort().join(" "),o=new Set([""]);for(const e of r)o.add(s(e));return[...o].sort().map(e=>({name:e?`house .${e.split(" ").join(".")}`:"house (bare)",own:e?e.split(" "):[],ancestors:[...I],rows:r.filter(c=>s(c)===e).length}))}function P(t,i,r){const n=new Map;for(const s of r)n.set(s,[]);for(const s of i){if(!k(s.path))continue;const o=t.createSourceFile(s.path,s.text,t.ScriptTarget.Latest,!0),e=c=>{if(t.isJsxAttribute(c)&&t.isIdentifier(c.name)&&c.name.text==="className"&&c.initializer&&t.isStringLiteral(c.initializer)){const u=c.initializer.text.split(/\s+/).filter(Boolean);for(const a of r)u.includes(a)&&n.get(a)?.push(s.path)}c.forEachChild(e)};e(o)}return n}export{I as ANCESTORS,w as INITIAL,Z as applicable,M as census,P as chainInMarkup,z as colorIn,C as compound,L as derefVars,K as deriveShapes,N as importsOf,F as mediaHolds,T as mediaLabel,W as readVars,j as resolve,v as specCmp,D as specOf,O as specStr,A as splitCombinators,$ as splitDecls};
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const c=t=>/\.(tsx?|mts)$/.test(t)&&!t.endsWith(".d.ts");function u(t,n){const r=new Map,s=new Set(["/"]);for(const e of n){if(!c(e.path))continue;r.set(`/${e.path}`,e.text);const o=e.path.split("/");for(let i=1;i<o.length;i++)s.add(`/${o.slice(0,i).join("/")}`)}const a={noLib:!0,types:[],noEmit:!0,jsx:t.JsxEmit.Preserve,target:t.ScriptTarget.ESNext,module:t.ModuleKind.ESNext,moduleResolution:t.ModuleResolutionKind.Bundler,baseUrl:"/",paths:{"@/*":["./*"]}},l={fileExists:e=>r.has(e),readFile:e=>r.get(e),directoryExists:e=>s.has(e.replace(/\/+$/,"")||"/"),getDirectories:()=>[],realpath:e=>e,getSourceFile:(e,o)=>{const i=r.get(e);return i===void 0?void 0:t.createSourceFile(e,i,o,!0)},getDefaultLibFileName:()=>"/lib.d.ts",writeFile:()=>{},getCurrentDirectory:()=>"/",getCanonicalFileName:e=>e,useCaseSensitiveFileNames:()=>!0,getNewLine:()=>`
|
|
2
|
+
`};return t.createProgram({rootNames:[...r.keys()],options:a,host:l})}export{c as isScript,u as programOf};
|
|
@@ -56,6 +56,7 @@ export { contrastRatio };
|
|
|
56
56
|
export declare const GRADE_LABEL: Record<ReadabilityGrade, string>;
|
|
57
57
|
export declare function gradeContrast(ratio: number): ReadabilityGrade;
|
|
58
58
|
export declare function accentInk(accent: string): string;
|
|
59
|
+
export declare function fillIsDark(fill: string): boolean;
|
|
59
60
|
export declare const ACCENT_DARKEN_STEPS: readonly [0.25, 0.4, 0.55];
|
|
60
61
|
export declare function darkerAccents(accent: string): string[];
|
|
61
62
|
export declare function themeColorStyle(v?: ThemeValue | null): Record<string, string>;
|
package/dist/format/lib/theme.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{contrastRatio as
|
|
1
|
+
import{contrastRatio as q,hexToRgb as g,parseHexColor as s,readableInk as J,relativeLuminance as p}from"efficient-shell/format";const Q="storefront-theme",$e="sf:theme-mode",Fe="sf:theme-switch",Ue="hide",Ge="light",Ye=!1,D=7,H=18;function v(e){return e>=D&&e<H}function ze(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?v(o)?"light":"dark":t==="light"?"light":"dark"}function Be(e){const{mode:t,switchShown:n}=e;return`
|
|
2
2
|
try {
|
|
3
3
|
var mode = ${JSON.stringify(t)};
|
|
4
4
|
var shown = ${n?"true":"false"};
|
|
5
|
-
var override = localStorage.getItem(${JSON.stringify(
|
|
5
|
+
var override = localStorage.getItem(${JSON.stringify(Q)});
|
|
6
6
|
var theme;
|
|
7
7
|
if (shown && (override === 'light' || override === 'dark')) {
|
|
8
8
|
theme = override;
|
|
@@ -15,4 +15,4 @@ import{contrastRatio as Z,hexToRgb as d,parseHexColor as s,readableInk as q,rela
|
|
|
15
15
|
if (theme === 'light') document.documentElement.setAttribute('data-theme', 'light');
|
|
16
16
|
else document.documentElement.removeAttribute('data-theme');
|
|
17
17
|
} catch (e) {}
|
|
18
|
-
`}const l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},v=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ee={selected:0,themes:v};function N(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ee}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function _(e,t,n){const r=d(e),o=d(t);if(r===null||o===null)return e;const c=(i,a)=>Math.max(0,Math.min(255,Math.round(i+(a-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const te={light:"#ffffff",dark:"#0a0a0a"},Xe=["light","dark"];function We(e,t){const n=te[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:_(e,r,.1),line:_(e,r,.22),muted:_(n,e,.35),brandInk:t}}function h(e){const t=N(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function Ke(e){return{fill:u(e).background,accent:e.accent}}const ne=.4,re=4.5,oe=3,je={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Ve(e){return e>=re?"good":e>=oe?"large-only":"hard"}const ce=["#000000","#ffffff"];function g(e){return q(e,ce)}const ie=[.25,.4,.55];function Ze(e){const t=d(e);return t===null?[]:ie.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function qe(e){const t=h(e),n={"--theme-fg":t.text},r=p(t.text);return(r===null||r>=ne)&&(n["--overlay-fg"]=t.text),n}const se=82;function E(e){return`color-mix(in srgb, ${e} ${se}%, #000)`}function Je(e){const t=h(e);return{"--theme-accent":t.accent,"--theme-accent-2":E(t.accent),"--theme-accent-ink":g(t.accent)}}function S(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function Qe(e){const t=h(e),n=S(t),r=O(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=E(n)),o["--theme-btn-ink"]=r??g(n),o}function O(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function ae(e,t){return O(e)??g(S(e)??t)}function ve(e){const t=h(e);return{fill:S(t)??t.accent.toLowerCase(),ink:ae(t,t.accent)}}function et(e){const t={};return N(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=E(o.accent),t[`--theme-preset-${r}-accent-ink`]=g(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const A=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},T=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function k([e,t,n]){const[r,o,c]=[A(e),A(t),A(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),f=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*f,1.9779984951*i-2.428592205*a+.4505937099*f,.0259040371*i+.7827717662*a-.808675766*f]}function ue([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[T(4.0767416621*r-3.3077115913*o+.2309699292*c),T(-1.2684380046*r+2.6097574011*o-.3413193965*c),T(-.0041960863*r-.7034186147*o+1.707614701*c)]}const b=e=>{const t=d(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},L=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],P=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,$=e=>L(b(e.surface),b(e.line),.6);function tt(e){return P($(u(e)))}function F(e){const t=u(e);return P(ue(L(k($(t)),k(b(t.text)),.92)))}function nt(e){return{...e,background:F(e)}}function U(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,f)=>{if(f===t)return!1;const x=u(a);return s(x.background)!==c?!1:!r||s(x.text??"")===s(i.text??"")&&s(x.accent??"")===s(i.accent??"")})}function rt(e,t){return U(e,t,F,!1)}function ot(e,t){return U(e,t,n=>s(n.surface??""),!0)}const le=1;function fe(e,t){const n=(e??[]).flatMap((r,o)=>{const c=p(r.background??""),i=p(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??le}function ct(e){return fe(e?.themes,e?.selected)}const it=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function st(e){const t=u(h(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const he=["heading","body","label"],at={heading:"Headings",body:"Body",label:"Labels"};function ut(e){if(!e)return null;for(const t of he)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const G=["headingLarge","headingMedium","headingSmall","accent","body","label"],lt={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},ft={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},de=8,ge=200;function me(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=de&&t<=ge?t:null}function xe(e){const t={};for(const n of G)t[n]=me(e?.[n]);return t}function ht(e){const t=xe(e),n={};for(const r of G){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const pe=["square","small","large"],_e="small";function Ee(e){return pe.includes(e??"")?e:_e}function dt(e){return z(Ae[Ee(e)])}const C=0,Se=40,Ae={square:0,small:null,large:16},Y={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function I(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;const t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(Se,Math.max(C,Math.round(t))):null}function z(e){const t=I(e);return t===null?{}:Object.fromEntries(Object.entries(Y).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function gt(e){return(I(e)??C)*Y["--sf-button-radius"]}function mt(e){return z(I(e)??C)}const Te=["none","soft","lifted"],be="soft",B="none",Ce=["tight","normal","roomy"],Ie="normal",we="normal",Me=["none","lift","highlight"],ye="lift",Re="highlight",X="#141416";function W(e){return Te.includes(e??"")?e:be}function De(e){return Ce.includes(e??"")?e:Ie}function K(e){return Me.includes(e??"")?e:ye}function He(e){return e&&s(e)===e.toLowerCase()?e.toLowerCase():X}function xt(e){const t=W(e);return t===B?void 0:t}function pt(e){const t=De(e);return t===we?void 0:t}function _t(e){const t=K(e);return t===Re?void 0:t}function Et(e,t,n){const r=He(t);return r===X?{}:W(e)!==B||K(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ne=["normal","tight","compressed"],j="normal";function V(e){return Ne.includes(e??"")?e:j}function St(e){const t=V(e);return t===j?void 0:t}function At(e){switch(V(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Tt=["authored","sentence"],bt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},w=100,M=900,Oe=24,ke=200;function m(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function y(e){const t=m(e?.weight,w,M),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:m(c,w,M),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:m(e?.weightStrong,w,M),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:m(e?.maxPx,Oe,ke),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function Ct(e){const t=y(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function It(e){return y({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function wt(e){const t=y(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}const R="siteTheme";function Le(e){const t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(r=>!!r&&typeof r=="object"))return{};const n=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[R]:{selected:n,themes:t.themes}}}function Mt(e){return Le(e?.[R])[R]}export{ie as ACCENT_DARKEN_STEPS,Xe as BRAND_INKS,Ce as CARD_GAPS,Te as CARD_SHADOWS,Se as CORNER_RADIUS_MAX,C as CORNER_RADIUS_MIN,pe as CORNER_STYLES,Ae as CORNER_STYLE_TO_PX,Ie as DEFAULT_CARD_GAP,be as DEFAULT_CARD_SHADOW,_e as DEFAULT_CORNER_STYLE,j as DEFAULT_HEADING_COMPRESSION,bt as DEFAULT_HEADING_TYPOGRAPHY,ye as DEFAULT_HOVER_EFFECT,X as DEFAULT_SHADOW_COLOR,ft as DEFAULT_SIZES,l as DEFAULT_SURFACES,Ye as DEFAULT_SWITCH_SHOWN,v as DEFAULT_THEMES,Ge as DEFAULT_THEME_MODE,ee as DEFAULT_THEME_VALUE,je as GRADE_LABEL,Tt as HEADING_CASES,Ne as HEADING_COMPRESSIONS,ke as HEADING_MAX_PX_MAX,Oe as HEADING_MAX_PX_MIN,M as HEADING_WEIGHT_MAX,w as HEADING_WEIGHT_MIN,Me as HOVER_EFFECTS,we as IDENTITY_CARD_GAP,B as IDENTITY_CARD_SHADOW,Re as IDENTITY_HOVER_EFFECT,re as READABILITY_AA,oe as READABILITY_AA_LARGE,lt as SCALE_OF_STEP,R as SITE_THEME_KEY,G as SIZE_STEPS,ge as TEXT_SIZE_MAX,de as TEXT_SIZE_MIN,H as THEME_DAY_END_HOUR,D as THEME_DAY_START_HOUR,$e as THEME_MODE_KEY,J as THEME_STORAGE_KEY,it as THEME_SURFACE_KEYS,Ue as THEME_SWITCH_HIDE,Fe as THEME_SWITCH_KEY,he as TYPE_GROUPS,at as TYPE_GROUP_LABELS,g as accentInk,nt as bandPresetFor,rt as bandPresetIndex,We as brandTheme,Be as buildThemeBootScript,pt as cardGapAttr,xt as cardShadowAttr,At as compressionMetrics,Z as contrastRatio,z as cornerRadiusTokens,dt as cornerStyleTokens,ct as darkBandIndex,fe as darkPresetIndex,Ze as darkerAccents,Ve as gradeContrast,St as headingCompressionAttr,It as headingTypographyFromRow,Ct as headingTypographyStyle,wt as headingTypographyToRow,_t as hoverEffectAttr,Q as isDayHour,De as normalizeCardGap,W as normalizeCardShadow,I as normalizeCornerRadius,Ee as normalizeCornerStyle,V as normalizeHeadingCompression,y as normalizeHeadingTypography,K as normalizeHoverEffect,He as normalizeShadowColor,me as normalizeSize,xe as normalizeSizes,N as normalizeTheme,u as normalizeThemeColors,ze as resolveTheme,ae as resolvedButtonInk,F as sectionBandTone,h as selectedThemeColors,Et as shadowColorTokens,ve as siteButtonPaint,gt as siteButtonRadiusPx,mt as siteCornerRadiusTokens,Le as siteThemeMetadata,Mt as siteThemeOf,ot as surfacePresetIndex,tt as surfaceTwoTone,Je as themeAccentStyle,S as themeButtonColour,O as themeButtonInk,Qe as themeButtonStyle,qe as themeColorStyle,et as themePresetAccentVars,st as themeSurfaceStyle,Ke as themeSwatchColors,ut as typeScaleGroupOfClassName,ht as typeSizesStyle};
|
|
18
|
+
`}const l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},ee=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],te={selected:0,themes:ee};function N(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...te}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function _(e,t,n){const r=g(e),o=g(t);if(r===null||o===null)return e;const c=(i,a)=>Math.max(0,Math.min(255,Math.round(i+(a-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const ne={light:"#ffffff",dark:"#0a0a0a"},Xe=["light","dark"];function We(e,t){const n=ne[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:_(e,r,.1),line:_(e,r,.22),muted:_(n,e,.35),brandInk:t}}function h(e){const t=N(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function Ke(e){return{fill:u(e).background,accent:e.accent}}const re=.4,oe=4.5,ce=3,je={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Ve(e){return e>=oe?"good":e>=ce?"large-only":"hard"}const k=["#000000","#ffffff"];function d(e){return J(e,k)}function Ze(e){return d(e)===k[1]}const ie=[.25,.4,.55];function qe(e){const t=g(e);return t===null?[]:ie.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Je(e){const t=h(e),n={"--theme-fg":t.text},r=p(t.text);return(r===null||r>=re)&&(n["--overlay-fg"]=t.text),n}const se=82;function E(e){return`color-mix(in srgb, ${e} ${se}%, #000)`}function Qe(e){const t=h(e);return{"--theme-accent":t.accent,"--theme-accent-2":E(t.accent),"--theme-accent-ink":d(t.accent)}}function S(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function ve(e){const t=h(e),n=S(t),r=O(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=E(n)),o["--theme-btn-ink"]=r??d(n),o}function O(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function ae(e,t){return O(e)??d(S(e)??t)}function et(e){const t=h(e);return{fill:S(t)??t.accent.toLowerCase(),ink:ae(t,t.accent)}}function tt(e){const t={};return N(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=E(o.accent),t[`--theme-preset-${r}-accent-ink`]=d(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const A=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},T=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function L([e,t,n]){const[r,o,c]=[A(e),A(t),A(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),f=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*f,1.9779984951*i-2.428592205*a+.4505937099*f,.0259040371*i+.7827717662*a-.808675766*f]}function ue([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[T(4.0767416621*r-3.3077115913*o+.2309699292*c),T(-1.2684380046*r+2.6097574011*o-.3413193965*c),T(-.0041960863*r-.7034186147*o+1.707614701*c)]}const b=e=>{const t=g(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},P=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],$=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,F=e=>P(b(e.surface),b(e.line),.6);function nt(e){return $(F(u(e)))}function U(e){const t=u(e);return $(ue(P(L(F(t)),L(b(t.text)),.92)))}function rt(e){return{...e,background:U(e)}}function G(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,f)=>{if(f===t)return!1;const x=u(a);return s(x.background)!==c?!1:!r||s(x.text??"")===s(i.text??"")&&s(x.accent??"")===s(i.accent??"")})}function ot(e,t){return G(e,t,U,!1)}function ct(e,t){return G(e,t,n=>s(n.surface??""),!0)}const le=1;function fe(e,t){const n=(e??[]).flatMap((r,o)=>{const c=p(r.background??""),i=p(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??le}function it(e){return fe(e?.themes,e?.selected)}const st=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function at(e){const t=u(h(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const he=["heading","body","label"],ut={heading:"Headings",body:"Body",label:"Labels"};function lt(e){if(!e)return null;for(const t of he)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const Y=["headingLarge","headingMedium","headingSmall","accent","body","label"],ft={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},ht={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},de=8,ge=200;function me(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=de&&t<=ge?t:null}function xe(e){const t={};for(const n of Y)t[n]=me(e?.[n]);return t}function dt(e){const t=xe(e),n={};for(const r of Y){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const pe=["square","small","large"],_e="small";function Ee(e){return pe.includes(e??"")?e:_e}function gt(e){return B(Ae[Ee(e)])}const C=0,Se=40,Ae={square:0,small:null,large:16},z={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function I(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;const t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(Se,Math.max(C,Math.round(t))):null}function B(e){const t=I(e);return t===null?{}:Object.fromEntries(Object.entries(z).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function mt(e){return(I(e)??C)*z["--sf-button-radius"]}function xt(e){return B(I(e)??C)}const Te=["none","soft","lifted"],be="soft",X="none",Ce=["tight","normal","roomy"],Ie="normal",we="normal",Me=["none","lift","highlight"],ye="lift",Re="highlight",W="#141416";function K(e){return Te.includes(e??"")?e:be}function De(e){return Ce.includes(e??"")?e:Ie}function j(e){return Me.includes(e??"")?e:ye}function He(e){return e&&s(e)===e.toLowerCase()?e.toLowerCase():W}function pt(e){const t=K(e);return t===X?void 0:t}function _t(e){const t=De(e);return t===we?void 0:t}function Et(e){const t=j(e);return t===Re?void 0:t}function St(e,t,n){const r=He(t);return r===W?{}:K(e)!==X||j(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ne=["normal","tight","compressed"],V="normal";function Z(e){return Ne.includes(e??"")?e:V}function At(e){const t=Z(e);return t===V?void 0:t}function Tt(e){switch(Z(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const bt=["authored","sentence"],Ct={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},w=100,M=900,ke=24,Oe=200;function m(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function y(e){const t=m(e?.weight,w,M),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:m(c,w,M),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:m(e?.weightStrong,w,M),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:m(e?.maxPx,ke,Oe),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function It(e){const t=y(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function wt(e){return y({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function Mt(e){const t=y(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}const R="siteTheme";function Le(e){const t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(r=>!!r&&typeof r=="object"))return{};const n=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[R]:{selected:n,themes:t.themes}}}function yt(e){return Le(e?.[R])[R]}export{ie as ACCENT_DARKEN_STEPS,Xe as BRAND_INKS,Ce as CARD_GAPS,Te as CARD_SHADOWS,Se as CORNER_RADIUS_MAX,C as CORNER_RADIUS_MIN,pe as CORNER_STYLES,Ae as CORNER_STYLE_TO_PX,Ie as DEFAULT_CARD_GAP,be as DEFAULT_CARD_SHADOW,_e as DEFAULT_CORNER_STYLE,V as DEFAULT_HEADING_COMPRESSION,Ct as DEFAULT_HEADING_TYPOGRAPHY,ye as DEFAULT_HOVER_EFFECT,W as DEFAULT_SHADOW_COLOR,ht as DEFAULT_SIZES,l as DEFAULT_SURFACES,Ye as DEFAULT_SWITCH_SHOWN,ee as DEFAULT_THEMES,Ge as DEFAULT_THEME_MODE,te as DEFAULT_THEME_VALUE,je as GRADE_LABEL,bt as HEADING_CASES,Ne as HEADING_COMPRESSIONS,Oe as HEADING_MAX_PX_MAX,ke as HEADING_MAX_PX_MIN,M as HEADING_WEIGHT_MAX,w as HEADING_WEIGHT_MIN,Me as HOVER_EFFECTS,we as IDENTITY_CARD_GAP,X as IDENTITY_CARD_SHADOW,Re as IDENTITY_HOVER_EFFECT,oe as READABILITY_AA,ce as READABILITY_AA_LARGE,ft as SCALE_OF_STEP,R as SITE_THEME_KEY,Y as SIZE_STEPS,ge as TEXT_SIZE_MAX,de as TEXT_SIZE_MIN,H as THEME_DAY_END_HOUR,D as THEME_DAY_START_HOUR,$e as THEME_MODE_KEY,Q as THEME_STORAGE_KEY,st as THEME_SURFACE_KEYS,Ue as THEME_SWITCH_HIDE,Fe as THEME_SWITCH_KEY,he as TYPE_GROUPS,ut as TYPE_GROUP_LABELS,d as accentInk,rt as bandPresetFor,ot as bandPresetIndex,We as brandTheme,Be as buildThemeBootScript,_t as cardGapAttr,pt as cardShadowAttr,Tt as compressionMetrics,q as contrastRatio,B as cornerRadiusTokens,gt as cornerStyleTokens,it as darkBandIndex,fe as darkPresetIndex,qe as darkerAccents,Ze as fillIsDark,Ve as gradeContrast,At as headingCompressionAttr,wt as headingTypographyFromRow,It as headingTypographyStyle,Mt as headingTypographyToRow,Et as hoverEffectAttr,v as isDayHour,De as normalizeCardGap,K as normalizeCardShadow,I as normalizeCornerRadius,Ee as normalizeCornerStyle,Z as normalizeHeadingCompression,y as normalizeHeadingTypography,j as normalizeHoverEffect,He as normalizeShadowColor,me as normalizeSize,xe as normalizeSizes,N as normalizeTheme,u as normalizeThemeColors,ze as resolveTheme,ae as resolvedButtonInk,U as sectionBandTone,h as selectedThemeColors,St as shadowColorTokens,et as siteButtonPaint,mt as siteButtonRadiusPx,xt as siteCornerRadiusTokens,Le as siteThemeMetadata,yt as siteThemeOf,ct as surfacePresetIndex,nt as surfaceTwoTone,Qe as themeAccentStyle,S as themeButtonColour,O as themeButtonInk,ve as themeButtonStyle,Je as themeColorStyle,tt as themePresetAccentVars,at as themeSurfaceStyle,Ke as themeSwatchColors,lt as typeScaleGroupOfClassName,dt as typeSizesStyle};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { SlotComponent } from "efficient-easel/blocks";
|
|
3
|
+
import { type CardRowFieldSpec } from "../../format/lib/content/card-template.js";
|
|
3
4
|
import { type CardItemAction, type CardRowState, type CardStateLine } from "../../format/lib/content/card-state.js";
|
|
4
5
|
import type { SourceRow } from "../../format/lib/content/block-sources.js";
|
|
5
6
|
export type { CardRowState } from "../../format/lib/content/card-state.js";
|
|
@@ -7,6 +8,7 @@ export type CardRow = {
|
|
|
7
8
|
row: SourceRow;
|
|
8
9
|
index: number;
|
|
9
10
|
ownerType?: string;
|
|
11
|
+
fields?: readonly CardRowFieldSpec[];
|
|
10
12
|
item?: unknown;
|
|
11
13
|
nested?: boolean;
|
|
12
14
|
state?: CardRowState;
|
|
@@ -30,12 +32,13 @@ type CardTemplateRowsProps = {
|
|
|
30
32
|
Template: SlotComponent | undefined;
|
|
31
33
|
rows: readonly SourceRow[];
|
|
32
34
|
items?: readonly unknown[];
|
|
35
|
+
fields?: readonly CardRowFieldSpec[];
|
|
33
36
|
states?: readonly (CardRowState | undefined)[];
|
|
34
37
|
stateLine?: CardStateLine;
|
|
35
38
|
actions?: readonly (CardItemAction | undefined)[];
|
|
36
39
|
fallback: ReactNode;
|
|
37
|
-
copyAttrs?: Readonly<Record<string, string
|
|
40
|
+
copyAttrs?: Readonly<Record<string, string>> | ((row: CardRow) => Readonly<Record<string, string>>);
|
|
38
41
|
wrapCopy?: (copy: ReactNode, row: CardRow) => ReactNode;
|
|
39
42
|
children: (cards: ReactNode) => ReactNode;
|
|
40
43
|
};
|
|
41
|
-
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, items, states, stateLine, actions, fallback, copyAttrs, wrapCopy, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
44
|
+
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, items, fields, states, stateLine, actions, fallback, copyAttrs, wrapCopy, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as i,jsx as t,jsxs as w}from"react/jsx-runtime";import{createContext as g,useContext as d,useId as y}from"react";import{REPEAT_ATTRIBUTE as O,REPEAT_INDEX_ATTRIBUTE as j}from"efficient-easel/draw";import{BOX_LINKED_CLASS as k}from"../../format/lib/content/box-link.js";import{CARD_TEMPLATE_SLOT as v,cardTemplateLinesBetween as F,rowFilledProps as U,templateBoxIsEmpty as X}from"../../format/lib/content/card-template.js";import{CARD_ACTION_ATTR as $,CARD_ACTION_CLASS as G,CARD_STATE_LINE_CLASS as K,CARD_STATE_UNDER_LINE_CLASS as M,cardStateAttrs as V,cardStateValue as q}from"../../format/lib/content/card-state.js";import{usePageRecordRow as z}from"./CurrentRecord.js";import{CardCopyCell as H}from"./InBoxContext.js";import{SECTION_FILL_CLASS as J}from"../../format/lib/content/section-min-height.js";function ct({props:n,editing:o,children:r}){const e=d(u);return!o&&X(n,e?.row)?null:t(i,{children:r})}const u=g(null);function at(){return d(u)}function lt({type:n,props:o,children:r}){const e=d(u),s=z(),a=e?.row??s;return t(i,{children:r(U(n,o,a,e?.ownerType,e?.fields),e,a)})}function Q({attrs:n,selected:o,press:r,children:e}){const s=y();return w("div",{...n,id:s,className:k,children:[t("button",{type:"button",[$]:"",className:G,"aria-pressed":o,"aria-labelledby":s,onClick:r}),e]})}function it({ownerId:n,ownerType:o,Template:r,rows:e,items:s,fields:a,states:L,stateLine:I,actions:N,fallback:h,copyAttrs:m,wrapCopy:p,children:D}){const x=d(u);if(!r||(r.blockCount??0)<=0)return t(i,{children:h});const b=x!==null,_=F(o),A=r.blockCount===1?t(H,{children:t(r,{className:J})}):t(r,{}),B=e.map((P,c)=>{const l=L?.[c],C={row:P,index:c,ownerType:o,item:s?.[c],nested:b,...a?{fields:a}:null,...l?{state:l}:null,..._?{linesBetween:_}:null},R=q(l)?w(i,{children:[A,t("span",{"aria-hidden":"true",className:I==="under"?M:K})]}):A,E={[O]:`${n}:${v}`,[j]:c,...typeof m=="function"?m(C):m},T=N?.[c],f=V(l),S=T?t(Q,{attrs:{...E,...f},selected:l?.selected===!0,press:T.press,children:R}):t("div",{...E,...f,children:R});return t(u.Provider,{value:C,children:p?p(S,C):S},c)});return t(i,{children:D(B)})}export{u as CardRowContext,lt as CardRowDrawn,it as CardTemplateRows,ct as RowEmptyGate,at as useCardRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as a,Fragment as q}from"react/jsx-runtime";import{useEffect as K,useMemo as v,useRef as V,useState as d}from"react";import{dealerDistanceLabel as W,dealerPins as O,parseDealerListPosition as Q,useDealerSource as Y}from"../lib/dealer-source.js";import{groupColsClass as G}from"../../format/lib/locations-grid.js";import{say as J}from"../../format/lib/editor-words.js";import U from"./SiteMap.js";import X,{SIDE_MAP_CLASS as Z}from"./SideListLayout.js";const D={near:null,dealers:[]},H=5;function ee({mapLabel:n,mapTheme:p,search:h,searchHint:l,noMatchText:u,listPosition:f,showDistance:L,editing:z}){const o=Y(),[s,m]=d(D),[N,M]=d(""),[E,w]=d(!1),[S,g]=d(null),[B,I]=d(null),b=V(null);K(()=>{if(!o)return;let e=!0;return o({}).then(r=>e&&m(r)).catch(()=>e&&m(D)),()=>{e=!1}},[o]);const i=v(()=>O(s.dealers),[s.dealers]),R=v(()=>new Set(i.map(e=>e.key)),[i]),F=v(()=>s.near==="found"?i.slice(0,H).map(e=>e.key):null,[s.near,i]),P=e=>{g(e),R.has(e)&&I(r=>({key:e,n:(r?.n??0)+1}))},T=e=>{g(e),b.current?.querySelector(`[data-dealer="${CSS.escape(e)}"]`)?.scrollIntoView({block:"nearest"})};if(!o)return z?t("p",{"data-dealers-unavailable":!0,className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:J("Dealers are not available on this website")}):null;const A=e=>{e.preventDefault();const r=N.trim();w(!0),g(null),o(r?{near:r}:{}).then(m).catch(()=>m($=>({...$,near:"try_again"}))).finally(()=>w(!1))},x=Q(f),k=x!=="below",y=s.near==="not_found"||s.near==="try_again",_=h?a("form",{role:"search",onSubmit:A,className:"mb-4 flex gap-2",children:[t("input",{type:"search",value:N,onChange:e=>M(e.target.value),placeholder:l,"aria-label":l,"aria-invalid":y||void 0,className:["min-w-0 flex-1 border bg-bg px-3 py-2 text-[length:var(--size-body,14px)] text-fg outline-none",y?"border-accent":"border-line focus:border-fg"].join(" ")}),t("button",{type:"submit","aria-label":l,disabled:E,className:"grid w-10 shrink-0 place-items-center bg-fg text-bg disabled:opacity-50",children:a("svg",{"aria-hidden":!0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("circle",{cx:"11",cy:"11",r:"7"}),t("path",{d:"M20 20l-3.5-3.5"})]})})]}):null,j=y&&u?t("p",{role:"status",className:"mb-3 text-[length:var(--size-body,14px)] text-fg-dim",children:u}):null,c=s.dealers.map(e=>t(te,{dealer:e,active:S===e.id,onSelect:()=>P(e.id),distance:L?W(e.distanceKm):"",tile:!k},e.id)),C=t(U,{pins:i,mapTheme:p,selectedKey:S,focus:B,onSelect:T,ariaLabel:n,className:Z,groupCrowded:!0,fitTo:F});return k?t(X,{position:x,attrs:{"data-dealer-finder":x},head:a(q,{children:[_,j]}),listRef:b,list:c,map:C}):a("div",{"data-dealer-finder":"below",children:[_,j,C,c.length>0&&t("div",{ref:b,className:["mt-12 grid gap-[2px] bg-bg",G(c.length),c.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":"max-[700px]:grid-cols-1"].join(" "),children:c})]})}function te({dealer:n,active:p,onSelect:h,distance:l,tile:u}){const f=[n.city,[n.state,n.postcode].filter(Boolean).join(" ")].filter(Boolean).join(" ");return a("div",{"data-dealer":n.id,className:["flex gap-3 bg-bg text-left outline outline-1 -outline-offset-1",u?"px-6 py-5":"border-b border-line px-1 py-4",p?"outline-accent":"outline-transparent hover:outline-line"].join(" "),children:[a("button",{type:"button",onClick:h,"aria-pressed":p,className:"min-w-0 flex-1 text-left",children:[t("span",{className:"block font-display text-[length:var(--size-body,16px)] font-medium leading-[1.25] text-fg",children:n.name}),n.address&&t("span",{className:"mt-1 block text-[length:var(--size-body,14px)] text-fg-dim",children:n.address}),f&&t("span",{className:"block text-[length:var(--size-body,14px)] text-fg-dim",children:f})]}),a("span",{className:"flex shrink-0 flex-col items-end gap-1 text-[length:var(--size-body,14px)]",children:[l&&t("span",{className:"text-fg-dim",children:l}),n.phone&&t("a",{href:`tel:${n.phone.replace(/[^\d+]/g,"")}`,className:"text-fg underline underline-offset-2",children:n.phone}),n.website&&t("a",{href:n.website,target:"_blank",rel:"noopener noreferrer",className:"text-fg underline underline-offset-2",children:n.website.replace(/^https?:\/\//,"").replace(/\/$/,"")})]})]})}export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as q,jsx as e,jsxs as ae}from"react/jsx-runtime";import{useContext as Dt,useId as Ht}from"react";import Mt from"./BoxTabs.js";import{AccordionRowStyleContext as Ee,BoxTabPaneContext as Fe,useAccordionRowStyle as Vt,useBoxPaneKind as Gt,useFirstCopyOpens as Wt,useIsTabPane as jt}from"./BoxTabPaneContext.js";import Xt,{ACCORDION_COUNTER_RESET as Ut}from"./BoxAccordionRow.js";import{ACCORDION_MARK_SHEET as Kt}from"./AccordionMark.js";import{accordionRowStyleOf as Jt}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as zt,boxPhoneOrder as Yt}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as es,InBoxContext as os,useCellOfStretchedRow as qt,useFillsCell as Qt}from"./InBoxContext.js";import Zt,{InsideSiteColumn as ss,useInsideSiteGutter as er,useSectionRoot as or}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as sr}from"./BoxSurfaceContext.js";import tr from"./PictureWash.js";import{BoxCellContext as ts,NoCellBound as rr}from"./BoxCellContext.js";import{boxCellFractions as nr}from"../lib/content/box-cell-bound.js";import{boundOf as lr}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as ir}from"./PhoneMenuTools.js";import{useCardRow as cr}from"./CardRowContext.js";import{cardLineBetween as Te,framesItsCards as ar}from"../../format/lib/content/card-place.js";import{rowFieldText as dr}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as ur,MirrorContext as mr,RowHandContext as rs,boxPlace as fr,useHandedMirrorAbove as Cr,useHandedRows as br,useMirroredCopy as hr,useUnderCardBox as Sr}from"./MirrorContext.js";import{boxChildrenHand as wr,isMirroredCopy as xr,mirrorCardsActs as ns,mirrorCardsOf as pr,mirroredBoxClass as Pr,MIRROR_ROW_CLASS as $r,ownsCard as Rr}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as De,frameGutterOf as _r}from"./BlockFrame.js";import{BOX_SIDE_SPACE_SITE as yr,boxSideSpaceOf as Ar}from"../../format/lib/content/box-side-space.js";import{containerGapProps as ls}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as Or,boxAlignViewClasses as vr,boxBlockSpacingClass as Lr,boxBlockSpacingViewClasses as kr,boxJustifyViewClasses as Nr,boxWrapTabletClass as gr,boxFitContentClass as Br,boxAccordionColumnsClass as is,boxRowColumnsClass as Ir,boxRowTabletColumnsClass as Er,boxRowTabletShareClass as Fr,boxPhoneCellsShareLine as Tr,boxPhoneRowClasses as Q,boxPhoneRowFits as Dr,boxShareClasses as G,boxShareVars as Hr,boxWrapClass as Mr,BOX_GAP_ONLY_CLASS as Vr}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Gr,boxSeparatorSeamClass as Wr,boxSeparatorStyle as jr,isStripBox as Xr}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Ur,DEFAULT_LOOP_DIRECTION as Kr,DEFAULT_LOOP_SECONDS as Jr,isVerticalLoop as zr}from"../../format/lib/animation/index.js";import{LoopTrack as Yr}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as y,BOX_OWNS_SIDES_CLASS as qr,boxDarkenStyle as Qr,boxPaintOf as Zr,boxFillViews as en,boxPlacementClasses as on,boxCardProps as sn,boxIsCard as cs,boxRowPicture as tn,boxSwatchFill as rn,boxWashViews as nn,CARD_SHADOW_CLASS as ln,isBackgroundBox as as}from"../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as S}from"../../format/lib/content/box-card-rule.js";import{boxShadowAttrs as cn,boxShadowOnAnyView as an,boxShadowViewAttrs as dn}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as un,drawsSiteGutter as mn}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as fn,boxShapeClasses as Cn}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as bn}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as hn,BOX_LINK_ATTR as ds,BOX_LINK_CLASS as us,BOX_LINKED_CLASS as Sn,boxJumpBlocksClass as wn,boxJumpCss as xn,boxJumpSlug as pn,boxLinkOf as Pn}from"../../format/lib/content/box-link.js";import{SiteLink as $n}from"../lib/site-runtime.js";import{sectionBorderStyle as ms}from"../../format/lib/content/borders.js";import{finiteNumber as A}from"../../format/lib/finite-number.js";import{padDefaultIn as O,sectionPadAttrs as Rn}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as de}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as _n}from"../../format/lib/content/ink.js";import{sizedBackground as He}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as yn,resolveImageTreatment as An}from"../../format/lib/content/image-treatment.js";import{BOX_HIGHLIGHT_CLASS as On}from"../../format/lib/animation/hover.js";import{BoxRail as vn,BoxRailStop as Ln,RAIL_STOPS_CLASS as kn,useTimelineRail as Nn}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as gn,sharedColumnsClasses as Bn,sharedColumnsCss as In,sharedRowsClasses as En,sharedRowsCss as Fn}from"../lib/content/box-shared-columns.js";import Tn from"./PhotoHoverSheet.js";import{stackGutterClass as Dn,stackLineCss as Hn,stackOuterClass as Mn,stackRowClass as Vn,storedStackLine as Gn}from"../lib/content/box-stack-line.js";const Me={"--sf-site-gutter":"0px"},Wn={overflowX:"clip",overflowY:"visible"},jn={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},fs={desktop:!1,phone:!1},Cs="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-wide:bg-[image:var(--sf-box-bg-p)]",Ve=u=>u==null||u==="",Ge=u=>!Ve(u)&&Number(u)===0;function Xn({children:u}){return e(q,{children:u(Ht())})}function Un({direction:u,label:bs,tabShape:hs,gap:We,gapPhone:Ss,gapTablet:ue,justify:W,align:v,wrap:Z,share:ws,sharePhone:j,shareTablet:I,wrapPhone:xs,orderPhone:ps,phoneRow:w,columns:m,columnsTablet:E,separator:f,stackBelow:je,blockSpacing:Xe,bgImage:Ps,bgImagePhone:$s,rowImage:Rs,pictureHover:_s,darken:Ue,darkenStyle:Ke,darkenTablet:ys,darkenPhone:As,darkenStyleTablet:Os,darkenStylePhone:vs,placement:Ls,padV2:Je=!1,border:ks,borderTablet:Ns,borderPhone:gs,pad:r={},contained:me=!0,fillHeight:L=!1,shadow:fe,shadowTablet:ze,shadowPhone:Ye,justifyTablet:qe,justifyPhone:Bs,alignTablet:Is,alignPhone:Es,wrapTablet:Qe,blockSpacingTablet:Fs,blockSpacingPhone:Ts,loop:b,scrollDirection:Ce=Kr,loopSeconds:Ds=Jr,loopDelay:Hs=Ur,editing:F=!1,fillColor:Ze,fillColorTablet:Ms,fillColorPhone:Vs,swatch:Gs,line:x,upcoming:Ws,link:js,rowLink:eo,highlight:Xs,boxShape:oo,boxShapePhone:Us,boxShapeTablet:Ks,angle:Js,jumpHighlight:zs,anchor:Ys,sharedSides:qs=fs,sharedRows:Qs=!1,boxId:T,slotCount:Zs,mirrorCards:so,content:i,rowTitle:be,startsOpen:et,rowStyle:ot,sideSpace:st}){const t=cr(),k=sn({[S]:Rs},t!==null)[S],to=cs({[S]:k}),c=to?fs:qs,tt=to?!1:Qs,ro=tn({[S]:k},t?.row),p=ro??Ps,no=ro===null?$s:void 0,lo=Dt(ts),rt=Cr(),io=Sr()&&!(rt&&t!==null),P=br(),$=Rr({inCopy:t!==null,nestedCopy:t?.nested===!0,underBox:io}),co=Te(ks,t,$),ao=Te(Ns,t,$),uo=Te(gs,t,$),mo=t===null&&!io&&P?.ids&&T?P.ids.indexOf(T):-1,ee=mo>=0&&P&&T?fr(P,T,mo):-1,h=ee>=0?P?.hand??null:$&&P?.copies===!0?P.hand:null,o=h?.row?"row":u,d=h?.row?h.row.share:ws,nt=h?.row?h.row.phoneReverse?[...i.blockIds??[]].reverse():void 0:ps,oe=tt&&!h?.row,D=F?"":Pn(eo&&t?dr(t.row,eo):js),R=L?"":Cn(oo,Us,Ks),lt=!L&&fn(oo)!=="",N=pn(zs,Ys),fo=rn({swatch:Gs},t?.row),se=fo??Zr(Ze),H=fo?{className:"",style:{}}:en(Ze,Ms,Vs),Co=se||H.className?{...se?{backgroundColor:se}:{},...H.style}:void 0,bo=Nn(),te=x===!0&&o!=="tabs"&&o!=="accordion",n=cs({bgImage:p,[S]:k}),ho=bn(Js),So=n?void 0:Co,he=n?null:Xs??null,it=ho||he?{...So,...ho,...he}:So,re=ir(),ct=or(),at=jt(),wo=Gt(),dt=Vt(),ut=Wt(),l=o==="accordion",xo=Jt(ot),X=l&&xo==="numbered",Se=Qt(),mt=qt(),M=Xr(o,f),a=b==="scroll"&&o!=="tabs"&&!l,ft=hr(),ne=$||ee>=0&&h!==null,po=h?h.mirror:so,Ct=ee>=0?ee:t?.index,we=$&&ar(t?.ownerType),Po=ns({direction:o,separator:f,loop:b,line:x,bgImage:p,[S]:k,columns:m,columnsTablet:E,share:d,wrap:Z},ne,c.desktop)&&xr(po,Ct),bt=ns({direction:o,separator:f,loop:b,line:x,bgImage:p,[S]:k,columns:m,columnsTablet:E,share:d,wrap:Z},ne,c.desktop)&&pr(po)!==null,V=Ir({direction:o,separator:f,loop:b,line:x,columns:m}),g=Er({direction:o,separator:f,loop:b,line:x,columnsTablet:E}),U=Fr({direction:o,separator:f,loop:b,line:x,columns:m,columnsTablet:E,share:d,shareTablet:I}),le=Ar(st)===yr,xe=_r(le),C=o==="row"&&!n&&!M&&!a&&!te&&g===""&&U===""?Gn(je):void 0,ht=er(),ie=Bn(c,i.blockCount??0,C),St=(ie&&(!t||t.index===0)?In(c,i.blockCount??0,C):"")+(oe&&(!t||t.index===0)?Fn(oe,i.blockCount??0):""),$o=En(oe,i.blockCount??0),Ro=g!==""?Number(E)>=2:U===""||G(I)!=="",_o=g!==""||U!=="",yo=o==="row"&&!M&&!a&&x!==!0,pe=yo&&!c.phone&&!c.desktop?zt(Yt(nt,i.blockIds??[]),{editing:F}):void 0,Ao=pe!==void 0&&!F,wt=V!==""?Number(m)>=2:G(d)!=="",Oo=!n&&!l&&!bt&&!c.desktop&&!c.phone,ce=Oo&&!a?Nr(W,qe,Bs):"",Pe=n||ne?"":Pr(ft,o,a?void 0:W,v,ce?qe:void 0),xt=/view-wide:max-view-desktop:justify-/.test(Pe)?ce.split(" ").filter(s=>!s.startsWith("view-wide:max-view-desktop:justify-")).join(" "):ce,pt=Oo&&o==="row"?vr(v,Is,Es):"",Pt=!a&&!l&&V===""&&g===""&&!c.desktop?gr(Z,Qe):"",vo=[l?"":G(d),o==="row"?Br(d):"",V,g,U,Lr(l?"gap":Xe),Gr(o,f),l&&!X?"border-t border-line":"",xt,pt,Pt,l?"":kr(Xe,Fs,Ts),l?is(m,w,X):"",X?Ut:""].filter(Boolean).join(" "),$t=vo?` ${vo}`:"",Lo=["flex",o==="row"?M||a?"flex-row":`flex-row ${Q(w,j,xs,Qe)}`:"flex-col",Mr(a||l?!1:Z),n?on(Ls??"center",o):Or(a||l?void 0:W,l?void 0:v)+(Pe?` ${Pe}`:"")].join(" ")+$t,K=L||n||R||Se?` ${de}`:"",$e=lt?` ${R}`:R?`${K} ${R}`:K,ko=mt&&o==="column"&&!n&&!a&&G(d)===""&&(typeof W=="string"&&W!=="start"||ce!==""),No=K||(ko?` ${de}`:""),Re=D?` ${Sn}`:"",_e=n||re||Je?"":" py-6",Rt=C===void 0?"":` ${Vn(C)}`,go=C===void 0||le?"":` ${Dn(C)}`,ye=C===void 0?"":` ${Mn(C)}`,_t=`${De}${_e} ${xe}${$e}${Re}${go}${ye}`,yt=re?`${$e}${Re}${ye}`.trim():`w-full${_e}${$e}${Re}${ye}`,J=X&&is(m,w)===""?ls("Flex",0,"block"):ls("Flex",We,o==="row"?"inline":"block",Ss,M||a?void 0:ue),Bo=Hr(d,I,o==="row"?i.blockCount??0:0),Io=M?{...J.style,...jr(o,f)}:J.style,At=Bo?{...Io,...Bo}:Io,Ae=(s="")=>e(i,{className:`${Lo}${Po?` ${$r}`:""}${J.className}${No}${Rt}${s?` ${s}`:""}${te?` ${kn}`:""}${N?` ${wn(N)}`:""}${ie}${$o}`,style:At,minEmptyHeight:120,...pe?{cell:pe}:null}),Eo=zr(Ce)?"":Wr(o,f),Fo=a?e(Yr,{direction:Ce,seconds:Ds,delay:Hs,editing:F,copy:s=>Ae(s&&Eo?`${s} ${Eo}`:s)}):X?ae(q,{children:[e("style",{children:Kt}),Ae()]}):Ae(),Oe=o==="tabs"?e(Mt,{className:`${Lo}${J.className}${Se&&!L&&!n&&!R?"":K}`,style:J.style,shape:hs,children:Fo}):Fo,ve=l?e(Fe.Provider,{value:"accordion",children:e(Ee.Provider,{value:xo,children:Oe})}):wo?e(Fe.Provider,{value:!1,children:e(Ee.Provider,{value:"plain",children:Oe})}):Oe,To=o==="row"&&!n&&(v===void 0||v==="stretch"),Ot={stretchedRow:To,fillingColumn:o==="column"&&(Se||ko),columnsRow:V!==""||g!==""||ie!==""||$o!==""||o==="row"&&(Array.isArray(d)||Array.isArray(I))||Ao,...Ao?{phoneCells:!0}:null,...To&&yo&&(i.blockCount??0)>=2&&wt?{picturesFillRow:!0}:null,..._o&&!Ro?{fillFrom:"desktop"}:null,...Tr(w,j)&&(!_o||Ro)?{phoneRowFills:!0}:null,...T?{id:T}:null},Do=t===null?wr({direction:o,loop:b,bgImage:p,[S]:k,columns:m,mirrorCards:so},!1):null,Ho=Do?e(rs.Provider,{value:{hand:Do,ids:i.blockIds??[],boxes:[]},children:ve}):P?e(rs.Provider,{value:null,children:ve}):ve,Mo=e(os.Provider,{value:Ot,children:e(es.Provider,{value:!1,children:ne?e(mr.Provider,{value:Po,children:e(ur.Provider,{value:!$,children:Ho})}):Ho})}),vt=be?.blockCount??0,Vo=wo==="accordion"&&!!be&&(F||vt>0)?e(Xt,{startsOpen:et===!0||ut&&$&&t?.index===0,editing:F,numbered:dt==="numbered",title:e(os.Provider,{value:jn,children:e(es.Provider,{value:!1,children:e(Fe.Provider,{value:!1,children:e(Ee.Provider,{value:"plain",children:e(be,{className:`min-w-0 flex-1 ${Vr}`,minEmptyHeight:24})})})})}),children:Mo}):Mo,Le=te?e(vn,{row:o==="row",stops:i.blockCount??0,children:Vo}):Vo,Lt=bs?.trim()||(at?"":void 0),kt={values:r,frame:_e?24:0},Nt=s=>bo?e(Ln,{on:bo,future:Ws===!0,children:s}):s,gt=s=>D.startsWith("/")?e($n,{href:D,className:us,"aria-labelledby":s,[ds]:""}):e("a",{href:D,className:us,"aria-labelledby":s,[ds]:""}),Go=(N?xn(N):"")+St+(C===void 0||t&&t.index!==0?"":Hn(C,{gutter:!le})),Wo=Go?e("style",{dangerouslySetInnerHTML:{__html:Go}}):null,z=un({loop:b,direction:o,scrollDirection:Ce,bgImage:p,[S]:k}),Bt=c.desktop&&ie!==""&&!se&&!H.className&&!ms(co,uo,ao)&&!an(fe,ze,Ye)&&!D&&!R&&!L&&!N&&!mn(me&&!z,ht)&&Ge(We)&&(Ve(ue)||Ge(ue))&&Je&&Object.values(r).every(s=>Ve(s)||Ge(s)),It=s=>({...Bt?{[gn]:""}:null,...n?null:{...cn(fe),...dn(fe,ze,Ye)},...N?{[hn]:N}:null,...s?{id:s}:null}),jo=V!==""?Number(m):0,Et=Q(w,j)===Q(void 0),Ft=(o==="column"||o==="row"&&!M&&!a&&(jo===1&&Et||jo===0&&i.blockCount===1))&&!n&&!te&&!re,Xo=n&&ct&&!re,Uo=(s,_)=>Nt(e(Zt,{contained:me&&!z,style:z?Me:void 0,framedClass:_t,fillClass:yt,columnClass:`${De} ${xe}${No}${go}`,tabLabel:Lt,pad:n?void 0:kt,border:ms(co,uo,ao),outerAttrs:It(_),box:!0,edge:Ft,outerStyle:it,outerClass:n?void 0:[H.className,he?On:""].filter(Boolean).join(" ")||void 0,bleed:Xo,siteSide:le,children:Wo||_?ae(q,{children:[Wo,_?gt(_):null,z?e(ss,{children:s}):s]}):z?e(ss,{children:s}):s})),ke=s=>D?e(Xn,{children:_=>Uo(s,_)}):Uo(s),Ko=s=>lo.bound?e(rr,{children:s}):s;if(!n){const s=v===void 0||v==="stretch",_=(G(d)!==""||V!==""||g!=="")&&!Dr(w,j)&&!(U!==""&&G(I)==="")&&(s||Q(w)!==Q(void 0));if(!(o==="row"?_:o==="column"&&s))return ke(Ko(Le));const Zo=nr({direction:o,separator:f,loop:b,line:x,share:d,shareTablet:I,sharePhone:j,phoneRow:w,columns:m,columnsTablet:E,stackBelow:je,shared:c.desktop||c.phone||oe,count:Zs}),Tt={hasWidth:!0,...Zo?{bound:lr(Zo,lo.bound)}:null};return ke(e(ts.Provider,{value:Tt,children:Le}))}const Ne=as(p),Y=Ne?Qr(Ue,Ke):null,ge=Ne?nn({darken:Ue,darkenStyle:Ke,darkenTablet:ys,darkenStyleTablet:Os,darkenPhone:As,darkenStylePhone:vs}):{className:"",style:{}},Jo=[we?"rounded-[inherit]":"",ge.className].filter(Boolean).join(" "),Be=as(no),zo=Ne?Be?{"--sf-box-bg":He(p??""),"--sf-box-bg-p":He(no??"")}:{backgroundImage:He(p??""),backgroundSize:"cover",backgroundPosition:"center"}:{},Yo=An(void 0,void 0,_s),B=Yo.className?Yo:null,Ie=Rn({...r,top:A(r.top)??O(y.desktop,r.unit,"desktop"),bottom:A(r.bottom)??O(y.desktop,r.unit,"desktop"),topPhone:A(r.topPhone)??O(y.phone,r.unitPhone,"mobile"),bottomPhone:A(r.bottomPhone)??O(y.phone,r.unitPhone,"mobile"),left:A(r.left)??O(y.side,r.unit,"desktop"),right:A(r.right)??O(y.side,r.unit,"desktop"),leftPhone:A(r.leftPhone)??O(y.sidePhone,r.unitPhone,"mobile"),rightPhone:A(r.rightPhone)??O(y.sidePhone,r.unitPhone,"mobile")}),qo=e("div",{className:`relative z-[1] ${qr} ${Ie?.className??""}${L||R?` ${de}`:""}`.trimEnd(),style:Y?{...Ie?.style,...Me,..._n}:{...Ie?.style,...Me},children:Ko(Le)}),Qo=Xo&&me?e("div",{className:`${De} ${xe}${L||R?` ${de}`:""}`,children:qo}):qo;return ke(e(q,{children:ae("div",{className:`relative isolate overflow-hidden ${ln}${K}${Be&&!B?` ${Cs}`:""}${H.className?` ${H.className}`:""}`,style:{...we?Wn:{},...Co,...B?{}:zo},...B?{[yn]:""}:{},children:[B&&ae(q,{children:[e(Tn,{sheet:B.sheet}),e("div",{"aria-hidden":!0,className:`absolute inset-0${we?" rounded-[inherit]":""}${Be?` ${Cs}`:""} ${B.className}`,style:{...zo,...B.style??{}}})]}),e(tr,{wash:Y&&ge.className?{...Y,...ge.style}:Y,...Jo?{className:Jo}:{}}),Y?e(sr,{children:Qo}):Qo]})}))}export{Un as default};
|
|
1
|
+
import{Fragment as q,jsx as e,jsxs as de}from"react/jsx-runtime";import{useContext as Ht,useId as Vt}from"react";import Gt from"./BoxTabs.js";import{AccordionRowStyleContext as Fe,BoxTabPaneContext as Te,useAccordionRowStyle as Mt,useBoxPaneKind as Wt,useFirstCopyOpens as Xt,useIsTabPane as jt}from"./BoxTabPaneContext.js";import Kt,{ACCORDION_COUNTER_RESET as Ut}from"./BoxAccordionRow.js";import{ACCORDION_MARK_SHEET as Jt}from"./AccordionMark.js";import{accordionRowStyleOf as zt}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as Yt,boxPhoneOrder as qt}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as os,InBoxContext as ss,useCellOfStretchedRow as Qt,useFillsCell as Zt}from"./InBoxContext.js";import er,{InsideSiteColumn as ts,useInsideSiteGutter as or,useSectionRoot as sr}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as tr}from"./BoxSurfaceContext.js";import rr from"./PictureWash.js";import{BoxCellContext as rs,NoCellBound as nr}from"./BoxCellContext.js";import{boxCellFractions as lr}from"../lib/content/box-cell-bound.js";import{boundOf as ir}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as cr}from"./PhoneMenuTools.js";import{useCardRow as ar}from"./CardRowContext.js";import{cardLineBetween as De,framesItsCards as dr}from"../../format/lib/content/card-place.js";import{rowFieldText as ur}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as mr,MirrorContext as fr,RowHandContext as ns,boxPlace as Cr,useHandedMirrorAbove as br,useHandedRows as hr,useMirroredCopy as Sr,useUnderCardBox as wr}from"./MirrorContext.js";import{boxChildrenHand as xr,isMirroredCopy as pr,mirrorCardsActs as ls,mirrorCardsOf as Pr,mirroredBoxClass as _r,MIRROR_ROW_CLASS as $r,ownsCard as Rr}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as He,frameGutterOf as Or}from"./BlockFrame.js";import{BOX_SIDE_SPACE_SITE as yr,boxSideSpaceOf as Ar}from"../../format/lib/content/box-side-space.js";import{containerGapProps as is}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as vr,boxAlignViewClasses as Lr,boxBlockSpacingClass as kr,boxBlockSpacingViewClasses as Nr,boxJustifyViewClasses as Ir,boxWrapTabletClass as gr,boxFitContentClass as Br,boxAccordionColumnsClass as cs,boxRowColumnsClass as Er,boxRowTabletColumnsClass as Fr,boxRowTabletShareClass as Tr,boxPhoneCellsShareLine as Dr,boxPhoneRowClasses as Q,boxPhoneRowFits as Hr,boxShareClasses as M,boxShareVars as Vr,boxWrapClass as Gr,BOX_GAP_ONLY_CLASS as Mr}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Wr,boxSeparatorSeamClass as Xr,boxSeparatorStyle as jr,isStripBox as Kr}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Ur,DEFAULT_LOOP_DIRECTION as Jr,DEFAULT_LOOP_SECONDS as zr,isVerticalLoop as Yr}from"../../format/lib/animation/index.js";import{LoopTrack as qr}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as O,BOX_OWNS_SIDES_CLASS as Qr,boxDarkenStyle as Zr,boxPaintOf as en,boxFillViews as on,boxPlacementClasses as sn,boxCardProps as tn,boxIsCard as as,boxRowPicture as rn,boxSwatchFill as nn,boxWashViews as ln,CARD_SHADOW_CLASS as cn,isBackgroundBox as ds}from"../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as S}from"../../format/lib/content/box-card-rule.js";import{boxShadowAttrs as an,boxShadowOnAnyView as dn,boxShadowViewAttrs as un}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as mn,drawsSiteGutter as fn}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Cn,boxShapeClasses as bn}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as hn}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as Sn,BOX_LINK_ATTR as us,BOX_LINK_CLASS as ms,BOX_LINKED_CLASS as wn,boxJumpBlocksClass as xn,boxJumpCss as pn,boxJumpSlug as Pn,boxLinkOf as _n}from"../../format/lib/content/box-link.js";import{SiteLink as $n}from"../lib/site-runtime.js";import{sectionBorderStyle as fs}from"../../format/lib/content/borders.js";import{finiteNumber as y}from"../../format/lib/finite-number.js";import{padDefaultIn as A,sectionPadAttrs as Rn}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as ue}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as On,rowFillInkStyle as yn}from"../../format/lib/content/ink.js";import{sizedBackground as Ve}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as An,resolveImageTreatment as vn}from"../../format/lib/content/image-treatment.js";import{BOX_HIGHLIGHT_CLASS as Ln,BOX_HIGHLIGHT_OVER_ROW_INK_CLASS as kn}from"../../format/lib/animation/hover.js";import{BoxRail as Nn,BoxRailStop as In,RAIL_STOPS_CLASS as gn,useTimelineRail as Bn}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as En,sharedColumnsClasses as Fn,sharedColumnsCss as Tn,sharedRowsClasses as Dn,sharedRowsCss as Hn}from"../lib/content/box-shared-columns.js";import Vn from"./PhotoHoverSheet.js";import{stackGutterClass as Gn,stackLineCss as Mn,stackOuterClass as Wn,stackRowClass as Xn,storedStackLine as jn}from"../lib/content/box-stack-line.js";const Ge={"--sf-site-gutter":"0px"},Kn={overflowX:"clip",overflowY:"visible"},Un={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},Cs={desktop:!1,phone:!1},bs="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-wide:bg-[image:var(--sf-box-bg-p)]",Me=u=>u==null||u==="",We=u=>!Me(u)&&Number(u)===0;function Jn({children:u}){return e(q,{children:u(Vt())})}function zn({direction:u,label:hs,tabShape:Ss,gap:Xe,gapPhone:ws,gapTablet:me,justify:W,align:v,wrap:Z,share:xs,sharePhone:X,shareTablet:B,wrapPhone:ps,orderPhone:Ps,phoneRow:w,columns:m,columnsTablet:E,separator:f,stackBelow:je,blockSpacing:Ke,bgImage:_s,bgImagePhone:$s,rowImage:Rs,pictureHover:Os,darken:Ue,darkenStyle:Je,darkenTablet:ys,darkenPhone:As,darkenStyleTablet:vs,darkenStylePhone:Ls,placement:ks,padV2:ze=!1,border:Ns,borderTablet:Is,borderPhone:gs,pad:r={},contained:fe=!0,fillHeight:L=!1,shadow:Ce,shadowTablet:Ye,shadowPhone:qe,justifyTablet:Qe,justifyPhone:Bs,alignTablet:Es,alignPhone:Fs,wrapTablet:Ze,blockSpacingTablet:Ts,blockSpacingPhone:Ds,loop:b,scrollDirection:be=Jr,loopSeconds:Hs=zr,loopDelay:Vs=Ur,editing:F=!1,fillColor:eo,fillColorTablet:Gs,fillColorPhone:Ms,swatch:Ws,line:x,upcoming:Xs,link:js,rowLink:oo,highlight:Ks,boxShape:so,boxShapePhone:Us,boxShapeTablet:Js,angle:zs,jumpHighlight:Ys,anchor:qs,sharedSides:Qs=Cs,sharedRows:Zs=!1,boxId:T,slotCount:et,mirrorCards:to,content:i,rowTitle:he,startsOpen:ot,rowStyle:st,sideSpace:tt}){const t=ar(),k=tn({[S]:Rs},t!==null)[S],ro=as({[S]:k}),c=ro?Cs:Qs,rt=ro?!1:Zs,no=rn({[S]:k},t?.row),p=no??_s,lo=no===null?$s:void 0,io=Ht(rs),nt=br(),co=wr()&&!(nt&&t!==null),P=hr(),_=Rr({inCopy:t!==null,nestedCopy:t?.nested===!0,underBox:co}),ao=De(Ns,t,_),uo=De(Is,t,_),mo=De(gs,t,_),fo=t===null&&!co&&P?.ids&&T?P.ids.indexOf(T):-1,ee=fo>=0&&P&&T?Cr(P,T,fo):-1,h=ee>=0?P?.hand??null:_&&P?.copies===!0?P.hand:null,o=h?.row?"row":u,d=h?.row?h.row.share:xs,lt=h?.row?h.row.phoneReverse?[...i.blockIds??[]].reverse():void 0:Ps,oe=rt&&!h?.row,D=F?"":_n(oo&&t?ur(t.row,oo):js),$=L?"":bn(so,Us,Js),it=!L&&Cn(so)!=="",N=Pn(Ys,qs),Se=nn({swatch:Ws},t?.row),se=Se??en(eo),H=Se?{className:"",style:{}}:on(eo,Gs,Ms),Co=yn(Se),bo=se||H.className?{...se?{backgroundColor:se}:{},...H.style,...Co}:void 0,ho=Bn(),te=x===!0&&o!=="tabs"&&o!=="accordion",n=as({bgImage:p,[S]:k}),So=hn(zs),wo=n?void 0:bo,re=n?null:Ks??null,ct=So||re?{...wo,...So,...re}:wo,ne=cr(),at=sr(),dt=jt(),xo=Wt(),ut=Mt(),mt=Xt(),l=o==="accordion",po=zt(st),j=l&&po==="numbered",we=Zt(),ft=Qt(),V=Kr(o,f),a=b==="scroll"&&o!=="tabs"&&!l,Ct=Sr(),le=_||ee>=0&&h!==null,Po=h?h.mirror:to,bt=ee>=0?ee:t?.index,xe=_&&dr(t?.ownerType),_o=ls({direction:o,separator:f,loop:b,line:x,bgImage:p,[S]:k,columns:m,columnsTablet:E,share:d,wrap:Z},le,c.desktop)&&pr(Po,bt),ht=ls({direction:o,separator:f,loop:b,line:x,bgImage:p,[S]:k,columns:m,columnsTablet:E,share:d,wrap:Z},le,c.desktop)&&Pr(Po)!==null,G=Er({direction:o,separator:f,loop:b,line:x,columns:m}),I=Fr({direction:o,separator:f,loop:b,line:x,columnsTablet:E}),K=Tr({direction:o,separator:f,loop:b,line:x,columns:m,columnsTablet:E,share:d,shareTablet:B}),ie=Ar(tt)===yr,pe=Or(ie),C=o==="row"&&!n&&!V&&!a&&!te&&I===""&&K===""?jn(je):void 0,St=or(),ce=Fn(c,i.blockCount??0,C),wt=(ce&&(!t||t.index===0)?Tn(c,i.blockCount??0,C):"")+(oe&&(!t||t.index===0)?Hn(oe,i.blockCount??0):""),$o=Dn(oe,i.blockCount??0),Ro=I!==""?Number(E)>=2:K===""||M(B)!=="",Oo=I!==""||K!=="",yo=o==="row"&&!V&&!a&&x!==!0,Pe=yo&&!c.phone&&!c.desktop?Yt(qt(lt,i.blockIds??[]),{editing:F}):void 0,Ao=Pe!==void 0&&!F,xt=G!==""?Number(m)>=2:M(d)!=="",vo=!n&&!l&&!ht&&!c.desktop&&!c.phone,ae=vo&&!a?Ir(W,Qe,Bs):"",_e=n||le?"":_r(Ct,o,a?void 0:W,v,ae?Qe:void 0),pt=/view-wide:max-view-desktop:justify-/.test(_e)?ae.split(" ").filter(s=>!s.startsWith("view-wide:max-view-desktop:justify-")).join(" "):ae,Pt=vo&&o==="row"?Lr(v,Es,Fs):"",_t=!a&&!l&&G===""&&I===""&&!c.desktop?gr(Z,Ze):"",Lo=[l?"":M(d),o==="row"?Br(d):"",G,I,K,kr(l?"gap":Ke),Wr(o,f),l&&!j?"border-t border-line":"",pt,Pt,_t,l?"":Nr(Ke,Ts,Ds),l?cs(m,w,j):"",j?Ut:""].filter(Boolean).join(" "),$t=Lo?` ${Lo}`:"",ko=["flex",o==="row"?V||a?"flex-row":`flex-row ${Q(w,X,ps,Ze)}`:"flex-col",Gr(a||l?!1:Z),n?sn(ks??"center",o):vr(a||l?void 0:W,l?void 0:v)+(_e?` ${_e}`:"")].join(" ")+$t,U=L||n||$||we?` ${ue}`:"",$e=it?` ${$}`:$?`${U} ${$}`:U,No=ft&&o==="column"&&!n&&!a&&M(d)===""&&(typeof W=="string"&&W!=="start"||ae!==""),Io=U||(No?` ${ue}`:""),Re=D?` ${wn}`:"",Oe=n||ne||ze?"":" py-6",Rt=C===void 0?"":` ${Xn(C)}`,go=C===void 0||ie?"":` ${Gn(C)}`,ye=C===void 0?"":` ${Wn(C)}`,Ot=`${He}${Oe} ${pe}${$e}${Re}${go}${ye}`,yt=ne?`${$e}${Re}${ye}`.trim():`w-full${Oe}${$e}${Re}${ye}`,J=j&&cs(m,w)===""?is("Flex",0,"block"):is("Flex",Xe,o==="row"?"inline":"block",ws,V||a?void 0:me),Bo=Vr(d,B,o==="row"?i.blockCount??0:0),Eo=V?{...J.style,...jr(o,f)}:J.style,At=Bo?{...Eo,...Bo}:Eo,Ae=(s="")=>e(i,{className:`${ko}${_o?` ${$r}`:""}${J.className}${Io}${Rt}${s?` ${s}`:""}${te?` ${gn}`:""}${N?` ${xn(N)}`:""}${ce}${$o}`,style:At,minEmptyHeight:120,...Pe?{cell:Pe}:null}),Fo=Yr(be)?"":Xr(o,f),To=a?e(qr,{direction:be,seconds:Hs,delay:Vs,editing:F,copy:s=>Ae(s&&Fo?`${s} ${Fo}`:s)}):j?de(q,{children:[e("style",{children:Jt}),Ae()]}):Ae(),ve=o==="tabs"?e(Gt,{className:`${ko}${J.className}${we&&!L&&!n&&!$?"":U}`,style:J.style,shape:Ss,children:To}):To,Le=l?e(Te.Provider,{value:"accordion",children:e(Fe.Provider,{value:po,children:ve})}):xo?e(Te.Provider,{value:!1,children:e(Fe.Provider,{value:"plain",children:ve})}):ve,Do=o==="row"&&!n&&(v===void 0||v==="stretch"),vt={stretchedRow:Do,fillingColumn:o==="column"&&(we||No),columnsRow:G!==""||I!==""||ce!==""||$o!==""||o==="row"&&(Array.isArray(d)||Array.isArray(B))||Ao,...Ao?{phoneCells:!0}:null,...Do&&yo&&(i.blockCount??0)>=2&&xt?{picturesFillRow:!0}:null,...Oo&&!Ro?{fillFrom:"desktop"}:null,...Dr(w,X)&&(!Oo||Ro)?{phoneRowFills:!0}:null,...T?{id:T}:null},Ho=t===null?xr({direction:o,loop:b,bgImage:p,[S]:k,columns:m,mirrorCards:to},!1):null,Vo=Ho?e(ns.Provider,{value:{hand:Ho,ids:i.blockIds??[],boxes:[]},children:Le}):P?e(ns.Provider,{value:null,children:Le}):Le,Go=e(ss.Provider,{value:vt,children:e(os.Provider,{value:!1,children:le?e(fr.Provider,{value:_o,children:e(mr.Provider,{value:!_,children:Vo})}):Vo})}),Lt=he?.blockCount??0,Mo=xo==="accordion"&&!!he&&(F||Lt>0)?e(Kt,{startsOpen:ot===!0||mt&&_&&t?.index===0,editing:F,numbered:ut==="numbered",title:e(ss.Provider,{value:Un,children:e(os.Provider,{value:!1,children:e(Te.Provider,{value:!1,children:e(Fe.Provider,{value:"plain",children:e(he,{className:`min-w-0 flex-1 ${Mr}`,minEmptyHeight:24})})})})}),children:Go}):Go,ke=te?e(Nn,{row:o==="row",stops:i.blockCount??0,children:Mo}):Mo,kt=hs?.trim()||(dt?"":void 0),Nt={values:r,frame:Oe?24:0},It=s=>ho?e(In,{on:ho,future:Xs===!0,children:s}):s,gt=s=>D.startsWith("/")?e($n,{href:D,className:ms,"aria-labelledby":s,[us]:""}):e("a",{href:D,className:ms,"aria-labelledby":s,[us]:""}),Wo=(N?pn(N):"")+wt+(C===void 0||t&&t.index!==0?"":Mn(C,{gutter:!ie})),Xo=Wo?e("style",{dangerouslySetInnerHTML:{__html:Wo}}):null,z=mn({loop:b,direction:o,scrollDirection:be,bgImage:p,[S]:k}),Bt=c.desktop&&ce!==""&&!se&&!H.className&&!fs(ao,mo,uo)&&!dn(Ce,Ye,qe)&&!D&&!$&&!L&&!N&&!fn(fe&&!z,St)&&We(Xe)&&(Me(me)||We(me))&&ze&&Object.values(r).every(s=>Me(s)||We(s)),Et=s=>({...Bt?{[En]:""}:null,...n?null:{...an(Ce),...un(Ce,Ye,qe)},...N?{[Sn]:N}:null,...s?{id:s}:null}),jo=G!==""?Number(m):0,Ft=Q(w,X)===Q(void 0),Tt=(o==="column"||o==="row"&&!V&&!a&&(jo===1&&Ft||jo===0&&i.blockCount===1))&&!n&&!te&&!ne,Ko=n&&at&&!ne,Uo=(s,R)=>It(e(er,{contained:fe&&!z,style:z?Ge:void 0,framedClass:Ot,fillClass:yt,columnClass:`${He} ${pe}${Io}${go}`,tabLabel:kt,pad:n?void 0:Nt,border:fs(ao,mo,uo),outerAttrs:Et(R),box:!0,edge:Tt,outerStyle:ct,outerClass:n?void 0:[H.className,re?Ln:"",re&&Co?kn:""].filter(Boolean).join(" ")||void 0,bleed:Ko,siteSide:ie,children:Xo||R?de(q,{children:[Xo,R?gt(R):null,z?e(ts,{children:s}):s]}):z?e(ts,{children:s}):s})),Ne=s=>D?e(Jn,{children:R=>Uo(s,R)}):Uo(s),Jo=s=>io.bound?e(nr,{children:s}):s;if(!n){const s=v===void 0||v==="stretch",R=(M(d)!==""||G!==""||I!=="")&&!Hr(w,X)&&!(K!==""&&M(B)==="")&&(s||Q(w)!==Q(void 0));if(!(o==="row"?R:o==="column"&&s))return Ne(Jo(ke));const es=lr({direction:o,separator:f,loop:b,line:x,share:d,shareTablet:B,sharePhone:X,phoneRow:w,columns:m,columnsTablet:E,stackBelow:je,shared:c.desktop||c.phone||oe,count:et}),Dt={hasWidth:!0,...es?{bound:ir(es,io.bound)}:null};return Ne(e(rs.Provider,{value:Dt,children:ke}))}const Ie=ds(p),Y=Ie?Zr(Ue,Je):null,ge=Ie?ln({darken:Ue,darkenStyle:Je,darkenTablet:ys,darkenStyleTablet:vs,darkenPhone:As,darkenStylePhone:Ls}):{className:"",style:{}},zo=[xe?"rounded-[inherit]":"",ge.className].filter(Boolean).join(" "),Be=ds(lo),Yo=Ie?Be?{"--sf-box-bg":Ve(p??""),"--sf-box-bg-p":Ve(lo??"")}:{backgroundImage:Ve(p??""),backgroundSize:"cover",backgroundPosition:"center"}:{},qo=vn(void 0,void 0,Os),g=qo.className?qo:null,Ee=Rn({...r,top:y(r.top)??A(O.desktop,r.unit,"desktop"),bottom:y(r.bottom)??A(O.desktop,r.unit,"desktop"),topPhone:y(r.topPhone)??A(O.phone,r.unitPhone,"mobile"),bottomPhone:y(r.bottomPhone)??A(O.phone,r.unitPhone,"mobile"),left:y(r.left)??A(O.side,r.unit,"desktop"),right:y(r.right)??A(O.side,r.unit,"desktop"),leftPhone:y(r.leftPhone)??A(O.sidePhone,r.unitPhone,"mobile"),rightPhone:y(r.rightPhone)??A(O.sidePhone,r.unitPhone,"mobile")}),Qo=e("div",{className:`relative z-[1] ${Qr} ${Ee?.className??""}${L||$?` ${ue}`:""}`.trimEnd(),style:Y?{...Ee?.style,...Ge,...On}:{...Ee?.style,...Ge},children:Jo(ke)}),Zo=Ko&&fe?e("div",{className:`${He} ${pe}${L||$?` ${ue}`:""}`,children:Qo}):Qo;return Ne(e(q,{children:de("div",{className:`relative isolate overflow-hidden ${cn}${U}${Be&&!g?` ${bs}`:""}${H.className?` ${H.className}`:""}`,style:{...xe?Kn:{},...bo,...g?{}:Yo},...g?{[An]:""}:{},children:[g&&de(q,{children:[e(Vn,{sheet:g.sheet}),e("div",{"aria-hidden":!0,className:`absolute inset-0${xe?" rounded-[inherit]":""}${Be?` ${bs}`:""} ${g.className}`,style:{...Yo,...g.style??{}}})]}),e(rr,{wash:Y&&ge.className?{...Y,...ge.style}:Y,...zo?{className:zo}:{}}),Y?e(tr,{children:Zo}):Zo]})}))}export{zn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as p}from"react/jsx-runtime";import{HideTaker as P}from"./ViewHideRoot.js";import{useEffect as E,useMemo as D,useState as j}from"react";import{CardTemplateRows as F}from"./CardRowContext.js";import{footprintCardRow as I,footprintPins as q,footprintSearchText as Q}from"../../format/lib/content/footprint.js";import{LIST_KEY_ATTR as W,LIST_ROW_ATTR as X,LIST_TEXT_ATTR as Y}from"../../format/lib/content/list-query.js";import{parseListPosition as Z}from"../../format/lib/content/list-position.js";import{bucketByGroup as J,groupColsClass as U}from"../../format/lib/locations-grid.js";import V from"./EditorialSectionHead.js";import{LocationGroupHeader as ee}from"./LocationGroupHeader.js";import{renderGold as te,renderHeadline as le}from"./goldPhrases.js";import re from"./PartStyledText.js";import{say as G}from"../../format/lib/editor-words.js";import{parseFootprintSource as ne}from"../lib/dealer-source.js";import ae from"./DealerFinder.js";import ie from"./ListSearchBox.js";import oe,{SIDE_MAP_CLASS as se}from"./SideListLayout.js";import ce from"./SiteMap.js";import{InsideSiteColumn as H}from"./SiteGutterFrame.js";const n={bodySmall:"text-[length:var(--size-body,10px)]",bodyLarge:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"};function me({sectionNumber:d="",heading:c="",tagline:h="",offices:r=[],mapTheme:x="auto",padTop:y,padBottom:v,editing:i,omitHead:L=!1,source:$,search:o=!1,searchHint:f="",noMatchText:a="",listPosition:w="below",showDistance:u=!0,template:A,ownerId:S=""}){const k=ne($)==="dealers",N=Z(w),z=typeof y=="number"?y:120,B=typeof v=="number"?v:120,[g,b]=j(null),K=r.length===0&&!k&&!d&&!c&&!h;if(E(()=>{b(e=>e!==null&&e>=r.length?null:e)},[r]),K&&!i)return null;const C=J(r,e=>String(e.group??""),()=>""),O=(e,l)=>{const s=g===l,m=e.href&&e.linkLabel?{href:e.href,label:e.linkLabel}:null,T=p("button",{type:"button",onClick:()=>b(l),"aria-pressed":s,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",s?"outline-accent":"outline-transparent hover:outline-line",m?"w-full pb-11":""].filter(Boolean).join(" "),children:[p("span",{className:`flex items-center gap-2.5 font-mono ${n.labelSmall} uppercase tracking-[0.28em]`,children:[e.hq&&t("span",{className:`border border-accent bg-accent px-1.5 py-0.5 ${n.bodySmall} text-bg`,children:"HQ"}),e.role&&t("span",{className:"text-accent",children:e.role})]}),e.city&&t("span",{className:`font-display ${n.bodyLarge} font-medium leading-[1.2] tracking-[-0.01em] text-fg`,children:t(re,{value:e.city,children:e.city})}),e.country&&t("span",{className:`font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.country}),e.address&&t("span",{className:`font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:te(e.address)})]},m?void 0:l);return m?p("div",{className:"relative flex",children:[T,t("a",{href:m.href,className:`absolute bottom-5 left-6 font-mono ${n.labelSmall} uppercase tracking-[0.24em] text-accent hover:underline`,children:`→ ${m.label}`})]},l):T},_=C.flatMap(e=>e.items),M=e=>t("div",{className:"mt-12 flex flex-col gap-8",children:C.map((l,s)=>p("div",{children:[l.key&&t(ee,{groupKey:l.key,count:l.items.length}),t("div",{className:["grid gap-[2px] bg-bg",U(l.items.length),l.items.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":l.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:e(l)})]},l.key?`g:${l.key}`:`ungrouped:${s}`))});return t(P,{as:"section",className:"relative z-[2] bg-bg",children:p("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:z,paddingBottom:B},children:[!L&&(d||c||h)&&t(V,{num:d,title:c?le(c):void 0,desc:h||void 0,spaceBelow:"mb-12"}),k?t(ae,{mapLabel:c.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,search:o,searchHint:f,noMatchText:a,listPosition:w,showDistance:u,editing:i}):N!=="below"?t(oe,{position:N,attrs:{"data-footprint-list":N},head:o?t("div",{className:"mb-4",children:t(ie,{hint:f,noMatchText:a,listKey:`${S}:offices`,editing:i})}):null,listAttrs:o?{[W]:`${S}:offices`}:void 0,list:t(H,{children:t(F,{ownerId:S,ownerType:"Footprint",Template:A,rows:r.map(I),states:r.map((e,l)=>g===l?{selected:!0}:void 0),actions:r.map((e,l)=>({press:()=>b(l)})),copyAttrs:e=>({[X]:"",[Y]:Q(r[e.index])}),fallback:null,children:e=>e})}),map:t(R,{offices:r,mapLabel:c.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,activeIndex:g,onSelect:b,editing:i,frame:`sf-card relative w-full overflow-hidden border border-line ${se}`})}):t(R,{offices:r,mapLabel:c.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,activeIndex:g,onSelect:b,editing:i}),!k&&N==="below"&&r.length>0&&t(F,{ownerId:S,ownerType:"Footprint",Template:A,rows:_.map(({item:e})=>I(e)),states:_.map(({index:e})=>g===e?{selected:!0}:void 0),actions:_.map(({index:e})=>({press:()=>b(e)})),fallback:M(e=>e.items.map(({item:l,index:s})=>O(l,s))),children:e=>{const l=e;let s=0;return t(H,{children:M(m=>{const T=l.slice(s,s+m.items.length);return s+=m.items.length,T})})}}),!k&&r.length===0&&i&&t("p",{className:`mt-8 font-mono ${n.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:G("Add an office in the inspector")})]})})}function R({offices:d,mapLabel:c,mapTheme:h,activeIndex:r,onSelect:x,editing:y,frame:v}){const i=D(()=>q(d),[d]),[L,$]=j(null),o=r===null?null:String(r),f=o!==null&&i.some(u=>u.key===o);if(E(()=>{o!==null&&f&&$(u=>({key:o,n:(u?.n??0)+1}))},[o,f]),i.length===0)return y?t("div",{className:"relative flex aspect-[16/9] w-full items-center justify-center overflow-hidden border border-line bg-bg px-6 text-center max-view-tablet:aspect-[4/5]",children:t("span",{className:`font-mono ${n.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:G("Add office coordinates to plot the map")})}):null;const a=f&&r!==null?d[r]:null,w=a?p("div",{className:"flex items-start gap-3 border border-line bg-bg px-3.5 py-2.5 text-fg shadow-[0_8px_24px_rgba(0,0,0,.4)]",children:[p("div",{className:"min-w-0 flex-1",children:[p("div",{className:`flex items-center gap-2 font-mono ${n.labelSmall} uppercase tracking-[0.28em]`,children:[a.hq&&t("span",{className:`bg-accent px-1.5 py-px ${n.bodySmall} text-bg`,children:"HQ"}),a.role&&t("span",{className:"text-accent",children:a.role})]}),a.city&&t("div",{className:`mt-1.5 font-display ${n.bodyLarge} font-medium leading-[1.2] text-fg`,children:a.city}),a.country&&t("div",{className:`mt-1 font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:a.country})]}),t("button",{type:"button",onClick:()=>x(null),"aria-label":"Close",className:"-mr-1 grid h-6 w-6 shrink-0 place-items-center text-fg-dim hover:text-fg",children:t("svg",{"aria-hidden":!0,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:t("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}):null;return t(ce,{pins:i,mapTheme:h,ariaLabel:c||"Offices",className:v??"sf-card relative aspect-[16/9] w-full overflow-hidden border border-line max-view-tablet:aspect-[4/5]",selectedKey:f?o:null,focus:L,onSelect:u=>x(Number(u)),card:w})}export{me as default};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { Ref } from "react";
|
|
2
|
-
import { type HeroArrowShape } from "../../format/lib/hero-arrows.js";
|
|
1
|
+
import type { MouseEvent, Ref } from "react";
|
|
2
|
+
import { type HeroArrowDirection, type HeroArrowShape } from "../../format/lib/hero-arrows.js";
|
|
3
3
|
export interface HeroArrowsProps {
|
|
4
4
|
shape?: HeroArrowShape | string;
|
|
5
5
|
placement?: string;
|
|
6
6
|
ref?: Ref<HTMLDivElement>;
|
|
7
|
+
labels?: Readonly<Record<HeroArrowDirection, string>>;
|
|
8
|
+
onPress?: (direction: HeroArrowDirection, event: MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
+
sides?: boolean;
|
|
7
10
|
}
|
|
8
|
-
export default function HeroArrows({ shape, placement, ref }: HeroArrowsProps): import("react").JSX.Element;
|
|
11
|
+
export default function HeroArrows({ shape, placement, ref, labels, onPress, sides }: HeroArrowsProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{UiIcon as p}from"efficient-easel/draw/client";import{arrowButtonClass as m,arrowsRailClass as i,HERO_ARROW_DIRECTIONS as v,HERO_ARROW_LABELS as d}from"../../format/lib/hero-arrows.js";const R={prev:"pointer-events-auto absolute left-3 top-1/2 -translate-y-1/2",next:"pointer-events-auto absolute right-3 top-1/2 -translate-y-1/2"};function c({shape:n,placement:l,ref:s,labels:u=d,onPress:a,sides:r=!1}){const o=m(n);return t("div",{ref:s,className:r?void 0:i(l),style:{color:"var(--overlay-fg)"},children:v.map(e=>t("button",{type:"button","data-hero-nav":e,"aria-label":u[e],className:r?`${R[e]} ${o}`:o,onClick:a?f=>a(e,f):void 0,children:t(p,{name:"chevron-right",size:18,rounded:!0,style:e==="prev"?{rotate:"180deg"}:void 0})},e))})}export{c as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HoverMediaCover } from "../../format/lib/animation/hover.js";
|
|
2
|
+
import { type HoverMediaPick } from "../../format/lib/content/hover-media.js";
|
|
3
|
+
export interface HoverMediaLayerProps {
|
|
4
|
+
media: HoverMediaPick | null;
|
|
5
|
+
name: string;
|
|
6
|
+
cover?: HoverMediaCover;
|
|
7
|
+
ground?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function HoverMediaLayer({ media, name, cover, ground }: HoverMediaLayerProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as A,jsxs as I,Fragment as k}from"react/jsx-runtime";import{useEffect as T,useRef as W,useState as p}from"react";import $ from"./HeroArrows.js";import{arrowStep as z,HERO_ARROW_DIRECTIONS as Y}from"../../format/lib/hero-arrows.js";import{hoverArrowLabel as q,hoverMediaCount as V}from"../../format/lib/content/hover-media.js";import{CARD_COPY_ATTR as B,PHOTO_HOST_ATTR as G}from"../../format/lib/content/image-treatment.js";import{useDeferredPicture as J}from"../lib/first-screen.js";import{sizedImage as j}from"../../format/lib/sized-image.js";const K=200,H="data-hover-media-anchor";function Q(r){const i=r.closest(`[${B}]`);for(let o=r.parentElement;o;o=o.parentElement){const u=!i?.contains(o)&&[...o.children].some(h=>h.matches("a[href]"));if(o.hasAttribute(G)||u)return o.querySelectorAll(`[${H}]`).length===1?o:null}return null}const U={card:"pointer-events-none absolute inset-0 z-20 overflow-hidden rounded-[inherit] transition-opacity duration-200 motion-reduce:transition-none",picture:"pointer-events-none absolute inset-0 z-20 overflow-hidden transition-opacity duration-200 motion-reduce:transition-none"},X={cover:"h-full w-full object-cover",contain:"h-full w-full object-contain"};function M(r){const i=j(r,{fallbackWidth:960});return i.src===r?{src:r}:{src:i.src,srcSet:`${i.src} 1x, ${j(r,{fallbackWidth:1280}).src} 2x`}}const P=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: hover) and (pointer: fine)").matches;function Z({media:r,name:i,cover:o="card",ground:u}){const v=W(null),h=J(),[c,w]=p(!1),[D,S]=p(!1),[l,L]=p(0),[E,_]=p(!1),f=r?.urls??[],s=f.length;if(T(()=>{const n=v.current;if(!n||s===0)return;const e=Q(n)??n.parentElement;if(!e)return;let t,m=!1;const y=()=>{t!==void 0&&clearTimeout(t),t=void 0,w(!1),S(!1),L(0),_(!1),m=!1},O=a=>{a.pointerType!=="mouse"||!P()||(t!==void 0&&clearTimeout(t),t=setTimeout(()=>{t=void 0,w(!0)},K))},R=a=>{if(a.pointerType==="mouse"){if(!m&&e.contains(document.activeElement)){t!==void 0&&clearTimeout(t),t=void 0;return}y()}},b=()=>{m=!0},x=()=>{!m&&P()&&w(!0)},g=a=>{const C=a.relatedTarget;(!C||!e.contains(C))&&y()};return e.addEventListener("pointerenter",O),e.addEventListener("pointerleave",R),e.addEventListener("pointerdown",b),e.addEventListener("focusin",x),e.addEventListener("focusout",g),()=>{t!==void 0&&clearTimeout(t),e.removeEventListener("pointerenter",O),e.removeEventListener("pointerleave",R),e.removeEventListener("pointerdown",b),e.removeEventListener("focusin",x),e.removeEventListener("focusout",g)}},[s]),T(()=>{if(!c)return;const n=requestAnimationFrame(()=>S(!0));return()=>cancelAnimationFrame(n)},[c]),T(()=>{if(!c||!E||s<2)return;const n=new Image,e=M(f[(l+1)%s]);e.srcSet&&(n.srcset=e.srcSet),n.src=e.src},[c,E,l,s,f]),!r||s===0)return null;const d=c?M(f[Math.min(l,s-1)]):null,F=(n,e)=>{e.preventDefault(),e.stopPropagation(),_(!0),L(t=>z(n,t,s))},N=Object.fromEntries(Y.map(n=>[n,q(n,i)]));return I(k,{children:[A("span",{ref:v,className:"sr-only","aria-live":"polite",[H]:"",children:c&&E?V(l,s):""}),d?I("div",{"data-hover-media":"","data-hover-cover":o,className:U[o],style:{opacity:D?1:0,...u?{backgroundColor:u}:{}},children:[A("img",{src:d.src,...d.srcSet?{srcSet:d.srcSet}:{},alt:"",decoding:"async",...h,className:X[r.fit]}),s>1?A($,{shape:"solid",sides:!0,labels:N,onPress:F}):null]}):null]})}export{Z as default};
|
|
@@ -3,5 +3,6 @@ export interface ListSearchBoxProps {
|
|
|
3
3
|
noMatchText?: string;
|
|
4
4
|
listKey?: string;
|
|
5
5
|
editing?: boolean;
|
|
6
|
+
takesViewHide?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export default function ListSearchBox({ hint, noMatchText, listKey, editing }: ListSearchBoxProps): import("react").JSX.Element;
|
|
8
|
+
export default function ListSearchBox({ hint, noMatchText, listKey, editing, takesViewHide }: ListSearchBoxProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as o,jsxs as u}from"react/jsx-runtime";import{HideTaker as d}from"./ViewHideRoot.js";import{useRef as p,useState as m}from"react";import{narrowList as x}from"../../format/lib/content/list-query.js";function b({hint:e,noMatchText:s,listKey:t,editing:n=!1,takesViewHide:l=!1}){const r=p(null),[i,c]=m(!1);return u(d,{ref:r,takes:l,className:"w-full",children:[o("input",{type:"search",...e?{"aria-label":e}:{},placeholder:e,readOnly:n,onChange:f=>{if(!r.current||!t)return;const a=f.currentTarget.value;c(x(r.current,t,a)===0&&a.trim()!=="")},className:"w-full border-b border-line bg-transparent py-4 font-body text-[length:var(--size-body,16px)] text-fg placeholder:text-fg-dim focus:border-accent focus:outline-none"}),o("p",{hidden:!i,role:"status","aria-live":"polite",className:"pt-4 text-[length:var(--size-body,15px)] text-fg-dim",children:s})]})}export{b as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
|
+
import type { ListPosition } from "../../format/lib/content/list-position.js";
|
|
3
|
+
export declare function sideListGridClass(position: Exclude<ListPosition, "below">): string;
|
|
4
|
+
export declare const SIDE_LIST_SCROLL_CLASS = "max-h-[480px] overflow-y-auto overscroll-contain max-view-wide:max-h-none";
|
|
5
|
+
export declare const SIDE_MAP_CLASS = "h-[480px] max-view-wide:h-[320px]";
|
|
6
|
+
export default function SideListLayout({ position, attrs, head, list, listRef, listAttrs, map, }: {
|
|
7
|
+
position: Exclude<ListPosition, "below">;
|
|
8
|
+
attrs: Readonly<Record<string, string>>;
|
|
9
|
+
head?: ReactNode;
|
|
10
|
+
list: ReactNode;
|
|
11
|
+
listRef?: Ref<HTMLDivElement>;
|
|
12
|
+
listAttrs?: Readonly<Record<string, string>>;
|
|
13
|
+
map: ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";const n={left:"grid-cols-[minmax(260px,360px)_1fr]",right:"grid-cols-[1fr_minmax(260px,360px)]"};function m(i){return["grid items-start gap-6 max-view-wide:grid-cols-1",n[i]].join(" ")}const c="max-h-[480px] overflow-y-auto overscroll-contain max-view-wide:max-h-none",h="h-[480px] max-view-wide:h-[320px]";function l({position:i,attrs:s,head:a,list:d,listRef:o,listAttrs:x,map:t}){return r("div",{...s,className:m(i),children:[r("div",{className:["min-w-0",i==="right"?"order-2":"","max-view-wide:order-2"].join(" "),children:[a,e("div",{ref:o,...x,className:c,children:d})]}),e("div",{className:["min-w-0",i==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:t})]})}export{c as SIDE_LIST_SCROLL_CLASS,h as SIDE_MAP_CLASS,l as default,m as sideListGridClass};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MapPin } from "efficient-shell/map";
|
|
2
|
+
import { type ListPosition } from "../../format/lib/content/list-position.js";
|
|
2
3
|
export type FootprintSource = "typed" | "dealers";
|
|
3
|
-
export type DealerListPosition =
|
|
4
|
+
export type DealerListPosition = ListPosition;
|
|
4
5
|
export type DealerPlacement = "located" | "approximate" | "pending" | "not_found" | "failed" | "no_address";
|
|
5
6
|
export interface SiteDealer {
|
|
6
7
|
id: string;
|
|
@@ -29,6 +30,6 @@ export type DealerSource = (query: {
|
|
|
29
30
|
export declare const DealerSourceProvider: import("react").Provider<DealerSource | null>;
|
|
30
31
|
export declare const useDealerSource: () => DealerSource | null;
|
|
31
32
|
export declare function parseFootprintSource(value: unknown): FootprintSource;
|
|
32
|
-
export declare
|
|
33
|
+
export declare const parseDealerListPosition: (value: unknown) => DealerListPosition;
|
|
33
34
|
export declare function dealerPins(dealers: SiteDealer[]): MapPin[];
|
|
34
35
|
export declare function dealerDistanceLabel(km: number | null): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createContext as r,useContext as
|
|
1
|
+
"use client";import{createContext as r,useContext as i}from"react";import{parseListPosition as l}from"../../format/lib/content/list-position.js";const n=r(null),c=n.Provider,u=()=>i(n),a=["typed","dealers"];function d(e){return a.includes(e)?e:"typed"}const x=l;function m(e){const o=[];for(const t of e)t.placement!=="located"&&t.placement!=="approximate"||t.lat===null||t.lng===null||o.push({key:t.id,label:t.name,lat:t.lat,lng:t.lng,glyph:"",tone:"",approximate:t.placement==="approximate"});return o}function f(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}export{c as DealerSourceProvider,f as dealerDistanceLabel,m as dealerPins,x as parseDealerListPosition,d as parseFootprintSource,u as useDealerSource};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as p}from"react/jsx-runtime";import{HideTaker as T}from"../../../../../components/ViewHideRoot.js";import{CardTemplateRows as S,useCardRow as k}from"../../../../../components/CardRowContext.js";import{BOX_ITEMS_ATTR as A}from"../../../../../../format/lib/content/box-layout.js";import{cardItemAction as C,highlightOf as g,keyedRows as L,markedRows as _,rowHoldsContent as j}from"../../../../../../format/lib/content/card-state.js";import{CARD_LIST_ROWS as I,CARD_LIST_TYPE as R,cardListFieldsOf as b,cardListShows as E,cardRow as w,rowFieldSpec as O}from"../../../../../../format/lib/content/card-template.js";import{declaredBlockSource as B,sourceChoices as M,sourcedRows as x}from"../../../../../../format/lib/content/block-sources.js";import{CardListMeta as D}from"../../../../../../format/lib/document/blocks/general/CardList/meta.js";function h(t){const s=t&&typeof t=="object"?t.state:void 0;return s&&typeof s=="object"?s:void 0}const y=[{}];function v(t,s){const l=B(t);let n,f=[];if(l){const e=x(t,s);n=[...e.rows],e.sample&&(f=M(l))}else{const e=t[I];n=Array.isArray(e)?e:[]}const a=L(n.map(w),f),o=n.map((e,i)=>({item:e,row:a[i]})).filter(({item:e})=>s||j(e)),d=_(o.map(e=>e.row),g(t));return{items:o.map(e=>e.item),rows:d.rows,states:o.map(({item:e},i)=>{const c={...h(e),...d.states[i]};return Object.keys(c).length?c:void 0})}}function F({id:t,own:s,Template:l,editing:n,dragRef:f}){const a=k();let o,d,e,i;if(a){const r=E(s,a.ownerType);i=O(a,r)?.fields;const m=r&&a.item&&typeof a.item=="object"?a.item[r]:void 0,u=Array.isArray(m)?m:[];o=u.length?u:n?y:u,d=o.map(w),e=o.map(h)}else{const r=v(s,n);i=b(null,{type:R,props:s});const m=!r.items.length&&n;o=m?y:r.items,d=m?y.map(w):r.rows,e=m?[]:r.states}if(!o.length)return null;const c=n?[]:o.map(C);return p(S,{ownerId:t,ownerType:R,Template:l,rows:d,items:o,fields:i?.length?i:void 0,states:e.some(Boolean)?e:void 0,actions:c.some(Boolean)?c:void 0,fallback:null,children:r=>p(T,{ref:f,className:"contents",[A]:"",children:r})})}const G={...D,render:t=>p(F,{id:String(t.id??""),own:t,Template:t.template,editing:t.editor?.isEditing===!0,dragRef:t.editor?.dragRef??void 0})};export{G as CardListRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import{phoneKey as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{phoneKey as h}from"efficient-easel/draw";import{CardRowDrawn as p}from"../../../../../components/CardRowContext.js";import w from"../../../../../components/ImageBlock.js";import{recordPictureAlt as S}from"../../../../../../format/lib/content/record-row.js";import{namedRowField as x,rowFieldSpec as B,rowFieldText as I,rowNextPicture as b}from"../../../../../../format/lib/content/card-template.js";import{blockSizeOf as F,blockSizeValuesOf as O}from"../../../../content/block-size.js";import{padValuesOf as P}from"../../../../content/section-padding.js";import{pictureHoverOf as v}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as z}from"../../../../../../format/lib/content/picture-focus-rows.js";import{ImageBlockMeta as R}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const _={...R,render:e=>{const t=x(e);return t?l(p,{type:"ImageBlock",props:e,children:(o,r,a)=>{const c=B(r,t),i=r?c?.alt:S(t);return m(e,o.src,(i&&I(a,i))??e.alt,b(r?.item,c?.next,typeof o.src=="string"?o.src:""))}}):m(e,e.src,e.alt)}};function m(e,t,o,r=""){const{aspect:a,contained:c,grayscale:i,darken:f,darkenStyle:d,href:s,fit:u,corners:k,cornerSides:g,editor:y}=e,n=z(e,"focal");return l(w,{src:t,alt:o,aspect:a,aspectPhone:e[h("aspect")],contained:c,grayscale:i,darken:f,darkenStyle:d,pictureHover:v(e,"ImageBlock"),...r?{nextSrc:r}:{},href:s,fit:u,focal:n.desktop,focalPhone:n.phone,focalTablet:n.tablet,corners:k,cornerSides:g,pad:P(e),ownSize:F(O(e))!==null,editing:y?.isEditing===!0})}export{_ as ImageBlockRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import o from"../../../../../components/ListSearchBox.js";import{readHidable as n}from"efficient-easel/draw";import{LIST_KEY_PROP as r}from"../../../../../../format/lib/document/list-search-scopes.js";import{ListSearchMeta as a}from"../../../../../../format/lib/document/blocks/general/ListSearch/meta.js";const x={...a,render:t=>{const e=n(t.hint),i=n(t.noMatchText);return d(o,{hint:e.hidden?void 0:e.text,noMatchText:i.hidden?void 0:i.text,listKey:typeof t[r]=="string"?t[r]:void 0,editing:!!t.editor?.isEditing,takesViewHide:!0})}};export{x as ListSearchRender};
|
|
@@ -41,6 +41,7 @@ export declare const ownFill: (painted: string | undefined, p: Props, ctx: Conve
|
|
|
41
41
|
export declare const fillNoBoxHolds: (painted: string | undefined) => string | undefined;
|
|
42
42
|
export declare const bandIndex: (p: Props, ctx: ConvertContext) => number;
|
|
43
43
|
export declare const bandAccent: (stored: unknown, p: Props, ctx: ConvertContext) => unknown;
|
|
44
|
+
export declare const surfaceAccent: (stored: unknown, ctx: ConvertContext) => unknown;
|
|
44
45
|
export declare const bandProps: (p: Props, ctx: ConvertContext) => Props;
|
|
45
46
|
export declare const bandWrites: (node: {
|
|
46
47
|
props: Props;
|