efficient-web-builder 69.4.0 → 70.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/editor/components/SiteFields.js +1 -1
  3. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  4. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  5. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  14. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +19 -0
  15. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  16. package/dist/editor/lib/document/box-fields.d.ts +1 -1
  17. package/dist/editor/lib/document/box-footer-rows.js +1 -1
  18. package/dist/editor/lib/document/controls.d.ts +9 -1
  19. package/dist/editor/lib/document/controls.js +1 -1
  20. package/dist/editor/lib/document/field-groups.js +1 -1
  21. package/dist/editor/lib/host-document-bridge.js +1 -1
  22. package/dist/editor/lib/sections/city-presets.d.ts +1 -1
  23. package/dist/editor/lib/sections/city-presets.js +1 -1
  24. package/dist/editor/lib/sections/insert-box-path.d.ts +8 -0
  25. package/dist/editor/lib/sections/insert-box-path.js +1 -0
  26. package/dist/editor/lib/sections/menu-presets.d.ts +2 -0
  27. package/dist/editor/lib/sections/menu-presets.js +1 -0
  28. package/dist/format/lib/build/module-specifiers.d.ts +11 -0
  29. package/dist/format/lib/build/module-specifiers.js +1 -1
  30. package/dist/format/lib/content/box-background.d.ts +1 -7
  31. package/dist/format/lib/content/box-background.js +1 -1
  32. package/dist/format/lib/content/box-darken-styles.d.ts +7 -0
  33. package/dist/format/lib/content/box-darken-styles.js +1 -0
  34. package/dist/format/lib/content/box-shape.d.ts +1 -1
  35. package/dist/format/lib/content/card-row-keys.d.ts +10 -0
  36. package/dist/format/lib/content/card-row-keys.js +1 -1
  37. package/dist/format/lib/content/card-template.d.ts +1 -11
  38. package/dist/format/lib/content/card-template.js +1 -1
  39. package/dist/format/lib/content/count-numbers.js +1 -1
  40. package/dist/format/lib/content/picture-focus-rows.js +1 -1
  41. package/dist/format/lib/content/section-sticky.d.ts +3 -3
  42. package/dist/format/lib/content/site-gutter.js +1 -1
  43. package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
  44. package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
  45. package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
  46. package/dist/format/lib/document/blocks/general/Footprint/meta.js +1 -1
  47. package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
  48. package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
  49. package/dist/format/lib/document/blocks/general/OrderSummary/meta.js +1 -1
  50. package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
  51. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  52. package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
  53. package/dist/format/lib/document/box-footer.js +1 -1
  54. package/dist/format/lib/document/media-manifest.json +2 -1
  55. package/dist/format/lib/document/node-lists.d.ts +4 -0
  56. package/dist/format/lib/document/node-lists.js +1 -1
  57. package/dist/format/lib/document/passes/document-position.js +1 -1
  58. package/dist/format/lib/document/section-catalog.js +19 -3
  59. package/dist/format/lib/editor-words-kept.js +1 -1
  60. package/dist/format/lib/hero-media-layout.d.ts +12 -0
  61. package/dist/format/lib/hero-media-layout.js +1 -1
  62. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  63. package/dist/format/lib/source-rules/editor-words.js +1 -1
  64. package/dist/format/lib/source-rules/panel-one-arrow.js +1 -1
  65. package/dist/format/lib/source-rules/support/panel-select-cascade.d.ts +1 -1
  66. package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -1
  67. package/dist/render/components/HeroSingle.d.ts +2 -1
  68. package/dist/render/components/HeroSingle.js +1 -1
  69. package/dist/render/components/HeroSlide.d.ts +2 -1
  70. package/dist/render/components/HeroSlide.js +1 -1
  71. package/dist/render/lib/content/page-contents.js +1 -1
  72. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  73. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  74. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  75. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +1 -0
  76. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  77. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  78. package/dist/render/lib/document/hero-media-parts.d.ts +6 -4
  79. package/dist/render/lib/document/hero-media-parts.js +1 -1
  80. package/dist/render/lib/document/slot-counts.js +1 -1
  81. package/dist/render/lib/sections/section-to-box.js +1 -1
  82. package/package.json +5 -5
  83. package/dist/format/lib/document/panel-bands.d.ts +0 -15
  84. package/dist/format/lib/document/panel-bands.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## 70.0.0 - 2026-11-17
4
+
5
+ From main at `92b8eb71`: #767, #771. A major: both PRs are `!`. The peers rise to `efficient-easel` `^35.0.0` and `efficient-shell` `^13.17.0`. The module `lib/document/panel-bands` is removed. No stored key or value moves.
6
+
7
+ **For hosts:**
8
+ - Install efficient-easel 35.0.0 or later and efficient-shell 13.17.0 or later with this release.
9
+ - A host that imports `efficient-web-builder/format/lib/document/panel-bands` (`bandIsDropped`, `droppedBands`, `loneDesignBand`, `withoutBands`, `sameKeys`, `BandRow`, `DrawnBand`, `TEXT_BAND_KEY`, `TEXT_BAND_TITLE`) stops compiling. The one-row band rule is efficient-easel 35's Inspector; the text box band key is `LEAD_BAND_KEY` from `efficient-easel/fields`. efficient-storefront-blocks `scripts/test-single-row-group-headings.tsx` imports `bandIsDropped` and is re-pointed in its bump (eff-erp/efficient-storefront-blocks#591).
10
+
11
+ ### Changed
12
+
13
+ - **BREAKING: walks over a node's lists read the declared slot order** (#767). A node's declared slots come first, in draw order, then any other node list in efficient-easel `storedKeyOrder`, so the editor and the shop give the same answer (before, the editor read insertion order and the shop jsonb order). One helper in `lib/document/node-lists`. `CARD_TEMPLATE_BLOCKS`, `cardTemplateSlot`, `CARD_LIST_ITEM_BLOCKS` and `cardListItemSlot` move to the leaf `lib/content/card-row-keys`, and `BOX_DARKEN_STYLES` to the new leaf `lib/content/box-darken-styles`; `card-template` and `box-background` still export them.
14
+ - **BREAKING: the Box's "Link to" row is in its own Link group, just before Anchor** (#771). `DESIGN_GROUPS`, `DesignGroup` and `DESIGN_GROUP_KEY` are efficient-easel's again (`lib/document/field-groups`), so their type gains `'Link'`; a host `Record<DesignGroup, X>` adds a `Link` entry. `PLACE_WORDS` gains `Link`. The website's copy of the one-row band rule (`lib/document/panel-bands`) is deleted; `SiteFields` passes only the text box band.
15
+
16
+ ## 69.5.0 - 2026-11-17
17
+
18
+ From main at `e660b33f`: #768, #769, #770, #772. A minor: no `!`, no export is removed, no export changes its type, the peers stay `efficient-easel` `^34.3.0` and `efficient-shell` `^13.3.0`. New exports only. No stored key or value moves: stored Contact / Locations, Hero Single and Scroll-Over Text nodes still draw the old sections. `forMediaType`, the `marked` prop of `HeroPickArea` / `HeroTwoPictures` and the phrase "Tint opacity" are deprecated (delete by 2026-12-18, in a major).
19
+
20
+ **For hosts:**
21
+ - The media manifest gains `HeroSlide.mediaImage2` (contentHash `4fd181cf034fee3b` -> `be784d74fee5062d`). The backend vendors the new manifest and deploys beside the storefront change that takes this release: a storefront on the new hash is refused template saves by a backend on the old one.
22
+ - storefront-blocks may register host rows for Fitment Table, Contact / Locations and Scroll-Over Text presses, and its host guard may import `hasInsertBoxPath` / `drawsThroughBox` in place of its own path check.
23
+ - The storefront change that takes this release imports `mediaFieldPaths` and deletes `scripts/gen-media-manifest.ts` `walkFields` (due 2026-11-27).
24
+
25
+ ### Added
26
+
27
+ - **Fitment Table presses its host row; one insert-path home** (#768): Fitment Table joins `HOST_PRESS_BLOCKS`. With no host row the press stays the ordinary insert. New editor-side module `lib/sections/insert-box-path` (`hasInsertBoxPath`, `drawsThroughBox`, `SAME_KEY_BOX_PART`).
28
+ - **Contact / Locations presses City maps** (#769): Contact / Locations joins `SECTION_TO_BOX_PRESS` and its old Add-menu row is retired (`RETIRED_SECTIONS`). The Add menu offers one City maps Box per city, grouped by region. New `CITY_PHOTO_WALL_HIDDEN` keeps City pictures off the menu while its photo wall is hidden; `cityPalettePresets` takes it as a new optional argument. New `menuPresets`.
29
+ - **Hero Single retires; the Hero slide takes its rows** (#770): Hero Single leaves the Add menu (`RETIRED_SECTIONS`); a new hero is a Hero (Hero > Slide > Box). The slide gets the two-picture Layout and Image 2 rows from one home, `lib/document/blocks/hero-shared-fields` (`HERO_LAYOUT_ROWS`, `HERO_IMAGE_ROWS`, `HERO_IMAGE2_ROWS`, `HERO_IMAGE_KEYS`, `heroTintRow`, `heroTintColorRow`, `heroLayoutRules`). What an absent media Type means has one home in `lib/hero-media-layout` (`HERO_MEDIA_TYPES`, `HeroMediaType`, `HERO_ABSENT_MEDIA_TYPE`, `heroMediaType`, `HERO_FOCUS`). New `mediaFields` / `mediaFieldPaths` (lib/document/controls) and `mediaTypeShownWhen`. `HERO_MEDIA_PART_TYPES` gains HeroSlide. A standalone template opened with no type gets a Hero.
30
+ - **Scroll-Over Text presses as one Box over its picture** (#772): `IntroBleed` joins `SECTION_TO_BOX_PRESS`. A new insert lays down one Box with its own picture, Darken 60, the old words as Text parts, the Button in its own Box, full-screen height and the pin stopping at the screen top.
31
+
32
+ ### Changed
33
+
34
+ - Hero Single's "Tint opacity" row is now "Tint", as on the slide (#770).
35
+ - A Hero slide whose stored Type is "" or a value no panel writes now draws its video, not the video file as a picture (#770).
36
+
3
37
  ## 69.4.0 - 2026-11-16
4
38
 
5
39
  From main at `e3b20e48`: #763, #764. A minor: no `!`, no export is removed, no type is narrowed, the peers stay `efficient-easel` `^34.3.0` and `efficient-shell` `^13.3.0`. New exports only. No stored key or value moves.
@@ -1 +1 @@
1
- "use client";import{jsx as d,Fragment as de,jsxs as ie}from"react/jsx-runtime";import{createContext as ue,useContext as fe,useLayoutEffect as V,useMemo as g,useRef as W,useState as F}from"react";import{useEasel as q,useSelectedFields as pe}from"efficient-easel/easel";import{fieldShownInView as me,Inspector as we,planFields as P}from"efficient-easel/fields";import{BUCKET_ICONS as he,RowPropsContext as be}from"../lib/document/controls.js";import{panelTab as ge}from"../../format/lib/document/panel-tabs.js";import{BUCKETS as ye}from"../lib/document/field-groups.js";import{say as xe}from"../../format/lib/editor-words.js";import{SameInEveryViewNote as Se}from"./SameInEveryViewNote.js";import{usePreviewDevice as ve}from"efficient-easel/draw/client";import{deviceField as Be}from"efficient-easel/screen/lib/document/device-fields";import{showWhenContext as Ce,visibleFields as U}from"../../render/lib/document/show-when.js";import{fieldsOfPart as Te}from"../../render/lib/document/hero-media-parts.js";import{bandIsDropped as ke,droppedBands as Ee,loneDesignBand as De,sameKeys as _e,TEXT_BAND_KEY as O,TEXT_BAND_TITLE as Fe,withoutBands as Pe}from"../../format/lib/document/panel-bands.js";const I=new Map,y=new Set;function X(o,r){const p=new Map;for(const t of o.querySelectorAll(".es-insp-row[data-field]"))p.set(t.getAttribute("data-field")??"",t);const i=[];for(const[t,h]of r)i.push({key:t,rows:h.map(x=>{const l=p.get(x),b=!!l&&[...l.children].some(S=>!S.hidden),m=l?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:b,labelled:b&&!!m}})});return i}const Oe=Object.fromEntries(ye.map(o=>{const r=he[o];return[o,d(r,{},o)]})),Y=ue(null),Ie={_partBody:Be("each",{type:"custom",render:()=>d(Re,{})})};function Re(){return d(de,{children:fe(Y)})}function He({entries:o,entryCount:r=0,part:p=null,omit:i,motion:t,body:h,itemWord:x}){const{id:l,fields:b,values:m,readOnly:S,onChange:G}=pe(),a=g(()=>t?{...m,...t.values}:m,[m,t?.values]),H=(e,n)=>t?.keys.has(e)?t.onChange(e,n):G(e,n),v=ve(),{appState:R,config:z}=q(e=>e),B=Ce(v,z,R.data.content??[],R.ui.itemSelector),C=h===void 0?Te(b,p):Ie,j=g(()=>{const e=i?.length?Object.fromEntries(Object.entries(C).filter(([n])=>!i.includes(n))):C;return t?{...e,...t.fields}:e},[C,i,t?.fields]),w=U(j,a,B),[J,Q]=F(()=>new Set(y)),[T,Z]=F(()=>new Set),A=W(null),{bandRows:ee,designBands:te,looseRows:ne}=g(()=>{const e=new Map,n=new Set,f=[];for(const s of P(w).rows){if(!s.fold){s.bucket==="Design"&&f.push(s.name);continue}const c=e.get(s.fold.key)??[];c.push(s.name),e.set(s.fold.key,c),s.bucket==="Design"&&n.add(s.fold.key)}return{bandRows:e,designBands:n,looseRows:new Map([["",f]])}},[w]),k=me({},v),M={key:O,rows:Array.from({length:k?r:0},()=>({shown:!0,labelled:!0}))};V(()=>{const e=A.current?.parentElement;if(!e)return;const n=X(e,ee),f=new Set(Ee(n)),s=De([M,...n.filter(c=>te.has(c.key))],X(e,ne)[0].rows);s&&f.add(s),Z(c=>_e(c,f)?c:f)});const se=g(()=>Pe(w,T),[w,T]),oe=!ke(M)&&!T.has(O)?{key:O,title:Fe}:void 0,K=q(e=>e.selectedItem)!==null,N=t?.part??p??"",E=`${l}:${N}:${String(v)}`,[re,le]=F(()=>({tab:I.get(E)})),$=`${l}:${N}`,D=W(null),_={...B,node:a},L=P(w,{values:a,context:_}).buckets,u=ge({allTabs:K,remembered:I.get(E),inherited:D.current?.panel===$?D.current.tab:re.tab,buckets:L,hasText:k&&r>0}),ae=!k&&!L.includes(u)&&(P(U(j,a,{...B,device:"desktop"}),{values:a,context:{..._,device:"desktop"}}).buckets.includes(u)||u==="Design"&&r>0);V(()=>{D.current={panel:$,tab:u}});const ce=u==="Design";return d(Y.Provider,{value:h??null,children:d(be.Provider,{value:t?a:null,children:ie(we,{fields:se,values:a,onChange:H,readOnly:S,allTabs:K,showWhenContext:_,context:{itemWord:x},tab:u,onTab:e=>{I.set(E,e),le({tab:e})},tabIcons:Oe,idPrefix:l,ariaLabel:xe("Section settings"),lead:ce?o:null,leadFold:oe,closedFolds:J,onFold:(e,n)=>{n?y.delete(e):y.add(e),Q(new Set(y))},children:[d("span",{ref:A,hidden:!0}),ae&&d(Se,{})]})})})}export{He as SiteFields,Oe as TAB_ICONS};
1
+ "use client";import{jsx as s,Fragment as X}from"react/jsx-runtime";import{createContext as q,useContext as z,useLayoutEffect as J,useMemo as B,useRef as Q,useState as O}from"react";import{useEasel as D,useSelectedFields as Z}from"efficient-easel/easel";import{fieldShownInView as ee,Inspector as te,LEAD_BAND_KEY as ne,planFields as I}from"efficient-easel/fields";import{BUCKET_ICONS as se,RowPropsContext as oe}from"../lib/document/controls.js";import{panelTab as re}from"../../format/lib/document/panel-tabs.js";import{BUCKETS as le}from"../lib/document/field-groups.js";import{say as ce}from"../../format/lib/editor-words.js";import{SameInEveryViewNote as ae}from"./SameInEveryViewNote.js";import{usePreviewDevice as de}from"efficient-easel/draw/client";import{deviceField as ie}from"efficient-easel/screen/lib/document/device-fields";import{showWhenContext as ue,visibleFields as k}from"../../render/lib/document/show-when.js";import{fieldsOfPart as fe}from"../../render/lib/document/hero-media-parts.js";const pe="Text",x=new Map,a=new Set,me=Object.fromEntries(le.map(l=>{const c=se[l];return[l,s(c,{},l)]})),j=q(null),he={_partBody:ie("each",{type:"custom",render:()=>s(be,{})})};function be(){return s(X,{children:z(j)})}function Oe({entries:l,entryCount:c=0,part:w=null,omit:d,motion:t,body:C,itemWord:A}){const{id:i,fields:K,values:u,readOnly:N,onChange:$}=Z(),n=B(()=>t?{...u,...t.values}:u,[u,t?.values]),L=(e,r)=>t?.keys.has(e)?t.onChange(e,r):$(e,r),f=de(),{appState:g,config:M}=D(e=>e),p=ue(f,M,g.data.content??[],g.ui.itemSelector),m=C===void 0?fe(K,w):he,y=B(()=>{const e=d?.length?Object.fromEntries(Object.entries(m).filter(([r])=>!d.includes(r))):m;return t?{...e,...t.fields}:e},[m,d,t?.fields]),S=k(y,n,p),[R,V]=O(()=>new Set(a)),T=ee({},f),W={key:ne,title:pe},E=D(e=>e.selectedItem)!==null,F=t?.part??w??"",h=`${i}:${F}:${String(f)}`,[U,Y]=O(()=>({tab:x.get(h)})),P=`${i}:${F}`,b=Q(null),v={...p,node:n},_=I(S,{values:n,context:v}).buckets,o=re({allTabs:E,remembered:x.get(h),inherited:b.current?.panel===P?b.current.tab:U.tab,buckets:_,hasText:T&&c>0}),G=!T&&!_.includes(o)&&(I(k(y,n,{...p,device:"desktop"}),{values:n,context:{...v,device:"desktop"}}).buckets.includes(o)||o==="Design"&&c>0);J(()=>{b.current={panel:P,tab:o}});const H=o==="Design";return s(j.Provider,{value:C??null,children:s(oe.Provider,{value:t?n:null,children:s(te,{fields:S,values:n,onChange:L,readOnly:N,allTabs:E,showWhenContext:v,context:{itemWord:A},tab:o,onTab:e=>{x.set(h,e),Y({tab:e})},tabIcons:me,idPrefix:i,ariaLabel:ce("Section settings"),lead:H?l:null,leadFold:W,closedFolds:R,onFold:(e,r)=>{r?a.delete(e):a.add(e),V(new Set(a))},children:G&&s(ae,{})})})})}export{Oe as SiteFields,me as TAB_ICONS};
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import X from"./WebsiteHintsProvider.js";import{useCallback as H,useEffect as P,useMemo as l,useRef as Z,useState as u}from"react";import x from"next/dynamic";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as $}from"../lib/document/build-config.js";import{withTemplateMediaPlaceholders as ee}from"../../format/lib/document/templateFields.js";import{setEditorPageSlug as B}from"../../format/lib/document/editor-page-context.js";import{ScreenDocumentContext as te}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as re}from"../../render/components/PreviewHeaderContext.js";import{PreviewTickerProvider as oe}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as ie}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as ne}from"efficient-easel/draw/client";import{CanvasPartsBridge as se}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as de}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as ae}from"./PreviewPartStyleContext.js";import{sectionTemplates as I}from"efficient-easel/screen/lib/section-templates";import{saveSectionTemplate as R}from"../lib/editor-document-adapter.js";import{nodeToDoc as ce,docToNode as F}from"efficient-easel/screen/lib/document/section-doc";import{newNodeId as me}from"efficient-easel/draw";import{migrateRenamedProps as le}from"../../format/lib/document/renamed-props.js";import{buildSlotSeedChildren as ue}from"../../render/lib/document/slot-specs.js";import{FOOTER_TYPE as fe,buildDefaultFooterBlocks as pe}from"../lib/document/footer-blocks.js";import{NO_BRIDGED_CAPABILITIES as ve,useAdminBridge as ge}from"efficient-easel/screen/lib/admin-bridge";import{useEaselHost as he}from"efficient-easel/screen/lib/host";import{ChromeWrap as Pe}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as Se}from"efficient-easel/screen/lib/session";import{useEaselSession as Ee}from"efficient-easel/screen/lib/session-context";import{say as L}from"../../format/lib/editor-words.js";import{retargetWhenSaved as ye}from"../../format/lib/section-retarget.js";import{routeSharedHostMessage as Te}from"efficient-easel/screen/lib/host-inbound";import{routeWebsiteHostMessage as we}from"../../format/lib/website-host-inbound.js";import{DEFAULT_THEME_MODE as S,THEME_MODE_KEY as Ne}from"../../format/lib/theme.js";import{makeSitePageAdapter as U}from"../lib/editor-document-adapter.js";import{documentPermissions as Ce}from"efficient-easel/edit-lock";import{useAutosave as ke}from"efficient-easel/autosave";import{saveStatusOf as Ae}from"efficient-easel/screen/lib/document-switch";import{blocksOf as be}from"../lib/website-session.js";const Ie=x(()=>import("./SiteEditorProvider.js"),{ssr:!1}),Me=x(()=>import("efficient-easel/screen/components/SectionScreenShell"),{ssr:!1}),W="HeroSingle",Y="Untitled section";function Oe(i,E){const d=E.components,r=d[i]?i:W,y=d[r]?.defaultProps??{},n=ue(r,f=>d[f]?.defaultProps??{}),s=r===fe?{blocks:pe()}:null;return{type:r,props:{id:me(r),...y,...n?{[n.slot]:n.children}:null,...s}}}function De(){if(typeof window>"u")return S;try{const i=window.localStorage.getItem(Ne);return i==="light"||i==="dark"||i==="auto"?i:S}catch{return S}}function _e({id:i,initialType:E,initialName:d=Y}){const[r,y]=u(i),n=Z(r);P(()=>{n.current=r},[r]);const s=he(),[f,j]=u(E),[M,K]=u(d),[a,T]=u(void 0),[G,q]=u(S),{token:w,tokenRef:O}=ge({onMessage:e=>{if(we(e)||Te(e))return;const t=e;if(t?.type==="storefront-editor:navigate"&&t.target?.kind==="section"&&t.target.id){const b=t.target.id;if(b===n.current)return;const Q=t.target.type,V=t.target.name;ye(C,()=>{j(Q),K(V||Y),y(b),s.address.show({kind:"section",id:b})},()=>s.send("storefront-editor:save-failed"))}}}),N=ke({save:e=>R(I,e.id,e.node).then(()=>{}),onFailure:(e,t)=>{t===0&&s.send("storefront-editor:save-failed")}}),{state:p,push:D,flush:C}=N;P(()=>q(De()),[]);const c=Ee(),v=c.usesBridgedToken?!!w:!0,g=l(()=>$(Se(c),be(c)),[c]);P(()=>{if(!v)return;let e=!1;return T(void 0),I.ensure(r,M,Oe(f??W,g)).then(t=>!e&&T(t.node)).catch(()=>!e&&T(null)),()=>{e=!0}},[r,f,M,v,g]);const k=H(e=>{s.send("storefront-editor:dirty");const t=F(e);t&&D({id:n.current,node:t})},[D,s]),h=s.send,_=H(async e=>{try{return await e(O.current??""),!0}catch{return h("storefront-editor:save-failed"),!1}},[h]),z=l(()=>ee(g,!0),[g]);P(()=>(B(null),()=>B(null)),[]);const m=l(()=>a?le(ce(a)):null,[a]),A=l(()=>({target:{kind:"page",slug:""},adapter:U(void 0),capabilities:U(void 0).capabilities,templateId:null,currentSlug:"",currentKind:null,siteId:null,ready:v,token:w,tokenRef:O,notifyParent:h,runAuthed:_,docId:r,data:m,getLiveData:()=>m,error:null,redirecting:!1,saveStatus:Ae(p),saveState:p,autoSaveEnabled:!0,autoSaveStoppedByConflict:!1,hasUnsavedEdits:p.pending,toggleAutoSave:()=>{},retrySave:()=>{N.retryNow()},onChange:k,flushSave:C,onPublish:async e=>{const t=F(e);t&&await R(I,n.current,t)},bridgeCapabilities:ve,access:{kind:"editing"},readOnly:!1,takeOverEditing:()=>{},viewReadOnly:()=>{},saveConflict:null,reloadFromServer:()=>{},navigate:()=>{},pendingNav:null,cancelPendingNav:()=>{},discardAndNavigate:()=>{},saveAndNavigate:async()=>{}}),[r,v,w,h,_,m,p,k,C,N.retryNow]),J=l(()=>Ce(!A.readOnly),[A.readOnly]);return a===void 0?o("div",{className:"sf-msg",children:L("Loading…")}):a===null||!m?o("div",{className:"sf-msg sf-msg--error",children:L("Couldn’t open this section.")}):o(te.Provider,{value:A,children:o(X,{children:o(re,{themeMode:G,chromePlaceholder:!0,children:o(Pe,{wrap:c.chrome?.wrap,surface:"section",children:o(oe,{children:o(ie,{children:o(ne,{children:o(de,{children:o(se,{children:o(ae,{children:o(Ie,{config:z,data:m,onChange:k,permissions:J,children:o(Me,{})},r)})})})})})})})})})})}export{_e as default};
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import X from"./WebsiteHintsProvider.js";import{useCallback as H,useEffect as P,useMemo as l,useRef as Z,useState as u}from"react";import x from"next/dynamic";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as $}from"../lib/document/build-config.js";import{withTemplateMediaPlaceholders as ee}from"../../format/lib/document/templateFields.js";import{setEditorPageSlug as B}from"../../format/lib/document/editor-page-context.js";import{ScreenDocumentContext as te}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as re}from"../../render/components/PreviewHeaderContext.js";import{PreviewTickerProvider as oe}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as ie}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as ne}from"efficient-easel/draw/client";import{CanvasPartsBridge as se}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as de}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as ae}from"./PreviewPartStyleContext.js";import{sectionTemplates as I}from"efficient-easel/screen/lib/section-templates";import{saveSectionTemplate as R}from"../lib/editor-document-adapter.js";import{nodeToDoc as ce,docToNode as F}from"efficient-easel/screen/lib/document/section-doc";import{newNodeId as me}from"efficient-easel/draw";import{migrateRenamedProps as le}from"../../format/lib/document/renamed-props.js";import{buildSlotSeedChildren as ue}from"../../render/lib/document/slot-specs.js";import{FOOTER_TYPE as fe,buildDefaultFooterBlocks as pe}from"../lib/document/footer-blocks.js";import{NO_BRIDGED_CAPABILITIES as ve,useAdminBridge as ge}from"efficient-easel/screen/lib/admin-bridge";import{useEaselHost as he}from"efficient-easel/screen/lib/host";import{ChromeWrap as Pe}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as Se}from"efficient-easel/screen/lib/session";import{useEaselSession as Ee}from"efficient-easel/screen/lib/session-context";import{say as L}from"../../format/lib/editor-words.js";import{retargetWhenSaved as ye}from"../../format/lib/section-retarget.js";import{routeSharedHostMessage as Te}from"efficient-easel/screen/lib/host-inbound";import{routeWebsiteHostMessage as we}from"../../format/lib/website-host-inbound.js";import{DEFAULT_THEME_MODE as S,THEME_MODE_KEY as Ne}from"../../format/lib/theme.js";import{makeSitePageAdapter as U}from"../lib/editor-document-adapter.js";import{documentPermissions as Ce}from"efficient-easel/edit-lock";import{useAutosave as ke}from"efficient-easel/autosave";import{saveStatusOf as Ae}from"efficient-easel/screen/lib/document-switch";import{blocksOf as be}from"../lib/website-session.js";const Ie=x(()=>import("./SiteEditorProvider.js"),{ssr:!1}),Me=x(()=>import("efficient-easel/screen/components/SectionScreenShell"),{ssr:!1}),W="Hero",Y="Untitled section";function Oe(i,E){const d=E.components,r=d[i]?i:W,y=d[r]?.defaultProps??{},n=ue(r,f=>d[f]?.defaultProps??{}),s=r===fe?{blocks:pe()}:null;return{type:r,props:{id:me(r),...y,...n?{[n.slot]:n.children}:null,...s}}}function De(){if(typeof window>"u")return S;try{const i=window.localStorage.getItem(Ne);return i==="light"||i==="dark"||i==="auto"?i:S}catch{return S}}function _e({id:i,initialType:E,initialName:d=Y}){const[r,y]=u(i),n=Z(r);P(()=>{n.current=r},[r]);const s=he(),[f,j]=u(E),[M,K]=u(d),[a,T]=u(void 0),[G,q]=u(S),{token:w,tokenRef:O}=ge({onMessage:e=>{if(we(e)||Te(e))return;const t=e;if(t?.type==="storefront-editor:navigate"&&t.target?.kind==="section"&&t.target.id){const b=t.target.id;if(b===n.current)return;const Q=t.target.type,V=t.target.name;ye(C,()=>{j(Q),K(V||Y),y(b),s.address.show({kind:"section",id:b})},()=>s.send("storefront-editor:save-failed"))}}}),N=ke({save:e=>R(I,e.id,e.node).then(()=>{}),onFailure:(e,t)=>{t===0&&s.send("storefront-editor:save-failed")}}),{state:p,push:D,flush:C}=N;P(()=>q(De()),[]);const c=Ee(),v=c.usesBridgedToken?!!w:!0,g=l(()=>$(Se(c),be(c)),[c]);P(()=>{if(!v)return;let e=!1;return T(void 0),I.ensure(r,M,Oe(f??W,g)).then(t=>!e&&T(t.node)).catch(()=>!e&&T(null)),()=>{e=!0}},[r,f,M,v,g]);const k=H(e=>{s.send("storefront-editor:dirty");const t=F(e);t&&D({id:n.current,node:t})},[D,s]),h=s.send,_=H(async e=>{try{return await e(O.current??""),!0}catch{return h("storefront-editor:save-failed"),!1}},[h]),z=l(()=>ee(g,!0),[g]);P(()=>(B(null),()=>B(null)),[]);const m=l(()=>a?le(ce(a)):null,[a]),A=l(()=>({target:{kind:"page",slug:""},adapter:U(void 0),capabilities:U(void 0).capabilities,templateId:null,currentSlug:"",currentKind:null,siteId:null,ready:v,token:w,tokenRef:O,notifyParent:h,runAuthed:_,docId:r,data:m,getLiveData:()=>m,error:null,redirecting:!1,saveStatus:Ae(p),saveState:p,autoSaveEnabled:!0,autoSaveStoppedByConflict:!1,hasUnsavedEdits:p.pending,toggleAutoSave:()=>{},retrySave:()=>{N.retryNow()},onChange:k,flushSave:C,onPublish:async e=>{const t=F(e);t&&await R(I,n.current,t)},bridgeCapabilities:ve,access:{kind:"editing"},readOnly:!1,takeOverEditing:()=>{},viewReadOnly:()=>{},saveConflict:null,reloadFromServer:()=>{},navigate:()=>{},pendingNav:null,cancelPendingNav:()=>{},discardAndNavigate:()=>{},saveAndNavigate:async()=>{}}),[r,v,w,h,_,m,p,k,C,N.retryNow]),J=l(()=>Ce(!A.readOnly),[A.readOnly]);return a===void 0?o("div",{className:"sf-msg",children:L("Loading…")}):a===null||!m?o("div",{className:"sf-msg sf-msg--error",children:L("Couldn’t open this section.")}):o(te.Provider,{value:A,children:o(X,{children:o(re,{themeMode:G,chromePlaceholder:!0,children:o(Pe,{wrap:c.chrome?.wrap,surface:"section",children:o(oe,{children:o(ie,{children:o(ne,{children:o(de,{children:o(se,{children:o(ae,{children:o(Ie,{config:z,data:m,onChange:k,permissions:J,children:o(Me,{})},r)})})})})})})})})})})}export{_e as default};
@@ -1 +1 @@
1
- "use client";import{jsx as a,Fragment as y,jsxs as R}from"react/jsx-runtime";import{useCallback as v,useEffect as g,useRef as te,useState as B}from"react";import{SettingsSwitch as oe}from"efficient-easel/panel";import{PagesIcon as re,StylesIcon as ne}from"efficient-easel/rail";import{PaletteIcon as ie}from"efficient-shell/icons/efficient";import{Subtree as se,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ae}from"./LocationsTreeContext.js";import{usePartTypingDeps as ce}from"./usePartTypingDeps.js";import{copyItemWrite as de}from"../lib/document/card-copy-rows.js";import le from"./PagesPanel.js";import{usePreviewChat as pe}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as me}from"./preview-devices.js";import{PreviewDeviceContext as ue}from"efficient-easel/draw/client";import{usePreviewSocial as fe}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as Se}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as Ee,usePreviewTicker as Pe}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as he}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as Te}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as we,HERO_PART_MODE as W,heroMediaRows as ge,heroPartId as V,readHeroPartId as Ie}from"../../render/lib/document/hero-media-parts.js";import be,{CHAT_MODE as ve,HEADER_MODE as _e,SOCIAL_MODE as ke,WEBSITE_MODE as M,WEBSITE_PAGE_MODE as Re}from"./SectionEditor.js";import C from"./SectionIcon.js";import Ce from"./SectionThumbnail.js";import{useScreenDocument as L}from"efficient-easel/screen/components/ScreenDocumentContext";import Le from"./StylesPanel.js";import{LOCATIONS_TYPE as Oe,useLocationsTree as Ae}from"./useLocationsTree.js";import{usePinnedChromeSeed as ye}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Be}from"./useHostDocumentBridge.js";import{usePreviewHref as De}from"./usePreviewHref.js";import{WebsitePreviewButton as Ne}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as He,SITE_STYLES_TABS as We,SITE_STYLES_TEXT_TAB as Ve,useWebsiteName as Me}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as xe}from"./useWebsiteMainAction.js";import{VersionHistory as Ge}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Ye}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Fe,heroGroupNestDepth as Ke}from"../../format/lib/hero-group-placement.js";import{stripMarkup as je}from"../../format/lib/markup.js";import{categoryShortLabel as ze,PINNED_SECTION_TYPE as Ue}from"../lib/document/add-palette.js";import{canAddTo as Ze}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as qe}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as Xe}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as Je,setBookingPreview as Qe}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as $e}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as et}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as tt,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as ot,readLeftView as rt,resolveLeftView as nt,writeLeftView as it}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as st}from"../lib/document/locked-blocks.js";import{everyPageNotice as at,noOwnTab as ct,pinnedReach as Y,websiteDuplicateBlocked as dt}from"../lib/document/every-page.js";import{sharedSectionReach as lt,WEBSITE_SHARED_SECTIONS as pt}from"../lib/shared-sections-layer.js";import{activeSharedSections as O,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as mt}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as _}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ut,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as ft}from"../lib/document/overrides.js";import{labelAtLevel as St}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as Et}from"../../format/lib/document/media-drop.js";import{editorWords as Pt,say as u}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as ht}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as Tt,isSectionGroupType as wt,sectionGroupZone as gt,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as It}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as bt}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as vt,SAVE_AS_TEMPLATE_EVENT as _t}from"../../format/lib/save-as-template-action.js";import{cityPalettePresets as kt}from"../lib/sections/city-presets.js";import{newSectionNode as Rt}from"../lib/sections/new-section-node.js";import{useHostProducts as Ct}from"../lib/use-host-products.js";import{backendOf as Lt}from"../lib/website-session.js";function z({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=Pe(),c=H().tree,l=e,n=l.kind==="ticker"?l.heroId:null,s=v(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ut(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const f=String(i.props.id);return i.type==="Hero"&&he(i.props)&&a(D,{icon:a(C,{type:"ticker",size:13}),name:u(Ee),onSelect:()=>s(f),selected:n===f,rowProps:{onClick:m(()=>s(f))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Te(),c=H().tree,{appState:l}=N(p=>p),n=l.data.content??[],s=te(n);s.current=n;const i=e,m=we.find(p=>W[p]===i.kind),f=m&&"nodeId"in i?V(String(i.nodeId),m):null,E=v(p=>{const d=Ie(p);if(!d)return;const P=s.current.findIndex(T=>String(T.props.id)===d.nodeId);if(P<0)return;const h={kind:W[d.part],nodeId:d.nodeId};t({index:P},h)},[t]);return g(()=>{o(f)},[f,o]),g(()=>{r(E)},[r,E]),{partRows:(p,{rowClick:d})=>{const P=String(p.props.id),h=ge(p);if(h.length===0)return null;const T=S=>{const w=V(P,S.part);return a(D,{icon:a(C,{type:S.part==="media"?"heroMedia":"heroImage",size:13}),name:u(S.label),onSelect:()=>E(w),selected:f===w,rowProps:{onClick:d(()=>E(w))},words:c},w)},[b,...I]=h;return R(y,{children:[T(b),I.length>0&&a(se,{children:I.map(T)})]})}}}function Z(e,t){return{partRows:(o,r)=>R(y,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function Ot(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:l,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=L(),{hasPreviewLink:f}=o,E=Lt(x()).preview?.draftLink,p=xe(e.data),d=vt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),P=v(()=>{!c||!r||i(_t,{siteId:c,slug:r})},[i,c,r]),h=De({pageSlug:r,siteId:c,token:m}),T=t.previewHref?.(r)??h;return{barLead:()=>d.visible&&a(bt,{enabled:d.enabled,reason:d.enabled?"":d.disabledReason,onSaved:P}),barView:()=>f&&r&&a(Ne,{liveHref:T,pageId:l??null,draftLink:E}),mainAction:p}}function At(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:l,navigate:n}=L(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=S=>t.setView(S),[f,E]=B(We[0].id),[p,d]=B(!1),{surface:P,setSurface:h}=Se(),T=()=>{if(s){m("styles"),t.reveal(),K();return}e.show(M),e.reveal(),K()},b={id:"pages",label:u("Pages"),icon:a(re,{}),panel:({onHide:S})=>a(le,{activeSurface:P,onPreviewSurface:h,onNavigate:w=>{h(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:S})},I=[];return!s&&i&&I.push({id:"appearance",label:u("Appearance"),icon:a(ie,{}),active:e.kind==="website",onSelect:T}),s&&I.push({id:"styles",label:u("Styles"),icon:a(ne,{}),panel:({onHide:S,notify:w})=>a(Le,{tokenRef:l,siteId:c??void 0,onClose:S,onNotify:w,tab:f,onTabChange:E,revealPageGroup:p,onPageGroupRevealed:()=>d(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:S=>nt(S,s),openSettings:T,openStyles:()=>{E(Ve),m("styles")},openPageStyles:s?()=>{E(He),d(!0),m("styles"),t.reveal()}:i?()=>{e.show(Re),e.reveal()}:void 0}}function yt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=L(),c=N(n=>n.config),l=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=O();if(!n||!r)return;let s=!1;return mt(l).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,l])}function q(){const e=ce();return v(t=>{de(t,e)},[e])}function Bt(e,t,o,r){const{kind:c,open:l}=e,{selected:n,zoneOf:s}=t;g(()=>{Qe(n?.type==="BookingBox"&&n.props.region==="confirm"?Je(s(String(n.props.id))):null)},[n?.props.id]);const i=Ae(e,t),{capabilities:{hasSiteSettings:m}}=L();yt();const{chat:f,setChat:E,setSelected:p,setSelectHandler:d}=pe(),P=v(()=>l(ve),[l]),h=c==="chat";g(()=>{p(h)},[h,p]),g(()=>{d(P)},[d,P]);const{setOpenHandler:T}=fe(),b=v(()=>l(ke),[l]);g(()=>{T(b)},[T,b]);const I=Z(z(e),U(e)),S=Ot(t),w=At(e,r),Q=o.device,$=q();return{...I,...S,...w,hasOwnRows:k=>k.type===Oe,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,onCopyItem:$,wrap:k=>a(ae.Provider,{value:!0,children:R(ue.Provider,{value:Q,children:[k,a(Ge,{})]})}),addPanelRow:k=>m?R("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(C,{type:"chat",size:16})}),R("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),P()},children:[u("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:u("A chat bubble on every page")})]}),a(oe,{checked:f.enabled,onChange:ee=>E({enabled:ee}),ariaLabel:u("Show the chat bubble on the whole site")})]}):void 0}}let X=null,A=new WeakMap;function Dt(e){const t=Pt();if(!e||!t)return e;X!==t&&(X=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:u(r.label)})):null,spec:e.spec?{...e.spec,addLabel:u(e.spec.addLabel),...e.spec.childLabel?{childLabel:u(e.spec.childLabel)}:{}}:null},A.set(e,o)),o}const Nt={isLockedBlock:(e,t)=>st(e,t)||!!(t&&O()?.heldElsewhere(t.props.id)),duplicateBlocked:dt,nestDepth:(e,t,o)=>t===Fe?Ke(e,o):0,newSectionNode:Rt,canAddTo:(e,t,o,r)=>Dt(Ze(e,t,r,o)),blockIsOffered:Xe,slotsOf:qe,resolveOnInsert:!0},Ht=new Proxy(ht,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?u(o):o}}),Wt={labelAtLevel:(e,t,o)=>u(St(e,t,o)),descriptions:Ht,categoryLabel:e=>{const t=ze(e);return t===void 0?void 0:u(t)},firstSection:Ue,blockRowName:$e,rowName:et,plainText:je,Icon:C,Thumbnail:Ce,useProducts:Ct,presets:kt()},Vt={desktop:2e3,tablet:800,mobile:390},J="desktop",Mt={options:me,initial:J,fluid:J,widths:Vt,hidesPerView:!0},xt={read:rt,write:e=>it(e),forSelection:(e,t)=>ot(e,t)},Gt={first:G,last:tt,firstGroup:It,lastGroup:j,isSectionGroup:wt,sectionGroupZone:gt,panelOf:e=>e===G?_e:null,get sharedReach(){return _()?Ft:void 0},get shared(){return O()?pt:void 0},get groupTab(){return _()?ct:void 0},get groupBadge(){return _()?Y({type:j})??void 0:void 0},get changeNotice(){return _()?at():void 0},get band(){return _()?Yt:void 0},get groupAccepts(){return _()?Tt:void 0}},Yt={foldable:!0},Ft=e=>Y(e)??lt(e);function Kt(e){return{...Z(z(e),U(e)),onCopyItem:q(),openSettings:()=>e.show(M)}}function jt(e,t){ye(e,t),Be()}const ir={useOwnerName:Me,useDocumentLabel:Ye,useBridges:Bt,useStandaloneBridges:Kt,useDocumentPass:jt,blockRules:Nt,blockLook:Wt,devices:Mt,leftView:xt,pinned:Gt,Canvas:ft,canvasDrag:{media:Et},Inspector:be};export{ir as WEBSITE_SCREEN};
1
+ "use client";import{jsx as a,Fragment as y,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as g,useRef as te,useState as B}from"react";import{SettingsSwitch as oe}from"efficient-easel/panel";import{PagesIcon as re,StylesIcon as ne}from"efficient-easel/rail";import{PaletteIcon as ie}from"efficient-shell/icons/efficient";import{Subtree as se,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{toItemSelector as ae}from"efficient-easel/node-ops";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ce}from"./LocationsTreeContext.js";import{usePartTypingDeps as de}from"./usePartTypingDeps.js";import{copyItemWrite as le}from"../lib/document/card-copy-rows.js";import pe from"./PagesPanel.js";import{usePreviewChat as me}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as ue}from"./preview-devices.js";import{PreviewDeviceContext as fe}from"efficient-easel/draw/client";import{usePreviewSocial as Se}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as Ee}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as he,usePreviewTicker as Pe}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as Te}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as we}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as ge,HERO_PART_MODE as W,heroMediaRows as Ie,heroPartId as V,readHeroPartId as be}from"../../render/lib/document/hero-media-parts.js";import ve,{CHAT_MODE as _e,HEADER_MODE as ke,SOCIAL_MODE as Ce,WEBSITE_MODE as M,WEBSITE_PAGE_MODE as Re}from"./SectionEditor.js";import R from"./SectionIcon.js";import Le from"./SectionThumbnail.js";import{useScreenDocument as L}from"efficient-easel/screen/components/ScreenDocumentContext";import Oe from"./StylesPanel.js";import{LOCATIONS_TYPE as Ae,useLocationsTree as ye}from"./useLocationsTree.js";import{usePinnedChromeSeed as Be}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as De}from"./useHostDocumentBridge.js";import{usePreviewHref as Ne}from"./usePreviewHref.js";import{WebsitePreviewButton as He}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as We,SITE_STYLES_TABS as Ve,SITE_STYLES_TEXT_TAB as Me,useWebsiteName as xe}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Ge}from"./useWebsiteMainAction.js";import{VersionHistory as Ye}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Fe}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as ze,heroGroupNestDepth as Ke}from"../../format/lib/hero-group-placement.js";import{stripMarkup as je}from"../../format/lib/markup.js";import{categoryShortLabel as Ue,PINNED_SECTION_TYPE as Ze}from"../lib/document/add-palette.js";import{canAddTo as qe}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as Xe}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as Je}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as Qe,setBookingPreview as $e}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as et}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as tt}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as ot,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as rt,readLeftView as nt,resolveLeftView as it,writeLeftView as st}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as at}from"../lib/document/locked-blocks.js";import{everyPageNotice as ct,noOwnTab as dt,pinnedReach as Y,websiteDuplicateBlocked as lt}from"../lib/document/every-page.js";import{sharedSectionReach as pt,WEBSITE_SHARED_SECTIONS as mt}from"../lib/shared-sections-layer.js";import{activeSharedSections as O,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as ut}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as _}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ft,scrollPreviewToTop as z}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as St}from"../lib/document/overrides.js";import{labelAtLevel as Et}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as ht}from"../../format/lib/document/media-drop.js";import{editorWords as Pt,say as f}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as Tt}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as wt,isSectionGroupType as gt,sectionGroupZone as It,SITE_FOOTER_TYPE as K,SITE_HEADER_TYPE as bt}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as vt}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as _t,SAVE_AS_TEMPLATE_EVENT as kt}from"../../format/lib/save-as-template-action.js";import{menuPresets as Ct}from"../lib/sections/menu-presets.js";import{newSectionNode as Rt}from"../lib/sections/new-section-node.js";import{useHostProducts as Lt}from"../lib/use-host-products.js";import{backendOf as Ot}from"../lib/website-session.js";function j({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=Pe(),c=H().tree,d=e,n=d.kind==="ticker"?d.heroId:null,s=v(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ft(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const S=String(i.props.id);return i.type==="Hero"&&Te(i.props)&&a(D,{icon:a(R,{type:"ticker",size:13}),name:f(he),onSelect:()=>s(S),selected:n===S,rowProps:{onClick:m(()=>s(S))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=we(),c=H().tree,{appState:d,config:n}=N(p=>p),s=te({data:d.data,config:n});s.current={data:d.data,config:n};const i=e,m=ge.find(p=>W[p]===i.kind),S=m&&"nodeId"in i?V(String(i.nodeId),m):null,h=v(p=>{const l=be(p);if(!l)return;const{data:T,config:P}=s.current,u=ae(T,P,{kind:"node",id:l.nodeId});if(!u)return;const I={kind:W[l.part],nodeId:l.nodeId};t({index:u.index,zone:u.zone},I)},[t]);return g(()=>{o(S)},[S,o]),g(()=>{r(h)},[r,h]),{partRows:(p,{rowClick:l})=>{const T=String(p.props.id),P=Ie(p);if(P.length===0)return null;const u=E=>{const w=V(T,E.part);return a(D,{icon:a(R,{type:E.part==="media"?"heroMedia":"heroImage",size:13}),name:f(E.label),onSelect:()=>h(w),selected:S===w,rowProps:{onClick:l(()=>h(w))},words:c},w)},[I,...b]=P;return C(y,{children:[u(I),b.length>0&&a(se,{children:b.map(u)})]})}}}function Z(e,t){return{partRows:(o,r)=>C(y,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function At(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:d,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=L(),{hasPreviewLink:S}=o,h=Ot(x()).preview?.draftLink,p=Ge(e.data),l=_t({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),T=v(()=>{!c||!r||i(kt,{siteId:c,slug:r})},[i,c,r]),P=Ne({pageSlug:r,siteId:c,token:m}),u=t.previewHref?.(r)??P;return{barLead:()=>l.visible&&a(vt,{enabled:l.enabled,reason:l.enabled?"":l.disabledReason,onSaved:T}),barView:()=>S&&r&&a(He,{liveHref:u,pageId:d??null,draftLink:h}),mainAction:p}}function yt(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:d,navigate:n}=L(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=E=>t.setView(E),[S,h]=B(Ve[0].id),[p,l]=B(!1),{surface:T,setSurface:P}=Ee(),u=()=>{if(s){m("styles"),t.reveal(),z();return}e.show(M),e.reveal(),z()},I={id:"pages",label:f("Pages"),icon:a(re,{}),panel:({onHide:E})=>a(pe,{activeSurface:T,onPreviewSurface:P,onNavigate:w=>{P(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:E})},b=[];return!s&&i&&b.push({id:"appearance",label:f("Appearance"),icon:a(ie,{}),active:e.kind==="website",onSelect:u}),s&&b.push({id:"styles",label:f("Styles"),icon:a(ne,{}),panel:({onHide:E,notify:w})=>a(Oe,{tokenRef:d,siteId:c??void 0,onClose:E,onNotify:w,tab:S,onTabChange:h,revealPageGroup:p,onPageGroupRevealed:()=>l(!1)})}),{railLead:[I],railTrail:b,resolveLeftView:E=>it(E,s),openSettings:u,openStyles:()=>{h(Me),m("styles")},openPageStyles:s?()=>{h(We),l(!0),m("styles"),t.reveal()}:i?()=>{e.show(Re),e.reveal()}:void 0}}function Bt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=L(),c=N(n=>n.config),d=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=O();if(!n||!r)return;let s=!1;return ut(d).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,d])}function q(){const e=de();return v(t=>{le(t,e)},[e])}function Dt(e,t,o,r){const{kind:c,open:d}=e,{selected:n,zoneOf:s}=t;g(()=>{$e(n?.type==="BookingBox"&&n.props.region==="confirm"?Qe(s(String(n.props.id))):null)},[n?.props.id]);const i=ye(e,t),{capabilities:{hasSiteSettings:m}}=L();Bt();const{chat:S,setChat:h,setSelected:p,setSelectHandler:l}=me(),T=v(()=>d(_e),[d]),P=c==="chat";g(()=>{p(P)},[P,p]),g(()=>{l(T)},[l,T]);const{setOpenHandler:u}=Se(),I=v(()=>d(Ce),[d]);g(()=>{u(I)},[u,I]);const b=Z(j(e),U(e)),E=At(t),w=yt(e,r),Q=o.device,$=q();return{...b,...E,...w,hasOwnRows:k=>k.type===Ae,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,onCopyItem:$,wrap:k=>a(ce.Provider,{value:!0,children:C(fe.Provider,{value:Q,children:[k,a(Ye,{})]})}),addPanelRow:k=>m?C("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(R,{type:"chat",size:16})}),C("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),T()},children:[f("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:f("A chat bubble on every page")})]}),a(oe,{checked:S.enabled,onChange:ee=>h({enabled:ee}),ariaLabel:f("Show the chat bubble on the whole site")})]}):void 0}}let X=null,A=new WeakMap;function Nt(e){const t=Pt();if(!e||!t)return e;X!==t&&(X=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:f(r.label)})):null,spec:e.spec?{...e.spec,addLabel:f(e.spec.addLabel),...e.spec.childLabel?{childLabel:f(e.spec.childLabel)}:{}}:null},A.set(e,o)),o}const Ht={isLockedBlock:(e,t)=>at(e,t)||!!(t&&O()?.heldElsewhere(t.props.id)),duplicateBlocked:lt,nestDepth:(e,t,o)=>t===ze?Ke(e,o):0,newSectionNode:Rt,canAddTo:(e,t,o,r)=>Nt(qe(e,t,r,o)),blockIsOffered:Je,slotsOf:Xe,resolveOnInsert:!0},Wt=new Proxy(Tt,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?f(o):o}}),Vt={labelAtLevel:(e,t,o)=>f(Et(e,t,o)),descriptions:Wt,categoryLabel:e=>{const t=Ue(e);return t===void 0?void 0:f(t)},firstSection:Ze,blockRowName:et,rowName:tt,plainText:je,Icon:R,Thumbnail:Le,useProducts:Lt,presets:Ct()},Mt={desktop:2e3,tablet:800,mobile:390},J="desktop",xt={options:ue,initial:J,fluid:J,widths:Mt,hidesPerView:!0},Gt={read:nt,write:e=>st(e),forSelection:(e,t)=>rt(e,t)},Yt={first:G,last:ot,firstGroup:bt,lastGroup:K,isSectionGroup:gt,sectionGroupZone:It,panelOf:e=>e===G?ke:null,get sharedReach(){return _()?zt:void 0},get shared(){return O()?mt:void 0},get groupTab(){return _()?dt:void 0},get groupBadge(){return _()?Y({type:K})??void 0:void 0},get changeNotice(){return _()?ct():void 0},get band(){return _()?Ft:void 0},get groupAccepts(){return _()?wt:void 0}},Ft={foldable:!0},zt=e=>Y(e)??pt(e);function Kt(e){return{...Z(j(e),U(e)),onCopyItem:q(),openSettings:()=>e.show(M)}}function jt(e,t){Be(e,t),De()}const ar={useOwnerName:xe,useDocumentLabel:Fe,useBridges:Dt,useStandaloneBridges:Kt,useDocumentPass:jt,blockRules:Ht,blockLook:Vt,devices:xt,leftView:Gt,pinned:Yt,Canvas:St,canvasDrag:{media:ht},Inspector:ve};export{ar as WEBSITE_SCREEN};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as S}from"react/jsx-runtime";import{ButtonIcon as B,ButtonIconIcon as C,IconAfterTextIcon as _,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as O}from"efficient-easel/panel";import{useSelectedFields as m}from"efficient-easel/easel";import{buttonFieldSet as k}from"efficient-easel/screen/lib/document/button-fields";import{VIEW_KEY_ACCESS as F}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as v,Segmented as N}from"efficient-shell/ui";import{shellGlyphOf as R}from"../../../shell-glyph.js";import{StorefrontTextLinkField as P}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as W,buttonIconChoice as L,buttonIconSide as E,buttonWidth as A}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as j,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as U}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as z,siteButtonPaint as p,siteButtonRadiusPx as D}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as K,buttonWordsEntryField as G,hidableText as H,inOwnBox as V,linkField as Y,plainText as q,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as J}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as h}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as M,pickerNoneIcon as Q,rowSay as X,ShellIconWord as b}from"../../../box-fields.js";import{CARD_ROW_FACTS as Z,cardRowField as $,cardRowFields as ee,cardRowLinkField as oe,typedLinkField as te}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as ne}from"../../../../../../format/lib/content/card-template.js";import{consentWordsKept as ie,withConsentWordsRow as re}from"../../../consent-words-field.js";const d=e=>R(e==="none"?"no-symbol":e),se=W.map(e=>({value:e,icon:e==="none"?Q(d(e),t(b,{value:e})):d(e)})),I=q("Button");function le({value:e,onChange:n}){const o=m(),i=o.values.href,s=typeof e=="string"?e:e&&typeof e=="object"&&"text"in e?String(e.text??""):"";return o.fields&&"href"in o.fields?t(P,{label:"Button",icon:t(B,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>o.onChange("href",l)}):I.render({value:s,field:{label:"Button"},onChange:l=>n(H(l))})}function ce({value:e,onChange:n}){const o=m(),i=L(e,o.values.arrow),s=E(o.values.iconPosition),l=A(o.values.widthFit)==="fill",g=d("icon-at-end");return t(O,{label:r("Icon"),icon:t(C,{size:18}),value:i==="none"?void 0:t(b,{value:i}),children:S("div",{className:"flex items-center gap-2",children:[t(v,{label:r("Icon"),value:i,options:se,onChange:n}),i!=="none"&&t(N,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:y=>o.onChange("iconPosition",y),options:[{value:"before",icon:t(w,{size:16}),label:t("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:t(_,{size:16}),label:t("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:g,label:t("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>p(a().theme),T=k({lengthUnits:M,follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[e]=f("variant"),[n]=f("buttonColor"),{theme:o}=a(),i=u({variant:e,buttonColor:n}).border.width,s=U(n)??(e==="ghost"?z(o).text:p(o).fill);return{width:i,color:s}},useCorners:()=>D(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:J,resetTo:e=>K(e,r("Styles")),padding:{fallback:j,tablet:!0},phone:F,say:X});function ae(e,n){const o=Object.keys(e);return Object.fromEntries(o.slice(0,o.indexOf(n)+1).map(i=>[i,e[i]]))}const Pe={fields:{label:V(I,e=>t(le,{value:e.value,onChange:e.onChange})),labelText:G("label"),href:te({...Y("Button link"),...c("label")}),consentWords:ie("label"),_gButton:h("Button"),rowField:$("Shows","text"),[ne]:oe(),...ae(T,"_dDesign"),_gStyle:h("Style"),variant:c("buttonColor"),icon:{type:"custom",render:e=>t(ce,{value:e.value,onChange:e.onChange})},iconPosition:c("icon"),arrow:c("icon"),...T},resolveFields:(e,n)=>re(ee(n.fields,e,n),e.props,"label",["href"]),showWhenFacts:Z};export{Pe as ButtonBlockFields};
1
+ import{jsx as t,jsxs as y}from"react/jsx-runtime";import{ButtonIcon as B,ButtonIconIcon as C,IconAfterTextIcon as _,IconBeforeTextIcon as O}from"efficient-easel/icons";import{SettingsField as w}from"efficient-easel/panel";import{useSelectedFields as d}from"efficient-easel/easel";import{buttonFieldSet as k}from"efficient-easel/screen/lib/document/button-fields";import{VIEW_KEY_ACCESS as F}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as v,Segmented as N}from"efficient-shell/ui";import{shellGlyphOf as R}from"../../../shell-glyph.js";import{StorefrontTextLinkField as P}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as E,buttonIconChoice as W,buttonIconSide as L,buttonWidth as A}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as j,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as U}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as D,siteButtonPaint as p,siteButtonRadiusPx as z}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as G,buttonWordsEntryField as K,hidableText as H,inOwnBox as Y,linkField as V,plainText as q,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as J}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as h}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as M}from"efficient-easel/screen/lib/document/field-buckets";import{LENGTH_UNITS_TABLE as Q,pickerNoneIcon as X,rowSay as Z,ShellIconWord as b}from"../../../box-fields.js";import{CARD_ROW_FACTS as $,cardRowField as oo,cardRowFields as eo,cardRowLinkField as to,typedLinkField as no}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as io}from"../../../../../../format/lib/content/card-template.js";import{consentWordsKept as ro,withConsentWordsRow as so}from"../../../consent-words-field.js";const m=o=>R(o==="none"?"no-symbol":o),lo=E.map(o=>({value:o,icon:o==="none"?X(m(o),t(b,{value:o})):m(o)})),I=q("Button");function co({value:o,onChange:n}){const e=d(),i=e.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e.fields&&"href"in e.fields?t(P,{label:"Button",icon:t(B,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>e.onChange("href",l)}):I.render({value:s,field:{label:"Button"},onChange:l=>n(H(l))})}function ao({value:o,onChange:n}){const e=d(),i=W(o,e.values.arrow),s=L(e.values.iconPosition),l=A(e.values.widthFit)==="fill",T=m("icon-at-end");return t(w,{label:r("Icon"),icon:t(C,{size:18}),value:i==="none"?void 0:t(b,{value:i}),children:y("div",{className:"flex items-center gap-2",children:[t(v,{label:r("Icon"),value:i,options:lo,onChange:n}),i!=="none"&&t(N,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:g=>e.onChange("iconPosition",g),options:[{value:"before",icon:t(O,{size:16}),label:t("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:t(_,{size:16}),label:t("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:T,label:t("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>p(a().theme),S=k({lengthUnits:Q,follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[n]=f("buttonColor"),{theme:e}=a(),i=u({variant:o,buttonColor:n}).border.width,s=U(n)??(o==="ghost"?D(e).text:p(e).fill);return{width:i,color:s}},useCorners:()=>z(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:J,resetTo:o=>G(o,r("Styles")),padding:{fallback:j,tablet:!0},phone:F,say:Z});function fo(o,n){const e=Object.keys(o);return Object.fromEntries(e.slice(0,e.indexOf(n)+1).map(i=>[i,o[i]]))}const Lo={fields:{label:Y(I,o=>t(co,{value:o.value,onChange:o.onChange})),labelText:K("label"),href:no({...V("Button link"),...c("label")}),consentWords:ro("label"),_gButton:h("Button"),rowField:oo("Shows","text"),[io]:to(),...fo(S,M.Design),_gStyle:h("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>t(ao,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...S},resolveFields:(o,n)=>so(eo(n.fields,o,n),o.props,"label",["href"]),showWhenFacts:$};export{Lo as ButtonBlockFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{phoneKey as i,tabletKey as l}from"efficient-easel/draw";import{keptByRow as ko}from"efficient-easel/screen/lib/document/style-fields";import{BOX_CARD_PAD as E,BOX_FILL_FADE_PROP as Fo,BOX_SWATCH_PROP as Ho,boxCardProps as Wo,boxIsCard as I}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as yo,BOX_IS_NOT_CARD_RULE as Bo,BOX_ROW_IMAGE_PROP as xo}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Uo,cardRowField as M,cardRowFields as Mo,cardRowLinkField as Ko,typedLinkField as Xo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Go,cardCopyPlace as K,cardTemplateCardOwner as Yo}from"../../../../../../format/lib/content/card-template.js";import{BOX_SHOW_KEY as vo,HOVER_GROUP_KEY as jo,HOVER_KEY as T}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as Vo,BOX_NEXT_PICTURE_ROW as Jo}from"../../../../animation/hover-fields.js";import{darkenFields as zo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as qo,REEL_SHAPE_LABELS as Qo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as X,CARD_LIST_STYLE_PICTURES as Zo,TAB_SHAPE_PICTURES as $o}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as A,CARD_STYLE_POINTS as oe,applyCardStyle as ee,isCardStyle as ne}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as te,ClockIcon as re,CropIcon as G,GapIcon as ie,MediaLayoutStackedIcon as Y,LineBetweenIcon as le,LineSolidIcon as ae,ListIcon as se,NumberedListIcon as v,ShadowIcon as de,StylesIcon as j,TableIcon as V,TargetIcon as ce,WrapIcon as J}from"efficient-easel/icons";import{boxBlockSpacingField as _e,boxFillField as pe,boxColumnsFields as Oe,boxShareField as Se,boxSharePhoneField as me,boxShareTabletField as fe,containerDirectionField as Re,containerGapRows as he,linkField as ue,plainText as Ce,swapPadding as z,toggle as c,upload as q,withPanelOnly as Ae}from"../../../controls.js";import{BOX_STACK_LINE as g,BOX_STACK_RANGE as R,STACK_BELOW_PROP as N}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as Q,boxShapeOf as we}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as Ee}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as Z}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as $}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as Te,ACCORDION_PHONE_COLUMN_COUNTS as Ne,BOX_COLUMNS_MAX as P,BOX_COLUMNS_MIN as b,boxPhoneRowOneLine as De,boxWrapWordOf as oo}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as eo}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as no,VIEW_KEY_ACCESS as s,group as h,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Le,boxAlignField as Ie,boxJustifyField as ge,boxWrapField as D,iconPickerRow as k,placementField as Pe,select as F,sidesPaddingFields as to,slider as ro}from"../../../box-fields.js";import{withRowRules as be,withShowWhen as H}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ke}from"../../../separator-field.js";import{LOOP_SCROLLS as Fe}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as He,TICKER_JOIN_OPTIONS as We}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as io}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as lo}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as ye}from"../../../box-side-space-field.js";import{accordionOnSet as Be}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as xe,ACCORDION_ROW_STYLE_PROP as L}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as ao}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as Ue,CONTAINER_BLOCKS_SLOT as Me}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as Ke}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Xe,ON_A_CARD as so,ON_A_PICTURE_OR_CARD as Ge,cardDisplayField as W}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Ye,MIRROR_CARDS_MIRRORS as ve,mirrorCardsField as je}from"../../../mirror-cards-field.js";import{handedRowOf as co}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Ve,showForField as Je,showForFields as ze}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as u,SHARED_COLUMNS_LABEL as _o,SHARED_COLUMNS_OFF as po,sharedColumnsDrawn as Oo,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as qe,SHARED_COLUMNS_POINTS as Qe,sharedRowsDrawn as Ze}from"../../../../../../render/lib/content/box-shared-columns.js";const mo=yo,fo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},$e={field:"direction",is:"tabs"},on={field:"line",in:[!0,!1]},en={field:"anchor",set:!0},y=["fixed","screen","fill"],nn={not:{any:[{field:"sectionHeightMode",in:y},{field:"sectionHeightModeTablet",in:y},{field:"sectionHeightModePhone",in:y}]}},tn={context:"parent.line",is:!0},_={not:{field:"direction",is:"accordion"}},Ro={field:"direction",is:"accordion"},ho={any:[_,{not:{field:L,in:["numbered","chevron"]}},{field:"columns",in:[...Te]},{field:"phoneRow",in:[...Ne]}]},uo="notAccordionRow",rn={not:{context:uo,is:!0}},ln={[uo]:(o,e)=>e.parent?.props?.direction!=="accordion"},B={field:"direction",is:"row",default:"row"},p={not:Fe},O={all:[B,p,{not:{field:"separator",in:eo.map(o=>o.value)}},{not:{field:"line",is:!0}}]},an={field:"direction",is:"column"},Co={all:[O,...["columns",l("columns")].map(o=>({not:{field:o,in:Array.from({length:P},(e,n)=>n+b)}}))]},sn={all:[p,{not:{all:[B,{field:"separator",in:eo.map(o=>o.value)}]}}]},x={not:{all:[O,{field:"columns",in:Array.from({length:P},(o,e)=>e+b)}]}},dn="sharedColumnsFits",Ao="sharedColumnsMisfit",wo="sharedColumnsDraws",Eo="sharedColumnsPhoneDraws";function S(o,e){return Wo(o.props??{},K(e.appState,o.props?.id)?.inCopy!==!1)}const cn={[dn]:(o,e)=>So(S(o,e)),[Ao]:(o,e)=>!So(S(o,e)),[wo]:(o,e)=>Oo(S(o,e)).desktop,[Eo]:(o,e)=>Oo(S(o,e)).phone};function To(o){return{all:[{not:{context:Ao,is:!0}},{any:[so,{field:o,set:!0}]}]}}const m={not:{context:wo,is:!0}},C={not:{context:Eo,is:!0}},No="sharedRowsDraws",_n={[No]:(o,e)=>Ze(S(o,e))&&co(e.appState,o.props?.id)?.row===void 0},w={not:{context:No,is:!0}},pn={any:[m,C]},U=Bo,On={not:{context:ve,is:!0}},Do="rowHanded",Sn={not:{context:Do,is:!0}},mn={[Do]:(o,e)=>{const n=co(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Lo={all:[_,U,m,C,On]},fn={field:"direction",is:"row"},Rn={field:"align",in:["start","center","end"]},hn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function un(){const{darken:o,darkenStyle:e}=zo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Io={not:{all:[O,{field:l("columns"),in:Array.from({length:P},(o,e)=>e+b)}]}};function Cn(){const o=c(no,!1,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:t=>n.onChange(t===void 0?void 0:t?"wrap":"nowrap")})}}function An(){const o=c(no,!0,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>{const t=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!De(void 0,t?n.follows:void 0),followsNoView:!t,onChange:f=>n.onChange(f===void 0?void 0:f?"wrap":"nowrap")})}}}const go={hint:g},Po={all:[U,{any:[an,{all:[O,Io,{not:{all:[Co,{field:l("share"),set:!0}]}}]}]}]},wn=H(a("desktop",ro("Narrows below",r(Y,{}),R.min,R.max,R.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),Po);function En(o,e){const n=o;return!(N in n)||e.direction!=="column"?o:{...n,[N]:wn}}const Rt={fields:be({_gContent:h("Content"),rowTitle:ao.rowTitle,content:ao.content,_gCardDisplay:h("Display"),cardDisplay:W("desktop"),cardDisplayTablet:W("tablet"),cardDisplayPhone:W("mobile"),showFor:Je(),_gLayout:h("Layout"),direction:Re("Flex"),tabShape:k("Tab shape",r(j,{}),qo.map(o=>({label:Qo[o],value:o,picture:$o[o]})),"tabs",{columns:2,cell:X}),mirrorCards:je(),[N]:a("desktop",ro("Stacks below",r(Y,{}),R.min,R.max,R.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[lo]:ye(),startsOpen:a("desktop",c("Starts open",!1,r(te,{}))),[L]:a("desktop",k("Row style",r(v,{}),xe.map(o=>({...o,picture:o.value==="numbered"?r(v,{}):r(se,{})})),"plain",{columns:2})),label:Ae(Ce("Tab name")),...he("Flex"),...d("justify",ge(),s),...d("align",Ie(),s),...(()=>{const o=d("wrap",D(),s,{phoneRow:An()}),e=d("wrap",D(),s,{phoneRow:Cn()});return{wrap:e.wrap,[l("wrap")]:e[l("wrap")],[i("wrap")]:o[i("wrap")]}})(),[i("order")]:Ke(),...d("boxShape",$("Box shape",r(G,{}),Z(Q),"shape","auto"),s,{phoneRow:$("Box shape",r(G,{}),Z(Q),"shape","auto",{phoneRest:o=>we(o)})}),[Ee]:a("desktop",Le(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:ke(r(le,{size:18}),"none"),[A]:a("desktop",k("Card style",r(j,{}),oe.map(o=>({...o,picture:Zo[o.value]})),"table",{columns:2,cell:X})),share:a("desktop",Se()),[l("share")]:fe(),[i("share")]:me(),[u]:a("desktop",F(_o,r(V,{}),[...Qe],po)),[i(u)]:a("mobile",F(_o,r(V,{}),[...qe],po)),...Oe(),...d("blockSpacing",_e(),s),line:c("Line",!1,r(ae,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,r(re,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:F("Join",r(ie,{}),We,He),_gShadow:h("Shadow"),...d("shadow",c("Shadow",!1,r(de,{})),s),...d("fillColor",pe(),s),[Ho]:M("Fill content","colour"),[Fo]:ko("fillColor"),_gBackground:h("Background image"),bgImage:a("desktop",q("Image","image/*")),bgImagePhone:a("mobile",q("Image","image/*")),[xo]:M("Image content","image",{content:!0}),...un(),placement:Pe("Content position"),_gLink:h("Link"),link:Xo(ue("Link to")),[Go]:Ko(),jumpHighlight:c("Highlight when a link jumps here",!1,r(ce,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],mo],[[i("share")],{all:[fo,C]}],[[u],To(u)],[[i(u)],To(i(u))],[[i("wrap")],{all:[fo,p,C,w]}],[[i("order")],{all:[O,C,m]}],[["phoneRow"],C],[[L],{all:[Ro,{not:{field:L,is:"chevron"}}]}],[["tabShape"],$e],[["rowTitle","startsOpen"],rn],[["align","blockSpacing",l("blockSpacing"),i("blockSpacing")],_],[[l("justify"),i("justify")],{all:[p,Lo,w]}],[[l("align"),i("align")],{all:[fn,Rn,Lo]}],[[l("wrap")],{all:[p,x,Io,m,_,w]}],[[l("shadow"),i("shadow")],U],[[l("darken"),i("darken"),l("darkenStyle"),i("darkenStyle")],{all:[mo,hn]}],[["separator"],B],[[A],{field:A,set:!0}],[["columns"],{any:[O,Ro]}],[[l("columns")],O],[[N],Po],[[l("gap")],{all:[sn,ho]}],[["gap",i("gap")],ho],[["justify"],{all:[p,pn,_,w]}],[["wrap"],{all:[p,x,m,_,w]}],[["share"],{all:[x,m,_]}],[[l("share")],{all:[Co,m]}],[["line"],on],[["upcoming"],tn],[["jumpHighlight"],en],[["boxShape",l("boxShape"),i("boxShape")],nn],[["direction","share",i("order")],Sn],[["join"],io],[[lo],io]]),resolveData:(o,e)=>{const n=o.props,t=n[A];return e.changed?.[A]===!0&&ne(t)?{...o,props:ee(n,t,Ue,Me)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Be(n)}:o},resolveFields:(o,e)=>{const n=K(e.appState,o.props?.id)?.inCopy===!0,t=n&&Yo(e.appState,o.props?.id)===null;return En(Dn(Ln(ze(In(o,{...e,fields:Mo(e.fields,o,e)}),o.props),S(o,e),n),t),o.props)},showWhenFacts:{...Uo,...Xe,...Ye,...mn,...cn,..._n,...Ve,...ln}},Tn=H(Vo,so),Nn=["darken","darkenStyle",jo,vo];function Dn(o,e){if(!e)return o;const n={...o};for(const t of Nn){if(!(t in n))continue;const{showWhen:f,...bo}=n[t];n[t]=bo}return n}function Ln(o,e,n=!1){const t=o;return T in t&&I(e)&&n?{...t,[T]:H(Jo,Ge)}:!(T in t)||I(e)?o:{...t,[T]:Tn}}function In(...[o,e]){const{fields:n}=e;{if(I(S(o,e))){const f=to({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return z(n,f)}return o.props.padV2!==!0?z(n,to({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{Rt as FlexFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{phoneKey as i,tabletKey as l}from"efficient-easel/draw";import{keptByRow as ko}from"efficient-easel/screen/lib/document/style-fields";import{BOX_CARD_PAD as E,BOX_FILL_FADE_PROP as Fo,BOX_SWATCH_PROP as Ho,boxCardProps as Wo,boxIsCard as I}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as yo,BOX_IS_NOT_CARD_RULE as Bo,BOX_ROW_IMAGE_PROP as xo}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Uo,cardRowField as M,cardRowFields as Mo,cardRowLinkField as Ko,typedLinkField as Xo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Go,cardCopyPlace as K,cardTemplateCardOwner as Yo}from"../../../../../../format/lib/content/card-template.js";import{BOX_SHOW_KEY as vo,HOVER_GROUP_KEY as jo,HOVER_KEY as T}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as Vo,BOX_NEXT_PICTURE_ROW as Jo}from"../../../../animation/hover-fields.js";import{darkenFields as zo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as qo,REEL_SHAPE_LABELS as Qo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as X,CARD_LIST_STYLE_PICTURES as Zo,TAB_SHAPE_PICTURES as $o}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as A,CARD_STYLE_POINTS as oe,applyCardStyle as ee,isCardStyle as ne}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as te,ClockIcon as re,CropIcon as G,GapIcon as ie,MediaLayoutStackedIcon as Y,LineBetweenIcon as le,LineSolidIcon as ae,ListIcon as se,NumberedListIcon as v,ShadowIcon as de,StylesIcon as j,TableIcon as V,TargetIcon as ce,WrapIcon as J}from"efficient-easel/icons";import{boxBlockSpacingField as _e,boxFillField as pe,boxColumnsFields as Oe,boxShareField as Se,boxSharePhoneField as me,boxShareTabletField as fe,containerDirectionField as Re,containerGapRows as he,linkField as ue,plainText as Ce,swapPadding as z,toggle as c,upload as q,withPanelOnly as Ae}from"../../../controls.js";import{BOX_STACK_LINE as g,BOX_STACK_RANGE as h,STACK_BELOW_PROP as N}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as Q,boxShapeOf as we}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as Ee}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as Z}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as $}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as Te,ACCORDION_PHONE_COLUMN_COUNTS as Ne,BOX_COLUMNS_MAX as P,BOX_COLUMNS_MIN as b,boxPhoneRowOneLine as De,boxWrapWordOf as oo}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as eo}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as no,VIEW_KEY_ACCESS as s,group as _,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Le,boxAlignField as Ie,boxJustifyField as ge,boxWrapField as D,iconPickerRow as k,placementField as Pe,select as F,sidesPaddingFields as to,slider as ro}from"../../../box-fields.js";import{withRowRules as be,withShowWhen as H}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ke}from"../../../separator-field.js";import{LOOP_SCROLLS as Fe}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as He,TICKER_JOIN_OPTIONS as We}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as io}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as lo}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as ye}from"../../../box-side-space-field.js";import{accordionOnSet as Be}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as xe,ACCORDION_ROW_STYLE_PROP as L}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as ao}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as Ue,CONTAINER_BLOCKS_SLOT as Me}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as Ke}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Xe,ON_A_CARD as so,ON_A_PICTURE_OR_CARD as Ge,cardDisplayField as W}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Ye,MIRROR_CARDS_MIRRORS as ve,mirrorCardsField as je}from"../../../mirror-cards-field.js";import{handedRowOf as co}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Ve,showForField as Je,showForFields as ze}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as u,SHARED_COLUMNS_LABEL as _o,SHARED_COLUMNS_OFF as po,sharedColumnsDrawn as Oo,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as qe,SHARED_COLUMNS_POINTS as Qe,sharedRowsDrawn as Ze}from"../../../../../../render/lib/content/box-shared-columns.js";const mo=yo,fo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},$e={field:"direction",is:"tabs"},on={field:"line",in:[!0,!1]},en={field:"anchor",set:!0},y=["fixed","screen","fill"],nn={not:{any:[{field:"sectionHeightMode",in:y},{field:"sectionHeightModeTablet",in:y},{field:"sectionHeightModePhone",in:y}]}},tn={context:"parent.line",is:!0},p={not:{field:"direction",is:"accordion"}},Ro={field:"direction",is:"accordion"},ho={any:[p,{not:{field:L,in:["numbered","chevron"]}},{field:"columns",in:[...Te]},{field:"phoneRow",in:[...Ne]}]},uo="notAccordionRow",rn={not:{context:uo,is:!0}},ln={[uo]:(o,e)=>e.parent?.props?.direction!=="accordion"},B={field:"direction",is:"row",default:"row"},O={not:Fe},S={all:[B,O,{not:{field:"separator",in:eo.map(o=>o.value)}},{not:{field:"line",is:!0}}]},an={field:"direction",is:"column"},Co={all:[S,...["columns",l("columns")].map(o=>({not:{field:o,in:Array.from({length:P},(e,n)=>n+b)}}))]},sn={all:[O,{not:{all:[B,{field:"separator",in:eo.map(o=>o.value)}]}}]},x={not:{all:[S,{field:"columns",in:Array.from({length:P},(o,e)=>e+b)}]}},dn="sharedColumnsFits",Ao="sharedColumnsMisfit",wo="sharedColumnsDraws",Eo="sharedColumnsPhoneDraws";function m(o,e){return Wo(o.props??{},K(e.appState,o.props?.id)?.inCopy!==!1)}const cn={[dn]:(o,e)=>So(m(o,e)),[Ao]:(o,e)=>!So(m(o,e)),[wo]:(o,e)=>Oo(m(o,e)).desktop,[Eo]:(o,e)=>Oo(m(o,e)).phone};function To(o){return{all:[{not:{context:Ao,is:!0}},{any:[so,{field:o,set:!0}]}]}}const f={not:{context:wo,is:!0}},C={not:{context:Eo,is:!0}},No="sharedRowsDraws",_n={[No]:(o,e)=>Ze(m(o,e))&&co(e.appState,o.props?.id)?.row===void 0},w={not:{context:No,is:!0}},pn={any:[f,C]},U=Bo,On={not:{context:ve,is:!0}},Do="rowHanded",Sn={not:{context:Do,is:!0}},mn={[Do]:(o,e)=>{const n=co(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Lo={all:[p,U,f,C,On]},fn={field:"direction",is:"row"},Rn={field:"align",in:["start","center","end"]},hn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function un(){const{darken:o,darkenStyle:e}=zo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Io={not:{all:[S,{field:l("columns"),in:Array.from({length:P},(o,e)=>e+b)}]}};function Cn(){const o=c(no,!1,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:t=>n.onChange(t===void 0?void 0:t?"wrap":"nowrap")})}}function An(){const o=c(no,!0,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>{const t=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!De(void 0,t?n.follows:void 0),followsNoView:!t,onChange:R=>n.onChange(R===void 0?void 0:R?"wrap":"nowrap")})}}}const go={hint:g},Po={all:[U,{any:[an,{all:[S,Io,{not:{all:[Co,{field:l("share"),set:!0}]}}]}]}]},wn=H(a("desktop",ro("Narrows below",r(Y,{}),h.min,h.max,h.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),Po);function En(o,e){const n=o;return!(N in n)||e.direction!=="column"?o:{...n,[N]:wn}}const Rt={fields:be({_gContent:_("Content"),rowTitle:ao.rowTitle,content:ao.content,_gCardDisplay:_("Display"),cardDisplay:W("desktop"),cardDisplayTablet:W("tablet"),cardDisplayPhone:W("mobile"),showFor:Je(),_gLayout:_("Layout"),direction:Re("Flex"),tabShape:k("Tab shape",r(j,{}),qo.map(o=>({label:Qo[o],value:o,picture:$o[o]})),"tabs",{columns:2,cell:X}),mirrorCards:je(),[N]:a("desktop",ro("Stacks below",r(Y,{}),h.min,h.max,h.step,g,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[lo]:ye(),startsOpen:a("desktop",c("Starts open",!1,r(te,{}))),[L]:a("desktop",k("Row style",r(v,{}),xe.map(o=>({...o,picture:o.value==="numbered"?r(v,{}):r(se,{})})),"plain",{columns:2})),label:Ae(Ce("Tab name")),...he("Flex"),...d("justify",ge(),s),...d("align",Ie(),s),...(()=>{const o=d("wrap",D(),s,{phoneRow:An()}),e=d("wrap",D(),s,{phoneRow:Cn()});return{wrap:e.wrap,[l("wrap")]:e[l("wrap")],[i("wrap")]:o[i("wrap")]}})(),[i("order")]:Ke(),...d("boxShape",$("Box shape",r(G,{}),Z(Q),"shape","auto"),s,{phoneRow:$("Box shape",r(G,{}),Z(Q),"shape","auto",{phoneRest:o=>we(o)})}),[Ee]:a("desktop",Le(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:ke(r(le,{size:18}),"none"),[A]:a("desktop",k("Card style",r(j,{}),oe.map(o=>({...o,picture:Zo[o.value]})),"table",{columns:2,cell:X})),share:a("desktop",Se()),[l("share")]:fe(),[i("share")]:me(),[u]:a("desktop",F(_o,r(V,{}),[...Qe],po)),[i(u)]:a("mobile",F(_o,r(V,{}),[...qe],po)),...Oe(),...d("blockSpacing",_e(),s),line:c("Line",!1,r(ae,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,r(re,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:F("Join",r(ie,{}),We,He),_gShadow:_("Shadow"),...d("shadow",c("Shadow",!1,r(de,{})),s),...d("fillColor",pe(),s),[Ho]:M("Fill content","colour"),[Fo]:ko("fillColor"),_gBackground:_("Background image"),bgImage:a("desktop",q("Image","image/*")),bgImagePhone:a("mobile",q("Image","image/*")),[xo]:M("Image content","image",{content:!0}),...un(),placement:Pe("Content position"),_gLink:_("Link"),link:Xo(ue("Link to")),[Go]:Ko(),_gJump:_("Anchor"),jumpHighlight:c("Highlight when a link jumps here",!1,r(ce,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],mo],[[i("share")],{all:[fo,C]}],[[u],To(u)],[[i(u)],To(i(u))],[[i("wrap")],{all:[fo,O,C,w]}],[[i("order")],{all:[S,C,f]}],[["phoneRow"],C],[[L],{all:[Ro,{not:{field:L,is:"chevron"}}]}],[["tabShape"],$e],[["rowTitle","startsOpen"],rn],[["align","blockSpacing",l("blockSpacing"),i("blockSpacing")],p],[[l("justify"),i("justify")],{all:[O,Lo,w]}],[[l("align"),i("align")],{all:[fn,Rn,Lo]}],[[l("wrap")],{all:[O,x,Io,f,p,w]}],[[l("shadow"),i("shadow")],U],[[l("darken"),i("darken"),l("darkenStyle"),i("darkenStyle")],{all:[mo,hn]}],[["separator"],B],[[A],{field:A,set:!0}],[["columns"],{any:[S,Ro]}],[[l("columns")],S],[[N],Po],[[l("gap")],{all:[sn,ho]}],[["gap",i("gap")],ho],[["justify"],{all:[O,pn,p,w]}],[["wrap"],{all:[O,x,f,p,w]}],[["share"],{all:[x,f,p]}],[[l("share")],{all:[Co,f]}],[["line"],on],[["upcoming"],tn],[["jumpHighlight"],en],[["boxShape",l("boxShape"),i("boxShape")],nn],[["direction","share",i("order")],Sn],[["join"],io],[[lo],io]]),resolveData:(o,e)=>{const n=o.props,t=n[A];return e.changed?.[A]===!0&&ne(t)?{...o,props:ee(n,t,Ue,Me)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Be(n)}:o},resolveFields:(o,e)=>{const n=K(e.appState,o.props?.id)?.inCopy===!0,t=n&&Yo(e.appState,o.props?.id)===null;return En(Dn(Ln(ze(In(o,{...e,fields:Mo(e.fields,o,e)}),o.props),m(o,e),n),t),o.props)},showWhenFacts:{...Uo,...Xe,...Ye,...mn,...cn,..._n,...Ve,...ln}},Tn=H(Vo,so),Nn=["darken","darkenStyle",jo,vo];function Dn(o,e){if(!e)return o;const n={...o};for(const t of Nn){if(!(t in n))continue;const{showWhen:R,...bo}=n[t];n[t]=bo}return n}function Ln(o,e,n=!1){const t=o;return T in t&&I(e)&&n?{...t,[T]:H(Jo,Ge)}:!(T in t)||I(e)?o:{...t,[T]:Tn}}function In(...[o,e]){const{fields:n}=e;{if(I(m(o,e))){const R=to({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return z(n,R)}return o.props.padV2!==!0?z(n,to({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{Rt as FlexFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{ImageIcon as _,ImagesIcon as c,MediaIcon as b,MediaLayoutSideBySideIcon as f,MediaLayoutStackedIcon as E,OpacityIcon as m}from"efficient-easel/icons";import{colorInput as n,focusKeptField as a,MEDIA_TYPE_OPTIONS as P,upload as i}from"../../../controls.js";import{group as t,phoneTwinFields as S}from"efficient-easel/screen/lib/document/box-fields";import{segmented as l,slider as r}from"../../../box-fields.js";import{MEDIA_LAYOUT_DEFAULT as g,MEDIA_LAYOUT_LABELS as p,MEDIA_LAYOUTS as y,resolvePhoneLayout as v}from"../../../../../../format/lib/hero-media-layout.js";import{deviceNote as h}from"efficient-easel/screen/lib/document/device-fields";import{HERO_OVERLAY_ROWS as u,HERO_VIDEO_ROWS as d,heroHeightFields as U}from"../../hero-shared-fields.js";import{slotNoticeField as A}from"../../shared-fields.js";import{forMediaType as s,heroMediaFields as D,VIDEO_FILE_LABEL as M,VIDEO_FILE_PROMPT as k}from"../../../../../../render/lib/document/hero-media-parts.js";import{VIDEO_SOURCE_DEFAULT as F}from"../../../../../../format/lib/hero-video.js";const I=s("video","image"),L=s("image","image"),T={one:o(_,{}),side:o(f,{}),stacked:o(E,{})};import{HeroSingleSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{DEFAULT_TINT as O}from"../../../../../../format/lib/content/tint.js";const z={fields:D({_dDevice:h(),boxNotice:A("HeroSingle"),boxes:C.boxes,_gStyle:t("Style"),overlay:r("Overlay",o(m,{}),0,100,5,100,"%"),overlayColor:u.overlayColor,overlayPosition:u.overlayPosition,_gLayout:t("Layout"),...U({tabletNumber:!1}),_gMedia:t("Media"),mediaType:l("Type",o(b,{}),P,"image"),mediaLayout:l("Layout",o(c,{}),y.map(e=>({label:p[e],value:e,picture:T[e]})),g),mediaLayoutPhone:S("mediaLayout",l("Layout",o(c,{}),y.map(e=>({label:p[e],value:e,picture:T[e]})),g,{phoneRest:e=>v(void 0,e)})).mediaLayoutPhone,mediaImage:i("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:a(),imageFocalTablet:a(),imageFocalPhone:a(),videoSource:d.videoSource,mediaVideo:i(M,"video/*",k),youtubeUrl:d.youtubeUrl,videoPlayback:d.videoPlayback,poster:i("Video poster","image/*","Upload a poster still"),_gTint:t("Image tint"),tintColor:n("Tint color",O),tintOpacity:r("Tint opacity",o(m,{}),0,100,5,0,"%"),mediaImage2:i("Background image","image/*","Upload a background image",{focus:"imageFocal2"}),imageFocal2:a(),imageFocal2Tablet:a(),imageFocal2Phone:a(),tintColor2:n("Tint color",O),tintOpacity2:r("Tint opacity",o(m,{}),0,100,5,0,"%")},{parts:{media:["mediaType","mediaLayout","mediaLayoutPhone","videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:["mediaImage","imageFocal","imageFocalTablet","imageFocalPhone","tintColor","tintOpacity"],image2:["mediaImage2","imageFocal2","imageFocal2Tablet","imageFocal2Phone","tintColor2","tintOpacity2"]},onlyFor:{image:["mediaImage","imageFocal","imageFocalTablet","imageFocalPhone","_gTint","tintColor","tintOpacity","mediaImage2","imageFocal2","imageFocal2Tablet","imageFocal2Phone","tintColor2","tintOpacity2"],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[I,{field:"videoSource",is:"upload",default:F}]},youtubeUrl:{all:[I,{field:"videoSource",is:"youtube",default:F}]},mediaLayout:{all:[L,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[L,{context:"device",is:"mobile"}]}},fallback:"image"})};export{z as HeroSingleFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{MediaIcon as O,OpacityIcon as s}from"efficient-easel/icons";import{MEDIA_TYPE_OPTIONS as u,upload as t}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{segmented as n,slider as p}from"../../../box-fields.js";import{deviceNote as S}from"efficient-easel/screen/lib/document/device-fields";import{HERO_IMAGE2_ROWS as c,HERO_IMAGE_ROWS as g,heroTintColorRow as v,HERO_LAYOUT_ROWS as a,HERO_IMAGE2_KEYS as l,HERO_IMAGE_KEYS as R,HERO_LAYOUT_KEYS as f,heroLayoutRules as I,heroTintRow as H,HERO_OVERLAY_ROWS as d,HERO_VIDEO_ROWS as i,heroHeightFields as L}from"../../hero-shared-fields.js";import{slotNoticeField as T}from"../../shared-fields.js";import{mediaTypeShownWhen as m,heroMediaFields as b,VIDEO_FILE_LABEL as A,VIDEO_FILE_PROMPT as P}from"../../../../../../render/lib/document/hero-media-parts.js";import{HERO_ABSENT_MEDIA_TYPE as e}from"../../../../../../format/lib/hero-media-layout.js";import{VIDEO_SOURCE_DEFAULT as _}from"../../../../../../format/lib/hero-video.js";const E=m("video",e.HeroSingle),M=m("image",e.HeroSingle);import{HeroSingleSlots as h}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";const y=[...R,"tintColor","tintOpacity"],K={fields:b({_dDevice:S(),boxNotice:T("HeroSingle"),boxes:h.boxes,_gStyle:o("Style"),overlay:p("Overlay",r(s,{}),0,100,5,100,"%"),overlayColor:d.overlayColor,overlayPosition:d.overlayPosition,_gLayout:o("Layout"),...L({tabletNumber:!1}),_gMedia:o("Media"),mediaType:n("Type",r(O,{}),u,e.HeroSingle),mediaLayout:a.mediaLayout,mediaLayoutPhone:a.mediaLayoutPhone,...g,videoSource:i.videoSource,mediaVideo:t(A,"video/*",P),youtubeUrl:i.youtubeUrl,videoPlayback:i.videoPlayback,poster:t("Video poster","image/*","Upload a poster still"),_gTint:o("Image tint"),tintColor:v(),tintOpacity:H(),...c},{parts:{media:["mediaType",...f,"videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:y,image2:l},onlyFor:{image:[...y,"_gTint",...l],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[E,{field:"videoSource",is:"upload",default:_}]},youtubeUrl:{all:[E,{field:"videoSource",is:"youtube",default:_}]},...I(M)},fallback:e.HeroSingle})};export{K as HeroSingleFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{BlockVideoIcon as g,ClockIcon as I,ImageIcon as _,MediaIcon as P,OpacityIcon as S,PlayIcon as y}from"efficient-easel/icons";import{colorInput as F,focusKeptField as l,loadingShowsField as E,MEDIA_TYPE_OPTIONS as O,plainText as T,text as h,upload as e,withIdentifier as b,withPanelOnly as t}from"../../../controls.js";import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{segmented as V,slider as n}from"../../../box-fields.js";import{LOADING_SHOWS_IMAGE as p,VIDEO_PLAYBACK_DEFAULT as A,VIDEO_SOURCE_DEFAULT as i}from"../../../../../../format/lib/hero-video.js";import{HERO_SLIDE_OVERLAY_ROWS as v,HERO_VIDEO_ROWS as m}from"../../hero-shared-fields.js";import{PH as L}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as k}from"../../shared-fields.js";import{AV1_FILE_LABEL as c,AV1_FILE_PROMPT as s,forMediaType as D,heroMediaFields as C,VIDEO_FILE_LABEL as u,VIDEO_FILE_PROMPT as f}from"../../../../../../render/lib/document/hero-media-parts.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{DEFAULT_TINT as M}from"../../../../../../format/lib/content/tint.js";import{HeroSlideSlots as R}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const d=D("video","video"),J={fields:C({_gContent:r("Content"),name:t(b(T("Slide name",L.slideName))),process:t(h("Reel label","Label")),groupNotice:k("HeroSlide"),groups:R.groups,_gMedia:r("Media"),mediaType:V("Type",o(P,{}),O,"video"),videoSource:m.videoSource,mediaVideo:a("desktop",e(u,"video/*",f,{frame:"videoFrame"})),mediaVideoPhone:a("mobile",e(u,"video/*",f,{frame:"videoFramePhone"})),videoFramePhone:l(),mediaVideoAv1:a("desktop",e(c,"video/mp4",s)),mediaVideoAv1Phone:a("mobile",e(c,"video/mp4",s)),youtubeUrl:m.youtubeUrl,videoPlayback:m.videoPlayback,videoSpeed:n("Playback speed",o(y,{}),25,100,5,100,"%"),loadingShows:E("Show while loading",o(I,{}),{frame:o(g,{}),image:o(_,{})}),videoFrame:l(),mediaImage:e("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:l(),imageFocalTablet:l(),imageFocalPhone:l(),poster:a("desktop",e("Image","image/*","Choose an image")),posterPhone:a("mobile",e("Image","image/*","Choose an image")),_gTint:r("Image tint"),tintColor:F("Tint color",M),overlay:n("Tint",o(S,{}),0,100,5,0,"%"),_gOverlay:r("Overlay"),overlayColor:v.overlayColor,overlayPosition:v.overlayPosition},{onlyFor:{image:["mediaImage","imageFocal","imageFocalTablet","imageFocalPhone","_gTint","tintColor","overlay"],video:["videoSource","videoPlayback","loadingShows","videoFrame"]},fallback:"video",rules:{mediaVideo:{all:[d,{field:"videoSource",is:"upload",default:i}]},mediaVideoPhone:{all:[d,{field:"videoSource",is:"upload",default:i}]},mediaVideoAv1:{all:[d,{field:"videoSource",is:"upload",default:i}]},mediaVideoAv1Phone:{all:[d,{field:"videoSource",is:"upload",default:i}]},youtubeUrl:{all:[d,{field:"videoSource",is:"youtube",default:i}]},videoSpeed:{all:[d,{field:"videoSource",is:"upload",default:i},{field:"videoPlayback",is:"background",default:A}]},poster:{all:[{field:"mediaType",is:"video",default:"video"},p]},posterPhone:{all:[{field:"mediaType",is:"video",default:"video"},p]}}})};export{J as HeroSlideFields};
1
+ import{jsx as a}from"react/jsx-runtime";import{BlockVideoIcon as P,ClockIcon as I,ImageIcon as y,MediaIcon as h,PlayIcon as g}from"efficient-easel/icons";import{focusKeptField as t,loadingShowsField as A,MEDIA_TYPE_OPTIONS as L,plainText as R,text as V,upload as o,withIdentifier as F,withPanelOnly as n}from"../../../controls.js";import{group as l}from"efficient-easel/screen/lib/document/box-fields";import{segmented as T,slider as b}from"../../../box-fields.js";import{LOADING_SHOWS_IMAGE as s,VIDEO_PLAYBACK_DEFAULT as H,VIDEO_SOURCE_DEFAULT as i}from"../../../../../../format/lib/hero-video.js";import{HERO_IMAGE2_ROWS as M,HERO_IMAGE_ROWS as k,heroTintColorRow as C,HERO_LAYOUT_ROWS as p,HERO_IMAGE2_KEYS as u,HERO_IMAGE_KEYS as D,HERO_LAYOUT_KEYS as w,heroLayoutRules as Y,heroTintRow as U,HERO_SLIDE_OVERLAY_ROWS as v,HERO_VIDEO_ROWS as m}from"../../hero-shared-fields.js";import{PH as G}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as N}from"../../shared-fields.js";import{AV1_FILE_LABEL as _,AV1_FILE_PROMPT as S,mediaTypeShownWhen as E,heroMediaFields as W,VIDEO_FILE_LABEL as O,VIDEO_FILE_PROMPT as c}from"../../../../../../render/lib/document/hero-media-parts.js";import{HERO_ABSENT_MEDIA_TYPE as r}from"../../../../../../format/lib/hero-media-layout.js";import{deviceField as d}from"efficient-easel/screen/lib/document/device-fields";import{HeroSlideSlots as x}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const e=E("video",r.HeroSlide),B=E("image",r.HeroSlide),f=[...D,"tintColor","overlay"],ae={fields:W({_gContent:l("Content"),name:n(F(R("Slide name",G.slideName))),process:n(V("Reel label","Label")),groupNotice:N("HeroSlide"),groups:x.groups,_gMedia:l("Media"),mediaType:T("Type",a(h,{}),L,r.HeroSlide),mediaLayout:p.mediaLayout,mediaLayoutPhone:p.mediaLayoutPhone,videoSource:m.videoSource,mediaVideo:d("desktop",o(O,"video/*",c,{frame:"videoFrame"})),mediaVideoPhone:d("mobile",o(O,"video/*",c,{frame:"videoFramePhone"})),videoFramePhone:t(),mediaVideoAv1:d("desktop",o(_,"video/mp4",S)),mediaVideoAv1Phone:d("mobile",o(_,"video/mp4",S)),youtubeUrl:m.youtubeUrl,videoPlayback:m.videoPlayback,videoSpeed:b("Playback speed",a(g,{}),25,100,5,100,"%"),loadingShows:A("Show while loading",a(I,{}),{frame:a(P,{}),image:a(y,{})}),videoFrame:t(),...k,poster:d("desktop",o("Image","image/*","Choose an image")),posterPhone:d("mobile",o("Image","image/*","Choose an image")),_gTint:l("Image tint"),tintColor:C(),overlay:U(),...M,_gOverlay:l("Overlay"),overlayColor:v.overlayColor,overlayPosition:v.overlayPosition},{parts:{media:["mediaType",...w,"videoSource","mediaVideo","mediaVideoPhone","videoFramePhone","mediaVideoAv1","mediaVideoAv1Phone","youtubeUrl","videoPlayback","videoSpeed","loadingShows","videoFrame","poster","posterPhone"],image:f,image2:u},onlyFor:{image:[...f,"_gTint",...u],video:["videoSource","videoPlayback","loadingShows","videoFrame"]},fallback:r.HeroSlide,rules:{mediaVideo:{all:[e,{field:"videoSource",is:"upload",default:i}]},mediaVideoPhone:{all:[e,{field:"videoSource",is:"upload",default:i}]},mediaVideoAv1:{all:[e,{field:"videoSource",is:"upload",default:i}]},mediaVideoAv1Phone:{all:[e,{field:"videoSource",is:"upload",default:i}]},youtubeUrl:{all:[e,{field:"videoSource",is:"youtube",default:i}]},videoSpeed:{all:[e,{field:"videoSource",is:"upload",default:i},{field:"videoPlayback",is:"background",default:H}]},...Y(B),poster:{all:[e,s]},posterPhone:{all:[e,s]}}})};export{ae as HeroSlideFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{ColumnWidthsIcon as T,ColumnsIcon as E,LayoutIcon as P,MediaLayoutStackedIcon as O,PlacementIcon as b}from"efficient-easel/icons";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{cardImageFields as I,text as s,textarea as R}from"../../../controls.js";import{group as n,section as m}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as h,segmented as i,slider as C}from"../../../box-fields.js";import{IMAGE_TEXT_ARRANGEMENT_PICTURES as A,LAYOUT_CELL as L}from"../../../choice-pictures.js";import{BLOCK_SOURCE_EDIT_PROP as x,blockSourceEditField as N,blockSourceField as w,blockSourceFields as v}from"../../../block-source-fields.js";import{declaredBlockSource as a}from"../../../../../../format/lib/content/block-sources.js";import{ARRANGEMENT_OPTIONS as F,IMAGE_WIDTH_OPTIONS as D,PHONE_ORDER_OPTIONS as G}from"../../../../../../format/lib/content/image-text-rows.js";import{PROCESS_STEPS_TYPE as c,imageTextRowTemplate as H}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/row-seed.js";import{CARD_TEMPLATE_SLOT as l}from"../../../../../../format/lib/content/card-row-keys.js";import{SPLITTABLE_SECTIONS as M,headFieldsForPlacement as W}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as k}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";import{isNodeList as p}from"efficient-easel/data";import{seedNodeId as B}from"../../../../../../format/lib/document/seed-parts.js";import{PROCESS_PH as u,ProcessStepsSlots as d}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const S={field:"arrangement",in:["rows-left","rows-right"]},_="drawsLegacySteps",f={not:{context:_,is:!0}},Y={[_]:e=>{const o=e.props??{};return!a(o)&&!p(o.boxes)}},U=e=>e?.data?.root?.props??null,me={fields:y({_gSource:n("Source"),dataSource:w("Item content","Manual"),[x]:N(),_sHeader:m("Header"),_gContent:n("Content"),num:s("Number",u.num),title:s("Heading",u.title),description:R("Body",k.body),boxes:d.boxes,[l]:d[l],_dDesign:m("Design"),arrangement:h("Arrangement",r(P,{}),F.map(e=>({label:e.label,hint:e.hint,value:e.value,picture:A[e.value]})),"columns",{columns:3,cell:L}),imageWidth:i("Image width",r(T,{}),D.map(e=>({label:e.label,value:e.value})),"half"),phoneOrder:g("mobile",i("Order",r(O,{}),G.map(e=>({label:e.label,value:e.value})),"picture")),columns:C("Columns",r(E,{}),2,4,1,3),...I(),cardText:i("Text position",r(b,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below")},[[["cardText"],{not:{field:"boxes",set:!0}}],[["arrangement"],f],[["imageWidth","phoneOrder"],{all:[S,f]}],[["columns"],{not:S}]]),showWhenFacts:Y,resolveFields:(e,o)=>v(c,W(o.fields,e.props.headPlacement,M.ProcessSteps.headRows),e.props,{root:U(o.appState)}),resolveData:(e,o)=>{const t=e.props;return o?.changed?.dataSource!==!0||!a(t)||p(t[l])?e:{...e,props:{...t,[l]:H(B(t,c))}}}};export{me as ProcessStepsFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{ColumnWidthsIcon as E,ColumnsIcon as T,LayoutIcon as P,MediaLayoutStackedIcon as O,PlacementIcon as I}from"efficient-easel/icons";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{cardImageFields as g,text as s,textarea as R}from"../../../controls.js";import{group as m,section as n}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as h}from"efficient-easel/screen/lib/document/field-buckets";import{iconPickerRow as C,segmented as i,slider as A}from"../../../box-fields.js";import{IMAGE_TEXT_ARRANGEMENT_PICTURES as L,LAYOUT_CELL as N}from"../../../choice-pictures.js";import{BLOCK_SOURCE_EDIT_PROP as x,blockSourceEditField as w,blockSourceField as v,blockSourceFields as F}from"../../../block-source-fields.js";import{declaredBlockSource as a}from"../../../../../../format/lib/content/block-sources.js";import{ARRANGEMENT_OPTIONS as D,IMAGE_WIDTH_OPTIONS as G,PHONE_ORDER_OPTIONS as H}from"../../../../../../format/lib/content/image-text-rows.js";import{PROCESS_STEPS_TYPE as c,imageTextRowTemplate as M}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/row-seed.js";import{CARD_TEMPLATE_SLOT as l}from"../../../../../../format/lib/content/card-row-keys.js";import{SPLITTABLE_SECTIONS as W,headFieldsForPlacement as k}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as Y}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";import{isNodeList as p}from"efficient-easel/data";import{seedNodeId as B}from"../../../../../../format/lib/document/seed-parts.js";import{PROCESS_PH as u,ProcessStepsSlots as d}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const S={field:"arrangement",in:["rows-left","rows-right"]},_="drawsLegacySteps",f={not:{context:_,is:!0}},U={[_]:e=>{const o=e.props??{};return!a(o)&&!p(o.boxes)}},j=e=>e?.data?.root?.props??null,ce={fields:y({_gSource:m("Source"),dataSource:v("Item content","Manual"),[x]:w(),_sHeader:n("Header"),_gContent:m("Content"),num:s("Number",u.num),title:s("Heading",u.title),description:R("Body",Y.body),boxes:d.boxes,[l]:d[l],[h.Design]:n("Design"),arrangement:C("Arrangement",r(P,{}),D.map(e=>({label:e.label,hint:e.hint,value:e.value,picture:L[e.value]})),"columns",{columns:3,cell:N}),imageWidth:i("Image width",r(E,{}),G.map(e=>({label:e.label,value:e.value})),"half"),phoneOrder:b("mobile",i("Order",r(O,{}),H.map(e=>({label:e.label,value:e.value})),"picture")),columns:A("Columns",r(T,{}),2,4,1,3),...g(),cardText:i("Text position",r(I,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below")},[[["cardText"],{not:{field:"boxes",set:!0}}],[["arrangement"],f],[["imageWidth","phoneOrder"],{all:[S,f]}],[["columns"],{not:S}]]),showWhenFacts:U,resolveFields:(e,o)=>F(c,k(o.fields,e.props.headPlacement,W.ProcessSteps.headRows),e.props,{root:j(o.appState)}),resolveData:(e,o)=>{const t=e.props;return o?.changed?.dataSource!==!0||!a(t)||p(t[l])?e:{...e,props:{...t,[l]:M(B(t,c))}}}};export{ce as ProcessStepsFields};
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{SquareIcon as s}from"efficient-easel/icons";import{text as d,textarea as o,toggle as m}from"../../../controls.js";import{group as n,section as p}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as l,headFieldsForPlacement as a}from"../../../../../../format/lib/sections/section-head-placement.js";import{PROSE_PH as e}from"../../../../../../format/lib/document/blocks/general/Prose/meta.js";const x={fields:{_gContent:n("Content"),eyebrow:d("Eyebrow",e.eyebrow),title:o("Heading",e.title),body:o("Body",e.body),_dDesign:p("Design"),topBorder:m("Top border",!0,i(s,{}))},resolveFields:(r,{fields:t})=>a(t,r.props.headPlacement,l.Prose.headRows)};export{x as ProseFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{SquareIcon as s}from"efficient-easel/icons";import{text as m,textarea as o,toggle as d}from"../../../controls.js";import{group as p,section as n}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as l}from"efficient-easel/screen/lib/document/field-buckets";import{SPLITTABLE_SECTIONS as a,headFieldsForPlacement as f}from"../../../../../../format/lib/sections/section-head-placement.js";import{PROSE_PH as e}from"../../../../../../format/lib/document/blocks/general/Prose/meta.js";const c={fields:{_gContent:p("Content"),eyebrow:m("Eyebrow",e.eyebrow),title:o("Heading",e.title),body:o("Body",e.body),[l.Design]:n("Design"),topBorder:d("Top border",!0,i(s,{}))},resolveFields:(r,{fields:t})=>f(t,r.props.headPlacement,a.Prose.headRows)};export{c as ProseFields};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{ClockIcon as g,EyeIcon as u}from"efficient-easel/icons";import{backgroundField as d,copyText as y,plainTextarea as m,text as o,textarea as p,toggle as T,upload as I}from"../../../controls.js";import{group as s,section as i}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as b}from"../../../box-fields.js";import{LAYOUT_CELL as f,TIMELINE_PICTURES as r}from"../../../choice-pictures.js";import{ctaField as _}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as k}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{withRowRules as E}from"../../../../../../render/lib/document/show-when.js";import{TIMELINE_PH as e}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";const c={field:"layout",is:"track"},C={not:c},M={fields:E({_dLayout:i("Layout"),layout:b("Display",l(u,{}),[{label:"Split",hint:"Split (editorial aside)",value:"split",picture:r.split},{label:"Spine",hint:"Spine (single rail)",value:"spine",picture:r.spine},{label:"Alternating",hint:"Alternating (zig-zag)",value:"alternating",picture:r.alternating},{label:"Track",hint:"Track (year rail)",value:"track",picture:r.track}],"split",{columns:2,cell:f}),_dDesign:i("Design"),background:d("Background color",k.TimelineTrack),_sHeader:i("Header"),_gContent:s("Content"),eyebrow:o("Eyebrow",e.eyebrow),title:p("Heading",e.title),intro:p("Intro",e.intro),imageSrc:I("Image","image/*"),imageCaption:o("Image caption",e.imageCaption),imageMeta:o("Image meta",e.imageMeta),_gButton:s("Button"),..._,_sEntries:i("Timeline entries"),entries:{type:"array",label:"Entries",arrayFields:{date:y("Sub-title"),title:m("Title"),body:m("Body")},defaultItemProps:{date:"",title:"",body:""},getItemSummary:t=>t?.date||t?.title||"Entry"}},[[["imageSrc","imageCaption","imageMeta"],C],[["background"],c]]),resolveFields:(t,{fields:a})=>{if(t.props.layout!=="track")return a;const n=a.entries;return{...a,entries:{...n,arrayFields:{...n?.arrayFields,future:T("Upcoming",!1,l(g,{}))}}}}};export{M as TimelineFields};
1
+ import{jsx as l}from"react/jsx-runtime";import{ClockIcon as u,EyeIcon as d}from"efficient-easel/icons";import{backgroundField as y,copyText as T,plainTextarea as m,text as o,textarea as p,toggle as I,upload as f}from"../../../controls.js";import{group as s,section as i}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as c}from"efficient-easel/screen/lib/document/field-buckets";import{iconPickerRow as b}from"../../../box-fields.js";import{LAYOUT_CELL as E,TIMELINE_PICTURES as r}from"../../../choice-pictures.js";import{ctaField as _}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as k}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{withRowRules as C}from"../../../../../../render/lib/document/show-when.js";import{TIMELINE_PH as e}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";const g={field:"layout",is:"track"},S={not:g},P={fields:C({[c.Layout]:i("Layout"),layout:b("Display",l(d,{}),[{label:"Split",hint:"Split (editorial aside)",value:"split",picture:r.split},{label:"Spine",hint:"Spine (single rail)",value:"spine",picture:r.spine},{label:"Alternating",hint:"Alternating (zig-zag)",value:"alternating",picture:r.alternating},{label:"Track",hint:"Track (year rail)",value:"track",picture:r.track}],"split",{columns:2,cell:E}),[c.Design]:i("Design"),background:y("Background color",k.TimelineTrack),_sHeader:i("Header"),_gContent:s("Content"),eyebrow:o("Eyebrow",e.eyebrow),title:p("Heading",e.title),intro:p("Intro",e.intro),imageSrc:f("Image","image/*"),imageCaption:o("Image caption",e.imageCaption),imageMeta:o("Image meta",e.imageMeta),_gButton:s("Button"),..._,_sEntries:i("Timeline entries"),entries:{type:"array",label:"Entries",arrayFields:{date:T("Sub-title"),title:m("Title"),body:m("Body")},defaultItemProps:{date:"",title:"",body:""},getItemSummary:t=>t?.date||t?.title||"Entry"}},[[["imageSrc","imageCaption","imageMeta"],S],[["background"],g]]),resolveFields:(t,{fields:a})=>{if(t.props.layout!=="track")return a;const n=a.entries;return{...a,entries:{...n,arrayFields:{...n?.arrayFields,future:I("Upcoming",!1,l(u,{}))}}}}};export{P as TimelineFields};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{ClockIcon as s}from"efficient-easel/icons";import{backgroundField as n,plainText as d,plainTextarea as o,text as m,textarea as i,toggle as p}from"../../../controls.js";import{section as e}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as T,headFieldsForPlacement as c}from"../../../../../../format/lib/sections/section-head-placement.js";import{ctaField as f}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as u}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as r}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const E={fields:{_sHeader:e("Header"),eyebrow:m("Eyebrow",r.eyebrow),title:i("Heading",r.title),intro:i("Body",r.intro),_sEntries:e("Milestones"),entries:{type:"array",label:"Milestones",arrayFields:{date:d("Year"),title:o("Title"),blurb:o("Body"),future:p("Upcoming",!1,l(s,{}))},defaultItemProps:{date:"",title:"",blurb:"",future:!1},getItemSummary:t=>t?.date||t?.title||"Milestone"},_sButton:e("Button"),...f,_dDesign:e("Design"),background:n("Background color",u.TimelineTrack),_dLayout:e("Layout")},resolveFields:(t,{fields:a})=>c(a,t.props.headPlacement,T.TimelineTrack.headRows)};export{E as TimelineTrackFields};
1
+ import{jsx as s}from"react/jsx-runtime";import{ClockIcon as m}from"efficient-easel/icons";import{backgroundField as n,plainText as d,plainTextarea as o,text as p,textarea as i,toggle as f}from"../../../controls.js";import{section as e}from"efficient-easel/screen/lib/document/box-fields";import{DESIGN_GROUP_KEY as a}from"efficient-easel/screen/lib/document/field-buckets";import{SPLITTABLE_SECTIONS as T,headFieldsForPlacement as c}from"../../../../../../format/lib/sections/section-head-placement.js";import{ctaField as u}from"../../shared-fields.js";import{SECTION_BG_BUILT_IN as _}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as r}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const L={fields:{_sHeader:e("Header"),eyebrow:p("Eyebrow",r.eyebrow),title:i("Heading",r.title),intro:i("Body",r.intro),_sEntries:e("Milestones"),entries:{type:"array",label:"Milestones",arrayFields:{date:d("Year"),title:o("Title"),blurb:o("Body"),future:f("Upcoming",!1,s(m,{}))},defaultItemProps:{date:"",title:"",blurb:"",future:!1},getItemSummary:t=>t?.date||t?.title||"Milestone"},_sButton:e("Button"),...u,[a.Design]:e("Design"),background:n("Background color",_.TimelineTrack),[a.Layout]:e("Layout")},resolveFields:(t,{fields:l})=>c(l,t.props.headPlacement,T.TimelineTrack.headRows)};export{L as TimelineTrackFields};
@@ -1,2 +1,2 @@
1
- export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "Integrations" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
- export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "Integrations" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
1
+ export declare const assembleGeneralBlocks: () => Record<"Hero" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "Integrations" | "HeroSingle" | "ContactLocations" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
+ export declare const generalBlocks: Record<"Hero" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "Integrations" | "HeroSingle" | "ContactLocations" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
@@ -1,5 +1,6 @@
1
1
  import { type BoxField } from "efficient-easel/screen/lib/document/box-fields";
2
2
  import { type CustomField } from "../controls.js";
3
+ import type { ShowWhenRule } from "../../../../render/lib/document/show-when.js";
3
4
  import { type ShapeLine } from "../../../../format/lib/content/gallery-card-layout.js";
4
5
  export declare function heroRatioLines(): readonly ShapeLine[];
5
6
  export declare const HERO_TABLET_VH_HINT = "On Tablet, this hero uses the Desktop vh. Set vh in the Desktop view.";
@@ -36,6 +37,24 @@ export declare const HERO_SLIDE_OVERLAY_ROWS: {
36
37
  overlayColor: CustomField<string>;
37
38
  overlayPosition: CustomField<string>;
38
39
  };
40
+ export declare const HERO_LAYOUT_ROWS: {
41
+ mediaLayout: BoxField<string>;
42
+ mediaLayoutPhone: BoxField<string>;
43
+ };
44
+ export declare const heroTintRow: () => BoxField<number>;
45
+ export declare const heroTintColorRow: () => CustomField<string>;
46
+ export declare const HERO_IMAGE_ROWS: {
47
+ mediaImage: CustomField<import("../../../../format/lib/media-value.js").MediaValue>;
48
+ };
49
+ export declare const HERO_IMAGE2_ROWS: {
50
+ tintColor2: CustomField<string>;
51
+ tintOpacity2: BoxField<number>;
52
+ mediaImage2: CustomField<import("../../../../format/lib/media-value.js").MediaValue>;
53
+ };
54
+ export declare const HERO_LAYOUT_KEYS: (keyof typeof HERO_LAYOUT_ROWS)[];
55
+ export declare const HERO_IMAGE2_KEYS: readonly string[];
56
+ export declare const HERO_IMAGE_KEYS: readonly ["mediaImage", string, string, string];
57
+ export declare const heroLayoutRules: (imageOnly: ShowWhenRule) => Record<keyof typeof HERO_LAYOUT_ROWS, ShowWhenRule>;
39
58
  export declare const HERO_VIDEO_ROWS: {
40
59
  videoSource: BoxField<string>;
41
60
  youtubeUrl: CustomField<import("efficient-easel/draw").HidableValue>;
@@ -1 +1 @@
1
- import{jsx as n,jsxs as M,Fragment as Y}from"react/jsx-runtime";import{HeightIcon as K,PlacementIcon as R,PlayIcon as N,UploadIcon as $}from"efficient-easel/icons";import{useEasel as j,useSelectedHost as X}from"efficient-easel/easel";import{SettingsDefaultReset as G,SettingsField as q,SettingsSegmented as z}from"efficient-easel/panel";import{describedAs as J,FLAT_ACCESS as Q,iconOf as Z,onDesktopWords as ee,phoneTwinFields as C,useAccessPatch as te}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as v}from"efficient-easel/screen/lib/document/style-fields";import{colorInput as oe,edgePad as H,plainText as ne,Slider as w,useSelectedSibling as O}from"../controls.js";import{ColourRow as ie,InheritedColourRow as le}from"../ColourControl.js";import{rowSay as re,segmented as A}from"../box-fields.js";import{SHAPE_TABLE as ae}from"../../../../format/lib/content/gallery-card-layout.js";import{ShapePicker as de}from"../shape-picker.js";import{HERO_FIXED_DEFAULT as se,HERO_HEIGHT_PX as x,readHeroFixedHeight as he,SECTION_HEIGHT as u}from"../../../../format/lib/content/section-height.js";import{DEFAULT_TINT as F}from"../../../../format/lib/content/tint.js";import{editorEaselWords as ue,say as a}from"../../../../format/lib/editor-words.js";import{nonEmptyString as E}from"../../../../format/lib/non-empty-string.js";import{findParentNode as ce}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as L,OVERLAY_POSITION_OPTIONS as I,slideOverlayState as D}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as pe,VIDEO_PLAYBACK_LABELS as fe,VIDEO_PLAYBACKS as ge,VIDEO_SOURCE_DEFAULT as be,VIDEO_SOURCE_LABELS as me,VIDEO_SOURCES as ve}from"../../../../format/lib/hero-video.js";function Oe(){return ae.filter(e=>e.ratio!==null)}const _={desktop:{number:"heightDesktop",fixed:"heightFixed"},tablet:{number:"heightTablet",fixed:"heightFixedTablet"},mobile:{number:"heightMobile",fixed:"heightFixedMobile"}},P={read:e=>e.heightMobile,write:(e,t,o)=>({heightMobile:o}),fieldKey:()=>"heightMobile",ownField:!0,tablet:{read:e=>e.heightTablet,write:(e,t,o)=>({heightTablet:o}),fieldKey:()=>"heightTablet",ownField:!0}};function k(e,{number:t,fixed:o}){const l=t===void 0?void 0:e[t];return he(e[o])??(typeof l=="number"?{unit:"vh",vh:l}:null)}const xe="On Tablet, this hero uses the Desktop vh. Set vh in the Desktop view.";function Ee({view:e,keys:t,props:o}){const l=X(),d=te(Q),{number:s}=t,p={...l?.values??{},...s?{[s]:o.value}:{}},b=k(p,t),i=e==="tablet"?k(p,_.desktop):null,h=b??i??{unit:"vh",vh:u.fallback},c=o.readOnly===!0,T=Oe(),W=r=>{if(r===h.unit)return;if(r!=="vh"){d([[t.fixed,i?.unit===r?i.value:se[r]]]);return}const B=s!==void 0&&typeof p[s]!="number"&&i!==null&&i.unit!=="vh";d([[t.fixed,void 0],...B?[[s,u.fallback]]:[]])},f=b===null&&e!=="desktop",m=s===void 0,S=m&&i!==null&&i.unit!=="vh",y=i===null?`${u.fallback} ${u.unit}`:i.unit==="vh"?`${i.vh} ${u.unit}`:i.unit==="px"?i.value:T.find(r=>r.image===i.value)?.label??i.value;return n(q,{label:a("Height"),icon:Z(n(K,{})),hint:m&&(h.unit==="vh"||S)?a(xe):void 0,action:e==="desktop"?void 0:n(G,{words:ue()?.panel,label:a("Height"),changed:b!==null||!!p[t.fixed],detail:e==="tablet"?ee(re,y):y,disabled:c,onReset:()=>d([...s?[[s,void 0]]:[],[t.fixed,void 0]])}),children:M("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-8)",flex:"1 1 auto",minWidth:0},children:[n(z,{options:[{id:"vh",label:a("vh"),disabled:S},{id:"ratio",label:a("Ratio")},{id:"px",label:a("px")}],value:h.unit,onChange:W,ariaLabel:a("Unit"),disabled:c}),h.unit==="ratio"?n(de,{label:"Height",lines:T,column:"image",value:h.value,disabled:c,onChange:r=>d([[t.fixed,r]])}):h.unit==="px"?w({...x,value:f?null:h.px,...f?{placeholder:h.px}:{},suffix:x.unit,ariaLabel:"Height",disabled:c,onChange:r=>d([[t.fixed,`${r}${x.unit}`]])}):w({min:u.min,max:u.max,step:u.step,value:f?null:h.vh,...f?{placeholder:h.vh}:{},suffix:u.unit,ariaLabel:"Height",disabled:c||m,onChange:r=>o.onChange(r)})]})})}const g=(e,t=_[e])=>({type:"custom",...J({},{type:"number",label:"Height"}),render:o=>n(Ee,{view:e,keys:t,props:o})}),_e={read:e=>e.heightFixedTablet,write:(e,t,o)=>({heightFixedTablet:o}),fieldKey:()=>"heightFixedTablet",ownField:!0};function qe({tabletNumber:e=!0}={}){const t=e?P:{...P,tablet:_e},o=g("tablet",e?void 0:{fixed:_.tablet.fixed}),l=C("heightDesktop",g("desktop"),t,{phoneRow:o}),d=C("heightDesktop",g("desktop"),t,{phoneRow:g("mobile")});return{heightDesktop:l.heightDesktop,...e?{heightTablet:l.heightTablet,heightFixedTablet:v("heightTablet")}:{heightFixedTablet:l.heightFixedTablet},heightMobile:d.heightMobile,heightFixed:v("heightDesktop"),heightFixedMobile:v("heightMobile")}}const ze={overlayColor:oe("Overlay color",F),overlayPosition:H("Overlay position",I,L,"A corner would need a diagonal ramp, which this overlay does not draw.",n(R,{}))},U="Texture",V=e=>H("Overlay position",I,e,"A corner would need a diagonal ramp, which this overlay does not draw.",n(R,{}),void 0,U);function Te(){try{const{appState:e,selectedItem:t}=j(o=>o);return Se(e,t?.props?.id)}catch{return}}function Se(e,t){return E(ce(e,t)?.props?.textureColor)}function ye({value:e,onChange:t}){const[o]=O("overlayPosition"),l=Te(),d=E(e)??"",s=D({overlayColor:d,overlayPosition:o},l);return n(le,{label:a("Overlay color"),value:d,inherited:s.color,resetTo:a(U),onChange:t,onReset:()=>t("")})}const Re=V(L),Ce=V("");function He(e){const[t]=O("overlayColor"),o=D({overlayColor:t,overlayPosition:e.value}).own?Re:Ce;return n(Y,{children:o.render(e)})}function we(e){if(!Array.isArray(e))return;const t=e.flatMap((o,l)=>E(o?.props?.overlayColor)?[l+1]:[]);if(t.length!==0)return t.length===1?a("Slide {n}: own Overlay color.",{n:t[0]}):a("Slides {n}: own Overlay color.",{n:t.join(", ")})}function Ae({value:e,onChange:t}){const[o]=O("slides");return n(ie,{label:a("Texture color"),value:e||F,onChange:t,hint:we(o)})}const Je={type:"custom",render:({value:e,onChange:t})=>n(Ae,{value:e,onChange:t})},Qe={overlayColor:{type:"custom",render:({value:e,onChange:t})=>n(ye,{value:e,onChange:t})},overlayPosition:{type:"custom",render:({value:e,onChange:t})=>n(He,{value:e,onChange:t})}},Ze={videoSource:A("Source",n($,{}),ve.map(e=>({label:me[e],value:e})),be),youtubeUrl:ne("YouTube link","https://youtu.be/…"),videoPlayback:A("Playback",n(N,{}),ge.map(e=>({label:fe[e],value:e})),pe)};export{ze as HERO_OVERLAY_ROWS,Qe as HERO_SLIDE_OVERLAY_ROWS,xe as HERO_TABLET_VH_HINT,Je as HERO_TEXTURE_COLOR_ROW,Ze as HERO_VIDEO_ROWS,qe as heroHeightFields,Oe as heroRatioLines,we as textureColorHint,Se as textureColorOfSlide};
1
+ import{jsx as i,jsxs as $,Fragment as X}from"react/jsx-runtime";import{HeightIcon as q,ImageIcon as z,ImagesIcon as J,OpacityIcon as Q,MediaLayoutSideBySideIcon as Z,MediaLayoutStackedIcon as ee,PlacementIcon as H,PlayIcon as oe,UploadIcon as te}from"efficient-easel/icons";import{viewFocusKeys as w}from"../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as p,MEDIA_LAYOUT_DEFAULT as ie,MEDIA_LAYOUT_LABELS as ne,MEDIA_LAYOUTS as re,resolvePhoneLayout as le}from"../../../../format/lib/hero-media-layout.js";import{useEasel as ae,useSelectedHost as de}from"efficient-easel/easel";import{SettingsDefaultReset as se,SettingsField as ue,SettingsSegmented as he}from"efficient-easel/panel";import{describedAs as ce,FLAT_ACCESS as pe,iconOf as me,onDesktopWords as fe,phoneTwinFields as E,useAccessPatch as ge}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as _}from"efficient-easel/screen/lib/document/style-fields";import{colorInput as C,edgePad as F,focusKeptField as Oe,plainText as be,Slider as D,upload as Ee,useSelectedSibling as x}from"../controls.js";import{ColourRow as _e,InheritedColourRow as xe}from"../ColourControl.js";import{rowSay as ye,segmented as y,slider as ve}from"../box-fields.js";import{SHAPE_TABLE as Se}from"../../../../format/lib/content/gallery-card-layout.js";import{ShapePicker as Te}from"../shape-picker.js";import{HERO_FIXED_DEFAULT as Re,HERO_HEIGHT_PX as v,readHeroFixedHeight as Le,SECTION_HEIGHT as h}from"../../../../format/lib/content/section-height.js";import{DEFAULT_TINT as S}from"../../../../format/lib/content/tint.js";import{editorEaselWords as Ae,say as a}from"../../../../format/lib/editor-words.js";import{nonEmptyString as T}from"../../../../format/lib/non-empty-string.js";import{findParentNode as Ie}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as P,OVERLAY_POSITION_OPTIONS as k,slideOverlayState as U}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as He,VIDEO_PLAYBACK_LABELS as we,VIDEO_PLAYBACKS as Ce,VIDEO_SOURCE_DEFAULT as Fe,VIDEO_SOURCE_LABELS as De,VIDEO_SOURCES as Pe}from"../../../../format/lib/hero-video.js";function ke(){return Se.filter(e=>e.ratio!==null)}const R={desktop:{number:"heightDesktop",fixed:"heightFixed"},tablet:{number:"heightTablet",fixed:"heightFixedTablet"},mobile:{number:"heightMobile",fixed:"heightFixedMobile"}},M={read:e=>e.heightMobile,write:(e,o,t)=>({heightMobile:t}),fieldKey:()=>"heightMobile",ownField:!0,tablet:{read:e=>e.heightTablet,write:(e,o,t)=>({heightTablet:t}),fieldKey:()=>"heightTablet",ownField:!0}};function Y(e,{number:o,fixed:t}){const r=o===void 0?void 0:e[o];return Le(e[t])??(typeof r=="number"?{unit:"vh",vh:r}:null)}const Ue="On Tablet, this hero uses the Desktop vh. Set vh in the Desktop view.";function Me({view:e,keys:o,props:t}){const r=de(),d=ge(pe),{number:s}=o,m={...r?.values??{},...s?{[s]:t.value}:{}},O=Y(m,o),n=e==="tablet"?Y(m,R.desktop):null,u=O??n??{unit:"vh",vh:h.fallback},c=t.readOnly===!0,L=ke(),G=l=>{if(l===u.unit)return;if(l!=="vh"){d([[o.fixed,n?.unit===l?n.value:Re[l]]]);return}const N=s!==void 0&&typeof m[s]!="number"&&n!==null&&n.unit!=="vh";d([[o.fixed,void 0],...N?[[s,h.fallback]]:[]])},f=O===null&&e!=="desktop",b=s===void 0,A=b&&n!==null&&n.unit!=="vh",I=n===null?`${h.fallback} ${h.unit}`:n.unit==="vh"?`${n.vh} ${h.unit}`:n.unit==="px"?n.value:L.find(l=>l.image===n.value)?.label??n.value;return i(ue,{label:a("Height"),icon:me(i(q,{})),hint:b&&(u.unit==="vh"||A)?a(Ue):void 0,action:e==="desktop"?void 0:i(se,{words:Ae()?.panel,label:a("Height"),changed:O!==null||!!m[o.fixed],detail:e==="tablet"?fe(ye,I):I,disabled:c,onReset:()=>d([...s?[[s,void 0]]:[],[o.fixed,void 0]])}),children:$("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-8)",flex:"1 1 auto",minWidth:0},children:[i(he,{options:[{id:"vh",label:a("vh"),disabled:A},{id:"ratio",label:a("Ratio")},{id:"px",label:a("px")}],value:u.unit,onChange:G,ariaLabel:a("Unit"),disabled:c}),u.unit==="ratio"?i(Te,{label:"Height",lines:L,column:"image",value:u.value,disabled:c,onChange:l=>d([[o.fixed,l]])}):u.unit==="px"?D({...v,value:f?null:u.px,...f?{placeholder:u.px}:{},suffix:v.unit,ariaLabel:"Height",disabled:c,onChange:l=>d([[o.fixed,`${l}${v.unit}`]])}):D({min:h.min,max:h.max,step:h.step,value:f?null:u.vh,...f?{placeholder:u.vh}:{},suffix:h.unit,ariaLabel:"Height",disabled:c||b,onChange:l=>t.onChange(l)})]})})}const g=(e,o=R[e])=>({type:"custom",...ce({},{type:"number",label:"Height"}),render:t=>i(Me,{view:e,keys:o,props:t})}),Ye={read:e=>e.heightFixedTablet,write:(e,o,t)=>({heightFixedTablet:t}),fieldKey:()=>"heightFixedTablet",ownField:!0};function _o({tabletNumber:e=!0}={}){const o=e?M:{...M,tablet:Ye},t=g("tablet",e?void 0:{fixed:R.tablet.fixed}),r=E("heightDesktop",g("desktop"),o,{phoneRow:t}),d=E("heightDesktop",g("desktop"),o,{phoneRow:g("mobile")});return{heightDesktop:r.heightDesktop,...e?{heightTablet:r.heightTablet,heightFixedTablet:_("heightTablet")}:{heightFixedTablet:r.heightFixedTablet},heightMobile:d.heightMobile,heightFixed:_("heightDesktop"),heightFixedMobile:_("heightMobile")}}const xo={overlayColor:C("Overlay color",S),overlayPosition:F("Overlay position",k,P,"A corner would need a diagonal ramp, which this overlay does not draw.",i(H,{}))},W="Texture",B=e=>F("Overlay position",k,e,"A corner would need a diagonal ramp, which this overlay does not draw.",i(H,{}),void 0,W);function We(){try{const{appState:e,selectedItem:o}=ae(t=>t);return Be(e,o?.props?.id)}catch{return}}function Be(e,o){return T(Ie(e,o)?.props?.textureColor)}function Ve({value:e,onChange:o}){const[t]=x("overlayPosition"),r=We(),d=T(e)??"",s=U({overlayColor:d,overlayPosition:t},r);return i(xe,{label:a("Overlay color"),value:d,inherited:s.color,resetTo:a(W),onChange:o,onReset:()=>o("")})}const Ke=B(P),je=B("");function Ge(e){const[o]=x("overlayColor"),t=U({overlayColor:o,overlayPosition:e.value}).own?Ke:je;return i(X,{children:t.render(e)})}function Ne(e){if(!Array.isArray(e))return;const o=e.flatMap((t,r)=>T(t?.props?.overlayColor)?[r+1]:[]);if(o.length!==0)return o.length===1?a("Slide {n}: own Overlay color.",{n:o[0]}):a("Slides {n}: own Overlay color.",{n:o.join(", ")})}function $e({value:e,onChange:o}){const[t]=x("slides");return i(_e,{label:a("Texture color"),value:e||S,onChange:o,hint:Ne(t)})}const yo={type:"custom",render:({value:e,onChange:o})=>i($e,{value:e,onChange:o})},vo={overlayColor:{type:"custom",render:({value:e,onChange:o})=>i(Ve,{value:e,onChange:o})},overlayPosition:{type:"custom",render:({value:e,onChange:o})=>i(Ge,{value:e,onChange:o})}},Xe={one:i(z,{}),side:i(Z,{}),stacked:i(ee,{})},V=e=>y("Layout",i(J,{}),re.map(o=>({label:ne[o],value:o,picture:Xe[o]})),ie,e?{phoneRest:o=>le(void 0,o)}:void 0),qe={mediaLayout:V(),mediaLayoutPhone:E("mediaLayout",V(!0)).mediaLayoutPhone},ze=()=>ve("Tint",i(Q,{}),0,100,5,0,"%"),K=e=>Object.fromEntries(w(e).map(o=>[o,Oe()])),j=e=>Ee("Background image","image/*","Upload a background image",{focus:e}),Je=()=>C("Tint color",S),So={mediaImage:j(p.image),...K(p.image)},Qe={mediaImage2:j(p.image2),...K(p.image2),tintColor2:Je(),tintOpacity2:ze()},To=Object.keys(qe),Ro=Object.keys(Qe),Lo=["mediaImage",...w(p.image)],Ao=e=>({mediaLayout:{all:[e,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[e,{context:"device",is:"mobile"}]}}),Io={videoSource:y("Source",i(te,{}),Pe.map(e=>({label:De[e],value:e})),Fe),youtubeUrl:be("YouTube link","https://youtu.be/…"),videoPlayback:y("Playback",i(oe,{}),Ce.map(e=>({label:we[e],value:e})),He)};export{Ro as HERO_IMAGE2_KEYS,Qe as HERO_IMAGE2_ROWS,Lo as HERO_IMAGE_KEYS,So as HERO_IMAGE_ROWS,To as HERO_LAYOUT_KEYS,qe as HERO_LAYOUT_ROWS,xo as HERO_OVERLAY_ROWS,vo as HERO_SLIDE_OVERLAY_ROWS,Ue as HERO_TABLET_VH_HINT,yo as HERO_TEXTURE_COLOR_ROW,Io as HERO_VIDEO_ROWS,_o as heroHeightFields,Ao as heroLayoutRules,ke as heroRatioLines,Je as heroTintColorRow,ze as heroTintRow,Ne as textureColorHint,Be as textureColorOfSlide};
@@ -3,7 +3,7 @@ import { boxFieldBuilders, type BoxFieldSay } from "efficient-easel/screen/lib/d
3
3
  import type { ShowWhenRule } from "efficient-shell/format";
4
4
  type Rows = ReturnType<typeof boxFieldBuilders>;
5
5
  export declare const rowSay: BoxFieldSay;
6
- export declare const LENGTH_UNITS_TABLE: Readonly<Record<"size" | "spacing" | "gap" | "radius" | "fontSize" | "letterSpacing" | "position" | "border" | "height" | "breakpoint", readonly ("px" | "%" | "vw")[]>>;
6
+ export declare const LENGTH_UNITS_TABLE: Readonly<Record<"border" | "spacing" | "gap" | "size" | "radius" | "fontSize" | "letterSpacing" | "position" | "height" | "breakpoint", readonly ("%" | "px" | "vw")[]>>;
7
7
  export declare const slider: Rows["slider"];
8
8
  export declare const select: Rows["select"];
9
9
  export declare const Segmented: Rows["Segmented"];
@@ -1 +1 @@
1
- import{isNodeList as c}from"efficient-easel/data";import{registerGeneralSectionRows as f}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{convertSection as m,sectionToBoxRow as u}from"../../../render/lib/sections/section-to-box.js";const l=["FooterPayment"];function n(o,r){const{id:e,...t}=o.props;for(const[i,p]of Object.entries(t))c(p)&&(t[i]=p.map(s=>n(s,r)));return r(o.type,t)}const R=(o,r)=>{if(!l.includes(o.type))return null;f();const e=u(o.type);return e?m({type:o.type,props:{...o.props}},e).nodes.map(t=>n(t,r)):null};export{l as FOOTER_ROW_TYPES,R as convertFooterBlock};
1
+ import{nodeListKeys as i}from"../../../format/lib/document/node-lists.js";import{registerGeneralSectionRows as c}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{convertSection as m,sectionToBoxRow as f}from"../../../render/lib/sections/section-to-box.js";const u=["FooterPayment"];function n(o,t){const{id:e,...r}=o.props;for(const p of i(o))r[p]=r[p].map(s=>n(s,t));return t(o.type,r)}const R=(o,t)=>{if(!u.includes(o.type))return null;c();const e=f(o.type);return e?m({type:o.type,props:{...o.props}},e).nodes.map(r=>n(r,t)):null};export{u as FOOTER_ROW_TYPES,R as convertFooterBlock};
@@ -1,3 +1,4 @@
1
+ import { type HeroMediaType } from "../../../format/lib/hero-media-layout.js";
1
2
  import { type ReactElement, type ReactNode } from "react";
2
3
  import { type FieldsPatch } from "efficient-easel/easel";
3
4
  import { type WordValues } from "../../../format/lib/editor-words.js";
@@ -331,7 +332,7 @@ export declare function sourceField<V, E extends object = Record<never, never>>(
331
332
  } & E) => ReactElement, extra?: E): CustomField<V>;
332
333
  export declare const MEDIA_TYPE_OPTIONS: {
333
334
  label: string;
334
- value: "image" | "video";
335
+ value: HeroMediaType;
335
336
  }[];
336
337
  export declare function loadingShowsField(label: string, icon: ReactElement, pictures: Readonly<Record<LoadingShows, ReactElement>>): CustomField<LoadingShows>;
337
338
  export declare function loadingRowHint(values: Readonly<Record<string, unknown>>, frames: Readonly<Record<string, KnownVideoFrame>> | undefined, hasUnsavedEdits: boolean): string | undefined;
@@ -340,6 +341,13 @@ export declare function upload(label: string, accept: string, placeholder?: stri
340
341
  focusWhen?: (props: Record<string, unknown>, view: "desktop" | "tablet" | "mobile") => boolean;
341
342
  frame?: string;
342
343
  }): CustomField<MediaValue>;
344
+ export declare function mediaFieldPaths(fields: Readonly<Record<string, unknown>> | undefined): string[];
345
+ export type MediaFieldRow = {
346
+ path: string;
347
+ field: Readonly<Record<string, unknown>>;
348
+ along: readonly Readonly<Record<string, unknown>>[];
349
+ };
350
+ export declare function mediaFields(fields: Readonly<Record<string, unknown>> | undefined, prefix?: string, along?: readonly Readonly<Record<string, unknown>>[]): MediaFieldRow[];
343
351
  export declare const CUSTOM_FIELD_MEDIA: Record<string, string[]>;
344
352
  export declare function coordsResultTip(v: GeocodeState): string;
345
353
  export declare function CoordsField({ value, onChange, label, }: {