efficient-web-builder 70.4.0 → 71.1.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 +34 -0
- package/dist/format/lib/source-rules/published-mounts.d.ts +1 -0
- package/dist/format/lib/source-rules/published-mounts.js +52 -42
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/lib/document/page-render.d.ts +3 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/render-keep.d.ts +2 -0
- package/dist/render/lib/document/render-keep.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 71.1.0 - 2026-11-18
|
|
4
|
+
|
|
5
|
+
From main at `59a4749a`: #789. A minor: no `!`, no export is added, removed or changes its type, the peers stay `efficient-easel` `^35.1.0` and `efficient-shell` `^13.17.0`. No stored key or value moves.
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- No step is required. A host that pins rendered bytes of a Box column cell with Justify other than Start, or a lone Equal block in a stretched row, captures its pins again. Equal + Justify Start columns (the live footers' shape) draw the same bytes.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **A column cell of a stretched row centres and fills as stored** (#789): an Equal column did not fill the cell a stretched row gave it, so its Justify had no room (the "Image & Text Split" preset drew its words at the top) and a lone Fill row picture stayed 4:3. On a column cell, a Justify that is not Start now wins over Block widths (the layers fill, the blocks keep their own height); one block under Equal fills the cell, and a Fill row picture takes its height.
|
|
13
|
+
|
|
14
|
+
## 71.0.0 - 2026-11-18
|
|
15
|
+
|
|
16
|
+
From main at `5d29f197`: #784. A major: #784 is `!`. The `efficient-easel` peer narrows to `^35.1.0`; `efficient-shell` stays `^13.17.0`. No export is removed. One new export and one new optional field. No stored key or value moves.
|
|
17
|
+
|
|
18
|
+
### BREAKING
|
|
19
|
+
|
|
20
|
+
- **`efficient-easel` peer `^35.0.0` -> `^35.1.0`** (#784): the builder uses easel's `createRenderKeep` and `Render`'s `keep`.
|
|
21
|
+
- **The published-mounts rule now needs a keep on every published `Render` mount** (#784): `lib/source-rules/published-mounts` fails a published mount that draws `Render` with no `keep={keep}` from `useRenderKeep()`, and fails a file that reaches `Render` with no mount row.
|
|
22
|
+
|
|
23
|
+
**For hosts:**
|
|
24
|
+
- Install `efficient-easel` 35.1.0 or later with this release.
|
|
25
|
+
- In each published mount file that draws `Render`, import `useRenderKeep` from `efficient-web-builder/render/lib/document/render-keep`, set `const keep = useRenderKeep();` and pass `keep={keep}` to `Render`. In storefront-blocks these are `PublishedHeader` and `PublishedFooter`.
|
|
26
|
+
- Give each such mount row `keepFrom` (the module the hook is imported from) in the host's published-mounts test.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **A published page keeps its slots when it draws again** (#784): the page render passes one keep per mount, so a block that draws again (a product hero whose pick state sits above it) no longer gives every Box inside it a new slot type. Keyboard focus and held state (the gallery photo) stay. The HTML is the same.
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- **`useRenderKeep()`** (`render/lib/document/render-keep`, #784): the per-mount keep, made once and held in a ref. Never module-level.
|
|
35
|
+
- **`PublishedMount.keepFrom`** (optional, #784): where a mount imports `useRenderKeep`; left out, the builder's own module.
|
|
36
|
+
|
|
3
37
|
## 70.4.0 - 2026-11-18
|
|
4
38
|
|
|
5
39
|
From main at `f6660eee`: #786. A minor: no `!`, no export is removed, no export changes its type, the peers stay `efficient-easel` `^35.0.0` and `efficient-shell` `^13.17.0`. One new export. No stored key or value moves.
|
|
@@ -1,58 +1,68 @@
|
|
|
1
|
-
import{ruleChecks as M}from"./rule.js";import{programOf as _}from"./support/ts-program.js";function Z(n){const a=[];let e=0,u=0;for(let o=0;o<n.length;o++){const p=n[o];"([{".includes(p)?e++:")]}".includes(p)?e--:p===","&&e===0&&(a.push(n.slice(u,o)),u=o+1)}return a.push(n.slice(u)),a.map(o=>o.trim()).filter(o=>o!=="")}const Y=/^[A-Za-z_$][\w$]*$/,ee=/^(?:@\/|\.\.?\/)/;function te(n,a){const e=_(n,[{path:"mount.tsx",text:a}]);return{sf:e.getSourceFile("/mount.tsx"),checker:e.getTypeChecker()}}function ne(n,a){const e=[],u=o=>{e.push(o),n.forEachChild(o,u)};return u(a),e}function v(n,a){const e=a.parent;return(n.isVariableDeclaration(e)||n.isParameter(e)||n.isBindingElement(e)||n.isFunctionDeclaration(e)||n.isFunctionExpression(e)||n.isClassDeclaration(e)||n.isClassExpression(e)||n.isImportSpecifier(e)||n.isImportClause(e)||n.isNamespaceImport(e)||n.isImportEqualsDeclaration(e))&&e.name===a}function F(n,a){return n.isParenthesizedExpression(a)||n.isAsExpression(a)||n.isNonNullExpression(a)||n.isTypeAssertionExpression(a)||n.isSatisfiesExpression(a)}function ae(n,a){for(;a.parent&&F(n,a.parent);)a=a.parent;return a}function V(n,a){let e=a,u=!1;for(;;){e=ae(n,e);const o=e.parent;if(o&&(n.isPropertyAccessExpression(o)||n.isElementAccessExpression(o))&&o.expression===e){e=o,u=!0;continue}return{top:e,path:u}}}const W=(n,a)=>n.isBinaryExpression(a)&&(a.operatorToken.kind===n.SyntaxKind.QuestionQuestionToken||a.operatorToken.kind===n.SyntaxKind.BarBarToken);function re(n,a){const e=a.parent;if(!e)return"used";if(n.isBinaryExpression(e)&&e.left===a&&e.operatorToken.kind>=n.SyntaxKind.FirstAssignment&&e.operatorToken.kind<=n.SyntaxKind.LastAssignment)return"assigned";if((n.isPrefixUnaryExpression(e)||n.isPostfixUnaryExpression(e))&&(e.operator===n.SyntaxKind.PlusPlusToken||e.operator===n.SyntaxKind.MinusMinusToken))return"changed by ++ or --";if(n.isDeleteExpression(e))return"deleted";if(n.isCallExpression(e)&&e.expression===a)return"called, or a method called on it";if(n.isCallExpression(e)||n.isNewExpression(e))return`handed to ${e.expression.getText()}(…)`;if(n.isJsxExpression(e)&&n.isJsxAttribute(e.parent))return`handed to the JSX attribute ${e.parent.name.getText()}`;if(n.isVariableDeclaration(e)||n.isBindingElement(e))return"aliased by a local";if(n.isSpreadElement(e)||n.isSpreadAssignment(e)||n.isJsxSpreadAttribute(e))return"spread";if(n.isForOfStatement(e)||n.isForInStatement(e))return"looped over";for(let u=a;u.parent;u=u.parent){const o=u.parent;if(n.isBinaryExpression(o)){if(o.left===u&&o.operatorToken.kind===n.SyntaxKind.EqualsToken)return"a destructuring target";break}if(!(n.isObjectLiteralExpression(o)||n.isArrayLiteralExpression(o)||n.isPropertyAssignment(o)||n.isShorthandPropertyAssignment(o)||n.isSpreadAssignment(o)||n.isSpreadElement(o)||F(n,o)))break}return`used in a ${n.SyntaxKind[e.kind]} (syntax kind)`}function G(n,a,e){if(!e)return["the rule was not handed the compiler (`options.ts`)"];const{sf:u,checker:o}=te(e,n),p=ne(e,u),x=p.filter(e.isIdentifier),$=t=>u.getLineAndCharacterOfPosition(t.getStart(u)).line+1,m=t=>e.isShorthandPropertyAssignment(t.parent)&&t.parent.name===t?o.getShorthandAssignmentValueSymbol(t.parent):o.getSymbolAtLocation(t),d=t=>x.filter(r=>r.text===t&&v(e,r)),c=t=>{for(let r=t;r.parent;r=r.parent){const i=r.parent;if(e.isExpressionWithTypeArguments(i)&&i.expression===r)return!1;if(e.isTypeNode(i))return!0}return!1},s=[],C=(t,r,i)=>{const l=p.filter(k=>e.isImportSpecifier(k)&&k.name.text===r),f=l[0],y=f?f.parent.parent.parent.moduleSpecifier.text:"";return l.length!==1?`${t} is not imported once in the mount`:f.propertyName&&f.propertyName.text!==r?`${t} is ${f.propertyName.text} renamed: it is imported by its own name`:f.isTypeOnly||f.parent.parent.isTypeOnly?`${t} is a type-only import`:(i===void 0?!ee.test(y):y!==i)?`${t} comes from "${y}", not ${i===void 0?"a module inside this package":`"${i}"`}`:d(r).length!==1?`${t} is declared again in the mount: it is the imported function`:o.getSymbolAtLocation(f.name)??`${t} has no binding in the mount`},A=d(a.variable);if(A.length!==1)return[`\`${a.variable}\` is declared ${A.length} times, not once`];const h=A[0].parent;if(!e.isVariableDeclaration(h))return[`\`${a.variable}\` is not a variable declaration`];const g=m(A[0]),b=h.initializer;let S=null;const w=C(`the call ${a.call}`,a.call,a.callFrom);if(typeof w=="string"&&s.push(w),!b||!e.isCallExpression(b)||!e.isIdentifier(b.expression)||b.expression.text!==a.call||typeof w!="string"&&m(b.expression)!==w)s.push(`\`${a.variable}\` is not set straight from ${a.call}(…): a pass wraps it, or something follows the call`);else{S=b;const t=n.slice(b.arguments.pos,b.arguments.end).trim();a.args!==void 0&&t!==a.args&&s.push(`${a.call} is handed \`${t}\`, not \`${a.args}\``)}const R=e.findAncestor(h,t=>e.isFunctionDeclaration(t)||e.isFunctionExpression(t)||e.isArrowFunction(t));if(!R||!R.body||h.parent.parent.parent!==R.body)return[...s,`\`${a.variable}\` is not declared at the top level of a component's body`];const T=R.parameters[0]?.name,D=new Map;if(T&&e.isObjectBindingPattern(T))for(const t of T.elements)e.isIdentifier(t.name)&&!t.dotDotDotToken&&D.set(t.name.text,t.name);else s.push("the component does not destructure its props");const B=a.inputs??Z(a.args??"").filter(t=>Y.test(t));B.length===0&&s.push(`${a.call}(…) reads no input the rule can check: name the props it reads in \`inputs\`, or bare names in \`args\``);const N=new Set;for(const t of B){const r=D.get(t);if(!r){s.push(`\`${t}\` is not a prop of the component: the call is handed something made in the mount`);continue}d(t).length!==1&&s.push(`\`${t}\` is declared ${d(t).length} times in the file: a second binding would pass for the input`);const i=m(r);i&&N.add(i)}for(const t of x)t.text==="arguments"&&!v(e,t)&&e.findAncestor(t,r=>r===R)&&s.push(`\`arguments\` is used in the component (line ${$(t)}): it is the props by another name`);for(const t of x)(t.text==="eval"||t.text==="Function")&&!v(e,t)&&!c(t)&&!(e.isPropertyAccessExpression(t.parent)&&t.parent.name===t)&&s.push(`\`${t.text}\` is used in the mount file (line ${$(t)}): code run from a string cannot be read`);const L=new Set;for(const t of a.readers??[]){const r=typeof t=="string"?t:t.name,i=C(`the reader ${r}`,r,typeof t=="string"?void 0:t.from);typeof i=="string"?s.push(i):L.add(i)}const X=t=>{if(!e.isCallExpression(t)||!e.isIdentifier(t.expression))return!1;const r=m(t.expression);return r!==void 0&&L.has(r)};let z=null;const P=p.filter(t=>e.isImportSpecifier(t)&&t.name.text==="Render"),O=a.renderFrom??"efficient-easel/render",q=P.length===1?P[0].parent.parent.parent.moduleSpecifier.text:"",I=p.filter(t=>e.isImportDeclaration(t)&&e.isStringLiteral(t.moduleSpecifier)&&t.moduleSpecifier.text===O&&!t.importClause?.isTypeOnly).flatMap(t=>{const r=t.importClause;if(!r)return[];const i=r.namedBindings;return[...r.name?[r.name.text]:[],...i&&e.isNamespaceImport(i)?[`* as ${i.name.text}`]:[],...i&&e.isNamedImports(i)?i.elements.filter(l=>!l.isTypeOnly).map(l=>l.propertyName?`${l.propertyName.text} as ${l.name.text}`:l.name.text):[]]});(I.length!==1||I[0]!=="Render")&&s.push(`"${O}" gives this file ${I.length} binding(s) (${I.join(", ")||"none"}), not the one \`Render\``);const J=P.length===1&&!P[0].propertyName&&q===O?o.getSymbolAtLocation(P[0].name):void 0;if(!J||d("Render").length!==1)s.push(`\`Render\` is not imported once by its own name from "${O}"`);else{const t=x.filter(i=>!v(e,i)&&m(i)===J),r=t.filter(i=>(e.isJsxOpeningElement(i.parent)||e.isJsxSelfClosingElement(i.parent))&&i.parent.tagName===i);if(r.length!==1||t.length!==1)s.push(`\`Render\` is used ${t.length} times, ${r.length} as a tag: one <Render> and no alias`);else{const l=r[0].parent.attributes.properties;l.some(j=>e.isJsxSpreadAttribute(j))&&s.push("the Render tag has a spread attribute, which can hand it another document");const f=l.filter(j=>e.isJsxAttribute(j)&&j.name.getText()==="data"),y=f.length===1?f[0].initializer:void 0,k=y&&e.isJsxExpression(y)?y.expression:void 0;!k||!e.isIdentifier(k)||m(k)!==g?s.push(`the Render tag draws \`${k?k.getText():f.length===1?f[0].getText():"nothing"}\`, not \`${a.variable}\``):z=k}}const E=new Map;for(const t of N)E.set(t,t.name);g&&E.set(g,a.variable);const H=t=>{for(let r=t;r.parent;r=r.parent){const i=r.parent;if(S&&i===S)return S.arguments.some(f=>f===r);if(!(F(e,i)||e.isObjectLiteralExpression(i)||e.isPropertyAssignment(i)&&i.initializer===r||e.isShorthandPropertyAssignment(i)||e.isSpreadAssignment(i)||e.isArrayLiteralExpression(i)||e.isSpreadElement(i)||e.isConditionalExpression(i)&&i.condition!==r||W(e,i)))return!1}return!1},Q=t=>{let r=t,i=!1;for(;;){const l=r.parent;if(!l)return;if(F(e,l))r=l;else if(e.isConditionalExpression(l)&&l.condition!==r)r=l,i=!0;else if(e.isSpreadAssignment(l)&&e.isObjectLiteralExpression(l.parent))r=l.parent,i=!0;else return e.isVariableDeclaration(l)&&l.initializer===r&&e.isIdentifier(l.name)&&i?m(l.name):void 0}},K=(t,r)=>{if(c(t))return!0;const{top:i,path:l}=V(e,t);if(t===z)return!0;let f=i;for(;f.parent&&(F(e,f.parent)||W(e,f.parent));)f=f.parent;if(f.parent&&X(f.parent)&&f.parent.arguments.some(k=>k===f)||N.has(r)&&H(i))return!0;const y=l?void 0:Q(i);return y?(E.has(y)||E.set(y,y.name),!0):!1};for(let t=-1;t!==E.size;){t=E.size;for(const r of x){if(v(e,r))continue;const i=m(r);i&&E.has(i)&&K(r,i)}}for(const t of x){if(v(e,t))continue;const r=m(t);if(!r||!E.has(r)||K(t,r))continue;const{top:i}=V(e,t),l=E.get(r),f=N.has(r)||r===g?"":" (a local that holds an input or the variable)";s.push(`\`${l}\`${f} is ${re(e,i)} at line ${$(t)}`)}return s}const U=new WeakMap;function ie(n){const a=U.get(n);if(a)return a;const{check:e,report:u}=M("published mounts fixtures"),o=(h,g)=>G(h,g,n),p={call:"publishedPageData",variable:"page",args:"data, metadata",readers:["first"]},x="return <Render config={c} data={page} />;",$=`const page = ${p.call}(data, metadata);`,m=h=>`import { Render } from "efficient-easel/render";
|
|
1
|
+
import{ruleChecks as U}from"./rule.js";import{programOf as ae}from"./support/ts-program.js";function re(n){const a=[];let e=0,m=0;for(let i=0;i<n.length;i++){const l=n[i];"([{".includes(l)?e++:")]}".includes(l)?e--:l===","&&e===0&&(a.push(n.slice(m,i)),m=i+1)}return a.push(n.slice(m)),a.map(i=>i.trim()).filter(i=>i!=="")}const ie=/^[A-Za-z_$][\w$]*$/,oe=/^(?:@\/|\.\.?\/)/;function se(n,a){const e=ae(n,[{path:"mount.tsx",text:a}]);return{sf:e.getSourceFile("/mount.tsx"),checker:e.getTypeChecker()}}function pe(n,a){const e=[],m=i=>{e.push(i),n.forEachChild(i,m)};return m(a),e}function N(n,a){const e=a.parent;return(n.isVariableDeclaration(e)||n.isParameter(e)||n.isBindingElement(e)||n.isFunctionDeclaration(e)||n.isFunctionExpression(e)||n.isClassDeclaration(e)||n.isClassExpression(e)||n.isImportSpecifier(e)||n.isImportClause(e)||n.isNamespaceImport(e)||n.isImportEqualsDeclaration(e))&&e.name===a}function L(n,a){return n.isParenthesizedExpression(a)||n.isAsExpression(a)||n.isNonNullExpression(a)||n.isTypeAssertionExpression(a)||n.isSatisfiesExpression(a)}function le(n,a){for(;a.parent&&L(n,a.parent);)a=a.parent;return a}function _(n,a){let e=a,m=!1;for(;;){e=le(n,e);const i=e.parent;if(i&&(n.isPropertyAccessExpression(i)||n.isElementAccessExpression(i))&&i.expression===e){e=i,m=!0;continue}return{top:e,path:m}}}const H=(n,a)=>n.isBinaryExpression(a)&&(a.operatorToken.kind===n.SyntaxKind.QuestionQuestionToken||a.operatorToken.kind===n.SyntaxKind.BarBarToken);function ce(n,a){const e=a.parent;if(!e)return"used";if(n.isBinaryExpression(e)&&e.left===a&&e.operatorToken.kind>=n.SyntaxKind.FirstAssignment&&e.operatorToken.kind<=n.SyntaxKind.LastAssignment)return"assigned";if((n.isPrefixUnaryExpression(e)||n.isPostfixUnaryExpression(e))&&(e.operator===n.SyntaxKind.PlusPlusToken||e.operator===n.SyntaxKind.MinusMinusToken))return"changed by ++ or --";if(n.isDeleteExpression(e))return"deleted";if(n.isCallExpression(e)&&e.expression===a)return"called, or a method called on it";if(n.isCallExpression(e)||n.isNewExpression(e))return`handed to ${e.expression.getText()}(…)`;if(n.isJsxExpression(e)&&n.isJsxAttribute(e.parent))return`handed to the JSX attribute ${e.parent.name.getText()}`;if(n.isVariableDeclaration(e)||n.isBindingElement(e))return"aliased by a local";if(n.isSpreadElement(e)||n.isSpreadAssignment(e)||n.isJsxSpreadAttribute(e))return"spread";if(n.isForOfStatement(e)||n.isForInStatement(e))return"looped over";for(let m=a;m.parent;m=m.parent){const i=m.parent;if(n.isBinaryExpression(i)){if(i.left===m&&i.operatorToken.kind===n.SyntaxKind.EqualsToken)return"a destructuring target";break}if(!(n.isObjectLiteralExpression(i)||n.isArrayLiteralExpression(i)||n.isPropertyAssignment(i)||n.isShorthandPropertyAssignment(i)||n.isSpreadAssignment(i)||n.isSpreadElement(i)||L(n,i)))break}return`used in a ${n.SyntaxKind[e.kind]} (syntax kind)`}function Q(n,a,e){if(!e)return["the rule was not handed the compiler (`options.ts`)"];const{sf:m,checker:i}=se(e,n),l=pe(e,m),x=l.filter(e.isIdentifier),f=t=>m.getLineAndCharacterOfPosition(t.getStart(m)).line+1,p=t=>e.isShorthandPropertyAssignment(t.parent)&&t.parent.name===t?i.getShorthandAssignmentValueSymbol(t.parent):i.getSymbolAtLocation(t),h=t=>x.filter(r=>r.text===t&&N(e,r)),d=t=>{for(let r=t;r.parent;r=r.parent){const o=r.parent;if(e.isExpressionWithTypeArguments(o)&&o.expression===r)return!1;if(e.isTypeNode(o))return!0}return!1},s=[],c=(t,r,o)=>{const u=l.filter(E=>e.isImportSpecifier(E)&&E.name.text===r),g=u[0],b=g?g.parent.parent.parent.moduleSpecifier.text:"";return u.length!==1?`${t} is not imported once in the mount`:g.propertyName&&g.propertyName.text!==r?`${t} is ${g.propertyName.text} renamed: it is imported by its own name`:g.isTypeOnly||g.parent.parent.isTypeOnly?`${t} is a type-only import`:(o===void 0?!oe.test(b):b!==o)?`${t} comes from "${b}", not ${o===void 0?"a module inside this package":`"${o}"`}`:h(r).length!==1?`${t} is declared again in the mount: it is the imported function`:i.getSymbolAtLocation(g.name)??`${t} has no binding in the mount`},K=h(a.variable);if(K.length!==1)return[`\`${a.variable}\` is declared ${K.length} times, not once`];const A=K[0].parent;if(!e.isVariableDeclaration(A))return[`\`${a.variable}\` is not a variable declaration`];const $=p(K[0]),k=A.initializer;let y=null;const T=c(`the call ${a.call}`,a.call,a.callFrom);if(typeof T=="string"&&s.push(T),!k||!e.isCallExpression(k)||!e.isIdentifier(k.expression)||k.expression.text!==a.call||typeof T!="string"&&p(k.expression)!==T)s.push(`\`${a.variable}\` is not set straight from ${a.call}(…): a pass wraps it, or something follows the call`);else{y=k;const t=n.slice(k.arguments.pos,k.arguments.end).trim();a.args!==void 0&&t!==a.args&&s.push(`${a.call} is handed \`${t}\`, not \`${a.args}\``)}const R=e.findAncestor(A,t=>e.isFunctionDeclaration(t)||e.isFunctionExpression(t)||e.isArrowFunction(t));if(!R||!R.body||A.parent.parent.parent!==R.body)return[...s,`\`${a.variable}\` is not declared at the top level of a component's body`];const C=R.parameters[0]?.name,S=new Map;if(C&&e.isObjectBindingPattern(C))for(const t of C.elements)e.isIdentifier(t.name)&&!t.dotDotDotToken&&S.set(t.name.text,t.name);else s.push("the component does not destructure its props");const B=a.inputs??re(a.args??"").filter(t=>ie.test(t));B.length===0&&s.push(`${a.call}(…) reads no input the rule can check: name the props it reads in \`inputs\`, or bare names in \`args\``);const P=new Set;for(const t of B){const r=S.get(t);if(!r){s.push(`\`${t}\` is not a prop of the component: the call is handed something made in the mount`);continue}h(t).length!==1&&s.push(`\`${t}\` is declared ${h(t).length} times in the file: a second binding would pass for the input`);const o=p(r);o&&P.add(o)}for(const t of x)t.text==="arguments"&&!N(e,t)&&e.findAncestor(t,r=>r===R)&&s.push(`\`arguments\` is used in the component (line ${f(t)}): it is the props by another name`);for(const t of x)(t.text==="eval"||t.text==="Function")&&!N(e,t)&&!d(t)&&!(e.isPropertyAccessExpression(t.parent)&&t.parent.name===t)&&s.push(`\`${t.text}\` is used in the mount file (line ${f(t)}): code run from a string cannot be read`);const z=new Set;for(const t of a.readers??[]){const r=typeof t=="string"?t:t.name,o=c(`the reader ${r}`,r,typeof t=="string"?void 0:t.from);typeof o=="string"?s.push(o):z.add(o)}const Y=t=>{if(!e.isCallExpression(t)||!e.isIdentifier(t.expression))return!1;const r=p(t.expression);return r!==void 0&&z.has(r)};let V=null;const I=l.filter(t=>e.isImportSpecifier(t)&&t.name.text==="Render"),J=a.renderFrom??"efficient-easel/render",ee=I.length===1?I[0].parent.parent.parent.moduleSpecifier.text:"",M=l.filter(t=>e.isImportDeclaration(t)&&e.isStringLiteral(t.moduleSpecifier)&&t.moduleSpecifier.text===J&&!t.importClause?.isTypeOnly).flatMap(t=>{const r=t.importClause;if(!r)return[];const o=r.namedBindings;return[...r.name?[r.name.text]:[],...o&&e.isNamespaceImport(o)?[`* as ${o.name.text}`]:[],...o&&e.isNamedImports(o)?o.elements.filter(u=>!u.isTypeOnly).map(u=>u.propertyName?`${u.propertyName.text} as ${u.name.text}`:u.name.text):[]]});(M.length!==1||M[0]!=="Render")&&s.push(`"${J}" gives this file ${M.length} binding(s) (${M.join(", ")||"none"}), not the one \`Render\``);const q=I.length===1&&!I[0].propertyName&&ee===J?i.getSymbolAtLocation(I[0].name):void 0;if(!q||h("Render").length!==1)s.push(`\`Render\` is not imported once by its own name from "${J}"`);else{const t=x.filter(o=>!N(e,o)&&p(o)===q),r=t.filter(o=>(e.isJsxOpeningElement(o.parent)||e.isJsxSelfClosingElement(o.parent))&&o.parent.tagName===o);if(r.length!==1||t.length!==1)s.push(`\`Render\` is used ${t.length} times, ${r.length} as a tag: one <Render> and no alias`);else{const u=r[0].parent.attributes.properties;u.some(w=>e.isJsxSpreadAttribute(w))&&s.push("the Render tag has a spread attribute, which can hand it another document");const g=u.filter(w=>e.isJsxAttribute(w)&&w.name.getText()==="data"),b=g.length===1?g[0].initializer:void 0,E=b&&e.isJsxExpression(b)?b.expression:void 0;!E||!e.isIdentifier(E)||p(E)!==$?s.push(`the Render tag draws \`${E?E.getText():g.length===1?g[0].getText():"nothing"}\`, not \`${a.variable}\``):V=E;const G=u.filter(w=>e.isJsxAttribute(w)&&w.name.getText()==="keep"),W=G.length===1?G[0].initializer:void 0,F=W&&e.isJsxExpression(W)?W.expression:void 0;if(!F||!e.isIdentifier(F))s.push("the Render tag has no `keep={keep}`: a mount drawn again would remount every slot it holds (lib/document/render-keep)");else{const w=c("the keep hook useRenderKeep","useRenderKeep",a.keepFrom??j);typeof w=="string"&&s.push(w);const D=p(F)?.valueDeclaration;if(!D||!e.isVariableDeclaration(D)||D.parent.parent.parent!==R.body||h(F.text).length!==1)s.push(`\`${F.text}\` (the Render tag's keep) is not declared once at the top level of the component's body: a keep made at module level is shared by every mount and request`);else if(!(e.getCombinedNodeFlags(D)&e.NodeFlags.Const))s.push(`\`${F.text}\` (the Render tag's keep) is not a \`const\`: a keep set again is a new keep`);else{const O=D.initializer;(!O||!e.isCallExpression(O)||O.arguments.length!==0||!e.isIdentifier(O.expression)||typeof w=="string"||p(O.expression)!==w)&&s.push(`\`${F.text}\` is not set straight from useRenderKeep(): a keep made new on each draw keeps nothing`)}}}}const v=new Map;for(const t of P)v.set(t,t.name);$&&v.set($,a.variable);const te=t=>{for(let r=t;r.parent;r=r.parent){const o=r.parent;if(y&&o===y)return y.arguments.some(g=>g===r);if(!(L(e,o)||e.isObjectLiteralExpression(o)||e.isPropertyAssignment(o)&&o.initializer===r||e.isShorthandPropertyAssignment(o)||e.isSpreadAssignment(o)||e.isArrayLiteralExpression(o)||e.isSpreadElement(o)||e.isConditionalExpression(o)&&o.condition!==r||H(e,o)))return!1}return!1},ne=t=>{let r=t,o=!1;for(;;){const u=r.parent;if(!u)return;if(L(e,u))r=u;else if(e.isConditionalExpression(u)&&u.condition!==r)r=u,o=!0;else if(e.isSpreadAssignment(u)&&e.isObjectLiteralExpression(u.parent))r=u.parent,o=!0;else return e.isVariableDeclaration(u)&&u.initializer===r&&e.isIdentifier(u.name)&&o?p(u.name):void 0}},X=(t,r)=>{if(d(t))return!0;const{top:o,path:u}=_(e,t);if(t===V)return!0;let g=o;for(;g.parent&&(L(e,g.parent)||H(e,g.parent));)g=g.parent;if(g.parent&&Y(g.parent)&&g.parent.arguments.some(E=>E===g)||P.has(r)&&te(o))return!0;const b=u?void 0:ne(o);return b?(v.has(b)||v.set(b,b.name),!0):!1};for(let t=-1;t!==v.size;){t=v.size;for(const r of x){if(N(e,r))continue;const o=p(r);o&&v.has(o)&&X(r,o)}}for(const t of x){if(N(e,t))continue;const r=p(t);if(!r||!v.has(r)||X(t,r))continue;const{top:o}=_(e,t),u=v.get(r),g=P.has(r)||r===$?"":" (a local that holds an input or the variable)";s.push(`\`${u}\`${g} is ${ce(e,o)} at line ${f(t)}`)}return s}const j="@/lib/document/render-keep";function de(n,a,e,m){if(!e.includes(m))return!1;const i=n.createSourceFile(a,e,n.ScriptTarget.Latest,!0,a.endsWith(".tsx")?n.ScriptKind.TSX:n.ScriptKind.TS),l=f=>f.some(p=>!p.isTypeOnly&&(p.propertyName??p.name).text==="Render"),x=f=>{if(n.isImportDeclaration(f)&&n.isStringLiteral(f.moduleSpecifier)&&f.moduleSpecifier.text===m){const p=f.importClause;if(!p||p.isTypeOnly)return!1;const h=p.namedBindings;return!!p.name||h!==void 0&&(n.isNamespaceImport(h)||l(h.elements))}if(n.isExportDeclaration(f)&&f.moduleSpecifier&&n.isStringLiteral(f.moduleSpecifier)&&f.moduleSpecifier.text===m){if(f.isTypeOnly)return!1;const p=f.exportClause;return!p||n.isNamespaceExport(p)||l(p.elements)}return n.isCallExpression(f)&&f.arguments.length>0&&n.isStringLiteralLike(f.arguments[0])&&f.arguments[0].text===m&&(f.expression.kind===n.SyntaxKind.ImportKeyword||n.isIdentifier(f.expression)&&f.expression.text==="require")?!0:n.forEachChild(f,x)??!1};return x(i)}const Z=new WeakMap;function ue(n){const a=Z.get(n);if(a)return a;const{check:e,report:m}=U("published mounts fixtures"),i=($,k)=>Q($,k,n),l={call:"publishedPageData",variable:"page",args:"data, metadata",readers:["first"]},x="return <Render config={c} keep={keep} data={page} />;",f=`const page = ${l.call}(data, metadata);`,p="const keep = useRenderKeep();",h=$=>`import { Render } from "efficient-easel/render";
|
|
2
2
|
import { first } from "./first";
|
|
3
|
-
import {
|
|
3
|
+
import { useRenderKeep } from "${j}";
|
|
4
|
+
import { ${l.call} } from "./published-passes";
|
|
4
5
|
export default function P({ data, metadata = {} }: Props) {
|
|
5
|
-
${
|
|
6
|
-
}`,d=m(`${$}
|
|
7
|
-
${x}`),c=h=>m(`${h}
|
|
6
|
+
${p}
|
|
8
7
|
${$}
|
|
9
|
-
|
|
10
|
-
${h}
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
|
|
8
|
+
}`,d=h(`${f}
|
|
9
|
+
${x}`),s=$=>h(`${$}
|
|
10
|
+
${f}
|
|
11
|
+
${x}`),c=$=>h(`${f}
|
|
12
|
+
${$}
|
|
13
|
+
${x}`);e("the one call, drawn, passes",i(d,l).length===0,i(d,l).join("; "));{const $={...l,callFrom:"@/lib/document/published-passes"},k=d.replace('from "./published-passes"',`from "${$.callFrom}"`);e("…the call imported from the module the mount names passes",i(k,$).length===0,i(k,$).join("; ")),e("…and the call imported from another module inside this package fails it",i(d,$).length>0)}e("…a comment naming a wrapper does not fail it",i(`// const page = x(${l.call}(data, metadata));
|
|
14
|
+
${d}`,l).length===0),e("…a path handed to a listed reader does not fail it",i(c("const lead = first(page.content);"),l).length===0),e("…an input spread, and an input as a ternary's last branch, do not fail it",i(c("const facts = ok ? { ...metadata, k: 1 } : metadata;"),l).length===0,i(c("const facts = ok ? { ...metadata, k: 1 } : metadata;"),l).join("; "));{const $="efficient-web-builder/render/lib/document/published-passes",k="efficient-web-builder/render/lib/document/render-keep",y={call:"publishedChromeData",callFrom:$,variable:"data",inputs:["group"],keepFrom:k},T=`import { useRenderKeep } from "${k}";
|
|
15
|
+
`,R=`import { Render } from "efficient-easel/render";
|
|
16
|
+
${T}import { ${y.call} } from "${$}";
|
|
14
17
|
export default function H({ group }: { group: G }) {
|
|
15
|
-
const data = ${
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const data = ${y.call}({ content: [group] } as unknown as D);
|
|
19
|
+
const keep = useRenderKeep();
|
|
20
|
+
return <Render config={c} keep={keep} data={data} />;
|
|
21
|
+
}`;e("…a chrome mount drawing `data={data}` passes",i(R,y).length===0,i(R,y).join("; ")),e("…and a write into its prop fails it",i(R.replace("const data",`group.props = {};
|
|
22
|
+
const data`),y).length>0);const C="<Render config={headerRenderConfig()} keep={keep} data={data} />",S=`import { Render } from "efficient-easel/render";
|
|
23
|
+
${T}import { ${y.call} } from "${$}";
|
|
20
24
|
export default function PublishedHeader({ group }: { group: G }) {
|
|
21
|
-
const data = ${
|
|
25
|
+
const data = ${y.call}({ root: { props: {} }, content: [group], zones: {} } as unknown as D);
|
|
26
|
+
const keep = useRenderKeep();
|
|
22
27
|
return (
|
|
23
28
|
<Bar sticky={sticky}>
|
|
24
|
-
${
|
|
29
|
+
${C}
|
|
25
30
|
</Bar>
|
|
26
31
|
);
|
|
27
|
-
}`;e("…a header mount drawing `data={data}` inside a wrapper passes",
|
|
28
|
-
return (`)],["a property write on `data`",
|
|
29
|
-
return (`)],["a second Render with `data={data}` and a spread",
|
|
30
|
-
<Render data={data} {...extra} />`)],["its call imported from another module",
|
|
31
|
-
${x}`)],["a pass after the call",
|
|
32
|
-
${x}`)],["a reassignment",
|
|
32
|
+
}`;e("…a header mount drawing `data={data}` inside a wrapper passes",i(S,y).length===0,i(S,y).join("; "));const B=[["`data` assigned after the call",S.replace(" return (",` data = extra;
|
|
33
|
+
return (`)],["a property write on `data`",S.replace(" return (",` data.content = [];
|
|
34
|
+
return (`)],["a second Render with `data={data}` and a spread",S.replace(C,`${C}
|
|
35
|
+
<Render data={data} {...extra} />`)],["its call imported from another module",S.replace(`from "${$}"`,'from "./published-passes"')],["no keep on the tag",S.replace(" keep={keep}","")],["its keep hook imported from another module",S.replace(`from "${k}"`,'from "./render-keep"')]];for(const[P,z]of B)e(`…${P} fails it`,i(z,y).length>0)}const K=[["a wrapping pass",h(`const page = extra(${l.call}(data, metadata));
|
|
36
|
+
${x}`)],["a pass after the call",h(`const page = ${l.call}(data, metadata).x;
|
|
37
|
+
${x}`)],["a reassignment",h(`let page = ${l.call}(data, metadata);
|
|
33
38
|
page = extra(page);
|
|
34
|
-
${x}`)],["a pass in the Render prop",
|
|
35
|
-
return <Render data={extra(page)} />;`)],["other arguments",
|
|
36
|
-
${x}`)],["no call at all",
|
|
37
|
-
const page = ${
|
|
38
|
-
${x}`),{...
|
|
39
|
-
${x}`],["a property write",
|
|
40
|
-
d.content = [];`)],["an input aliased",
|
|
41
|
-
c.push(x);`)],["a path alias written",
|
|
42
|
-
r.props = {};`)],["a path assigned to a let",
|
|
43
|
-
c = page.content;`)],["a path handed to a writing call",
|
|
44
|
-
copy.content.push(x);`)],["a path handed to a method that shares a reader's name",
|
|
45
|
-
(f as any).x = 1;`)],["a local from an input's ternary branch, handed to a call",
|
|
46
|
-
mutate(f);`)],["an input assigned an object with no space",
|
|
47
|
-
copy.theme.x = 1;`)],["a spread copy of an input, handed to a call",
|
|
39
|
+
${x}`)],["a pass in the Render prop",h(`${f}
|
|
40
|
+
return <Render data={extra(page)} />;`)],["other arguments",h(`const page = ${l.call}(extra(data), metadata);
|
|
41
|
+
${x}`)],["no call at all",h(x)],["a pass on the input before the call",s("data = extra(data);")],["a compound assignment to the input",s("metadata ??= {};")],["an increment of the input",s("data++;")],["a destructured reassignment of the input",s("({ data } = extra({ data }));")],["an array reassignment of the input",s("[data, metadata] = extra([data, metadata]);")],["a local shadowing the input",s("{ const data = extra(0); }")],["a rebuilt argument named as the args",h(`const d = extra(data);
|
|
42
|
+
const page = ${l.call}(d, metadata);
|
|
43
|
+
${x}`),{...l,args:"d, metadata"}],["an argument that is no prop at all",`const page = ${l.call}(data, metadata);
|
|
44
|
+
${x}`],["a property write",c("page.content = extra(page.content);")],["a deep property write",c("page.root.props = {};")],["a compound property write",c("page.count += 1;")],["a bracket write",c('page["content"] = [];')],["an optional-path write",c("page.root!.props = {};")],["a delete",c("delete page.root;")],["Object.assign into it",c("Object.assign(page, extra(page));")],["the variable handed whole to a call",c("mutate(page);")],["the variable aliased",c("const shown = page;")],["a push on a path from it",c("page.content.push(extra(0));")],["a splice on an optional path from it",c("page.content?.splice(0, 1);")],["a sort on a bracket path from it",c('page["content"].sort();')],["an input handed to a pass through a cast",s("inPlacePass(data as Doc);")],["an input handed whole to a call",s("mutate(data);")],["a push through a cast of an input",s("(data as Doc).content.push(x);")],["a property write through a cast of an input",s("(metadata as any).x = 1;")],["a property write through an old-style cast",s("(<any>metadata).x = 1;")],["a property write through a non-null input",s("(metadata!).x = 1;")],["a push on a non-null input",s("data!.content.push(x);")],["an input aliased through a cast, then written",s(`const d = data as any;
|
|
45
|
+
d.content = [];`)],["an input aliased",s("const d = data;")],["an input path aliased",s("const p = metadata.facts;")],["a path value bound to a local",c("const one = page.content.length === 1;")],["a path alias pushed into",c(`const c = page.content;
|
|
46
|
+
c.push(x);`)],["a path alias written",c(`const r = page.root;
|
|
47
|
+
r.props = {};`)],["a path assigned to a let",c(`let c;
|
|
48
|
+
c = page.content;`)],["a path handed to a writing call",c("mutate(page.content);")],["a path's forEach writing",c("page.content.forEach((s) => { s.props = {}; });")],["a path's for-of writing",c("for (const s of page.content) s.props.x = 1;")],["a path in an array literal",c("const all = [page.content];")],["the variable spread into a copy",c(`const copy = { ...page };
|
|
49
|
+
copy.content.push(x);`)],["a path handed to a method that shares a reader's name",c("evil.first(page.content);")],["a local from an input's ternary branch, written through a cast",s(`const f = ok ? {} : metadata;
|
|
50
|
+
(f as any).x = 1;`)],["a local from an input's ternary branch, handed to a call",s(`const f = ok ? {} : metadata;
|
|
51
|
+
mutate(f);`)],["an input assigned an object with no space",s("data={content: [], root: {}};")],["an input assigned a cast object with no space",s("data={ content: [] } as unknown;")],["a second input assigned with no space",s("metadata={k: 1};")],["an input assigned a string with no space",s('data="";')],["the variable assigned with no space",c("page={content: [], root:{props:{}}} as any;")],["a spread copy of an input, written deep",s(`const copy: any = { ...metadata };
|
|
52
|
+
copy.theme.x = 1;`)],["a spread copy of an input, handed to a call",s(`const copy = { ...metadata };
|
|
48
53
|
mutate(copy);`)],["a reader declared in the mount",`${d}
|
|
49
54
|
function first(x) { x.content = []; }`],["a reader declared as a local arrow",`${d}
|
|
50
55
|
const first = (x) => { x.content = []; };`],["a reader that is not imported",d.replace(`import { first } from "./first";
|
|
51
|
-
`,"")],["eval",
|
|
56
|
+
`,"")],["eval",c('eval("page.content = []");')],["new Function",c('new Function("p", "p.content = []")(page);')],["Function called",c('Function("p", "p.content = []");')],["a call in a class extends clause",c("class W extends (mutate(page), Object) {}")],["a call in an instantiation expression",c("const g = (mutate(page), id)<number>;")],["a Render from another module",d.replace('from "efficient-easel/render"','from "./fake-render"')],["a second Render import, renamed",d.replace('import { Render } from "efficient-easel/render";',`import { Render } from "efficient-easel/render";
|
|
52
57
|
import { Render as Second } from "efficient-easel/render";`)],["a namespace import of Render's module",d.replace('import { Render } from "efficient-easel/render";',`import { Render } from "efficient-easel/render";
|
|
53
58
|
import * as E from "efficient-easel/render";`)],["a default import of Render's module",d.replace('import { Render } from "efficient-easel/render";',`import { Render } from "efficient-easel/render";
|
|
54
|
-
import E from "efficient-easel/render";`)],["the call declared in the mount, not imported",`${d.replace(`import { ${
|
|
59
|
+
import E from "efficient-easel/render";`)],["the call declared in the mount, not imported",`${d.replace(`import { ${l.call} } from "./published-passes";
|
|
60
|
+
`,"")}
|
|
61
|
+
function ${l.call}(d, m) { const x: any = d; x.content = []; return x; }`],["the call declared again beside its import",`${d}
|
|
62
|
+
function ${l.call}(d, m) { return d; }`],["the call imported from outside this package",d.replace('from "./published-passes"','from "evil-passes"')],["another function imported as the call",d.replace(`import { ${l.call} }`,`import { evilPass as ${l.call} }`)],["the call as a type-only import",d.replace(`import { ${l.call} }`,`import type { ${l.call} }`)],["no keep on the tag",d.replace(" keep={keep}","")],["a keep made at module level",d.replace(`${p}
|
|
63
|
+
`,"").replace("export default function",`const keep = createRenderKeep();
|
|
64
|
+
export default function`)],["a keep made new on each draw",d.replace(p,"const keep = createRenderKeep();")],["a keep wrapped in a call",d.replace(p,"const keep = other(useRenderKeep());")],["a keep set again",d.replace(p,`let keep = useRenderKeep();
|
|
65
|
+
keep = createRenderKeep();`)],["a keep hook declared in the mount",`${d.replace(`import { useRenderKeep } from "${j}";
|
|
55
66
|
`,"")}
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
${x}`),{call:p.call,variable:"page",args:"{ ...data }"}],["a call with no args and no inputs named",d,{call:p.call,variable:"page"}]];for(const[h,g,b]of C)e(`…${h} fails it`,o(g,b??p).length>0);const A=u().checks;return U.set(n,A),A}function le(n,a){const{check:e,report:u}=M("published mounts"),o=a.ts;if(!e("the rule is handed the compiler (`options.ts`)",o!==void 0,"a host passes `ts` from its own typescript"))return u();for(const $ of ie(o))e($.name,$.ok,$.detail);const p=n.filter($=>/\.tsx?$/.test($.path));e(`the source scan reached the tree (${p.length} TS/TSX files, at least ${a.minFiles})`,p.length>=a.minFiles);const x=Object.keys(a.mounts);e("at least one published mount is named",x.length>0);for(const $ of x){const m=p.find(c=>c.path===$);if(!e(`${$} is here`,m!==void 0,"a stale row would shelter nothing"))continue;const d=G(m.text,a.mounts[$],o);e(`${$} draws exactly what ${a.mounts[$].call} returns — a pass belongs in lib/document/published-passes`,d.length===0,d.join("; "))}return u()}export{G as mountProblems,le as publishedMounts};
|
|
67
|
+
function useRenderKeep() { return new WeakMap(); }`],["a keep hook from outside this package",d.replace(`from "${j}"`,'from "evil-keep"')],["a keep hook from another module of this package",d.replace(`from "${j}"`,'from "./render-keep"')],["a call with no input it can check",h(`const page = ${l.call}({ ...data });
|
|
68
|
+
${x}`),{call:l.call,variable:"page",args:"{ ...data }"}],["a call with no args and no inputs named",d,{call:l.call,variable:"page"}]];for(const[$,k,y]of K)e(`…${$} fails it`,i(k,y??l).length>0);const A=m().checks;return Z.set(n,A),A}function ge(n,a){const{check:e,report:m}=U("published mounts"),i=a.ts;if(!e("the rule is handed the compiler (`options.ts`)",i!==void 0,"a host passes `ts` from its own typescript"))return m();for(const p of ue(i))e(p.name,p.ok,p.detail);const l=n.filter(p=>/\.tsx?$/.test(p.path));e(`the source scan reached the tree (${l.length} TS/TSX files, at least ${a.minFiles})`,l.length>=a.minFiles);const x=Object.keys(a.mounts);e("at least one published mount is named",x.length>0);const f=new Set(x.map(p=>a.mounts[p].renderFrom??"efficient-easel/render"));for(const p of l)!x.includes(p.path)&&[...f].some(h=>de(i,p.path,p.text,h))&&e(`${p.path} draws easel Render: it is a named published mount (a row), or the rule never reads it`,!1,"add its row to the mounts this repository names");for(const p of x){const h=l.find(s=>s.path===p);if(!e(`${p} is here`,h!==void 0,"a stale row would shelter nothing"))continue;const d=Q(h.text,a.mounts[p],i);e(`${p} draws exactly what ${a.mounts[p].call} returns — a pass belongs in lib/document/published-passes`,d.length===0,d.join("; "))}return m()}export{Q as mountProblems,ge as publishedMounts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as P,jsx as e,jsxs as A}from"react/jsx-runtime";import{useContext as mr,useId as fr,useState as hr}from"react";import Cr from"./BoxTabs.js";import{AccordionRowStyleContext as Qe,BoxTabPaneContext as eo,useAccordionRowStyle as br,useBoxPaneKind as Sr,useFirstCopyOpens as wr,useIsTabPane as pr}from"./BoxTabPaneContext.js";import xr,{ACCORDION_COUNTER_RESET as _r}from"./BoxAccordionRow.js";import{ACCORDION_MARK_SHEET as vr}from"./AccordionMark.js";import{EDGE_LINE_ATTRS as Rr}from"../../format/lib/content/view-lines.js";import{accordionRowStyleOf as Or}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as Pr,boxPhoneOrder as Ar}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as _s,InBoxContext as vs,useCellOfStretchedRow as Lr,useFillsCell as $r}from"./InBoxContext.js";import yr,{InsideSiteColumn as Rs,useInsideSiteGutter as Nr,useSectionRoot as Er}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Ir}from"./BoxSurfaceContext.js";import kr from"./PictureWash.js";import{BoxCellContext as Os,NoCellBound as Br}from"./BoxCellContext.js";import{boxCellFractions as gr}from"../lib/content/box-cell-bound.js";import{boundOf as Tr}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as Fr}from"./PhoneMenuTools.js";import{useCardRow as Hr}from"./CardRowContext.js";import{cardLineBetween as oo,framesItsCards as Dr}from"../../format/lib/content/card-place.js";import{rowLinkText as Vr}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as Mr,MirrorContext as Gr,RowHandContext as Ps,boxPlace as Wr,useHandedMirrorAbove as Xr,useHandedRows as jr,useMirroredCopy as Kr,useUnderCardBox as Ur}from"./MirrorContext.js";import{boxChildrenHand as zr,isMirroredCopy as Yr,mirrorCardsActs as As,mirrorCardsOf as Jr,mirroredBoxClass as Zr,MIRROR_ROW_CLASS as qr,ownsCard as Qr}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as so,frameGutterOf as et}from"./BlockFrame.js";import{BOX_SIDE_SPACE_SITE as ot,boxSideSpaceOf as st}from"../../format/lib/content/box-side-space.js";import{containerGapProps as Ls}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as nt,boxAlignViewClasses as rt,boxBlockSpacingClass as tt,boxBlockSpacingViewClasses as lt,boxJustifyViewClasses as it,boxWrapTabletClass as ct,boxFitContentClass as at,boxAccordionColumnsClass as $s,boxRowColumnsClass as dt,boxRowTabletColumnsClass as ut,boxRowTabletShareClass as mt,boxPhoneCellsShareLine as ft,boxPhoneRowClasses as ce,boxPhoneRowFits as ys,boxShareClasses as U,boxShareVars as ht,boxWrapClass as Ct,BOX_GAP_ONLY_CLASS as bt}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as St,boxSeparatorSeamClass as wt,boxSeparatorStyle as pt,isStripBox as xt}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as _t,DEFAULT_LOOP_DIRECTION as vt,DEFAULT_LOOP_SECONDS as Rt,isVerticalLoop as Ot}from"../../format/lib/animation/index.js";import{LoopTrack as Pt}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as L,BOX_OWNS_SIDES_CLASS as At,boxDarkenStyle as Ns,boxPaintOf as Lt,boxFillFadeStyle as $t,boxFillViews as yt,boxPlacementClasses as Nt,boxCardProps as Et,boxIsCard as Es,boxRowPicture as It,boxSwatchFill as kt,boxWashViews as Bt,CARD_NO_LIFT_CLASS as gt,CARD_SHADOW_CLASS as Tt,isBackgroundBox as _e}from"../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as x}from"../../format/lib/content/box-card-rule.js";import{boxShadowAttrs as Ft,boxShadowOnAnyView as Ht,boxShadowViewAttrs as Dt}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Vt,drawsSiteGutter as Mt}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Gt,boxShapeClasses as Wt}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as Xt}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as jt,BOX_LINK_ATTR as Is,BOX_LINK_CLASS as ks,BOX_LINKED_CLASS as Kt,boxJumpBlocksClass as Ut,boxJumpCss as zt,boxJumpSlug as Yt,boxLinkOf as Jt,siteLinkDraws as Zt}from"../../format/lib/content/box-link.js";import{SiteLink as qt}from"../lib/site-runtime.js";import{sectionBorderStyle as Bs}from"../../format/lib/content/borders.js";import{finiteNumber as ve}from"../../format/lib/finite-number.js";import{padDefaultIn as $,padSideValue as Re,sectionPadAttrs as Qt}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as Oe}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as el,rowFillInkStyle as ol}from"../../format/lib/content/ink.js";import{useThemeLightInk as sl}from"./ThemeLightInkContext.js";import{sizedBackground as no}from"../../format/lib/sized-image.js";import{BOX_REVEAL_CLASS as nl,BOX_REVEAL_CSS as rl,BOX_REVEAL_SHEET as tl,PHOTO_HOST_ATTR as ll,resolveImageTreatment as il}from"../../format/lib/content/image-treatment.js";import cl,{HoverArrowsSlot as al,HoverMediaArrows as dl}from"./HoverMediaLayer.js";import{HOVER_ARROWS_HOST_ATTR as ul,HOVER_ARROWS_HOST_CLASS as ml,HOVER_LAYER_GROUND as fl,cardRowHoverMedia as hl,hoverLayerName as Cl}from"../../format/lib/content/hover-media.js";import{BOX_HIGHLIGHT_CLASS as bl,BOX_HIGHLIGHT_OVER_ROW_INK_CLASS as Sl,BOX_SHOW_ON_CARD_HOVER as wl}from"../../format/lib/animation/hover.js";import{BoxRail as pl,BoxRailStop as xl,RAIL_STOPS_CLASS as _l,useTimelineRail as vl}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as Rl,sharedColumnsClasses as Ol,sharedColumnsCss as Pl,sharedRowsClasses as Al,sharedRowsCss as Ll}from"../lib/content/box-shared-columns.js";import gs from"./PhotoHoverSheet.js";import{PICTURE_FRAME_ONLY as $l,PictureHoverMoveSheet as yl,PictureHoverZoom as Nl,pictureHoverMoveOf as El}from"./PictureHoverMove.js";import{BOX_DESKTOP_LINE as Il,stackGutterClass as kl,stackLineCss as Bl,stackOuterClass as gl,stackRowClass as Tl,storedStackLine as ro}from"../lib/content/box-stack-line.js";const to={"--sf-site-gutter":"0px"},Fl={overflowX:"clip",overflowY:"visible"},Hl={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},Ts={desktop:!1,phone:!1},Fs="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-wide:bg-[image:var(--sf-box-bg-p)]",lo=u=>u==null||u==="",io=u=>!lo(u)&&Number(u)===0;function Dl({children:u}){return e(P,{children:u(fr())})}function Vl({direction:u,label:Hs,tabShape:Ds,gap:co,gapPhone:Vs,gapTablet:Pe,justify:z,align:y,wrap:ae,share:Ms,sharePhone:T,shareTablet:F,wrapPhone:Gs,orderPhone:Ws,phoneRow:C,columns:m,columnsTablet:H,separator:f,stackBelow:de,blockSpacing:ao,bgImage:Xs,bgImagePhone:js,rowImage:Ks,hoverShow:Us,pictureHover:D,darken:Ae,darkenStyle:ue,darkenTablet:zs,darkenPhone:Ys,darkenStyleTablet:Js,darkenStylePhone:Zs,placement:qs,padV2:uo=!1,border:Qs,borderTablet:en,borderPhone:on,borderUnits:mo,pad:r={},contained:Le=!0,fillHeight:N=!1,shadow:$e,shadowTablet:fo,shadowPhone:ho,justifyTablet:Co,justifyPhone:sn,alignTablet:nn,alignPhone:rn,wrapTablet:bo,blockSpacingTablet:tn,blockSpacingPhone:ln,loop:b,scrollDirection:ye=vt,loopSeconds:cn=Rt,loopDelay:an=_t,editing:E=!1,fillColor:So,fillColorTablet:dn,fillColorPhone:un,fillFade:mn,swatch:fn,line:_,upcoming:hn,link:Cn,rowLink:wo,highlight:bn,boxShape:po,boxShapePhone:Sn,boxShapeTablet:wn,angle:pn,jumpHighlight:xn,anchor:_n,sharedSides:vn=Ts,sharedRows:Rn=!1,boxId:V,slotCount:On,mirrorCards:xo,content:c,rowTitle:Ne,startsOpen:Pn,rowStyle:An,sideSpace:Ln}){const n=Hr(),I=Et({[x]:Ks},n!==null)[x],_o=Es({[x]:I}),a=_o?Ts:vn,$n=_o?!1:Rn,vo=It({[x]:I},n?.row),S=vo??Xs,Ee=vo===null?js:void 0,Ro=mr(Os),[Oo,yn]=hr(null),Nn=Xr(),Po=Ur()&&!(Nn&&n!==null),v=jr(),h=Qr({inCopy:n!==null,nestedCopy:n?.nested===!0,underBox:Po}),Ie=Us===wl&&n!==null&&!h&&!(E&&n.previewHover===!0),Ao=oo(Qs,n,h),Lo=oo(en,n,h),$o=oo(on,n,h),yo=n===null&&!Po&&v?.ids&&V?v.ids.indexOf(V):-1,me=yo>=0&&v&&V?Wr(v,V,yo):-1,w=me>=0?v?.hand??null:h&&v?.copies===!0?v.hand:null,s=w?.row?"row":u,d=w?.row?w.row.share:Ms,En=w?.row?w.row.phoneReverse?[...c.blockIds??[]].reverse():void 0:Ws,fe=$n&&!w?.row,M=E?"":wo&&n?Vr(n.row,wo)??"":Jt(Cn),R=N?"":Wt(po,Sn,wn),In=!N&&Gt(po)!=="",k=Yt(xn,_n),ke=kt({swatch:fn},n?.row),Y=ke??Lt(So),B=ke?{className:"",style:{}}:yt(So,dn,un),kn=sl(),No=ol(ke,kn??void 0),Bn=_e(S)||_e(Ee),gn=(Y||B.className)&&!Bn?$t(mn):null,Eo=Y||B.className?{...Y?{backgroundColor:Y}:{},...B.style,...gn,...No}:void 0,Io=vl(),J=_===!0&&s!=="tabs"&&s!=="accordion",t=Es({bgImage:S,[x]:I}),ko=Xt(pn),Bo=t?void 0:Eo,he=t?null:bn??null,Tn=ko||he?{...Bo,...ko,...he}:Bo,Ce=Fr(),Fn=Er(),Hn=pr(),go=Sr(),To=br(),Dn=wr(),l=s==="accordion",Be=Or(An),Z=l&&Be==="numbered",ge=l&&Be==="chevron",Te=$r(),Vn=Lr(),G=xt(s,f),i=b==="scroll"&&s!=="tabs"&&!l,Mn=Kr(),be=h||me>=0&&w!==null,Fo=w?w.mirror:xo,Gn=me>=0?me:n?.index,q=h&&Dr(n?.ownerType),Ho=As({direction:s,separator:f,loop:b,line:_,bgImage:S,[x]:I,columns:m,columnsTablet:H,share:d,wrap:ae},be,a.desktop)&&Yr(Fo,Gn),Wn=As({direction:s,separator:f,loop:b,line:_,bgImage:S,[x]:I,columns:m,columnsTablet:H,share:d,wrap:ae},be,a.desktop)&&Jr(Fo)!==null,W=dt({direction:s,separator:f,loop:b,line:_,columns:m}),g=ut({direction:s,separator:f,loop:b,line:_,columnsTablet:H}),Q=mt({direction:s,separator:f,loop:b,line:_,columns:m,columnsTablet:H,share:d,shareTablet:F}),ee=st(Ln)===ot,Fe=et(ee),Do=J&&ro(de)===Il,X=s==="row"&&!t&&!G&&!i&&(!J||Do)&&g===""&&Q===""?ro(de):void 0,j=X??(s==="column"&&!t?ro(de):void 0),Xn=Nr(),Se=Ol(a,c.blockCount??0,X),jn=(Se&&(!n||n.index===0)?Pl(a,c.blockCount??0,X):"")+(fe&&(!n||n.index===0)?Ll(fe,c.blockCount??0):""),Vo=Al(fe,c.blockCount??0),Mo=g!==""?Number(H)>=2:Q===""||U(F)!=="",Go=g!==""||Q!=="",He=s==="row"&&!G&&!i&&_!==!0,De=He&&!a.phone&&!a.desktop?Pr(Ar(En,c.blockIds??[]),{editing:E}):void 0,Wo=De!==void 0&&!E,Kn=W!==""?Number(m)>=2:U(d)!=="",Xo=!t&&!l&&!Wn&&!a.desktop&&!a.phone,we=Xo&&!i?it(z,Co,sn):"",Ve=t||be?"":Zr(Mn,s,i?void 0:z,y,we?Co:void 0),Un=/view-wide:max-view-desktop:justify-/.test(Ve)?we.split(" ").filter(o=>!o.startsWith("view-wide:max-view-desktop:justify-")).join(" "):we,zn=Xo&&s==="row"?rt(y,nn,rn):"",Yn=!i&&!l&&W===""&&g===""&&!a.desktop?ct(ae,bo):"",jo=[l?"":U(d),s==="row"?at(d):"",W,g,Q,tt(l?"gap":ao),St(s,f),l&&!Z&&!ge?"border-t border-line":"",Un,zn,Yn,l?"":lt(ao,tn,ln),l?$s(m,C,Z||ge):"",Z?_r:""].filter(Boolean).join(" "),Jn=jo?` ${jo}`:"",Ko=["flex",s==="row"?G||i?"flex-row":`flex-row ${ce(C,T,Gs,bo)}`:"flex-col",Ct(i||l?!1:ae),t?Nt(qs??"center",s):nt(i||l?void 0:z,l?void 0:y)+(Ve?` ${Ve}`:"")].join(" ")+Jn,oe=N||t||R||Te?` ${Oe}`:"",Me=In?` ${R}`:R?`${oe} ${R}`:oe,Uo=Vn&&s==="column"&&!t&&!i&&U(d)===""&&(typeof z=="string"&&z!=="start"||we!==""),zo=oe||(Uo?` ${Oe}`:""),Ge=M?` ${Kt}`:"",We=t||Ce||uo?"":" py-6",Zn=X===void 0?"":` ${Tl(X)}`,Yo=j===void 0||ee?"":` ${kl(j)}`,Xe=j===void 0?"":` ${gl(j)}`,qn=`${so}${We} ${Fe}${Me}${Ge}${Yo}${Xe}`,Qn=Ce?`${Me}${Ge}${Xe}`.trim():`w-full${We}${Me}${Ge}${Xe}`,se=(Z||ge)&&$s(m,C)===""?Ls("Flex",0,"block"):Ls("Flex",co,s==="row"?"inline":"block",Vs,G||i?void 0:Pe),Jo=ht(d,F,s==="row"?c.blockCount??0:0),Zo=G?{...se.style,...pt(s,f)}:se.style,er=Jo?{...Zo,...Jo}:Zo,je=(o="")=>e(c,{className:`${Ko}${Ho?` ${qr}`:""}${se.className}${zo}${Zn}${o?` ${o}`:""}${J?` ${_l}`:""}${k?` ${Ut(k)}`:""}${Se}${Vo}`,style:er,minEmptyHeight:120,...De?{cell:De}:null}),qo=Ot(ye)?"":wt(s,f),Qo=i?e(Pt,{direction:ye,seconds:cn,delay:an,editing:E,copy:o=>je(o&&qo?`${o} ${qo}`:o)}):Z?A(P,{children:[e("style",{children:vr}),je()]}):je(),Ke=s==="tabs"?e(Cr,{className:`${Ko}${se.className}${Te&&!N&&!t&&!R?"":oe}`,style:se.style,shape:Ds,children:Qo}):Qo,Ue=l?e(eo.Provider,{value:"accordion",children:e(Qe.Provider,{value:Be,children:Ke})}):go?e(eo.Provider,{value:!1,children:e(Qe.Provider,{value:"plain",children:Ke})}):Ke,es=s==="row"&&!t&&(y===void 0||y==="stretch"),or={stretchedRow:es,fillingColumn:s==="column"&&(Te||Uo),columnsRow:W!==""||g!==""||Se!==""||Vo!==""||s==="row"&&(Array.isArray(d)||Array.isArray(F))||Wo,...Wo?{phoneCells:!0}:null,...es&&He&&(c.blockCount??0)>=2&&Kn?{picturesFillRow:!0}:null,...Go&&!Mo?{fillFrom:"desktop"}:null,...ft(C,T)&&(!Go||Mo)?{phoneRowFills:!0}:null,...He&&ys(C,T)?{phoneRowFits:!0}:null,...i?{loops:!0}:null,...V?{id:V}:null},os=n===null?zr({direction:s,loop:b,bgImage:S,[x]:I,columns:m,mirrorCards:xo},!1):null,ss=os?e(Ps.Provider,{value:{hand:os,ids:c.blockIds??[],boxes:[]},children:Ue}):v?e(Ps.Provider,{value:null,children:Ue}):Ue,ns=e(vs.Provider,{value:or,children:e(_s.Provider,{value:!1,children:be?e(Gr.Provider,{value:Ho,children:e(Mr.Provider,{value:!h,children:ss})}):ss})}),sr=Ne?.blockCount??0,rs=go==="accordion"&&!!Ne&&(E||sr>0)?e(xr,{startsOpen:Pn===!0||Dn&&h&&n?.index===0,editing:E,numbered:To==="numbered",chevron:To==="chevron",title:e(vs.Provider,{value:Hl,children:e(_s.Provider,{value:!1,children:e(eo.Provider,{value:!1,children:e(Qe.Provider,{value:"plain",children:e(Ne,{className:`min-w-0 flex-1 ${bt}`,minEmptyHeight:24})})})})}),children:ns}):ns,ze=J?e(pl,{row:s==="row",stops:c.blockCount??0,desktopLine:X!==void 0&&Do,children:rs}):rs,nr=Hs?.trim()||(Hn?"":void 0),rr={values:r,frame:We?24:0},tr=o=>Io?e(xl,{on:Io,future:hn===!0,children:o}):o,lr=o=>Zt(M)?e(qt,{href:M,newTab:"auto",className:ks,"aria-labelledby":o,[Is]:""}):e("a",{href:M,className:ks,"aria-labelledby":o,[Is]:""}),ts=(k?zt(k):"")+jn+(j===void 0||n&&n.index!==0?"":Bl(j,{gutter:!ee})),ls=ts?e("style",{dangerouslySetInnerHTML:{__html:ts}}):null,ne=Vt({loop:b,direction:s,scrollDirection:ye,bgImage:S,[x]:I}),ir=a.desktop&&Se!==""&&!Y&&!B.className&&!Bs(Ao,$o,Lo,mo)&&!Ht($e,fo,ho)&&!M&&!R&&!N&&!k&&!Mt(Le&&!ne,Xn)&&io(co)&&(lo(Pe)||io(Pe))&&uo&&Object.values(r).every(o=>lo(o)||io(o)),cr=o=>({...Rr,...ir?{[Rl]:""}:null,...t?null:{...Ft($e),...Dt($e,fo,ho)},...k?{[jt]:k}:null,...o?{id:o}:null}),is=W!==""?Number(m):0,ar=ce(C,T)===ce(void 0),dr=(s==="column"||s==="row"&&!G&&!i&&(is===1&&ar||is===0&&c.blockCount===1))&&!t&&!J&&!Ce,cs=t&&Fn&&!Ce,pe=!t&&n!==null?Ns(Ae,ue):null,as=Ie||pe?A(P,{children:[Ie?e(gs,{sheet:rl,name:tl}):null,pe?e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",style:pe}):null]}):null,ds=[Ie?nl:"",pe?"relative isolate":""].filter(Boolean).join(" "),us=o=>as?A(P,{children:[as,o]}):o,ms=(o,O)=>tr(e(yr,{contained:Le&&!ne,style:ne?to:void 0,framedClass:qn,fillClass:Qn,columnClass:`${so} ${Fe}${zo}${Yo}`,tabLabel:nr,pad:t?void 0:rr,border:Bs(Ao,$o,Lo,mo),outerAttrs:cr(O),box:!0,edge:dr,outerStyle:Tn,outerClass:t?ds||void 0:[B.className,he?bl:"",he&&No?Sl:"",ds].filter(Boolean).join(" ")||void 0,bleed:cs,siteSide:ee,children:ls||O?A(P,{children:[ls,O?lr(O):null,ne?e(Rs,{children:o}):o]}):ne?e(Rs,{children:o}):o})),Ye=o=>M?e(Dl,{children:O=>ms(us(o),O)}):ms(us(o)),fs=o=>Ro.bound?e(Br,{children:o}):o;if(!t){const o=y===void 0||y==="stretch",O=(U(d)!==""||W!==""||g!=="")&&!ys(C,T)&&!(Q!==""&&U(F)==="")&&(o||ce(C)!==ce(void 0));if(!(s==="row"?O:s==="column"&&o))return Ye(fs(ze));const xs=gr({direction:s,separator:f,loop:b,line:_,share:d,shareTablet:F,sharePhone:T,phoneRow:C,columns:m,columnsTablet:H,stackBelow:de,shared:a.desktop||a.phone||fe,count:On}),ur={hasWidth:!0,...xs?{bound:Tr(xs,Ro.bound)}:null};return Ye(e(Os.Provider,{value:ur,children:ze}))}const re=_e(S),te=re?Ns(Ae,ue):null,xe=re?Bt({darken:Ae,darkenStyle:ue,darkenTablet:zs,darkenStyleTablet:Js,darkenPhone:Ys,darkenStylePhone:Zs}):{className:"",style:{}},Je=_e(Ee),hs=re?Je?{"--sf-box-bg":no(S??""),"--sf-box-bg-p":no(Ee??"")}:{backgroundImage:no(S??""),backgroundSize:"cover",backgroundPosition:"center"}:{},Cs=il(void 0,void 0,D),K=Cs.className?Cs:null,le=re&&n&&D?.kind==="nextImage"&&D.media?hl(n,D.media):null,p=re?El(D,ue)??(le?$l:null):null,bs=D?.media?.cover??"picture",Ze=le?e("div",{className:`absolute inset-0 isolate${q?" rounded-[inherit]":""}`,children:e(al.Provider,{value:yn,children:e(cl,{media:le,name:Cl(n?.row),cover:bs,ground:fl[bs],arrowsAbove:!0})})}):null,ie=K!==null||!!p?.zoom,Ss=ie?e("div",{"aria-hidden":!0,className:`absolute inset-0${q?" rounded-[inherit]":""}${Je?` ${Fs}`:""}${K?` ${K.className}`:""}`,style:{...hs,...K?.style??{}}}):null,qe=Qt({...r,top:ve(r.top)??$(L.desktop,r.unit,"desktop"),bottom:ve(r.bottom)??$(L.desktop,r.unit,"desktop"),topPhone:ve(r.topPhone)??$(L.phone,r.unitPhone,"mobile"),bottomPhone:ve(r.bottomPhone)??$(L.phone,r.unitPhone,"mobile"),left:Re(r.left)??$(L.side,r.unit,"desktop"),right:Re(r.right)??$(L.side,r.unit,"desktop"),leftPhone:Re(r.leftPhone)??$(L.sidePhone,r.unitPhone,"mobile"),rightPhone:Re(r.rightPhone)??$(L.sidePhone,r.unitPhone,"mobile"),sideSpace:ee?"site":"box"}),ws=e("div",{className:`relative z-[1] ${At} ${qe?.className??""}${N||R?` ${Oe}`:""}`.trimEnd(),style:te?{...qe?.style,...to,...el}:{...qe?.style,...to},children:fs(ze)}),ps=cs&&Le?e("div",{className:`${so} ${Fe}${N||R?` ${Oe}`:""}`,children:ws}):ws;return Ye(e(P,{children:A("div",{className:`relative isolate overflow-hidden ${Tt}${n!==null&&!h?` ${gt}`:""}${oe}${Je&&!ie?` ${Fs}`:""}${B.className?` ${B.className}`:""}${p?` ${p.className}`:""}`,style:{...q?Fl:{},...Eo,...ie?{}:hs,...p?p.style:{}},...K||le?{[ll]:""}:{},children:[e(yl,{move:p}),ie&&A(P,{children:[e(gs,{sheet:K?.sheet}),p?.zoom?e("div",{className:`absolute inset-0 overflow-hidden${q?" rounded-[inherit]":""}`,children:A(Nl,{move:p,className:"absolute inset-0",children:[Ss,Ze]})}):A(P,{children:[Ss,Ze]})]}),!ie&&Ze,e(kr,{wash:te&&xe.className?{...te,...xe.style}:te,hover:p?.washHover,...q?{className:"rounded-[inherit]"}:{},...xe.className?{restClassName:xe.className}:{}}),te?e(Ir,{children:ps}):ps,le?e("div",{[ul]:"",className:ml,children:Oo?e(dl,{state:Oo}):null}):null]})}))}export{Vl as default};
|
|
1
|
+
import{Fragment as P,jsx as e,jsxs as A}from"react/jsx-runtime";import{useContext as bt,useId as St,useState as wt}from"react";import pt from"./BoxTabs.js";import{AccordionRowStyleContext as eo,BoxTabPaneContext as oo,useAccordionRowStyle as xt,useBoxPaneKind as _t,useFirstCopyOpens as vt,useIsTabPane as Rt}from"./BoxTabPaneContext.js";import Ot,{ACCORDION_COUNTER_RESET as Pt}from"./BoxAccordionRow.js";import{ACCORDION_MARK_SHEET as At}from"./AccordionMark.js";import{EDGE_LINE_ATTRS as Lt}from"../../format/lib/content/view-lines.js";import{accordionRowStyleOf as $t}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as yt,boxPhoneOrder as Nt}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as As,InBoxContext as Ls,useCellOfStretchedRow as Et,useFillsCell as kt}from"./InBoxContext.js";import It,{InsideSiteColumn as $s,useInsideSiteGutter as Bt,useSectionRoot as gt}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Tt}from"./BoxSurfaceContext.js";import Ft from"./PictureWash.js";import{BoxCellContext as ys,NoCellBound as Ht}from"./BoxCellContext.js";import{boxCellFractions as Dt}from"../lib/content/box-cell-bound.js";import{boundOf as Vt}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as Mt}from"./PhoneMenuTools.js";import{useCardRow as Wt}from"./CardRowContext.js";import{cardLineBetween as so,framesItsCards as Gt}from"../../format/lib/content/card-place.js";import{rowLinkText as Xt}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as jt,MirrorContext as Kt,RowHandContext as Ns,boxPlace as Ut,useHandedMirrorAbove as zt,useHandedRows as Yt,useMirroredCopy as Jt,useUnderCardBox as Zt}from"./MirrorContext.js";import{boxChildrenHand as qt,isMirroredCopy as Qt,mirrorCardsActs as Es,mirrorCardsOf as er,mirroredBoxClass as or,MIRROR_ROW_CLASS as sr,ownsCard as nr}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as no,frameGutterOf as tr}from"./BlockFrame.js";import{BOX_SIDE_SPACE_SITE as rr,boxSideSpaceOf as lr}from"../../format/lib/content/box-side-space.js";import{containerGapProps as ks}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as ir,boxAlignViewClasses as cr,boxBlockSpacingClass as ar,boxBlockSpacingViewClasses as dr,boxJustifyViewClasses as ur,boxWrapTabletClass as mr,boxFitContentClass as fr,boxAccordionColumnsClass as Is,boxRowColumnsClass as hr,boxRowTabletColumnsClass as Cr,boxRowTabletShareClass as br,boxPhoneCellsShareLine as Sr,boxPhoneRowClasses as ce,boxPhoneRowFits as Bs,boxShareClasses as L,boxShareVars as wr,boxWrapClass as pr,BOX_GAP_ONLY_CLASS as xr}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as _r,boxSeparatorSeamClass as vr,boxSeparatorStyle as Rr,isStripBox as Or}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Pr,DEFAULT_LOOP_DIRECTION as Ar,DEFAULT_LOOP_SECONDS as Lr,isVerticalLoop as $r}from"../../format/lib/animation/index.js";import{LoopTrack as yr}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as $,BOX_OWNS_SIDES_CLASS as Nr,boxDarkenStyle as gs,boxPaintOf as Er,boxFillFadeStyle as kr,boxFillViews as Ir,boxPlacementClasses as Br,boxCardProps as gr,boxIsCard as Ts,boxRowPicture as Tr,boxSwatchFill as Fr,boxWashViews as Hr,CARD_NO_LIFT_CLASS as Dr,CARD_SHADOW_CLASS as Vr,isBackgroundBox as _e}from"../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as x}from"../../format/lib/content/box-card-rule.js";import{boxShadowAttrs as Mr,boxShadowOnAnyView as Wr,boxShadowViewAttrs as Gr}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Xr,drawsSiteGutter as jr}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Kr,boxShapeClasses as Ur}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as zr}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as Yr,BOX_LINK_ATTR as Fs,BOX_LINK_CLASS as Hs,BOX_LINKED_CLASS as Jr,boxJumpBlocksClass as Zr,boxJumpCss as qr,boxJumpSlug as Qr,boxLinkOf as el,siteLinkDraws as ol}from"../../format/lib/content/box-link.js";import{SiteLink as sl}from"../lib/site-runtime.js";import{sectionBorderStyle as Ds}from"../../format/lib/content/borders.js";import{finiteNumber as ve}from"../../format/lib/finite-number.js";import{padDefaultIn as y,padSideValue as Re,sectionPadAttrs as nl}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as Oe}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as tl,rowFillInkStyle as rl}from"../../format/lib/content/ink.js";import{useThemeLightInk as ll}from"./ThemeLightInkContext.js";import{sizedBackground as to}from"../../format/lib/sized-image.js";import{BOX_REVEAL_CLASS as il,BOX_REVEAL_CSS as cl,BOX_REVEAL_SHEET as al,PHOTO_HOST_ATTR as dl,resolveImageTreatment as ul}from"../../format/lib/content/image-treatment.js";import ml,{HoverArrowsSlot as fl,HoverMediaArrows as hl}from"./HoverMediaLayer.js";import{HOVER_ARROWS_HOST_ATTR as Cl,HOVER_ARROWS_HOST_CLASS as bl,HOVER_LAYER_GROUND as Sl,cardRowHoverMedia as wl,hoverLayerName as pl}from"../../format/lib/content/hover-media.js";import{BOX_HIGHLIGHT_CLASS as xl,BOX_HIGHLIGHT_OVER_ROW_INK_CLASS as _l,BOX_SHOW_ON_CARD_HOVER as vl}from"../../format/lib/animation/hover.js";import{BoxRail as Rl,BoxRailStop as Ol,RAIL_STOPS_CLASS as Pl,useTimelineRail as Al}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as Ll,sharedColumnsClasses as $l,sharedColumnsCss as yl,sharedRowsClasses as Nl,sharedRowsCss as El}from"../lib/content/box-shared-columns.js";import Vs from"./PhotoHoverSheet.js";import{PICTURE_FRAME_ONLY as kl,PictureHoverMoveSheet as Il,PictureHoverZoom as Bl,pictureHoverMoveOf as gl}from"./PictureHoverMove.js";import{BOX_DESKTOP_LINE as Tl,stackGutterClass as Fl,stackLineCss as Hl,stackOuterClass as Dl,stackRowClass as Vl,storedStackLine as ro}from"../lib/content/box-stack-line.js";const lo={"--sf-site-gutter":"0px"},Ml={overflowX:"clip",overflowY:"visible"},Wl={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},Ms={desktop:!1,phone:!1},Ws="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-wide:bg-[image:var(--sf-box-bg-p)]",io=u=>u==null||u==="",co=u=>!io(u)&&Number(u)===0;function Gl({children:u}){return e(P,{children:u(St())})}function Xl({direction:u,label:Gs,tabShape:Xs,gap:ao,gapPhone:js,gapTablet:Pe,justify:z,align:N,wrap:ae,share:Ks,sharePhone:F,shareTablet:H,wrapPhone:Us,orderPhone:zs,phoneRow:C,columns:m,columnsTablet:D,separator:f,stackBelow:de,blockSpacing:uo,bgImage:Ys,bgImagePhone:Js,rowImage:Zs,hoverShow:qs,pictureHover:V,darken:Ae,darkenStyle:ue,darkenTablet:Qs,darkenPhone:en,darkenStyleTablet:on,darkenStylePhone:sn,placement:nn,padV2:mo=!1,border:tn,borderTablet:rn,borderPhone:ln,borderUnits:fo,pad:r={},contained:Le=!0,fillHeight:E=!1,shadow:$e,shadowTablet:ho,shadowPhone:Co,justifyTablet:bo,justifyPhone:cn,alignTablet:an,alignPhone:dn,wrapTablet:So,blockSpacingTablet:un,blockSpacingPhone:mn,loop:b,scrollDirection:ye=Ar,loopSeconds:fn=Lr,loopDelay:hn=Pr,editing:k=!1,fillColor:wo,fillColorTablet:Cn,fillColorPhone:bn,fillFade:Sn,swatch:wn,line:_,upcoming:pn,link:xn,rowLink:po,highlight:_n,boxShape:xo,boxShapePhone:vn,boxShapeTablet:Rn,angle:On,jumpHighlight:Pn,anchor:An,sharedSides:Ln=Ms,sharedRows:$n=!1,boxId:M,slotCount:yn,mirrorCards:_o,content:c,rowTitle:Ne,startsOpen:Nn,rowStyle:En,sideSpace:kn}){const n=Wt(),I=gr({[x]:Zs},n!==null)[x],vo=Ts({[x]:I}),d=vo?Ms:Ln,In=vo?!1:$n,Ro=Tr({[x]:I},n?.row),S=Ro??Ys,Ee=Ro===null?Js:void 0,Oo=bt(ys),[Po,Bn]=wt(null),gn=zt(),Ao=Zt()&&!(gn&&n!==null),v=Yt(),h=nr({inCopy:n!==null,nestedCopy:n?.nested===!0,underBox:Ao}),ke=qs===vl&&n!==null&&!h&&!(k&&n.previewHover===!0),Lo=so(tn,n,h),$o=so(rn,n,h),yo=so(ln,n,h),No=n===null&&!Ao&&v?.ids&&M?v.ids.indexOf(M):-1,me=No>=0&&v&&M?Ut(v,M,No):-1,w=me>=0?v?.hand??null:h&&v?.copies===!0?v.hand:null,o=w?.row?"row":u,a=w?.row?w.row.share:Ks,Tn=w?.row?w.row.phoneReverse?[...c.blockIds??[]].reverse():void 0:zs,fe=In&&!w?.row,W=k?"":po&&n?Xt(n.row,po)??"":el(xn),R=E?"":Ur(xo,vn,Rn),Fn=!E&&Kr(xo)!=="",B=Qr(Pn,An),Ie=Fr({swatch:wn},n?.row),Y=Ie??Er(wo),g=Ie?{className:"",style:{}}:Ir(wo,Cn,bn),Hn=ll(),Eo=rl(Ie,Hn??void 0),Dn=_e(S)||_e(Ee),Vn=(Y||g.className)&&!Dn?kr(Sn):null,ko=Y||g.className?{...Y?{backgroundColor:Y}:{},...g.style,...Vn,...Eo}:void 0,Io=Al(),J=_===!0&&o!=="tabs"&&o!=="accordion",t=Ts({bgImage:S,[x]:I}),Bo=zr(On),go=t?void 0:ko,he=t?null:_n??null,Mn=Bo||he?{...go,...Bo,...he}:go,Ce=Mt(),Wn=gt(),Gn=Rt(),To=_t(),Fo=xt(),Xn=vt(),l=o==="accordion",Be=$t(En),Z=l&&Be==="numbered",ge=l&&Be==="chevron",Te=kt(),Ho=Et(),G=Or(o,f),i=b==="scroll"&&o!=="tabs"&&!l,jn=Jt(),be=h||me>=0&&w!==null,Do=w?w.mirror:_o,Kn=me>=0?me:n?.index,q=h&&Gt(n?.ownerType),Vo=Es({direction:o,separator:f,loop:b,line:_,bgImage:S,[x]:I,columns:m,columnsTablet:D,share:a,wrap:ae},be,d.desktop)&&Qt(Do,Kn),Un=Es({direction:o,separator:f,loop:b,line:_,bgImage:S,[x]:I,columns:m,columnsTablet:D,share:a,wrap:ae},be,d.desktop)&&er(Do)!==null,X=hr({direction:o,separator:f,loop:b,line:_,columns:m}),T=Cr({direction:o,separator:f,loop:b,line:_,columnsTablet:D}),Q=br({direction:o,separator:f,loop:b,line:_,columns:m,columnsTablet:D,share:a,shareTablet:H}),ee=lr(kn)===rr,Fe=tr(ee),Mo=J&&ro(de)===Tl,j=o==="row"&&!t&&!G&&!i&&(!J||Mo)&&T===""&&Q===""?ro(de):void 0,K=j??(o==="column"&&!t?ro(de):void 0),zn=Bt(),Se=$l(d,c.blockCount??0,j),Yn=(Se&&(!n||n.index===0)?yl(d,c.blockCount??0,j):"")+(fe&&(!n||n.index===0)?El(fe,c.blockCount??0):""),Wo=Nl(fe,c.blockCount??0),Go=T!==""?Number(D)>=2:Q===""||L(H)!=="",Xo=T!==""||Q!=="",He=o==="row"&&!G&&!i&&_!==!0,De=He&&!d.phone&&!d.desktop?yt(Nt(Tn,c.blockIds??[]),{editing:k}):void 0,jo=De!==void 0&&!k,Jn=X!==""?Number(m)>=2:L(a)!=="",Ko=!t&&!l&&!Un&&!d.desktop&&!d.phone,we=Ko&&!i?ur(z,bo,cn):"",Ve=t||be?"":or(jn,o,i?void 0:z,N,we?bo:void 0),Zn=/view-wide:max-view-desktop:justify-/.test(Ve)?we.split(" ").filter(s=>!s.startsWith("view-wide:max-view-desktop:justify-")).join(" "):we,qn=Ko&&o==="row"?cr(N,an,dn):"",Uo=Ho&&o==="column"&&!t&&!i&&!l,Me=typeof z=="string"&&z!=="start"||we!=="",zo=Uo&&Me&&L(a)!=="",Yo=Uo&&!Me&&L(a)!==""&&(c.blockCount??0)===1,Qn=!i&&!l&&X===""&&T===""&&!d.desktop?mr(ae,So):"",Jo=[l||zo?"":L(a),o==="row"?fr(a):"",X,T,Q,ar(l?"gap":uo),_r(o,f),l&&!Z&&!ge?"border-t border-line":"",Zn,qn,Qn,l?"":dr(uo,un,mn),l?Is(m,C,Z||ge):"",Z?Pt:""].filter(Boolean).join(" "),et=Jo?` ${Jo}`:"",Zo=["flex",o==="row"?G||i?"flex-row":`flex-row ${ce(C,F,Us,So)}`:"flex-col",pr(i||l?!1:ae),t?Br(nn??"center",o):ir(i||l?void 0:z,l?void 0:N)+(Ve?` ${Ve}`:"")].join(" ")+et,oe=E||t||R||Te?` ${Oe}`:"",We=Fn?` ${R}`:R?`${oe} ${R}`:oe,qo=Ho&&o==="column"&&!t&&!i&&L(a)===""&&Me||zo,Qo=oe||(qo||Yo?` ${Oe}`:""),Ge=W?` ${Jr}`:"",Xe=t||Ce||mo?"":" py-6",ot=j===void 0?"":` ${Vl(j)}`,es=K===void 0||ee?"":` ${Fl(K)}`,je=K===void 0?"":` ${Dl(K)}`,st=`${no}${Xe} ${Fe}${We}${Ge}${es}${je}`,nt=Ce?`${We}${Ge}${je}`.trim():`w-full${Xe}${We}${Ge}${je}`,se=(Z||ge)&&Is(m,C)===""?ks("Flex",0,"block"):ks("Flex",ao,o==="row"?"inline":"block",js,G||i?void 0:Pe),os=wr(a,H,o==="row"?c.blockCount??0:0),ss=G?{...se.style,...Rr(o,f)}:se.style,tt=os?{...ss,...os}:ss,Ke=(s="")=>e(c,{className:`${Zo}${Vo?` ${sr}`:""}${se.className}${Qo}${ot}${s?` ${s}`:""}${J?` ${Pl}`:""}${B?` ${Zr(B)}`:""}${Se}${Wo}`,style:tt,minEmptyHeight:120,...De?{cell:De}:null}),ns=$r(ye)?"":vr(o,f),ts=i?e(yr,{direction:ye,seconds:fn,delay:hn,editing:k,copy:s=>Ke(s&&ns?`${s} ${ns}`:s)}):Z?A(P,{children:[e("style",{children:At}),Ke()]}):Ke(),Ue=o==="tabs"?e(pt,{className:`${Zo}${se.className}${Te&&!E&&!t&&!R?"":oe}`,style:se.style,shape:Xs,children:ts}):ts,ze=l?e(oo.Provider,{value:"accordion",children:e(eo.Provider,{value:Be,children:Ue})}):To?e(oo.Provider,{value:!1,children:e(eo.Provider,{value:"plain",children:Ue})}):Ue,rs=o==="row"&&!t&&(N===void 0||N==="stretch"),rt={stretchedRow:rs,fillingColumn:o==="column"&&(Te||qo),columnsRow:X!==""||T!==""||Se!==""||Wo!==""||o==="row"&&(Array.isArray(a)||Array.isArray(H))||jo,...jo?{phoneCells:!0}:null,...rs&&He&&(c.blockCount??0)>=2&&Jn||Yo?{picturesFillRow:!0}:null,...Xo&&!Go?{fillFrom:"desktop"}:null,...Sr(C,F)&&(!Xo||Go)?{phoneRowFills:!0}:null,...He&&Bs(C,F)?{phoneRowFits:!0}:null,...i?{loops:!0}:null,...M?{id:M}:null},ls=n===null?qt({direction:o,loop:b,bgImage:S,[x]:I,columns:m,mirrorCards:_o},!1):null,is=ls?e(Ns.Provider,{value:{hand:ls,ids:c.blockIds??[],boxes:[]},children:ze}):v?e(Ns.Provider,{value:null,children:ze}):ze,cs=e(Ls.Provider,{value:rt,children:e(As.Provider,{value:!1,children:be?e(Kt.Provider,{value:Vo,children:e(jt.Provider,{value:!h,children:is})}):is})}),lt=Ne?.blockCount??0,as=To==="accordion"&&!!Ne&&(k||lt>0)?e(Ot,{startsOpen:Nn===!0||Xn&&h&&n?.index===0,editing:k,numbered:Fo==="numbered",chevron:Fo==="chevron",title:e(Ls.Provider,{value:Wl,children:e(As.Provider,{value:!1,children:e(oo.Provider,{value:!1,children:e(eo.Provider,{value:"plain",children:e(Ne,{className:`min-w-0 flex-1 ${xr}`,minEmptyHeight:24})})})})}),children:cs}):cs,Ye=J?e(Rl,{row:o==="row",stops:c.blockCount??0,desktopLine:j!==void 0&&Mo,children:as}):as,it=Gs?.trim()||(Gn?"":void 0),ct={values:r,frame:Xe?24:0},at=s=>Io?e(Ol,{on:Io,future:pn===!0,children:s}):s,dt=s=>ol(W)?e(sl,{href:W,newTab:"auto",className:Hs,"aria-labelledby":s,[Fs]:""}):e("a",{href:W,className:Hs,"aria-labelledby":s,[Fs]:""}),ds=(B?qr(B):"")+Yn+(K===void 0||n&&n.index!==0?"":Hl(K,{gutter:!ee})),us=ds?e("style",{dangerouslySetInnerHTML:{__html:ds}}):null,ne=Xr({loop:b,direction:o,scrollDirection:ye,bgImage:S,[x]:I}),ut=d.desktop&&Se!==""&&!Y&&!g.className&&!Ds(Lo,yo,$o,fo)&&!Wr($e,ho,Co)&&!W&&!R&&!E&&!B&&!jr(Le&&!ne,zn)&&co(ao)&&(io(Pe)||co(Pe))&&mo&&Object.values(r).every(s=>io(s)||co(s)),mt=s=>({...Lt,...ut?{[Ll]:""}:null,...t?null:{...Mr($e),...Gr($e,ho,Co)},...B?{[Yr]:B}:null,...s?{id:s}:null}),ms=X!==""?Number(m):0,ft=ce(C,F)===ce(void 0),ht=(o==="column"||o==="row"&&!G&&!i&&(ms===1&&ft||ms===0&&c.blockCount===1))&&!t&&!J&&!Ce,fs=t&&Wn&&!Ce,pe=!t&&n!==null?gs(Ae,ue):null,hs=ke||pe?A(P,{children:[ke?e(Vs,{sheet:cl,name:al}):null,pe?e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",style:pe}):null]}):null,Cs=[ke?il:"",pe?"relative isolate":""].filter(Boolean).join(" "),bs=s=>hs?A(P,{children:[hs,s]}):s,Ss=(s,O)=>at(e(It,{contained:Le&&!ne,style:ne?lo:void 0,framedClass:st,fillClass:nt,columnClass:`${no} ${Fe}${Qo}${es}`,tabLabel:it,pad:t?void 0:ct,border:Ds(Lo,yo,$o,fo),outerAttrs:mt(O),box:!0,edge:ht,outerStyle:Mn,outerClass:t?Cs||void 0:[g.className,he?xl:"",he&&Eo?_l:"",Cs].filter(Boolean).join(" ")||void 0,bleed:fs,siteSide:ee,children:us||O?A(P,{children:[us,O?dt(O):null,ne?e($s,{children:s}):s]}):ne?e($s,{children:s}):s})),Je=s=>W?e(Gl,{children:O=>Ss(bs(s),O)}):Ss(bs(s)),ws=s=>Oo.bound?e(Ht,{children:s}):s;if(!t){const s=N===void 0||N==="stretch",O=(L(a)!==""||X!==""||T!=="")&&!Bs(C,F)&&!(Q!==""&&L(H)==="")&&(s||ce(C)!==ce(void 0));if(!(o==="row"?O:o==="column"&&s))return Je(ws(Ye));const Ps=Dt({direction:o,separator:f,loop:b,line:_,share:a,shareTablet:H,sharePhone:F,phoneRow:C,columns:m,columnsTablet:D,stackBelow:de,shared:d.desktop||d.phone||fe,count:yn}),Ct={hasWidth:!0,...Ps?{bound:Vt(Ps,Oo.bound)}:null};return Je(e(ys.Provider,{value:Ct,children:Ye}))}const te=_e(S),re=te?gs(Ae,ue):null,xe=te?Hr({darken:Ae,darkenStyle:ue,darkenTablet:Qs,darkenStyleTablet:on,darkenPhone:en,darkenStylePhone:sn}):{className:"",style:{}},Ze=_e(Ee),ps=te?Ze?{"--sf-box-bg":to(S??""),"--sf-box-bg-p":to(Ee??"")}:{backgroundImage:to(S??""),backgroundSize:"cover",backgroundPosition:"center"}:{},xs=ul(void 0,void 0,V),U=xs.className?xs:null,le=te&&n&&V?.kind==="nextImage"&&V.media?wl(n,V.media):null,p=te?gl(V,ue)??(le?kl:null):null,_s=V?.media?.cover??"picture",qe=le?e("div",{className:`absolute inset-0 isolate${q?" rounded-[inherit]":""}`,children:e(fl.Provider,{value:Bn,children:e(ml,{media:le,name:pl(n?.row),cover:_s,ground:Sl[_s],arrowsAbove:!0})})}):null,ie=U!==null||!!p?.zoom,vs=ie?e("div",{"aria-hidden":!0,className:`absolute inset-0${q?" rounded-[inherit]":""}${Ze?` ${Ws}`:""}${U?` ${U.className}`:""}`,style:{...ps,...U?.style??{}}}):null,Qe=nl({...r,top:ve(r.top)??y($.desktop,r.unit,"desktop"),bottom:ve(r.bottom)??y($.desktop,r.unit,"desktop"),topPhone:ve(r.topPhone)??y($.phone,r.unitPhone,"mobile"),bottomPhone:ve(r.bottomPhone)??y($.phone,r.unitPhone,"mobile"),left:Re(r.left)??y($.side,r.unit,"desktop"),right:Re(r.right)??y($.side,r.unit,"desktop"),leftPhone:Re(r.leftPhone)??y($.sidePhone,r.unitPhone,"mobile"),rightPhone:Re(r.rightPhone)??y($.sidePhone,r.unitPhone,"mobile"),sideSpace:ee?"site":"box"}),Rs=e("div",{className:`relative z-[1] ${Nr} ${Qe?.className??""}${E||R?` ${Oe}`:""}`.trimEnd(),style:re?{...Qe?.style,...lo,...tl}:{...Qe?.style,...lo},children:ws(Ye)}),Os=fs&&Le?e("div",{className:`${no} ${Fe}${E||R?` ${Oe}`:""}`,children:Rs}):Rs;return Je(e(P,{children:A("div",{className:`relative isolate overflow-hidden ${Vr}${n!==null&&!h?` ${Dr}`:""}${oe}${Ze&&!ie?` ${Ws}`:""}${g.className?` ${g.className}`:""}${p?` ${p.className}`:""}`,style:{...q?Ml:{},...ko,...ie?{}:ps,...p?p.style:{}},...U||le?{[dl]:""}:{},children:[e(Il,{move:p}),ie&&A(P,{children:[e(Vs,{sheet:U?.sheet}),p?.zoom?e("div",{className:`absolute inset-0 overflow-hidden${q?" rounded-[inherit]":""}`,children:A(Bl,{move:p,className:"absolute inset-0",children:[vs,qe]})}):A(P,{children:[vs,qe]})]}),!ie&&qe,e(Ft,{wash:re&&xe.className?{...re,...xe.style}:re,hover:p?.washHover,...q?{className:"rounded-[inherit]"}:{},...xe.className?{restClassName:xe.className}:{}}),re?e(Tt,{children:Os}):Os,le?e("div",{[Cl]:"",className:bl,children:Po?e(hl,{state:Po}):null}):null]})}))}export{Xl as default};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Config } from "efficient-easel/blocks";
|
|
2
|
-
|
|
2
|
+
declare function PageRender({ config, data, metadata, }: {
|
|
3
3
|
config: Config;
|
|
4
4
|
data: unknown;
|
|
5
5
|
metadata?: Record<string, unknown>;
|
|
6
6
|
}): import("react").JSX.Element;
|
|
7
|
+
declare const _default: import("react").MemoExoticComponent<typeof PageRender>;
|
|
8
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{memo as a}from"react";import{Render as p}from"efficient-easel/render";import{BelowFirstScreen as d,LATER_SLIDES_KEY as f,firstScreenLead as l,laterSlideIdsOf as u,useLeadDrawsFirst as S}from"../first-screen.js";import{publishedPageData as g}from"./published-passes.js";import{useRenderKeep as h}from"./render-keep.js";import{withSlotCounts as w}from"./slot-counts.js";function L({config:n,data:s,metadata:t}){const e=g(s,t),i=h(),c=S(n,l(e.content)),r=u(e.content),m=r.length>0?{...t,[f]:r}:t;return o(d,{children:o(p,{config:c,metadata:w(m,e.content),keep:i,data:e})})}var k=a(L);export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useRef as r}from"react";import{createRenderKeep as n}from"efficient-easel/render";function o(){const e=r(null);return e.current??=n(),e.current}export{o as useRenderKeep};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "71.1.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tabler/icons-react": "^3.46.0",
|
|
57
|
-
"efficient-easel": "^35.
|
|
57
|
+
"efficient-easel": "^35.1.0",
|
|
58
58
|
"efficient-shell": "^13.17.0",
|
|
59
59
|
"isomorphic-dompurify": "^3.18.0",
|
|
60
60
|
"next": ">=16",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/node": "^20",
|
|
74
74
|
"@types/react": "^19",
|
|
75
75
|
"@types/react-dom": "^19",
|
|
76
|
-
"efficient-easel": "^35.
|
|
76
|
+
"efficient-easel": "^35.1.0",
|
|
77
77
|
"efficient-shell": "^13.17.0",
|
|
78
78
|
"efficient-shell-checker": "npm:efficient-shell@13.17.0",
|
|
79
79
|
"esbuild": "^0.28.0",
|