efficient-web-builder 25.1.0 → 26.0.1
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 +32 -0
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/useSocialSettings.js +1 -1
- package/dist/editor/components/useWebsiteMainAction.js +1 -1
- package/dist/editor/lib/editor-document-adapter.d.ts +2 -1
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/editor/lib/page-live-state.d.ts +4 -2
- package/dist/editor/lib/page-live-state.js +1 -1
- package/dist/editor/lib/site-live-state.d.ts +7 -0
- package/dist/editor/lib/site-live-state.js +1 -0
- package/dist/editor/lib/theme-row-persist.js +1 -1
- package/dist/editor/lib/web-backend.d.ts +16 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +1 -0
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/site-writes.d.ts +3 -0
- package/dist/format/lib/site-writes.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 26.0.1 - 2026-10-20
|
|
6
|
+
|
|
7
|
+
**No "Clear changes" in a text part's Style list** (Lewis 2026-10-19: "do not use Clear changes"). A PATCH: no export, prop or peer range changes.
|
|
8
|
+
|
|
9
|
+
### Changed for merchants
|
|
10
|
+
|
|
11
|
+
- The Style list of a text part's settings ends in Edit styles · Update style. "Clear changes" is gone. Update style still clears the part's own changes after it writes them to the style, as before.
|
|
12
|
+
|
|
13
|
+
## 26.0.0 - 2026-10-20
|
|
14
|
+
|
|
15
|
+
**One Publish puts the whole website live** (Lewis, 2026-10-19: like Wix; the site-wide Publish plan, PR 5). Where the backend offers it, every edit in the editor is a draft, and Publish puts the pages and every site-wide draft live together; the ▾ menu lists what the press will put live.
|
|
16
|
+
|
|
17
|
+
### Changed for merchants
|
|
18
|
+
|
|
19
|
+
- Where the backend publishes the whole website (efficient-backend 87.x, through the host's adapter), **Publish puts the whole website live**: every page waiting, Site styles, the header, the live chat, the social links and the menus, in one press. The status under Publish is the website's ("Changes not live yet" / "Everything is live"), and the ▾ menu lists each thing that will go live, a page taken down said so ("About (taken down)").
|
|
20
|
+
- An edit made just before the press goes live with it: the Site styles queue and the live chat (each waits 500 ms) send what they hold first.
|
|
21
|
+
- If one of those writes fails, nothing goes live: Publish shows the editor's save error, and the edit stays waiting, so the next Publish sends it first.
|
|
22
|
+
- Where the backend publishes per page, nothing changes.
|
|
23
|
+
|
|
24
|
+
### Changed for hosts (breaking)
|
|
25
|
+
|
|
26
|
+
- **BREAKING: `WebsiteSite.publish?(scope)` and `WebsiteSite.liveState?(scope)`** (lib/web-backend), offered together. A backend that offers them keeps EVERY site-wide write as a draft (the `theme`, `chat` and `social` rows' `update`, a new page and a page's settings) and the editor's main action calls `site.publish` instead of `pages.publish`; its status is `liveState` (`SiteLiveState`, `SiteChange`, `SitePublishAnswer`). A host must turn on drafts and these two members together (efficient-storefront-blocks' adapter does, in its next release). A backend without them is served exactly as before.
|
|
27
|
+
- **BREAKING: `efficient-easel` peer and dev range `^13.3.0`** (it was `^13.2.0`): the main action hands easel `ScreenMainAction.goingLive` (easel #299).
|
|
28
|
+
- `WebsiteDocumentAdapter.siteLiveState?` (lib/editor-document-adapter): the website's state, where Publish is the whole site's.
|
|
29
|
+
- New `lib/site-live-state` (the website's state, read when the editor opens and after each write, written by a Publish's answer) and `lib/site-writes` (the writes still waiting, sent before a Publish).
|
|
30
|
+
- The header and footer document is not published again on its own when the site's Publish puts it live with everything else.
|
|
31
|
+
|
|
32
|
+
### Guards
|
|
33
|
+
|
|
34
|
+
- `scripts/test-site-publish.tsx`: Publish is the site's (no page publish, every waiting write sent first); the website's state (read, written by a Publish, a late answer dropped); the bar's status and the list of what goes live; the Site styles queue going first; per-page Publish unchanged without the site's; a waiting write that fails stops the Publish, and its edit is sent by the next one.
|
|
35
|
+
- `scripts/test-two-ways-to-add.ts` §1: the easel peer and dev range are `^13.3.0`.
|
|
36
|
+
|
|
5
37
|
## 25.1.0 - 2026-10-20
|
|
6
38
|
|
|
7
39
|
**Chart, Integrations and Mockup no longer crash a published page; the rules over source read a host's imports** (keep editor code off shopper pages, storefront step 2b). A MINOR: two exports are added (below), none changes or goes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,Fragment as te,jsxs as h}from"react/jsx-runtime";import{useContext as Ye,useEffect as ne,useRef as qe,useState as ke}from"react";import{PartResetDot as Je}from"./PartResetDot.js";import{FieldSelect as Qe,InspectorField as Ze}from"efficient-easel/fields";import{SettingsField as et}from"efficient-easel/panel";import{InspectorUpLevel as K}from"efficient-easel/chrome";import{StylesIcon as tt,TypeIcon as nt}from"efficient-easel/icons";import{useEasel as ot}from"efficient-easel/easel";import{TextPartPanel as st}from"efficient-easel/copy";import{Tooltip as lt}from"efficient-shell/ui";import{PartTextBox as rt,partTextCells as it}from"./PartTextBox.js";import{UiIcon as Oe}from"efficient-easel/draw/client";import{usePreviewHeader as at}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as ct}from"./UpdateStyleDialog.js";import{StorefrontDocumentContext as dt}from"./StorefrontDocumentContext.js";import{hasStyleChange as ut,partStyleToTextStyleValues as ft,pushIntoStyle as pt,resolveTextStyles as mt,styleIdOfRole as Re}from"../lib/site-text-styles.js";import{useSiteTextStylesWriter as ht}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as yt}from"../lib/theme-row-persist.js";import{usePreviewDevice as gt}from"efficient-easel/draw/client";import{usePartStyle as St}from"./PreviewPartStyleContext.js";import{say as s}from"../../format/lib/editor-words.js";import{readHidable as U,textFieldOffPage as bt,textFieldPanelOnly as xt}from"../lib/puck/controls.js";import{TEXT_FIELD_MARKER as Pt}from"efficient-easel/draw";import{useSectionOps as wt}from"../lib/puck/use-section-ops.js";import{FONT_OPTIONS as Tt,FONT_ROLES as oe,FONT_ROLE_LABELS as se,fontOption as le}from"../../format/lib/fonts.js";import{isMultilineKind as vt,partPlaceholder as Nt,typeInPlaceKind as Ct}from"../../render/lib/puck/part-text.js";import{partRowField as kt}from"../lib/puck/part-row-field.js";import{decodePartKey as Ot,partPropsWithRowValue as Rt,partRowValue as It}from"../../render/lib/puck/part-rows.js";import{PART_WIDTH_MAX as Et,propsWithPartStyleValue as B,propsWithoutPartStyle as Ft,readPartStyle as Ie}from"../../render/lib/puck/part-styles.js";import{partThemeColors as _t}from"../../format/lib/puck/part-inks.js";import{styleKeyForPart as zt}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as At}from"../lib/puck/part-typing.js";import{keysOnCanvas as Vt,useCanvasTypingPart as Lt}from"../lib/puck/canvas-typing.js";import{useEditorHost as Kt}from"../lib/editor-host.js";import{SOURCE_LINES as Ut,SOURCE_ACTIONS as Bt,SOURCE_ACTION_LABEL as Dt,partSourceNoteFor as Wt,partSourceOf as Mt,sourceMenuIdOf as jt,sourceSlugOf as Ee}from"../../format/lib/puck/source-bound-parts.js";import{encodePartId as Gt,holdsAuthoredText as Ht}from"../../render/lib/puck/text-parts.js";import{regionsForSection as $t}from"../../format/lib/sections/section-text-regions.js";import{textRegionOfPartKey as Xt}from"../../format/lib/sections/text-regions.js";function re(n){return n?s(n):null}function Fe(n){return n.kind==="role"?se[n.role]:n.kind==="custom"?"Custom":null}function Yt(n){const o=n.role;return o&&oe.includes(o)?{kind:"role",role:o}:null}function qt(n,o){if(!n)return{kind:"unread"};const{faceRole:l,base:a}=n;if(o[l]===a.fontKey)return{kind:"role",role:l};const i=Object.keys(o).filter(r=>o[r]===a.fontKey);return i.length===1?{kind:"role",role:i[0]}:{kind:"custom"}}function ie(n,o,l,a){return Yt(Ie(n,o))??qt(l,a)}function Jt(n,o){if(!n.length)return null;const l=o(n[0]);return n.every(a=>o(a)===l)?l:null}const D="";function Qt({face:n,base:o,onPick:l}){const a=n.kind==="role"?n.role:D,i=[{label:s("No style"),value:D},...oe.map(r=>({label:s(se[r]),value:r}))];return t(Qe,{ariaLabel:s("Style"),value:a,options:i,inline:!0,onChange:r=>l(r===D?null:r),renderOption:r=>r.value===D?h(te,{children:[t("span",{className:"es-fsel-label sf-part-style-keep",children:r.label}),t("span",{className:"sf-part-style-aside","aria-hidden":"true",children:s("Section’s own")})]}):t("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${r.value})`},children:r.label}),renderValue:()=>t("span",{style:{fontFamily:o?.fontKey?`var(${le(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:re(Fe(n))}),valueText:r=>re(Fe(n))??r?.label??""})}function Zt({sectionName:n,onBack:o,textEditor:l,styleRow:a,children:i}){return h("div",{className:"sf-part-panel",children:[t(K,{inline:!0,name:s(n),onSelect:o}),l,a,i]})}function _e({source:n,slug:o,menuId:l}){const a=Kt(),i=Bt[n],r=!i.needsSlug||!!o;return t("div",{className:"sf-note sf-note--source",children:h("p",{className:"es-field-hint sf-hint-keep",children:[s(Ut[n]),r?h(te,{children:[" ",t("button",{type:"button",className:"sf-source-open",onClick:()=>{i.type==="storefront-editor:open-menus"?a.send(i.type,{menuId:l??null}):o&&a.send(i.type,{slug:o})},children:s(Dt)})]}):null]})})}const ze=4,en=120;function tn({region:n,sizePx:o,face:l,base:a,onFollowStyle:i,source:r,slug:W,onBack:P}){const E=n.follows;return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:s(n.label)})}),t("p",{children:o?s("Its size follows Site styles ▸ {follows} — {px}px right now.",{follows:s(E),px:Math.round(o)}):s("Its size follows Site styles ▸ {follows}.",{follows:s(E)})}),i?t(te,{children:t(et,{label:s("Style"),icon:t(tt,{}),hint:s("Every {part} in this section follows it. The face and the size change; the letter case is the section’s own and stays as it is.",{part:s(n.label).toLowerCase()}),children:t(Qt,{face:l,base:a,onPick:i})})}):t("p",{className:"es-field-hint sf-hint-keep",children:s("Only the size follows a site style. This section sets its own font, weight and letter case.")}),r?t(_e,{source:r,slug:W}):null,t(K,{inline:!0,name:s("Page"),onSelect:P})]})}function nn({onBack:n}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:s("This part is no longer here.")})}),t("p",{children:s("The section it belonged to has been changed or removed.")}),t(K,{inline:!0,name:s("Page"),onSelect:n})]})}function on({onBack:n,partId:o,why:l}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:s("This part's settings did not open.")})}),t("p",{children:s("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),t("p",{className:"sf-note-detail",children:h("code",{children:[o," — ",l]})}),t(K,{inline:!0,name:s("Page"),onSelect:n})]})}function sn({nodeId:n,propKey:o,onBack:l,onEditStyle:a}){const{getItemById:i,getSelectorForId:r,config:W}=ot(e=>e),P=wt(),E=Lt(),{partStyle:F}=St(),{fonts:_,textStyles:Ae}=at(),M=Ye(dt),ae=!M?.capabilities?.hasSiteTheme,{persist:Ve}=yt({themeFromDocument:ae,tokenRef:M?.tokenRef,siteId:M?.siteId??null}),O=ht({themeFromDocument:ae,persist:Ve}),[Le,j]=ke(!1),Ke=gt()==="mobile",ce=qe(null),d=i(n),m=r(n),de=d?W.components[d.type]:void 0,{key:g,row:S}=Ot(o),ue=de?.fields?.[g],y=S?kt(ue,S):ue,w=Gt(n,o),p=d?.props??{},b=Ct(y),fe=bt(y),pe=Ht(y),Ue=d?Mt(d.type):null,me=d?Wt(d.type,g):null,G=S?It(p[g],S):p[g],he=!!S&&!(Array.isArray(p[g])&&S.index<p[g].length);ne(()=>{if(Vt(document))return;ce.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[w]);const[H,ye]=ke(0);ne(()=>ye(0),[w]);const $=!!d&&!he&&(!m||!y);ne(()=>{if(!$||H>=ze)return;const e=setTimeout(()=>ye(c=>c+1),en);return()=>clearTimeout(e)},[$,H]);const Be=$&&H<ze;if(!d||he)return t(nn,{onBack:l});const z=$t(d.type),ge=z?Xt(z,o):null;if(z&&ge){const e=F?.partId===w?F:null,c=z[ge],f=c.writable===!0&&!!m,I=ee=>{m&&P.replaceComponent(m.zone,m.index,{...d,props:B(p,o,"role",ee)})};return t(tn,{region:c,sizePx:e?.base.sizePx??null,face:ie(p,o,e,_),base:e?.base??null,onFollowStyle:f?I:void 0,source:Ue,slug:Ee(p),onBack:l})}if(!m||!y)return Be?t("div",{className:"sf-note","aria-busy":"true"}):t(on,{onBack:l,partId:w,why:m?"no field":"no selector"});const Se=e=>{P.replaceComponent(m.zone,m.index,{...d,props:e})},X=e=>{if(U(e).hidden!==U(G).hidden||!b){const f=S?Rt(p,g,S,e):{...p,[g]:e};f&&Se(f);return}At({node:d,propKey:o,kind:b,zone:m.zone,index:m.index},U(e).text,P.replaceComponent)},De=G,T=F?.partId===w?F:null,v=T?.styleOwner,A=v?i(v.owner):null,Y=v&&A?r(v.owner):null,q=!!(v&&A&&Y),N=q?A.props??{}:p,J=q?e=>P.replaceComponent(Y.zone,Y.index,{...A,props:e}):Se,V=q?v.kind:zt(d?.type,o),C=Ie(N,V),u=[{partKey:V,face:ie(N,V,T,_),sizeGroup:T?.sizeGroup??null,base:T?.base??rn,style:C}],We=Jt(u,e=>e.sizeGroup),Me=_t(T?.inks),R=(e,c)=>{let f=N;for(const I of u)f=B(f,I.partKey,e,c);J(f)},je=e=>R("role",e),be=e=>{let c=N;for(const f of u)for(const[I,ee]of Object.entries(e))c=B(c,f.partKey,I,ee??null);J(c)},Q=b==="text"||b==="textarea",{text:xe,hidden:k}=U(G),L=y?.[Pt]?.label??o,Pe=k?s("Show {label} on the slide",{label:s(L)}):s("Hide {label} on the slide",{label:s(L)}),we=h("div",{className:"sf-field-head",children:[t(nt,{}),t("span",{className:"sf-field-label sf-field-label--inline",children:s(L)}),Q&&t(lt,{content:Pe,children:t("button",{type:"button",className:"sf-field-eye","aria-pressed":k,"aria-label":Pe,onClick:()=>X({text:xe,hidden:!k}),children:k?t(Oe,{name:"eye-off",size:14}):t(Oe,{name:"eye",size:14})})})]}),Te=!fe&&pe,Ge=!!b&&(xt(y)||fe||k||!pe),ve=ie(N,V,T,_),Z=ve.kind==="role"?ve.role:null,Ne=Object.entries(C).filter(([e,c])=>e!=="role"&&c!==void 0).length,Ce=()=>{let e=N;for(const c of u){const f=c.style.role;e=Ft(e,c.partKey),f&&(e=B(e,c.partKey,"role",f))}J(e)},x=Re(Z),He=ut(u[0].style),$e=x?mt(O.saved,O.old).find(e=>e.id===x)?.name??x:"",Xe=()=>{j(!1),x&&(O.write(pt({saved:O.saved,old:O.old,styleId:x,values:ft(u[0].style)}),!0),Ce())};return h(Zt,{sectionName:de?.label??d.type,onBack:l,textEditor:t("div",{ref:ce,className:"sf-part-text",children:Ge?t(rt,{text:xe,onTextChange:e=>X(Q?{text:e,hidden:k}:e),multiline:vt(b),markup:b!=="plainText",styled:!1,style:u[0].style,base:u[0].base,setValue:be,colors:Me,placeholder:re(Nt(y))??void 0,ariaLabel:s(L),head:we,typedOnCanvas:E===w}):b?Q?we:null:t(Ze,{field:y,name:o,value:De,onChange:X,id:`sf-part-${n}-${o}`})}),children:[me&&t(_e,{source:me,slug:Ee(p),menuId:jt(p)}),Te&&t(st,{style:{value:Z??"",options:[{value:"",label:s("No style"),description:s("Section’s own")},...oe.map(e=>({value:e,label:s(se[e]),description:le(_[e])?.label}))],onChange:e=>je(e||null),changed:Ne>0,onClearChanges:Ne>0?Ce:void 0,onEditStyles:a,onUpdateStyle:x&&He?()=>j(!0):void 0},font:{value:C.font??"",styleValue:le(u[0].base.fontKey)?.label,options:Tt.map(e=>({label:e.label,value:e.key})),onChange:e=>R("font",e||null)},italic:{value:C.italic,styleValue:ln(Ae,Z),onChange:e=>R("italic",e??null)},cells:it(u[0].style,u[0].base,be,{phone:Ke}),align:{value:C.align??"",styleValue:u[0].base.align,onChange:e=>R("align",e||null)},letterCase:{value:C.case??"",styleValue:u[0].base.case,onChange:e=>R("case",e||null)}}),Le&&x&&t(ct,{styleName:$e,onCancel:()=>j(!1),onConfirm:Xe}),Te&&We===null&&t("p",{className:"es-field-hint sf-hint-keep",children:s("Fixed size — the site’s Text setting doesn’t resize this.")})]})}function ln(n,o){const l=Re(o);return!l||!Array.isArray(n)?!1:n.find(i=>i?.id===l)?.values?.italic===!0}const rn={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:Et};export{Zt as PartPanelBody,Je as PartResetDot,_e as PartSourceNote,Qt as PartStyleSelect,sn as default,ie as partFace};
|
|
1
|
+
"use client";import{jsx as t,Fragment as te,jsxs as h}from"react/jsx-runtime";import{useContext as Ye,useEffect as ne,useRef as qe,useState as Ne}from"react";import{PartResetDot as Je}from"./PartResetDot.js";import{FieldSelect as Qe,InspectorField as Ze}from"efficient-easel/fields";import{SettingsField as et}from"efficient-easel/panel";import{InspectorUpLevel as K}from"efficient-easel/chrome";import{StylesIcon as tt,TypeIcon as nt}from"efficient-easel/icons";import{useEasel as ot}from"efficient-easel/easel";import{TextPartPanel as st}from"efficient-easel/copy";import{Tooltip as lt}from"efficient-shell/ui";import{PartTextBox as rt,partTextCells as it}from"./PartTextBox.js";import{UiIcon as ke}from"efficient-easel/draw/client";import{usePreviewHeader as at}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as ct}from"./UpdateStyleDialog.js";import{StorefrontDocumentContext as dt}from"./StorefrontDocumentContext.js";import{hasStyleChange as ut,partStyleToTextStyleValues as ft,pushIntoStyle as pt,resolveTextStyles as mt,styleIdOfRole as Ce}from"../lib/site-text-styles.js";import{useSiteTextStylesWriter as ht}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as yt}from"../lib/theme-row-persist.js";import{usePreviewDevice as gt}from"efficient-easel/draw/client";import{usePartStyle as St}from"./PreviewPartStyleContext.js";import{say as s}from"../../format/lib/editor-words.js";import{readHidable as U,textFieldOffPage as bt,textFieldPanelOnly as xt}from"../lib/puck/controls.js";import{TEXT_FIELD_MARKER as Pt}from"efficient-easel/draw";import{useSectionOps as wt}from"../lib/puck/use-section-ops.js";import{FONT_OPTIONS as Tt,FONT_ROLES as oe,FONT_ROLE_LABELS as se,fontOption as le}from"../../format/lib/fonts.js";import{isMultilineKind as vt,partPlaceholder as Nt,typeInPlaceKind as kt}from"../../render/lib/puck/part-text.js";import{partRowField as Ct}from"../lib/puck/part-row-field.js";import{decodePartKey as Ot,partPropsWithRowValue as Rt,partRowValue as It}from"../../render/lib/puck/part-rows.js";import{PART_WIDTH_MAX as Et,propsWithPartStyleValue as B,propsWithoutPartStyle as Ft,readPartStyle as Oe}from"../../render/lib/puck/part-styles.js";import{partThemeColors as _t}from"../../format/lib/puck/part-inks.js";import{styleKeyForPart as zt}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as At}from"../lib/puck/part-typing.js";import{keysOnCanvas as Vt,useCanvasTypingPart as Lt}from"../lib/puck/canvas-typing.js";import{useEditorHost as Kt}from"../lib/editor-host.js";import{SOURCE_LINES as Ut,SOURCE_ACTIONS as Bt,SOURCE_ACTION_LABEL as Dt,partSourceNoteFor as Wt,partSourceOf as Mt,sourceMenuIdOf as jt,sourceSlugOf as Re}from"../../format/lib/puck/source-bound-parts.js";import{encodePartId as Gt,holdsAuthoredText as Ht}from"../../render/lib/puck/text-parts.js";import{regionsForSection as $t}from"../../format/lib/sections/section-text-regions.js";import{textRegionOfPartKey as Xt}from"../../format/lib/sections/text-regions.js";function re(n){return n?s(n):null}function Ie(n){return n.kind==="role"?se[n.role]:n.kind==="custom"?"Custom":null}function Yt(n){const o=n.role;return o&&oe.includes(o)?{kind:"role",role:o}:null}function qt(n,o){if(!n)return{kind:"unread"};const{faceRole:l,base:a}=n;if(o[l]===a.fontKey)return{kind:"role",role:l};const i=Object.keys(o).filter(r=>o[r]===a.fontKey);return i.length===1?{kind:"role",role:i[0]}:{kind:"custom"}}function ie(n,o,l,a){return Yt(Oe(n,o))??qt(l,a)}function Jt(n,o){if(!n.length)return null;const l=o(n[0]);return n.every(a=>o(a)===l)?l:null}const D="";function Qt({face:n,base:o,onPick:l}){const a=n.kind==="role"?n.role:D,i=[{label:s("No style"),value:D},...oe.map(r=>({label:s(se[r]),value:r}))];return t(Qe,{ariaLabel:s("Style"),value:a,options:i,inline:!0,onChange:r=>l(r===D?null:r),renderOption:r=>r.value===D?h(te,{children:[t("span",{className:"es-fsel-label sf-part-style-keep",children:r.label}),t("span",{className:"sf-part-style-aside","aria-hidden":"true",children:s("Section’s own")})]}):t("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${r.value})`},children:r.label}),renderValue:()=>t("span",{style:{fontFamily:o?.fontKey?`var(${le(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:re(Ie(n))}),valueText:r=>re(Ie(n))??r?.label??""})}function Zt({sectionName:n,onBack:o,textEditor:l,styleRow:a,children:i}){return h("div",{className:"sf-part-panel",children:[t(K,{inline:!0,name:s(n),onSelect:o}),l,a,i]})}function Ee({source:n,slug:o,menuId:l}){const a=Kt(),i=Bt[n],r=!i.needsSlug||!!o;return t("div",{className:"sf-note sf-note--source",children:h("p",{className:"es-field-hint sf-hint-keep",children:[s(Ut[n]),r?h(te,{children:[" ",t("button",{type:"button",className:"sf-source-open",onClick:()=>{i.type==="storefront-editor:open-menus"?a.send(i.type,{menuId:l??null}):o&&a.send(i.type,{slug:o})},children:s(Dt)})]}):null]})})}const Fe=4,en=120;function tn({region:n,sizePx:o,face:l,base:a,onFollowStyle:i,source:r,slug:W,onBack:P}){const E=n.follows;return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:s(n.label)})}),t("p",{children:o?s("Its size follows Site styles ▸ {follows} — {px}px right now.",{follows:s(E),px:Math.round(o)}):s("Its size follows Site styles ▸ {follows}.",{follows:s(E)})}),i?t(te,{children:t(et,{label:s("Style"),icon:t(tt,{}),hint:s("Every {part} in this section follows it. The face and the size change; the letter case is the section’s own and stays as it is.",{part:s(n.label).toLowerCase()}),children:t(Qt,{face:l,base:a,onPick:i})})}):t("p",{className:"es-field-hint sf-hint-keep",children:s("Only the size follows a site style. This section sets its own font, weight and letter case.")}),r?t(Ee,{source:r,slug:W}):null,t(K,{inline:!0,name:s("Page"),onSelect:P})]})}function nn({onBack:n}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:s("This part is no longer here.")})}),t("p",{children:s("The section it belonged to has been changed or removed.")}),t(K,{inline:!0,name:s("Page"),onSelect:n})]})}function on({onBack:n,partId:o,why:l}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:s("This part's settings did not open.")})}),t("p",{children:s("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),t("p",{className:"sf-note-detail",children:h("code",{children:[o," — ",l]})}),t(K,{inline:!0,name:s("Page"),onSelect:n})]})}function sn({nodeId:n,propKey:o,onBack:l,onEditStyle:a}){const{getItemById:i,getSelectorForId:r,config:W}=ot(e=>e),P=wt(),E=Lt(),{partStyle:F}=St(),{fonts:_,textStyles:_e}=at(),M=Ye(dt),ae=!M?.capabilities?.hasSiteTheme,{persist:ze}=yt({themeFromDocument:ae,tokenRef:M?.tokenRef,siteId:M?.siteId??null}),O=ht({themeFromDocument:ae,persist:ze}),[Ae,j]=Ne(!1),Ve=gt()==="mobile",ce=qe(null),d=i(n),m=r(n),de=d?W.components[d.type]:void 0,{key:g,row:S}=Ot(o),ue=de?.fields?.[g],y=S?Ct(ue,S):ue,w=Gt(n,o),p=d?.props??{},b=kt(y),fe=bt(y),pe=Ht(y),Le=d?Mt(d.type):null,me=d?Wt(d.type,g):null,G=S?It(p[g],S):p[g],he=!!S&&!(Array.isArray(p[g])&&S.index<p[g].length);ne(()=>{if(Vt(document))return;ce.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[w]);const[H,ye]=Ne(0);ne(()=>ye(0),[w]);const $=!!d&&!he&&(!m||!y);ne(()=>{if(!$||H>=Fe)return;const e=setTimeout(()=>ye(c=>c+1),en);return()=>clearTimeout(e)},[$,H]);const Ke=$&&H<Fe;if(!d||he)return t(nn,{onBack:l});const z=$t(d.type),ge=z?Xt(z,o):null;if(z&&ge){const e=F?.partId===w?F:null,c=z[ge],f=c.writable===!0&&!!m,I=ee=>{m&&P.replaceComponent(m.zone,m.index,{...d,props:B(p,o,"role",ee)})};return t(tn,{region:c,sizePx:e?.base.sizePx??null,face:ie(p,o,e,_),base:e?.base??null,onFollowStyle:f?I:void 0,source:Le,slug:Re(p),onBack:l})}if(!m||!y)return Ke?t("div",{className:"sf-note","aria-busy":"true"}):t(on,{onBack:l,partId:w,why:m?"no field":"no selector"});const Se=e=>{P.replaceComponent(m.zone,m.index,{...d,props:e})},X=e=>{if(U(e).hidden!==U(G).hidden||!b){const f=S?Rt(p,g,S,e):{...p,[g]:e};f&&Se(f);return}At({node:d,propKey:o,kind:b,zone:m.zone,index:m.index},U(e).text,P.replaceComponent)},Ue=G,T=F?.partId===w?F:null,v=T?.styleOwner,A=v?i(v.owner):null,Y=v&&A?r(v.owner):null,q=!!(v&&A&&Y),N=q?A.props??{}:p,J=q?e=>P.replaceComponent(Y.zone,Y.index,{...A,props:e}):Se,V=q?v.kind:zt(d?.type,o),k=Oe(N,V),u=[{partKey:V,face:ie(N,V,T,_),sizeGroup:T?.sizeGroup??null,base:T?.base??rn,style:k}],Be=Jt(u,e=>e.sizeGroup),De=_t(T?.inks),R=(e,c)=>{let f=N;for(const I of u)f=B(f,I.partKey,e,c);J(f)},We=e=>R("role",e),be=e=>{let c=N;for(const f of u)for(const[I,ee]of Object.entries(e))c=B(c,f.partKey,I,ee??null);J(c)},Q=b==="text"||b==="textarea",{text:xe,hidden:C}=U(G),L=y?.[Pt]?.label??o,Pe=C?s("Show {label} on the slide",{label:s(L)}):s("Hide {label} on the slide",{label:s(L)}),we=h("div",{className:"sf-field-head",children:[t(nt,{}),t("span",{className:"sf-field-label sf-field-label--inline",children:s(L)}),Q&&t(lt,{content:Pe,children:t("button",{type:"button",className:"sf-field-eye","aria-pressed":C,"aria-label":Pe,onClick:()=>X({text:xe,hidden:!C}),children:C?t(ke,{name:"eye-off",size:14}):t(ke,{name:"eye",size:14})})})]}),Te=!fe&&pe,Me=!!b&&(xt(y)||fe||C||!pe),ve=ie(N,V,T,_),Z=ve.kind==="role"?ve.role:null,je=Object.entries(k).filter(([e,c])=>e!=="role"&&c!==void 0).length,Ge=()=>{let e=N;for(const c of u){const f=c.style.role;e=Ft(e,c.partKey),f&&(e=B(e,c.partKey,"role",f))}J(e)},x=Ce(Z),He=ut(u[0].style),$e=x?mt(O.saved,O.old).find(e=>e.id===x)?.name??x:"",Xe=()=>{j(!1),x&&(O.write(pt({saved:O.saved,old:O.old,styleId:x,values:ft(u[0].style)}),!0),Ge())};return h(Zt,{sectionName:de?.label??d.type,onBack:l,textEditor:t("div",{ref:ce,className:"sf-part-text",children:Me?t(rt,{text:xe,onTextChange:e=>X(Q?{text:e,hidden:C}:e),multiline:vt(b),markup:b!=="plainText",styled:!1,style:u[0].style,base:u[0].base,setValue:be,colors:De,placeholder:re(Nt(y))??void 0,ariaLabel:s(L),head:we,typedOnCanvas:E===w}):b?Q?we:null:t(Ze,{field:y,name:o,value:Ue,onChange:X,id:`sf-part-${n}-${o}`})}),children:[me&&t(Ee,{source:me,slug:Re(p),menuId:jt(p)}),Te&&t(st,{style:{value:Z??"",options:[{value:"",label:s("No style"),description:s("Section’s own")},...oe.map(e=>({value:e,label:s(se[e]),description:le(_[e])?.label}))],onChange:e=>We(e||null),changed:je>0,onEditStyles:a,onUpdateStyle:x&&He?()=>j(!0):void 0},font:{value:k.font??"",styleValue:le(u[0].base.fontKey)?.label,options:Tt.map(e=>({label:e.label,value:e.key})),onChange:e=>R("font",e||null)},italic:{value:k.italic,styleValue:ln(_e,Z),onChange:e=>R("italic",e??null)},cells:it(u[0].style,u[0].base,be,{phone:Ve}),align:{value:k.align??"",styleValue:u[0].base.align,onChange:e=>R("align",e||null)},letterCase:{value:k.case??"",styleValue:u[0].base.case,onChange:e=>R("case",e||null)}}),Ae&&x&&t(ct,{styleName:$e,onCancel:()=>j(!1),onConfirm:Xe}),Te&&Be===null&&t("p",{className:"es-field-hint sf-hint-keep",children:s("Fixed size — the site’s Text setting doesn’t resize this.")})]})}function ln(n,o){const l=Ce(o);return!l||!Array.isArray(n)?!1:n.find(i=>i?.id===l)?.values?.italic===!0}const rn={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:Et};export{Zt as PartPanelBody,Je as PartResetDot,Ee as PartSourceNote,Qt as PartStyleSelect,sn as default,ie as partFace};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as s,jsxs as dt}from"react/jsx-runtime";import{useCallback as n,useEffect as m,useMemo as R,useRef as S,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 ut}from"../lib/puck/build-config.js";import{ChromeWrap as ht}from"../lib/editor-chrome.js";import{sessionRegistry as lt}from"../../render/lib/editor-session.js";import{refreshSiteLiveState as mt}from"../lib/site-live-state.js";import{holdSiteWrites as pt}from"../../format/lib/site-writes.js";import{backendOf as G,blocksOf as St}from"../lib/website-session.js";import{useEditorSession as ft}from"../lib/editor-session-context.js";import{withSiteBlockGapFields as wt}from"../../format/lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as gt}from"../../format/lib/puck/templateFields.js";import{setEditorPage as ue}from"../../format/lib/puck/editor-page-context.js";import{resolveSiteName as Ct}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as Tt,normalizeSiteWidth as yt}from"../../format/lib/content/page-width.js";import{normalizeSiteBlockGap as _t}from"../../format/lib/content/container-gap.js";import Et,{DocumentScreen as Pt}from"./EditorScreenMount.js";import{useStorefrontDocument as vt}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as Ht}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as It}from"./PreviewFooterContext.js";import{PreviewChatProvider as Mt,DEFAULT_CHAT_PREVIEW as Rt}from"./PreviewChatContext.js";import{PreviewSocialProvider as Gt}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as Ft}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Wt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as kt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as At}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as Dt}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as xt}from"efficient-easel/draw/client";import{PreviewLocationPartProvider as Bt}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as Nt}from"./PreviewPartStyleContext.js";import{SiteMapsProvider as Ot,readSiteMapsKey as bt,writeSiteMapsKey as he,readSiteMapId as zt,writeSiteMapId as Kt}from"../../render/lib/maps-config.js";import{CORNER_STYLE_TO_PX as Lt,DEFAULT_HEADING_COMPRESSION as Yt,DEFAULT_HEADING_TYPOGRAPHY as Ut,DEFAULT_SWITCH_SHOWN as F,DEFAULT_SIZES as jt,DEFAULT_THEME_MODE as y,normalizeCornerRadius as Vt,normalizeCornerStyle as Xt,normalizeCardShadow as Zt,normalizeCardGap as qt,normalizeHoverEffect as Jt,normalizeShadowColor as Qt,IDENTITY_CARD_GAP as le,IDENTITY_CARD_SHADOW as $t,IDENTITY_HOVER_EFFECT as er,THEME_MODE_KEY as me,THEME_STORAGE_KEY as tr,THEME_SWITCH_HIDE as pe,THEME_SWITCH_KEY as W}from"../../format/lib/theme.js";import{DEFAULT_FONTS as rr}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as or}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as nr}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as ar}from"../lib/site-text-styles.js";import{wordStylesFromRow as ir}from"../../format/lib/word-styles.js";import{chatPreviewFrom as cr}from"./PreviewChatContext.js";const sr=()=>{if(typeof window>"u")return y;try{const i=window.localStorage.getItem(me);return i==="light"||i==="dark"||i==="auto"?i:y}catch{return y}},Se=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(me,i)}catch{}},dr=()=>{if(typeof window>"u")return F;try{return window.localStorage.getItem(W)!==pe}catch{return F}},ur=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(tr)}catch{}},fe=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(W):window.localStorage.setItem(W,pe)}catch{}};function hr(){const{adapter:i,capabilities:d,templateId:k,ready:g,token:l,siteId:c,currentSlug:A,currentKind:D}=vt();m(()=>(ue(A,D),()=>ue(null,null)),[A,D]);const _=d.placeholderFrames,[we,x]=r(null),[ge,B]=r("");m(()=>{const e=i.templateName;if(!g||!k||!e){B("");return}let o=!1;return e().then(u=>!o&&B(u??"")).catch(()=>{}),()=>{o=!0}},[g,l,k,i]);const[Ce,E]=r(y),[Te,P]=r(F),[ye,N]=r({selected:0,themes:[]}),[_e,O]=r(rr),[Ee,b]=r(jt),[Pe,z]=r(null),[ve,K]=r(Yt),[He,L]=r(null),[Ie,Y]=r(null),[Me,U]=r(le),[Re,j]=r(null),[Ge,V]=r(null),[Fe,X]=r(null),[v,Z]=r(null),h=ft(),q=R(()=>ut(lt(h),St(h)),[h]),We=R(()=>wt(gt(q,_),v),[q,_,v]),[ke,J]=r(Ut),[Ae,Q]=r(null),[De,$]=r(null),[xe,ee]=r(null),te=S(null),a=S(!1);m(()=>{E(sr()),P(dr())},[]);const Be=n(e=>{a.current=!0,ur(),Se(e),E(e)},[]),Ne=n(e=>{a.current=!0,fe(e),P(e)},[]),Oe=n(e=>{a.current=!0,N(e)},[]),be=n(e=>{a.current=!0,O(e)},[]),ze=n(e=>{a.current=!0,b(e)},[]),Ke=n(e=>{a.current=!0,z(e)},[]),Le=n(e=>{a.current=!0,K(e)},[]),Ye=n(e=>{a.current=!0,L(e)},[]),Ue=n(e=>{a.current=!0,Y(e)},[]),je=n(e=>{a.current=!0,U(e)},[]),Ve=n(e=>{a.current=!0,j(e)},[]),Xe=n(e=>{a.current=!0,J(e)},[]),[Ze,re]=r(null),[qe,Je]=r(null),Qe=n(e=>{a.current=!0,re(e)},[]),$e=n(e=>{a.current=!0,V(e)},[]),et=n(e=>{a.current=!0,X(e)},[]),tt=n(e=>{a.current=!0,Z(e)},[]),rt=n(e=>{a.current=!0,Q(e)},[]),ot=n(e=>{a.current=!0,$(e)},[]),nt=n(e=>{a.current=!0,ee(e)},[]);m(()=>{const e=G(h).theme;if(!l||!d.hasSiteTheme||!e)return;const o=c??"";te.current!==o&&(te.current=o,a.current=!1);let u=!1;return e.get(c?{siteId:c}:void 0).then(t=>{if(u||a.current)return;Se(t.default_mode),fe(t.show_theme_switch),E(t.default_mode),P(t.show_theme_switch),N({selected:t.selected_preset,themes:t.theme_presets});const p=ar(t);O(p.fonts),b(p.sizes),z(t.corner_radius_px===void 0?Lt[Xt(t.corner_style)]:Vt(t.corner_radius_px)),K(p.compression),L(t.card_shadow==null?$t:Zt(t.card_shadow)),U(t.card_gap==null?le:qt(t.card_gap)),j(t.hover_effect==null?er:Jt(t.hover_effect)),Y(Qt(t.shadow_color)),V(yt(t.site_width)),X(Tt(t.site_gutter)),Z(_t(t.block_gap)),J(p.typography),re(p.textStyles),Je(ir(t)),Q(t.hero_background_follows_width===!0),$(t.photography_grayscale===!0),ee(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{u=!0}},[l,c,d.hasSiteTheme,h]);const at=Ft({token:l,siteId:c,enabled:d.hasSiteSettings}),[it,oe]=r(Rt),ne=S(null),H=S(!1),f=S(null),w=S({}),C=n(async()=>{f.current&&clearTimeout(f.current),f.current=null;const e=w.current;w.current={};try{await G(h).chat?.update(e,c?{siteId:c}:void 0),mt()}catch(o){throw w.current={...e,...w.current},o}},[h,c]);m(()=>pt(()=>f.current||Object.keys(w.current).length>0?C():void 0),[C]);const ct=n(e=>{H.current=!0,oe(o=>({...o,...e})),!(!d.hasSiteSettings||!l)&&(w.current={...w.current,...e},f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{C().catch(()=>{})},500))},[d.hasSiteSettings,l,C]);m(()=>{if(!l||!d.hasSiteSettings)return;const e=c??"";ne.current!==e&&(ne.current=e,H.current=!1);let o=!1;const u=G(h).chat;if(u)return u.get(c?{siteId:c}:void 0).then(t=>{o||H.current||oe(cr(t))}).catch(()=>{}),()=>{o=!0}},[l,c,d.hasSiteSettings,h]);const[T,I]=r(""),ae=S(null),M=S(!1);m(()=>I(bt()),[]);const ie=n(e=>{const o=e.trim();if(o===T)return;M.current=!0,he(o),I(o);const u=i.updateSite;!d.canEditSiteRecord||!g||!u||u({mapsApiKey:o}).catch(()=>{})},[T,d.canEditSiteRecord,g,i]),[ce,se]=r("");m(()=>se(zt()),[]),m(()=>{const e=i.site;if(!g||!d.hasSiteRecord||!e){x(null);return}const o=c??"";ae.current!==o&&(ae.current=o,M.current=!1);let u=!1;return e().then(t=>{if(u||(x(Ct(t.name)),M.current))return;const p=t.mapsApiKey??"";he(p),I(p);const de=t.mapsMapId??"";Kt(de),se(de)}).catch(()=>{}),()=>{u=!0}},[g,l,d.hasSiteRecord,c,i]);const st=R(()=>({apiKey:T,setApiKey:ie,mapId:ce}),[T,ie,ce]);return s(Pt,{config:We,parts:or,wrap:(e,o)=>s(Ht,{websiteName:we,templateChrome:_,templateName:ge||null,themeMode:Ce,onThemeModeChange:Be,themeSwitchShown:Te,onThemeSwitchShownChange:Ne,theme:ye,onThemeChange:Oe,fonts:_e,onFontsChange:be,cornerRadiusPx:Pe,onCornerRadiusPxChange:Ke,cardShadow:He,onCardShadowChange:Ye,shadowColor:Ie,onShadowColorChange:Ue,cardGap:Me,onCardGapChange:je,hoverEffect:Re,onHoverEffectChange:Ve,headingCompression:ve,onHeadingCompressionChange:Le,headingTypography:ke,onHeadingTypographyChange:Xe,textStyles:Ze,onTextStylesChange:Qe,wordStyles:qe,sizes:Ee,onSizesChange:ze,siteWidth:Ge,onSiteWidthChange:$e,siteGutter:Fe,onSiteGutterChange:et,blockGap:v,onBlockGapChange:tt,heroBackgroundFollowsWidth:Ae,onHeroBackgroundFollowsWidthChange:rt,photographyGrayscale:De,onPhotographyGrayscaleChange:ot,shareButtonOnPosts:xe,onShareButtonOnPostsChange:nt,themeFromDocument:!d.hasSiteTheme,children:s(It,{children:s(ht,{wrap:h.chrome?.wrap,surface:"page",children:s(At,{children:s(Dt,{children:s(xt,{children:s(Bt,{children:s(Nt,{children:dt(Ot,{value:st,children:[s(Mt,{chat:it,onChatChange:ct,children:s(Gt,{value:at,children:s(Wt,{children:e})})}),o]})})})})})})})})})})}function lr({target:i}){return s(Et,{target:i,addressing:kt,onHostMessage:nr,children:s(hr,{})})}export{lr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback as
|
|
1
|
+
"use client";import{useCallback as d,useEffect as p,useMemo as E,useRef as h,useState as A}from"react";import{EMPTY_SOCIAL_ROWS as L}from"../../render/components/PreviewSocialContext.js";import{SOCIAL_PLATFORMS as O,normalizeSocialLinks as C}from"../../format/lib/content/social-links.js";import{refreshSiteLiveState as w}from"../lib/site-live-state.js";import{backendOf as y}from"../lib/website-session.js";import{useEditorSession as _}from"../lib/editor-session-context.js";import{WebsiteBackendError as g}from"../lib/web-backend.js";const F="Could not save this link. Check your connection and try again.";function R(n,e){if(!(n instanceof g)||n.kind!=="invalid")return null;const s=n.fields?.[e];return typeof s=="string"&&s.trim()?s:null}function T(n){return Object.fromEntries(O.map(e=>[e,{value:n[e]??"",error:null}]))}function D({token:n,siteId:e,enabled:s}){const[i,c]=A(L),m=h(null),a=h(!1),b=_(),t=y(b).social,o=s&&!!n&&!!e&&!!t;p(()=>{if(!o||!n||!e||!t)return;m.current!==e&&(m.current=e,a.current=!1,c(L));let r=!1;return t.get({siteId:e}).then(l=>{!r&&!a.current&&c(T(l))}).catch(()=>{}),()=>{r=!0}},[o,n,e,t]);const S=d(async(r,l)=>{if(!o||!n||!e||!t)return{ok:!1,error:"There is no website to save to."};try{const f=await t.update({[r]:l.trim()},{siteId:e});return a.current=!0,w(),c(u=>({...u,[r]:{value:f[r]??"",error:null}})),{ok:!0}}catch(f){const u=R(f,r)??F;return c(v=>({...v,[r]:{...v[r],error:u}})),{ok:!1,error:u}}},[o,n,e,t]),k=E(()=>C(Object.fromEntries(O.map(r=>[r,i[r].value]))),[i]);return E(()=>({links:k,rows:i,canSave:o,saveLink:S}),[k,i,o,S])}export{F as SOCIAL_SAVE_FAILED,R as socialFieldError,D as useSocialSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback as
|
|
1
|
+
"use client";import{useCallback as b,useEffect as f,useRef as d,useState as P}from"react";import{useStorefrontDocument as y}from"./StorefrontDocumentContext.js";import{useOpenPinnedChromeReport as C,usePinnedChromeState as R}from"./usePinnedChromeState.js";import{effectiveLive as A,goingLiveLines as E,mainActionFor as l,usePageLiveState as U}from"../lib/page-live-state.js";import{readSiteLiveStateWith as p,refreshSiteLiveState as W,useSiteLiveState as k}from"../lib/site-live-state.js";function M(i){const{docId:m,capabilities:v,hasUnsavedEdits:r,onPublish:s,adapter:h}=y(),S=A(U(m??null),r),g=R(C()),e=h.siteLiveState;f(()=>{if(e)return p(e),W(0),()=>p(null)},[e]);const t=k(),[u,o]=P(!1),a=d(i);a.current=i;const n=d(!0);f(()=>(n.current=!0,()=>{n.current=!1}),[]);const c=b(()=>{o(!0),s(a.current).finally(()=>{n.current&&o(!1)})},[s]);if(v.canPublish){if(e){const L=t===void 0?void 0:r||t.state==="changed"?"changed":"live";return l({live:L,onPress:c,busy:u,goingLive:E(t?.changes??[])})}return l({live:S,onPress:c,busy:u,pinnedUnpublished:g?.unpublished??!1})}}export{M as useWebsiteMainAction};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LockHolder, SaveConflict } from "efficient-easel/edit-lock";
|
|
2
2
|
import { type OfferedSets } from "./editor-blocks.js";
|
|
3
3
|
import type { EditorCapabilities, EditorDocument, EditorDocumentAdapter } from "../../format/lib/editor-document-contract.js";
|
|
4
|
-
import type { EditorPageRow, WebsiteBackend } from "./web-backend.js";
|
|
4
|
+
import type { EditorPageRow, SiteLiveState, WebsiteBackend } from "./web-backend.js";
|
|
5
5
|
export type { EditorPageRow };
|
|
6
6
|
export type { EditorCapabilities, EditorDocument, EditorDocumentAdapter };
|
|
7
7
|
export type WebsiteCapabilities = EditorCapabilities & {
|
|
@@ -22,6 +22,7 @@ export interface PinnedChromeReport {
|
|
|
22
22
|
export type WebsiteDocumentAdapter = EditorDocumentAdapter & {
|
|
23
23
|
capabilities: WebsiteCapabilities;
|
|
24
24
|
pinnedChrome?: PinnedChromeReport;
|
|
25
|
+
siteLiveState?: () => Promise<SiteLiveState>;
|
|
25
26
|
};
|
|
26
27
|
export type SitePageAdapterOptions = {
|
|
27
28
|
editsPinnedInPlace?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{SITE_FOOTER_SLUG as
|
|
1
|
+
"use client";import{SITE_FOOTER_SLUG as g}from"../../format/lib/content/footer.js";import{offeredSetsOf as T}from"./editor-blocks.js";import{isBackendError as B}from"./editor-backend-error.js";import{isEfficientBackend as b}from"../../render/lib/editor-session.js";import{noteLoaded as O,notePublished as J,noteSaved as j,pageLiveState as _}from"./page-live-state.js";import{noteSiteLiveState as D,refreshSiteLiveState as E}from"./site-live-state.js";import{sendSiteWrites as G}from"../../format/lib/site-writes.js";import{spliceChrome as M,splitChrome as k}from"./pinned-chrome-doc.js";import{setActivePinnedChrome as N}from"../../format/lib/pinned-chrome-lock.js";import{backendOf as R}from"./website-session.js";function x(t){return!!(t?.publish&&t.liveState)}function U(t,o){return async(i,r)=>(await G(),(await t.publish(o)).state==="live"?D({state:"live",changes:[]}):E(0),{version:r??null})}function F(t,o,i){const r=o?{siteId:o}:void 0;return{resolve:s=>t.load({slug:s,...r}).then(e=>(e&&O(e.id,e.live),e)),saveLayout:(s,e,u,m)=>t.save(s,{layout:e},{version:u,clientId:m??""}).then(f=>(j(s,f.live),E(),f)),rereadVersion:t.version?s=>t.version(s):void 0,publish:x(i)?U(i,r):t.publish?(s,e)=>t.publish(s,e?{version:e}:void 0).then(u=>(J(s,u.live),u)):void 0,listPages:()=>t.list(r),createPage:t.create?s=>t.create({...s,...r}):void 0,deletePage:t.remove?(s,e)=>t.remove(s,e):void 0}}function V(t,o,i,r,s=!1){let e=null;const u=new Set;let m=!1,f={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1};const P=new Set,p=()=>{if(!e)return!1;const n=_(e.id);return n==="changed"||n==="never"||n===void 0&&m},h=n=>{f={...f,...n,docId:e?.id??null,unpublished:p()};for(const c of P)c()},y=n=>n&&typeof n=="object"&&!Array.isArray(n)?n:{},S=n=>!!e&&u.has(n),C={state:()=>f,subscribe:n=>(P.add(n),()=>{P.delete(n)})};return{resolve:async n=>{if(N(n===g?null:C),n===g)return i.resolve(n);let c=!1;const[d,a]=await Promise.all([i.resolve(n),t.load({slug:g,...o}).catch(()=>(c=!0,null))]);if(a){O(a.id,a.live);const v=y(a.layout);e={id:a.id,layout:v,version:a.version,savedJson:""}}else e=null;if(m=!1,!d||!e)return h({conflict:null,saveFailed:!1,loadFailed:c}),d;const l=M(y(d.layout),e.layout);return e.savedJson=JSON.stringify(k(l,e.layout).chrome),u.add(d.id),h({conflict:null,saveFailed:!1,loadFailed:!1}),{...d,layout:l}},saveLayout:async(n,c,d,a)=>{if(!e||!S(n))return i.saveLayout(n,c,d,a);const l=e,v=k(c,l.layout),H=await i.saveLayout(n,v.page,d,a),A=JSON.stringify(v.chrome);if(!v.chrome||A===l.savedJson||f.lockHolder)return H;try{const w=await t.save(l.id,{layout:v.chrome},{version:l.version,clientId:a??""});j(l.id,w.live),E(),l.layout=v.chrome,l.version=w.version,l.savedJson=A,m=!0,h({conflict:null,saveFailed:!1})}catch(w){B(w,"changed-elsewhere")?h({conflict:w.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):B(w,"lock-taken")?h({lockHolder:w.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):h({saveFailed:!0})}return H},publish:i.publish?async(n,c)=>{const d=await i.publish(n,c),a=e;if(a&&S(n)&&!s&&t.publish&&p()&&!f.lockHolder){const l=await t.publish(a.id,a.version?{version:a.version}:void 0);J(a.id,l.live),l.version!==null&&(a.version=l.version),m=!1,h({})}return d}:void 0,lock:r?{claim:async(n,c,d)=>{const a=await r.claim(n,c,d),l=e;if(l&&S(n))try{await r.claim(l.id,c,!1),f.lockHolder&&h({lockHolder:null})}catch(v){B(v,"lock-taken")&&h({lockHolder:v.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}return a},release:async(n,c)=>{await r.release(n,c);const d=e;d&&S(n)&&!f.lockHolder&&await r.release(d.id,c).catch(()=>{})}}:void 0,pinnedChrome:C}}function ne(t,o=R(),i=T(),r={}){const s=b(o),e=t?{siteId:t}:void 0,u=s?!!t:!0,m=o.site.update,f=s&&i.commerce&&i.service,P=!!r.editsPinnedInPlace&&f,p=x(o.site)?o.site:void 0,h=F(o.pages,t,p),y=P?V(o.pages,e,h,o.lock,!!p):null;return{capabilities:{canPublish:!!p||!!o.pages.publish,hasSiteSettings:s,hasSiteTheme:!!o.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!o.pages.create,canDeletePagesInline:!!o.pages.remove,hasEditLock:!!o.lock,hasEditGuard:!0,hasPinnedChrome:f,editsPinnedInPlace:P,explainsSiteSettings:!1,hasSiteRecord:u,canEditSiteRecord:u&&!!m,hasPreviewLink:s||!!o.preview,hasCatalog:s&&i.commerce,hasForms:s&&i.service,hasBlog:!!o.blog&&i.service,offersCommerce:i.commerce,offersService:i.service},...h,...I(h.resolve),lock:o.lock,...y,site:u?()=>o.site.get(e):void 0,siteLiveState:p?()=>p.liveState(e):void 0,updateSite:u&&m?S=>m(S,e):void 0,previewHref:o.preview?S=>o.preview.href(S):void 0}}function te(t,o=R(),i=T()){const r=b(o),s=o.templates,e=s?s.pages(t):{list:()=>Promise.reject(new Error(L)),load:()=>Promise.reject(new Error(L)),save:()=>Promise.reject(new Error(L))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!e.create,canDeletePagesInline:!!e.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&i.commerce&&i.service,editsPinnedInPlace:!1,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&i.commerce,hasForms:r&&i.service,hasBlog:!!o.blog&&i.service,offersCommerce:i.commerce,offersService:i.service},...F(e,void 0),...I(F(e,void 0).resolve),publish:void 0,templateName:s?()=>s.get(t).then(u=>u.name):void 0}}function I(t){return{resolve:o=>(N(null),t(o))}}const L="This editor's backend has no website templates.";export{ne as makeSitePageAdapter,te as makeTemplatePageAdapter};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScreenMainAction } from "./editor-screen.js";
|
|
2
|
-
import type { PageLiveState } from "./web-backend.js";
|
|
2
|
+
import type { PageLiveState, SiteChange } from "./web-backend.js";
|
|
3
3
|
export type { PageLiveState };
|
|
4
4
|
export declare function noteLoaded(id: string, live: PageLiveState | undefined): void;
|
|
5
5
|
export declare function noteSaved(id: string, live: PageLiveState | undefined): void;
|
|
@@ -7,9 +7,11 @@ export declare function notePublished(id: string, live: PageLiveState | undefine
|
|
|
7
7
|
export declare function pageLiveState(id: string): PageLiveState | undefined;
|
|
8
8
|
export declare function usePageLiveState(id: string | null): PageLiveState | undefined;
|
|
9
9
|
export declare function effectiveLive(live: PageLiveState | undefined, hasUnsavedEdits: boolean): PageLiveState | undefined;
|
|
10
|
-
export declare function mainActionFor({ live, onPress, busy, pinnedUnpublished, }: {
|
|
10
|
+
export declare function mainActionFor({ live, onPress, busy, pinnedUnpublished, goingLive, }: {
|
|
11
11
|
live: PageLiveState | undefined;
|
|
12
12
|
onPress: () => void;
|
|
13
13
|
busy?: boolean;
|
|
14
14
|
pinnedUnpublished?: boolean;
|
|
15
|
+
goingLive?: readonly string[];
|
|
15
16
|
}): ScreenMainAction;
|
|
17
|
+
export declare function goingLiveLines(changes: readonly SiteChange[]): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSyncExternalStore as l}from"react";import{say as n}from"../../format/lib/editor-words.js";const r=new Map,s=new Set;function
|
|
1
|
+
import{useSyncExternalStore as l}from"react";import{say as n}from"../../format/lib/editor-words.js";const r=new Map,s=new Set;function u(e,t){if(!(r.has(e)&&r.get(e)===t)){r.set(e,t);for(const o of s)o()}}function d(e,t){u(e,t)}function v(e,t){const o=r.get(e);u(e,t??(o==="live"?"changed":o))}function m(e,t){u(e,t??"live")}function x(e){return r.get(e)}function g(e){return s.add(e),()=>{s.delete(e)}}function y(e){const t=()=>e?r.get(e):void 0;return l(g,t,t)}function b(e,t){return e==="live"&&t?"changed":e}function P({live:e,onPress:t,busy:o=!1,pinnedUnpublished:i=!1,goingLive:a}){const c=e==="live"&&!i,f=e==="changed"?n("Changes not live yet"):e==="never"?n("Never published"):i?n("Header and footer not live yet"):e==="live"?n("Everything is live"):null;return{label:n("Publish"),tooltip:e==="never"?n("Put this page on your site"):n("Put your changes on your site"),status:f,quiet:c?{label:n("Published"),reason:n("Everything is live")}:null,...a&&a.length?{goingLive:a}:{},onPress:t,busy:o}}function S(e){return e.map(t=>t.change==="take_down"?n("{name} (taken down)",{name:t.name}):t.name)}export{b as effectiveLive,S as goingLiveLines,P as mainActionFor,d as noteLoaded,m as notePublished,v as noteSaved,x as pageLiveState,y as usePageLiveState};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SiteLiveState } from "./web-backend.js";
|
|
2
|
+
export type { SiteLiveState };
|
|
3
|
+
export declare function readSiteLiveStateWith(read: (() => Promise<SiteLiveState>) | null): void;
|
|
4
|
+
export declare function noteSiteLiveState(state: SiteLiveState): void;
|
|
5
|
+
export declare function refreshSiteLiveState(delayMs?: number): void;
|
|
6
|
+
export declare function siteLiveState(): SiteLiveState | undefined;
|
|
7
|
+
export declare function useSiteLiveState(): SiteLiveState | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useSyncExternalStore as a}from"react";let c,i=null,t=null,r=0;const o=new Set;function u(e){c=e;for(const n of o)n()}function m(e){i=e,r+=1,t&&clearTimeout(t),t=null,u(void 0)}function p(e){r+=1,u(e)}function x(e=250){i&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null;const n=i;if(!n)return;const l=++r;n().then(s=>{l===r&&u(s)}).catch(()=>{})},e))}function f(){return c}function S(e){return o.add(e),()=>{o.delete(e)}}function v(){return a(S,f,f)}export{p as noteSiteLiveState,m as readSiteLiveStateWith,x as refreshSiteLiveState,f as siteLiveState,v as useSiteLiveState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as m,useEffect as
|
|
1
|
+
import{useCallback as m,useEffect as h,useRef as p}from"react";import{currentEditorSession as S}from"../../render/lib/editor-session.js";import{backendOf as T}from"./website-session.js";import{useEditorSession as b}from"./editor-session-context.js";import{refreshSiteLiveState as g}from"./site-live-state.js";import{holdSiteWrites as x}from"../../format/lib/site-writes.js";import{WebsiteBackendError as E}from"./web-backend.js";function w(r=S()){return(u,c,o)=>{const e=T(r).theme;return e?e.update(u,o?{siteId:o}:void 0):Promise.reject(new E("invalid","This backend stores no site theme."))}}function y(r){return r.themeFromDocument?{status:"skipped",reason:"template"}:r.token?null:{status:"skipped",reason:"no-token"}}async function j(r,u=w()){const{themeFromDocument:c,token:o,siteId:e,patch:n}=r,a=y({themeFromDocument:c,token:o});if(a)return a;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await u(n,o,e??void 0),{status:"saved"}}catch(f){return{status:"failed",error:f}}}function Q({themeFromDocument:r,tokenRef:u,siteId:c,onResult:o}){const e=p(null),n=p({}),a=b(),f=p(o);f.current=o;const d=p(null),l=m(t=>{if(t.status==="skipped"){const s=`skipped:${t.reason}`;if(d.current===s)return;d.current=s}else d.current=null;f.current?.(t)},[]),i=m(async()=>{e.current&&(clearTimeout(e.current),e.current=null);const t=n.current;n.current={};const s=await j({themeFromDocument:r,token:u?.current,siteId:c,patch:t},w(a));return l(s),s.status==="saved"&&g(),s.status==="failed"&&(n.current={...t,...n.current}),s},[r,u,c,l,a]),v=m((t,s=!1)=>{const k=y({themeFromDocument:r,token:u?.current});if(k){l(k);return}n.current={...n.current,...t},e.current&&clearTimeout(e.current),s?i():e.current=setTimeout(()=>{i()},500)},[r,u,i,l]);return h(()=>()=>{i()},[i]),h(()=>x(async()=>{if(!e.current&&Object.keys(n.current).length===0)return;const t=await i();if(t.status==="failed")throw t.error}),[i]),{persist:v,flush:i}}export{y as refusalToQueue,w as themeRowSender,Q as useThemeRowPersist,j as writeThemeRow};
|
|
@@ -62,9 +62,25 @@ export interface WebsitePages {
|
|
|
62
62
|
}): Promise<void>;
|
|
63
63
|
linkTargets?(scope?: SiteScope): Promise<LinkTargetPage[]>;
|
|
64
64
|
}
|
|
65
|
+
export interface SiteChange {
|
|
66
|
+
kind: string;
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
change: "publish" | "take_down" | "update";
|
|
70
|
+
}
|
|
71
|
+
export interface SiteLiveState {
|
|
72
|
+
state: "live" | "changed";
|
|
73
|
+
changes: SiteChange[];
|
|
74
|
+
}
|
|
75
|
+
export interface SitePublishAnswer {
|
|
76
|
+
state: "live" | "changed";
|
|
77
|
+
published: SiteChange[];
|
|
78
|
+
}
|
|
65
79
|
export interface WebsiteSite {
|
|
66
80
|
get(scope?: SiteScope): Promise<SiteRecord>;
|
|
67
81
|
update?(patch: SiteRecordPatch, scope?: SiteScope): Promise<SiteRecord>;
|
|
82
|
+
publish?(scope?: SiteScope): Promise<SitePublishAnswer>;
|
|
83
|
+
liveState?(scope?: SiteScope): Promise<SiteLiveState>;
|
|
68
84
|
languages?(): Promise<{
|
|
69
85
|
base: string;
|
|
70
86
|
others: string[];
|
|
@@ -1195,6 +1195,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
1195
1195
|
readonly "{label} {n}": "{label} {n}";
|
|
1196
1196
|
readonly "{label} \u2014 row {n}": "{label} — row {n}";
|
|
1197
1197
|
readonly "{letter} \u00B7 Step": "{letter} · Step";
|
|
1198
|
+
readonly "{name} (taken down)": "{name} (taken down)";
|
|
1198
1199
|
readonly "{name} (unavailable)": "{name} (unavailable)";
|
|
1199
1200
|
readonly "{name} is editing the header and footer. Nothing you change in them here is saved.": "{name} is editing the header and footer. Nothing you change in them here is saved.";
|
|
1200
1201
|
readonly "{name} is on this section": "{name} is on this section";
|
|
@@ -8,4 +8,4 @@ const e={"$ efficient …":"$ efficient …","0 min":"0 min","0 min read":"0 min
|
|
|
8
8
|
*the counter.*`,"Select a word, then press the highlighter.":"Select a word, then press the highlighter.","Selector guide (pills + results)":"Selector guide (pills + results)","Selector pills":"Selector pills",Separator:"Separator","Series title":"Series title",Serif:"Serif","Set this card's corners first.":"Set this card's corners first.","Shadow color":"Shadow color",Shape:"Shape","Share button":"Share button",Shared:"Shared","Shop & galleries":"Shop & galleries","Short description of this figure.":"Short description of this figure.","Short detail line":"Short detail line","Short supporting line":"Short supporting line",Show:"Show","Show arrows":"Show arrows","Show cover image":"Show cover image","Show hints":"Show hints","Show on a card":"Show on a card","Show on phones":"Show on phones","Show slide picker":"Show slide picker","Show texture":"Show texture","Show the chat bubble":"Show the chat bubble","Show the chat bubble on the whole site":"Show the chat bubble on the whole site","Show ticker":"Show ticker","Show {label} on the slide":"Show {label} on the slide","Shown beside the heading":"Shown beside the heading","Shows when a visitor points at the button":"Shows when a visitor points at the button","Side space":"Side space","Side-by-side image and text in two columns.":"Side-by-side image and text in two columns.",Sideways:"Sideways","Signup Form":"Signup Form",Simple:"Simple","Site button color":"Site button color","Site settings":"Site settings","Site styles":"Site styles","Six across":"Six across","Six stagger":"Six stagger",Size:"Size",Sizes:"Sizes","Slash /":"Slash /","Slide name":"Slide name","Slide picker":"Slide picker","Slide picker placement":"Slide picker placement","Slide picker shape":"Slide picker shape",Small:"Small","Social Logos":"Social Logos","Social link settings belong to a website.":"Social link settings belong to a website.","Social links":"Social links",Soft:"Soft",Solid:"Solid","Somebody else":"Somebody else",Source:"Source","Space above and below":"Space above and below","Space between":"Space between",Spacer:"Spacer","Spec Strip":"Spec Strip","Spec Table":"Spec Table","Spec label":"Spec label","Spec tiles":"Spec tiles","Spec value":"Spec value","Spine (single rail)":"Spine (single rail)","Split (editorial aside)":"Split (editorial aside)",Square:"Square",Squares:"Squares",Stacked:"Stacked",Standard:"Standard",Start:"Start",Stat:"Stat","Stat & note":"Stat & note","Stat label":"Stat label","Stat name":"Stat name","Stat value":"Stat value",State:"State","State / Province":"State / Province",Statement:"Statement",Stats:"Stats","Stats & social proof":"Stats & social proof","Stats with Text":"Stats with Text","Status chip":"Status chip","Step *one*":"Step *one*","Step *three*":"Step *three*","Step *two*":"Step *two*","Stick to top":"Stick to top","Still time per slide":"Still time per slide","Storefront → Blog":"Storefront → Blog","Storefront ▸ Sites ▸ Settings":"Storefront ▸ Sites ▸ Settings","Story Timeline":"Story Timeline","Street address":"Street address",Stretch:"Stretch","Strip fill":"Strip fill","Strip items":"Strip items","Stripes · bold":"Stripes · bold","Stripes · fine":"Stripes · fine","Stripes · medium":"Stripes · medium",Style:"Style","Sub-title":"Sub-title","Sub-total lines":"Sub-total lines",Subtitle:"Subtitle","Subtitle font size":"Subtitle font size",Subtotal:"Subtotal","Success heading":"Success heading","Success message":"Success message",Superscript:"Superscript",Surfaces:"Surfaces","Switch now":"Switch now","Switch to Box footer":"Switch to Box footer","Synced from the blog post.":"Synced from the blog post.","Synced from the product.":"Synced from the product.","Synced from the site menu.":"Synced from the site menu.","Syncing from {place}…":"Syncing from {place}…",Tab:"Tab","Tab label":"Tab label","Tab name":"Tab name","Tabbed Gallery":"Tabbed Gallery",Tabs:"Tabs","Tall (3:4)":"Tall (3:4)","Tall first":"Tall first","Tall middle":"Tall middle","Team four":"Team four","Team one":"Team one","Team three":"Team three","Team two":"Team two",Telegram:"Telegram","Templates don’t store images — this slot stays a placeholder. Each website picks its own after it’s created.":"Templates don’t store images — this slot stays a placeholder. Each website picks its own after it’s created.","Templates don’t store videos — this slot stays a placeholder. Each website picks its own after it’s created.":"Templates don’t store videos — this slot stays a placeholder. Each website picks its own after it’s created.","Templates keep their look. Press Done.":"Templates keep their look. Press Done.",Terminal:"Terminal","Terminal (CLI session)":"Terminal (CLI session)","Terminal lines":"Terminal lines",Testimonials:"Testimonials",Text:"Text","Text & content":"Text & content","Text & media":"Text & media","Text color":"Text color","Text column":"Text column","Text height":"Text height","Text position":"Text position","Text size":"Text size","Text style":"Text style",Texts:"Texts",Texture:"Texture","Texture color":"Texture color","Texture opacity":"Texture opacity","Thanks — we'll email you to confirm.":"Thanks — we'll email you to confirm.","The chat bubble is hidden across the whole site.":"The chat bubble is hidden across the whole site.","The current product's compatible tyres — image, size, key specs and price per tyre, with an inquiry link. Display only.":"The current product's compatible tyres — image, size, key specs and price per tyre, with an inquiry link. Display only.","The current product's related items in a tidy row — the product page's built-in 'Pair with' cross-sell.":"The current product's related items in a tidy row — the product page's built-in 'Pair with' cross-sell.","The floating chat bubble shows in the corner of every page.":"The floating chat bubble shows in the corner of every page.","The footer cannot take another one of these":"The footer cannot take another one of these","The footer holds at most 6 sections":"The footer holds at most 6 sections","The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.":"The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.","The header and footer did not save. They are sent again with your next change.":"The header and footer did not save. They are sent again with your next change.","The header and footer were changed somewhere else. Nothing you change in them here is saved. Reload to get the latest.":"The header and footer were changed somewhere else. Nothing you change in them here is saved. Reload to get the latest.","The header cannot take another one of these":"The header cannot take another one of these","The header holds at most 3 sections":"The header holds at most 3 sections","The room left at the left and right edge of every page.":"The room left at the left and right edge of every page.","The section is full width, so this card follows Site styles ▸ Basics ▸ Corners.":"The section is full width, so this card follows Site styles ▸ Basics ▸ Corners.","The section it belonged to has been changed or removed.":"The section it belonged to has been changed or removed.","The standard width every page on this site renders at.":"The standard width every page on this site renders at.","The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.":"The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.",Theme:"Theme","Theme {n}":"Theme {n}","Theme {n} background":"Theme {n} background","Theme {n} main color":"Theme {n} main color","Theme {n} text color":"Theme {n} text color","Third item":"Third item","This cannot be undone.":"This cannot be undone.","This card is not in a section that can share corners.":"This card is not in a section that can share corners.","This color is hard to read on this theme's page. The buttons below are the same hue, darkened.":"This color is hard to read on this theme's page. The buttons below are the same hue, darkened.","This color is hard to read on your page background. Pick one further from it — lighter if your pages are dark, deeper if they are light.":"This color is hard to read on your page background. Pick one further from it — lighter if your pages are dark, deeper if they are light.","This color reads clearly on your pages.":"This color reads clearly on your pages.","This footer uses the old layout":"This footer uses the old layout","This is the only card in the section.":"This is the only card in the section.","This part is no longer here.":"This part is no longer here.","This part's settings did not open.":"This part's settings did not open.","This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.":"This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.","This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.":"This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.","This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.":"This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.","This ticker’s hero is no longer on the page.":"This ticker’s hero is no longer on the page.","Three across":"Three across","Three ladder":"Three ladder","Three stagger":"Three stagger",Ticker:"Ticker","Ticker items":"Ticker items",TikTok:"TikTok","Timeline entries":"Timeline entries","Timezone chip":"Timezone chip","Tint color":"Tint color","Tint opacity":"Tint opacity",Title:"Title",Tone:"Tone",Top:"Top","Top and bottom":"Top and bottom","Top border":"Top border","Top center":"Top center","Top left":"Top left","Top right":"Top right","Top row":"Top row","Top space":"Top space",Total:"Total","Total amount":"Total amount","Total label":"Total label","Total line":"Total line","Trailing note":"Trailing note","Triangle ▼":"Triangle ▼","Trusted by *teams worldwide*":"Trusted by *teams worldwide*","Two across":"Two across","Two image galleries with tabs and filters.":"Two image galleries with tabs and filters.","Two tall":"Two tall",Type:"Type","Type a postcode or address":"Type a postcode or address","Typed here":"Typed here","Typed in":"Typed in","Tyre Fitment Form":"Tyre Fitment Form","Tyre Sizes":"Tyre Sizes","URL pill":"URL pill","URL: /{slug}":"URL: /{slug}",Undo:"Undo",Ungrouped:"Ungrouped",Unit:"Unit","Unit labels":"Unit labels",Up:"Up","Up and down":"Up and down",Upcoming:"Upcoming","Update style":"Update style","Update {style}?":"Update {style}?",Upload:"Upload","Upload a background image":"Upload a background image","Upload a poster still":"Upload a poster still","Uppercase heading":"Uppercase heading","Use {colour}":"Use {colour}",Value:"Value","Value suffix":"Value suffix","Vertical breathing room between sections.":"Vertical breathing room between sections.",Video:"Video","Video file":"Video file","Video poster":"Video poster","View all":"View all","View all questions":"View all questions","View series →":"View series →",Volume:"Volume","Ways to pay":"Ways to pay",WeChat:"WeChat","What people *say.*":"What people *say.*",WhatsApp:"WhatsApp","Whether this page sits on the site's content column, or runs edge to edge.":"Whether this page sits on the site's content column, or runs edge to edge.","Whole number Theme Color":"Whole number Theme Color","Wide (2:1)":"Wide (2:1)","Wide promo strip with background image.":"Wide promo strip with background image.",Width:"Width","With us":"With us",Wording:"Wording",Wrap:"Wrap","Write the answer here.":"Write the answer here.","Write the opening paragraph here.\n\n- Start a line with a dash for a bullet.\n- Add as many as you like.":`Write the opening paragraph here.
|
|
9
9
|
|
|
10
10
|
- Start a line with a dash for a bullet.
|
|
11
|
-
- Add as many as you like.`,X:"X","X-Large":"X-Large",Year:"Year","Year →":"Year →",Years:"Years",YouTube:"YouTube","YouTube link":"YouTube link","Your *first* section.":"Your *first* section.","Your *second* section.":"Your *second* section.","Your fifth question goes here?":"Your fifth question goes here?","Your first question goes here?":"Your first question goes here?","Your fourth question goes here?":"Your fourth question goes here?","Your locations as a city gallery plus address and map cards.":"Your locations as a city gallery plus address and map cards.","Your review":"Your review","Your second question goes here?":"Your second question goes here?","Your third question goes here?":"Your third question goes here?",Zigzag:"Zigzag",accent:"accent","all theme colors":"all theme colors","body text":"body text",button:"button",card:"card",city:"city",draft:"draft","e.g. About":"e.g. About","e.g. Americas":"e.g. Americas","e.g. about":"e.g. about","e.g. {example}":"e.g. {example}","each block's own spacing":"each block's own spacing",entries:"entries",group:"group","https://youtu.be/…":"https://youtu.be/…",item:"item",label:"label",manifesto:"manifesto","not set":"not set","not shown live":"not shown live",part:"part",px:"px","the Text style in Site styles":"the Text style in Site styles","the admin":"the admin","the built-in corners":"the built-in corners","the page":"the page","the same as Desktop":"the same as Desktop","the section":"the section","the theme's image stage":"the theme's image stage","the theme's section background":"the theme's section background","this container's own spacing":"this container's own spacing","{grade} on the button":"{grade} on the button","{label} hex code":"{label} hex code","{label} {n}":"{label} {n}","{label} — row {n}":"{label} — row {n}","{letter} · Step":"{letter} · Step","{name} (unavailable)":"{name} (unavailable)","{name} is editing the header and footer. Nothing you change in them here is saved.":"{name} is editing the header and footer. Nothing you change in them here is saved.","{name} is on this section":"{name} is on this section","{name} — renamed in the Console: {place}.":"{name} — renamed in the Console: {place}.","{n} cities":"{n} cities","{n} city":"{n} city","{n} of {total} layouts":"{n} of {total} layouts","{value} from {from}":"{value} from {from}","{value} on desktop":"{value} on desktop","{what} settings belong to a website.":"{what} settings belong to a website.","— Articles in total":"— Articles in total","— Label":"— Label","— Name, Year":"— Name, Year"};export{e as WEB_BUILDER_WORDS};
|
|
11
|
+
- Add as many as you like.`,X:"X","X-Large":"X-Large",Year:"Year","Year →":"Year →",Years:"Years",YouTube:"YouTube","YouTube link":"YouTube link","Your *first* section.":"Your *first* section.","Your *second* section.":"Your *second* section.","Your fifth question goes here?":"Your fifth question goes here?","Your first question goes here?":"Your first question goes here?","Your fourth question goes here?":"Your fourth question goes here?","Your locations as a city gallery plus address and map cards.":"Your locations as a city gallery plus address and map cards.","Your review":"Your review","Your second question goes here?":"Your second question goes here?","Your third question goes here?":"Your third question goes here?",Zigzag:"Zigzag",accent:"accent","all theme colors":"all theme colors","body text":"body text",button:"button",card:"card",city:"city",draft:"draft","e.g. About":"e.g. About","e.g. Americas":"e.g. Americas","e.g. about":"e.g. about","e.g. {example}":"e.g. {example}","each block's own spacing":"each block's own spacing",entries:"entries",group:"group","https://youtu.be/…":"https://youtu.be/…",item:"item",label:"label",manifesto:"manifesto","not set":"not set","not shown live":"not shown live",part:"part",px:"px","the Text style in Site styles":"the Text style in Site styles","the admin":"the admin","the built-in corners":"the built-in corners","the page":"the page","the same as Desktop":"the same as Desktop","the section":"the section","the theme's image stage":"the theme's image stage","the theme's section background":"the theme's section background","this container's own spacing":"this container's own spacing","{grade} on the button":"{grade} on the button","{label} hex code":"{label} hex code","{label} {n}":"{label} {n}","{label} — row {n}":"{label} — row {n}","{letter} · Step":"{letter} · Step","{name} (taken down)":"{name} (taken down)","{name} (unavailable)":"{name} (unavailable)","{name} is editing the header and footer. Nothing you change in them here is saved.":"{name} is editing the header and footer. Nothing you change in them here is saved.","{name} is on this section":"{name} is on this section","{name} — renamed in the Console: {place}.":"{name} — renamed in the Console: {place}.","{n} cities":"{n} cities","{n} city":"{n} city","{n} of {total} layouts":"{n} of {total} layouts","{value} from {from}":"{value} from {from}","{value} on desktop":"{value} on desktop","{what} settings belong to a website.":"{what} settings belong to a website.","— Articles in total":"— Articles in total","— Label":"— Label","— Name, Year":"— Name, Year"};export{e as WEB_BUILDER_WORDS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=new Set;function s(t){return n.add(t),()=>{n.delete(t)}}async function a(){const i=(await Promise.allSettled([...n].map(async e=>e()))).find(e=>e.status==="rejected");if(i)throw i.reason}export{s as holdSiteWrites,a as sendSiteWrites};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@tabler/icons-react": "^3.46.0",
|
|
55
|
-
"efficient-easel": "^13.
|
|
55
|
+
"efficient-easel": "^13.3.0",
|
|
56
56
|
"efficient-shell": "^7.75.0 || ^8.0.0",
|
|
57
57
|
"isomorphic-dompurify": "^3.18.0",
|
|
58
58
|
"next": ">=16",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/node": "^20",
|
|
73
73
|
"@types/react": "^19",
|
|
74
74
|
"@types/react-dom": "^19",
|
|
75
|
-
"efficient-easel": "^13.
|
|
75
|
+
"efficient-easel": "^13.3.0",
|
|
76
76
|
"efficient-shell": "^8.0.0",
|
|
77
77
|
"esbuild": "^0.28.0",
|
|
78
78
|
"happy-dom": "^20.14.5",
|