efficient-web-builder 71.0.0 → 72.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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 72.0.0 - 2026-11-18
4
+
5
+ From main at `58477c36`: #794, #795.
6
+
7
+ A major: the `efficient-easel` peer moves to `^36.0.0`; `efficient-shell` stays `^13.17.0`. `SectionEditor`'s `onOpenPageStyles` prop is removed. No stored key or value moves. Carries #794 (left rail host) and #795 (one home for the phone edge).
8
+
9
+ ### BREAKING
10
+
11
+ - **`efficient-easel` peer `^35.1.0` -> `^36.0.0`**: the editor's left rail is the body's first column (Add, Pages, Layers, Styles, Media) in place of the left panel's tab strip and the top bar's rail.
12
+
13
+ **For hosts:**
14
+ - Install `efficient-easel` 36.0.0 or later with this release. The builder's editor entries already load `efficient-easel/rail.css` with `screen.css`.
15
+ - `SectionEditor` (`efficient-web-builder/editor/components/SectionEditor`) no longer takes `onOpenPageStyles`; no consumer passes it.
16
+ - A host test or style that reads the left panel's tab strip, the top bar's Media library button or the Layers head "+" drops it (easel 36.0.0 CHANGELOG).
17
+
18
+ ### Changed
19
+
20
+ - **The desktop view has a floor: the phone edge** (800, `PHONE_EDGE`). The website passes it as the screen's `devices.fluidMin`, so a pane under 800 (a 1440 screen with the rail column gives 772) draws the desktop at 800, scaled to fit, and not the stacked phone layout. At or over 800 nothing changes.
21
+ - **The empty right panel has no Styles button.** The rail's Styles is the one way in to the page's look; the tree's "This page" still opens it.
22
+
23
+ ### Guards
24
+
25
+ - `test-desktop-floor` (new) holds the website's floor input (`fluidMin === PHONE_EDGE`); the floor rule is easel's own tests. New source rule `src/lib/source-rules/no-host-rail.ts` (`test-no-host-rail-css`): no host `.es-rail` rule and no host "Media library" control; blocks and admin run it in their easel ^36 PRs. #795: `test-one-phone-edge` and `source-rules/one-phone-edge.ts`. `test-editor-flat-chrome` and `test-panel-resize-seam` model the rail column in front of the left panel (8 + 44 + 8; the chrome is 668px at the default widths). `test-editor-rail-in-topbar` is deleted (the rail left the top bar). `test-editor-add-panel` drops the top bar's arrow; `test-page-settings-move` holds that the empty panel has no Styles door.
26
+
27
+ ## 71.1.0 - 2026-11-18
28
+
29
+ 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.
30
+
31
+ **For hosts:**
32
+ - 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.
33
+
34
+ ### Fixed
35
+
36
+ - **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.
37
+
3
38
  ## 71.0.0 - 2026-11-18
4
39
 
5
40
  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.
@@ -63,11 +63,10 @@ export type InspectorPanel = {
63
63
  render: (mode: InspectorMode, ctx: PanelContext) => ReactNode;
64
64
  };
65
65
  export declare function resolvePanel(kind: InspectorMode["kind"], capabilities: EditorCapabilities): InspectorPanel | null;
66
- export default function SectionEditor({ mode, onOpenWebsiteSettings, onOpenSiteStyles, onOpenPageStyles, onSelectNode, hideNodeActions, onNotify, onHidePanel, }: {
66
+ export default function SectionEditor({ mode, onOpenWebsiteSettings, onOpenSiteStyles, onSelectNode, hideNodeActions, onNotify, onHidePanel, }: {
67
67
  mode: InspectorMode;
68
68
  onOpenWebsiteSettings: () => void;
69
69
  onOpenSiteStyles?: () => void;
70
- onOpenPageStyles?: () => void;
71
70
  hideNodeActions?: boolean;
72
71
  onNotify?: (msg: string, tone?: "success" | "error") => void;
73
72
  onHidePanel?: () => void;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as m,Fragment as K}from"react/jsx-runtime";import{useEasel as Se,useRootFields as be}from"efficient-easel/easel";import{Button as we,EmptyState as ge}from"efficient-shell/ui";import{PAGE_STYLE_FIELDS as W}from"../lib/document/page-root-fields.js";import{rootPanelHead as Ee}from"../../format/lib/document/root-panel.js";import{headWords as z,InspectorHead as ke,InspectorIconButton as j}from"efficient-easel/chrome";import{DuplicateIcon as Pe,TrashIcon as ve}from"efficient-easel/icons";import{panelFieldsOf as Ie}from"efficient-easel/screen/lib/document/panel-fields";import{TICKER_PART_LABEL as G}from"../../render/components/PreviewTickerContext.js";import Le from"./SectionIcon.js";import{PanelHideButton as Y}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as ye}from"efficient-easel/screen/lib/session-context";import{say as n}from"../../format/lib/editor-words.js";import Oe,{SITE_STYLES_BASICS_TAB as Te}from"./WebsiteSettingsPanel.js";import Ne from"./ChatSettingsPanel.js";import _e from"./SocialLinksPanel.js";import He from"./TickerSettingsPanel.js";import Re,{PartSourceNote as Ae}from"./PartSettingsPanel.js";import{regionsForSection as De}from"../../format/lib/sections/section-text-regions.js";import{TEXT_KIND_LABELS as Ce}from"../../format/lib/sections/section-text-kinds.js";import{textRegionOfPartKey as Be}from"../../format/lib/sections/text-regions.js";import Fe from"./DuplicateToPageMenu.js";import{usePageRows as xe}from"../lib/page-rows.js";import{useScreenDocument as Me}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewHeader as Ke}from"../../render/components/PreviewHeaderContext.js";import{useSectionOps as We}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as ze,isSelectionMode as I}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as je}from"efficient-easel/draw/client";import{entryPartsOf as Ge,SectionTextEntries as Ye}from"./SectionTextEntries.js";import{SectionTextSuppressProvider as Ue}from"../lib/document/section-text-suppress.js";import{HEADER_TYPE as Xe,ROOT_ZONE as U}from"efficient-easel/draw";import{websiteDuplicateBlocked as Ze}from"../lib/document/every-page.js";import{FOOTER_TYPE as L}from"../lib/document/footer-blocks.js";import $e from"./SwitchToBoxFooter.js";import{SiteFields as X}from"./SiteFields.js";import qe from"./HeroPartPanel.js";import{HERO_MEDIA_PART_LABELS as Je,HERO_PART_MODE as Qe,heroPartLabel as Ve}from"../../render/lib/document/hero-media-parts.js";import{HintsToggle as et,SettingsSwitch as tt,hintsFoldClass as nt}from"efficient-easel/panel";import{useHints as ot}from"efficient-easel/screen/lib/hints";import{partRowField as rt}from"../lib/document/part-row-field.js";import{decodePartKey as it,partRowHeadLabel as st}from"../../render/lib/document/part-rows.js";import{encodePartId as at,partHeadLabel as lt,partLabel as ct,sectionTextParts as dt}from"../../render/lib/document/text-parts.js";import{partSourceOf as pt,sourceMenuIdOf as mt,sourceSlugOf as ft}from"../../format/lib/document/source-bound-parts.js";const mn=ze,fn={kind:"header"},un={kind:"website"},hn={kind:"website",tab:Te,revealPageGroup:!0},Sn={kind:"chat"},bn={kind:"social"},w="Part";function ut(e){return n("Part of {name}",{name:n(e)})}function ht(e,o,i){const s=e.describeNode(o);return{name:i,kindLabel:s?ut(s.label):n(w)}}function St(e){switch(e){case"Header":return{title:n("Header settings belong to a website."),own:n("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:n("Appearance settings belong to a website."),own:n("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:n("Live chat settings belong to a website."),own:n("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:n("Social link settings belong to a website."),own:n("Each website created from this template sets its own social link afterwards.")};default:return{title:n("{what} settings belong to a website.",{what:e}),own:n("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function Z({what:e}){const o=St(e);return m("div",{className:"sf-note",children:[r("p",{children:r("strong",{children:o.title})}),m("p",{children:[n("A template is a blueprint — it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function y(e){const o=Qe[e];return{name:Je[e],kindLabel:w,icon:o,head:(i,s)=>{if(i.kind!==o)return null;const d=s.describeNode(i.nodeId);if(!d)return null;const h=z({name:n(Ve(e,d.props)),tier:"part",of:n(d.label)},{partOf:({name:p})=>n("Part of {name}",{name:p})});return{name:h.name,kindLabel:h.kind}},render:(i,s)=>i.kind===o?r(qe,{nodeId:i.nodeId,part:e,sectionName:s.describeNode(i.nodeId)?.label??"Hero",onUpToSection:()=>s.onSelectNode(i.nodeId)}):null}}const bt={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{const i=o.hostPanels?.header;return i?r(i,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>r(Oe,{initialTab:e.tab,revealPageGroup:e.revealPageGroup,themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify},e.tab??"")},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>r(Ne,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>r(_e,{unavailable:r(Z,{what:"Social link"})})},ticker:{name:G,kindLabel:w,icon:"ticker",head:(e,o)=>e.kind==="ticker"?ht(o,e.heroId,n(G)):null,render:e=>r(He,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:y("media"),heroImage:y("image"),heroImage2:y("image2"),part:{name:w,kindLabel:w,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;const i=o.describeNode(e.nodeId);if(!i)return null;const{key:s,row:d}=it(e.propKey),h=d?rt(i.fields[s],d):i.fields[s],p=De(i.type),f=p?Be(p,e.propKey):null,u=p&&f?p[f].label:Ce[e.propKey],g=u?n(u):st(n(lt(ct(h??{},s))),d),E=z({name:g,tier:"part",of:n(i.label)},{partOf:({name:k})=>n("Part of {name}",{name:k})});return{name:E.name,kindLabel:E.kind}},render:(e,o)=>e.kind==="part"?r(Re,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},wt=new Set(["header","website","chat"]);function gt(e,o){if(e==="selection")return null;const i=bt[e];return wt.has(e)&&!o.hasSiteSettings?{...i,kindLabel:"Not part of a template",render:()=>r(Z,{what:i.name})}:i}function Et({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onOpenPageStyles:s,onSelectNode:d,hideNodeActions:h=!1,onNotify:p,onHidePanel:f}){const{capabilities:u,tokenRef:g,notifyParent:E,currentSlug:k,siteId:O,runAuthed:$,readOnly:q,navigate:kt}=Me(),{rows:J}=xe(),T=J?.find(l=>l.slug===k)??null,Q=be(),N=Object.keys(Q.fields).some(l=>!l.startsWith("_")&&!W.includes(l)),{websiteName:V}=Ke(),P=We({readOnly:q}),{select:ee}=je(),{selectedItem:t,getItemById:te,getSelectorForId:ne,config:S,appState:oe}=Se(l=>l),re=Ie(S,t?{type:t.type,props:t.props}:null),_=t?dt(re??S.components[t.type]?.fields,t.props):[],ie=l=>S.components[l]?.label??l,a=t?ne(t.props.id):void 0,c=gt(e.kind,u),se=ye(),H={capabilities:u,tokenRef:g,hostPanels:se.chrome?.panels,describeNode:l=>{const b=te(l);if(!b)return null;const M=S.components[b.type];return{type:b.type,label:M?.label??b.type,fields:M?.fields??{},props:b.props??{}}},siteId:O,websiteName:V??null,notifyParent:E,onNotify:p,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onSelectNode:d},R=c?.head?.(e,H)??null,A=Ee({kind:T?.kind,pageName:T?.label}),D=R?.name??(c?n(c.name):t?n(ie(t.type)):A.name),ae=R?.kindLabel??(c?n(c.kindLabel):t?a&&a.zone!==U?n("Block"):n("Section"):A.kindLabel),le=c?c.icon:t?t.type:"page",C=I(e)&&t?pt(t.type):null,ce=!!t&&!!a&&a.zone===U&&t.type!==L&&t.type!==Xe,v=Ze(oe?.data,t),de=()=>{v||a&&P.duplicateComponent(a.zone,a.index)},pe=()=>{a&&(P.removeComponent(a.zone,a.index),P.select(null))},me=t?S.components[t.type]?.defaultProps?.previewHover:void 0,B=I(e)&&!!t&&!!a&&me!==void 0,F=B&&t.props.previewHover===!0,fe=()=>{!t||!a||P.replaceComponent(a.zone,a.index,{...t,props:{...t.props,previewHover:!F}})},{shown:x,setShown:ue}=ot(),he=!!(c||t||N);return m("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right ${nt(x)}`.trim(),children:[r(ke,{icon:r(Le,{type:le,size:15}),name:D,kind:ae,actions:!h&&I(e)&&t&&t.type!==L?m(K,{children:[r(j,{label:n("Duplicate section"),title:v??void 0,disabled:v!==null,onClick:de,children:r(Pe,{size:15})}),ce&&u.hasSiteSettings&&r(Fe,{node:t,currentSlug:k,siteId:O??void 0,tokenRef:g,runAuthed:$,onNotify:p}),r(j,{label:n("Remove section"),danger:!0,onClick:pe,children:r(ve,{size:15})}),f?r(Y,{side:"right",onHide:f,divider:!0}):null]}):f?r(Y,{side:"right",onHide:f}):void 0}),B&&m("div",{className:"sf-preview-pin",children:[m("div",{className:"sf-preview-pin-text",children:[r("span",{className:"sf-preview-pin-label",children:n("Preview hover state")}),r("span",{className:"sf-preview-pin-hint",children:n("not shown live")})]}),r(tt,{checked:F,onChange:fe,ariaLabel:n("Preview hover state")})]}),m("div",{className:"sf-insp-body es-insp-body sf-scroll",children:[c?c.render(e,H):t?m(K,{children:[t.type===L&&u.hasSiteSettings&&r($e,{}),r(Ue,{children:r(X,{entries:r(Ye,{parts:_,heading:!1,onOpen:l=>ee(at(t.props.id,l))}),entryCount:Ge(_).length,itemWord:D})}),C&&r(Ae,{source:C,slug:ft(t?.props),menuId:mt(t?.props)})]}):N?r(X,{omit:W}):r(ge,{variant:"none",icon:!1,message:n("Select a section or block to edit it."),children:s&&r(we,{variant:"secondary",onClick:s,children:n("This page")})}),he&&r(et,{shown:x,onChange:ue,label:n("Show hints")})]})]})}export{Sn as CHAT_MODE,fn as HEADER_MODE,mn as SELECTION_MODE,bn as SOCIAL_MODE,un as WEBSITE_MODE,hn as WEBSITE_PAGE_MODE,Et as default,gt as resolvePanel};
1
+ "use client";import{jsx as r,jsxs as m,Fragment as M}from"react/jsx-runtime";import{useEasel as he,useRootFields as Se}from"efficient-easel/easel";import{EmptyState as be}from"efficient-shell/ui";import{PAGE_STYLE_FIELDS as K}from"../lib/document/page-root-fields.js";import{rootPanelHead as we}from"../../format/lib/document/root-panel.js";import{headWords as W,InspectorHead as ge,InspectorIconButton as z}from"efficient-easel/chrome";import{DuplicateIcon as Ee,TrashIcon as ke}from"efficient-easel/icons";import{panelFieldsOf as Pe}from"efficient-easel/screen/lib/document/panel-fields";import{TICKER_PART_LABEL as j}from"../../render/components/PreviewTickerContext.js";import ve from"./SectionIcon.js";import{PanelHideButton as G}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as Ie}from"efficient-easel/screen/lib/session-context";import{say as n}from"../../format/lib/editor-words.js";import Le,{SITE_STYLES_BASICS_TAB as ye}from"./WebsiteSettingsPanel.js";import Oe from"./ChatSettingsPanel.js";import Te from"./SocialLinksPanel.js";import Ne from"./TickerSettingsPanel.js";import _e,{PartSourceNote as He}from"./PartSettingsPanel.js";import{regionsForSection as Re}from"../../format/lib/sections/section-text-regions.js";import{TEXT_KIND_LABELS as Ae}from"../../format/lib/sections/section-text-kinds.js";import{textRegionOfPartKey as De}from"../../format/lib/sections/text-regions.js";import Ce from"./DuplicateToPageMenu.js";import{usePageRows as Be}from"../lib/page-rows.js";import{useScreenDocument as Fe}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewHeader as xe}from"../../render/components/PreviewHeaderContext.js";import{useSectionOps as Me}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as Ke,isSelectionMode as I}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as We}from"efficient-easel/draw/client";import{entryPartsOf as ze,SectionTextEntries as je}from"./SectionTextEntries.js";import{SectionTextSuppressProvider as Ge}from"../lib/document/section-text-suppress.js";import{HEADER_TYPE as Ye,ROOT_ZONE as Y}from"efficient-easel/draw";import{websiteDuplicateBlocked as Ue}from"../lib/document/every-page.js";import{FOOTER_TYPE as L}from"../lib/document/footer-blocks.js";import Xe from"./SwitchToBoxFooter.js";import{SiteFields as U}from"./SiteFields.js";import Ze from"./HeroPartPanel.js";import{HERO_MEDIA_PART_LABELS as $e,HERO_PART_MODE as qe,heroPartLabel as Je}from"../../render/lib/document/hero-media-parts.js";import{HintsToggle as Qe,SettingsSwitch as Ve,hintsFoldClass as et}from"efficient-easel/panel";import{useHints as tt}from"efficient-easel/screen/lib/hints";import{partRowField as nt}from"../lib/document/part-row-field.js";import{decodePartKey as ot,partRowHeadLabel as rt}from"../../render/lib/document/part-rows.js";import{encodePartId as it,partHeadLabel as st,partLabel as at,sectionTextParts as lt}from"../../render/lib/document/text-parts.js";import{partSourceOf as ct,sourceMenuIdOf as pt,sourceSlugOf as dt}from"../../format/lib/document/source-bound-parts.js";const pn=Ke,dn={kind:"header"},mn={kind:"website"},fn={kind:"website",tab:ye,revealPageGroup:!0},un={kind:"chat"},hn={kind:"social"},g="Part";function mt(e){return n("Part of {name}",{name:n(e)})}function ft(e,o,i){const a=e.describeNode(o);return{name:i,kindLabel:a?mt(a.label):n(g)}}function ut(e){switch(e){case"Header":return{title:n("Header settings belong to a website."),own:n("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:n("Appearance settings belong to a website."),own:n("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:n("Live chat settings belong to a website."),own:n("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:n("Social link settings belong to a website."),own:n("Each website created from this template sets its own social link afterwards.")};default:return{title:n("{what} settings belong to a website.",{what:e}),own:n("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function X({what:e}){const o=ut(e);return m("div",{className:"sf-note",children:[r("p",{children:r("strong",{children:o.title})}),m("p",{children:[n("A template is a blueprint — it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function y(e){const o=qe[e];return{name:$e[e],kindLabel:g,icon:o,head:(i,a)=>{if(i.kind!==o)return null;const d=a.describeNode(i.nodeId);if(!d)return null;const f=W({name:n(Je(e,d.props)),tier:"part",of:n(d.label)},{partOf:({name:c})=>n("Part of {name}",{name:c})});return{name:f.name,kindLabel:f.kind}},render:(i,a)=>i.kind===o?r(Ze,{nodeId:i.nodeId,part:e,sectionName:a.describeNode(i.nodeId)?.label??"Hero",onUpToSection:()=>a.onSelectNode(i.nodeId)}):null}}const ht={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{const i=o.hostPanels?.header;return i?r(i,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>r(Le,{initialTab:e.tab,revealPageGroup:e.revealPageGroup,themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify},e.tab??"")},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>r(Oe,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>r(Te,{unavailable:r(X,{what:"Social link"})})},ticker:{name:j,kindLabel:g,icon:"ticker",head:(e,o)=>e.kind==="ticker"?ft(o,e.heroId,n(j)):null,render:e=>r(Ne,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:y("media"),heroImage:y("image"),heroImage2:y("image2"),part:{name:g,kindLabel:g,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;const i=o.describeNode(e.nodeId);if(!i)return null;const{key:a,row:d}=ot(e.propKey),f=d?nt(i.fields[a],d):i.fields[a],c=Re(i.type),u=c?De(c,e.propKey):null,h=c&&u?c[u].label:Ae[e.propKey],P=h?n(h):rt(n(st(at(f??{},a))),d),S=W({name:P,tier:"part",of:n(i.label)},{partOf:({name:E})=>n("Part of {name}",{name:E})});return{name:S.name,kindLabel:S.kind}},render:(e,o)=>e.kind==="part"?r(_e,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},St=new Set(["header","website","chat"]);function bt(e,o){if(e==="selection")return null;const i=ht[e];return St.has(e)&&!o.hasSiteSettings?{...i,kindLabel:"Not part of a template",render:()=>r(X,{what:i.name})}:i}function wt({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onSelectNode:a,hideNodeActions:d=!1,onNotify:f,onHidePanel:c}){const{capabilities:u,tokenRef:h,notifyParent:P,currentSlug:S,siteId:E,runAuthed:Z,readOnly:$,navigate:gt}=Fe(),{rows:q}=Be(),O=q?.find(l=>l.slug===S)??null,J=Se(),T=Object.keys(J.fields).some(l=>!l.startsWith("_")&&!K.includes(l)),{websiteName:Q}=xe(),k=Me({readOnly:$}),{select:V}=We(),{selectedItem:t,getItemById:ee,getSelectorForId:te,config:b,appState:ne}=he(l=>l),oe=Pe(b,t?{type:t.type,props:t.props}:null),N=t?lt(oe??b.components[t.type]?.fields,t.props):[],re=l=>b.components[l]?.label??l,s=t?te(t.props.id):void 0,p=bt(e.kind,u),ie=Ie(),_={capabilities:u,tokenRef:h,hostPanels:ie.chrome?.panels,describeNode:l=>{const w=ee(l);if(!w)return null;const x=b.components[w.type];return{type:w.type,label:x?.label??w.type,fields:x?.fields??{},props:w.props??{}}},siteId:E,websiteName:Q??null,notifyParent:P,onNotify:f,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onSelectNode:a},H=p?.head?.(e,_)??null,R=we({kind:O?.kind,pageName:O?.label}),A=H?.name??(p?n(p.name):t?n(re(t.type)):R.name),se=H?.kindLabel??(p?n(p.kindLabel):t?s&&s.zone!==Y?n("Block"):n("Section"):R.kindLabel),ae=p?p.icon:t?t.type:"page",D=I(e)&&t?ct(t.type):null,le=!!t&&!!s&&s.zone===Y&&t.type!==L&&t.type!==Ye,v=Ue(ne?.data,t),ce=()=>{v||s&&k.duplicateComponent(s.zone,s.index)},pe=()=>{s&&(k.removeComponent(s.zone,s.index),k.select(null))},de=t?b.components[t.type]?.defaultProps?.previewHover:void 0,C=I(e)&&!!t&&!!s&&de!==void 0,B=C&&t.props.previewHover===!0,me=()=>{!t||!s||k.replaceComponent(s.zone,s.index,{...t,props:{...t.props,previewHover:!B}})},{shown:F,setShown:fe}=tt(),ue=!!(p||t||T);return m("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right ${et(F)}`.trim(),children:[r(ge,{icon:r(ve,{type:ae,size:15}),name:A,kind:se,actions:!d&&I(e)&&t&&t.type!==L?m(M,{children:[r(z,{label:n("Duplicate section"),title:v??void 0,disabled:v!==null,onClick:ce,children:r(Ee,{size:15})}),le&&u.hasSiteSettings&&r(Ce,{node:t,currentSlug:S,siteId:E??void 0,tokenRef:h,runAuthed:Z,onNotify:f}),r(z,{label:n("Remove section"),danger:!0,onClick:pe,children:r(ke,{size:15})}),c?r(G,{side:"right",onHide:c,divider:!0}):null]}):c?r(G,{side:"right",onHide:c}):void 0}),C&&m("div",{className:"sf-preview-pin",children:[m("div",{className:"sf-preview-pin-text",children:[r("span",{className:"sf-preview-pin-label",children:n("Preview hover state")}),r("span",{className:"sf-preview-pin-hint",children:n("not shown live")})]}),r(Ve,{checked:B,onChange:me,ariaLabel:n("Preview hover state")})]}),m("div",{className:"sf-insp-body es-insp-body sf-scroll",children:[p?p.render(e,_):t?m(M,{children:[t.type===L&&u.hasSiteSettings&&r(Xe,{}),r(Ge,{children:r(U,{entries:r(je,{parts:N,heading:!1,onOpen:l=>V(it(t.props.id,l))}),entryCount:ze(N).length,itemWord:A})}),D&&r(He,{source:D,slug:dt(t?.props),menuId:pt(t?.props)})]}):T?r(U,{omit:K}):r(be,{variant:"none",icon:!1,message:n("Select a section or block to edit it.")}),ue&&r(Qe,{shown:F,onChange:fe,label:n("Show hints")})]})]})}export{un as CHAT_MODE,dn as HEADER_MODE,pn as SELECTION_MODE,hn as SOCIAL_MODE,mn as WEBSITE_MODE,fn as WEBSITE_PAGE_MODE,wt as default,bt as resolvePanel};
@@ -1 +1 @@
1
- "use client";import{jsx as a,Fragment as y,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as g,useRef as te,useState as B}from"react";import{SettingsSwitch as oe}from"efficient-easel/panel";import{PagesIcon as re,StylesIcon as ne}from"efficient-easel/rail";import{PaletteIcon as ie}from"efficient-shell/icons/efficient";import{Subtree as se,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{toItemSelector as ae}from"efficient-easel/node-ops";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ce}from"./LocationsTreeContext.js";import{usePartTypingDeps as de}from"./usePartTypingDeps.js";import{copyItemWrite as le}from"../lib/document/card-copy-rows.js";import pe from"./PagesPanel.js";import{useShowPagesForAddPage as me}from"./AddPageOnOpen.js";import{usePreviewChat as ue}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as fe}from"./preview-devices.js";import{PreviewDeviceContext as Se}from"efficient-easel/draw/client";import{usePreviewSocial as Ee}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as Pe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as he,usePreviewTicker as Te}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as we}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as ge}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Ie,HERO_PART_MODE as W,heroMediaRows as be,heroPartId as V,readHeroPartId as ve}from"../../render/lib/document/hero-media-parts.js";import _e,{CHAT_MODE as ke,HEADER_MODE as Ce,SOCIAL_MODE as Re,WEBSITE_MODE as M,WEBSITE_PAGE_MODE as Le}from"./SectionEditor.js";import R from"./SectionIcon.js";import Oe from"./SectionThumbnail.js";import{useScreenDocument as L}from"efficient-easel/screen/components/ScreenDocumentContext";import Ae from"./StylesPanel.js";import{LOCATIONS_TYPE as ye,useLocationsTree as Be}from"./useLocationsTree.js";import{usePinnedChromeSeed as De}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Ne}from"./useHostDocumentBridge.js";import{usePreviewHref as He}from"./usePreviewHref.js";import{WebsitePreviewButton as We}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as Ve,SITE_STYLES_TABS as Me,SITE_STYLES_TEXT_TAB as xe,useWebsiteName as Ge}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Ye}from"./useWebsiteMainAction.js";import{VersionHistory as Fe}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as ze}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Ke,heroGroupNestDepth as je}from"../../format/lib/hero-group-placement.js";import{stripMarkup as Ue}from"../../format/lib/markup.js";import{categoryShortLabel as Ze,PINNED_SECTION_TYPE as qe}from"../lib/document/add-palette.js";import{canAddTo as Xe}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as Je}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as Qe}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as $e,setBookingPreview as et}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as tt}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as ot}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as rt,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as nt,readLeftView as it,resolveLeftView as st,writeLeftView as at}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as ct}from"../lib/document/locked-blocks.js";import{everyPageNotice as dt,noOwnTab as lt,pinnedReach as Y,websiteDuplicateBlocked as pt}from"../lib/document/every-page.js";import{sharedSectionReach as mt,WEBSITE_SHARED_SECTIONS as ut}from"../lib/shared-sections-layer.js";import{activeSharedSections as O,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as ft}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as _}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as St,scrollPreviewToTop as z}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as Et}from"../lib/document/overrides.js";import{labelAtLevel as Pt}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as ht}from"../../format/lib/document/media-drop.js";import{editorWords as Tt,say as f}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as wt}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as gt,isSectionGroupType as It,sectionGroupZone as bt,SITE_FOOTER_TYPE as K,SITE_HEADER_TYPE as vt}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as _t}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as kt,SAVE_AS_TEMPLATE_EVENT as Ct}from"../../format/lib/save-as-template-action.js";import{menuPresets as Rt}from"../lib/sections/menu-presets.js";import{newSectionNode as Lt}from"../lib/sections/new-section-node.js";import{useHostProducts as Ot}from"../lib/use-host-products.js";import{backendOf as At}from"../lib/website-session.js";function j({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=Te(),c=H().tree,d=e,n=d.kind==="ticker"?d.heroId:null,s=v(i=>{if(!i)return;t({kind:"ticker",heroId:i}),St(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const S=String(i.props.id);return i.type==="Hero"&&we(i.props)&&a(D,{icon:a(R,{type:"ticker",size:13}),name:f(he),onSelect:()=>s(S),selected:n===S,rowProps:{onClick:m(()=>s(S))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=ge(),c=H().tree,{appState:d,config:n}=N(p=>p),s=te({data:d.data,config:n});s.current={data:d.data,config:n};const i=e,m=Ie.find(p=>W[p]===i.kind),S=m&&"nodeId"in i?V(String(i.nodeId),m):null,P=v(p=>{const l=ve(p);if(!l)return;const{data:T,config:h}=s.current,u=ae(T,h,{kind:"node",id:l.nodeId});if(!u)return;const I={kind:W[l.part],nodeId:l.nodeId};t({index:u.index,zone:u.zone},I)},[t]);return g(()=>{o(S)},[S,o]),g(()=>{r(P)},[r,P]),{partRows:(p,{rowClick:l})=>{const T=String(p.props.id),h=be(p);if(h.length===0)return null;const u=E=>{const w=V(T,E.part);return a(D,{icon:a(R,{type:E.part==="media"?"heroMedia":"heroImage",size:13}),name:f(E.label),onSelect:()=>P(w),selected:S===w,rowProps:{onClick:l(()=>P(w))},words:c},w)},[I,...b]=h;return C(y,{children:[u(I),b.length>0&&a(se,{children:b.map(u)})]})}}}function Z(e,t){return{partRows:(o,r)=>C(y,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function yt(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:d,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=L(),{hasPreviewLink:S}=o,P=At(x()).preview?.draftLink,p=Ye(e.data),l=kt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),T=v(()=>{!c||!r||i(Ct,{siteId:c,slug:r})},[i,c,r]),h=He({pageSlug:r,siteId:c,token:m}),u=t.previewHref?.(r)??h;return{barLead:()=>l.visible&&a(_t,{enabled:l.enabled,reason:l.enabled?"":l.disabledReason,onSaved:T}),barView:()=>S&&r&&a(We,{liveHref:u,pageId:d??null,draftLink:P}),mainAction:p}}function Bt(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:d,navigate:n}=L(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=E=>t.setView(E),[S,P]=B(Me[0].id),[p,l]=B(!1),{surface:T,setSurface:h}=Pe(),u=()=>{if(s){m("styles"),t.reveal(),z();return}e.show(M),e.reveal(),z()},I={id:"pages",label:f("Pages"),icon:a(re,{}),panel:({onHide:E})=>a(pe,{activeSurface:T,onPreviewSurface:h,onNavigate:w=>{h(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:E})},b=[];return!s&&i&&b.push({id:"appearance",label:f("Appearance"),icon:a(ie,{}),active:e.kind==="website",onSelect:u}),s&&b.push({id:"styles",label:f("Styles"),icon:a(ne,{}),panel:({onHide:E,notify:w})=>a(Ae,{tokenRef:d,siteId:c??void 0,onClose:E,onNotify:w,tab:S,onTabChange:P,revealPageGroup:p,onPageGroupRevealed:()=>l(!1)})}),{railLead:[I],railTrail:b,resolveLeftView:E=>st(E,s),openSettings:u,openStyles:()=>{P(xe),m("styles")},openPageStyles:s?()=>{P(Ve),l(!0),m("styles"),t.reveal()}:i?()=>{e.show(Le),e.reveal()}:void 0}}function Dt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=L(),c=N(n=>n.config),d=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=O();if(!n||!r)return;let s=!1;return ft(d).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,d])}function q(){const e=de();return v(t=>{le(t,e)},[e])}function Nt(e,t,o,r){const{kind:c,open:d}=e,{selected:n,zoneOf:s}=t;g(()=>{et(n?.type==="BookingBox"&&n.props.region==="confirm"?$e(s(String(n.props.id))):null)},[n?.props.id]);const i=Be(e,t),{capabilities:{hasSiteSettings:m}}=L();Dt();const{chat:S,setChat:P,setSelected:p,setSelectHandler:l}=ue(),T=v(()=>d(ke),[d]),h=c==="chat";g(()=>{p(h)},[h,p]),g(()=>{l(T)},[l,T]);const{setOpenHandler:u}=Ee(),I=v(()=>d(Re),[d]);g(()=>{u(I)},[u,I]);const b=Z(j(e),U(e)),E=yt(t),w=Bt(e,r);me(r);const Q=o.device,$=q();return{...b,...E,...w,hasOwnRows:k=>k.type===ye,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,onCopyItem:$,wrap:k=>a(ce.Provider,{value:!0,children:C(Se.Provider,{value:Q,children:[k,a(Fe,{})]})}),addPanelRow:k=>m?C("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(R,{type:"chat",size:16})}),C("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),T()},children:[f("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:f("A chat bubble on every page")})]}),a(oe,{checked:S.enabled,onChange:ee=>P({enabled:ee}),ariaLabel:f("Show the chat bubble on the whole site")})]}):void 0}}let X=null,A=new WeakMap;function Ht(e){const t=Tt();if(!e||!t)return e;X!==t&&(X=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:f(r.label)})):null,spec:e.spec?{...e.spec,addLabel:f(e.spec.addLabel),...e.spec.childLabel?{childLabel:f(e.spec.childLabel)}:{}}:null},A.set(e,o)),o}const Wt={isLockedBlock:(e,t)=>ct(e,t)||!!(t&&O()?.heldElsewhere(t.props.id)),duplicateBlocked:pt,nestDepth:(e,t,o)=>t===Ke?je(e,o):0,newSectionNode:Lt,canAddTo:(e,t,o,r)=>Ht(Xe(e,t,r,o)),blockIsOffered:Qe,slotsOf:Je,resolveOnInsert:!0},Vt=new Proxy(wt,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?f(o):o}}),Mt={labelAtLevel:(e,t,o)=>f(Pt(e,t,o)),descriptions:Vt,categoryLabel:e=>{const t=Ze(e);return t===void 0?void 0:f(t)},firstSection:qe,blockRowName:tt,rowName:ot,plainText:Ue,Icon:R,Thumbnail:Oe,useProducts:Ot,presets:Rt()},xt={desktop:2e3,tablet:800,mobile:390},J="desktop",Gt={options:fe,initial:J,fluid:J,widths:xt,hidesPerView:!0},Yt={read:it,write:e=>at(e),forSelection:(e,t)=>nt(e,t)},Ft={first:G,last:rt,firstGroup:vt,lastGroup:K,isSectionGroup:It,sectionGroupZone:bt,panelOf:e=>e===G?Ce:null,get sharedReach(){return _()?Kt:void 0},get shared(){return O()?ut:void 0},get groupTab(){return _()?lt:void 0},get groupBadge(){return _()?Y({type:K})??void 0:void 0},get changeNotice(){return _()?dt():void 0},get band(){return _()?zt:void 0},get groupAccepts(){return _()?gt:void 0}},zt={foldable:!0},Kt=e=>Y(e)??mt(e);function jt(e){return{...Z(j(e),U(e)),onCopyItem:q(),openSettings:()=>e.show(M)}}function Ut(e,t){De(e,t),Ne()}const dr={useOwnerName:Ge,useDocumentLabel:ze,useBridges:Nt,useStandaloneBridges:jt,useDocumentPass:Ut,blockRules:Wt,blockLook:Mt,devices:Gt,leftView:Yt,pinned:Ft,Canvas:Et,canvasDrag:{media:ht},Inspector:_e};export{dr as WEBSITE_SCREEN};
1
+ "use client";import{jsx as a,Fragment as y,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as g,useRef as te,useState as B}from"react";import{SettingsSwitch as oe}from"efficient-easel/panel";import{PagesIcon as re,StylesIcon as ne}from"efficient-easel/rail";import{PaletteIcon as ie}from"efficient-shell/icons/efficient";import{Subtree as se,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{toItemSelector as ae}from"efficient-easel/node-ops";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ce}from"./LocationsTreeContext.js";import{usePartTypingDeps as de}from"./usePartTypingDeps.js";import{copyItemWrite as le}from"../lib/document/card-copy-rows.js";import pe from"./PagesPanel.js";import{useShowPagesForAddPage as me}from"./AddPageOnOpen.js";import{usePreviewChat as ue}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as fe}from"./preview-devices.js";import{PHONE_EDGE as Se}from"../../format/lib/content/view-lines.js";import{PreviewDeviceContext as Ee}from"efficient-easel/draw/client";import{usePreviewSocial as Pe}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as he}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as Te,usePreviewTicker as we}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as ge}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as Ie}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as be,HERO_PART_MODE as W,heroMediaRows as ve,heroPartId as M,readHeroPartId as _e}from"../../render/lib/document/hero-media-parts.js";import ke,{CHAT_MODE as Ce,HEADER_MODE as Re,SOCIAL_MODE as Le,WEBSITE_MODE as V,WEBSITE_PAGE_MODE as Oe}from"./SectionEditor.js";import R from"./SectionIcon.js";import Ae from"./SectionThumbnail.js";import{useScreenDocument as L}from"efficient-easel/screen/components/ScreenDocumentContext";import ye from"./StylesPanel.js";import{LOCATIONS_TYPE as Be,useLocationsTree as De}from"./useLocationsTree.js";import{usePinnedChromeSeed as Ne}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as He}from"./useHostDocumentBridge.js";import{usePreviewHref as We}from"./usePreviewHref.js";import{WebsitePreviewButton as Me}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as Ve,SITE_STYLES_TABS as xe,SITE_STYLES_TEXT_TAB as Ge,useWebsiteName as Ye}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Fe}from"./useWebsiteMainAction.js";import{VersionHistory as ze}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Ke}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as je,heroGroupNestDepth as Ue}from"../../format/lib/hero-group-placement.js";import{stripMarkup as Ze}from"../../format/lib/markup.js";import{categoryShortLabel as qe,PINNED_SECTION_TYPE as Xe}from"../lib/document/add-palette.js";import{canAddTo as Je}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as Qe}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as $e}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as et,setBookingPreview as tt}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as ot}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as rt}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as nt,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as it,readLeftView as st,resolveLeftView as at,writeLeftView as ct}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as dt}from"../lib/document/locked-blocks.js";import{everyPageNotice as lt,noOwnTab as pt,pinnedReach as Y,websiteDuplicateBlocked as mt}from"../lib/document/every-page.js";import{sharedSectionReach as ut,WEBSITE_SHARED_SECTIONS as ft}from"../lib/shared-sections-layer.js";import{activeSharedSections as O,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as St}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as _}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as Et,scrollPreviewToTop as z}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as Pt}from"../lib/document/overrides.js";import{labelAtLevel as ht}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as Tt}from"../../format/lib/document/media-drop.js";import{editorWords as wt,say as f}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as gt}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as It,isSectionGroupType as bt,sectionGroupZone as vt,SITE_FOOTER_TYPE as K,SITE_HEADER_TYPE as _t}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as kt}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as Ct,SAVE_AS_TEMPLATE_EVENT as Rt}from"../../format/lib/save-as-template-action.js";import{menuPresets as Lt}from"../lib/sections/menu-presets.js";import{newSectionNode as Ot}from"../lib/sections/new-section-node.js";import{useHostProducts as At}from"../lib/use-host-products.js";import{backendOf as yt}from"../lib/website-session.js";function j({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=we(),c=H().tree,d=e,n=d.kind==="ticker"?d.heroId:null,s=v(i=>{if(!i)return;t({kind:"ticker",heroId:i}),Et(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const S=String(i.props.id);return i.type==="Hero"&&ge(i.props)&&a(D,{icon:a(R,{type:"ticker",size:13}),name:f(Te),onSelect:()=>s(S),selected:n===S,rowProps:{onClick:m(()=>s(S))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Ie(),c=H().tree,{appState:d,config:n}=N(p=>p),s=te({data:d.data,config:n});s.current={data:d.data,config:n};const i=e,m=be.find(p=>W[p]===i.kind),S=m&&"nodeId"in i?M(String(i.nodeId),m):null,P=v(p=>{const l=_e(p);if(!l)return;const{data:T,config:h}=s.current,u=ae(T,h,{kind:"node",id:l.nodeId});if(!u)return;const I={kind:W[l.part],nodeId:l.nodeId};t({index:u.index,zone:u.zone},I)},[t]);return g(()=>{o(S)},[S,o]),g(()=>{r(P)},[r,P]),{partRows:(p,{rowClick:l})=>{const T=String(p.props.id),h=ve(p);if(h.length===0)return null;const u=E=>{const w=M(T,E.part);return a(D,{icon:a(R,{type:E.part==="media"?"heroMedia":"heroImage",size:13}),name:f(E.label),onSelect:()=>P(w),selected:S===w,rowProps:{onClick:l(()=>P(w))},words:c},w)},[I,...b]=h;return C(y,{children:[u(I),b.length>0&&a(se,{children:b.map(u)})]})}}}function Z(e,t){return{partRows:(o,r)=>C(y,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function Bt(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:d,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=L(),{hasPreviewLink:S}=o,P=yt(x()).preview?.draftLink,p=Fe(e.data),l=Ct({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),T=v(()=>{!c||!r||i(Rt,{siteId:c,slug:r})},[i,c,r]),h=We({pageSlug:r,siteId:c,token:m}),u=t.previewHref?.(r)??h;return{barLead:()=>l.visible&&a(kt,{enabled:l.enabled,reason:l.enabled?"":l.disabledReason,onSaved:T}),barView:()=>S&&r&&a(Me,{liveHref:u,pageId:d??null,draftLink:P}),mainAction:p}}function Dt(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:d,navigate:n}=L(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=E=>t.setView(E),[S,P]=B(xe[0].id),[p,l]=B(!1),{surface:T,setSurface:h}=he(),u=()=>{if(s){m("styles"),t.reveal(),z();return}e.show(V),e.reveal(),z()},I={id:"pages",label:f("Pages"),icon:a(re,{}),panel:({onHide:E})=>a(pe,{activeSurface:T,onPreviewSurface:h,onNavigate:w=>{h(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:E})},b=[];return!s&&i&&b.push({id:"appearance",label:f("Appearance"),icon:a(ie,{}),active:e.kind==="website",onSelect:u}),s&&b.push({id:"styles",label:f("Styles"),icon:a(ne,{}),panel:({onHide:E,notify:w})=>a(ye,{tokenRef:d,siteId:c??void 0,onClose:E,onNotify:w,tab:S,onTabChange:P,revealPageGroup:p,onPageGroupRevealed:()=>l(!1)})}),{railLead:[I],railTrail:b,resolveLeftView:E=>at(E,s),openSettings:u,openStyles:()=>{P(Ge),m("styles")},openPageStyles:s?()=>{P(Ve),l(!0),m("styles"),t.reveal()}:i?()=>{e.show(Oe),e.reveal()}:void 0}}function Nt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=L(),c=N(n=>n.config),d=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=O();if(!n||!r)return;let s=!1;return St(d).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,d])}function q(){const e=de();return v(t=>{le(t,e)},[e])}function Ht(e,t,o,r){const{kind:c,open:d}=e,{selected:n,zoneOf:s}=t;g(()=>{tt(n?.type==="BookingBox"&&n.props.region==="confirm"?et(s(String(n.props.id))):null)},[n?.props.id]);const i=De(e,t),{capabilities:{hasSiteSettings:m}}=L();Nt();const{chat:S,setChat:P,setSelected:p,setSelectHandler:l}=ue(),T=v(()=>d(Ce),[d]),h=c==="chat";g(()=>{p(h)},[h,p]),g(()=>{l(T)},[l,T]);const{setOpenHandler:u}=Pe(),I=v(()=>d(Le),[d]);g(()=>{u(I)},[u,I]);const b=Z(j(e),U(e)),E=Bt(t),w=Dt(e,r);me(r);const Q=o.device,$=q();return{...b,...E,...w,hasOwnRows:k=>k.type===Be,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,onCopyItem:$,wrap:k=>a(ce.Provider,{value:!0,children:C(Ee.Provider,{value:Q,children:[k,a(ze,{})]})}),addPanelRow:k=>m?C("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(R,{type:"chat",size:16})}),C("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),T()},children:[f("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:f("A chat bubble on every page")})]}),a(oe,{checked:S.enabled,onChange:ee=>P({enabled:ee}),ariaLabel:f("Show the chat bubble on the whole site")})]}):void 0}}let X=null,A=new WeakMap;function Wt(e){const t=wt();if(!e||!t)return e;X!==t&&(X=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:f(r.label)})):null,spec:e.spec?{...e.spec,addLabel:f(e.spec.addLabel),...e.spec.childLabel?{childLabel:f(e.spec.childLabel)}:{}}:null},A.set(e,o)),o}const Mt={isLockedBlock:(e,t)=>dt(e,t)||!!(t&&O()?.heldElsewhere(t.props.id)),duplicateBlocked:mt,nestDepth:(e,t,o)=>t===je?Ue(e,o):0,newSectionNode:Ot,canAddTo:(e,t,o,r)=>Wt(Je(e,t,r,o)),blockIsOffered:$e,slotsOf:Qe,resolveOnInsert:!0},Vt=new Proxy(gt,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?f(o):o}}),xt={labelAtLevel:(e,t,o)=>f(ht(e,t,o)),descriptions:Vt,categoryLabel:e=>{const t=qe(e);return t===void 0?void 0:f(t)},firstSection:Xe,blockRowName:ot,rowName:rt,plainText:Ze,Icon:R,Thumbnail:Ae,useProducts:At,presets:Lt()},Gt={desktop:2e3,tablet:800,mobile:390},J="desktop",Yt={options:fe,initial:J,fluid:J,fluidMin:Se,widths:Gt,hidesPerView:!0},Ft={read:st,write:e=>ct(e),forSelection:(e,t)=>it(e,t)},zt={first:G,last:nt,firstGroup:_t,lastGroup:K,isSectionGroup:bt,sectionGroupZone:vt,panelOf:e=>e===G?Re:null,get sharedReach(){return _()?jt:void 0},get shared(){return O()?ft:void 0},get groupTab(){return _()?pt:void 0},get groupBadge(){return _()?Y({type:K})??void 0:void 0},get changeNotice(){return _()?lt():void 0},get band(){return _()?Kt:void 0},get groupAccepts(){return _()?It:void 0}},Kt={foldable:!0},jt=e=>Y(e)??ut(e);function Ut(e){return{...Z(j(e),U(e)),onCopyItem:q(),openSettings:()=>e.show(V)}}function Zt(e,t){Ne(e,t),He()}const pr={useOwnerName:Ye,useDocumentLabel:Ke,useBridges:Ht,useStandaloneBridges:Ut,useDocumentPass:Zt,blockRules:Mt,blockLook:xt,devices:Yt,leftView:Ft,pinned:zt,Canvas:Pt,canvasDrag:{media:Tt},Inspector:ke};export{pr as WEBSITE_SCREEN};
@@ -1627,31 +1627,12 @@
1627
1627
  display: none;
1628
1628
  }
1629
1629
 
1630
- /* ── The icon rail: the shared editor-shell EaselRail (`.es-rail`) ───────────
1631
- The rail markup + base styles live in the `efficient-easel` package (imported via
1632
- `efficient-easel/rail.css`); the storefront no longer hand-rolls `.sf-rail`.
1633
- editor-shell ships its own defaults, so we remap the themeable `--es-rail-*`
1634
- custom properties onto the storefront's own `--sf-*` tokens, which is what
1635
- keeps the shared rail reading as this editor's chrome rather than as the
1636
- package's. (One mode only — the editor is deliberately light-only; see the
1637
- note at the top of this file.)
1638
- Scoped `.sf-editor .es-rail` (specificity 0,2,0) so it always beats rail.css's
1639
- base `.es-rail` (0,1,0) whatever order the two stylesheets load in.
1640
-
1641
- THREE TOKENS ARE DELIBERATELY NOT REMAPPED HERE, and each absence is load-
1642
- bearing since card 66198 laid the rail into the top bar as a row:
1643
-
1644
- --es-rail-w only the COLUMN reads it (`.es-rail { width:
1645
- var(--es-rail-w) }`); the row is `width: auto` and sizes
1646
- to its buttons, so a remap would be config nothing reads.
1647
- --es-rail-bg the row variant re-points these to transparent / none / 0
1648
- --es-rail-shadow ON PURPOSE: the bar already has its own surface, and a
1649
- --es-rail-radius second white card floating inside it is the bug. This
1650
- rule ties with `.es-rail.es-rail-row` on specificity
1651
- (0,2,0 both), so setting them here would silently WIN
1652
- and put that card back. The rail's surface is the bar's.
1653
-
1654
- Everything left below is colour the row variant does not touch. */
1630
+ /* ── The icon rail: efficient-easel's EaselRail (`.es-rail`) ────────────────
1631
+ Since efficient-easel 36 the rail is `.sf-body`'s first column (Add, Pages,
1632
+ Layers, Styles, Media). Its markup, size (44 = 4 + 36 + 4, gap 8, inset 8)
1633
+ and colours are the package's, from `efficient-easel/rail.css` on the
1634
+ shell's tokens; the website adds NO `.es-rail` rule
1635
+ (scripts/test-no-host-rail-css.ts). */
1655
1636
 
1656
1637
  /* ── Left panel: Pages view (the page list) ─────────────────────────────── */
1657
1638
  .sf-pages {
@@ -0,0 +1,6 @@
1
+ import { type RuleReport, type SourceFile } from "../../../format/lib/source-rules/rule.js";
2
+ export type NoHostRailOptions = {
3
+ readonly exempt?: Readonly<Record<string, string>>;
4
+ readonly minFiles: number;
5
+ };
6
+ export declare function noHostRail(files: readonly SourceFile[], options: NoHostRailOptions): RuleReport;
@@ -0,0 +1 @@
1
+ import{DEFAULT_EASEL_STRINGS as d}from"efficient-easel/strings";import{ruleChecks as m}from"../../../format/lib/source-rules/rule.js";const a=s=>s.replace(/\/\*[\s\S]*?\*\//g,""),i=/(^|[^\w-])\.es-rail(?![\w-])[^{}]*\{/m,c=d.chrome.mediaLibrary,h=new RegExp(`["'\`]${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["'\`]`);function R(s,r){const t=m("no-host-rail: a host draws no rail of its own (efficient-easel 36)"),l=r.exempt??{};t.check("self-test: a `.es-rail` rule is found",i.test(a(".sf-editor .es-rail { width: 46px }"))),t.check("self-test: a `.es-rail-btn` rule is found too",i.test(a(".x .es-rail .es-rail-btn{color:red}"))),t.check("self-test: a comment is not a rule",!i.test(a("/* .es-rail { is easel's } */"))),t.check("self-test: a different class is not the rail",!i.test(a(".es-railway { color: red }"))),t.check("self-test: a quoted Media library is found",h.test(`label="${c}"`)),t.check(`at least ${r.minFiles} files read`,s.length>=r.minFiles,`read ${s.length}`);const o=[];for(const e of s)(e.path.endsWith(".css")?i.test(a(e.text)):/\.(tsx?|jsx?)$/.test(e.path)&&h.test(e.text))&&!(e.path in l)&&o.push(e.path);t.check('no host `.es-rail` rule and no host "Media library" control',o.length===0,`${o.join(", ")}: the rail's look is efficient-easel/rail.css's, and the rail's Media is the one way to the media library`);const f=new Set(s.map(e=>e.path)),n=Object.keys(l).filter(e=>!f.has(e));return t.check("every exemption names a file that is there",n.length===0,`stale: ${n.join(", ")}`),t.report()}export{R as noHostRail};
@@ -1 +1 @@
1
- import{hasOwnEntry as $}from"../own-entry.js";import{SHAPE_TABLE as x}from"./gallery-card-layout.js";const b=12,P=6,A=800,u={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes · photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},k=["phone","acrossPhone","leadPhone"],O=!0,S=new Set(k),_=Object.fromEntries(Object.entries(u).map(([e,o])=>[e,Object.fromEntries(Object.entries(o).filter(([s])=>!S.has(s)))])),w=Object.keys(u),j=[2,3,4,6];function B(e,o){return w.filter(s=>s===o||e===null||_[s].across===e)}function E(e){const o=e.layout;return typeof o=="string"&&$(u,o)?o:null}function Y(e){const o=E(e);return o?G(o,e.layoutPhone):null}const T={oneAcross:{label:"One across",phone:[[P,2]],acrossPhone:1}};function m(e){return typeof e=="string"&&$(T,e)?e:null}function y(e,o){return o?P/e.acrossPhone:b/e.across}function R(e){return e.ratio?x.find(o=>o.shape===e.ratio)?.ratio??null:null}function H(e){return[...e.lead??[],...e.desktop]}function G(e,o){const s=u[e],t=m(o);if(!t)return s;const{phone:p,acrossPhone:i}=T[t],c=Object.fromEntries(k.map(r=>[r,void 0]));return{...s,...c,phone:p,acrossPhone:i}}const C="sf-wall--";function F(e){const o=E(e);if(!o)return"";const s=m(e.layoutPhone);return`${C}${o}${s?`--${s}`:""}`}function v(e){const o=Y(e);if(!o)return"";const s=`.${F(e)}`,t=[],p=(r,h,a)=>`${s}:has(> :nth-child(${r}n+${h+a}):last-child) > :nth-last-child(-n+${a})`,i=(r,h,a=[])=>{const n=[],d=r.length,L=a.length;a.forEach(([l,g],f)=>{n.push(`${s} > :nth-child(${f+1}){grid-column:span ${l};grid-row:span ${g}}`)}),r.forEach(([l,g],f)=>{n.push(`${s} > :nth-child(${d}n+${L+f+1}){grid-column:span ${l};grid-row:span ${g}}`)});for(let l=1;l<d;l+=1)n.push(`${p(d,L,l)}{grid-column:span ${h};grid-row:span 1}`);return n};t.push(`${s}{grid-template-columns:repeat(${b},minmax(0,1fr))}`);const c=R(o);if(c&&(t.push(`${s}${s}{grid-auto-rows:auto}`),t.push(`${s}${s} > *{aspect-ratio:${c[0]}/${c[1]};height:auto}`)),t.push(...i(o.desktop,y(o,!1),o.lead)),t.push(`@media (max-width:${A}px){`),t.push(`${s}{grid-template-columns:repeat(${P},minmax(0,1fr))}`),t.push(...i(o.phone,y(o,!0),o.leadPhone)),o.phone.length===1&&!o.leadPhone?.length){const[r,h]=o.phone[0],a=o.lead?.length??0;for(let n=1;n<o.desktop.length;n+=1)t.push(`${p(o.desktop.length,a,n)}{grid-column:span ${r};grid-row:span ${h}}`)}return t.push("}"),t.join("")}export{j as GALLERY_ACROSS_BUCKETS,b as GALLERY_COLUMNS,P as GALLERY_COLUMNS_PHONE,_ as GALLERY_LAYOUTS,C as GALLERY_LAYOUT_CLASS_PREFIX,w as GALLERY_LAYOUT_KEYS,A as GALLERY_PHONE_BREAKPOINT,T as GALLERY_PHONE_LAYOUTS,B as galleryChoices,F as galleryLayoutClass,v as galleryLayoutCss,R as galleryLayoutRatio,H as galleryPictureCells,y as galleryTailSpan,Y as resolveGalleryLayout,m as resolveGalleryPhoneLayout};
1
+ import{PHONE_EDGE as O}from"./view-lines.js";import{hasOwnEntry as $}from"../own-entry.js";import{SHAPE_TABLE as x}from"./gallery-card-layout.js";const b=12,P=6,A=O,u={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes · photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},E=["phone","acrossPhone","leadPhone"],S=!0,_=new Set(E),w=Object.fromEntries(Object.entries(u).map(([e,o])=>[e,Object.fromEntries(Object.entries(o).filter(([s])=>!_.has(s)))])),Y=Object.keys(u),H=[2,3,4,6];function v(e,o){return Y.filter(s=>s===o||e===null||w[s].across===e)}function k(e){const o=e.layout;return typeof o=="string"&&$(u,o)?o:null}function R(e){const o=k(e);return o?C(o,e.layoutPhone):null}const m={oneAcross:{label:"One across",phone:[[P,2]],acrossPhone:1}};function T(e){return typeof e=="string"&&$(m,e)?e:null}function y(e,o){return o?P/e.acrossPhone:b/e.across}function G(e){return e.ratio?x.find(o=>o.shape===e.ratio)?.ratio??null:null}function I(e){return[...e.lead??[],...e.desktop]}function C(e,o){const s=u[e],t=T(o);if(!t)return s;const{phone:p,acrossPhone:i}=m[t],c=Object.fromEntries(E.map(r=>[r,void 0]));return{...s,...c,phone:p,acrossPhone:i}}const F="sf-wall--";function N(e){const o=k(e);if(!o)return"";const s=T(e.layoutPhone);return`${F}${o}${s?`--${s}`:""}`}function K(e){const o=R(e);if(!o)return"";const s=`.${N(e)}`,t=[],p=(r,h,a)=>`${s}:has(> :nth-child(${r}n+${h+a}):last-child) > :nth-last-child(-n+${a})`,i=(r,h,a=[])=>{const n=[],d=r.length,L=a.length;a.forEach(([l,g],f)=>{n.push(`${s} > :nth-child(${f+1}){grid-column:span ${l};grid-row:span ${g}}`)}),r.forEach(([l,g],f)=>{n.push(`${s} > :nth-child(${d}n+${L+f+1}){grid-column:span ${l};grid-row:span ${g}}`)});for(let l=1;l<d;l+=1)n.push(`${p(d,L,l)}{grid-column:span ${h};grid-row:span 1}`);return n};t.push(`${s}{grid-template-columns:repeat(${b},minmax(0,1fr))}`);const c=G(o);if(c&&(t.push(`${s}${s}{grid-auto-rows:auto}`),t.push(`${s}${s} > *{aspect-ratio:${c[0]}/${c[1]};height:auto}`)),t.push(...i(o.desktop,y(o,!1),o.lead)),t.push(`@media (max-width:${A}px){`),t.push(`${s}{grid-template-columns:repeat(${P},minmax(0,1fr))}`),t.push(...i(o.phone,y(o,!0),o.leadPhone)),o.phone.length===1&&!o.leadPhone?.length){const[r,h]=o.phone[0],a=o.lead?.length??0;for(let n=1;n<o.desktop.length;n+=1)t.push(`${p(o.desktop.length,a,n)}{grid-column:span ${r};grid-row:span ${h}}`)}return t.push("}"),t.join("")}export{H as GALLERY_ACROSS_BUCKETS,b as GALLERY_COLUMNS,P as GALLERY_COLUMNS_PHONE,w as GALLERY_LAYOUTS,F as GALLERY_LAYOUT_CLASS_PREFIX,Y as GALLERY_LAYOUT_KEYS,A as GALLERY_PHONE_BREAKPOINT,m as GALLERY_PHONE_LAYOUTS,v as galleryChoices,N as galleryLayoutClass,K as galleryLayoutCss,G as galleryLayoutRatio,I as galleryPictureCells,y as galleryTailSpan,R as resolveGalleryLayout,T as resolveGalleryPhoneLayout};
@@ -1 +1 @@
1
- import{resolveGalleryLayout as i}from"./gallery-layout.js";const u=12,s=1,l=3,a=800,p=3;function e(r,t,n){const o=typeof r=="number"?r:Number.parseInt(String(r??""),10);return Number.isFinite(o)?Math.min(n,Math.max(t,Math.trunc(o))):null}function f(r){return e(r,1,u)??p}function x(r,t){const n=e(r,s,l);return n??(f(t)===4?2:s)}function G(r){return r==null||r===""?null:e(r,1,u)}const R="data-sf-span",c=4;function I(r){return r==null||r===""?null:e(r,1,c)}const M="data-sf-row-span",S=["gridSpan","gridRowSpan"];function N(r){if(!r)return!1;if(r.type==="Grid")return!0;if(r.type==="GalleryB"){if(i(r.props??{}))return!1;const t=r.props?.columns;return t!=null&&t!==""}return!1}export{S as CELL_SPAN_KEYS,p as GRID_COLUMNS_FALLBACK,u as GRID_MAX_COLUMNS,c as GRID_MAX_ROW_SPAN,l as GRID_MOBILE_MAX_COLUMNS,s as GRID_MOBILE_MIN_COLUMNS,a as GRID_PHONE_BREAKPOINT,M as GRID_ROW_SPAN_ATTR,R as GRID_SPAN_ATTR,N as containerOffersPositions,f as resolveGridColumns,x as resolveGridMobileColumns,I as resolveGridRowSpan,G as resolveGridSpan};
1
+ import{resolveGalleryLayout as s}from"./gallery-layout.js";import{PHONE_EDGE as l}from"./view-lines.js";const u=12,i=1,p=3,x=l,f=3;function o(r,t,n){const e=typeof r=="number"?r:Number.parseInt(String(r??""),10);return Number.isFinite(e)?Math.min(n,Math.max(t,Math.trunc(e))):null}function _(r){return o(r,1,u)??f}function R(r,t){const n=o(r,i,p);return n??(_(t)===4?2:i)}function I(r){return r==null||r===""?null:o(r,1,u)}const M="data-sf-span",c=4;function N(r){return r==null||r===""?null:o(r,1,c)}const S="data-sf-row-span",m=["gridSpan","gridRowSpan"];function A(r){if(!r)return!1;if(r.type==="Grid")return!0;if(r.type==="GalleryB"){if(s(r.props??{}))return!1;const t=r.props?.columns;return t!=null&&t!==""}return!1}export{m as CELL_SPAN_KEYS,f as GRID_COLUMNS_FALLBACK,u as GRID_MAX_COLUMNS,c as GRID_MAX_ROW_SPAN,p as GRID_MOBILE_MAX_COLUMNS,i as GRID_MOBILE_MIN_COLUMNS,x as GRID_PHONE_BREAKPOINT,S as GRID_ROW_SPAN_ATTR,M as GRID_SPAN_ATTR,A as containerOffersPositions,_ as resolveGridColumns,R as resolveGridMobileColumns,N as resolveGridRowSpan,I as resolveGridSpan};
@@ -1 +1 @@
1
- const f=800,r=["top","middle","bottom"],E=["left","center","right"],_="bottom",O="left",s={top:"Top",middle:"Middle",bottom:"Bottom"},c={left:"Left",center:"Center",right:"Right"},l="Up and down",d="Sideways",H={top:"flex-start",middle:"center",bottom:"flex-end"},P={left:"flex-start",center:"center",right:"flex-end"},i="--sf-hero-phone-y",x="--sf-hero-phone-x";function N(t){return r.includes(t)?t:_}function S(t){return E.includes(t)?t:O}function R(t,p){const e=N(t),n=S(p),o={};return e!==_&&(o[i]=H[e]),n!==O&&(o[x]=P[n]),o}function D(){return r.map(t=>({label:s[t],value:t}))}function A(){return E.map(t=>({label:c[t],value:t}))}export{f as HERO_PHONE_BREAKPOINT,E as HERO_PHONE_SIDEWAYS,O as HERO_PHONE_SIDEWAYS_DEFAULT,P as HERO_PHONE_SIDEWAYS_FLEX,d as HERO_PHONE_SIDEWAYS_LABEL,c as HERO_PHONE_SIDEWAYS_LABELS,x as HERO_PHONE_SIDEWAYS_VAR,r as HERO_PHONE_UPDOWN,_ as HERO_PHONE_UPDOWN_DEFAULT,H as HERO_PHONE_UPDOWN_FLEX,l as HERO_PHONE_UPDOWN_LABEL,s as HERO_PHONE_UPDOWN_LABELS,i as HERO_PHONE_UPDOWN_VAR,R as heroPhoneStackStyle,S as normalisePhoneSideways,N as normalisePhoneUpDown,A as phoneSidewaysPoints,D as phoneUpDownPoints};
1
+ import{PHONE_EDGE as s}from"./content/view-lines.js";const d=s,r=["top","middle","bottom"],E=["left","center","right"],_="bottom",O="left",c={top:"Top",middle:"Middle",bottom:"Bottom"},H={left:"Left",center:"Center",right:"Right"},D="Up and down",R="Sideways",P={top:"flex-start",middle:"center",bottom:"flex-end"},i={left:"flex-start",center:"center",right:"flex-end"},x="--sf-hero-phone-y",N="--sf-hero-phone-x";function f(t){return r.includes(t)?t:_}function S(t){return E.includes(t)?t:O}function A(t,p){const e=f(t),n=S(p),o={};return e!==_&&(o[x]=P[e]),n!==O&&(o[N]=i[n]),o}function h(){return r.map(t=>({label:c[t],value:t}))}function m(){return E.map(t=>({label:H[t],value:t}))}export{d as HERO_PHONE_BREAKPOINT,E as HERO_PHONE_SIDEWAYS,O as HERO_PHONE_SIDEWAYS_DEFAULT,i as HERO_PHONE_SIDEWAYS_FLEX,R as HERO_PHONE_SIDEWAYS_LABEL,H as HERO_PHONE_SIDEWAYS_LABELS,N as HERO_PHONE_SIDEWAYS_VAR,r as HERO_PHONE_UPDOWN,_ as HERO_PHONE_UPDOWN_DEFAULT,P as HERO_PHONE_UPDOWN_FLEX,D as HERO_PHONE_UPDOWN_LABEL,c as HERO_PHONE_UPDOWN_LABELS,x as HERO_PHONE_UPDOWN_VAR,A as heroPhoneStackStyle,S as normalisePhoneSideways,f as normalisePhoneUpDown,m as phoneSidewaysPoints,h as phoneUpDownPoints};
@@ -1,8 +1,11 @@
1
- import{failedChecks as x,reportLines as c,ruleChecks as m}from"./rule.js";const E=new RegExp([String.raw`(?<![\w@-])(?:max-)?view-tablet:`,String.raw`\bVIEW_TABLET_MIN\b`,String.raw`\[\s*["'\x60]view-tablet["'\x60]\s*\]`,String.raw`(?<![\w$])(?:TABLET|PHONE)_MEDIA\b`,String.raw`\bBOX_PHONE_PAD_LINE\b`,String.raw`719\.98px`,String.raw`max-width: ?719px`,String.raw`(?:max|min)-\[(?:719(?:\.98)?|720)px\]:`,String.raw`min-width: ?720px`,String.raw`width\s*<\s*720px`,String.raw`720px\s*<=?\s*width`,String.raw`width\s*>=\s*720px`].join("|"),"g"),f="lib/content/view-lines.ts",g=n=>n.split(`
2
- `).filter(i=>!/^\s*(\*(\s|\/|$)|\/\/|\/\*)/.test(i)).join(`
3
- `),o=n=>g(n).match(E)?.length??0;function u(n,i){const{check:a,report:p}=m("one phone edge");{const e=['"max-view-tablet:px-4 view-tablet:max-view-desktop:grow max-view-wide:px-5 @max-view-tablet:hidden"','import { VIEW_TABLET_MIN } from "efficient-easel/draw"; const NOT_VIEW_TABLET_MINIMUM = 1;',"`@media (max-width: 719.98px)` `(min-width: 720px)` `(min-width: 800px)`",'import { PHONE_MEDIA, TABLET_MEDIA, EDGE_PHONE_MEDIA, EDGE_TABLET_MEDIA } from "x"; BOX_PHONE_PAD_LINE; VIEW_LINE_PX["view-tablet"];',"@media (width < 720px) {} @media (720px <= width < 1100px) {} @media (width < 800px) {}"," *:has(> [data-x]) { max-view-tablet:hidden }","`max-[720px]:px-2 min-[720px]:grow @media (max-width: 719px)` `max-[800px]:px-2`"," * a comment that says max-view-tablet: is not code"].join(`
4
- `);a("the reader finds the 15 second-edge values and nothing else",o(e)===15,`found ${o(e)}`)}const r=n.filter(e=>/\.(tsx?|css)$/.test(e.path));a(`read the source (${r.length} TS/TSX/CSS files, at least ${i.minFiles})`,r.length>=i.minFiles,"fewer means the walk broke, and the check below is vacuous");const d=[],w=[];for(const e of r){if(e.path.endsWith(f))continue;const t=o(e.text),s=i.keep[e.path];s===void 0?t>0&&d.push(`${e.path}: ${t}`):t>s.lines&&w.push(`${e.path}: ${t}, kept ${s.lines}`)}a("no second phone edge: read PHONE_EDGE, or name it as view-wide / max-view-wide",d.length===0,`a 720 line outside the kept files:
1
+ import{failedChecks as _,reportLines as f,ruleChecks as g}from"./rule.js";const N=new RegExp([String.raw`(?<![\w@-])(?:max-)?view-tablet:`,String.raw`\bVIEW_TABLET_MIN\b`,String.raw`\[\s*["'\x60]view-tablet["'\x60]\s*\]`,String.raw`(?<![\w$])(?:TABLET|PHONE)_MEDIA\b`,String.raw`\bBOX_PHONE_PAD_LINE\b`,String.raw`719\.98px`,String.raw`max-width: ?719px`,String.raw`(?:max|min)-\[(?:719(?:\.98)?|720)px\]:`,String.raw`min-width: ?720px`,String.raw`width\s*<\s*720px`,String.raw`720px\s*<=?\s*width`,String.raw`width\s*>=\s*720px`].join("|"),"g"),p="lib/content/view-lines.ts",w=s=>s.split(`
2
+ `).filter(n=>!/^\s*(\*(\s|\/|$)|\/\/|\/\*)/.test(n)).join(`
3
+ `),r=s=>w(s).match(N)?.length??0,O=/\b(?:const|let)\s+([A-Z][A-Z0-9_]*)\s*(?::\s*number\s*)?=\s*800\s*(?:;|,|$)/gm,I=/PHONE|EDGE|BREAKPOINT|MOBILE|VIEW|LINE|CAP|WIDTH/,m=s=>[...w(s).matchAll(O)].map(n=>n[1]).filter(n=>I.test(n));function A(s,n){const{check:a,report:x}=g("one phone edge");{const e=['"max-view-tablet:px-4 view-tablet:max-view-desktop:grow max-view-wide:px-5 @max-view-tablet:hidden"','import { VIEW_TABLET_MIN } from "efficient-easel/draw"; const NOT_VIEW_TABLET_MINIMUM = 1;',"`@media (max-width: 719.98px)` `(min-width: 720px)` `(min-width: 800px)`",'import { PHONE_MEDIA, TABLET_MEDIA, EDGE_PHONE_MEDIA, EDGE_TABLET_MEDIA } from "x"; BOX_PHONE_PAD_LINE; VIEW_LINE_PX["view-tablet"];',"@media (width < 720px) {} @media (720px <= width < 1100px) {} @media (width < 800px) {}"," *:has(> [data-x]) { max-view-tablet:hidden }","`max-[720px]:px-2 min-[720px]:grow @media (max-width: 719px)` `max-[800px]:px-2`"," * a comment that says max-view-tablet: is not code"].join(`
4
+ `);a("the reader finds the 15 second-edge values and nothing else",r(e)===15,`found ${r(e)}`);const t=["export const GRID_PHONE_BREAKPOINT = 800;","const NO_CAP_ON_PHONE = 800;","export const PHONE_LINE: number = 800;","export const HERO_PHONE_BREAKPOINT = PHONE_EDGE;","const weight = 800; const FONT_HEAVY = 800; const GAP_LINE = 8000;"," * const OLD_PHONE_LINE = 800; in a comment"].join(`
5
+ `),i=m(t);a("the reader finds the 3 named 800 copies and nothing else",i.length===3,`found ${i.join(", ")}`)}const o=s.filter(e=>/\.(tsx?|css)$/.test(e.path));a(`read the source (${o.length} TS/TSX/CSS files, at least ${n.minFiles})`,o.length>=n.minFiles,"fewer means the walk broke, and the check below is vacuous");const d=[],E=[];for(const e of o){if(e.path.endsWith(p))continue;const t=r(e.text),i=n.keep[e.path];i===void 0?t>0&&d.push(`${e.path}: ${t}`):t>i.lines&&E.push(`${e.path}: ${t}, kept ${i.lines}`)}a("no second phone edge: read PHONE_EDGE, or name it as view-wide / max-view-wide",d.length===0,`a 720 line outside the kept files:
5
6
  ${d.join(`
6
- `)}`),a("no kept file gains a 720 line (its count is a ceiling)",w.length===0,`a kept file grew:
7
- ${w.join(`
8
- `)}`);const l=Object.keys(i.keep).filter(e=>{const t=r.find(s=>s.path===e);return t===void 0||o(t.text)===0});a("every kept file is in the tree and still keeps a 720 line (else drop it from the list)",l.length===0,l.join(", "));const h=p();return{...h,ok:x(h).length===0,lines:c(h)}}export{u as onePhoneEdge};
7
+ `)}`),a("no kept file gains a 720 line (its count is a ceiling)",E.length===0,`a kept file grew:
8
+ ${E.join(`
9
+ `)}`);const c=o.filter(e=>!e.path.endsWith(p)).flatMap(e=>m(e.text).map(t=>`${e.path}: ${t}`));a("the edge's value has one home: a named screen line reads PHONE_EDGE, never its own 800",c.length===0,`a second named 800:
10
+ ${c.join(`
11
+ `)}`);const l=Object.keys(n.keep).filter(e=>{const t=o.find(i=>i.path===e);return t===void 0||r(t.text)===0});a("every kept file is in the tree and still keeps a 720 line (else drop it from the list)",l.length===0,l.join(", "));const h=x();return{...h,ok:_(h).length===0,lines:f(h)}}export{A as onePhoneEdge};
@@ -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,2 +1,2 @@
1
- import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as C,TEXT as h,smallText as R}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as w}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as H,STACK_BELOW_PROP as F}from"../../../content/box-stack-line.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";function b(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const ne={standard:64,editorial:60,simple:36,essay:28,shelf:20},K={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function z(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function ie(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=L({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const E={[F]:H},m={top:0,right:0,bottom:1,left:0};import{token as le}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>R(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=800,U=H,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),N={...M,align:"right",alignPhone:"left",...C},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:N,style:{...x(e),color:"labels"}}),O=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?j(D()):{},...n.style}}}}},j=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function $(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map($)}}function v(e,t){const n=u(K,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[O(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[O(t.title,`Three ranges,
2
- one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...N,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function y(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>y(n,t))}:e}function L(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...E},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...E},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},y(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[w("maxWidth")]:U,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[w("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],X=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function G(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>X(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function oe(e){return b(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,Q={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function re(e){const t=p.get(e);if(t)return t;const n=z(e),i=b(e),o=i==="editorial"?L(n):i==="simple"?B(n,Q):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?G(n):v(e,n);return p.set(e,o),o}export{E as EDITORIAL_LINE,ne as HEAD_BELOW,Q as SIMPLE_HEADING_LOOK,ie as editorialHeadTree,_ as fluidToken,b as headLookOf,oe as headReads,re as headTree,$ as headWordsOnPhoneLine,le as token,y as withAccentItalic};
1
+ import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as C,TEXT as h,smallText as R}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as F}from"../../../content/box-stack-line.js";import{PHONE_EDGE as K}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";function E(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const oe={standard:64,editorial:60,simple:36,essay:28,shelf:20},z={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function U(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function re(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=L({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const b={[F]:w},m={top:0,right:0,bottom:1,left:0};import{token as de}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>R(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=K,j=w,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),N={...M,align:"right",alignPhone:"left",...C},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:N,style:{...x(e),color:"labels"}}),O=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?$(D()):{},...n.style}}}}},$=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function v(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(v)}}function G(e,t){const n=u(z,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[O(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[O(t.title,`Three ranges,
2
+ one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...N,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function y(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>y(n,t))}:e}function L(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...b},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...b},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},y(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[H("maxWidth")]:j,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[H("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],X=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function Q(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>X(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function ae(e){return E(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,V={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function se(e){const t=p.get(e);if(t)return t;const n=U(e),i=E(e),o=i==="editorial"?L(n):i==="simple"?B(n,V):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?Q(n):G(e,n);return p.set(e,o),o}export{b as EDITORIAL_LINE,oe as HEAD_BELOW,V as SIMPLE_HEADING_LOOK,re as editorialHeadTree,_ as fluidToken,E as headLookOf,ae as headReads,se as headTree,v as headWordsOnPhoneLine,de as token,y as withAccentItalic};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "71.0.0",
3
+ "version": "72.0.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@tabler/icons-react": "^3.46.0",
57
- "efficient-easel": "^35.1.0",
57
+ "efficient-easel": "^36.0.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.1.0",
76
+ "efficient-easel": "^36.0.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",