efficient-web-builder 54.0.0 → 55.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/editor/components/BlockGapField.js +1 -1
  3. package/dist/editor/components/CornersField.js +1 -1
  4. package/dist/editor/components/SectionWidthRows.d.ts +2 -1
  5. package/dist/editor/components/SectionWidthRows.js +1 -1
  6. package/dist/editor/components/SideSpaceField.js +1 -1
  7. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/CardList/fields.d.ts +2 -0
  10. package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -0
  11. package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  20. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  21. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +29 -2
  22. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/shared-fields.d.ts +1 -5
  24. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  25. package/dist/editor/lib/document/box-accordion-seed.d.ts +3 -0
  26. package/dist/editor/lib/document/box-accordion-seed.js +1 -0
  27. package/dist/editor/lib/document/box-fields.d.ts +11 -0
  28. package/dist/editor/lib/document/box-fields.js +1 -1
  29. package/dist/editor/lib/document/card-row-fields.js +1 -1
  30. package/dist/editor/lib/document/controls.d.ts +3 -1
  31. package/dist/editor/lib/document/controls.js +1 -1
  32. package/dist/editor/lib/document/field-groups.js +1 -1
  33. package/dist/editor/lib/document/mirror-cards-field.d.ts +1 -0
  34. package/dist/editor/lib/document/mirror-cards-field.js +1 -1
  35. package/dist/editor/lib/document/passes/inspector.js +1 -1
  36. package/dist/editor/lib/document/section-own-width-fields.d.ts +4 -0
  37. package/dist/editor/lib/document/section-own-width-fields.js +1 -0
  38. package/dist/editor/lib/document/shape-picker.d.ts +8 -0
  39. package/dist/editor/lib/document/shape-picker.js +1 -1
  40. package/dist/format/lib/content/block-align.d.ts +4 -1
  41. package/dist/format/lib/content/block-align.js +1 -1
  42. package/dist/format/lib/content/box-background.d.ts +19 -0
  43. package/dist/format/lib/content/box-background.js +1 -1
  44. package/dist/format/lib/content/box-layout.d.ts +7 -0
  45. package/dist/format/lib/content/box-layout.js +1 -1
  46. package/dist/format/lib/content/box-phone-place.d.ts +3 -3
  47. package/dist/format/lib/content/box-phone-place.js +1 -1
  48. package/dist/format/lib/content/box-separator.js +1 -1
  49. package/dist/format/lib/content/box-shadow.d.ts +4 -0
  50. package/dist/format/lib/content/box-shadow.js +1 -1
  51. package/dist/format/lib/content/box-shape.d.ts +1 -1
  52. package/dist/format/lib/content/box-shape.js +1 -1
  53. package/dist/format/lib/content/card-state.d.ts +2 -0
  54. package/dist/format/lib/content/card-state.js +1 -1
  55. package/dist/format/lib/content/card-template.d.ts +11 -2
  56. package/dist/format/lib/content/card-template.js +1 -1
  57. package/dist/format/lib/content/container-direction.d.ts +1 -1
  58. package/dist/format/lib/content/container-direction.js +1 -1
  59. package/dist/format/lib/content/gallery-card-layout.d.ts +16 -1
  60. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  61. package/dist/format/lib/content/image-aspect.d.ts +2 -0
  62. package/dist/format/lib/content/image-aspect.js +1 -1
  63. package/dist/format/lib/content/page-width.d.ts +3 -0
  64. package/dist/format/lib/content/page-width.js +1 -1
  65. package/dist/format/lib/content/phone-focus.js +1 -1
  66. package/dist/format/lib/content/picture-focus-rows.js +1 -0
  67. package/dist/format/lib/content/section-height.d.ts +31 -2
  68. package/dist/format/lib/content/section-height.js +1 -1
  69. package/dist/format/lib/content/section-min-height.d.ts +2 -1
  70. package/dist/format/lib/content/section-min-height.js +1 -1
  71. package/dist/format/lib/content/section-width.d.ts +38 -1
  72. package/dist/format/lib/content/section-width.js +1 -1
  73. package/dist/format/lib/content/site-gutter.d.ts +2 -0
  74. package/dist/format/lib/content/site-gutter.js +1 -1
  75. package/dist/format/lib/content/view-overrides.d.ts +7 -0
  76. package/dist/format/lib/content/view-overrides.js +1 -0
  77. package/dist/format/lib/content/view-var-split.d.ts +11 -0
  78. package/dist/format/lib/content/view-var-split.js +1 -0
  79. package/dist/format/lib/document/blocks/general/CardList/item-seed.d.ts +4 -0
  80. package/dist/format/lib/document/blocks/general/CardList/item-seed.js +1 -0
  81. package/dist/format/lib/document/blocks/general/CardList/meta.d.ts +8 -0
  82. package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -0
  83. package/dist/format/lib/document/blocks/general/Flex/meta.d.ts +4 -0
  84. package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
  85. package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
  86. package/dist/format/lib/document/blocks/general/metas.js +1 -1
  87. package/dist/format/lib/document/general-order.d.ts +1 -1
  88. package/dist/format/lib/document/general-order.js +1 -1
  89. package/dist/format/lib/document/passes/types.d.ts +3 -0
  90. package/dist/format/lib/document/section-catalog.js +1 -1
  91. package/dist/format/lib/editor-words-catalogue.d.ts +12 -0
  92. package/dist/format/lib/editor-words-catalogue.js +5 -5
  93. package/dist/format/lib/fit-words.d.ts +8 -0
  94. package/dist/format/lib/fit-words.js +23 -12
  95. package/dist/format/lib/markup.d.ts +1 -0
  96. package/dist/format/lib/markup.js +2 -2
  97. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  98. package/dist/format/lib/sections/intro-bleed-layout.d.ts +1 -0
  99. package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
  100. package/dist/format/lib/source-rules/padding-units-declared.d.ts +2 -0
  101. package/dist/format/lib/source-rules/padding-units-declared.js +6 -0
  102. package/dist/render/components/AccordionMark.d.ts +4 -0
  103. package/dist/render/components/AccordionMark.js +1 -0
  104. package/dist/render/components/BoxAccordionRow.d.ts +7 -0
  105. package/dist/render/components/BoxAccordionRow.js +1 -0
  106. package/dist/render/components/BoxTabPaneContext.d.ts +3 -1
  107. package/dist/render/components/BoxTabPaneContext.js +1 -1
  108. package/dist/render/components/BoxTabs.js +1 -1
  109. package/dist/render/components/ButtonBlock.d.ts +1 -0
  110. package/dist/render/components/ButtonBlock.js +1 -1
  111. package/dist/render/components/CardRowContext.d.ts +3 -2
  112. package/dist/render/components/CardRowContext.js +1 -1
  113. package/dist/render/components/Divider.js +1 -1
  114. package/dist/render/components/Eyebrow.d.ts +2 -1
  115. package/dist/render/components/Eyebrow.js +1 -1
  116. package/dist/render/components/FAQ.js +1 -1
  117. package/dist/render/components/Flex.d.ts +20 -2
  118. package/dist/render/components/Flex.js +1 -1
  119. package/dist/render/components/HeroSection.d.ts +4 -1
  120. package/dist/render/components/HeroSection.js +1 -1
  121. package/dist/render/components/HeroSingle.d.ts +4 -1
  122. package/dist/render/components/HeroSingle.js +1 -1
  123. package/dist/render/components/HeroSlide.d.ts +1 -0
  124. package/dist/render/components/HeroSlide.js +1 -1
  125. package/dist/render/components/ImageBlock.js +1 -1
  126. package/dist/render/components/IntroBleed.js +1 -1
  127. package/dist/render/components/LogoBlock.d.ts +1 -0
  128. package/dist/render/components/LogoBlock.js +1 -1
  129. package/dist/render/components/Logos.js +1 -1
  130. package/dist/render/components/ProcessSteps.d.ts +1 -0
  131. package/dist/render/components/ProcessSteps.js +1 -1
  132. package/dist/render/components/SiteGutterFrame.d.ts +18 -1
  133. package/dist/render/components/SiteGutterFrame.js +1 -1
  134. package/dist/render/components/Split.d.ts +2 -1
  135. package/dist/render/components/Split.js +1 -1
  136. package/dist/render/components/Text.d.ts +2 -1
  137. package/dist/render/components/Text.js +1 -1
  138. package/dist/render/components/TitleWithButtons.d.ts +2 -1
  139. package/dist/render/components/TitleWithButtons.js +1 -1
  140. package/dist/render/lib/content/block-size.d.ts +2 -6
  141. package/dist/render/lib/content/block-size.js +1 -1
  142. package/dist/render/lib/content/box-shared-columns.d.ts +2 -2
  143. package/dist/render/lib/content/box-shared-columns.js +1 -1
  144. package/dist/render/lib/content/box-stack-line.d.ts +15 -0
  145. package/dist/render/lib/content/box-stack-line.js +1 -0
  146. package/dist/render/lib/content/button-look.js +1 -1
  147. package/dist/render/lib/content/empty-hides.d.ts +8 -0
  148. package/dist/render/lib/content/empty-hides.js +1 -0
  149. package/dist/render/lib/content/section-edge.d.ts +1 -1
  150. package/dist/render/lib/content/section-edge.js +1 -1
  151. package/dist/render/lib/content/section-padding.d.ts +17 -3
  152. package/dist/render/lib/content/section-padding.js +1 -1
  153. package/dist/render/lib/content/view-values.d.ts +1 -7
  154. package/dist/render/lib/content/view-values.js +1 -1
  155. package/dist/render/lib/document/blocks/general/CardList/render.d.ts +2 -0
  156. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -0
  157. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  158. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  159. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  160. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  161. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  162. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  163. package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
  164. package/dist/render/lib/document/blocks/general/renders.js +1 -1
  165. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
  166. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  167. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  168. package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
  169. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  170. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  171. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  172. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  173. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  174. package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
  175. package/dist/render/lib/document/head-core-boxes.js +1 -0
  176. package/dist/render/lib/document/page-render.js +1 -1
  177. package/dist/render/lib/document/passes/block-size.js +1 -1
  178. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  179. package/dist/render/lib/document/passes/head-core.d.ts +3 -0
  180. package/dist/render/lib/document/passes/head-core.js +1 -0
  181. package/dist/render/lib/document/passes/index.js +1 -1
  182. package/dist/render/lib/document/passes/section-theme.js +1 -1
  183. package/dist/render/lib/document/passes/section-width.js +1 -1
  184. package/dist/render/lib/sections/section-to-box.js +1 -1
  185. package/package.json +5 -5
  186. package/dist/render/lib/content/picture-focus-rows.js +0 -1
  187. /package/dist/{render → format}/lib/content/picture-focus-rows.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 55.1.0 - 2026-11-06
4
+
5
+ From main at `868416f8`: #548, #550, #553, #530. A minor: additions only, no `!` in any title. The peers stay `efficient-easel` `^28.2.0` and `efficient-shell` `^12.13.0`. No declared export is removed (`CardRowFieldKind` gains `"list"`; the Box phone-place class strings gain their Card list twin). No stored key or value moves.
6
+
7
+ **For hosts:** a Box's view Fill and Darken (#548) draw with the efficient-storefront-blocks site sheet rules of #389 (`sf-fill-tablet|phone`, `sf-wash-tablet|phone`); take that blocks release with this one. Byte pins recorded before #530 can read a draw back without the Card list half through `withoutBoxItemsHalf`.
8
+
9
+ ### Added
10
+
11
+ - **Text fit and Min font take a Tablet value; a Box's Fill colour, Darken and Darken style take a Tablet and a Phone value** (#548). New optional keys `textFitTablet`, `minFontTablet`, `fillColorTablet`, `fillColorPhone`, `darkenTablet`, `darkenPhone`, `darkenStyleTablet`, `darkenStylePhone`. A node with no view value draws the same bytes; the inline fit boot script reads the tablet attributes.
12
+ - **A Card list part for card templates** (#530). It draws its own template once per item of a `list` field of the card's row, with a seed (one Box with one Text that shows the item's `label`). A Box's rules reach the items through a twin class for `[data-sf-box-items]` (`BOX_ITEMS_ATTR`); main's classes keep their bytes. New exports `withoutBoxItemsHalf`, `CARD_STATE_UNDER_LINE_CLASS`, type `CardStateLine`; `CardTemplateRows` takes `stateLine` (`frame`, the default, or `under`).
13
+ - **A new Breadcrumb or DocBody insert draws as a Box** (#553). Stored nodes do not change (`SECTION_TO_BOX_ON` stays empty). A long Breadcrumb trail wraps.
14
+
15
+ ### Changed
16
+
17
+ - **One guard: every catalog section has a Box path, or a named owner** (#550). `scripts/test-every-section-has-a-box-path.tsx` with its baseline replaces `test-section-to-box` §5. Test and comment changes only; built `dist/` is byte-identical.
18
+
19
+ ## 55.0.0 - 2026-11-06
20
+
21
+ From main at `a21fd3f8`: #518, #532, #534, #538, #540, #541, #542, #543, #545, #546, #547, #549. A major because the peers rise to `efficient-easel` `^28.2.0` (was `^27.7.0`; #532 to ^28.1.0, #545 to ^28.2.0) and `efficient-shell` `^12.13.0` (was `^11.8.0`) (#532), and a declared export is removed and a module moves (#541). No stored key or value moves.
22
+
23
+ **BREAKING for hosts:** install `efficient-easel` 28.2.0 or newer and `efficient-shell` 12.13.0 or newer with this release (#532, #545). The Box view classes of #545 draw with the efficient-storefront-blocks 0.85.0 site sheet (#385). Stop importing `alignPhoneClass` (removed) and import `picture-focus-rows` from `format/` instead of `render/lib/content/` (#541).
24
+
25
+ ### Added
26
+
27
+ - **A Box can draw its rows as an accordion** (#532). `Direction` gets the value `accordion` (not on a Slide box). Each child Box draws a native `<details>` with a `rowTitle` slot for its title.
28
+ - **Block and text alignment take a tablet value** (#541).
29
+ - **Every section has its own two width rows** (#518): own keys `sectionBackgroundWidth`, `sectionContentWidth`, `sectionContentMax`; new exports `INTRO_EDGE_CLASS`, `NO_WIDTH_ROWS`.
30
+ - **A hero's Height takes a ratio or px, per view** (#534): stored keys `heightFixed`, `heightFixedTablet`, `heightFixedMobile`; the vh numbers keep their meaning.
31
+ - **A Box's Justify, Item alignment, Wrap, Block spacing and Shadow take a Tablet and a Phone value** (#545), as twin rows (easel `phoneTwinFields`).
32
+ - **Stacks below moves a one-row Box's four lines to one** (#549).
33
+ - **The Article Body block is in the service set** (#546), so the storefront blocks can register it.
34
+ - **Padding in px, % and vw** (#542): each view stores its own unit (`sectionPaddingUnit` and its tablet and phone twins), drawn through easel `sideLengthAt`.
35
+
36
+ ### Fixed
37
+
38
+ - **A card template draws as the built-in row it replaces** (#540), in every card template.
39
+ - **A head-only section-to-Box move keeps the head size** (#538): `titleSize` is carried, not dropped.
40
+ - **A head over an empty core hides its whole Box** (#547).
41
+ - **A section inside a Box pays the site's Side space once** (#543): a section that is not a frame of its own no longer adds its own side space inside a Box frame that already drew the site gutter.
42
+
3
43
  ## 54.0.0 - 2026-11-06
4
44
 
5
45
  From main at `55be615c`: #536. A major because the `efficient-easel` peer rises from `^27.6.0` to `^27.7.0` (#536). No declared export is removed. `efficient-shell` stays at `^11.8.0`. No stored key or value moves (0 stored `orderPhone` on the US tenant).
@@ -1 +1 @@
1
- "use client";import{jsx as n}from"react/jsx-runtime";import{SettingsDefaultReset as u,SettingsField as d}from"efficient-easel/panel";import{AlignSeparateIcon as h}from"efficient-easel/icons";import{CONTAINER_GAP_BUILT_IN as m,SITE_BLOCK_GAP as i,halfDesktopGap as f,normalizeSiteBlockGap as _}from"../../format/lib/content/container-gap.js";import{say as o,editorEaselWords as g}from"../../format/lib/editor-words.js";import{Slider as k}from"../lib/document/controls.js";import{siteTwinRow as b}from"../../format/lib/site-twin-row.js";const B="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",G="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",s="Block gap",r=m.Grid;function S(a,e){return b(a,{desktop:{key:"block_gap",value:e.gap,followsPx:null},phone:{key:"block_gap_phone",value:e.phone,followsPx:e.gap===null?null:f(e.gap)}})}function w({value:a,onChange:e,showHint:c=!0,followsPx:l=null}){const t=a===null,p=l===null?null:`${l}px`;return n(d,{label:o(s),labelId:"sf-block-gap",icon:n(h,{}),value:t?p??o("Default"):`${a}px`,changed:!t,action:n(u,{words:g()?.panel,label:o(s),changed:!t,detail:p??o("each block's own spacing"),onReset:()=>e(null)}),hint:c?o(p===null?B:G):void 0,children:n(k,{min:i.min,max:i.max,step:i.step,value:a??(l===null?r:_(l)??r),readout:!1,ariaLabel:o(s),onChange:e})})}export{S as blockGapRow,w as default};
1
+ "use client";import{jsx as a}from"react/jsx-runtime";import{SettingsDefaultReset as d,SettingsField as h}from"efficient-easel/panel";import{AlignSeparateIcon as m}from"efficient-easel/icons";import{CONTAINER_GAP_BUILT_IN as _,SITE_BLOCK_GAP as t,halfDesktopGap as g,normalizeSiteBlockGap as k}from"../../format/lib/content/container-gap.js";import{say as l,editorEaselWords as b}from"../../format/lib/editor-words.js";import{Slider as f}from"../lib/document/controls.js";import{siteTwinRow as A}from"../../format/lib/site-twin-row.js";const B="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",G="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",r="Block gap",c=_.Grid;function w(o,e){return A(o,{desktop:{key:"block_gap",value:e.gap,followsPx:null},phone:{key:"block_gap_phone",value:e.phone,followsPx:e.gap===null?null:g(e.gap)}})}function T({value:o,onChange:e,showHint:u=!0,followsPx:n=null}){const p=o===null,i=n===null?null:`${n}px`,s=n===null?c:k(n)??c;return a(h,{label:l(r),labelId:"sf-block-gap",icon:a(m,{}),changed:!p,action:a(d,{words:b()?.panel,label:l(r),changed:!p,detail:i??l("each block's own spacing"),onReset:()=>e(null)}),hint:u?l(i===null?B:G):void 0,children:a(f,{min:t.min,max:t.max,step:t.step,value:o,...o===null&&n===null?{}:{suffix:"px"},placeholder:s,...n===null?{placeholderWord:"Auto"}:n===s?{}:{placeholderWord:String(n)},onClear:()=>e(null),ariaLabel:l(r),onChange:e})})}export{w as blockGapRow,T as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as l,SettingsField as d}from"efficient-easel/panel";import{SquareIcon as u}from"efficient-easel/icons";import{CORNER_RADIUS_MAX as c,CORNER_RADIUS_MIN as i}from"../../format/lib/theme.js";import{say as t,editorEaselWords as p}from"../../format/lib/editor-words.js";import{Slider as m}from"../lib/document/controls.js";const R="Applies to panels, cards, inputs and buttons. Round things — color swatches, switches, status dots — stay round.",s="Corners";function f({value:o,onChange:r,showHint:a=!0}){const n=o===null;return e(d,{label:t(s),icon:e(u,{}),value:n?t("Default"):`${o}px`,changed:!n,action:e(l,{words:p()?.panel,label:t(s),changed:!n,detail:t("the built-in corners"),onReset:()=>r(null)}),hint:a?t(R):void 0,children:e(m,{min:i,max:c,step:1,value:o??i,readout:!1,ariaLabel:t(s),onChange:r})})}export{s as CORNERS_LABEL,f as default};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{SettingsDefaultReset as a,SettingsField as d}from"efficient-easel/panel";import{SquareIcon as u}from"efficient-easel/icons";import{CORNER_RADIUS_MAX as c,CORNER_RADIUS_MIN as l}from"../../format/lib/theme.js";import{say as e,editorEaselWords as p}from"../../format/lib/editor-words.js";import{Slider as m}from"../lib/document/controls.js";const R="Applies to panels, cards, inputs and buttons. Round things — color swatches, switches, status dots — stay round.",n="Corners";function f({value:o,onChange:r,showHint:i=!0}){const s=o===null;return t(d,{label:e(n),icon:t(u,{}),changed:!s,action:t(a,{words:p()?.panel,label:e(n),changed:!s,detail:e("the built-in corners"),onReset:()=>r(null)}),hint:i?e(R):void 0,children:t(m,{min:l,max:c,step:1,value:o,...o===null?{}:{suffix:"px"},placeholder:l,placeholderWord:"Auto",onClear:()=>r(null),ariaLabel:e(n),onChange:r})})}export{n as CORNERS_LABEL,f as default};
@@ -13,13 +13,14 @@ export declare function BackgroundWidthRow({ value, changed, detail, onChange, o
13
13
  hint?: string;
14
14
  labelId?: string;
15
15
  }): import("react").JSX.Element;
16
- export declare function ContentWidthRow({ mode, px, max, min, changed, detail, onMode, onPx, onReset, hint, labelId, }: {
16
+ export declare function ContentWidthRow({ mode, px, max, min, changed, detail, fullClosed, onMode, onPx, onReset, hint, labelId, }: {
17
17
  mode: WidthAnswer;
18
18
  px: number;
19
19
  max?: number;
20
20
  min?: number;
21
21
  changed: boolean;
22
22
  detail: string;
23
+ fullClosed?: boolean;
23
24
  onMode: (next: WidthAnswer) => void;
24
25
  onPx: (next: number) => void;
25
26
  onReset: () => void;
@@ -1 +1 @@
1
- "use client";import{jsx as d}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as x,SettingsBackgroundWidth as I,SettingsContentWidth as _}from"efficient-easel/panel";import{PAGE_WIDTH as c}from"../../format/lib/content/page-width.js";import{WIDTH_CHOICE_LABEL as g}from"../../format/lib/content/section-width.js";import{say as t,editorEaselWords as m}from"../../format/lib/editor-words.js";import{Slider as E}from"../lib/document/controls.js";const W="Background width",b="Content width",D=x,l=e=>t(g[e==="content"?"page":"full"]),O="The width of every section's background.",R="The width of every section's content.";function S({value:e,changed:i,detail:n,onChange:o,onReset:s,hint:r,labelId:a}){return d(I,{value:e,changed:i,detail:n,onChange:o,onReset:s,hint:r?t(r):void 0,labelId:a,words:{label:t(W),full:l("full"),content:l("content")},resetWords:m()?.panel})}function k({mode:e,px:i,max:n=c.max,min:o=c.min,changed:s,detail:r,onMode:a,onPx:p,onReset:h,hint:u,labelId:C}){const f=t(b),T=e!=="full"?d(E,{min:o,max:n,step:c.step,value:Math.min(Math.max(i,o),n),onChange:p,suffix:"px",ariaLabel:f}):null;return d(_,{mode:e,onMode:a,number:T,changed:s,detail:r,onReset:h,hint:u?t(u):void 0,labelId:C,words:{label:f,full:l("full"),content:l("content")},resetWords:m()?.panel})}export{W as BACKGROUND_LABEL,S as BackgroundWidthRow,b as CONTENT_LABEL,k as ContentWidthRow,O as SITE_BACKGROUND_HINT,R as SITE_CONTENT_HINT,D as WIDTH_CHOICES};
1
+ "use client";import{jsx as d}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as I,SettingsBackgroundWidth as _,SettingsContentWidth as g}from"efficient-easel/panel";import{PAGE_WIDTH as c}from"../../format/lib/content/page-width.js";import{WIDTH_CHOICE_LABEL as E}from"../../format/lib/content/section-width.js";import{say as t,editorEaselWords as m}from"../../format/lib/editor-words.js";import{Slider as W}from"../lib/document/controls.js";const b="Background width",B="Content width",O=I,l=e=>t(E[e==="content"?"page":"full"]),R="The width of every section's background.",S="The width of every section's content.";function k({value:e,changed:s,detail:n,onChange:o,onReset:i,hint:r,labelId:a}){return d(_,{value:e,changed:s,detail:n,onChange:o,onReset:i,hint:r?t(r):void 0,labelId:a,words:{label:t(b),full:l("full"),content:l("content")},resetWords:m()?.panel})}function v({mode:e,px:s,max:n=c.max,min:o=c.min,changed:i,detail:r,fullClosed:a,onMode:p,onPx:h,onReset:C,hint:u,labelId:T}){const f=t(B),x=e!=="full"?d(W,{min:o,max:n,step:c.step,value:Math.min(Math.max(s,o),n),onChange:h,suffix:"px",ariaLabel:f}):null;return d(g,{mode:e,onMode:p,number:x,changed:i,detail:r,fullClosed:a,onReset:C,hint:u?t(u):void 0,labelId:T,words:{label:f,full:l("full"),content:l("content")},resetWords:m()?.panel})}export{b as BACKGROUND_LABEL,k as BackgroundWidthRow,B as CONTENT_LABEL,v as ContentWidthRow,R as SITE_BACKGROUND_HINT,S as SITE_CONTENT_HINT,O as WIDTH_CHOICES};
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{SettingsDefaultReset as u,SettingsField as m}from"efficient-easel/panel";import{PaddingXIcon as f}from"efficient-easel/icons";import{SITE_GUTTER as a,SITE_GUTTER_PHONE as c,siteGutterPhoneFollows as S}from"../../format/lib/content/page-width.js";import{say as r,editorEaselWords as _}from"../../format/lib/editor-words.js";import{Slider as g}from"../lib/document/controls.js";import{siteTwinRow as E}from"../../format/lib/site-twin-row.js";const l="Side space",d=a.default,h="The room left at the left and right edge of every page.";function N(t,e){return E(t,{desktop:{key:"site_gutter",value:e.gutter,unsetPx:d,bounds:a},phone:{key:"site_gutter_phone",value:e.phone,unsetPx:S(e.gutter),bounds:c}})}function x({value:t,onChange:e,showHint:p=!0,unsetPx:n=d,bounds:i=a}){const s=t===null;return o(m,{label:r(l),labelId:"sf-side-space",icon:o(f,{}),value:`${t??n}px`,changed:!s,action:o(u,{words:_()?.panel,label:r(l),changed:!s,detail:`${n}px`,onReset:()=>e(null)}),hint:p?r(h):void 0,children:o(g,{min:i.min,max:i.max,step:i.step,value:t??n,readout:!1,ariaLabel:r(l),onChange:e})})}export{h as SIDE_SPACE_HINT,l as SIDE_SPACE_LABEL,x as default,N as sideSpaceRow};
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import{SettingsDefaultReset as u,SettingsField as f}from"efficient-easel/panel";import{PaddingXIcon as m}from"efficient-easel/icons";import{SITE_GUTTER as i,SITE_GUTTER_PHONE as c,siteGutterPhoneFollows as S}from"../../format/lib/content/page-width.js";import{say as r,editorEaselWords as _}from"../../format/lib/editor-words.js";import{Slider as x}from"../lib/document/controls.js";import{siteTwinRow as E}from"../../format/lib/site-twin-row.js";const l="Side space",p=i.default,g="The room left at the left and right edge of every page.";function N(t,e){return E(t,{desktop:{key:"site_gutter",value:e.gutter,unsetPx:p,bounds:i},phone:{key:"site_gutter_phone",value:e.phone,unsetPx:S(e.gutter),bounds:c}})}function h({value:t,onChange:e,showHint:d=!0,unsetPx:a=p,bounds:n=i}){const s=t===null;return o(f,{label:r(l),labelId:"sf-side-space",icon:o(m,{}),changed:!s,action:o(u,{words:_()?.panel,label:r(l),changed:!s,detail:`${a}px`,onReset:()=>e(null)}),hint:d?r(g):void 0,children:o(x,{min:n.min,max:n.max,step:n.step,value:t,suffix:"px",placeholder:a,onClear:()=>e(null),ariaLabel:r(l),onChange:e})})}export{g as SIDE_SPACE_HINT,l as SIDE_SPACE_LABEL,h as default,N as sideSpaceRow};
@@ -1 +1 @@
1
- "use client";import{jsx as o,Fragment as T,jsxs as C}from"react/jsx-runtime";import{useEasel as O,useRootFields as z}from"efficient-easel/easel";import{Inspector as Y}from"efficient-easel/fields";import{SettingsGroup as j}from"efficient-easel/panel";import{useEffect as U,useRef as X,useState as R}from"react";import q from"./ThemeField.js";import K from"./CornersField.js";import M from"./CardShadowField.js";import $ from"./ShadowColourField.js";import V,{blockGapRow as J}from"./BlockGapField.js";import Q from"./HoverEffectField.js";import Z from"./PhotographyField.js";import D from"./ShareButtonField.js";import{usePreviewDevice as F}from"efficient-easel/draw/client";import ee,{sideSpaceRow as te}from"./SideSpaceField.js";import{BackgroundWidthRow as oe,ContentWidthRow as ne,SITE_BACKGROUND_HINT as re,SITE_CONTENT_HINT as ie}from"./SectionWidthRows.js";import se from"./SiteAccentField.js";import ae from"./SiteTextStylesField.js";import{usePreviewHeader as g}from"../../render/components/PreviewHeaderContext.js";import{Button as ce,EmptyState as le,Tabs as ue,Tooltip as de,tabButtonId as he,tabPanelId as pe}from"efficient-shell/ui";import{ContrastIcon as fe,NoteIcon as ge,SettingsIcon as me,TypeIcon as Se}from"efficient-easel/icons";import{useThemeRowPersist as _e}from"../lib/theme-row-persist.js";import{themeSaveNotice as we}from"../../format/lib/theme-save-message.js";import{say as m}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as xe}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as E}from"../../format/lib/content/page-width.js";import{PAGE_STYLE_FIELDS as Te}from"../lib/document/page-root-fields.js";import{previewFrame as Ce}from"efficient-easel/screen/lib/document/preview-dom";import{siteTextColourNameOf as be,siteTextColours as ye}from"../../format/lib/text-styles/site-text-colours.js";import{useSiteTextStylesWriter as Pe}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as Re,normalizeCornerRadius as Ee,normalizeCornerStyle as Ie,normalizeShadowColor as ke}from"../../format/lib/theme.js";const G="sf-site-styles",Fe="sf-site-styles-tabpanel",Ge=!1,He="Show hints";function Oe({shown:e,onChange:t}){return o("div",{className:"sf-hints",children:o(ce,{type:"button",variant:"ghost","aria-pressed":e,leftIcon:o(ge,{size:13}),onClick:()=>t(!e),children:m(He)})})}const Yt="text",B="basics",N="this-page-group",I=[{id:B,label:"Basics",icon:o(me,{})},{id:"theme",label:"Theme",icon:o(fe,{})},{id:"text",label:"Text",icon:o(Se,{})}];function Be({themeFromDocument:e,persist:t}){const{appState:n,dispatch:r}=O(d=>d),{theme:l,setTheme:s}=g(),u=n.data,h=u.root?.props??{},i=d=>{if(e){const p={...h,theme:d};r({type:"replaceRoot",root:{...u.root,props:p},recordHistory:!0})}else s(d);t({selected_preset:d.selected,theme_presets:d.themes})};return o(q,{value:e?h.theme:l,onChange:i})}function Ne({themeFromDocument:e,persist:t}){const[n,r]=R(null),{theme:l,setFonts:s,setSizes:u,setHeadingTypography:h}=g(),i=Pe({themeFromDocument:e,persist:t}),{old:d,saved:p,writeRoot:f}=i,S=i.fonts,a=i.sizes,x=i.typography,b=c=>c.values.size??We(ve[c.id]??"body")??Ae[c.kind],_=c=>i.write(c),k=ye(l),y=be(l),P=c=>{const w={...S,accent:c};e?f({fonts:w}):s(w),t({accent_font:c})},A=c=>{u({...a,accent:c}),t({accent_size_px:c})},L=c=>{const w={...x,weightStrong:c};e?f({headingTypography:w}):h(w),t({heading_weight_strong:c})},W=c=>{const w={...x,italicStrong:c};e?f({headingTypography:w}):h(w),t({accent_italic:c})};return C(T,{children:[o(ae,{saved:p,old:d,colours:k,colourNameOf:y,sizeOf:b,onChange:_,openId:n===H?null:n,onOpenChange:r,withoutSize:e}),o(se,{font:S.accent,size:a.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:n===H,onOpenChange:c=>r(c?H:null),onChange:c=>{c.key==="font"?P(c.value):c.key==="size"?A(c.value):c.key==="weight"?L(c.value):W(c.value)},withoutSize:e})]})}const H="accent",ve={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Ae={heading:32,body:14},Le={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function We(e){if(typeof document>"u")return null;const n=(Ce()?.contentDocument??document).querySelector(Le[e]);if(!n)return null;const r=parseFloat(getComputedStyle(n).fontSize);return Number.isFinite(r)?r:null}function ze({themeFromDocument:e,persist:t,showHint:n}){const{appState:r,dispatch:l}=O(a=>a),{cornerRadiusPx:s,setCornerRadiusPx:u}=g(),h=r.data,i=h.root?.props??{},d=i.cornerRadiusPx===void 0?Re[Ie(i.cornerStyle)]:Ee(i.cornerRadiusPx),p=e?d:s,f=a=>l({type:"replaceRoot",root:{...h.root,props:{...i,...a}},recordHistory:!0});return o(K,{value:p,onChange:a=>{e?f({cornerRadiusPx:a}):u(a),t({corner_radius_px:a})},showHint:n})}function Ye(e){return{site_width:e}}function je({persist:e,showHint:t}){const{siteWidth:n,setSiteWidth:r,sectionBackgroundWidth:l,setSectionBackgroundWidth:s,sectionContentWidth:u,setSectionContentWidth:h}=g();if(F()!=="desktop")return null;const d=typeof n=="number"?n:E.default,p=a=>{r(a),e(Ye(a),a===null)},f=a=>{s(a),e({section_background_width:a},!0)},S=a=>{h(a),e({section_content_width:a},!0)};return C(T,{children:[o(oe,{value:l??"full",changed:l!==null,detail:m("Full width"),onChange:f,onReset:()=>f(null),hint:t?re:void 0}),o(ne,{mode:u??"content",px:d,min:E.min,max:E.max,changed:typeof n=="number"||u!==null,detail:`${m("Content width")} ${E.default}px`,onMode:S,onPx:a=>p(a),onReset:()=>{S(null),p(null)},hint:t?ie:void 0})]})}function Ue(e){return{block_gap:e}}function Xe(e){return{block_gap_phone:e}}function qe(e){return{site_gutter:e}}function Ke(e){return{site_gutter_phone:e}}function v(e,[t,n],r){t(e),r(n(e),e===null)}function Me({persist:e,showHint:t}){const{siteGutter:n,siteGutterPhone:r,setSiteGutter:l,setSiteGutterPhone:s}=g(),u=te(F(),{gutter:n,phone:r});if(!u)return null;const h=u.key==="site_gutter_phone"?[s,Ke]:[l,qe];return o(ee,{value:u.value,onChange:i=>v(i,h,e),showHint:t,unsetPx:u.unsetPx,bounds:u.bounds})}function $e({persist:e,showHint:t}){const{blockGap:n,blockGapPhone:r,setBlockGap:l,setBlockGapPhone:s}=g(),u=J(F(),{gap:n,phone:r});if(!u)return null;const h=u.key==="block_gap_phone"?[s,Xe]:[l,Ue];return o(V,{value:u.value,onChange:i=>v(i,h,e),showHint:t,followsPx:u.followsPx})}function Ve({persist:e,showHint:t=!0}){return C(T,{children:[o(je,{persist:e,showHint:t}),o(Me,{persist:e,showHint:t}),o($e,{persist:e,showHint:t})]})}function Je(e){return{card_shadow:e}}function Qe(e){return e===null?{shadow_color:null}:{shadow_color:ke(e)}}function Ze(e){return{hover_effect:e}}function De({persist:e,showHint:t=!0}){const{cardShadow:n,setCardShadow:r,shadowColor:l,setShadowColor:s,hoverEffect:u,setHoverEffect:h}=g();return C(T,{children:[o(M,{value:n,onChange:i=>{r(i),e(Je(i),!0)},showHint:t}),o($,{value:l,onChange:i=>{s(i),e(Qe(i),i===null)},showHint:t}),o(Q,{value:u,onChange:i=>{h(i),e(Ze(i),!0)},showHint:t})]})}function et(e){return{photography_grayscale:e}}function tt({persist:e,showHint:t}){const{photographyGrayscale:n,setPhotographyGrayscale:r}=g();return o(Z,{value:n,onChange:s=>{r(s),e(et(s),!0)},showHint:t})}function ot({persist:e,showHint:t=!0}){return o(T,{children:o(tt,{persist:e,showHint:t})})}function nt(e){return{share_button_on_posts:e}}function rt({persist:e,showHint:t=!0}){const{shareButtonOnPosts:n,setShareButtonOnPosts:r}=g();return o(D,{value:n,onChange:s=>{r(s),e(nt(s),!0)},showHint:t})}function it(){const{websiteName:e}=g();return e?.trim()||xe}function jt(){const e=it();return o(de,{content:m("{name} — renamed in the Console: {place}.",{name:e,place:m("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:o("span",{className:"sf-panel-site",children:e})})}function st({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:r,tab:l,onTabChange:s,initialTab:u,revealPageGroup:h=!1,onPageGroupRevealed:i}){const{persist:d}=_e({themeFromDocument:e,tokenRef:t,siteId:n,onResult:y=>{const P=we(y);P&&r?.(P.msg,P.tone)}}),[p,f]=R(u??I[0].id),S=l!==void 0,a=S?l:p,x=S?s??(()=>{}):f,b=I.find(y=>y.id===a)??I[0],[_,k]=R(Ge);return C(T,{children:[o(lt,{activeId:b.id,onSelect:x}),C("div",{id:pe(G,b.id),className:Fe,role:"tabpanel","aria-labelledby":he(G,b.id),children:[a===B&&C(T,{children:[o(ze,{themeFromDocument:e,persist:d,showHint:_}),!e&&o(De,{persist:d,showHint:_}),!e&&o(Ve,{persist:d,showHint:_}),!e&&o(ot,{persist:d,showHint:_}),!e&&o(rt,{persist:d,showHint:_}),o(at,{reveal:h,onRevealed:i}),o(Oe,{shown:_,onChange:k})]}),a==="theme"&&o(Be,{themeFromDocument:e,persist:d}),a==="text"&&o(Ne,{themeFromDocument:e,persist:d})]})]})}function at({reveal:e,onRevealed:t}){const[n,r]=R(!0),l=X(t);return l.current=t,U(()=>{if(!e)return;r(!0);const s=requestAnimationFrame(()=>{document.getElementById(N)?.scrollIntoView({block:"start"}),l.current?.()});return()=>cancelAnimationFrame(s)},[e]),o(j,{title:m("This page"),open:n,onToggle:r,id:N,children:o(ct,{})})}function ct(){const{fields:e,values:t,readOnly:n,onChange:r}=z(),l=Object.fromEntries(Te.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(l).length===0?o(le,{variant:"none",icon:!1,message:m("This page has no look of its own to set.")}):o(Y,{fields:l,values:t,onChange:r,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:m("This page")})}function lt({activeId:e,onSelect:t}){return o("div",{className:"es-insp-tabs",children:o(ue,{variant:"underline",block:!0,labelsFit:!0,"aria-label":m("Styles"),idPrefix:G,value:e,onChange:t,items:I.map(n=>{const r=m(n.label);return{id:n.id,icon:n.icon,label:r}})})})}export{$e as BlockGapRootField,De as CardLookFields,Oe as HintsToggle,Ve as PageGroupFields,ot as PhotographyGroupFields,Ge as SHOW_HINTS_DEFAULT,B as SITE_STYLES_BASICS_TAB,G as SITE_STYLES_ID_PREFIX,I as SITE_STYLES_TABS,Yt as SITE_STYLES_TEXT_TAB,rt as ShareButtonRootField,Me as SideSpaceRootField,lt as SiteStylesTabStrip,Fe as TABPANEL_CLASS,N as THIS_PAGE_GROUP_ID,jt as WebsiteNameReadonly,Ue as blockGapPatch,Xe as blockGapPhonePatch,Je as cardShadowPatch,st as default,Ze as hoverEffectPatch,et as photographyPatch,Qe as shadowColourPatch,nt as shareButtonPatch,qe as siteGutterPatch,Ke as siteGutterPhonePatch,Ye as siteWidthPatch,it as useWebsiteName};
1
+ "use client";import{jsx as o,Fragment as C,jsxs as T}from"react/jsx-runtime";import{useEasel as O,useRootFields as z}from"efficient-easel/easel";import{Inspector as Y}from"efficient-easel/fields";import{SettingsGroup as j}from"efficient-easel/panel";import{useEffect as U,useRef as X,useState as R}from"react";import q from"./ThemeField.js";import K from"./CornersField.js";import M from"./CardShadowField.js";import $ from"./ShadowColourField.js";import V,{blockGapRow as J}from"./BlockGapField.js";import Q from"./HoverEffectField.js";import Z from"./PhotographyField.js";import D from"./ShareButtonField.js";import{usePreviewDevice as k}from"efficient-easel/draw/client";import ee,{sideSpaceRow as te}from"./SideSpaceField.js";import{BackgroundWidthRow as oe,ContentWidthRow as ne,SITE_BACKGROUND_HINT as re,SITE_CONTENT_HINT as ie}from"./SectionWidthRows.js";import se from"./SiteAccentField.js";import ae from"./SiteTextStylesField.js";import{usePreviewHeader as g}from"../../render/components/PreviewHeaderContext.js";import{Button as ce,EmptyState as le,SliderGroup as ue,Tabs as de,Tooltip as he,tabButtonId as pe,tabPanelId as fe}from"efficient-shell/ui";import{ContrastIcon as ge,NoteIcon as me,SettingsIcon as Se,TypeIcon as _e}from"efficient-easel/icons";import{useThemeRowPersist as we}from"../lib/theme-row-persist.js";import{themeSaveNotice as xe}from"../../format/lib/theme-save-message.js";import{say as m}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as Te}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as E}from"../../format/lib/content/page-width.js";import{PAGE_STYLE_FIELDS as Ce}from"../lib/document/page-root-fields.js";import{previewFrame as be}from"efficient-easel/screen/lib/document/preview-dom";import{siteTextColourNameOf as ye,siteTextColours as Pe}from"../../format/lib/text-styles/site-text-colours.js";import{useSiteTextStylesWriter as Re}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as Ee,normalizeCornerRadius as Ie,normalizeCornerStyle as Ge,normalizeShadowColor as ke}from"../../format/lib/theme.js";const F="sf-site-styles",Fe="sf-site-styles-tabpanel",He=!1,Oe="Show hints";function Be({shown:e,onChange:t}){return o("div",{className:"sf-hints",children:o(ce,{type:"button",variant:"ghost","aria-pressed":e,leftIcon:o(me,{size:13}),onClick:()=>t(!e),children:m(Oe)})})}const jt="text",B="basics",N="this-page-group",I=[{id:B,label:"Basics",icon:o(Se,{})},{id:"theme",label:"Theme",icon:o(ge,{})},{id:"text",label:"Text",icon:o(_e,{})}];function Ne({themeFromDocument:e,persist:t}){const{appState:n,dispatch:r}=O(d=>d),{theme:l,setTheme:s}=g(),u=n.data,h=u.root?.props??{},i=d=>{if(e){const p={...h,theme:d};r({type:"replaceRoot",root:{...u.root,props:p},recordHistory:!0})}else s(d);t({selected_preset:d.selected,theme_presets:d.themes})};return o(q,{value:e?h.theme:l,onChange:i})}function ve({themeFromDocument:e,persist:t}){const[n,r]=R(null),{theme:l,setFonts:s,setSizes:u,setHeadingTypography:h}=g(),i=Re({themeFromDocument:e,persist:t}),{old:d,saved:p,writeRoot:f}=i,S=i.fonts,a=i.sizes,x=i.typography,b=c=>c.values.size??ze(Ae[c.id]??"body")??Le[c.kind],_=c=>i.write(c),G=Pe(l),y=ye(l),P=c=>{const w={...S,accent:c};e?f({fonts:w}):s(w),t({accent_font:c})},A=c=>{u({...a,accent:c}),t({accent_size_px:c})},L=c=>{const w={...x,weightStrong:c};e?f({headingTypography:w}):h(w),t({heading_weight_strong:c})},W=c=>{const w={...x,italicStrong:c};e?f({headingTypography:w}):h(w),t({accent_italic:c})};return T(C,{children:[o(ae,{saved:p,old:d,colours:G,colourNameOf:y,sizeOf:b,onChange:_,openId:n===H?null:n,onOpenChange:r,withoutSize:e}),o(se,{font:S.accent,size:a.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:n===H,onOpenChange:c=>r(c?H:null),onChange:c=>{c.key==="font"?P(c.value):c.key==="size"?A(c.value):c.key==="weight"?L(c.value):W(c.value)},withoutSize:e})]})}const H="accent",Ae={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Le={heading:32,body:14},We={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function ze(e){if(typeof document>"u")return null;const n=(be()?.contentDocument??document).querySelector(We[e]);if(!n)return null;const r=parseFloat(getComputedStyle(n).fontSize);return Number.isFinite(r)?r:null}function Ye({themeFromDocument:e,persist:t,showHint:n}){const{appState:r,dispatch:l}=O(a=>a),{cornerRadiusPx:s,setCornerRadiusPx:u}=g(),h=r.data,i=h.root?.props??{},d=i.cornerRadiusPx===void 0?Ee[Ge(i.cornerStyle)]:Ie(i.cornerRadiusPx),p=e?d:s,f=a=>l({type:"replaceRoot",root:{...h.root,props:{...i,...a}},recordHistory:!0});return o(K,{value:p,onChange:a=>{e?f({cornerRadiusPx:a}):u(a),t({corner_radius_px:a})},showHint:n})}function je(e){return{site_width:e}}function Ue({persist:e,showHint:t}){const{siteWidth:n,setSiteWidth:r,sectionBackgroundWidth:l,setSectionBackgroundWidth:s,sectionContentWidth:u,setSectionContentWidth:h}=g();if(k()!=="desktop")return null;const d=typeof n=="number"?n:E.default,p=a=>{r(a),e(je(a),a===null)},f=a=>{s(a),e({section_background_width:a},!0)},S=a=>{h(a),e({section_content_width:a},!0)};return T(C,{children:[o(oe,{value:l??"full",changed:l!==null,detail:m("Full width"),onChange:f,onReset:()=>f(null),hint:t?re:void 0}),o(ne,{mode:u??"content",px:d,min:E.min,max:E.max,changed:typeof n=="number"||u!==null,detail:`${m("Content width")} ${E.default}px`,onMode:S,onPx:a=>p(a),onReset:()=>{S(null),p(null)},hint:t?ie:void 0})]})}function Xe(e){return{block_gap:e}}function qe(e){return{block_gap_phone:e}}function Ke(e){return{site_gutter:e}}function Me(e){return{site_gutter_phone:e}}function v(e,[t,n],r){t(e),r(n(e),e===null)}function $e({persist:e,showHint:t}){const{siteGutter:n,siteGutterPhone:r,setSiteGutter:l,setSiteGutterPhone:s}=g(),u=te(k(),{gutter:n,phone:r});if(!u)return null;const h=u.key==="site_gutter_phone"?[s,Me]:[l,Ke];return o(ee,{value:u.value,onChange:i=>v(i,h,e),showHint:t,unsetPx:u.unsetPx,bounds:u.bounds})}function Ve({persist:e,showHint:t}){const{blockGap:n,blockGapPhone:r,setBlockGap:l,setBlockGapPhone:s}=g(),u=J(k(),{gap:n,phone:r});if(!u)return null;const h=u.key==="block_gap_phone"?[s,qe]:[l,Xe];return o(V,{value:u.value,onChange:i=>v(i,h,e),showHint:t,followsPx:u.followsPx})}function Je({persist:e,showHint:t=!0}){return T(C,{children:[o(Ue,{persist:e,showHint:t}),o($e,{persist:e,showHint:t}),o(Ve,{persist:e,showHint:t})]})}function Qe(e){return{card_shadow:e}}function Ze(e){return e===null?{shadow_color:null}:{shadow_color:ke(e)}}function De(e){return{hover_effect:e}}function et({persist:e,showHint:t=!0}){const{cardShadow:n,setCardShadow:r,shadowColor:l,setShadowColor:s,hoverEffect:u,setHoverEffect:h}=g();return T(C,{children:[o(M,{value:n,onChange:i=>{r(i),e(Qe(i),!0)},showHint:t}),o($,{value:l,onChange:i=>{s(i),e(Ze(i),i===null)},showHint:t}),o(Q,{value:u,onChange:i=>{h(i),e(De(i),!0)},showHint:t})]})}function tt(e){return{photography_grayscale:e}}function ot({persist:e,showHint:t}){const{photographyGrayscale:n,setPhotographyGrayscale:r}=g();return o(Z,{value:n,onChange:s=>{r(s),e(tt(s),!0)},showHint:t})}function nt({persist:e,showHint:t=!0}){return o(C,{children:o(ot,{persist:e,showHint:t})})}function rt(e){return{share_button_on_posts:e}}function it({persist:e,showHint:t=!0}){const{shareButtonOnPosts:n,setShareButtonOnPosts:r}=g();return o(D,{value:n,onChange:s=>{r(s),e(rt(s),!0)},showHint:t})}function st(){const{websiteName:e}=g();return e?.trim()||Te}function Ut(){const e=st();return o(he,{content:m("{name} — renamed in the Console: {place}.",{name:e,place:m("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:o("span",{className:"sf-panel-site",children:e})})}function at({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:r,tab:l,onTabChange:s,initialTab:u,revealPageGroup:h=!1,onPageGroupRevealed:i}){const{persist:d}=we({themeFromDocument:e,tokenRef:t,siteId:n,onResult:y=>{const P=xe(y);P&&r?.(P.msg,P.tone)}}),[p,f]=R(u??I[0].id),S=l!==void 0,a=S?l:p,x=S?s??(()=>{}):f,b=I.find(y=>y.id===a)??I[0],[_,G]=R(He);return T(ue,{children:[o(ut,{activeId:b.id,onSelect:x}),T("div",{id:fe(F,b.id),className:Fe,role:"tabpanel","aria-labelledby":pe(F,b.id),children:[a===B&&T(C,{children:[o(Ye,{themeFromDocument:e,persist:d,showHint:_}),!e&&o(et,{persist:d,showHint:_}),!e&&o(Je,{persist:d,showHint:_}),!e&&o(nt,{persist:d,showHint:_}),!e&&o(it,{persist:d,showHint:_}),o(ct,{reveal:h,onRevealed:i}),o(Be,{shown:_,onChange:G})]}),a==="theme"&&o(Ne,{themeFromDocument:e,persist:d}),a==="text"&&o(ve,{themeFromDocument:e,persist:d})]})]})}function ct({reveal:e,onRevealed:t}){const[n,r]=R(!0),l=X(t);return l.current=t,U(()=>{if(!e)return;r(!0);const s=requestAnimationFrame(()=>{document.getElementById(N)?.scrollIntoView({block:"start"}),l.current?.()});return()=>cancelAnimationFrame(s)},[e]),o(j,{title:m("This page"),open:n,onToggle:r,id:N,children:o(lt,{})})}function lt(){const{fields:e,values:t,readOnly:n,onChange:r}=z(),l=Object.fromEntries(Ce.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(l).length===0?o(le,{variant:"none",icon:!1,message:m("This page has no look of its own to set.")}):o(Y,{fields:l,values:t,onChange:r,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:m("This page")})}function ut({activeId:e,onSelect:t}){return o("div",{className:"es-insp-tabs",children:o(de,{variant:"underline",block:!0,labelsFit:!0,"aria-label":m("Styles"),idPrefix:F,value:e,onChange:t,items:I.map(n=>{const r=m(n.label);return{id:n.id,icon:n.icon,label:r}})})})}export{Ve as BlockGapRootField,et as CardLookFields,Be as HintsToggle,Je as PageGroupFields,nt as PhotographyGroupFields,He as SHOW_HINTS_DEFAULT,B as SITE_STYLES_BASICS_TAB,F as SITE_STYLES_ID_PREFIX,I as SITE_STYLES_TABS,jt as SITE_STYLES_TEXT_TAB,it as ShareButtonRootField,$e as SideSpaceRootField,ut as SiteStylesTabStrip,Fe as TABPANEL_CLASS,N as THIS_PAGE_GROUP_ID,Ut as WebsiteNameReadonly,Xe as blockGapPatch,qe as blockGapPhonePatch,Qe as cardShadowPatch,at as default,De as hoverEffectPatch,tt as photographyPatch,Ze as shadowColourPatch,rt as shareButtonPatch,Ke as siteGutterPatch,Me as siteGutterPhonePatch,je as siteWidthPatch,st as useWebsiteName};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as C}from"react/jsx-runtime";import{ButtonIcon as S,ButtonIconIcon as T,IconAfterTextIcon as k,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as F}from"efficient-easel/panel";import{useSelectedFields as u}from"efficient-easel/easel";import{buttonFieldSet as v}from"efficient-easel/screen/lib/document/button-fields";import{IconPicker as O,Segmented as P}from"efficient-shell/ui";import{shellGlyphOf as _}from"../../../shell-glyph.js";import{StorefrontTextLinkField as N}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as R,buttonIconChoice as W,buttonIconSide as j,buttonWidth as L}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as z,buttonLook as d}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as A}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as E,siteButtonPaint as p,siteButtonRadiusPx as D}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as U,buttonWordsEntryField as G,inOwnBox as H,linkField as K,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{pickerNoneIcon as M,rowSay as Q,ShellIconWord as b}from"../../../box-fields.js";import{CARD_ROW_FACTS as V,cardRowField as x,cardRowFields as X}from"../../../card-row-fields.js";import{consentWordsKept as Y,withConsentWordsRow as Z}from"../../../consent-words-field.js";const m=o=>_(o==="none"?"no-symbol":o),$=R.map(o=>({value:o,icon:o==="none"?M(m(o),e(b,{value:o})):m(o)}));function oo({value:o,onChange:i}){const t=u(),n=t.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(N,{label:"Button",icon:e(S,{size:18}),text:s,onTextChange:i,link:typeof n=="string"?n:"",onLinkChange:l=>t.onChange("href",l)})}function eo({value:o,onChange:i}){const t=u(),n=W(o,t.values.arrow),s=j(t.values.iconPosition),l=L(t.values.widthFit)==="fill",y=m("icon-at-end");return e(F,{label:r("Icon"),icon:e(T,{size:18}),value:n==="none"?void 0:e(b,{value:n}),children:C("div",{className:"flex items-center gap-2",children:[e(O,{label:r("Icon"),value:n,options:$,onChange:i}),n!=="none"&&e(P,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:B=>t.onChange("iconPosition",B),options:[{value:"before",icon:e(w,{size:16}),label:e("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:e(k,{size:16}),label:e("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:y,label:e("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const I=()=>p(a().theme),g=v({follows:{useFill:()=>I().fill,useText:()=>I().ink,useBorder:()=>{const[o]=f("variant"),[i]=f("buttonColor"),{theme:t}=a(),n=d({variant:o,buttonColor:i}).border.width,s=A(i)??(o==="ghost"?E(t).text:p(t).fill);return{width:n,color:s}},useCorners:()=>D(a().cornerRadiusPx),useFillOpacity:()=>d({variant:f("variant")[0]}).fillOpacity},usePresets:J,resetTo:o=>U(o,r("Styles")),padding:{fallback:z,tablet:!0},say:Q});function to(o,i){const t=Object.keys(o);return Object.fromEntries(t.slice(0,t.indexOf(i)+1).map(n=>[n,o[n]]))}const ko={fields:{label:H(q("Button"),o=>e(oo,{value:o.value,onChange:o.onChange})),labelText:G("label"),href:{...K("Button link"),...c("label")},consentWords:Y("label"),_gButton:h("Button"),rowField:x("Shows","text"),rowLinkField:x("Link from","link"),...to(g,"_dDesign"),_gStyle:h("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>e(eo,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...g},resolveFields:(o,i)=>Z(X(i.fields,o,i),o.props,"label",["href"]),showWhenFacts:V};export{ko as ButtonBlockFields};
1
+ import{jsx as e,jsxs as C}from"react/jsx-runtime";import{ButtonIcon as B,ButtonIconIcon as T,IconAfterTextIcon as k,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as F}from"efficient-easel/panel";import{useSelectedFields as d}from"efficient-easel/easel";import{buttonFieldSet as v}from"efficient-easel/screen/lib/document/button-fields";import{VIEW_KEY_ACCESS as O}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as _,Segmented as N}from"efficient-shell/ui";import{shellGlyphOf as P}from"../../../shell-glyph.js";import{StorefrontTextLinkField as R}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as W,buttonIconChoice as j,buttonIconSide as A,buttonWidth as E}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as L,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as z}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as D,siteButtonPaint as p,siteButtonRadiusPx as U}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as G,buttonWordsEntryField as K,inOwnBox as H,linkField as V,plainText as Y,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as q}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{PADDING_UNITS as J,pickerNoneIcon as M,rowSay as Q,ShellIconWord as b}from"../../../box-fields.js";import{CARD_ROW_FACTS as X,cardRowField as I,cardRowFields as Z}from"../../../card-row-fields.js";import{consentWordsKept as $,withConsentWordsRow as oo}from"../../../consent-words-field.js";const m=o=>P(o==="none"?"no-symbol":o),eo=W.map(o=>({value:o,icon:o==="none"?M(m(o),e(b,{value:o})):m(o)}));function to({value:o,onChange:i}){const t=d(),n=t.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(R,{label:"Button",icon:e(B,{size:18}),text:s,onTextChange:i,link:typeof n=="string"?n:"",onLinkChange:l=>t.onChange("href",l)})}function no({value:o,onChange:i}){const t=d(),n=j(o,t.values.arrow),s=A(t.values.iconPosition),l=E(t.values.widthFit)==="fill",y=m("icon-at-end");return e(F,{label:r("Icon"),icon:e(T,{size:18}),value:n==="none"?void 0:e(b,{value:n}),children:C("div",{className:"flex items-center gap-2",children:[e(_,{label:r("Icon"),value:n,options:eo,onChange:i}),n!=="none"&&e(N,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:S=>t.onChange("iconPosition",S),options:[{value:"before",icon:e(w,{size:16}),label:e("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:e(k,{size:16}),label:e("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:y,label:e("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>p(a().theme),g=v({paddingUnits:J,follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[i]=f("buttonColor"),{theme:t}=a(),n=u({variant:o,buttonColor:i}).border.width,s=z(i)??(o==="ghost"?D(t).text:p(t).fill);return{width:n,color:s}},useCorners:()=>U(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:q,resetTo:o=>G(o,r("Styles")),padding:{fallback:L,tablet:!0},phone:O,say:Q});function io(o,i){const t=Object.keys(o);return Object.fromEntries(t.slice(0,t.indexOf(i)+1).map(n=>[n,o[n]]))}const vo={fields:{label:H(Y("Button"),o=>e(to,{value:o.value,onChange:o.onChange})),labelText:K("label"),href:{...V("Button link"),...c("label")},consentWords:$("label"),_gButton:h("Button"),rowField:I("Shows","text"),rowLinkField:I("Link from","link"),...io(g,"_dDesign"),_gStyle:h("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>e(no,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...g},resolveFields:(o,i)=>oo(Z(i.fields,o,i),o.props,"label",["href"]),showWhenFacts:X};export{vo as ButtonBlockFields};
@@ -0,0 +1,2 @@
1
+ import type { BlockFields } from "../../../../../../format/lib/document/blocks/block-types.js";
2
+ export declare const CardListFields: BlockFields;
@@ -0,0 +1 @@
1
+ import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{CARD_ROW_FACTS as s,cardRowField as d,cardRowFields as t}from"../../../card-row-fields.js";import{CardListSlots as e}from"../../../../../../format/lib/document/blocks/general/CardList/meta.js";const a={fields:{_gCardList:r("Card list"),rowField:d("Shows","list"),...e},resolveFields:(i,o)=>t(o.fields,i,o),showWhenFacts:s};export{a as CardListFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{StylesIcon as r}from"efficient-easel/icons";import{text as e}from"../../../controls.js";import{select as m}from"../../../box-fields.js";import{SECTION_EYEBROW_LOOK_OPTIONS as t,DEFAULT_EYEBROW_BLOCK_LOOK as i}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{PH as O}from"../../../../../../format/lib/document/blocks/placeholders.js";import{blockAlignmentFields as s}from"../../../box-fields.js";const L={fields:{eyebrow:e("Eyebrow",O.eyebrow),...s(),eyebrowLook:m("Look",o(r,{}),t,i)}};export{L as EyebrowFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{StylesIcon as r}from"efficient-easel/icons";import{text as e}from"../../../controls.js";import{select as m}from"../../../box-fields.js";import{SECTION_EYEBROW_LOOK_OPTIONS as t,DEFAULT_EYEBROW_BLOCK_LOOK as i}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{PH as s}from"../../../../../../format/lib/document/blocks/placeholders.js";import{blockAlignmentFields as E}from"../../../box-fields.js";import{VIEW_KEY_ACCESS as O}from"efficient-easel/screen/lib/document/box-fields";const n={fields:{eyebrow:e("Eyebrow",s.eyebrow),...E("align",{access:O}),eyebrowLook:m("Look",o(r,{}),t,i)}};export{n as EyebrowFields};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{phoneKey as t,tabletKey as i}from"efficient-easel/draw";import{BOX_CARD_PAD as m,isBackgroundBox as j}from"../../../../../../format/lib/content/box-background.js";import{darkenFields as K}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as v,REEL_SHAPE_LABELS as G}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as Y,TAB_SHAPE_PICTURES as J}from"../../../choice-pictures.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as V,CropIcon as u,LineBetweenIcon as z,LineSolidIcon as q,ShadowIcon as Q,StylesIcon as Z,TableIcon as A,TargetIcon as $}from"efficient-easel/icons";import{boxBlockSpacingField as oo,boxFillField as eo,boxColumnsFields as no,boxShareField as to,boxSharePhoneField as io,boxShareTabletField as ro,containerDirectionField as lo,containerGapRows as ao,linkField as so,plainText as po,swapPadding as O,toggle as c,upload as g,withPanelOnly as mo}from"../../../controls.js";import{BOX_SHAPES as R,boxShapeOf as co}from"../../../../../../format/lib/content/box-shape.js";import{shapeLines as E}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as C}from"../../../shape-picker.js";import{BOX_COLUMNS_MAX as F,BOX_COLUMNS_MIN as b,boxPhoneRowOneLine as So}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as L}from"../../../../../../format/lib/content/box-separator.js";import{VIEW_KEY_ACCESS as ho,group as r,phoneTwinFields as w}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as _o,boxJustifyField as fo,boxWrapField as T,iconPickerRow as uo,placementField as Ao,select as H,sidesPaddingFields as N}from"../../../box-fields.js";import{withRowRules as Oo}from"../../../../../../render/lib/document/show-when.js";import{separatorField as go}from"../../../separator-field.js";import{LOOP_SCROLLS as Ro}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as Eo}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{boxPhoneOrderField as Co}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Fo,ON_A_CARD as bo,cardDisplayField as Lo}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as wo,mirrorCardsField as To}from"../../../mirror-cards-field.js";import{SHOW_FOR_FACTS as Ho,showForField as No,showForFields as xo}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as l,SHARED_COLUMNS_LABEL as x,SHARED_COLUMNS_OFF as D,sharedColumnsDrawn as I,sharedColumnsFits as P,SHARED_COLUMNS_PHONE_POINTS as Do,SHARED_COLUMNS_POINTS as Io}from"../../../../../../render/lib/content/box-shared-columns.js";const Po={field:"bgImage",set:!0},k={field:"phoneRow",in:[2,3]},ko={field:"direction",is:"tabs"},Bo={field:"line",in:[!0,!1]},Mo={field:"anchor",set:!0},_=["fixed","screen"],yo={not:{any:[{field:"sectionHeightMode",in:_},{field:"sectionHeightModeTablet",in:_},{field:"sectionHeightModePhone",in:_}]}},Uo={context:"parent.line",is:!0},f={field:"direction",is:"row",default:"row"},s={not:Ro},S={all:[f,s,{not:{field:"separator",in:L.map(o=>o.value)}},{not:{field:"line",is:!0}}]},Wo={all:[S,...["columns",i("columns")].map(o=>({not:{field:o,in:Array.from({length:F},(e,h)=>h+b)}}))]},Xo={all:[s,{not:{all:[f,{field:"separator",in:L.map(o=>o.value)}]}}]},B={not:{all:[S,{field:"columns",in:Array.from({length:F},(o,e)=>e+b)}]}},jo="sharedColumnsFits",M="sharedColumnsMisfit",y="sharedColumnsDraws",U="sharedColumnsPhoneDraws",Ko={[jo]:o=>P(o.props??{}),[M]:o=>!P(o.props??{}),[y]:o=>I(o.props??{}).desktop,[U]:o=>I(o.props??{}).phone};function W(o){return{all:[{not:{context:M,is:!0}},{any:[bo,{field:o,set:!0}]}]}}const p={not:{context:y,is:!0}},d={not:{context:U,is:!0}},vo={any:[p,d]};function Go(o){return{...o,render:e=>o.render({...e,value:So(e.value)?"nowrap":"wrap"})}}const Oe={fields:Oo({_gContent:r("Content"),content:Eo.content,_gCardDisplay:r("Display"),cardDisplay:Lo(),showFor:No(),_gLayout:r("Layout"),direction:lo("Flex"),tabShape:uo("Tab shape",n(Z,{}),v.map(o=>({label:G[o],value:o,picture:J[o]})),"tabs",{columns:2,cell:Y}),mirrorCards:To(),label:mo(po("Tab name")),...ao("Flex"),justify:fo(),align:_o(),...w("wrap",T(),void 0,{phoneRow:Go(T())}),[t("order")]:Co(),...w("boxShape",C("Box shape",n(u,{}),E(R),"shape","auto"),ho,{phoneRow:C("Box shape",n(u,{}),E(R),"shape","auto",{phoneRest:o=>co(o)})}),separator:go(n(z,{size:18}),"none"),share:a("desktop",to()),[i("share")]:ro(),[t("share")]:io(),[l]:a("desktop",H(x,n(A,{}),[...Io],D)),[t(l)]:a("mobile",H(x,n(A,{}),[...Do],D)),...no(),blockSpacing:oo(),line:c("Line",!1,n(q,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,n(V,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:r("Shadow"),shadow:c("Shadow",!1,n(Q,{})),fillColor:eo(),_gBackground:r("Background image"),bgImage:a("desktop",g("Image","image/*")),bgImagePhone:a("mobile",g("Image","image/*")),...K(),placement:Ao("Content position"),_gLink:r("Link"),link:so("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,n($,{}),"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"],Po],[[t("share")],{all:[k,d]}],[[l],W(l)],[[t(l)],W(t(l))],[[t("wrap")],{all:[k,s,d]}],[[t("order")],{all:[S,d,p]}],[["phoneRow"],d],[["tabShape"],ko],[["separator"],f],[["columns",i("columns")],S],[[i("gap")],Xo],[["justify"],{all:[s,vo]}],[["wrap"],{all:[s,B,p]}],[["share"],{all:[B,p]}],[[i("share")],{all:[Wo,p]}],[["line"],Bo],[["upcoming"],Uo],[["jumpHighlight"],Mo],[["boxShape",i("boxShape"),t("boxShape")],yo]]),resolveFields:(o,e)=>xo(Yo(o,e),o.props),showWhenFacts:{...Fo,...wo,...Ko,...Ho}};function Yo(...[o,{fields:e}]){{const h=o.props;if(j(h.bgImage)){const X=N({fallback:{top:m.desktop,bottom:m.desktop,left:m.side,right:m.side},tablet:!0});return O(e,X)}return o.props.padV2!==!0?O(e,N({fallback:{top:24,bottom:24},tablet:!0})):e}}export{Oe as FlexFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{phoneKey as n,tabletKey as t}from"efficient-easel/draw";import{BOX_CARD_PAD as u,isBackgroundBox as eo}from"../../../../../../format/lib/content/box-background.js";import{darkenFields as no}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as to,REEL_SHAPE_LABELS as ro}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as io,TAB_SHAPE_PICTURES as ao}from"../../../choice-pictures.js";import{deviceField as d}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as lo,ClockIcon as so,CropIcon as N,MediaLayoutStackedIcon as co,LineBetweenIcon as po,LineSolidIcon as _o,ShadowIcon as So,StylesIcon as mo,TableIcon as F,TargetIcon as ho,WrapIcon as Oo}from"efficient-easel/icons";import{boxBlockSpacingField as fo,boxFillField as uo,boxColumnsFields as Ao,boxShareField as Ro,boxSharePhoneField as wo,boxShareTabletField as go,containerDirectionField as Co,containerGapRows as Eo,linkField as bo,plainText as To,swapPadding as k,toggle as S,upload as D,withPanelOnly as Lo}from"../../../controls.js";import{BOX_STACK_LINE as I,BOX_STACK_RANGE as R,STACK_BELOW_PROP as P}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as x,boxShapeOf as No}from"../../../../../../format/lib/content/box-shape.js";import{shapeLines as H}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as B}from"../../../shape-picker.js";import{BOX_COLUMNS_MAX as w,BOX_COLUMNS_MIN as g,boxPhoneRowOneLine as Fo,boxWrapWordOf as ko}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as y}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as Do,VIEW_KEY_ACCESS as l,group as m,phoneTwinFields as a}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Io,boxJustifyField as Po,boxWrapField as A,iconPickerRow as xo,placementField as Ho,select as M,sidesPaddingFields as W,slider as Bo}from"../../../box-fields.js";import{withRowRules as yo}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Mo}from"../../../separator-field.js";import{LOOP_SCROLLS as Wo}from"../../../../../../format/lib/animation/index.js";import{accordionOnSet as Uo}from"../../../box-accordion-seed.js";import{FlexSlots as U}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{boxPhoneOrderField as Ko}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Xo,ON_A_CARD as jo,cardDisplayField as vo}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Go,MIRROR_CARDS_MIRRORS as Yo,mirrorCardsField as Vo}from"../../../mirror-cards-field.js";import{SHOW_FOR_FACTS as Jo,showForField as zo,showForFields as qo}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as h,SHARED_COLUMNS_LABEL as K,SHARED_COLUMNS_OFF as X,sharedColumnsDrawn as j,sharedColumnsFits as v,SHARED_COLUMNS_PHONE_POINTS as Qo,SHARED_COLUMNS_POINTS as Zo}from"../../../../../../render/lib/content/box-shared-columns.js";const C={field:"bgImage",set:!0},G={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},$o={field:"direction",is:"tabs"},oe={field:"line",in:[!0,!1]},ee={field:"anchor",set:!0},E=["fixed","screen"],ne={not:{any:[{field:"sectionHeightMode",in:E},{field:"sectionHeightModeTablet",in:E},{field:"sectionHeightModePhone",in:E}]}},te={context:"parent.line",is:!0},c={not:{field:"direction",is:"accordion"}},Y="notAccordionRow",re={not:{context:Y,is:!0}},ie={[Y]:(o,e)=>e.parent?.props?.direction!=="accordion"},b={field:"direction",is:"row",default:"row"},p={not:Wo},O={all:[b,p,{not:{field:"separator",in:y.map(o=>o.value)}},{not:{field:"line",is:!0}}]},V={all:[O,...["columns",t("columns")].map(o=>({not:{field:o,in:Array.from({length:w},(e,r)=>r+g)}}))]},ae={all:[p,{not:{all:[b,{field:"separator",in:y.map(o=>o.value)}]}}]},T={not:{all:[O,{field:"columns",in:Array.from({length:w},(o,e)=>e+g)}]}},le="sharedColumnsFits",J="sharedColumnsMisfit",z="sharedColumnsDraws",q="sharedColumnsPhoneDraws",se={[le]:o=>v(o.props??{}),[J]:o=>!v(o.props??{}),[z]:o=>j(o.props??{}).desktop,[q]:o=>j(o.props??{}).phone};function Q(o){return{all:[{not:{context:J,is:!0}},{any:[jo,{field:o,set:!0}]}]}}const _={not:{context:z,is:!0}},f={not:{context:q,is:!0}},de={any:[_,f]},L={not:C},ce={not:{context:Yo,is:!0}},Z={all:[c,L,_,f,ce]},pe={field:"direction",is:"row"},_e={field:"align",in:["start","center","end"]},Se={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function me(){const{darken:o,darkenStyle:e}=no();return{...a("darken",o,l),...a("darkenStyle",e,l)}}const $={not:{all:[O,{field:t("columns"),in:Array.from({length:w},(o,e)=>e+g)}]}};function he(){const o=S(Do,!1,i(Oo,{})),e=r=>{const s=ko(r);return s===void 0?void 0:s==="wrap"};return{...A(),render:r=>o.render({...r,value:e(r.value),follows:e(r.follows)??!1,onChange:s=>r.onChange(s===void 0?void 0:s?"wrap":"nowrap")})}}function Oe(o){return{...o,render:e=>o.render({...e,value:Fo(e.value)?"nowrap":"wrap"})}}const Ge={fields:yo({_gContent:m("Content"),rowTitle:U.rowTitle,content:U.content,_gCardDisplay:m("Display"),cardDisplay:vo(),showFor:zo(),_gLayout:m("Layout"),direction:Co("Flex"),tabShape:xo("Tab shape",i(mo,{}),to.map(o=>({label:ro[o],value:o,picture:ao[o]})),"tabs",{columns:2,cell:io}),mirrorCards:Vo(),[P]:d("desktop",Bo("Stacks below",i(co,{}),R.min,R.max,R.step,I,"px",{clear:{hint:I},hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),startsOpen:d("desktop",S("Starts open",!1,i(lo,{}))),label:Lo(To("Tab name")),...Eo("Flex"),...a("justify",Po(),l),...a("align",Io(),l),...(()=>{const o=a("wrap",A(),void 0,{phoneRow:Oe(A())}),e=a("wrap",A(),l,{phoneRow:he()});return{wrap:o.wrap,[t("wrap")]:e[t("wrap")],[n("wrap")]:o[n("wrap")]}})(),[n("order")]:Ko(),...a("boxShape",B("Box shape",i(N,{}),H(x),"shape","auto"),l,{phoneRow:B("Box shape",i(N,{}),H(x),"shape","auto",{phoneRest:o=>No(o)})}),separator:Mo(i(po,{size:18}),"none"),share:d("desktop",Ro()),[t("share")]:go(),[n("share")]:wo(),[h]:d("desktop",M(K,i(F,{}),[...Zo],X)),[n(h)]:d("mobile",M(K,i(F,{}),[...Qo],X)),...Ao(),...a("blockSpacing",fo(),l),line:S("Line",!1,i(_o,{}),"A line across the blocks, with a dot on each."),upcoming:S("Upcoming",!1,i(so,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:m("Shadow"),...a("shadow",S("Shadow",!1,i(So,{})),l),...a("fillColor",uo(),l),_gBackground:m("Background image"),bgImage:d("desktop",D("Image","image/*")),bgImagePhone:d("mobile",D("Image","image/*")),...me(),placement:Ho("Content position"),_gLink:m("Link"),link:bo("Link to"),jumpHighlight:S("Highlight when a link jumps here",!1,i(ho,{}),"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"],C],[[n("share")],{all:[G,f]}],[[h],Q(h)],[[n(h)],Q(n(h))],[[n("wrap")],{all:[G,p,f]}],[[n("order")],{all:[O,f,_]}],[["phoneRow"],{all:[f,c]}],[["tabShape"],$o],[["rowTitle","startsOpen"],re],[["align","blockSpacing",t("blockSpacing"),n("blockSpacing")],c],[[t("justify"),n("justify")],{all:[p,Z]}],[[t("align"),n("align")],{all:[pe,_e,Z]}],[[t("wrap")],{all:[p,T,$,_,c]}],[[t("shadow"),n("shadow")],L],[[t("darken"),n("darken"),t("darkenStyle"),n("darkenStyle")],{all:[C,Se]}],[["separator"],b],[["columns",t("columns")],O],[[P],{all:[O,L,$,{not:{all:[V,{field:t("share"),set:!0}]}}]}],[[t("gap")],ae],[["justify"],{all:[p,de,c]}],[["wrap"],{all:[p,T,_,c]}],[["share"],{all:[T,_,c]}],[[t("share")],{all:[V,_]}],[["line"],oe],[["upcoming"],te],[["jumpHighlight"],ee],[["boxShape",t("boxShape"),n("boxShape")],ne]]),resolveData:(o,e)=>{const r=o.props;return r.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Uo(r)}:o},resolveFields:(o,e)=>qo(fe(o,e),o.props),showWhenFacts:{...Xo,...Go,...se,...Jo,...ie}};function fe(...[o,{fields:e}]){{const r=o.props;if(eo(r.bgImage)){const oo=W({fallback:{top:u.desktop,bottom:u.desktop,left:u.side,right:u.side},tablet:!0});return k(e,oo)}return o.props.padV2!==!0?k(e,W({fallback:{top:24,bottom:24},tablet:!0})):e}}export{Ge as FlexFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as a,REEL_SHAPE_DEFAULT as m,HERO_REEL_SHAPES as d,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as R}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_SHOWN_DEFAULT as O}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as P,HERO_ARROW_SHAPE_LABELS as H,HERO_ARROW_SHAPES as L,HERO_ARROWS_PLACEMENT_DEFAULT as u,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 h,SlideArrowsBareIcon as f,SlideArrowsRoundIcon as k,SlideArrowsSquareIcon as D,SlidePickerBarIcon as U,SlidePickerCardsIcon as g,SlidePickerDotsIcon as y,SlidePickerNumbersIcon as F,SlidePickerSquaresIcon as W,SquareIcon as l}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as N}from"efficient-shell/icons/efficient-looks";const b=N,C={cards:e(g,{}),dots:e(y,{}),numbers:e(F,{}),bar:e(U,{}),squares:e(W,{})},x={outline:e(k,{}),solid:e(b,{}),square:e(D,{}),bare:e(f,{})};import{toggle as i}from"../../../controls.js";import{HERO_TEXTURE_COLOR_ROW as B}from"../../hero-shared-fields.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as q,iconPickerRow as _,placementField as n,segmented as c,slider as p}from"../../../box-fields.js";import{deviceField as E,deviceNote as j}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as M,HERO_PHONE_SIDEWAYS_LABEL as X,HERO_PHONE_UPDOWN_DEFAULT as Y,HERO_PHONE_UPDOWN_LABEL as v,phoneSidewaysPoints as K,phoneUpDownPoints as z}from"../../../../../../format/lib/hero-phone-stack.js";import{heroHeightFields as G}from"../../shared-fields.js";import{HeroSlots as S}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const ne={fields:{_dDevice:j(),_gContent:o("Content"),slides:S.slides,strip:S.strip,_gStyle:o("Style"),alignment:q(),_gTexture:o("Texture"),showTexture:i("Show texture",O,e(t,{})),textureColor:B,textureOpacity:p("Texture opacity",e(T,{}),0,100,1,40,"%"),_gLayout:o("Layout"),...G(),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(h,{})),autoplayInterval:p("Still time per slide",e(I,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",R,e(t,{})),pickerShape:_("Slide picker shape",e(l,{}),d.map(r=>({label:A[r],value:r,picture:C[r]})),m),pickerPlacement:n("Slide picker placement",{fallback:a}),_gArrows:o("Arrows"),showArrows:i("Show arrows",w,e(t,{})),arrowsShape:_("Arrows shape",e(l,{}),L.map(r=>({label:H[r],value:r,picture:x[r]})),P),arrowsPlacement:n("Arrows placement",{fallback:u}),_gPhone:E("mobile",o("On a phone")),phoneUpDown:E("mobile",c(v,e(s,{}),z(),Y)),phoneSideways:E("mobile",c(X,e(s,{}),K(),M))}};export{ne as HeroFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as p,REEL_SHAPE_DEFAULT as m,HERO_REEL_SHAPES as d,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as R}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_SHOWN_DEFAULT as O}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as P,HERO_ARROW_SHAPE_LABELS as H,HERO_ARROW_SHAPES as L,HERO_ARROWS_PLACEMENT_DEFAULT as u,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 h,SlideArrowsBareIcon as f,SlideArrowsRoundIcon as k,SlideArrowsSquareIcon as D,SlidePickerBarIcon as U,SlidePickerCardsIcon as g,SlidePickerDotsIcon as y,SlidePickerNumbersIcon as F,SlidePickerSquaresIcon as W,SquareIcon as l}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as N}from"efficient-shell/icons/efficient-looks";const b=N,C={cards:e(g,{}),dots:e(y,{}),numbers:e(F,{}),bar:e(U,{}),squares:e(W,{})},x={outline:e(k,{}),solid:e(b,{}),square:e(D,{}),bare:e(f,{})};import{toggle as i}from"../../../controls.js";import{HERO_TEXTURE_COLOR_ROW as B,heroHeightFields as q}from"../../hero-shared-fields.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as j,iconPickerRow as _,placementField as n,segmented as c,slider as S}from"../../../box-fields.js";import{deviceField as E,deviceNote as M}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{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const _e={fields:{_dDevice:M(),_gContent:o("Content"),slides:a.slides,strip:a.strip,_gStyle:o("Style"),alignment:j(),_gTexture:o("Texture"),showTexture:i("Show texture",O,e(t,{})),textureColor:B,textureOpacity:S("Texture opacity",e(T,{}),0,100,1,40,"%"),_gLayout:o("Layout"),...q(),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(h,{})),autoplayInterval:S("Still time per slide",e(I,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",R,e(t,{})),pickerShape:_("Slide picker shape",e(l,{}),d.map(r=>({label:A[r],value:r,picture:C[r]})),m),pickerPlacement:n("Slide picker placement",{fallback:p}),_gArrows:o("Arrows"),showArrows:i("Show arrows",w,e(t,{})),arrowsShape:_("Arrows shape",e(l,{}),L.map(r=>({label:H[r],value:r,picture:x[r]})),P),arrowsPlacement:n("Arrows placement",{fallback:u}),_gPhone:E("mobile",o("On a phone")),phoneUpDown:E("mobile",c(K,e(s,{}),G(),v)),phoneSideways:E("mobile",c(Y,e(s,{}),z(),X))}};export{_e as HeroFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{ImageIcon as b,ImagesIcon as c,MediaIcon as f,MediaLayoutSideBySideIcon as E,MediaLayoutStackedIcon as P,OpacityIcon as m}from"efficient-easel/icons";import{colorInput as g,focusKeptField as i,MEDIA_TYPE_OPTIONS as S,upload as a}from"../../../controls.js";import{group as t,phoneTwinFields as h}from"efficient-easel/screen/lib/document/box-fields";import{segmented as l,slider as d}from"../../../box-fields.js";import{MEDIA_LAYOUT_DEFAULT as n,MEDIA_LAYOUT_LABELS as p,MEDIA_LAYOUTS as y,resolvePhoneLayout as v}from"../../../../../../format/lib/hero-media-layout.js";import{deviceNote as U}from"efficient-easel/screen/lib/document/device-fields";import{HERO_OVERLAY_ROWS as u,HERO_VIDEO_ROWS as r}from"../../hero-shared-fields.js";import{heightField as s,slotNoticeField as A}from"../../shared-fields.js";import{forMediaType as F,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 I}from"../../../../../../format/lib/hero-video.js";const L=F("video","image"),T=F("image","image"),O={one:o(b,{}),side:o(E,{}),stacked:o(P,{})};import{HeroSingleSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{DEFAULT_TINT as _}from"../../../../../../format/lib/content/tint.js";const z={fields:D({_dDevice:U(),boxNotice:A("HeroSingle"),boxes:C.boxes,_gStyle:t("Style"),overlay:d("Overlay",o(m,{}),0,100,5,100,"%"),overlayColor:u.overlayColor,overlayPosition:u.overlayPosition,_gLayout:t("Layout"),heightDesktop:s("desktop"),heightMobile:s("mobile"),_gMedia:t("Media"),mediaType:l("Type",o(f,{}),S,"image"),mediaLayout:l("Layout",o(c,{}),y.map(e=>({label:p[e],value:e,picture:O[e]})),n),mediaLayoutPhone:h("mediaLayout",l("Layout",o(c,{}),y.map(e=>({label:p[e],value:e,picture:O[e]})),n,{phoneRest:e=>v(void 0,e)})).mediaLayoutPhone,mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalTablet:i(),imageFocalPhone:i(),videoSource:r.videoSource,mediaVideo:a(M,"video/*",k),youtubeUrl:r.youtubeUrl,videoPlayback:r.videoPlayback,poster:a("Video poster","image/*","Upload a poster still"),_gTint:t("Image tint"),tintColor:g("Tint color",_),tintOpacity:d("Tint opacity",o(m,{}),0,100,5,0,"%"),mediaImage2:a("Background image","image/*","Upload a background image",{focus:"imageFocal2"}),imageFocal2:i(),imageFocal2Tablet:i(),imageFocal2Phone:i(),tintColor2:g("Tint color",_),tintOpacity2:d("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:[L,{field:"videoSource",is:"upload",default:I}]},youtubeUrl:{all:[L,{field:"videoSource",is:"youtube",default:I}]},mediaLayout:{all:[T,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[T,{context:"device",is:"mobile"}]}},fallback:"image"})};export{z as HeroSingleFields};
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 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{FOOTER_LOGO_PX as i,HEADER_LOGO_PX_MIN as t,LOGO_BLOCK_PX_MAX as e}from"../../../../../../render/components/Logo.js";import{HeightIcon as r}from"efficient-easel/icons";import{linkField as l,plainText as m,upload as a,withPanelOnly as n}from"../../../controls.js";import{slider as p}from"../../../box-fields.js";import{blockAlignmentFields as O}from"../../../box-fields.js";import{withRowRules as f}from"../../../../../../render/lib/document/show-when.js";import{LOGO_COLOR_FIELDS as s}from"../../../logo-color-fields.js";const u={fields:f({src:a("Logo image","image/*"),alt:n(m("Alt text","Brand name","Read out in place of the picture, and shown if it can’t load.")),href:l("Link"),heightPx:p("Height",o(r,{}),t,e,1,i,"px"),...O(),...s},[[["alt"],{field:"src",set:!0}]])};export{u as LogoBlockFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{FOOTER_LOGO_PX as i,HEADER_LOGO_PX_MIN as t,LOGO_BLOCK_PX_MAX as e}from"../../../../../../render/components/Logo.js";import{HeightIcon as r}from"efficient-easel/icons";import{linkField as m,plainText as l,upload as a,withPanelOnly as n}from"../../../controls.js";import{slider as p}from"../../../box-fields.js";import{blockAlignmentFields as s}from"../../../box-fields.js";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{withRowRules as O}from"../../../../../../render/lib/document/show-when.js";import{LOGO_COLOR_FIELDS as _}from"../../../logo-color-fields.js";const A={fields:O({src:a("Logo image","image/*"),alt:n(l("Alt text","Brand name","Read out in place of the picture, and shown if it can’t load.")),href:m("Link"),heightPx:p("Height",o(r,{}),t,e,1,i,"px"),...s("align",{access:f}),..._},[[["alt"],{field:"src",set:!0}]])};export{A as LogoBlockFields};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{CaseIcon as m,OpacityIcon as i,PlacementIcon as n}from"efficient-easel/icons";import{linkField as s,text as o,textarea as g,toggle as p,upload as r}from"../../../controls.js";import{group as e,section as l}from"efficient-easel/screen/lib/document/box-fields";import{alignmentFields as c,segmented as d,slider as y}from"../../../box-fields.js";import{ctaField as u,photographyToggle as I}from"../../shared-fields.js";import{SPLIT_PH as a,IMGBTN_PH as f}from"../../../../../../format/lib/document/blocks/general/Split/meta.js";const O={fields:{_sText:l("Text column"),_gContent:e("Content"),eyebrow:o("Eyebrow",a.eyebrow),title:g("Heading",a.title),body:g("Body",a.body),uppercase:p("Uppercase heading",!1,t(m,{})),...c("textAlign"),_gButton:e("Button"),...u,_gTextBg:e("Background image"),textBgSrc:r("Background image","image/*"),overlay:y("Overlay",t(i,{}),0,100,5,60,"%"),_sImage:l("Image column"),_gImage:e("Image"),imageSrc:r("Image","image/*"),reverse:d("Image side",t(n,{}),[{label:"Image left",value:!1},{label:"Image right",value:!0}],!1),_gImageBtn:e("Overlay button"),imageBtnText:o("Overlay button",f.text),imageBtnHref:s("Overlay button link"),_gStyle:e("Style"),grayscale:I()}};export{O as SplitFields};
1
+ import{jsx as t}from"react/jsx-runtime";import{CaseIcon as m,OpacityIcon as i,PlacementIcon as n}from"efficient-easel/icons";import{linkField as s,text as o,textarea as r,toggle as c,upload as g}from"../../../controls.js";import{group as e,section as l}from"efficient-easel/screen/lib/document/box-fields";import{alignmentFields as p,segmented as d,slider as y}from"../../../box-fields.js";import{VIEW_KEY_ACCESS as u}from"efficient-easel/screen/lib/document/box-fields";import{ctaField as I,photographyToggle as f}from"../../shared-fields.js";import{SPLIT_PH as a,IMGBTN_PH as _}from"../../../../../../format/lib/document/blocks/general/Split/meta.js";const h={fields:{_sText:l("Text column"),_gContent:e("Content"),eyebrow:o("Eyebrow",a.eyebrow),title:r("Heading",a.title),body:r("Body",a.body),uppercase:c("Uppercase heading",!1,t(m,{})),...p("textAlign",{access:u}),_gButton:e("Button"),...I,_gTextBg:e("Background image"),textBgSrc:g("Background image","image/*"),overlay:y("Overlay",t(i,{}),0,100,5,60,"%"),_sImage:l("Image column"),_gImage:e("Image"),imageSrc:g("Image","image/*"),reverse:d("Image side",t(n,{}),[{label:"Image left",value:!1},{label:"Image right",value:!0}],!1),_gImageBtn:e("Overlay button"),imageBtnText:o("Overlay button",_.text),imageBtnHref:s("Overlay button link"),_gStyle:e("Style"),grayscale:f()}};export{h as SplitFields};
@@ -1 +1 @@
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
+ 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 i,framesItsCards as c}from"../../../../../../format/lib/content/card-place.js";import{cardTemplateOwner as f}from"../../../../../../format/lib/content/card-template.js";import{CARD_ROW_FACTS as h,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 _}from"efficient-easel/screen/lib/document/style-fields";import{segmented as b,select as R}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 C}from"../../shared-fields.js";import{blockAlignmentFields as P}from"../../../box-fields.js";import{VIEW_KEY_ACCESS as y}from"efficient-easel/screen/lib/document/box-fields";import{consentWordsKept as A,withConsentWordsRow as H}from"../../../consent-words-field.js";import{withLiveNumberRow as T}from"../../../live-number-field.js";function I(e,o){const t=o?.textStyle;if(typeof t!="string"||!t.startsWith("heading-"))return e;const{align:O,alignPhone:S,...l}=e;return l}const X={fields:{text:w("Body",F.body),consentWords:A("text"),[s]:_("text"),...P("align",{access:y}),tone:C(),_gText:x("Text"),rowField:u("Shows","text"),[d]:v(b("Place",r(n,{}),[{label:"In the card",value:"",picture:r(a,{})},{label:"On the top line",value:"top-line",picture:r(p,{})}],""),{not:{context:i,is:!0}}),tag:R("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)=>I(T(H(g(o.fields,e,o),e.props,"text"),e.props),e.props),showWhenFacts:{...h,[i]:(e,o)=>{const t=f(o.appState,e.props?.id);return t===void 0?void 0:!c(t?.type)}}};export{X as TextFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{StylesIcon as a}from"efficient-easel/icons";import{plainText as i,readHidable as s,textarea as m,withOffPage as u}from"../../../controls.js";import{group as n}from"efficient-easel/screen/lib/document/box-fields";import{blockAlignmentFields as d,select as p}from"../../../box-fields.js";import{innerSpacingFields as f}from"../../shared-fields.js";import{TITLE_WITH_BUTTONS_PH as b}from"../../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";const v={fields:{_gContent:n("Content"),title:m("Heading",b.title),buttons:{type:"array",label:"Buttons",arrayFields:{label:i("Button"),href:u(i("Button link")),variant:p("Style",r(a,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"outline"}],"outline")},defaultItemProps:{label:"",href:"#",variant:"outline"},getItemSummary:t=>t?.label||"Button"},_gStyle:n("Style"),...d("buttonsAlign",{fallback:"right"}),...f("TitleWithButtons")},resolveFields:(t,{fields:e})=>{const l=s(t.props.title);if(!(!l.hidden&&!!l.text.trim()))return e;const{buttonsAlign:h,buttonsAlignPhone:c,...o}=e;return o}};export{v as TitleWithButtonsFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{StylesIcon as a}from"efficient-easel/icons";import{plainText as i,readHidable as s,textarea as m,withOffPage as u}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{blockAlignmentFields as d,select as p}from"../../../box-fields.js";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{innerSpacingFields as b}from"../../shared-fields.js";import{TITLE_WITH_BUTTONS_PH as g}from"../../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";const A={fields:{_gContent:o("Content"),title:m("Heading",g.title),buttons:{type:"array",label:"Buttons",arrayFields:{label:i("Button"),href:u(i("Button link")),variant:p("Style",r(a,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"outline"}],"outline")},defaultItemProps:{label:"",href:"#",variant:"outline"},getItemSummary:t=>t?.label||"Button"},_gStyle:o("Style"),...d("buttonsAlign",{fallback:"right",access:f}),...b("TitleWithButtons")},resolveFields:(t,{fields:e})=>{const l=s(t.props.title);if(!(!l.hidden&&!!l.text.trim()))return e;const{buttonsAlign:h,buttonsAlignPhone:_,...n}=e;return n}};export{A as TitleWithButtonsFields};
@@ -1,2 +1,2 @@
1
- export declare const assembleGeneralBlocks: () => Record<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "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" | "Text" | "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" | "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" | "Text" | "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">>>;
1
+ export declare const assembleGeneralBlocks: () => Record<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "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" | "Text" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "CardList" | "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" | "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" | "Text" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "CardList" | "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 +1 @@
1
- import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{DocBodyFields as n}from"./DocBody/fields.js";import{DocMastheadFields as c}from"./DocMasthead/fields.js";import{DocMetaCardsFields as S}from"./DocMetaCards/fields.js";import{DocTabsFields as B}from"./DocTabs/fields.js";import{EyebrowFields as g}from"./Eyebrow/fields.js";import{FAQFields as u}from"./FAQ/fields.js";import{FeaturedCoverFields as C}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as k}from"./Footprint/fields.js";import{GridFields as L}from"./Grid/fields.js";import{HeadingFields as H}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as h}from"./HeroGroup/fields.js";import{HeroSingleFields as y}from"./HeroSingle/fields.js";import{HeroSlideFields as D}from"./HeroSlide/fields.js";import{ImageBlockFields as P}from"./ImageBlock/fields.js";import{IntegrationsFields as E}from"./Integrations/fields.js";import{IntroBleedFields as b}from"./IntroBleed/fields.js";import{KeyFeaturesFields as G}from"./KeyFeatures/fields.js";import{LocationMapFields as I}from"./LocationMap/fields.js";import{LogoBlockFields as R}from"./LogoBlock/fields.js";import{LogosFields as x}from"./Logos/fields.js";import{LongReadFields as A}from"./LongRead/fields.js";import{ManifestoFields as w}from"./Manifesto/fields.js";import{MastheadFields as v}from"./Masthead/fields.js";import{MockupFields as N}from"./Mockup/fields.js";import{OrderSummaryFields as K}from"./OrderSummary/fields.js";import{ParagraphsAFields as O}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as Q}from"./PaymentBadges/fields.js";import{PostCardFields as W}from"./PostCard/fields.js";import{ProcessStepsFields as _}from"./ProcessSteps/fields.js";import{ProseFields as j}from"./Prose/fields.js";import{SectionHeaderFields as q}from"./SectionHeader/fields.js";import{SeriesFields as z}from"./Series/fields.js";import{SpacerFields as J}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as U}from"./SpecStrip/fields.js";import{SplitFields as V}from"./Split/fields.js";import{StatsFields as X}from"./Stats/fields.js";import{StatsParagraphFields as Y}from"./StatsParagraph/fields.js";import{TestimonialsFields as Z}from"./Testimonials/fields.js";import{TextFields as $}from"./Text/fields.js";import{TickerFields as oo}from"./Ticker/fields.js";import{TimelineFields as ro}from"./Timeline/fields.js";import{TimelineTrackFields as eo}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as io}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as to}from"../../../../../render/lib/document/blocks/general/renders.js";const mo={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:l,Countdown:a,CustomHTML:p,Divider:F,Contents:f,DocBody:n,DocMasthead:c,DocMetaCards:S,DocTabs:B,Eyebrow:g,FAQ:u,FeaturedCover:C,Flex:T,Footprint:k,Grid:L,Heading:H,Hero:M,HeroGroup:h,HeroSingle:y,HeroSlide:D,ImageBlock:P,Integrations:E,IntroBleed:b,KeyFeatures:G,LocationMap:I,LogoBlock:R,Logos:x,LongRead:A,Manifesto:w,Masthead:v,Mockup:N,OrderSummary:K,ParagraphsA:O,PaymentBadges:Q,PostCard:W,ProcessSteps:_,Prose:j,SectionHeader:q,Series:z,Spacer:J,SpecStrip:U,Split:V,Stats:X,StatsParagraph:Y,Testimonials:Z,Text:$,Ticker:oo,Timeline:ro,TimelineTrack:eo,TitleWithButtons:io},so=()=>(r(),o(to,mo)),nr=so();export{so as assembleGeneralBlocks,nr as generalBlocks};
1
+ import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{DocBodyFields as n}from"./DocBody/fields.js";import{DocMastheadFields as c}from"./DocMasthead/fields.js";import{DocMetaCardsFields as S}from"./DocMetaCards/fields.js";import{DocTabsFields as B}from"./DocTabs/fields.js";import{EyebrowFields as g}from"./Eyebrow/fields.js";import{FAQFields as C}from"./FAQ/fields.js";import{FeaturedCoverFields as u}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as L}from"./Footprint/fields.js";import{GridFields as k}from"./Grid/fields.js";import{HeadingFields as H}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as h}from"./HeroGroup/fields.js";import{HeroSingleFields as y}from"./HeroSingle/fields.js";import{HeroSlideFields as D}from"./HeroSlide/fields.js";import{ImageBlockFields as P}from"./ImageBlock/fields.js";import{IntegrationsFields as E}from"./Integrations/fields.js";import{IntroBleedFields as b}from"./IntroBleed/fields.js";import{KeyFeaturesFields as G}from"./KeyFeatures/fields.js";import{LocationMapFields as I}from"./LocationMap/fields.js";import{LogoBlockFields as R}from"./LogoBlock/fields.js";import{LogosFields as x}from"./Logos/fields.js";import{LongReadFields as A}from"./LongRead/fields.js";import{ManifestoFields as w}from"./Manifesto/fields.js";import{MastheadFields as v}from"./Masthead/fields.js";import{MockupFields as N}from"./Mockup/fields.js";import{OrderSummaryFields as K}from"./OrderSummary/fields.js";import{CardListFields as O}from"./CardList/fields.js";import{ParagraphsAFields as Q}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as W}from"./PaymentBadges/fields.js";import{PostCardFields as _}from"./PostCard/fields.js";import{ProcessStepsFields as j}from"./ProcessSteps/fields.js";import{ProseFields as q}from"./Prose/fields.js";import{SectionHeaderFields as z}from"./SectionHeader/fields.js";import{SeriesFields as J}from"./Series/fields.js";import{SpacerFields as U}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as V}from"./SpecStrip/fields.js";import{SplitFields as X}from"./Split/fields.js";import{StatsFields as Y}from"./Stats/fields.js";import{StatsParagraphFields as Z}from"./StatsParagraph/fields.js";import{TestimonialsFields as $}from"./Testimonials/fields.js";import{TextFields as oo}from"./Text/fields.js";import{TickerFields as ro}from"./Ticker/fields.js";import{TimelineFields as eo}from"./Timeline/fields.js";import{TimelineTrackFields as io}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as to}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as mo}from"../../../../../render/lib/document/blocks/general/renders.js";const so={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:l,Countdown:a,CustomHTML:p,Divider:F,Contents:f,DocBody:n,DocMasthead:c,DocMetaCards:S,DocTabs:B,Eyebrow:g,FAQ:C,FeaturedCover:u,Flex:T,Footprint:L,Grid:k,Heading:H,Hero:M,HeroGroup:h,HeroSingle:y,HeroSlide:D,ImageBlock:P,Integrations:E,IntroBleed:b,KeyFeatures:G,LocationMap:I,LogoBlock:R,Logos:x,LongRead:A,Manifesto:w,Masthead:v,Mockup:N,OrderSummary:K,CardList:O,ParagraphsA:Q,PaymentBadges:W,PostCard:_,ProcessSteps:j,Prose:q,SectionHeader:z,Series:J,Spacer:U,SpecStrip:V,Split:X,Stats:Y,StatsParagraph:Z,Testimonials:$,Text:oo,Ticker:ro,Timeline:eo,TimelineTrack:io,TitleWithButtons:to},lo=()=>(r(),o(mo,so)),Sr=lo();export{lo as assembleGeneralBlocks,Sr as generalBlocks};
@@ -1,4 +1,30 @@
1
+ import { type BoxField } from "efficient-easel/screen/lib/document/box-fields";
1
2
  import { type CustomField } from "../controls.js";
3
+ import { type ShapeLine } from "../../../../format/lib/content/gallery-card-layout.js";
4
+ export declare function heroRatioLines(): readonly ShapeLine[];
5
+ export declare const HERO_TABLET_VH_HINT = "On Tablet, this hero uses the Desktop vh. Set vh in the Desktop view.";
6
+ type HeroHeightKept = BoxField<string> & {
7
+ reachedBy: string;
8
+ };
9
+ type HeroHeightRowsBase = {
10
+ heightDesktop: BoxField<number>;
11
+ heightMobile: BoxField<number>;
12
+ heightFixed: HeroHeightKept;
13
+ heightFixedMobile: HeroHeightKept;
14
+ };
15
+ export type HeroHeightRows = HeroHeightRowsBase & {
16
+ heightTablet: BoxField<number>;
17
+ heightFixedTablet: HeroHeightKept;
18
+ };
19
+ export type HeroHeightRowsNoTabletNumber = HeroHeightRowsBase & {
20
+ heightFixedTablet: BoxField<number>;
21
+ };
22
+ export declare function heroHeightFields(options: {
23
+ tabletNumber: false;
24
+ }): HeroHeightRowsNoTabletNumber;
25
+ export declare function heroHeightFields(options?: {
26
+ tabletNumber?: true;
27
+ }): HeroHeightRows;
2
28
  export declare const HERO_OVERLAY_ROWS: {
3
29
  overlayColor: CustomField<string>;
4
30
  overlayPosition: CustomField<string>;
@@ -11,7 +37,8 @@ export declare const HERO_SLIDE_OVERLAY_ROWS: {
11
37
  overlayPosition: CustomField<string>;
12
38
  };
13
39
  export declare const HERO_VIDEO_ROWS: {
14
- videoSource: import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
40
+ videoSource: BoxField<string>;
15
41
  youtubeUrl: CustomField<import("efficient-easel/draw").HidableValue>;
16
- videoPlayback: import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
42
+ videoPlayback: BoxField<string>;
17
43
  };
44
+ export {};
@@ -1 +1 @@
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};
1
+ import{jsx as i,jsxs as M,Fragment as Y}from"react/jsx-runtime";import{HeightIcon as K,PlacementIcon as y,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 R,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 C,plainText as ie,Slider as H,useSelectedSibling as O}from"../controls.js";import{ColourRow as ne,InheritedColourRow as le}from"../ColourControl.js";import{rowSay as re,segmented as w}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 A}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 F,OVERLAY_POSITION_OPTIONS as L,slideOverlayState as I}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 D={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),n=e==="tablet"?k(p,D.desktop):null,h=b??n??{unit:"vh",vh:u.fallback},c=o.readOnly===!0,_=Oe(),W=r=>{if(r===h.unit)return;if(r!=="vh"){d([[t.fixed,n?.unit===r?n.value:se[r]]]);return}const B=s!==void 0&&typeof p[s]!="number"&&n!==null&&n.unit!=="vh";d([[t.fixed,void 0],...B?[[s,u.fallback]]:[]])},f=b===null&&e!=="desktop",m=s===void 0,T=m&&n!==null&&n.unit!=="vh",S=n===null?`${u.fallback} ${u.unit}`:n.unit==="vh"?`${n.vh} ${u.unit}`:n.unit==="px"?n.value:_.find(r=>r.image===n.value)?.label??n.value;return i(q,{label:a("Height"),icon:Z(i(K,{})),hint:m&&(h.unit==="vh"||T)?a(xe):void 0,action:e==="desktop"?void 0:i(G,{words:ue()?.panel,label:a("Height"),changed:b!==null||!!p[t.fixed],detail:e==="tablet"?ee(re,S):S,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:[i(z,{options:[{id:"vh",label:a("vh"),disabled:T},{id:"ratio",label:a("Ratio")},{id:"px",label:a("px")}],value:h.unit,onChange:W,ariaLabel:a("Unit"),disabled:c}),h.unit==="ratio"?i(de,{label:"Height",lines:_,column:"image",value:h.value,disabled:c,onChange:r=>d([[t.fixed,r]])}):h.unit==="px"?H({...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}`]])}):H({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=D[e])=>({type:"custom",...J({},{type:"number",label:"Height"}),render:o=>i(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:"heightFixedTablet"}),l=R("heightDesktop",g("desktop"),t,{phoneRow:o}),d=R("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",A),overlayPosition:C("Overlay position",L,F,"A corner would need a diagonal ramp, which this overlay does not draw.",i(y,{}))},U="Texture",V=e=>C("Overlay position",L,e,"A corner would need a diagonal ramp, which this overlay does not draw.",i(y,{}),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=I({overlayColor:d,overlayPosition:o},l);return i(le,{label:a("Overlay color"),value:d,inherited:s.color,resetTo:a(U),onChange:t,onReset:()=>t("")})}const Re=V(F),Ce=V("");function He(e){const[t]=O("overlayColor"),o=I({overlayColor:t,overlayPosition:e.value}).own?Re:Ce;return i(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 i(ne,{label:a("Texture color"),value:e||A,onChange:t,hint:we(o)})}const Je={type:"custom",render:({value:e,onChange:t})=>i(Ae,{value:e,onChange:t})},Qe={overlayColor:{type:"custom",render:({value:e,onChange:t})=>i(ye,{value:e,onChange:t})},overlayPosition:{type:"custom",render:({value:e,onChange:t})=>i(He,{value:e,onChange:t})}},Ze={videoSource:w("Source",i($,{}),ve.map(e=>({label:me[e],value:e})),be),youtubeUrl:ie("YouTube link","https://youtu.be/…"),videoPlayback:w("Playback",i(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,11 +1,7 @@
1
1
  import type { ReactElement } from "react";
2
2
  import { toggle } from "../controls.js";
3
3
  export declare const heightField: (tier: "desktop" | "mobile") => import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
4
- export declare function heroHeightFields(): {
5
- heightDesktop: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
6
- heightTablet: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
7
- heightMobile: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
8
- };
4
+ export { heroHeightFields } from "./hero-shared-fields.js";
9
5
  export declare const ctaField: {
10
6
  ctaText: import("../controls.js").CustomField<import("efficient-easel/draw").HidableValue>;
11
7
  ctaHref: import("../controls.js").CustomField<import("efficient-easel/draw").HidableValue>;
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{SECTION_PAD_INNER_DEFAULTS as h}from"../../../../render/lib/document/passes/section-padding.js";import s,{SlotNoticeField as a}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as i}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as d}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as m}from"../../../../format/lib/content/image-treatment.js";import{BlackAndWhiteIcon as c,ContrastIcon as g,HeightIcon as u,TypeIcon as f}from"efficient-easel/icons";import{linkField as T,spacingFields as F,text as y,toggle as b}from"../controls.js";import{segmented as x,slider as _}from"../box-fields.js";import{deviceField as w}from"efficient-easel/screen/lib/document/device-fields";import{phoneTwinFields as n}from"efficient-easel/screen/lib/document/box-fields";import{FieldGlyph as k}from"../../../components/FieldGlyph.js";import{fieldNoun as E}from"../../../../format/lib/document/field-noun.js";import{CTA_PH as H}from"../../../../format/lib/document/blocks/placeholders.js";const l=e=>_("Height",o(u,{}),i.min,i.max,i.step,i.fallback,i.unit,e),j=e=>w(e,l()),p={read:e=>e.heightMobile,write:(e,t,r)=>({heightMobile:r}),fieldKey:()=>"heightMobile",ownField:!0,tablet:{read:e=>e.heightTablet,write:(e,t,r)=>({heightTablet:r}),fieldKey:()=>"heightTablet",ownField:!0}};function U(){const e=n("heightDesktop",l(),p),t=n("heightDesktop",l({clear:{phoneFollows:!1}}),p);return{heightDesktop:e.heightDesktop,heightTablet:e.heightTablet,heightMobile:t.heightMobile}}const W={ctaText:y("Button",H.text),ctaHref:T("Button link")},Y=()=>x("Tone",o(g,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),q=e=>F({...h[e],keys:{top:"padTop",bottom:"padBottom"},group:!1}),z=(e,t)=>({type:"custom",render:()=>o(s,{parentType:e,label:t})}),J=e=>({type:"custom",render:()=>o(a,{parentType:e})});function I(e){const{photographyGrayscale:t}=d();return b(m,t===!0,o(c,{})).render(e)}function Q(){return{type:"custom",render:e=>o(I,{...e})}}function V(e){const t=E(e);return t?o(k,{noun:t}):o(f,{})}export{W as ctaField,j as heightField,U as heroHeightFields,q as innerSpacingFields,Q as photographyToggle,J as slotNoticeField,z as slotRowsField,V as textKindGlyph,Y as toneField};
1
+ import{jsx as o}from"react/jsx-runtime";import{SECTION_PAD_INNER_DEFAULTS as i}from"../../../../render/lib/document/passes/section-padding.js";import n,{SlotNoticeField as p}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as l}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as m}from"../../../../format/lib/content/image-treatment.js";import{BlackAndWhiteIcon as d,ContrastIcon as s,HeightIcon as a,TypeIcon as c}from"efficient-easel/icons";import{linkField as f,spacingFields as u,text as g,toggle as h}from"../controls.js";import{segmented as x,slider as F}from"../box-fields.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as T}from"../../../components/FieldGlyph.js";import{fieldNoun as I}from"../../../../format/lib/document/field-noun.js";import{CTA_PH as A}from"../../../../format/lib/document/blocks/placeholders.js";const E=t=>F("Height",o(a,{}),r.min,r.max,r.step,r.fallback,r.unit,t),D=t=>y(t,E());import{heroHeightFields as J}from"./hero-shared-fields.js";const j={ctaText:g("Button",A.text),ctaHref:f("Button link")},M=()=>x("Tone",o(s,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),O=t=>u({...i[t],keys:{top:"padTop",bottom:"padBottom"},group:!1}),K=(t,e)=>({type:"custom",render:()=>o(n,{parentType:t,label:e})}),U=t=>({type:"custom",render:()=>o(p,{parentType:t})});function H(t){const{photographyGrayscale:e}=l();return h(m,e===!0,o(d,{})).render(t)}function W(){return{type:"custom",render:t=>o(H,{...t})}}function Y(t){const e=I(t);return e?o(T,{noun:e}):o(c,{})}export{j as ctaField,D as heightField,J as heroHeightFields,O as innerSpacingFields,W as photographyToggle,U as slotNoticeField,K as slotRowsField,Y as textKindGlyph,M as toneField};
@@ -0,0 +1,3 @@
1
+ type Props = Record<string, unknown>;
2
+ export declare function accordionOnSet(props: Props): Props;
3
+ export {};
@@ -0,0 +1 @@
1
+ import{newNodeId as n}from"efficient-easel/draw";import{BOX_TYPE as p}from"../../../format/lib/document/container-blocks.js";import{DIM as w,INNER_BOX as T,TEXT as f}from"../../../format/lib/document/seed-parts.js";const a=["First row","Second row","Third row"],l="Write the words for this row.",i=t=>({type:"Text",props:{...f,id:n("Text"),tag:"p",text:t}}),y=(t,o)=>({type:p,props:{...T,id:n(p),...o?{startsOpen:!0}:{},rowTitle:[i(t)],content:[{type:"Text",props:{...w,id:n("Text"),tag:"p",text:l}}]}}),d=t=>!Array.isArray(t)||t.length===0;function u(t){const o=Array.isArray(t.content)?t.content:[];if(o.length===0)return{...t,gap:0,blockSpacing:"gap",content:a.map((e,r)=>y(e,r===0))};let s=!1;const c=o.map((e,r)=>{if(e?.type!==p||!d(e.props?.rowTitle))return e;s=!0;const m=(typeof e.props?.label=="string"?e.props.label.trim():"")||(a[r]??`Row ${r+1}`);return{...e,props:{...e.props,rowTitle:[i(m)]}}});return s?{...t,content:c}:t}export{u as accordionOnSet};
@@ -3,6 +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 PADDING_UNITS: readonly ["px", "%", "vw"];
6
7
  export declare const slider: Rows["slider"];
7
8
  export declare const select: Rows["select"];
8
9
  export declare const Segmented: Rows["Segmented"];
@@ -24,6 +25,16 @@ export declare function ShellIconWord({ value }: {
24
25
  value: string;
25
26
  }): string;
26
27
  export declare function pickerCellIcon(picture: ReactNode, word: ReactNode, tooltip: ReactNode): ReactElement;
28
+ export declare function pickerCellsOf<V extends string>(options: readonly {
29
+ label?: string;
30
+ hint?: string;
31
+ value: V;
32
+ picture: ReactNode;
33
+ }[]): {
34
+ icon: ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
35
+ label?: string | undefined;
36
+ value: V;
37
+ }[];
27
38
  export declare function pickerNoneIcon(glyph: ReactNode, word: ReactNode): ReactElement;
28
39
  export declare function iconPickerRow<V extends string>(label: string, icon: ReactElement, options: readonly {
29
40
  label?: string;