efficient-web-builder 70.0.0 → 70.2.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 +33 -1
- package/dist/editor/components/AddPageOnOpen.d.ts +6 -0
- package/dist/editor/components/AddPageOnOpen.js +1 -0
- package/dist/editor/components/AddPageWindow.d.ts +7 -0
- package/dist/editor/components/AddPageWindow.js +1 -0
- package/dist/editor/components/PageStarterCard.d.ts +9 -0
- package/dist/editor/components/PageStarterCard.js +1 -0
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/StorefrontEditor.d.ts +2 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/storefront-editor.css +71 -0
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/box-fields.d.ts +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/host-config.d.ts +2 -0
- package/dist/editor/lib/document/host-config.js +1 -0
- package/dist/editor/lib/document/overrides.d.ts +1 -0
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root.d.ts +12 -0
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/card-row-keys.d.ts +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +3 -3
- package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
- package/dist/format/lib/document/blocks/general/Grid/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroGroup/meta.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/HeroGroup/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/OrderSummary/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/slots.d.ts +93 -0
- package/dist/format/lib/document/blocks/general/slots.js +1 -0
- package/dist/format/lib/document/node-lists.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +9 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/page-starters.d.ts +14 -0
- package/dist/format/lib/page-starters.js +1 -0
- package/dist/format/lib/web-backend.d.ts +9 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,45 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 70.2.0 - 2026-11-17
|
|
4
|
+
|
|
5
|
+
From main at `874c0488`: #780. A minor: no `!`, no export is removed, no export changes its type, the peers stay `efficient-easel` `^35.0.0` and `efficient-shell` `^13.17.0`. New exports and one optional prop. No stored key or value moves.
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- No step is required. A host may open the website editor with the Add page window open: `<StorefrontEditor target={…} openAddPage />`.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Open the editor with the Add page window open** (#780): `StorefrontEditor` takes the optional `openAddPage`. New `components/AddPageOnOpen` (`AddPageOnOpen`, `useTakeAddPageOnOpen`) holds the request and gives it once, so a page switch does not open the window again. The Pages panel takes it on mount and calls the same path as its **+** button, so a backend that cannot add a page still hands the job to the host (`storefront-editor:new-page`).
|
|
13
|
+
|
|
14
|
+
## 70.1.0 - 2026-11-17
|
|
15
|
+
|
|
16
|
+
From main at `74cb8eb0`: #776, #777, #778. A minor: no `!`, no export is removed, no export changes its type, the peers stay `efficient-easel` `^35.0.0` and `efficient-shell` `^13.17.0`. New exports only. No stored key or value moves.
|
|
17
|
+
|
|
18
|
+
**For hosts:**
|
|
19
|
+
- efficient-storefront-blocks adds `general/slots.js` and `content/card-row-keys.js` to its `links` entry sources (eff-erp/efficient-storefront-blocks#591 does it): a page walk no longer loads every general block meta.
|
|
20
|
+
- The Add page window reads the new optional backend members `WebsitePages.starters` and `createFromStarter`. A host that does not pass them gets the window with **+ Blank page** only. No step is required.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **The Add page window** (#776): the Pages panel's **+** opens one window (the shell `Dialog`, size `full`). **+ Blank page** makes an empty draft page at a free URL handle. A list on the left (All pages, About, Contact, FAQ, Gallery, Store locator, Policies, and From your template when the site's template has pages) filters cards that draw each starter page's first section live at 1440 x 1080 in the site's theme, scaled by the shell `FitFrame`. **Add page** copies the starter into a new draft page. New `AddPageWindow`, `PageStarterCard`, `PageStarter`, `StarterGroup`, `PAGE_LIBRARY_GROUPS`, `ALL_STARTERS`, `TEMPLATE_STARTERS`, `libraryStarters`, `templateStarters`, `shownLibraryGroups`, `startersIn`, `firstSectionOf`, `useHostConfig`, `useSiteWidthsMetadata` and `SiteThemeCarrier`.
|
|
25
|
+
- **The general slot table** (#778): new `lib/document/blocks/general/slots` (`GENERAL_SLOTS`, the 13 general blocks' slot declarations in declaration order; it imports only `lib/content/card-row-keys`). `PROCESS_COLUMNS_SLOT` moves there; `ProcessSteps/column-seed` still exports it. Every `XSlots` export stays on its meta, read from the table. `lib/document/node-lists` builds its slots from the table and no longer imports the metas.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- **LongRead's link rows are in the Link group** (#777): Button, Link, Image and Image label move from the top of the Design tab into the Link group, just before Anchor, where the Box's "Link to" stands.
|
|
30
|
+
|
|
3
31
|
## 70.0.0 - 2026-11-17
|
|
4
32
|
|
|
5
|
-
From main at `
|
|
33
|
+
From main at `1d0a2e1c`: #767, #771, #774. A major: #767 and #771 are `!`. The peers rise to `efficient-easel` `^35.0.0` and `efficient-shell` `^13.17.0`. The module `lib/document/panel-bands` is removed. No stored key or value moves.
|
|
6
34
|
|
|
7
35
|
**For hosts:**
|
|
8
36
|
- Install efficient-easel 35.0.0 or later and efficient-shell 13.17.0 or later with this release.
|
|
9
37
|
- A host that imports `efficient-web-builder/format/lib/document/panel-bands` (`bandIsDropped`, `droppedBands`, `loneDesignBand`, `withoutBands`, `sameKeys`, `BandRow`, `DrawnBand`, `TEXT_BAND_KEY`, `TEXT_BAND_TITLE`) stops compiling. The one-row band rule is efficient-easel 35's Inspector; the text box band key is `LEAD_BAND_KEY` from `efficient-easel/fields`. efficient-storefront-blocks `scripts/test-single-row-group-headings.tsx` imports `bandIsDropped` and is re-pointed in its bump (eff-erp/efficient-storefront-blocks#591).
|
|
10
38
|
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- **One import reader** (#774; it merged before the 70.0.0 release PR and was first left out of this section): new `importsOf(ts, fileName, text)`, `importIsTypeOnly`, `exportIsTypeOnly` and `packageNameOf` in `format/lib/build/module-specifiers`. `importsOf(ts, file)` in `lib/source-rules/support/panel-select-cascade` stays as a `@deprecated` call to it (delete by 2026-12-18). No export removed.
|
|
42
|
+
|
|
11
43
|
### Changed
|
|
12
44
|
|
|
13
45
|
- **BREAKING: walks over a node's lists read the declared slot order** (#767). A node's declared slots come first, in draw order, then any other node list in efficient-easel `storedKeyOrder`, so the editor and the shop give the same answer (before, the editor read insertion order and the shop jsonb order). One helper in `lib/document/node-lists`. `CARD_TEMPLATE_BLOCKS`, `cardTemplateSlot`, `CARD_LIST_ITEM_BLOCKS` and `cardListItemSlot` move to the leaf `lib/content/card-row-keys`, and `BOX_DARKEN_STYLES` to the new leaf `lib/content/box-darken-styles`; `card-template` and `box-background` still export them.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{createContext as u,useContext as s,useRef as a}from"react";const n=u(null);function f({open:e,children:t}){const r=a(!!e);return o(n.Provider,{value:r,children:t})}function i(){const e=s(n);return()=>e?.current?(e.current=!1,!0):!1}export{f as AddPageOnOpen,i as useTakeAddPageOnOpen};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorPageRow } from "../lib/editor-document-adapter.js";
|
|
2
|
+
export default function AddPageWindow({ open, onClose, takenSlugs, onCreated, }: {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
takenSlugs: ReadonlySet<string>;
|
|
6
|
+
onCreated: (row: EditorPageRow) => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as a,jsxs as g}from"react/jsx-runtime";import{useEffect as D,useMemo as G,useRef as W,useState as h}from"react";import{useScreenDocument as q}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as z}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as E}from"efficient-easel/page-copy";import{AddIcon as H}from"efficient-easel/icons";import{Dialog as O,EmptyState as V,Grid as J,SidebarActionButton as K,SidebarLayout as Q,SidebarNavItem as S,toast as P}from"efficient-shell/ui";import U from"./PageStarterCard.js";import{useHostConfig as X}from"../lib/document/host-config.js";import{useSiteWidthsMetadata as Y}from"../lib/document/overrides.js";import{say as t}from"../../format/lib/editor-words.js";import{ALL_STARTERS as i,TEMPLATE_STARTERS as w,shownLibraryGroups as Z,startersIn as $,templateStarters as ee}from"../../format/lib/page-starters.js";import{backendOf as te}from"../lib/website-session.js";function ae({open:l,onClose:x,takenSlugs:b,onCreated:T}){const I=z(),{adapter:d,siteId:c,templateId:L}=q(),r=te(I).pages,y=!L&&!!(r.starters&&r.createFromStarter),m=G(()=>c?{siteId:c}:{},[c]),R=X(),j=Y(),[k,s]=h(null),[o,n]=h(i),[u,v]=h(null),C=W(null);D(()=>{if(!l)return;if(n(i),!y){s([]);return}let e=!0;return s(null),r.starters(m).then(f=>e&&s(f),()=>{e&&(s([]),P.error(t("Couldn’t load the pages — please retry.")))}),()=>{e=!1}},[l,y,r,m]);const A=async(e,f)=>{if(!u){v(e);try{T(await f())}catch{P.error(t("Couldn’t add the page — please retry."))}finally{v(null)}}},B=()=>{if(!d.createPage)return;const e=t("New page");A("blank",()=>d.createPage({slug:E(e,b),title:e,layout:{}}))},F=e=>{A(e.id,()=>r.createFromStarter(e.id,{title:e.title,slug:E(e.slug,b),...m}))},p=k??[],M=Z(p),N=$(o,p),_=g("nav",{"aria-label":t("Pages"),className:"sf-add-page-nav",children:[a(S,{label:t("All pages"),active:o===i,onClick:()=>n(i)}),M.map(e=>a(S,{label:t(e.label),active:o===e.key,onClick:()=>n(e.key)},e.key)),ee(p).length>0?a("div",{className:"sf-add-page-group",children:a(S,{label:t("From your template"),active:o===w,onClick:()=>n(w)})}):null]});return a(O,{open:l,onClose:x,size:"full",title:t("Add page"),initialFocus:C,children:a(Q,{sidebarTop:g(K,{onClick:B,disabled:!d.createPage||u!==null,children:[a(H,{"aria-hidden":!0}),t("Blank page")]}),sidebar:_,children:g("div",{className:"sf-add-page",children:[a("h3",{ref:C,tabIndex:-1,className:"sf-add-page-title",children:t("Pages for your site")}),a("p",{className:"sf-add-page-sub",children:t("Choose a page and change the text, images and more.")}),k===null?a("p",{className:"sf-add-page-sub",children:t("Loading…")}):N.length===0?a(V,{title:t("No pages to start from"),description:t("Start with a blank page, then add sections.")}):a(J,{cols:1,smCols:2,lgCols:3,gap:8,children:N.map(e=>a(U,{starter:e,config:R,metadata:j,busy:u===e.id,onAdd:F},e.id))})]})})})}export{ae as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Config } from "efficient-easel/blocks";
|
|
2
|
+
import type { PageStarter } from "../../format/lib/web-backend.js";
|
|
3
|
+
export default function PageStarterCard({ starter, config, metadata, busy, onAdd, }: {
|
|
4
|
+
starter: PageStarter;
|
|
5
|
+
config: Config;
|
|
6
|
+
metadata: Record<string, unknown>;
|
|
7
|
+
busy: boolean;
|
|
8
|
+
onAdd: (starter: PageStarter) => void;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useMemo as p,useState as h}from"react";import{CanvasFrame as v}from"efficient-easel/easel";import{Button as g,FitFrame as y}from"efficient-shell/ui";import C from"./PreviewThemeFrame.js";import N from"../../render/lib/document/page-render.js";import{SiteThemeCarrier as S,suppressPreviewNav as D}from"../lib/document/page-root.js";import{useEditorCanvasStyles as x}from"../lib/editor-canvas-styles.js";import{say as i}from"../../format/lib/editor-words.js";import{firstSectionOf as F}from"../../format/lib/page-starters.js";const b=1440,j=1080;function A({starter:t,config:a,metadata:s,busy:n,onAdd:m}){const{mirrorHostStyles:d}=x(),[l,c]=h(null),f=p(()=>{const r=F(t.layout),u=t.layout.zones;return{root:{props:{}},content:r?[r]:[],zones:u??{}}},[t.layout]);return o("div",{className:"sf-starter",children:[o("div",{className:"sf-starter-picture",children:[e("div",{inert:!0,className:"sf-starter-frame",children:e(y,{width:b,height:j,children:e(v,{id:`page-starter-${t.id}`,title:t.title,mirrorStyles:d,onDocument:c,height:"fill",children:e(C,{document:l??void 0,children:e(S,{onClickCapture:D,body:r=>e("div",{className:"sf-themed-content",style:r,children:e("div",{style:{background:"var(--bg)"},children:e(N,{config:a,data:f,metadata:s})})})})})})})}),e("div",{className:"sf-starter-add",children:e(g,{onClick:()=>m(t),loading:n,"aria-label":i("Add “{name}”",{name:t.title}),children:i("Add page")})})]}),e("span",{className:"sf-starter-name",children:t.title})]})}export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,Fragment as
|
|
1
|
+
"use client";import{jsx as n,Fragment as ke,jsxs as R}from"react/jsx-runtime";import{Fragment as Ce,useEffect as $,useMemo as ee,useRef as Ae,useState as d}from"react";import{useScreenDocument as ne}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as H}from"efficient-easel/draw/client";import Ie from"efficient-easel/screen/components/SidePanelHead";import{useWebsiteName as Re}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as De}from"efficient-easel/chrome";import{Input as Oe,PopupMenu as xe,PopupMenuItem as te,toast as oe}from"efficient-shell/ui";import{LayersTree as Ee,TreeGroupLabel as Ne,TreeRow as se,TreeRowAction as D}from"efficient-easel/tree";import{AddIcon as Le,DuplicateIcon as Be,PageIcon as Me,SettingsIcon as _e}from"efficient-easel/icons";import{PagesIcon as Fe}from"efficient-easel/rail";import{useEaselHost as ve}from"efficient-easel/screen/lib/host";import{bucketEditorPageRows as ze,DYNAMIC_PAGES_GROUP_KEY as Ge,isDynamicPageRow as He,isPopupPageRow as Te,MAIN_PAGES_GROUP as We}from"../../format/lib/editor-page-rows.js";import{useEaselSession as T}from"efficient-easel/screen/lib/session-context";import{holdPageRow as W,usePageRows as je}from"../lib/page-rows.js";import{say as t,sayCount as Ue}from"../../format/lib/editor-words.js";import{canDuplicatePage as Ye,DuplicatePageDialog as qe}from"efficient-easel/page-copy";import Je from"./AddPageWindow.js";import{useTakeAddPageOnOpen as Ke}from"./AddPageOnOpen.js";import{backendOf as ae}from"../lib/website-session.js";import{shopHost as Qe}from"../../format/lib/web-runtime.js";import{newPopupPage as Ve}from"../../format/lib/popup/new-popup.js";const le="sf-editor-pages-collapsed-groups";function Xe(){const r=T(),{siteId:O,templateId:S}=ne(),w=ae(r).pages;if(!(!w.duplicate||S))return(u,y)=>w.duplicate(u.id,{...y,...O?{siteId:O}:{}})}function Ze({onNavigate:r,onClose:O,activeSurface:S,onPreviewSurface:w}){const u=T().chrome?.pageRows,y=ve(),{adapter:k,capabilities:p,ready:j,currentSlug:U}=ne(),re=Re(),{rows:c,reload:x,setRows:Y,getRows:ie}=je(),[E,ce]=d(""),[m,q]=d(!1),[J,C]=d(null),[K,N]=d(!1),de=!!ae(T()).pages.createFromStarter,L=Xe(),[g,B]=d(null),[M,ue]=d(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(le);return new Set(e?JSON.parse(e):[])}catch{return new Set}});$(()=>{try{window.localStorage.setItem(le,JSON.stringify([...M]))}catch{}},[M]);const pe=e=>ue(s=>{const o=new Set(s);return o.has(e)?o.delete(e):o.add(e),o}),me=ee(()=>ze(c??[]),[c]),_=E.trim().toLowerCase(),Q=e=>!_||e.toLowerCase().includes(_),ge=e=>_?!0:!M.has(e),F=ee(()=>new Set((c??[]).map(e=>e.slug)),[c]),v=()=>{if(p.pageCreationInAdminForm&&!de){y.send("storefront-editor:new-page");return}C(null),N(!0)},fe=Ke();$(()=>{fe()&&v()},[]);const A=p.hasSiteSettings&&!!k.createPage,he=async()=>{if(!(!j||m||!k.createPage)){q(!0),C(null);try{const e=await k.createPage(Ve(t("New popup"),F));await x(),r(e.slug)}catch{C(t("Couldn’t add the popup — please retry."))}finally{q(!1)}}},V=Ae(null),[f,h]=d(null),be=()=>{if(!A)return v();if(f)return h(null);const e=V.current?.getBoundingClientRect();e&&h({top:e.bottom+6,right:Math.max(8,window.innerWidth-e.right)})},Pe=e=>{const s=c??[],o=k.deletePage;if(!j||m||!o||s.length<=1)return;const l=s.findIndex(a=>a.id===e.id),i=s.filter(a=>a.id!==e.id),b=e.slug===U;W(e.id,!0),Y(i),C(null),b&&i[0]&&r(i[0].slug);const I=()=>{W(e.id,!1);const a=ie()??[];if(a.some(ye=>ye.id===e.id))return;const P=[...a];P.splice(Math.max(0,Math.min(l,P.length)),0,e),Y(P)};oe.undoable(t("Deleted “{name}”",{name:e.label}),{actionLabel:t("Undo"),commit:async a=>{await o(e.id,a),W(e.id,!1)},undo:()=>{I(),b&&r(e.slug)},onFail:()=>{I(),oe.error(t("Couldn’t delete the page — please retry."))}})},Se=e=>y.send("storefront-editor:open-page",{slug:e}),we=e=>{if(!Q(e.label))return null;const s=!S&&e.slug===U,o=p.canDeletePagesInline&&(c??[]).length>1,l=He(e),i=Te(e),b=[...l?[{label:t("Dynamic"),tone:"info"}]:[],...i?[{label:t("Lightbox"),tone:"success"}]:[],...e.draft?[{label:t("draft"),tone:"draft"}]:[]],I=b.length>0?b:void 0,a=!!L&&Ye(e),P=a||p.pageCreationInAdminForm||o?R(ke,{children:[a&&n(D,{kind:"plain",label:t("Duplicate “{name}”",{name:e.label}),disabled:m,onClick:()=>B(e),children:n(Be,{size:13})}),p.pageCreationInAdminForm&&n(D,{kind:"plain",label:t("Page settings for “{name}”",{name:e.label}),onClick:()=>Se(e.slug),children:n(_e,{size:13})}),o&&n(D,{kind:"delete",label:t("Delete “{name}”",{name:e.label}),disabled:m,onClick:()=>Pe(e),children:n(H,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return n(se,{icon:n(Me,{size:14}),name:e.label,selected:s,onSelect:()=>r(e.slug),badge:I,actions:P,rowProps:{"data-page-slug":e.slug}},e.id)},z=(e,s,o)=>{const l=o.filter(Boolean);if(l.length===0)return null;const i=ge(e);return R(Ce,{children:[n(Ne,{count:l.length,countLabel:Ue("{n} page","{n} pages",l.length),expanded:i,onToggle:()=>pe(e),children:s}),i&&l]},e)},X=(u?.rows??[]).filter(e=>Q(e.label)).map(e=>{const s=S===e.key;return n(se,{icon:e.icon,name:e.label,selected:s,onSelect:()=>w(e.key),badge:{label:t("Preview"),tone:"warning"},actions:n(D,{kind:"plain",label:t("Open the {name} in a new tab",{name:e.label}),onClick:()=>window.open(e.href,"_blank","noopener,noreferrer"),children:n(H,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":e.key}},e.key)}),Z=p.hasSiteSettings&&!!u,G=(()=>{if(c===null)return null;const e=[];let s=!1;for(const o of me){Z&&!s&&o.key.startsWith("system:")&&(e.push(z("shop",u.title,X)),s=!0);const l=o.key===Ge||o.label===We?t(o.label):o.label;e.push(z(o.key,l,o.rows.map(we)))}return Z&&!s&&e.push(z("shop",u.title,X)),e})();return R("div",{className:"sf-pages",children:[n(Ie,{icon:n(Fe,{}),title:t("Pages"),context:re,actions:n(De,{buttonRef:V,label:A?t("Add"):t("New page"),hasPopup:A?"menu":void 0,expanded:A?f!==null:void 0,onClick:be,children:n(Le,{size:15})})}),f&&n(xe,{portal:!0,style:{top:f.top,right:f.right},onClose:()=>h(null),children:R("div",{role:"menu","aria-label":t("Add"),children:[n(te,{role:"menuitem",onClick:()=>{h(null),v()},children:t("Page")}),n(te,{role:"menuitem",disabled:m,onClick:()=>{h(null),he()},children:t("Popup")})]})}),n("div",{className:"sf-pages-find",children:n(Oe,{type:"search",leftIcon:n(H,{name:"search",size:14,rounded:!0}),placeholder:t("Search all pages…"),value:E,onChange:e=>ce(e.target.value),"aria-label":t("Search all pages")})}),J&&!K&&n("div",{className:"sf-note sf-note--error",role:"alert",children:J}),G===null?n("div",{className:"sf-note",children:t("Loading…")}):G.some(Boolean)?n(Ee,{ariaLabel:t("Pages"),className:"sf-scroll",children:G}):n("div",{className:"sf-note",children:E.trim()?t("No pages match your search"):t("No pages yet. Add one with + above.")}),L&&g&&n(qe,{source:{title:g.label,slug:g.slug},taken:F,host:Qe(),duplicate:e=>L(g,e),onClose:()=>B(null),onDuplicated:e=>{B(null),x(),r(e.slug)}},g.id),K?n(Je,{open:!0,onClose:()=>N(!1),takenSlugs:F,onCreated:e=>{N(!1),x(),r(e.slug)}}):null]})}export{Ze as default};
|
|
@@ -14,6 +14,7 @@ import "efficient-easel/drag.css";
|
|
|
14
14
|
import "efficient-easel/screen.css";
|
|
15
15
|
import "./storefront-editor.css";
|
|
16
16
|
import { type ScreenTarget as EditorTarget } from "efficient-easel/screen/components/ScreenDocumentContext";
|
|
17
|
-
export default function StorefrontEditor({ target }: {
|
|
17
|
+
export default function StorefrontEditor({ target, openAddPage }: {
|
|
18
18
|
target: EditorTarget;
|
|
19
|
+
openAddPage?: boolean;
|
|
19
20
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as c,jsxs as Ct}from"react/jsx-runtime";import{useCallback as o,useEffect as f,useMemo as he,useRef as g,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as _t}from"../lib/document/build-config.js";import{ChromeWrap as Pt}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as Tt}from"efficient-easel/screen/lib/session";import{refreshSiteLiveState as Et}from"../lib/site-live-state.js";import{holdSiteWrites as yt}from"../../format/lib/site-writes.js";import{backendOf as H,blocksOf as Gt}from"../lib/website-session.js";import{useEaselSession as vt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as kt}from"../../format/lib/document/site-gap-fields.js";import{withTemplateMediaPlaceholders as Wt}from"../../format/lib/document/templateFields.js";import{setEditorPage as ue}from"../../format/lib/document/editor-page-context.js";import{EditorPagePathProvider as Ht}from"./EditorPagePathProvider.js";import{resolveSiteName as Rt}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as Bt,normalizeSiteGutterPhone as Ft,normalizeSiteWidth as It}from"../../format/lib/content/page-width.js";import{siteLengthNumber as w,siteLengthUnitsOfRow as bt}from"../../format/lib/content/css-length.js";import{normalizeSiteBackground as le}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as me}from"../../format/lib/content/container-gap.js";import Dt,{DocumentScreen as Mt}from"efficient-easel/screen/components/ScreenMount";import Nt from"./WebsiteHintsProvider.js";import{useScreenDocument as Ot}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as xt,siteThemeRow as Ut,themeEdited as At,themeSeeded as Lt}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as zt}from"./PreviewFooterContext.js";import{PreviewChatProvider as Yt,DEFAULT_CHAT_PREVIEW as jt}from"./PreviewChatContext.js";import{PreviewSocialProvider as Kt}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as Vt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Xt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Zt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as qt}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as Jt}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Qt}from"efficient-easel/draw/client";import{CanvasPartsBridge as $t}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as er}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as tr}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as rr,DEFAULT_HEADING_COMPRESSION as or,DEFAULT_HEADING_TYPOGRAPHY as nr,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as ir,DEFAULT_THEME_MODE as T,normalizeCornerRadius as ar,normalizeCornerStyle as cr,normalizeCardShadow as sr,normalizeCardGap as dr,normalizeHoverEffect as hr,IDENTITY_CARD_GAP as pe,IDENTITY_CARD_SHADOW as ur,IDENTITY_HOVER_EFFECT as lr,THEME_MODE_KEY as Se,THEME_STORAGE_KEY as mr,THEME_SWITCH_HIDE as fe,THEME_SWITCH_KEY as B}from"../../format/lib/theme.js";import{pictureShadowColor as pr}from"efficient-easel/screen/lib/document/shadow-values";import{DEFAULT_FONTS as Sr}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as fr}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as gr}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as wr}from"../../render/lib/text-styles/site-text-styles.js";import{wordStylesFromRow as Cr}from"../../format/lib/word-styles.js";import{chatPreviewFrom as _r}from"./PreviewChatContext.js";const Pr=()=>{if(typeof window>"u")return T;try{const s=window.localStorage.getItem(Se);return s==="light"||s==="dark"||s==="auto"?s:T}catch{return T}},ge=s=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Se,s)}catch{}},Tr=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(B)!==fe}catch{return R}},Er=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(mr)}catch{}},we=s=>{if(!(typeof window>"u"))try{s?window.localStorage.removeItem(B):window.localStorage.setItem(B,fe)}catch{}};function yr(){const{adapter:s,capabilities:d,templateId:F,ready:_,token:u,siteId:a,currentSlug:I,currentKind:b}=Ot();f(()=>(ue(I,b),()=>ue(null,null)),[I,b]);const E=d.placeholderFrames,[Ce,D]=r(null),[_e,M]=r("");f(()=>{const e=s.templateName;if(!_||!F||!e){M("");return}let i=!1;return e().then(l=>!i&&M(l??"")).catch(()=>{}),()=>{i=!0}},[_,u,F,s]);const[Pe,y]=r(T),[Te,G]=r(R),[N,O]=r({value:{selected:0,themes:[]},readFor:null}),Ee=N.value,[ye,x]=r(Sr),[Ge,U]=r(ir),[ve,A]=r(null),[ke,L]=r(or),[We,z]=r(null),[He,Y]=r(null),[Re,j]=r(pe),[Be,K]=r(null),[Fe,V]=r(null),[Ie,X]=r(null),[be,Z]=r(null),[v,q]=r(null),[k,J]=r(null),[De,Q]=r({}),Me=o(e=>Q(i=>({...i,...e})),[]),h=vt(),$=he(()=>_t(Tt(h),Gt(h)),[h]),Ne=he(()=>kt(Wt($,E),v,k),[$,E,v,k]),[Oe,ee]=r(nr),[xe,te]=r(null),[Ue,re]=r(null),[Ae,oe]=r(null),[Le,ne]=r(null),[ze,ie]=r(null),ae=g(null),n=g(!1);f(()=>{y(Pr()),G(Tr())},[]);const Ye=o(e=>{n.current=!0,Er(),ge(e),y(e)},[]),je=o(e=>{n.current=!0,we(e),G(e)},[]),Ke=o(e=>{n.current=!0,O(i=>At(i,e,a??""))},[a]),Ve=o(e=>{n.current=!0,x(e)},[]),Xe=o(e=>{n.current=!0,U(e)},[]),Ze=o(e=>{n.current=!0,A(e)},[]),qe=o(e=>{n.current=!0,L(e)},[]),Je=o(e=>{n.current=!0,z(e)},[]),Qe=o(e=>{n.current=!0,Y(e)},[]),$e=o(e=>{n.current=!0,j(e)},[]),et=o(e=>{n.current=!0,K(e)},[]),tt=o(e=>{n.current=!0,ee(e)},[]),[rt,ce]=r(null),[ot,nt]=r(null),it=o(e=>{n.current=!0,ce(e)},[]),at=o(e=>{n.current=!0,V(e)},[]),ct=o(e=>{n.current=!0,X(e)},[]),st=o(e=>{n.current=!0,Z(e)},[]),dt=o(e=>{n.current=!0,q(e)},[]),ht=o(e=>{n.current=!0,J(e)},[]),ut=o(e=>{n.current=!0,te(e)},[]),lt=o(e=>{n.current=!0,re(e)},[]),mt=o(e=>{n.current=!0,oe(e)},[]),pt=o(e=>{n.current=!0,ne(e)},[]),St=o(e=>{n.current=!0,ie(e)},[]);f(()=>{const e=H(h).theme;if(!u||!d.hasSiteTheme||!e)return;const i=a??"";ae.current!==i&&(ae.current=i,n.current=!1);let l=!1;return e.get(a?{siteId:a}:void 0).then(t=>{if(l||n.current)return;ge(t.default_mode),we(t.show_theme_switch),y(t.default_mode),G(t.show_theme_switch),O(Lt({selected:t.selected_preset,themes:t.theme_presets},i));const C=wr(t);x(C.fonts),U(C.sizes);const S=bt(t);Q(S),A(t.corner_radius_px===void 0?rr[cr(t.corner_style)]:w(t.corner_radius_px,S.cornerRadiusUnit,ar)),L(C.compression),z(t.card_shadow==null?ur:sr(t.card_shadow)),j(t.card_gap==null?pe:dr(t.card_gap)),K(t.hover_effect==null?lr:hr(t.hover_effect)),Y(pr(t.shadow_color)),V(w(t.site_width,S.siteWidthUnit,It)),X(w(t.site_gutter,S.siteGutterUnit,Bt)),Z(w(t.site_gutter_phone,S.siteGutterPhoneUnit,Ft)),q(w(t.block_gap,S.blockGapUnit,me)),J(w(t.block_gap_phone,S.blockGapPhoneUnit,me)),ee(C.typography),ce(C.textStyles),nt(Cr(t)),te(t.hero_background_follows_width===!0),re(le(t.section_background_width)),oe(le(t.section_content_width)),ne(t.photography_grayscale===!0),ie(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{l=!0}},[u,a,d.hasSiteTheme,h]);const ft=Vt({token:u,siteId:a,enabled:d.hasSiteSettings}),[gt,se]=r(jt),de=g(null),W=g(!1),m=g(null),p=g({}),P=o(async()=>{m.current&&clearTimeout(m.current),m.current=null;const e=p.current;p.current={};try{await H(h).chat?.update(e,a?{siteId:a}:void 0),Et()}catch(i){throw p.current={...e,...p.current},i}},[h,a]);f(()=>yt(()=>m.current||Object.keys(p.current).length>0?P():void 0),[P]);const wt=o(e=>{W.current=!0,se(i=>({...i,...e})),!(!d.hasSiteSettings||!u)&&(p.current={...p.current,...e},m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{P().catch(()=>{})},500))},[d.hasSiteSettings,u,P]);return f(()=>{if(!u||!d.hasSiteSettings)return;const e=a??"";de.current!==e&&(de.current=e,W.current=!1);let i=!1;const l=H(h).chat;if(l)return l.get(a?{siteId:a}:void 0).then(t=>{i||W.current||se(_r(t))}).catch(()=>{}),()=>{i=!0}},[u,a,d.hasSiteSettings,h]),f(()=>{const e=s.site;if(!_||!d.hasSiteRecord||!e){D(null);return}let i=!1;return e().then(l=>{i||D(Rt(l.name))}).catch(()=>{}),()=>{i=!0}},[_,u,d.hasSiteRecord,a,s]),c(Mt,{config:Ne,parts:fr,wrap:(e,i)=>c(xt,{websiteName:Ce,templateChrome:E,templateName:_e||null,themeMode:Pe,onThemeModeChange:Ye,themeSwitchShown:Te,onThemeSwitchShownChange:je,theme:Ee,themeRow:Ut(d.hasSiteTheme,N.readFor,a??""),onThemeChange:Ke,fonts:ye,onFontsChange:Ve,cornerRadiusPx:ve,onCornerRadiusPxChange:Ze,cardShadow:We,onCardShadowChange:Je,shadowColor:He,onShadowColorChange:Qe,cardGap:Re,onCardGapChange:$e,hoverEffect:Be,onHoverEffectChange:et,headingCompression:ke,onHeadingCompressionChange:qe,headingTypography:Oe,onHeadingTypographyChange:tt,textStyles:rt,onTextStylesChange:it,wordStyles:ot,sizes:Ge,onSizesChange:Xe,siteWidth:Fe,onSiteWidthChange:at,siteGutter:Ie,onSiteGutterChange:ct,siteGutterPhone:be,onSiteGutterPhoneChange:st,blockGap:v,onBlockGapChange:dt,blockGapPhone:k,onBlockGapPhoneChange:ht,siteLengthUnits:De,onSiteLengthUnitsChange:Me,heroBackgroundFollowsWidth:xe,onHeroBackgroundFollowsWidthChange:ut,sectionBackgroundWidth:Ue,onSectionBackgroundWidthChange:lt,sectionContentWidth:Ae,onSectionContentWidthChange:mt,photographyGrayscale:Le,onPhotographyGrayscaleChange:pt,shareButtonOnPosts:ze,onShareButtonOnPostsChange:St,themeFromDocument:!d.hasSiteTheme,children:c(zt,{children:c(Pt,{wrap:h.chrome?.wrap,surface:"page",children:c(qt,{children:c(Jt,{children:c(Qt,{children:c(er,{children:c($t,{children:Ct(tr,{children:[c(Yt,{chat:gt,onChatChange:wt,children:c(Kt,{value:ft,children:c(Xt,{children:c(Ht,{children:c(Nt,{children:e})})})})}),i]})})})})})})})})})})}function Gr({target:s}){return c(Dt,{target:s,addressing:Zt,onHostMessage:gr,children:c(yr,{})})}export{Gr as default};
|
|
1
|
+
"use client";import{jsx as a,jsxs as wt}from"react/jsx-runtime";import{useCallback as o,useEffect as f,useMemo as Ct,useRef as g,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{useHostConfig as _t}from"../lib/document/host-config.js";import{ChromeWrap as Pt}from"efficient-easel/screen/lib/host-chrome";import{refreshSiteLiveState as Tt}from"../lib/site-live-state.js";import{holdSiteWrites as Et}from"../../format/lib/site-writes.js";import{backendOf as W}from"../lib/website-session.js";import{useEaselSession as yt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as Gt}from"../../format/lib/document/site-gap-fields.js";import{withTemplateMediaPlaceholders as vt}from"../../format/lib/document/templateFields.js";import{setEditorPage as he}from"../../format/lib/document/editor-page-context.js";import{EditorPagePathProvider as kt}from"./EditorPagePathProvider.js";import{AddPageOnOpen as Ht}from"./AddPageOnOpen.js";import{resolveSiteName as Wt}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as Bt,normalizeSiteGutterPhone as Rt,normalizeSiteWidth as Ft}from"../../format/lib/content/page-width.js";import{siteLengthNumber as w,siteLengthUnitsOfRow as It}from"../../format/lib/content/css-length.js";import{normalizeSiteBackground as ue}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as le}from"../../format/lib/content/container-gap.js";import Dt,{DocumentScreen as bt}from"efficient-easel/screen/components/ScreenMount";import Ot from"./WebsiteHintsProvider.js";import{useScreenDocument as Mt}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as Nt,siteThemeRow as xt,themeEdited as Ut,themeSeeded as At}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as Lt}from"./PreviewFooterContext.js";import{PreviewChatProvider as zt,DEFAULT_CHAT_PREVIEW as Yt}from"./PreviewChatContext.js";import{PreviewSocialProvider as jt}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as Kt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Vt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Xt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Zt}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as qt}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Jt}from"efficient-easel/draw/client";import{CanvasPartsBridge as Qt}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as $t}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as er}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as tr,DEFAULT_HEADING_COMPRESSION as rr,DEFAULT_HEADING_TYPOGRAPHY as or,DEFAULT_SWITCH_SHOWN as B,DEFAULT_SIZES as nr,DEFAULT_THEME_MODE as T,normalizeCornerRadius as ir,normalizeCornerStyle as ar,normalizeCardShadow as cr,normalizeCardGap as sr,normalizeHoverEffect as dr,IDENTITY_CARD_GAP as me,IDENTITY_CARD_SHADOW as hr,IDENTITY_HOVER_EFFECT as ur,THEME_MODE_KEY as pe,THEME_STORAGE_KEY as lr,THEME_SWITCH_HIDE as Se,THEME_SWITCH_KEY as R}from"../../format/lib/theme.js";import{pictureShadowColor as mr}from"efficient-easel/screen/lib/document/shadow-values";import{DEFAULT_FONTS as pr}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as Sr}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as fr}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as gr}from"../../render/lib/text-styles/site-text-styles.js";import{wordStylesFromRow as wr}from"../../format/lib/word-styles.js";import{chatPreviewFrom as Cr}from"./PreviewChatContext.js";const _r=()=>{if(typeof window>"u")return T;try{const s=window.localStorage.getItem(pe);return s==="light"||s==="dark"||s==="auto"?s:T}catch{return T}},fe=s=>{if(!(typeof window>"u"))try{window.localStorage.setItem(pe,s)}catch{}},Pr=()=>{if(typeof window>"u")return B;try{return window.localStorage.getItem(R)!==Se}catch{return B}},Tr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(lr)}catch{}},ge=s=>{if(!(typeof window>"u"))try{s?window.localStorage.removeItem(R):window.localStorage.setItem(R,Se)}catch{}};function Er(){const{adapter:s,capabilities:d,templateId:F,ready:_,token:h,siteId:c,currentSlug:I,currentKind:D}=Mt();f(()=>(he(I,D),()=>he(null,null)),[I,D]);const E=d.placeholderFrames,[we,b]=r(null),[Ce,O]=r("");f(()=>{const e=s.templateName;if(!_||!F||!e){O("");return}let i=!1;return e().then(u=>!i&&O(u??"")).catch(()=>{}),()=>{i=!0}},[_,h,F,s]);const[_e,y]=r(T),[Pe,G]=r(B),[M,N]=r({value:{selected:0,themes:[]},readFor:null}),Te=M.value,[Ee,x]=r(pr),[ye,U]=r(nr),[Ge,A]=r(null),[ve,L]=r(rr),[ke,z]=r(null),[He,Y]=r(null),[We,j]=r(me),[Be,K]=r(null),[Re,V]=r(null),[Fe,X]=r(null),[Ie,Z]=r(null),[v,q]=r(null),[k,J]=r(null),[De,Q]=r({}),be=o(e=>Q(i=>({...i,...e})),[]),l=yt(),$=_t(),Oe=Ct(()=>Gt(vt($,E),v,k),[$,E,v,k]),[Me,ee]=r(or),[Ne,te]=r(null),[xe,re]=r(null),[Ue,oe]=r(null),[Ae,ne]=r(null),[Le,ie]=r(null),ae=g(null),n=g(!1);f(()=>{y(_r()),G(Pr())},[]);const ze=o(e=>{n.current=!0,Tr(),fe(e),y(e)},[]),Ye=o(e=>{n.current=!0,ge(e),G(e)},[]),je=o(e=>{n.current=!0,N(i=>Ut(i,e,c??""))},[c]),Ke=o(e=>{n.current=!0,x(e)},[]),Ve=o(e=>{n.current=!0,U(e)},[]),Xe=o(e=>{n.current=!0,A(e)},[]),Ze=o(e=>{n.current=!0,L(e)},[]),qe=o(e=>{n.current=!0,z(e)},[]),Je=o(e=>{n.current=!0,Y(e)},[]),Qe=o(e=>{n.current=!0,j(e)},[]),$e=o(e=>{n.current=!0,K(e)},[]),et=o(e=>{n.current=!0,ee(e)},[]),[tt,ce]=r(null),[rt,ot]=r(null),nt=o(e=>{n.current=!0,ce(e)},[]),it=o(e=>{n.current=!0,V(e)},[]),at=o(e=>{n.current=!0,X(e)},[]),ct=o(e=>{n.current=!0,Z(e)},[]),st=o(e=>{n.current=!0,q(e)},[]),dt=o(e=>{n.current=!0,J(e)},[]),ht=o(e=>{n.current=!0,te(e)},[]),ut=o(e=>{n.current=!0,re(e)},[]),lt=o(e=>{n.current=!0,oe(e)},[]),mt=o(e=>{n.current=!0,ne(e)},[]),pt=o(e=>{n.current=!0,ie(e)},[]);f(()=>{const e=W(l).theme;if(!h||!d.hasSiteTheme||!e)return;const i=c??"";ae.current!==i&&(ae.current=i,n.current=!1);let u=!1;return e.get(c?{siteId:c}:void 0).then(t=>{if(u||n.current)return;fe(t.default_mode),ge(t.show_theme_switch),y(t.default_mode),G(t.show_theme_switch),N(At({selected:t.selected_preset,themes:t.theme_presets},i));const C=gr(t);x(C.fonts),U(C.sizes);const S=It(t);Q(S),A(t.corner_radius_px===void 0?tr[ar(t.corner_style)]:w(t.corner_radius_px,S.cornerRadiusUnit,ir)),L(C.compression),z(t.card_shadow==null?hr:cr(t.card_shadow)),j(t.card_gap==null?me:sr(t.card_gap)),K(t.hover_effect==null?ur:dr(t.hover_effect)),Y(mr(t.shadow_color)),V(w(t.site_width,S.siteWidthUnit,Ft)),X(w(t.site_gutter,S.siteGutterUnit,Bt)),Z(w(t.site_gutter_phone,S.siteGutterPhoneUnit,Rt)),q(w(t.block_gap,S.blockGapUnit,le)),J(w(t.block_gap_phone,S.blockGapPhoneUnit,le)),ee(C.typography),ce(C.textStyles),ot(wr(t)),te(t.hero_background_follows_width===!0),re(ue(t.section_background_width)),oe(ue(t.section_content_width)),ne(t.photography_grayscale===!0),ie(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{u=!0}},[h,c,d.hasSiteTheme,l]);const St=Kt({token:h,siteId:c,enabled:d.hasSiteSettings}),[ft,se]=r(Yt),de=g(null),H=g(!1),m=g(null),p=g({}),P=o(async()=>{m.current&&clearTimeout(m.current),m.current=null;const e=p.current;p.current={};try{await W(l).chat?.update(e,c?{siteId:c}:void 0),Tt()}catch(i){throw p.current={...e,...p.current},i}},[l,c]);f(()=>Et(()=>m.current||Object.keys(p.current).length>0?P():void 0),[P]);const gt=o(e=>{H.current=!0,se(i=>({...i,...e})),!(!d.hasSiteSettings||!h)&&(p.current={...p.current,...e},m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{P().catch(()=>{})},500))},[d.hasSiteSettings,h,P]);return f(()=>{if(!h||!d.hasSiteSettings)return;const e=c??"";de.current!==e&&(de.current=e,H.current=!1);let i=!1;const u=W(l).chat;if(u)return u.get(c?{siteId:c}:void 0).then(t=>{i||H.current||se(Cr(t))}).catch(()=>{}),()=>{i=!0}},[h,c,d.hasSiteSettings,l]),f(()=>{const e=s.site;if(!_||!d.hasSiteRecord||!e){b(null);return}let i=!1;return e().then(u=>{i||b(Wt(u.name))}).catch(()=>{}),()=>{i=!0}},[_,h,d.hasSiteRecord,c,s]),a(bt,{config:Oe,parts:Sr,wrap:(e,i)=>a(Nt,{websiteName:we,templateChrome:E,templateName:Ce||null,themeMode:_e,onThemeModeChange:ze,themeSwitchShown:Pe,onThemeSwitchShownChange:Ye,theme:Te,themeRow:xt(d.hasSiteTheme,M.readFor,c??""),onThemeChange:je,fonts:Ee,onFontsChange:Ke,cornerRadiusPx:Ge,onCornerRadiusPxChange:Xe,cardShadow:ke,onCardShadowChange:qe,shadowColor:He,onShadowColorChange:Je,cardGap:We,onCardGapChange:Qe,hoverEffect:Be,onHoverEffectChange:$e,headingCompression:ve,onHeadingCompressionChange:Ze,headingTypography:Me,onHeadingTypographyChange:et,textStyles:tt,onTextStylesChange:nt,wordStyles:rt,sizes:ye,onSizesChange:Ve,siteWidth:Re,onSiteWidthChange:it,siteGutter:Fe,onSiteGutterChange:at,siteGutterPhone:Ie,onSiteGutterPhoneChange:ct,blockGap:v,onBlockGapChange:st,blockGapPhone:k,onBlockGapPhoneChange:dt,siteLengthUnits:De,onSiteLengthUnitsChange:be,heroBackgroundFollowsWidth:Ne,onHeroBackgroundFollowsWidthChange:ht,sectionBackgroundWidth:xe,onSectionBackgroundWidthChange:ut,sectionContentWidth:Ue,onSectionContentWidthChange:lt,photographyGrayscale:Ae,onPhotographyGrayscaleChange:mt,shareButtonOnPosts:Le,onShareButtonOnPostsChange:pt,themeFromDocument:!d.hasSiteTheme,children:a(Lt,{children:a(Pt,{wrap:l.chrome?.wrap,surface:"page",children:a(Zt,{children:a(qt,{children:a(Jt,{children:a($t,{children:a(Qt,{children:wt(er,{children:[a(zt,{chat:ft,onChatChange:gt,children:a(jt,{value:St,children:a(Vt,{children:a(kt,{children:a(Ot,{children:e})})})})}),i]})})})})})})})})})})}function yr({target:s,openAddPage:d}){return a(Ht,{open:d,children:a(Dt,{target:s,addressing:Xt,onHostMessage:fr,children:a(Er,{})})})}export{yr as default};
|
|
@@ -1685,6 +1685,77 @@
|
|
|
1685
1685
|
.sf-pages > .sf-note--error {
|
|
1686
1686
|
margin-top: var(--space-4);
|
|
1687
1687
|
}
|
|
1688
|
+
/* ── The Add page window (components/AddPageWindow) ─────────────────────────
|
|
1689
|
+
The window, its head, the list down the left and the grid are the shell's
|
|
1690
|
+
(Dialog `full`, SidebarLayout, Grid); what is left is the main area's inset,
|
|
1691
|
+
its two lines of words, the gap above "From your template", and the card.
|
|
1692
|
+
The window is portalled to <body>, outside the screen's `.sf-editor` scope,
|
|
1693
|
+
so it reads the shell's own root tokens (`--ink*`, `--line`). */
|
|
1694
|
+
.sf-add-page {
|
|
1695
|
+
padding: var(--space-32) var(--space-48);
|
|
1696
|
+
}
|
|
1697
|
+
.sf-add-page-title {
|
|
1698
|
+
margin: 0;
|
|
1699
|
+
font-size: var(--text-xl);
|
|
1700
|
+
font-weight: 600;
|
|
1701
|
+
color: var(--ink-strongest);
|
|
1702
|
+
}
|
|
1703
|
+
/* The heading takes the window's first focus (initialFocus), so a mouse open
|
|
1704
|
+
draws no ring on "+ Blank page". It is not a control: no ring of its own. */
|
|
1705
|
+
.sf-add-page-title:focus {
|
|
1706
|
+
outline: none;
|
|
1707
|
+
}
|
|
1708
|
+
/* The list's rows on the same side gutter as "+ Blank page" above them, so the
|
|
1709
|
+
selected row's fill and the button line up. */
|
|
1710
|
+
.sf-add-page-nav {
|
|
1711
|
+
padding: 0 var(--space-8);
|
|
1712
|
+
}
|
|
1713
|
+
.sf-add-page-sub {
|
|
1714
|
+
margin: var(--space-8) 0 var(--space-32);
|
|
1715
|
+
font-size: var(--text-sm);
|
|
1716
|
+
color: var(--ink);
|
|
1717
|
+
}
|
|
1718
|
+
.sf-add-page-group {
|
|
1719
|
+
margin-top: var(--space-32);
|
|
1720
|
+
}
|
|
1721
|
+
/* One card: the picture, then its name. The picture is a live drawing in its
|
|
1722
|
+
own frame, inert; "Add page" lies over it on hover or keyboard focus. */
|
|
1723
|
+
.sf-starter {
|
|
1724
|
+
display: flex;
|
|
1725
|
+
flex-direction: column;
|
|
1726
|
+
gap: var(--space-12);
|
|
1727
|
+
}
|
|
1728
|
+
.sf-starter-picture {
|
|
1729
|
+
position: relative;
|
|
1730
|
+
overflow: hidden;
|
|
1731
|
+
border: 1px solid var(--line);
|
|
1732
|
+
border-radius: var(--radius-sm);
|
|
1733
|
+
}
|
|
1734
|
+
.sf-starter-frame {
|
|
1735
|
+
pointer-events: none;
|
|
1736
|
+
}
|
|
1737
|
+
/* The card's frame is a picture inside a bordered card: no floating shadow of
|
|
1738
|
+
the canvas's own (efficient-easel `.es-canvas-frame`). */
|
|
1739
|
+
.sf-starter-frame .es-canvas-frame {
|
|
1740
|
+
box-shadow: none;
|
|
1741
|
+
}
|
|
1742
|
+
.sf-starter-add {
|
|
1743
|
+
position: absolute;
|
|
1744
|
+
inset: 0;
|
|
1745
|
+
display: flex;
|
|
1746
|
+
align-items: center;
|
|
1747
|
+
justify-content: center;
|
|
1748
|
+
opacity: 0;
|
|
1749
|
+
transition: opacity 0.12s;
|
|
1750
|
+
}
|
|
1751
|
+
.sf-starter:hover .sf-starter-add,
|
|
1752
|
+
.sf-starter:focus-within .sf-starter-add {
|
|
1753
|
+
opacity: 1;
|
|
1754
|
+
}
|
|
1755
|
+
.sf-starter-name {
|
|
1756
|
+
font-size: var(--text-sm);
|
|
1757
|
+
color: var(--ink-strongest);
|
|
1758
|
+
}
|
|
1688
1759
|
/* `.sf-pgroup*` and `.sf-prow` WERE HERE: the Pages headings are the shell's
|
|
1689
1760
|
`TreeGroupLabel` (its count pill and fold), its rows the shell's `TreeRow`. */
|
|
1690
1761
|
/* `.sf-page-draft`, `.sf-badge-dynamic` and `.sf-badge-lightbox` WERE HERE: a
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assembleGeneralBlocks: () => Record<"
|
|
2
|
-
export declare const generalBlocks: Record<"
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"CardList" | "Text" | "ImageBlock" | "ButtonBlock" | "Flex" | "Cards" | "FAQ" | "Footprint" | "Grid" | "Hero" | "HeroGroup" | "HeroSingle" | "HeroSlide" | "Logos" | "LogoBlock" | "OrderSummary" | "ProcessSteps" | "IntroBleed" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "SectionHeader" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "Integrations" | "ContactLocations" | "PaymentBadges" | "Heading" | "Eyebrow" | "LocationMap" | "Contents" | "ListSearch" | "HostPart" | "PostCard", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
+
export declare const generalBlocks: Record<"CardList" | "Text" | "ImageBlock" | "ButtonBlock" | "Flex" | "Cards" | "FAQ" | "Footprint" | "Grid" | "Hero" | "HeroGroup" | "HeroSingle" | "HeroSlide" | "Logos" | "LogoBlock" | "OrderSummary" | "ProcessSteps" | "IntroBleed" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "SectionHeader" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "Integrations" | "ContactLocations" | "PaymentBadges" | "Heading" | "Eyebrow" | "LocationMap" | "Contents" | "ListSearch" | "HostPart" | "PostCard", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -3,7 +3,7 @@ import { boxFieldBuilders, type BoxFieldSay } from "efficient-easel/screen/lib/d
|
|
|
3
3
|
import type { ShowWhenRule } from "efficient-shell/format";
|
|
4
4
|
type Rows = ReturnType<typeof boxFieldBuilders>;
|
|
5
5
|
export declare const rowSay: BoxFieldSay;
|
|
6
|
-
export declare const LENGTH_UNITS_TABLE: Readonly<Record<"
|
|
6
|
+
export declare const LENGTH_UNITS_TABLE: Readonly<Record<"size" | "spacing" | "gap" | "radius" | "fontSize" | "letterSpacing" | "position" | "border" | "height" | "breakpoint", readonly ("px" | "%" | "vw")[]>>;
|
|
7
7
|
export declare const slider: Rows["slider"];
|
|
8
8
|
export declare const select: Rows["select"];
|
|
9
9
|
export declare const Segmented: Rows["Segmented"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as E,bucketHeader as w,cardMediaFields as W,cardShowFields as z,designGroupHeader as $,foldMarker as J,foldMetaOf as C,quietMarker as q,heightFields as O,sectionShapeFields as D,sectionThemeFields as T,stickFields as H,widthField as B}from"./controls.js";import{group as Q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as A}from"./box-fields.js";import{deviceField as V,deviceMetaOf as K}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as F}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as _,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as l,DESIGN_GROUP_KEY as g}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as p,hasOwnEntry as M}from"../../../format/lib/own-entry.js";const R=X;function Z(n){return n==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",x={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},j={"AlloyWheelsListing._gCards":"Design","Flex._gLink":"Link"},N={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function I(n,e,o){const i=`${n}.${e}`;return p(N,i)??p(j,i)??p(x,o)}function pe(n,e,o){const i=I(n,e,o);return i?Z(i):void 0}function te(n){return n==="Animation"?[l.Animation]:[l.Design,g[n]]}function v(...n){const e=[];for(const o of n)for(const i of Object.values(o)){const s=K(i),h=C(s?s.inner:i),u=h?p(x,h.label):void 0;if(u)for(const y of te(u))e.includes(y)||e.push(y)}return e}const ye=[...v(A({tablet:!0,siteSide:!0}),B("full"),O(),E(),H()),...Object.keys(A({tablet:!0,siteSide:!0})),...Object.keys(B("full")),...Object.keys(O()),...Object.keys(E()),...Object.keys(H())],ke=[...v(T()),...Object.keys(T())],Se=[...v(D()),...Object.keys(D())],_e=[...v(F()),...Object.keys(F())],ve=Object.keys(W()),fe=Object.keys(z()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","Flex._gLink":"repeated the Link group heading above it (owner 2026-11-17)","Flex._gJump":"repeated the Anchor group heading above it (owner 2026-11-17)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},Y={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Link:["Link"],Anchor:["Anchor"],Animation:["Animation"]},P={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const n={...A({tablet:!0,siteSide:!0}),...B("full"),...O(),...E(),...T(),...D(),...F()};for(const e of Object.keys(P)){const o=C(n[e]),i=o?p(x,o.label):void 0;if(!o||o.level!==2||!i||!Y[i].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[l.Design,"Content"],[l.Animation,"Animation"],..._.map(n=>[g[n],n])]);function ie(n){const e=`${n}.`;return Object.keys(ne).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function re(n,e){const o=K(n),i=Q(e);return o?V(o.tier,i):i}function de(n,e){const o=C(e);return o?n==="Content"||n==="Animation"?J(e,o.label):q(e):e}function U(n){return n==="Design"?_:["Animation"]}function me(n,e){const o=[],i=new Set(ie(e)),s=new Set;let h=!1,u=null;for(const[t,d]of Object.entries(n)){const a=C(d);if(oe.has(t))throw new Error(`${e}.${t}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key from efficient-easel's DESIGN_GROUP_KEY (\`[DESIGN_GROUP_KEY.Design]: section("Design")\`).`);const c=ae.get(t);if(c!==void 0){if(a?.level!==1)throw new Error(`${e}.${t}: that key is reserved for the ${c} heading of the settings panel, but this field is ${a?`a level-${a.level} "${a.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(t===l.Design||t===l.Animation)&&(h=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!a){u||o.push(u={place:"Content",entries:[]}),u.entries.push([t,d]);continue}if(i.has(t)||M(P,t)){const r=I(e,t,a.label);if(a.level!==2||!r||!Y[r].includes(a.label))throw new Error(`${e}.${t}: ${i.has(t)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${a.level} "${a.label}" header in the ${r??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);i.has(t)&&s.add(t),o.push(u={place:r,entries:[],uniform:M(P,t)});continue}const b=I(e,t,a.label);if(!b)throw new Error(`${e}.${t}: the inspector group "${a.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[..._,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:b,entries:[[t,a.level===2?d:re(d,a.label)]]})}const y=new Set(Object.entries(n).filter(([,t])=>C(t)).map(([t])=>t));for(const[t,d]of[["BLOCK_KEY_GROUP",N],["KEY_GROUP",j]]){const a=Object.keys(d).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1))&&!i.has(c.slice(e.length+1)));if(a.length)throw new Error(`${e}: ${t} (lib/document/field-groups.ts) lists ${JSON.stringify(a)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const f=h?[]:[...i].filter(t=>!s.has(t));if(f.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const G=new Set(o.filter(t=>t.entries.length>0).map(t=>t.place)),m=R.filter(t=>U(t).some(d=>G.has(d))),k={};for(const t of m){k[l[t]]=w(t,t===m[0]?m:null);for(const d of U(t)){if(!G.has(d))continue;const a=o.filter(r=>r.place===d),c=a.findIndex(r=>r.adopted);c>0&&a.unshift(...a.splice(c,1));const b=a.filter(r=>r.uniform);if(b.length>0){const r=a.filter(L=>!L.uniform),S=a[0]?.adopted?1:0;a.splice(0,a.length,...r.slice(0,S),...b,...r.slice(S))}t==="Design"&&(k[g[d]]=$(d));for(const r of a)for(const[S,L]of r.entries)k[S]=de(d,L)}}return k}function Le(n){return l.Design in n?n:{[l.Design]:w("Design",null),[g.Content]:$("Content"),...n}}function Ee(n){return R.some(e=>l[e]in n)}function we(n){const e=R.filter(i=>l[i]in n);if(e.length===0)return n;const o={...n};for(const i of e)o[l[i]]=w(i,i===e[0]?e:null);return o}export{N as BLOCK_KEY_GROUP,R as BUCKETS,l as BUCKET_KEY,ve as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,_ as DESIGN_GROUPS,g as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,P as INJECTED_RETIRED,j as KEY_GROUP,x as LABEL_GROUP,ye as LAYOUT_FIELD_KEYS,Y as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,Se as SECTION_SHAPE_FIELD_KEYS,ke as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,pe as bucketOf,Z as bucketOfPlace,Ee as hasBucketTabs,v as headerKeysOf,te as headerKeysOfPlace,I as placeOf,we as reseatBucketTabs,ie as retiredHeadings,Le as seatDesignBucket};
|
|
1
|
+
import{anchorFields as E,bucketHeader as w,cardMediaFields as W,cardShowFields as z,designGroupHeader as $,foldMarker as J,foldMetaOf as C,quietMarker as q,heightFields as O,sectionShapeFields as D,sectionThemeFields as T,stickFields as H,widthField as B}from"./controls.js";import{group as Q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as A}from"./box-fields.js";import{deviceField as V,deviceMetaOf as K}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as R}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as _,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as l,DESIGN_GROUP_KEY as g}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as p,hasOwnEntry as M}from"../../../format/lib/own-entry.js";const F=X;function Z(n){return n==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",x={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},j={"AlloyWheelsListing._gCards":"Design","Flex._gLink":"Link","LongRead._gLink":"Link"},N={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function I(n,e,o){const i=`${n}.${e}`;return p(N,i)??p(j,i)??p(x,o)}function pe(n,e,o){const i=I(n,e,o);return i?Z(i):void 0}function te(n){return n==="Animation"?[l.Animation]:[l.Design,g[n]]}function v(...n){const e=[];for(const o of n)for(const i of Object.values(o)){const s=K(i),h=C(s?s.inner:i),u=h?p(x,h.label):void 0;if(u)for(const y of te(u))e.includes(y)||e.push(y)}return e}const ye=[...v(A({tablet:!0,siteSide:!0}),B("full"),O(),E(),H()),...Object.keys(A({tablet:!0,siteSide:!0})),...Object.keys(B("full")),...Object.keys(O()),...Object.keys(E()),...Object.keys(H())],ke=[...v(T()),...Object.keys(T())],Se=[...v(D()),...Object.keys(D())],_e=[...v(R()),...Object.keys(R())],ve=Object.keys(W()),fe=Object.keys(z()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","Flex._gLink":"repeated the Link group heading above it (owner 2026-11-17)","LongRead._gLink":"repeated the Link group heading above it (decided 2026-11-17)","Flex._gJump":"repeated the Anchor group heading above it (owner 2026-11-17)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},Y={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Link:["Link"],Anchor:["Anchor"],Animation:["Animation"]},P={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const n={...A({tablet:!0,siteSide:!0}),...B("full"),...O(),...E(),...T(),...D(),...R()};for(const e of Object.keys(P)){const o=C(n[e]),i=o?p(x,o.label):void 0;if(!o||o.level!==2||!i||!Y[i].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[l.Design,"Content"],[l.Animation,"Animation"],..._.map(n=>[g[n],n])]);function ie(n){const e=`${n}.`;return Object.keys(ne).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function re(n,e){const o=K(n),i=Q(e);return o?V(o.tier,i):i}function de(n,e){const o=C(e);return o?n==="Content"||n==="Animation"?J(e,o.label):q(e):e}function U(n){return n==="Design"?_:["Animation"]}function me(n,e){const o=[],i=new Set(ie(e)),s=new Set;let h=!1,u=null;for(const[t,d]of Object.entries(n)){const a=C(d);if(oe.has(t))throw new Error(`${e}.${t}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key from efficient-easel's DESIGN_GROUP_KEY (\`[DESIGN_GROUP_KEY.Design]: section("Design")\`).`);const c=ae.get(t);if(c!==void 0){if(a?.level!==1)throw new Error(`${e}.${t}: that key is reserved for the ${c} heading of the settings panel, but this field is ${a?`a level-${a.level} "${a.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(t===l.Design||t===l.Animation)&&(h=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!a){u||o.push(u={place:"Content",entries:[]}),u.entries.push([t,d]);continue}if(i.has(t)||M(P,t)){const r=I(e,t,a.label);if(a.level!==2||!r||!Y[r].includes(a.label))throw new Error(`${e}.${t}: ${i.has(t)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${a.level} "${a.label}" header in the ${r??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);i.has(t)&&s.add(t),o.push(u={place:r,entries:[],uniform:M(P,t)});continue}const b=I(e,t,a.label);if(!b)throw new Error(`${e}.${t}: the inspector group "${a.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[..._,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:b,entries:[[t,a.level===2?d:re(d,a.label)]]})}const y=new Set(Object.entries(n).filter(([,t])=>C(t)).map(([t])=>t));for(const[t,d]of[["BLOCK_KEY_GROUP",N],["KEY_GROUP",j]]){const a=Object.keys(d).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1))&&!i.has(c.slice(e.length+1)));if(a.length)throw new Error(`${e}: ${t} (lib/document/field-groups.ts) lists ${JSON.stringify(a)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const f=h?[]:[...i].filter(t=>!s.has(t));if(f.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const G=new Set(o.filter(t=>t.entries.length>0).map(t=>t.place)),m=F.filter(t=>U(t).some(d=>G.has(d))),k={};for(const t of m){k[l[t]]=w(t,t===m[0]?m:null);for(const d of U(t)){if(!G.has(d))continue;const a=o.filter(r=>r.place===d),c=a.findIndex(r=>r.adopted);c>0&&a.unshift(...a.splice(c,1));const b=a.filter(r=>r.uniform);if(b.length>0){const r=a.filter(L=>!L.uniform),S=a[0]?.adopted?1:0;a.splice(0,a.length,...r.slice(0,S),...b,...r.slice(S))}t==="Design"&&(k[g[d]]=$(d));for(const r of a)for(const[S,L]of r.entries)k[S]=de(d,L)}}return k}function Le(n){return l.Design in n?n:{[l.Design]:w("Design",null),[g.Content]:$("Content"),...n}}function Ee(n){return F.some(e=>l[e]in n)}function we(n){const e=F.filter(i=>l[i]in n);if(e.length===0)return n;const o={...n};for(const i of e)o[l[i]]=w(i,i===e[0]?e:null);return o}export{N as BLOCK_KEY_GROUP,F as BUCKETS,l as BUCKET_KEY,ve as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,_ as DESIGN_GROUPS,g as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,P as INJECTED_RETIRED,j as KEY_GROUP,x as LABEL_GROUP,ye as LAYOUT_FIELD_KEYS,Y as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,Se as SECTION_SHAPE_FIELD_KEYS,ke as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,pe as bucketOf,Z as bucketOfPlace,Ee as hasBucketTabs,v as headerKeysOf,te as headerKeysOfPlace,I as placeOf,we as reseatBucketTabs,ie as retiredHeadings,Le as seatDesignBucket};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useMemo as s}from"react";import{sessionRegistry as i}from"efficient-easel/screen/lib/session";import{useEaselSession as e}from"efficient-easel/screen/lib/session-context";import{buildConfig as r}from"./build-config.js";import{blocksOf as t}from"../website-session.js";function c(){const o=e();return s(()=>r(i(o),t(o)),[o])}export{c as useHostConfig};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { type EaselCanvasProps } from "efficient-easel/easel";
|
|
2
2
|
export declare function SiteCanvas(props: Omit<EaselCanvasProps, "frameWrapper" | "overlay" | "height" | "mirrorStyles">): import("react").JSX.Element;
|
|
3
|
+
export declare function useSiteWidthsMetadata(): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as h,Fragment as
|
|
1
|
+
"use client";import{jsx as h,Fragment as D,jsxs as F}from"react/jsx-runtime";import{useContext as k,useEffect as M,useMemo as T,useRef as v}from"react";import{EaselCanvas as W,repeatCopyAt as $,useEasel as N}from"efficient-easel/easel";import _ from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as b}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as j}from"../../components/SiteRestoreNotice.js";import{decodePartId as B,REPEAT_ATTRIBUTE as S,REPEAT_INDEX_ATTRIBUTE as P}from"efficient-easel/draw";import{usePreviewParts as K}from"efficient-easel/draw/client";import{cssString as w,partElement as E,partTypingTarget as O,setCanvasTypingPart as A}from"./canvas-typing.js";import{usePartTypingDeps as V}from"../../components/usePartTypingDeps.js";import{copyRowTarget as H,copyRowValue as L,writeCopyText as U}from"./card-copy-rows.js";import{partColourName as q,partThemeColors as J,readInks as X}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as C}from"../../../render/lib/document/text-parts.js";import{useBlockMetadata as z}from"../editor-block-metadata.js";import{usePreviewHeader as G,useSiteContentWidth as x}from"../../../render/components/PreviewHeaderContext.js";import{setEditorSiteContentWidth as I}from"../../../format/lib/document/editor-site-widths.js";import{siteWidthsMetadata as Q}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as Y}from"../editor-canvas-styles.js";import{usePageVideoFrames as Z,videoFramesMetadata as tt}from"../page-video-frames.js";import{ScreenDocumentContext as et}from"efficient-easel/screen/components/ScreenDocumentContext";function Et(r){const{mirrorHostStyles:n}=Y(),a=z(),i=rt(),m=x(),t=k(et),o=Z(t?.docId??null),e=N(u=>u.appState.data),p=tt(o,e),d=JSON.stringify(p),s=T(()=>p,[d]),f=T(()=>({...r.metadata??a??{},...i,...s}),[r.metadata,a,i,s]);M(()=>(I(m),()=>I(null)),[m]);const l=v(null),c=ot(l),{onDocument:g}=r,y=u=>{l.current=u,g?.(u)};return F(D,{children:[h(j,{}),h(b,{}),h(W,{...r,onDocument:y,typing:c,metadata:f,height:"fill",mirrorStyles:n,frameWrapper:_})]})}function rt(){const{sectionBackgroundWidth:r,themeFromDocument:n}=G(),a=x();return T(()=>Q(n?null:r,a),[r,a,n])}function ot(r){const n=V(),a=K(),i=v({parts:a});return i.current={parts:a},T(()=>{const m=(t,o)=>{let e=O(t,n),p,d=null;const s=o??(e?null:E(null,r.current,t)),f=!e&&s?$(s):null,l=f?B(t):null;if(f&&s&&l?.propKey){e=H({...f,nodeId:l.nodeId,key:l.propKey},n),p=l.propKey;const u=s.closest(`[${S}][${P}]`),R=`[${S}="${w(u?.getAttribute(S)??"")}"][${P}="${w(u?.getAttribute(P)??"")}"]`;d=()=>(s.ownerDocument??r.current)?.querySelector(R)??null}if(!e)return null;let c=s;const g=()=>(c=E(c,d?d():c?.ownerDocument??r.current,t),c),y=g();return y?{element:g,value:e.value,rules:e.rules,multiline:e.multiline,skip:e.skip,write:e.write,key:p,toolbar:{offered:e.offered,colors:e.offered.length>0?J(X(y)):void 0,colorNameOf:q}}:null};return{at:t=>{const o=t.closest(`[${C}]`),e=o?.getAttribute(C);return o&&e?m(e,o):null},atSelection:()=>{const t=i.current.parts.selectedPartId;return t?m(t,null):null},onCopyText:t=>U(t,n),copyValue:t=>L(t,n),onChange:t=>{if(!t.typing){A(null);return}const o=t.element.closest(`[${C}]`)?.getAttribute(C)??null;A(o),o&&i.current.parts.selectedPartId!==o&&i.current.parts.select(o)}}},[n,r])}export{Et as SiteCanvas,rt as useSiteWidthsMetadata};
|
|
@@ -24,4 +24,16 @@ export declare function EditorThemedBody({ propsTheme, propsFonts, propsCornerSt
|
|
|
24
24
|
overlay?: ReactNode;
|
|
25
25
|
children?: ReactNode;
|
|
26
26
|
}): import("react").JSX.Element;
|
|
27
|
+
export declare function SiteThemeCarrier({ propsTheme, propsFonts, propsCornerStyle, propsCornerRadiusPx, propsHeadingCompression, propsHeadingTypography, pageBackground, chromeInheritsSiteBackground, onClickCapture, body, }: {
|
|
28
|
+
propsTheme?: ThemeValue;
|
|
29
|
+
propsFonts?: FontsValue;
|
|
30
|
+
propsCornerStyle?: string;
|
|
31
|
+
propsCornerRadiusPx?: number | null;
|
|
32
|
+
propsHeadingCompression?: string;
|
|
33
|
+
propsHeadingTypography?: HeadingTypographyValue;
|
|
34
|
+
pageBackground?: string;
|
|
35
|
+
chromeInheritsSiteBackground?: boolean;
|
|
36
|
+
onClickCapture?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
37
|
+
body: (contentStyle: CSSProperties) => ReactNode;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
27
39
|
export declare const suppressPreviewNav: (e: MouseEvent<HTMLDivElement>) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
2
|
-
`),
|
|
1
|
+
import{jsx as o,Fragment as M,jsxs as P}from"react/jsx-runtime";import{accentItalicCss as $,storedTextStyles as K,textStylesCss as X}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as Y,PAGE_WIDTH_ATTR as q,siteWidthTokens as J,siteGutterTokens as Q,siteGutterPhoneClass as Z,siteGutterPhoneTokens as ee,heroBackgroundTokens as te}from"../../../format/lib/content/page-width.js";import{siteBlockGapPhoneClass as oe,siteBlockGapPhoneTokens as ne,siteBlockGapTokens as re}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as ie}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as se}from"../../../render/components/SitePhotographyContext.js";import{ThemeLightInkProvider as ae}from"../../../render/components/ThemeLightInkContext.js";import{CORNER_STYLE_TO_PX as de,normalizeCornerStyle as ce,normalizeCornerRadius as le,themeColorStyle as pe,themeLightInk as he,typeSizesStyle as me,headingTypographyStyle as ue,normalizeHeadingTypography as fe,themeAccentStyle as ge,themeButtonStyle as Se,themePresetAccentVars as ye,themeSurfaceStyle as xe,siteCornerRadiusTokens as Te,shadowColorTokens as ke,headingCompressionAttr as Ce,cardShadowAttr as Pe,cardGapAttr as Ge,hoverEffectAttr as Ee}from"../../../format/lib/theme.js";import{fontRoleStyle as Ae}from"../../../format/lib/fonts.js";import{wordStyleTokens as ve}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as _e,pageHasHeaderSection as G,pageTakesTopSpace as Be,topSpaceMarker as Re,TOP_SPACE_ATTR as Ie,HEADER_CLEARANCE_CLASS as we}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as He,HEADER_INK_ATTR as We}from"../../../render/lib/document/header-ink.js";import{useEasel as be}from"efficient-easel/easel";import{useCardContentSwitchPass as Ne}from"../../components/useCardContentSwitchPass.js";import{pageBackgroundVars as De}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as Fe}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as Le}from"../../../render/lib/document/editing-bridges.js";import Ue from"../../components/SectionTextPartBridge.js";import{PageContentsFromDocument as E}from"../../../render/components/PageContentsContext.js";const ze={SectionTextParts:Ue};import{PageWidthWrapper as ft,PublishedPageFrame as gt,pageWidthTokens as St}from"../../../render/lib/document/page-frame.js";const je="color-mix(in oklab, var(--bg) 40%, #ffffff)",Ve="12vh";function Oe({style:n,children:i}){const{appState:s}=be(g=>g),t=s.data.content,r=s.data.root;if(_e(t))return o("div",{className:"sf-themed-content",style:{...n,background:je,minHeight:"100vh",paddingBottom:Ve},children:o("div",{style:{background:"var(--bg)"},children:o(E,{content:t,children:i})})});const a=G(t)&&Be(r,t),d=G(t)?Re(r,t):null,m=d?{[Ie]:d}:null,c=Y(r?.widthChoice),u=c?{[q]:c}:null,l=a?null:He(t),f=l?{[We]:l}:null;return o("div",{className:`sf-themed-content${a?` ${we}`:""}`,style:n,...f,...m,...u,children:o("div",{style:{background:"var(--bg)",minHeight:"100%"},children:o(E,{content:t,children:i})})})}function pt({propsTheme:n,propsFonts:i,propsCornerStyle:s,propsCornerRadiusPx:t,propsHeadingCompression:r,propsHeadingTypography:a,pageBackground:d,chromeInheritsSiteBackground:m,suppressPreviewNav:c,footer:u,overlay:l,children:f}){return Ne(),o(Me,{propsTheme:n,propsFonts:i,propsCornerStyle:s,propsCornerRadiusPx:t,propsHeadingCompression:r,propsHeadingTypography:a,pageBackground:d,chromeInheritsSiteBackground:m,onClickCapture:c,body:g=>P(M,{children:[o(Oe,{style:g,children:f}),u,l]})})}function Me({propsTheme:n,propsFonts:i,propsCornerStyle:s,propsCornerRadiusPx:t,propsHeadingCompression:r,propsHeadingTypography:a,pageBackground:d,chromeInheritsSiteBackground:m,onClickCapture:c,body:u}){const{theme:l,fonts:f,sizes:g,cornerRadiusPx:A,cardShadow:S,shadowColor:v,cardGap:_,hoverEffect:y,headingCompression:B,siteWidth:R,siteGutter:I,siteGutterPhone:x,blockGap:w,blockGapPhone:T,siteLengthUnits:H,headingTypography:W,heroBackgroundFollowsWidth:b,photographyGrayscale:N,textStyles:D,wordStyles:F,themeFromDocument:e}=ie(),p=e?n:l,L=e?i:f,U=e?void 0:g,z=e?t===void 0?de[ce(s)]:le(t):A,h=e?{}:H,j=e?r:B,k=e?a:W,C=[X(K(e?void 0:D)),$(fe(k).italicStrong)].filter(Boolean).join(`
|
|
2
|
+
`),V=Fe(),O={...pe(p),...me(U),...ue(k),...V.style,...m?{}:De(d)};return P("div",{className:`sf-theme-surfaces sf-theme-accent ${[Z(e?void 0:x),oe(e?void 0:T)].filter(Boolean).join(" ")}`.trim(),style:{...Ae(L),...ve(e?null:F),...ge(p),...Se(p),...ye(p),...xe(p),...Te(z,h.cornerRadiusUnit),...ke(e?void 0:S,e?void 0:v,e?void 0:y),...J(e?void 0:R,h.siteWidthUnit),...Q(e?void 0:I,h.siteGutterUnit),...ee(e?void 0:x,h.siteGutterPhoneUnit),...re(e?void 0:w,h.blockGapUnit),...ne(e?void 0:T,h.blockGapPhoneUnit),...te(e?void 0:b)},"data-sf-headings":Ce(j),"data-sf-card-shadow":e?void 0:Pe(S),"data-sf-card-gap":e?void 0:Ge(_),"data-sf-card-hover":e?void 0:Ee(y),onClickCapture:c,children:[C?o("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:C}}):null,o(se,{grayscale:e?void 0:N,children:o(Le,{value:ze,children:o(ae,{ink:he(p),children:u(O)})})})]})}const ht=n=>{n.target?.closest?.("a")&&n.preventDefault()};export{ze as EDITING_BRIDGES,Oe as EditorPageBody,pt as EditorThemedBody,ft as PageWidthWrapper,gt as PublishedPageFrame,je as SECTION_PREVIEW_CANVAS,Ve as SECTION_PREVIEW_CANVAS_TAIL,Me as SiteThemeCarrier,St as pageWidthTokens,ht as suppressPreviewNav};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BOX_SHAPES: ("auto" | "
|
|
1
|
+
export declare const BOX_SHAPES: ("auto" | "square" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
|
|
2
2
|
export type BoxShape = (typeof BOX_SHAPES)[number];
|
|
3
3
|
export declare function boxShapeOf(value: unknown): BoxShape;
|
|
4
4
|
export declare function boxShapeClass(value: unknown): string;
|
|
@@ -8,7 +8,7 @@ export declare function cardTemplateSlot(): {
|
|
|
8
8
|
type: "slot";
|
|
9
9
|
allow: string[];
|
|
10
10
|
};
|
|
11
|
-
export declare const CARD_LIST_ITEM_BLOCKS: ("
|
|
11
|
+
export declare const CARD_LIST_ITEM_BLOCKS: ("Text" | "ImageBlock" | "Flex")[];
|
|
12
12
|
export declare function cardListItemSlot(): {
|
|
13
13
|
type: "slot";
|
|
14
14
|
allow: string[];
|
|
@@ -70,16 +70,16 @@ export declare function resolveSectionStick(props: SectionStickProps, opts?: {
|
|
|
70
70
|
}): {
|
|
71
71
|
desktop: boolean;
|
|
72
72
|
desktopDistance: number;
|
|
73
|
-
desktopUnit: "
|
|
73
|
+
desktopUnit: "px" | "%" | "vw";
|
|
74
74
|
desktopScreens: number;
|
|
75
75
|
tablet: boolean;
|
|
76
76
|
tabletDistance: number;
|
|
77
|
-
tabletUnit: "
|
|
77
|
+
tabletUnit: "px" | "%" | "vw";
|
|
78
78
|
tabletScreens: number;
|
|
79
79
|
ownTablet: boolean;
|
|
80
80
|
phone: boolean;
|
|
81
81
|
phoneDistance: number;
|
|
82
|
-
phoneUnit: "
|
|
82
|
+
phoneUnit: "px" | "%" | "vw";
|
|
83
83
|
phoneScreens: number;
|
|
84
84
|
ownPhone: boolean;
|
|
85
85
|
};
|