efficient-web-builder 26.3.0 → 27.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 +27 -0
- package/dist/editor/components/SwitchToBoxFooter.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/storefront-editor.css +18 -13
- package/dist/editor/components/usePinnedChromeSeed.js +1 -1
- package/dist/format/lib/build/module-specifiers.d.ts +39 -0
- package/dist/format/lib/build/module-specifiers.js +1 -0
- package/dist/format/lib/logo/logo-size.d.ts +9 -0
- package/dist/format/lib/logo/logo-size.js +1 -0
- package/dist/format/lib/puck/box-footer.js +1 -0
- package/dist/format/lib/source-rules/panel-no-divider-lines.js +1 -1
- package/dist/render/components/Logo.d.ts +1 -10
- package/dist/render/components/Logo.js +1 -1
- package/package.json +4 -4
- package/dist/editor/lib/puck/box-footer.js +0 -1
- /package/dist/{editor → format}/lib/puck/box-footer.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 27.0.0 - 2026-10-20
|
|
6
|
+
|
|
7
|
+
**The settings panels read easel's one side inset** (GG option A, 2026-10-20). A MAJOR: the `efficient-easel` peer range rises from `^13.3.0 || ^14.0.0` to `^14.1.0`, and the dev range from `^14.0.0`.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Every panel head and the settings rows share one side inset: 16px, and 12px under a 260px panel.** efficient-easel 14.1.0 declares it once, `--es-insp-pad-x` on the side panel. Before, the heads used 16 and 12 and the rows had their own 8px under a 284px panel, so between 220 and 283px a head and its rows sat up to 8px apart. At a 220px panel the rows now have 12px each side, not 8.
|
|
12
|
+
- `storefront-editor.css` has no inset alias of its own any more (`--sf-insp-pad-x` is gone). The right inset (`--sf-insp-pad-end`) and the full-bleed group rule read `--es-insp-pad-x`.
|
|
13
|
+
- The Appearance rail button draws the shell's palette glyph; its own svg is gone (#208).
|
|
14
|
+
|
|
15
|
+
### Guards
|
|
16
|
+
|
|
17
|
+
- `scripts/panel-body-padding.ts` reads the inset from easel's token rules. `test-panel-padding-narrows.ts` holds 16, and 12 at and under a saved 260px panel. `test-panel-strip-width-stable.ts` re-aims its samples: the inset step at 260 gives the 239px tab line two bands, and the 197px line is at the 220px floor again. `panel-no-divider-lines` checks the full-bleed rule against `--es-insp-pad-x`.
|
|
18
|
+
- `scripts/test-two-ways-to-add.ts` §1 and `scripts/test-publish-main-action.tsx`: the easel peer and dev ranges are `^14.1.0`.
|
|
19
|
+
|
|
20
|
+
## 26.3.1 - 2026-10-20
|
|
21
|
+
|
|
22
|
+
**`format/lib/puck/box-footer` is back** (26.3.0 removed it by mistake). A PATCH: every file 26.2.0 published is in the package again.
|
|
23
|
+
|
|
24
|
+
### Fixed for hosts
|
|
25
|
+
|
|
26
|
+
- **26.3.0 shipped `lib/puck/box-footer` under `editor/`, not `format/`.** It imported `FOOTER_LOGO_PX` from `components/Logo`, a React module, and a format module may import only format modules (`scripts/entry-sides.mjs`). A host that imports `efficient-web-builder/format/lib/puck/box-footer` (efficient-storefront-blocks' `SwitchToBoxHeader`) broke on 26.3.0. The logo sizes (`HEADER_LOGO_PX`, `FOOTER_LOGO_PX`, `HEADER_LOGO_PX_MIN`, `HEADER_LOGO_PX_MAX`, `LOGO_BLOCK_PX_MAX`) now live in `lib/logo/logo-size`, which has no React; `components/Logo` re-exports every one, so each import of them still works. `editor/lib/puck/box-footer`, which only 26.3.0 had, goes.
|
|
27
|
+
|
|
28
|
+
### Guards
|
|
29
|
+
|
|
30
|
+
- New `scripts/verify-published-entries.mjs`, run by `verify:dist` (CI and the release): it packs the newest npm release older than `package.json`'s version and fails when a file under its `dist/` is missing here, unless the version is a new major or the script's `REMOVALS` names the file for this version with its reason. It fails, and does not skip, when npm cannot be read. Red against 26.3.0 (the two `format/lib/puck/box-footer` files).
|
|
31
|
+
|
|
5
32
|
## 26.3.0 - 2026-10-20
|
|
6
33
|
|
|
7
34
|
**The old footer's settings come with it to the Box footer** (box footer gaps). A minor: new optional rows on the Logo block, Divider and Box, none seeded, so every stored page draws what it drew.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,Fragment as g,jsxs as y}from"react/jsx-runtime";import{useState as k}from"react";import{createNode as w,newId as x}from"efficient-easel/data";import{useEasel as F}from"efficient-easel/easel";import{Banner as S,Button as s}from"efficient-shell/ui";import{useStorefrontDocument as T}from"./StorefrontDocumentContext.js";import{boxFooterFromFooter as B}from"
|
|
1
|
+
"use client";import{jsx as r,Fragment as g,jsxs as y}from"react/jsx-runtime";import{useState as k}from"react";import{createNode as w,newId as x}from"efficient-easel/data";import{useEasel as F}from"efficient-easel/easel";import{Banner as S,Button as s}from"efficient-shell/ui";import{useStorefrontDocument as T}from"./StorefrontDocumentContext.js";import{boxFooterFromFooter as B}from"../../format/lib/puck/box-footer.js";import{FOOTER_TYPE as E}from"../lib/puck/footer-blocks.js";import{SITE_FOOTER_TYPE as a,withSectionGroup as _}from"../../format/lib/puck/section-groups.js";import{say as t}from"../../format/lib/editor-words.js";function O(){const{appState:c,dispatch:m,config:l}=F(o=>o),{readOnly:f}=T(),[u,n]=k(!1),i=c.data.content;if(f||i.some(o=>o.type===a))return null;const p=i.find(o=>o.type===E)??null,d=(o,e)=>w(l,o,e),h=()=>{const o=B(p,d,x(a));m({type:"setData",data:e=>({...e,content:[..._(e.content,o)]}),recordHistory:!0}),n(!1)};return r(S,{tone:"info",title:t("This footer uses the old layout"),action:u?y(g,{children:[r(s,{variant:"primary",size:"sm",onClick:h,children:t("Switch now")}),r(s,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:t("Cancel")})]}):r(s,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:t("Switch to Box footer")}),children:t("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,Fragment as A,jsxs as k}from"react/jsx-runtime";import{useCallback as _,useEffect as b,useRef as X,useState as J}from"react";import{Button as Q,Tooltip as $}from"efficient-shell/ui";import{SettingsSwitch as ee}from"efficient-easel/panel";import{PagesIcon as te,StylesIcon as oe}from"efficient-easel/rail";import{TemplateIcon as re}from"efficient-easel/icons";import{Subtree as ne,TreeRow as y}from"efficient-easel/tree";import{useEasel as ie}from"efficient-easel/easel";import{useEaselStrings as B}from"efficient-easel/strings";import{LocationsTreeContext as se}from"./LocationsTreeContext.js";import ae from"./PagesPanel.js";import{usePreviewChat as ce}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as le}from"./preview-devices.js";import{PreviewDeviceContext as de}from"efficient-easel/draw/client";import{usePreviewHeader as pe}from"../../render/components/PreviewHeaderContext.js";import{usePreviewSocial as me}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as fe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as ue,usePreviewTicker as Se}from"../../render/components/PreviewTickerContext.js";import{usePreviewHeroPart as we}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Ee,HERO_PART_MODE as H,heroMediaRows as he,heroPartId as N,readHeroPartId as Pe}from"../../render/lib/puck/hero-media-parts.js";import Te,{CHAT_MODE as be,HEADER_MODE as D,SOCIAL_MODE as ge,WEBSITE_MODE as W}from"./SectionEditor.js";import L from"./SectionIcon.js";import Ie from"./SectionThumbnail.js";import{useStorefrontDocument as R}from"./StorefrontDocumentContext.js";import ve from"./StylesPanel.js";import{LOCATIONS_TYPE as ke,useLocationsTree as _e}from"./useLocationsTree.js";import{usePinnedChromeSeed as Ce}from"./usePinnedChromeSeed.js";import{usePreviewHref as Le}from"./usePreviewHref.js";import{WebsitePreviewButton as Re}from"./WebsitePreviewButton.js";import{SITE_STYLES_TABS as Oe,SITE_STYLES_TEXT_TAB as Ae,useWebsiteName as ye}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Be}from"./useWebsiteMainAction.js";import{useEditorSession as He}from"../lib/editor-session-context.js";import{useOpenPageName as Ne}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as De,heroGroupNestDepth as We}from"../../format/lib/hero-group-placement.js";import{stripMarkup as xe}from"../../format/lib/markup.js";import{categoryShortLabel as Me,PINNED_SECTION_TYPE as Ve}from"../lib/puck/add-palette.js";import{canAddTo as Ye}from"../lib/puck/add-target.js";import{blockIsOffered as Ge}from"../lib/puck/block-offer.js";import{sectionIdOfBoxZone as Fe,setBookingPreview as ze}from"../../render/lib/puck/booking-preview.js";import{footerBlockRowName as je}from"../../format/lib/puck/footer-block-row-name.js";import{FOOTER_TYPE as Ke,HEADER_TYPE as x}from"../lib/puck/footer-blocks.js";import{leftViewForSelection as Ue,readLeftView as Ze,resolveLeftView as qe,writeLeftView as Xe}from"../../format/lib/puck/left-view.js";import{websiteIsLockedBlock as Je}from"../lib/puck/locked-blocks.js";import{everyPageBadge as Qe,everyPageNotice as $e,pinnedGroupTab as et,websiteDuplicateBlocked as tt}from"../lib/puck/every-page.js";import{pinnedChromeInPlace as C}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ot,scrollPreviewToTop as M}from"../lib/puck/preview-dom.js";import{SiteCanvas as rt}from"../lib/puck/overrides.js";import{labelAtLevel as nt}from"../../format/lib/puck/section-catalog.js";import{editorWords as it,say as c}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as st}from"../../format/lib/puck/section-descriptions.js";import{groupAccepts as at,isSectionGroupType as ct,sectionGroupZone as lt,SITE_FOOTER_TYPE as dt,SITE_HEADER_TYPE as pt}from"../../format/lib/puck/section-groups.js";import{resolveSaveAsTemplateAction as mt,SAVE_AS_TEMPLATE_EVENT as ft}from"../../format/lib/save-as-template-action.js";import{newSectionNode as ut}from"../lib/sections/new-section-node.js";import{useHostProducts as St}from"../lib/use-host-products.js";import{backendOf as wt}from"../lib/website-session.js";function V({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:n}=Se(),l=B().tree,d=e,p=d.kind==="ticker"?d.heroId:null,a=_(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ot(i)},[t]);return b(()=>{o(p)},[p,o]),b(()=>{n(a)},[n,a]),{partRows:(i,{rowClick:u})=>{const m=String(i.props.id);return i.type==="Hero"&&r(y,{icon:r(L,{type:"ticker",size:13}),name:c(ue),onSelect:()=>a(m),selected:p===m,rowProps:{onClick:u(()=>a(m))},words:l})}}}function Y({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:n}=we(),l=B().tree,{appState:d}=ie(f=>f),p=d.data.content??[],a=X(p);a.current=p;const i=e,u=Ee.find(f=>H[f]===i.kind),m=u&&"nodeId"in i?N(String(i.nodeId),u):null,E=_(f=>{const s=Pe(f);if(!s)return;const h=a.current.findIndex(S=>String(S.props.id)===s.nodeId);if(h<0)return;const T={kind:H[s.part],nodeId:s.nodeId};t({index:h},T)},[t]);return b(()=>{o(m)},[m,o]),b(()=>{n(E)},[n,E]),{partRows:(f,{rowClick:s})=>{const h=String(f.props.id),T=he(f);if(T.length===0)return null;const S=I=>{const g=N(h,I.part);return r(y,{icon:r(L,{type:I.part==="media"?"heroMedia":"heroImage",size:13}),name:c(I.label),onSelect:()=>E(g),selected:m===g,rowProps:{onClick:s(()=>E(g))},words:l},g)},[w,...P]=T;return k(A,{children:[S(w),P.length>0&&r(ne,{children:P.map(S)})]})}}}function G(e,t){return{partRows:(o,n)=>k(A,{children:[e.partRows?.(o,n),t.partRows?.(o,n)]})}}function Et(e){const{adapter:t,capabilities:o,currentSlug:n,siteId:l,docId:d,hasUnsavedEdits:p,bridgeCapabilities:a,notifyParent:i,token:u}=R(),{hasPreviewLink:m}=o,E=wt(He()).preview?.draftLink,f=Be(e.data),s=mt({hasTrustedConsole:!!u,canCreatePlatformTemplate:a.canCreatePlatformTemplate,capabilities:o,siteId:l,hasUnsavedEdits:p}),h=_(()=>{!l||!n||i(ft,{siteId:l,slug:n})},[i,l,n]),T=Le({pageSlug:n,siteId:l,token:u}),S=t.previewHref?.(n)??T;return{barLead:()=>s.visible&&r($,{side:"bottom",content:s.enabled?c("Save this website as a platform template"):c(s.disabledReason),children:r("span",{className:"sf-tip-disabled",tabIndex:s.enabled?void 0:0,children:r(Q,{variant:"secondary",disabled:!s.enabled,onClick:h,rightIcon:r(re,{size:15}),children:c("Save as Template")})})}),barTrail:()=>m&&n&&r(Re,{liveHref:S,pageId:d??null,draftLink:E}),mainAction:f}}function ht(){return k("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[r("path",{d:"M12 3a9 9 0 0 0 0 18 2.3 2.3 0 0 0 2.3-2.3c0-.55-.22-1.05-.57-1.42-.34-.37-.56-.87-.56-1.43A2.35 2.35 0 0 1 15.6 13.5H18a3 3 0 0 0 3-3c0-4.14-4-7.5-9-7.5z"}),r("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),r("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),r("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function Pt(e,t){const{capabilities:o,templateId:n,siteId:l,tokenRef:d,navigate:p}=R(),{hasSiteTheme:a,explainsSiteSettings:i}=o,u=w=>t.setView(w),[m,E]=J(Oe[0].id),{surface:f,setSurface:s}=fe(),h=()=>{if(a){u("styles"),t.reveal(),M();return}e.show(W),e.reveal(),M()},T={id:"pages",label:c("Pages"),icon:r(te,{}),panel:({onHide:w})=>r(ae,{activeSurface:f,onPreviewSurface:s,onNavigate:P=>{s(null),p(n?{kind:"template",id:n,pageSlug:P}:{kind:"page",slug:P,siteId:l??void 0})},onClose:w})},S=[];return!a&&i&&S.push({id:"appearance",label:c("Appearance"),icon:r(ht,{}),active:e.kind==="website",onSelect:h}),a&&S.push({id:"styles",label:c("Site styles"),icon:r(oe,{}),panel:({onHide:w,notify:P})=>r(ve,{tokenRef:d,siteId:l??void 0,onClose:w,onNotify:P,tab:m,onTabChange:E})}),{railLead:[T],railTrail:S,resolveLeftView:(w,P)=>qe(w,a,P),openSettings:h,openStyles:()=>{E(Ae),u("styles")}}}function Tt(e,t,o,n){const{kind:l,open:d}=e,{selected:p,zoneOf:a}=t;b(()=>{ze(p?.type==="BookingBox"&&p.props.region==="confirm"?Fe(a(String(p.props.id))):null)},[p?.props.id]);const i=_e(e,t),{capabilities:{hasSiteSettings:u}}=R(),{setSelected:m,setSelectHandler:E}=pe(),{chat:f,setChat:s,setSelected:h,setSelectHandler:T}=ce(),S=l==="header";b(()=>{m(S)},[S,m]),b(()=>{E(()=>d(D))},[E,d]);const w=_(()=>d(be),[d]),P=l==="chat";b(()=>{h(P)},[P,h]),b(()=>{T(w)},[T,w]);const{setOpenHandler:I}=me(),g=_(()=>d(ge),[d]);b(()=>{I(g)},[I,g]);const j=G(V(e),Y(e)),K=Et(t),U=Pt(e,n),Z=o.device;return{...j,...K,...U,hasOwnRows:v=>v.type===ke,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:v=>r(se.Provider,{value:!0,children:r(de.Provider,{value:Z,children:v})}),addPanelRow:v=>u?k("div",{className:"sf-addside-sitewide",children:[r("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:r(L,{type:"chat",size:16})}),k("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{v(),w()},children:[c("Live chat"),r("span",{className:"sf-addside-sitewide-desc",children:c("A chat bubble on every page")})]}),r(ee,{checked:f.enabled,onChange:q=>s({enabled:q}),ariaLabel:c("Show the chat bubble on the whole site")})]}):void 0}}let F=null,O=new WeakMap;function bt(e){const t=it();if(!e||!t)return e;F!==t&&(F=t,O=new WeakMap);let o=O.get(e);return o||(o={...e,choices:e.choices?e.choices.map(n=>({...n,label:c(n.label)})):null,spec:e.spec?{...e.spec,addLabel:c(e.spec.addLabel)}:null},O.set(e,o)),o}const gt={isLockedBlock:Je,duplicateBlocked:tt,nestDepth:(e,t,o)=>t===De?We(e,o):0,newSectionNode:ut,canAddTo:(e,t)=>bt(Ye(e,t)),blockIsOffered:Ge},It=new Proxy(st,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?c(o):o}}),vt={labelAtLevel:(e,t,o)=>c(nt(e,t,o)),descriptions:It,categoryLabel:e=>{const t=Me(e);return t===void 0?void 0:c(t)},firstSection:Ve,blockRowName:je,plainText:xe,Icon:L,Thumbnail:Ie,useProducts:St},kt={desktop:2e3,tablet:800,mobile:390},z="desktop",_t={options:le,initial:z,fluid:z,widths:kt},Ct={read:Ze,write:e=>Xe(e),forSelection:(e,t)=>Ue(e,t)},Lt={first:x,last:Ke,firstGroup:pt,lastGroup:dt,isSectionGroup:ct,sectionGroupZone:lt,panelOf:e=>e===x?D:null,get groupTab(){return C()?et:void 0},get groupBadge(){return C()?Qe():void 0},get changeNotice(){return C()?$e():void 0},get band(){return C()?Rt:void 0},get groupAccepts(){return C()?at:void 0}},Rt={foldable:!0};function Ot(e){return{...G(V(e),Y(e)),openSettings:()=>e.show(W)}}const Bo={useOwnerName:ye,useDocumentLabel:Ne,useBridges:Tt,useStandaloneBridges:Ot,useDocumentPass:Ce,blockRules:gt,blockLook:vt,devices:_t,leftView:Ct,pinned:Lt,Canvas:rt,Inspector:Te};export{Bo as WEBSITE_SCREEN};
|
|
1
|
+
"use client";import{jsx as n,Fragment as A,jsxs as C}from"react/jsx-runtime";import{useCallback as k,useEffect as h,useRef as X,useState as J}from"react";import{Button as Q,Tooltip as $}from"efficient-shell/ui";import{SettingsSwitch as ee}from"efficient-easel/panel";import{PagesIcon as te,StylesIcon as oe}from"efficient-easel/rail";import{PaletteIcon as re}from"efficient-shell/icons/efficient";import{TemplateIcon as ne}from"efficient-easel/icons";import{Subtree as ie,TreeRow as B}from"efficient-easel/tree";import{useEasel as se}from"efficient-easel/easel";import{useEaselStrings as y}from"efficient-easel/strings";import{LocationsTreeContext as ae}from"./LocationsTreeContext.js";import ce from"./PagesPanel.js";import{usePreviewChat as de}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as le}from"./preview-devices.js";import{PreviewDeviceContext as pe}from"efficient-easel/draw/client";import{usePreviewHeader as me}from"../../render/components/PreviewHeaderContext.js";import{usePreviewSocial as fe}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as ue}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as Se,usePreviewTicker as we}from"../../render/components/PreviewTickerContext.js";import{usePreviewHeroPart as Ee}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Pe,HERO_PART_MODE as N,heroMediaRows as Te,heroPartId as H,readHeroPartId as be}from"../../render/lib/puck/hero-media-parts.js";import he,{CHAT_MODE as ge,HEADER_MODE as D,SOCIAL_MODE as Ie,WEBSITE_MODE as W}from"./SectionEditor.js";import L from"./SectionIcon.js";import ve from"./SectionThumbnail.js";import{useStorefrontDocument as R}from"./StorefrontDocumentContext.js";import ke from"./StylesPanel.js";import{LOCATIONS_TYPE as _e,useLocationsTree as Ce}from"./useLocationsTree.js";import{usePinnedChromeSeed as Le}from"./usePinnedChromeSeed.js";import{usePreviewHref as Re}from"./usePreviewHref.js";import{WebsitePreviewButton as Oe}from"./WebsitePreviewButton.js";import{SITE_STYLES_TABS as Ae,SITE_STYLES_TEXT_TAB as Be,useWebsiteName as ye}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Ne}from"./useWebsiteMainAction.js";import{useEditorSession as He}from"../lib/editor-session-context.js";import{useOpenPageName as De}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as We,heroGroupNestDepth as Me}from"../../format/lib/hero-group-placement.js";import{stripMarkup as Ve}from"../../format/lib/markup.js";import{categoryShortLabel as xe,PINNED_SECTION_TYPE as Ye}from"../lib/puck/add-palette.js";import{canAddTo as Ge}from"../lib/puck/add-target.js";import{blockIsOffered as Fe}from"../lib/puck/block-offer.js";import{sectionIdOfBoxZone as ze,setBookingPreview as Ke}from"../../render/lib/puck/booking-preview.js";import{footerBlockRowName as je}from"../../format/lib/puck/footer-block-row-name.js";import{FOOTER_TYPE as Ue,HEADER_TYPE as M}from"../lib/puck/footer-blocks.js";import{leftViewForSelection as Ze,readLeftView as qe,resolveLeftView as Xe,writeLeftView as Je}from"../../format/lib/puck/left-view.js";import{websiteIsLockedBlock as Qe}from"../lib/puck/locked-blocks.js";import{everyPageBadge as $e,everyPageNotice as et,pinnedGroupTab as tt,websiteDuplicateBlocked as ot}from"../lib/puck/every-page.js";import{pinnedChromeInPlace as _}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as rt,scrollPreviewToTop as V}from"../lib/puck/preview-dom.js";import{SiteCanvas as nt}from"../lib/puck/overrides.js";import{labelAtLevel as it}from"../../format/lib/puck/section-catalog.js";import{editorWords as st,say as c}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as at}from"../../format/lib/puck/section-descriptions.js";import{groupAccepts as ct,isSectionGroupType as dt,sectionGroupZone as lt,SITE_FOOTER_TYPE as pt,SITE_HEADER_TYPE as mt}from"../../format/lib/puck/section-groups.js";import{resolveSaveAsTemplateAction as ft,SAVE_AS_TEMPLATE_EVENT as ut}from"../../format/lib/save-as-template-action.js";import{newSectionNode as St}from"../lib/sections/new-section-node.js";import{useHostProducts as wt}from"../lib/use-host-products.js";import{backendOf as Et}from"../lib/website-session.js";function x({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=we(),d=y().tree,l=e,p=l.kind==="ticker"?l.heroId:null,a=k(i=>{if(!i)return;t({kind:"ticker",heroId:i}),rt(i)},[t]);return h(()=>{o(p)},[p,o]),h(()=>{r(a)},[r,a]),{partRows:(i,{rowClick:u})=>{const m=String(i.props.id);return i.type==="Hero"&&n(B,{icon:n(L,{type:"ticker",size:13}),name:c(Se),onSelect:()=>a(m),selected:p===m,rowProps:{onClick:u(()=>a(m))},words:d})}}}function Y({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Ee(),d=y().tree,{appState:l}=se(f=>f),p=l.data.content??[],a=X(p);a.current=p;const i=e,u=Pe.find(f=>N[f]===i.kind),m=u&&"nodeId"in i?H(String(i.nodeId),u):null,E=k(f=>{const s=be(f);if(!s)return;const P=a.current.findIndex(S=>String(S.props.id)===s.nodeId);if(P<0)return;const b={kind:N[s.part],nodeId:s.nodeId};t({index:P},b)},[t]);return h(()=>{o(m)},[m,o]),h(()=>{r(E)},[r,E]),{partRows:(f,{rowClick:s})=>{const P=String(f.props.id),b=Te(f);if(b.length===0)return null;const S=I=>{const g=H(P,I.part);return n(B,{icon:n(L,{type:I.part==="media"?"heroMedia":"heroImage",size:13}),name:c(I.label),onSelect:()=>E(g),selected:m===g,rowProps:{onClick:s(()=>E(g))},words:d},g)},[w,...T]=b;return C(A,{children:[S(w),T.length>0&&n(ie,{children:T.map(S)})]})}}}function G(e,t){return{partRows:(o,r)=>C(A,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function Pt(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:d,docId:l,hasUnsavedEdits:p,bridgeCapabilities:a,notifyParent:i,token:u}=R(),{hasPreviewLink:m}=o,E=Et(He()).preview?.draftLink,f=Ne(e.data),s=ft({hasTrustedConsole:!!u,canCreatePlatformTemplate:a.canCreatePlatformTemplate,capabilities:o,siteId:d,hasUnsavedEdits:p}),P=k(()=>{!d||!r||i(ut,{siteId:d,slug:r})},[i,d,r]),b=Re({pageSlug:r,siteId:d,token:u}),S=t.previewHref?.(r)??b;return{barLead:()=>s.visible&&n($,{side:"bottom",content:s.enabled?c("Save this website as a platform template"):c(s.disabledReason),children:n("span",{className:"sf-tip-disabled",tabIndex:s.enabled?void 0:0,children:n(Q,{variant:"secondary",disabled:!s.enabled,onClick:P,rightIcon:n(ne,{size:15}),children:c("Save as Template")})})}),barTrail:()=>m&&r&&n(Oe,{liveHref:S,pageId:l??null,draftLink:E}),mainAction:f}}function Tt(e,t){const{capabilities:o,templateId:r,siteId:d,tokenRef:l,navigate:p}=R(),{hasSiteTheme:a,explainsSiteSettings:i}=o,u=w=>t.setView(w),[m,E]=J(Ae[0].id),{surface:f,setSurface:s}=ue(),P=()=>{if(a){u("styles"),t.reveal(),V();return}e.show(W),e.reveal(),V()},b={id:"pages",label:c("Pages"),icon:n(te,{}),panel:({onHide:w})=>n(ce,{activeSurface:f,onPreviewSurface:s,onNavigate:T=>{s(null),p(r?{kind:"template",id:r,pageSlug:T}:{kind:"page",slug:T,siteId:d??void 0})},onClose:w})},S=[];return!a&&i&&S.push({id:"appearance",label:c("Appearance"),icon:n(re,{}),active:e.kind==="website",onSelect:P}),a&&S.push({id:"styles",label:c("Site styles"),icon:n(oe,{}),panel:({onHide:w,notify:T})=>n(ke,{tokenRef:l,siteId:d??void 0,onClose:w,onNotify:T,tab:m,onTabChange:E})}),{railLead:[b],railTrail:S,resolveLeftView:(w,T)=>Xe(w,a,T),openSettings:P,openStyles:()=>{E(Be),u("styles")}}}function bt(e,t,o,r){const{kind:d,open:l}=e,{selected:p,zoneOf:a}=t;h(()=>{Ke(p?.type==="BookingBox"&&p.props.region==="confirm"?ze(a(String(p.props.id))):null)},[p?.props.id]);const i=Ce(e,t),{capabilities:{hasSiteSettings:u}}=R(),{setSelected:m,setSelectHandler:E}=me(),{chat:f,setChat:s,setSelected:P,setSelectHandler:b}=de(),S=d==="header";h(()=>{m(S)},[S,m]),h(()=>{E(()=>l(D))},[E,l]);const w=k(()=>l(ge),[l]),T=d==="chat";h(()=>{P(T)},[T,P]),h(()=>{b(w)},[b,w]);const{setOpenHandler:I}=fe(),g=k(()=>l(Ie),[l]);h(()=>{I(g)},[I,g]);const K=G(x(e),Y(e)),j=Pt(t),U=Tt(e,r),Z=o.device;return{...K,...j,...U,hasOwnRows:v=>v.type===_e,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:v=>n(ae.Provider,{value:!0,children:n(pe.Provider,{value:Z,children:v})}),addPanelRow:v=>u?C("div",{className:"sf-addside-sitewide",children:[n("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:n(L,{type:"chat",size:16})}),C("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{v(),w()},children:[c("Live chat"),n("span",{className:"sf-addside-sitewide-desc",children:c("A chat bubble on every page")})]}),n(ee,{checked:f.enabled,onChange:q=>s({enabled:q}),ariaLabel:c("Show the chat bubble on the whole site")})]}):void 0}}let F=null,O=new WeakMap;function ht(e){const t=st();if(!e||!t)return e;F!==t&&(F=t,O=new WeakMap);let o=O.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:c(r.label)})):null,spec:e.spec?{...e.spec,addLabel:c(e.spec.addLabel)}:null},O.set(e,o)),o}const gt={isLockedBlock:Qe,duplicateBlocked:ot,nestDepth:(e,t,o)=>t===We?Me(e,o):0,newSectionNode:St,canAddTo:(e,t)=>ht(Ge(e,t)),blockIsOffered:Fe},It=new Proxy(at,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?c(o):o}}),vt={labelAtLevel:(e,t,o)=>c(it(e,t,o)),descriptions:It,categoryLabel:e=>{const t=xe(e);return t===void 0?void 0:c(t)},firstSection:Ye,blockRowName:je,plainText:Ve,Icon:L,Thumbnail:ve,useProducts:wt},kt={desktop:2e3,tablet:800,mobile:390},z="desktop",_t={options:le,initial:z,fluid:z,widths:kt},Ct={read:qe,write:e=>Je(e),forSelection:(e,t)=>Ze(e,t)},Lt={first:M,last:Ue,firstGroup:mt,lastGroup:pt,isSectionGroup:dt,sectionGroupZone:lt,panelOf:e=>e===M?D:null,get groupTab(){return _()?tt:void 0},get groupBadge(){return _()?$e():void 0},get changeNotice(){return _()?et():void 0},get band(){return _()?Rt:void 0},get groupAccepts(){return _()?ct:void 0}},Rt={foldable:!0};function Ot(e){return{...G(x(e),Y(e)),openSettings:()=>e.show(W)}}const No={useOwnerName:ye,useDocumentLabel:De,useBridges:bt,useStandaloneBridges:Ot,useDocumentPass:Le,blockRules:gt,blockLook:vt,devices:_t,leftView:Ct,pinned:Lt,Canvas:nt,Inspector:he};export{No as WEBSITE_SCREEN};
|
|
@@ -870,23 +870,22 @@
|
|
|
870
870
|
came to hang 6px OUTSIDE the panel at every width under 280 (measured: gap
|
|
871
871
|
-6.0px at 260 and at 220, against 0.0 at the default 320). One name, read
|
|
872
872
|
by the padding, by the narrow override, and by anything that undoes it. */
|
|
873
|
-
/* THE SIDES ARE EASEL'S
|
|
874
|
-
`es-insp-body
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
--sf-insp-pad-x: var(--es-insp-pad-x, var(--space-16));
|
|
873
|
+
/* THE SIDES ARE EASEL'S (one text panel W1; one home since efficient-easel
|
|
874
|
+
14.1.0): the body wears `es-insp-body`, and the inset is easel's
|
|
875
|
+
`--es-insp-pad-x`, set on the side panel: 16px, 12px under a 260px panel.
|
|
876
|
+
This sheet keeps no alias of its own; the rules below that reach the
|
|
877
|
+
panel's edge read easel's token. */
|
|
879
878
|
padding-block: var(--space-4) var(--space-20);
|
|
880
879
|
/* THE RIGHT INSET COUNTS THE SCROLLBAR'S LANE (2026-10-20). The gutter above
|
|
881
880
|
is held whether or not the scrollbar is drawn, so the rows' right side was
|
|
882
881
|
the inset PLUS the lane: 16 + 11 at a 320px panel, against 16 on the left
|
|
883
882
|
and 16 in the head. Now the lane is part of the inset: the end padding is
|
|
884
883
|
the inset less the lane, so both sides and the head read one number — 16,
|
|
885
|
-
and
|
|
884
|
+
and 12 under a 260px panel. The lane is 8px for that reason: the narrow
|
|
886
885
|
inset must hold all of it (`@supports` below). A browser that draws its
|
|
887
886
|
own scrollbar (Firefox) keeps a 0px lane here and the full inset. */
|
|
888
887
|
--sf-insp-bar-w: 0px;
|
|
889
|
-
--sf-insp-pad-end: calc(var(--
|
|
888
|
+
--sf-insp-pad-end: calc(var(--es-insp-pad-x) - var(--sf-insp-bar-w));
|
|
890
889
|
padding-inline-end: var(--sf-insp-pad-end);
|
|
891
890
|
|
|
892
891
|
/* THE DROPDOWN ARROW, WRITTEN ONCE — card 66399.c.
|
|
@@ -907,7 +906,13 @@
|
|
|
907
906
|
--sf-select-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c3c3c3'><polygon points='0,0 100,0 50,50'/></svg>");
|
|
908
907
|
}
|
|
909
908
|
|
|
910
|
-
/* 2026-10-
|
|
909
|
+
/* 2026-10-20: THE INSET IS EASEL'S, 16 AND 12 UNDER 260 (efficient-easel
|
|
910
|
+
14.1.0, GG option A). The 8px under a 284px panel that the notes below
|
|
911
|
+
measured is gone: one side inset for every head and body, one home.
|
|
912
|
+
The history stays, because the overflow sweep is still how a width is
|
|
913
|
+
judged.
|
|
914
|
+
|
|
915
|
+
2026-10-13: THE WIDE PADDING IS 16, AND THE LINE 284. 14 was off the
|
|
911
916
|
spacing scale (Lewis 2026-10-12: 2 / 4 / 8 / 12 / 16 …) and a value off it
|
|
912
917
|
goes UP. The content width card 66212 protects stays 241px; at 16 each side
|
|
913
918
|
that needs a 285px panel, so the query below reads `< 284px`. The note that
|
|
@@ -952,8 +957,8 @@
|
|
|
952
957
|
and 10 has nothing to spare, and type is paid vertically as well — card 66206
|
|
953
958
|
has just set the row rhythm to 16px, which shrinking type would hand straight
|
|
954
959
|
back. The padding was the horizontal cost, so the padding is what moved. */
|
|
955
|
-
/* The narrow inset (
|
|
956
|
-
|
|
960
|
+
/* The narrow inset (12px under a 260px panel) is easel's, on the side panel
|
|
961
|
+
(`--es-insp-pad-x`, 14.1.0); every reader here narrows with it. */
|
|
957
962
|
|
|
958
963
|
/* The lane the right inset counts (see `.sf-insp-body`): the body's own
|
|
959
964
|
scrollbar, 8px where this sheet can size it. easel's `.sf-scroll` draws 11px,
|
|
@@ -1776,9 +1781,9 @@
|
|
|
1776
1781
|
⚠️ READ FROM THE TOKEN, never typed. A literal `14px` here hung the line
|
|
1777
1782
|
6px OUTSIDE the panel at every width under 280, where card 66212 narrows
|
|
1778
1783
|
the padding to 8 — measured at 260 and at 220 before this was a `var()`. */
|
|
1779
|
-
margin-left: calc(var(--
|
|
1784
|
+
margin-left: calc(var(--es-insp-pad-x) * -1);
|
|
1780
1785
|
margin-right: calc(var(--sf-insp-pad-end) * -1);
|
|
1781
|
-
padding-left: var(--
|
|
1786
|
+
padding-left: var(--es-insp-pad-x);
|
|
1782
1787
|
padding-right: var(--sf-insp-pad-end);
|
|
1783
1788
|
}
|
|
1784
1789
|
/* The heading's own top margin is the wrapper's job now. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useEffect as G,useRef as L}from"react";import{createNode as x,newId as z}from"efficient-easel/data";import{useEaselApi as U}from"efficient-easel/easel";import{useStorefrontDocument as Z}from"./StorefrontDocumentContext.js";import{SITE_FOOTER_SLUG as H}from"../../format/lib/content/footer.js";import{boxFooterFromFooter as B}from"
|
|
1
|
+
"use client";import{useEffect as G,useRef as L}from"react";import{createNode as x,newId as z}from"efficient-easel/data";import{useEaselApi as U}from"efficient-easel/easel";import{useStorefrontDocument as Z}from"./StorefrontDocumentContext.js";import{SITE_FOOTER_SLUG as H}from"../../format/lib/content/footer.js";import{boxFooterFromFooter as B}from"../../format/lib/puck/box-footer.js";import{ROOT_ZONE as l,missingPinnedTypes as j,pinnedDuplicateIds as P}from"efficient-easel/draw";import{FOOTER_TYPE as c,HEADER_TYPE as p,buildDefaultFooterBlocks as D,buildDefaultHeaderNode as E}from"../lib/puck/footer-blocks.js";import{canSeedPinnedChrome as q}from"../lib/puck/pinned-seed-gate.js";import{siteFooterDocChrome as J,SITE_FOOTER_TYPE as f}from"../../format/lib/puck/section-groups.js";import{inPlaceSeedPlan as K}from"../lib/puck/pinned-in-place-seed.js";function se(t,F){const{adapter:k,capabilities:T,currentSlug:O,docId:u,data:y,saveStatus:I}=Z(),{hasSiteSettings:N,hasPinnedChrome:b}=T,C=!!T.editsPinnedInPlace&&O!==H,R=O===H,_=U().getState,v=L(null);G(()=>{if(!q({docId:u,saveStatus:I,seededDocId:v.current})||(v.current=u,!b))return;const m=_().appState.data,o=m.content,a=y?.content??[],d=(e,n)=>e.some(r=>r?.type===n);if(!N){const e=new Set(P(o)),n=e.size?o.filter(s=>!e.has(s.props.id)):o;e.size&&t.setDocument({...m,content:n});const r=j(n,a);if(r.includes(c)){const s=n.length,i=t.insertSection(c,s);t.replaceComponent(l,s,{type:c,props:{id:i,blocks:D()}})}r.includes(p)&&t.insertNode(l,0,E());return}if(R){const e=J(o);if(e!==o&&t.setDocument({...m,content:[...e]}),!e.find(r=>r.type===c)&&!d(a,c)&&!d(e,f)&&!d(a,f)){const r=(i,g)=>x(F,i,g),s={type:c,props:{blocks:D()}};t.insertNode(l,e.length,B(s,r,z(f)))}return}if(C){const e=!!k?.pinnedChrome?.state().docId,n=K(o,{hasChromeDoc:e}),r=new Set([...n.remove,...P(o.filter(i=>!n.remove.includes(String(i.props.id))))]),s=r.size?o.filter(i=>!r.has(String(i.props.id))):o;if(s.length!==o.length&&t.setDocument({...m,content:s}),n.seedFooter&&!d(a,c)&&!d(a,f)){const i=(Y,A)=>x(F,Y,A),g={type:c,props:{blocks:D()}};t.insertNode(l,s.length,B(g,i,z(f)))}if(n.seedHeader&&!d(a,p)){const i=s[0]?.type==="SiteHeader"?1:0;t.insertNode(l,i,E())}return}const h=o.filter(e=>e.type!==c),w=new Set(P(h)),S=w.size?h.filter(e=>!w.has(e.props.id)):h;S.length!==o.length&&t.setDocument({...m,content:S}),!d(S,p)&&!d(a,p)&&t.insertNode(l,0,E())},[u,I,y,_,t,N,b,R,C,k])}export{se as usePinnedChromeSeed};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface ModuleSpecifier {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
interface SyntaxNode {
|
|
7
|
+
kind: number;
|
|
8
|
+
getStart(source?: unknown): number;
|
|
9
|
+
getEnd(): number;
|
|
10
|
+
}
|
|
11
|
+
export interface TypeScriptApi {
|
|
12
|
+
createSourceFile(fileName: string, text: string, target: number, setParentNodes: boolean, kind: number): SyntaxNode;
|
|
13
|
+
ScriptTarget: {
|
|
14
|
+
Latest: number;
|
|
15
|
+
};
|
|
16
|
+
ScriptKind: {
|
|
17
|
+
JS: number;
|
|
18
|
+
TS: number;
|
|
19
|
+
};
|
|
20
|
+
SyntaxKind: {
|
|
21
|
+
ImportKeyword: number;
|
|
22
|
+
};
|
|
23
|
+
forEachChild(node: SyntaxNode, visit: (child: SyntaxNode) => void): unknown;
|
|
24
|
+
isImportDeclaration(node: SyntaxNode): boolean;
|
|
25
|
+
isExportDeclaration(node: SyntaxNode): boolean;
|
|
26
|
+
isCallExpression(node: SyntaxNode): boolean;
|
|
27
|
+
isIdentifier(node: SyntaxNode): boolean;
|
|
28
|
+
isImportTypeNode(node: SyntaxNode): boolean;
|
|
29
|
+
isLiteralTypeNode(node: SyntaxNode): boolean;
|
|
30
|
+
isModuleDeclaration(node: SyntaxNode): boolean;
|
|
31
|
+
isStringLiteral(node: unknown): boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function moduleSpecifiers(ts: TypeScriptApi, fileName: string, text: string): ModuleSpecifier[];
|
|
34
|
+
export declare function relinkSpecifiers(ts: TypeScriptApi, fileName: string, text: string, retarget: (spec: string) => string | null): {
|
|
35
|
+
text: string;
|
|
36
|
+
rewritten: number;
|
|
37
|
+
};
|
|
38
|
+
export declare function relativeSpecifier(from: string, to: string): string;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function u(e,a,s){const c=e.createSourceFile(a,s,e.ScriptTarget.Latest,!1,a.endsWith(".d.ts")?e.ScriptKind.TS:e.ScriptKind.JS),i=[],r=t=>i.push({start:t.getStart(c)+1,end:t.getEnd()-1,text:t.text}),n=t=>{const o=t;if((e.isImportDeclaration(t)||e.isExportDeclaration(t))&&o.moduleSpecifier&&e.isStringLiteral(o.moduleSpecifier))r(o.moduleSpecifier);else if(e.isCallExpression(t)){const l=o.arguments,p=o.expression;l.length>0&&e.isStringLiteral(l[0])&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")&&r(l[0])}else if(e.isImportTypeNode(t)){const l=o.argument;e.isLiteralTypeNode(l)&&e.isStringLiteral(l.literal)&&r(l.literal)}else e.isModuleDeclaration(t)&&e.isStringLiteral(o.name)&&r(o.name);e.forEachChild(t,n)};return n(c),i.sort((t,o)=>o.start-t.start)}function f(e,a,s,c){let i=s,r=0;for(const n of u(e,a,s)){const t=c(n.text);t===null||t===n.text||(i=i.slice(0,n.start)+t+i.slice(n.end),r+=1)}return{text:i,rewritten:r}}function S(e,a){const s=e.split("/").slice(0,-1),c=a.split("/");let i=0;for(;i<s.length&&i<c.length-1&&s[i]===c[i];)i+=1;const r=s.length-i,n=c.slice(i).join("/");return r===0?`./${n}`:`${"../".repeat(r)}${n}`}export{u as moduleSpecifiers,S as relativeSpecifier,f as relinkSpecifiers};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const HEADER_LOGO_PX: {
|
|
2
|
+
readonly small: 54;
|
|
3
|
+
readonly medium: 66;
|
|
4
|
+
readonly large: 84;
|
|
5
|
+
};
|
|
6
|
+
export declare const FOOTER_LOGO_PX = 44;
|
|
7
|
+
export declare const HEADER_LOGO_PX_MIN = 16;
|
|
8
|
+
export declare const HEADER_LOGO_PX_MAX = 140;
|
|
9
|
+
export declare const LOGO_BLOCK_PX_MAX: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _={small:54,medium:66,large:84},O=44,o=16,t=140,e=O*4;export{O as FOOTER_LOGO_PX,_ as HEADER_LOGO_PX,t as HEADER_LOGO_PX_MAX,o as HEADER_LOGO_PX_MIN,e as LOGO_BLOCK_PX_MAX};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FOOTER_LOGO_PX as T}from"../logo/logo-size.js";import{resolveContainerGap as E}from"../content/container-gap.js";import{buildSectionGroup as _,SITE_FOOTER_TYPE as m}from"./section-groups.js";const p="Flex",O={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},P=o=>{const{id:e,...t}=o;return t},d=o=>typeof o=="string"?o:"",u=o=>typeof o=="number"&&Number.isFinite(o)?o:void 0,a={sm:12,md:13,lg:15},x="md",f=1.5,y={size:13,lineHeight:f,width:280},L=14,b=40,A=o=>o==="center"||o==="right"?o:"left";function w(o){const e={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(const[s,r]of t){const n=u(o[s]);n&&(e[r]=n)}return e}function h(o,e){const t=o.props??{},s=O[o.type];if(s)return[e(s,P(t))];switch(o.type){case"FooterLogo":{const r=A(t.align),n=e("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(T*((u(t.widthPct)??100)/100)),href:"/",align:r,...w(t)}),i=d(t.tagline).trim();return i?[n,e("Text",{text:i,tone:"dim",align:r,_partStyles:{text:{...y}}})]:[n]}case"FooterText":{const r=typeof t.size=="string"&&t.size in a?t.size:x;return[e("Text",{text:d(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:a[r],lineHeight:f}}})]}case"FooterDivider":{const r=u(t.thickness),n=u(t.lengthPct);return[e("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{const r=Array.isArray(t.blocks)?t.blocks:[];return[e(p,{direction:t.direction==="horizontal"?"row":"column",gap:E("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"?t.align:"start",content:r.flatMap(n=>h(n,e))})]}default:return[]}}function I(o,e,t){const s=o&&Array.isArray(o.props?.blocks)?o.props.blocks:[],r=c=>e(p,{direction:"row",wrap:!0,share:"equal",gap:b,content:c}),n=[];let i=[];for(const c of s){const l=h(c,e);if(c.type==="FooterDivider"){i.length&&n.push(r(i)),i=[],n.push(...l);continue}l.length<=1?i.push(...l):i.push(e(p,{direction:"column",gap:L,align:"stretch",content:l}))}(i.length||!n.length)&&n.push(r(i));const F=e(p,{direction:"column",content:[e("LegalLineBlock")]}),g=_(m,t,[...n,F]);return{...g,props:{...g.props,...o?.props?.width==="full"?{fullWidth:!0}:{}}}}export{I as boxFooterFromFooter,h as pageBlocksFromFooterBlock};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import{ruleChecks as O}from"./rule.js";function j(r){const s=r.split(`
|
|
2
2
|
`),n=[];return s.forEach((g,a)=>{if(!/border-(top|bottom|left|right)[a-z-]*\s*:[^;]*\bsolid\b/.test(g))return;let $=0,c="?";for(let i=a-1;i>=0;i-=1)if($+=(s[i].match(/\}/g)??[]).length-(s[i].match(/\{/g)??[]).length,$<0){c=s[i].split("{")[0].trim();let h=i-1;for(;h>=0&&s[h].trim().endsWith(",");)c=`${s[h].trim()} ${c}`,h-=1;break}n.push({line:a+1,selector:c,decl:g.trim()})}),n}const y=r=>r.split(/[\s,+>~]/)[0].trim(),k=(r,s)=>s in r||y(s)in r,L=/\bzinc-|--sf-line\b|--sf-divider\b|--sf-input-border\b|--sf-chip-bg\b|--es-line\b|--es-divider\b|--sf-text-secondary\b/,S=[["utility",/(^|["'`\s])border-(t|b|l|r)($|["'`\s])/],["style object",/border(Top|Bottom|Left|Right)\s*:/],["css in a string",/border-(top|bottom|left|right)\s*:/]];function E(r){return/radius/i.test(r)||!L.test(r)?null:S.find(([,s])=>s.test(r))?.[0]??null}function T(r,s){const{check:n,report:g}=O("panel divider lines"),a=s.allowed??{},$=s.pendingElsewhere??{},c=s.allowedTsx??[];{const e=u=>["border",u].join("-"),t=[".a,",".b + .c {",` ${e("top")}: 1px solid red;`,"}",`.d { ${e("radius")}: 4px; }`].join(`
|
|
3
3
|
`),l=j(t);n("the census finds a directional solid border, with its whole multi-line selector",l.length===1&&l[0].selector===".a, .b + .c"&&y(l[0].selector)===".a",JSON.stringify(l));const d=["zinc","200"].join("-"),f=[["a utility",`<div className="${e("t")} border-${d}" />`,"utility"],["a style object",`style={{ ${["border","Top"].join("")}: "1px solid var(--sf-line)" }}`,"style object"],["CSS in a string",`const s = "${e("left")}: 1px solid var(--es-divider)";`,"css in a string"],["a border in the storefront's own ink",`<div className="${e("t")} border-line" />`,null],["a radius",`<div className="${e("t")} border-${d} rounded" style={{ borderRadius: 4 }} />`,null]];for(const[u,o,p]of f)n(`the sweep reads ${u} as ${p??"no hairline"}`,E(o)===p,o)}const i=[];for(const e of s.panelSheets??[]){const t=r.find(o=>o.path===e)?.text??"",l=j(t);n(`${e} was read and parsed`,t.length>1e4&&l.length>0,`${t.length} bytes, ${l.length} directional border(s)`),i.push(...l.map(o=>({...o,sheet:e})));const f=(t.replace(/\/\*[\s\S]*?\*\//g,"").match(/\[class\*="_PuckFields[^"]*"\][^{]*\{/g)??[]).length;n(`${e} reaches for no Puck field wrapper`,f===0,`${f} rule(s) still select \`[class*="_PuckFields…"]\` — the rows are \`.es-insp-row\` now`);const u=t.replace(/,\s*\n\s*/g,", ");for(const o of s.fullBleed??[]){if(!(o in a))continue;const p=u.indexOf(`
|
|
4
|
-
${o} {`);if(!n(`the allowed full-bleed rule is still in ${e}`,p>=0,o))continue;const v=u.slice(p,u.indexOf("}",p));for(const[w,x]of[["left","--
|
|
4
|
+
${o} {`);if(!n(`the allowed full-bleed rule is still in ${e}`,p>=0,o))continue;const v=u.slice(p,u.indexOf("}",p));for(const[w,x]of[["left","--es-insp-pad-x"],["right","--sf-insp-pad-end"]])n(`the full-bleed rule cancels the panel's ${w} padding, so it reaches the edge`,new RegExp(`margin-${w}:\\s*calc\\(var\\(${x}\\)\\s*\\*\\s*-1\\)`).test(v),"inset, this is the line the owner rejected — full bleed is the exemption"),n(`…and puts that ${w} padding back inside, so the words stay on the rows' edge`,new RegExp(`padding-${w}:\\s*var\\(${x}\\)`).test(v))}}for(const e of s.fullBleed??[])n(`the full-bleed selector is an ALLOWED entry: ${e}`,e in a);if(s.panelSheets?.length){const e=i.filter(t=>!k(a,t.selector)&&!k($,t.selector));n(`no unlisted directional border survives in a panel stylesheet (${i.length} censused)`,e.length===0,`${e.length} neither removed, allowed, nor owed to another card — delete it and let the rhythm tokens separate, or add it to the allow-list with a reason if it is a control edge:
|
|
5
5
|
`+e.map(t=>`${t.sheet}:${t.line} ${t.selector} — ${t.decl}`).join(`
|
|
6
6
|
`))}const h=e=>i.some(t=>t.selector===e||y(t.selector)===e);for(const[e,t]of Object.entries(a))n(`ALLOWED entry ${e} still names a real rule (${t.slice(0,48)}…)`,h(e),"the rule is gone: delete this entry with it");for(const[e,t]of Object.entries($))n(`PENDING entry ${e} is still owed — ${t}`,h(e),"that card has landed and the rule is gone: delete this entry");const b=r.filter(e=>/\.tsx?$/.test(e.path));n(`the repository's own TS/TSX files were swept (${b.length}, at least ${s.minFiles})`,b.length>=s.minFiles);const m=[];for(const e of b)e.text.split(`
|
|
7
7
|
`).forEach((t,l)=>{const d=E(t);d&&(c.some(f=>f.file===e.path&&t.includes(f.util))||m.push(`${e.path}:${l+1} (${d}) ${t.trim().slice(0,80)}`))});n("no editor panel file draws an unlisted directional border",m.length===0,`${m.length} found:
|
|
@@ -15,15 +15,6 @@ interface Props {
|
|
|
15
15
|
fitWordmarkToContainer?: boolean;
|
|
16
16
|
fitFloorPx?: number;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
readonly small: 54;
|
|
20
|
-
readonly medium: 66;
|
|
21
|
-
readonly large: 84;
|
|
22
|
-
};
|
|
23
|
-
export declare const FOOTER_LOGO_PX = 44;
|
|
24
|
-
export declare const HEADER_LOGO_PX_MIN = 16;
|
|
25
|
-
export declare const HEADER_LOGO_PX_MAX = 140;
|
|
26
|
-
export declare const LOGO_BLOCK_PX_MAX: number;
|
|
18
|
+
export { FOOTER_LOGO_PX, HEADER_LOGO_PX, HEADER_LOGO_PX_MAX, HEADER_LOGO_PX_MIN, LOGO_BLOCK_PX_MAX } from "../../format/lib/logo/logo-size.js";
|
|
27
19
|
export declare const WORDMARK_FIT_FLOOR_PX = 16;
|
|
28
20
|
export default function Logo({ variant, scrolled, src, reverse, color, onLightSurface, reversedSrc, inkIsDark, size, sizePx, wordmark, siteName, fitToContainer, fitWordmarkToContainer, fitFloorPx }: Props): import("react").JSX.Element;
|
|
29
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as
|
|
1
|
+
"use client";import{jsx as i,jsxs as L}from"react/jsx-runtime";import{useEffect as m,useId as ot,useRef as H,useState as h}from"react";import{NEUTRAL_SITE_NAME as lt}from"../../format/lib/content/site-name.js";import{isSvgUrl as rt}from"../../format/lib/logo/reverse-svg.js";import{analyzeLogoViaServer as it}from"../lib/logo/analyze-logo-client.js";import{FOOTER_LOGO_PX as at,HEADER_LOGO_PX as ct}from"../../format/lib/logo/logo-size.js";import{FOOTER_LOGO_PX as It,HEADER_LOGO_PX as Lt,HEADER_LOGO_PX_MAX as At,HEADER_LOGO_PX_MIN as St,LOGO_BLOCK_PX_MAX as Ft}from"../../format/lib/logo/logo-size.js";const ut=202/22,dt=.88,Rt=16,mt="invert(1)";function ht({variant:N="header",scrolled:W=!0,src:f,reverse:j=!1,color:p=null,onLightSurface:C,reversedSrc:A,inkIsDark:K,size:q="medium",sizePx:_,wordmark:O,siteName:z=lt,fitToContainer:S=!1,fitWordmarkToContainer:B=!1,fitFloorPx:g}){const a=O&&O.trim()?O.trim():z,[U,V]=h(!1),F=H(null),Z=t=>{F.current=t};m(()=>{const t=F.current?.ownerDocument??document,o=()=>{V(t.documentElement.getAttribute("data-theme")==="light")};o();const d=new MutationObserver(o);return d.observe(t.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>d.disconnect()},[]);const n=f&&f.trim()?f.trim():null,c=!!n&&rt(n),b=C??(U&&W),s=p&&p.trim()?p.trim():null,u=j&&!s,k=`logo-color-${ot().replace(/[^A-Za-z0-9_-]/g,"")}`,y=u&&c&&n&&A!=null?{reversed:A,inkIsDark:K??null}:null,D=y!==null,[J,E]=h(null);m(()=>{if(!u||!n||!c||D){E(null);return}let t=!1;return E(null),it(n).then(o=>{t||E(o)}),()=>{t=!0}},[u,n,c,D]);const r=y??J,$=!!r&&r.inkIsDark!==null&&(b?!r.inkIsDark:r.inkIsDark),Q=u&&!!n&&!c&&!b,R=$&&r?r.reversed:n,X=R?[R]:[],[w,x]=h(0);m(()=>{x(0)},[n,$]);const Y=N==="footer"?at:ct[q],l=_&&_>0?_:Y,tt=Math.round(l*ut),e=w<X.length?X[w]:null,[et,v]=h(R),G=e!==null&&e===et,M=H(null);m(()=>{const t=M.current;if(!t||!t.complete)return;if(t.naturalWidth>0||t.naturalHeight>0){v(e);return}let o=!1;return t.decode().then(()=>!o&&v(e),()=>!o&&x(d=>d+1)),()=>{o=!0}},[e]);const P=S||B,T=`calc(100cqi / ${((a.length+1)*dt).toFixed(2)})`,I=P&&g&&g>0?Math.min(g,l):null,nt=P?I===null?`min(${l}px, ${T})`:`clamp(${I}px, ${T}, ${l}px)`:`${l}px`,st=L("span",{className:`font-display font-bold tracking-[0.18em] ${I===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:nt,lineHeight:1,...s?{color:s}:{}},"aria-label":a,children:[a,i("span",{className:"text-accent",style:s?{color:s}:void 0,children:"."})]});return L("span",{ref:Z,className:"inline-flex items-center",children:[!G&&st,s&&e&&i("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:L("filter",{id:k,colorInterpolationFilters:"sRGB",children:[i("feFlood",{style:{floodColor:s}}),i("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),e&&i("img",{ref:M,src:e,alt:a,width:tt,height:l,className:"shrink-0 object-contain",style:{...G?{height:`${l}px`,width:"auto",...S?{maxWidth:"100cqi"}:{}}:{display:"none"},...Q?{filter:mt}:{},...s?{filter:`url(#${k})`}:{}},onLoad:()=>v(e),onError:()=>x(t=>t+1)},e)]})}export{It as FOOTER_LOGO_PX,Lt as HEADER_LOGO_PX,At as HEADER_LOGO_PX_MAX,St as HEADER_LOGO_PX_MIN,Ft as LOGO_BLOCK_PX_MAX,Rt as WORDMARK_FIT_FLOOR_PX,ht as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "27.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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"test:screen": "node scripts/test-screen-in-easel.mjs",
|
|
45
45
|
"test:own-ui": "efficient-shell-ui-check",
|
|
46
46
|
"build": "node scripts/build.mjs",
|
|
47
|
-
"verify:dist": "node scripts/verify-dist.mjs",
|
|
47
|
+
"verify:dist": "node scripts/verify-dist.mjs && node scripts/verify-published-entries.mjs",
|
|
48
48
|
"verify": "pnpm run typecheck && pnpm run test:boundary && pnpm run test:screen && pnpm run test:own-ui && pnpm run test:guards && pnpm run build && pnpm run verify:dist",
|
|
49
49
|
"test:guards": "tsc --noEmit -p scripts/tsconfig.json && node scripts/run-guards.mjs",
|
|
50
50
|
"words": "TSX_TSCONFIG_PATH=scripts/tsconfig.json tsx scripts/write-editor-words.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@tabler/icons-react": "^3.46.0",
|
|
55
|
-
"efficient-easel": "^
|
|
55
|
+
"efficient-easel": "^14.1.0",
|
|
56
56
|
"efficient-shell": "^7.75.0 || ^8.0.0",
|
|
57
57
|
"isomorphic-dompurify": "^3.18.0",
|
|
58
58
|
"next": ">=16",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/node": "^20",
|
|
73
73
|
"@types/react": "^19",
|
|
74
74
|
"@types/react-dom": "^19",
|
|
75
|
-
"efficient-easel": "^14.
|
|
75
|
+
"efficient-easel": "^14.1.0",
|
|
76
76
|
"efficient-shell": "^8.0.0",
|
|
77
77
|
"esbuild": "^0.28.0",
|
|
78
78
|
"happy-dom": "^20.14.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{FOOTER_LOGO_PX as T}from"../../../render/components/Logo.js";import{resolveContainerGap as E}from"../../../format/lib/content/container-gap.js";import{buildSectionGroup as _,SITE_FOOTER_TYPE as m}from"../../../format/lib/puck/section-groups.js";const p="Flex",O={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},P=o=>{const{id:e,...t}=o;return t},d=o=>typeof o=="string"?o:"",u=o=>typeof o=="number"&&Number.isFinite(o)?o:void 0,a={sm:12,md:13,lg:15},x="md",f=1.5,y={size:13,lineHeight:f,width:280},L=14,b=40,A=o=>o==="center"||o==="right"?o:"left";function w(o){const e={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(const[s,r]of t){const n=u(o[s]);n&&(e[r]=n)}return e}function h(o,e){const t=o.props??{},s=O[o.type];if(s)return[e(s,P(t))];switch(o.type){case"FooterLogo":{const r=A(t.align),n=e("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(T*((u(t.widthPct)??100)/100)),href:"/",align:r,...w(t)}),i=d(t.tagline).trim();return i?[n,e("Text",{text:i,tone:"dim",align:r,_partStyles:{text:{...y}}})]:[n]}case"FooterText":{const r=typeof t.size=="string"&&t.size in a?t.size:x;return[e("Text",{text:d(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:a[r],lineHeight:f}}})]}case"FooterDivider":{const r=u(t.thickness),n=u(t.lengthPct);return[e("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{const r=Array.isArray(t.blocks)?t.blocks:[];return[e(p,{direction:t.direction==="horizontal"?"row":"column",gap:E("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"?t.align:"start",content:r.flatMap(n=>h(n,e))})]}default:return[]}}function I(o,e,t){const s=o&&Array.isArray(o.props?.blocks)?o.props.blocks:[],r=c=>e(p,{direction:"row",wrap:!0,share:"equal",gap:b,content:c}),n=[];let i=[];for(const c of s){const l=h(c,e);if(c.type==="FooterDivider"){i.length&&n.push(r(i)),i=[],n.push(...l);continue}l.length<=1?i.push(...l):i.push(e(p,{direction:"column",gap:L,align:"stretch",content:l}))}(i.length||!n.length)&&n.push(r(i));const F=e(p,{direction:"column",content:[e("LegalLineBlock")]}),g=_(m,t,[...n,F]);return{...g,props:{...g.props,...o?.props?.width==="full"?{fullWidth:!0}:{}}}}export{I as boxFooterFromFooter,h as pageBlocksFromFooterBlock};
|
|
File without changes
|