efficient-web-builder 65.0.0 → 66.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 (185) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/editor/components/AnchorField.js +1 -1
  3. package/dist/editor/components/CardShadowField.js +1 -1
  4. package/dist/editor/components/PagesPanel.js +1 -1
  5. package/dist/editor/components/SectionEditor.js +1 -1
  6. package/dist/editor/components/WebsitePreviewButton.js +1 -1
  7. package/dist/editor/components/storefront-editor.css +16 -24
  8. package/dist/editor/components/usePreviewHref.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/Footprint/fields.d.ts +0 -1
  14. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  22. package/dist/editor/lib/document/box-fields.d.ts +2 -1
  23. package/dist/editor/lib/document/box-fields.js +1 -1
  24. package/dist/editor/lib/document/card-row-fields.d.ts +3 -0
  25. package/dist/editor/lib/document/card-row-fields.js +1 -1
  26. package/dist/editor/lib/document/controls.d.ts +11 -10
  27. package/dist/editor/lib/document/controls.js +1 -1
  28. package/dist/editor/lib/document/field-groups.d.ts +0 -3
  29. package/dist/editor/lib/document/field-groups.js +1 -1
  30. package/dist/editor/lib/document/passes/inspector.js +1 -1
  31. package/dist/editor/lib/sections/section-dry-run.d.ts +1 -20
  32. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  33. package/dist/editor/lib/sections/text-layouts.js +1 -1
  34. package/dist/format/lib/content/block-sources.d.ts +3 -0
  35. package/dist/format/lib/content/block-sources.js +1 -1
  36. package/dist/format/lib/content/box-background.d.ts +1 -0
  37. package/dist/format/lib/content/box-background.js +1 -1
  38. package/dist/format/lib/content/box-link.d.ts +11 -0
  39. package/dist/format/lib/content/box-link.js +8 -8
  40. package/dist/format/lib/content/box-phone-place.d.ts +0 -2
  41. package/dist/format/lib/content/box-phone-place.js +1 -1
  42. package/dist/format/lib/content/box-side-space.js +1 -1
  43. package/dist/format/lib/content/card-image-shape.d.ts +5 -1
  44. package/dist/format/lib/content/card-image-shape.js +1 -1
  45. package/dist/format/lib/content/card-template.d.ts +1 -0
  46. package/dist/format/lib/content/card-template.js +1 -1
  47. package/dist/format/lib/content/contact.d.ts +0 -1
  48. package/dist/format/lib/content/contact.js +2 -2
  49. package/dist/format/lib/content/css-length.d.ts +1 -0
  50. package/dist/format/lib/content/css-length.js +1 -0
  51. package/dist/format/lib/content/page-width.d.ts +17 -1
  52. package/dist/format/lib/content/page-width.js +1 -1
  53. package/dist/format/lib/document/blocks/general/Banner/meta.d.ts +5 -0
  54. package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
  55. package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +2 -0
  56. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  57. package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
  58. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +5 -0
  59. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -0
  60. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  61. package/dist/format/lib/document/blocks/general/SectionHeader/meta.d.ts +6 -0
  62. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  63. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.d.ts +2 -0
  64. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.js +2 -2
  65. package/dist/format/lib/document/media-drop.js +1 -1
  66. package/dist/format/lib/document/one-h1.d.ts +2 -0
  67. package/dist/format/lib/document/one-h1.js +1 -1
  68. package/dist/format/lib/document/passes/types.d.ts +1 -0
  69. package/dist/format/lib/document/renamed-props.d.ts +1 -0
  70. package/dist/format/lib/document/renamed-props.js +1 -1
  71. package/dist/format/lib/document/section-catalog.js +10 -2
  72. package/dist/format/lib/document/section-descriptions.js +1 -1
  73. package/dist/format/lib/editor-words-catalogue.d.ts +10 -0
  74. package/dist/format/lib/editor-words-catalogue.js +3 -3
  75. package/dist/format/lib/editor-words-kept.js +1 -1
  76. package/dist/format/lib/fit-words.js +4 -1
  77. package/dist/format/lib/links/page-link-rules.d.ts +0 -1
  78. package/dist/format/lib/links/page-link-rules.js +1 -1
  79. package/dist/format/lib/markup.d.ts +1 -0
  80. package/dist/format/lib/markup.js +2 -2
  81. package/dist/format/lib/sections/section-presets.js +1 -1
  82. package/dist/format/lib/sections/timeline-year-shape.js +1 -1
  83. package/dist/format/lib/source-rules/editor-words.js +1 -1
  84. package/dist/format/lib/source-rules/one-length-control.d.ts +18 -0
  85. package/dist/format/lib/source-rules/one-length-control.js +16 -0
  86. package/dist/format/lib/source-rules/support/label-extraction.js +3 -3
  87. package/dist/format/lib/theme.d.ts +0 -1
  88. package/dist/format/lib/theme.js +3 -3
  89. package/dist/format/lib/web-runtime.d.ts +2 -0
  90. package/dist/format/lib/web-runtime.js +1 -1
  91. package/dist/render/components/BlockFrame.d.ts +3 -3
  92. package/dist/render/components/BlockFrame.js +1 -1
  93. package/dist/render/components/Breadcrumb.js +1 -1
  94. package/dist/render/components/Btn.js +1 -1
  95. package/dist/render/components/CardRowContext.d.ts +7 -1
  96. package/dist/render/components/CardRowContext.js +1 -1
  97. package/dist/render/components/CategoryBar.js +1 -1
  98. package/dist/render/components/ContactLocations.js +2 -2
  99. package/dist/render/components/DealerFinder.d.ts +4 -1
  100. package/dist/render/components/DealerFinder.js +1 -1
  101. package/dist/render/components/Divider.js +1 -1
  102. package/dist/render/components/DocMasthead.js +1 -1
  103. package/dist/render/components/DocTabs.js +1 -1
  104. package/dist/render/components/FeaturedCover.js +1 -1
  105. package/dist/render/components/Flex.js +1 -1
  106. package/dist/render/components/Footprint.d.ts +5 -3
  107. package/dist/render/components/Footprint.js +1 -1
  108. package/dist/render/components/Heading.d.ts +0 -1
  109. package/dist/render/components/Heading.js +1 -1
  110. package/dist/render/components/ImageBlock.js +1 -1
  111. package/dist/render/components/KeyFeatures.js +1 -1
  112. package/dist/render/components/LocationMap.js +1 -1
  113. package/dist/render/components/LogoBlock.js +1 -1
  114. package/dist/render/components/Logos.d.ts +1 -2
  115. package/dist/render/components/Logos.js +1 -1
  116. package/dist/render/components/LongRead.js +1 -1
  117. package/dist/render/components/PostCard.js +1 -1
  118. package/dist/render/components/ProcessSteps.d.ts +2 -1
  119. package/dist/render/components/ProcessSteps.js +1 -1
  120. package/dist/render/components/SectionHeader.js +1 -1
  121. package/dist/render/components/SideListLayout.d.ts +4 -1
  122. package/dist/render/components/SideListLayout.js +1 -1
  123. package/dist/render/components/Split.js +1 -1
  124. package/dist/render/components/Text.d.ts +2 -1
  125. package/dist/render/components/Text.js +1 -1
  126. package/dist/render/components/Timeline.js +1 -1
  127. package/dist/render/components/TimelineRail.d.ts +11 -3
  128. package/dist/render/components/TimelineRail.js +1 -1
  129. package/dist/render/components/TimelineTrack.js +1 -1
  130. package/dist/render/components/TitleWithButtons.js +1 -1
  131. package/dist/render/components/goldPhrases.js +3 -3
  132. package/dist/render/lib/content/block-size.d.ts +5 -1
  133. package/dist/render/lib/content/block-size.js +1 -1
  134. package/dist/render/lib/content/box-stack-line.d.ts +1 -1
  135. package/dist/render/lib/content/box-stack-line.js +1 -1
  136. package/dist/render/lib/content/button-look.d.ts +2 -0
  137. package/dist/render/lib/content/button-look.js +1 -1
  138. package/dist/render/lib/content/section-edge.js +1 -1
  139. package/dist/render/lib/content/section-padding.d.ts +5 -2
  140. package/dist/render/lib/content/section-padding.js +1 -1
  141. package/dist/render/lib/dealer-source.d.ts +6 -2
  142. package/dist/render/lib/dealer-source.js +1 -1
  143. package/dist/render/lib/document/blocks/general/Banner/render.js +1 -1
  144. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  145. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  146. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  147. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  148. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  149. package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
  150. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +2 -0
  151. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  152. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  153. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  154. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  155. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +2 -2
  156. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  157. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  158. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  159. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  160. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.d.ts +3 -0
  161. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.js +1 -0
  162. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  163. package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +3 -0
  164. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  165. package/dist/render/lib/document/card-press-titles.d.ts +10 -0
  166. package/dist/render/lib/document/card-press-titles.js +1 -0
  167. package/dist/render/lib/document/passes/section-height.js +1 -1
  168. package/dist/render/lib/document/passes/section-padding.js +1 -1
  169. package/dist/render/lib/document/published-passes.js +1 -1
  170. package/dist/render/lib/document/slot-specs.js +1 -1
  171. package/dist/render/lib/sections/section-to-box.d.ts +0 -15
  172. package/dist/render/lib/sections/section-to-box.js +1 -1
  173. package/dist/render/lib/site-runtime.d.ts +4 -1
  174. package/dist/render/lib/site-runtime.js +1 -1
  175. package/package.json +5 -5
  176. package/dist/editor/components/TemplateFieldRow.d.ts +0 -11
  177. package/dist/editor/components/TemplateFieldRow.js +0 -1
  178. package/dist/editor/lib/document/panel-heading-scope.d.ts +0 -8
  179. package/dist/editor/lib/document/panel-heading-scope.js +0 -1
  180. package/dist/editor/lib/document/template-field.d.ts +0 -13
  181. package/dist/editor/lib/document/template-field.js +0 -1
  182. package/dist/format/lib/canvas-accent.d.ts +0 -1
  183. package/dist/format/lib/canvas-accent.js +0 -1
  184. package/dist/format/lib/source-rules/padding-units-declared.d.ts +0 -2
  185. package/dist/format/lib/source-rules/padding-units-declared.js +0 -6
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as A}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const B=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(A()),...Object.keys(A())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...A()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=B.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return B.some(t=>d[t]in e)}function Oe(e){const t=B.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,B as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
1
+ import{anchorFields as f,bucketHeader as m,cardMediaFields as N,cardShowFields as Y,designGroupHeader as I,foldMarker as U,foldMetaOf as C,quietMarker as W,heightFields as L,sectionShapeFields as w,sectionThemeFields as E,stickFields as x,widthField as O}from"./controls.js";import{group as z}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as D}from"./box-fields.js";import{deviceField as q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as T}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as J}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";const B=J;function Q(t){return t==="Animation"?"Animation":"Design"}const V="Editor only — not shown live",A={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[V]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function R(t,e,o){const a=`${t}.${e}`;return H[a]??$[a]??A[o]}function he(t,e,o){const a=R(t,e,o);return a?Q(a):void 0}function X(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function S(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=P(a),b=C(h?h.inner:a),l=b?A[b.label]:void 0;if(l)for(const g of X(l))e.includes(g)||e.push(g)}return e}const be=[...S(D({tablet:!0,siteSide:!0}),O("full"),L(),f(),x()),...Object.keys(D({tablet:!0,siteSide:!0})),...Object.keys(O("full")),...Object.keys(L()),...Object.keys(f()),...Object.keys(x())],Ce=[...S(E()),...Object.keys(E())],pe=[...S(w()),...Object.keys(w())],ge=[...S(T()),...Object.keys(T())],ye=Object.keys(N()),ke=Object.keys(Y()),Z={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},G={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},K={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const t={...D({tablet:!0,siteSide:!0}),...O("full"),...L(),...f(),...E(),...w(),...T()};for(const e of Object.keys(K)){const o=C(t[e]),a=o?A[o.label]:void 0;if(!o||o.level!==2||!a||!G[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ee=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),te=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(t=>[p[t],t])]);function ne(t){const e=`${t}.`;return Object.keys(Z).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function oe(t,e){const o=P(t),a=z(e);return o?q(o.tier,a):a}function ae(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?U(e,o.label):W(e):e}function M(t){return t==="Design"?k:["Animation"]}function Se(t,e){const o=[],a=new Set(ne(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ee.has(n))throw new Error(`${e}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=te.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(b=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in K){const s=R(e,n,i.label);if(i.level!==2||!s||!G[s].includes(i.label))throw new Error(`${e}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=R(e,n,i.label);if(!u)throw new Error(`${e}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:oe(r,i.label)]]})}const g=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!g.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const _=b?[]:[...a].filter(n=>!h.has(n));if(_.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(_)}, but this section has no such fold header${_.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const F=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),v=B.filter(n=>M(n).some(r=>F.has(r))),y={};for(const n of v){y[d[n]]=m(n,n===v[0]?v:null);for(const r of M(n)){if(!F.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[p[r]]=I(r));for(const u of i)for(const[s,j]of u.entries)y[s]=ae(r,j)}}return y}function _e(t){return d.Design in t?t:{[d.Design]:m("Design",null),[p.Content]:I("Content"),...t}}function ve(t){return B.some(e=>d[e]in t)}function fe(t){const e=B.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=m(a,a===e[0]?e:null);return o}export{H as BLOCK_KEY_GROUP,B as BUCKETS,d as BUCKET_KEY,ye as CARD_MEDIA_FIELD_KEYS,ke as CARD_SHOW_FIELD_KEYS,k as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,V as EDITOR_ONLY_GROUP,K as INJECTED_RETIRED,$ as KEY_GROUP,A as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,G as PLACE_WORDS,Z as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,Se as assignSectionGroups,he as bucketOf,Q as bucketOfPlace,ve as hasBucketTabs,S as headerKeysOf,X as headerKeysOfPlace,R as placeOf,fe as reseatBucketTabs,ne as retiredHeadings,_e as seatDesignBucket};
@@ -1 +1 @@
1
- import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as p,heightFields as l,sectionShapeFields as F,sectionThemeFields as n,spacingFields as a,stickFields as c,widthField as S}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as E,sidesPaddingFields as L}from"../box-fields.js";import{assignSectionGroups as _}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as w}from"../section-own-width-fields.js";import{dropEmptyHeadings as A}from"../panel-drop-empty-headings.js";import{rowsShownForNode as P}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:L,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:p,widthField:S,boxGutterFields:O,sectionOwnWidthFields:w,heightFields:l,anchorFields:m,stickFields:c,sectionThemeFields:n,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:E,...i?{phone:f}:{}}),assignSectionGroups:_,dropEmptyHeadings:A,rowsShownForNode:P,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
1
+ import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as l,heightFields as p,sectionShapeFields as n,sectionThemeFields as F,spacingFields as a,stickFields as S,widthField as c}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as E}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as f,rowSay as L,sidesPaddingFields as _}from"../box-fields.js";import{assignSectionGroups as T}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as A}from"../section-own-width-fields.js";import{dropEmptyHeadings as g}from"../panel-drop-empty-headings.js";import{rowsShownForNode as w}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:_,sectionShapeFields:n,cardShapeFields:d,cellWidthFields:l,widthField:c,boxGutterFields:O,sectionOwnWidthFields:A,heightFields:p,anchorFields:m,stickFields:S,sectionThemeFields:F,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:L,lengthUnits:f,...i?{phone:E}:{}}),assignSectionGroups:T,dropEmptyHeadings:g,rowsShownForNode:w,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
@@ -1,6 +1,6 @@
1
1
  import { type StoredTextStyle } from "../../../render/lib/text-styles/site-text-styles.js";
2
2
  import { type ThemeColors } from "../../../format/lib/theme.js";
3
- import { type Carried, type Dropped, type Restyled, type SectionNode, type SiteFacts, type SiteWrite } from "../../../render/lib/sections/section-to-box.js";
3
+ import { type Carried, type Dropped, type SectionNode, type SiteFacts, type SiteWrite } from "../../../render/lib/sections/section-to-box.js";
4
4
  export type DryRunPage = {
5
5
  label: string;
6
6
  layout: unknown;
@@ -15,13 +15,7 @@ export type DryRunNode = {
15
15
  before?: string;
16
16
  after?: string;
17
17
  sameMarkup?: boolean;
18
- restyled: Restyled[];
19
18
  };
20
- export declare const BODY_STYLE_PX_AT_DEFAULTS: Readonly<Record<string, number>>;
21
- export declare function nearestTextStyle(px: number, kind: "heading" | "body", list?: readonly {
22
- id: string;
23
- kind: string;
24
- }[]): string;
25
19
  export type SiteWriteOut = (Extract<SiteWrite, {
26
20
  kind: "heading-case-upper";
27
21
  }> & {
@@ -133,17 +127,4 @@ export declare function siteWritesFile(report: DryRunReport): {
133
127
  site: string;
134
128
  writes: SiteWriteOut[];
135
129
  }[];
136
- export type BodyStyleRow = {
137
- type: string;
138
- key: string;
139
- textStyle: string;
140
- oldPx: number;
141
- oldPhonePx: number;
142
- newPx: number;
143
- newPhonePx: number;
144
- diff: number;
145
- diffPhone: number;
146
- nodes: number;
147
- };
148
- export declare function bodyStyleRows(report: DryRunReport): BodyStyleRow[];
149
130
  export declare function dryRunMarkdown(report: DryRunReport): string;
@@ -1,3 +1,3 @@
1
- import{defaultTextStyles as M}from"efficient-easel/text-styles/model";import{headingDefaultPx as L}from"../../../render/components/Heading.js";import{headingLevelOfStyle as z}from"../../../render/components/Text.js";import{migrateLegacyPageData as C}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as j}from"../../../format/lib/document/renamed-props.js";import{listToWrite as F,setStyleValues as I}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as B,bandPresetIndex as W}from"../../../format/lib/theme.js";import{convertSection as H,convertSectionsInPage as Y,sectionToBoxRow as P,sectionToBoxTypes as J}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as U}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as v}from"./hero-ticker-to-strip.js";const E={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function fe(e,t,o=M()){const r=n=>t==="heading"?L(z(n)):E[n];let s;for(const{id:n,kind:d}of o){const i=d===t?r(n):void 0;if(i===void 0)continue;const c=Math.abs(i-e),l=s?Math.abs(s.px-e):1/0;(c<l||c===l&&s&&i>s.px)&&(s={id:n,px:i})}if(!s)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return s.id}function G(e){const[t,o]=e.split("/");return t&&o?{schema:t,site:o}:void 0}function ye(e){const t=r=>typeof r=="string"?r:null,o=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:o,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const V=new Set([null,"authored"]);function q(e,t){const o=F(t),r=o.filter(n=>e.includes(n.id)&&n.values.letterCase===void 0).map(n=>n.id);return{list:r.reduce((n,d)=>I(n,d,{letterCase:"upper"}),o),changed:r.length>0}}function X(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return K(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!V.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:o,changed:r}=q(e.styles,t.textStyles?t.textStylesList??null:null);return r?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:o}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function K(e,t){const o=t?.themePresets;if(!t||!o)return{undecided:"the site's theme presets were not read"};const r=o[e.page];if(!r)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(W(o,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=B(r);return{send:{kind:e.kind,page:e.page,index:o.length,preset:s,themePresets:[...o,s]}}}const O={Hero:v,HeroSingle:e=>{const t=U(e),o=v(t.node),r=s=>s in e.props;return{node:o.node,carried:[...t.carried,...o.carried.filter(s=>r(s.key))],dropped:[...t.dropped,...o.dropped.filter(s=>r(s.key))]}}};function Q(e,t){if(!t.length||!Array.isArray(e.content))return e;let o=!1;const r=e.content.map(s=>!s||!t.includes(s.type)?s:(o=!0,O[s.type](s).node));return o?{...e,content:r}:e}function D(e){const t=e?.content;return Array.isArray(t)?j(C(e)):e}function he(e,t={}){const o=[...t.types??J()],r=o.filter(p=>!P(p)&&!(p in O)),s=new Set(o.filter(p=>p in O)),n=new Set(o.filter(p=>P(p))),d=[],i=[],c={},l={},w=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),$=new Map,f=(p,x,a)=>{const k=`${p.schema}/${p.site}`;let b=$.get(k);b||$.set(k,b={...p,facts:!!x,writes:[],undecided:[],notNeeded:[]});const y=X(a,x);if("send"in y){const g=b.writes.find(_=>JSON.stringify(_.write)===JSON.stringify(y.send));g?g.nodes+=1:b.writes.push({write:y.send,reason:a.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[S,h]="undecided"in y?[b.undecided,y.undecided]:[b.notNeeded,y.notNeeded],u=S.find(g=>g.kind===a.kind&&g.why===h);u?u.nodes+=1:S.push({kind:a.kind,why:h,nodes:1})};for(const p of e){const x=D(p.layout)?.content;Array.isArray(x)&&x.forEach((a,k)=>{if(a&&typeof a.type=="string"&&s.has(a.type)){const m=O[a.type](a),N={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:m.carried,dropped:m.dropped,restyled:[]};t.draw&&(N.before=t.draw(a),N.after=t.draw(m.node),N.sameMarkup=N.before===N.after),d.push(N);const T=c[a.type]??={nodes:0,pages:0,dropped:{}};T.nodes+=1,(l[a.type]??=new Set).add(p.label),T.pages=l[a.type].size;for(const A of m.dropped)T.dropped[A.key]=(T.dropped[A.key]??0)+1;return}if(!a||typeof a.type!="string"||!n.has(a.type))return;const b=P(a.type),y=G(p.label),S=y?w.get(`${y.schema}/${y.site}`):void 0,h=H(a,b,S?{site:S}:{});if(h.skipped!==void 0){i.push({page:p.label,index:k,type:a.type,id:String(a.props?.id??""),why:h.skipped});return}if(y)for(const m of h.siteWrites)f(y,S,m);const u={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:h.carried,dropped:h.dropped,restyled:h.restyled},g=t.draw;g&&(u.before=g(a),u.after=h.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),d.push(u);const _=c[a.type]??={nodes:0,pages:0,dropped:{}};_.nodes+=1,(l[a.type]??=new Set).add(p.label),_.pages=l[a.type].size;for(const m of h.dropped)_.dropped[m.key]=(_.dropped[m.key]??0)+1})}return{types:o,noRow:r,pages:e.length,nodes:d,skipped:i,byType:c,sites:[...$.values()],siteFacts:[...t.sites??[]]}}function ue(e,t){return e.flatMap(o=>{const r=`${t.schema}/${t.siteName(o.site)}/${o.slug}`;return[{label:`${r} (draft)`,layout:o.layout},{label:`${r} (published)`,layout:o.published_layout}]})}function ge(e,t){const o=t.types.filter(s=>P(s)),r=t.types.filter(s=>s in O);return e.map(s=>{const n={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=D(s.layout),i=Array.isArray(d?.content)?d.content:[],c=[],l=[];for(const f of i){if(f&&r.includes(f.type)){c.push({type:f.type,id:String(f.props?.id??"")});continue}if(!f||!o.includes(f.type))continue;const p=String(f.props?.id??""),x=P(f.type).skip?.(f.props);x===void 0?c.push({type:f.type,id:p}):l.push({type:f.type,id:p,why:x})}if(!c.length)return{...n,converted:c,skipped:l};const w=Y(d,o,t.site?{site:t.site}:{}),$=Q(w,r);return{...n,patch:{layout:$,expected_updated_at:s.layout_updated_at},converted:c,skipped:l}})}function me(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(o=>o.write)}))}function Z(e){const t=new Map;for(const o of e.nodes)for(const r of o.restyled){const s=r.textStyle??"none",n=E[s],d=r.size??n,i=r.sizePhone??r.size??n;if(d===void 0||i===void 0)continue;const c=r.was.size,l=r.was.sizePhone??r.was.size,w=[o.type,r.key,s,c,l,d,i].join("|"),$=t.get(w);$?$.nodes+=1:t.set(w,{type:o.type,key:r.key,textStyle:s,oldPx:c,oldPhonePx:l,newPx:d,newPhonePx:i,diff:d-c,diffPhone:i-l,nodes:1})}return[...t.values()]}const R=e=>e>0?`+${e}`:String(e),ee=e=>M().find(t=>t.id===e)?.name??e,te=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function $e(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[s,n]of Object.entries(e.byType)){const d=Object.keys(n.dropped).length;t.push(`| ${s} | ${n.nodes} | ${n.pages} | ${d} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const s=new Map;for(const n of e.skipped){const d=s.get(n.type)??s.set(n.type,new Map).get(n.type);d.set(n.why,(d.get(n.why)??0)+1)}for(const[n,d]of s){t.push("",`## ${n} — skipped (not converted)`,"");for(const[i,c]of d)t.push(`- ×${c}: ${i}`)}}for(const[s,n]of Object.entries(e.byType)){const d=Object.entries(n.dropped);if(!d.length)continue;t.push("",`## ${s} — dropped`,"");const i=new Map;for(const c of e.nodes)if(c.type===s)for(const l of c.dropped)i.set(l.key,l.why);for(const[c,l]of d)t.push(`- \`${c}\` ×${l}: ${i.get(c)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const s=n=>n==null?"—":String(n);for(const n of e.siteFacts)t.push(`| ${n.schema}/${n.site} | ${s(n.ownThemeRow)} | ${n.deleted?"YES":"no"} | ${s(n.headingCase)} | ${s(n.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const s of e.sites){const n=`${s.schema}/${s.site}`,d=s.facts?"yes":"NO";for(const i of s.writes)t.push(`| ${n} | ${d} | ${te(i.write)} | send | ${i.nodes} | ${i.reason} |`);for(const i of s.undecided)t.push(`| ${n} | ${d} | ${i.kind} | UNDECIDED | ${i.nodes} | ${i.why} |`);for(const i of s.notNeeded)t.push(`| ${n} | ${d} | ${i.kind} | not needed | ${i.nodes} | ${i.why} |`)}}const o=Z(e);if(o.length){const s=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],n=i=>`| ${i.type} | \`${i.key}\` | ${i.oldPx} (${i.oldPhonePx}) | ${ee(i.textStyle)} | ${i.newPx} (${i.newPhonePx}) | ${R(i.diff)} (${R(i.diffPhone)}) | ${i.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...s,...o.map(n));const d=o.filter(i=>Math.abs(i.diff)>2||Math.abs(i.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),d.length?t.push(...s,...d.map(n)):t.push("None.")}const r=e.nodes.filter(s=>s.sameMarkup!==void 0);if(r.length){const s=r.filter(n=>n.sameMarkup).length;t.push("",`Markup equal before and after: ${s} of ${r.length} (a hint; the pixels decide).`)}return t.join(`
1
+ import{migrateLegacyPageData as R}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as E}from"../../../format/lib/document/renamed-props.js";import{listToWrite as C,setStyleValues as D}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as L,bandPresetIndex as j}from"../../../format/lib/theme.js";import{convertSection as F,convertSectionsInPage as I,sectionToBoxRow as N,sectionToBoxTypes as H}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as W}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as M}from"./hero-ticker-to-strip.js";function J(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function se(e){const t=n=>typeof n=="string"?n:null,i=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:i,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const z=new Set([null,"authored"]);function B(e,t){const i=C(t),n=i.filter(o=>e.includes(o.id)&&o.values.letterCase===void 0).map(o=>o.id);return{list:n.reduce((o,d)=>D(o,d,{letterCase:"upper"}),i),changed:n.length>0}}function G(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return U(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!z.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:i,changed:n}=B(e.styles,t.textStyles?t.textStylesList??null:null);return n?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:i}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function U(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const n=i[e.page];if(!n)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(j(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=L(n);return{send:{kind:e.kind,page:e.page,index:i.length,preset:s,themePresets:[...i,s]}}}const O={Hero:M,HeroSingle:e=>{const t=W(e),i=M(t.node),n=s=>s in e.props;return{node:i.node,carried:[...t.carried,...i.carried.filter(s=>n(s.key))],dropped:[...t.dropped,...i.dropped.filter(s=>n(s.key))]}}};function Y(e,t){if(!t.length||!Array.isArray(e.content))return e;let i=!1;const n=e.content.map(s=>!s||!t.includes(s.type)?s:(i=!0,O[s.type](s).node));return i?{...e,content:n}:e}function P(e){const t=e?.content;return Array.isArray(t)?E(R(e)):e}function ne(e,t={}){const i=[...t.types??H()],n=i.filter(a=>!N(a)&&!(a in O)),s=new Set(i.filter(a=>a in O)),o=new Set(i.filter(a=>N(a))),d=[],l=[],p={},m={},T=new Map((t.sites??[]).map(a=>[`${a.schema}/${a.site}`,a])),x=new Map,c=(a,$,r)=>{const b=`${a.schema}/${a.site}`;let k=x.get(b);k||x.set(b,k={...a,facts:!!$,writes:[],undecided:[],notNeeded:[]});const u=G(r,$);if("send"in u){const y=k.writes.find(w=>JSON.stringify(w.write)===JSON.stringify(u.send));y?y.nodes+=1:k.writes.push({write:u.send,reason:r.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[S,f]="undecided"in u?[k.undecided,u.undecided]:[k.notNeeded,u.notNeeded],h=S.find(y=>y.kind===r.kind&&y.why===f);h?h.nodes+=1:S.push({kind:r.kind,why:f,nodes:1})};for(const a of e){const $=P(a.layout)?.content;Array.isArray($)&&$.forEach((r,b)=>{if(r&&typeof r.type=="string"&&s.has(r.type)){const g=O[r.type](r),_={page:a.label,index:b,type:r.type,id:String(r.props?.id??""),carried:g.carried,dropped:g.dropped};t.draw&&(_.before=t.draw(r),_.after=t.draw(g.node),_.sameMarkup=_.before===_.after),d.push(_);const A=p[r.type]??={nodes:0,pages:0,dropped:{}};A.nodes+=1,(m[r.type]??=new Set).add(a.label),A.pages=m[r.type].size;for(const v of g.dropped)A.dropped[v.key]=(A.dropped[v.key]??0)+1;return}if(!r||typeof r.type!="string"||!o.has(r.type))return;const k=N(r.type),u=J(a.label),S=u?T.get(`${u.schema}/${u.site}`):void 0,f=F(r,k,S?{site:S}:{});if(f.skipped!==void 0){l.push({page:a.label,index:b,type:r.type,id:String(r.props?.id??""),why:f.skipped});return}if(u)for(const g of f.siteWrites)c(u,S,g);const h={page:a.label,index:b,type:r.type,id:String(r.props?.id??""),carried:f.carried,dropped:f.dropped},y=t.draw;y&&(h.before=y(r),h.after=f.nodes.map(y).join(""),h.sameMarkup=h.before===h.after),d.push(h);const w=p[r.type]??={nodes:0,pages:0,dropped:{}};w.nodes+=1,(m[r.type]??=new Set).add(a.label),w.pages=m[r.type].size;for(const g of f.dropped)w.dropped[g.key]=(w.dropped[g.key]??0)+1})}return{types:i,noRow:n,pages:e.length,nodes:d,skipped:l,byType:p,sites:[...x.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(i=>{const n=`${t.schema}/${t.siteName(i.site)}/${i.slug}`;return[{label:`${n} (draft)`,layout:i.layout},{label:`${n} (published)`,layout:i.published_layout}]})}function re(e,t){const i=t.types.filter(s=>N(s)),n=t.types.filter(s=>s in O);return e.map(s=>{const o={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...o,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=P(s.layout),l=Array.isArray(d?.content)?d.content:[],p=[],m=[];for(const c of l){if(c&&n.includes(c.type)){p.push({type:c.type,id:String(c.props?.id??"")});continue}if(!c||!i.includes(c.type))continue;const a=String(c.props?.id??""),$=N(c.type).skip?.(c.props);$===void 0?p.push({type:c.type,id:a}):m.push({type:c.type,id:a,why:$})}if(!p.length)return{...o,converted:p,skipped:m};const T=I(d,i,t.site?{site:t.site}:{}),x=Y(T,n);return{...o,patch:{layout:x,expected_updated_at:s.layout_updated_at},converted:p,skipped:m}})}function oe(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}const V=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function de(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const o=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${o} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const o=n.get(s.type)??n.set(s.type,new Map).get(s.type);o.set(s.why,(o.get(s.why)??0)+1)}for(const[s,o]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[d,l]of o)t.push(`- ×${l}: ${d}`)}}for(const[n,s]of Object.entries(e.byType)){const o=Object.entries(s.dropped);if(!o.length)continue;t.push("",`## ${n} — dropped`,"");const d=new Map;for(const l of e.nodes)if(l.type===n)for(const p of l.dropped)d.set(p.key,p.why);for(const[l,p]of o)t.push(`- \`${l}\` ×${p}: ${d.get(l)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,o=n.facts?"yes":"NO";for(const d of n.writes)t.push(`| ${s} | ${o} | ${V(d.write)} | send | ${d.nodes} | ${d.reason} |`);for(const d of n.undecided)t.push(`| ${s} | ${o} | ${d.kind} | UNDECIDED | ${d.nodes} | ${d.why} |`);for(const d of n.notNeeded)t.push(`| ${s} | ${o} | ${d.kind} | not needed | ${d.nodes} | ${d.why} |`)}}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
2
2
  `)+`
3
- `}export{E as BODY_STYLE_PX_AT_DEFAULTS,O as HERO_MOVES,Z as bodyStyleRows,$e as dryRunMarkdown,he as dryRunSections,q as headingCaseList,fe as nearestTextStyle,ge as pageEdits,ue as pagesFromCliExport,ye as siteFactsFromRead,G as siteOfLabel,me as siteWritesFile};
3
+ `}export{O as HERO_MOVES,de as dryRunMarkdown,ne as dryRunSections,B as headingCaseList,re as pageEdits,ie as pagesFromCliExport,se as siteFactsFromRead,J as siteOfLabel,oe as siteWritesFile};
@@ -1 +1 @@
1
- import{convertSection as P,pressesAsBox as S,SECTION_TO_BOX_PRESS as _,sectionToBoxRow as l}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as k,presetFor as R}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as B}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{statsBoxSeed as T,statsPressSeed as d,statsSeedRows as C}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as L,logosPressStarter as N,paymentPressStarter as w}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{milestoneTimelinePressStarter as A,storyTimelinePressStarter as U}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as W}from"../../../format/lib/document/seed-parts.js";import{propsWithPartStyleValue as X}from"../../../render/lib/document/part-styles.js";import{isNodeList as m}from"efficient-easel/data";const D=Object.keys(B),E={Logos:N,DocMasthead:v,Timeline:U,TimelineTrack:A},G={PaymentBadges:w,PaymentLogosBlock:L};function u(t,r,e){const o={};for(const n of Object.keys(r(t.type)))o[n]=void 0;for(const[n,s]of Object.entries(t.props))o[n]=m(s)?s.map(p=>u(p,r,e)):s;return o.id=e(t.type),{type:t.type,props:o}}const O=t=>({...t?.theme?{theme:t.theme}:{},press:!0});function b(t,r,e=0,o=()=>({})){return(n,s,p)=>{const{nodes:i}=P({type:t,props:{...n(t),...o(),id:s(t)}},r,O(p));return u(i[e],n,s)}}const M={Stats:$,Cards:Y};function Y(){const t=l("Cards");if(!t)return null;const r=b("Cards",t,0,j);return(e,o,n)=>{const s=r(e,o,n);return{...s,props:{...s.props,name:"Cards section"}}}}function $(){const t=l("StatsParagraph");return t?(r,e,o)=>{const{nodes:n}=P({type:"StatsParagraph",props:{...r("StatsParagraph"),...d(),id:e("StatsParagraph")}},t,O(o)),s=n[0],p=m(s.props.content)?s.props.content.filter(f=>f.props?.cardStyle===void 0):[],i=x(T(C(),"table")),a=p.map(h),c=u({...s,props:{...s.props,content:[...a,i]}},r,e);return{...c,props:{...c.props,name:"Stats section"}}}:null}function h(t){if(t.props?.name==="Words"){const r=m(t.props.content)?t.props.content.map(H):t.props.content;return{...t,props:{...t.props,widthFitPhone:"fill",content:r}}}return m(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(h)}}:t}function H(t){return t.type!=="Text"?t:{...t,props:X({...t.props,alignTablet:"left"},"text","alignTablet","left")}}const x=t=>W([t],(r,e)=>`${r}-seed-${e}`)[0];function I(t,r){if(!S(t,r))return null;const e=M[t];if(e)return e();const o=l(t);return o?b(t,o,0,E[t]??G[t]):null}function V(t){return(r,e,o)=>{const n=s=>{if(s.type==="Stats"){const a=u(x(T([],"list")),r,e);return{...a,props:{...a.props,name:"Numbers"}}}let p=!1;const i={};for(const[a,c]of Object.entries(s.props))if(m(c)){const f=c.map(n);p||=f.some((y,g)=>y!==c[g]),i[a]=f}else i[a]=c;return p?{type:s.type,props:i}:s};return n(t(r,e,o))}}function ot(t,r=_){const e=R(t);return e?V(e):I(t,r)}function nt(){return[...Object.keys(k),...D.filter(t=>S(t)),...Object.keys(E).filter(t=>S(t))]}export{E as MERGE_LAYOUTS,D as TEXT_LAYOUTS,b as conversionPreset,ot as layoutPresetFor,nt as layoutTypes};
1
+ import{convertSection as T,pressesAsBox as f,SECTION_TO_BOX_PRESS as _,sectionToBoxRow as P}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as x,presetFor as k}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as B,TEXT_PRESS_STARTERS as C}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{SECTION_CATALOG as g}from"../../../format/lib/document/section-catalog.js";import{statsBoxSeed as l,statsPressSeed as L,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as w,logosPressStarter as A,paymentPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as X}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{tabBarPressStarter as D}from"../../../render/lib/document/blocks/general/section-to-box-rows-tabbar.js";import{milestoneTimelinePressStarter as G,storyTimelinePressStarter as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as U}from"../../../format/lib/document/seed-parts.js";import{isNodeList as u}from"efficient-easel/data";const M=Object.keys(B),E={Logos:A,DocMasthead:X,DocTabs:D,Timeline:I,TimelineTrack:G},W={PaymentBadges:j,PaymentLogosBlock:w};function S(t,s,r){const o={};for(const n of Object.keys(s(t.type)))o[n]=void 0;for(const[n,e]of Object.entries(t.props))o[n]=u(e)?e.map(p=>S(p,s,r)):e;return o.id=r(t.type),{type:t.type,props:o}}const O=t=>({...t?.theme?{theme:t.theme}:{},press:!0});function b(t,s,r=0,o=()=>({})){return(n,e,p)=>{const{nodes:c}=T({type:t,props:{...n(t),...o(),id:e(t)}},s,O(p));return S(c[r],n,e)}}const Y={Stats:H,Cards:$};function $(){const t=P("Cards");if(!t)return null;const s=b("Cards",t,0,v);return(r,o,n)=>{const e=s(r,o,n);return{...e,props:{...e.props,name:"Cards section"}}}}function H(){const t=P("StatsParagraph");return t?(s,r,o)=>{const{nodes:n}=T({type:"StatsParagraph",props:{...s("StatsParagraph"),...L(),id:r("StatsParagraph")}},t,O(o)),e=n[0],p=u(e.props.content)?e.props.content.filter(m=>m.props?.cardStyle===void 0):[],c=y(l(N(),"table")),i=p.map(h),a=S({...e,props:{...e.props,content:[...i,c]}},s,r);return{...a,props:{...a.props,name:"Stats section"}}}:null}function h(t){return t.props?.name==="Words"?{...t,props:{...t.props,widthFitPhone:"fill"}}:u(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(h)}}:t}const y=t=>U([t],(s,r)=>`${s}-seed-${r}`)[0];function q(t,s){if(!f(t,s))return null;const r=Y[t];if(r)return r();const o=P(t);return o?b(t,o,0,E[t]??C[t]??W[t]):null}function z(t){return(s,r,o)=>{const n=e=>{if(e.type==="Stats"){const i=S(y(l([],"list")),s,r);return{...i,props:{...i.props,name:"Numbers"}}}let p=!1;const c={};for(const[i,a]of Object.entries(e.props))if(u(a)){const m=a.map(n);p||=m.some((d,R)=>d!==a[R]),c[i]=m}else c[i]=a;return p?{type:e.type,props:c}:e};return n(t(s,r,o))}}function ct(t,s=_){const r=k(t);return r?z(r):q(t,s)}const J=t=>g.some(s=>s.key==="structure"&&s.sections.some(r=>r.type===t));function it(){return[...Object.keys(x),...M.filter(t=>f(t)&&!J(t)),...Object.keys(E).filter(t=>f(t))]}export{E as MERGE_LAYOUTS,M as TEXT_LAYOUTS,b as conversionPreset,ct as layoutPresetFor,it as layoutTypes};
@@ -7,6 +7,8 @@ export declare const COUNTS_SOURCE = "counts";
7
7
  export declare const LOCATION_PAYMENT_METHODS_SOURCE = "location-payment-methods";
8
8
  export declare const SHOP_PAYMENT_METHODS_SOURCE = "shop-payment-methods";
9
9
  export declare const DELIVERY_OPTIONS_SOURCE = "delivery-options";
10
+ export declare const BLOG_CATEGORIES_SOURCE = "blog-categories";
11
+ export declare const DEALERS_SOURCE = "dealers";
10
12
  export type SourceRow = Readonly<Record<string, string>>;
11
13
  export interface SourceChoice {
12
14
  key: string;
@@ -44,6 +46,7 @@ export interface SourceEditAction {
44
46
  open: () => void;
45
47
  }
46
48
  export declare function isSourceEditAction(link: SourceEditLink | SourceEditAction): link is SourceEditAction;
49
+ export declare function isBlockSourceKey(value: unknown): value is string;
47
50
  export declare function registerBlockSources(sources: readonly BlockSourceSpec[]): void;
48
51
  export declare function blockSources(block?: string): readonly BlockSourceSpec[];
49
52
  export declare function blockSourceSpec(key: string): BlockSourceSpec | null;
@@ -1 +1 @@
1
- import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";import{slotFieldBlocks as f}from"./slot-field-blocks.js";const p="dataSource",g="dataSourceOptions",u="dataRows",w="countKey",A="counts",C="location-payment-methods",P="shop-payment-methods",v="delivery-options";function y(e){return typeof e.open=="function"}const m=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function n(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const d=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),b=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),l=e=>typeof e=="string"&&e.trim()!=="";function h(e){if(!e||!l(e.label))return null;if(y(e))return{label:e.label.trim(),open:e.open};const t=e.href;return l(t)?{label:e.label.trim(),href:t.trim()}:null}function k(e){if(typeof e.key!="string"||!m.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=e.blocks.find(r=>f().has(r));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);const o=h(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>i(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(d)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(b).map(r=>({...r}))}:{},...o?{edit:o}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(r=>typeof r=="string"&&r.trim()!=="").map(r=>r.trim())}:{}}}function T(e){const t=e.map(k),o=n();for(const r of t)o.sources.set(r.key,r);t.length&&(o.revision+=1)}function U(e){const t=[...n().sources.values()];return e===void 0?t:t.filter(o=>o.blocks.includes(e))}function O(e){return n().sources.get(e)??null}function N(e){return n().sources.get(e)?.choices??[]}function B(){return n().revision}function S(e){const t=e?.[p];return typeof t=="string"?t.trim():""}function i(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[o,r]of Object.entries(e)){const s=a(r);s&&(t[o]=s)}return Object.keys(t).length?t:null}function E(e){const t=e?.[u];return Array.isArray(t)?t.map(i).filter(o=>o!==null):null}function K(e,t,o=[]){const r=E(e);if(r!==null&&(r.length||!t))return{rows:r,sample:!1};if(!t)return{rows:[],sample:!1};const s=O(S(e))?.sample;return{rows:s?.length?s:o,sample:!0}}export{g as BLOCK_SOURCE_OPTIONS_PROP,p as BLOCK_SOURCE_PROP,u as BLOCK_SOURCE_ROWS_PROP,A as COUNTS_SOURCE,w as COUNT_KEY_PROP,v as DELIVERY_OPTIONS_SOURCE,C as LOCATION_PAYMENT_METHODS_SOURCE,P as SHOP_PAYMENT_METHODS_SOURCE,O as blockSourceSpec,U as blockSources,B as blockSourcesRevision,S as declaredBlockSource,y as isSourceEditAction,T as registerBlockSources,E as servedRows,N as sourceChoices,K as sourcedRows};
1
+ import{globalRegistry as f}from"../global-registry.js";import{nonEmptyString as p}from"../non-empty-string.js";import{slotFieldBlocks as u}from"./slot-field-blocks.js";const y="dataSource",w="dataSourceOptions",d="dataRows",A="countKey",U="counts",P="location-payment-methods",T="shop-payment-methods",v="delivery-options",B="blog-categories",m="dealers";function b(e){return typeof e.open=="function"}const l=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function L(e){return typeof e=="string"&&l.test(e)}const i=new Set([m]);function n(){return f("efficient.block-sources",()=>({sources:new Map,revision:0}))}const O=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),k=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),c=e=>typeof e=="string"&&e.trim()!=="";function h(e){if(!e||!c(e.label))return null;if(b(e))return{label:e.label.trim(),open:e.open};const t=e.href;return c(t)?{label:e.label.trim(),href:t.trim()}:null}function S(e){if(typeof e.key!="string"||!l.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(o=>typeof o!="string"||!o))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=e.blocks.find(o=>u().has(o));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);const r=h(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(o=>a(o)).filter(o=>o!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(O)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(k).map(o=>({...o}))}:{},...r?{edit:r}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(o=>typeof o=="string"&&o.trim()!=="").map(o=>o.trim())}:{}}}function N(e){const t=e.map(S),r=n();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function K(e){const t=[...n().sources.values()],r=[...t.filter(o=>!i.has(o.key)),...t.filter(o=>i.has(o.key))];return e===void 0?r:r.filter(o=>o.blocks.includes(e))}function E(e){return n().sources.get(e)??null}function I(e){return n().sources.get(e)?.choices??[]}function $(){return n().revision}function R(e){const t=e?.[y];return typeof t=="string"?t.trim():""}function a(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const s=p(o);s&&(t[r]=s)}return Object.keys(t).length?t:null}function _(e){const t=e?.[d];return Array.isArray(t)?t.map(a).filter(r=>r!==null):null}function D(e,t,r=[]){const o=_(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const s=E(R(e))?.sample;return{rows:s?.length?s:r,sample:!0}}export{w as BLOCK_SOURCE_OPTIONS_PROP,y as BLOCK_SOURCE_PROP,d as BLOCK_SOURCE_ROWS_PROP,B as BLOG_CATEGORIES_SOURCE,U as COUNTS_SOURCE,A as COUNT_KEY_PROP,m as DEALERS_SOURCE,v as DELIVERY_OPTIONS_SOURCE,P as LOCATION_PAYMENT_METHODS_SOURCE,T as SHOP_PAYMENT_METHODS_SOURCE,E as blockSourceSpec,K as blockSources,$ as blockSourcesRevision,R as declaredBlockSource,L as isBlockSourceKey,b as isSourceEditAction,N as registerBlockSources,_ as servedRows,I as sourceChoices,D as sourcedRows};
@@ -35,6 +35,7 @@ export declare function boxIsCard(props: {
35
35
  bgImage?: unknown;
36
36
  [BOX_ROW_IMAGE_PROP]?: unknown;
37
37
  } | null | undefined): boolean;
38
+ export declare function boxNamesRowPicture(props: object | null | undefined): boolean;
38
39
  export declare function boxCardProps<P extends object>(props: P, inCopy: boolean): P;
39
40
  export declare function boxRowPicture(props: Record<string, unknown> | null | undefined, row: SourceRow | null | undefined): string | null;
40
41
  export declare function boxDarkenStyle(darken: unknown, style?: unknown): CSSProperties | null;
@@ -1 +1 @@
1
- import{parseHexColor as O}from"efficient-shell/format";import{fillColorRole as y}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as u}from"./box-card-rule.js";import{namedRowField as f,rowFieldText as S}from"./card-template.js";import{fillInkCss as C,fillSlotNamed as P,inkTokenOf as A,partColourName as F}from"../document/part-inks.js";import{scrim as p}from"./scrim.js";import{viewVarSplit as h}from"./view-var-split.js";const w="sf-card",g={min:0,max:100,step:5,fallback:0,unit:"%"},T=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],B="68%",H={desktop:20,phone:20,side:40,sidePhone:24},j="sf-box-sides",K={min:0,max:200,step:10};function D(t){return typeof t=="string"&&t.trim()!==""}function Y(t){return D(typeof t?.bgImage=="string"?t.bgImage:null)||f(t,u)!==""}function z(t,e){return e||f(t,u)===""?t:{...t,[u]:""}}function G(t,e){const o=S(e,f(t,u))?.trim();return o||null}function _(t,e){const n=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(n)||n<=0)return null;const s=(Math.min(g.max,Math.max(g.min,n))/100).toFixed(2);return e!=="bottom"?{background:p(Number(s))}:{background:`linear-gradient(0deg, ${p(Number(s))} 0%, ${p(0)} ${B})`}}const k=t=>typeof t=="string"?O(t.trim()):null,d=t=>{const e=k(t);if(e!==null||typeof t!="string")return e;const n=t.trim();return n&&!n.startsWith("#")&&C(n)||null},J=t=>{if(typeof t!="string")return null;const e=y(F(t.trim()));return e?.kind==="slot"?e.slot:null},E="swatch";function U(t,e){if(!e)return null;const n=S(e,f(t,E)),o=P(n);return k(n)??(o&&A(o)||null)}const I={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function q(t,e,n){return h(I,d(t),d(e),d(n))}const N={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function Q(t){const e=_(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const n=(r,m)=>String(_(r,m)?.background??"none"),o=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,s=r=>T.some(m=>m.value===r)?r:void 0,[l,i,a,c]=[o(t.darkenTablet),s(t.darkenStyleTablet),o(t.darkenPhone),s(t.darkenStylePhone)],b=l??t.darken,x=i??t.darkenStyle;return h(N,String(e.background),l!==void 0||i!==void 0?n(b,x):null,a!==void 0||c!==void 0?n(a??b,c??x):null)}function Z(t,e){const n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,s]=n[t]??n.center,[l,i]=e==="column"?[s,o]:[o,s],a={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${a[l]} ${c[i]}`}export{H as BOX_CARD_PAD,K as BOX_CARD_SIDE,g as BOX_DARKEN,T as BOX_DARKEN_STYLES,I as BOX_FILL_VIEWS,j as BOX_OWNS_SIDES_CLASS,E as BOX_SWATCH_PROP,N as BOX_WASH_VIEWS,w as CARD_SHADOW_CLASS,z as boxCardProps,_ as boxDarkenStyle,k as boxFillOf,J as boxFillSlot,q as boxFillViews,Y as boxIsCard,d as boxPaintOf,Z as boxPlacementClasses,G as boxRowPicture,U as boxSwatchFill,Q as boxWashViews,D as isBackgroundBox};
1
+ import{parseHexColor as y}from"efficient-shell/format";import{fillColorRole as C}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as f}from"./box-card-rule.js";import{namedRowField as m,rowFieldText as S}from"./card-template.js";import{fillInkCss as P,fillSlotNamed as A,inkTokenOf as F,partColourName as N}from"../document/part-inks.js";import{scrim as p}from"./scrim.js";import{viewVarSplit as h}from"./view-var-split.js";const H="sf-card",g={min:0,max:100,step:5,fallback:0,unit:"%"},T=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],B="68%",j={desktop:20,phone:20,side:40,sidePhone:24},K="sf-box-sides",Y={min:0,max:200,step:10};function D(t){return typeof t=="string"&&t.trim()!==""}function z(t){return D(typeof t?.bgImage=="string"?t.bgImage:null)||_(t)}function _(t){return m(t,f)!==""}function G(t,e){return e||!_(t)?t:{...t,[f]:""}}function J(t,e){const o=S(e,m(t,f))?.trim();return o||null}function k(t,e){const n=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(n)||n<=0)return null;const s=(Math.min(g.max,Math.max(g.min,n))/100).toFixed(2);return e!=="bottom"?{background:p(Number(s))}:{background:`linear-gradient(0deg, ${p(Number(s))} 0%, ${p(0)} ${B})`}}const O=t=>typeof t=="string"?y(t.trim()):null,d=t=>{const e=O(t);if(e!==null||typeof t!="string")return e;const n=t.trim();return n&&!n.startsWith("#")&&P(n)||null},U=t=>{if(typeof t!="string")return null;const e=C(N(t.trim()));return e?.kind==="slot"?e.slot:null},E="swatch";function q(t,e){if(!e)return null;const n=S(e,m(t,E)),o=A(n);return O(n)??(o&&F(o)||null)}const I={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function Q(t,e,n){return h(I,d(t),d(e),d(n))}const R={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function Z(t){const e=k(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const n=(r,u)=>String(k(r,u)?.background??"none"),o=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,s=r=>T.some(u=>u.value===r)?r:void 0,[l,i,a,c]=[o(t.darkenTablet),s(t.darkenStyleTablet),o(t.darkenPhone),s(t.darkenStylePhone)],b=l??t.darken,x=i??t.darkenStyle;return h(R,String(e.background),l!==void 0||i!==void 0?n(b,x):null,a!==void 0||c!==void 0?n(a??b,c??x):null)}function v(t,e){const n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,s]=n[t]??n.center,[l,i]=e==="column"?[s,o]:[o,s],a={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${a[l]} ${c[i]}`}export{j as BOX_CARD_PAD,Y as BOX_CARD_SIDE,g as BOX_DARKEN,T as BOX_DARKEN_STYLES,I as BOX_FILL_VIEWS,K as BOX_OWNS_SIDES_CLASS,E as BOX_SWATCH_PROP,R as BOX_WASH_VIEWS,H as CARD_SHADOW_CLASS,G as boxCardProps,k as boxDarkenStyle,O as boxFillOf,U as boxFillSlot,Q as boxFillViews,z as boxIsCard,_ as boxNamesRowPicture,d as boxPaintOf,v as boxPlacementClasses,J as boxRowPicture,q as boxSwatchFill,Z as boxWashViews,D as isBackgroundBox};
@@ -1,3 +1,14 @@
1
+ export declare function linkOpensElsewhere(href: string, ownHost?: string | null): boolean;
2
+ export declare function siteLinkDraws(href: string): boolean;
3
+ export declare function isWebAddress(href: string): boolean;
4
+ export declare const NEW_TAB_ATTRS: {
5
+ readonly target: "_blank";
6
+ readonly rel: "noopener noreferrer";
7
+ };
8
+ export declare function linkTargetAttrs(href: string, ownHost?: string | null): {
9
+ target?: "_blank";
10
+ rel?: string;
11
+ };
1
12
  export declare function boxLinkOf(value: unknown): string;
2
13
  export declare const BOX_LINK_ATTR = "data-sf-box-link";
3
14
  export declare const BOX_LINK_CLASS = "absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent";
@@ -1,13 +1,13 @@
1
- import{anchorSlug as a}from"./anchor-name.js";function f(t){return typeof t=="string"?t.trim():""}const b="data-sf-box-link",v="absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",x="relative isolate pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_textarea]:pointer-events-auto [&_label]:pointer-events-auto [&_summary]:pointer-events-auto [&_iframe]:pointer-events-auto [&_video]:pointer-events-auto [&_audio]:pointer-events-auto [&_[role=button]]:pointer-events-auto [&_[tabindex]:not([tabindex='-1'])]:pointer-events-auto",u="data-sf-box-jump";function c(t){return`sf-box-jump-${t}`}function $(t,o){return t===!0?a(o):""}function p({box:t,lit:o,first:n}){const e=r=>r.join(`,
2
- `),i=n(t),s=o.flatMap(n);return`
1
+ import{anchorSlug as u}from"./anchor-name.js";function c(t,e){const n=t.trim();if(!a(n))return!1;if(!e)return!0;let o;try{o=new URL(n,"https://x.invalid").host}catch{return!1}const r=i=>i.toLowerCase().replace(/^www\./,"");return r(o)!==r(e)}function _(t){return t.startsWith("/")||a(t)}function a(t){return/^(?:https?:)?\/\//i.test(t.trim())}const p=Object.freeze({target:"_blank",rel:"noopener noreferrer"});function v(t,e){return c(t,e)?{...p}:{}}function $(t){return typeof t=="string"?t.trim():""}const m="data-sf-box-link",d="absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",h="relative isolate pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_textarea]:pointer-events-auto [&_label]:pointer-events-auto [&_summary]:pointer-events-auto [&_iframe]:pointer-events-auto [&_video]:pointer-events-auto [&_audio]:pointer-events-auto [&_[role=button]]:pointer-events-auto [&_[tabindex]:not([tabindex='-1'])]:pointer-events-auto",l="data-sf-box-jump";function f(t){return`sf-box-jump-${t}`}function g(t,e){return t===!0?u(e):""}function x({box:t,lit:e,first:n}){const o=s=>s.join(`,
2
+ `),r=n(t),i=e.flatMap(n);return`
3
3
  ${t} {
4
4
  outline: 2px solid transparent;
5
5
  outline-offset: -2px;
6
6
  transition: outline-color 600ms ease-out;
7
7
  }
8
- ${e(i)} { transition: background-color 600ms ease-out; }
9
- ${e(i.map(r=>`${r} *`))} { transition: color 600ms ease-out; }
10
- ${e(o)} { outline-color: var(--accent); }
11
- ${e(s)} { background-color: var(--accent); }
12
- ${e([...s,...s.map(r=>`${r} *`)])} { color: var(--bg) !important; }
13
- `}function _(t){const o=`[${u}="${t}"]`,n=`.${c(t)}`,e=`[id="${t}"]:target`;return p({box:o,lit:[`${e}~${o}`,`${e}~* ${o}`],first:i=>[`${i} ${n}>:first-child:not(.sf-section-anchor)`,`${i} ${n}>.sf-section-anchor:first-child+*`]})}export{u as BOX_JUMP_ATTR,x as BOX_LINKED_CLASS,b as BOX_LINK_ATTR,v as BOX_LINK_CLASS,c as boxJumpBlocksClass,_ as boxJumpCss,$ as boxJumpSlug,f as boxLinkOf,p as jumpHighlightCss};
8
+ ${o(r)} { transition: background-color 600ms ease-out; }
9
+ ${o(r.map(s=>`${s} *`))} { transition: color 600ms ease-out; }
10
+ ${o(e)} { outline-color: var(--accent); }
11
+ ${o(i)} { background-color: var(--accent); }
12
+ ${o([...i,...i.map(s=>`${s} *`)])} { color: var(--bg) !important; }
13
+ `}function k(t){const e=`[${l}="${t}"]`,n=`.${f(t)}`,o=`[id="${t}"]:target`;return x({box:e,lit:[`${o}~${e}`,`${o}~* ${e}`],first:r=>[`${r} ${n}>:first-child:not(.sf-section-anchor)`,`${r} ${n}>.sf-section-anchor:first-child+*`]})}export{l as BOX_JUMP_ATTR,h as BOX_LINKED_CLASS,m as BOX_LINK_ATTR,d as BOX_LINK_CLASS,p as NEW_TAB_ATTRS,f as boxJumpBlocksClass,k as boxJumpCss,g as boxJumpSlug,$ as boxLinkOf,a as isWebAddress,x as jumpHighlightCss,c as linkOpensElsewhere,v as linkTargetAttrs,_ as siteLinkDraws};
@@ -2,10 +2,8 @@ import type { SlotCell } from "efficient-easel/render";
2
2
  export declare const BOX_PHONE_PLACE_CLASS = "max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]";
3
3
  export declare const BOX_PHONE_PLACE_TABLET_CLASS = "max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]";
4
4
  export declare const BOX_PHONE_PLACE_CANVAS_CLASS = "max-view-wide:order-[var(--sf-phone-place)]";
5
- export declare const BOX_PHONE_PLACE_CANVAS_TABLET_CLASS = "max-view-wide:order-[var(--sf-phone-place)]";
6
5
  export declare const BOX_CELL_CLASS = "contents [&>*]:grow-[inherit] [&>[data-sf-box-items]>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>[data-sf-box-items]>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>[data-sf-box-items]>*]:basis-[inherit] [&>*]:min-w-[inherit] [&>[data-sf-box-items]>*]:min-w-[inherit]";
7
6
  export declare function boxPhoneOrder(value: unknown, ids: readonly string[]): string[] | undefined;
8
7
  export declare function boxPhoneCell(order: readonly string[] | undefined, { editing }: {
9
- tabletKeepsRow?: boolean;
10
8
  editing: boolean;
11
9
  }): ((id: string) => SlotCell) | undefined;
@@ -1 +1 @@
1
- import{readPhoneOrderIds as a}from"efficient-easel/data";const o="max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]",x=o,s="max-view-wide:order-[var(--sf-phone-place)]",A=s,h="contents [&>*]:grow-[inherit] [&>[data-sf-box-items]>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>[data-sf-box-items]>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>[data-sf-box-items]>*]:basis-[inherit] [&>*]:min-w-[inherit] [&>[data-sf-box-items]>*]:min-w-[inherit]",_="unnamed:";function c(e,r){const n=Array.isArray(e)?e.filter(t=>!(typeof t=="string"&&t.startsWith(_))):e;return a(n,r)}function f(e,{editing:r}){if(!e)return;const n=r?s:`${h} ${o}`;return t=>{const i=e.indexOf(t);return{className:n,style:{"--sf-phone-place":i<0?e.length:i}}}}export{h as BOX_CELL_CLASS,s as BOX_PHONE_PLACE_CANVAS_CLASS,A as BOX_PHONE_PLACE_CANVAS_TABLET_CLASS,o as BOX_PHONE_PLACE_CLASS,x as BOX_PHONE_PLACE_TABLET_CLASS,f as boxPhoneCell,c as boxPhoneOrder};
1
+ import{readPhoneOrderIds as s}from"efficient-easel/data";const o="max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]",x=o,a="max-view-wide:order-[var(--sf-phone-place)]",h="contents [&>*]:grow-[inherit] [&>[data-sf-box-items]>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>[data-sf-box-items]>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>[data-sf-box-items]>*]:basis-[inherit] [&>*]:min-w-[inherit] [&>[data-sf-box-items]>*]:min-w-[inherit]",d="unnamed:";function c(e,r){const n=Array.isArray(e)?e.filter(t=>!(typeof t=="string"&&t.startsWith(d))):e;return s(n,r)}function p(e,{editing:r}){if(!e)return;const n=r?a:`${h} ${o}`;return t=>{const i=e.indexOf(t);return{className:n,style:{"--sf-phone-place":i<0?e.length:i}}}}export{h as BOX_CELL_CLASS,a as BOX_PHONE_PLACE_CANVAS_CLASS,o as BOX_PHONE_PLACE_CLASS,x as BOX_PHONE_PLACE_TABLET_CLASS,p as boxPhoneCell,c as boxPhoneOrder};
@@ -1 +1 @@
1
- const o="sideSpace",e="site",s=[{value:"box",label:"Box"},{value:e,label:"Site"}],n="box",S="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. It has no effect when Content is Full width.";function i(t){return t===e?e:"box"}function x(t){return t===e?e:void 0}export{n as BOX_SIDE_SPACE_DEFAULT,S as BOX_SIDE_SPACE_HINT,s as BOX_SIDE_SPACE_OPTIONS,o as BOX_SIDE_SPACE_PROP,e as BOX_SIDE_SPACE_SITE,i as boxSideSpaceOf,x as boxSideSpaceWrite};
1
+ import{SITE_SIDE as o}from"efficient-easel/screen/lib/content/length-units";const n="sideSpace",e=o,S=[{value:"box",label:"Box"},{value:e,label:"Site"}],i="box",p="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. It has no effect when Content is Full width.";function x(t){return t===e?e:"box"}function _(t){return t===e?e:void 0}export{i as BOX_SIDE_SPACE_DEFAULT,p as BOX_SIDE_SPACE_HINT,S as BOX_SIDE_SPACE_OPTIONS,n as BOX_SIDE_SPACE_PROP,e as BOX_SIDE_SPACE_SITE,x as boxSideSpaceOf,_ as boxSideSpaceWrite};
@@ -1,5 +1,9 @@
1
+ import { type LengthRow } from "efficient-easel/screen/lib/content/length-units";
1
2
  import { CORNER_RADIUS_MAX, CORNER_RADIUS_MIN } from "../theme.js";
2
3
  export { CORNER_RADIUS_MAX, CORNER_RADIUS_MIN };
3
4
  export declare const CARD_IMAGE_RADIUS_STEP = 1;
5
+ export declare const CARD_IMAGE_UNIT_KEY = "cardImageUnit";
6
+ export declare const CARD_IMAGE_RADIUS_ROW: LengthRow;
7
+ export declare const CARD_IMAGE_PX_ROW: LengthRow;
4
8
  export declare function normalizeCardImageRadius(v?: number | string | null): number | null;
5
- export declare function cardImageShapeTokens(v?: number | string | null): Record<string, string>;
9
+ export declare function cardImageShapeTokens(v?: number | string | null, unit?: unknown): Record<string, string>;
@@ -1 +1 @@
1
- import{CORNER_RADIUS_MAX as o,CORNER_RADIUS_MIN as n,normalizeCornerRadius as a}from"../theme.js";const i=1;function t(r){return a(r)}function p(r){const e=t(r);return e===null?{}:{"--sf-card-image-radius":`${e}px`}}export{i as CARD_IMAGE_RADIUS_STEP,o as CORNER_RADIUS_MAX,n as CORNER_RADIUS_MIN,p as cardImageShapeTokens,t as normalizeCardImageRadius};
1
+ import{isLengthUnit as t}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as i}from"../finite-number.js";import{cssLengthOf as a}from"./css-length.js";import{CORNER_RADIUS_MAX as s,CORNER_RADIUS_MIN as m,normalizeCornerRadius as R}from"../theme.js";const I=1,_="cardImageUnit",f={kind:"radius",unitKey:_},x={kind:"radius"};function d(r){return R(r)}function C(r,e){if(t(e)&&e!=="px"){const n=i(r);return n!==void 0&&n>=0?{"--sf-card-image-radius":a(n,e)}:{}}const o=d(r);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}export{x as CARD_IMAGE_PX_ROW,f as CARD_IMAGE_RADIUS_ROW,I as CARD_IMAGE_RADIUS_STEP,_ as CARD_IMAGE_UNIT_KEY,s as CORNER_RADIUS_MAX,m as CORNER_RADIUS_MIN,C as cardImageShapeTokens,d as normalizeCardImageRadius};
@@ -92,6 +92,7 @@ export declare function rowPartByKey(type: string, props: Record<string, unknown
92
92
  export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
93
93
  export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
94
94
  export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
95
+ export declare function rowLinkText(row: SourceRow | null | undefined, key: string): string | undefined;
95
96
  export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[], slot?: string): Record<string, unknown>;
96
97
  type DocNode = {
97
98
  type?: unknown;
@@ -1 +1 @@
1
- import{blockSources as E,blockSourceSpec as w,declaredBlockSource as T}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{isNodeList as I}from"efficient-easel/data";import{BOX_TYPE as F}from"../document/container-blocks.js";import{globalRegistry as P}from"../global-registry.js";import{nonEmptyString as B}from"../non-empty-string.js";import{accentItalicRuns as D}from"../markup.js";import{withCardsTemplate as v}from"../document/cards-template-on-read.js";import{withCardListTemplate as W}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as M,withArticleBodyTemplate as N}from"../document/article-body-seed.js";import{withLogosTemplate as K}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as j}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintSideTemplate as H}from"../document/blocks/general/Footprint/card-seed.js";const L="template",Y="Card template",m="CardList",S=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",$="rowLinkField";function he(){return{type:"slot",allow:[...S]}}const U=S.filter(e=>e!=="ButtonBlock"),O="items",R="itemFields";function Be(){return{type:"slot",allow:[...U]}}const Q=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>j(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>H(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>v("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:m,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>K(e)},{block:m,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:O,seed:e=>W(e)},{block:M,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>N(e)}];function f(){return P("efficient.card-templates",()=>new Map(Q.map(e=>[e.block,e])))}function Le(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const o=[];for(const r of t.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${t.block} names an empty block.`);o.some(l=>l.type===r.type)||o.push({type:r.type,label:r.label||r.type})}const n=[];for(const r of t.slots??[]){if(typeof r?.slot!="string"||!r.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=B(r.label),c=Array.isArray(r.fields)?{fields:r.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===r.slot)||n.push({slot:r.slot,...l?{label:l}:null,...c})}const s=n.some(r=>r.fields);if(s&&(t.fields.some(r=>r.everySource)||E(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=B(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(r=>({...r})),blocks:o,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function q(e,t){const o=e?f().get(e)?.seed:void 0;return o?o(t):t}function Se(e,t){const o=X(e),n=(o.length?o:[L]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,r=i?i(s):q(e,s);return r===s?t:r}function Oe(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Re(e){return f().get(e)?.blocks??[]}function Ae(e){for(const t of f().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function Ce(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function _e(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ee(e){return typeof e=="string"&&f().has(e)}const V=[{slot:L}];function y(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??V:[]}function X(e){return y(e).map(t=>t.slot)}function z(e,t){return y(e).some(o=>o.slot===t)}function Ie(e,t){const o=y(e).find(n=>n.slot===t);return o?o.label??Y:null}function b(e,t){return t?y(e).find(o=>o.slot===t)?.fields:void 0}function G(e,t){const o=f().get(e)?.fields??[];return t?o.filter(n=>(n.kind??"text")===t):o}function J(e,t){if(typeof e!="string")return"";const o=b(e,t);return(o?o.filter(n=>n.kind==="list"):G(e,"list"))[0]?.key??""}function Z(e,t,o){return x(e)||J(t,o)}function A(e,t,o){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=b(n,o);if(s)return t?s.filter(c=>(c.kind??"text")===t):s;const i=f().get(n)?.fields??[],r=w(T(e?.props))?.fields,l=r?.length?[...r.map(c=>({...c})),...i.filter(c=>c.everySource&&!r.some(a=>a.key===c.key))]:i;return t?l.filter(c=>(c.kind??"text")===t):l}function ee(e,t,o,n){if(!e)return null;const s=b(e,n);return s?s.find(i=>i.key===t)??null:o?A(o).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function C(e,t){return!e||!t?null:e.fields?.find(o=>o.key===t)??ee(e.ownerType,t,e.owner,e.slot)}function Fe(e,t){return C(e,t)?.plain===!0}function x(e,t=p){const o=e?.[t];return typeof o=="string"?o.trim():""}function Pe(e,t){return e.key||String(t+1)}function De(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[o,n]of Object.entries(e))typeof n=="string"&&(t[o]=n);return t}const te="hideWhenRowEmpty";function ve(e,t){const o=e[te];return!t||!Array.isArray(o)||!o.length?!1:o.every(n=>typeof n!="string"||!t[n]?.trim())}const g={Text:{text:p},ImageBlock:{src:p},ButtonBlock:{label:p,href:$},LogoBlock:{alt:p},Breadcrumb:{currentCrumb:p}},We=g,oe=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Me(e,t,o){return re(e,t,o)&&!oe.has(`${e}.${o}`)}function re(e,t,o){return ne(e,t,o)!==""}function ne(e,t,o){const n=g[e]?.[o];return n?x(t,n):""}function le(e,t){return!t||!e?null:e[t]??""}function Ne(e,t,o,n,s,i){if(!o)return t;let r=null;for(const[l,c]of Object.entries(g[e]??{})){const a=x(t,c),u=le(o,a);u!==null&&(r??={...t},r[l]=C({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?D(u):u)}return r??t}function k(e,t){const o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const n=(i,r)=>{for(const l of i){if(l?.props?.id===t)return r;for(const[c,a]of Object.entries(l?.props??{})){if(!I(a))continue;const u=z(l.type,c)?{owner:l,slot:c,direct:!0,nested:r!==null,underBox:!1}:r&&{owner:r.owner,slot:r.slot,direct:!1,nested:r.nested,underBox:r.underBox||l.type===F},d=n(a,u);if(d!==void 0)return d}}},s=n(o,null);return s===void 0?null:s}function se(e,t){const o=k(e,t);return o&&o.owner}function ie(e,t){const o=k(e,t);return o&&o.slot}function Ke(e,t){const o=k(e,t);return o&&(o.direct?o.owner:null)}function je(e,t){const o=k(e,t);if(o!==void 0)return o===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:o.nested,underBox:o.underBox}}function He(e,t,o){if(t?.type!==m)return[];const n=se(e,t.props?.id);if(!n){const l=w(T(t.props))?.fields,c=l?.length?l.map(d=>({...d})):ce(t.props),a=(f().get(m)?.fields??[]).filter(d=>d.everySource&&!c.some(_=>_.key===d.key)),u=[...c,...a];return o?u.filter(d=>(d.kind??"text")===o):u}const s=ie(e,t.props?.id)??void 0,i=Z(t.props,n.type,s),r=i&&A(n,"list",s).find(l=>l.key===i)?.fields||[];return o?r.filter(l=>(l.kind??"text")===o):r}function Ye(e,t){return{[p]:"",[O]:e.map(o=>({...o})),[R]:t.map(o=>({...o}))}}function ce(e,t){const o=e?.[R];if(!Array.isArray(o))return[];const n=o.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:r,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof r!="string")return[];const d=l==="image"||l==="link"||l==="colour"?l:void 0;return[{key:i,label:r,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(s=>(s.kind??"text")===t):n}export{te as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,U as CARD_LIST_ITEM_BLOCKS,O as CARD_LIST_ROWS,m as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,$ as CARD_ROW_LINK_PROP,S as CARD_TEMPLATE_BLOCKS,Y as CARD_TEMPLATE_LABEL,L as CARD_TEMPLATE_SLOT,We as ROW_BOUND_PROPS,oe as ROW_PART_BY_WORDS,je as cardCopyPlace,Pe as cardKeyOf,He as cardListFieldsOf,Be as cardListItemSlot,Ye as cardListProps,Z as cardListShows,De as cardRow,Re as cardTemplateBlocks,Ke as cardTemplateCardOwner,ee as cardTemplateField,G as cardTemplateFields,A as cardTemplateFieldsOf,_e as cardTemplateLinesBetween,se as cardTemplateOwner,he as cardTemplateSlot,Ie as cardTemplateSlotLabel,X as cardTemplateSlotNames,ie as cardTemplateSlotOf,Ce as cardTemplateTypedRows,Oe as cardTemplatesNameBlocks,J as defaultListField,Ee as hasCardTemplate,Ae as isCardTemplateBlock,z as isCardTemplateSlot,x as namedRowField,Le as registerCardTemplates,re as rowBound,ne as rowFieldOf,C as rowFieldSpec,le as rowFieldText,Fe as rowFieldWordsArePlain,Ne as rowFilledProps,Me as rowPartByKey,ve as templateBoxIsEmpty,Se as templateOnInsert,q as templateOnRead};
1
+ import{blockSources as F,blockSourceSpec as T,declaredBlockSource as h}from"./block-sources.js";import{slotFieldBlocks as B}from"./slot-field-blocks.js";import{isNodeList as P}from"efficient-easel/data";import{BOX_TYPE as D}from"../document/container-blocks.js";import{globalRegistry as v}from"../global-registry.js";import{nonEmptyString as L}from"../non-empty-string.js";import{accentItalicRuns as W}from"../markup.js";import{withCardsTemplate as M}from"../document/cards-template-on-read.js";import{withCardListTemplate as N}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as K,withArticleBodyTemplate as j}from"../document/article-body-seed.js";import{withLogosTemplate as H}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as Y}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintListTemplate as $}from"../document/blocks/general/Footprint/card-seed.js";const O="template",U="Card template",y="CardList",S=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",m="rowLinkField";function Be(){return{type:"slot",allow:[...S]}}const Q=S.filter(e=>e!=="ButtonBlock"),R="items",A="itemFields";function Le(){return{type:"slot",allow:[...Q]}}const q=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>Y(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>$(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>M("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:y,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>H(e)},{block:y,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:R,seed:e=>N(e)},{block:K,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>j(e)}];function f(){return v("efficient.card-templates",()=>new Map(q.map(e=>[e.block,e])))}function Oe(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=L(o.label),c=Array.isArray(o.fields)?{fields:o.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...c})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||F(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?B().add(t.block):B().delete(t.block);const i=L(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function V(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function Se(e,t){const r=z(e),n=(r.length?r:[O]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):V(e,s);return o===s?t:o}function Re(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ae(e){return f().get(e)?.blocks??[]}function Ce(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function _e(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function Ee(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ie(e){return typeof e=="string"&&f().has(e)}const X=[{slot:O}];function k(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??X:[]}function z(e){return k(e).map(t=>t.slot)}function G(e,t){return k(e).some(r=>r.slot===t)}function Fe(e,t){const r=k(e).find(n=>n.slot===t);return r?r.label??U:null}function x(e,t){return t?k(e).find(r=>r.slot===t)?.fields:void 0}function J(e,t){const r=f().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function Z(e,t){if(typeof e!="string")return"";const r=x(e,t);return(r?r.filter(n=>n.kind==="list"):J(e,"list"))[0]?.key??""}function ee(e,t,r){return g(e)||Z(t,r)}function C(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=x(n,r);if(s)return t?s.filter(c=>(c.kind??"text")===t):s;const i=f().get(n)?.fields??[],o=T(h(e?.props))?.fields,l=o?.length?[...o.map(c=>({...c})),...i.filter(c=>c.everySource&&!o.some(a=>a.key===c.key))]:i;return t?l.filter(c=>(c.kind??"text")===t):l}function te(e,t,r,n){if(!e)return null;const s=x(e,n);return s?s.find(i=>i.key===t)??null:r?C(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function _(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??te(e.ownerType,t,e.owner,e.slot)}function Pe(e,t){return _(e,t)?.plain===!0}function g(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function De(e,t){return e.key||String(t+1)}function ve(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}const re="hideWhenRowEmpty";function We(e,t){const r=e[re];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:m},ImageBlock:{src:p,href:m},ButtonBlock:{label:p,href:m},LogoBlock:{alt:p,href:m},Breadcrumb:{currentCrumb:p}},Me=w,oe=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Ne(e,t,r){return ne(e,t,r)&&!oe.has(`${e}.${r}`)}function ne(e,t,r){return le(e,t,r)!==""}function le(e,t,r){const n=w[e]?.[r];return n?g(t,n):""}function E(e,t){return!t||!e?null:e[t]??""}function se(e,t){return E(e,t)?.trim()||void 0}function Ke(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,c]of Object.entries(w[e]??{})){const a=g(t,c),u=E(r,a);if(u!==null){if(o??={...t},c===m){o[l]=se(r,a);continue}o[l]=_({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?W(u):u}}return o??t}function b(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const[c,a]of Object.entries(l?.props??{})){if(!P(a))continue;const u=G(l.type,c)?{owner:l,slot:c,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===D},d=n(a,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function ie(e,t){const r=b(e,t);return r&&r.owner}function ce(e,t){const r=b(e,t);return r&&r.slot}function je(e,t){const r=b(e,t);return r&&(r.direct?r.owner:null)}function He(e,t){const r=b(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function Ye(e,t,r){if(t?.type!==y)return[];const n=ie(e,t.props?.id);if(!n){const l=T(h(t.props))?.fields,c=l?.length?l.map(d=>({...d})):ae(t.props),a=(f().get(y)?.fields??[]).filter(d=>d.everySource&&!c.some(I=>I.key===d.key)),u=[...c,...a];return r?u.filter(d=>(d.kind??"text")===r):u}const s=ce(e,t.props?.id)??void 0,i=ee(t.props,n.type,s),o=i&&C(n,"list",s).find(l=>l.key===i)?.fields||[];return r?o.filter(l=>(l.kind??"text")===r):o}function $e(e,t){return{[p]:"",[R]:e.map(r=>({...r})),[A]:t.map(r=>({...r}))}}function ae(e,t){const r=e?.[A];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(s=>(s.kind??"text")===t):n}export{re as BOX_HIDE_WHEN_ROW_EMPTY,A as CARD_LIST_FIELDS,Q as CARD_LIST_ITEM_BLOCKS,R as CARD_LIST_ROWS,y as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,m as CARD_ROW_LINK_PROP,S as CARD_TEMPLATE_BLOCKS,U as CARD_TEMPLATE_LABEL,O as CARD_TEMPLATE_SLOT,Me as ROW_BOUND_PROPS,oe as ROW_PART_BY_WORDS,He as cardCopyPlace,De as cardKeyOf,Ye as cardListFieldsOf,Le as cardListItemSlot,$e as cardListProps,ee as cardListShows,ve as cardRow,Ae as cardTemplateBlocks,je as cardTemplateCardOwner,te as cardTemplateField,J as cardTemplateFields,C as cardTemplateFieldsOf,Ee as cardTemplateLinesBetween,ie as cardTemplateOwner,Be as cardTemplateSlot,Fe as cardTemplateSlotLabel,z as cardTemplateSlotNames,ce as cardTemplateSlotOf,_e as cardTemplateTypedRows,Re as cardTemplatesNameBlocks,Z as defaultListField,Ie as hasCardTemplate,Ce as isCardTemplateBlock,G as isCardTemplateSlot,g as namedRowField,Oe as registerCardTemplates,ne as rowBound,le as rowFieldOf,_ as rowFieldSpec,E as rowFieldText,Pe as rowFieldWordsArePlain,Ke as rowFilledProps,se as rowLinkText,Ne as rowPartByKey,We as templateBoxIsEmpty,Se as templateOnInsert,V as templateOnRead};
@@ -75,4 +75,3 @@ export interface ContactRoutingContent {
75
75
  }
76
76
  export declare const OTHER_REASON_ID = "other";
77
77
  export declare const CONTACT_ROUTING_DEFAULTS: ContactRoutingContent;
78
- export declare function slugifyGroupId(s: string | undefined): string;
@@ -1,3 +1,3 @@
1
- import{slugify as r}from"efficient-shell/format";import{mapCoordOfText as o}from"../map-styles.js";const a=["tall","square","wide"],n="tall";function u(e){return a.includes(String(e??""))?String(e):n}const p={sectionNumber:"· Locations",heading:"Our *locations.*",tagline:"Visit us in person — find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour · click to jump",mapTheme:"auto"},m=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT · UTC +0",address:`Address line one
1
+ import{mapCoordOfText as o}from"../map-styles.js";const r=["tall","square","wide"],a="tall";function s(e){return r.includes(String(e??""))?String(e):a}const l={sectionNumber:"· Locations",heading:"Our *locations.*",tagline:"Visit us in person — find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour · click to jump",mapTheme:"auto"},u=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT · UTC +0",address:`Address line one
2
2
  Address line two`,phone:"+00 000 0000",hours:"Mon–Fri 9:00–18:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT · UTC +0",address:`Address line one
3
- Address line two`,phone:"+00 000 0000",hours:"Mon–Fri 9:00–18:00",lat:0,lng:0,mapsUrl:""}],i=/^https?:\/\//i;function c(e){const t=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:o(e.lat),lng:o(e.lng),mapsUrl:i.test(t)?t:""}}function h(e){const t=String(e??"").split(" · ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}const d="other",g={routingNumber:"02 · Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A · Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B · Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C · Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D · Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 · Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below — we'll route it to whoever can help.",buttonText:"Send Message →",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail · Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail · Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail · Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail · Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon–Fri · 9:00–18:00"}]};function y(e){return r(e)}export{m as CONTACT_LOCATIONS_CARDS_PLACEHOLDER,p as CONTACT_LOCATIONS_DEFAULTS,g as CONTACT_ROUTING_DEFAULTS,a as LOCATION_TILE_SHAPES,n as LOCATION_TILE_SHAPE_DEFAULT,d as OTHER_REASON_ID,c as contactLocationCardOfRow,u as parseLocationTileShape,y as slugifyGroupId,h as splitLegacyRegion};
3
+ Address line two`,phone:"+00 000 0000",hours:"Mon–Fri 9:00–18:00",lat:0,lng:0,mapsUrl:""}],n=/^https?:\/\//i;function m(e){const t=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:o(e.lat),lng:o(e.lng),mapsUrl:n.test(t)?t:""}}function p(e){const t=String(e??"").split(" · ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}const h="other",c={routingNumber:"02 · Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A · Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B · Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C · Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D · Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 · Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below — we'll route it to whoever can help.",buttonText:"Send Message →",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail · Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail · Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail · Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail · Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon–Fri · 9:00–18:00"}]};export{u as CONTACT_LOCATIONS_CARDS_PLACEHOLDER,l as CONTACT_LOCATIONS_DEFAULTS,c as CONTACT_ROUTING_DEFAULTS,r as LOCATION_TILE_SHAPES,a as LOCATION_TILE_SHAPE_DEFAULT,h as OTHER_REASON_ID,m as contactLocationCardOfRow,s as parseLocationTileShape,p as splitLegacyRegion};
@@ -0,0 +1 @@
1
+ export declare function cssLengthOf(value: number, unit: unknown): string;
@@ -0,0 +1 @@
1
+ import{isLengthUnit as o,lengthOf as r}from"efficient-easel/screen/lib/content/length-units";function p(e,n){const t=r(e,o(n)?n:"px");return typeof t=="number"?`${t}px`:t}export{p as cssLengthOf};
@@ -40,7 +40,22 @@ export declare const SITE_GUTTER_NARROW: {
40
40
  export declare const SITE_GUTTER_SUBSTITUTIONS: ReadonlyArray<readonly [string, string]>;
41
41
  export declare function asMainGutters(html: string): string;
42
42
  export declare const SITE_COLUMN_NARROW = "max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
43
- export declare const SITE_COLUMN_EDGE_NARROW = "max-view-wide:[--sf-edge-g:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]";
43
+ export declare function siteSideRoom<S extends SideSpace = "box">(sideSpace?: S): (typeof SIDE_ROOMS)[S];
44
+ type SideSpace = "box" | "site";
45
+ declare const SIDE_ROOMS: {
46
+ readonly box: {
47
+ readonly className: "[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]";
48
+ readonly value: "var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))";
49
+ readonly edge: "[--sf-edge-g:var(--sf-pad-site)]";
50
+ readonly frame: "max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";
51
+ };
52
+ readonly site: {
53
+ readonly className: "[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]";
54
+ readonly value: "var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))";
55
+ readonly edge: "[--sf-edge-g:var(--sf-pad-site)]";
56
+ readonly frame: "max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
57
+ };
58
+ };
44
59
  export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
45
60
  export declare const BOX_HOLDS_NO_GUTTER_CLASS = "[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";
46
61
  export declare function withoutBoxHoldsNoGutter(html: string): string;
@@ -76,3 +91,4 @@ export declare const PAGE_WIDTH_ATTR = "data-page-width";
76
91
  export declare function pageWidthMarker(answer?: unknown): "full" | null;
77
92
  export declare function chromeWidthStyle(own?: WidthAnswer | null): CSSProperties | null;
78
93
  export declare function resolveChromeWidth(stored?: unknown): WidthAnswer | undefined;
94
+ export {};