efficient-web-builder 37.0.0 → 37.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/SiteTextStylesField.d.ts +1 -1
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/ThemeCard.js +1 -1
- package/dist/editor/components/storefront-editor.css +4 -3
- package/dist/editor/lib/puck/page-root.js +1 -1
- package/dist/editor/lib/site-text-styles-writer.d.ts +1 -1
- package/dist/editor/lib/site-text-styles-writer.js +1 -1
- package/dist/editor/lib/site-text-styles.d.ts +1 -83
- package/dist/editor/lib/site-text-styles.js +1 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +4 -1
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/web-backend.d.ts +3 -0
- package/dist/render/lib/text-styles/site-text-styles.d.ts +83 -0
- package/dist/render/lib/text-styles/site-text-styles.js +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 37.1.0 - 2026-10-23
|
|
6
|
+
|
|
7
|
+
A MINOR: the website backend carries its shared sections (#251), the site text styles move to the render side (#252), and a Site styles theme card opens and closes with one arrow (#230). Nothing is removed.
|
|
8
|
+
|
|
9
|
+
The efficient-easel peer range stays `^18.1.0`: every 18.x from 18.1.0 exports `text-styles/model`. Only the dev pin moves, to `^18.2.0`: the easel release that puts `text-styles/model` in its render group.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **The website backend carries its shared sections** (Shared section design v4, approved by Lewis 2026-10-21; card [DESIGN] Shared Sections Used By Many Pages, build plan PR 6). `WebsiteBackend.sharedSections?: WebsiteSharedSections`, which is efficient-easel's `SharedSectionStore` (list, create, remove), the one type. easel's session reads it from the backend it is handed, so a backend (EFFICIENT's, in efficient-storefront-blocks) hands its store without a cast. Optional: a backend without it offers no shared sections. A MINOR.
|
|
14
|
+
- **`render/lib/text-styles/site-text-styles`: the site's text styles on the render side.** The module writes every published page's text-style stylesheet (`textStylesCss`, `storedTextStyles`, `themeWithTextStyles`), so a shopper's page imports it; it was on the editor side only because it read `efficient-easel/text-styles`, the editor's list. It now reads the model with no React, `efficient-easel/text-styles/model` (the defaults and the case CSS), and is a render root in `scripts/entry-sides.mjs`. The module moved; its code did not change.
|
|
15
|
+
|
|
16
|
+
### Deprecated
|
|
17
|
+
|
|
18
|
+
- `editor/lib/site-text-styles`: kept, as a re-export of the render module, for hosts that still name it (storefront `lib/theme-settings`). Nothing in this package imports it. A later major can delete it.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **The Site styles theme card opens and closes with one arrow** (ruling A4f, Lewis 2026-10-13: "2. B"; the closed state is his direct yes, "Use the icon"). The text button "Edit" / "Done" in the card's foot is now the shell's ghost `IconButton` in the shell's `Tooltip`: closed, it draws `chevron-down` and the tooltip says "Edit colors"; open, it draws `chevron-up` and the tooltip says "Collapse". It is one button whose arrow flips. Its name still says which theme ("Edit colors for Theme 1", "Collapse Theme 1"), and it keeps `aria-expanded` / `aria-controls`.
|
|
23
|
+
- Not changed: the "Edit" in the section's Theme menu card (it opens a sheet somewhere else, so it discloses nothing on the card) and the "Edit" on the closed section Theme trigger (`ThemeCardTrigger`). Both stay the shell's text `Button`.
|
|
24
|
+
- Editor words: added "Collapse", "Collapse {name}", "Edit colors", "Edit colors for {name}"; removed "Done {name}" (nothing says it now). A host that translated "Done {name}" drops that line.
|
|
25
|
+
|
|
26
|
+
### Guards
|
|
27
|
+
|
|
28
|
+
- New `scripts/test-backend-shared-sections.ts` (red first: the scripts typecheck refused it on 37.0.0).
|
|
29
|
+
- `scripts/test-two-ways-to-add.ts` §1 checks the easel peer range (`^18.1.0`) and the dev range (`^18.2.0`) apart.
|
|
30
|
+
- `scripts/test-theme-card-chevron.tsx` (red first): closed and open, the foot's control is the shell's ghost `IconButton` at the `sm` rung with the shell's `chevron-down` / `chevron-up` glyph and no words; the shell's Tooltip says "Edit colors" / "Collapse"; in the real `ThemeField` one press opens and a second press on the same button closes; each card's name names its theme; no "Edit" or "Done" text button is left on a Site styles card.
|
|
31
|
+
|
|
5
32
|
## 37.0.0 - 2026-10-23
|
|
6
33
|
|
|
7
34
|
**MAJOR for hosts:** the efficient-easel peer range is `^18.1.0` (was `^18.0.0`; dev the same). A shared section somebody else holds is locked by its node, which easel 18.1.0 hands the lock rule; on 18.0.0 the lock would never hold and an edit could be lost. A host moves the pin; nothing else to change.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,Fragment as ne,jsxs as h}from"react/jsx-runtime";import{useContext as qe,useEffect as oe,useRef as Je,useState as Te}from"react";import{PartResetDot as Qe}from"./PartResetDot.js";import{FieldSelect as Ze,InspectorField as et}from"efficient-easel/fields";import{SettingsField as tt}from"efficient-easel/panel";import{InspectorUpLevel as K}from"efficient-easel/chrome";import{StylesIcon as nt,TypeIcon as ot}from"efficient-easel/icons";import{useEasel as lt}from"efficient-easel/easel";import{TextPartPanel as st}from"efficient-easel/copy";import{Tooltip as rt}from"efficient-shell/ui";import{PartTextBox as it,partTextCells as at}from"./PartTextBox.js";import{UiIcon as Ne}from"efficient-easel/draw/client";import{usePreviewHeader as ct}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as dt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as ut}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as ft,partStyleToTextStyleValues as pt,pushIntoStyle as mt,resolveTextStyles as ht,styleIdOfRole as yt}from"../lib/site-text-styles.js";import{useSiteTextStylesWriter as St}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as gt}from"../lib/theme-row-persist.js";import{usePreviewDevice as xt}from"efficient-easel/draw/client";import{usePartStyle as bt}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as U,textFieldOffPage as Pt,textFieldPanelOnly as wt}from"../lib/puck/controls.js";import{TEXT_FIELD_MARKER as vt}from"efficient-easel/draw";import{useSectionOps as Tt}from"efficient-easel/screen/lib/puck/use-section-ops";import{FONT_OPTIONS as Nt,FONT_ROLES as Ce,FONT_ROLE_LABELS as ke,fontOption as le}from"../../format/lib/fonts.js";import{isMultilineKind as Ct,partPlaceholder as kt,typeInPlaceKind as Ot}from"../../render/lib/puck/part-text.js";import{partRowField as Rt}from"../lib/puck/part-row-field.js";import{decodePartKey as It,partPropsWithRowValue as Et,partRowValue as Ft}from"../../render/lib/puck/part-rows.js";import{PART_WIDTH_MAX as _t,followedStyleOf as zt,propsWithPartStyleValue as E,propsWithoutPartStyle as At,readPartStyle as Oe}from"../../render/lib/puck/part-styles.js";import{partThemeColors as Vt}from"../../format/lib/puck/part-inks.js";import{styleKeyForPart as Lt}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as Kt}from"../lib/puck/part-typing.js";import{keysOnCanvas as Ut,useCanvasTypingPart as Bt}from"../lib/puck/canvas-typing.js";import{useEaselHost as Dt}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as Wt,SOURCE_ACTIONS as Mt,SOURCE_ACTION_LABEL as jt,partSourceNoteFor as Gt,partSourceOf as Ht,sourceMenuIdOf as $t,sourceSlugOf as Re}from"../../format/lib/puck/source-bound-parts.js";import{encodePartId as Xt,holdsAuthoredText as Yt}from"../../render/lib/puck/text-parts.js";import{regionsForSection as qt}from"../../format/lib/sections/section-text-regions.js";import{textRegionOfPartKey as Jt}from"../../format/lib/sections/text-regions.js";function se(n){return n?l(n):null}function Ie(n){return n.kind==="role"?ke[n.role]:n.kind==="custom"?"Custom":null}function Qt(n){const o=n.role;return o&&Ce.includes(o)?{kind:"role",role:o}:null}function Zt(n,o){if(!n)return{kind:"unread"};const{faceRole:s,base:i}=n;if(o[s]===i.fontKey)return{kind:"role",role:s};const c=Object.keys(o).filter(r=>o[r]===i.fontKey);return c.length===1?{kind:"role",role:c[0]}:{kind:"custom"}}function re(n,o,s,i){return Qt(Oe(n,o))??Zt(s,i)}function en(n,o){if(!n.length)return null;const s=o(n[0]);return n.every(i=>o(i)===s)?s:null}const B="";function tn({face:n,base:o,onPick:s}){const i=n.kind==="role"?n.role:B,c=[{label:l("No style"),value:B},...Ce.map(r=>({label:l(ke[r]),value:r}))];return t(Ze,{ariaLabel:l("Style"),value:i,options:c,inline:!0,onChange:r=>s(r===B?null:r),renderOption:r=>r.value===B?h(ne,{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:l("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:se(Ie(n))}),valueText:r=>se(Ie(n))??r?.label??""})}function nn({sectionName:n,onBack:o,textEditor:s,styleRow:i,children:c}){return h("div",{className:"sf-part-panel",children:[t(K,{inline:!0,name:l(n),onSelect:o}),s,i,c]})}function Ee({source:n,slug:o,menuId:s}){const i=Dt(),c=Mt[n],r=!c.needsSlug||!!o;return t("div",{className:"sf-note sf-note--source",children:h("p",{className:"es-field-hint sf-hint-keep",children:[l(Wt[n]),r?h(ne,{children:[" ",t("button",{type:"button",className:"sf-source-open",onClick:()=>{c.type==="storefront-editor:open-menus"?i.send(c.type,{menuId:s??null}):o&&i.send(c.type,{slug:o})},children:l(jt)})]}):null]})})}const Fe=4,on=120;function ln({region:n,sizePx:o,face:s,base:i,onFollowStyle:c,source:r,slug:D,onBack:v}){const F=n.follows;return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:l(n.label)})}),t("p",{children:o?l("Its size follows Site styles ▸ {follows} — {px}px right now.",{follows:l(F),px:Math.round(o)}):l("Its size follows Site styles ▸ {follows}.",{follows:l(F)})}),c?t(ne,{children:t(tt,{label:l("Style"),icon:t(nt,{}),hint:l("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:l(n.label).toLowerCase()}),children:t(tn,{face:s,base:i,onPick:c})})}):t("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),r?t(Ee,{source:r,slug:D}):null,t(K,{inline:!0,name:l("Page"),onSelect:v})]})}function sn({onBack:n}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:l("This part is no longer here.")})}),t("p",{children:l("The section it belonged to has been changed or removed.")}),t(K,{inline:!0,name:l("Page"),onSelect:n})]})}function rn({onBack:n,partId:o,why:s}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:l("This part's settings did not open.")})}),t("p",{children:l("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," — ",s]})}),t(K,{inline:!0,name:l("Page"),onSelect:n})]})}function an({nodeId:n,propKey:o,onBack:s,onEditStyle:i}){const{getItemById:c,getSelectorForId:r,config:D}=lt(e=>e),v=Tt(),F=Bt(),{partStyle:_}=bt(),{fonts:W,textStyles:_e}=ct(),M=qe(ut),ie=!M?.capabilities?.hasSiteTheme,{persist:ze}=gt({themeFromDocument:ie,tokenRef:M?.tokenRef,siteId:M?.siteId??null}),R=St({themeFromDocument:ie,persist:ze}),[Ae,j]=Te(!1),Ve=xt()==="mobile",ae=Je(null),d=c(n),m=r(n),ce=d?D.components[d.type]:void 0,{key:S,row:g}=It(o),de=ce?.fields?.[S],y=g?Rt(de,g):de,T=Xt(n,o),p=d?.props??{},x=Ot(y),ue=Pt(y),fe=Yt(y),Le=d?Ht(d.type):null,pe=d?Gt(d.type,S):null,G=g?Ft(p[S],g):p[S],me=!!g&&!(Array.isArray(p[S])&&g.index<p[S].length);oe(()=>{if(Ut(document))return;ae.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[T]);const[H,he]=Te(0);oe(()=>he(0),[T]);const $=!!d&&!me&&(!m||!y);oe(()=>{if(!$||H>=Fe)return;const e=setTimeout(()=>he(a=>a+1),on);return()=>clearTimeout(e)},[$,H]);const Ke=$&&H<Fe;if(!d||me)return t(sn,{onBack:s});const z=qt(d.type),ye=z?Jt(z,o):null;if(z&&ye){const e=_?.partId===T?_:null,a=z[ye],f=a.writable===!0&&!!m,b=te=>{m&&v.replaceComponent(m.zone,m.index,{...d,props:E(p,o,"role",te)})};return t(ln,{region:a,sizePx:e?.base.sizePx??null,face:re(p,o,e,W),base:e?.base??null,onFollowStyle:f?b:void 0,source:Le,slug:Re(p),onBack:s})}if(!m||!y)return Ke?t("div",{className:"sf-note","aria-busy":"true"}):t(rn,{onBack:s,partId:T,why:m?"no field":"no selector"});const Se=e=>{v.replaceComponent(m.zone,m.index,{...d,props:e})},X=e=>{if(U(e).hidden!==U(G).hidden||!x){const f=g?Et(p,S,g,e):{...p,[S]:e};f&&Se(f);return}Kt({node:d,propKey:o,kind:x,zone:m.zone,index:m.index},U(e).text,v.replaceComponent)},Ue=G,N=_?.partId===T?_:null,C=N?.styleOwner,A=C?c(C.owner):null,Y=C&&A?r(C.owner):null,q=!!(C&&A&&Y),k=q?A.props??{}:p,J=q?e=>v.replaceComponent(Y.zone,Y.index,{...A,props:e}):Se,V=q?C.kind:Lt(d?.type,o),P=Oe(k,V),u=[{partKey:V,face:re(k,V,N,W),sizeGroup:N?.sizeGroup??null,base:N?.base??dn,style:P}],Be=en(u,e=>e.sizeGroup),De=Vt(N?.inks),I=(e,a)=>{let f=k;for(const b of u)f=E(f,b.partKey,e,a);J(f)},We=e=>e?I("textStyle",e):Q({textStyle:null,role:null}),Q=e=>{let a=k;for(const f of u)for(const[b,te]of Object.entries(e))a=E(a,f.partKey,b,te??null);J(a)},Z=x==="text"||x==="textarea",{text:ge,hidden:O}=U(G),L=y?.[vt]?.label??o,xe=O?l("Show {label} on the slide",{label:l(L)}):l("Hide {label} on the slide",{label:l(L)}),be=h("div",{className:"sf-field-head",children:[t(ot,{}),t("span",{className:"sf-field-label sf-field-label--inline",children:l(L)}),Z&&t(rt,{content:xe,children:t("button",{type:"button",className:"sf-field-eye","aria-pressed":O,"aria-label":xe,onClick:()=>X({text:ge,hidden:!O}),children:O?t(Ne,{name:"eye-off",size:14}):t(Ne,{name:"eye",size:14})})})]}),Pe=!ue&&fe,Me=!!x&&(wt(y)||ue||O||!fe),we=re(k,V,N,W),je=we.kind==="role"?we.role:null,ee=zt(P)??yt(je),ve=ht(R.saved,R.old),Ge=Object.entries(P).filter(([e,a])=>e!=="role"&&e!=="textStyle"&&a!==void 0).length,He=()=>{let e=k;for(const a of u){const{role:f,textStyle:b}=a.style;e=At(e,a.partKey),f&&(e=E(e,a.partKey,"role",f)),b&&(e=E(e,a.partKey,"textStyle",b))}J(e)},w=ee,$e=ft(u[0].style),Xe=w?ve.find(e=>e.id===w)?.name??w:"",Ye=()=>{j(!1),w&&(R.write(mt({saved:R.saved,old:R.old,styleId:w,values:pt(u[0].style)}),!0),He())};return h(nn,{sectionName:ce?.label??d.type,onBack:s,textEditor:t("div",{ref:ae,className:"sf-part-text",children:Me?t(it,{text:ge,onTextChange:e=>X(Z?{text:e,hidden:O}:e),multiline:Ct(x),markup:x!=="plainText",styled:!1,style:u[0].style,base:u[0].base,setValue:Q,colors:De,placeholder:se(kt(y))??void 0,ariaLabel:l(L),head:be,typedOnCanvas:F===T}):x?Z?be:null:t(et,{field:y,name:o,value:Ue,onChange:X,id:`sf-part-${n}-${o}`})}),children:[pe&&t(Ee,{source:pe,slug:Re(p),menuId:$t(p)}),Pe&&t(st,{style:{value:ee??"",options:[{value:"",label:l("No style"),description:l("Section’s own")},...ve.map(e=>({value:e.id,label:e.name,description:e.values.font?le(e.values.font)?.label:void 0}))],onChange:e=>We(e||null),changed:Ge>0,onEditStyles:i,onUpdateStyle:w&&$e?()=>j(!0):void 0},font:{value:P.font??"",styleValue:le(u[0].base.fontKey)?.label,options:Nt.map(e=>({label:e.label,value:e.key})),onChange:e=>I("font",e||null)},italic:{value:P.italic,styleValue:cn(_e,ee),onChange:e=>I("italic",e??null)},cells:at(u[0].style,u[0].base,Q,{phone:Ve}),align:{value:P.align??"",styleValue:u[0].base.align,onChange:e=>I("align",e||null)},letterCase:{value:P.case??"",styleValue:u[0].base.case,onChange:e=>I("case",e||null)}}),Ae&&w&&t(dt,{styleName:Xe,onCancel:()=>j(!1),onConfirm:Ye}),Pe&&Be===null&&t("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size — the site’s Text setting doesn’t resize this.")})]})}function cn(n,o){return!o||!Array.isArray(n)?!1:n.find(i=>i?.id===o)?.values?.italic===!0}const dn={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:_t};export{nn as PartPanelBody,Qe as PartResetDot,Ee as PartSourceNote,tn as PartStyleSelect,an as default,re as partFace};
|
|
1
|
+
"use client";import{jsx as t,Fragment as ne,jsxs as h}from"react/jsx-runtime";import{useContext as qe,useEffect as oe,useRef as Je,useState as Te}from"react";import{PartResetDot as Qe}from"./PartResetDot.js";import{FieldSelect as Ze,InspectorField as et}from"efficient-easel/fields";import{SettingsField as tt}from"efficient-easel/panel";import{InspectorUpLevel as K}from"efficient-easel/chrome";import{StylesIcon as nt,TypeIcon as ot}from"efficient-easel/icons";import{useEasel as lt}from"efficient-easel/easel";import{TextPartPanel as st}from"efficient-easel/copy";import{Tooltip as rt}from"efficient-shell/ui";import{PartTextBox as it,partTextCells as at}from"./PartTextBox.js";import{UiIcon as Ne}from"efficient-easel/draw/client";import{usePreviewHeader as ct}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as dt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as ut}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as ft,partStyleToTextStyleValues as pt,pushIntoStyle as mt,resolveTextStyles as ht,styleIdOfRole as yt}from"../../render/lib/text-styles/site-text-styles.js";import{useSiteTextStylesWriter as St}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as gt}from"../lib/theme-row-persist.js";import{usePreviewDevice as xt}from"efficient-easel/draw/client";import{usePartStyle as bt}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as U,textFieldOffPage as Pt,textFieldPanelOnly as wt}from"../lib/puck/controls.js";import{TEXT_FIELD_MARKER as vt}from"efficient-easel/draw";import{useSectionOps as Tt}from"efficient-easel/screen/lib/puck/use-section-ops";import{FONT_OPTIONS as Nt,FONT_ROLES as Ce,FONT_ROLE_LABELS as ke,fontOption as le}from"../../format/lib/fonts.js";import{isMultilineKind as Ct,partPlaceholder as kt,typeInPlaceKind as Ot}from"../../render/lib/puck/part-text.js";import{partRowField as Rt}from"../lib/puck/part-row-field.js";import{decodePartKey as It,partPropsWithRowValue as Et,partRowValue as Ft}from"../../render/lib/puck/part-rows.js";import{PART_WIDTH_MAX as _t,followedStyleOf as zt,propsWithPartStyleValue as E,propsWithoutPartStyle as At,readPartStyle as Oe}from"../../render/lib/puck/part-styles.js";import{partThemeColors as Vt}from"../../format/lib/puck/part-inks.js";import{styleKeyForPart as Lt}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as Kt}from"../lib/puck/part-typing.js";import{keysOnCanvas as Ut,useCanvasTypingPart as Bt}from"../lib/puck/canvas-typing.js";import{useEaselHost as Dt}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as Wt,SOURCE_ACTIONS as Mt,SOURCE_ACTION_LABEL as jt,partSourceNoteFor as Gt,partSourceOf as Ht,sourceMenuIdOf as $t,sourceSlugOf as Re}from"../../format/lib/puck/source-bound-parts.js";import{encodePartId as Xt,holdsAuthoredText as Yt}from"../../render/lib/puck/text-parts.js";import{regionsForSection as qt}from"../../format/lib/sections/section-text-regions.js";import{textRegionOfPartKey as Jt}from"../../format/lib/sections/text-regions.js";function se(n){return n?l(n):null}function Ie(n){return n.kind==="role"?ke[n.role]:n.kind==="custom"?"Custom":null}function Qt(n){const o=n.role;return o&&Ce.includes(o)?{kind:"role",role:o}:null}function Zt(n,o){if(!n)return{kind:"unread"};const{faceRole:s,base:i}=n;if(o[s]===i.fontKey)return{kind:"role",role:s};const c=Object.keys(o).filter(r=>o[r]===i.fontKey);return c.length===1?{kind:"role",role:c[0]}:{kind:"custom"}}function re(n,o,s,i){return Qt(Oe(n,o))??Zt(s,i)}function en(n,o){if(!n.length)return null;const s=o(n[0]);return n.every(i=>o(i)===s)?s:null}const B="";function tn({face:n,base:o,onPick:s}){const i=n.kind==="role"?n.role:B,c=[{label:l("No style"),value:B},...Ce.map(r=>({label:l(ke[r]),value:r}))];return t(Ze,{ariaLabel:l("Style"),value:i,options:c,inline:!0,onChange:r=>s(r===B?null:r),renderOption:r=>r.value===B?h(ne,{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:l("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:se(Ie(n))}),valueText:r=>se(Ie(n))??r?.label??""})}function nn({sectionName:n,onBack:o,textEditor:s,styleRow:i,children:c}){return h("div",{className:"sf-part-panel",children:[t(K,{inline:!0,name:l(n),onSelect:o}),s,i,c]})}function Ee({source:n,slug:o,menuId:s}){const i=Dt(),c=Mt[n],r=!c.needsSlug||!!o;return t("div",{className:"sf-note sf-note--source",children:h("p",{className:"es-field-hint sf-hint-keep",children:[l(Wt[n]),r?h(ne,{children:[" ",t("button",{type:"button",className:"sf-source-open",onClick:()=>{c.type==="storefront-editor:open-menus"?i.send(c.type,{menuId:s??null}):o&&i.send(c.type,{slug:o})},children:l(jt)})]}):null]})})}const Fe=4,on=120;function ln({region:n,sizePx:o,face:s,base:i,onFollowStyle:c,source:r,slug:D,onBack:v}){const F=n.follows;return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:l(n.label)})}),t("p",{children:o?l("Its size follows Site styles ▸ {follows} — {px}px right now.",{follows:l(F),px:Math.round(o)}):l("Its size follows Site styles ▸ {follows}.",{follows:l(F)})}),c?t(ne,{children:t(tt,{label:l("Style"),icon:t(nt,{}),hint:l("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:l(n.label).toLowerCase()}),children:t(tn,{face:s,base:i,onPick:c})})}):t("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),r?t(Ee,{source:r,slug:D}):null,t(K,{inline:!0,name:l("Page"),onSelect:v})]})}function sn({onBack:n}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:l("This part is no longer here.")})}),t("p",{children:l("The section it belonged to has been changed or removed.")}),t(K,{inline:!0,name:l("Page"),onSelect:n})]})}function rn({onBack:n,partId:o,why:s}){return h("div",{className:"sf-note",children:[t("p",{children:t("strong",{children:l("This part's settings did not open.")})}),t("p",{children:l("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," — ",s]})}),t(K,{inline:!0,name:l("Page"),onSelect:n})]})}function an({nodeId:n,propKey:o,onBack:s,onEditStyle:i}){const{getItemById:c,getSelectorForId:r,config:D}=lt(e=>e),v=Tt(),F=Bt(),{partStyle:_}=bt(),{fonts:W,textStyles:_e}=ct(),M=qe(ut),ie=!M?.capabilities?.hasSiteTheme,{persist:ze}=gt({themeFromDocument:ie,tokenRef:M?.tokenRef,siteId:M?.siteId??null}),R=St({themeFromDocument:ie,persist:ze}),[Ae,j]=Te(!1),Ve=xt()==="mobile",ae=Je(null),d=c(n),m=r(n),ce=d?D.components[d.type]:void 0,{key:S,row:g}=It(o),de=ce?.fields?.[S],y=g?Rt(de,g):de,T=Xt(n,o),p=d?.props??{},x=Ot(y),ue=Pt(y),fe=Yt(y),Le=d?Ht(d.type):null,pe=d?Gt(d.type,S):null,G=g?Ft(p[S],g):p[S],me=!!g&&!(Array.isArray(p[S])&&g.index<p[S].length);oe(()=>{if(Ut(document))return;ae.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[T]);const[H,he]=Te(0);oe(()=>he(0),[T]);const $=!!d&&!me&&(!m||!y);oe(()=>{if(!$||H>=Fe)return;const e=setTimeout(()=>he(a=>a+1),on);return()=>clearTimeout(e)},[$,H]);const Ke=$&&H<Fe;if(!d||me)return t(sn,{onBack:s});const z=qt(d.type),ye=z?Jt(z,o):null;if(z&&ye){const e=_?.partId===T?_:null,a=z[ye],f=a.writable===!0&&!!m,b=te=>{m&&v.replaceComponent(m.zone,m.index,{...d,props:E(p,o,"role",te)})};return t(ln,{region:a,sizePx:e?.base.sizePx??null,face:re(p,o,e,W),base:e?.base??null,onFollowStyle:f?b:void 0,source:Le,slug:Re(p),onBack:s})}if(!m||!y)return Ke?t("div",{className:"sf-note","aria-busy":"true"}):t(rn,{onBack:s,partId:T,why:m?"no field":"no selector"});const Se=e=>{v.replaceComponent(m.zone,m.index,{...d,props:e})},X=e=>{if(U(e).hidden!==U(G).hidden||!x){const f=g?Et(p,S,g,e):{...p,[S]:e};f&&Se(f);return}Kt({node:d,propKey:o,kind:x,zone:m.zone,index:m.index},U(e).text,v.replaceComponent)},Ue=G,N=_?.partId===T?_:null,C=N?.styleOwner,A=C?c(C.owner):null,Y=C&&A?r(C.owner):null,q=!!(C&&A&&Y),k=q?A.props??{}:p,J=q?e=>v.replaceComponent(Y.zone,Y.index,{...A,props:e}):Se,V=q?C.kind:Lt(d?.type,o),P=Oe(k,V),u=[{partKey:V,face:re(k,V,N,W),sizeGroup:N?.sizeGroup??null,base:N?.base??dn,style:P}],Be=en(u,e=>e.sizeGroup),De=Vt(N?.inks),I=(e,a)=>{let f=k;for(const b of u)f=E(f,b.partKey,e,a);J(f)},We=e=>e?I("textStyle",e):Q({textStyle:null,role:null}),Q=e=>{let a=k;for(const f of u)for(const[b,te]of Object.entries(e))a=E(a,f.partKey,b,te??null);J(a)},Z=x==="text"||x==="textarea",{text:ge,hidden:O}=U(G),L=y?.[vt]?.label??o,xe=O?l("Show {label} on the slide",{label:l(L)}):l("Hide {label} on the slide",{label:l(L)}),be=h("div",{className:"sf-field-head",children:[t(ot,{}),t("span",{className:"sf-field-label sf-field-label--inline",children:l(L)}),Z&&t(rt,{content:xe,children:t("button",{type:"button",className:"sf-field-eye","aria-pressed":O,"aria-label":xe,onClick:()=>X({text:ge,hidden:!O}),children:O?t(Ne,{name:"eye-off",size:14}):t(Ne,{name:"eye",size:14})})})]}),Pe=!ue&&fe,Me=!!x&&(wt(y)||ue||O||!fe),we=re(k,V,N,W),je=we.kind==="role"?we.role:null,ee=zt(P)??yt(je),ve=ht(R.saved,R.old),Ge=Object.entries(P).filter(([e,a])=>e!=="role"&&e!=="textStyle"&&a!==void 0).length,He=()=>{let e=k;for(const a of u){const{role:f,textStyle:b}=a.style;e=At(e,a.partKey),f&&(e=E(e,a.partKey,"role",f)),b&&(e=E(e,a.partKey,"textStyle",b))}J(e)},w=ee,$e=ft(u[0].style),Xe=w?ve.find(e=>e.id===w)?.name??w:"",Ye=()=>{j(!1),w&&(R.write(mt({saved:R.saved,old:R.old,styleId:w,values:pt(u[0].style)}),!0),He())};return h(nn,{sectionName:ce?.label??d.type,onBack:s,textEditor:t("div",{ref:ae,className:"sf-part-text",children:Me?t(it,{text:ge,onTextChange:e=>X(Z?{text:e,hidden:O}:e),multiline:Ct(x),markup:x!=="plainText",styled:!1,style:u[0].style,base:u[0].base,setValue:Q,colors:De,placeholder:se(kt(y))??void 0,ariaLabel:l(L),head:be,typedOnCanvas:F===T}):x?Z?be:null:t(et,{field:y,name:o,value:Ue,onChange:X,id:`sf-part-${n}-${o}`})}),children:[pe&&t(Ee,{source:pe,slug:Re(p),menuId:$t(p)}),Pe&&t(st,{style:{value:ee??"",options:[{value:"",label:l("No style"),description:l("Section’s own")},...ve.map(e=>({value:e.id,label:e.name,description:e.values.font?le(e.values.font)?.label:void 0}))],onChange:e=>We(e||null),changed:Ge>0,onEditStyles:i,onUpdateStyle:w&&$e?()=>j(!0):void 0},font:{value:P.font??"",styleValue:le(u[0].base.fontKey)?.label,options:Nt.map(e=>({label:e.label,value:e.key})),onChange:e=>I("font",e||null)},italic:{value:P.italic,styleValue:cn(_e,ee),onChange:e=>I("italic",e??null)},cells:at(u[0].style,u[0].base,Q,{phone:Ve}),align:{value:P.align??"",styleValue:u[0].base.align,onChange:e=>I("align",e||null)},letterCase:{value:P.case??"",styleValue:u[0].base.case,onChange:e=>I("case",e||null)}}),Ae&&w&&t(dt,{styleName:Xe,onCancel:()=>j(!1),onConfirm:Ye}),Pe&&Be===null&&t("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size — the site’s Text setting doesn’t resize this.")})]})}function cn(n,o){return!o||!Array.isArray(n)?!1:n.find(i=>i?.id===o)?.values?.italic===!0}const dn={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:_t};export{nn as PartPanelBody,Qe as PartResetDot,Ee as PartSourceNote,tn as PartStyleSelect,an as default,re as partFace};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TextStyleColour, type TextStyleFont } from "efficient-easel/text-styles";
|
|
2
|
-
import { type OldSiteText, type StoredTextStyle } from "
|
|
2
|
+
import { type OldSiteText, type StoredTextStyle } from "../../render/lib/text-styles/site-text-styles.js";
|
|
3
3
|
export declare const SITE_FONTS: TextStyleFont[];
|
|
4
4
|
export default function SiteTextStylesField({ saved, old, colours, sizeOf, onChange, openId, onOpenChange, readOnly, withoutSize, }: {
|
|
5
5
|
saved: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as y}from"react/jsx-runtime";import{useState as O}from"react";import{TextStylesList as v}from"efficient-easel/text-styles";import{FONT_OPTIONS as x}from"../../format/lib/fonts.js";import{usePreviewDevice as I}from"efficient-easel/draw/client";import{applyListChange as _,resolveTextStyles as C,toPanelStyles as E}from"
|
|
1
|
+
"use client";import{jsx as y}from"react/jsx-runtime";import{useState as O}from"react";import{TextStylesList as v}from"efficient-easel/text-styles";import{FONT_OPTIONS as x}from"../../format/lib/fonts.js";import{usePreviewDevice as I}from"efficient-easel/draw/client";import{applyListChange as _,resolveTextStyles as C,toPanelStyles as E}from"../../render/lib/text-styles/site-text-styles.js";const c=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],b=["size","lineSpacing","letterSpacing","letterCase"],k=500,w=x.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function L({saved:e,old:s,colours:p,sizeOf:o,onChange:f,openId:a,onOpenChange:S,readOnly:d=!1,withoutSize:g=!1}){const[m,u]=O(null),T=I()==="mobile",l=C(e,s),r=E(l,o);return y(v,{styles:r,onChange:t=>f(_({saved:e,old:s,cur:r,next:t,sizeOf:o})),fonts:w,colours:p,settings:g?c.filter(t=>t!=="size"):c,auto:b,openId:a===void 0?m:a,onOpenChange:S??u,readOnly:d,device:T?"phone":"desktop",fallback:t=>{const n=l.find(h=>h.id===(t.kind==="heading"?"heading-1":"body-1")),i={};return n?.values.font&&t.id!==n.id&&(i.font=n.values.font),t.kind==="heading"&&(i.weight=k),i}})}export{w as SITE_FONTS,L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as c,jsxs as it}from"react/jsx-runtime";import{useCallback as n,useEffect as S,useMemo as oe,useRef as f,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 ct}from"../lib/puck/build-config.js";import{ChromeWrap as st}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as dt}from"efficient-easel/screen/lib/session";import{refreshSiteLiveState as ut}from"../lib/site-live-state.js";import{holdSiteWrites as ht}from"../../format/lib/site-writes.js";import{backendOf as W,blocksOf as lt}from"../lib/website-session.js";import{useEaselSession as mt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as pt}from"../../format/lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as St}from"../../format/lib/puck/templateFields.js";import{setEditorPage as ne}from"../../format/lib/puck/editor-page-context.js";import{resolveSiteName as ft}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as gt,normalizeSiteWidth as wt}from"../../format/lib/content/page-width.js";import{normalizeSiteBackground as ae}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as Ct}from"../../format/lib/content/container-gap.js";import _t,{DocumentScreen as Tt}from"efficient-easel/screen/components/ScreenMount";import{useScreenDocument as Et}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as yt}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as Pt}from"./PreviewFooterContext.js";import{PreviewChatProvider as vt,DEFAULT_CHAT_PREVIEW as Wt}from"./PreviewChatContext.js";import{PreviewSocialProvider as Ht}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as kt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Gt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Bt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Rt}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as It}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Ft}from"efficient-easel/draw/client";import{CanvasPartsBridge as Dt}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as Mt}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as xt}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as Nt,DEFAULT_HEADING_COMPRESSION as Ot,DEFAULT_HEADING_TYPOGRAPHY as bt,DEFAULT_SWITCH_SHOWN as H,DEFAULT_SIZES as At,DEFAULT_THEME_MODE as _,normalizeCornerRadius as zt,normalizeCornerStyle as Lt,normalizeCardShadow as Yt,normalizeCardGap as Ut,normalizeHoverEffect as jt,normalizeShadowColor as Kt,IDENTITY_CARD_GAP as ie,IDENTITY_CARD_SHADOW as Vt,IDENTITY_HOVER_EFFECT as Xt,THEME_MODE_KEY as ce,THEME_STORAGE_KEY as Zt,THEME_SWITCH_HIDE as se,THEME_SWITCH_KEY as k}from"../../format/lib/theme.js";import{DEFAULT_FONTS as qt}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as Jt}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as Qt}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as $t}from"
|
|
1
|
+
"use client";import{jsx as c,jsxs as it}from"react/jsx-runtime";import{useCallback as n,useEffect as S,useMemo as oe,useRef as f,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 ct}from"../lib/puck/build-config.js";import{ChromeWrap as st}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as dt}from"efficient-easel/screen/lib/session";import{refreshSiteLiveState as ut}from"../lib/site-live-state.js";import{holdSiteWrites as ht}from"../../format/lib/site-writes.js";import{backendOf as W,blocksOf as lt}from"../lib/website-session.js";import{useEaselSession as mt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as pt}from"../../format/lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as St}from"../../format/lib/puck/templateFields.js";import{setEditorPage as ne}from"../../format/lib/puck/editor-page-context.js";import{resolveSiteName as ft}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as gt,normalizeSiteWidth as wt}from"../../format/lib/content/page-width.js";import{normalizeSiteBackground as ae}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as Ct}from"../../format/lib/content/container-gap.js";import _t,{DocumentScreen as Tt}from"efficient-easel/screen/components/ScreenMount";import{useScreenDocument as Et}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as yt}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as Pt}from"./PreviewFooterContext.js";import{PreviewChatProvider as vt,DEFAULT_CHAT_PREVIEW as Wt}from"./PreviewChatContext.js";import{PreviewSocialProvider as Ht}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as kt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Gt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Bt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Rt}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as It}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Ft}from"efficient-easel/draw/client";import{CanvasPartsBridge as Dt}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as Mt}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as xt}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as Nt,DEFAULT_HEADING_COMPRESSION as Ot,DEFAULT_HEADING_TYPOGRAPHY as bt,DEFAULT_SWITCH_SHOWN as H,DEFAULT_SIZES as At,DEFAULT_THEME_MODE as _,normalizeCornerRadius as zt,normalizeCornerStyle as Lt,normalizeCardShadow as Yt,normalizeCardGap as Ut,normalizeHoverEffect as jt,normalizeShadowColor as Kt,IDENTITY_CARD_GAP as ie,IDENTITY_CARD_SHADOW as Vt,IDENTITY_HOVER_EFFECT as Xt,THEME_MODE_KEY as ce,THEME_STORAGE_KEY as Zt,THEME_SWITCH_HIDE as se,THEME_SWITCH_KEY as k}from"../../format/lib/theme.js";import{DEFAULT_FONTS as qt}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as Jt}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as Qt}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as $t}from"../../render/lib/text-styles/site-text-styles.js";import{wordStylesFromRow as er}from"../../format/lib/word-styles.js";import{chatPreviewFrom as tr}from"./PreviewChatContext.js";const rr=()=>{if(typeof window>"u")return _;try{const i=window.localStorage.getItem(ce);return i==="light"||i==="dark"||i==="auto"?i:_}catch{return _}},de=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(ce,i)}catch{}},or=()=>{if(typeof window>"u")return H;try{return window.localStorage.getItem(k)!==se}catch{return H}},nr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(Zt)}catch{}},ue=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(k):window.localStorage.setItem(k,se)}catch{}};function ar(){const{adapter:i,capabilities:d,templateId:G,ready:w,token:h,siteId:s,currentSlug:B,currentKind:R}=Et();S(()=>(ne(B,R),()=>ne(null,null)),[B,R]);const T=d.placeholderFrames,[he,I]=r(null),[le,F]=r("");S(()=>{const e=i.templateName;if(!w||!G||!e){F("");return}let a=!1;return e().then(l=>!a&&F(l??"")).catch(()=>{}),()=>{a=!0}},[w,h,G,i]);const[me,E]=r(_),[pe,y]=r(H),[Se,D]=r({selected:0,themes:[]}),[fe,M]=r(qt),[ge,x]=r(At),[we,N]=r(null),[Ce,O]=r(Ot),[_e,b]=r(null),[Te,A]=r(null),[Ee,z]=r(ie),[ye,L]=r(null),[Pe,Y]=r(null),[ve,U]=r(null),[P,j]=r(null),u=mt(),K=oe(()=>ct(dt(u),lt(u)),[u]),We=oe(()=>pt(St(K,T),P),[K,T,P]),[He,V]=r(bt),[ke,X]=r(null),[Ge,Z]=r(null),[Be,q]=r(null),[Re,J]=r(null),[Ie,Q]=r(null),$=f(null),o=f(!1);S(()=>{E(rr()),y(or())},[]);const Fe=n(e=>{o.current=!0,nr(),de(e),E(e)},[]),De=n(e=>{o.current=!0,ue(e),y(e)},[]),Me=n(e=>{o.current=!0,D(e)},[]),xe=n(e=>{o.current=!0,M(e)},[]),Ne=n(e=>{o.current=!0,x(e)},[]),Oe=n(e=>{o.current=!0,N(e)},[]),be=n(e=>{o.current=!0,O(e)},[]),Ae=n(e=>{o.current=!0,b(e)},[]),ze=n(e=>{o.current=!0,A(e)},[]),Le=n(e=>{o.current=!0,z(e)},[]),Ye=n(e=>{o.current=!0,L(e)},[]),Ue=n(e=>{o.current=!0,V(e)},[]),[je,ee]=r(null),[Ke,Ve]=r(null),Xe=n(e=>{o.current=!0,ee(e)},[]),Ze=n(e=>{o.current=!0,Y(e)},[]),qe=n(e=>{o.current=!0,U(e)},[]),Je=n(e=>{o.current=!0,j(e)},[]),Qe=n(e=>{o.current=!0,X(e)},[]),$e=n(e=>{o.current=!0,Z(e)},[]),et=n(e=>{o.current=!0,q(e)},[]),tt=n(e=>{o.current=!0,J(e)},[]),rt=n(e=>{o.current=!0,Q(e)},[]);S(()=>{const e=W(u).theme;if(!h||!d.hasSiteTheme||!e)return;const a=s??"";$.current!==a&&($.current=a,o.current=!1);let l=!1;return e.get(s?{siteId:s}:void 0).then(t=>{if(l||o.current)return;de(t.default_mode),ue(t.show_theme_switch),E(t.default_mode),y(t.show_theme_switch),D({selected:t.selected_preset,themes:t.theme_presets});const g=$t(t);M(g.fonts),x(g.sizes),N(t.corner_radius_px===void 0?Nt[Lt(t.corner_style)]:zt(t.corner_radius_px)),O(g.compression),b(t.card_shadow==null?Vt:Yt(t.card_shadow)),z(t.card_gap==null?ie:Ut(t.card_gap)),L(t.hover_effect==null?Xt:jt(t.hover_effect)),A(Kt(t.shadow_color)),Y(wt(t.site_width)),U(gt(t.site_gutter)),j(Ct(t.block_gap)),V(g.typography),ee(g.textStyles),Ve(er(t)),X(t.hero_background_follows_width===!0),Z(ae(t.section_background_width)),q(ae(t.section_content_width)),J(t.photography_grayscale===!0),Q(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{l=!0}},[h,s,d.hasSiteTheme,u]);const ot=kt({token:h,siteId:s,enabled:d.hasSiteSettings}),[nt,te]=r(Wt),re=f(null),v=f(!1),m=f(null),p=f({}),C=n(async()=>{m.current&&clearTimeout(m.current),m.current=null;const e=p.current;p.current={};try{await W(u).chat?.update(e,s?{siteId:s}:void 0),ut()}catch(a){throw p.current={...e,...p.current},a}},[u,s]);S(()=>ht(()=>m.current||Object.keys(p.current).length>0?C():void 0),[C]);const at=n(e=>{v.current=!0,te(a=>({...a,...e})),!(!d.hasSiteSettings||!h)&&(p.current={...p.current,...e},m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{C().catch(()=>{})},500))},[d.hasSiteSettings,h,C]);return S(()=>{if(!h||!d.hasSiteSettings)return;const e=s??"";re.current!==e&&(re.current=e,v.current=!1);let a=!1;const l=W(u).chat;if(l)return l.get(s?{siteId:s}:void 0).then(t=>{a||v.current||te(tr(t))}).catch(()=>{}),()=>{a=!0}},[h,s,d.hasSiteSettings,u]),S(()=>{const e=i.site;if(!w||!d.hasSiteRecord||!e){I(null);return}let a=!1;return e().then(l=>{a||I(ft(l.name))}).catch(()=>{}),()=>{a=!0}},[w,h,d.hasSiteRecord,s,i]),c(Tt,{config:We,parts:Jt,wrap:(e,a)=>c(yt,{websiteName:he,templateChrome:T,templateName:le||null,themeMode:me,onThemeModeChange:Fe,themeSwitchShown:pe,onThemeSwitchShownChange:De,theme:Se,onThemeChange:Me,fonts:fe,onFontsChange:xe,cornerRadiusPx:we,onCornerRadiusPxChange:Oe,cardShadow:_e,onCardShadowChange:Ae,shadowColor:Te,onShadowColorChange:ze,cardGap:Ee,onCardGapChange:Le,hoverEffect:ye,onHoverEffectChange:Ye,headingCompression:Ce,onHeadingCompressionChange:be,headingTypography:He,onHeadingTypographyChange:Ue,textStyles:je,onTextStylesChange:Xe,wordStyles:Ke,sizes:ge,onSizesChange:Ne,siteWidth:Pe,onSiteWidthChange:Ze,siteGutter:ve,onSiteGutterChange:qe,blockGap:P,onBlockGapChange:Je,heroBackgroundFollowsWidth:ke,onHeroBackgroundFollowsWidthChange:Qe,sectionBackgroundWidth:Ge,onSectionBackgroundWidthChange:$e,sectionContentWidth:Be,onSectionContentWidthChange:et,photographyGrayscale:Re,onPhotographyGrayscaleChange:tt,shareButtonOnPosts:Ie,onShareButtonOnPostsChange:rt,themeFromDocument:!d.hasSiteTheme,children:c(Pt,{children:c(st,{wrap:u.chrome?.wrap,surface:"page",children:c(Rt,{children:c(It,{children:c(Ft,{children:c(Dt,{children:c(Mt,{children:it(xt,{children:[c(vt,{chat:nt,onChatChange:at,children:c(Ht,{value:ot,children:c(Gt,{children:e})})}),a]})})})})})})})})})})}function ir({target:i}){return c(_t,{target:i,addressing:Bt,onHostMessage:Qt,children:c(ar,{})})}export{ir as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as d,Fragment as _}from"react/jsx-runtime";import{SettingsField as b,SettingsGroupSub as z}from"efficient-easel/panel";import{Button as p,IconButton as L,Tooltip as O}from"efficient-shell/ui";import A from"./ThemeColourField.js";import{say as o}from"../../format/lib/editor-words.js";import{ColourControl as k}from"../lib/puck/ColourControl.js";import{ButtonIcon as j,ChevronDownIcon as w,ChevronUpIcon as D,GroundIcon as P,LayoutIcon as G,SquareIcon as H,TextSmallIcon as M,TypeIcon as x}from"efficient-easel/icons";import{DEFAULT_THEMES as I,GRADE_LABEL as v,contrastRatio as T,gradeContrast as E,normalizeThemeColors as g,resolvedButtonInk as R,themeButtonColour as S,themeButtonInk as U}from"../../format/lib/theme.js";const J=t=>o("Theme {n}",{n:t+1});function $({colors:t}){const n=g(t),r=S(t)??n.accent;return d("span",{className:"sf-theme-page",style:{background:n.background,color:n.text},"aria-hidden":!0,children:[e("span",{className:"sf-theme-eyebrow",style:{color:n.muted},children:o("label")}),d("span",{className:"sf-theme-headline",children:[o("Heading")," ",e("span",{style:{color:n.accent},children:o("accent")})]}),e("span",{className:"sf-theme-body",children:o("body text")}),d("span",{className:"sf-theme-row",children:[e("span",{className:"sf-theme-btn",style:{background:r,color:R(t,n.accent)},children:o("button")}),e("span",{className:"sf-theme-mini",style:{background:n.surface,borderColor:n.line},children:o("card")})]})]})}const N={"Text color":e(x,{}),"Label color":e(M,{}),Background:e(P,{}),"Panels & cards":e(G,{}),Borders:e(H,{}),"Button color":e(j,{}),"Button text color":e(x,{})};function W({label:t,colorKey:n,value:r,onChange:c,idPrefix:a="sf-theme-ink"}){const s=`${a}-${n}`;return e(b,{label:o(t),icon:N[t],htmlFor:s,action:e(k,{id:s,label:o(t),value:r,onChange:l=>c(n,l)})})}function q({value:t,accent:n,onChange:r,idPrefix:c="sf-theme-ink"}){const a=`${c}-button`,s=/^#[0-9a-fA-F]{6}$/.test(t??""),l=s?t:n;return e(b,{label:o("Button color"),icon:N["Button color"],htmlFor:a,action:e(k,{id:a,label:o("Button color"),value:l,caption:s?l:o("Main"),onChange:r})})}function K({colors:t,accent:n,onChange:r,idPrefix:c="sf-theme-ink"}){const a=`${c}-button-ink`,s=U(t),l=R(t,n),i=S(t)??n,u=E(T(l,i)??0);return e(b,{label:o("Button text color"),icon:N["Button text color"],hint:s&&u!=="good"?o("{grade} on the button",{grade:o(v[u])}):void 0,htmlFor:a,action:e(k,{id:a,label:o("Button text color"),value:l,caption:s?l:o("Auto"),onChange:r})})}const Q=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{group:"Surfaces"},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function V({colors:t,onChange:n,idPrefix:r}){const c=g(t);return e(_,{children:Q.map(a=>"colour"in a?e(A,{value:t,onChange:n},"colour"):"group"in a?e(z,{title:o(a.group)},a.group):"button"in a?e(q,{value:t.button,accent:c.accent,onChange:s=>n({...t,button:s}),idPrefix:r},"button"):"buttonInk"in a?e(K,{colors:t,accent:c.accent,onChange:s=>n({...t,buttonInk:s}),idPrefix:r},"buttonInk"):e(W,{label:a.label,colorKey:a.key,value:c[a.key],onChange:(s,l)=>n({...t,[s]:l}),idPrefix:r},a.key))})}function se({index:t,colors:n,selected:r,role:c="radio",open:a,editable:s=!0,onPick:l,onEdit:i,onChangeColors:u}){const h=g(n),m=J(t),f=t<I.length&&!n.brandInk?I[t]:null,y=E(T(h.text,h.background)??0),C=f?JSON.stringify(n)!==JSON.stringify(f):!1,B=a!==void 0;return d("div",{className:`sf-theme-card${r?" is-selected":""}`,children:[e("button",{type:"button",role:c,"aria-checked":c==="radio"?r:void 0,"aria-selected":c==="option"?r:void 0,"aria-label":m,className:"sf-theme-pick",onClick:l,children:e($,{colors:n})}),d("div",{className:"sf-theme-foot",children:[e("span",{className:"sf-theme-name",children:m}),y!=="good"&&e("span",{className:"sf-theme-warn",children:o(v[y])}),s&&i&&B&&e("span",{className:"sf-theme-edit",children:e(O,{content:a?o("Collapse"):o("Edit colors"),children:e(L,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${t}`,"aria-label":a?o("Collapse {name}",{name:m}):o("Edit colors for {name}",{name:m}),onClick:i,children:a?e(D,{size:14}):e(w,{size:14})})})}),s&&i&&!B&&e(p,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":o("Edit {name}",{name:m}),onClick:i,children:o("Edit")})]}),a&&d("div",{id:`sf-theme-colours-${t}`,className:"sf-theme-colours",children:[e(V,{colors:n,onChange:F=>u?.(F)}),f&&e(p,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!C,onClick:()=>u?.({...f}),children:C?o("Reset {name} to the preset",{name:m}):o("Not changed")})]})]})}function re({colors:t,name:n,nameId:r,open:c,menuId:a,labelId:s,buttonRef:l,onClick:i,onKeyDown:u,onEdit:h}){return d("div",{className:"sf-secttheme-btn",children:[e("button",{ref:l,type:"button",className:"sf-theme-pick","aria-expanded":c,"aria-controls":a,"aria-labelledby":`${s} ${r}`,onClick:i,onKeyDown:u,children:t?e($,{colors:t}):e("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),d("div",{className:"sf-theme-foot",children:[e("span",{id:r,className:"sf-theme-name",children:n}),h&&e(p,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":o("Edit {name}",{name:n}),onClick:h,children:o("Edit")}),e("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:e("span",{className:"sf-multi-caret",children:"▾"})})]})]})}export{se as ThemeCard,re as ThemeCardTrigger,W as ThemeColourRow,V as ThemeColourRows,$ as ThemePreview,J as themeName};
|
|
@@ -2791,9 +2791,10 @@
|
|
|
2791
2791
|
/* With no warning beside it the Edit still sits hard right. */
|
|
2792
2792
|
.sf-theme-name { margin-right: auto; }
|
|
2793
2793
|
|
|
2794
|
-
/* The
|
|
2795
|
-
|
|
2796
|
-
|
|
2794
|
+
/* The open/close control is efficient-shell's ghost `IconButton` in its
|
|
2795
|
+
`Tooltip` (chevron-down folded, chevron-up open; ruling A4f); in the
|
|
2796
|
+
section's Theme menu it is the shell's `Button` "Edit". Either way the look
|
|
2797
|
+
is the shell's. This class only keeps it from shrinking in the foot. */
|
|
2797
2798
|
.sf-theme-edit {
|
|
2798
2799
|
flex: none;
|
|
2799
2800
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as E}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as X,textStylesCss as Y}from"
|
|
1
|
+
import{jsx as r,jsxs as E}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as X,textStylesCss as Y}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as q,PAGE_WIDTH_ATTR as J,siteWidthTokens as Q,siteGutterTokens as U,heroBackgroundTokens as Z}from"../../../format/lib/content/page-width.js";import{siteBlockGapTokens as ee}from"../../../format/lib/content/container-gap.js";import{siteCardRadiusTokens as te}from"../../../format/lib/content/card-corners.js";import{usePreviewHeader as oe}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as re}from"../../../render/components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as ne,normalizeCornerStyle as ae,normalizeCornerRadius as se,themeColorStyle as ie,typeSizesStyle as de,headingTypographyStyle as ce,normalizeHeadingTypography as le,themeAccentStyle as pe,themeButtonStyle as he,themePresetAccentVars as me,themeSurfaceStyle as fe,siteCornerRadiusTokens as A,shadowColorTokens as ue,headingCompressionAttr as ge,cardShadowAttr as Se,cardGapAttr as ye,hoverEffectAttr as xe}from"../../../format/lib/theme.js";import{fontRoleStyle as Te}from"../../../format/lib/fonts.js";import{wordStyleTokens as ke}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Ce,pageHasHeaderSection as P,pageTakesTopSpace as Ee,topSpaceMarker as Ae,TOP_SPACE_ATTR as Pe,HEADER_CLEARANCE_CLASS as ve}from"../../../render/lib/puck/header-clearance.js";import{leadSectionInk as _e,HEADER_INK_ATTR as Re}from"../../../render/lib/puck/header-ink.js";import{useEasel as we}from"efficient-easel/easel";import{pageBackgroundVars as Ie}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as We}from"../../../render/lib/puck/page-frame.js";import{EditingBridgesProvider as Be}from"../../../render/lib/puck/editing-bridges.js";import Ge from"../../components/SectionTextPartBridge.js";const He={SectionTextParts:Ge};import{PageWidthWrapper as at,PublishedPageFrame as st,pageWidthTokens as it}from"../../../render/lib/puck/page-frame.js";const Ne="color-mix(in oklab, var(--bg) 40%, #ffffff)",be="12vh";function De({style:o,frameClass:n,children:d}){const{appState:a}=we(g=>g),t=a.data.content,s=a.data.root;if(Ce(t))return r("div",{className:`sf-themed-content${n?` ${n}`:""}`,style:{...o,background:Ne,minHeight:"100vh",paddingBottom:be},children:r("div",{style:{background:"var(--bg)"},children:d})});const c=P(t)&&Ee(s,t),l=P(t)?Ae(s,t):null,m=l?{[Pe]:l}:null,p=q(s?.widthChoice),f=p?{[J]:p}:null,h=c?null:_e(t),u=h?{[Re]:h}:null;return r("div",{className:`sf-themed-content${c?` ${ve}`:""}${n?` ${n}`:""}`,style:o,...u,...m,...f,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:d})})}function tt({propsTheme:o,propsFonts:n,propsCornerStyle:d,propsCornerRadiusPx:a,propsHeadingCompression:t,propsHeadingTypography:s,widthMode:c,fullWidth:l,pageWidth:m,pageBackground:p,chromeInheritsSiteBackground:f,suppressPreviewNav:h,footer:u,overlay:g,children:v}){const{theme:_,fonts:R,sizes:w,cornerRadiusPx:I,cardShadow:S,shadowColor:W,cardGap:B,hoverEffect:y,headingCompression:G,siteWidth:H,siteGutter:N,blockGap:b,headingTypography:D,heroBackgroundFollowsWidth:z,photographyGrayscale:V,textStyles:$,wordStyles:j,themeFromDocument:e}=oe(),i=e?o:_,F=e?n:R,L=e?void 0:w,x=e?a===void 0?ne[ae(d)]:se(a):I,O=e?t:G,T=e?s:D,k=[Y(X(e?void 0:$)),K(le(T).italicStrong)].filter(Boolean).join(`
|
|
2
2
|
`),C=We({widthMode:c,fullWidth:l,pageWidth:m}),M={...ie(i),...de(L),...ce(T),...C.style,...f?{}:Ie(p)};return E("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...Te(F),...ke(e?null:j),...pe(i),...he(i),...me(i),...fe(i),...A(x),...te(A(x)),...ue(e?void 0:S,e?void 0:W,e?void 0:y),...Q(e?void 0:H),...U(e?void 0:N),...ee(e?void 0:b),...Z(e?void 0:z)},"data-sf-headings":ge(O),"data-sf-card-shadow":e?void 0:Se(S),"data-sf-card-gap":e?void 0:ye(B),"data-sf-card-hover":e?void 0:xe(y),onClickCapture:h,children:[k?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:k}}):null,r(re,{grayscale:e?void 0:V,children:E(Be,{value:He,children:[r(De,{style:M,frameClass:C.frameClass,children:v}),u,g]})})]})}const ot=o=>{o.target?.closest?.("a")&&o.preventDefault()};export{He as EDITING_BRIDGES,De as EditorPageBody,tt as EditorThemedBody,at as PageWidthWrapper,st as PublishedPageFrame,Ne as SECTION_PREVIEW_CANVAS,be as SECTION_PREVIEW_CANVAS_TAIL,it as pageWidthTokens,ot as suppressPreviewNav};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FontsValue } from "../../format/lib/fonts.js";
|
|
2
2
|
import type { SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
|
|
3
|
-
import { type OldSiteText, type StoredTextStyle } from "
|
|
3
|
+
import { type OldSiteText, type StoredTextStyle } from "../../render/lib/text-styles/site-text-styles.js";
|
|
4
4
|
import { type HeadingCompression, type ResolvedHeadingTypography, type SizesValue } from "../../format/lib/theme.js";
|
|
5
5
|
export type SiteTextStylesWriter = {
|
|
6
6
|
fonts: FontsValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useEasel as E}from"efficient-easel/easel";import{usePreviewHeader as P}from"../../render/components/PreviewHeaderContext.js";import{normalizeFonts as R}from"../../format/lib/fonts.js";import{listChangePatch as A,resolveTextStyles as I,textStylesToOld as L}from"
|
|
1
|
+
"use client";import{useEasel as E}from"efficient-easel/easel";import{usePreviewHeader as P}from"../../render/components/PreviewHeaderContext.js";import{normalizeFonts as R}from"../../format/lib/fonts.js";import{listChangePatch as A,resolveTextStyles as I,textStylesToOld as L}from"../../render/lib/text-styles/site-text-styles.js";import{DEFAULT_SIZES as O,normalizeHeadingCompression as U,normalizeHeadingTypography as W}from"../../format/lib/theme.js";function B({themeFromDocument:t,persist:c}){const{appState:g,dispatch:l}=E(s=>s),{fonts:f,setFonts:h,sizes:S,setSizes:T,headingCompression:z,setHeadingCompression:m,headingTypography:C,setHeadingTypography:u,textStyles:v,setTextStyles:H}=P(),r=g.data,e=r.root?.props??{},i=t?R(e.fonts):f,p=t?O:S,n=t?U(e.headingCompression):z,a=t?W(e.headingTypography):C,y={fonts:i,sizes:p,compression:n,typography:a},w=t?e.textStyles:v,d=s=>l({type:"replaceRoot",root:{...r.root,props:{...e,...s}},recordHistory:!0});return{fonts:i,sizes:p,compression:n,typography:a,old:y,saved:w,write:(s,x)=>{const o=L(I(s.saved,s.old),s.old);t?d({textStyles:s.saved,fonts:o.fonts,headingCompression:o.compression,headingTypography:o.typography}):(H(s.saved),h(o.fonts),T(o.sizes),m(o.compression),u(o.typography)),c(A(s,y),x)},writeRoot:d}}export{B as useSiteTextStylesWriter};
|
|
@@ -1,83 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { type FontRole, type FontsValue } from "../../format/lib/fonts.js";
|
|
3
|
-
import { type PartStyle } from "../../render/lib/puck/part-styles.js";
|
|
4
|
-
import { faceClassOf } from "../../format/lib/text-style-face.js";
|
|
5
|
-
export { faceClassOf };
|
|
6
|
-
import type { SiteThemeRow, SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
|
|
7
|
-
import { type HeadingCompression, type ResolvedHeadingTypography, type SizesValue } from "../../format/lib/theme.js";
|
|
8
|
-
export type StoredTextStyleValues = {
|
|
9
|
-
font?: string;
|
|
10
|
-
color?: string;
|
|
11
|
-
size?: number;
|
|
12
|
-
weight?: number;
|
|
13
|
-
italic?: boolean;
|
|
14
|
-
lineHeight?: number;
|
|
15
|
-
letterSpacing?: number;
|
|
16
|
-
paragraphSpacing?: number;
|
|
17
|
-
letterCase?: TextStyleCase;
|
|
18
|
-
largestSize?: number;
|
|
19
|
-
sizePhone?: number;
|
|
20
|
-
};
|
|
21
|
-
export type StoredTextStyle = {
|
|
22
|
-
id: string;
|
|
23
|
-
kind: "heading" | "body";
|
|
24
|
-
name: string;
|
|
25
|
-
values: StoredTextStyleValues;
|
|
26
|
-
auto?: (keyof StoredTextStyleValues)[];
|
|
27
|
-
};
|
|
28
|
-
export type OldSiteText = {
|
|
29
|
-
fonts: Partial<FontsValue> | Record<string, string>;
|
|
30
|
-
sizes: Partial<SizesValue> | Record<string, number | null>;
|
|
31
|
-
compression: string;
|
|
32
|
-
typography: Partial<ResolvedHeadingTypography> | Record<string, unknown>;
|
|
33
|
-
};
|
|
34
|
-
export declare function textStylesFromOld(old: OldSiteText): StoredTextStyle[];
|
|
35
|
-
export declare function storedTextStyles(value: unknown): StoredTextStyle[];
|
|
36
|
-
export declare function resolveTextStyles(saved: unknown, old: OldSiteText): StoredTextStyle[];
|
|
37
|
-
export declare function applyListChange({ saved, old, cur, next, sizeOf, }: {
|
|
38
|
-
saved: unknown;
|
|
39
|
-
old: OldSiteText;
|
|
40
|
-
cur: readonly TextStyle[];
|
|
41
|
-
next: readonly TextStyle[];
|
|
42
|
-
sizeOf: (style: StoredTextStyle) => number;
|
|
43
|
-
}): {
|
|
44
|
-
saved: StoredTextStyle[];
|
|
45
|
-
old: OldSiteText;
|
|
46
|
-
};
|
|
47
|
-
export declare function listChangePatch(next: {
|
|
48
|
-
saved: StoredTextStyle[];
|
|
49
|
-
old: OldSiteText;
|
|
50
|
-
}, prev: OldSiteText): SiteThemeRowPatch;
|
|
51
|
-
export declare function toPanelStyles(stored: readonly StoredTextStyle[], sizeOf: (s: StoredTextStyle) => number): TextStyle[];
|
|
52
|
-
export declare function fromPanelStyles(list: readonly TextStyle[], sizeOf: (s: StoredTextStyle) => number): StoredTextStyle[];
|
|
53
|
-
export type SiteTextSeed = {
|
|
54
|
-
fonts: FontsValue;
|
|
55
|
-
sizes: SizesValue;
|
|
56
|
-
compression: HeadingCompression;
|
|
57
|
-
typography: ResolvedHeadingTypography;
|
|
58
|
-
textStyles: unknown;
|
|
59
|
-
};
|
|
60
|
-
export declare function siteTextFromRow(row: Partial<SiteThemeRow>): SiteTextSeed;
|
|
61
|
-
export declare function textStylesToOld(list: readonly StoredTextStyle[], prev: OldSiteText): OldSiteText;
|
|
62
|
-
export declare function themeWithTextStyles<T extends {
|
|
63
|
-
fonts?: unknown;
|
|
64
|
-
sizes?: unknown;
|
|
65
|
-
headingCompression?: unknown;
|
|
66
|
-
headingTypography?: unknown;
|
|
67
|
-
textStyles?: unknown;
|
|
68
|
-
}>(theme: T): T;
|
|
69
|
-
export declare function textStylesCss(list: readonly StoredTextStyle[]): string;
|
|
70
|
-
export declare function accentItalicCss(italic: boolean | null | undefined): string;
|
|
71
|
-
export declare function styleIdOfRole(role: FontRole | null | undefined): string | undefined;
|
|
72
|
-
export declare function partStyleToTextStyleValues(style: PartStyle): StoredTextStyleValues;
|
|
73
|
-
export declare function hasStyleChange(style: PartStyle): boolean;
|
|
74
|
-
export declare function pushIntoStyle({ saved, old, styleId, values, }: {
|
|
75
|
-
saved: unknown;
|
|
76
|
-
old: OldSiteText;
|
|
77
|
-
styleId: string;
|
|
78
|
-
values: StoredTextStyleValues;
|
|
79
|
-
}): {
|
|
80
|
-
saved: StoredTextStyle[];
|
|
81
|
-
old: OldSiteText;
|
|
82
|
-
};
|
|
83
|
-
export declare function eyebrowStyleId(list: readonly Pick<StoredTextStyle, "id" | "kind">[]): string;
|
|
1
|
+
export * from "../../render/lib/text-styles/site-text-styles.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
`)}const ne={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function me(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function ye(e){return e?U[e]:void 0}function te(e){const i=Z(e);return p({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:i.lineHeight,letterSpacing:i.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function Se(e){return Object.keys(te(e)).length>0}function be({saved:e,old:i,styleId:n,values:t}){return{saved:($(e)??O(i).map(o=>({...o,values:{}}))).map(o=>o.id===n?H({...o,values:p({...o.values,...t})},o.auto):o),old:i}}function xe(e){const i=e.filter(n=>n.kind==="body").map(n=>Number(/^body-(\d+)$/.exec(n.id)?.[1])).filter(n=>Number.isInteger(n)&&n>0);return i.length?`body-${Math.max(...i)}`:"body-1"}export{me as accentItalicCss,ce as applyListChange,xe as eyebrowStyleId,I as faceClassOf,K as fromPanelStyles,Se as hasStyleChange,ue as listChangePatch,te as partStyleToTextStyleValues,be as pushIntoStyle,w as resolveTextStyles,ge as siteTextFromRow,de as storedTextStyles,ye as styleIdOfRole,he as textStylesCss,O as textStylesFromOld,M as textStylesToOld,pe as themeWithTextStyles,fe as toPanelStyles};
|
|
1
|
+
export*from"../../render/lib/text-styles/site-text-styles.js";
|
|
@@ -276,6 +276,8 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
276
276
|
readonly "Clear {what}": "Clear {what}";
|
|
277
277
|
readonly "Clear {what}: {label}": "Clear {what}: {label}";
|
|
278
278
|
readonly "Click to play": "Click to play";
|
|
279
|
+
readonly Collapse: "Collapse";
|
|
280
|
+
readonly "Collapse {name}": "Collapse {name}";
|
|
279
281
|
readonly Collections: "Collections";
|
|
280
282
|
readonly Color: "Color";
|
|
281
283
|
readonly "Column *title.*": "Column *title.*";
|
|
@@ -376,7 +378,6 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
376
378
|
readonly "Document masthead": "Document masthead";
|
|
377
379
|
readonly "Document tabs": "Document tabs";
|
|
378
380
|
readonly Done: "Done";
|
|
379
|
-
readonly "Done {name}": "Done {name}";
|
|
380
381
|
readonly "Donut (split of a whole)": "Donut (split of a whole)";
|
|
381
382
|
readonly "Dot \u25CF": "Dot ●";
|
|
382
383
|
readonly Dots: "Dots";
|
|
@@ -402,6 +403,8 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
402
403
|
readonly "Each website created from this template sets its own {what} afterwards.": "Each website created from this template sets its own {what} afterwards.";
|
|
403
404
|
readonly "Easy to read": "Easy to read";
|
|
404
405
|
readonly Edit: "Edit";
|
|
406
|
+
readonly "Edit colors": "Edit colors";
|
|
407
|
+
readonly "Edit colors for {name}": "Edit colors for {name}";
|
|
405
408
|
readonly "Edit {name}": "Edit {name}";
|
|
406
409
|
readonly "Edit \u201C{name}\u201D in {place}": "Edit “{name}” in {place}";
|
|
407
410
|
readonly "Editing {name} changes it everywhere.": "Editing {name} changes it everywhere.";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const e={"$ efficient …":"$ efficient …","0 min":"0 min","0 min read":"0 min read","01 / Section":"01 / Section","100s":"100s","1st rendering":"1st rendering","2nd rendering":"2nd rendering","30-day returns":"30-day returns","3rd rendering":"3rd rendering","4th rendering":"4th rendering","5th rendering":"5th rendering","A 'Show us yours.' headline with a photo-submission form.":"A 'Show us yours.' headline with a photo-submission form.","A big headline beside a stack of call-to-action buttons.":"A big headline beside a stack of call-to-action buttons.","A bold brand statement beside a full-height image, with a stat strip.":"A bold brand statement beside a full-height image, with a stat strip.","A call-to-action button.":"A call-to-action button.","A card's opening picture — a card pinned to a finish keeps its own.":"A card's opening picture — a card pinned to a finish keeps its own.","A centered 'ready to order?' headline with the checkout button.":"A centered 'ready to order?' headline with the checkout button.","A change waiting to go live could not be saved.":"A change waiting to go live could not be saved.","A chat bubble on every page":"A chat bubble on every page","A corner would need a diagonal ramp, which this overlay does not draw.":"A corner would need a diagonal ramp, which this overlay does not draw.","A detail line":"A detail line","A display order-summary panel — items, totals and a note.":"A display order-summary panel — items, totals and a note.","A document header — headline, metadata and standfirst.":"A document header — headline, metadata and standfirst.","A featured article — big cover image beside a headline and dek.":"A featured article — big cover image beside a headline and dek.","A fitment table — per-size bolt patterns, offsets and load ratings, filterable by diameter.":"A fitment table — per-size bolt patterns, offsets and load ratings, filterable by diameter.","A frequently-asked-questions accordion with a header.":"A frequently-asked-questions accordion with a header.","A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.":"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.","A heading over a grid of free-text title-and-blurb cards.":"A heading over a grid of free-text title-and-blurb cards.","A heading over columns of image, title, blurb and specs.":"A heading over columns of image, title, blurb and specs.","A headline beside a stylized product-UI mockup card — spec sheet, fitment, portal, kanban and more.":"A headline beside a stylized product-UI mockup card — spec sheet, fitment, portal, kanban and more.","A horizontal year track of milestones — company history or roadmap.":"A horizontal year track of milestones — company history or roadmap.","A journal issue header with a lead statement and contents.":"A journal issue header with a lead statement and contents.","A line or two of supporting copy.":"A line or two of supporting copy.","A long-form article spread with a pull-quote and cover image.":"A long-form article spread with a pull-quote and cover image.","A marquee cannot run diagonally, so the corners are not answers.":"A marquee cannot run diagonally, so the corners are not answers.","A milestone still to come.":"A milestone still to come.","A newsletter signup beside a list of recent issues.":"A newsletter signup beside a list of recent issues.","A newsletter signup beside your latest blog posts, pulled live.":"A newsletter signup beside your latest blog posts, pulled live.","A numbered section title with optional link.":"A numbered section title with optional link.","A paragraph of body copy.":"A paragraph of body copy.","A payment-methods trust strip with reassurance lines.":"A payment-methods trust strip with reassurance lines.","A picture worth\n*a thousand rows.*":`A picture worth
|
|
2
|
-
*a thousand rows.*`,"A plain editorial text section — eyebrow, heading and body copy.":"A plain editorial text section — eyebrow, heading and body copy.","A product hero — image beside price, bullets and a buy button.":"A product hero — image beside price, bullets and a buy button.","A row of partner or brand logos.":"A row of partner or brand logos.","A scrolling marquee of short phrases, full width.":"A scrolling marquee of short phrases, full width.","A second customer quote — what they loved, in a sentence or two.":"A second customer quote — what they loved, in a sentence or two.","A section heading over a grid of column cards.":"A section heading over a grid of column cards.","A sentence or two of supporting copy.":"A sentence or two of supporting copy.","A shared section":"A shared section","A short customer quote goes here — replace it with a real testimonial from your customers.":"A short customer quote goes here — replace it with a real testimonial from your customers.","A short customer quote goes here.":"A short customer quote goes here.","A short description of this recurring column.":"A short description of this recurring column.","A short lead paragraph introducing this section — a sentence or two about its theme.":"A short lead paragraph introducing this section — a sentence or two about its theme.","A short line about this card.":"A short line about this card.","A short line about this milestone.":"A short line about this milestone.","A short name so a link can jump straight to this section, like yoursite.com/page#about.":"A short name so a link can jump straight to this section, like yoursite.com/page#about.","A short pull quote.":"A short pull quote.","A short reassurance note under the total.":"A short reassurance note under the total.","A short summary of the article goes here.":"A short summary of the article goes here.","A short summary of the featured article — one or two sentences that draw the reader in.":"A short summary of the featured article — one or two sentences that draw the reader in.","A short summary of the post — one or two sentences.":"A short summary of the post — one or two sentences.","A single heading line.":"A single heading line.","A slim trail showing where the reader is (Home / Journal…).":"A slim trail showing where the reader is (Home / Journal…).","A spec sheet — labeled rows of product specifications.":"A spec sheet — labeled rows of product specifications.","A standalone image, at the width you set.":"A standalone image, at the width you set.","A sticky row of category tabs with counts and links.":"A sticky row of category tabs with counts and links.","A sticky tab bar to switch between documents.":"A sticky tab bar to switch between documents.","A template is a blueprint — it has no website of its own, so there is nothing here to change.":"A template is a blueprint — it has no website of its own, so there is nothing here to change.","A theme-color chip and heading over a grid of short feature labels.":"A theme-color chip and heading over a grid of short feature labels.","A thin horizontal rule between sections.":"A thin horizontal rule between sections.","A thin one-line spec strip — small-caps items spread across the width, as a dark band or a bare hairline row.":"A thin one-line spec strip — small-caps items spread across the width, as a dark band or a bare hairline row.","A third short quote to round out the row.":"A third short quote to round out the row.","A three-up meta strip for the foot of a document.":"A three-up meta strip for the foot of a document.","A titled chart — bars, line or donut — drawn from your own labeled data points.":"A titled chart — bars, line or donut — drawn from your own labeled data points.","A vehicle picker — make, model, year and trim resolve the OEM stock fitment live.":"A vehicle picker — make, model, year and trim resolve the OEM stock fitment live.","A world map of your locations with a legend — designed here, sold worldwide.":"A world map of your locations with a legend — designed here, sold worldwide.","A write-a-review form — submissions wait for your approval before they show.":"A write-a-review form — submissions wait for your approval before they show.","About & brand story":"About & brand story",Accent:"Accent","Accent button":"Accent button","Accent footnote":"Accent footnote",Account:"Account","Active tab":"Active tab","Add a *headline* for this post.":"Add a *headline* for this post.","Add a *headline* for this story.":"Add a *headline* for this story.","Add a page":"Add a page","Add a sentence or two introducing this document.":"Add a sentence or two introducing this document.","Add a sentence or two of supporting copy.":"Add a sentence or two of supporting copy.","Add a short heading.":"Add a short heading.","Add a short statement here — a sentence or two is plenty.":"Add a short statement here — a sentence or two is plenty.","Add an office in the inspector":"Add an office in the inspector","Add another question":"Add another question","Add city":"Add city","Add group":"Add group","Add new theme":"Add new theme","Add office coordinates to plot the map":"Add office coordinates to plot the map","Add page":"Add page","Add slide":"Add slide","Add this section's copy here.":"Add this section's copy here.","Add this section's copy here. A blank line starts a new paragraph.":"Add this section's copy here. A blank line starts a new paragraph.","Add your answer here — a sentence or two is plenty.":"Add your answer here — a sentence or two is plenty.","Add your answer here.":"Add your answer here.","Add your answer here. Keep it clear and concise so it stays easy to scan.":"Add your answer here. Keep it clear and concise so it stays easy to scan.","Add your first question":"Add your first question","Add your numbers.":"Add your numbers.",Address:"Address",After:"After",Alignment:"Alignment",All:"All","Alt text":"Alt text","Alternating (zig-zag)":"Alternating (zig-zag)",Amount:"Amount","An editorial aside beside a rail-marked timeline of dated entries.":"An editorial aside beside a rail-marked timeline of dated entries.","An editorial heading and paragraph over a row of theme-color-accented stat cards.":"An editorial heading and paragraph over a row of theme-color-accented stat cards.","An editorial text panel with a stat strip and founders' note.":"An editorial text panel with a stat strip and founders' note.","An empty section. Add whatever you want inside.":"An empty section. Add whatever you want inside.",Anchor:"Anchor","Anchor name":"Anchor name",Animation:"Animation","Another group already uses this heading — pick a different one.":"Another group already uses this heading — pick a different one.","Another page uses this URL handle.":"Another page uses this URL handle.",Answer:"Answer","Any color":"Any color",App:"App","App chips":"App chips","App name":"App name",Appearance:"Appearance","Appearance settings belong to a website.":"Appearance settings belong to a website.","Applied to {n} card":"Applied to {n} card","Applied to {n} cards":"Applied to {n} cards","Apply to all cards":"Apply to all cards","Approved customer reviews in a star-rated card grid, pulled live.":"Approved customer reviews in a star-rated card grid, pulled live.",Arrows:"Arrows","Arrows placement":"Arrows placement","Arrows shape":"Arrows shape",Article:"Article","Article *headline* goes here.":"Article *headline* goes here.","Article Text":"Article Text","Article headline":"Article headline","Article title":"Article title","As shot":"As shot","As uploaded":"As uploaded","Aspect ratio":"Aspect ratio","At zero":"At zero",Attribution:"Attribution",Auto:"Auto","Auto contrast":"Auto contrast","Auto-advance slides":"Auto-advance slides","Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.":"Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.","Auto-slide":"Auto-slide","Avg rating":"Avg rating",Background:"Background","Background color":"Background color","Background image":"Background image","Background images":"Background images",Badge:"Badge",Banner:"Banner","Banner headline":"Banner headline",Bar:"Bar",Bare:"Bare",Bars:"Bars","Bars (comparison / funnel)":"Bars (comparison / funnel)","Bars heading":"Bars heading",Basics:"Basics",Before:"Before","Begin reading":"Begin reading",Below:"Below","Below picture":"Below picture","Big first":"Big first","Big left":"Big left","Big right":"Big right","Big stat":"Big stat","Bigger left":"Bigger left","Bigger right":"Bigger right","Black and white":"Black and white","Black and white logos":"Black and white logos",Block:"Block","Block gap":"Block gap","Block spacing":"Block spacing","Block widths":"Block widths","Blog & journal":"Blog & journal","Blog post":"Blog post","Blog post source":"Blog post source",Body:"Body",Bold:"Bold","Bold word":"Bold word","Booking Form":"Booking Form",Border:"Border","Border bottom":"Border bottom","Border color":"Border color","Border left":"Border left","Border right":"Border right","Border style":"Border style","Border top":"Border top","Border width":"Border width",Borders:"Borders",Bottom:"Bottom","Bottom center":"Bottom center","Bottom left":"Bottom left","Bottom right":"Bottom right",Box:"Box","Box name":"Box name","Brand Text":"Brand Text","Brand name":"Brand name",Breadcrumb:"Breadcrumb",Brick:"Brick","Browser mock":"Browser mock","Browser storefront (hero + tiles)":"Browser storefront (hero + tiles)","Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.":"Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.","Bundle Products":"Bundle Products",Button:"Button","Button Right Text":"Button Right Text","Button color":"Button color","Button label":"Button label","Button link":"Button link","Button text color":"Button text color",Buttons:"Buttons","Buy button":"Buy button","By the *numbers*":"By the *numbers*","By the numbers":"By the numbers","Call-to-Action Heading":"Call-to-Action Heading",Cancel:"Cancel",Caption:"Caption",Card:"Card","Card body":"Card body","Card button":"Card button","Card header strip":"Card header strip","Card height":"Card height","Card image":"Card image","Card layout":"Card layout","Card link":"Card link","Card number":"Card number","Card outline":"Card outline","Card shadow":"Card shadow","Card style":"Card style","Card subtitle":"Card subtitle","Card title":"Card title","Card title one":"Card title one","Card title three":"Card title three","Card title two":"Card title two","Card type":"Card type",Cards:"Cards",Cart:"Cart","Catalog Filter Bar":"Catalog Filter Bar",Category:"Category","Category Bar":"Category Bar","Category bar":"Category bar","Cell width":"Cell width",Center:"Center","Changed on every page":"Changed on every page","Changes not live yet":"Changes not live yet",Chart:"Chart","Chart style":"Chart style","Chat with us":"Chat with us","Check it with Preview. Press Publish to put it live.":"Check it with Preview. Press Publish to put it live.","Checkout & ordering":"Checkout & ordering","Chip label":"Chip label","Choose a page":"Choose a page","Choose a post":"Choose a post","Choose a product":"Choose a product","Choose a section":"Choose a section","Cities in this group":"Cities in this group",City:"City","City strip":"City strip","Claims bars":"Claims bars","Claims panel (rows + defect bars)":"Claims panel (rows + defect bars)","Clear change":"Clear change","Clear change: {label}":"Clear change: {label}","Clear colors":"Clear colors","Clear formatting":"Clear formatting","Clear override":"Clear override","Clear override: {label}":"Clear override: {label}","Clear this site’s colors?":"Clear this site’s colors?","Clear {what}":"Clear {what}","Clear {what}: {label}":"Clear {what}: {label}","Click to play":"Click to play",Collections:"Collections",Color:"Color","Column *title.*":"Column *title.*","Column 1 cards":"Column 1 cards","Column 1 title":"Column 1 title","Column 2 cards":"Column 2 cards","Column 2 title":"Column 2 title","Column 3 cards":"Column 3 cards","Column 3 title":"Column 3 title","Column 4 cards":"Column 4 cards","Column 4 title":"Column 4 title","Column {n}":"Column {n}",Columns:"Columns","Columns on phone":"Columns on phone","Contact / Locations":"Contact / Locations","Contact Form":"Contact Form","Contact, FAQ & forms":"Contact, FAQ & forms",Contain:"Contain",Contained:"Contained",Content:"Content","Content cannot be wider than the background.":"Content cannot be wider than the background.","Content position":"Content position","Content width":"Content width",Contents:"Contents","Contents heading":"Contents heading","Contents label":"Contents label",Coordinates:"Coordinates","Coordinates from OpenStreetMap":"Coordinates from OpenStreetMap","Copy above image":"Copy above image","Copy over image":"Copy over image","Copying…":"Copying…",Corners:"Corners","Couldn’t add the page — please retry.":"Couldn’t add the page — please retry.","Couldn’t delete the page — please retry.":"Couldn’t delete the page — please retry.","Couldn’t duplicate the page — please retry.":"Couldn’t duplicate the page — please retry.","Couldn’t duplicate the section — please retry":"Couldn’t duplicate the section — please retry","Couldn’t load pages":"Couldn’t load pages","Couldn’t open this section.":"Couldn’t open this section.","Couldn’t reach {place}.":"Couldn’t reach {place}.",Count:"Count",Countdown:"Countdown",Country:"Country","Country Switch":"Country Switch",Cover:"Cover","Cover image":"Cover image","Cross ✕":"Cross ✕",Crumbs:"Crumbs","Current page":"Current page","Custom HTML":"Custom HTML","Custom URL":"Custom URL","Custom color":"Custom color","Customer Photo Grid":"Customer Photo Grid","Customer name":"Customer name","Customer photos in a card grid with a click-to-open lightbox.":"Customer photos in a card grid with a click-to-open lightbox.","Customer quotes in a grid — the quote, a name and a role.":"Customer quotes in a grid — the quote, a name and a role.",Dark:"Dark","Dark band":"Dark band",Darken:"Darken","Darken style":"Darken style",Dashed:"Dashed","Data points":"Data points",Date:"Date",Dealers:"Dealers","Dealers are not available on this website":"Dealers are not available on this website","Deck / standfirst":"Deck / standfirst",Default:"Default","Defect rate by product":"Defect rate by product",Dek:"Dek","Delete city":"Delete city","Delete group ({n} cities)":"Delete group ({n} cities)","Delete group ({n} city)":"Delete group ({n} city)","Delete {label} group ({n} cities)":"Delete {label} group ({n} cities)","Delete {label} group ({n} city)":"Delete {label} group ({n} city)","Delete {name}":"Delete {name}","Delete “{name}”":"Delete “{name}”","Deleted “{name}”":"Deleted “{name}”",Delivery:"Delivery","Delivery Options":"Delivery Options","Delivery tiers as cards — name, window and price, one highlighted.":"Delivery tiers as cards — name, window and price, one highlighted.","Describe this section in a sentence or two.":"Describe this section in a sentence or two.","Describe this step in a sentence or two.":"Describe this step in a sentence or two.","Describe what happened, in a sentence or two.":"Describe what happened, in a sentence or two.",Design:"Design",Detail:"Detail","Detail line":"Detail line",Direction:"Direction","Directions link":"Directions link","Dismiss link":"Dismiss link",Display:"Display",Distance:"Distance","Distance from top":"Distance from top",Divider:"Divider","Document Detail Cards":"Document Detail Cards","Document Header":"Document Header","Document Tabs":"Document Tabs","Document Text":"Document Text","Document body":"Document body","Document masthead":"Document masthead","Document tabs":"Document tabs",Done:"Done","Done {name}":"Done {name}","Donut (split of a whole)":"Donut (split of a whole)","Dot ●":"Dot ●",Dots:"Dots",Dotted:"Dotted",Down:"Down","Draft before restore":"Draft before restore","Drop in your own sanitized HTML.":"Drop in your own sanitized HTML.","Duplicate page":"Duplicate page","Duplicate section":"Duplicate section","Duplicate to another page":"Duplicate to another page","Duplicate to page":"Duplicate to page","Duplicate “{name}”":"Duplicate “{name}”","Duplicated to “{name}”":"Duplicated to “{name}”",Dynamic:"Dynamic","Dynamic Pages":"Dynamic Pages","EU Tyre Label":"EU Tyre Label","Each block":"Each block","Each side":"Each side","Each website created from this template sets its own appearance afterwards.":"Each website created from this template sets its own appearance afterwards.","Each website created from this template sets its own header afterwards.":"Each website created from this template sets its own header afterwards.","Each website created from this template sets its own live chat afterwards.":"Each website created from this template sets its own live chat afterwards.","Each website created from this template sets its own social link afterwards.":"Each website created from this template sets its own social link afterwards.","Each website created from this template sets its own {what} afterwards.":"Each website created from this template sets its own {what} afterwards.","Easy to read":"Easy to read",Edit:"Edit","Edit {name}":"Edit {name}","Edit “{name}” in {place}":"Edit “{name}” in {place}","Editing {name} changes it everywhere.":"Editing {name} changes it everywhere.","Editor only — not shown live":"Editor only — not shown live",Editorial:"Editorial","Editorial Text":"Editorial Text",Email:"Email","Email Form":"Email Form","Email signup":"Email signup",Empty:"Empty",End:"End",Ends:"Ends","Enter coordinates manually":"Enter coordinates manually",Entrance:"Entrance",Entries:"Entries","Entries count":"Entries count",Equal:"Equal",Essay:"Essay",Even:"Even","Every Publish keeps a copy of the whole website: pages, menus and site styles.":"Every Publish keeps a copy of the whole website: pages, menus and site styles.","Every text on the site that follows {style} changes to look like this one. This text’s own changes are cleared, and it keeps following {style}.":"Every text on the site that follows {style} changes to look like this one. This text’s own changes are cleared, and it keeps following {style}.","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.":"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.","Everything else on this block comes from the linked post. Unlink it to edit by hand.":"Everything else on this block comes from the linked post. Unlink it to edit by hand.","Everything is live":"Everything is live",Excerpt:"Excerpt","Extra large — 64px":"Extra large — 64px",Eyebrow:"Eyebrow","Eyebrow style":"Eyebrow style",Facebook:"Facebook",Fade:"Fade",Feature:"Feature","Feature Banner":"Feature Banner","Feature Rows":"Feature Rows","Feature label":"Feature label","Feature label five":"Feature label five","Feature label four":"Feature label four","Feature label one":"Feature label one","Feature label six":"Feature label six","Feature label three":"Feature label three","Feature label two":"Feature label two","Feature story":"Feature story",Featured:"Featured","Featured *image*":"Featured *image*","Featured cover":"Featured cover",Features:"Features",Feedback:"Feedback","Field label":"Field label","Field notes":"Field notes",Fill:"Fill","Fill color":"Fill color",Filled:"Filled","Filters the collection grids below it — a sticky row of Pills (the default), or Columns, one per filter you switch on.":"Filters the collection grids below it — a sticky row of Pills (the default), or Columns, one per filter you switch on.","Find coordinates":"Find coordinates","Finding…":"Finding…","Fine print":"Fine print","Finish swatches":"Finish swatches","Finish · Size · ×1":"Finish · Size · ×1","First item":"First item","First section":"First section","Fit content":"Fit content","Fitment Form":"Fitment Form","Fitment Table":"Fitment Table",Fixed:"Fixed","Fixed size — the site’s Text setting doesn’t resize this.":"Fixed size — the site’s Text setting doesn’t resize this.","Follow the page":"Follow the page","Follow the slideshow":"Follow the slideshow","Follows Desktop":"Follows Desktop","Follows the section's Corners until you set a number here.":"Follows the section's Corners until you set a number here.","Follows the site":"Follows the site","Follows the style":"Follows the style","Footer Box":"Footer Box",Footnote:"Footnote",Form:"Form","Form eyebrow":"Form eyebrow","Form heading":"Form heading","Form intro":"Form intro","Formatting — click a row first":"Formatting — click a row first","Formatting — row {n}":"Formatting — row {n}",Founders:"Founders","Founders heading":"Founders heading","Founders statement":"Founders statement","Four across":"Four across","Four stagger":"Four stagger",Frequency:"Frequency","Frequently *asked.*":"Frequently *asked.*","From the bottom":"From the bottom",Full:"Full","Full width":"Full width","Full-bleed intro image the next section scrolls over.":"Full-bleed intro image the next section scrolls over.","Full-screen image or video with a headline.":"Full-screen image or video with a headline.","Full-screen opener with rotating slides.":"Full-screen opener with rotating slides.",Gap:"Gap","Gap only":"Gap only","Give the new template page a name. It starts blank — add sections once it opens.":"Give the new template page a name. It starts blank — add sections once it opens.","Gives the other card this card's Corners.":"Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.":"Gives the other {n} cards this card's Corners.",Good:"Good","Greeting message":"Greeting message",Grid:"Grid",Group:"Group","Group heading":"Group heading","Group name":"Group name",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",HQ:"HQ",HTML:"HTML","HTML tag":"HTML tag",Hairline:"Hairline","Hairline borders":"Hairline borders","Hand-picked products in a tidy grid.":"Hand-picked products in a tidy grid.","Hard to read":"Hard to read",Header:"Header","Header and footer not live yet":"Header and footer not live yet","Header badge":"Header badge","Header settings belong to a website.":"Header settings belong to a website.",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading font size":"Heading font size",Headings:"Headings",Headquarters:"Headquarters",Height:"Height",Hero:"Hero","Hero & intros":"Hero & intros","Hero Slide":"Hero Slide","Hero Slideshow":"Hero Slideshow","Hero button":"Hero button","Hero line":"Hero line","Hidden on the page":"Hidden on the page","Hide manual coordinates":"Hide manual coordinates","Hide on phone":"Hide on phone","Hide {label} on the slide":"Hide {label} on the slide",Highlight:"Highlight","Highlight key numbers — years, designs.":"Highlight key numbers — years, designs.","Highlight line":"Highlight line",Hint:"Hint","Hold video":"Hold video",Home:"Home","Hours, minutes and seconds to a set date and time, then one line.":"Hours, minutes and seconds to a set date and time, then one line.","Hover effect":"Hover effect",Icon:"Icon","Icon after text":"Icon after text","Icon before text":"Icon before text","Icon only":"Icon only","Icon position":"Icon position","Illustrative example":"Illustrative example",Image:"Image","Image & Text Columns":"Image & Text Columns","Image & Text Split":"Image & Text Split","Image 2":"Image 2","Image background":"Image background","Image caption":"Image caption","Image column":"Image column","Image date":"Image date","Image fit":"Image fit","Image focus":"Image focus","Image label":"Image label","Image left":"Image left","Image meta":"Image meta","Image right":"Image right","Image side":"Image side","Image stage":"Image stage","Image tint":"Image tint","Image width":"Image width","In its own box":"In its own box","In progress (accent)":"In progress (accent)","In the product":"In the product","In this issue":"In this issue","In this section":"In this section","In your own time zone. Every visitor counts down to the same moment.":"In your own time zone. Every visitor counts down to the same moment.",Instagram:"Instagram",Integrations:"Integrations","Integrations Grid":"Integrations Grid",Interview:"Interview",Intro:"Intro","Introduce your company in a paragraph or two.":"Introduce your company in a paragraph or two.","Issue Header":"Issue Header","Issue lines":"Issue lines","Issue meta lines":"Issue meta lines",Item:"Item","Item alignment":"Item alignment",Items:"Items","Items from":"Items from","Its own":"Its own","Its size follows Site styles ▸ {follows} — {px}px right now.":"Its size follows Site styles ▸ {follows} — {px}px right now.","Its size follows Site styles ▸ {follows}.":"Its size follows Site styles ▸ {follows}.","Job card label":"Job card label",Join:"Join","Jumps to a section on that page.":"Jumps to a section on that page.",Justify:"Justify","Kanban board (job columns)":"Kanban board (job columns)","Kanban columns":"Kanban columns","Keep this section's own built-in size":"Keep this section's own built-in size","Key *features.*":"Key *features.*","Key Features":"Key Features",LINE:"LINE",LIVE:"LIVE",Label:"Label","Label color":"Label color","Label only":"Label only",Labels:"Labels",Ladder:"Ladder",Large:"Large","Large text only":"Large text only","Large — 56px":"Large — 56px","Latest Posts":"Latest Posts","Latest journal posts in a three-card row.":"Latest journal posts in a three-card row.",Latitude:"Latitude",Layout:"Layout","Layout & structure":"Layout & structure","Layout, structure & embeds":"Layout, structure & embeds",Lead:"Lead","Lead Text":"Lead Text","Learn more":"Learn more","Leave a blank line between paragraphs to start a new one.":"Leave a blank line between paragraphs to start a new one.","Leave a field blank to use the built-in wording.":"Leave a field blank to use the built-in wording.",Left:"Left","Left and right":"Left and right","Left of the copy":"Left of the copy","Legal & documents":"Legal & documents","Legal Line":"Legal Line",Length:"Length",Level:"Level",Lift:"Lift",Lifted:"Lifted",Light:"Light",Lightbox:"Lightbox","Limited release":"Limited release",Line:"Line","Line (trend)":"Line (trend)",Link:"Link","Linked to a blog post. This editor has no blog to pick another from; choose “None (manual)” to author the section yourself.":"Linked to a blog post. This editor has no blog to pick another from; choose “None (manual)” to author the section yourself.","Linked to “{name}”":"Linked to “{name}”",LinkedIn:"LinkedIn",Links:"Links","Links to":"Links to",List:"List",Live:"Live","Live chat":"Live chat","Live chat settings belong to a website.":"Live chat settings belong to a website.","Loading versions":"Loading versions","Loading…":"Loading…","Location name":"Location name",Locations:"Locations","Locations Map":"Locations Map",Logo:"Logo","Logo alt text":"Logo alt text","Logo color":"Logo color","Logo description":"Logo description","Logo five":"Logo five","Logo four":"Logo four","Logo height":"Logo height","Logo image":"Logo image","Logo one":"Logo one","Logo three":"Logo three","Logo two":"Logo two",Logos:"Logos","Long read":"Long read","Long-form document body with an 'On this page' contents list.":"Long-form document body with an 'On this page' contents list.",Longitude:"Longitude",Look:"Look",Main:"Main","Main Pages":"Main Pages","Main color":"Main color","Main heading":"Main heading","Main heading\n*Highlight line*":`Main heading
|
|
2
|
+
*a thousand rows.*`,"A plain editorial text section — eyebrow, heading and body copy.":"A plain editorial text section — eyebrow, heading and body copy.","A product hero — image beside price, bullets and a buy button.":"A product hero — image beside price, bullets and a buy button.","A row of partner or brand logos.":"A row of partner or brand logos.","A scrolling marquee of short phrases, full width.":"A scrolling marquee of short phrases, full width.","A second customer quote — what they loved, in a sentence or two.":"A second customer quote — what they loved, in a sentence or two.","A section heading over a grid of column cards.":"A section heading over a grid of column cards.","A sentence or two of supporting copy.":"A sentence or two of supporting copy.","A shared section":"A shared section","A short customer quote goes here — replace it with a real testimonial from your customers.":"A short customer quote goes here — replace it with a real testimonial from your customers.","A short customer quote goes here.":"A short customer quote goes here.","A short description of this recurring column.":"A short description of this recurring column.","A short lead paragraph introducing this section — a sentence or two about its theme.":"A short lead paragraph introducing this section — a sentence or two about its theme.","A short line about this card.":"A short line about this card.","A short line about this milestone.":"A short line about this milestone.","A short name so a link can jump straight to this section, like yoursite.com/page#about.":"A short name so a link can jump straight to this section, like yoursite.com/page#about.","A short pull quote.":"A short pull quote.","A short reassurance note under the total.":"A short reassurance note under the total.","A short summary of the article goes here.":"A short summary of the article goes here.","A short summary of the featured article — one or two sentences that draw the reader in.":"A short summary of the featured article — one or two sentences that draw the reader in.","A short summary of the post — one or two sentences.":"A short summary of the post — one or two sentences.","A single heading line.":"A single heading line.","A slim trail showing where the reader is (Home / Journal…).":"A slim trail showing where the reader is (Home / Journal…).","A spec sheet — labeled rows of product specifications.":"A spec sheet — labeled rows of product specifications.","A standalone image, at the width you set.":"A standalone image, at the width you set.","A sticky row of category tabs with counts and links.":"A sticky row of category tabs with counts and links.","A sticky tab bar to switch between documents.":"A sticky tab bar to switch between documents.","A template is a blueprint — it has no website of its own, so there is nothing here to change.":"A template is a blueprint — it has no website of its own, so there is nothing here to change.","A theme-color chip and heading over a grid of short feature labels.":"A theme-color chip and heading over a grid of short feature labels.","A thin horizontal rule between sections.":"A thin horizontal rule between sections.","A thin one-line spec strip — small-caps items spread across the width, as a dark band or a bare hairline row.":"A thin one-line spec strip — small-caps items spread across the width, as a dark band or a bare hairline row.","A third short quote to round out the row.":"A third short quote to round out the row.","A three-up meta strip for the foot of a document.":"A three-up meta strip for the foot of a document.","A titled chart — bars, line or donut — drawn from your own labeled data points.":"A titled chart — bars, line or donut — drawn from your own labeled data points.","A vehicle picker — make, model, year and trim resolve the OEM stock fitment live.":"A vehicle picker — make, model, year and trim resolve the OEM stock fitment live.","A world map of your locations with a legend — designed here, sold worldwide.":"A world map of your locations with a legend — designed here, sold worldwide.","A write-a-review form — submissions wait for your approval before they show.":"A write-a-review form — submissions wait for your approval before they show.","About & brand story":"About & brand story",Accent:"Accent","Accent button":"Accent button","Accent footnote":"Accent footnote",Account:"Account","Active tab":"Active tab","Add a *headline* for this post.":"Add a *headline* for this post.","Add a *headline* for this story.":"Add a *headline* for this story.","Add a page":"Add a page","Add a sentence or two introducing this document.":"Add a sentence or two introducing this document.","Add a sentence or two of supporting copy.":"Add a sentence or two of supporting copy.","Add a short heading.":"Add a short heading.","Add a short statement here — a sentence or two is plenty.":"Add a short statement here — a sentence or two is plenty.","Add an office in the inspector":"Add an office in the inspector","Add another question":"Add another question","Add city":"Add city","Add group":"Add group","Add new theme":"Add new theme","Add office coordinates to plot the map":"Add office coordinates to plot the map","Add page":"Add page","Add slide":"Add slide","Add this section's copy here.":"Add this section's copy here.","Add this section's copy here. A blank line starts a new paragraph.":"Add this section's copy here. A blank line starts a new paragraph.","Add your answer here — a sentence or two is plenty.":"Add your answer here — a sentence or two is plenty.","Add your answer here.":"Add your answer here.","Add your answer here. Keep it clear and concise so it stays easy to scan.":"Add your answer here. Keep it clear and concise so it stays easy to scan.","Add your first question":"Add your first question","Add your numbers.":"Add your numbers.",Address:"Address",After:"After",Alignment:"Alignment",All:"All","Alt text":"Alt text","Alternating (zig-zag)":"Alternating (zig-zag)",Amount:"Amount","An editorial aside beside a rail-marked timeline of dated entries.":"An editorial aside beside a rail-marked timeline of dated entries.","An editorial heading and paragraph over a row of theme-color-accented stat cards.":"An editorial heading and paragraph over a row of theme-color-accented stat cards.","An editorial text panel with a stat strip and founders' note.":"An editorial text panel with a stat strip and founders' note.","An empty section. Add whatever you want inside.":"An empty section. Add whatever you want inside.",Anchor:"Anchor","Anchor name":"Anchor name",Animation:"Animation","Another group already uses this heading — pick a different one.":"Another group already uses this heading — pick a different one.","Another page uses this URL handle.":"Another page uses this URL handle.",Answer:"Answer","Any color":"Any color",App:"App","App chips":"App chips","App name":"App name",Appearance:"Appearance","Appearance settings belong to a website.":"Appearance settings belong to a website.","Applied to {n} card":"Applied to {n} card","Applied to {n} cards":"Applied to {n} cards","Apply to all cards":"Apply to all cards","Approved customer reviews in a star-rated card grid, pulled live.":"Approved customer reviews in a star-rated card grid, pulled live.",Arrows:"Arrows","Arrows placement":"Arrows placement","Arrows shape":"Arrows shape",Article:"Article","Article *headline* goes here.":"Article *headline* goes here.","Article Text":"Article Text","Article headline":"Article headline","Article title":"Article title","As shot":"As shot","As uploaded":"As uploaded","Aspect ratio":"Aspect ratio","At zero":"At zero",Attribution:"Attribution",Auto:"Auto","Auto contrast":"Auto contrast","Auto-advance slides":"Auto-advance slides","Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.":"Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.","Auto-slide":"Auto-slide","Avg rating":"Avg rating",Background:"Background","Background color":"Background color","Background image":"Background image","Background images":"Background images",Badge:"Badge",Banner:"Banner","Banner headline":"Banner headline",Bar:"Bar",Bare:"Bare",Bars:"Bars","Bars (comparison / funnel)":"Bars (comparison / funnel)","Bars heading":"Bars heading",Basics:"Basics",Before:"Before","Begin reading":"Begin reading",Below:"Below","Below picture":"Below picture","Big first":"Big first","Big left":"Big left","Big right":"Big right","Big stat":"Big stat","Bigger left":"Bigger left","Bigger right":"Bigger right","Black and white":"Black and white","Black and white logos":"Black and white logos",Block:"Block","Block gap":"Block gap","Block spacing":"Block spacing","Block widths":"Block widths","Blog & journal":"Blog & journal","Blog post":"Blog post","Blog post source":"Blog post source",Body:"Body",Bold:"Bold","Bold word":"Bold word","Booking Form":"Booking Form",Border:"Border","Border bottom":"Border bottom","Border color":"Border color","Border left":"Border left","Border right":"Border right","Border style":"Border style","Border top":"Border top","Border width":"Border width",Borders:"Borders",Bottom:"Bottom","Bottom center":"Bottom center","Bottom left":"Bottom left","Bottom right":"Bottom right",Box:"Box","Box name":"Box name","Brand Text":"Brand Text","Brand name":"Brand name",Breadcrumb:"Breadcrumb",Brick:"Brick","Browser mock":"Browser mock","Browser storefront (hero + tiles)":"Browser storefront (hero + tiles)","Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.":"Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.","Bundle Products":"Bundle Products",Button:"Button","Button Right Text":"Button Right Text","Button color":"Button color","Button label":"Button label","Button link":"Button link","Button text color":"Button text color",Buttons:"Buttons","Buy button":"Buy button","By the *numbers*":"By the *numbers*","By the numbers":"By the numbers","Call-to-Action Heading":"Call-to-Action Heading",Cancel:"Cancel",Caption:"Caption",Card:"Card","Card body":"Card body","Card button":"Card button","Card header strip":"Card header strip","Card height":"Card height","Card image":"Card image","Card layout":"Card layout","Card link":"Card link","Card number":"Card number","Card outline":"Card outline","Card shadow":"Card shadow","Card style":"Card style","Card subtitle":"Card subtitle","Card title":"Card title","Card title one":"Card title one","Card title three":"Card title three","Card title two":"Card title two","Card type":"Card type",Cards:"Cards",Cart:"Cart","Catalog Filter Bar":"Catalog Filter Bar",Category:"Category","Category Bar":"Category Bar","Category bar":"Category bar","Cell width":"Cell width",Center:"Center","Changed on every page":"Changed on every page","Changes not live yet":"Changes not live yet",Chart:"Chart","Chart style":"Chart style","Chat with us":"Chat with us","Check it with Preview. Press Publish to put it live.":"Check it with Preview. Press Publish to put it live.","Checkout & ordering":"Checkout & ordering","Chip label":"Chip label","Choose a page":"Choose a page","Choose a post":"Choose a post","Choose a product":"Choose a product","Choose a section":"Choose a section","Cities in this group":"Cities in this group",City:"City","City strip":"City strip","Claims bars":"Claims bars","Claims panel (rows + defect bars)":"Claims panel (rows + defect bars)","Clear change":"Clear change","Clear change: {label}":"Clear change: {label}","Clear colors":"Clear colors","Clear formatting":"Clear formatting","Clear override":"Clear override","Clear override: {label}":"Clear override: {label}","Clear this site’s colors?":"Clear this site’s colors?","Clear {what}":"Clear {what}","Clear {what}: {label}":"Clear {what}: {label}","Click to play":"Click to play",Collapse:"Collapse","Collapse {name}":"Collapse {name}",Collections:"Collections",Color:"Color","Column *title.*":"Column *title.*","Column 1 cards":"Column 1 cards","Column 1 title":"Column 1 title","Column 2 cards":"Column 2 cards","Column 2 title":"Column 2 title","Column 3 cards":"Column 3 cards","Column 3 title":"Column 3 title","Column 4 cards":"Column 4 cards","Column 4 title":"Column 4 title","Column {n}":"Column {n}",Columns:"Columns","Columns on phone":"Columns on phone","Contact / Locations":"Contact / Locations","Contact Form":"Contact Form","Contact, FAQ & forms":"Contact, FAQ & forms",Contain:"Contain",Contained:"Contained",Content:"Content","Content cannot be wider than the background.":"Content cannot be wider than the background.","Content position":"Content position","Content width":"Content width",Contents:"Contents","Contents heading":"Contents heading","Contents label":"Contents label",Coordinates:"Coordinates","Coordinates from OpenStreetMap":"Coordinates from OpenStreetMap","Copy above image":"Copy above image","Copy over image":"Copy over image","Copying…":"Copying…",Corners:"Corners","Couldn’t add the page — please retry.":"Couldn’t add the page — please retry.","Couldn’t delete the page — please retry.":"Couldn’t delete the page — please retry.","Couldn’t duplicate the page — please retry.":"Couldn’t duplicate the page — please retry.","Couldn’t duplicate the section — please retry":"Couldn’t duplicate the section — please retry","Couldn’t load pages":"Couldn’t load pages","Couldn’t open this section.":"Couldn’t open this section.","Couldn’t reach {place}.":"Couldn’t reach {place}.",Count:"Count",Countdown:"Countdown",Country:"Country","Country Switch":"Country Switch",Cover:"Cover","Cover image":"Cover image","Cross ✕":"Cross ✕",Crumbs:"Crumbs","Current page":"Current page","Custom HTML":"Custom HTML","Custom URL":"Custom URL","Custom color":"Custom color","Customer Photo Grid":"Customer Photo Grid","Customer name":"Customer name","Customer photos in a card grid with a click-to-open lightbox.":"Customer photos in a card grid with a click-to-open lightbox.","Customer quotes in a grid — the quote, a name and a role.":"Customer quotes in a grid — the quote, a name and a role.",Dark:"Dark","Dark band":"Dark band",Darken:"Darken","Darken style":"Darken style",Dashed:"Dashed","Data points":"Data points",Date:"Date",Dealers:"Dealers","Dealers are not available on this website":"Dealers are not available on this website","Deck / standfirst":"Deck / standfirst",Default:"Default","Defect rate by product":"Defect rate by product",Dek:"Dek","Delete city":"Delete city","Delete group ({n} cities)":"Delete group ({n} cities)","Delete group ({n} city)":"Delete group ({n} city)","Delete {label} group ({n} cities)":"Delete {label} group ({n} cities)","Delete {label} group ({n} city)":"Delete {label} group ({n} city)","Delete {name}":"Delete {name}","Delete “{name}”":"Delete “{name}”","Deleted “{name}”":"Deleted “{name}”",Delivery:"Delivery","Delivery Options":"Delivery Options","Delivery tiers as cards — name, window and price, one highlighted.":"Delivery tiers as cards — name, window and price, one highlighted.","Describe this section in a sentence or two.":"Describe this section in a sentence or two.","Describe this step in a sentence or two.":"Describe this step in a sentence or two.","Describe what happened, in a sentence or two.":"Describe what happened, in a sentence or two.",Design:"Design",Detail:"Detail","Detail line":"Detail line",Direction:"Direction","Directions link":"Directions link","Dismiss link":"Dismiss link",Display:"Display",Distance:"Distance","Distance from top":"Distance from top",Divider:"Divider","Document Detail Cards":"Document Detail Cards","Document Header":"Document Header","Document Tabs":"Document Tabs","Document Text":"Document Text","Document body":"Document body","Document masthead":"Document masthead","Document tabs":"Document tabs",Done:"Done","Donut (split of a whole)":"Donut (split of a whole)","Dot ●":"Dot ●",Dots:"Dots",Dotted:"Dotted",Down:"Down","Draft before restore":"Draft before restore","Drop in your own sanitized HTML.":"Drop in your own sanitized HTML.","Duplicate page":"Duplicate page","Duplicate section":"Duplicate section","Duplicate to another page":"Duplicate to another page","Duplicate to page":"Duplicate to page","Duplicate “{name}”":"Duplicate “{name}”","Duplicated to “{name}”":"Duplicated to “{name}”",Dynamic:"Dynamic","Dynamic Pages":"Dynamic Pages","EU Tyre Label":"EU Tyre Label","Each block":"Each block","Each side":"Each side","Each website created from this template sets its own appearance afterwards.":"Each website created from this template sets its own appearance afterwards.","Each website created from this template sets its own header afterwards.":"Each website created from this template sets its own header afterwards.","Each website created from this template sets its own live chat afterwards.":"Each website created from this template sets its own live chat afterwards.","Each website created from this template sets its own social link afterwards.":"Each website created from this template sets its own social link afterwards.","Each website created from this template sets its own {what} afterwards.":"Each website created from this template sets its own {what} afterwards.","Easy to read":"Easy to read",Edit:"Edit","Edit colors":"Edit colors","Edit colors for {name}":"Edit colors for {name}","Edit {name}":"Edit {name}","Edit “{name}” in {place}":"Edit “{name}” in {place}","Editing {name} changes it everywhere.":"Editing {name} changes it everywhere.","Editor only — not shown live":"Editor only — not shown live",Editorial:"Editorial","Editorial Text":"Editorial Text",Email:"Email","Email Form":"Email Form","Email signup":"Email signup",Empty:"Empty",End:"End",Ends:"Ends","Enter coordinates manually":"Enter coordinates manually",Entrance:"Entrance",Entries:"Entries","Entries count":"Entries count",Equal:"Equal",Essay:"Essay",Even:"Even","Every Publish keeps a copy of the whole website: pages, menus and site styles.":"Every Publish keeps a copy of the whole website: pages, menus and site styles.","Every text on the site that follows {style} changes to look like this one. This text’s own changes are cleared, and it keeps following {style}.":"Every text on the site that follows {style} changes to look like this one. This text’s own changes are cleared, and it keeps following {style}.","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.":"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.","Everything else on this block comes from the linked post. Unlink it to edit by hand.":"Everything else on this block comes from the linked post. Unlink it to edit by hand.","Everything is live":"Everything is live",Excerpt:"Excerpt","Extra large — 64px":"Extra large — 64px",Eyebrow:"Eyebrow","Eyebrow style":"Eyebrow style",Facebook:"Facebook",Fade:"Fade",Feature:"Feature","Feature Banner":"Feature Banner","Feature Rows":"Feature Rows","Feature label":"Feature label","Feature label five":"Feature label five","Feature label four":"Feature label four","Feature label one":"Feature label one","Feature label six":"Feature label six","Feature label three":"Feature label three","Feature label two":"Feature label two","Feature story":"Feature story",Featured:"Featured","Featured *image*":"Featured *image*","Featured cover":"Featured cover",Features:"Features",Feedback:"Feedback","Field label":"Field label","Field notes":"Field notes",Fill:"Fill","Fill color":"Fill color",Filled:"Filled","Filters the collection grids below it — a sticky row of Pills (the default), or Columns, one per filter you switch on.":"Filters the collection grids below it — a sticky row of Pills (the default), or Columns, one per filter you switch on.","Find coordinates":"Find coordinates","Finding…":"Finding…","Fine print":"Fine print","Finish swatches":"Finish swatches","Finish · Size · ×1":"Finish · Size · ×1","First item":"First item","First section":"First section","Fit content":"Fit content","Fitment Form":"Fitment Form","Fitment Table":"Fitment Table",Fixed:"Fixed","Fixed size — the site’s Text setting doesn’t resize this.":"Fixed size — the site’s Text setting doesn’t resize this.","Follow the page":"Follow the page","Follow the slideshow":"Follow the slideshow","Follows Desktop":"Follows Desktop","Follows the section's Corners until you set a number here.":"Follows the section's Corners until you set a number here.","Follows the site":"Follows the site","Follows the style":"Follows the style","Footer Box":"Footer Box",Footnote:"Footnote",Form:"Form","Form eyebrow":"Form eyebrow","Form heading":"Form heading","Form intro":"Form intro","Formatting — click a row first":"Formatting — click a row first","Formatting — row {n}":"Formatting — row {n}",Founders:"Founders","Founders heading":"Founders heading","Founders statement":"Founders statement","Four across":"Four across","Four stagger":"Four stagger",Frequency:"Frequency","Frequently *asked.*":"Frequently *asked.*","From the bottom":"From the bottom",Full:"Full","Full width":"Full width","Full-bleed intro image the next section scrolls over.":"Full-bleed intro image the next section scrolls over.","Full-screen image or video with a headline.":"Full-screen image or video with a headline.","Full-screen opener with rotating slides.":"Full-screen opener with rotating slides.",Gap:"Gap","Gap only":"Gap only","Give the new template page a name. It starts blank — add sections once it opens.":"Give the new template page a name. It starts blank — add sections once it opens.","Gives the other card this card's Corners.":"Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.":"Gives the other {n} cards this card's Corners.",Good:"Good","Greeting message":"Greeting message",Grid:"Grid",Group:"Group","Group heading":"Group heading","Group name":"Group name",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",HQ:"HQ",HTML:"HTML","HTML tag":"HTML tag",Hairline:"Hairline","Hairline borders":"Hairline borders","Hand-picked products in a tidy grid.":"Hand-picked products in a tidy grid.","Hard to read":"Hard to read",Header:"Header","Header and footer not live yet":"Header and footer not live yet","Header badge":"Header badge","Header settings belong to a website.":"Header settings belong to a website.",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading font size":"Heading font size",Headings:"Headings",Headquarters:"Headquarters",Height:"Height",Hero:"Hero","Hero & intros":"Hero & intros","Hero Slide":"Hero Slide","Hero Slideshow":"Hero Slideshow","Hero button":"Hero button","Hero line":"Hero line","Hidden on the page":"Hidden on the page","Hide manual coordinates":"Hide manual coordinates","Hide on phone":"Hide on phone","Hide {label} on the slide":"Hide {label} on the slide",Highlight:"Highlight","Highlight key numbers — years, designs.":"Highlight key numbers — years, designs.","Highlight line":"Highlight line",Hint:"Hint","Hold video":"Hold video",Home:"Home","Hours, minutes and seconds to a set date and time, then one line.":"Hours, minutes and seconds to a set date and time, then one line.","Hover effect":"Hover effect",Icon:"Icon","Icon after text":"Icon after text","Icon before text":"Icon before text","Icon only":"Icon only","Icon position":"Icon position","Illustrative example":"Illustrative example",Image:"Image","Image & Text Columns":"Image & Text Columns","Image & Text Split":"Image & Text Split","Image 2":"Image 2","Image background":"Image background","Image caption":"Image caption","Image column":"Image column","Image date":"Image date","Image fit":"Image fit","Image focus":"Image focus","Image label":"Image label","Image left":"Image left","Image meta":"Image meta","Image right":"Image right","Image side":"Image side","Image stage":"Image stage","Image tint":"Image tint","Image width":"Image width","In its own box":"In its own box","In progress (accent)":"In progress (accent)","In the product":"In the product","In this issue":"In this issue","In this section":"In this section","In your own time zone. Every visitor counts down to the same moment.":"In your own time zone. Every visitor counts down to the same moment.",Instagram:"Instagram",Integrations:"Integrations","Integrations Grid":"Integrations Grid",Interview:"Interview",Intro:"Intro","Introduce your company in a paragraph or two.":"Introduce your company in a paragraph or two.","Issue Header":"Issue Header","Issue lines":"Issue lines","Issue meta lines":"Issue meta lines",Item:"Item","Item alignment":"Item alignment",Items:"Items","Items from":"Items from","Its own":"Its own","Its size follows Site styles ▸ {follows} — {px}px right now.":"Its size follows Site styles ▸ {follows} — {px}px right now.","Its size follows Site styles ▸ {follows}.":"Its size follows Site styles ▸ {follows}.","Job card label":"Job card label",Join:"Join","Jumps to a section on that page.":"Jumps to a section on that page.",Justify:"Justify","Kanban board (job columns)":"Kanban board (job columns)","Kanban columns":"Kanban columns","Keep this section's own built-in size":"Keep this section's own built-in size","Key *features.*":"Key *features.*","Key Features":"Key Features",LINE:"LINE",LIVE:"LIVE",Label:"Label","Label color":"Label color","Label only":"Label only",Labels:"Labels",Ladder:"Ladder",Large:"Large","Large text only":"Large text only","Large — 56px":"Large — 56px","Latest Posts":"Latest Posts","Latest journal posts in a three-card row.":"Latest journal posts in a three-card row.",Latitude:"Latitude",Layout:"Layout","Layout & structure":"Layout & structure","Layout, structure & embeds":"Layout, structure & embeds",Lead:"Lead","Lead Text":"Lead Text","Learn more":"Learn more","Leave a blank line between paragraphs to start a new one.":"Leave a blank line between paragraphs to start a new one.","Leave a field blank to use the built-in wording.":"Leave a field blank to use the built-in wording.",Left:"Left","Left and right":"Left and right","Left of the copy":"Left of the copy","Legal & documents":"Legal & documents","Legal Line":"Legal Line",Length:"Length",Level:"Level",Lift:"Lift",Lifted:"Lifted",Light:"Light",Lightbox:"Lightbox","Limited release":"Limited release",Line:"Line","Line (trend)":"Line (trend)",Link:"Link","Linked to a blog post. This editor has no blog to pick another from; choose “None (manual)” to author the section yourself.":"Linked to a blog post. This editor has no blog to pick another from; choose “None (manual)” to author the section yourself.","Linked to “{name}”":"Linked to “{name}”",LinkedIn:"LinkedIn",Links:"Links","Links to":"Links to",List:"List",Live:"Live","Live chat":"Live chat","Live chat settings belong to a website.":"Live chat settings belong to a website.","Loading versions":"Loading versions","Loading…":"Loading…","Location name":"Location name",Locations:"Locations","Locations Map":"Locations Map",Logo:"Logo","Logo alt text":"Logo alt text","Logo color":"Logo color","Logo description":"Logo description","Logo five":"Logo five","Logo four":"Logo four","Logo height":"Logo height","Logo image":"Logo image","Logo one":"Logo one","Logo three":"Logo three","Logo two":"Logo two",Logos:"Logos","Long read":"Long read","Long-form document body with an 'On this page' contents list.":"Long-form document body with an 'On this page' contents list.",Longitude:"Longitude",Look:"Look",Main:"Main","Main Pages":"Main Pages","Main color":"Main color","Main heading":"Main heading","Main heading\n*Highlight line*":`Main heading
|
|
3
3
|
*Highlight line*`,Map:"Map","Map & Theme":"Map & Theme","Map theme":"Map theme","Match / done (green)":"Match / done (green)",Media:"Media",Medium:"Medium","Medium — 48px":"Medium — 48px",Menu:"Menu",Message:"Message","Meta line":"Meta line",Metadata:"Metadata","Metadata rows":"Metadata rows",Middle:"Middle","Middle meta":"Middle meta",Milestone:"Milestone","Milestone Timeline":"Milestone Timeline","Milestone title.":"Milestone title.",Milestones:"Milestones",Mixed:"Mixed","Mockup Card":"Mockup Card","Mockup card":"Mockup card","Mockup position":"Mockup position",Mono:"Mono","Month DD, YYYY":"Month DD, YYYY",More:"More",Motion:"Motion","Multi-column container for blocks.":"Multi-column container for blocks.",Muted:"Muted",Name:"Name","Name / alt":"Name / alt","Name this version":"Name this version","Named versions are always kept. Leave it empty to take the name away.":"Named versions are always kept. Leave it empty to take the name away.",Natural:"Natural","Navigation & wayfinding":"Navigation & wayfinding","Never published":"Never published","New page":"New page","Next slide":"Next slide","No fill":"No fill","No locations yet.":"No locations yet.","No match":"No match","No match (gray ✕)":"No match (gray ✕)","No other pages":"No other pages","No pages match your search":"No pages match your search","No pages yet. Add one with + above.":"No pages yet. Add one with + above.","No place found. Try another postcode.":"No place found. Try another postcode.","No section anchors yet":"No section anchors yet","No style":"No style","No versions yet. Every Publish from now on keeps one.":"No versions yet. Every Publish from now on keeps one.","No wrap":"No wrap","No. 1":"No. 1",None:"None","None (manual)":"None (manual)",Normal:"Normal","Not changed":"Not changed","Not chosen":"Not chosen","Not published":"Not published","Not saved. Reload the page.":"Not saved. Reload the page.","Not saved. Try again.":"Not saved. Try again.","Not set":"Not set","Not shown on the page":"Not shown on the page",Note:"Note","Note label":"Note label","Note value":"Note value",Nothing:"Nothing",Nudge:"Nudge",Number:"Number","Number style":"Number style",Numbers:"Numbers","N°01, N°02":"N°01, N°02",Off:"Off",Office:"Office",Offices:"Offices","Offset tall":"Offset tall","On 1 page":"On 1 page","On a phone":"On a phone","On every blog post.":"On every blog post.","On every page":"On every page","On every page · old style":"On every page · old style","On other pages":"On other pages","On phones, content always fills the screen.":"On phones, content always fills the screen.","On picture":"On picture","On this page":"On this page","On {count} pages":"On {count} pages",One:"One","One row":"One row","One then four":"One then four","Only the size follows a site style. This section sets its own font, weight and letter case.":"Only the size follows a site style. This section sets its own font, weight and letter case.",Open:"Open","Open first answer":"Open first answer","Open the {name} in a new tab":"Open the {name} in a new tab","Open your saved draft in a new tab. Visitors don't see it.":"Open your saved draft in a new tab. Visitors don't see it.","Opening hours":"Opening hours",Option:"Option","Order Table":"Order Table","Order summary":"Order summary",Outline:"Outline",Outlined:"Outlined",Overlay:"Overlay","Overlay - CartDrawer":"Overlay - CartDrawer","Overlay - ConsentBanner":"Overlay - ConsentBanner","Overlay button":"Overlay button","Overlay button link":"Overlay button link","Overlay color":"Overlay color","Overlay position":"Overlay position",Padding:"Padding","Padding bottom":"Padding bottom","Padding left":"Padding left","Padding right":"Padding right","Padding top":"Padding top",Page:"Page","Page button":"Page button","Page name":"Page name","Page settings":"Page settings",Pages:"Pages","Panel heading":"Panel heading","Panels & cards":"Panels & cards","Panels and cards":"Panels and cards",Paragraph:"Paragraph","Paragraph size — 13px":"Paragraph size — 13px","Part of {name}":"Part of {name}","Paste a link to each profile. A platform left empty shows nothing on the site.":"Paste a link to each profile. A platform left empty shows nothing on the site.","Payment Methods":"Payment Methods","Payment methods":"Payment methods",Phone:"Phone","Photo Submission Form":"Photo Submission Form","Photo behind the words":"Photo behind the words",Photography:"Photography","Photos in a row":"Photos in a row","Pick a color to see how it reads.":"Pick a color to see how it reads.","Pick a post from {place} to auto-fill this section, or keep “None (manual)” to author it yourself below.":"Pick a post from {place} to auto-fill this section, or keep “None (manual)” to author it yourself below.","Pick who to reach, then a form that routes the message.":"Pick who to reach, then a form that routes the message.",Pinterest:"Pinterest",Placement:"Placement",Plain:"Plain","Play video":"Play video",Playback:"Playback","Playback speed":"Playback speed","Plays well with\n*your favourite apps.*":`Plays well with
|
|
4
4
|
*your favourite apps.*`,"Pop up - SubscribePopup":"Pop up - SubscribePopup","Portal card (stock + button + orders)":"Portal card (stock + button + orders)",Position:"Position",Positions:"Positions","Post Card":"Post Card",Prefix:"Prefix",Preview:"Preview","Preview hover state":"Preview hover state","Preview the live site (opens in a new tab)":"Preview the live site (opens in a new tab)","Preview the live site in a new tab":"Preview the live site in a new tab","Preview your saved draft in a new tab":"Preview your saved draft in a new tab","Previous slide":"Previous slide",Price:"Price",Product:"Product","Product Grid":"Product Grid","Product Hero":"Product Hero","Product badge":"Product badge","Product collections in a tidy grid.":"Product collections in a tidy grid.","Product name":"Product name","Product page":"Product page","Product record":"Product record","Product record (spec tiles)":"Product record (spec tiles)","Product tiles":"Product tiles","Products, prices and forms always show as they are now.":"Products, prices and forms always show as they are now.","Promotions & sign-ups":"Promotions & sign-ups",Publish:"Publish",Published:"Published","Pull quote":"Pull quote","Put these drafts back":"Put these drafts back","Put this page on your site":"Put this page on your site","Put your changes on your site":"Put your changes on your site","Put your drafts back?":"Put your drafts back?","Q&A":"Q&A",Question:"Question",Questions:"Questions",Quiet:"Quiet",Quote:"Quote",Quotes:"Quotes",Rating:"Rating","Read out in place of the picture, and shown if it can’t load.":"Read out in place of the picture, and shown if it can’t load.","Read the story":"Read the story","Read time":"Read time","Reads in":"Reads in","Ready-to-Order Banner":"Ready-to-Order Banner","Reassurance lines":"Reassurance lines","Record type":"Record type","Recurring Columns":"Recurring Columns","Reel label":"Reel label","Refresh now":"Refresh now","Region · country":"Region · country","Related Products":"Related Products","Remove section":"Remove section","Repeating full-width rows — eyebrow, title and copy beside a numbered close-up image, alternating sides each row.":"Repeating full-width rows — eyebrow, title and copy beside a numbered close-up image, alternating sides each row.","Reset color":"Reset color","Reset {name} to the preset":"Reset {name} to the preset",Rest:"Rest",Restore:"Restore","Restore as draft":"Restore as draft","Restore one page only":"Restore one page only","Restore version {n}?":"Restore version {n}?","Restore whole website":"Restore whole website","Restore {page} from version {n}?":"Restore {page} from version {n}?","Result / order rows":"Result / order rows","Review Form":"Review Form",Reviews:"Reviews",Right:"Right","Right Top Text":"Right Top Text","Right links":"Right links","Right of the copy":"Right of the copy",Rigs:"Rigs","Rigs fitted":"Rigs fitted",Rise:"Rise",Role:"Role","Role · Location":"Role · Location","Role · location":"Role · location","Rotate on hover":"Rotate on hover","Rounds the picture. Left alone it stays square.":"Rounds the picture. Left alone it stays square.","Rounds the picture. The card's own corner is in Site styles.":"Rounds the picture. The card's own corner is in Site styles.",Sans:"Sans",Save:"Save","Save as Template":"Save as Template","Save this website as a platform template":"Save this website as a platform template","Save your page changes first":"Save your page changes first",Scale:"Scale",Screen:"Screen","Scroll direction":"Scroll direction","Scroll duration":"Scroll duration","Scroll-Over Text":"Scroll-Over Text","Scrolling Bar":"Scrolling Bar",Search:"Search","Search all pages":"Search all pages","Search all pages…":"Search all pages…",Season:"Season","Second item":"Second item","Second section":"Second section","Second surface":"Second surface",Section:"Section","Section *heading.*":"Section *heading.*","Section *title*":"Section *title*","Section Header":"Section Header","Section above":"Section above","Section band":"Section band","Section below":"Section below","Section header":"Section header","Section heading":"Section heading","Section heading\n*Highlight line*":`Section heading
|
|
5
5
|
*Highlight line*`,"Section heading *here.*":"Section heading *here.*","Section headline\n*Highlight line*":`Section headline
|
|
@@ -2,6 +2,7 @@ import type { EaselPageRow as EditorPageRow, SiteRecord, SiteRecordPatch, Websit
|
|
|
2
2
|
import type { HostPickedMedia } from "efficient-easel/screen/lib/host";
|
|
3
3
|
import type { SiteThemeRow, SiteThemeRowPatch } from "./site-theme-row.js";
|
|
4
4
|
import type { SectionTemplate, SectionTemplateRecord } from "efficient-easel/screen/lib/section-template-types";
|
|
5
|
+
import type { SharedSectionStore } from "efficient-easel/screen/lib/shared-section-types";
|
|
5
6
|
export type PageLayout = Record<string, unknown>;
|
|
6
7
|
export type { EditorPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock };
|
|
7
8
|
export type PageBundle = {
|
|
@@ -136,6 +137,7 @@ export interface WebsiteSectionTemplates {
|
|
|
136
137
|
rename(id: string, name: string): Promise<SectionTemplateRecord>;
|
|
137
138
|
remove(id: string): Promise<void>;
|
|
138
139
|
}
|
|
140
|
+
export type WebsiteSharedSections = SharedSectionStore;
|
|
139
141
|
export interface WebsiteTemplates {
|
|
140
142
|
get(id: string): Promise<{
|
|
141
143
|
id: string;
|
|
@@ -191,6 +193,7 @@ export interface WebsiteBackend {
|
|
|
191
193
|
site: WebsiteSite;
|
|
192
194
|
media: WebsiteMedia;
|
|
193
195
|
sectionTemplates?: WebsiteSectionTemplates;
|
|
196
|
+
sharedSections?: WebsiteSharedSections;
|
|
194
197
|
templates?: WebsiteTemplates;
|
|
195
198
|
preview?: WebsitePreview;
|
|
196
199
|
blog?: WebsiteBlog;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type TextStyle, type TextStyleCase } from "efficient-easel/text-styles/model";
|
|
2
|
+
import { type FontRole, type FontsValue } from "../../../format/lib/fonts.js";
|
|
3
|
+
import { type PartStyle } from "../puck/part-styles.js";
|
|
4
|
+
import { faceClassOf } from "../../../format/lib/text-style-face.js";
|
|
5
|
+
export { faceClassOf };
|
|
6
|
+
import type { SiteThemeRow, SiteThemeRowPatch } from "../../../format/lib/site-theme-row.js";
|
|
7
|
+
import { type HeadingCompression, type ResolvedHeadingTypography, type SizesValue } from "../../../format/lib/theme.js";
|
|
8
|
+
export type StoredTextStyleValues = {
|
|
9
|
+
font?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
size?: number;
|
|
12
|
+
weight?: number;
|
|
13
|
+
italic?: boolean;
|
|
14
|
+
lineHeight?: number;
|
|
15
|
+
letterSpacing?: number;
|
|
16
|
+
paragraphSpacing?: number;
|
|
17
|
+
letterCase?: TextStyleCase;
|
|
18
|
+
largestSize?: number;
|
|
19
|
+
sizePhone?: number;
|
|
20
|
+
};
|
|
21
|
+
export type StoredTextStyle = {
|
|
22
|
+
id: string;
|
|
23
|
+
kind: "heading" | "body";
|
|
24
|
+
name: string;
|
|
25
|
+
values: StoredTextStyleValues;
|
|
26
|
+
auto?: (keyof StoredTextStyleValues)[];
|
|
27
|
+
};
|
|
28
|
+
export type OldSiteText = {
|
|
29
|
+
fonts: Partial<FontsValue> | Record<string, string>;
|
|
30
|
+
sizes: Partial<SizesValue> | Record<string, number | null>;
|
|
31
|
+
compression: string;
|
|
32
|
+
typography: Partial<ResolvedHeadingTypography> | Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
export declare function textStylesFromOld(old: OldSiteText): StoredTextStyle[];
|
|
35
|
+
export declare function storedTextStyles(value: unknown): StoredTextStyle[];
|
|
36
|
+
export declare function resolveTextStyles(saved: unknown, old: OldSiteText): StoredTextStyle[];
|
|
37
|
+
export declare function applyListChange({ saved, old, cur, next, sizeOf, }: {
|
|
38
|
+
saved: unknown;
|
|
39
|
+
old: OldSiteText;
|
|
40
|
+
cur: readonly TextStyle[];
|
|
41
|
+
next: readonly TextStyle[];
|
|
42
|
+
sizeOf: (style: StoredTextStyle) => number;
|
|
43
|
+
}): {
|
|
44
|
+
saved: StoredTextStyle[];
|
|
45
|
+
old: OldSiteText;
|
|
46
|
+
};
|
|
47
|
+
export declare function listChangePatch(next: {
|
|
48
|
+
saved: StoredTextStyle[];
|
|
49
|
+
old: OldSiteText;
|
|
50
|
+
}, prev: OldSiteText): SiteThemeRowPatch;
|
|
51
|
+
export declare function toPanelStyles(stored: readonly StoredTextStyle[], sizeOf: (s: StoredTextStyle) => number): TextStyle[];
|
|
52
|
+
export declare function fromPanelStyles(list: readonly TextStyle[], sizeOf: (s: StoredTextStyle) => number): StoredTextStyle[];
|
|
53
|
+
export type SiteTextSeed = {
|
|
54
|
+
fonts: FontsValue;
|
|
55
|
+
sizes: SizesValue;
|
|
56
|
+
compression: HeadingCompression;
|
|
57
|
+
typography: ResolvedHeadingTypography;
|
|
58
|
+
textStyles: unknown;
|
|
59
|
+
};
|
|
60
|
+
export declare function siteTextFromRow(row: Partial<SiteThemeRow>): SiteTextSeed;
|
|
61
|
+
export declare function textStylesToOld(list: readonly StoredTextStyle[], prev: OldSiteText): OldSiteText;
|
|
62
|
+
export declare function themeWithTextStyles<T extends {
|
|
63
|
+
fonts?: unknown;
|
|
64
|
+
sizes?: unknown;
|
|
65
|
+
headingCompression?: unknown;
|
|
66
|
+
headingTypography?: unknown;
|
|
67
|
+
textStyles?: unknown;
|
|
68
|
+
}>(theme: T): T;
|
|
69
|
+
export declare function textStylesCss(list: readonly StoredTextStyle[]): string;
|
|
70
|
+
export declare function accentItalicCss(italic: boolean | null | undefined): string;
|
|
71
|
+
export declare function styleIdOfRole(role: FontRole | null | undefined): string | undefined;
|
|
72
|
+
export declare function partStyleToTextStyleValues(style: PartStyle): StoredTextStyleValues;
|
|
73
|
+
export declare function hasStyleChange(style: PartStyle): boolean;
|
|
74
|
+
export declare function pushIntoStyle({ saved, old, styleId, values, }: {
|
|
75
|
+
saved: unknown;
|
|
76
|
+
old: OldSiteText;
|
|
77
|
+
styleId: string;
|
|
78
|
+
values: StoredTextStyleValues;
|
|
79
|
+
}): {
|
|
80
|
+
saved: StoredTextStyle[];
|
|
81
|
+
old: OldSiteText;
|
|
82
|
+
};
|
|
83
|
+
export declare function eyebrowStyleId(list: readonly Pick<StoredTextStyle, "id" | "kind">[]): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{defaultTextStyles as J,textStyleCaseCss as X}from"efficient-easel/text-styles/model";import{FONT_OPTIONS as Y,normalizeFonts as F}from"../../../format/lib/fonts.js";import{PART_PHONE_MAX_CSS as G,STYLE_ID_OF_ROLE as U,TEXT_STYLE_ATTR as W,partSpacingOf as Z}from"../puck/part-styles.js";import{faceClassOf as I}from"../../../format/lib/text-style-face.js";import{compressionMetrics as q,headingTypographyFromRow as B,normalizeHeadingCompression as C,normalizeSizes as L}from"../../../format/lib/theme.js";const T=e=>e==="sentence"?"none":void 0,h=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,_=e=>typeof e=="string"&&e?e:void 0,j=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function p(e){const i={};for(const n of j)e[n]!==void 0&&(i[n]=e[n]);return i}function H(e,i){const{auto:n,...t}=e,s=new Set(i??[]),r=j.filter(o=>s.has(o)&&e.values[o]===void 0);return r.length?{...t,auto:r}:t}function O(e){const i=e.fonts,n=e.sizes,t=e.typography,s=q(e.compression),r={"heading-1":{font:_(i.heading),size:h(n.headingLarge),weight:h(t.weight),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:T(t.case),largestSize:h(t.maxPx)},"heading-2":{font:_(i.heading2),size:h(n.headingMedium),weight:h(t.weight2),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:T(t.case2)},"heading-3":{font:_(i.heading3),size:h(n.headingSmall),weight:h(t.weight3),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:T(t.case3)},"body-1":{font:_(i.body),size:h(n.body)},"body-5":{font:_(i.label),size:h(n.label)}};return J().map(({id:o,kind:l,name:d})=>({id:o,kind:l,name:d,values:p(r[o]??{})}))}function $(e){return Array.isArray(e)&&e.every(n=>n&&typeof n=="object"&&typeof n.id=="string"&&(n.kind==="heading"||n.kind==="body")&&typeof n.name=="string")?e.map(n=>H({...n,values:p(n.values??{})},Array.isArray(n.auto)?n.auto:void 0)):null}function le(e){return $(e)??[]}function w(e,i){const n=O(i),t=$(e);return t?t.map(s=>{const r={...P(n,s.id)};for(const o of s.auto??[])delete r[o];return{...s,values:p({...r,...s.values})}}):n}const P=(e,i)=>e.find(n=>n.id===i)?.values??{},R=["heading-1","heading-2","heading-3"];function de({saved:e,old:i,cur:n,next:t,sizeOf:s}){const r=O(i),o=$(e)??r.map(a=>({...a,values:{}})),l=w(o,i),d=[],y=t.map(a=>{const c=n.find(f=>f.id===a.id),b=o.find(f=>f.id===a.id);if(!c||!b)return K([a],s)[0];const u={...b.values},z=new Set(b.auto??[]),v=a.values,A=c.values,N=[...new Set([...Object.keys(v),...Object.keys(A)])].filter(f=>JSON.stringify(v[f])!==JSON.stringify(A[f]));N.sort((f,m)=>+(f==="letterSpacing")-+(m==="letterSpacing"));for(const f of N){const m=f==="lineSpacing"?"lineHeight":f,k=v[f];if(k===void 0){delete u[m],P(r,a.id)[m]!==void 0&&(d.push([a.id,m]),z.add(m));continue}if(z.delete(m),f==="lineSpacing")u.lineHeight=x(k/100,3);else if(f==="letterSpacing"){const V=l.find(D=>D.id===a.id),E=s({...a,values:p({...V?.values??{},...u})});u.letterSpacing=E?x(k/E,4):0}else u[m]=k}return H({id:a.id,kind:a.kind,name:a.name,values:p(u)},z)});let g=i.compression;if(d.some(([a,c])=>(c==="lineHeight"||c==="letterSpacing")&&R.includes(a))&&C(g)!=="normal"){for(const a of R){const c=y.find(u=>u.id===a);if(!c)continue;const b={...c.values};for(const u of["lineHeight","letterSpacing"])d.some(([z,v])=>z===a&&v===u)||b[u]===void 0&&!(c.auto??[]).includes(u)&&(b[u]=P(r,a)[u]);c.values=p(b)}g="normal"}return{saved:y,old:{...i,compression:g}}}function ce(e,i){const n={text_styles:e.saved};return e.old.compression!==i.compression&&(n.heading_compression=C(e.old.compression)),n}const x=(e,i)=>Number(e.toFixed(i));function ue(e,i){return e.map(n=>{const{lineHeight:t,letterSpacing:s,...r}=n.values,o={...r};return t!==void 0&&(o.lineSpacing=x(t*100,1)),s!==void 0&&(o.letterSpacing=x(s*i(n),2)),{id:n.id,kind:n.kind,name:n.name,values:o}})}function K(e,i){return e.map(n=>{const{lineSpacing:t,letterSpacing:s,...r}=n.values,o={id:n.id,kind:n.kind,name:n.name,values:p({...r})},l={...o.values};if(t!==void 0&&(l.lineHeight=x(t/100,3)),s!==void 0){const d=i({...o,values:{...o.values}});l.letterSpacing=d?x(s/d,4):0}return{...o,values:p(l)}})}function fe(e){const i={fonts:F({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:L({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:C(e.heading_compression),typography:B(e)},n=e.text_styles??null,t=Array.isArray(n)?M(w(n,i),i):i;return{fonts:F(t.fonts),sizes:L(t.sizes),compression:C(t.compression),typography:t.typography,textStyles:n}}function M(e,i){const n=a=>e.find(c=>c.id===a)?.values??{},t=n("heading-1"),s=n("heading-2"),r=n("heading-3"),o=n("body-1"),l=n("body-5"),d=i.fonts,y=i.sizes,g=i.typography,S=a=>a==="none"?"sentence":"authored";return{fonts:{...d,heading:t.font??d.heading,heading2:s.font??t.font??d.heading2,heading3:r.font??t.font??d.heading3,body:o.font??d.body,label:l.font??d.label},sizes:{...y,headingLarge:t.size??null,headingMedium:s.size??null,headingSmall:r.size??null,body:o.size??null,label:l.size??null},compression:i.compression,typography:{...g,case:S(t.letterCase),weight:t.weight??null,maxPx:t.largestSize??null,weight2:s.weight??null,weight3:r.weight??null,case2:S(s.letterCase),case3:S(r.letterCase)}}}function ge(e){const i=$(e.textStyles);if(!i||i.every(s=>Object.keys(s.values).length===0&&!s.auto))return e;const n={fonts:e.fonts??{},sizes:e.sizes??{},compression:String(e.headingCompression??"normal"),typography:e.headingTypography??{}},t=M(w(i,n),n);return{...e,fonts:t.fonts,sizes:t.sizes,headingCompression:t.compression,headingTypography:t.typography}}function Q(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function ee(e){const i=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function pe(e){const i=[];for(const n of e){const t=n.values,s=`.${I(n)}`,r=`[${W}="${n.id}"]`,o=`${s}, ${r}`,l=[],d=t.font!==void 0?Y.find(a=>a.key===t.font)?.cssVar:void 0;if(d&&l.push(`font-family: var(${d})`),t.size!==void 0){const a=t.largestSize!==void 0?Math.min(t.size,t.largestSize):t.size;l.push(`font-size: ${a}px`)}const y=t.color!==void 0?Q(t.color):null;y&&l.push(`color: ${y}`),t.italic===!0&&l.push("font-style: italic"),t.weight!==void 0&&l.push(`font-weight: ${t.weight}`);const g=[];t.lineHeight!==void 0&&g.push(`line-height: ${t.lineHeight}`),t.letterSpacing!==void 0&&g.push(`letter-spacing: ${t.letterSpacing}em`),n.kind==="body"&&l.push(...g);const S=X(t.letterCase);if(S&&l.push(`text-transform: ${S}`),t.paragraphSpacing&&l.push(`--sf-part-para: ${t.paragraphSpacing}px`),l.length&&i.push(`${o} { ${l.join("; ")} }`),n.kind==="heading"&&g.length&&i.push(`${o}, ${s}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${g.join("; ")} }`),t.paragraphSpacing&&i.push(...ee(`:is(${o})`)),t.sizePhone!==void 0){const a=ne[n.id],c=[`${o} { font-size: ${t.sizePhone}px }`];a&&c.push(`.sf-themed-content { --size-${a}: ${t.sizePhone}px !important }`),i.push(`@media ${G} { ${c.join(" ")} }`)}}return i.join(`
|
|
2
|
+
`)}const ne={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function he(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function me(e){return e?U[e]:void 0}function te(e){const i=Z(e);return p({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:i.lineHeight,letterSpacing:i.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function ye(e){return Object.keys(te(e)).length>0}function Se({saved:e,old:i,styleId:n,values:t}){return{saved:($(e)??O(i).map(o=>({...o,values:{}}))).map(o=>o.id===n?H({...o,values:p({...o.values,...t})},o.auto):o),old:i}}function be(e){const i=e.filter(n=>n.kind==="body").map(n=>Number(/^body-(\d+)$/.exec(n.id)?.[1])).filter(n=>Number.isInteger(n)&&n>0);return i.length?`body-${Math.max(...i)}`:"body-1"}export{he as accentItalicCss,de as applyListChange,be as eyebrowStyleId,I as faceClassOf,K as fromPanelStyles,ye as hasStyleChange,ce as listChangePatch,te as partStyleToTextStyleValues,Se as pushIntoStyle,w as resolveTextStyles,fe as siteTextFromRow,le as storedTextStyles,me as styleIdOfRole,pe as textStylesCss,O as textStylesFromOld,M as textStylesToOld,ge as themeWithTextStyles,ue as toPanelStyles};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.1.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/node": "^20",
|
|
73
73
|
"@types/react": "^19",
|
|
74
74
|
"@types/react-dom": "^19",
|
|
75
|
-
"efficient-easel": "^18.
|
|
75
|
+
"efficient-easel": "^18.2.0",
|
|
76
76
|
"efficient-shell": "^8.20.0",
|
|
77
77
|
"esbuild": "^0.28.0",
|
|
78
78
|
"happy-dom": "^20.14.5",
|