efficient-web-builder 49.0.0 → 49.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/editor/components/PartSettingsPanel.js +1 -1
  3. package/dist/editor/components/PreviewPartAnchors.d.ts +2 -2
  4. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  5. package/dist/editor/components/SectionTextPartBridge.d.ts +3 -1
  6. package/dist/editor/components/SectionTextPartBridge.js +1 -1
  7. package/dist/editor/lib/animation/hover-fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  10. package/dist/editor/lib/document/card-display-chips.d.ts +2 -1
  11. package/dist/editor/lib/document/card-display-chips.js +1 -1
  12. package/dist/editor/lib/document/mirror-cards-field.d.ts +20 -0
  13. package/dist/editor/lib/document/mirror-cards-field.js +1 -0
  14. package/dist/format/lib/content/box-layout.d.ts +2 -0
  15. package/dist/format/lib/content/box-layout.js +1 -1
  16. package/dist/format/lib/content/card-template.d.ts +2 -0
  17. package/dist/format/lib/content/card-template.js +1 -1
  18. package/dist/format/lib/content/mirror-cards.d.ts +32 -0
  19. package/dist/format/lib/content/mirror-cards.js +1 -0
  20. package/dist/format/lib/editor-words-catalogue.d.ts +8 -0
  21. package/dist/format/lib/editor-words-catalogue.js +4 -4
  22. package/dist/format/lib/sections/faq-text-regions.js +1 -1
  23. package/dist/format/lib/sections/section-text-regions.d.ts +1 -0
  24. package/dist/format/lib/sections/section-text-regions.js +1 -1
  25. package/dist/format/lib/sections/text-regions.d.ts +2 -0
  26. package/dist/format/lib/sections/text-regions.js +1 -1
  27. package/dist/render/components/CardRowContext.d.ts +1 -0
  28. package/dist/render/components/CardRowContext.js +1 -1
  29. package/dist/render/components/FAQ.js +1 -1
  30. package/dist/render/components/Flex.d.ts +6 -1
  31. package/dist/render/components/Flex.js +1 -1
  32. package/dist/render/components/MirrorContext.d.ts +3 -0
  33. package/dist/render/components/MirrorContext.js +1 -0
  34. package/dist/render/components/SiteGutterFrame.d.ts +1 -0
  35. package/dist/render/components/SiteGutterFrame.js +1 -1
  36. package/dist/render/components/Text.d.ts +2 -1
  37. package/dist/render/components/Text.js +1 -1
  38. package/dist/render/components/TextRegionRun.d.ts +7 -0
  39. package/dist/render/components/TextRegionRun.js +1 -0
  40. package/dist/render/lib/content/box-shared-columns.d.ts +31 -0
  41. package/dist/render/lib/content/box-shared-columns.js +1 -0
  42. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  43. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  44. package/dist/render/lib/document/editing-bridges.d.ts +2 -0
  45. package/dist/render/lib/document/part-styles.d.ts +26 -0
  46. package/dist/render/lib/document/part-styles.js +2 -2
  47. package/dist/render/lib/document/passes/section-width.js +1 -1
  48. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 49.1.0 - 2026-11-04
4
+
5
+ From main at `83fe5162`: #471, #476, #477, #486, #488. A minor: exports are added, no export is removed, and the peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: Row columns (`sharedColumns`) and Mirror cards (`mirrorCards`) are new settings, and nothing seeds them; a sized text region stores under the existing `_partStyles` keys.
6
+
7
+ ### Added
8
+
9
+ - **A host's data-drawn text takes a style and a size** (#471): a host registers its own text regions with `registerSectionTextRegions(tables)`, and a region with the new `sized` flag gets the Style list and the Font size cell (desktop and phone) in its part panel. Values are stored in `_partStyles["@<kind>"]` (`textStyle`, `size`, `sizePhone`); an old stored `role` draws as before. Exports: `registerSectionTextRegions`, `regionTakesSize`, `regionHasOwnLook`, `regionSheetStyle`, `regionShownDeclarations`, `regionCanvasDeclarations`, `regionCanvasRestore`, `partShownDeclarations`, `partCanvasDeclarations`, `partStyleWithoutSizeBox`, `storedPartStyle`, `ShownDeclarations`.
10
+ - **Mirror cards** (#476): on the card Box of a card template, every second card draws the other way round. Stored key `mirrorCards`: `"even"` mirrors cards 2, 4, 6; `"odd"` mirrors cards 1, 3, 5; absent draws the same bytes as before; Off removes the key. Exports: `MirrorCards`, `MirrorCardsBox`, `MirrorContext`, `MIRROR_CARDS_FACTS`, `MIRROR_CARDS_IDLE`, `MIRROR_CARDS_LABEL`, `MIRROR_CARDS_OFF`, `MIRROR_CARDS_OPTIONS`, `MIRROR_CARDS_TITLES`, `MIRROR_ROW_CLASS`, `mirrorCardsActs`, `mirrorCardsField`, `mirrorCardsOf`, `mirrorCardsOptions`, `mirrorCardsWrite`, `mirroredBoxClass`, `mirroredTextClasses`, `isMirroredCopy`, `useMirroredCopy`, `useUnderCardBox`, `ownsCard`, `CardCopyPlace`, `cardCopyPlace`.
11
+ - **A card template's row copies can share content-sized columns** (#477, decision D1 option B): Box setting **Row columns** (`sharedColumns`: `own` "Each row", the default, or `shared`) and its own phone key `sharedColumnsPhone` (`own` or `scroll` "Shared, scroll"). It shows only on a one-row Box that is the card of a card template. Exports: `SHARED_COLUMNS_KEY`, `SHARED_COLUMNS_LABEL`, `SHARED_COLUMNS_OFF`, `SHARED_COLUMNS_POINTS`, `SHARED_COLUMNS_PHONE_POINTS`, `SHARED_PLAIN_ATTR`, `sharedColumnsClasses`, `sharedColumnsCss`, `sharedColumnsDrawn`, `sharedColumnsFits`, `BOX_ALIGN_CLASS`, `useInsideSiteGutter`; `ON_A_CARD` is now exported. Known: the editor canvas draws shared columns with other widths than the published page (follow-up).
12
+
13
+ ### Fixed
14
+
15
+ - **The Row columns row is drawn in the Box panel** (#488). Before, the panel dropped it, so a merchant never saw #477's setting. The same fix draws a nested Box's **Gutter** on a Full width site and a top-level Hero group's **Placement**. A guard keeps a row with a block-fact show-when rule in the panel.
16
+ - **The Hover heading hides with its rows in the Phone view** (#486): one `hoverHeading()` makes it a desktop heading on every card section and text part.
17
+
3
18
  ## 49.0.0 - 2026-11-04
4
19
 
5
20
  From main at `7b0b29e8`: #479, #482, #484. A major because of #479: every class at a view line now uses the line's name from the host's site sheet. No export is removed, and the peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: the Hero strip converter (`heroTickerToStrip`) is not run by this package.
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as A,jsxs as m}from"react/jsx-runtime";import{useContext as lt,useEffect as ie,useRef as st,useState as Ce}from"react";import{FieldSelect as rt,InspectorField as it,fieldShownInView as at}from"efficient-easel/fields";import{SettingsField as ct}from"efficient-easel/panel";import{InspectorUpLevel as G}from"efficient-easel/chrome";import{StylesIcon as dt,TypeIcon as ut}from"efficient-easel/icons";import{useEasel as ft}from"efficient-easel/easel";import{TextPartPanel as pt}from"efficient-easel/copy";import{Button as mt,IconButton as ht,Tooltip as yt}from"efficient-shell/ui";import{PartTextBox as St,partTextCells as gt}from"./PartTextBox.js";import{SiteFields as Ee}from"./SiteFields.js";import{usePartMotion as xt}from"./usePartMotion.js";import{UiIcon as Ie}from"efficient-easel/draw/client";import{usePreviewHeader as bt}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as Pt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as vt}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as wt,partStyleToTextStyleValues as Tt,pushIntoStyle as Nt,resolveTextStyles as Ot,styleIdOfRole as Rt}from"../../render/lib/text-styles/site-text-styles.js";import{useSiteTextStylesWriter as kt}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as Ct}from"../lib/theme-row-persist.js";import{usePreviewDevice as Et}from"efficient-easel/draw/client";import{shownTier as ae}from"efficient-easel/screen/lib/document/device-fields";import{PART_PANEL_ROWS as Fe}from"../lib/document/part-panel-rows.js";import{usePartStyle as It}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as H,textFieldOffPage as Ft,textFieldPanelOnly as _t}from"../lib/document/controls.js";import{TEXT_FIELD_MARKER as zt}from"efficient-easel/draw";import{useSectionOps as Vt}from"efficient-easel/screen/lib/document/use-section-ops";import{FONT_OPTIONS as At,FONT_ROLES as Lt,FONT_ROLE_LABELS as _e,fontOption as ce,fontRoleOf as Bt}from"../../format/lib/fonts.js";import{isMultilineKind as Kt,partPlaceholder as Ut,typeInPlaceKind as Wt}from"../../render/lib/document/part-text.js";import{partRowField as Dt}from"../lib/document/part-row-field.js";import{decodePartKey as jt,partPropsWithRowValue as Gt,partRowValue as Ht}from"../../render/lib/document/part-rows.js";import{followedStyleOf as Mt,propsWithPartStyleValue as L,propsWithoutPartStyle as $t,readPartStyle as ze}from"../../render/lib/document/part-styles.js";import{partThemeColors as Xt}from"../../format/lib/document/part-inks.js";import{styleKeyForPart as Ve}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as Yt}from"../lib/document/part-typing.js";import{keysOnCanvas as qt,useCanvasTypingPart as Jt}from"../lib/document/canvas-typing.js";import{useEaselHost as Qt}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as Zt,SOURCE_ACTIONS as en,SOURCE_ACTION_LABEL as tn,partSourceNoteFor as nn,partSourceOf as on,sourceMenuIdOf as ln,sourceSlugOf as Ae}from"../../format/lib/document/source-bound-parts.js";import{encodePartId as sn,holdsAuthoredText as rn}from"../../render/lib/document/text-parts.js";import{regionsForSection as an}from"../../format/lib/sections/section-text-regions.js";import{textRegionOfPartKey as cn}from"../../format/lib/sections/text-regions.js";import{SameInEveryViewNote as Le}from"./SameInEveryViewNote.js";function de(t){return t?l(t):null}function Be(t){return t.kind==="role"?_e[t.role]:t.kind==="custom"?"Custom":null}function dn(t){const o=Bt(t.role);return o?{kind:"role",role:o}:null}function un(t,o){if(!t)return{kind:"unread"};const{faceRole:r,base:i}=t;if(o[r]===i.fontKey)return{kind:"role",role:r};const c=Object.keys(o).filter(s=>o[s]===i.fontKey);return c.length===1?{kind:"role",role:c[0]}:{kind:"custom"}}function ue(t,o,r,i){return dn(ze(t,o))??un(r,i)}function fn(t,o){if(!t.length)return null;const r=o(t[0]);return t.every(i=>o(i)===r)?r:null}const M="";function pn({face:t,base:o,onPick:r}){const i=t.kind==="role"?t.role:M,c=[{label:l("No style"),value:M},...Lt.map(s=>({label:l(_e[s]),value:s}))];return n(rt,{ariaLabel:l("Style"),value:i,options:c,inline:!0,onChange:s=>r(s===M?null:s),renderOption:s=>s.value===M?m(A,{children:[n("span",{className:"es-fsel-label sf-part-style-keep",children:s.label}),n("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section’s own")})]}):n("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${s.value})`},children:s.label}),renderValue:()=>n("span",{style:{fontFamily:o?.fontKey?`var(${ce(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:de(Be(t))}),valueText:s=>de(Be(t))??s?.label??""})}const Ke=["regionNote","regionStyle"],mn=Object.keys(Fe).filter(t=>!Ke.includes(t));function Ue(t,o){return!t.some(o)}function hn({sectionName:t,onBack:o,textEditor:r,styleRow:i,children:c,tabs:s}){const O=m(A,{children:[r,i,c]});return m("div",{className:"sf-part-panel",children:[n(G,{inline:!0,name:l(t),onSelect:o}),s?s(O):O]})}function We({source:t,slug:o,menuId:r}){const i=Qt(),c=en[t],s=!c.needsSlug||!!o;return n("div",{className:"sf-note sf-note--source",children:m("p",{className:"es-field-hint sf-hint-keep",children:[l(Zt[t]),s?m(A,{children:[" ",n(mt,{type:"button",variant:"link",size:"sm",onClick:()=>{c.type==="storefront-editor:open-menus"?i.send(c.type,{menuId:r??null}):o&&i.send(c.type,{slug:o})},children:l(tn)})]}):null]})})}const De=4,yn=120;function Sn({region:t,sizePx:o,face:r,base:i,onFollowStyle:c,source:s,slug:O,onBack:R,shows:w}){const T=t.follows;return m("div",{className:"sf-note",children:[w("regionNote")&&m(A,{children:[n("p",{children:n("strong",{children:l(t.label)})}),n("p",{children:o?l("Its size follows Styles ▸ {follows} — {px}px right now.",{follows:l(T),px:Math.round(o)}):l("Its size follows Styles ▸ {follows}.",{follows:l(T)})})]}),c?w("regionStyle")?n(A,{children:n(ct,{label:l("Style"),icon:n(dt,{}),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(t.label).toLowerCase()}),children:n(pn,{face:r,base:i,onPick:c})})}):null:w("regionNote")&&n("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.")}),s&&w("sourceNote")?n(We,{source:s,slug:O}):null,Ue([...Ke,"sourceNote"],k=>w(k)&&(k!=="sourceNote"||!!s))&&n(Le,{}),n(G,{inline:!0,name:l("Page"),onSelect:R})]})}function gn({onBack:t}){return m("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part is no longer here.")})}),n("p",{children:l("The section it belonged to has been changed or removed.")}),n(G,{inline:!0,name:l("Page"),onSelect:t})]})}function xn({onBack:t,partId:o,why:r}){return m("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part's settings did not open.")})}),n("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.")}),n("p",{className:"sf-note-detail",children:m("code",{children:[o," — ",r]})}),n(G,{inline:!0,name:l("Page"),onSelect:t})]})}function bn({nodeId:t,propKey:o,onBack:r,onEditStyle:i}){const{getItemById:c,getSelectorForId:s,config:O}=ft(e=>e),R=Vt(),w=Jt(),{partStyle:T}=It(),{fonts:k,textStyles:je}=bt(),$=lt(vt),fe=!$?.capabilities?.hasSiteTheme,{persist:Ge}=Ct({themeFromDocument:fe,tokenRef:$?.tokenRef,siteId:$?.siteId??null}),V=kt({themeFromDocument:fe,persist:Ge}),[He,X]=Ce(!1),B=Et(),h=e=>ae(B)!=="tablet"&&at(Fe[e],B),pe=st(null),d=c(t),y=s(t),me=d?O.components[d.type]:void 0,{key:x,row:b}=jt(o),he=me?.fields?.[x],S=b?Dt(he,b):he,C=sn(t,o),p=d?.props??{},P=Wt(S),ye=Ft(S),Se=rn(S),Me=d?on(d.type):null,Y=d?nn(d.type,x):null,q=b?Ht(p[x],b):p[x],ge=!!b&&!(Array.isArray(p[x])&&b.index<p[x].length);ie(()=>{if(qt(document))return;pe.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[C]);const[J,xe]=Ce(0);ie(()=>xe(0),[C]);const Q=!!d&&!ge&&(!y||!S);ie(()=>{if(!Q||J>=De)return;const e=setTimeout(()=>xe(a=>a+1),yn);return()=>clearTimeout(e)},[Q,J]);const $e=Q&&J<De,be=xt(t,Ve(d?.type,o),"textPart");if(!d||ge)return n(gn,{onBack:r});const K=an(d.type),Pe=K?cn(K,o):null;if(K&&Pe){const e=T?.partId===C?T:null,a=K[Pe],f=a.writable===!0&&!!y,v=re=>{y&&R.replaceComponent(y.zone,y.index,{...d,props:L(p,o,"role",re)})};return n(Ee,{motion:be,body:n(Sn,{region:a,sizePx:e?.base.sizePx??null,face:ue(p,o,e,k),base:e?.base??null,onFollowStyle:f?v:void 0,source:Me,slug:Ae(p),onBack:r,shows:h})})}if(!y||!S)return $e?n("div",{className:"sf-note","aria-busy":"true"}):n(xn,{onBack:r,partId:C,why:y?"no field":"no selector"});const ve=e=>{R.replaceComponent(y.zone,y.index,{...d,props:e})},Z=e=>{if(H(e).hidden!==H(q).hidden||!P){const f=b?Gt(p,x,b,e):{...p,[x]:e};f&&ve(f);return}Yt({node:d,propKey:o,kind:P,zone:y.zone,index:y.index},H(e).text,R.replaceComponent)},Xe=q,E=T?.partId===C?T:null,I=E?.styleOwner,U=I?c(I.owner):null,ee=I&&U?s(I.owner):null,te=!!(I&&U&&ee),F=te?U.props??{}:p,ne=te?e=>R.replaceComponent(ee.zone,ee.index,{...U,props:e}):ve,W=te?I.kind:Ve(d?.type,o),g=ze(F,W),u=[{partKey:W,face:ue(F,W,E,k),sizeGroup:E?.sizeGroup??null,base:E?.base??vn,style:g}],we=fn(u,e=>e.sizeGroup),Ye=Xt(E?.inks),_=(e,a)=>{let f=F;for(const v of u)f=L(f,v.partKey,e,a);ne(f)},qe=e=>e?_("textStyle",e):oe({textStyle:null,role:null}),oe=e=>{let a=F;for(const f of u)for(const[v,re]of Object.entries(e))a=L(a,f.partKey,v,re??null);ne(a)},le=P==="text"||P==="textarea",{text:Te,hidden:z}=H(q),D=S?.[zt]?.label??o,Ne=z?l("Show {label} on the slide",{label:l(D)}):l("Hide {label} on the slide",{label:l(D)}),Oe=m("div",{className:"sf-field-head",children:[n(ut,{}),n("span",{className:"sf-field-label sf-field-label--inline",children:l(D)}),le&&n(yt,{content:Ne,children:n(ht,{"aria-pressed":z,"aria-label":Ne,onClick:()=>Z({text:Te,hidden:!z}),children:z?n(Ie,{name:"eye-off",size:14}):n(Ie,{name:"eye",size:14})})})]}),j=!ye&&Se,Je=!!P&&(_t(S)||ye||z||!Se),Re=ue(F,W,E,k),Qe=Re.kind==="role"?Re.role:null,se=Mt(g)??Rt(Qe),ke=Ot(V.saved,V.old),Ze=Object.entries(g).filter(([e,a])=>e!=="role"&&e!=="textStyle"&&a!==void 0).length,et=()=>{let e=F;for(const a of u){const{role:f,textStyle:v}=a.style;e=$t(e,a.partKey),f&&(e=L(e,a.partKey,"role",f)),v&&(e=L(e,a.partKey,"textStyle",v))}ne(e)},N=se,tt=wt(u[0].style),nt=N?ke.find(e=>e.id===N)?.name??N:"",ot=()=>{X(!1),N&&(V.write(Nt({saved:V.saved,old:V.old,styleId:N,values:Tt(u[0].style)}),!0),et())};return m(hn,{sectionName:me?.label??d.type,onBack:r,tabs:e=>n(Ee,{motion:be,body:e}),textEditor:h("words")?n("div",{ref:pe,className:"sf-part-text",children:Je?n(St,{text:Te,onTextChange:e=>Z(le?{text:e,hidden:z}:e),multiline:Kt(P),markup:P!=="plainText",styled:!1,style:u[0].style,base:u[0].base,setValue:oe,colors:Ye,placeholder:de(Ut(S))??void 0,ariaLabel:l(D),head:Oe,typedOnCanvas:w===C}):P?le?Oe:null:n(it,{field:S,name:o,value:Xe,onChange:Z,id:`sf-part-${t}-${o}`})}):void 0,children:[Y&&h("sourceNote")&&n(We,{source:Y,slug:Ae(p),menuId:ln(p)}),j&&n(pt,{style:h("style")?{value:se??"",options:[{value:"",label:l("No style"),description:l("Section’s own")},...ke.map(e=>({value:e.id,label:e.name,description:e.values.font?ce(e.values.font)?.label:void 0}))],onChange:e=>qe(e||null),changed:Ze>0,onEditStyles:i,onUpdateStyle:N&&tt?()=>X(!0):void 0}:void 0,font:h("font")?{value:g.font??"",styleValue:ce(u[0].base.fontKey)?.label,options:At.map(e=>({label:e.label,value:e.key})),onChange:e=>_("font",e||null)}:void 0,italic:h("italic")?{value:g.italic,styleValue:Pn(je,se),onChange:e=>_("italic",e??null)}:void 0,cells:gt(u[0].style,u[0].base,oe,ae(B)).filter(e=>h(e.key)),align:h("align")?ae(B)==="mobile"?{value:g.alignPhone??"",styleValue:g.align??u[0].base.align,onChange:e=>_("alignPhone",e||null)}:{value:g.align??"",styleValue:u[0].base.align,onChange:e=>_("align",e||null)}:void 0,letterCase:h("letterCase")?{value:g.case??"",styleValue:u[0].base.case,onChange:e=>_("case",e||null)}:void 0}),He&&N&&n(Pt,{styleName:nt,onCancel:()=>X(!1),onConfirm:ot}),j&&we===null&&h("fixedSizeHint")&&n("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size — the site’s Text setting doesn’t resize this.")}),Ue(mn,e=>h(e)&&(e==="words"||(e==="sourceNote"?!!Y:e==="fixedSizeHint"?j&&we===null:j)))&&n(Le,{})]})}function Pn(t,o){return!o||!Array.isArray(t)?!1:t.find(i=>i?.id===o)?.values?.italic===!0}const vn={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};export{hn as PartPanelBody,We as PartSourceNote,pn as PartStyleSelect,bn as default,ue as partFace};
1
+ "use client";import{jsx as n,Fragment as H,jsxs as y}from"react/jsx-runtime";import{useContext as bt,useEffect as pe,useRef as Pt,useState as Le}from"react";import{FieldSelect as wt,InspectorField as vt,fieldShownInView as Tt}from"efficient-easel/fields";import{SettingsField as Nt}from"efficient-easel/panel";import{InspectorUpLevel as Y}from"efficient-easel/chrome";import{StylesIcon as kt,TypeIcon as Ot}from"efficient-easel/icons";import{useEasel as Ct}from"efficient-easel/easel";import{TextPartPanel as Be}from"efficient-easel/copy";import{Button as Rt,IconButton as Et,Tooltip as It}from"efficient-shell/ui";import{PartTextBox as zt,partTextCells as Ue}from"./PartTextBox.js";import{SiteFields as me}from"./SiteFields.js";import{usePartMotion as Ft}from"./usePartMotion.js";import{UiIcon as We}from"efficient-easel/draw/client";import{usePreviewHeader as _t}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as Vt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as At}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as Lt,partStyleToTextStyleValues as Bt,pushIntoStyle as Ut,resolveTextStyles as He,styleIdOfRole as Wt}from"../../render/lib/text-styles/site-text-styles.js";import{useSiteTextStylesWriter as Ht}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as jt}from"../lib/theme-row-persist.js";import{usePreviewDevice as Dt}from"efficient-easel/draw/client";import{shownTier as q}from"efficient-easel/screen/lib/document/device-fields";import{PART_PANEL_ROWS as je}from"../lib/document/part-panel-rows.js";import{usePartStyle as Gt}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as J,textFieldOffPage as Kt,textFieldPanelOnly as Mt}from"../lib/document/controls.js";import{TEXT_FIELD_MARKER as $t}from"efficient-easel/draw";import{useSectionOps as Xt}from"efficient-easel/screen/lib/document/use-section-ops";import{FONT_OPTIONS as Yt,FONT_ROLES as qt,FONT_ROLE_LABELS as De,fontOption as he,fontRoleOf as Jt}from"../../format/lib/fonts.js";import{isMultilineKind as Qt,partPlaceholder as Zt,typeInPlaceKind as en}from"../../render/lib/document/part-text.js";import{partRowField as tn}from"../lib/document/part-row-field.js";import{decodePartKey as nn,partPropsWithRowValue as on,partRowValue as ln}from"../../render/lib/document/part-rows.js";import{followedStyleOf as Ge,propsWithPartStyleValue as U,propsWithoutPartStyle as sn,readPartStyle as ye,regionHasOwnLook as rn}from"../../render/lib/document/part-styles.js";import{partThemeColors as an}from"../../format/lib/document/part-inks.js";import{styleKeyForPart as Ke}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as cn}from"../lib/document/part-typing.js";import{keysOnCanvas as dn,useCanvasTypingPart as un}from"../lib/document/canvas-typing.js";import{useEaselHost as fn}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as pn,SOURCE_ACTIONS as mn,SOURCE_ACTION_LABEL as hn,partSourceNoteFor as yn,partSourceOf as gn,sourceMenuIdOf as Sn,sourceSlugOf as ge}from"../../format/lib/document/source-bound-parts.js";import{encodePartId as xn,holdsAuthoredText as bn}from"../../render/lib/document/text-parts.js";import{regionsForSection as Pn}from"../../format/lib/sections/section-text-regions.js";import{regionTakesSize as wn,textRegionOfPartKey as vn}from"../../format/lib/sections/text-regions.js";import{SameInEveryViewNote as Me}from"./SameInEveryViewNote.js";function Se(t){return t?l(t):null}function $e(t){return t.kind==="role"?De[t.role]:t.kind==="custom"?"Custom":null}function Tn(t){const o=Jt(t.role);return o?{kind:"role",role:o}:null}function Nn(t,o){if(!t)return{kind:"unread"};const{faceRole:r,base:i}=t;if(o[r]===i.fontKey)return{kind:"role",role:r};const c=Object.keys(o).filter(s=>o[s]===i.fontKey);return c.length===1?{kind:"role",role:c[0]}:{kind:"custom"}}function Q(t,o,r,i){return Tn(ye(t,o))??Nn(r,i)}function kn(t,o){if(!t.length)return null;const r=o(t[0]);return t.every(i=>o(i)===r)?r:null}function Xe(t){return[{value:j,label:l("No style"),description:l("Section’s own")},...t.map(o=>({value:o.id,label:o.name,description:o.values.font?he(o.values.font)?.label:void 0}))]}const j="";function On({face:t,base:o,onPick:r}){const i=t.kind==="role"?t.role:j,c=[{label:l("No style"),value:j},...qt.map(s=>({label:l(De[s]),value:s}))];return n(wt,{ariaLabel:l("Style"),value:i,options:c,inline:!0,onChange:s=>r(s===j?null:s),renderOption:s=>s.value===j?y(H,{children:[n("span",{className:"es-fsel-label sf-part-style-keep",children:s.label}),n("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section’s own")})]}):n("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${s.value})`},children:s.label}),renderValue:()=>n("span",{style:{fontFamily:o?.fontKey?`var(${he(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Se($e(t))}),valueText:s=>Se($e(t))??s?.label??""})}const Ye=["regionNote","regionStyle"],Cn=Object.keys(je).filter(t=>!Ye.includes(t));function qe(t,o){return!t.some(o)}function Rn({sectionName:t,onBack:o,textEditor:r,styleRow:i,children:c,tabs:s}){const E=y(H,{children:[r,i,c]});return y("div",{className:"sf-part-panel",children:[n(Y,{inline:!0,name:l(t),onSelect:o}),s?s(E):E]})}function Je({source:t,slug:o,menuId:r}){const i=fn(),c=mn[t],s=!c.needsSlug||!!o;return n("div",{className:"sf-note sf-note--source",children:y("p",{className:"es-field-hint sf-hint-keep",children:[l(pn[t]),s?y(H,{children:[" ",n(Rt,{type:"button",variant:"link",size:"sm",onClick:()=>{c.type==="storefront-editor:open-menus"?i.send(c.type,{menuId:r??null}):o&&i.send(c.type,{slug:o})},children:l(hn)})]}):null]})})}const Qe=4,En=120;function Ze(t){return 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(t.label).toLowerCase()})}function et({region:t,sizePx:o,face:r,base:i,onFollowStyle:c,source:s,slug:E,onBack:N,shows:x,sizedStyle:b,ownLook:I}){const D=t.follows;return y("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l(t.label)})}),x("regionNote")&&!I&&n("p",{children:o?l("Its size follows Styles ▸ {follows} — {px}px right now.",{follows:l(D),px:Math.round(o)}):l("Its size follows Styles ▸ {follows}.",{follows:l(D)})}),b?y(H,{children:[b,x("regionStyle")&&n("p",{className:"es-field-hint sf-hint-keep",children:Ze(t)})]}):c?x("regionStyle")?n(H,{children:n(Nt,{label:l("Style"),icon:n(kt,{}),hint:Ze(t),children:n(On,{face:r,base:i,onPick:c})})}):null:x("regionNote")&&n("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.")}),s&&x("sourceNote")?n(Je,{source:s,slug:E}):null,qe([...Ye,"sourceNote",...b?["fontSize"]:[]],z=>x(z)&&(z!=="sourceNote"||!!s))&&n(Me,{}),n(Y,{inline:!0,name:l("Page"),onSelect:N})]})}function In({onBack:t}){return y("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part is no longer here.")})}),n("p",{children:l("The section it belonged to has been changed or removed.")}),n(Y,{inline:!0,name:l("Page"),onSelect:t})]})}function zn({onBack:t,partId:o,why:r}){return y("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part's settings did not open.")})}),n("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.")}),n("p",{className:"sf-note-detail",children:y("code",{children:[o," — ",r]})}),n(Y,{inline:!0,name:l("Page"),onSelect:t})]})}function Fn({nodeId:t,propKey:o,onBack:r,onEditStyle:i}){const{getItemById:c,getSelectorForId:s,config:E}=Ct(e=>e),N=Xt(),x=un(),{partStyle:b}=Gt(),{fonts:I,textStyles:D}=_t(),z=bt(At),xe=!z?.capabilities?.hasSiteTheme,{persist:nt}=jt({themeFromDocument:xe,tokenRef:z?.tokenRef,siteId:z?.siteId??null}),k=Ht({themeFromDocument:xe,persist:nt}),[ot,Z]=Le(!1),W=Dt(),f=e=>q(W)!=="tablet"&&Tt(je[e],W),be=Pt(null),d=c(t),p=s(t),Pe=d?E.components[d.type]:void 0,{key:P,row:w}=nn(o),we=Pe?.fields?.[P],g=w?tn(we,w):we,F=xn(t,o),u=d?.props??{},v=en(g),ve=Kt(g),Te=bn(g),Ne=d?gn(d.type):null,ee=d?yn(d.type,P):null,te=w?ln(u[P],w):u[P],ke=!!w&&!(Array.isArray(u[P])&&w.index<u[P].length);pe(()=>{if(dn(document))return;be.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[F]);const[ne,Oe]=Le(0);pe(()=>Oe(0),[F]);const oe=!!d&&!ke&&(!p||!g);pe(()=>{if(!oe||ne>=Qe)return;const e=setTimeout(()=>Oe(a=>a+1),En);return()=>clearTimeout(e)},[oe,ne]);const lt=oe&&ne<Qe,le=Ft(t,Ke(d?.type,o),"textPart");if(!d||ke)return n(In,{onBack:r});const G=Pn(d.type),Ce=G?vn(G,o):null;if(G&&Ce){const e=b?.partId===F?b:null,a=G[Ce],h=a.writable===!0&&!!p,T=C=>{p&&N.replaceComponent(p.zone,p.index,{...d,props:U(u,o,"role",C)})};if(h&&wn(a)){const C=ye(u,o),Ae=R=>{if(!p)return;let fe=u;for(const[St,xt]of Object.entries(R))fe=U(fe,o,St,xt??null);N.replaceComponent(p.zone,p.index,{...d,props:fe})},ht=He(k.saved,k.old),yt=Ge(C)??"",gt=Ue(C,e?.base??tt,Ae,q(W)).filter(R=>R.key==="fontSize"&&f(R.key));return n(me,{motion:le,body:n(et,{region:a,sizePx:e?.base.sizePx??null,face:Q(u,o,e,I),base:e?.base??null,source:Ne,slug:ge(u),onBack:r,shows:f,ownLook:rn(C),sizedStyle:n(Be,{style:f("style")?{value:yt,options:Xe(ht),onChange:R=>Ae(R?{textStyle:R}:{textStyle:null,role:null}),onEditStyles:i}:void 0,cells:gt})})})}return n(me,{motion:le,body:n(et,{region:a,sizePx:e?.base.sizePx??null,face:Q(u,o,e,I),base:e?.base??null,onFollowStyle:h?T:void 0,source:Ne,slug:ge(u),onBack:r,shows:f})})}if(!p||!g)return lt?n("div",{className:"sf-note","aria-busy":"true"}):n(zn,{onBack:r,partId:F,why:p?"no field":"no selector"});const Re=e=>{N.replaceComponent(p.zone,p.index,{...d,props:e})},se=e=>{if(J(e).hidden!==J(te).hidden||!v){const h=w?on(u,P,w,e):{...u,[P]:e};h&&Re(h);return}cn({node:d,propKey:o,kind:v,zone:p.zone,index:p.index},J(e).text,N.replaceComponent)},st=te,_=b?.partId===F?b:null,V=_?.styleOwner,K=V?c(V.owner):null,re=V&&K?s(V.owner):null,ie=!!(V&&K&&re),A=ie?K.props??{}:u,ae=ie?e=>N.replaceComponent(re.zone,re.index,{...K,props:e}):Re,M=ie?V.kind:Ke(d?.type,o),S=ye(A,M),m=[{partKey:M,face:Q(A,M,_,I),sizeGroup:_?.sizeGroup??null,base:_?.base??tt,style:S}],Ee=kn(m,e=>e.sizeGroup),rt=an(_?.inks),L=(e,a)=>{let h=A;for(const T of m)h=U(h,T.partKey,e,a);ae(h)},it=e=>e?L("textStyle",e):ce({textStyle:null,role:null}),ce=e=>{let a=A;for(const h of m)for(const[T,C]of Object.entries(e))a=U(a,h.partKey,T,C??null);ae(a)},de=v==="text"||v==="textarea",{text:Ie,hidden:B}=J(te),$=g?.[$t]?.label??o,ze=B?l("Show {label} on the slide",{label:l($)}):l("Hide {label} on the slide",{label:l($)}),Fe=y("div",{className:"sf-field-head",children:[n(Ot,{}),n("span",{className:"sf-field-label sf-field-label--inline",children:l($)}),de&&n(It,{content:ze,children:n(Et,{"aria-pressed":B,"aria-label":ze,onClick:()=>se({text:Ie,hidden:!B}),children:B?n(We,{name:"eye-off",size:14}):n(We,{name:"eye",size:14})})})]}),X=!ve&&Te,at=!!v&&(Mt(g)||ve||B||!Te),_e=Q(A,M,_,I),ct=_e.kind==="role"?_e.role:null,ue=Ge(S)??Wt(ct),Ve=He(k.saved,k.old),dt=Object.entries(S).filter(([e,a])=>e!=="role"&&e!=="textStyle"&&a!==void 0).length,ut=()=>{let e=A;for(const a of m){const{role:h,textStyle:T}=a.style;e=sn(e,a.partKey),h&&(e=U(e,a.partKey,"role",h)),T&&(e=U(e,a.partKey,"textStyle",T))}ae(e)},O=ue,ft=Lt(m[0].style),pt=O?Ve.find(e=>e.id===O)?.name??O:"",mt=()=>{Z(!1),O&&(k.write(Ut({saved:k.saved,old:k.old,styleId:O,values:Bt(m[0].style)}),!0),ut())};return y(Rn,{sectionName:Pe?.label??d.type,onBack:r,tabs:e=>n(me,{motion:le,body:e}),textEditor:f("words")?n("div",{ref:be,className:"sf-part-text",children:at?n(zt,{text:Ie,onTextChange:e=>se(de?{text:e,hidden:B}:e),multiline:Qt(v),markup:v!=="plainText",styled:!1,style:m[0].style,base:m[0].base,setValue:ce,colors:rt,placeholder:Se(Zt(g))??void 0,ariaLabel:l($),head:Fe,typedOnCanvas:x===F}):v?de?Fe:null:n(vt,{field:g,name:o,value:st,onChange:se,id:`sf-part-${t}-${o}`})}):void 0,children:[ee&&f("sourceNote")&&n(Je,{source:ee,slug:ge(u),menuId:Sn(u)}),X&&n(Be,{style:f("style")?{value:ue??"",options:Xe(Ve),onChange:e=>it(e||null),changed:dt>0,onEditStyles:i,onUpdateStyle:O&&ft?()=>Z(!0):void 0}:void 0,font:f("font")?{value:S.font??"",styleValue:he(m[0].base.fontKey)?.label,options:Yt.map(e=>({label:e.label,value:e.key})),onChange:e=>L("font",e||null)}:void 0,italic:f("italic")?{value:S.italic,styleValue:_n(D,ue),onChange:e=>L("italic",e??null)}:void 0,cells:Ue(m[0].style,m[0].base,ce,q(W)).filter(e=>f(e.key)),align:f("align")?q(W)==="mobile"?{value:S.alignPhone??"",styleValue:S.align??m[0].base.align,onChange:e=>L("alignPhone",e||null)}:{value:S.align??"",styleValue:m[0].base.align,onChange:e=>L("align",e||null)}:void 0,letterCase:f("letterCase")?{value:S.case??"",styleValue:m[0].base.case,onChange:e=>L("case",e||null)}:void 0}),ot&&O&&n(Vt,{styleName:pt,onCancel:()=>Z(!1),onConfirm:mt}),X&&Ee===null&&f("fixedSizeHint")&&n("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size — the site’s Text setting doesn’t resize this.")}),qe(Cn,e=>f(e)&&(e==="words"||(e==="sourceNote"?!!ee:e==="fixedSizeHint"?X&&Ee===null:X)))&&n(Me,{})]})}function _n(t,o){return!o||!Array.isArray(t)?!1:t.find(i=>i?.id===o)?.values?.italic===!0}const tt={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};export{Rn as PartPanelBody,Je as PartSourceNote,On as PartStyleSelect,Fn as default,Q as partFace};
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type PartNeedle } from "../../render/lib/document/text-parts.js";
3
- import { type PartStyleBase, type PartStyles } from "../../render/lib/document/part-styles.js";
3
+ import { type ShownDeclarations, type PartStyleBase, type PartStyles } from "../../render/lib/document/part-styles.js";
4
4
  import { type FontRole } from "../../format/lib/fonts.js";
5
5
  import { type TypeGroup } from "../../format/lib/theme.js";
6
6
  import { type PartMotion } from "../../render/lib/animation/part-motion.js";
@@ -8,7 +8,7 @@ export declare function styleTagsOf(element: HTMLElement): {
8
8
  faceRole: FontRole;
9
9
  sizeGroup: TypeGroup | null;
10
10
  };
11
- export declare function measureStyleBase(element: HTMLElement): PartStyleBase;
11
+ export declare function measureStyleBase(element: HTMLElement, shown?: ShownDeclarations): PartStyleBase;
12
12
  export default function PreviewPartAnchors({ needles, styles, motions, type, children, }: {
13
13
  needles: PartNeedle[];
14
14
  styles: PartStyles;
@@ -1 +1 @@
1
- "use client";import{jsx as F}from"react/jsx-runtime";import{readInks as z}from"../../format/lib/document/part-inks.js";import{useEffect as H,useRef as v}from"react";import{markOverlayPortal as Y}from"../../format/lib/document/overlay-portal.js";import{usePreviewParts as $}from"efficient-easel/draw/client";import{usePartStyle as j}from"./PreviewPartStyleContext.js";import{usePreviewDevice as G}from"efficient-easel/draw/client";import{decodePartId as q,encodePartId as U}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as V}from"efficient-easel/canvas";import{engagePartAnchors as Q}from"../lib/document/part-anchors.js";import{PART_ATTR as g,PART_STYLE_KIND_ATTR as T,PART_STYLE_OWNER_ATTR as X,partStyleOwnerOf as O}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as K,applyPartStyles as x,blockDrawsTextStyle as Z,partFontKeyOf as ee,partStyleBase as te,partStyleSource as re}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as oe,styleRoleOfClassName as ne}from"../../format/lib/fonts.js";import{typeScaleGroupOfClassName as I}from"../../format/lib/theme.js";import{styleKeyForPart as C}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as se,PART_HOST_ATTR as ie}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as le}from"../lib/document/part-motion-canvas.js";function ae(a){let o=null,i=null;for(let t=a;t&&(o===null||i===null);t=t.parentElement){const p=t.getAttribute("class");o??=ne(p),i??=I(p)}return{faceRole:o??"body",sizeGroup:i}}function D(a){const o=a.style,i={};for(const r of K)i[r]=o[r]??"",o[r]="";const t=getComputedStyle(a),p=getComputedStyle(a.ownerDocument.documentElement),m=te({fontSize:t.fontSize,fontWeight:t.fontWeight,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,textAlign:t.textAlign,textTransform:t.textTransform,paddingTop:t.paddingTop},ee(t.fontFamily,r=>p.getPropertyValue(r)));for(const r of K)o[r]=i[r];return m}function pe({needles:a,styles:o,motions:i=se,type:t,children:p}){const m=v(null),{selectedPartId:r}=$(),{setPartStyle:P}=j(),d=G()==="mobile",b=JSON.stringify(a),h=JSON.stringify(o),A=JSON.stringify(i),J=v(new Map);return H(()=>{const u=m.current;if(!u)return;const R=[],w=()=>u.parentElement,M=l=>{const n=w();if(!n)return null;const f=new MutationObserver(l);return f.observe(n,{attributes:!0,attributeFilter:[V]}),()=>f.disconnect()},k=l=>{const n=new MutationObserver(l);return n.observe(u,{childList:!0,subtree:!0,characterData:!0}),()=>n.disconnect()};let c=[];R.push(()=>{for(const l of c)l();c=[]});const L=JSON.parse(b),E=JSON.parse(h),W=JSON.parse(A),B=Q(u,L,w,M,(l,n,f)=>{for(const e of c)e();c=[];const _=[];for(const e of f){const s=e,y=Y(s);y&&c.push(y),s.getAttribute(g)===r&&_.push(s)}const N=re(n,r,_,e=>oe(e)!==null||I(e)!==null);if(N&&r){const e=N;P({partId:r,...ae(e),base:D(e),inks:z(e),...(()=>{const s=O(e);return s?{styleOwner:s}:{}})()})}x(f.filter(e=>!O(e)).map(e=>({element:e,partId:e.getAttribute(g)??""})),E,e=>D(e),e=>C(t,e),void 0,d,e=>Z(t,e));const S=[...u.querySelectorAll(`[${X}="${CSS.escape(n)}"][${T}]`)];S.length&&x(S.map(e=>({element:e,partId:U(n,e.getAttribute(T)??"")})),E,void 0,e=>e,void 0,d),c.push(le([...f.filter(e=>!O(e)).map(e=>{const s=e,y=q(s.getAttribute(g)??"")?.propKey??"";return{element:s,partKey:C(t,y)}}),...S.map(e=>({element:e,partKey:e.getAttribute(T)??""}))],e=>W[e],d,J.current))},k);return()=>{B();for(const l of R)l()}},[b,h,A,r,P,d,t]),F("div",{ref:m,[ie]:"",style:{display:"contents"},children:p})}export{pe as default,D as measureStyleBase,ae as styleTagsOf};
1
+ "use client";import{jsx as Y}from"react/jsx-runtime";import{readInks as $}from"../../format/lib/document/part-inks.js";import{useEffect as j,useRef as x}from"react";import{markOverlayPortal as G}from"../../format/lib/document/overlay-portal.js";import{usePreviewParts as q}from"efficient-easel/draw/client";import{usePartStyle as U}from"./PreviewPartStyleContext.js";import{usePreviewDevice as V}from"efficient-easel/draw/client";import{decodePartId as I,encodePartId as Q}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as X}from"efficient-easel/canvas";import{engagePartAnchors as Z}from"../lib/document/part-anchors.js";import{PART_ATTR as P,PART_STYLE_KIND_ATTR as b,PART_STYLE_OWNER_ATTR as tt,partStyleOwnerOf as g}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as D,applyPartStyles as C,blockDrawsTextStyle as F,partFontKeyOf as et,partShownDeclarations as rt,partStyleBase as ot,partStyleSource as nt,storedPartStyle as st}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as it,styleRoleOfClassName as lt}from"../../format/lib/fonts.js";import{typeScaleGroupOfClassName as k}from"../../format/lib/theme.js";import{styleKeyForPart as A}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as at,PART_HOST_ATTR as ct}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as pt}from"../lib/document/part-motion-canvas.js";function ft(p){let s=null,o=null;for(let e=p;e&&(s===null||o===null);e=e.parentElement){const r=e.getAttribute("class");s??=lt(r),o??=k(r)}return{faceRole:s??"body",sizeGroup:o}}function z(p,s={}){const o=p.style,e={};for(const n of D)e[n]=o[n]??"",o[n]="";s.fontFamily&&(o.fontFamily=s.fontFamily),s.fontSize&&(o.fontSize=s.fontSize);const r=getComputedStyle(p),S=getComputedStyle(p.ownerDocument.documentElement),a=ot({fontSize:r.fontSize,fontWeight:r.fontWeight,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,textAlign:r.textAlign,textTransform:r.textTransform,paddingTop:r.paddingTop},et(r.fontFamily,n=>S.getPropertyValue(n)));for(const n of D)o[n]=e[n];return a}function ut({needles:p,styles:s,motions:o=at,type:e,children:r}){const S=x(null),{selectedPartId:a}=q(),{setPartStyle:n}=U(),y=V()==="mobile",h=JSON.stringify(p),R=JSON.stringify(s),w=JSON.stringify(o),J=x(new Map);return j(()=>{const d=S.current;if(!d)return;const E=[],_=()=>d.parentElement,M=c=>{const i=_();if(!i)return null;const u=new MutationObserver(c);return u.observe(i,{attributes:!0,attributeFilter:[X]}),()=>u.disconnect()},L=c=>{const i=new MutationObserver(c);return i.observe(d,{childList:!0,subtree:!0,characterData:!0}),()=>i.disconnect()};let f=[];E.push(()=>{for(const c of f)c();f=[]});const W=JSON.parse(h),T=JSON.parse(R),B=JSON.parse(w),H=Z(d,W,_,M,(c,i,u)=>{for(const t of f)t();f=[];const K=[];for(const t of u){const l=t,m=G(l);m&&f.push(m),l.getAttribute(P)===a&&K.push(l)}const N=nt(i,a,K,t=>it(t)!==null||k(t)!==null);if(N&&a){const t=N,l=I(a)?.propKey??"",m=g(t)?{}:rt(st(T,A(e,l)),y,{blockDrawsStyle:F(e,l)});n({partId:a,...ft(t),base:z(t,m),inks:$(t),...(()=>{const v=g(t);return v?{styleOwner:v}:{}})()})}C(u.filter(t=>!g(t)).map(t=>({element:t,partId:t.getAttribute(P)??""})),T,t=>z(t),t=>A(e,t),void 0,y,t=>F(e,t));const O=[...d.querySelectorAll(`[${tt}="${CSS.escape(i)}"][${b}]`)];O.length&&C(O.map(t=>({element:t,partId:Q(i,t.getAttribute(b)??"")})),T,void 0,t=>t,void 0,y),f.push(pt([...u.filter(t=>!g(t)).map(t=>{const l=t,m=I(l.getAttribute(P)??"")?.propKey??"";return{element:l,partKey:A(e,m)}}),...O.map(t=>({element:t,partKey:t.getAttribute(b)??""}))],t=>B[t],y,J.current))},L);return()=>{H();for(const c of E)c()}},[h,R,w,a,n,y,e]),Y("div",{ref:S,[ct]:"",style:{display:"contents"},children:r})}export{ut as default,z as measureStyleBase,ft as styleTagsOf};
@@ -1,6 +1,8 @@
1
1
  import { type ReactNode } from "react";
2
- export default function SectionTextPartBridge({ nodeId, sectionType, children, }: {
2
+ import { type PartStyles } from "../../render/lib/document/part-styles.js";
3
+ export default function SectionTextPartBridge({ nodeId, sectionType, partStyles, children, }: {
3
4
  nodeId: string;
4
5
  sectionType: string;
6
+ partStyles?: PartStyles;
5
7
  children: ReactNode;
6
8
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as g}from"react/jsx-runtime";import{useEffect as y,useRef as A}from"react";import{markOverlayPortal as R}from"../../format/lib/document/overlay-portal.js";import{measureStyleBase as T,styleTagsOf as x}from"./PreviewPartAnchors.js";import{usePreviewParts as S}from"efficient-easel/draw/client";import{usePartStyle as E}from"./PreviewPartStyleContext.js";import{REGION_PART_ATTR as p,encodePartId as O}from"../../render/lib/document/text-parts.js";import{TEXT_REGION_ATTR as P,textRegionOfAttr as _,textRegionPartKey as b}from"../../format/lib/sections/text-regions.js";import{regionsForSection as h}from"../../format/lib/sections/section-text-regions.js";function v({nodeId:e,sectionType:o,children:d}){const s=A(null),{selectedPartId:i}=S(),{setPartStyle:n}=E();return y(()=>{const f=s.current,c=h(o);if(!f||!e||!c)return;const m=[],l=Array.from(f.querySelectorAll(`[${P}]`));for(const t of l){const a=_(c,t.getAttribute(P));if(!a)continue;const u=R(t);u&&m.push(u);const r=O(e,b(a));t.setAttribute(p,r),r===i&&n({partId:r,...x(t),base:T(t)})}return()=>{for(const t of m)t();for(const t of l)t.removeAttribute(p)}},[e,o,i,n]),g("div",{ref:s,style:{display:"contents"},children:d})}export{v as default};
1
+ "use client";import{jsx as x}from"react/jsx-runtime";import{useEffect as E,useRef as _}from"react";import{markOverlayPortal as I}from"../../format/lib/document/overlay-portal.js";import{measureStyleBase as O,styleTagsOf as w}from"./PreviewPartAnchors.js";import{usePreviewDevice as D,usePreviewParts as K}from"efficient-easel/draw/client";import{usePartStyle as N}from"./PreviewPartStyleContext.js";import{REGION_PART_ATTR as R,encodePartId as j}from"../../render/lib/document/text-parts.js";import{TEXT_REGION_ATTR as b,textRegionOfAttr as B,textRegionPartKey as C}from"../../format/lib/sections/text-regions.js";import{regionsForSection as G}from"../../format/lib/sections/section-text-regions.js";import{TEXT_STYLE_ATTR as n,isTextStyleId as X,regionCanvasDeclarations as k,regionCanvasRestore as q,regionSheetStyle as J,regionShownDeclarations as L}from"../../render/lib/document/part-styles.js";function Y({nodeId:s,sectionType:c,partStyles:m,children:v}){const y=_(null),{selectedPartId:u}=K(),{setPartStyle:p}=N(),f=D()==="mobile",z=JSON.stringify(m??null);return E(()=>{const S=y.current,o=G(c);if(!S||!s||!o)return;const l=[],d=Array.from(S.querySelectorAll(`[${b}]`));for(const t of d){const r=B(o,t.getAttribute(b));if(!r)continue;const g=I(t);g&&l.push(g);const A=C(r),a=j(s,A);t.setAttribute(R,a);const i=m?.[A];if(o[r].sized&&J(i)){const e=k(i,f),F={fontFamily:t.style.fontFamily,fontSize:t.style.fontSize},T=t.getAttribute(n);e.fontFamily&&(t.style.fontFamily=e.fontFamily),e.fontSize&&(t.style.fontSize=e.fontSize);const h={fontFamily:e.fontFamily?t.style.fontFamily:void 0,fontSize:e.fontSize?t.style.fontSize:void 0},P=i?.textStyle;X(P)&&t.setAttribute(n,P),l.push(()=>{q(t.style,F,h),T===null?t.removeAttribute(n):t.setAttribute(n,T)})}if(a===u){const e=O(t,L(i,o[r],f));p({partId:a,...w(t),base:e})}}return()=>{for(const t of l)t();for(const t of d)t.removeAttribute(R)}},[s,c,u,p,f,z]),x("div",{ref:y,style:{display:"contents"},children:v})}export{Y as default};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{HoverIcon as h,RotateIcon as l}from"efficient-easel/icons";import{group as d}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as H,noControlField as f}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{segmented as E,slider as u}from"../document/box-fields.js";import{withShowWhen as i}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as v,animationDurationField as O,showsWhatRuns as m}from"./AnimationDurationRow.js";import{CARD_HOVER_ANGLE as s,CARD_HOVER_KEYS as n,CARD_HOVER_KINDS as D,CARD_HOVER_TURN as A,HOVER_KEY as V,HOVER_KIND_LABELS as N,OLD_SPIN_KEY as w,PART_HOVER_KINDS as I,cardHoverAngleOf as K,cardHoverKindOf as C,cardRotatesRule as k}from"../../../format/lib/animation/hover.js";const R="_gHover",F="What this does when a shopper points at it, or taps it on a phone.",S="What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.";function c(o,e){return E("Hover effect",a(h,{}),o.map(r=>({label:N[r],value:r})),e)}function G(){return{[R]:d("Hover"),[V]:t("desktop",{...c(I,"none"),description:F})}}function U(o){const e=k(o),r=u("Angle",a(l,{}),s.min,s.max,s.step,A,"°");return{[R]:d("Hover"),[n.kind]:t("desktop",{...m(c(D,o),(p,_)=>C(_??{},o)),description:S}),[w]:f({type:"custom",render:()=>a(H,{})},"always"),[n.angle]:t("desktop",i(m(r,p=>K(p)),e)),[n.duration]:t("desktop",i(O("hover"),e)),[n.delay]:t("desktop",i(v("hover"),e))}}export{U as cardHoverFields,G as hoverFields};
1
+ import{jsx as a}from"react/jsx-runtime";import{HoverIcon as h,RotateIcon as l}from"efficient-easel/icons";import{group as H}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as o}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as f,noControlField as E}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{segmented as u,slider as v}from"../document/box-fields.js";import{withShowWhen as i}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as O,animationDurationField as D,showsWhatRuns as d}from"./AnimationDurationRow.js";import{CARD_HOVER_ANGLE as s,CARD_HOVER_KEYS as n,CARD_HOVER_KINDS as A,CARD_HOVER_TURN as V,HOVER_KEY as N,HOVER_KIND_LABELS as w,OLD_SPIN_KEY as I,PART_HOVER_KINDS as K,cardHoverAngleOf as k,cardHoverKindOf as C,cardRotatesRule as g}from"../../../format/lib/animation/hover.js";const m="_gHover",c=()=>o("desktop",H("Hover")),F="What this does when a shopper points at it, or taps it on a phone.",S="What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.";function R(e,t){return u("Hover effect",a(h,{}),e.map(r=>({label:w[r],value:r})),t)}function U(){return{[m]:c(),[N]:o("desktop",{...R(K,"none"),description:F})}}function b(e){const t=g(e),r=v("Angle",a(l,{}),s.min,s.max,s.step,V,"°");return{[m]:c(),[n.kind]:o("desktop",{...d(R(A,e),(p,_)=>C(_??{},e)),description:S}),[I]:E({type:"custom",render:()=>a(f,{})},"always"),[n.angle]:o("desktop",i(d(r,p=>k(p)),t)),[n.duration]:o("desktop",i(D("hover"),t)),[n.delay]:o("desktop",i(O("hover"),t))}}export{b as cardHoverFields,U as hoverFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{phoneKey as n,tabletKey as m}from"efficient-easel/draw";import{BOX_CARD_PAD as r,BOX_DARKEN as a,BOX_DARKEN_STYLES as h,isBackgroundBox as R}from"../../../../../../format/lib/content/box-background.js";import{BOX_TAB_SHAPES as y,REEL_SHAPE_LABELS as E}from"../../../../../../format/lib/reel.js";import{deviceField as s}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as T,CropIcon as g,LineBetweenIcon as N,LineSolidIcon as C,OpacityIcon as P,ShadowIcon as H,StylesIcon as f,TargetIcon as D}from"efficient-easel/icons";import{boxBlockSpacingField as X,boxFillField as M,boxColumnsFields as W,boxShareField as j,boxSharePhoneField as v,containerDirectionField as K,containerGapRows as U,linkField as G,plainText as z,swapPadding as S,toggle as p,upload as _,withPanelOnly as J}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as u,boxShapeOf as V}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as Y,BOX_COLUMNS_MIN as q,boxPhoneRowOneLine as Q}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as b}from"../../../../../../format/lib/content/box-separator.js";import{group as i,phoneTwinFields as O}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Z,boxJustifyField as $,boxWrapField as x,placementField as ee,select as d,sidesPaddingFields as k,slider as oe}from"../../../box-fields.js";import{withRowRules as te}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ne}from"../../../separator-field.js";import{LOOP_SCROLLS as ie}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as ae}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as le,cardDisplayField as re}from"../../../card-display-chips.js";const se={field:"bgImage",set:!0},A={field:"phoneRow",in:[2,3]},pe={field:"direction",is:"tabs"},de={field:"line",in:[!0,!1]},ce={field:"anchor",set:!0},w=["fixed","screen"],me={not:{any:[{field:"sectionHeightMode",in:w},{field:"sectionHeightModePhone",in:w}]}},he={context:"parent.line",is:!0},c={field:"direction",is:"row",default:"row"},l={not:ie},F={all:[c,l,{not:{field:"separator",in:b.map(e=>e.value)}},{not:{field:"line",is:!0}}]},ge={all:[l,{not:{all:[c,{field:"separator",in:b.map(e=>e.value)}]}}]},I={not:{all:[F,{field:"columns",in:Array.from({length:Y},(e,t)=>t+q)}]}};function fe(e){return{...e,render:t=>e.render({...t,value:Q(t.value)?"nowrap":"wrap"})}}const Ce={fields:te({_gContent:i("Content"),content:ae.content,_gCardDisplay:i("Display"),cardDisplay:re(),_gLayout:i("Layout"),direction:K("Flex"),tabShape:d("Tab shape",o(f,{}),y.map(e=>({label:E[e],value:e})),"tabs"),label:J(z("Tab name")),...U("Flex"),justify:$(),align:Z(),...O("wrap",x(),void 0,{phoneRow:fe(x())}),boxShape:s("desktop",d("Box shape",o(g,{}),[...u],"auto")),[n("boxShape")]:O("boxShape",d("Box shape",o(g,{}),[...u],"auto",{phoneRest:e=>V(e)}))[n("boxShape")],separator:ne(o(N,{size:18}),"none"),share:s("desktop",j()),[n("share")]:v(),...W(),blockSpacing:X(),line:p("Line",!1,o(C,{}),"A line across the blocks, with a dot on each."),upcoming:p("Upcoming",!1,o(T,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:p("Shadow",!1,o(H,{})),fillColor:M(),_gBackground:i("Background image"),bgImage:s("desktop",_("Image","image/*")),bgImagePhone:s("mobile",_("Image","image/*")),darken:oe("Darken",o(P,{}),a.min,a.max,a.step,a.fallback,a.unit),darkenStyle:d("Darken style",o(f,{}),h,h[0].value),placement:ee("Content position"),_gLink:i("Link"),link:G("Link to"),jumpHighlight:p("Highlight when a link jumps here",!1,o(D,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],se],[[n("share")],A],[[n("wrap")],{all:[A,l]}],[["tabShape"],pe],[["separator"],c],[["columns",m("columns")],F],[[m("gap")],ge],[["justify"],l],[["wrap"],{all:[l,I]}],[["share"],I],[["line"],de],[["upcoming"],he],[["jumpHighlight"],ce],[["boxShape",n("boxShape")],me]]),resolveFields:(e,{fields:t})=>{const L=e.props;if(R(L.bgImage)){const B=k({fallback:{top:r.desktop,bottom:r.desktop,left:r.side,right:r.side},tablet:!0});return S(t,B)}return e.props.padV2!==!0?S(t,k({fallback:{top:24,bottom:24},tablet:!0})):t},showWhenFacts:le};export{Ce as FlexFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{phoneKey as t,tabletKey as h}from"efficient-easel/draw";import{BOX_CARD_PAD as d,BOX_DARKEN as s,BOX_DARKEN_STYLES as u,isBackgroundBox as X}from"../../../../../../format/lib/content/box-background.js";import{BOX_TAB_SHAPES as K,REEL_SHAPE_LABELS as j}from"../../../../../../format/lib/reel.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as v,CropIcon as f,LineBetweenIcon as G,LineSolidIcon as Y,OpacityIcon as J,ShadowIcon as z,StylesIcon as O,TableIcon as g,TargetIcon as V}from"efficient-easel/icons";import{boxBlockSpacingField as q,boxFillField as Q,boxColumnsFields as Z,boxShareField as $,boxSharePhoneField as ee,containerDirectionField as oe,containerGapRows as te,linkField as ne,plainText as ae,swapPadding as A,toggle as c,upload as R,withPanelOnly as ie}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as b,boxShapeOf as le}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as re,BOX_COLUMNS_MIN as se,boxPhoneRowOneLine as pe}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as E}from"../../../../../../format/lib/content/box-separator.js";import{group as i,phoneTwinFields as C}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as de,boxJustifyField as ce,boxWrapField as N,placementField as Se,select as l,sidesPaddingFields as D,slider as me}from"../../../box-fields.js";import{withRowRules as _e}from"../../../../../../render/lib/document/show-when.js";import{separatorField as he}from"../../../separator-field.js";import{LOOP_SCROLLS as ue}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as fe}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as Oe,ON_A_CARD as ge,cardDisplayField as Ae}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Re,mirrorCardsField as be}from"../../../mirror-cards-field.js";import{SHARED_COLUMNS_KEY as r,SHARED_COLUMNS_LABEL as L,SHARED_COLUMNS_OFF as x,sharedColumnsDrawn as F,sharedColumnsFits as H,SHARED_COLUMNS_PHONE_POINTS as Ee,SHARED_COLUMNS_POINTS as Ce}from"../../../../../../render/lib/content/box-shared-columns.js";const Ne={field:"bgImage",set:!0},I={field:"phoneRow",in:[2,3]},De={field:"direction",is:"tabs"},Le={field:"line",in:[!0,!1]},xe={field:"anchor",set:!0},T=["fixed","screen"],Fe={not:{any:[{field:"sectionHeightMode",in:T},{field:"sectionHeightModePhone",in:T}]}},He={context:"parent.line",is:!0},m={field:"direction",is:"row",default:"row"},p={not:ue},k={all:[m,p,{not:{field:"separator",in:E.map(e=>e.value)}},{not:{field:"line",is:!0}}]},Ie={all:[p,{not:{all:[m,{field:"separator",in:E.map(e=>e.value)}]}}]},w={not:{all:[k,{field:"columns",in:Array.from({length:re},(e,n)=>n+se)}]}},Te="sharedColumnsFits",B="sharedColumnsMisfit",P="sharedColumnsDraws",y="sharedColumnsPhoneDraws",ke={[Te]:e=>H(e.props??{}),[B]:e=>!H(e.props??{}),[P]:e=>F(e.props??{}).desktop,[y]:e=>F(e.props??{}).phone};function M(e){return{all:[{not:{context:B,is:!0}},{any:[ge,{field:e,set:!0}]}]}}const _={not:{context:P,is:!0}},S={not:{context:y,is:!0}},we={any:[_,S]};function Be(e){return{...e,render:n=>e.render({...n,value:pe(n.value)?"nowrap":"wrap"})}}const to={fields:_e({_gContent:i("Content"),content:fe.content,_gCardDisplay:i("Display"),cardDisplay:Ae(),_gLayout:i("Layout"),direction:oe("Flex"),tabShape:l("Tab shape",o(O,{}),K.map(e=>({label:j[e],value:e})),"tabs"),mirrorCards:be(),label:ie(ae("Tab name")),...te("Flex"),justify:ce(),align:de(),...C("wrap",N(),void 0,{phoneRow:Be(N())}),boxShape:a("desktop",l("Box shape",o(f,{}),[...b],"auto")),[t("boxShape")]:C("boxShape",l("Box shape",o(f,{}),[...b],"auto",{phoneRest:e=>le(e)}))[t("boxShape")],separator:he(o(G,{size:18}),"none"),share:a("desktop",$()),[t("share")]:ee(),[r]:a("desktop",l(L,o(g,{}),[...Ce],x)),[t(r)]:a("mobile",l(L,o(g,{}),[...Ee],x)),...Z(),blockSpacing:q(),line:c("Line",!1,o(Y,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,o(v,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:c("Shadow",!1,o(z,{})),fillColor:Q(),_gBackground:i("Background image"),bgImage:a("desktop",R("Image","image/*")),bgImagePhone:a("mobile",R("Image","image/*")),darken:me("Darken",o(J,{}),s.min,s.max,s.step,s.fallback,s.unit),darkenStyle:l("Darken style",o(O,{}),u,u[0].value),placement:Se("Content position"),_gLink:i("Link"),link:ne("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,o(V,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],Ne],[[t("share")],{all:[I,S]}],[[r],M(r)],[[t(r)],M(t(r))],[[t("wrap")],{all:[I,p,S]}],[["phoneRow"],S],[["tabShape"],De],[["separator"],m],[["columns",h("columns")],k],[[h("gap")],Ie],[["justify"],{all:[p,we]}],[["wrap"],{all:[p,w,_]}],[["share"],{all:[w,_]}],[["line"],Le],[["upcoming"],He],[["jumpHighlight"],xe],[["boxShape",t("boxShape")],Fe]]),resolveFields:(e,{fields:n})=>{const U=e.props;if(X(U.bgImage)){const W=D({fallback:{top:d.desktop,bottom:d.desktop,left:d.side,right:d.side},tablet:!0});return A(n,W)}return e.props.padV2!==!0?A(n,D({fallback:{top:24,bottom:24},tablet:!0})):n},showWhenFacts:{...Oe,...Re,...ke}};export{to as FlexFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as l,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as m}from"efficient-easel/icons";import{containerDirectionField as c,containerGapRows as h,heroGroupPlacementPoints as G,plainText as H,withIdentifier as g,withOffPage as R,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as F,boxJustifyField as O,boxWrapField as P,placementField as D,positionFields as E,sidesPaddingFields as w,slider as s}from"../../../box-fields.js";import{PH as I}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as T}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:T({_gContent:o("Content"),name:x(g(R(H("Box name",I.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:G}),width:s("Width",r(m,{}),l,p,5,u,"%"),direction:c("HeroGroup"),...h("HeroGroup"),justify:O(),align:F(),wrap:P(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...w({tablet:!0})},[[["placement"],{context:"heroGroupDepth",is:0}]]),resolveFields:(e,{fields:t,appState:d})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(d?.data,a)===0)return t;const i={...t};return i.width=s("Width",r(m,{}),l,p,5,_,"%"),i}};export{S as HeroGroupFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as l,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as d}from"efficient-easel/icons";import{containerDirectionField as c,containerGapRows as h,heroGroupPlacementPoints as G,plainText as H,withIdentifier as g,withOffPage as R,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as F,boxJustifyField as O,boxWrapField as P,placementField as D,positionFields as E,sidesPaddingFields as w,slider as m}from"../../../box-fields.js";import{PH as I}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as T}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:T({_gContent:o("Content"),name:x(g(R(H("Box name",I.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:G}),width:m("Width",r(d,{}),l,p,5,u,"%"),direction:c("HeroGroup"),...h("HeroGroup"),justify:O(),align:F(),wrap:P(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...w({tablet:!0})},[[["placement"],{context:"heroGroupDepth",is:0,default:0}]]),resolveFields:(e,{fields:t,appState:s})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(s?.data,a)===0)return t;const i={...t};return i.width=m("Width",r(d,{}),l,p,5,_,"%"),i}};export{S as HeroGroupFields};
@@ -1,5 +1,6 @@
1
- import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
1
+ import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/document/show-when-attach.js";
2
2
  export declare const NOT_CARD_OF_TEMPLATE = "notCardOfTemplate";
3
+ export declare const ON_A_CARD: ShowWhenRule;
3
4
  export declare const CARD_BOX_FACTS: BlockShowWhenFacts;
4
5
  type Child = {
5
6
  type: string;
@@ -1 +1 @@
1
- "use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as x}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return x(n)?n:[]}const m=e=>!!e.props?._hidden;function R(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?R(t,n):n(t)?[]:[t])}function P(e,n,t){const i=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,R as cardDisplayParts,w as withChildShown};
1
+ "use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as R}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return R(n)?n:[]}const m=e=>!!e.props?._hidden;function x(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?x(t,n):n(t)?[]:[t])}function P(e,n,t){const i=x(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,M as ON_A_CARD,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,x as cardDisplayParts,w as withChildShown};
@@ -0,0 +1,20 @@
1
+ import { MIRROR_CARDS_OPTIONS } from "../../../format/lib/content/mirror-cards.js";
2
+ import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
3
+ export declare const MIRROR_CARDS_IDLE = "mirrorCardsIdle";
4
+ export declare const MIRROR_CARDS_FACTS: BlockShowWhenFacts;
5
+ type Answer = (typeof MIRROR_CARDS_OPTIONS)[number]["value"];
6
+ export declare function mirrorCardsOptions(disabled?: boolean): {
7
+ value: Answer;
8
+ label: string;
9
+ title?: string;
10
+ disabled: boolean;
11
+ }[];
12
+ export declare function mirrorCardsField(): {
13
+ render: ({ value, onChange, readOnly }: {
14
+ value?: unknown;
15
+ onChange: (next: unknown) => void;
16
+ readOnly?: boolean;
17
+ }) => import("react").JSX.Element;
18
+ type: "custom";
19
+ };
20
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as n}from"react/jsx-runtime";import{SettingsDefaultReset as m,SettingsField as R}from"efficient-easel/panel";import{Segmented as u}from"efficient-shell/ui";import{SwapIcon as c}from"efficient-easel/icons";import{describedAs as f}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as C}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as a,MIRROR_CARDS_OFF as s,MIRROR_CARDS_OPTIONS as l,MIRROR_CARDS_TITLES as S,mirrorCardsActs as O,mirrorCardsOf as _,mirrorCardsWrite as I,ownsCard as b}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as A,say as t}from"../../../format/lib/editor-words.js";import{cardCopyPlace as v}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as D}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as h}from"../../../format/lib/document/show-when-attach.js";const d="mirrorCardsIdle",z={[d]:(r,e)=>{const o=v(e.appState,r.props?.id),i=r.props??{};return o===void 0?void 0:!O(i,b(o),D(i).desktop)}};function w(r=!1){return l.map(e=>({value:e.value,label:t(e.label),title:e.value===s?void 0:t(S[e.value]),disabled:r}))}function x({value:r,onChange:e,readOnly:o}){const i=_(r)??s;return n(R,{label:t(a),icon:n(c,{}),action:n(m,{words:A()?.panel,label:t(a),changed:i!==s,detail:t("Off"),onReset:()=>e(void 0)}),children:n(u,{size:"sm",block:!0,label:t(a),value:i,onChange:p=>e(I(p)),options:w(o===!0)})})}function B(){return h(C("desktop",{type:"custom",...f({},{type:"radio",label:a,options:l.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:o})=>n(x,{value:r,onChange:e,readOnly:o})}),{not:{context:d,is:!0}})}export{z as MIRROR_CARDS_FACTS,d as MIRROR_CARDS_IDLE,B as mirrorCardsField,w as mirrorCardsOptions};
@@ -1,7 +1,9 @@
1
+ import type { BoxAlign } from "efficient-easel/screen/lib/document/box-fields";
1
2
  export declare const NESTED_BOX_PADDING: {
2
3
  readonly sectionPaddingTop: 0;
3
4
  readonly sectionPaddingBottom: 0;
4
5
  };
6
+ export declare const BOX_ALIGN_CLASS: Record<BoxAlign, string>;
5
7
  export declare function boxLayoutClasses(justify: unknown, align: unknown): string;
6
8
  export declare function boxWrapClass(wrap: unknown): string;
7
9
  export declare const BOX_SHARE_LABEL = "Block widths";
@@ -1 +1 @@
1
- import{isStripBox as s}from"./box-separator.js";const k={sectionPaddingTop:0,sectionPaddingBottom:0},o={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function A(e,t){const w=typeof e=="string"&&e in o?o[e]:"",n=typeof t=="string"&&t in r?r[t]:"";return[w,n].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const N="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],i="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",p={equal:i,bigLeft:`${i} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${i} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${i} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${i} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${i} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`};function x(e){return typeof e=="string"?p[e]??"":""}const _="[&>*]:view-wide:basis-[content]";function E(e){return x(e)===""?_:""}const P="Columns",R=1,T=3,v={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},X=c.filter(e=>e.value==="content"||e.value==="equal"),H="equal",I=1,$=6,a="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",d={1:`${a} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function b(e){return typeof e=="number"?d[e]??"":""}const f={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function m(e){return typeof e=="number"?f[e]??"":""}function y(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":m(e.columnsTablet)}function W(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":b(e.columns)}const g="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",h={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},u="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function O(e){return e===!1||e==="nowrap"}function M(e,t,w){const n=v[Number(e)];if(!n)return"max-view-wide:flex-col";const l=O(w);return S(e,t)?l?u:g:l?h[Number(e)]:n}function S(e,t){return Number(e)in v&&t==="content"}const F="Block spacing",U=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],C="sf-box-gap-only";function G(e){return e==="gap"?C:""}export{F as BOX_BLOCK_SPACING_LABEL,U as BOX_BLOCK_SPACING_POINTS,$ as BOX_COLUMNS_MAX,I as BOX_COLUMNS_MIN,C as BOX_GAP_ONLY_CLASS,P as BOX_PHONE_ROW_LABEL,T as BOX_PHONE_ROW_MAX,R as BOX_PHONE_ROW_MIN,N as BOX_SHARE_LABEL,H as BOX_SHARE_PHONE_DEFAULT,X as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,k as NESTED_BOX_PADDING,G as boxBlockSpacingClass,b as boxColumnsClass,E as boxFitContentClass,A as boxLayoutClasses,M as boxPhoneRowClasses,S as boxPhoneRowFits,O as boxPhoneRowOneLine,W as boxRowColumnsClass,y as boxRowTabletColumnsClass,x as boxShareClasses,m as boxTabletColumnsClass,B as boxWrapClass};
1
+ import{isStripBox as s}from"./box-separator.js";const k={sectionPaddingTop:0,sectionPaddingBottom:0},o={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function A(e,t){const w=typeof e=="string"&&e in o?o[e]:"",n=typeof t=="string"&&t in r?r[t]:"";return[w,n].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const N="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],i="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",p={equal:i,bigLeft:`${i} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${i} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${i} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${i} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${i} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`};function x(e){return typeof e=="string"?p[e]??"":""}const _="[&>*]:view-wide:basis-[content]";function E(e){return x(e)===""?_:""}const P="Columns",R=1,T=3,v={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},X=c.filter(e=>e.value==="content"||e.value==="equal"),H="equal",I=1,$=6,a="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",d={1:`${a} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function b(e){return typeof e=="number"?d[e]??"":""}const f={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function m(e){return typeof e=="number"?f[e]??"":""}function y(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":m(e.columnsTablet)}function W(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":b(e.columns)}const g="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",h={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},u="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function O(e){return e===!1||e==="nowrap"}function M(e,t,w){const n=v[Number(e)];if(!n)return"max-view-wide:flex-col";const l=O(w);return S(e,t)?l?u:g:l?h[Number(e)]:n}function S(e,t){return Number(e)in v&&t==="content"}const F="Block spacing",U=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],C="sf-box-gap-only";function G(e){return e==="gap"?C:""}export{r as BOX_ALIGN_CLASS,F as BOX_BLOCK_SPACING_LABEL,U as BOX_BLOCK_SPACING_POINTS,$ as BOX_COLUMNS_MAX,I as BOX_COLUMNS_MIN,C as BOX_GAP_ONLY_CLASS,P as BOX_PHONE_ROW_LABEL,T as BOX_PHONE_ROW_MAX,R as BOX_PHONE_ROW_MIN,N as BOX_SHARE_LABEL,H as BOX_SHARE_PHONE_DEFAULT,X as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,k as NESTED_BOX_PADDING,G as boxBlockSpacingClass,b as boxColumnsClass,E as boxFitContentClass,A as boxLayoutClasses,M as boxPhoneRowClasses,S as boxPhoneRowFits,O as boxPhoneRowOneLine,W as boxRowColumnsClass,y as boxRowTabletColumnsClass,x as boxShareClasses,m as boxTabletColumnsClass,B as boxWrapClass};
@@ -1,4 +1,5 @@
1
1
  import type { SourceRow } from "./block-sources.js";
2
+ import type { CardCopyPlace } from "./mirror-cards.js";
2
3
  export declare const CARD_TEMPLATE_SLOT = "template";
3
4
  export declare const CARD_TEMPLATE_LABEL = "Card template";
4
5
  export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
@@ -42,4 +43,5 @@ type DocNode = {
42
43
  };
43
44
  export declare function cardTemplateOwner(appState: unknown, id: unknown): DocNode | null | undefined;
44
45
  export declare function cardTemplateCardOwner(appState: unknown, id: unknown): DocNode | null | undefined;
46
+ export declare function cardCopyPlace(appState: unknown, id: unknown): CardCopyPlace | undefined;
45
47
  export {};
@@ -1 +1 @@
1
- import{isNodeList as x}from"efficient-easel/data";import{globalRegistry as y}from"../global-registry.js";const T="template",E="Card template",w=["Text","ImageBlock","ButtonBlock","Flex"],s="rowField",A="rowLinkField";function L(){return{type:"slot",allow:[...w]}}const g=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}];function n(){return y("efficient.card-templates",()=>new Map(g.map(e=>[e.block,e])))}function C(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const o=[];for(const r of t.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${t.block} names an empty block.`);o.some(l=>l.type===r.type)||o.push({type:r.type,label:r.label||r.type})}n().set(t.block,{block:t.block,fields:t.fields.map(r=>({...r})),blocks:o})}}function P(){for(const e of n().values())if(e.blocks?.length)return!0;return!1}function h(e){return n().get(e)?.blocks??[]}function F(e){for(const t of n().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function B(e){return typeof e=="string"&&n().has(e)}function D(e,t){const o=n().get(e)?.fields??[];return t?o.filter(r=>(r.kind??"text")===t):o}function I(e,t){return e?n().get(e)?.fields.find(o=>o.key===t)??null:null}function p(e,t=s){const o=e?.[t];return typeof o=="string"?o.trim():""}function M(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[o,r]of Object.entries(e))typeof r=="string"&&(t[o]=r);return t}const d={Text:{text:s},ImageBlock:{src:s},ButtonBlock:{label:s,href:A}};function S(e,t,o){const r=d[e]?.[o];return!!(r&&p(t,r))}function O(e,t){return!t||!e?null:e[t]??""}function j(e,t,o){if(!o)return t;let r=null;for(const[l,f]of Object.entries(d[e]??{})){const c=O(o,p(t,f));c!==null&&(r??={...t},r[l]=c)}return r??t}function m(e,t){const o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const r=(f,c)=>{for(const i of f){if(i?.props?.id===t)return c;for(const[b,u]of Object.entries(i?.props??{})){if(!x(u))continue;const k=b===T&&B(i.type)?{owner:i,direct:!0}:c&&{owner:c.owner,direct:!1},a=r(u,k);if(a!==void 0)return a}}},l=r(o,null);return l===void 0?null:l}function N(e,t){const o=m(e,t);return o&&o.owner}function W(e,t){const o=m(e,t);return o&&(o.direct?o.owner:null)}export{s as CARD_ROW_FIELD_PROP,A as CARD_ROW_LINK_PROP,w as CARD_TEMPLATE_BLOCKS,E as CARD_TEMPLATE_LABEL,T as CARD_TEMPLATE_SLOT,M as cardRow,h as cardTemplateBlocks,W as cardTemplateCardOwner,I as cardTemplateField,D as cardTemplateFields,N as cardTemplateOwner,L as cardTemplateSlot,P as cardTemplatesNameBlocks,B as hasCardTemplate,F as isCardTemplateBlock,p as namedRowField,C as registerCardTemplates,S as rowBound,O as rowFieldText,j as rowFilledProps};
1
+ import{isNodeList as b}from"efficient-easel/data";import{BOX_TYPE as k}from"../document/container-blocks.js";import{globalRegistry as T}from"../global-registry.js";const B="template",L="Card template",w=["Text","ImageBlock","ButtonBlock","Flex"],f="rowField",A="rowLinkField";function P(){return{type:"slot",allow:[...w]}}const C=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}];function l(){return T("efficient.card-templates",()=>new Map(C.map(e=>[e.block,e])))}function h(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const n=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);n.some(c=>c.type===o.type)||n.push({type:o.type,label:o.label||o.type})}l().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:n})}}function F(){for(const e of l().values())if(e.blocks?.length)return!0;return!1}function D(e){return l().get(e)?.blocks??[]}function I(e){for(const t of l().values())if(t.blocks?.some(n=>n.type===e))return!0;return!1}function g(e){return typeof e=="string"&&l().has(e)}function M(e,t){const n=l().get(e)?.fields??[];return t?n.filter(o=>(o.kind??"text")===t):n}function S(e,t){return e?l().get(e)?.fields.find(n=>n.key===t)??null:null}function d(e,t=f){const n=e?.[t];return typeof n=="string"?n.trim():""}function j(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[n,o]of Object.entries(e))typeof o=="string"&&(t[n]=o);return t}const m={Text:{text:f},ImageBlock:{src:f},ButtonBlock:{label:f,href:A}};function N(e,t,n){const o=m[e]?.[n];return!!(o&&d(t,o))}function O(e,t){return!t||!e?null:e[t]??""}function W(e,t,n){if(!n)return t;let o=null;for(const[c,i]of Object.entries(m[e]??{})){const r=O(n,d(t,i));r!==null&&(o??={...t},o[c]=r)}return o??t}function u(e,t){const n=e?.data?.content;if(!Array.isArray(n)||typeof t!="string")return;const o=(i,r)=>{for(const s of i){if(s?.props?.id===t)return r;for(const[x,a]of Object.entries(s?.props??{})){if(!b(a))continue;const y=x===B&&g(s.type)?{owner:s,direct:!0,nested:r!==null,underBox:!1}:r&&{owner:r.owner,direct:!1,nested:r.nested,underBox:r.underBox||s.type===k},p=o(a,y);if(p!==void 0)return p}}},c=o(n,null);return c===void 0?null:c}function v(e,t){const n=u(e,t);return n&&n.owner}function K(e,t){const n=u(e,t);return n&&(n.direct?n.owner:null)}function U(e,t){const n=u(e,t);if(n!==void 0)return n===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:n.nested,underBox:n.underBox}}export{f as CARD_ROW_FIELD_PROP,A as CARD_ROW_LINK_PROP,w as CARD_TEMPLATE_BLOCKS,L as CARD_TEMPLATE_LABEL,B as CARD_TEMPLATE_SLOT,U as cardCopyPlace,j as cardRow,D as cardTemplateBlocks,K as cardTemplateCardOwner,S as cardTemplateField,M as cardTemplateFields,v as cardTemplateOwner,P as cardTemplateSlot,F as cardTemplatesNameBlocks,g as hasCardTemplate,I as isCardTemplateBlock,d as namedRowField,h as registerCardTemplates,N as rowBound,O as rowFieldText,W as rowFilledProps};
@@ -0,0 +1,32 @@
1
+ export type MirrorCards = "even" | "odd";
2
+ export declare const MIRROR_CARDS_LABEL = "Mirror cards";
3
+ export declare const MIRROR_CARDS_OFF = "off";
4
+ export declare const MIRROR_CARDS_OPTIONS: readonly {
5
+ value: MirrorCards | typeof MIRROR_CARDS_OFF;
6
+ label: string;
7
+ }[];
8
+ export declare const MIRROR_CARDS_TITLES: Readonly<Record<MirrorCards, string>>;
9
+ export declare function mirrorCardsOf(value: unknown): MirrorCards | null;
10
+ export declare function mirrorCardsWrite(answer: unknown): MirrorCards | undefined;
11
+ export type MirrorCardsBox = {
12
+ direction?: unknown;
13
+ separator?: unknown;
14
+ loop?: unknown;
15
+ line?: unknown;
16
+ bgImage?: unknown;
17
+ columns?: unknown;
18
+ columnsTablet?: unknown;
19
+ share?: unknown;
20
+ wrap?: unknown;
21
+ };
22
+ export type CardCopyPlace = {
23
+ inCopy: boolean;
24
+ nestedCopy: boolean;
25
+ underBox: boolean;
26
+ };
27
+ export declare function ownsCard(place: CardCopyPlace): boolean;
28
+ export declare function mirrorCardsActs(box: MirrorCardsBox, ownsCard: boolean, sharedColumns: boolean): boolean;
29
+ export declare function isMirroredCopy(value: unknown, index: number | undefined): boolean;
30
+ export declare const MIRROR_ROW_CLASS = "view-wide:flex-row-reverse";
31
+ export declare function mirroredTextClasses(mirrored: boolean, align: unknown, partAlign: unknown): string;
32
+ export declare function mirroredBoxClass(mirrored: boolean, direction: unknown, justify: unknown, align: unknown): string;
@@ -0,0 +1 @@
1
+ import{isBackgroundBox as i}from"./box-background.js";import{boxColumnsClass as a,boxShareClasses as d,boxTabletColumnsClass as f,boxWrapClass as u}from"./box-layout.js";import{isStripBox as l}from"./box-separator.js";const v="Mirror cards",w="off",A=[{value:w,label:"Off"},{value:"even",label:"Even cards"},{value:"odd",label:"Odd cards"}],I={even:"Cards 2, 4, 6 draw the other way round",odd:"Cards 1, 3, 5 draw the other way round"};function n(r){return r==="even"||r==="odd"?r:null}function O(r){return n(r)??void 0}function y(r){return r.inCopy&&!r.nestedCopy&&!r.underBox}function g(r,e,t){return!e||r.direction!=="row"||t||l("row",r.separator)||r.loop==="scroll"||r.line===!0||i(typeof r.bgImage=="string"?r.bgImage:void 0)||a(r.columns)!==""||f(r.columnsTablet)!==""?!1:!(d(r.share)===""&&u(r.wrap)!=="")}function x(r,e){const t=n(r);return!t||typeof e!="number"||!Number.isInteger(e)||e<0?!1:t==="even"?e%2===1:e%2===0}const h="view-wide:flex-row-reverse",c={left:"view-wide:ml-auto!",right:"view-wide:ml-0!"},p={left:"view-wide:text-right!",right:"view-wide:text-left!"},m={start:"view-wide:justify-end!",end:"view-wide:justify-start!"},C={start:"view-wide:items-end!",end:"view-wide:items-start!"},o=(r,e)=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(r,e)?r[e]:"";function T(r,e,t){return r?[o(c,e),o(p,t)].filter(Boolean).join(" "):""}function M(r,e,t,s){return r?e==="row"?o(m,t):e==="column"?o(C,s):"":""}export{v as MIRROR_CARDS_LABEL,w as MIRROR_CARDS_OFF,A as MIRROR_CARDS_OPTIONS,I as MIRROR_CARDS_TITLES,h as MIRROR_ROW_CLASS,x as isMirroredCopy,g as mirrorCardsActs,n as mirrorCardsOf,O as mirrorCardsWrite,M as mirroredBoxClass,T as mirroredTextClasses,y as ownsCard};
@@ -249,6 +249,8 @@ export declare const WEB_BUILDER_WORDS: {
249
249
  readonly "Card title two": "Card title two";
250
250
  readonly "Card type": "Card type";
251
251
  readonly Cards: "Cards";
252
+ readonly "Cards 1, 3, 5 draw the other way round": "Cards 1, 3, 5 draw the other way round";
253
+ readonly "Cards 2, 4, 6 draw the other way round": "Cards 2, 4, 6 draw the other way round";
252
254
  readonly "Cards from": "Cards from";
253
255
  readonly Cart: "Cart";
254
256
  readonly Cash: "Cash";
@@ -400,6 +402,7 @@ export declare const WEB_BUILDER_WORDS: {
400
402
  readonly "Dynamic Pages": "Dynamic Pages";
401
403
  readonly "EU Tyre Label": "EU Tyre Label";
402
404
  readonly "Each block": "Each block";
405
+ readonly "Each row": "Each row";
403
406
  readonly "Each side": "Each side";
404
407
  readonly "Each website created from this template sets its own appearance afterwards.": "Each website created from this template sets its own appearance afterwards.";
405
408
  readonly "Each website created from this template sets its own header afterwards.": "Each website created from this template sets its own header afterwards.";
@@ -429,6 +432,7 @@ export declare const WEB_BUILDER_WORDS: {
429
432
  readonly Equal: "Equal";
430
433
  readonly Essay: "Essay";
431
434
  readonly Even: "Even";
435
+ readonly "Even cards": "Even cards";
432
436
  readonly "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.";
433
437
  readonly "Every text on the site that follows {style} changes to look like this one. This text\u2019s 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}.";
434
438
  readonly "Every {part} in this section follows it. The face and the size change; the letter case is the section\u2019s 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.";
@@ -716,6 +720,7 @@ export declare const WEB_BUILDER_WORDS: {
716
720
  readonly "Milestone Timeline": "Milestone Timeline";
717
721
  readonly "Milestone title.": "Milestone title.";
718
722
  readonly Milestones: "Milestones";
723
+ readonly "Mirror cards": "Mirror cards";
719
724
  readonly Mixed: "Mixed";
720
725
  readonly "Mockup Card": "Mockup Card";
721
726
  readonly "Mockup card": "Mockup card";
@@ -766,6 +771,7 @@ export declare const WEB_BUILDER_WORDS: {
766
771
  readonly "Number style": "Number style";
767
772
  readonly Numbers: "Numbers";
768
773
  readonly "N\u00B001, N\u00B002": "N°01, N°02";
774
+ readonly "Odd cards": "Odd cards";
769
775
  readonly Off: "Off";
770
776
  readonly Office: "Office";
771
777
  readonly Offices: "Offices";
@@ -916,6 +922,7 @@ export declare const WEB_BUILDER_WORDS: {
916
922
  readonly Rotate: "Rotate";
917
923
  readonly "Rounds the picture. Left alone it stays square.": "Rounds the picture. Left alone it stays square.";
918
924
  readonly "Rounds the picture. The card's own corner is in Styles.": "Rounds the picture. The card's own corner is in Styles.";
925
+ readonly "Row columns": "Row columns";
919
926
  readonly Sans: "Sans";
920
927
  readonly Save: "Save";
921
928
  readonly "Save as Template": "Save as Template";
@@ -967,6 +974,7 @@ export declare const WEB_BUILDER_WORDS: {
967
974
  readonly Shape: "Shape";
968
975
  readonly "Share button": "Share button";
969
976
  readonly Shared: "Shared";
977
+ readonly "Shared, scroll": "Shared, scroll";
970
978
  readonly "Shop & galleries": "Shop & galleries";
971
979
  readonly "Short description of this figure.": "Short description of this figure.";
972
980
  readonly "Short detail line": "Short detail line";