efficient-web-builder 48.2.0 → 49.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 (140) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/editor/components/HoverEffectField.js +1 -1
  3. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  4. package/dist/editor/lib/animation/AnimationDurationRow.d.ts +3 -0
  5. package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
  6. package/dist/editor/lib/animation/fields.d.ts +2 -2
  7. package/dist/editor/lib/animation/fields.js +1 -1
  8. package/dist/editor/lib/animation/hover-fields.d.ts +2 -0
  9. package/dist/editor/lib/animation/hover-fields.js +1 -1
  10. package/dist/editor/lib/document/add-target.d.ts +1 -1
  11. package/dist/editor/lib/document/add-target.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +15 -0
  16. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -0
  17. package/dist/editor/lib/document/controls.d.ts +1 -1
  18. package/dist/editor/lib/document/controls.js +1 -1
  19. package/dist/editor/lib/document/field-groups.js +1 -1
  20. package/dist/editor/lib/sections/hero-ticker-to-strip.d.ts +7 -0
  21. package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -0
  22. package/dist/editor/lib/sections/section-dry-run.d.ts +5 -0
  23. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  24. package/dist/format/lib/animation/hover.d.ts +32 -2
  25. package/dist/format/lib/animation/hover.js +1 -1
  26. package/dist/format/lib/content/block-align.js +1 -1
  27. package/dist/format/lib/content/block-sources.js +1 -1
  28. package/dist/format/lib/content/box-layout.js +1 -1
  29. package/dist/format/lib/content/box-separator.js +1 -1
  30. package/dist/format/lib/content/box-shape.js +1 -1
  31. package/dist/format/lib/content/button-icon.js +1 -1
  32. package/dist/format/lib/content/card-template.js +1 -1
  33. package/dist/format/lib/content/container-gap.d.ts +1 -1
  34. package/dist/format/lib/content/container-gap.js +1 -1
  35. package/dist/format/lib/content/page-width.d.ts +3 -3
  36. package/dist/format/lib/content/page-width.js +1 -1
  37. package/dist/format/lib/content/part-display.js +1 -1
  38. package/dist/format/lib/content/section-min-height.d.ts +1 -1
  39. package/dist/format/lib/content/section-min-height.js +1 -1
  40. package/dist/format/lib/content/view-lines.d.ts +11 -0
  41. package/dist/format/lib/content/view-lines.js +1 -0
  42. package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +4 -0
  43. package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
  44. package/dist/format/lib/document/passes/types.d.ts +1 -1
  45. package/dist/format/lib/editor-words-catalogue.d.ts +5 -1
  46. package/dist/format/lib/editor-words-catalogue.js +4 -4
  47. package/dist/format/lib/global-registry.d.ts +1 -0
  48. package/dist/format/lib/global-registry.js +1 -0
  49. package/dist/format/lib/hero-ticker.d.ts +6 -0
  50. package/dist/format/lib/hero-ticker.js +1 -1
  51. package/dist/format/lib/links/link-href-rewrites.d.ts +10 -0
  52. package/dist/format/lib/links/link-href-rewrites.js +1 -0
  53. package/dist/format/lib/sections/collection-card-text-regions.d.ts +1 -1
  54. package/dist/format/lib/sections/collection-card-text-regions.js +1 -1
  55. package/dist/format/lib/sections/hero-overlay.d.ts +8 -0
  56. package/dist/format/lib/sections/hero-overlay.js +1 -1
  57. package/dist/format/lib/sections/hero-single-to-hero.d.ts +8 -0
  58. package/dist/format/lib/sections/hero-single-to-hero.js +1 -0
  59. package/dist/format/lib/sections/ticker-style.js +1 -1
  60. package/dist/format/lib/source-rules/heading-ceiling-sweep.js +7 -7
  61. package/dist/format/lib/source-rules/view-breakpoint-names.d.ts +6 -0
  62. package/dist/format/lib/source-rules/view-breakpoint-names.js +4 -0
  63. package/dist/render/components/Banner.js +1 -1
  64. package/dist/render/components/Breadcrumb.js +1 -1
  65. package/dist/render/components/Btn.d.ts +2 -0
  66. package/dist/render/components/Btn.js +1 -1
  67. package/dist/render/components/ButtonBlock.d.ts +1 -0
  68. package/dist/render/components/ButtonBlock.js +1 -1
  69. package/dist/render/components/CardRowContext.d.ts +2 -1
  70. package/dist/render/components/CardRowContext.js +1 -1
  71. package/dist/render/components/Cards.js +1 -1
  72. package/dist/render/components/CategoryBar.js +1 -1
  73. package/dist/render/components/ChartSection.js +1 -1
  74. package/dist/render/components/ContactLocations.js +1 -1
  75. package/dist/render/components/DealerFinder.js +1 -1
  76. package/dist/render/components/Divider.js +1 -1
  77. package/dist/render/components/FAQ.js +1 -1
  78. package/dist/render/components/FeaturedCover.js +1 -1
  79. package/dist/render/components/Flex.js +1 -1
  80. package/dist/render/components/Footprint.js +1 -1
  81. package/dist/render/components/Heading.js +1 -1
  82. package/dist/render/components/HeroPictures.d.ts +63 -0
  83. package/dist/render/components/HeroPictures.js +1 -0
  84. package/dist/render/components/HeroSection.d.ts +2 -1
  85. package/dist/render/components/HeroSection.js +1 -1
  86. package/dist/render/components/HeroSingle.js +1 -1
  87. package/dist/render/components/HeroSlide.d.ts +16 -1
  88. package/dist/render/components/HeroSlide.js +1 -1
  89. package/dist/render/components/IntegrationsSection.js +1 -1
  90. package/dist/render/components/IntroBleed.js +1 -1
  91. package/dist/render/components/KeyFeatures.js +1 -1
  92. package/dist/render/components/LocationMap.d.ts +1 -1
  93. package/dist/render/components/LocationMap.js +1 -1
  94. package/dist/render/components/LongRead.js +1 -1
  95. package/dist/render/components/Manifesto.js +1 -1
  96. package/dist/render/components/Masthead.js +1 -1
  97. package/dist/render/components/MockupSection.js +1 -1
  98. package/dist/render/components/OrderSummary.js +1 -1
  99. package/dist/render/components/ParagraphsA.js +1 -1
  100. package/dist/render/components/PostCard.js +1 -1
  101. package/dist/render/components/ProcessSteps.js +1 -1
  102. package/dist/render/components/Prose.js +1 -1
  103. package/dist/render/components/Reel.js +1 -1
  104. package/dist/render/components/SectionEyebrow.js +1 -1
  105. package/dist/render/components/SectionHeader.d.ts +4 -4
  106. package/dist/render/components/SectionHeader.js +1 -1
  107. package/dist/render/components/Series.js +1 -1
  108. package/dist/render/components/SpecStrip.js +1 -1
  109. package/dist/render/components/Split.js +1 -1
  110. package/dist/render/components/Stats.js +1 -1
  111. package/dist/render/components/StatsParagraph.js +1 -1
  112. package/dist/render/components/Testimonials.js +1 -1
  113. package/dist/render/components/Text.js +1 -1
  114. package/dist/render/components/Ticker.js +1 -1
  115. package/dist/render/components/TickerSection.js +1 -1
  116. package/dist/render/components/Timeline.js +1 -1
  117. package/dist/render/components/TimelineRail.d.ts +4 -4
  118. package/dist/render/components/TimelineRail.js +1 -1
  119. package/dist/render/components/TimelineTrack.js +1 -1
  120. package/dist/render/components/TitleWithButtons.js +1 -1
  121. package/dist/render/lib/animation/LoopTrack.d.ts +2 -2
  122. package/dist/render/lib/animation/LoopTrack.js +1 -1
  123. package/dist/render/lib/content/block-size.js +1 -1
  124. package/dist/render/lib/content/section-edge.js +1 -1
  125. package/dist/render/lib/content/view-values.d.ts +2 -1
  126. package/dist/render/lib/content/view-values.js +1 -1
  127. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  128. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  129. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  130. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  131. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  132. package/dist/render/lib/document/passes/section-animation.js +1 -1
  133. package/dist/render/lib/document/passes/section-width.d.ts +2 -2
  134. package/dist/render/lib/document/passes/section-width.js +1 -1
  135. package/dist/render/lib/document/slot-specs.d.ts +3 -0
  136. package/dist/render/lib/document/slot-specs.js +1 -1
  137. package/dist/render/lib/sections/section-to-box.js +1 -1
  138. package/dist/render/lib/site-runtime.d.ts +3 -1
  139. package/dist/render/lib/site-runtime.js +1 -1
  140. package/package.json +1 -1
@@ -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 B}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 A=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",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",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"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","Text style":"Design",Entrance:"Animation",Hover:"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","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(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),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...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(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("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(),...B()};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 g=!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)&&(g=!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 p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.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=g?[]:[...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=A.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 A.some(t=>d[t]in e)}function Oe(e){const t=A.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{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A 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,pe 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,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
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 B}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 A=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",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",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"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",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","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(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),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...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(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("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(),...B()};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 g=!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)&&(g=!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 p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.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=g?[]:[...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=A.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 A.some(t=>d[t]in e)}function Oe(e){const t=A.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{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A 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,pe 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,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
@@ -0,0 +1,7 @@
1
+ import { type Carried, type Dropped, type SectionNode } from "../../../render/lib/sections/section-to-box.js";
2
+ export type HeroTickerConversion = {
3
+ node: SectionNode;
4
+ carried: Carried[];
5
+ dropped: Dropped[];
6
+ };
7
+ export declare function heroTickerToStrip(old: SectionNode): HeroTickerConversion;
@@ -0,0 +1 @@
1
+ import{readPartMotions as _}from"../../../render/lib/animation/part-motion.js";import{STRIP_SECTION_TO_BOX as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-strip.js";import{SECTION_ACCENT_INHERIT as g}from"../../../format/lib/content/section-surface.js";import{HERO_STRIP_SLOT as m,legacyTickerWords as l,TICKER_MOTION_PART as i}from"../../../format/lib/hero-ticker.js";import{nonEmptyString as u}from"../../../format/lib/non-empty-string.js";import{convertSection as O}from"../../../render/lib/sections/section-to-box.js";function M(t){const{showTicker:n,tickerItems:d,...k}=t.props,y=u(t.props.id)??"Hero",r=[],o=[],e={...k},s=l({tickerItems:d}),p=n!==!1&&s.length>0,c=_(t.props),h=c[i];if(h){const{[i]:a,...w}=c;Object.keys(w).length?e._partMotion=w:delete e._partMotion,r.push({key:"_partMotion",home:p?`${i} → the strip Box's own Entrance`:`${i} → nothing: no strip is drawn`})}if(!p)return e[m]=[],"showTicker"in t.props&&o.push({key:"showTicker",why:n===!1?"switched off: an empty strip draws nothing, the same as today":"no words: the strip drew nothing published, so the strip stays empty"}),"tickerItems"in t.props&&o.push({key:"tickerItems",why:s.length?"switched off: the words were not drawn, and an empty strip draws nothing":"no row has words: an empty row draws nothing published"}),{node:{type:t.type,props:e},carried:r,dropped:o};const T={type:"Ticker",props:{id:`${y}~strip`,items:s.map(a=>({text:a})),tone:"plain",sectionAccent:g,borders:!1,...h??{}}},f=O(T,I.Ticker);return e[m]=[f.node],"showTicker"in t.props&&o.push({key:"showTicker",why:"on: the strip Box is the switch now (delete or hide it like any block)"}),r.push({key:"tickerItems",home:`the strip Box: one Text block per row with words (${s.length}), in order`}),{node:{type:t.type,props:e},carried:r,dropped:o}}export{M as heroTickerToStrip};
@@ -84,6 +84,11 @@ export declare function headingCaseList(styles: readonly string[], saved: readon
84
84
  list: StoredTextStyle[];
85
85
  changed: boolean;
86
86
  };
87
+ export declare const HERO_MOVES: Readonly<Record<string, (node: SectionNode) => {
88
+ node: SectionNode;
89
+ carried: Carried[];
90
+ dropped: Dropped[];
91
+ }>>;
87
92
  export declare function dryRunSections(pages: readonly DryRunPage[], opts?: {
88
93
  types?: readonly string[];
89
94
  draw?: (node: SectionNode) => string;
@@ -1,3 +1,3 @@
1
- import{defaultTextStyles as N}from"efficient-easel/text-styles/model";import{headingDefaultPx as A}from"../../../render/components/Heading.js";import{headingLevelOfStyle as M}from"../../../render/components/Text.js";import{migrateLegacyPageData as D}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as v}from"../../../format/lib/document/renamed-props.js";import{listToWrite as E,setStyleValues as L}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as R,bandPresetIndex as z}from"../../../format/lib/theme.js";import{convertSection as C,convertSectionsInPage as j,sectionToBoxRow as S,sectionToBoxTypes as F}from"../../../render/lib/sections/section-to-box.js";const P={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function se(e,t,d=N()){const i=s=>t==="heading"?A(M(s)):P[s];let n;for(const{id:s,kind:r}of d){const o=r===t?i(s):void 0;if(o===void 0)continue;const a=Math.abs(o-e),c=n?Math.abs(n.px-e):1/0;(a<c||a===c&&n&&o>n.px)&&(n={id:s,px:o})}if(!n)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return n.id}function B(e){const[t,d]=e.split("/");return t&&d?{schema:t,site:d}:void 0}function ne(e){const t=i=>typeof i=="string"?i:null,d=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:d,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 I=new Set([null,"authored"]);function W(e,t){const d=E(t),i=d.filter(s=>e.includes(s.id)&&s.values.letterCase===void 0).map(s=>s.id);return{list:i.reduce((s,r)=>L(s,r,{letterCase:"upper"}),d),changed:i.length>0}}function Y(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 J(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!I.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:d,changed:i}=W(e.styles,t.textStyles?t.textStylesList??null:null);return i?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:d}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function J(e,t){const d=t?.themePresets;if(!t||!d)return{undecided:"the site's theme presets were not read"};const i=d[e.page];if(!i)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(z(d,e.page)>=0)return{notNeeded:"the site already has the band preset"};const n=R(i);return{send:{kind:e.kind,page:e.page,index:d.length,preset:n,themePresets:[...d,n]}}}function O(e){const t=e?.content;return Array.isArray(t)?v(D(e)):e}function oe(e,t={}){const d=[...t.types??F()],i=d.filter(p=>!S(p)),n=new Set(d.filter(p=>S(p))),s=[],r=[],o={},a={},c=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),f=new Map,m=(p,w,l)=>{const k=`${p.schema}/${p.site}`;let $=f.get(k);$||f.set(k,$={...p,facts:!!w,writes:[],undecided:[],notNeeded:[]});const h=Y(l,w);if("send"in h){const g=$.writes.find(b=>JSON.stringify(b.write)===JSON.stringify(h.send));g?g.nodes+=1:$.writes.push({write:h.send,reason:l.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[x,y]="undecided"in h?[$.undecided,h.undecided]:[$.notNeeded,h.notNeeded],u=x.find(g=>g.kind===l.kind&&g.why===y);u?u.nodes+=1:x.push({kind:l.kind,why:y,nodes:1})};for(const p of e){const w=O(p.layout)?.content;Array.isArray(w)&&w.forEach((l,k)=>{if(!l||typeof l.type!="string"||!n.has(l.type))return;const $=S(l.type),h=B(p.label),x=h?c.get(`${h.schema}/${h.site}`):void 0,y=C(l,$,x?{site:x}:{});if(y.skipped!==void 0){r.push({page:p.label,index:k,type:l.type,id:String(l.props?.id??""),why:y.skipped});return}if(h)for(const _ of y.siteWrites)m(h,x,_);const u={page:p.label,index:k,type:l.type,id:String(l.props?.id??""),carried:y.carried,dropped:y.dropped,restyled:y.restyled},g=t.draw;g&&(u.before=g(l),u.after=y.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),s.push(u);const b=o[l.type]??={nodes:0,pages:0,dropped:{}};b.nodes+=1,(a[l.type]??=new Set).add(p.label),b.pages=a[l.type].size;for(const _ of y.dropped)b.dropped[_.key]=(b.dropped[_.key]??0)+1})}return{types:d,noRow:i,pages:e.length,nodes:s,skipped:r,byType:o,sites:[...f.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(d=>{const i=`${t.schema}/${t.siteName(d.site)}/${d.slug}`;return[{label:`${i} (draft)`,layout:d.layout},{label:`${i} (published)`,layout:d.published_layout}]})}function de(e,t){const d=t.types.filter(i=>S(i));return e.map(i=>{const n={id:i.id,slug:i.slug};if(JSON.stringify(i.layout)!==JSON.stringify(i.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const s=O(i.layout),r=Array.isArray(s?.content)?s.content:[],o=[],a=[];for(const f of r){if(!f||!d.includes(f.type))continue;const m=String(f.props?.id??""),p=S(f.type).skip?.(f.props);p===void 0?o.push({type:f.type,id:m}):a.push({type:f.type,id:m,why:p})}if(!o.length)return{...n,converted:o,skipped:a};const c=j(s,d,t.site?{site:t.site}:{});return{...n,patch:{layout:c,expected_updated_at:i.layout_updated_at},converted:o,skipped:a}})}function re(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(d=>d.write)}))}function U(e){const t=new Map;for(const d of e.nodes)for(const i of d.restyled){const n=i.textStyle??"none",s=P[n],r=i.size??s,o=i.sizePhone??i.size??s;if(r===void 0||o===void 0)continue;const a=i.was.size,c=i.was.sizePhone??i.was.size,f=[d.type,i.key,n,a,c,r,o].join("|"),m=t.get(f);m?m.nodes+=1:t.set(f,{type:d.type,key:i.key,textStyle:n,oldPx:a,oldPhonePx:c,newPx:r,newPhonePx:o,diff:r-a,diffPhone:o-c,nodes:1})}return[...t.values()]}const T=e=>e>0?`+${e}`:String(e),G=e=>N().find(t=>t.id===e)?.name??e,H=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 ae(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 r=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${r} |`)}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 r=n.get(s.type)??n.set(s.type,new Map).get(s.type);r.set(s.why,(r.get(s.why)??0)+1)}for(const[s,r]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[o,a]of r)t.push(`- ×${a}: ${o}`)}}for(const[n,s]of Object.entries(e.byType)){const r=Object.entries(s.dropped);if(!r.length)continue;t.push("",`## ${n} — dropped`,"");const o=new Map;for(const a of e.nodes)if(a.type===n)for(const c of a.dropped)o.set(c.key,c.why);for(const[a,c]of r)t.push(`- \`${a}\` ×${c}: ${o.get(a)}`)}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}`,r=n.facts?"yes":"NO";for(const o of n.writes)t.push(`| ${s} | ${r} | ${H(o.write)} | send | ${o.nodes} | ${o.reason} |`);for(const o of n.undecided)t.push(`| ${s} | ${r} | ${o.kind} | UNDECIDED | ${o.nodes} | ${o.why} |`);for(const o of n.notNeeded)t.push(`| ${s} | ${r} | ${o.kind} | not needed | ${o.nodes} | ${o.why} |`)}}const d=U(e);if(d.length){const n=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],s=o=>`| ${o.type} | \`${o.key}\` | ${o.oldPx} (${o.oldPhonePx}) | ${G(o.textStyle)} | ${o.newPx} (${o.newPhonePx}) | ${T(o.diff)} (${T(o.diffPhone)}) | ${o.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.","",...n,...d.map(s));const r=d.filter(o=>Math.abs(o.diff)>2||Math.abs(o.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),r.length?t.push(...n,...r.map(s)):t.push("None.")}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(`
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(`
2
2
  `)+`
3
- `}export{P as BODY_STYLE_PX_AT_DEFAULTS,U as bodyStyleRows,ae as dryRunMarkdown,oe as dryRunSections,W as headingCaseList,se as nearestTextStyle,de as pageEdits,ie as pagesFromCliExport,ne as siteFactsFromRead,B as siteOfLabel,re as siteWritesFile};
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};
@@ -1,5 +1,35 @@
1
- import { type HoverEffect } from "../theme.js";
1
+ import { type ShowWhenRule } from "efficient-shell/format";
2
2
  export declare const HOVER_KEY = "hover";
3
- export type PartHover = Extract<HoverEffect, "none" | "lift">;
3
+ export declare const HOVER_KINDS: readonly ["none", "nextImage", "rotate", "zoom", "lift"];
4
+ export type HoverKind = (typeof HOVER_KINDS)[number];
5
+ export declare const HOVER_KIND_LABELS: Readonly<Record<HoverKind, string>>;
6
+ export type PartHover = Extract<HoverKind, "none" | "lift">;
4
7
  export declare const PART_HOVER_KINDS: readonly PartHover[];
5
8
  export declare function hoverOf(record: Readonly<Record<string, unknown>>): PartHover;
9
+ export type CardHover = Extract<HoverKind, "none" | "rotate">;
10
+ export declare const CARD_HOVER_KINDS: readonly CardHover[];
11
+ export declare const CARD_HOVER_KEYS: {
12
+ readonly kind: "hover";
13
+ readonly angle: "hoverAngle";
14
+ readonly duration: "hoverDuration";
15
+ readonly delay: "hoverDelay";
16
+ };
17
+ export declare const OLD_SPIN_KEY = "spinOnHover";
18
+ export declare const CARD_HOVER_ANGLE: {
19
+ readonly min: 0;
20
+ readonly max: 360;
21
+ readonly step: 1;
22
+ };
23
+ export declare const CARD_HOVER_SECTIONS: readonly string[];
24
+ export declare function cardHoverResting(blockKey: string): CardHover;
25
+ export declare const CARD_HOVER_TURN: number;
26
+ export type CardHoverDrawn = {
27
+ kind: CardHover;
28
+ angle: number | null;
29
+ duration: number;
30
+ delay: number;
31
+ };
32
+ export declare function cardHoverKindOf(record: Readonly<Record<string, unknown>>, resting: CardHover): CardHover;
33
+ export declare function cardHoverAngleOf(stored: unknown): number;
34
+ export declare function cardHoverOf(record: Readonly<Record<string, unknown>>, blockKey: string): CardHoverDrawn;
35
+ export declare function cardRotatesRule(resting: CardHover): ShowWhenRule;
@@ -1 +1 @@
1
- import{HOVER_EFFECTS as n}from"../theme.js";const t="hover",r=n.filter(o=>o==="none"||o==="lift");function c(o){const e=o[t];return r.includes(e)?e:"none"}export{t as HOVER_KEY,r as PART_HOVER_KINDS,c as hoverOf};
1
+ import{HOVER_MOTION as f,motionSeconds as a}from"efficient-shell/format";import{finiteNumber as R}from"../finite-number.js";const l="hover",x=["none","nextImage","rotate","zoom","lift"],D={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift"};function s(t){return x.filter(n=>t.includes(n))}const O=s(["none","lift"]);function g(t){const n=t[l];return O.includes(n)?n:"none"}const d=s(["none","rotate"]),o={kind:l,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay"},i="spinOnHover",c={min:0,max:360,step:1},u={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},A=Object.keys(u);function p(t){return u[t]??"none"}const _=f.rotateFallbackDeg;function m(t,n){const r=t[o.kind];if(d.includes(r))return r;const e=t[i];return typeof e=="boolean"?e?"rotate":"none":n}function E(t){const n=R(t);return n===void 0?_:Math.min(c.max,Math.max(c.min,n))}function N(t,n){const r=p(n),e=m(t,r);return{kind:e,angle:e==="rotate"?E(t[o.angle]):null,duration:a("hover","duration",e==="rotate"?t[o.duration]:void 0),delay:a("hover","delay",e==="rotate"?t[o.delay]:void 0)}}function h(t){const n={field:o.kind,in:[...d]};return{any:[{field:o.kind,is:"rotate"},{all:[{not:n},t==="rotate"?{not:{field:i,is:!1}}:{field:i,is:!0}]}]}}export{c as CARD_HOVER_ANGLE,o as CARD_HOVER_KEYS,d as CARD_HOVER_KINDS,A as CARD_HOVER_SECTIONS,_ as CARD_HOVER_TURN,l as HOVER_KEY,x as HOVER_KINDS,D as HOVER_KIND_LABELS,i as OLD_SPIN_KEY,O as PART_HOVER_KINDS,E as cardHoverAngleOf,m as cardHoverKindOf,N as cardHoverOf,p as cardHoverResting,h as cardRotatesRule,g as hoverOf};
@@ -1 +1 @@
1
- const s={left:"justify-start",center:"justify-center",right:"justify-end"},i={text:{left:"max-[720px]:text-left",center:"max-[720px]:text-center",right:"max-[720px]:text-right"},place:{left:"max-[720px]:mx-0",center:"max-[720px]:mx-auto",right:"max-[720px]:ml-auto max-[720px]:mr-0"},items:{left:"max-[720px]:grid-cols-1 max-[720px]:justify-items-start",center:"max-[720px]:grid-cols-1 max-[720px]:justify-items-center",right:"max-[720px]:justify-items-end"},justify:{left:"max-[720px]:justify-start",center:"max-[720px]:justify-center",right:"max-[720px]:justify-end"}};function x(t){return t==="left"||t==="center"||t==="right"?t:void 0}function f(t,r,n){const e=x(n);return!e||e===(x(r)??"left")?"":i[t][e]}export{s as BLOCK_ALIGN_JUSTIFY,f as alignPhoneClass,x as blockAlignOf};
1
+ const l={left:"justify-start",center:"justify-center",right:"justify-end"},n={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function i(t){return t==="left"||t==="center"||t==="right"?t:void 0}function s(t,a,r){const e=i(r);return!e||e===(i(a)??"left")?"":n[t][e]}export{l as BLOCK_ALIGN_JUSTIFY,s as alignPhoneClass,i as blockAlignOf};
@@ -1 +1 @@
1
- import{nonEmptyString as c}from"../non-empty-string.js";const i="dataSource",m="dataSourceOptions",a="dataRows",S="countKey",d="counts",u=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,f=Symbol.for("efficient.block-sources");function s(){const e=globalThis;return e[f]??={sources:new Map,revision:0}}const p=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!=="");function y(e){if(typeof e.key!="string"||!u.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(t=>typeof t!="string"||!t))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(t=>l(t)).filter(t=>t!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(p)}:{}}}function x(e){const t=e.map(y),o=s();for(const r of t)o.sources.set(r.key,r);t.length&&(o.revision+=1)}function R(e){const t=[...s().sources.values()];return e===void 0?t:t.filter(o=>o.blocks.includes(e))}function k(e){return s().sources.get(e)??null}function g(e){return s().sources.get(e)?.choices??[]}function w(){return s().revision}function b(e){const t=e?.[i];return typeof t=="string"?t.trim():""}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[o,r]of Object.entries(e)){const n=c(r);n&&(t[o]=n)}return Object.keys(t).length?t:null}function h(e){const t=e?.[a];return Array.isArray(t)?t.map(l).filter(o=>o!==null):null}function C(e,t,o=[]){const r=h(e);if(r!==null&&(r.length||!t))return{rows:r,sample:!1};if(!t)return{rows:[],sample:!1};const n=k(b(e))?.sample;return{rows:n?.length?n:o,sample:!0}}export{m as BLOCK_SOURCE_OPTIONS_PROP,i as BLOCK_SOURCE_PROP,a as BLOCK_SOURCE_ROWS_PROP,d as COUNTS_SOURCE,S as COUNT_KEY_PROP,k as blockSourceSpec,R as blockSources,w as blockSourcesRevision,b as declaredBlockSource,x as registerBlockSources,h as servedRows,g as sourceChoices,C as sourcedRows};
1
+ import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as i}from"../non-empty-string.js";const a="dataSource",S="dataSourceOptions",u="dataRows",g="countKey",x="counts",f=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function s(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const p=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!=="");function y(e){if(typeof e.key!="string"||!f.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(t=>typeof t!="string"||!t))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(t=>l(t)).filter(t=>t!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(p)}:{}}}function R(e){const t=e.map(y),r=s();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function d(e){const t=[...s().sources.values()];return e===void 0?t:t.filter(r=>r.blocks.includes(e))}function k(e){return s().sources.get(e)??null}function w(e){return s().sources.get(e)?.choices??[]}function C(){return s().revision}function b(e){const t=e?.[a];return typeof t=="string"?t.trim():""}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const n=i(o);n&&(t[r]=n)}return Object.keys(t).length?t:null}function m(e){const t=e?.[u];return Array.isArray(t)?t.map(l).filter(r=>r!==null):null}function _(e,t,r=[]){const o=m(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const n=k(b(e))?.sample;return{rows:n?.length?n:r,sample:!0}}export{S as BLOCK_SOURCE_OPTIONS_PROP,a as BLOCK_SOURCE_PROP,u as BLOCK_SOURCE_ROWS_PROP,x as COUNTS_SOURCE,g as COUNT_KEY_PROP,k as blockSourceSpec,d as blockSources,C as blockSourcesRevision,b as declaredBlockSource,R as registerBlockSources,m as servedRows,w as sourceChoices,_ as sourcedRows};
@@ -1 +1 @@
1
- import{isStripBox as r}from"./box-separator.js";const A={sectionPaddingTop:0,sectionPaddingBottom:0},l={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},s={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function B(n,a){const p=typeof n=="string"&&n in l?l[n]:"",t=typeof a=="string"&&a in s?s[a]:"";return[p,t].filter(Boolean).join(" ")}function N(n){return n===!0||n==="wrap"?"flex-wrap":""}const E="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],e="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",m={equal:e,bigLeft:`${e} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${e} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${e} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${e} [&>*:last-child]:min-[800px]:grow-[3]`,twoThree:`${e} [&>*:first-child]:min-[800px]:grow-[2] [&>*:last-child]:min-[800px]:grow-[3]`};function _(n){return typeof n=="string"?m[n]??"":""}const f="[&>*]:min-[800px]:basis-[content]";function P(n){return _(n)===""?f:""}const R="Columns",T=1,X=3,o={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},H=c.filter(n=>n.value==="content"||n.value==="equal"),I="equal",$=1,y=6,x="min-[800px]:flex-wrap [&>*]:min-[800px]:min-w-0 [&>*]:min-[800px]:grow-0!",g={1:`${x} [&>*]:min-[800px]:basis-[calc(100%/1)]!`,2:`${x} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${x} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${x} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${x} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${x} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function h(n){return typeof n=="number"?g[n]??"":""}const w={1:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc(100%/1)]!",2:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function u(n){return typeof n=="number"?w[n]??"":""}function W(n){return n.direction!=="row"||r(n.direction,n.separator)||n.loop==="scroll"||n.line===!0?"":u(n.columnsTablet)}function M(n){return n.direction!=="row"||r(n.direction,n.separator)||n.loop==="scroll"||n.line===!0?"":h(n.columns)}const b="max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:grow-0 [&>*]:max-[800px]:basis-[content]",O={2:"max-[800px]:flex-nowrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-[800px]:flex-nowrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},S="max-[800px]:flex-nowrap [&>*]:max-[800px]:grow-0 [&>*]:max-[800px]:basis-[content]";function C(n){return n===!1||n==="nowrap"}function F(n,a,p){const t=o[Number(n)];if(!t)return"max-[800px]:flex-col";const i=C(p);return d(n,a)?i?S:b:i?O[Number(n)]:t}function d(n,a){return Number(n)in o&&a==="content"}const U="Block spacing",G=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],L="sf-box-gap-only";function q(n){return n==="gap"?L:""}export{U as BOX_BLOCK_SPACING_LABEL,G as BOX_BLOCK_SPACING_POINTS,y as BOX_COLUMNS_MAX,$ as BOX_COLUMNS_MIN,L as BOX_GAP_ONLY_CLASS,R as BOX_PHONE_ROW_LABEL,X as BOX_PHONE_ROW_MAX,T as BOX_PHONE_ROW_MIN,E as BOX_SHARE_LABEL,I as BOX_SHARE_PHONE_DEFAULT,H as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,A as NESTED_BOX_PADDING,q as boxBlockSpacingClass,h as boxColumnsClass,P as boxFitContentClass,B as boxLayoutClasses,F as boxPhoneRowClasses,d as boxPhoneRowFits,C as boxPhoneRowOneLine,M as boxRowColumnsClass,W as boxRowTabletColumnsClass,_ as boxShareClasses,u as boxTabletColumnsClass,N as boxWrapClass};
1
+ import{isStripBox as s}from"./box-separator.js";const k={sectionPaddingTop:0,sectionPaddingBottom:0},o={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function A(e,t){const w=typeof e=="string"&&e in o?o[e]:"",n=typeof t=="string"&&t in r?r[t]:"";return[w,n].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const N="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],i="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",p={equal:i,bigLeft:`${i} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${i} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${i} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${i} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${i} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`};function x(e){return typeof e=="string"?p[e]??"":""}const _="[&>*]:view-wide:basis-[content]";function E(e){return x(e)===""?_:""}const P="Columns",R=1,T=3,v={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},X=c.filter(e=>e.value==="content"||e.value==="equal"),H="equal",I=1,$=6,a="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",d={1:`${a} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function b(e){return typeof e=="number"?d[e]??"":""}const f={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function m(e){return typeof e=="number"?f[e]??"":""}function y(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":m(e.columnsTablet)}function W(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":b(e.columns)}const g="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",h={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},u="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function O(e){return e===!1||e==="nowrap"}function M(e,t,w){const n=v[Number(e)];if(!n)return"max-view-wide:flex-col";const l=O(w);return S(e,t)?l?u:g:l?h[Number(e)]:n}function S(e,t){return Number(e)in v&&t==="content"}const F="Block spacing",U=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],C="sf-box-gap-only";function G(e){return e==="gap"?C:""}export{F as BOX_BLOCK_SPACING_LABEL,U as BOX_BLOCK_SPACING_POINTS,$ as BOX_COLUMNS_MAX,I as BOX_COLUMNS_MIN,C as BOX_GAP_ONLY_CLASS,P as BOX_PHONE_ROW_LABEL,T as BOX_PHONE_ROW_MAX,R as BOX_PHONE_ROW_MIN,N as BOX_SHARE_LABEL,H as BOX_SHARE_PHONE_DEFAULT,X as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,k as NESTED_BOX_PADDING,G as boxBlockSpacingClass,b as boxColumnsClass,E as boxFitContentClass,A as boxLayoutClasses,M as boxPhoneRowClasses,S as boxPhoneRowFits,O as boxPhoneRowOneLine,W as boxRowColumnsClass,y as boxRowTabletColumnsClass,x as boxShareClasses,m as boxTabletColumnsClass,B as boxWrapClass};
@@ -1 +1 @@
1
- import{parseTickerSeparator as r,SEPARATOR_GLYPH as c,separatorScaleClass as f,TICKER_SEPARATOR_OPTIONS as n}from"../sections/ticker-style.js";const d=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function o(h){return n.some(t=>t.value===h)?r(h):void 0}const a="overflow-x-clip [&>*]:shrink-0 [&>*]:max-[800px]:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-[800px]:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function s(h,t){return h==="row"&&o(t)!==void 0}function v(h,t){return s(h,t)?a:""}const p="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-[800px]:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)]";function u(h,t){return s(h,t)?p:""}function x(h,t){if(!s(h,t))return{};const i=o(t),e=/^text-\[([\d.]+)em\]$/.exec(f("small",i))?.[1],l=c[i];return{"--sf-sep-mark":l===""?"none":JSON.stringify(l),...e?{"--sf-sep-k":e}:{}}}export{d as BOX_SEPARATOR_POINTS,v as boxSeparatorClasses,o as boxSeparatorOf,u as boxSeparatorSeamClass,x as boxSeparatorStyle,s as isStripBox};
1
+ import{parseTickerSeparator as r,SEPARATOR_GLYPH as c,separatorScaleClass as f,TICKER_SEPARATOR_OPTIONS as n}from"../sections/ticker-style.js";const d=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function o(h){return n.some(t=>t.value===h)?r(h):void 0}const a="overflow-x-clip [&>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function i(h,t){return h==="row"&&o(t)!==void 0}function v(h,t){return i(h,t)?a:""}const p="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)]";function u(h,t){return i(h,t)?p:""}function k(h,t){if(!i(h,t))return{};const s=o(t),e=/^text-\[([\d.]+)em\]$/.exec(f("small",s))?.[1],l=c[s];return{"--sf-sep-mark":l===""?"none":JSON.stringify(l),...e?{"--sf-sep-k":e}:{}}}export{d as BOX_SEPARATOR_POINTS,v as boxSeparatorClasses,o as boxSeparatorOf,u as boxSeparatorSeamClass,k as boxSeparatorStyle,i as isStripBox};
@@ -1 +1 @@
1
- import{galleryCardRatioClass as o}from"./gallery-card-layout.js";const u=["auto","tall","square","landscape","wide"],i=[{label:"Auto",value:"auto"},{label:"Tall (3:4)",value:"tall"},{label:"Square (1:1)",value:"square"},{label:"Landscape (4:3)",value:"landscape"},{label:"Wide (2:1)",value:"wide"}];function t(a){return u.includes(String(a??""))?a:"auto"}function p(a){const e=t(a);return e==="auto"?"":o(e)}const s={tall:"min-[800px]:aspect-[3/4]",square:"min-[800px]:aspect-square",landscape:"min-[800px]:aspect-[4/3]",wide:"min-[800px]:aspect-[2/1]"},r={auto:"max-[800px]:aspect-auto",tall:"max-[800px]:h-auto max-[800px]:aspect-[3/4]",square:"max-[800px]:h-auto max-[800px]:aspect-square",landscape:"max-[800px]:h-auto max-[800px]:aspect-[4/3]",wide:"max-[800px]:h-auto max-[800px]:aspect-[2/1]"};function x(a,e){return u.includes(String(e??""))?e===t(a)?null:e:null}function m(a,e){const l=x(a,e);if(l===null)return p(a);const n=t(a);return[n==="auto"?"":s[n],r[l]].filter(Boolean).join(" ")}export{u as BOX_SHAPES,i as BOX_SHAPE_OPTIONS,p as boxShapeClass,m as boxShapeClasses,t as boxShapeOf,x as boxShapePhoneOf};
1
+ import{galleryCardRatioClass as o}from"./gallery-card-layout.js";const u=["auto","tall","square","landscape","wide"],d=[{label:"Auto",value:"auto"},{label:"Tall (3:4)",value:"tall"},{label:"Square (1:1)",value:"square"},{label:"Landscape (4:3)",value:"landscape"},{label:"Wide (2:1)",value:"wide"}];function t(e){return u.includes(String(e??""))?e:"auto"}function n(e){const a=t(e);return a==="auto"?"":o(a)}const s={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",wide:"view-wide:aspect-[2/1]"},r={auto:"max-view-wide:aspect-auto",tall:"max-view-wide:h-auto max-view-wide:aspect-[3/4]",square:"max-view-wide:h-auto max-view-wide:aspect-square",landscape:"max-view-wide:h-auto max-view-wide:aspect-[4/3]",wide:"max-view-wide:h-auto max-view-wide:aspect-[2/1]"};function w(e,a){return u.includes(String(a??""))?a===t(e)?null:a:null}function p(e,a){const i=w(e,a);if(i===null)return n(e);const l=t(e);return[l==="auto"?"":s[l],r[i]].filter(Boolean).join(" ")}export{u as BOX_SHAPES,d as BOX_SHAPE_OPTIONS,n as boxShapeClass,p as boxShapeClasses,t as boxShapeOf,w as boxShapePhoneOf};
@@ -1 +1 @@
1
- import{buttonArrowShown as f}from"./button-arrow.js";import{nonEmptyString as u}from"../non-empty-string.js";const c=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function l(t){return typeof t=="string"&&c.includes(t)?t:void 0}function x(t,o){return l(t)??(f(o)?"arrow-right":"none")}function p(t){return t==="before"?"before":t==="end"?"end":"after"}function h(t,o){return p(t)==="end"&&n(o)==="fill"}function n(t){return t==="fill"||t==="fixed"?"fill":"fit"}function s(t,o){const r=n(t),e=r==="fill"?["w-full"]:[];if(u(o)){const i=n(o);i!==r&&e.push(i==="fill"?"max-[800px]:w-full":"max-[800px]:w-auto")}return e.join(" ")}export{c as BUTTON_ICONS,h as buttonIconAtEnd,x as buttonIconChoice,p as buttonIconSide,n as buttonWidth,s as buttonWidthClass,l as storedButtonIcon};
1
+ import{buttonArrowShown as f}from"./button-arrow.js";import{nonEmptyString as u}from"../non-empty-string.js";const c=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function l(t){return typeof t=="string"&&c.includes(t)?t:void 0}function w(t,o){return l(t)??(f(o)?"arrow-right":"none")}function d(t){return t==="before"?"before":t==="end"?"end":"after"}function h(t,o){return d(t)==="end"&&n(o)==="fill"}function n(t){return t==="fill"||t==="fixed"?"fill":"fit"}function s(t,o){const r=n(t),e=r==="fill"?["w-full"]:[];if(u(o)){const i=n(o);i!==r&&e.push(i==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return e.join(" ")}export{c as BUTTON_ICONS,h as buttonIconAtEnd,w as buttonIconChoice,d as buttonIconSide,n as buttonWidth,s as buttonWidthClass,l as storedButtonIcon};
@@ -1 +1 @@
1
- import{isNodeList as y}from"efficient-easel/data";const T="template",R="Card template",w=["Text","ImageBlock","ButtonBlock","Flex"],i="rowField",A="rowLinkField";function _(){return{type:"slot",allow:[...w]}}const B=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}],p=Symbol.for("efficient.card-templates");function n(){const t=globalThis;let e=t[p];return e||(e=new Map(B.map(o=>[o.block,o])),t[p]=e),e}function L(t){for(const e of t){if(typeof e.block!="string"||!e.block)throw new Error("A card template names no block.");const o=[];for(const r of e.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${e.block} names an empty block.`);o.some(l=>l.type===r.type)||o.push({type:r.type,label:r.label||r.type})}n().set(e.block,{block:e.block,fields:e.fields.map(r=>({...r})),blocks:o})}}function h(){for(const t of n().values())if(t.blocks?.length)return!0;return!1}function C(t){return n().get(t)?.blocks??[]}function P(t){for(const e of n().values())if(e.blocks?.some(o=>o.type===t))return!0;return!1}function O(t){return typeof t=="string"&&n().has(t)}function F(t,e){const o=n().get(t)?.fields??[];return e?o.filter(r=>(r.kind??"text")===e):o}function D(t,e){return t?n().get(t)?.fields.find(o=>o.key===e)??null:null}function d(t,e=i){const o=t?.[e];return typeof o=="string"?o.trim():""}function S(t){const e={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[o,r]of Object.entries(t))typeof r=="string"&&(e[o]=r);return e}const m={Text:{text:i},ImageBlock:{src:i},ButtonBlock:{label:i,href:A}};function I(t,e,o){const r=m[t]?.[o];return!!(r&&d(e,r))}function g(t,e){return!e||!t?null:t[e]??""}function M(t,e,o){if(!o)return e;let r=null;for(const[l,f]of Object.entries(m[t]??{})){const c=g(o,d(e,f));c!==null&&(r??={...e},r[l]=c)}return r??e}function b(t,e){const o=t?.data?.content;if(!Array.isArray(o)||typeof e!="string")return;const r=(f,c)=>{for(const s of f){if(s?.props?.id===e)return c;for(const[k,u]of Object.entries(s?.props??{})){if(!y(u))continue;const x=k===T&&O(s.type)?{owner:s,direct:!0}:c&&{owner:c.owner,direct:!1},a=r(u,x);if(a!==void 0)return a}}},l=r(o,null);return l===void 0?null:l}function j(t,e){const o=b(t,e);return o&&o.owner}function N(t,e){const o=b(t,e);return o&&(o.direct?o.owner:null)}export{i as CARD_ROW_FIELD_PROP,A as CARD_ROW_LINK_PROP,w as CARD_TEMPLATE_BLOCKS,R as CARD_TEMPLATE_LABEL,T as CARD_TEMPLATE_SLOT,S as cardRow,C as cardTemplateBlocks,N as cardTemplateCardOwner,D as cardTemplateField,F as cardTemplateFields,j as cardTemplateOwner,_ as cardTemplateSlot,h as cardTemplatesNameBlocks,O as hasCardTemplate,P as isCardTemplateBlock,d as namedRowField,L as registerCardTemplates,I as rowBound,g as rowFieldText,M as rowFilledProps};
1
+ import{isNodeList as x}from"efficient-easel/data";import{globalRegistry as y}from"../global-registry.js";const T="template",E="Card template",w=["Text","ImageBlock","ButtonBlock","Flex"],s="rowField",A="rowLinkField";function L(){return{type:"slot",allow:[...w]}}const g=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}];function n(){return y("efficient.card-templates",()=>new Map(g.map(e=>[e.block,e])))}function C(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})}n().set(t.block,{block:t.block,fields:t.fields.map(r=>({...r})),blocks:o})}}function P(){for(const e of n().values())if(e.blocks?.length)return!0;return!1}function h(e){return n().get(e)?.blocks??[]}function F(e){for(const t of n().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function B(e){return typeof e=="string"&&n().has(e)}function D(e,t){const o=n().get(e)?.fields??[];return t?o.filter(r=>(r.kind??"text")===t):o}function I(e,t){return e?n().get(e)?.fields.find(o=>o.key===t)??null:null}function p(e,t=s){const o=e?.[t];return typeof o=="string"?o.trim():""}function M(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[o,r]of Object.entries(e))typeof r=="string"&&(t[o]=r);return t}const d={Text:{text:s},ImageBlock:{src:s},ButtonBlock:{label:s,href:A}};function S(e,t,o){const r=d[e]?.[o];return!!(r&&p(t,r))}function O(e,t){return!t||!e?null:e[t]??""}function j(e,t,o){if(!o)return t;let r=null;for(const[l,f]of Object.entries(d[e]??{})){const c=O(o,p(t,f));c!==null&&(r??={...t},r[l]=c)}return r??t}function m(e,t){const o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const r=(f,c)=>{for(const i of f){if(i?.props?.id===t)return c;for(const[b,u]of Object.entries(i?.props??{})){if(!x(u))continue;const k=b===T&&B(i.type)?{owner:i,direct:!0}:c&&{owner:c.owner,direct:!1},a=r(u,k);if(a!==void 0)return a}}},l=r(o,null);return l===void 0?null:l}function N(e,t){const o=m(e,t);return o&&o.owner}function W(e,t){const o=m(e,t);return o&&(o.direct?o.owner:null)}export{s as CARD_ROW_FIELD_PROP,A as CARD_ROW_LINK_PROP,w as CARD_TEMPLATE_BLOCKS,E as CARD_TEMPLATE_LABEL,T as CARD_TEMPLATE_SLOT,M as cardRow,h as cardTemplateBlocks,W as cardTemplateCardOwner,I as cardTemplateField,D as cardTemplateFields,N as cardTemplateOwner,L as cardTemplateSlot,P as cardTemplatesNameBlocks,B as hasCardTemplate,F as isCardTemplateBlock,p as namedRowField,C as registerCardTemplates,S as rowBound,O as rowFieldText,j as rowFilledProps};
@@ -25,7 +25,7 @@ export declare function siteBlockGapTokens(v?: number | null): Record<string, st
25
25
  export declare const SITE_BLOCK_GAP_PHONE_VAR = "--sf-block-gap-phone";
26
26
  export declare const SITE_BLOCK_GAP_PHONE_REM_VAR = "--sf-block-gap-phone-rem";
27
27
  export declare const SITE_BLOCK_GAP_ON_PHONE_VAR = "--sf-block-gap-on-phone";
28
- export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-[720px]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
28
+ export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
29
29
  export declare function siteBlockGapPhoneTokens(v?: number | null): Record<string, string>;
30
30
  export declare function siteBlockGapPhoneClass(v?: number | null): string;
31
31
  export declare const GAP_ZONE_CLASS = "sf-gap-zone";
@@ -1 +1 @@
1
- const y="sf.gapContainer",r={min:-32,max:64,step:2},f={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},u={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},g=new Set(["Events","GalleryB"]);function x(t,n,o){if(typeof n=="number"&&Number.isFinite(n)&&n>=r.min)return n;if(typeof n=="string"){const e=f[t]?.[n];if(typeof e=="number")return e}return typeof o=="number"&&Number.isFinite(o)?o:u[t]}const O="sf-gap-overlap",b="--sf-gap-overlap",A="--sf-block-gap",C="--sf-block-gap-rem",l={min:0,max:r.max,step:r.step};function _(t){if(typeof t!="number"||!Number.isFinite(t))return null;const n=Math.min(Math.max(Math.round(t),l.min),l.max);return n-n%l.step}function V(t){const n=_(t);return n===null?{}:{[A]:`${n}px`,[C]:`${n/16}rem`}}const L="--sf-block-gap-phone",R="--sf-block-gap-phone-rem",T="--sf-block-gap-on-phone",S="max-[720px]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function H(t){const n=_(t);return n===null?{}:{[L]:`${n}px`,[R]:`${n/16}rem`}}function d(t){return _(t)===null?"":S}const G="sf-gap-zone",m="--sf-gap-len";function E(t,n){return typeof n=="number"&&Number.isFinite(n)&&n>=r.min?!0:typeof n=="string"&&typeof f[t]?.[n]=="number"}const P="--sf-gap-len-phone",I="--sf-gap-len-tablet",h={min:0,max:r.max,step:r.step};function s(t){return typeof t=="number"&&Number.isFinite(t)&&t>=h.min}function $(t){return t/2}function B(t,n,o){return s(o)&&!E(t,n)}function F(t,n,o,e,p){return s(n)?n:B(t,o,p)?p:$(x(t,o,e))}const k={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function K(t,n,o,e,p){const a={...s(e)?{[P]:`${e}px`}:null,...s(p)?{[I]:`${p}px`}:null};if(!E(t,n)){const c=`${u[t]}px`,N=g.has(t)?`var(--sf-card-gap, ${c})`:c;return{className:` ${G}`,style:{[m]:`var(${A}, ${N})`,[P]:`var(${T})`,...a}}}const i=x(t,n);return i>=0?{className:` ${G}`,style:{[m]:`${i}px`,...a}}:{className:` ${O} ${k[o]}`,style:{gap:"0px",[b]:`${-i/2}px`}}}export{g as CARD_GRID_CONTAINERS,r as CONTAINER_GAP,u as CONTAINER_GAP_BUILT_IN,f as CONTAINER_GAP_LEGACY,h as CONTAINER_GAP_PHONE,y as GAP_FIELD_CONTAINER,m as GAP_LENGTH_VAR,O as GAP_OVERLAP_CLASS,b as GAP_OVERLAP_VAR,P as GAP_PHONE_LENGTH_VAR,I as GAP_TABLET_LENGTH_VAR,G as GAP_ZONE_CLASS,l as SITE_BLOCK_GAP,T as SITE_BLOCK_GAP_ON_PHONE_VAR,S as SITE_BLOCK_GAP_PHONE_CLASS,R as SITE_BLOCK_GAP_PHONE_REM_VAR,L as SITE_BLOCK_GAP_PHONE_VAR,C as SITE_BLOCK_GAP_REM_VAR,A as SITE_BLOCK_GAP_VAR,K as containerGapProps,B as followsSitePhoneGap,$ as halfDesktopGap,E as hasOwnContainerGap,s as hasOwnPhoneGap,_ as normalizeSiteBlockGap,x as resolveContainerGap,F as resolvePhoneContainerGap,d as siteBlockGapPhoneClass,H as siteBlockGapPhoneTokens,V as siteBlockGapTokens};
1
+ const y="sf.gapContainer",r={min:-32,max:64,step:2},f={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},u={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},g=new Set(["Events","GalleryB"]);function x(n,t,o){if(typeof t=="number"&&Number.isFinite(t)&&t>=r.min)return t;if(typeof t=="string"){const e=f[n]?.[t];if(typeof e=="number")return e}return typeof o=="number"&&Number.isFinite(o)?o:u[n]}const b="sf-gap-overlap",O="--sf-gap-overlap",A="--sf-block-gap",C="--sf-block-gap-rem",l={min:0,max:r.max,step:r.step};function a(n){if(typeof n!="number"||!Number.isFinite(n))return null;const t=Math.min(Math.max(Math.round(n),l.min),l.max);return t-t%l.step}function V(n){const t=a(n);return t===null?{}:{[A]:`${t}px`,[C]:`${t/16}rem`}}const L="--sf-block-gap-phone",R="--sf-block-gap-phone-rem",T="--sf-block-gap-on-phone",S="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function H(n){const t=a(n);return t===null?{}:{[L]:`${t}px`,[R]:`${t/16}rem`}}function d(n){return a(n)===null?"":S}const G="sf-gap-zone",m="--sf-gap-len";function E(n,t){return typeof t=="number"&&Number.isFinite(t)&&t>=r.min?!0:typeof t=="string"&&typeof f[n]?.[t]=="number"}const P="--sf-gap-len-phone",I="--sf-gap-len-tablet",h={min:0,max:r.max,step:r.step};function s(n){return typeof n=="number"&&Number.isFinite(n)&&n>=h.min}function $(n){return n/2}function B(n,t,o){return s(o)&&!E(n,t)}function F(n,t,o,e,p){return s(t)?t:B(n,o,p)?p:$(x(n,o,e))}const k={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function w(n,t,o,e,p){const _={...s(e)?{[P]:`${e}px`}:null,...s(p)?{[I]:`${p}px`}:null};if(!E(n,t)){const c=`${u[n]}px`,N=g.has(n)?`var(--sf-card-gap, ${c})`:c;return{className:` ${G}`,style:{[m]:`var(${A}, ${N})`,[P]:`var(${T})`,..._}}}const i=x(n,t);return i>=0?{className:` ${G}`,style:{[m]:`${i}px`,..._}}:{className:` ${b} ${k[o]}`,style:{gap:"0px",[O]:`${-i/2}px`}}}export{g as CARD_GRID_CONTAINERS,r as CONTAINER_GAP,u as CONTAINER_GAP_BUILT_IN,f as CONTAINER_GAP_LEGACY,h as CONTAINER_GAP_PHONE,y as GAP_FIELD_CONTAINER,m as GAP_LENGTH_VAR,b as GAP_OVERLAP_CLASS,O as GAP_OVERLAP_VAR,P as GAP_PHONE_LENGTH_VAR,I as GAP_TABLET_LENGTH_VAR,G as GAP_ZONE_CLASS,l as SITE_BLOCK_GAP,T as SITE_BLOCK_GAP_ON_PHONE_VAR,S as SITE_BLOCK_GAP_PHONE_CLASS,R as SITE_BLOCK_GAP_PHONE_REM_VAR,L as SITE_BLOCK_GAP_PHONE_VAR,C as SITE_BLOCK_GAP_REM_VAR,A as SITE_BLOCK_GAP_VAR,w as containerGapProps,B as followsSitePhoneGap,$ as halfDesktopGap,E as hasOwnContainerGap,s as hasOwnPhoneGap,a as normalizeSiteBlockGap,x as resolveContainerGap,F as resolvePhoneContainerGap,d as siteBlockGapPhoneClass,H as siteBlockGapPhoneTokens,V as siteBlockGapTokens};
@@ -26,7 +26,7 @@ export declare const SITE_GUTTER_PHONE: {
26
26
  readonly step: 4;
27
27
  };
28
28
  export declare const SITE_GUTTER_PHONE_VAR = "--sf-site-gutter-phone";
29
- export declare const SITE_GUTTER_PHONE_CLASS = "max-[720px]:[--sf-site-gutter:var(--sf-site-gutter-phone)]!";
29
+ export declare const SITE_GUTTER_PHONE_CLASS = "max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!";
30
30
  export declare const SITE_GUTTER_CAP: string;
31
31
  export declare const SITE_GUTTER_CLASS: string;
32
32
  export declare const PRE_SITE_GUTTER_CLASSES: readonly ["px-10", "px-[60px]"];
@@ -38,8 +38,8 @@ export declare const SITE_GUTTER_NARROW: {
38
38
  };
39
39
  export declare const SITE_GUTTER_SUBSTITUTIONS: ReadonlyArray<readonly [string, string]>;
40
40
  export declare function asMainGutters(html: string): string;
41
- export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";
42
- export declare const EDITORIAL_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";
41
+ 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))]";
42
+ export declare const EDITORIAL_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";
43
43
  export declare function normalizeSiteGutter(v?: number | null): number;
44
44
  export declare function siteGutterTokens(v?: number | null): Record<string, string>;
45
45
  export declare function normalizeSiteGutterPhone(v?: number | null): number | null;
@@ -1 +1 @@
1
- const n={min:1e3,max:2e3,step:50,default:1600};function u(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function w(t,e){if(t!==!1)return null;const a=typeof e=="number"?e:n.default;return u(a)}const s="--sf-site-width",o=`var(${s},${n.default}px)`,C=`max-w-[${o}]`,D=`max-w-[${n.default}px]`;function S(t){return typeof t!="number"||!Number.isFinite(t)?n.default:Math.round(Math.min(Math.max(t,n.min),n.max))}function U(t){const e=S(t);return e===n.default?{}:{[s]:`${e}px`}}const p={min:0,max:80,step:4,default:40},_="--sf-site-gutter",i={min:0,max:24,step:4},A="--sf-site-gutter-phone",h="max-[720px]:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",x=`var(${_},${p.default}px)`,$=`px-[${x}]`,W=["px-10","px-[60px]"],r={md:`min(24px,${x})`,sm:`min(20px,${x})`,frame:`min(24px,${x})`,tabs:`min(16px,${x})`},d=[[`max-[1100px]:px-[${r.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${r.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${r.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${r.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${r.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${r.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${r.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${r.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${x}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${x})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${x})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${x})]`,"max-[720px]:-mx-5"],[`-mx-[${x}]`,"-mx-10"],[$,"px-10"]];function L(t){return d.reduce((e,[a,R])=>e.split(a).join(R),t)}const N="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",b="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";function c(t){return typeof t!="number"||!Number.isFinite(t)?p.default:Math.round(Math.min(Math.max(t,p.min),p.max))}function V(t){const e=c(t);return e===p.default?{}:{[_]:`${e}px`}}function f(t){return typeof t!="number"||!Number.isFinite(t)?null:Math.round(Math.min(Math.max(t,i.min),i.max))}function v(t){const e=f(t);return e===null?{}:{[A]:`${e}px`}}function y(t){return f(t)===null?"":h}function B(t){return Math.min(i.max,c(t))}function H(t=0){return`calc(${o}/2 - ${x}*2 - ${t}px)`}function k(t=0){return`max-w-[${H(t).replace(/ /g,"_")}]`}const l=o,F=`max-w-[${l}]`,z=`max-w-[min(var(--sf-page-cap,${n.default}px),${n.default}px)]`,E="--sf-hero-cap",I=`var(${E},none)`,K=`max-w-[${I}]`,O="--sf-hero-bleed-m",P="--sf-hero-bleed-w",G="--sf-hero-chrome-x",M="--sf-hero-chrome-cap";function j(t){return t===!0?{[E]:l,[O]:"auto",[P]:"100%",[G]:"24px",[M]:"none"}:{}}const m=`calc(${o} - ${x}*2)`,q=`max-w-[${m.replace(/ /g,"_")}]`,J=C;function Q(t){return t!==!1?null:u(T)}const g="--sf-chrome-cap",T=`var(${g},${m})`,X="data-page-width";function Y(t){return t==="full"?"full":null}function Z(t){return t==="full"?null:u(t==="content"?m:T)}function tt(t){if(t==="full")return"full";if(t==="content")return"content"}export{T as CHROME_CAP_READ,g as CHROME_CAP_VAR,m as CHROME_WIDTH_CAP,q as CHROME_WIDTH_CAP_CLASS,b as EDITORIAL_COLUMN,I as HERO_BACKGROUND_CAP,K as HERO_BACKGROUND_CAP_CLASS,E as HERO_BACKGROUND_VAR,O as HERO_BLEED_MARGIN_VAR,P as HERO_BLEED_WIDTH_VAR,l as HERO_CAP,F as HERO_CAP_CLASS,M as HERO_CHROME_CAP_VAR,G as HERO_CHROME_INSET_VAR,n as PAGE_WIDTH,X as PAGE_WIDTH_ATTR,J as PRE_CHROME_WIDTH_CAP_CLASS,z as PRE_HERO_CAP_CLASS,W as PRE_SITE_GUTTER_CLASSES,D as PRE_SITE_WIDTH_CAP_CLASS,N as SITE_COLUMN,p as SITE_GUTTER,x as SITE_GUTTER_CAP,$ as SITE_GUTTER_CLASS,r as SITE_GUTTER_NARROW,i as SITE_GUTTER_PHONE,h as SITE_GUTTER_PHONE_CLASS,A as SITE_GUTTER_PHONE_VAR,d as SITE_GUTTER_SUBSTITUTIONS,_ as SITE_GUTTER_VAR,o as SITE_WIDTH_CAP,C as SITE_WIDTH_CAP_CLASS,s as SITE_WIDTH_VAR,L as asMainGutters,u as centredCap,Z as chromeWidthStyle,j as heroBackgroundTokens,c as normalizeSiteGutter,f as normalizeSiteGutterPhone,S as normalizeSiteWidth,Y as pageWidthMarker,w as pageWidthStyle,tt as resolveChromeWidth,y as siteGutterPhoneClass,B as siteGutterPhoneFollows,v as siteGutterPhoneTokens,V as siteGutterTokens,H as siteHalfColumnCap,k as siteHalfColumnCapClass,Q as siteWidthCapStyle,U as siteWidthTokens};
1
+ const r={min:1e3,max:2e3,step:50,default:1600};function a(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function M(t,e){if(t!==!1)return null;const i=typeof e=="number"?e:r.default;return a(i)}const m="--sf-site-width",p=`var(${m},${r.default}px)`,R=`max-w-[${p}]`,b=`max-w-[${r.default}px]`;function w(t){return typeof t!="number"||!Number.isFinite(t)?r.default:Math.round(Math.min(Math.max(t,r.min),r.max))}function g(t){const e=w(t);return e===r.default?{}:{[m]:`${e}px`}}const o={min:0,max:80,step:4,default:40},_="--sf-site-gutter",u={min:0,max:24,step:4},C="--sf-site-gutter-phone",S="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",n=`var(${_},${o.default}px)`,A=`px-[${n}]`,D=["px-10","px-[60px]"],x={md:`min(24px,${n})`,sm:`min(20px,${n})`,frame:`min(24px,${n})`,tabs:`min(16px,${n})`},h=[[`max-view-desktop:px-[${x.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${x.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${x.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${x.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${x.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${x.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${x.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${x.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${n}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${n})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${n})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${n})]`,"max-view-tablet:-mx-5"],[`-mx-[${n}]`,"-mx-10"],[A,"px-10"]];function U(t){return h.reduce((e,[i,d])=>e.split(i).join(d),t)}const W="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))]",L="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function c(t){return typeof t!="number"||!Number.isFinite(t)?o.default:Math.round(Math.min(Math.max(t,o.min),o.max))}function N(t){const e=c(t);return e===o.default?{}:{[_]:`${e}px`}}function f(t){return typeof t!="number"||!Number.isFinite(t)?null:Math.round(Math.min(Math.max(t,u.min),u.max))}function k(t){const e=f(t);return e===null?{}:{[C]:`${e}px`}}function V(t){return f(t)===null?"":S}function y(t){return Math.min(u.max,c(t))}function $(t=0){return`calc(${p}/2 - ${n}*2 - ${t}px)`}function B(t=0){return`max-w-[${$(t).replace(/ /g,"_")}]`}const l=p,F=`max-w-[${l}]`,z=`max-w-[min(var(--sf-page-cap,${r.default}px),${r.default}px)]`,E="--sf-hero-cap",H=`var(${E},none)`,K=`max-w-[${H}]`,I="--sf-hero-bleed-m",v="--sf-hero-bleed-w",O="--sf-hero-chrome-x",P="--sf-hero-chrome-cap";function j(t){return t===!0?{[E]:l,[I]:"auto",[v]:"100%",[O]:"24px",[P]:"none"}:{}}const s=`calc(${p} - ${n}*2)`,q=`max-w-[${s.replace(/ /g,"_")}]`,J=R;function Q(t){return t!==!1?null:a(T)}const G="--sf-chrome-cap",T=`var(${G},${s})`,X="data-page-width";function Y(t){return t==="full"?"full":null}function Z(t){return t==="full"?null:a(t==="content"?s:T)}function tt(t){if(t==="full")return"full";if(t==="content")return"content"}export{T as CHROME_CAP_READ,G as CHROME_CAP_VAR,s as CHROME_WIDTH_CAP,q as CHROME_WIDTH_CAP_CLASS,L as EDITORIAL_COLUMN,H as HERO_BACKGROUND_CAP,K as HERO_BACKGROUND_CAP_CLASS,E as HERO_BACKGROUND_VAR,I as HERO_BLEED_MARGIN_VAR,v as HERO_BLEED_WIDTH_VAR,l as HERO_CAP,F as HERO_CAP_CLASS,P as HERO_CHROME_CAP_VAR,O as HERO_CHROME_INSET_VAR,r as PAGE_WIDTH,X as PAGE_WIDTH_ATTR,J as PRE_CHROME_WIDTH_CAP_CLASS,z as PRE_HERO_CAP_CLASS,D as PRE_SITE_GUTTER_CLASSES,b as PRE_SITE_WIDTH_CAP_CLASS,W as SITE_COLUMN,o as SITE_GUTTER,n as SITE_GUTTER_CAP,A as SITE_GUTTER_CLASS,x as SITE_GUTTER_NARROW,u as SITE_GUTTER_PHONE,S as SITE_GUTTER_PHONE_CLASS,C as SITE_GUTTER_PHONE_VAR,h as SITE_GUTTER_SUBSTITUTIONS,_ as SITE_GUTTER_VAR,p as SITE_WIDTH_CAP,R as SITE_WIDTH_CAP_CLASS,m as SITE_WIDTH_VAR,U as asMainGutters,a as centredCap,Z as chromeWidthStyle,j as heroBackgroundTokens,c as normalizeSiteGutter,f as normalizeSiteGutterPhone,w as normalizeSiteWidth,Y as pageWidthMarker,M as pageWidthStyle,tt as resolveChromeWidth,V as siteGutterPhoneClass,y as siteGutterPhoneFollows,k as siteGutterPhoneTokens,N as siteGutterTokens,$ as siteHalfColumnCap,B as siteHalfColumnCapClass,Q as siteWidthCapStyle,g as siteWidthTokens};
@@ -1 +1 @@
1
- function r(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const n={};for(const[o,t]of Object.entries(e))typeof t=="boolean"&&(n[o]=t);return n}function s(e,n){return r(e)[n]!==!1}function f(e,n,o){const t=r(n)[o];return typeof t=="boolean"?t:s(e,o)}function p(e){return Object.values(r(e)).some(n=>n===!1)}function c(e){return Object.keys(r(e)).length>0}function u(e,n,o){const t={...r(e)};return o?delete t[n]:t[n]=!1,Object.keys(t).length?t:void 0}function a(e,n,o){return{...r(e),[n]:o}}function h(e,n,o){const t=s(e,o),i=f(e,n,o);return t&&i?"":!t&&!i?"hidden":t?"max-[720px]:hidden":"min-[720px]:hidden"}export{p as desktopDisplayChanged,h as partDisplayClass,s as partShownOnDesktop,f as partShownOnPhone,c as phoneDisplayChanged,r as readPartDisplay,u as withDesktopPart,a as withPhonePart};
1
+ function r(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[o,n]of Object.entries(e))typeof n=="boolean"&&(t[o]=n);return t}function s(e,t){return r(e)[t]!==!1}function f(e,t,o){const n=r(t)[o];return typeof n=="boolean"?n:s(e,o)}function c(e){return Object.values(r(e)).some(t=>t===!1)}function p(e){return Object.keys(r(e)).length>0}function u(e,t,o){const n={...r(e)};return o?delete n[t]:n[t]=!1,Object.keys(n).length?n:void 0}function a(e,t,o){return{...r(e),[t]:o}}function h(e,t,o){const n=s(e,o),i=f(e,t,o);return n&&i?"":!n&&!i?"hidden":n?"max-view-tablet:hidden":"view-tablet:hidden"}export{c as desktopDisplayChanged,h as partDisplayClass,s as partShownOnDesktop,f as partShownOnPhone,p as phoneDisplayChanged,r as readPartDisplay,u as withDesktopPart,a as withPhonePart};
@@ -61,5 +61,5 @@ export declare function sectionMinHeightAttrs(props: SectionMinHeightProps & Sec
61
61
  export declare function sectionFillsHeight(props: Record<string, unknown>): boolean;
62
62
  export declare const SECTION_FILL_PASS_CLASS = "grid grid-cols-[minmax(0,1fr)]";
63
63
  export declare const SECTION_FILL_CLASS = "h-full";
64
- export declare const SECTION_FILL_PASS_PHONE_CLASS = "max-[720px]:grid grid-cols-[minmax(0,1fr)]";
64
+ export declare const SECTION_FILL_PASS_PHONE_CLASS = "max-view-tablet:grid grid-cols-[minmax(0,1fr)]";
65
65
  export declare function sectionFillPassClass(props: Record<string, unknown>): string;
@@ -1 +1 @@
1
- const I=["auto","fixed","screen"],f=["px","%"],M="svh",P="vh",E="var(--sf-header-h, 88px)",S={min:40,max:2e3,step:10,fallback:600},g={min:10,max:200,step:5,fallback:100},x="sf-section-minh",s="grid-cols-[minmax(0,1fr)]",l={base:"--sf-section-minh",small:"--sf-section-minh-s"},h=e=>typeof e=="string"&&I.includes(e),T=e=>typeof e=="string"&&f.includes(e);function H(e){const t=h(e.sectionHeightMode)?e.sectionHeightMode:"auto",n=t==="screen"?"%":T(e.sectionHeightUnit)?e.sectionHeightUnit:"px",o=t==="screen"?g.fallback:S.fallback,i=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:o;return{mode:t,value:i,unit:n}}function a(e){const{mode:t,value:n,unit:o}=H(e);if(t==="auto")return;if(t==="fixed"&&o==="px")return[`${n}px`,null];const i=n/100,c=r=>t==="screen"?`(100${r} - ${E})`:`100${r}`;return[`calc(${c("vh")} * ${i})`,`calc(${c("svh")} * ${i})`]}function _(e){const t=a(e);if(!t)return;const[n,o]=t;return{display:"grid",[l.base]:n,...o?{[l.small]:o}:{}}}const p=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),A="Height",N="sf-section-minh-phone",u={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function d(e){return h(e.sectionHeightModePhone)}function U(e){return H({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function C(e){const t=_(e),n=d(e)?a({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})??(t?["auto",null]:void 0):void 0;if(!t&&!n)return null;const o=[x,s],i={...t??{}};return n&&(o.push(N),i[u.base]=n[0],n[1]&&(i[u.small]=n[1])),{className:o.join(" "),style:i}}function O(e){return C(e)!==null}const m=`grid ${s}`,V="h-full",L=`max-[720px]:grid ${s}`;function b(e){return O(e)?_(e)?m:L:""}export{E as HEADER_HEIGHT_VAR,V as SECTION_FILL_CLASS,m as SECTION_FILL_PASS_CLASS,L as SECTION_FILL_PASS_PHONE_CLASS,s as SECTION_GRID_COLUMN_CLASS,I as SECTION_HEIGHT_MODES,f as SECTION_HEIGHT_UNITS,S as SECTION_MIN_HEIGHT,x as SECTION_MIN_HEIGHT_CLASS,p as SECTION_MIN_HEIGHT_EXCLUDED,A as SECTION_MIN_HEIGHT_GROUP_LABEL,N as SECTION_MIN_HEIGHT_PHONE_CLASS,u as SECTION_MIN_HEIGHT_PHONE_VARS,l as SECTION_MIN_HEIGHT_VARS,g as SECTION_SCREEN_PCT,M as VIEWPORT_UNIT,P as VIEWPORT_UNIT_FALLBACK,d as hasPhoneHeight,U as resolvePhoneHeight,H as resolveSectionMinHeight,b as sectionFillPassClass,O as sectionFillsHeight,C as sectionMinHeightAttrs,a as sectionMinHeightLengths,_ as sectionMinHeightStyle};
1
+ const I=["auto","fixed","screen"],f=["px","%"],M="svh",P="vh",E="var(--sf-header-h, 88px)",S={min:40,max:2e3,step:10,fallback:600},g={min:10,max:200,step:5,fallback:100},x="sf-section-minh",s="grid-cols-[minmax(0,1fr)]",l={base:"--sf-section-minh",small:"--sf-section-minh-s"},h=e=>typeof e=="string"&&I.includes(e),T=e=>typeof e=="string"&&f.includes(e);function H(e){const t=h(e.sectionHeightMode)?e.sectionHeightMode:"auto",n=t==="screen"?"%":T(e.sectionHeightUnit)?e.sectionHeightUnit:"px",o=t==="screen"?g.fallback:S.fallback,i=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:o;return{mode:t,value:i,unit:n}}function a(e){const{mode:t,value:n,unit:o}=H(e);if(t==="auto")return;if(t==="fixed"&&o==="px")return[`${n}px`,null];const i=n/100,c=r=>t==="screen"?`(100${r} - ${E})`:`100${r}`;return[`calc(${c("vh")} * ${i})`,`calc(${c("svh")} * ${i})`]}function _(e){const t=a(e);if(!t)return;const[n,o]=t;return{display:"grid",[l.base]:n,...o?{[l.small]:o}:{}}}const p=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),A="Height",N="sf-section-minh-phone",u={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function d(e){return h(e.sectionHeightModePhone)}function U(e){return H({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function C(e){const t=_(e),n=d(e)?a({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})??(t?["auto",null]:void 0):void 0;if(!t&&!n)return null;const o=[x,s],i={...t??{}};return n&&(o.push(N),i[u.base]=n[0],n[1]&&(i[u.small]=n[1])),{className:o.join(" "),style:i}}function O(e){return C(e)!==null}const m=`grid ${s}`,b="h-full",L=`max-view-tablet:grid ${s}`;function V(e){return O(e)?_(e)?m:L:""}export{E as HEADER_HEIGHT_VAR,b as SECTION_FILL_CLASS,m as SECTION_FILL_PASS_CLASS,L as SECTION_FILL_PASS_PHONE_CLASS,s as SECTION_GRID_COLUMN_CLASS,I as SECTION_HEIGHT_MODES,f as SECTION_HEIGHT_UNITS,S as SECTION_MIN_HEIGHT,x as SECTION_MIN_HEIGHT_CLASS,p as SECTION_MIN_HEIGHT_EXCLUDED,A as SECTION_MIN_HEIGHT_GROUP_LABEL,N as SECTION_MIN_HEIGHT_PHONE_CLASS,u as SECTION_MIN_HEIGHT_PHONE_VARS,l as SECTION_MIN_HEIGHT_VARS,g as SECTION_SCREEN_PCT,M as VIEWPORT_UNIT,P as VIEWPORT_UNIT_FALLBACK,d as hasPhoneHeight,U as resolvePhoneHeight,H as resolveSectionMinHeight,V as sectionFillPassClass,O as sectionFillsHeight,C as sectionMinHeightAttrs,a as sectionMinHeightLengths,_ as sectionMinHeightStyle};
@@ -0,0 +1,11 @@
1
+ export declare const RESPONSIVE_RULES: "v1" | "v2";
2
+ export declare const VIEW_LINE_PX: {
3
+ readonly "view-tablet": 720;
4
+ readonly "view-desktop": 1100;
5
+ readonly "view-wide": 800 | 720;
6
+ };
7
+ export type ViewLine = keyof typeof VIEW_LINE_PX;
8
+ export declare function breakpointOf(variant: string): {
9
+ px: number;
10
+ max: boolean;
11
+ } | undefined;
@@ -0,0 +1 @@
1
+ import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as i}from"efficient-easel/screen/lib/content/view-tiers";const s="v1",c=e=>e==="v2"?i:800,x={"view-tablet":i,"view-desktop":r,"view-wide":c(s)};function p(e){const n=e.startsWith("max-"),o=n?e.slice(4):e;if(o in x)return{px:x[o],max:n};const t=/^(max|min)-\[(\d+)px\]$/.exec(e);return t?{px:Number(t[2]),max:t[1]==="max"}:void 0}export{s as RESPONSIVE_RULES,x as VIEW_LINE_PX,p as breakpointOf};
@@ -3,5 +3,9 @@ export declare const HeroSlots: {
3
3
  slides: {
4
4
  type: "slot";
5
5
  };
6
+ strip: {
7
+ type: "slot";
8
+ allow: string[];
9
+ };
6
10
  };
7
11
  export declare const HeroMeta: BlockMeta;
@@ -1 +1 @@
1
- import{DEFAULT_TICKER_ITEMS as t}from"../../../../hero-ticker.js";const o={slides:{type:"slot"}},r={label:"Hero Slideshow",fields:o,defaultProps:{alignment:"left",textureOpacity:40,autoplay:!1,autoplayInterval:6,showTicker:!0,tickerItems:t.map(e=>({text:e}))}};export{r as HeroMeta,o as HeroSlots};
1
+ const e={slides:{type:"slot"},strip:{type:"slot",allow:["Flex"]}},t={label:"Hero Slideshow",fields:e,defaultProps:{alignment:"left",textureOpacity:40,autoplay:!1,autoplayInterval:6}};export{t as HeroMeta,e as HeroSlots};
@@ -39,7 +39,7 @@ export type PassInspector = {
39
39
  anchorFields: () => FieldMap;
40
40
  stickFields: () => FieldMap;
41
41
  sectionThemeFields: (readValue?: (v: unknown) => unknown, followLabel?: string) => FieldMap;
42
- animationTabFields: (kind: AnimationTabKind) => FieldMap;
42
+ animationTabFields: (kind: AnimationTabKind, blockKey?: string) => FieldMap;
43
43
  blockSizeFields: (opts?: {
44
44
  textFit?: TextFit;
45
45
  }) => {