efficient-web-builder 65.0.0 → 67.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/editor/components/AnchorField.js +1 -1
  3. package/dist/editor/components/CardShadowField.js +1 -1
  4. package/dist/editor/components/MediaUploadField.js +1 -1
  5. package/dist/editor/components/PagesPanel.js +1 -1
  6. package/dist/editor/components/PartSettingsPanel.js +1 -1
  7. package/dist/editor/components/PartTextBox.js +1 -1
  8. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  9. package/dist/editor/components/SectionEditor.js +1 -1
  10. package/dist/editor/components/SectionWidthRows.d.ts +3 -1
  11. package/dist/editor/components/SectionWidthRows.js +1 -1
  12. package/dist/editor/components/SiteTextStylesField.js +1 -1
  13. package/dist/editor/components/WebsitePreviewButton.js +1 -1
  14. package/dist/editor/components/storefront-editor.css +16 -24
  15. package/dist/editor/components/usePreviewHref.js +1 -1
  16. package/dist/editor/lib/animation/hover-fields.d.ts +1 -1
  17. package/dist/editor/lib/animation/hover-fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/general/Footprint/fields.d.ts +0 -1
  23. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  24. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  25. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  26. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  27. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  28. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  29. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  30. package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
  31. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  32. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  33. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  34. package/dist/editor/lib/document/box-fields.d.ts +2 -1
  35. package/dist/editor/lib/document/box-fields.js +1 -1
  36. package/dist/editor/lib/document/card-row-fields.d.ts +3 -0
  37. package/dist/editor/lib/document/card-row-fields.js +1 -1
  38. package/dist/editor/lib/document/controls.d.ts +31 -12
  39. package/dist/editor/lib/document/controls.js +1 -1
  40. package/dist/editor/lib/document/field-groups.d.ts +0 -3
  41. package/dist/editor/lib/document/field-groups.js +1 -1
  42. package/dist/editor/lib/document/passes/inspector.js +1 -1
  43. package/dist/editor/lib/document/section-own-width-fields.js +1 -1
  44. package/dist/editor/lib/sections/section-dry-run.d.ts +1 -20
  45. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  46. package/dist/editor/lib/sections/text-layouts.js +1 -1
  47. package/dist/format/lib/animation/views.js +1 -1
  48. package/dist/format/lib/content/block-sources.d.ts +3 -0
  49. package/dist/format/lib/content/block-sources.js +1 -1
  50. package/dist/format/lib/content/borders.d.ts +12 -2
  51. package/dist/format/lib/content/borders.js +1 -1
  52. package/dist/format/lib/content/box-background.d.ts +1 -0
  53. package/dist/format/lib/content/box-background.js +1 -1
  54. package/dist/format/lib/content/box-link.d.ts +11 -0
  55. package/dist/format/lib/content/box-link.js +8 -8
  56. package/dist/format/lib/content/box-phone-place.d.ts +0 -2
  57. package/dist/format/lib/content/box-phone-place.js +1 -1
  58. package/dist/format/lib/content/box-side-space.js +1 -1
  59. package/dist/format/lib/content/card-corners.d.ts +3 -1
  60. package/dist/format/lib/content/card-corners.js +1 -1
  61. package/dist/format/lib/content/card-image-shape.d.ts +5 -1
  62. package/dist/format/lib/content/card-image-shape.js +1 -1
  63. package/dist/format/lib/content/card-template.d.ts +1 -0
  64. package/dist/format/lib/content/card-template.js +1 -1
  65. package/dist/format/lib/content/contact.d.ts +0 -1
  66. package/dist/format/lib/content/contact.js +2 -2
  67. package/dist/format/lib/content/css-length.d.ts +7 -0
  68. package/dist/format/lib/content/css-length.js +1 -0
  69. package/dist/format/lib/content/image-corners.d.ts +3 -1
  70. package/dist/format/lib/content/image-corners.js +1 -1
  71. package/dist/format/lib/content/page-width.d.ts +17 -1
  72. package/dist/format/lib/content/page-width.js +1 -1
  73. package/dist/format/lib/content/section-corners.d.ts +3 -1
  74. package/dist/format/lib/content/section-corners.js +1 -1
  75. package/dist/format/lib/content/section-sticky.d.ts +5 -0
  76. package/dist/format/lib/content/section-sticky.js +1 -1
  77. package/dist/format/lib/content/section-type-size.d.ts +12 -1
  78. package/dist/format/lib/content/section-type-size.js +1 -1
  79. package/dist/format/lib/content/section-width.d.ts +8 -0
  80. package/dist/format/lib/content/section-width.js +1 -1
  81. package/dist/format/lib/content/view-tier.d.ts +10 -0
  82. package/dist/format/lib/content/view-tier.js +1 -0
  83. package/dist/format/lib/document/blocks/general/Banner/meta.d.ts +5 -0
  84. package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
  85. package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +2 -0
  86. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  87. package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
  88. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +5 -0
  89. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -0
  90. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  91. package/dist/format/lib/document/blocks/general/SectionHeader/meta.d.ts +6 -0
  92. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  93. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.d.ts +2 -0
  94. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.js +2 -2
  95. package/dist/format/lib/document/media-drop.js +1 -1
  96. package/dist/format/lib/document/one-h1.d.ts +2 -0
  97. package/dist/format/lib/document/one-h1.js +1 -1
  98. package/dist/format/lib/document/passes/types.d.ts +1 -0
  99. package/dist/format/lib/document/renamed-props.d.ts +1 -0
  100. package/dist/format/lib/document/renamed-props.js +1 -1
  101. package/dist/format/lib/document/section-catalog.js +10 -2
  102. package/dist/format/lib/document/section-descriptions.js +1 -1
  103. package/dist/format/lib/editor-words-catalogue.d.ts +10 -0
  104. package/dist/format/lib/editor-words-catalogue.js +3 -3
  105. package/dist/format/lib/editor-words-kept.js +1 -1
  106. package/dist/format/lib/fit-words.js +4 -1
  107. package/dist/format/lib/links/page-link-rules.d.ts +0 -1
  108. package/dist/format/lib/links/page-link-rules.js +1 -1
  109. package/dist/format/lib/markup.d.ts +1 -0
  110. package/dist/format/lib/markup.js +2 -2
  111. package/dist/format/lib/post-card-layout.d.ts +3 -0
  112. package/dist/format/lib/post-card-layout.js +1 -1
  113. package/dist/format/lib/sections/divider-style.d.ts +9 -0
  114. package/dist/format/lib/sections/divider-style.js +1 -1
  115. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  116. package/dist/format/lib/sections/section-presets.js +1 -1
  117. package/dist/format/lib/sections/timeline-year-shape.js +1 -1
  118. package/dist/format/lib/source-rules/editor-words.js +1 -1
  119. package/dist/format/lib/source-rules/one-length-control.d.ts +18 -0
  120. package/dist/format/lib/source-rules/one-length-control.js +16 -0
  121. package/dist/format/lib/source-rules/support/label-extraction.js +3 -3
  122. package/dist/format/lib/theme.d.ts +1 -2
  123. package/dist/format/lib/theme.js +4 -4
  124. package/dist/format/lib/web-runtime.d.ts +2 -0
  125. package/dist/format/lib/web-runtime.js +1 -1
  126. package/dist/render/components/BlockFrame.d.ts +3 -3
  127. package/dist/render/components/BlockFrame.js +1 -1
  128. package/dist/render/components/Breadcrumb.js +1 -1
  129. package/dist/render/components/Btn.js +1 -1
  130. package/dist/render/components/CardRowContext.d.ts +7 -1
  131. package/dist/render/components/CardRowContext.js +1 -1
  132. package/dist/render/components/CategoryBar.js +1 -1
  133. package/dist/render/components/ContactLocations.js +2 -2
  134. package/dist/render/components/DealerFinder.d.ts +4 -1
  135. package/dist/render/components/DealerFinder.js +1 -1
  136. package/dist/render/components/Divider.d.ts +3 -1
  137. package/dist/render/components/Divider.js +1 -1
  138. package/dist/render/components/DocMasthead.js +1 -1
  139. package/dist/render/components/DocTabs.js +1 -1
  140. package/dist/render/components/FeaturedCover.js +1 -1
  141. package/dist/render/components/Flex.d.ts +3 -1
  142. package/dist/render/components/Flex.js +1 -1
  143. package/dist/render/components/Footprint.d.ts +5 -3
  144. package/dist/render/components/Footprint.js +1 -1
  145. package/dist/render/components/Heading.d.ts +0 -1
  146. package/dist/render/components/Heading.js +1 -1
  147. package/dist/render/components/HeroGroup.d.ts +3 -1
  148. package/dist/render/components/HeroGroup.js +1 -1
  149. package/dist/render/components/ImageBlock.d.ts +2 -1
  150. package/dist/render/components/ImageBlock.js +1 -1
  151. package/dist/render/components/IntroBleed.d.ts +3 -2
  152. package/dist/render/components/IntroBleed.js +1 -1
  153. package/dist/render/components/KeyFeatures.js +1 -1
  154. package/dist/render/components/LocationMap.js +1 -1
  155. package/dist/render/components/LogoBlock.js +1 -1
  156. package/dist/render/components/Logos.d.ts +1 -2
  157. package/dist/render/components/Logos.js +1 -1
  158. package/dist/render/components/LongRead.js +1 -1
  159. package/dist/render/components/PictureHoverMove.d.ts +18 -0
  160. package/dist/render/components/PictureHoverMove.js +1 -0
  161. package/dist/render/components/PictureWash.d.ts +2 -1
  162. package/dist/render/components/PictureWash.js +1 -1
  163. package/dist/render/components/PostCard.js +1 -1
  164. package/dist/render/components/ProcessSteps.d.ts +2 -1
  165. package/dist/render/components/ProcessSteps.js +1 -1
  166. package/dist/render/components/SectionHeader.js +1 -1
  167. package/dist/render/components/SideListLayout.d.ts +4 -1
  168. package/dist/render/components/SideListLayout.js +1 -1
  169. package/dist/render/components/Split.js +1 -1
  170. package/dist/render/components/Text.d.ts +2 -1
  171. package/dist/render/components/Text.js +1 -1
  172. package/dist/render/components/Timeline.js +1 -1
  173. package/dist/render/components/TimelineRail.d.ts +11 -3
  174. package/dist/render/components/TimelineRail.js +1 -1
  175. package/dist/render/components/TimelineTrack.js +1 -1
  176. package/dist/render/components/TitleWithButtons.js +1 -1
  177. package/dist/render/components/goldPhrases.js +3 -3
  178. package/dist/render/lib/content/block-size.d.ts +5 -1
  179. package/dist/render/lib/content/block-size.js +1 -1
  180. package/dist/render/lib/content/box-stack-line.d.ts +1 -1
  181. package/dist/render/lib/content/box-stack-line.js +1 -1
  182. package/dist/render/lib/content/button-look.d.ts +2 -0
  183. package/dist/render/lib/content/button-look.js +1 -1
  184. package/dist/render/lib/content/section-edge.js +1 -1
  185. package/dist/render/lib/content/section-padding.d.ts +5 -2
  186. package/dist/render/lib/content/section-padding.js +1 -1
  187. package/dist/render/lib/dealer-source.d.ts +6 -2
  188. package/dist/render/lib/dealer-source.js +1 -1
  189. package/dist/render/lib/document/blocks/general/Banner/render.js +1 -1
  190. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  191. package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
  192. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  193. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  194. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  195. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  196. package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
  197. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  198. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  199. package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
  200. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +2 -0
  201. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  202. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  203. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  204. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  205. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +2 -2
  206. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  207. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  208. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  209. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  210. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.d.ts +3 -0
  211. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.js +1 -0
  212. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  213. package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +3 -0
  214. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  215. package/dist/render/lib/document/card-press-titles.d.ts +10 -0
  216. package/dist/render/lib/document/card-press-titles.js +1 -0
  217. package/dist/render/lib/document/part-styles.d.ts +13 -0
  218. package/dist/render/lib/document/part-styles.js +2 -2
  219. package/dist/render/lib/document/passes/borders.js +1 -1
  220. package/dist/render/lib/document/passes/corners.js +1 -1
  221. package/dist/render/lib/document/passes/section-height.js +1 -1
  222. package/dist/render/lib/document/passes/section-padding.js +1 -1
  223. package/dist/render/lib/document/passes/section-width.js +1 -1
  224. package/dist/render/lib/document/published-passes.js +1 -1
  225. package/dist/render/lib/document/slot-specs.js +1 -1
  226. package/dist/render/lib/sections/section-to-box.d.ts +0 -15
  227. package/dist/render/lib/sections/section-to-box.js +1 -1
  228. package/dist/render/lib/site-runtime.d.ts +4 -1
  229. package/dist/render/lib/site-runtime.js +1 -1
  230. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  231. package/package.json +5 -5
  232. package/dist/editor/components/TemplateFieldRow.d.ts +0 -11
  233. package/dist/editor/components/TemplateFieldRow.js +0 -1
  234. package/dist/editor/lib/document/panel-heading-scope.d.ts +0 -8
  235. package/dist/editor/lib/document/panel-heading-scope.js +0 -1
  236. package/dist/editor/lib/document/template-field.d.ts +0 -13
  237. package/dist/editor/lib/document/template-field.js +0 -1
  238. package/dist/format/lib/canvas-accent.d.ts +0 -1
  239. package/dist/format/lib/canvas-accent.js +0 -1
  240. package/dist/format/lib/source-rules/padding-units-declared.d.ts +0 -2
  241. package/dist/format/lib/source-rules/padding-units-declared.js +0 -6
@@ -1 +1 @@
1
- import{hasWords as p}from"../../../sections/section-to-box.js";import{BLOCK_WIDTH_LIMIT as A}from"efficient-easel/draw";import{fluidToken as C,token as o}from"./section-head-looks.js";import{STRIP_BOX as R}from"../../../../../format/lib/sections/strip-shape.js";import{PH as i,phAccentAsMarks as W}from"../../../../../format/lib/document/blocks/placeholders.js";import{DOC_MASTHEAD_PH as d}from"../../../../../format/lib/document/blocks/general/DocMasthead/meta.js";import{AUTO_COLUMN as s,BUTTON as v,DIM as U,DROP_COMMON as c,DROP_SIDE_PADDING as g,INNER_BOX as n,leadLine as f,RIGHT_WORDS as S,SAME_KEYS as h,SECTION_BOX as m,SH_LINK as X,smallText as r,TEXT as a,wrapperPad as b,wrapperPadKeys as u}from"./section-to-box-row-parts.js";const _={minWidth:A.min},w=(e,t,l)=>({...r(e,{...t,...S}),props:{...a,align:"right",...s,...l}}),T={top:1,bottom:0},k=(e,t,l,N)=>({kind:"group",name:e,props:{...n,sectionPaddingBottom:t,sectionPaddingBottomPhone:l},parts:[N]}),I={widthFit:"fill",..._},E={top:100,bottom:60,topPhone:60,bottomPhone:40},G={...o("label",13),letterSpacing:.22,lineHeight:1.8},O={textStyle:"heading-1",...C("headingLarge",56,8,128),case:"upper",weight:500,lineHeight:.88,letterSpacing:-.04},x=e=>e.titleLevel===2,K=()=>({name:"Page Header",boxProps:e=>({...m,direction:"column",gap:0,sectionBorder:{bottom:1},...b(e,E)}),box:[...h,...u(E)],parts:[{kind:"group",name:"Header",props:{...n,direction:"row",align:"end",justify:"between",gap:40,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[k("Eyebrow",12,0,{...r("eyebrow",o("label",13)),props:{...a,...s}}),{kind:"text",key:"title",role:"heading",props:{...a,tag:"h1",...I},style:O,mark:"accentItalic",when:e=>!x(e)},{kind:"text",key:"title",role:"heading",props:{...a,tag:"h2",...I},style:O,mark:"accentItalic",when:x},{kind:"group",name:"Details",props:{...n,align:"stretch",gap:0,gapPhone:0,sectionPaddingBottom:12,sectionPaddingBottomPhone:0},parts:[{kind:"list",key:"meta",name:"Detail",flat:!0,parts:[f("label","value",G,s)]}]}]},{kind:"group",name:"Deck",props:{...n,maxWidth:760,sectionBorder:T,sectionPaddingTop:28},parts:[{kind:"text",key:"deck",props:U,style:{textStyle:"body-1",fontRole:"accent",...o("body",22,19),italic:!0,lineHeight:1.5}}]}],drop:{...c,...g,titleLevel:"read by the title part's `when`: 2 (set by lib/document/one-h1 on a later opener) makes the Text an h2, anything else an h1"}}),te=()=>({eyebrow:d.eyebrow,title:W(d.title),deck:d.deck,meta:[{label:i.label,value:i.value},{label:i.label,value:i.value}]}),B={top:80,bottom:40,topPhone:60,bottomPhone:32},j={...o("label",13),letterSpacing:.18,lineHeight:1.8},H={...o("label",13),letterSpacing:.22,lineHeight:1.9},Y=()=>({name:"Issue Header",boxProps:e=>({...m,direction:"column",gap:0,sectionBorder:{bottom:1},...b(e,B)}),box:[...h,...u(B)],parts:[{kind:"group",name:"Top",props:{...n,direction:"row",align:"end",justify:"between",gap:60,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[k("Eyebrow",14,14,r("eyebrow",o("label",14))),{kind:"group",name:"Issue",props:{...n,align:"end",gap:0,gapPhone:0,sectionPaddingBottom:14},parts:[{kind:"list",key:"issueMeta",name:"Issue line",flat:!0,parts:[f("lead","rest",j)]}]}]},{kind:"group",name:"Bottom",props:{...n,direction:"row",align:"start",justify:"between",gap:60,gapPhone:16,share:"content",sectionBorder:T,sectionPaddingTop:32},parts:[{kind:"text",key:"lead",props:{...a,maxWidth:720,..._},style:{textStyle:"body-1",fontRole:"heading3",...o("headingSmall",20),lineHeight:1.5,letterSpacing:-.005,paragraphSpacing:16}},{kind:"group",name:"In this issue",props:{...n,align:"stretch",gap:0},parts:[k("Heading",6,6,{kind:"text",key:"issueHeading",props:{...a,align:"right",...s},style:{textStyle:"body-1",fontRole:"heading",...o("body",18),weight:400,letterSpacing:-.01,lineHeight:1.9,...S}}),{kind:"group",name:"Lines",props:{...n,align:"stretch",gap:0},parts:[{kind:"list",key:"issueList",name:"Line",flat:!0,parts:[w("text",{color:"labels",...H})]}]},w("issueTotal",H)]}]}],drop:{...c,...g}}),D={top:24,bottom:24,topPhone:16,bottomPhone:16},y={color:"labels",...o("label",13),letterSpacing:.2},L=e=>(Array.isArray(e.items)?e.items:[]).filter(t=>t&&typeof t.label=="string"&&t.label.trim()!==""),P=(e,t)=>t!==void 0&&L(e).at(-1)===t,M=(e,t)=>t!==void 0&&L(e).includes(t),F=(e,t)=>M(e,t)&&!P(e,t)&&p(t?.href),V=()=>({name:"Breadcrumb",skip:e=>p(e.meta)?'a trailing note after "·" needs a second mark; none live':void 0,boxProps:e=>({...m,...R,wrap:"wrap",gap:16,gapPhone:16,separator:"slash",sectionBorder:{bottom:1},...b(e,D)}),box:[...h,...u(D)],parts:[{kind:"list",key:"items",name:"Crumb",flat:!0,parts:[{kind:"button",key:"label",href:"href",variant:"ghost",when:F,props:{...v,...X,icon:"none"},style:y},{...r("label",y),when:(e,t)=>M(e,t)&&!P(e,t)&&!p(t?.href)},{...r("label",{...y,color:"text"}),when:P}]}],drop:{...c,...g,meta:"a node that stores a note is skipped (`skip`); an empty one draws nothing"}}),oe={DocMasthead:K(),Masthead:Y(),Breadcrumb:V()};export{oe as PAGE_HEADER_SECTION_TO_BOX,te as pageHeaderPressStarter};
1
+ import{hasWords as l}from"../../../sections/section-to-box.js";import{BLOCK_WIDTH_LIMIT as N}from"efficient-easel/draw";import{fluidToken as R,token as o}from"./section-head-looks.js";import{STRIP_BOX as C}from"../../../../../format/lib/sections/strip-shape.js";import{PH as i,phAccentAsMarks as W}from"../../../../../format/lib/document/blocks/placeholders.js";import{DOC_MASTHEAD_PH as d}from"../../../../../format/lib/document/blocks/general/DocMasthead/meta.js";import{PAGE_TITLE_LEVEL_PROP as U,pageTitleDemoted as f}from"../../../../../format/lib/document/one-h1.js";import{AUTO_COLUMN as s,BUTTON as v,DIM as G,DROP_COMMON as c,DROP_SIDE_PADDING as g,INNER_BOX as n,leadLine as _,RIGHT_WORDS as S,SAME_KEYS as h,SECTION_BOX as m,SH_LINK as X,smallText as r,TEXT as a,wrapperPad as b,wrapperPadKeys as u}from"./section-to-box-row-parts.js";const T={minWidth:N.min},E=(e,t,p)=>({...r(e,{...t,...S}),props:{...a,align:"right",...s,...p}}),w={top:1,bottom:0},k=(e,t,p,M)=>({kind:"group",name:e,props:{...n,sectionPaddingBottom:t,sectionPaddingBottomPhone:p},parts:[M]}),I={widthFit:"fill",...T},O={top:100,bottom:60,topPhone:60,bottomPhone:40},K={...o("label",13),letterSpacing:.22,lineHeight:1.8},x={textStyle:"heading-1",...R("headingLarge",56,8,128),case:"upper",weight:500,lineHeight:.88,letterSpacing:-.04},j=()=>({name:"Page Header",boxProps:e=>({...m,direction:"column",gap:0,sectionBorder:{bottom:1},...b(e,O)}),box:[...h,...u(O)],parts:[{kind:"group",name:"Header",props:{...n,direction:"row",align:"end",justify:"between",gap:40,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[k("Eyebrow",12,0,{...r("eyebrow",o("label",13)),props:{...a,...s}}),{kind:"text",key:"title",role:"heading",props:{...a,tag:"h1",...I},style:x,mark:"accentItalic",when:e=>!f(e)},{kind:"text",key:"title",role:"heading",props:{...a,tag:"h2",...I},style:x,mark:"accentItalic",when:f},{kind:"group",name:"Details",props:{...n,align:"stretch",gap:0,gapPhone:0,sectionPaddingBottom:12,sectionPaddingBottomPhone:0},parts:[{kind:"list",key:"meta",name:"Detail",flat:!0,parts:[_("label","value",K,s)]}]}]},{kind:"group",name:"Deck",props:{...n,maxWidth:760,sectionBorder:w,sectionPaddingTop:28},parts:[{kind:"text",key:"deck",props:G,style:{textStyle:"body-1",fontRole:"accent",...o("body",22,19),italic:!0,lineHeight:1.5}}]}],drop:{...c,...g,[U]:"read by the title part's `when`: 2 (set by lib/document/one-h1 on a later opener) makes the Text an h2, anything else an h1"}}),ne=()=>({eyebrow:d.eyebrow,title:W(d.title),deck:d.deck,meta:[{label:i.label,value:i.value},{label:i.label,value:i.value}]}),B={top:80,bottom:40,topPhone:60,bottomPhone:32},V={...o("label",13),letterSpacing:.18,lineHeight:1.8},H={...o("label",13),letterSpacing:.22,lineHeight:1.9},Y=()=>({name:"Issue Header",boxProps:e=>({...m,direction:"column",gap:0,sectionBorder:{bottom:1},...b(e,B)}),box:[...h,...u(B)],parts:[{kind:"group",name:"Top",props:{...n,direction:"row",align:"end",justify:"between",gap:60,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[k("Eyebrow",14,14,r("eyebrow",o("label",14))),{kind:"group",name:"Issue",props:{...n,align:"end",gap:0,gapPhone:0,sectionPaddingBottom:14},parts:[{kind:"list",key:"issueMeta",name:"Issue line",flat:!0,parts:[_("lead","rest",V)]}]}]},{kind:"group",name:"Bottom",props:{...n,direction:"row",align:"start",justify:"between",gap:60,gapPhone:16,share:"content",sectionBorder:w,sectionPaddingTop:32},parts:[{kind:"text",key:"lead",props:{...a,maxWidth:720,...T},style:{textStyle:"body-1",fontRole:"heading3",...o("headingSmall",20),lineHeight:1.5,letterSpacing:-.005,paragraphSpacing:16}},{kind:"group",name:"In this issue",props:{...n,align:"stretch",gap:0},parts:[k("Heading",6,6,{kind:"text",key:"issueHeading",props:{...a,align:"right",...s},style:{textStyle:"body-1",fontRole:"heading",...o("body",18),weight:400,letterSpacing:-.01,lineHeight:1.9,...S}}),{kind:"group",name:"Lines",props:{...n,align:"stretch",gap:0},parts:[{kind:"list",key:"issueList",name:"Line",flat:!0,parts:[E("text",{color:"labels",...H})]}]},E("issueTotal",H)]}]}],drop:{...c,...g}}),D={top:24,bottom:24,topPhone:16,bottomPhone:16},y={color:"labels",...o("label",13),letterSpacing:.2},L=e=>(Array.isArray(e.items)?e.items:[]).filter(t=>t&&typeof t.label=="string"&&t.label.trim()!==""),P=(e,t)=>t!==void 0&&L(e).at(-1)===t,A=(e,t)=>t!==void 0&&L(e).includes(t),F=(e,t)=>A(e,t)&&!P(e,t)&&l(t?.href),q=()=>({name:"Breadcrumb",skip:e=>l(e.meta)?'a trailing note after "·" needs a second mark; none live':void 0,boxProps:e=>({...m,...C,wrap:"wrap",gap:16,gapPhone:16,separator:"slash",sectionBorder:{bottom:1},...b(e,D)}),box:[...h,...u(D)],parts:[{kind:"list",key:"items",name:"Crumb",flat:!0,parts:[{kind:"button",key:"label",href:"href",variant:"ghost",when:F,props:{...v,...X,icon:"none"},style:y},{...r("label",y),when:(e,t)=>A(e,t)&&!P(e,t)&&!l(t?.href)},{...r("label",{...y,color:"text"}),when:P}]}],drop:{...c,...g,meta:"a node that stores a note is skipped (`skip`); an empty one draws nothing"}}),ae={DocMasthead:j(),Masthead:Y(),Breadcrumb:q()};export{ae as PAGE_HEADER_SECTION_TO_BOX,ne as pageHeaderPressStarter};
@@ -1 +1 @@
1
- import{phoneKey as D}from"efficient-easel/draw";import{newId as K}from"efficient-easel/data";import{COUNT_KEY_PROP as _}from"../../../../../format/lib/content/block-sources.js";import{resolveSectionBackground as k,THEME_SECTION_BG as M}from"../../../../../format/lib/content/section-background.js";import{finiteNumber as H}from"../../../../../format/lib/finite-number.js";import{hasWords as g}from"../../../sections/section-to-box.js";import{DROP_COMMON as x,DROP_SIDE_PADDING as T,INNER_BOX as a,NUMBER_TEXT as m,SAME_KEYS as P,SECTION_BOX as O,TEXT as i,bandAccent as Y,bandProps as U,bandWrites as W,fillFrom as G,onBandPreset as X,innerPad as $,innerPadKeys as q,smallText as S,wrapperPad as j,wrapperPadKeys as z}from"./section-to-box-row-parts.js";import{fluidToken as V,headTree as J,token as n}from"./section-head-looks.js";import{SECTION_BG_BUILT_IN as E}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{CARD_STYLES as s,CARD_STYLE_KEY as f}from"../../../sections/card-list-style.js";import{CARD_LIST_TYPE as Q,CARD_TEMPLATE_SLOT as Z,cardListProps as ee}from"../../../../../format/lib/content/card-template.js";import{BOX_TYPE as d,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{rowFieldTextSeed as c}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{say as r}from"../../../../../format/lib/editor-words.js";const b=e=>typeof e=="string"?e.trim():"";function A(e){const t=`${b(e.prefix)}${b(e.value)}`,o=b(e.suffix);return e.emphasizeAll===!0?t?`==_${t}_==`:"":`${t}${o?`==_${o}_==`:""}`}const B={textStyle:"heading-2",...V("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04},w={kind:"block",type:"Text",props:{...m,_partStyles:{text:B}},box:[["value","text",(e,t)=>A(t)]],when:(e,t)=>t!==void 0&&typeof t.value=="string"&&A(t)!==""},R=e=>g(e?.supSuffix),C={textStyle:"body-1",fontRole:"heading",...n("body",16),lineHeight:1.5,letterSpacing:-.01},L={color:"labels",...n("label",12),lineHeight:1.5,letterSpacing:.24},N={...a,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[D("share")]:"content"},I={textStyle:"body-5",...n("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12},y=e=>k(e.background,E.StatsParagraph),p=e=>y(e)===M,u=e=>({...e,sectionAccent:e.sectionAccent??0}),te=(e,t)=>p(e)?G("background",(o,h)=>X(u(o),h))(e,t):{},oe={name:"Stats with Text",skip:e=>y(e)&&y(e)!=="transparent"&&!p(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,t)=>({...O,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...$(e,"StatsParagraph"),...p(e)?U(u(e),t):{}}),box:[...P.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>p(t)?Y(e,u(t),o):e],...q("StatsParagraph")],site:(e,t)=>p(e.props)?W({props:u(e.props)},t):[],parts:[J("StatsParagraph"),{kind:"group",name:"Stats",props:{...a,...s.table.grid,[f]:"table"},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...a,direction:"row",share:"equal",phoneRow:2,...s.table.row},props:(e,t)=>({...a,...s.table.card,...te(e,t)}),parts:[{...w,when:(e,t)=>!R(t)&&w.when(e,t)},{kind:"group",name:"Figure",props:N,when:(e,t)=>R(t),parts:[w,{kind:"text",key:"supSuffix",props:i,style:I}]},{kind:"group",name:"Words",props:{...a,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:i,style:C},S("sub",L)]}]}]}],drop:{...x,...T,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write; none paints nothing, and any other colour is skipped",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},re=new Set(["value","label",_]),F={top:48,bottom:48,topPhone:48,bottomPhone:48},ae=e=>{const t=k(typeof e.background=="string"?e.background:void 0,E.Stats);return!!t&&t!=="transparent"},se={name:"Stats",skip:e=>ae(e)?"it paints a colour inside its padding, and a Box paints its Fill over the padding too":g(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(t=>g(t?.[_]))?"a figure names a count, and each figure Text here is typed by hand until it is linked":Array.isArray(e.items)&&e.items.some(t=>Object.keys(t??{}).some(o=>!re.has(o)))?"a figure has a key no part here reads":Object.keys(e._partStyles??{}).some(t=>t!=="heading")?"a figure or a name has a style of its own, kept by kind, which no part here reads":void 0,boxProps:e=>({...O,direction:"column",gap:24,gapPhone:24,...j(e,F)}),box:[...P,...z(F)],parts:[S("heading",{color:"labels",...n("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...a,...s.list.grid,[f]:"list"},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>H(e.columns)??4,rowName:"Stats row",rowProps:{...a,direction:"row",share:"equal",phoneRow:2,...s.list.row},props:{...a,...s.list.card},parts:[{kind:"text",key:"value",props:m,style:{textStyle:"heading-2",...n("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},S("label",{color:"labels",...n("label",12),letterSpacing:.2})]}]}],drop:{...x,...T,columns:"the rows of N: one row Box per `columns` figures, which the Box draws",dataSource:"an empty source is typed figures, what the row draws; a sourced node is skipped (0 Hartes nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 Hartes nodes)",contained:"the Box draws the site frame now; each figure fills the Box's column",background:"only no fill reaches here: a node that paints a colour is skipped"}},ke={StatsParagraph:oe,Stats:se};function xe(){return{eyebrow:r("By the numbers"),title:r("What we count."),desc:r("A few numbers that matter to us."),stats:[],background:"transparent"}}const ne=[{key:"figure",label:"Figure"},{key:"superscript",label:"Superscript"},{key:"label",label:"Label"},{key:"body",label:"Text",multiline:!0}];function Te(){const e=(t,o,h,v="")=>({key:K("stat"),figure:t,superscript:v,label:o,body:h});return[e("28==_yr_==",r("Years in business"),r("Privately held since day one. Same two founders.")),e("==_8_==",r("Operating footprint"),r("Los Angeles · Fort Lauderdale · Bewdley · Drachten · Mumbai · Selangor · Ho Chi Minh · Sydney. Three continents covered from one California design studio."),r("cities")),e("−21==_%_==",r("Avg. weight saving"),r("Versus OEM equivalents, across our forged catalog.")),e("14==_×_==",r("Finish steps"),r("Specified in California to a 14-step protocol. No two sets are identical."))]}function ie(e){return{type:d,props:{...a,name:"Card",...structuredClone(s[e].listCard)},slots:{[l]:[{type:d,props:{...N,name:"Figure"},slots:{[l]:[c("figure",m,B),c("superscript",i,I)]}},{type:d,props:{...a,name:"Words",gap:4,gapPhone:4},slots:{[l]:[c("label",{...i,widthFit:"fill"},C),c("body",{...i,widthFit:"fill"},L,!0)]}}]}}}function Pe(e,t,o=4){return{type:d,props:{...a,name:"Stats",direction:"row",columns:o,...structuredClone(s[t].items),[f]:t},slots:{[l]:[{type:Q,props:ee(e,ne),slots:{[Z]:[ie(t)]}}]}}}export{ke as STATS_SECTION_TO_BOX,A as figureWords,Pe as statsBoxSeed,xe as statsPressSeed,Te as statsSeedRows};
1
+ import{phoneKey as v}from"efficient-easel/draw";import{newId as K}from"efficient-easel/data";import{COUNT_KEY_PROP as _}from"../../../../../format/lib/content/block-sources.js";import{resolveSectionBackground as k,THEME_SECTION_BG as M}from"../../../../../format/lib/content/section-background.js";import{finiteNumber as H}from"../../../../../format/lib/finite-number.js";import{hasWords as g}from"../../../sections/section-to-box.js";import{DROP_COMMON as T,DROP_SIDE_PADDING as x,INNER_BOX as a,NUMBER_TEXT as m,SAME_KEYS as O,SECTION_BOX as P,TEXT as i,bandAccent as Y,bandProps as U,bandWrites as W,fillFrom as G,onBandPreset as X,innerPad as $,innerPadKeys as q,smallText as S,wrapperPad as j,wrapperPadKeys as z}from"./section-to-box-row-parts.js";import{EDITORIAL_LINE as V,fluidToken as J,headTree as Q,token as n}from"./section-head-looks.js";import{SECTION_BG_BUILT_IN as E}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{CARD_STYLES as s,CARD_STYLE_KEY as f}from"../../../sections/card-list-style.js";import{CARD_LIST_TYPE as Z,CARD_TEMPLATE_SLOT as ee,cardListProps as te}from"../../../../../format/lib/content/card-template.js";import{BOX_TYPE as d,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{rowFieldTextSeed as c}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{say as r}from"../../../../../format/lib/editor-words.js";const b=e=>typeof e=="string"?e.trim():"";function A(e){const t=`${b(e.prefix)}${b(e.value)}`,o=b(e.suffix);return e.emphasizeAll===!0?t?`==_${t}_==`:"":`${t}${o?`==_${o}_==`:""}`}const B={textStyle:"heading-2",...J("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04},w={kind:"block",type:"Text",props:{...m,_partStyles:{text:B}},box:[["value","text",(e,t)=>A(t)]],when:(e,t)=>t!==void 0&&typeof t.value=="string"&&A(t)!==""},R=e=>g(e?.supSuffix),L={textStyle:"body-1",fontRole:"heading",...n("body",16),lineHeight:1.5,letterSpacing:-.01},C={color:"labels",...n("label",12),lineHeight:1.5,letterSpacing:.24},I={...a,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[v("share")]:"content"},N={textStyle:"body-5",...n("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12},y=e=>k(e.background,E.StatsParagraph),p=e=>y(e)===M,u=e=>({...e,sectionAccent:e.sectionAccent??0}),oe=(e,t)=>p(e)?G("background",(o,h)=>X(u(o),h))(e,t):{},re={name:"Stats with Text",skip:e=>y(e)&&y(e)!=="transparent"&&!p(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,t)=>({...P,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...V,...$(e,"StatsParagraph"),...p(e)?U(u(e),t):{}}),box:[...O.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>p(t)?Y(e,u(t),o):e],...q("StatsParagraph")],site:(e,t)=>p(e.props)?W({props:u(e.props)},t):[],parts:[Q("StatsParagraph"),{kind:"group",name:"Stats",props:{...a,...s.table.grid,[f]:"table"},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...a,direction:"row",share:"equal",phoneRow:2,...s.table.row},props:(e,t)=>({...a,...s.table.card,...oe(e,t)}),parts:[{...w,when:(e,t)=>!R(t)&&w.when(e,t)},{kind:"group",name:"Figure",props:I,when:(e,t)=>R(t),parts:[w,{kind:"text",key:"supSuffix",props:i,style:N}]},{kind:"group",name:"Words",props:{...a,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:i,style:L},S("sub",C)]}]}]}],drop:{...T,...x,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write; none paints nothing, and any other colour is skipped",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},ae=new Set(["value","label",_]),F={top:48,bottom:48,topPhone:48,bottomPhone:48},se=e=>{const t=k(typeof e.background=="string"?e.background:void 0,E.Stats);return!!t&&t!=="transparent"},ne={name:"Stats",skip:e=>se(e)?"it paints a colour inside its padding, and a Box paints its Fill over the padding too":g(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(t=>g(t?.[_]))?"a figure names a count, and each figure Text here is typed by hand until it is linked":Array.isArray(e.items)&&e.items.some(t=>Object.keys(t??{}).some(o=>!ae.has(o)))?"a figure has a key no part here reads":Object.keys(e._partStyles??{}).some(t=>t!=="heading")?"a figure or a name has a style of its own, kept by kind, which no part here reads":void 0,boxProps:e=>({...P,direction:"column",gap:24,gapPhone:24,...j(e,F)}),box:[...O,...z(F)],parts:[S("heading",{color:"labels",...n("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...a,...s.list.grid,[f]:"list"},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>H(e.columns)??4,rowName:"Stats row",rowProps:{...a,direction:"row",share:"equal",phoneRow:2,...s.list.row},props:{...a,...s.list.card},parts:[{kind:"text",key:"value",props:m,style:{textStyle:"heading-2",...n("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},S("label",{color:"labels",...n("label",12),letterSpacing:.2})]}]}],drop:{...T,...x,columns:"the rows of N: one row Box per `columns` figures, which the Box draws",dataSource:"an empty source is typed figures, what the row draws; a sourced node is skipped (0 Hartes nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 Hartes nodes)",contained:"the Box draws the site frame now; each figure fills the Box's column",background:"only no fill reaches here: a node that paints a colour is skipped"}},Te={StatsParagraph:re,Stats:ne};function xe(){return{eyebrow:r("By the numbers"),title:r("What we count."),desc:r("A few numbers that matter to us."),stats:[],background:"transparent"}}const ie=[{key:"figure",label:"Figure"},{key:"superscript",label:"Superscript"},{key:"label",label:"Label"},{key:"body",label:"Text",multiline:!0}];function Oe(){const e=(t,o,h,D="")=>({key:K("stat"),figure:t,superscript:D,label:o,body:h});return[e("28==_yr_==",r("Years in business"),r("Privately held since day one. Same two founders.")),e("==_8_==",r("Operating footprint"),r("Los Angeles · Fort Lauderdale · Bewdley · Drachten · Mumbai · Selangor · Ho Chi Minh · Sydney. Three continents covered from one California design studio."),r("cities")),e("−21==_%_==",r("Avg. weight saving"),r("Versus OEM equivalents, across our forged catalog.")),e("14==_×_==",r("Finish steps"),r("Specified in California to a 14-step protocol. No two sets are identical."))]}function pe(e){return{type:d,props:{...a,name:"Card",...structuredClone(s[e].listCard)},slots:{[l]:[{type:d,props:{...I,name:"Figure"},slots:{[l]:[c("figure",m,B),c("superscript",i,N)]}},{type:d,props:{...a,name:"Words",gap:4,gapPhone:4},slots:{[l]:[c("label",{...i,widthFit:"fill"},L),c("body",{...i,widthFit:"fill"},C,!0)]}}]}}}function Pe(e,t,o=4){return{type:d,props:{...a,name:"Stats",direction:"row",columns:o,...structuredClone(s[t].items),[f]:t},slots:{[l]:[{type:Z,props:te(e,ie),slots:{[ee]:[pe(t)]}}]}}}export{Te as STATS_SECTION_TO_BOX,A as figureWords,Pe as statsBoxSeed,xe as statsPressSeed,Oe as statsSeedRows};
@@ -0,0 +1,3 @@
1
+ import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
2
+ export declare const tabBarPressStarter: () => Readonly<Record<string, unknown>>;
3
+ export declare const TAB_BAR_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
@@ -0,0 +1 @@
1
+ import{BLOCK_WIDTH_LIMIT as u,hiddenKeyOf as _}from"efficient-easel/draw";import{hidableRow as g}from"../scaffold.js";import{hasWords as k}from"../../../sections/section-to-box.js";import{BLOCK_SOURCE_PROP as w,BLOG_CATEGORIES_SOURCE as y}from"../../../../../format/lib/content/block-sources.js";import{SECTION_PIN_ABOVE_KEY as B,SECTION_PIN_SCREENS_KEY as T}from"../../../../../format/lib/content/section-sticky.js";import{LABEL_FACE as E,token as O}from"../../../../../format/lib/document/seed-parts.js";import{PART_STYLES_PROP as f}from"../../part-styles.js";import{PH as s}from"../../../../../format/lib/document/blocks/placeholders.js";import{DROP_COMMON as a,DROP_SIDE_PADDING as i,INNER_BOX as S,SAME_KEYS as C,SECTION_BOX as P,TEXT as N,wrapperPad as A,wrapperPadKeys as R}from"./section-to-box-row-parts.js";const l="MenuBlock",n=e=>(Array.isArray(e)?e:[]).filter(t=>t&&k(t.label)),d=e=>{const[t,o]=[e.metaLabel,e.metaValue].map(m=>(g(m)??"").trim());if(!o)return t;const r=o.includes("==")?o:`==${o}==`;return t?`${t} ${r}`:r},p={top:0,bottom:0,topPhone:0,bottomPhone:0},x={...E,color:"labels",...O("label",12),letterSpacing:.24},I={kind:"group",name:"Note",props:{...S,justify:"center",sectionBorder:{top:0,right:0,bottom:0,left:1},sectionPaddingLeft:28,[_("mobile")]:!0},parts:[{kind:"block",type:"Text",when:e=>d(e)!=="",props:e=>({...N,textFit:"line",text:d(e),[f]:{text:x}})}]},$=()=>({tabs:[],metaLabel:s.label,metaValue:s.value}),b="the note Text inside the Box (the label, then the value in the accent); no words, no Text",h={direction:"row",menuStyle:"tabs",currentPage:!0,minWidth:u.min},c=e=>({...e,boxProps:t=>({...P,direction:"row",align:"stretch",justify:"between",gap:0,stickTop:!0,[T]:0,[B]:!0,sectionBorder:{bottom:1},...A(t,p)}),box:[...C,...R(p)]}),L=()=>c({name:"Tab Bar",skip:e=>n(e.tabs).length?"its tabs need a Console menu first: they are typed labels and links, and the Menu block draws only a Console menu":void 0,reads:{metaLabel:b,metaValue:b},parts:[{kind:"block",type:l,props:h},I],drop:{...a,...i,tabs:"a node whose tabs hold words is skipped (`skip`): typed tabs are not a Console menu; a list of blank tabs draws nothing, so nothing is lost"}}),M=()=>c({name:"Category Bar",skip:e=>{if(n(e.tabs).length)return"its tabs are typed words with typed counts, not the blog's categories: a Blog categories Menu would replace them";if(n(e.links).length)return"its right-hand links are typed words: the bar holds the Menu only"},parts:[{kind:"block",type:l,props:{...h,[w]:y}}],drop:{...a,...i,tabs:"a node whose tabs hold words is skipped (`skip`); blank tabs draw nothing on a page, so nothing is lost. The Menu draws the blog's own categories",activeTab:"the Menu marks the page's own entry (Current page), not a typed active tab",links:"a node whose links hold words is skipped (`skip`); blank links draw nothing",sticky:"the bar is always pinned (the Box's own pin, Stays above): the merchant turns the Box's pin off",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}}),j={DocTabs:L(),CategoryBar:M()};export{j as TAB_BAR_SECTION_TO_BOX,$ as tabBarPressStarter};
@@ -1,3 +1,3 @@
1
- import{resolveSectionBackground as G,THEME_SECTION_BG as K}from"../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as j}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{BUTTON as _,DIM as p,bandAccent as V,bandIndex as q,bandWrites as z,fillNoBoxHolds as J,ownFill as Q,DROP_COMMON as B,DROP_SIDE_PADDING as H,INNER_BOX as o,SAME_KEYS as A,SECTION_BOX as u,TEXT as c,innerPad as b,innerPadKeys as C}from"./section-to-box-row-parts.js";import{splitParagraphs as Z}from"../../../../components/goldPhrases.js";import{accentItalicRuns as O}from"../../../../../format/lib/markup.js";import{TIMELINE_YEAR_BOX as $,TIMELINE_YEAR_HEAD as M}from"../../../../../format/lib/sections/timeline-year-shape.js";import{boxPadding as ee,LABEL_FACE as te}from"../../../../../format/lib/document/seed-parts.js";import{editorialHeadTree as ne,fluidToken as oe,headWordsOnPhoneLine as re,token as i}from"./section-head-looks.js";import{CTA_PH as d,phAccentAsMarks as N}from"../../../../../format/lib/document/blocks/placeholders.js";import{TIMELINE_PH as y,timelineScaffoldEntries as ie}from"../../../../../format/lib/document/blocks/general/Timeline/meta.js";import{TIMELINE_TRACK_PH as T,timelineTrackScaffoldEntries as ae}from"../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const L={buttonBorder:{width:0}},l=(e,t,n={})=>({textStyle:"body-5",...i("label",e),letterSpacing:t,lineHeight:1.5,weight:400,...n}),a=(e,t,n={})=>({...l(e,t),...te,...n}),g=(e,t,n)=>({...e,case:"upper",weight:500,letterSpacing:t,lineHeight:n}),s=(e,t,n={})=>({textStyle:"body-1",fontRole:"heading",...e,weight:400,case:"none",lineHeight:t,...n}),r=(e,t,n={})=>({kind:"text",key:e,props:c,style:t,...n});function R(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>R(n,t))}:e}const W=(e,t)=>t?.future===!0,h=e=>Z(typeof e?.body=="string"?e.body:""),f=e=>G(typeof e.background=="string"?e.background:void 0,j.TimelineTrack),w=e=>f(e)===K?e:{...e,background:"transparent"},se={name:"Milestone Timeline",skip:e=>J(f(e)),boxProps:(e,t)=>{const n=q(w(e),t);return{...u,direction:"column",gap:60,gapPhone:36,sectionBorder:{bottom:1},...b(e,"TimelineTrack"),...Q(f(e),e,t),...n>=0?{sectionAccent:n}:{}}},box:[...A.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,n)=>V(e,w(t),n)],...C("TimelineTrack")],parts:[re(R(ne("eyebrow","title","intro"),["title","intro"])),{kind:"group",name:"Track",props:{...o,gap:48,gapPhone:48},parts:[{kind:"group",name:"Years",props:{...o,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...o,...$},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:M.name,props:{...o,...M},parts:[r("date",l(13,.22,{color:"accent"}),{when:(e,t)=>!W(e,t)}),r("date",l(13,.22,{color:"labels"}),{when:W}),r("title",{textStyle:"heading-3",...g(i("headingSmall",20),-.02,1.1)},{role:"heading"})]},r("blurb",s(i("body",13),1.55),{props:p,mark:"accentItalic"})]}]},{kind:"group",name:"Button row",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0},sectionPaddingTop:32},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{..._,align:"right",...L},style:a(13,.3)}]}]}],site:(e,t)=>z({props:w(e.props)},t),drop:{...B,...H,background:"another colour is the Box's Fill, or a skip if no Fill holds it; the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},x=e=>typeof e.layout=="string"?e.layout:"split",m=e=>x(e)==="split",P=e=>!m(e),F=e=>x(e)==="spine",pe=e=>P(e)&&!F(e),v=(e,t,n,U)=>({kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...o,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:t,sectionHeightUnitPhone:"px",...ee(12,16),...n},when:k=>U(k)&&typeof k.imageSrc=="string"&&k.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...o,direction:"row",justify:"between",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2},parts:[r("imageCaption",a(11,.24,{color:"text"})),r("imageMeta",a(11,.24,{color:"accent"}),{props:{...c,align:"right"}})]}]}),D=(e={})=>({kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{..._,...e,...L},style:a(13,.3)}),S=()=>[r("title",{textStyle:"heading-3",...g(i("headingSmall",24,20),-.02,1.5)},{role:"heading",mark:"accentItalic"}),{kind:"block",type:"Text",props:{...c,_partStyles:{text:s(i("body",17,16),1.6)}},box:[["body","text",(e,t)=>O(h(t)[0]??"")]],when:(e,t)=>h(t).length>0},{kind:"block",type:"Text",props:{...p,_partStyles:{text:s(i("body",17,16),1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>O(h(t).slice(1).join(`
1
+ import{resolveSectionBackground as K,THEME_SECTION_BG as G}from"../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as j}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{BUTTON as _,DIM as s,bandAccent as V,bandIndex as q,bandWrites as z,fillNoBoxHolds as J,ownFill as Q,DROP_COMMON as B,DROP_SIDE_PADDING as A,INNER_BOX as o,SAME_KEYS as H,SECTION_BOX as b,TEXT as c,innerPad as y,innerPadKeys as O}from"./section-to-box-row-parts.js";import{splitParagraphs as Z}from"../../../../components/goldPhrases.js";import{accentItalicRuns as C}from"../../../../../format/lib/markup.js";import{TIMELINE_YEAR_BOX as $,TIMELINE_YEAR_HEAD as N}from"../../../../../format/lib/sections/timeline-year-shape.js";import{boxPadding as ee,LABEL_FACE as te}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as oe}from"efficient-easel/draw";import{EDITORIAL_LINE as M,editorialHeadTree as ne,fluidToken as re,headWordsOnPhoneLine as ie,token as i,withAccentItalic as ae}from"./section-head-looks.js";import{CTA_PH as l,phAccentAsMarks as L}from"../../../../../format/lib/document/blocks/placeholders.js";import{TIMELINE_PH as u,timelineScaffoldEntries as pe}from"../../../../../format/lib/document/blocks/general/Timeline/meta.js";import{TIMELINE_TRACK_PH as T,timelineTrackScaffoldEntries as se}from"../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const R={buttonBorder:{width:0}},d=(e,t,n={})=>({textStyle:"body-5",...i("label",e),letterSpacing:t,lineHeight:1.5,weight:400,...n}),a=(e,t,n={})=>({...d(e,t),...te,...n}),g=(e,t,n)=>({...e,case:"upper",weight:500,letterSpacing:t,lineHeight:n}),p=(e,t,n={})=>({textStyle:"body-1",fontRole:"heading",...e,weight:400,case:"none",lineHeight:t,...n}),r=(e,t,n={})=>({kind:"text",key:e,props:c,style:t,...n}),W=(e,t)=>t?.future===!0,h=e=>Z(typeof e?.body=="string"?e.body:""),w=e=>K(typeof e.background=="string"?e.background:void 0,j.TimelineTrack),x=e=>w(e)===G?e:{...e,background:"transparent"},ce={name:"Milestone Timeline",skip:e=>J(w(e)),boxProps:(e,t)=>{const n=q(x(e),t);return{...b,direction:"column",gap:60,[oe("gap")]:36,gapPhone:36,sectionBorder:{bottom:1},...M,...y(e,"TimelineTrack"),...Q(w(e),e,t),...n>=0?{sectionAccent:n}:{}}},box:[...H.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,n)=>V(e,x(t),n)],...O("TimelineTrack")],parts:[ie(ae(ne("eyebrow","title","intro"),["intro"])),{kind:"group",name:"Track",props:{...o,gap:48,gapPhone:48},parts:[{kind:"group",name:"Years",props:{...o,direction:"row",share:"equal",gap:0,line:!0,...M},parts:[{kind:"list",key:"entries",name:"Year",props:{...o,...$},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:N.name,props:{...o,...N},parts:[r("date",d(13,.22,{color:"accent"}),{when:(e,t)=>!W(e,t)}),r("date",d(13,.22,{color:"labels"}),{when:W}),r("title",{textStyle:"heading-3",...g(i("headingSmall",20),-.02,1.1)},{role:"heading"})]},r("blurb",p(i("body",13),1.55),{props:s,mark:"accentItalic"})]}]},{kind:"group",name:"Button row",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0},sectionPaddingTop:32},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{..._,align:"right",...R},style:a(13,.3)}]}]}],site:(e,t)=>z({props:x(e.props)},t),drop:{...B,...A,background:"another colour is the Box's Fill, or a skip if no Fill holds it; the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},f=e=>typeof e.layout=="string"?e.layout:"split",m=e=>f(e)==="split",P=e=>!m(e),D=e=>f(e)==="spine",le=e=>P(e)&&!D(e),F=(e,t,n,U)=>({kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...o,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:t,sectionHeightUnitPhone:"px",...ee(12,16),...n},when:k=>U(k)&&typeof k.imageSrc=="string"&&k.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...o,direction:"row",justify:"between",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2},parts:[r("imageCaption",a(11,.24,{color:"text"})),r("imageMeta",a(11,.24,{color:"accent"}),{props:{...c,align:"right"}})]}]}),v=(e={})=>({kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{..._,...e,...R},style:a(13,.3)}),S=()=>[r("title",{textStyle:"heading-3",...g(i("headingSmall",24,20),-.02,1.5)},{role:"heading",mark:"accentItalic"}),{kind:"block",type:"Text",props:{...c,_partStyles:{text:p(i("body",17,16),1.6)}},box:[["body","text",(e,t)=>C(h(t)[0]??"")]],when:(e,t)=>h(t).length>0},{kind:"block",type:"Text",props:{...s,_partStyles:{text:p(i("body",17,16),1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>C(h(t).slice(1).join(`
2
2
 
3
- `))]],when:(e,t)=>h(t).length>1}],E=()=>r("date",l(13,.24,{color:"accent"})),I=(e,t,n={})=>r(e,t,{...n,props:{...c,...n.props??{},align:"center"}}),Y=oe("headingMedium",40,5,76),X={sectionBorder:{bottom:1}},ce={name:"Story Timeline",skip:e=>x(e)==="track"?'display "track": not converted (it draws the Milestone rail; a Track story is not stored anywhere)':void 0,boxProps:e=>m(e)?{...u,direction:"row",share:[40],gap:80,gapPhone:48,align:"start",...X,...b(e,"Timeline")}:{...u,direction:"column",gap:48,gapPhone:48,align:"center",...X,...b(e,"Timeline")},box:[...A,...C("Timeline")],parts:[{kind:"group",name:"Heading",props:{...o,gap:24,gapPhone:24},when:m,parts:[r("eyebrow",a(12,.3,{color:"accent"}),{role:"eyebrow"}),r("title",{textStyle:"heading-2",...g(Y,-.03,.94)},{role:"heading",mark:"accentItalic"}),r("intro",s(i("body",14),1.6),{props:{...p,maxWidth:360},mark:"accentItalic"}),v(667,419,{},()=>!0),D()]},{kind:"group",name:"Chapters",props:{...o,gap:48,gapPhone:48,line:!1},when:m,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:24,gapPhone:8,share:[12],align:"start"},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]}]},{kind:"group",name:"Heading",props:{...o,gap:24,gapPhone:24,align:"center",maxWidth:760,widthFit:"fill"},when:P,parts:[I("eyebrow",a(12,.3,{color:"accent"}),{role:"eyebrow"}),I("title",{textStyle:"heading-2",...g(Y,-.03,.94)},{role:"heading",mark:"accentItalic"}),I("intro",s(i("body",14),1.6),{props:{...p,maxWidth:520},mark:"accentItalic"}),D({align:"center"})]},v(506,192,{maxWidth:900,widthFit:"fill"},P),{kind:"group",name:"Chapters",props:{...o,gap:48,gapPhone:48,line:!0,maxWidth:760,widthFit:"fill",sectionPaddingTop:16},when:F,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,gap:8,gapPhone:8},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]}]},{kind:"group",name:"Chapters",props:{...o,gap:56,gapPhone:56,maxWidth:1e3,widthFit:"fill",sectionPaddingTop:16,mirrorCards:"even"},when:pe,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:64,gapPhone:0,share:[50],align:"start"},parts:[{kind:"group",name:"Entry",props:{...o,gap:8,gapPhone:8},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]},{kind:"group",name:"Spacer",props:{...o},keepEmpty:!0,parts:[]}]}]}],drop:{...B,...H,layout:"the Box's own arrangement replaces it: Split a row of two Boxes; Spine and Alternating a centred column (Track is skipped)"}},we=()=>({eyebrow:y.eyebrow,title:N(y.title),intro:y.intro,ctaText:d.text,ctaHref:d.href,entries:ie()}),xe=()=>({eyebrow:T.eyebrow,title:N(T.title),intro:T.intro,ctaText:d.text,ctaHref:d.href,entries:ae()}),Pe={TimelineTrack:se,Timeline:ce};export{Pe as TIMELINE_SECTION_TO_BOX,xe as milestoneTimelinePressStarter,we as storyTimelinePressStarter};
3
+ `))]],when:(e,t)=>h(t).length>1}],E=()=>r("date",d(13,.24,{color:"accent"})),I=(e,t,n={})=>r(e,t,{...n,props:{...c,...n.props??{},align:"center"}}),Y=re("headingMedium",40,5,76),X={sectionBorder:{bottom:1}},de={name:"Story Timeline",skip:e=>f(e)==="track"?'display "track": not converted (it draws the Milestone rail; a Track story is not stored anywhere)':void 0,boxProps:e=>m(e)?{...b,direction:"row",share:[40],gap:80,gapPhone:48,align:"start",...X,...y(e,"Timeline")}:{...b,direction:"column",gap:48,gapPhone:48,align:"center",...X,...y(e,"Timeline")},box:[...H,...O("Timeline")],parts:[{kind:"group",name:"Heading",props:{...o,gap:24,gapPhone:24},when:m,parts:[r("eyebrow",a(12,.3,{color:"accent"}),{role:"eyebrow"}),r("title",{textStyle:"heading-2",...g(Y,-.03,.94)},{role:"heading",mark:"accentItalic"}),r("intro",p(i("body",14),1.6),{props:{...s,maxWidth:360},mark:"accentItalic"}),F(667,419,{},()=>!0),v()]},{kind:"group",name:"Chapters",props:{...o,gap:48,gapPhone:48,line:!1},when:m,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:24,gapPhone:8,share:[12],align:"start"},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]}]},{kind:"group",name:"Heading",props:{...o,gap:24,gapPhone:24,align:"center",maxWidth:760,widthFit:"fill"},when:P,parts:[I("eyebrow",a(12,.3,{color:"accent"}),{role:"eyebrow"}),I("title",{textStyle:"heading-2",...g(Y,-.03,.94)},{role:"heading",mark:"accentItalic"}),I("intro",p(i("body",14),1.6),{props:{...s,maxWidth:520},mark:"accentItalic"}),v({align:"center"})]},F(506,192,{maxWidth:900,widthFit:"fill"},P),{kind:"group",name:"Chapters",props:{...o,gap:48,gapPhone:48,line:!0,maxWidth:760,widthFit:"fill",sectionPaddingTop:16},when:D,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,gap:8,gapPhone:8},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]}]},{kind:"group",name:"Chapters",props:{...o,gap:56,gapPhone:56,maxWidth:1e3,widthFit:"fill",sectionPaddingTop:16,mirrorCards:"even"},when:le,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:64,gapPhone:0,share:[50],align:"start"},parts:[{kind:"group",name:"Entry",props:{...o,gap:8,gapPhone:8},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]},{kind:"group",name:"Spacer",props:{...o},keepEmpty:!0,parts:[]}]}]}],drop:{...B,...A,layout:"the Box's own arrangement replaces it: Split a row of two Boxes; Spine and Alternating a centred column (Track is skipped)"}},Se=()=>({eyebrow:u.eyebrow,title:L(u.title),intro:u.intro,ctaText:l.text,ctaHref:l.href,entries:pe()}),Ee=()=>({eyebrow:T.eyebrow,title:L(T.title),intro:T.intro,ctaText:l.text,ctaHref:l.href,entries:se()}),Ie={TimelineTrack:ce,Timeline:de};export{Ie as TIMELINE_SECTION_TO_BOX,Ee as milestoneTimelinePressStarter,Se as storyTimelinePressStarter};
@@ -1,3 +1,6 @@
1
1
  import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
2
+ type Props = Record<string, unknown>;
2
3
  export declare const GENERAL_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
4
+ export declare const TEXT_PRESS_STARTERS: Readonly<Record<string, () => Readonly<Props>>>;
3
5
  export declare function registerGeneralSectionRows(): void;
6
+ export {};
@@ -1 +1 @@
1
- import{hasWords as C,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as g,DROP_COMMON as a,DROP_SIDE_PADDING as c,INNER_BOX as o,leadLine as v,SAME_KEYS as s,SECTION_BOX as d,TEXT as l,innerPad as T,siteGutterOf as A,innerPadKeys as y,smallText as O,wrapperPad as u,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as H}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as R,siteGutterPhoneFollows as X}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as D}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as L}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as W}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as G}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as M}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as F}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as U}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as z}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Y}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as j}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as q}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as J}from"./section-to-box-rows-proof.js";import{PROMO_SECTION_TO_BOX as Q}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as V}from"./section-to-box-rows-fitment.js";import{fluidToken as Z,headTree as S,token as i}from"./section-head-looks.js";import{boxPadding as $}from"../../../../../format/lib/document/seed-parts.js";const _={top:72,bottom:72,topPhone:72,bottomPhone:72},ee={name:"Editorial Text",boxProps:e=>({...d,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...u(e,_)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...s,...P(_)],parts:[S("Prose"),{kind:"text",key:"body",props:g,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...a,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},f={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},w=(e,n)=>n?.variant==="primary",k=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:w,variant:"primary",style:{letterSpacing:.3},props:{...m,...f,...n}},{kind:"button",key:"label",href:"href",when:(r,p)=>!w(r,p),variant:"ghost",style:{letterSpacing:.3},props:{...m,...f,...n}}]}),h=e=>C(e.title),te={name:"Call-to-Action Heading",boxProps:e=>({...d,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...T(e,"TitleWithButtons")}),box:[...s,...y("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...Z("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[k(h,{widthFit:"fill",iconPosition:"end"}),k(e=>!h(e),{})]}],drop:{...a,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function oe(e){const{siteGutter:n,siteGutterPhone:r}=e.site??{},p=A(e),b=Math.min(20,R(r)??X(n));return{sectionPaddingLeft:p,sectionPaddingRight:p,sectionPaddingLeftPhone:b,sectionPaddingRightPhone:b}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},ne={name:"Section Header",boxProps:(e,n)=>({...d,direction:"column",gap:0,...u(e,B),...oe(n)}),box:[...s,...P(B)],parts:[S("SectionHeader")],drop:{...a,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},x={...o,direction:"row",share:[67],gap:30},E={...o,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),ie={name:"Lead Text",boxProps:e=>({...d,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...T(e,"ParagraphsA")}),box:[...s,...y("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[O("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},N("Stats column",o,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[v("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...o,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:g,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},O("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...a}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},re={name:"Banner",boxProps:e=>({...d,direction:"column",gap:0,...u(e,I)}),box:[...s,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...$(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(D(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20},parts:[O("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...g,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:m}]}],drop:{...a,...c}},ae={Prose:ee,TitleWithButtons:te,SectionHeader:ne,ParagraphsA:ie,Banner:re};function Ee(){t(ae),t(L),t(W),t(H),t(G),t(M),t(F),t(K),t(U),t(z),t(Y),t(j),t(q),t(V),t(J),t(Q)}export{ae as GENERAL_SECTION_TO_BOX,Ee as registerGeneralSectionRows};
1
+ import{hasWords as L,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as T,DIM as y,DROP_COMMON as s,DROP_SIDE_PADDING as u,INNER_BOX as o,leadLine as X,SAME_KEYS as d,SECTION_BOX as p,TEXT as l,innerPad as w,siteGutterOf as D,innerPadKeys as B,smallText as P,wrapperPad as O,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as W}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as M,siteGutterPhoneFollows as G}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as F}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as U}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as K}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as Y}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as j}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as q}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as J}from"./section-to-box-rows-pageheader.js";import{TAB_BAR_SECTION_TO_BOX as Q}from"./section-to-box-rows-tabbar.js";import{DOCBODY_SECTION_TO_BOX as V}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Z}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as $}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as ee}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as te}from"./section-to-box-rows-proof.js";import{PROMO_SECTION_TO_BOX as oe}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as ne}from"./section-to-box-rows-fitment.js";import{fluidToken as ie,headTree as k,token as i}from"./section-head-looks.js";import{CTA_PH as b,PH as re,phAccentAsMarks as m}from"../../../../../format/lib/document/blocks/placeholders.js";import{PROSE_PH as S}from"../../../../../format/lib/document/blocks/general/Prose/meta.js";import{PARAGRAPHS_A_PH as g}from"../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";import{BANNER_PH as ae}from"../../../../../format/lib/document/blocks/general/Banner/meta.js";import{TITLE_WITH_BUTTONS_PH as se,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as de}from"../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";import{SECTION_HEADER_PH as r}from"../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";import{boxPadding as pe,fillSlot as le}from"../../../../../format/lib/document/seed-parts.js";const E={top:72,bottom:72,topPhone:72,bottomPhone:72},he={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...O(e,E)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,..._(E)],parts:[k("Prose"),{kind:"text",key:"body",props:y,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...u,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},x={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},N=(e,n)=>n?.variant==="primary",I=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:N,variant:"primary",style:{letterSpacing:.3},props:{...T,...x,...n}},{kind:"button",key:"label",href:"href",when:(a,h)=>!N(a,h),variant:"ghost",style:{letterSpacing:.3},props:{...T,...x,...n}}]}),c=e=>L(e.title),me={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:c(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...w(e,"TitleWithButtons")}),box:[...d,...B("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...ie("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035},mark:"accentItalic"}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...c(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[I(c,{widthFit:"fill",iconPosition:"end"}),I(e=>!c(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function ge(e){const{siteGutter:n,siteGutterPhone:a}=e.site??{},h=D(e),f=Math.min(20,M(a)??G(n));return{sectionPaddingLeft:h,sectionPaddingRight:h,sectionPaddingLeftPhone:f,sectionPaddingRightPhone:f}}const H={top:40,bottom:64,topPhone:24,bottomPhone:36},ce={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...O(e,H),...ge(n)}),box:[...d,..._(H)],parts:[k("SectionHeader")],drop:{...s,...u,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},A={...o,direction:"row",share:[67],gap:32},R={...o,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},C=(e,n,a)=>({kind:"group",name:e,props:n,parts:[a]}),Te={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...w(e,"ParagraphsA")}),box:[...d,...B("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...A,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[P("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},C("Stats column",o,{kind:"group",name:"Stats",props:{...R,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[X("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...A,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},C("Note column",{...o,justify:"end"},{kind:"group",name:"Founders",props:{...R,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:y,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},P("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},v={top:24,bottom:24,topPhone:24,bottomPhone:24},ue={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...O(e,v)}),box:[...d,"contained",..._(v)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...le("surface"),...pe(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(F(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[P("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",...i("headingMedium",44,32)}},{kind:"text",key:"body",props:{...l,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6,...i("body",16)}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:T}]}],drop:{...s,...u}},Pe={Prose:he,TitleWithButtons:me,SectionHeader:ce,ParagraphsA:Te,Banner:ue},je={Prose:()=>({eyebrow:S.eyebrow,title:m(S.title),body:S.body}),TitleWithButtons:()=>({title:m(se.title),buttons:de.map(e=>({...e}))}),SectionHeader:()=>({num:r.num,title:m(r.title),description:r.description,linkText:r.linkText,linkHref:b.href}),ParagraphsA:()=>({eyebrow:g.eyebrow,lead:re.body,foundersHeading:g.foundersHeading,foundersBody:g.foundersBody,attribution:g.attribution}),Banner:()=>({...ae,ctaText:b.text,ctaHref:b.href}),ProcessSteps:()=>({num:r.num,title:m(r.title)})};function ze(){t(Pe),t(U),t(K),t(W),t(Y),t(j),t(z),t(q),t(J),t(Q),t(V),t(Z),t($),t(ee),t(ne),t(te),t(oe)}export{Pe as GENERAL_SECTION_TO_BOX,je as TEXT_PRESS_STARTERS,ze as registerGeneralSectionRows};
@@ -0,0 +1,10 @@
1
+ type Props = Record<string, unknown>;
2
+ export type CardPressTitle = {
3
+ readonly field: string;
4
+ readonly gates: readonly (readonly string[])[];
5
+ };
6
+ export declare const CARD_PRESS_TITLES_PROP = "_cardPressTitles";
7
+ export declare const CARD_PRESS_TITLE_PROP = "_cardPressTitle";
8
+ export declare function cardPressTitlesOf(props: Props | null | undefined, slot: string): readonly CardPressTitle[] | undefined;
9
+ export declare function markCardPressTitles<T>(data: T): T;
10
+ export {};
@@ -0,0 +1 @@
1
+ import{isNodeList as m}from"efficient-easel/data";import{readHidable as E}from"efficient-easel/draw";import{BOX_HIDE_WHEN_ROW_EMPTY as h,isCardTemplateSlot as y,namedRowField as x}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as d}from"../../../format/lib/content/box-show-for-choices.js";import{COUNT_KEY_PROP as L}from"../../../format/lib/content/block-sources.js";import{WALL_LABEL_ID_PROP as S}from"./wall-labels.js";const P="_cardPressTitles",k="_cardPressTitle";function j(t,r){const e=t?.[P],i=e&&typeof e=="object"?e[r]:void 0;return Array.isArray(i)&&i.length?i:void 0}const O=(t,r)=>({...t,props:{...t.props,...r}});function C(t){const r=t.props??{};return t.type!=="Text"||E(r.text).hidden||typeof r[L]=="string"||typeof r[S]=="string"?"":x(r)}function T(t,r,e,i){let n=null;return t.forEach((o,s)=>{let p=o;const f=C(o);if(f&&!i.has(f))i.add(f),e.push({field:f,gates:r}),p=O(o,{[k]:!0});else if(o.type!=="Text"&&!Array.isArray(o.props?.[d])){const l=o.props?.[h],R=Array.isArray(l)&&l.length?[...r,l.filter(c=>typeof c=="string")]:r;let u=null;for(const[c,a]of Object.entries(o.props??{})){if(!m(a)||y(o.type,c))continue;const _=T(a,R,e,i);_!==a&&((u??={})[c]=_)}u&&(p=O(o,u))}p!==o&&((n??=t.slice())[s]=p)}),n??t}function A(t){let r=null;return t.forEach((e,i)=>{const n=b(e);n!==e&&((r??=t.slice())[i]=n)}),r??t}function b(t){let r,e;for(const[i,n]of Object.entries(t.props??{})){if(!m(n))continue;let o=A(n);if(y(t.type,i)){const s=[];o=T(o,[],s,new Set),s.length&&((e??={})[i]=s)}o!==n&&((r??={...t.props})[i]=o)}return e&&((r??={...t.props})[P]=e),r?{...t,props:r}:t}function w(t){const r=t;if(!r||!Array.isArray(r.content))return t;const e=A(r.content);return e===r.content?t:{...r,content:e}}export{P as CARD_PRESS_TITLES_PROP,k as CARD_PRESS_TITLE_PROP,j as cardPressTitlesOf,w as markCardPressTitles};
@@ -3,6 +3,7 @@ import { type FontRole } from "../../../format/lib/fonts.js";
3
3
  import type { PartEl } from "../../../editor/lib/document/part-anchors.js";
4
4
  import { type PartNeedle } from "./text-parts.js";
5
5
  import { type TextRegion } from "../../../format/lib/sections/text-regions.js";
6
+ import { type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
6
7
  export declare const PART_STYLES_PROP = "_partStyles";
7
8
  export declare const PART_STYLED_ATTR = "data-sf-part-styled";
8
9
  export declare const TEXT_STYLE_ATTR = "data-sf-text-style";
@@ -84,6 +85,11 @@ export type PartStyle = {
84
85
  italic?: boolean;
85
86
  sizePhone?: number;
86
87
  sizeTablet?: number;
88
+ sizeUnit?: LengthUnit;
89
+ sizeUnitTablet?: LengthUnit;
90
+ sizeUnitPhone?: LengthUnit;
91
+ paragraphSpacingUnit?: LengthUnit;
92
+ paddingUnit?: LengthUnit;
87
93
  alignTablet?: PartAlign;
88
94
  alignPhone?: PartAlign;
89
95
  };
@@ -110,6 +116,13 @@ export type StyledPartStamp = {
110
116
  export declare function readPartStyles(props: Record<string, unknown> | undefined): PartStyles;
111
117
  export declare function readPartStyle(props: Record<string, unknown> | undefined, partKey: string): PartStyle;
112
118
  export declare function partStyleCount(props: Record<string, unknown> | undefined, partKey: string): number;
119
+ export declare const PART_UNIT_KEY_OF: {
120
+ readonly size: "sizeUnit" | "sizeUnitTablet" | "sizeUnitPhone";
121
+ readonly sizeTablet: "sizeUnit" | "sizeUnitTablet" | "sizeUnitPhone";
122
+ readonly sizePhone: "sizeUnit" | "sizeUnitTablet" | "sizeUnitPhone";
123
+ readonly paragraphSpacing: "paragraphSpacingUnit";
124
+ readonly padding: "paddingUnit";
125
+ };
113
126
  export declare function propsWithPartStyleValue<K extends keyof PartStyle>(props: Record<string, unknown>, partKey: string, prop: K, value: PartStyle[K] | null): Record<string, unknown>;
114
127
  export declare function propsWithoutPartStyle(props: Record<string, unknown>, partKey: string): Record<string, unknown>;
115
128
  export declare function partCaseOfTransform(transform: string | null | undefined): TextStyleCase;
@@ -1,2 +1,2 @@
1
- import{textStyleCaseCss as nt,textStyleCaseOfCss as ot}from"efficient-easel/draw";import{FONT_OPTIONS as it,fontOption as rt,fontRoleOf as _,SIZE_STEP_OF_ROLE as w}from"../../../format/lib/fonts.js";import{encodePartKey as v}from"../../../format/lib/document/part-key.js";import{decodePartId as C,normalizePartText as O}from"./text-parts.js";import{partInkCss as at}from"../../../format/lib/document/part-inks.js";import{regionStyle as st}from"../../../format/lib/sections/text-regions.js";import{EDGE_PHONE_MEDIA as ft,EDGE_TABLET_MEDIA as lt,PHONE_MEDIA as ct,TABLET_MEDIA as ut,viewOverrides as pt}from"../content/view-values.js";import{plainRecord as N,propsWithPartRecord as dt,readPartRecord as xt,readPartRecords as gt}from"../../../format/lib/document/part-records.js";const k="_partStyles",ht="data-sf-part-styled",W="data-sf-text-style",St=/^(heading|body)-[1-7]$/;function S(t){return typeof t=="string"&&St.test(t)}const G={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function bt(t){if(!t)return null;for(const[e,n]of Object.entries(G))if(n===t)return e;return null}function ze(t){if(S(t.textStyle))return t.textStyle;const e=_(t.role);return e?G[e]:void 0}const mt=[400,500,600,700],A=["left","center","right","justify"],I=5,y=1e3,Tt=-5,Pt=10,At=0,Rt=64,_t=2,B={size:{min:I,max:y,step:1},sizeTablet:{min:I,max:y,step:1},sizePhone:{min:I,max:y,step:1},padding:{min:At,max:Rt,step:_t}},zt=.05,Et=.01,$t=["line","letter"],wt=.5,Ot=2.5,Nt=-1,kt=1,It=0,yt=400,Ft=[...new Set(Object.values(w))];function Ee(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function $e(t){return gt(t,k)}function K(t,e){return xt(t,k,e)}function we(t,e){return Object.values(K(t,e)).filter(n=>n!==void 0).length}function X(t,e,n){return dt(t,k,e,Mt(n).length?n:null)}function Mt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function Lt(t){return $t.includes(t)}const R=(t,e,n)=>Math.min(n,Math.max(e,t));function Dt(t,e){if(Lt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:R(n,Tt,Pt)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?P(R(n,wt,Ot),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?P(R(n,Nt,kt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:R(n,It,yt)}if(Object.hasOwn(B,t)){const{min:n,max:o}=B[t],i=Math.round(Number(e));return Number.isFinite(i)?R(i,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?_(e)?e:null:t==="sizeToken"?F(e)?e:null:t==="textStyle"?S(e)?e:null:t==="alignPhone"||t==="alignTablet"?A.includes(e)?e:null:e}const Ht=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function T(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of Ht){const i=t[o];i!==void 0&&!(typeof i=="number"&&Number.isFinite(i))&&n(o)}return t.align!==void 0&&!A.includes(t.align)&&n("align"),t.alignTablet!==void 0&&!A.includes(t.alignTablet)&&n("alignTablet"),t.alignPhone!==void 0&&!A.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!S(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!F(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!_(t.fontRole)&&n("fontRole"),e??t}function F(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:i,fluid:r}=t,l=c=>typeof c=="number"&&Number.isFinite(c)&&c>0,a=c=>typeof c=="string"&&Ft.includes(c);return a(e)&&l(n)&&(o===void 0||a(o))&&(i===void 0||l(i))&&(r===void 0||jt(r,n))}function jt(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...i}=t;return Object.keys(i).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function M(t){return t?.pxPhone&&F(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function U({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,i=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${i}, var(--sf-heading-max,9999px))`:i}const vt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Ct(t){const e=[];for(const[n,o]of vt)n===t?e.push(o):o===t&&e.push(n);return e}function Oe(t,e,n,o){const i={...K(t,e)},r=o==null?null:Dt(n,o);if(r===null)delete i[n];else{i[n]=r;for(const l of Ct(n))delete i[l]}return X(t,e,i)}function Ne(t,e){return X(t,e,{})}function Wt(t){return ot(t)??"none"}function Gt(t){return nt(t)??""}const V={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Bt(t,e){const n=_(t.role);return n||(e?.blockDrawsStyle?null:bt(t.textStyle))}function ke(t,e){return t==="Text"&&e==="text"}const Kt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Xt(t){const e=w[t],n=Kt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Ut(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=P(Vt+t.line*zt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=P(t.letter*Et,4)),e}const Vt=1,b="--sf-part-para";function Yt(t){t=T(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const o=M(t.sizeToken);if(o)e.fontSize=U(o);else{const i=E(t);i!==void 0&&(e.fontSize=`${i}px`)}}const n=t.alignPhone??z(t);return n&&(e.textAlign=n),e}function z(t){return t.alignTablet&&t.alignTablet!==t.align?t.alignTablet:void 0}function E(t){const e=pt("textSize",t.size,t.sizeTablet,void 0).tablet;return e&&e>0?e:void 0}function Zt(t){const e=T(t),n={},o=E(e);o!==void 0&&(n.fontSize=`${o}px`);const i=z(e);return i&&(n.textAlign=i),n}function Ie(t,e){if(e==="desktop")return;const n=T(t);return(e==="mobile"?z(n):void 0)??n.align}function qt(t,e){if(e==="desktop")return t;const n=T(t),o=E(n),i=z(n);if(e==="tablet"){let a=t;return o!==void 0&&(a={...a,size:o}),i&&(a={...a,align:i}),a}let r=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone};else{const a=M(n.sizeToken);a?r={...r,size:void 0,sizeToken:a}:o!==void 0&&(r={...r,size:o})}const l=n.alignPhone??i;return l&&(r={...r,align:l}),r}function L(t,e,n){return D(qt(t,e),$,n)}function Jt(t){return t==="mobile"?"sizePhone":t==="tablet"?"sizeTablet":"size"}function ye(t,e){if(e==="desktop")return null;const n=T(t);if(e==="mobile"){if(M(n.sizeToken))return null;const o=E(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function Y(t,e){const n=Jt(e);if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function Fe(t,e,n){const o=L(Y(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function D(t,e,n){t=T(t);const o=Bt(t,n),i=Ut(t),r=t.size?`${t.size}px`:t.sizeToken?U(t.sizeToken):o?Xt(o):"";return{fontFamily:t.font?ne(t.font):t.fontRole?`var(${V[t.fontRole]})`:o?`var(${V[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:r,minWidth:r?"0":"",overflowWrap:r?"break-word":"",lineHeight:i.lineHeight!==void 0?String(i.lineHeight):"",letterSpacing:i.letterSpacingEm!==void 0?`${i.letterSpacingEm}em`:"",[b]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Gt(t.case),textAlign:t.align??"",paddingTop:Z(t.padding),paddingBottom:Z(t.padding),color:Qt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Qt=t=>at(t),Z=t=>t===void 0?"":`${t}px`,P=(t,e)=>Number(t.toFixed(e));function Me(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),i=Number.parseFloat(t.letterSpacing),r=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:te(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?P(o/n,3):1.2,letterEm:Number.isFinite(i)?P(i/n,4):0,align:ee(t.textAlign),case:Wt(t.textTransform),paddingPx:Number.isFinite(r)?Math.round(r):0}}function te(t){return Number.isFinite(t)?mt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function ee(t){for(const e of A)if(e===t)return e;return t==="end"?"right":"left"}function Le(t,e){const n=q(t);if(!n)return"";for(const o of it)if(q(e(o.cssVar))===n)return o.key;return""}const q=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function ne(t){const e=rt(t);return e?`var(${e.cssVar})`:""}function De(t,e,n,o){return!e||C(e)?.nodeId!==t?null:n.find(r=>o(r.getAttribute("class")))??n[0]??null}function oe(t,e){return Object.hasOwn(t,e)?N(t[e])??{}:{}}function He(t,e,n=()=>$,o=a=>a,i=ae,r="desktop",l=()=>!1){let a=0;for(const{element:c,partId:h}of t){const x=C(h)?.propKey;if(!x)continue;const s=oe(e,o(x)),f=L(s,r,{blockDrawsStyle:l(x)});S(s.textStyle)?c.setAttribute?.(W,s.textStyle):c.removeAttribute?.(W);const d=j.some(g=>c.style[g]);let p=!1;for(const[g,u]of Object.entries(f))le(c,g,u),u&&(p=!0);if(d||j.some(g=>f[g]))for(const g of ie(c,i))for(const u of j)g.style[u]=f[u]??"";p&&(a+=1)}return a}function ie(t,e){const n=O(t.textContent??""),o=[];let i=t;for(let r=0;r<re&&e(i);r+=1){const l=i.parentElement;if(!l||O(l.textContent??"")!==n)break;o.push(l),i=l}return o}const re=8;function ae(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const $={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function se(t){if(!t||typeof t!="object")return null;const e={};return S(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizeTablet=="number"&&t.sizeTablet>0&&(e.sizeTablet=t.sizeTablet),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function fe(t,e){const n=se(t);if(!n)return{};const o=L(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function je(t){return S(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function ve(t,e,n){if(!t||typeof t!="object")return{};const o=st(t.role,e,w)??{},i=e.sized?fe(Y(t,n),n):{};return{...o,...i}}function Ce(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function le(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const i=t;e===b&&(n?i.setAttribute?.(J,""):i.removeAttribute?.(J))}const J="data-sf-part-para",ce=Object.keys(D({},$)),H=new Set(["color","overflowWrap",b,"fontStyle"]),j=ce.filter(t=>!H.has(t));function We(t,e,n,o=a=>a,i=()=>!1,r=()=>null,l=[]){const a=new Map;for(const s of t){const f=v(s.key,s.row);for(const d of s.texts){const p=a.get(d);p?(p.keys.add(s.key),p.partKeys.add(f)):a.set(d,{keys:new Set([s.key]),partKeys:new Set([f])})}}const c=new Map;for(const s of new Set([...Object.keys(e),...l])){if(!ue(s))continue;const f=Q(n,s,N(e[s])??{},!1,r(s));f&&c.set(s,f)}const h=s=>{const f=o(s),d=r(f);if(!Object.hasOwn(e,f)&&!d)return null;const p=N(e[f])??{};return Q(n,s,p,i(s),d)},x=new Map;for(const[s,{keys:f,partKeys:d}]of a){const p=d.size===1?[...d][0]:f.size===1?[...f][0]:null;if(!p)continue;const m=h(p);m&&x.set(s,m)}for(const s of t){if(!s.keyed)continue;const f=h(v(s.key,s.row));f&&c.set(s.key,f)}return x.size||c.size?{rules:x,kindRules:c,drawn:new Set(a.keys())}:null}function Q(t,e,n,o,i){const r=D(n,$,{blockDrawsStyle:o}),l=Zt(n),a=Yt(n),c=S(n.textStyle)?n.textStyle:void 0;return!Object.values(r).some(Boolean)&&!Object.keys(l).length&&!Object.keys(a).length&&!c&&!i?null:{stamp:pe(t,e),declarations:r,...Object.keys(l).length?{tablet:l}:{},...Object.keys(a).length?{phone:a}:{},...c?{textStyle:c}:{},...i?{motion:i}:{}}}function ue(t){return t.startsWith("@")}function Ge(t,e){return t?.kindRules.get(e)??null}function pe(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function de(t){return t?{tablet:lt,phone:ft}:{tablet:ut,phone:ct}}function Be(t,{inBox:e=!1}={}){const{tablet:n,phone:o}=de(e),i=[],r=new Set,l=a=>{const{stamp:c,declarations:h}=a;if(r.has(c))return;r.add(c);const x=Object.entries(h).filter(([,u])=>u!==""),s=u=>u.map(([tt,et])=>`${ge(tt)}: ${et}`).join("; "),f=`[${ht}="${c}"]`,d=x.filter(([u])=>!H.has(u)),p=x.filter(([u])=>H.has(u));d.length&&i.push(`${f}, *:has(> ${f}) { ${s(d)} }`),p.length&&i.push(`${f} { ${s(p)} }`),h[b]&&(i.push(`*:has(> ${f}) { ${b}: ${h[b]} }`),i.push(...xe(f,`*:has(> ${f})`)));const m=Object.entries(a.tablet??{}).filter(([,u])=>u!=="");m.length&&i.push(`@media ${n} { ${f}, *:has(> ${f}) { ${s(m)} } }`);const g=Object.entries(a.phone??{}).filter(([,u])=>u!=="");g.length&&i.push(`@media ${o} { ${f}, *:has(> ${f}) { ${s(g)} } }`)};for(const a of t.rules.values())l(a);for(const a of t.kindRules.values())l(a);return i.join(`
2
- `)}function xe(t,e){const n=`var(${b})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${t} ${o}:not(:first-child) { margin-top: ${n} }`,`${t} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${e}) + :is(${e}) { margin-top: ${n} }`]}const ge=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function Ke(t,e){if(!t)return null;const n=O(e),o=t.rules.get(n);if(o)return o;if(n.length<he||t.drawn.has(n))return null;let i=null;for(const[r,l]of t.rules)if(r.includes(n)){if(i&&i.stamp!==l.stamp)return null;i=l}return i}const he=8;export{A as PART_ALIGNS,kt as PART_LETTER_EM_MAX,Nt as PART_LETTER_EM_MIN,Et as PART_LETTER_STEP,Ot as PART_LINE_HEIGHT_MAX,wt as PART_LINE_HEIGHT_MIN,zt as PART_LINE_STEP,B as PART_MEASURED_TRACKS,Pt as PART_NUDGE_MAX,Tt as PART_NUDGE_MIN,Rt as PART_PADDING_MAX,At as PART_PADDING_MIN,_t as PART_PADDING_STEP,J as PART_PARAGRAPH_ATTR,yt as PART_PARAGRAPH_MAX,It as PART_PARAGRAPH_MIN,b as PART_PARAGRAPH_VAR,$t as PART_RELATIVE_PROPS,y as PART_SIZE_MAX,I as PART_SIZE_MIN,Ft as PART_SIZE_STEPS,ht as PART_STYLED_ATTR,k as PART_STYLES_PROP,ce as PART_STYLE_PROPERTIES,mt as PART_WEIGHTS,j as SHARED_PART_PROPERTIES,G as STYLE_ID_OF_ROLE,W as TEXT_STYLE_ATTR,He as applyPartStyles,ke as blockDrawsTextStyle,ze as followedStyleOf,ue as isPartKindKey,S as isTextStyleId,xe as paragraphRules,Ie as partAlignFollowed,L as partCanvasDeclarations,Wt as partCaseOfTransform,Gt as partCaseTransform,Le as partFontKeyOf,Ee as partLiftRules,Yt as partPhoneDeclarations,Ge as partRuleForKind,Ke as partRuleForText,Fe as partShownDeclarations,Jt as partSizeBoxOf,ye as partSizeFollowed,Ut as partSpacingOf,Me as partStyleBase,we as partStyleCount,Be as partStyleCss,D as partStyleDeclarations,qt as partStyleForScreen,De as partStyleSource,Y as partStyleWithoutSizeBox,Zt as partTabletDeclarations,Oe as propsWithPartStyleValue,Ne as propsWithoutPartStyle,We as publishedPartStyles,K as readPartStyle,$e as readPartStyles,fe as regionCanvasDeclarations,Ce as regionCanvasRestore,je as regionHasOwnLook,se as regionSheetStyle,ve as regionShownDeclarations,oe as storedPartStyle,de as viewMediaOf};
1
+ import{textStyleCaseCss as ce,textStyleCaseOfCss as le,viewKeyAt as K}from"efficient-easel/draw";import{FONT_OPTIONS as ue,fontOption as pe,fontRoleOf as w,SIZE_STEP_OF_ROLE as k}from"../../../format/lib/fonts.js";import{encodePartKey as B}from"../../../format/lib/document/part-key.js";import{decodePartId as X,normalizePartText as I}from"./text-parts.js";import{partInkCss as de}from"../../../format/lib/document/part-inks.js";import{regionStyle as ge}from"../../../format/lib/sections/text-regions.js";import{EDGE_PHONE_MEDIA as xe,EDGE_TABLET_MEDIA as he,PHONE_MEDIA as be,TABLET_MEDIA as Se,viewOverrides as me}from"../content/view-values.js";import{plainRecord as F,propsWithPartRecord as Te,readPartRecord as Pe,readPartRecords as ze}from"../../../format/lib/document/part-records.js";import{isLengthUnit as M}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as _,storedUnit as _e}from"../../../format/lib/content/css-length.js";const y="_partStyles",Ae="data-sf-part-styled",Y="data-sf-text-style",Re=/^(heading|body)-[1-7]$/;function S(e){return typeof e=="string"&&Re.test(e)}const V={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function Ee(e){if(!e)return null;for(const[t,n]of Object.entries(V))if(n===e)return t;return null}function Lt(e){if(S(e.textStyle))return e.textStyle;const t=w(e.role);return t?V[t]:void 0}const we=[400,500,600,700],R=["left","center","right","justify"],L=5,D=1e3,Oe=-5,Ne=10,$e=0,ke=64,Ie=2,Z={size:{min:L,max:D,step:1},sizeTablet:{min:L,max:D,step:1},sizePhone:{min:L,max:D,step:1},padding:{min:$e,max:ke,step:Ie}},Fe=.05,Me=.01,ye=["line","letter"],Le=.5,De=2.5,je=-1,He=1,Ue=0,Ce=400,ve=[...new Set(Object.values(k))];function Dt(e){return[`${e} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${e}:hover, ${e}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function jt(e){return ze(e,y)}function q(e,t){return Pe(e,y,t)}function Ht(e,t){return Object.values(q(e,t)).filter(n=>n!==void 0).length}function J(e,t,n){return Te(e,y,t,We(n).length?n:null)}function We(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function Ge(e){return ye.includes(e)}const E=(e,t,n)=>Math.min(n,Math.max(t,e)),Ke=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function j(e){const t=K("sizeUnit",e),n=Ke.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}const m={size:j("desktop"),sizeTablet:j("tablet"),sizePhone:j("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Q=Object.values(m);function h(e,t){return _e(e[m[t]])}function Be(e,t,n={}){if(Q.includes(e))return M(t)&&t!=="px"?t:null;if(Object.hasOwn(m,e)&&h(n,e)!=="px"){const o=P(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(Ge(e)){const o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:E(o,Oe,Ne)}if(e==="lineHeight"){const o=Number(t);return Number.isFinite(o)?P(E(o,Le,De),3):null}if(e==="letterSpacing"){const o=Number(t);return Number.isFinite(o)?P(E(o,je,He),4):null}if(e==="paragraphSpacing"){const o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:E(o,Ue,Ce)}if(Object.hasOwn(Z,e)){const{min:o,max:i}=Z[e],r=Math.round(Number(t));return Number.isFinite(r)?E(r,o,i):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?w(t)?t:null:e==="sizeToken"?H(t)?t:null:e==="textStyle"?S(t)?t:null:e==="alignPhone"||e==="alignTablet"?R.includes(t)?t:null:t}const Xe=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function A(e){let t=null;const n=o=>{t??={...e},delete t[o]};for(const o of Xe){const i=e[o];i!==void 0&&!(typeof i=="number"&&Number.isFinite(i))&&n(o)}e.align!==void 0&&!R.includes(e.align)&&n("align"),e.alignTablet!==void 0&&!R.includes(e.alignTablet)&&n("alignTablet"),e.alignPhone!==void 0&&!R.includes(e.alignPhone)&&n("alignPhone"),e.textStyle!==void 0&&!S(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!H(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!w(e.fontRole)&&n("fontRole");for(const o of Q)e[o]!==void 0&&!M(e[o])&&n(o);return t??e}function H(e){if(!e||typeof e!="object")return!1;const{step:t,px:n,stepPhone:o,pxPhone:i,fluid:r}=e,c=l=>typeof l=="number"&&Number.isFinite(l)&&l>0,a=l=>typeof l=="string"&&ve.includes(l);return a(t)&&c(n)&&(o===void 0||a(o))&&(i===void 0||c(i))&&(r===void 0||Ye(r,n))}function Ye(e,t){if(!e||typeof e!="object"||Array.isArray(e))return!1;const{minPx:n,vw:o,...i}=e;return Object.keys(i).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<t&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function U(e){return e?.pxPhone&&H(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function ee({step:e,px:t,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${t}px)`:`${t}px`,i=`var(--size-${e}, ${o})`;return e.startsWith("heading")?`min(${i}, var(--sf-heading-max,9999px))`:i}const Ve=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Ze(e){const t=[];for(const[n,o]of Ve)n===e?t.push(o):o===e&&t.push(n);return t}function Ut(e,t,n,o){const i={...q(e,t)},r=o==null?null:Be(n,o,i);if(r===null)delete i[n];else{i[n]=r;for(const c of Ze(n))delete i[c]}return J(e,t,i)}function Ct(e,t){return J(e,t,{})}function qe(e){return le(e)??"none"}function Je(e){return ce(e)??""}const te={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Qe(e,t){const n=w(e.role);return n||(t?.blockDrawsStyle?null:Ee(e.textStyle))}function vt(e,t){return e==="Text"&&t==="text"}const et={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function tt(e){const t=k[e],n=et[t];return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function nt(e){const t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=P(ot+e.line*Fe,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=P(e.letter*Me,4)),t}const ot=1,T="--sf-part-para";function it(e){e=A(e);const t={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)t.fontSize=_(e.sizePhone,h(e,"sizePhone"));else{const o=U(e.sizeToken);if(o)t.fontSize=ee(o);else{const i=N(e);i!==void 0&&(t.fontSize=_(i,h(e,"sizeTablet")))}}const n=e.alignPhone??O(e);return n&&(t.textAlign=n),t}function O(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function N(e){const n=e.sizeTablet!==void 0&&h(e,"sizeTablet")!==h(e,"size")?e.sizeTablet:me("textSize",e.size,e.sizeTablet,void 0).tablet;return n&&n>0?n:void 0}function rt(e){const t=A(e),n={},o=N(t);o!==void 0&&(n.fontSize=_(o,h(t,"sizeTablet")));const i=O(t);return i&&(n.textAlign=i),n}function Wt(e,t){if(t==="desktop")return;const n=A(e);return(t==="mobile"?O(n):void 0)??n.align}function at(e,t){if(t==="desktop")return e;const n=A(e),o=N(n),i=O(n);if(t==="tablet"){let a=e;return o!==void 0&&(a={...a,size:o,sizeUnit:n[m.sizeTablet]}),i&&(a={...a,align:i}),a}let r=e;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone,sizeUnit:n[m.sizePhone]};else{const a=U(n.sizeToken);a?r={...r,size:void 0,sizeToken:a}:o!==void 0&&(r={...r,size:o,sizeUnit:n[m.sizeTablet]})}const c=n.alignPhone??i;return c&&(r={...r,align:c}),r}function C(e,t,n){return v(at(e,t),$,n)}function st(e){return K("size",e)}function Gt(e,t){if(t==="desktop")return null;const n=A(e);if(t==="mobile"){if(U(n.sizeToken))return null;const o=N(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function ne(e,t){const n=st(t);if(!Object.hasOwn(e,n))return e;const o={...e};return delete o[n],o}function Kt(e,t,n){const o=C(ne(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function v(e,t,n){e=A(e);const o=Qe(e,n),i=nt(e),r=e.size?_(e.size,h(e,"size")):e.sizeToken?ee(e.sizeToken):o?tt(o):"";return{fontFamily:e.font?ut(e.font):e.fontRole?`var(${te[e.fontRole]})`:o?`var(${te[o]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:r,minWidth:r?"0":"",overflowWrap:r?"break-word":"",lineHeight:i.lineHeight!==void 0?String(i.lineHeight):"",letterSpacing:i.letterSpacingEm!==void 0?`${i.letterSpacingEm}em`:"",[T]:e.paragraphSpacing?_(e.paragraphSpacing,h(e,"paragraphSpacing")):"",textTransform:Je(e.case),textAlign:e.align??"",paddingTop:oe(e.padding,h(e,"padding")),paddingBottom:oe(e.padding,h(e,"padding")),color:ft(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}const ft=e=>de(e),oe=(e,t)=>e===void 0?"":_(e,t),P=(e,t)=>Number(e.toFixed(t));function Bt(e,t){const n=Number.parseFloat(e.fontSize)||16,o=Number.parseFloat(e.lineHeight),i=Number.parseFloat(e.letterSpacing),r=Number.parseFloat(e.paddingTop);return{fontKey:t,sizePx:n,weight:ct(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?P(o/n,3):1.2,letterEm:Number.isFinite(i)?P(i/n,4):0,align:lt(e.textAlign),case:qe(e.textTransform),paddingPx:Number.isFinite(r)?Math.round(r):0}}function ct(e){return Number.isFinite(e)?we.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function lt(e){for(const t of R)if(t===e)return t;return e==="end"?"right":"left"}function Xt(e,t){const n=ie(e);if(!n)return"";for(const o of ue)if(ie(t(o.cssVar))===n)return o.key;return""}const ie=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function ut(e){const t=pe(e);return t?`var(${t.cssVar})`:""}function Yt(e,t,n,o){return!t||X(t)?.nodeId!==e?null:n.find(r=>o(r.getAttribute("class")))??n[0]??null}function pt(e,t){return Object.hasOwn(e,t)?F(e[t])??{}:{}}function Vt(e,t,n=()=>$,o=a=>a,i=xt,r="desktop",c=()=>!1){let a=0;for(const{element:l,partId:b}of e){const g=X(b)?.propKey;if(!g)continue;const s=pt(t,o(g)),f=C(s,r,{blockDrawsStyle:c(g)});S(s.textStyle)?l.setAttribute?.(Y,s.textStyle):l.removeAttribute?.(Y);const d=G.some(x=>l.style[x]);let p=!1;for(const[x,u]of Object.entries(f))St(l,x,u),u&&(p=!0);if(d||G.some(x=>f[x]))for(const x of dt(l,i))for(const u of G)x.style[u]=f[u]??"";p&&(a+=1)}return a}function dt(e,t){const n=I(e.textContent??""),o=[];let i=e;for(let r=0;r<gt&&t(i);r+=1){const c=i.parentElement;if(!c||I(c.textContent??"")!==n)break;o.push(c),i=c}return o}const gt=8;function xt(e){const t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}const $={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function ht(e){if(!e||typeof e!="object")return null;const t={};S(e.textStyle)&&(t.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(t.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(t.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(t.sizePhone=e.sizePhone);for(const n of["size","sizeTablet","sizePhone"]){const o=m[n];t[n]!==void 0&&M(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function bt(e,t){const n=ht(e);if(!n)return{};const o=C(n,t);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function Zt(e){return S(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function qt(e,t,n){if(!e||typeof e!="object")return{};const o=ge(e.role,t,k)??{},i=t.sized?bt(ne(e,n),n):{};return{...o,...i}}function Jt(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function St(e,t,n){if(!t.startsWith("--")){e.style[t]=n;return}const o=e.style;typeof o.setProperty=="function"?n?o.setProperty(t,n):o.removeProperty?.(t):o[t]=n;const i=e;t===T&&(n?i.setAttribute?.(re,""):i.removeAttribute?.(re))}const re="data-sf-part-para",mt=Object.keys(v({},$)),W=new Set(["color","overflowWrap",T,"fontStyle"]),G=mt.filter(e=>!W.has(e));function Qt(e,t,n,o=a=>a,i=()=>!1,r=()=>null,c=[]){const a=new Map;for(const s of e){const f=B(s.key,s.row);for(const d of s.texts){const p=a.get(d);p?(p.keys.add(s.key),p.partKeys.add(f)):a.set(d,{keys:new Set([s.key]),partKeys:new Set([f])})}}const l=new Map;for(const s of new Set([...Object.keys(t),...c])){if(!Tt(s))continue;const f=ae(n,s,F(t[s])??{},!1,r(s));f&&l.set(s,f)}const b=s=>{const f=o(s),d=r(f);if(!Object.hasOwn(t,f)&&!d)return null;const p=F(t[f])??{};return ae(n,s,p,i(s),d)},g=new Map;for(const[s,{keys:f,partKeys:d}]of a){const p=d.size===1?[...d][0]:f.size===1?[...f][0]:null;if(!p)continue;const z=b(p);z&&g.set(s,z)}for(const s of e){if(!s.keyed)continue;const f=b(B(s.key,s.row));f&&l.set(s.key,f)}return g.size||l.size?{rules:g,kindRules:l,drawn:new Set(a.keys())}:null}function ae(e,t,n,o,i){const r=v(n,$,{blockDrawsStyle:o}),c=rt(n),a=it(n),l=S(n.textStyle)?n.textStyle:void 0;return!Object.values(r).some(Boolean)&&!Object.keys(c).length&&!Object.keys(a).length&&!l&&!i?null:{stamp:Pt(e,t),declarations:r,...Object.keys(c).length?{tablet:c}:{},...Object.keys(a).length?{phone:a}:{},...l?{textStyle:l}:{},...i?{motion:i}:{}}}function Tt(e){return e.startsWith("@")}function en(e,t){return e?.kindRules.get(t)??null}function Pt(e,t){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function zt(e){return e?{tablet:he,phone:xe}:{tablet:Se,phone:be}}function tn(e,{inBox:t=!1}={}){const{tablet:n,phone:o}=zt(t),i=[],r=new Set,c=a=>{const{stamp:l,declarations:b}=a;if(r.has(l))return;r.add(l);const g=Object.entries(b).filter(([,u])=>u!==""),s=u=>u.map(([se,fe])=>`${At(se)}: ${fe}`).join("; "),f=`[${Ae}="${l}"]`,d=g.filter(([u])=>!W.has(u)),p=g.filter(([u])=>W.has(u));d.length&&i.push(`${f}, *:has(> ${f}) { ${s(d)} }`),p.length&&i.push(`${f} { ${s(p)} }`),b[T]&&(i.push(`*:has(> ${f}) { ${T}: ${b[T]} }`),i.push(..._t(f,`*:has(> ${f})`)));const z=Object.entries(a.tablet??{}).filter(([,u])=>u!=="");z.length&&i.push(`@media ${n} { ${f}, *:has(> ${f}) { ${s(z)} } }`);const x=Object.entries(a.phone??{}).filter(([,u])=>u!=="");x.length&&i.push(`@media ${o} { ${f}, *:has(> ${f}) { ${s(x)} } }`)};for(const a of e.rules.values())c(a);for(const a of e.kindRules.values())c(a);return i.join(`
2
+ `)}function _t(e,t){const n=`var(${T})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${e} ${o}:not(:first-child) { margin-top: ${n} }`,`${e} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${t}) + :is(${t}) { margin-top: ${n} }`]}const At=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function nn(e,t){if(!e)return null;const n=I(t),o=e.rules.get(n);if(o)return o;if(n.length<Rt||e.drawn.has(n))return null;let i=null;for(const[r,c]of e.rules)if(r.includes(n)){if(i&&i.stamp!==c.stamp)return null;i=c}return i}const Rt=8;export{R as PART_ALIGNS,He as PART_LETTER_EM_MAX,je as PART_LETTER_EM_MIN,Me as PART_LETTER_STEP,De as PART_LINE_HEIGHT_MAX,Le as PART_LINE_HEIGHT_MIN,Fe as PART_LINE_STEP,Z as PART_MEASURED_TRACKS,Ne as PART_NUDGE_MAX,Oe as PART_NUDGE_MIN,ke as PART_PADDING_MAX,$e as PART_PADDING_MIN,Ie as PART_PADDING_STEP,re as PART_PARAGRAPH_ATTR,Ce as PART_PARAGRAPH_MAX,Ue as PART_PARAGRAPH_MIN,T as PART_PARAGRAPH_VAR,ye as PART_RELATIVE_PROPS,D as PART_SIZE_MAX,L as PART_SIZE_MIN,ve as PART_SIZE_STEPS,Ae as PART_STYLED_ATTR,y as PART_STYLES_PROP,mt as PART_STYLE_PROPERTIES,m as PART_UNIT_KEY_OF,we as PART_WEIGHTS,G as SHARED_PART_PROPERTIES,V as STYLE_ID_OF_ROLE,Y as TEXT_STYLE_ATTR,Vt as applyPartStyles,vt as blockDrawsTextStyle,Lt as followedStyleOf,Tt as isPartKindKey,S as isTextStyleId,_t as paragraphRules,Wt as partAlignFollowed,C as partCanvasDeclarations,qe as partCaseOfTransform,Je as partCaseTransform,Xt as partFontKeyOf,Dt as partLiftRules,it as partPhoneDeclarations,en as partRuleForKind,nn as partRuleForText,Kt as partShownDeclarations,st as partSizeBoxOf,Gt as partSizeFollowed,nt as partSpacingOf,Bt as partStyleBase,Ht as partStyleCount,tn as partStyleCss,v as partStyleDeclarations,at as partStyleForScreen,Yt as partStyleSource,ne as partStyleWithoutSizeBox,rt as partTabletDeclarations,Ut as propsWithPartStyleValue,Ct as propsWithoutPartStyle,Qt as publishedPartStyles,q as readPartStyle,jt as readPartStyles,bt as regionCanvasDeclarations,Jt as regionCanvasRestore,Zt as regionHasOwnLook,ht as regionSheetStyle,qt as regionShownDeclarations,pt as storedPartStyle,zt as viewMediaOf};
@@ -1 +1 @@
1
- import{jsx as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{SECTION_BORDER_CLASS as c,sectionBorderStyle as a}from"../../../../format/lib/content/borders.js";import{PAD_ON_ROOT as l}from"./section-padding.js";const O={name:"sectionBorder",applies:(e,o,r)=>o.isSection(e)&&!!r&&typeof r.render=="function",draw(e,o){if(l.has(o))return;const r=e.render;e.render=n=>{const t=a(n.sectionBorder,n.sectionBorderPhone,n.sectionBorderTablet),i=r(n);return t?s(d,{className:c,style:{display:"contents",...t},children:i}):i}}};export{O as sectionBorder};
1
+ import{jsx as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{SECTION_BORDER_CLASS as c,sectionBorderStyle as a,sectionBorderUnitsOf as l}from"../../../../format/lib/content/borders.js";import{PAD_ON_ROOT as B}from"./section-padding.js";const S={name:"sectionBorder",applies:(r,o,n)=>o.isSection(r)&&!!n&&typeof n.render=="function",draw(r,o){if(B.has(o))return;const n=r.render;r.render=e=>{const t=a(e.sectionBorder,e.sectionBorderPhone,e.sectionBorderTablet,l(e)),i=n(e);return t?s(d,{className:c,style:{display:"contents",...t},children:i}):i}}};export{S as sectionBorder};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{cardCornerStyle as i}from"../../../../format/lib/content/card-corners.js";import{sectionCornerStyle as c}from"../../../../format/lib/content/section-corners.js";const S={name:"sectionCorners",applies:(r,n,e)=>n.isSection(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.sectionShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=c(e.sectionCorners,e.sectionCornerSides),o=n(e);return s?t(d,{className:"sf-section-corners",style:{display:"contents",...s},children:o}):o}}},a=["CollectionCard"],m={name:"cardCorners",applies:(r,n,e)=>a.includes(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.cardShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=i(e.cardCorners,e.cardCornerSides),o=n(e);return s?t(d,{className:"sf-card-corners",style:{display:"contents",...s},children:o}):o}}};export{a as CARD_BLOCK_KEYS,m as cardCorners,S as sectionCorners};
1
+ import{jsx as o}from"react/jsx-runtime";import{HideTaker as i}from"../../../components/ViewHideRoot.js";import{cardCornerStyle as d}from"../../../../format/lib/content/card-corners.js";import{sectionCornerStyle as c}from"../../../../format/lib/content/section-corners.js";const S={name:"sectionCorners",applies:(r,n,e)=>n.isSection(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.sectionShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=c(e.sectionCorners,e.sectionCornerSides,e.sectionCornersUnit),t=n(e);return s?o(i,{className:"sf-section-corners",style:{display:"contents",...s},children:t}):t}}},a=["CollectionCard"],m={name:"cardCorners",applies:(r,n,e)=>a.includes(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.cardShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=d(e.cardCorners,e.cardCornerSides,e.cardCornersUnit),t=n(e);return s?o(i,{className:"sf-card-corners",style:{display:"contents",...s},children:t}):t}}};export{a as CARD_BLOCK_KEYS,m as cardCorners,S as sectionCorners};
@@ -1 +1 @@
1
- import{jsx as E}from"react/jsx-runtime";import{SECTION_HEIGHT_MODES as u,SECTION_MIN_HEIGHT_EXCLUDED as T,hasPhoneHeight as _,hasTabletHeight as p,resolvePhoneHeight as w,resolveTabletHeight as x,resolveSectionMinHeight as F,sectionMinHeightAttrs as I}from"../../../../format/lib/content/section-min-height.js";import{CellWrap as M}from"../../../components/InBoxContext.js";import{drawsCopiesInTheBox as S}from"../../../../format/lib/content/copies-in-box.js";import{phoneKey as V,tabletKey as a}from"efficient-easel/draw";import{shownByUsedValue as H,shownForOption as b,withRowRules as C}from"../../../../format/lib/document/show-when-attach.js";const N=(()=>{const e=i=>[[i],[a(i),i],[V(i),a(i),i]],o=i=>({field:i,in:u}),t=i=>r=>b(r,u,"auto",i),[n,s]=[e("sectionHeightValue"),e("sectionHeightUnit")];return e("sectionHeightMode").flatMap((i,r)=>[[[n[r][0]],H(i,o,t(["fixed","screen"]))],[[s[r][0]],H(i,o,t(["fixed"]))]])})(),j={name:"sectionHeight",applies:(e,o,t)=>o.isSection(e)&&!T.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){const n=t.heightFields;e.fields={...e.fields,...C(n(),N)};const s=e.resolveFields;e.resolveFields=(i,r)=>{const h=s?s(i,r):r.fields,c=i?.props??{},g=F(c),d=p(c)?x(c):null,m=_(c)?w(c):null,l=v=>f(f(O(v,g),"sectionHeightValueTablet",d),"sectionHeightValuePhone",m);return h&&typeof h.then=="function"?h.then(l):l(h)}},draw(e,o){const t=e.render;e.render=n=>{if(S(o,n))return t(n);const s=I(n);return s?E(M,{className:s.className,style:s.style,children:t(n)}):t(n)}}};function O(e,o){if(!e||!("sectionHeightMode"in e)||o.mode==="auto")return e;const t={...e},n=t.sectionHeightValue;return n&&(t.sectionHeightValue={...n,unit:o.unit}),t}function f(e,o,t){if(!e||!(o in e)||!t||t.mode==="auto")return e;const n={...e},s=n[o];return s&&(n[o]={...s,unit:t.unit}),n}export{j as sectionHeight};
1
+ import{jsx as s}from"react/jsx-runtime";import{SECTION_MIN_HEIGHT_EXCLUDED as o,sectionMinHeightAttrs as a}from"../../../../format/lib/content/section-min-height.js";import{CellWrap as l}from"../../../components/InBoxContext.js";import{drawsCopiesInTheBox as d}from"../../../../format/lib/content/copies-in-box.js";const g={name:"sectionHeight",applies:(e,n,t)=>n.isSection(e)&&!o.has(e)&&!!t&&typeof t.render=="function",panel(e,n,t){const i=t.heightFields;e.fields={...e.fields,...i()}},draw(e,n){const t=e.render;e.render=i=>{if(d(n,i))return t(i);const r=a(i);return r?s(l,{className:r.className,style:r.style,children:t(i)}):t(i)}}};export{g as sectionHeight};
@@ -1 +1 @@
1
- import{jsx as f}from"react/jsx-runtime";import{HideTaker as m}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as u}from"../../../../format/lib/content/box-background.js";import{SECTION_PAD_KEYS as S,padValuesOf as p,resolveSectionPadding as T,sectionPadAttrs as g}from"../../content/section-padding.js";import{sectionFillPassClass as I}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as E,drawsCopiesInTheBox as b}from"../../../../format/lib/content/copies-in-box.js";const l={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},c=new Set(Object.keys(l)),P=new Set(["Flex","Text","Heading","ImageBlock"]),N=new Set(["Divider"]),O=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),_=new Set(["ProductGrid"]);function a(t,e,o=!1){const s=t.render;t.render=n=>{if(e?.(n))return s(n);const r=g(p(n,S,o)),i=s(n),d=I(n);return r?f(m,{className:d?`${r.className} ${d}`:r.className,style:r.style,children:i}):i}}const F={name:"sectionPadding",applies:(t,e,o)=>e.isSection(t)&&!O.has(t)&&!!o&&typeof o.render=="function",panel(t,e,o){c.has(e)||_.has(e)||(t.fields={...t.fields,...o.sidesPaddingFields({tablet:!0})})},draw(t,e){if(c.has(e)){const o=t.render,s=l[e];t.render=n=>{const r=T(n,s);return o({...n,padTop:r.top,padBottom:r.bottom})};return}if(_.has(e)){a(t);return}P.has(e)||N.has(e)||a(t,e==="Flex"?o=>u(o.bgImage):E.has(e)?o=>b(e,o):void 0,!0)}},h=["Heading","Text","ImageBlock"],x=["LogoBlock"],H={name:"blockPadding",applies:(t,e,o)=>(h.includes(t)||x.includes(t))&&!!o&&typeof o.render=="function",panel(t,e,o){t.fields={...t.fields,...o.sidesPaddingFields({tablet:!0})}},draw(t,e){P.has(e)||a(t,void 0,!0)}};export{N as PADS_ITS_OWN_SPACE,P as PAD_ON_ROOT,c as SECTION_PAD_INNER,l as SECTION_PAD_INNER_DEFAULTS,H as blockPadding,F as sectionPadding};
1
+ import{jsx as S}from"react/jsx-runtime";import{HideTaker as _}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as m}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as u}from"../../../../format/lib/content/box-side-space.js";import{SECTION_PAD_KEYS as p,padValuesOf as T,resolveSectionPadding as g,sectionPadAttrs as I}from"../../content/section-padding.js";import{sectionFillPassClass as b}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as E,drawsCopiesInTheBox as O}from"../../../../format/lib/content/copies-in-box.js";const l={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},c=new Set(Object.keys(l)),P=new Set(["Flex","Text","Heading","ImageBlock"]),x=new Set(["Divider"]),N=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),f=new Set(["ProductGrid"]);function s(e,t,o=!1){const i=e.render;e.render=n=>{if(t?.(n))return i(n);const r=I({...T(n,p,o),sideSpace:u(n.sideSpace)}),a=i(n),d=b(n);return r?S(_,{className:d?`${r.className} ${d}`:r.className,style:r.style,children:a}):a}}const L={name:"sectionPadding",applies:(e,t,o)=>t.isSection(e)&&!N.has(e)&&!!o&&typeof o.render=="function",panel(e,t,o){c.has(t)||f.has(t)||(e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})})},draw(e,t){if(c.has(t)){const o=e.render,i=l[t];e.render=n=>{const r=g(n,i);return o({...n,padTop:r.top,padBottom:r.bottom})};return}if(f.has(t)){s(e);return}P.has(t)||x.has(t)||s(e,t==="Flex"?o=>m(o.bgImage):E.has(t)?o=>O(t,o):void 0,!0)}},h=["Heading","Text","ImageBlock"],A=["LogoBlock"],W={name:"blockPadding",applies:(e,t,o)=>(h.includes(e)||A.includes(e))&&!!o&&typeof o.render=="function",panel(e,t,o){e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){P.has(t)||s(e,void 0,!0)}};export{x as PADS_ITS_OWN_SPACE,P as PAD_ON_ROOT,c as SECTION_PAD_INNER,l as SECTION_PAD_INNER_DEFAULTS,W as blockPadding,L as sectionPadding};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as K}from"../../../../format/lib/sections/intro-bleed-layout.js";import{resolveContainerDirection as j}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as X,HERO_CHROME_CAP_VAR as q,HERO_CHROME_INSET_VAR as z,FULL_SECTION_WIDTH as J,SITE_WIDTH_CAP as h,centredCap as g,heroBackgroundTokens as Q}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as G,SECTION_WIDTH_KEYS as v,hasOwnSectionWidth as Z,hasWidthFamily as tt,resolveWidth as D,siteWidthsOf as nt}from"../../../../format/lib/content/section-width.js";import{boxCardProps as et}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as ot}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as it,boxGutterOf as ct,boxPlaceOf as rt,boxRunsEdgeToEdge as lt,isFrameContainer as C,ownNodeWidth as dt,sectionGroundAnswer as ut,siteDrawsGutter as st}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as at}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as F,NestedBoxChoice as ft,SectionGroupChoice as ht,SectionGroupWidthsProvider as _t,SectionRootChoice as Nt,SplitBandAndColumn as H}from"../../../components/SiteGutterFrame.js";import{FRAME as L}from"../../../components/BlockFrame.js";import{sectionFillPassClass as M}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as wt}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as T,withRowsShownWhen as E}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as Ct,heldByANode as Tt,isNestedNode as Et,NOT_HELD_BY_A_NODE as P}from"../../../../format/lib/document/passes/document-position.js";const N="--sf-sw-site",Ot="--sf-sw-content",St="--sf-bg-cap",mt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",R=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",k="contents view-wide:[--sf-site-width:100vw]",A=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),pt=`contents view-wide:[--sf-site-width:100vw] ${K} view-wide:[--sf-site-gutter:var(--intro-edge)]`,W=(t,n)=>n==="content"?`min(${t}px,var(${N}))`:`${t}px`;function O({content:t,contentMax:n},e){return t==="full"?e!=="content"?J:null:n===null?null:W(n,e)}function S(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:h},children:l(u,{className:mt,style:{[Ot]:n},children:t})})}const xt="--sf-content-cap",Rt="contents max-view-wide:[--sf-content-cap:none]";function At({content:t,contentMax:n},e){return t==="full"?null:n!==null?W(n,e):e==="content"?null:`var(${N})`}function Wt(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:h},children:l(u,{className:Rt,style:{[xt]:n},children:t})})}const y=`var(${N},${h})`,f=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:g(h),children:l(F,{ground:y,children:n})}):n;function U(t,n,e,o,i){if(R(e))return f(o,A(e,k,l(H,{children:t({...n,contained:!0})})),i);if(e.content==="full")return f(o,t({...n,contained:!1}),i);const c=O(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):f(o,S(l(H,{children:t({...n,contained:!0})}),c),i)}function V(t,n,e,o){if(e==="hero"){const r=S(t(n),O(o,o.band));return o.band==="full"?l(u,{style:{[X]:"none",[z]:"initial",[q]:"initial"},children:r}):o.band==="content"?l(u,{style:Q(!0),children:r}):r}const i=o.band??"full",c=M(n);if(e==="rawMarkup"){if(o.content==="full")return f(i,t(n),c);const r=o.contentMax===null?h:W(o.contentMax,i);return l(u,{className:"contents",style:{[N]:h},children:f(i,l(u,{className:c||void 0,style:g(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=R(o)?A(o,pt,t({...n,fullWidth:!1})):S(t({...n,fullWidth:r}),r?null:O(o,i));return i==="content"?l(u,{className:"contents",style:{[St]:h},children:d}):d}switch(e){case"both":return f(i,Wt(t(n),At(o,i)),c);case"contained":return U(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=R(o),d=o.content==="full"&&!r?"full":"page",s=r?A(o,k,t({...n,widthMode:d})):S(t({...n,widthMode:d}),o.content==="full"?null:O(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${L} ${c}`:L,children:s}):s:f(i,s,c)}default:return f(i,S(t(n),O(o,i)),c)}}function It(t,n){const e=G[n],o=t.render;t.render=i=>{const c=nt(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(ht,{draw:a=>a?.background==="content"?l(F,{ground:y,children:s(a)}):s(a)}),s=a=>{const w=a?{...r,band:a.background==="content"?r.band:a.background??r.band,content:a.content??r.content,own:a.background==="full"||a.content!==null,held:!0,siteContent:r.content}:r,x=V(o,i,e,w);if(!C(n))return x;const b=ct(i),B=b===void 0?w.content:b?"content":"full";return B===w.content?x:l(ft,{atTop:x,nested:U(o,i,{...w,content:B,own:!1},w.band??"full",M(i))})},_=dt(n,i);if(!Z(_))return d();const m=e==="rawMarkup",I=ut(n,i),Y=_.content??(m?"full":r.content),p={band:I,content:I==="content"?"content":Y,contentMax:_.contentMax,own:!m,siteContent:r.content};return l(Nt,{own:()=>l(_t,{value:{background:p.band,content:p.content},children:V(o,i,e,p)}),followed:d})}}const bt={all:[P,{not:{context:"runsEdgeToEdge",is:!0}}]},Zt={name:"sectionWidth",applies:(t,n,e)=>tt(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:G[n]==="rawMarkup"}),i=C(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=C(n)?$(n,t,c,[it]):c;T(t,{heldByANode:Tt}),C(n)&&T(t,{runsEdgeToEdge:(d,s)=>lt(et(d.props??{},ot(s.appState,d.props?.id)?.inCopy!==!1))}),t.fields=E(r,[v.background,v.content],C(n)?bt:P)},draw(t,n){It(t,n)}};function Bt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const gt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),tn={name:"containedWidth",applies:(t,n,e)=>gt.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=$(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,s=D(c?.props??{},"page"),_=m=>Bt(m,s);return d&&typeof d.then=="function"?d.then(_):_(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=D(e,"page");return n({...e,contained:o!=="full"})}}},Gt={not:{context:"inHeroGroupRow",is:!0}},nn={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=E(n.fields??{},["align"],Gt),T(n,{inHeroGroupRow:(e,o)=>{const i=Ct(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&j("HeroGroup",i.props?.direction)==="row"}})}};function vt(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Dt={any:[]},Ft={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Ht={not:{context:"widthCappedByParent",is:!0}};function $(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return E(e,["_gWidth",...o],Dt);if(vt(e)){const i=(c,r)=>rt(r.appState?.data?.content,c.props?.id,st(at()));return T(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),E(e,o,Ft)}return T(n,{widthCappedByParent:(i,c)=>"parent"in c?wt(c.parent):Et({props:i.props??{}},c)}),E(e,o,Ht)}export{St as SECTION_BACKGROUND_VAR,Rt as SECTION_CONTENT_CAP_CLASS,xt as SECTION_CONTENT_CAP_VAR,mt as SECTION_CONTENT_CLASS,Ot as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,nn as buttonAlignInRow,tn as containedWidth,Zt as sectionWidth,Bt as widthModeFields};
1
+ import{jsx as l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as j}from"../../../../format/lib/sections/intro-bleed-layout.js";import{cssLengthOf as B}from"../../../../format/lib/content/css-length.js";import{resolveContainerDirection as X}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as q,HERO_CHROME_CAP_VAR as z,HERO_CHROME_INSET_VAR as J,FULL_SECTION_WIDTH as Q,SITE_WIDTH_CAP as _,centredCap as G,heroBackgroundTokens as Z}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as v,SECTION_WIDTH_KEYS as D,hasOwnSectionWidth as tt,hasWidthFamily as nt,resolveWidth as F,siteWidthsOf as et}from"../../../../format/lib/content/section-width.js";import{boxCardProps as ot}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as it}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as ct,boxGutterOf as rt,boxPlaceOf as lt,boxRunsEdgeToEdge as dt,isFrameContainer as C,ownNodeWidth as ut,sectionGroundAnswer as st,siteDrawsGutter as at}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as ft}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as H,NestedBoxChoice as ht,SectionGroupChoice as _t,SectionGroupWidthsProvider as Nt,SectionRootChoice as wt,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as L}from"../../../components/BlockFrame.js";import{sectionFillPassClass as P}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as Ct}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as O,withRowsShownWhen as T}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as Ot,heldByANode as Tt,isNestedNode as Et,NOT_HELD_BY_A_NODE as k}from"../../../../format/lib/document/passes/document-position.js";const N="--sf-sw-site",St="--sf-sw-content",mt="--sf-bg-cap",pt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",R=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",y="contents view-wide:[--sf-site-width:100vw]",A=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),xt=`contents view-wide:[--sf-site-width:100vw] ${j} view-wide:[--sf-site-gutter:var(--intro-edge)]`,W=(t,n,e)=>n==="content"?`min(${B(t,e)},var(${N}))`:B(t,e);function E({content:t,contentMax:n,contentMaxUnit:e},o){return t==="full"?o!=="content"?Q:null:n===null?null:W(n,o,e)}function S(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:pt,style:{[St]:n},children:t})})}const Rt="--sf-content-cap",At="contents max-view-wide:[--sf-content-cap:none]";function Wt({content:t,contentMax:n,contentMaxUnit:e},o){return t==="full"?null:n!==null?W(n,o,e):o==="content"?null:`var(${N})`}function It(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:At,style:{[Rt]:n},children:t})})}const U=`var(${N},${_})`,f=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:G(_),children:l(H,{ground:U,children:n})}):n;function V(t,n,e,o,i){if(R(e))return f(o,A(e,y,l(M,{children:t({...n,contained:!0})})),i);if(e.content==="full")return f(o,t({...n,contained:!1}),i);const c=E(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):f(o,S(l(M,{children:t({...n,contained:!0})}),c),i)}function $(t,n,e,o){if(e==="hero"){const r=S(t(n),E(o,o.band));return o.band==="full"?l(u,{style:{[q]:"none",[J]:"initial",[z]:"initial"},children:r}):o.band==="content"?l(u,{style:Z(!0),children:r}):r}const i=o.band??"full",c=P(n);if(e==="rawMarkup"){if(o.content==="full")return f(i,t(n),c);const r=o.contentMax===null?_:W(o.contentMax,i,o.contentMaxUnit);return l(u,{className:"contents",style:{[N]:_},children:f(i,l(u,{className:c||void 0,style:G(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=R(o)?A(o,xt,t({...n,fullWidth:!1})):S(t({...n,fullWidth:r}),r?null:E(o,i));return i==="content"?l(u,{className:"contents",style:{[mt]:_},children:d}):d}switch(e){case"both":return f(i,It(t(n),Wt(o,i)),c);case"contained":return V(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=R(o),d=o.content==="full"&&!r?"full":"page",s=r?A(o,y,t({...n,widthMode:d})):S(t({...n,widthMode:d}),o.content==="full"?null:E(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${L} ${c}`:L,children:s}):s:f(i,s,c)}default:return f(i,S(t(n),E(o,i)),c)}}function bt(t,n){const e=v[n],o=t.render;t.render=i=>{const c=et(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(_t,{draw:a=>a?.background==="content"?l(H,{ground:U,children:s(a)}):s(a)}),s=a=>{const w=a?{...r,band:a.background==="content"?r.band:a.background??r.band,content:a.content??r.content,own:a.background==="full"||a.content!==null,held:!0,siteContent:r.content}:r,x=$(o,i,e,w);if(!C(n))return x;const b=rt(i),g=b===void 0?w.content:b?"content":"full";return g===w.content?x:l(ht,{atTop:x,nested:V(o,i,{...w,content:g,own:!1},w.band??"full",P(i))})},h=ut(n,i);if(!tt(h))return d();const m=e==="rawMarkup",I=st(n,i),K=h.content??(m?"full":r.content),p={band:I,content:I==="content"?"content":K,contentMax:h.contentMax,contentMaxUnit:h.contentMaxUnit,own:!m,siteContent:r.content};return l(wt,{own:()=>l(Nt,{value:{background:p.band,content:p.content},children:$(o,i,e,p)}),followed:d})}}const gt={all:[k,{not:{context:"runsEdgeToEdge",is:!0}}]},nn={name:"sectionWidth",applies:(t,n,e)=>nt(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:v[n]==="rawMarkup"}),i=C(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=C(n)?Y(n,t,c,[ct]):c;O(t,{heldByANode:Tt}),C(n)&&O(t,{runsEdgeToEdge:(d,s)=>dt(ot(d.props??{},it(s.appState,d.props?.id)?.inCopy!==!1))}),t.fields=T(r,[D.background,D.content],C(n)?gt:k)},draw(t,n){bt(t,n)}};function Bt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const Gt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),en={name:"containedWidth",applies:(t,n,e)=>Gt.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=Y(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,s=F(c?.props??{},"page"),h=m=>Bt(m,s);return d&&typeof d.then=="function"?d.then(h):h(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=F(e,"page");return n({...e,contained:o!=="full"})}}},vt={not:{context:"inHeroGroupRow",is:!0}},on={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=T(n.fields??{},["align"],vt),O(n,{inHeroGroupRow:(e,o)=>{const i=Ot(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&X("HeroGroup",i.props?.direction)==="row"}})}};function Dt(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Ft={any:[]},Ht={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Mt={not:{context:"widthCappedByParent",is:!0}};function Y(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return T(e,["_gWidth",...o],Ft);if(Dt(e)){const i=(c,r)=>lt(r.appState?.data?.content,c.props?.id,at(ft()));return O(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),T(e,o,Ht)}return O(n,{widthCappedByParent:(i,c)=>"parent"in c?Ct(c.parent):Et({props:i.props??{}},c)}),T(e,o,Mt)}export{mt as SECTION_BACKGROUND_VAR,At as SECTION_CONTENT_CAP_CLASS,Rt as SECTION_CONTENT_CAP_VAR,pt as SECTION_CONTENT_CLASS,St as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,on as buttonAlignInRow,en as containedWidth,nn as sectionWidth,Bt as widthModeFields};
@@ -1 +1 @@
1
- import{capHeroGroups as s}from"../../../format/lib/document/cap-hero-groups.js";import{markListSearchScopes as m}from"../../../format/lib/document/list-search-scopes.js";import{dropEmptySourcedBoxes as i,markHeadCoreBoxes as h}from"./head-core-boxes.js";import{oneH1 as c}from"../../../format/lib/document/one-h1.js";import{withPageContents as l}from"../content/page-contents.js";import{markWallLabels as p}from"./wall-labels.js";import{migrateLegacyPageData as d}from"./migrate-legacy.js";import{migrateRenamedProps as u}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as f,SECTION_TO_BOX_ON as y}from"../sections/section-to-box.js";import{siteThemeOf as g}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as w}from"./blocks/general/section-to-box-rows.js";const S=[{name:"migrateLegacyPageData",chrome:!1,why:"page-only: it walks the top-level sections (Gallery B's array to its slot, a second pinned Header or Footer); a chrome document's one top-level node is the chrome itself",run:e=>d(e)},{name:"migrateRenamedProps",chrome:!0,why:"every document built from stored props: a renamed key still reads its stored answer (lib/source-rules/document-surfaces)",run:e=>u(e)},{name:"convertSectionsInPage",chrome:!1,why:"page-only: it turns an old top-level SECTION into its Box, with the site theme off the page's metadata; chrome is a Box group, never one of those sections",run:(e,{metadata:o})=>(w(),f(e,y,{theme:g(o)}))},{name:"capHeroGroups",chrome:!1,why:"page-only: it caps a top-level Hero's slide groups, and a Hero is a page section",run:e=>s(e)},{name:"oneH1",chrome:!1,why:"page-only: it hands the h1 to the first opener in the PAGE's document order; on a chrome document it would count a second document on its own",run:e=>c(e)},{name:"dropEmptySourcedBoxes",chrome:!0,why:"any document: a nested head over sourced cores served none goes (the Box footer's payment line), at any depth inside a slot",run:e=>i(e)},{name:"markHeadCoreBoxes",chrome:!1,why:"page-only: it marks a head Box at the TOP of the page, where the mark element draws (lib/content/empty-hides); a chrome document's top is the chrome group",run:e=>h(e)},{name:"markListSearchScopes",chrome:!1,why:"page-only for now: it ties a Search to the lists of the page's Box; no chrome holds a Search, and a chrome entry is one flag when one does",run:e=>m(e)},{name:"withPageContents",chrome:!1,why:"page-only: a Contents block lists the PAGE's anchored sections and numbers their kickers",run:e=>l(e)},{name:"markWallLabels",chrome:!0,why:"any document: each Marks wall is named by the lead Text drawn before it (aria-labelledby), the Box footer's walls too",run:e=>p(e)}];function a(e,o,n){let r=e;for(const t of S)(!n||t.chrome)&&(r=t.run(r,o));return r}function G(e,o){return a(e,{metadata:o},!1)}function T(e,o){return a(e,{metadata:o},!0)}export{S as PUBLISHED_PASSES,T as publishedChromeData,G as publishedPageData};
1
+ import{capHeroGroups as s}from"../../../format/lib/document/cap-hero-groups.js";import{markListSearchScopes as m}from"../../../format/lib/document/list-search-scopes.js";import{dropEmptySourcedBoxes as i,markHeadCoreBoxes as h}from"./head-core-boxes.js";import{oneH1 as l}from"../../../format/lib/document/one-h1.js";import{withPageContents as c}from"../content/page-contents.js";import{markCardPressTitles as p}from"./card-press-titles.js";import{markWallLabels as d}from"./wall-labels.js";import{migrateLegacyPageData as u}from"./migrate-legacy.js";import{migrateRenamedProps as f}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as y,SECTION_TO_BOX_ON as g}from"../sections/section-to-box.js";import{siteThemeOf as w}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as b}from"./blocks/general/section-to-box-rows.js";const k=[{name:"migrateLegacyPageData",chrome:!1,why:"page-only: it walks the top-level sections (Gallery B's array to its slot, a second pinned Header or Footer); a chrome document's one top-level node is the chrome itself",run:e=>u(e)},{name:"migrateRenamedProps",chrome:!0,why:"every document built from stored props: a renamed key still reads its stored answer (lib/source-rules/document-surfaces)",run:e=>f(e)},{name:"convertSectionsInPage",chrome:!1,why:"page-only: it turns an old top-level SECTION into its Box, with the site theme off the page's metadata; chrome is a Box group, never one of those sections",run:(e,{metadata:o})=>(b(),y(e,g,{theme:w(o)}))},{name:"capHeroGroups",chrome:!1,why:"page-only: it caps a top-level Hero's slide groups, and a Hero is a page section",run:e=>s(e)},{name:"oneH1",chrome:!1,why:"page-only: it hands the h1 to the first opener in the PAGE's document order; on a chrome document it would count a second document on its own",run:e=>l(e)},{name:"dropEmptySourcedBoxes",chrome:!0,why:"any document: a nested head over sourced cores served none goes (the Box footer's payment line), at any depth inside a slot",run:e=>i(e)},{name:"markHeadCoreBoxes",chrome:!1,why:"page-only: it marks a head Box at the TOP of the page, where the mark element draws (lib/content/empty-hides); a chrome document's top is the chrome group",run:e=>h(e)},{name:"markListSearchScopes",chrome:!1,why:"page-only for now: it ties a Search to the lists of the page's Box; no chrome holds a Search, and a chrome entry is one flag when one does",run:e=>m(e)},{name:"withPageContents",chrome:!1,why:"page-only: a Contents block lists the PAGE's anchored sections and numbers their kickers",run:e=>c(e)},{name:"markWallLabels",chrome:!0,why:"any document: each Marks wall is named by the lead Text drawn before it (aria-labelledby), the Box footer's walls too",run:e=>d(e)},{name:"markCardPressTitles",chrome:!0,why:"any document: an acting copy's press button is named by its template's title Text (aria-labelledby), a header or footer list too; after the wall labels, so a Text keeps one id",run:e=>p(e)}];function a(e,o,n){let r=e;for(const t of k)(!n||t.chrome)&&(r=t.run(r,o));return r}function D(e,o){return a(e,{metadata:o},!1)}function I(e,o){return a(e,{metadata:o},!0)}export{k as PUBLISHED_PASSES,I as publishedChromeData,D as publishedPageData};
@@ -1 +1 @@
1
- import{HERO_SLIDE_SEEDS as h}from"../../components/HeroSlide.js";import{heroGroupAddBlocked as i,heroGroupOverCapNotice as n}from"../../../format/lib/hero-group-placement.js";import{newNodeId as c}from"efficient-easel/draw";import{BOX_TYPE as t,CONTAINER_BLOCKS_SLOT as p}from"../../../format/lib/document/container-blocks.js";import{BOX_LABEL as d}from"../../../format/lib/document/section-catalog.js";import{headingTextSeed as E}from"../../../format/lib/document/text-seeds.js";import{HERO_STRIP_SLOT as S}from"../../../format/lib/hero-ticker.js";const m="ImageBlock",_=3,s=(e,r,o={})=>({type:e,props:{...r?.(e)??{},id:c(e),...o}}),O=e=>({...e?.(t)??{},direction:"column",[p]:[s(m,e),s(t,e,{direction:"column",[p]:[s("Text",e,E()),s("Text",e)]})]}),l={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>h.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${d.toLowerCase()}`,seeds:()=>[],addBlocked:i,notice:n},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${d.toLowerCase()}`,seeds:()=>[],addBlocked:i,notice:n},ProcessSteps:{slot:"boxes",childType:t,addLabel:`Add ${d.toLowerCase()}`,seeds:e=>Array.from({length:_},()=>O(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}},a=1,C={slot:S,childType:t,addLabel:`Add ${d.toLowerCase()}`,seeds:()=>[],addBlocked:e=>e.length>=a?"This Hero has its Scrolling Bar already. Delete it to add another.":null,notice:e=>e.length>a?`This Hero holds ${e.length} Scrolling Bars. Keep one and delete the others.`:null},B={Hero:{[S]:C}};function P(e){for(const[r,o]of Object.entries(e)){if(r in l&&l[r]!==o)throw new Error(`lib/document/slot-specs: "${r}" already has a slot spec`);l[r]=o}}function b(e,r){const o=l[e];return o?{slot:o.slot,children:o.seeds(r).map(T=>({type:o.childType,props:{id:c(o.childType),...T}}))}:null}export{a as HERO_STRIP_CAP,C as HERO_STRIP_SPEC,B as SLOT_SECTION_EXTRA_SPECS,l as SLOT_SECTION_SPECS,b as buildSlotSeedChildren,P as registerSlotSectionSpecs};
1
+ import{HERO_SLIDE_SEEDS as h}from"../../components/HeroSlide.js";import{heroGroupAddBlocked as p,heroGroupOverCapNotice as i}from"../../../format/lib/hero-group-placement.js";import{newNodeId as n}from"efficient-easel/draw";import{BOX_TYPE as c}from"../../../format/lib/document/container-blocks.js";import{BOX_LABEL as s}from"../../../format/lib/document/section-catalog.js";import{seedNodes as E}from"../../../format/lib/document/seed-parts.js";import{isNodeList as T}from"efficient-easel/data";import{PROCESS_COLUMNS_SLOT as _,PROCESS_STEPS_SEED_COUNT as O,processColumnSeed as u}from"../../../format/lib/document/blocks/general/ProcessSteps/column-seed.js";import{HERO_STRIP_SLOT as S}from"../../../format/lib/hero-ticker.js";const a=(e,o)=>({type:e.type,props:{...o?.(e.type)??{},...Object.fromEntries(Object.entries(e.props).map(([r,t])=>[r,T(t)?t.map(l=>a(l,o)):t]))}}),C=e=>{const[o]=E([u()],l=>n(l)),{id:r,...t}=a(o,e).props;return t},d={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>h.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${s.toLowerCase()}`,seeds:()=>[],addBlocked:p,notice:i},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${s.toLowerCase()}`,seeds:()=>[],addBlocked:p,notice:i},ProcessSteps:{slot:_,childType:c,addLabel:`Add ${s.toLowerCase()}`,seeds:e=>Array.from({length:O},()=>C(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}},m=1,L={slot:S,childType:c,addLabel:`Add ${s.toLowerCase()}`,seeds:()=>[],addBlocked:e=>e.length>=m?"This Hero has its Scrolling Bar already. Delete it to add another.":null,notice:e=>e.length>m?`This Hero holds ${e.length} Scrolling Bars. Keep one and delete the others.`:null},w={Hero:{[S]:L}};function x(e){for(const[o,r]of Object.entries(e)){if(o in d&&d[o]!==r)throw new Error(`lib/document/slot-specs: "${o}" already has a slot spec`);d[o]=r}}function N(e,o){const r=d[e];return r?{slot:r.slot,children:r.seeds(o).map(t=>({type:r.childType,props:{id:n(r.childType),...t}}))}:null}export{m as HERO_STRIP_CAP,L as HERO_STRIP_SPEC,w as SLOT_SECTION_EXTRA_SPECS,d as SLOT_SECTION_SPECS,N as buildSlotSeedChildren,x as registerSlotSectionSpecs};
@@ -43,23 +43,12 @@ export type ConvertContext = {
43
43
  press?: boolean;
44
44
  };
45
45
  export declare function convertTheme(ctx: ConvertContext): ThemeValue | undefined;
46
- export type Restyled = {
47
- key: string;
48
- was: {
49
- size: number;
50
- sizePhone?: number;
51
- };
52
- textStyle?: string;
53
- size?: number;
54
- sizePhone?: number;
55
- };
56
46
  export type SectionConversion = {
57
47
  node: SectionNode;
58
48
  nodes: SectionNode[];
59
49
  carried: Carried[];
60
50
  dropped: Dropped[];
61
51
  siteWrites: SiteWrite[];
62
- restyled: Restyled[];
63
52
  skipped?: string;
64
53
  };
65
54
  export type TextRole = "heading" | "body" | "eyebrow";
@@ -113,10 +102,6 @@ type PartRowKind = {
113
102
  style?: Props;
114
103
  styleFrom?: (node: Props, ctx: ConvertContext) => Props;
115
104
  props?: Props;
116
- was?: {
117
- size: number;
118
- sizePhone?: number;
119
- };
120
105
  mark?: "accentLead" | "accentItalic";
121
106
  } | {
122
107
  kind: "button";