efficient-web-builder 49.1.0 → 51.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 (150) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +1 -1
  3. package/dist/editor/components/BlogPostSource.js +1 -1
  4. package/dist/editor/components/EditorPagePathProvider.d.ts +4 -0
  5. package/dist/editor/components/EditorPagePathProvider.js +1 -0
  6. package/dist/editor/components/HeroPartPanel.js +1 -1
  7. package/dist/editor/components/MediaUploadField.js +1 -1
  8. package/dist/editor/components/PagesPanel.js +1 -1
  9. package/dist/editor/components/SectionEditor.js +1 -1
  10. package/dist/editor/components/SourceStatus.d.ts +3 -3
  11. package/dist/editor/components/SourceStatus.js +1 -1
  12. package/dist/editor/components/StorefrontEditor.js +1 -1
  13. package/dist/editor/components/ThemeCard.js +1 -1
  14. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  15. package/dist/editor/components/storefront-editor.css +1 -1
  16. package/dist/editor/components/usePartMotion.d.ts +1 -1
  17. package/dist/editor/components/usePartTypingDeps.d.ts +2 -0
  18. package/dist/editor/components/usePartTypingDeps.js +1 -0
  19. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  20. package/dist/editor/lib/animation/fields.d.ts +1 -1
  21. package/dist/editor/lib/animation/fields.js +1 -1
  22. package/dist/editor/lib/animation/hover-fields.d.ts +7 -1
  23. package/dist/editor/lib/animation/hover-fields.js +1 -1
  24. package/dist/editor/lib/document/add-target.js +1 -1
  25. package/dist/editor/lib/document/block-source-fields.d.ts +6 -0
  26. package/dist/editor/lib/document/block-source-fields.js +1 -1
  27. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  28. package/dist/editor/lib/document/blocks/general/ContactLocations/fields.js +1 -1
  29. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  30. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  31. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  32. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  33. package/dist/editor/lib/document/blocks/general/PaymentBadges/fields.js +1 -1
  34. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  35. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  36. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  37. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +2 -0
  38. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  39. package/dist/editor/lib/document/canvas-typing.d.ts +1 -0
  40. package/dist/editor/lib/document/canvas-typing.js +1 -1
  41. package/dist/editor/lib/document/card-copy-rows.d.ts +12 -0
  42. package/dist/editor/lib/document/card-copy-rows.js +1 -0
  43. package/dist/editor/lib/document/card-display-chips.d.ts +7 -2
  44. package/dist/editor/lib/document/card-display-chips.js +1 -1
  45. package/dist/editor/lib/document/card-row-fields.js +1 -1
  46. package/dist/editor/lib/document/controls.d.ts +1 -0
  47. package/dist/editor/lib/document/controls.js +1 -1
  48. package/dist/editor/lib/document/darken-fields.d.ts +4 -0
  49. package/dist/editor/lib/document/darken-fields.js +1 -0
  50. package/dist/editor/lib/document/field-groups.js +1 -1
  51. package/dist/editor/lib/document/overrides.js +1 -1
  52. package/dist/editor/lib/document/slot-new-children.d.ts +2 -0
  53. package/dist/editor/lib/document/slot-new-children.js +1 -0
  54. package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -1
  55. package/dist/editor/lib/sections/new-section-node.js +1 -1
  56. package/dist/format/components/stored-pick-row.d.ts +8 -0
  57. package/dist/format/components/stored-pick-row.js +1 -0
  58. package/dist/format/lib/animation/hover.d.ts +32 -1
  59. package/dist/format/lib/animation/hover.js +1 -1
  60. package/dist/format/lib/content/block-sources.d.ts +11 -0
  61. package/dist/format/lib/content/block-sources.js +1 -1
  62. package/dist/format/lib/content/box-layout.d.ts +11 -0
  63. package/dist/format/lib/content/box-layout.js +1 -1
  64. package/dist/format/lib/content/box-shape.d.ts +2 -1
  65. package/dist/format/lib/content/box-shape.js +1 -1
  66. package/dist/format/lib/content/card-place.d.ts +8 -0
  67. package/dist/format/lib/content/card-place.js +1 -0
  68. package/dist/format/lib/content/card-template.d.ts +20 -2
  69. package/dist/format/lib/content/card-template.js +1 -1
  70. package/dist/format/lib/content/image-treatment.d.ts +23 -4
  71. package/dist/format/lib/content/image-treatment.js +1 -1
  72. package/dist/format/lib/document/blocks/general/Cards/card-seed.d.ts +15 -0
  73. package/dist/format/lib/document/blocks/general/Cards/card-seed.js +1 -0
  74. package/dist/format/lib/document/blocks/general/Cards/meta.d.ts +6 -0
  75. package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
  76. package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
  77. package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
  78. package/dist/format/lib/document/blocks/general/text-part-shapes.json +8 -0
  79. package/dist/format/lib/document/box-footer.js +1 -1
  80. package/dist/format/lib/document/cards-template-on-read.d.ts +4 -0
  81. package/dist/format/lib/document/cards-template-on-read.js +1 -0
  82. package/dist/format/lib/document/easel-row-words.d.ts +1 -0
  83. package/dist/format/lib/document/easel-row-words.js +1 -1
  84. package/dist/format/lib/document/editor-page-context.js +1 -1
  85. package/dist/format/lib/document/passes/card-template-on-insert.d.ts +2 -0
  86. package/dist/format/lib/document/passes/card-template-on-insert.js +1 -0
  87. package/dist/format/lib/document/passes/types.d.ts +6 -0
  88. package/dist/format/lib/document/renamed-props.js +1 -1
  89. package/dist/format/lib/document/section-catalog.js +22 -2
  90. package/dist/format/lib/document/seed-parts.d.ts +18 -0
  91. package/dist/format/lib/document/seed-parts.js +1 -0
  92. package/dist/format/lib/editor-page-rows.d.ts +2 -0
  93. package/dist/format/lib/editor-page-rows.js +1 -1
  94. package/dist/format/lib/editor-words-catalogue.d.ts +21 -6
  95. package/dist/format/lib/editor-words-catalogue.js +4 -4
  96. package/dist/format/lib/hero-ticker.d.ts +4 -0
  97. package/dist/format/lib/hero-ticker.js +1 -1
  98. package/dist/format/lib/page-at-own-slug.d.ts +9 -0
  99. package/dist/format/lib/page-at-own-slug.js +1 -0
  100. package/dist/format/lib/popup/new-popup.js +1 -1
  101. package/dist/format/lib/sections/hero-overlay.js +1 -1
  102. package/dist/render/components/ButtonBlock.d.ts +1 -1
  103. package/dist/render/components/ButtonBlock.js +1 -1
  104. package/dist/render/components/Cards.d.ts +4 -2
  105. package/dist/render/components/Cards.js +1 -1
  106. package/dist/render/components/ContactLocations.d.ts +3 -1
  107. package/dist/render/components/ContactLocations.js +2 -2
  108. package/dist/render/components/Flex.d.ts +5 -1
  109. package/dist/render/components/Flex.js +1 -1
  110. package/dist/render/components/HeroPictures.d.ts +10 -0
  111. package/dist/render/components/HeroPictures.js +1 -1
  112. package/dist/render/components/HeroSingle.js +1 -1
  113. package/dist/render/components/HeroSlide.js +1 -1
  114. package/dist/render/components/ImageBlock.d.ts +6 -1
  115. package/dist/render/components/ImageBlock.js +1 -1
  116. package/dist/render/components/Manifesto.d.ts +3 -1
  117. package/dist/render/components/Manifesto.js +1 -1
  118. package/dist/render/components/PhotoHoverSheet.d.ts +4 -0
  119. package/dist/render/components/PhotoHoverSheet.js +1 -0
  120. package/dist/render/components/PictureWash.d.ts +6 -0
  121. package/dist/render/components/PictureWash.js +1 -0
  122. package/dist/render/components/Placeholder.js +1 -1
  123. package/dist/render/components/PostCard.js +1 -1
  124. package/dist/render/components/Split.d.ts +3 -1
  125. package/dist/render/components/Split.js +1 -1
  126. package/dist/render/components/Text.d.ts +4 -3
  127. package/dist/render/components/Text.js +1 -1
  128. package/dist/render/lib/animation/part-motion.js +2 -2
  129. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  130. package/dist/render/lib/document/blocks/general/ContactLocations/render.js +1 -1
  131. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  132. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  133. package/dist/render/lib/document/blocks/general/Manifesto/render.js +1 -1
  134. package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
  135. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  136. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -2
  137. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  138. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -5
  139. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  140. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  141. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  142. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  143. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  144. package/dist/render/lib/document/passes/index.js +1 -1
  145. package/dist/render/lib/document/passes/section-animation.js +1 -1
  146. package/dist/render/lib/sections/section-to-box.d.ts +7 -7
  147. package/dist/render/lib/sections/section-to-box.js +1 -1
  148. package/dist/render/lib/site-runtime.d.ts +2 -0
  149. package/dist/render/lib/site-runtime.js +1 -1
  150. package/package.json +4 -4
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{ColumnsIcon as b,StylesIcon as a}from"efficient-easel/icons";import{copyText as s,plainText as p,plainTextarea as c,text as f,textarea as C,withOffPage as u}from"../../../controls.js";import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{select as d,slider as S}from"../../../box-fields.js";import{SPLITTABLE_SECTIONS as w,headFieldsForPlacement as F}from"../../../../../../format/lib/sections/section-head-placement.js";import{SECTION_EYEBROW_LOOK_OPTIONS as L,eyebrowLookFor as m}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{blockSourceField as k,blockSourceFields as T}from"../../../block-source-fields.js";import{CARDS_PH as y}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const N={fields:{_gContent:i("Content"),eyebrow:f("Eyebrow",y.eyebrow),eyebrowLook:d("Eyebrow style",o(a,{}),[...L],m("Cards")),title:C("Heading",y.title),dataSource:k("Cards from","Typed here"),items:{type:"array",label:"Cards",arrayFields:{title:s("Card title"),body:c("Card body")},defaultItemProps:{title:"",body:""},getItemSummary:e=>e?.title||e?.body||"Card"},_gStyle:i("Style"),cardStyle:d("Card style",o(a,{}),[{label:"Cards",value:"cards"},{label:"Label only",value:"label-only"}],"cards"),columns:S("Columns",o(b,{}),2,4,1,3)},resolveFields:(e,{fields:n})=>{const r=F(T("Cards",n,e.props,{hides:["items"]}),e.props.headPlacement,w.Cards.headRows);if(e.props.cardStyle!=="label-only")return r;const t=r.items,l=r.eyebrowLook;return{...r,...t?{items:{...t,arrayFields:{title:s("Feature label"),href:u(p("Link"))}}}:{},...l?{eyebrowLook:{...l,fallback:m("KeyFeatures")}}:{}}}};export{N as CardsFields};
1
+ import{jsx as c}from"react/jsx-runtime";import{AccentIcon as v,ColumnsIcon as x,StylesIcon as f}from"efficient-easel/icons";import{copyText as b,plainText as C,plainTextarea as B,text as w,textarea as M,withOffPage as S}from"../../../controls.js";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{select as y,slider as A}from"../../../box-fields.js";import{SPLITTABLE_SECTIONS as H,headFieldsForPlacement as N}from"../../../../../../format/lib/sections/section-head-placement.js";import{SECTION_EYEBROW_LOOK_OPTIONS as D,eyebrowLookFor as k}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{BLOCK_SOURCE_EDIT_PROP as K,blockSourceEditField as W,blockSourceField as J,blockSourceFields as U}from"../../../block-source-fields.js";import{declaredBlockSource as E,sourceChoices as Y}from"../../../../../../format/lib/content/block-sources.js";import{cardKeyOf as q,cardRow as z,cardTemplateFields as O}from"../../../../../../format/lib/content/card-template.js";import{isNodeList as G,newId as F}from"efficient-easel/data";import{say as Q}from"../../../../../../format/lib/editor-words.js";import{cardsFieldsFollowContent as V}from"../../../../../../format/lib/document/cards-template-on-read.js";import{CARDS_PH as I,CardsSlots as X}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const Z=e=>G(e.template)&&e.template.length>0;function $(e){const r=E(e);return r?Y(r).map(t=>({label:t.label,value:t.key})):(Array.isArray(e.items)?e.items:[]).map((t,l)=>({label:typeof t?.title=="string"&&t.title.trim()||Q("Card {n}",{n:l+1}),value:q(z(t),l)}))}const ee=e=>Object.defineProperty({...e},"key",{get:()=>F("card"),enumerable:!0});function te(e,r){const o=Z(r)&&r.cardStyle!=="label-only"&&!!e.highlightedCard;return Object.fromEntries(Object.entries(e).flatMap(([t,l])=>t==="highlightedCard"?o?[[t,re(l,$(r))]]:[]:t==="highlightBadge"?o?[[t,l]]:[]:t==="items"&&o&&l?[[t,se(l)]]:[[t,l]]))}const L=new WeakMap;function re(e,r){let o=L.get(e);o||L.set(e,o=new Map);const t=JSON.stringify(r);let l=o.get(t);return l||o.set(t,l={...e,options:[...e.options,...r]}),l}const _=e=>e.kind==="link"?S(C(e.label)):e.multiline?B(e.label):b(e.label),oe=Object.fromEntries(O("Cards").filter(e=>!e.everySource).map(e=>[e.key,_(e)])),le=Object.fromEntries(O("Cards").filter(e=>e.key==="title"||e.key==="body").map(e=>[e.key,_(e)])),T=new WeakMap;function se(e){let r=T.get(e);return r||T.set(e,r={...e,arrayFields:oe}),r}const we={fields:{_gSource:p("Source"),dataSource:J("Card content","Manual"),[K]:W(),_gContent:p("Content"),eyebrow:w("Eyebrow",I.eyebrow),eyebrowLook:y("Eyebrow style",c(f,{}),[...D],k("Cards")),title:M("Heading",I.title),items:{type:"array",label:"Cards",arrayFields:le,defaultItemProps:ee({title:"",body:""}),getItemSummary:e=>e?.title||e?.body||"Card"},...X,highlightedCard:y("Highlighted card",c(v,{}),[{label:"None",value:""}],""),highlightBadge:w("Highlight badge","Most popular"),_gStyle:p("Style"),cardStyle:y("Card style",c(f,{}),[{label:"Cards",value:"cards"},{label:"Label only",value:"label-only"}],"cards"),columns:A("Columns",c(x,{}),2,4,1,3)},resolveData:e=>{const r=V(e.props),o=r===e.props?e:{...e,props:r},t=o.props;if(!Array.isArray(t.items)||E(t))return o;const l=t.items,a=typeof t.highlightedCard=="string"?t.highlightedCard.trim():"",i=s=>s&&typeof s=="object"&&typeof s.key=="string"?s.key:"",P=!!a&&!l.some(s=>i(s)===a),d=new Set;let u=t.highlightedCard,h=!1;const R=l.map((s,j)=>{if(!s||typeof s!="object")return s;const n=i(s);if(n&&!d.has(n))return d.add(n),s;const g=!n&&P&&a===String(j+1);if(n||g){const m=F("card");return d.add(m),h=!0,g&&(u=m),{...s,key:m}}return s});return h?{...o,props:{...t,items:R,highlightedCard:u}}:o},resolveFields:(e,{fields:r})=>{const o=N(U("Cards",r,e.props,{hides:["items"]}),e.props.headPlacement,H.Cards.headRows),t=e.props,l=te(o,t);if(t.cardStyle!=="label-only")return l;const a=o.items,i=o.eyebrowLook;return{...l,...a?{items:{...a,arrayFields:{title:b("Feature label"),href:S(C("Link"))}}}:{},...i?{eyebrowLook:{...i,fallback:k("KeyFeatures")}}:{}}}};export{we as CardsFields};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import p from"../../../../../components/LocationsGroupedField.js";import{splitLegacyRegion as m}from"../../../../../../format/lib/content/contact.js";import{BLOCK_SOURCE_ROWS_PROP as l}from"../../../../../../format/lib/content/block-sources.js";import{blockSourceField as d,blockSourceFields as u}from"../../../block-source-fields.js";import{needsGeocodeWork as f,resolveGeocodeRows as g}from"../../../geocode-resolve.js";const _={fields:{dataSource:d("Locations from","Typed here"),locations:{type:"custom",render:({value:o,onChange:r})=>a(p,{value:o,onChange:r})}},resolveData:async o=>{const r=o.props,t=r.locations??[];if(!f(t))return o;const n=await g(t,e=>{const s=m(e.region);return[String(e.address??"").replace(/\s*\n+\s*/g,", "),e.name,String(e.state??"").trim()||s.state,String(e.country??"").trim()||s.country].map(c=>String(c??"").trim()).filter(Boolean).join(", ")}),{[l]:S,...i}=r;return{...o,props:{...i,locations:n}}},resolveFields:(o,{fields:r})=>u("ContactLocations",r,o.props)};export{_ as ContactLocationsFields};
1
+ import{jsx as a}from"react/jsx-runtime";import p from"../../../../../components/LocationsGroupedField.js";import{splitLegacyRegion as m}from"../../../../../../format/lib/content/contact.js";import{BLOCK_SOURCE_ROWS_PROP as l}from"../../../../../../format/lib/content/block-sources.js";import{blockSourceField as d,blockSourceFields as u}from"../../../block-source-fields.js";import{needsGeocodeWork as g,resolveGeocodeRows as f}from"../../../geocode-resolve.js";const _={fields:{dataSource:d("Location content","Manual"),locations:{type:"custom",render:({value:o,onChange:r})=>a(p,{value:o,onChange:r})}},resolveData:async o=>{const r=o.props,e=r.locations??[];if(!g(e))return o;const n=await f(e,t=>{const s=m(t.region);return[String(t.address??"").replace(/\s*\n+\s*/g,", "),t.name,String(t.state??"").trim()||s.state,String(t.country??"").trim()||s.country].map(c=>String(c??"").trim()).filter(Boolean).join(", ")}),{[l]:S,...i}=r;return{...o,props:{...i,locations:n}}},resolveFields:(o,{fields:r})=>u("ContactLocations",r,o.props)};export{_ as ContactLocationsFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{phoneKey as t,tabletKey as h}from"efficient-easel/draw";import{BOX_CARD_PAD as d,BOX_DARKEN as s,BOX_DARKEN_STYLES as u,isBackgroundBox as X}from"../../../../../../format/lib/content/box-background.js";import{BOX_TAB_SHAPES as K,REEL_SHAPE_LABELS as j}from"../../../../../../format/lib/reel.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as v,CropIcon as f,LineBetweenIcon as G,LineSolidIcon as Y,OpacityIcon as J,ShadowIcon as z,StylesIcon as O,TableIcon as g,TargetIcon as V}from"efficient-easel/icons";import{boxBlockSpacingField as q,boxFillField as Q,boxColumnsFields as Z,boxShareField as $,boxSharePhoneField as ee,containerDirectionField as oe,containerGapRows as te,linkField as ne,plainText as ae,swapPadding as A,toggle as c,upload as R,withPanelOnly as ie}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as b,boxShapeOf as le}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as re,BOX_COLUMNS_MIN as se,boxPhoneRowOneLine as pe}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as E}from"../../../../../../format/lib/content/box-separator.js";import{group as i,phoneTwinFields as C}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as de,boxJustifyField as ce,boxWrapField as N,placementField as Se,select as l,sidesPaddingFields as D,slider as me}from"../../../box-fields.js";import{withRowRules as _e}from"../../../../../../render/lib/document/show-when.js";import{separatorField as he}from"../../../separator-field.js";import{LOOP_SCROLLS as ue}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as fe}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as Oe,ON_A_CARD as ge,cardDisplayField as Ae}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Re,mirrorCardsField as be}from"../../../mirror-cards-field.js";import{SHARED_COLUMNS_KEY as r,SHARED_COLUMNS_LABEL as L,SHARED_COLUMNS_OFF as x,sharedColumnsDrawn as F,sharedColumnsFits as H,SHARED_COLUMNS_PHONE_POINTS as Ee,SHARED_COLUMNS_POINTS as Ce}from"../../../../../../render/lib/content/box-shared-columns.js";const Ne={field:"bgImage",set:!0},I={field:"phoneRow",in:[2,3]},De={field:"direction",is:"tabs"},Le={field:"line",in:[!0,!1]},xe={field:"anchor",set:!0},T=["fixed","screen"],Fe={not:{any:[{field:"sectionHeightMode",in:T},{field:"sectionHeightModePhone",in:T}]}},He={context:"parent.line",is:!0},m={field:"direction",is:"row",default:"row"},p={not:ue},k={all:[m,p,{not:{field:"separator",in:E.map(e=>e.value)}},{not:{field:"line",is:!0}}]},Ie={all:[p,{not:{all:[m,{field:"separator",in:E.map(e=>e.value)}]}}]},w={not:{all:[k,{field:"columns",in:Array.from({length:re},(e,n)=>n+se)}]}},Te="sharedColumnsFits",B="sharedColumnsMisfit",P="sharedColumnsDraws",y="sharedColumnsPhoneDraws",ke={[Te]:e=>H(e.props??{}),[B]:e=>!H(e.props??{}),[P]:e=>F(e.props??{}).desktop,[y]:e=>F(e.props??{}).phone};function M(e){return{all:[{not:{context:B,is:!0}},{any:[ge,{field:e,set:!0}]}]}}const _={not:{context:P,is:!0}},S={not:{context:y,is:!0}},we={any:[_,S]};function Be(e){return{...e,render:n=>e.render({...n,value:pe(n.value)?"nowrap":"wrap"})}}const to={fields:_e({_gContent:i("Content"),content:fe.content,_gCardDisplay:i("Display"),cardDisplay:Ae(),_gLayout:i("Layout"),direction:oe("Flex"),tabShape:l("Tab shape",o(O,{}),K.map(e=>({label:j[e],value:e})),"tabs"),mirrorCards:be(),label:ie(ae("Tab name")),...te("Flex"),justify:ce(),align:de(),...C("wrap",N(),void 0,{phoneRow:Be(N())}),boxShape:a("desktop",l("Box shape",o(f,{}),[...b],"auto")),[t("boxShape")]:C("boxShape",l("Box shape",o(f,{}),[...b],"auto",{phoneRest:e=>le(e)}))[t("boxShape")],separator:he(o(G,{size:18}),"none"),share:a("desktop",$()),[t("share")]:ee(),[r]:a("desktop",l(L,o(g,{}),[...Ce],x)),[t(r)]:a("mobile",l(L,o(g,{}),[...Ee],x)),...Z(),blockSpacing:q(),line:c("Line",!1,o(Y,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,o(v,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:c("Shadow",!1,o(z,{})),fillColor:Q(),_gBackground:i("Background image"),bgImage:a("desktop",R("Image","image/*")),bgImagePhone:a("mobile",R("Image","image/*")),darken:me("Darken",o(J,{}),s.min,s.max,s.step,s.fallback,s.unit),darkenStyle:l("Darken style",o(O,{}),u,u[0].value),placement:Se("Content position"),_gLink:i("Link"),link:ne("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,o(V,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],Ne],[[t("share")],{all:[I,S]}],[[r],M(r)],[[t(r)],M(t(r))],[[t("wrap")],{all:[I,p,S]}],[["phoneRow"],S],[["tabShape"],De],[["separator"],m],[["columns",h("columns")],k],[[h("gap")],Ie],[["justify"],{all:[p,we]}],[["wrap"],{all:[p,w,_]}],[["share"],{all:[w,_]}],[["line"],Le],[["upcoming"],He],[["jumpHighlight"],xe],[["boxShape",t("boxShape")],Fe]]),resolveFields:(e,{fields:n})=>{const U=e.props;if(X(U.bgImage)){const W=D({fallback:{top:d.desktop,bottom:d.desktop,left:d.side,right:d.side},tablet:!0});return A(n,W)}return e.props.padV2!==!0?A(n,D({fallback:{top:24,bottom:24},tablet:!0})):n},showWhenFacts:{...Oe,...Re,...ke}};export{to as FlexFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{phoneKey as t,tabletKey as a}from"efficient-easel/draw";import{BOX_CARD_PAD as d,isBackgroundBox as W}from"../../../../../../format/lib/content/box-background.js";import{darkenFields as X}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as j,REEL_SHAPE_LABELS as K}from"../../../../../../format/lib/reel.js";import{deviceField as r}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as v,CropIcon as u,LineBetweenIcon as G,LineSolidIcon as Y,ShadowIcon as J,StylesIcon as V,TableIcon as A,TargetIcon as z}from"efficient-easel/icons";import{boxBlockSpacingField as q,boxFillField as Q,boxColumnsFields as Z,boxShareField as $,boxSharePhoneField as oo,boxShareTabletField as eo,containerDirectionField as no,containerGapRows as to,linkField as ao,plainText as io,swapPadding as g,toggle as c,upload as O,withPanelOnly as lo}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as R,boxShapeOf as ro}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as E,BOX_COLUMNS_MIN as C,boxPhoneRowOneLine as so}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as b}from"../../../../../../format/lib/content/box-separator.js";import{VIEW_KEY_ACCESS as po,group as i,phoneTwinFields as F}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as co,boxJustifyField as mo,boxWrapField as L,placementField as So,select as s,sidesPaddingFields as N}from"../../../box-fields.js";import{withRowRules as _o}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ho}from"../../../separator-field.js";import{LOOP_SCROLLS as fo}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as uo}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as Ao,ON_A_CARD as go,cardDisplayField as Oo}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Ro,mirrorCardsField as Eo}from"../../../mirror-cards-field.js";import{SHARED_COLUMNS_KEY as l,SHARED_COLUMNS_LABEL as D,SHARED_COLUMNS_OFF as H,sharedColumnsDrawn as T,sharedColumnsFits as x,SHARED_COLUMNS_PHONE_POINTS as Co,SHARED_COLUMNS_POINTS as bo}from"../../../../../../render/lib/content/box-shared-columns.js";const Fo={field:"bgImage",set:!0},I={field:"phoneRow",in:[2,3]},Lo={field:"direction",is:"tabs"},No={field:"line",in:[!0,!1]},Do={field:"anchor",set:!0},w=["fixed","screen"],Ho={not:{any:[{field:"sectionHeightMode",in:w},{field:"sectionHeightModePhone",in:w}]}},To={context:"parent.line",is:!0},h={field:"direction",is:"row",default:"row"},p={not:fo},f={all:[h,p,{not:{field:"separator",in:b.map(o=>o.value)}},{not:{field:"line",is:!0}}]},xo={all:[f,...["columns",a("columns")].map(o=>({not:{field:o,in:Array.from({length:E},(n,_)=>_+C)}}))]},Io={all:[p,{not:{all:[h,{field:"separator",in:b.map(o=>o.value)}]}}]},k={not:{all:[f,{field:"columns",in:Array.from({length:E},(o,n)=>n+C)}]}},wo="sharedColumnsFits",P="sharedColumnsMisfit",B="sharedColumnsDraws",M="sharedColumnsPhoneDraws",ko={[wo]:o=>x(o.props??{}),[P]:o=>!x(o.props??{}),[B]:o=>T(o.props??{}).desktop,[M]:o=>T(o.props??{}).phone};function y(o){return{all:[{not:{context:P,is:!0}},{any:[go,{field:o,set:!0}]}]}}const m={not:{context:B,is:!0}},S={not:{context:M,is:!0}},Po={any:[m,S]};function Bo(o){return{...o,render:n=>o.render({...n,value:so(n.value)?"nowrap":"wrap"})}}const ae={fields:_o({_gContent:i("Content"),content:uo.content,_gCardDisplay:i("Display"),cardDisplay:Oo(),_gLayout:i("Layout"),direction:no("Flex"),tabShape:s("Tab shape",e(V,{}),j.map(o=>({label:K[o],value:o})),"tabs"),mirrorCards:Eo(),label:lo(io("Tab name")),...to("Flex"),justify:mo(),align:co(),...F("wrap",L(),void 0,{phoneRow:Bo(L())}),...F("boxShape",s("Box shape",e(u,{}),[...R],"auto"),po,{phoneRow:s("Box shape",e(u,{}),[...R],"auto",{phoneRest:o=>ro(o)})}),separator:ho(e(G,{size:18}),"none"),share:r("desktop",$()),[a("share")]:eo(),[t("share")]:oo(),[l]:r("desktop",s(D,e(A,{}),[...bo],H)),[t(l)]:r("mobile",s(D,e(A,{}),[...Co],H)),...Z(),blockSpacing:q(),line:c("Line",!1,e(Y,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,e(v,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:c("Shadow",!1,e(J,{})),fillColor:Q(),_gBackground:i("Background image"),bgImage:r("desktop",O("Image","image/*")),bgImagePhone:r("mobile",O("Image","image/*")),...X(),placement:So("Content position"),_gLink:i("Link"),link:ao("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,e(z,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],Fo],[[t("share")],{all:[I,S]}],[[l],y(l)],[[t(l)],y(t(l))],[[t("wrap")],{all:[I,p,S]}],[["phoneRow"],S],[["tabShape"],Lo],[["separator"],h],[["columns",a("columns")],f],[[a("gap")],Io],[["justify"],{all:[p,Po]}],[["wrap"],{all:[p,k,m]}],[["share"],{all:[k,m]}],[[a("share")],{all:[xo,m]}],[["line"],No],[["upcoming"],To],[["jumpHighlight"],Do],[["boxShape",a("boxShape"),t("boxShape")],Ho]]),resolveFields:(o,{fields:n})=>{const _=o.props;if(W(_.bgImage)){const U=N({fallback:{top:d.desktop,bottom:d.desktop,left:d.side,right:d.side},tablet:!0});return g(n,U)}return o.props.padV2!==!0?g(n,N({fallback:{top:24,bottom:24},tablet:!0})):n},showWhenFacts:{...Ao,...Ro,...ko}};export{ae as FlexFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as m,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as A,REEL_SHAPE_LABELS as R,REEL_SHOWN_DEFAULT as P}from"../../../../../../format/lib/reel.js";import{DEFAULT_TINT as O}from"../../../../../../format/lib/content/tint.js";import{HERO_TEXTURE_SHOWN_DEFAULT as L}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as u,HERO_ARROW_SHAPE_LABELS as H,HERO_ARROW_SHAPES as h,HERO_ARROWS_PLACEMENT_DEFAULT as w,HERO_ARROWS_SHOWN_DEFAULT as I}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as t,OpacityIcon as k,PhoneIcon as s,PlayIcon as D,SlideArrowsBareIcon as f,SlideArrowsRoundIcon as g,SlideArrowsSquareIcon as U,SlidePickerBarIcon as F,SlidePickerCardsIcon as y,SlidePickerDotsIcon as N,SlidePickerNumbersIcon as b,SlidePickerSquaresIcon as W,SquareIcon as E}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as x}from"efficient-shell/icons/efficient-looks";const C=x,B={cards:e(y,{}),dots:e(N,{}),numbers:e(b,{}),bar:e(F,{}),squares:e(W,{})},q={outline:e(g,{}),solid:e(C,{}),square:e(U,{}),bare:e(f,{})};import{colorInput as M,toggle as i}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as j,iconPickerRow as c,placementField as n,segmented as p,slider as _}from"../../../box-fields.js";import{deviceField as l,deviceNote as Y}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as v,HERO_PHONE_SIDEWAYS_LABEL as K,HERO_PHONE_UPDOWN_DEFAULT as X,HERO_PHONE_UPDOWN_LABEL as z,phoneSidewaysPoints as G,phoneUpDownPoints as J}from"../../../../../../format/lib/hero-phone-stack.js";import{heightField as S}from"../../shared-fields.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const pe={fields:{_dDevice:Y(),_gContent:o("Content"),slides:a.slides,strip:a.strip,_gStyle:o("Style"),alignment:j(),_gTexture:o("Texture"),showTexture:i("Show texture",L,e(t,{})),textureColor:M("Texture color",O),textureOpacity:_("Texture opacity",e(k,{}),0,100,1,40,"%"),_gLayout:o("Layout"),heightDesktop:S("desktop"),heightMobile:S("mobile"),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(D,{})),autoplayInterval:_("Still time per slide",e(T,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",P,e(t,{})),pickerShape:c("Slide picker shape",e(E,{}),A.map(r=>({label:R[r],value:r,picture:B[r]})),d),pickerPlacement:n("Slide picker placement",{fallback:m}),_gArrows:o("Arrows"),showArrows:i("Show arrows",I,e(t,{})),arrowsShape:c("Arrows shape",e(E,{}),h.map(r=>({label:H[r],value:r,picture:q[r]})),u),arrowsPlacement:n("Arrows placement",{fallback:w}),_gPhone:l("mobile",o("On a phone")),phoneUpDown:l("mobile",p(z,e(s,{}),J(),X)),phoneSideways:l("mobile",p(K,e(s,{}),G(),v))}};export{pe as HeroFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as m,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as A,REEL_SHAPE_LABELS as R,REEL_SHOWN_DEFAULT as O}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_SHOWN_DEFAULT as P}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as H,HERO_ARROW_SHAPE_LABELS as L,HERO_ARROW_SHAPES as u,HERO_ARROWS_PLACEMENT_DEFAULT as h,HERO_ARROWS_SHOWN_DEFAULT as w}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as I,EyeIcon as t,OpacityIcon as T,PhoneIcon as s,PlayIcon as k,SlideArrowsBareIcon as f,SlideArrowsRoundIcon as D,SlideArrowsSquareIcon as g,SlidePickerBarIcon as U,SlidePickerCardsIcon as y,SlidePickerDotsIcon as F,SlidePickerNumbersIcon as W,SlidePickerSquaresIcon as b,SquareIcon as E}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as N}from"efficient-shell/icons/efficient-looks";const C=N,x={cards:e(y,{}),dots:e(F,{}),numbers:e(W,{}),bar:e(U,{}),squares:e(b,{})},B={outline:e(D,{}),solid:e(C,{}),square:e(g,{}),bare:e(f,{})};import{toggle as i}from"../../../controls.js";import{HERO_TEXTURE_COLOR_ROW as q}from"../../hero-shared-fields.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as M,iconPickerRow as _,placementField as n,segmented as c,slider as p}from"../../../box-fields.js";import{deviceField as l,deviceNote as j}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as X,HERO_PHONE_SIDEWAYS_LABEL as Y,HERO_PHONE_UPDOWN_DEFAULT as v,HERO_PHONE_UPDOWN_LABEL as K,phoneSidewaysPoints as z,phoneUpDownPoints as G}from"../../../../../../format/lib/hero-phone-stack.js";import{heightField as S}from"../../shared-fields.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const ne={fields:{_dDevice:j(),_gContent:o("Content"),slides:a.slides,strip:a.strip,_gStyle:o("Style"),alignment:M(),_gTexture:o("Texture"),showTexture:i("Show texture",P,e(t,{})),textureColor:q,textureOpacity:p("Texture opacity",e(T,{}),0,100,1,40,"%"),_gLayout:o("Layout"),heightDesktop:S("desktop"),heightMobile:S("mobile"),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(k,{})),autoplayInterval:p("Still time per slide",e(I,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",O,e(t,{})),pickerShape:_("Slide picker shape",e(E,{}),A.map(r=>({label:R[r],value:r,picture:x[r]})),d),pickerPlacement:n("Slide picker placement",{fallback:m}),_gArrows:o("Arrows"),showArrows:i("Show arrows",w,e(t,{})),arrowsShape:_("Arrows shape",e(E,{}),u.map(r=>({label:L[r],value:r,picture:B[r]})),H),arrowsPlacement:n("Arrows placement",{fallback:h}),_gPhone:l("mobile",o("On a phone")),phoneUpDown:l("mobile",c(K,e(s,{}),G(),v)),phoneSideways:l("mobile",c(Y,e(s,{}),z(),X))}};export{ne as HeroFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{BlockVideoIcon as c,ClockIcon as p,ImageIcon as g,MediaIcon as s,OpacityIcon as u,PlayIcon as v}from"efficient-easel/icons";import{colorInput as f,focusKeptField as i,loadingShowsField as I,MEDIA_TYPE_OPTIONS as y,plainText as _,text as S,upload as a,withIdentifier as O,withPanelOnly as m}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{segmented as E,slider as t}from"../../../box-fields.js";import{LOADING_SHOWS_IMAGE as F,VIDEO_PLAYBACK_DEFAULT as P,VIDEO_SOURCE_DEFAULT as l}from"../../../../../../format/lib/hero-video.js";import{HERO_SLIDE_OVERLAY_ROWS as n,HERO_VIDEO_ROWS as d}from"../../hero-shared-fields.js";import{PH as T}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as b}from"../../shared-fields.js";import{forMediaType as L,heroMediaFields as D,VIDEO_FILE_LABEL as h,VIDEO_FILE_PROMPT as k}from"../../../../../../render/lib/document/hero-media-parts.js";import{DEFAULT_TINT as A}from"../../../../../../format/lib/content/tint.js";import{HeroSlideSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const r=L("video","video"),G={fields:D({_gContent:o("Content"),name:m(O(_("Slide name",T.slideName))),process:m(S("Reel label","Label")),groupNotice:b("HeroSlide"),groups:C.groups,_gMedia:o("Media"),mediaType:E("Type",e(s,{}),y,"video"),videoSource:d.videoSource,mediaVideo:a(h,"video/*",k,{frame:"videoFrame"}),youtubeUrl:d.youtubeUrl,videoPlayback:d.videoPlayback,videoSpeed:t("Playback speed",e(v,{}),25,100,5,100,"%"),loadingShows:I("Show while loading",e(p,{}),{frame:e(c,{}),image:e(g,{})}),videoFrame:i(),mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),poster:a("Image","image/*","Choose an image"),_gTint:o("Image tint"),tintColor:f("Tint color",A),overlay:t("Overlay",e(u,{}),0,100,5,0,"%"),_gOverlay:o("Overlay"),overlayColor:n.overlayColor,overlayPosition:n.overlayPosition},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["videoSource","videoPlayback","loadingShows","videoFrame"]},fallback:"video",rules:{mediaVideo:{all:[r,{field:"videoSource",is:"upload",default:l}]},youtubeUrl:{all:[r,{field:"videoSource",is:"youtube",default:l}]},videoSpeed:{all:[r,{field:"videoSource",is:"upload",default:l},{field:"videoPlayback",is:"background",default:P}]},poster:{all:[{field:"mediaType",is:"video",default:"video"},F]}}})};export{G as HeroSlideFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{BlockVideoIcon as c,ClockIcon as p,ImageIcon as g,MediaIcon as s,OpacityIcon as u,PlayIcon as v}from"efficient-easel/icons";import{colorInput as f,focusKeptField as i,loadingShowsField as I,MEDIA_TYPE_OPTIONS as y,plainText as _,text as S,upload as a,withIdentifier as O,withPanelOnly as m}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{segmented as E,slider as t}from"../../../box-fields.js";import{LOADING_SHOWS_IMAGE as F,VIDEO_PLAYBACK_DEFAULT as P,VIDEO_SOURCE_DEFAULT as l}from"../../../../../../format/lib/hero-video.js";import{HERO_SLIDE_OVERLAY_ROWS as n,HERO_VIDEO_ROWS as d}from"../../hero-shared-fields.js";import{PH as T}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as b}from"../../shared-fields.js";import{forMediaType as L,heroMediaFields as D,VIDEO_FILE_LABEL as h,VIDEO_FILE_PROMPT as k}from"../../../../../../render/lib/document/hero-media-parts.js";import{DEFAULT_TINT as A}from"../../../../../../format/lib/content/tint.js";import{HeroSlideSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const r=L("video","video"),G={fields:D({_gContent:o("Content"),name:m(O(_("Slide name",T.slideName))),process:m(S("Reel label","Label")),groupNotice:b("HeroSlide"),groups:C.groups,_gMedia:o("Media"),mediaType:E("Type",e(s,{}),y,"video"),videoSource:d.videoSource,mediaVideo:a(h,"video/*",k,{frame:"videoFrame"}),youtubeUrl:d.youtubeUrl,videoPlayback:d.videoPlayback,videoSpeed:t("Playback speed",e(v,{}),25,100,5,100,"%"),loadingShows:I("Show while loading",e(p,{}),{frame:e(c,{}),image:e(g,{})}),videoFrame:i(),mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),poster:a("Image","image/*","Choose an image"),_gTint:o("Image tint"),tintColor:f("Tint color",A),overlay:t("Tint",e(u,{}),0,100,5,0,"%"),_gOverlay:o("Overlay"),overlayColor:n.overlayColor,overlayPosition:n.overlayPosition},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["videoSource","videoPlayback","loadingShows","videoFrame"]},fallback:"video",rules:{mediaVideo:{all:[r,{field:"videoSource",is:"upload",default:l}]},youtubeUrl:{all:[r,{field:"videoSource",is:"youtube",default:l}]},videoSpeed:{all:[r,{field:"videoSource",is:"upload",default:l},{field:"videoPlayback",is:"background",default:P}]},poster:{all:[{field:"mediaType",is:"video",default:"video"},F]}}})};export{G as HeroSlideFields};
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as r,imageFitOptions as t,imageIsCropped as s,parseImageFit as m}from"../../../../../../format/lib/content/image-fit.js";import{ImageIcon as c}from"efficient-easel/icons";import{focusKeptField as a,imageCornersField as p,linkField as f,plainText as d,cornerSidesField as g,upload as n,withPanelOnly as F}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{select as u}from"../../../box-fields.js";import{photographyToggle as h}from"../../shared-fields.js";import{CARD_ROW_FACTS as I,cardRowField as _,cardRowFields as v}from"../../../card-row-fields.js";const O={fields:{_gImage:o("Image"),src:n("Image","image/*",void 0,{focus:"focal",focusWhen:e=>s(e.aspect,m(e.fit,"cover"))}),alt:F(d("Alt text")),rowField:_("Shows","image"),aspect:{type:"select",label:"Aspect ratio",options:[{label:"Auto",value:"auto"},{label:"21 : 9",value:"21/9"},{label:"16 : 9",value:"16/9"},{label:"4 : 3",value:"4/3"},{label:"1 : 1",value:"1/1"}]},fit:u(r,i(c,{}),t(),"cover"),focal:a(),focalPhone:a(),href:f("Link"),_gStyle:o("Style"),grayscale:h(),_gShape:o("Shape"),corners:p(),cornerSides:g()},resolveFields:(e,l)=>v(l.fields,e,l),showWhenFacts:I};export{O as ImageBlockFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as t,imageFitOptions as a,imageIsCropped as m,parseImageFit as s}from"../../../../../../format/lib/content/image-fit.js";import{ImageIcon as c}from"efficient-easel/icons";import{focusKeptField as r,imageCornersField as f,linkField as p,plainText as d,cornerSidesField as g,upload as n,withPanelOnly as F}from"../../../controls.js";import{group as l}from"efficient-easel/screen/lib/document/box-fields";import{select as u}from"../../../box-fields.js";import{photographyToggle as h}from"../../shared-fields.js";import{CARD_ROW_FACTS as I,cardRowField as _,cardRowFields as v}from"../../../card-row-fields.js";import{offerNextPicture as S}from"../../../../animation/hover-fields.js";import{darkenFields as A}from"../../../darken-fields.js";const L={fields:{_gImage:l("Image"),src:n("Image","image/*",void 0,{focus:"focal",focusWhen:e=>m(e.aspect,s(e.fit,"cover"))}),alt:F(d("Alt text")),rowField:_("Shows","image"),aspect:{type:"select",label:"Aspect ratio",options:[{label:"Auto",value:"auto"},{label:"21 : 9",value:"21/9"},{label:"16 : 9",value:"16/9"},{label:"4 : 3",value:"4/3"},{label:"1 : 1",value:"1/1"}]},fit:u(t,i(c,{}),a(),"cover"),focal:r(),focalPhone:r(),href:p("Link"),_gStyle:l("Style"),grayscale:h(),...A(),_gShape:l("Shape"),corners:f(),cornerSides:g()},resolveFields:(e,o)=>S(v(o.fields,e,o),e,o),showWhenFacts:I};export{L as ImageBlockFields};
@@ -1 +1 @@
1
- import{blockSourceField as o,blockSourceFields as s}from"../../../block-source-fields.js";import{copyText as a,text as d,upload as l}from"../../../controls.js";import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{PAYMENT_PH as m}from"../../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";const p={fields:{_gContent:r("Content"),heading:d("Heading",m.heading),dataSource:o("Methods from","Typed here"),badges:{type:"array",label:"Payment methods",arrayFields:{label:a("Name"),src:l("Logo","image/*")},getItemSummary:e=>e.label||e.src||"Method"},assurances:{type:"array",label:"Reassurance lines",arrayFields:{text:a("Line")},getItemSummary:e=>e.text||"Line"},_gLayout:r("Layout")},resolveFields:(e,{fields:t})=>s("PaymentBadges",t,e.props,{hides:["badges"]})};export{p as PaymentBadgesFields};
1
+ import{blockSourceField as r,blockSourceFields as s}from"../../../block-source-fields.js";import{copyText as a,text as l,upload as m}from"../../../controls.js";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{PAYMENT_PH as n}from"../../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";const c={fields:{_gContent:t("Content"),heading:l("Heading",n.heading),dataSource:r("Payment content","Manual"),badges:{type:"array",label:"Payment methods",arrayFields:{label:a("Name"),src:m("Logo","image/*")},getItemSummary:e=>e.label||e.src||"Method"},assurances:{type:"array",label:"Reassurance lines",arrayFields:{text:a("Line")},getItemSummary:e=>e.text||"Line"},_gLayout:t("Layout")},resolveFields:(e,{fields:o})=>s("PaymentBadges",o,e.props,{hides:["badges"]})};export{c as PaymentBadgesFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{BOX_DARKEN as t,BOX_DARKEN_STYLES as i}from"../../../../../../format/lib/content/box-background.js";import{POST_CARD_HEIGHT as o,POST_CARD_LAYOUT_FALLBACK as s,POST_CARD_LAYOUTS as p}from"../../../../../../format/lib/post-card-layout.js";import O from"../../../../../components/BlogPostSource.js";import{HeightIcon as _,ImageIcon as d,LayoutIcon as g,OpacityIcon as f,StylesIcon as C}from"efficient-easel/icons";import{NOT_BOUND_TO_POST as T,linkField as u,sourceField as S,text as a,textarea as m,toggle as R,upload as x}from"../../../controls.js";import{group as y}from"efficient-easel/screen/lib/document/box-fields";import{placementField as D,select as n,slider as l}from"../../../box-fields.js";import{withRowRules as h}from"../../../../../../render/lib/document/show-when.js";import{POSTCARD_PH as r}from"../../../../../../format/lib/document/blocks/general/PostCard/meta.js";const c={field:"layout",is:"cover"},k={not:c},A=["placement","darken","darkenStyle","minHeight","_gTint"],E=["showCover"],L=["image","title","excerpt","href"],V={fields:h({source:S(O),image:x("Cover image","image/*"),title:m("Heading",r.title),excerpt:m("Excerpt",r.excerpt),href:u("Link"),category:a("Category",r.category),date:a("Date",r.date),readLabel:a("Read time",r.readLabel),layout:n("Card layout",e(g,{}),p,s),showCover:R("Show cover image",!0,e(d,{})),placement:D("Text position"),minHeight:l("Card height",e(_,{}),o.min,o.max,o.step,o.fallback,o.unit),_gTint:y("Image tint"),darken:l("Darken",e(f,{}),t.min,t.max,t.step,t.fallback,t.unit),darkenStyle:n("Darken style",e(C,{}),i,i[0].value)},[[A,c],[E,k],[L,T]])};export{V as PostCardFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{darkenFields as m}from"../../../darken-fields.js";import{POST_CARD_HEIGHT as e,POST_CARD_LAYOUT_FALLBACK as l,POST_CARD_LAYOUTS as n}from"../../../../../../format/lib/post-card-layout.js";import c from"../../../../../components/BlogPostSource.js";import{HeightIcon as s,ImageIcon as p,LayoutIcon as d}from"efficient-easel/icons";import{NOT_BOUND_TO_POST as g,linkField as O,sourceField as _,text as r,textarea as i,toggle as C,upload as f}from"../../../controls.js";import{group as T}from"efficient-easel/screen/lib/document/box-fields";import{placementField as u,select as h,slider as x}from"../../../box-fields.js";import{withRowRules as R}from"../../../../../../render/lib/document/show-when.js";import{POSTCARD_PH as t}from"../../../../../../format/lib/document/blocks/general/PostCard/meta.js";const a={field:"layout",is:"cover"},S={not:a},L=["placement","darken","darkenStyle","minHeight","_gTint"],y=["showCover"],A=["image","title","excerpt","href"],B={fields:R({source:_(c),image:f("Cover image","image/*"),title:i("Heading",t.title),excerpt:i("Excerpt",t.excerpt),href:O("Link"),category:r("Category",t.category),date:r("Date",t.date),readLabel:r("Read time",t.readLabel),layout:h("Card layout",o(d,{}),n,l),showCover:C("Show cover image",!0,o(p,{})),placement:u("Text position"),minHeight:x("Card height",o(s,{}),e.min,e.max,e.step,e.fallback,e.unit),_gTint:T("Image tint"),...m()},[[L,a],[y,S],[A,g]])};export{B as PostCardFields};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{FieldGlyph as i}from"../../../../../components/FieldGlyph.js";import{COUNT_KEY_PROP as n}from"../../../../../../format/lib/content/block-sources.js";import{CARD_ROW_FACTS as s,cardRowField as m,cardRowFields as p}from"../../../card-row-fields.js";import{textarea as a}from"../../../controls.js";import{group as h}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as f}from"efficient-easel/screen/lib/document/style-fields";import{select as d}from"../../../box-fields.js";import{PH as g}from"../../../../../../format/lib/document/blocks/placeholders.js";import{toneField as u}from"../../shared-fields.js";import{blockAlignmentFields as x}from"../../../box-fields.js";import{consentWordsKept as c,withConsentWordsRow as w}from"../../../consent-words-field.js";import{withLiveNumberRow as b}from"../../../live-number-field.js";function F(e,o){const t=o?.textStyle;if(typeof t!="string"||!t.startsWith("heading-"))return e;const{align:v,alignPhone:H,...r}=e;return r}const K={fields:{text:a("Body",g.body),consentWords:c("text"),[n]:f("text"),...x(),tone:u(),_gText:h("Text"),rowField:m("Shows","text"),tag:d("HTML tag",l(i,{noun:"heading"}),[{label:"Paragraph",value:"p"},{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],"p")},resolveFields:(e,o)=>F(b(w(p(o.fields,e,o),e.props,"text"),e.props),e.props),showWhenFacts:s};export{K as TextFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{BlockBadgeIcon as n,BorderTopIcon as p,MediaLayoutInsetIcon as a}from"efficient-easel/icons";import{FieldGlyph as m}from"../../../../../components/FieldGlyph.js";import{COUNT_KEY_PROP as s}from"../../../../../../format/lib/content/block-sources.js";import{CARD_PLACE_PROP as d,OUTSIDE_FRAMED_CARD as l,framesItsCards as f}from"../../../../../../format/lib/content/card-place.js";import{cardTemplateOwner as h}from"../../../../../../format/lib/content/card-template.js";import{CARD_ROW_FACTS as c,cardRowField as u,cardRowFields as g}from"../../../card-row-fields.js";import{textarea as w}from"../../../controls.js";import{group as x}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as b}from"efficient-easel/screen/lib/document/style-fields";import{segmented as R,select as _}from"../../../box-fields.js";import{withShowWhen as v}from"../../../../../../format/lib/document/show-when-attach.js";import{PH as F}from"../../../../../../format/lib/document/blocks/placeholders.js";import{toneField as P}from"../../shared-fields.js";import{blockAlignmentFields as y}from"../../../box-fields.js";import{consentWordsKept as H,withConsentWordsRow as T}from"../../../consent-words-field.js";import{withLiveNumberRow as A}from"../../../live-number-field.js";function C(e,o){const t=o?.textStyle;if(typeof t!="string"||!t.startsWith("heading-"))return e;const{align:O,alignPhone:I,...i}=e;return i}const Q={fields:{text:w("Body",F.body),consentWords:H("text"),[s]:b("text"),...y(),tone:P(),_gText:x("Text"),rowField:u("Shows","text"),[d]:v(R("Place",r(n,{}),[{label:"In the card",value:"",picture:r(a,{})},{label:"On the top line",value:"top-line",picture:r(p,{})}],""),{not:{context:l,is:!0}}),tag:_("HTML tag",r(m,{noun:"heading"}),[{label:"Paragraph",value:"p"},{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],"p")},resolveFields:(e,o)=>C(A(T(g(o.fields,e,o),e.props,"text"),e.props),e.props),showWhenFacts:{...c,[l]:(e,o)=>{const t=h(o.appState,e.props?.id);return t===void 0?void 0:!f(t?.type)}}};export{Q as TextFields};
@@ -1,2 +1,2 @@
1
- export declare const assembleGeneralBlocks: () => Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", 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<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", 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<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", 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<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
@@ -4,6 +4,8 @@ export declare const HERO_OVERLAY_ROWS: {
4
4
  overlayPosition: CustomField<string>;
5
5
  };
6
6
  export declare function textureColorOfSlide(appState: unknown, slideId: unknown): string | undefined;
7
+ export declare function textureColorHint(slides: unknown): string | undefined;
8
+ export declare const HERO_TEXTURE_COLOR_ROW: CustomField<string>;
7
9
  export declare const HERO_SLIDE_OVERLAY_ROWS: {
8
10
  overlayColor: CustomField<string>;
9
11
  overlayPosition: CustomField<string>;
@@ -1 +1 @@
1
- import{jsx as r,Fragment as v}from"react/jsx-runtime";import{PlacementIcon as i,PlayIcon as P,UploadIcon as f}from"efficient-easel/icons";import{useEasel as A}from"efficient-easel/easel";import{colorInput as I,edgePad as s,plainText as L,useSelectedSibling as c}from"../controls.js";import{InheritedColourRow as C}from"../ColourControl.js";import{segmented as O}from"../box-fields.js";import{DEFAULT_TINT as R}from"../../../../format/lib/content/tint.js";import{say as d}from"../../../../format/lib/editor-words.js";import{nonEmptyString as m}from"../../../../format/lib/non-empty-string.js";import{findParentNode as T}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as p,OVERLAY_POSITION_OPTIONS as u,slideOverlayState as n}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as h,VIDEO_PLAYBACK_LABELS as D,VIDEO_PLAYBACKS as w,VIDEO_SOURCE_DEFAULT as x,VIDEO_SOURCE_LABELS as V,VIDEO_SOURCES as b}from"../../../../format/lib/hero-video.js";const Z={overlayColor:I("Overlay color",R),overlayPosition:s("Overlay position",u,p,"A corner would need a diagonal ramp, which this overlay does not draw.",r(i,{}))},y="Texture",E=o=>s("Overlay position",u,o,"A corner would need a diagonal ramp, which this overlay does not draw.",r(i,{}),void 0,y);function g(){try{const{appState:o,selectedItem:e}=A(t=>t);return U(o,e?.props?.id)}catch{return}}function U(o,e){return m(T(o,e)?.props?.textureColor)}function F({value:o,onChange:e}){const[t]=c("overlayPosition"),S=g(),l=m(o)??"",_=n({overlayColor:l,overlayPosition:t},S),a=n({overlayPosition:t});return r(C,{label:d("Overlay color"),value:l,inherited:_.color,resetTo:a.own?a.color:d(y),onChange:e,onReset:()=>e("")})}const Y=E(p),N=E("");function W(o){const[e]=c("overlayColor"),t=n({overlayColor:e,overlayPosition:o.value}).own?Y:N;return r(v,{children:t.render(o)})}const $={overlayColor:{type:"custom",render:({value:o,onChange:e})=>r(F,{value:o,onChange:e})},overlayPosition:{type:"custom",render:({value:o,onChange:e})=>r(W,{value:o,onChange:e})}},oo={videoSource:O("Source",r(f,{}),b.map(o=>({label:V[o],value:o})),x),youtubeUrl:L("YouTube link","https://youtu.be/…"),videoPlayback:O("Playback",r(P,{}),w.map(o=>({label:D[o],value:o})),h)};export{Z as HERO_OVERLAY_ROWS,$ as HERO_SLIDE_OVERLAY_ROWS,oo as HERO_VIDEO_ROWS,U as textureColorOfSlide};
1
+ import{jsx as r,Fragment as S}from"react/jsx-runtime";import{PlacementIcon as c,PlayIcon as f,UploadIcon as C}from"efficient-easel/icons";import{useEasel as R}from"efficient-easel/easel";import{colorInput as A,edgePad as u,plainText as L,useSelectedSibling as a}from"../controls.js";import{ColourRow as P,InheritedColourRow as I}from"../ColourControl.js";import{segmented as d}from"../box-fields.js";import{DEFAULT_TINT as O}from"../../../../format/lib/content/tint.js";import{say as n}from"../../../../format/lib/editor-words.js";import{nonEmptyString as i}from"../../../../format/lib/non-empty-string.js";import{findParentNode as T}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as p,OVERLAY_POSITION_OPTIONS as m,slideOverlayState as y}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as h,VIDEO_PLAYBACK_LABELS as w,VIDEO_PLAYBACKS as x,VIDEO_SOURCE_DEFAULT as g,VIDEO_SOURCE_LABELS as D,VIDEO_SOURCES as U}from"../../../../format/lib/hero-video.js";const oo={overlayColor:A("Overlay color",O),overlayPosition:u("Overlay position",m,p,"A corner would need a diagonal ramp, which this overlay does not draw.",r(c,{}))},E="Texture",_=o=>u("Overlay position",m,o,"A corner would need a diagonal ramp, which this overlay does not draw.",r(c,{}),void 0,E);function V(){try{const{appState:o,selectedItem:e}=R(t=>t);return b(o,e?.props?.id)}catch{return}}function b(o,e){return i(T(o,e)?.props?.textureColor)}function F({value:o,onChange:e}){const[t]=a("overlayPosition"),l=V(),s=i(o)??"",v=y({overlayColor:s,overlayPosition:t},l);return r(I,{label:n("Overlay color"),value:s,inherited:v.color,resetTo:n(E),onChange:e,onReset:()=>e("")})}const Y=_(p),W=_("");function N(o){const[e]=a("overlayColor"),t=y({overlayColor:e,overlayPosition:o.value}).own?Y:W;return r(S,{children:t.render(o)})}function B(o){if(!Array.isArray(o))return;const e=o.flatMap((t,l)=>i(t?.props?.overlayColor)?[l+1]:[]);if(e.length!==0)return e.length===1?n("Slide {n}: own Overlay color.",{n:e[0]}):n("Slides {n}: own Overlay color.",{n:e.join(", ")})}function H({value:o,onChange:e}){const[t]=a("slides");return r(P,{label:n("Texture color"),value:o||O,onChange:e,hint:B(t)})}const eo={type:"custom",render:({value:o,onChange:e})=>r(H,{value:o,onChange:e})},ro={overlayColor:{type:"custom",render:({value:o,onChange:e})=>r(F,{value:o,onChange:e})},overlayPosition:{type:"custom",render:({value:o,onChange:e})=>r(N,{value:o,onChange:e})}},to={videoSource:d("Source",r(C,{}),U.map(o=>({label:D[o],value:o})),g),youtubeUrl:L("YouTube link","https://youtu.be/…"),videoPlayback:d("Playback",r(f,{}),x.map(o=>({label:w[o],value:o})),h)};export{oo as HERO_OVERLAY_ROWS,ro as HERO_SLIDE_OVERLAY_ROWS,eo as HERO_TEXTURE_COLOR_ROW,to as HERO_VIDEO_ROWS,B as textureColorHint,b as textureColorOfSlide};
@@ -24,6 +24,7 @@ export type PartTyping = {
24
24
  };
25
25
  export declare function partTypingTarget(partId: string, deps: PartTypingDeps): PartTyping | null;
26
26
  export declare function partElement(last: Pick<HTMLElement, "isConnected" | "getAttribute"> | null, doc: Pick<Document, "querySelector"> | null, partId: string): HTMLElement | null;
27
+ export declare function cssString(value: string): string;
27
28
  export declare function keysOnCanvas(doc: Pick<Document, "activeElement">): boolean;
28
29
  export declare function canvasTypingPart(): string | null;
29
30
  export declare function setCanvasTypingPart(partId: string | null): void;
@@ -1 +1 @@
1
- import{useSyncExternalStore as g}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{linkedCount as O}from"../../../format/lib/content/count-numbers.js";import{SHOP_MARKUP as R}from"../../../format/lib/markup.js";import{readHidable as S,textFieldOffPage as k}from"./controls.js";import{decodePartId as v}from"efficient-easel/draw";import{canTypeOnCanvas as K,PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as C}from"./part-row-field.js";import{decodePartKey as b,partRowValue as A}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as E,typeInPlaceKind as _}from"../../../render/lib/document/part-text.js";import{commitPartText as w}from"./part-typing.js";import{consentWordsOf as F}from"../../../format/lib/content/consent-banner.js";import{KICKER_NUMBER_ATTR as I}from"../../../render/lib/content/page-contents.js";const B=`[${I}]`,L=["bold","italic","underline","strike","link","sup","sub"],M=["bullet","number"];function $(e,t){return e?[...L,...t?M:[]]:[]}function T(e,t){const r=v(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=t.getItemById(u),c=t.getSelectorForId(u);if(!o||!c)return null;const{key:n,row:i}=b(s),a=t.components[o.type]?.fields?.[n],d=i?C(a,i):a,m=_(d);if(!m)return null;const l=o.props??{};if(F(l)!==null||!i&&P(o.type,l,n)||o.type==="Text"&&n==="text"&&O(l)||i&&!(Array.isArray(l[n])&&i.index<l[n].length))return null;const x=i?A(l[n],i):l[n];return{node:o,selector:c,propKey:s,kind:m,stored:x,offPage:k(d)}}function ee(e,t){const r=T(e,t);if(!r)return null;const{text:u,hidden:s}=S(r.stored);if(!K({offPage:r.offPage,hidden:!!s}))return null;const o=E(r.kind);return{partId:e,value:u,rules:R,multiline:o,skip:B,offered:$(r.kind!=="plainText",o),write:c=>{const n=T(e,t);n&&w({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},c,t.replace)}}}function te(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${h(r)}"]`)??null}function h(e){return e.replace(/["\\]/g,"\\$&")}function ne(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let f=null;const p=new Set;function N(){return f}function re(e){if(e!==f){f=e;for(const t of p)t()}}function W(e){return p.add(e),()=>{p.delete(e)}}function oe(){return g(W,N,()=>null)}export{N as canvasTypingPart,ne as keysOnCanvas,te as partElement,$ as partTextTools,ee as partTypingTarget,re as setCanvasTypingPart,W as subscribeCanvasTypingPart,oe as useCanvasTypingPart};
1
+ import{useSyncExternalStore as g}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{linkedCount as O}from"../../../format/lib/content/count-numbers.js";import{SHOP_MARKUP as R}from"../../../format/lib/markup.js";import{readHidable as S,textFieldOffPage as k}from"./controls.js";import{decodePartId as v}from"efficient-easel/draw";import{canTypeOnCanvas as K,PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as C}from"./part-row-field.js";import{decodePartKey as b,partRowValue as A}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as E,typeInPlaceKind as _}from"../../../render/lib/document/part-text.js";import{commitPartText as w}from"./part-typing.js";import{consentWordsOf as F}from"../../../format/lib/content/consent-banner.js";import{KICKER_NUMBER_ATTR as I}from"../../../render/lib/content/page-contents.js";const B=`[${I}]`,L=["bold","italic","underline","strike","link","sup","sub"],M=["bullet","number"];function $(e,t){return e?[...L,...t?M:[]]:[]}function T(e,t){const r=v(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=t.getItemById(u),c=t.getSelectorForId(u);if(!o||!c)return null;const{key:n,row:i}=b(s),a=t.components[o.type]?.fields?.[n],d=i?C(a,i):a,m=_(d);if(!m)return null;const l=o.props??{};if(F(l)!==null||!i&&P(o.type,l,n)||o.type==="Text"&&n==="text"&&O(l)||i&&!(Array.isArray(l[n])&&i.index<l[n].length))return null;const x=i?A(l[n],i):l[n];return{node:o,selector:c,propKey:s,kind:m,stored:x,offPage:k(d)}}function ee(e,t){const r=T(e,t);if(!r)return null;const{text:u,hidden:s}=S(r.stored);if(!K({offPage:r.offPage,hidden:!!s}))return null;const o=E(r.kind);return{partId:e,value:u,rules:R,multiline:o,skip:B,offered:$(r.kind!=="plainText",o),write:c=>{const n=T(e,t);n&&w({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},c,t.replace)}}}function te(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${h(r)}"]`)??null}function h(e){return e.replace(/["\\]/g,"\\$&")}function ne(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let f=null;const p=new Set;function N(){return f}function re(e){if(e!==f){f=e;for(const t of p)t()}}function W(e){return p.add(e),()=>{p.delete(e)}}function oe(){return g(W,N,()=>null)}export{N as canvasTypingPart,h as cssString,ne as keysOnCanvas,te as partElement,$ as partTextTools,ee as partTypingTarget,re as setCanvasTypingPart,W as subscribeCanvasTypingPart,oe as useCanvasTypingPart};
@@ -0,0 +1,12 @@
1
+ import type { CanvasCopyPlace, CanvasCopyText } from "efficient-easel/easel";
2
+ import type { CopyItemRequest } from "efficient-easel/screen";
3
+ import { type PartTyping, type PartTypingDeps } from "./canvas-typing.js";
4
+ type CopyAt = Omit<CanvasCopyPlace, "count"> & {
5
+ count?: number;
6
+ };
7
+ export declare function copyRowPart(copy: CopyAt, deps: PartTypingDeps): string | null;
8
+ export declare function copyRowTarget(copy: CopyAt, deps: PartTypingDeps): PartTyping | null;
9
+ export declare function copyRowValue(copy: CopyAt, deps: PartTypingDeps): string | undefined;
10
+ export declare function writeCopyText(edit: CanvasCopyText, deps: PartTypingDeps): boolean;
11
+ export declare function copyItemWrite(request: CopyItemRequest, deps: PartTypingDeps): boolean;
12
+ export {};
@@ -0,0 +1 @@
1
+ import{encodePartId as u}from"efficient-easel/draw";import{insertAt as d,moveTo as p,removeAt as m}from"efficient-easel/fields";import{declaredBlockSource as w}from"../../../format/lib/content/block-sources.js";import{cardTemplateTypedRows as x,rowFieldOf as y}from"../../../format/lib/content/card-template.js";import{partTypingTarget as I}from"./canvas-typing.js";import{encodePartKey as g}from"../../../format/lib/document/part-key.js";function c(e,t){if(e.outer)return null;const r=t.getItemById(e.ownerId);if(!r)return null;const o=x(r.type);return!o||w(r.props)?null:{node:r,rows:o}}function A(e,t){const r=c(e,t),o=t.getItemById(e.nodeId);if(!r||!o)return null;const l=y(o.type,o.props,e.key);if(!l)return null;const n=r.node.props[r.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:u(e.ownerId,g(r.rows,{index:e.index,rowKey:l}))}function f(e,t){const r=A(e,t);return r?I(r,t):null}function R(e,t){return f(e,t)?.value}function B(e,t){const r=f(e,t);return r?(r.write(e.text),!0):!1}function E(e,t){const r=c(e,t),o=r&&t.getSelectorForId(e.ownerId);if(!r||!o)return!1;const l=r.node.props,n=l[r.rows],i=e.index;if(!Array.isArray(n)||i<0||i>=n.length)return!1;let s;switch(e.action){case"addAfter":{const a=t.components[r.node.type]?.fields?.[r.rows];s=d(n,i+1,{...a?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{const a=e.action==="moveEarlier"?i-1:i+1;if(a<0||a>=n.length)return!1;s=p(n,i,a);break}case"delete":s=m(n,i);break;default:return!1}return t.replace(o.zone,o.index,{...r.node,props:{...l,[r.rows]:s}}),!0}export{E as copyItemWrite,A as copyRowPart,f as copyRowTarget,R as copyRowValue,B as writeCopyText};
@@ -17,10 +17,15 @@ export declare function cardDisplayItems(card: Card, label: (child: Child) => st
17
17
  shown: boolean;
18
18
  }[];
19
19
  export declare function withChildShown<C extends Card>(card: C, id: string, shown: boolean): C;
20
- export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string): string;
21
- export declare function CardDisplayChips({ card, ownerType, labelOf, write, readOnly, }: {
20
+ type ChipOwner = {
21
+ type?: unknown;
22
+ props?: Record<string, unknown>;
23
+ } | null | undefined;
24
+ export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner): string;
25
+ export declare function CardDisplayChips({ card, ownerType, owner, labelOf, write, readOnly, }: {
22
26
  card: Card;
23
27
  ownerType: string | undefined;
28
+ owner?: ChipOwner;
24
29
  labelOf: (type: string) => string;
25
30
  write: (next: (latest: Card) => Card) => void;
26
31
  readOnly?: boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as R}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return R(n)?n:[]}const m=e=>!!e.props?._hidden;function x(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?x(t,n):n(t)?[]:[t])}function P(e,n,t){const i=x(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,M as ON_A_CARD,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,x as cardDisplayParts,w as withChildShown};
1
+ "use client";import{jsx as d}from"react/jsx-runtime";import{isNodeList as N}from"efficient-easel/data";import{useEasel as O}from"efficient-easel/easel";import{slotChildName as g,slotChildRowName as h}from"efficient-easel/draw";import{cardTemplateCardOwner as _,cardTemplateField as D,namedRowField as S}from"../../../format/lib/content/card-template.js";import{DisplayRow as C,useSelectedPatch as T}from"./controls.js";import{websiteNodeIsLocked as b}from"./locked-blocks.js";import{stripMarkup as A}from"../../../format/lib/markup.js";import{sourceRowName as E}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as F}from"../../../format/lib/document/show-when-attach.js";import{deviceField as L}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as M}from"efficient-easel/screen/lib/document/panel-no-control-mark";const x="notCardOfTemplate",P={not:{context:x,is:!0}},Z={[x]:(e,n)=>{const t=_(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function m(e){const n=e.props?.content;return N(n)?n:[]}const c=e=>!!e.props?._hidden;function R(e,n=()=>!1){return m(e).flatMap(t=>typeof t?.props?.id!="string"?[]:m(t).length&&!c(t)?R(t,n):n(t)?[]:[t])}function k(e,n,t){const p=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(p.map(r=>r.name)),a=new Set;return p.map(({child:r,name:i})=>{let u=i;if(a.has(i)){let o=2;for(;s.has(`${i} ${o}`);)o+=1;u=`${i} ${o}`,s.add(u)}return a.add(i),{id:r.props.id,label:u,shown:!c(r)}})}function w(e,n){return m(e).flatMap(t=>c(t)?n(t)?[]:[t,...w(t,n)]:w(t,n))}function y(e,n,t){const p=m(e);let s=!1;const a=p.map(r=>{if(s)return r;let i;if(r?.props?.id===n){if(t?!("_hidden"in r.props):c(r))return r;const{_hidden:u,...o}=r.props;i={...r,props:t?o:{...o,_hidden:!0}}}else i=y(r,n,t);return s=i!==r,i});return s?{...e,props:{...e.props,content:a}}:e}function $(e,n,t,p){return g(e).trim()?t(e):D(n,S(e.props),p)?.label??t(e)}const B="This page is read-only.";function I({card:e,ownerType:n,owner:t,labelOf:p,write:s,readOnly:a}){const r=o=>h(o,p,A,void 0,E),i=o=>b(o.type,o),u=k(e,o=>$(o,n,r,t),i);return u.length?d(C,{parts:u,changed:u.some(o=>!o.shown),shown:o=>u.find(f=>f.id===o)?.shown??!0,disabledReason:a?B:void 0,onPress:(o,f)=>s(l=>y(l,o,f)),onReset:()=>s(o=>w(o,i).reduce((f,l)=>y(f,String(l.props.id),!0),o))}):d(M,{})}function j(){try{const e=O(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const p=_(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof p?.type=="string"?p.type:void 0,owner:p}}catch{return null}}function v({readOnly:e}){const n=j(),t=T();return n?d(I,{...n,readOnly:e,write:p=>{e||t(s=>{const a={...n.card,props:s},r=p(a);return r===a?null:{content:r.props.content}})}}):d(C,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function ee(){return F(L("desktop",{type:"custom",render:({readOnly:e})=>d(v,{readOnly:e})}),P)}export{Z as CARD_BOX_FACTS,I as CardDisplayChips,x as NOT_CARD_OF_TEMPLATE,P as ON_A_CARD,$ as cardChipLabel,ee as cardDisplayField,k as cardDisplayItems,R as cardDisplayParts,y as withChildShown};
@@ -1 +1 @@
1
- import{jsx as R}from"react/jsx-runtime";import{ListIcon as _}from"efficient-easel/icons";import{FieldGlyph as k}from"../../components/FieldGlyph.js";import{cardTemplateFields as A,cardTemplateOwner as x}from"../../../format/lib/content/card-template.js";import{select as C}from"./box-fields.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";const b="outsideCardTemplate",S={not:{context:b,is:!0}},I={[b]:(t,e)=>{const n=x(e.appState,t.props?.id);return n===void 0?void 0:n===null}};function K(t,e){const n=e==="link"?R(k,{noun:"link"}):R(_,{}),r={...C(t,n,[{label:"Typed here",value:""}],""),cardRowKind:e};return E(r,S)}function g(t){return!!(t&&typeof t=="object"&&"cardRowKind"in t)}const h=new WeakMap;function L(t,e,n){const r=Object.keys(t).filter(o=>g(t[o]));if(!r.length)return t;const a=e.props??{},w=x(n.appState,a.id),i=typeof w?.type=="string"?w.type:"",p=r.map(o=>typeof a[o]=="string"?a[o].trim():""),f=`${i}\0${p.join("\0")}`;let s=h.get(t);s||h.set(t,s=new Map);const y=s.get(f);if(y)return y;const l={...t};return r.forEach((o,u)=>{const d=t[o],T=i?A(i,d.cardRowKind):[],m=p[u]&&!T.some(c=>c.key===p[u])?p[u]:"";l[o]={...d,options:[...d.options,...T.map(c=>({label:c.label,value:c.key})),...m?[{label:m,value:m}]:[]]}}),s.set(f,l),l}export{I as CARD_ROW_FACTS,S as IN_CARD_TEMPLATE,b as OUTSIDE_CARD_TEMPLATE,K as cardRowField,L as cardRowFields};
1
+ import{jsx as T}from"react/jsx-runtime";import{ListIcon as h}from"efficient-easel/icons";import{FieldGlyph as _}from"../../components/FieldGlyph.js";import{cardTemplateFieldsOf as A,cardTemplateOwner as x}from"../../../format/lib/content/card-template.js";import{blockSourcesRevision as C,declaredBlockSource as E}from"../../../format/lib/content/block-sources.js";import{select as g}from"./box-fields.js";import{withShowWhen as j}from"../../../format/lib/document/show-when-attach.js";const b="outsideCardTemplate",F={not:{context:b,is:!0}},W={[b]:(o,e)=>{const n=x(e.appState,o.props?.id);return n===void 0?void 0:n===null}};function B(o,e){const n=e==="link"?T(_,{noun:"link"}):T(h,{}),r={...g(o,n,[{label:"Typed here",value:""}],""),cardRowKind:e};return j(r,F)}function O(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const k=new WeakMap;function P(o,e,n){const r=Object.keys(o).filter(t=>O(o[t]));if(!r.length)return o;const i=e.props??{},c=x(n.appState,i.id),w=typeof c?.type=="string"?c.type:"",p=r.map(t=>typeof i[t]=="string"?i[t].trim():""),S=E(c?.props),f=`${w}\0${S}\0${C()}\0${p.join("\0")}`;let s=k.get(o);s||k.set(o,s=new Map);const y=s.get(f);if(y)return y;const l={...o};return r.forEach((t,u)=>{const d=o[t],R=w?A(c,d.cardRowKind):[],m=p[u]&&!R.some(a=>a.key===p[u])?p[u]:"";l[t]={...d,options:[...d.options,...R.map(a=>({label:a.label,value:a.key})),...m?[{label:m,value:m}]:[]]}}),s.set(f,l),l}export{W as CARD_ROW_FACTS,F as IN_CARD_TEMPLATE,b as OUTSIDE_CARD_TEMPLATE,B as cardRowField,P as cardRowFields};
@@ -193,6 +193,7 @@ export declare function cardShapeFields(): Record<string, unknown>;
193
193
  export declare function boxShareField(points?: readonly (typeof BOX_SHARE_POINTS)[number][], fallback?: string): CustomField<string>;
194
194
  export declare function boxBlockSpacingField(): SelectField;
195
195
  export declare function boxSharePhoneField(): CustomField<string>;
196
+ export declare function boxShareTabletField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
196
197
  export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
197
198
  export declare function boxColumnsFields(): {
198
199
  phoneRow: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;