efficient-web-builder 73.1.0 → 73.2.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 (101) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/editor/components/SlotChildRows.js +1 -1
  3. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  4. package/dist/editor/components/StorefrontEditor.js +1 -1
  5. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  6. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +5 -0
  11. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  12. package/dist/editor/lib/document/controls.js +1 -1
  13. package/dist/editor/lib/document/footer-blocks.js +1 -1
  14. package/dist/editor/lib/document/own-pad-fields.d.ts +5 -0
  15. package/dist/editor/lib/document/own-pad-fields.js +1 -0
  16. package/dist/editor/lib/document/passes/inspector.js +1 -1
  17. package/dist/editor/lib/editor-document-adapter.js +1 -1
  18. package/dist/format/lib/animation/hover.js +1 -1
  19. package/dist/format/lib/content/accordion-row-style.d.ts +3 -1
  20. package/dist/format/lib/content/accordion-row-style.js +1 -1
  21. package/dist/format/lib/content/box-layout.js +1 -1
  22. package/dist/format/lib/content/box-shape.d.ts +1 -1
  23. package/dist/format/lib/content/button-icon.d.ts +3 -1
  24. package/dist/format/lib/content/button-icon.js +1 -1
  25. package/dist/format/lib/content/card-place.d.ts +3 -1
  26. package/dist/format/lib/content/card-place.js +1 -1
  27. package/dist/format/lib/content/chat-launcher.js +1 -1
  28. package/dist/format/lib/content/container-direction.js +1 -1
  29. package/dist/format/lib/content/footprint.d.ts +22 -0
  30. package/dist/format/lib/content/footprint.js +1 -1
  31. package/dist/format/lib/content/image-fit.js +1 -1
  32. package/dist/format/lib/content/image-text-rows.d.ts +5 -2
  33. package/dist/format/lib/content/image-text-rows.js +1 -1
  34. package/dist/format/lib/content/list-number.js +1 -1
  35. package/dist/format/lib/content/list-position.js +1 -1
  36. package/dist/format/lib/content/text-tag.js +1 -1
  37. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  38. package/dist/format/lib/document/box-footer.js +1 -1
  39. package/dist/format/lib/document/left-view.js +1 -1
  40. package/dist/format/lib/document/mockup-variant-fields.js +1 -1
  41. package/dist/format/lib/document/passes/types.d.ts +1 -0
  42. package/dist/format/lib/document/section-groups.js +1 -1
  43. package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
  44. package/dist/format/lib/editor-words-catalogue.js +4 -4
  45. package/dist/format/lib/hero-arrows.js +1 -1
  46. package/dist/format/lib/hero-group-placement.js +1 -1
  47. package/dist/format/lib/hero-media-layout.js +1 -1
  48. package/dist/format/lib/hero-phone-stack.d.ts +12 -0
  49. package/dist/format/lib/hero-phone-stack.js +1 -1
  50. package/dist/format/lib/hero-video.js +1 -1
  51. package/dist/format/lib/reel.js +1 -1
  52. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  53. package/dist/format/lib/sections/section-head-placement.d.ts +3 -1
  54. package/dist/format/lib/sections/section-head-placement.js +1 -1
  55. package/dist/format/lib/source-rules/one-option-parser.d.ts +12 -0
  56. package/dist/format/lib/source-rules/one-option-parser.js +12 -0
  57. package/dist/format/lib/theme.d.ts +2 -1
  58. package/dist/format/lib/theme.js +4 -4
  59. package/dist/render/components/BoxTabPaneContext.d.ts +2 -3
  60. package/dist/render/components/ButtonBlock.d.ts +2 -0
  61. package/dist/render/components/ButtonBlock.js +1 -1
  62. package/dist/render/components/DealerFinder.d.ts +7 -1
  63. package/dist/render/components/DealerFinder.js +1 -1
  64. package/dist/render/components/Footprint.d.ts +6 -2
  65. package/dist/render/components/Footprint.js +1 -1
  66. package/dist/render/components/Heading.d.ts +1 -1
  67. package/dist/render/components/Heading.js +1 -1
  68. package/dist/render/components/HeroSection.d.ts +4 -1
  69. package/dist/render/components/HeroSection.js +1 -1
  70. package/dist/render/components/HeroSingle.d.ts +4 -1
  71. package/dist/render/components/HeroSingle.js +1 -1
  72. package/dist/render/components/HeroSlide.d.ts +3 -0
  73. package/dist/render/components/HeroSlide.js +1 -1
  74. package/dist/render/components/SideListLayout.d.ts +8 -2
  75. package/dist/render/components/SideListLayout.js +1 -1
  76. package/dist/render/components/SiteGutterFrame.js +1 -1
  77. package/dist/render/components/Text.d.ts +1 -1
  78. package/dist/render/components/Text.js +1 -1
  79. package/dist/render/lib/content/section-padding.d.ts +36 -2
  80. package/dist/render/lib/content/section-padding.js +1 -1
  81. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  82. package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
  83. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  84. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  85. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  86. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  87. package/dist/render/lib/document/blocks/general/LogoBlock/render.js +1 -1
  88. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  89. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  90. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  91. package/dist/render/lib/document/custom-css.d.ts +4 -2
  92. package/dist/render/lib/document/custom-css.js +2 -2
  93. package/dist/render/lib/document/header-clearance.js +1 -1
  94. package/dist/render/lib/document/header-ink.js +1 -1
  95. package/dist/render/lib/document/passes/section-padding.d.ts +4 -0
  96. package/dist/render/lib/document/passes/section-padding.js +1 -1
  97. package/dist/render/lib/document/sanitize.d.ts +4 -1
  98. package/dist/render/lib/document/sanitize.js +1 -1
  99. package/dist/routine-index.json +1 -0
  100. package/dist/value-index.json +1 -0
  101. package/package.json +5 -4
@@ -1 +1 @@
1
- import{SECTION_CSS_KEY as m}from"../content/section-css.js";import{ENTRANCE_STORE_KEYS as S,LEGACY_ENTRANCE_KEY as E}from"../animation/entrance-keys.js";import{SCROLL_STORE_KEYS as f}from"../animation/scroll.js";import{PICTURE_DOTS as u,viewFocusKeys as T}from"../content/picture-focus-rows.js";import{SECTION_PIN_KEYS as _}from"../content/section-sticky.js";import{SECTION_CORNERS_ROW as O}from"../content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as v}from"../content/borders.js";import{SECTION_WIDTH_KEYS as b}from"../content/section-width.js";import{DEFAULT_TINT as w}from"../content/tint.js";import{finiteNumber as g}from"../finite-number.js";import{nonEmptyString as d}from"../non-empty-string.js";import{DEFAULT_OVERLAY_POSITION as H}from"./hero-overlay.js";import{normaliseVideoSource as C}from"../hero-video.js";import{heroMediaType as I}from"../hero-media-layout.js";import{VIEW_HIDE_KEYS as x}from"../content/view-hide-class.js";import{ownEntry as k}from"../own-entry.js";import{seedNodeId as N}from"../document/seed-parts.js";const R=50,h=["mediaImage","mediaVideo","poster","tintColor","mediaLayout","mediaLayoutPhone","mediaImage2","tintColor2","tintOpacity2","videoSource","youtubeUrl","videoPlayback","_partMotion",...u.filter(r=>r.block==="HeroSingle").flatMap(r=>T(r.focus))],P=[m,"heightDesktop","heightMobile","heightFixed","heightFixedTablet","heightFixedMobile","sectionCorners",O.unitKey,"sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone",...v,"sectionAccent",..._,"anchor",...S,E,...f,...Object.values(b),...x],A=new Set(P),D="the Hero does not read this key as a section setting (only the section pass rows both heroes share carry), so it is not copied",K={eyebrow:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleTop:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleLevel:"it set the level of the copy the single Hero stopped drawing on 2026-09-09; a Text block in a box sets its own level",alignment:"its row was deleted on 2026-09-09 with the copy it placed; a box places itself on nine anchors, and the value was drawn by nothing"};function ee(r){const e=r.props,p=N(e,"HeroSingle"),i=[],n=[],t={id:`${p}~slide`},s={id:`${p}~hero`},a=I("HeroSingle",e.mediaType);t.mediaType=a,"mediaType"in e&&i.push({key:"mediaType",home:"HeroSlide.mediaType"}),a==="video"&&C(e.videoSource)==="upload"&&(t.videoSpeed=R);for(const o of h)o in e&&(t[o]=e[o],i.push({key:o,home:`HeroSlide.${o}`}));"tintOpacity"in e&&(t.overlay=e.tintOpacity,i.push({key:"tintOpacity",home:"HeroSlide.overlay (Image tint)"})),t.overlayColor=d(e.overlayColor)??w,t.overlayPosition=d(e.overlayPosition)??H,"overlayColor"in e&&i.push({key:"overlayColor",home:"HeroSlide.overlayColor"}),"overlayPosition"in e&&i.push({key:"overlayPosition",home:"HeroSlide.overlayPosition"}),Array.isArray(e.boxes)?(t.groups=e.boxes,i.push({key:"boxes",home:"HeroSlide.groups (the same HeroGroup boxes)"})):"boxes"in e&&i.push({key:"boxes",home:"HeroSlide.groups (none stored)"}),s.textureOpacity=g(e.overlay)??100,"overlay"in e&&i.push({key:"overlay",home:"Hero.textureOpacity (the ramp's opacity)"}),s.showTicker=!1;const c=new Set(["id","mediaType","tintOpacity","overlay","overlayColor","overlayPosition","boxes",...h]);for(const[o,y]of Object.entries(e)){if(c.has(o))continue;const l=k(K,o);if(l!==void 0){n.push({key:o,why:l});continue}if(!A.has(o)){n.push({key:o,why:D});continue}s[o]=y,i.push({key:o,home:`Hero.${o} (section pass)`})}return s.slides=[{type:"HeroSlide",props:t}],{node:{type:"Hero",props:s},carried:i,dropped:n}}export{P as HERO_SECTION_PASS_KEYS,ee as heroSingleToHero};
1
+ import{SECTION_CSS_KEY as S}from"../content/section-css.js";import{ENTRANCE_STORE_KEYS as f,LEGACY_ENTRANCE_KEY as E}from"../animation/entrance-keys.js";import{SCROLL_STORE_KEYS as u}from"../animation/scroll.js";import{PICTURE_DOTS as T,viewFocusKeys as _}from"../content/picture-focus-rows.js";import{SECTION_PIN_KEYS as O}from"../content/section-sticky.js";import{SECTION_CORNERS_ROW as v}from"../content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as b}from"../content/borders.js";import{SECTION_WIDTH_KEYS as H}from"../content/section-width.js";import{DEFAULT_TINT as w}from"../content/tint.js";import{finiteNumber as g}from"../finite-number.js";import{nonEmptyString as d}from"../non-empty-string.js";import{DEFAULT_OVERLAY_POSITION as C}from"./hero-overlay.js";import{normaliseVideoSource as x}from"../hero-video.js";import{heroMediaType as I}from"../hero-media-layout.js";import{VIEW_HIDE_KEYS as k}from"../content/view-hide-class.js";import{ownEntry as N}from"../own-entry.js";import{seedNodeId as R}from"../document/seed-parts.js";const P=50,h=["phoneWordsTop","phoneWordsBottom","phoneBoxGap"],c=["mediaImage","mediaVideo","poster","tintColor","mediaLayout","mediaLayoutPhone","mediaImage2","tintColor2","tintOpacity2","videoSource","youtubeUrl","videoPlayback","_partMotion",...T.filter(s=>s.block==="HeroSingle").flatMap(s=>_(s.focus))],A=[S,"heightDesktop","heightMobile","heightFixed","heightFixedTablet","heightFixedMobile","sectionCorners",v.unitKey,"sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone",...b,"sectionAccent",...O,"anchor",...f,E,...u,...Object.values(H),...k],D=new Set(A),K="the Hero does not read this key as a section setting (only the section pass rows both heroes share carry), so it is not copied",L={eyebrow:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleTop:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleLevel:"it set the level of the copy the single Hero stopped drawing on 2026-09-09; a Text block in a box sets its own level",alignment:"its row was deleted on 2026-09-09 with the copy it placed; a box places itself on nine anchors, and the value was drawn by nothing"};function oe(s){const e=s.props,p=R(e,"HeroSingle"),i=[],n=[],t={id:`${p}~slide`},r={id:`${p}~hero`},a=I("HeroSingle",e.mediaType);t.mediaType=a,"mediaType"in e&&i.push({key:"mediaType",home:"HeroSlide.mediaType"}),a==="video"&&x(e.videoSource)==="upload"&&(t.videoSpeed=P);for(const o of c)o in e&&(t[o]=e[o],i.push({key:o,home:`HeroSlide.${o}`}));"tintOpacity"in e&&(t.overlay=e.tintOpacity,i.push({key:"tintOpacity",home:"HeroSlide.overlay (Image tint)"})),t.overlayColor=d(e.overlayColor)??w,t.overlayPosition=d(e.overlayPosition)??C,"overlayColor"in e&&i.push({key:"overlayColor",home:"HeroSlide.overlayColor"}),"overlayPosition"in e&&i.push({key:"overlayPosition",home:"HeroSlide.overlayPosition"}),Array.isArray(e.boxes)?(t.groups=e.boxes,i.push({key:"boxes",home:"HeroSlide.groups (the same HeroGroup boxes)"})):"boxes"in e&&i.push({key:"boxes",home:"HeroSlide.groups (none stored)"}),r.textureOpacity=g(e.overlay)??100,"overlay"in e&&i.push({key:"overlay",home:"Hero.textureOpacity (the ramp's opacity)"}),r.showTicker=!1;for(const o of h)o in e&&(r[o]=e[o],i.push({key:o,home:`Hero.${o}`}));const y=new Set(["id","mediaType","tintOpacity","overlay","overlayColor","overlayPosition","boxes",...c,...h]);for(const[o,m]of Object.entries(e)){if(y.has(o))continue;const l=N(L,o);if(l!==void 0){n.push({key:o,why:l});continue}if(!D.has(o)){n.push({key:o,why:K});continue}r[o]=m,i.push({key:o,home:`Hero.${o} (section pass)`})}return r.slides=[{type:"HeroSlide",props:t}],{node:{type:"Hero",props:r},carried:i,dropped:n}}export{A as HERO_SECTION_PASS_KEYS,oe as heroSingleToHero};
@@ -1,11 +1,13 @@
1
1
  import type { ShowWhenRule } from "efficient-shell/format";
2
2
  import type { SectionHeadStyle } from "./section-head-style.js";
3
- export type SectionHeadPlacement = "inline" | "own-box";
3
+ export type SectionHeadPlacement = "inline" | "own-box" | "list-column";
4
4
  export declare const DEFAULT_SECTION_HEAD_PLACEMENT: SectionHeadPlacement;
5
5
  export declare const SECTION_HEAD_PLACEMENT_OPTIONS: readonly {
6
6
  label: string;
7
7
  value: SectionHeadPlacement;
8
+ only?: readonly string[];
8
9
  }[];
10
+ export declare const HEAD_IN_LIST_COLUMN: SectionHeadPlacement;
9
11
  export interface SplittableSection {
10
12
  num: string;
11
13
  title: string;
@@ -1 +1 @@
1
- import{parseOption as n}from"../parse-option.js";import{withRowsShownWhen as o}from"../document/show-when-attach.js";import{nonEmptyString as d}from"../non-empty-string.js";import{hasOwnEntry as l}from"../own-entry.js";const a="inline",s=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];function y(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>d(t)!==void 0)}const p={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},Subscribe:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Subscribe"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},S="SectionHeader";function R(e){return l(p,e)}function T(e){return n(s,a,e)}const m=new Set(["Flex"]);function b(e){return!!e?.type&&m.has(e.type)}const i={not:{field:"headPlacement",is:"own-box"}},P={not:i};function E(e,t,r){return o(e,r,i)}export{a as DEFAULT_SECTION_HEAD_PLACEMENT,i as HEAD_ROWS_SHOW_WHEN,P as OWN_BOX_ROWS_SHOW_WHEN,s as SECTION_HEAD_PLACEMENT_OPTIONS,S as SECTION_HEAD_TYPE,p as SPLITTABLE_SECTIONS,R as canSplitHead,E as headFieldsForPlacement,y as headRoleProps,b as parentCapsWidth,T as parseSectionHeadPlacement};
1
+ import{parseOption as n}from"../parse-option.js";import{withRowsShownWhen as o}from"../document/show-when-attach.js";import{nonEmptyString as d}from"../non-empty-string.js";import{hasOwnEntry as l}from"../own-entry.js";const a="inline",s=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"},{label:"In the list column",value:"list-column",only:["Footprint"]}],y="list-column";function S(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>d(t)!==void 0)}const p={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},Subscribe:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Subscribe"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},T="SectionHeader";function R(e){return l(p,e)}function b(e){return n(s,a,e)}const m=new Set(["Flex"]);function P(e){return!!e?.type&&m.has(e.type)}const i={not:{field:"headPlacement",is:"own-box"}},E={not:i};function x(e,t,r){return o(e,r,i)}export{a as DEFAULT_SECTION_HEAD_PLACEMENT,y as HEAD_IN_LIST_COLUMN,i as HEAD_ROWS_SHOW_WHEN,E as OWN_BOX_ROWS_SHOW_WHEN,s as SECTION_HEAD_PLACEMENT_OPTIONS,T as SECTION_HEAD_TYPE,p as SPLITTABLE_SECTIONS,R as canSplitHead,x as headFieldsForPlacement,S as headRoleProps,P as parentCapsWidth,b as parseSectionHeadPlacement};
@@ -0,0 +1,12 @@
1
+ import type * as TS from "typescript";
2
+ import { type RuleReport, type SourceFile } from "./rule.js";
3
+ export type OneOptionParserOptions = {
4
+ readonly kept?: Readonly<Record<string, Readonly<Record<string, string>>>>;
5
+ readonly minFiles: number;
6
+ };
7
+ export type OptionRead = {
8
+ readonly line: number;
9
+ readonly text: string;
10
+ };
11
+ export declare function optionReads(ts: typeof TS, text: string, path?: string): OptionRead[];
12
+ export declare function oneOptionParser(ts: typeof TS, files: readonly SourceFile[], options: OneOptionParserOptions): RuleReport;
@@ -0,0 +1,12 @@
1
+ import{ruleChecks as L}from"./rule.js";const b=/\.(?:[cm]?[jt]sx?)$/;function q(t,v){return/\.tsx$/.test(v)?t.ScriptKind.TSX:/\.[cm]?ts$/.test(v)?t.ScriptKind.TS:/\.jsx$/.test(v)?t.ScriptKind.JSX:t.ScriptKind.JS}function E(t,v,x="source.tsx"){const i=t.createSourceFile(x,v,t.ScriptTarget.Latest,!0,q(t,x)),y=i.parseDiagnostics??[];if(y.length>0){const n=i.getLineAndCharacterOfPosition(y[0].start).line+1;throw new Error(`cannot parse ${x}:${n}: ${t.flattenDiagnosticMessageText(y[0].messageText," ")}`)}const r=n=>{let e=n;for(;t.isParenthesizedExpression(e)||t.isAsExpression(e)||t.isSatisfiesExpression(e)||t.isTypeAssertionExpression(e)||t.isNonNullExpression(e);)e=e.expression;return e},g=n=>{const e=r(n);return t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e)?e.text:void 0},d=(n,e)=>r(n).getText(i).replace(/\s+/g,"")===r(e).getText(i).replace(/\s+/g,""),k=n=>n===t.SyntaxKind.EqualsEqualsEqualsToken||n===t.SyntaxKind.EqualsEqualsToken,T=n=>n===t.SyntaxKind.ExclamationEqualsEqualsToken||n===t.SyntaxKind.ExclamationEqualsToken,u=(n,e)=>{const o=r(n);if(!(!t.isBinaryExpression(o)||!(e?k:T)(o.operatorToken.kind)))for(const[p,m]of[[o.right,o.left],[o.left,o.right]]){const c=g(p);if(c!==void 0&&g(m)===void 0)return{value:m,text:c}}},f=(n,e)=>g(n)===e.text||d(n,e.value),h=(n,e)=>{const o=r(n);if(!t.isCallExpression(o)||o.arguments.length!==1)return!1;const p=o.expression;return t.isPropertyAccessExpression(p)&&(p.name.text==="includes"||p.name.text==="has")&&d(e,o.arguments[0])},w=n=>{const e=r(n);return t.isBinaryExpression(e)&&e.operatorToken.kind===t.SyntaxKind.BarBarToken?[...w(e.left),...w(e.right)]:[e]},s=n=>{const e=r(n.condition),o=u(e,!0);if(o&&f(n.whenTrue,o))return!0;const p=u(e,!1);if(p&&f(n.whenFalse,p))return!0;if(t.isPrefixUnaryExpression(e)&&e.operator===t.SyntaxKind.ExclamationToken){const c=u(e.operand,!0);if(c&&f(n.whenFalse,c)||h(e.operand,n.whenFalse))return!0}if(h(e,n.whenTrue))return!0;const m=w(e);if(m.length>1){const c=m.map(S=>u(S,!0));if(c.every(S=>S!==void 0)&&c.every(S=>d(S.value,c[0].value))&&d(n.whenTrue,c[0].value))return!0}return!1},l=[],a=n=>{if(t.isConditionalExpression(n)&&s(n)){l.push({line:i.getLineAndCharacterOfPosition(n.getStart(i)).line+1,text:n.getText(i).replace(/\s+/g," ")});return}t.forEachChild(n,a)};return a(i),l}const A=[["A ===, the literal kept",'const a = (v: unknown) => v === "x" ? "x" : "y";'],["A ==",'const a = (v: unknown) => v == "x" ? "x" : "y";'],["A literal first",'const a = (v: unknown) => "x" === v ? "x" : "y";'],["A single quotes","const a = (v: unknown) => v === 'x' ? 'x' : 'y';"],["A a plain template","const a = (v: unknown) => v === `x` ? `x` : `y`;"],["A the tested value kept",'const a = (v: unknown) => v === "x" ? v : "y";'],["A a member",'const a = (p: { m?: string }) => p.m === "x" ? "x" : "y";'],["A optional chaining",'const a = (p?: { m?: string }) => p?.m === "x" ? p?.m : "y";'],["A as const answers",'const a = (v: unknown) => v === "x" ? ("x" as const) : ("y" as const);'],["A as and satisfies",'const a = (v: unknown) => (v as string) === "x" ? "x" satisfies string : "y";'],["A parentheses",'const a = (v: unknown) => (v === "x") ? (("x")) : "y";'],["A a <T> assertion",'const a = (v: unknown) => <string>v === "x" ? <"x">"x" : "y";',"file.ts"],["A a non-null side",'const a = (v?: string) => v! === "x" ? v! : "y";'],["A split over lines, a chain is one read",`const a = (v: unknown) =>
2
+ v === "x"
3
+ ? "x"
4
+ : v === "z"
5
+ ? "z"
6
+ : "y";`],["A inside JSX",'const A = (p: { m?: string }) => <i data-m={p.m === "x" ? "x" : "y"} />;'],["B !==",'const a = (v: unknown) => v !== "x" ? "y" : "x";'],["B != with the value kept",'const a = (v: unknown) => v != "x" ? "y" : v;'],["B !(v === x)",'const a = (v: unknown) => !(v === "x") ? "y" : "x";'],["C includes with as",'const L = ["a", "b"] as const; const a = (v: string) => L.includes(v as never) ? v : "a";'],["C a list cast",'const L = ["a", "b"] as const; const a = (v: string) => (L as readonly string[]).includes(v) ? (v as "a") : "a";'],["C a set",'const S = new Set(["a"]); const a = (v: string) => S.has(v) ? v : "a";'],["C optional chaining",'const L = ["a"]; const a = (v: string) => L?.includes(v) ? v : "a";'],["C negated",'const L = ["a"]; const a = (v: string) => !L.includes(v) ? "a" : v;'],["C split over lines",`const L = ["a"]; const a = (v: string) =>
7
+ L.includes(v)
8
+ ? v
9
+ : "a";`],["D two options with ||",'const a = (v: unknown) => v === "a" || v === "b" ? v : undefined;'],["D three options, a member",'const a = (p: { s?: string }) => p.s === "a" || p.s === "b" || p.s === "c" ? p.s : "a";']],$=[["a mapping",'const a = (v: unknown) => v === "x" ? "y" : "z";'],["another value answered",'const a = (v: unknown, w: string) => v === "x" ? w : "z";'],["a list test answering another value",'const L = ["a"]; const a = (v: string, w: string) => L.includes(v) ? w : "a";'],["a boolean test",'const a = (v?: string) => (v ?? "left") === "center";'],["a conditional type",'type A<T> = T extends "x" ? "x" : never;'],["two literals compared",'const a = "x" === "x" ? "x" : "y";'],["|| over two values",'const a = (v: unknown, w: unknown) => v === "a" || w === "b" ? v : "c";'],["the job done right",'const a = (v: unknown) => parseOption(["x", "y"], "y", v);']];function K(t,v,x){const{check:i,report:y}=L("one option parser: a stored option is read with parseOption"),r=A.filter(([,s,l])=>E(t,s,l).length!==1).map(([s])=>s);i(`the scan finds each of the ${A.length} listed forms once`,r.length===0,r.join("; "));const g=$.filter(([,s])=>E(t,s).length!==0).map(([s])=>s);i(`…and none of the ${$.length} near misses`,g.length===0,g.join("; "));const d=E(t,A[13][1]);i("a read split over lines is reported at the line it starts",d[0]?.line===2,String(d[0]?.line));const k=v.filter(s=>b.test(s.path)&&!s.path.endsWith(".d.ts"));i(`read the source (${k.length} JS/TS files, at least ${x.minFiles})`,k.length>=x.minFiles);const T=x.kept??{},u=new Map,f=[],h=[];for(const s of k){let l;try{l=E(t,s.text,s.path)}catch(a){h.push(a.message);continue}for(const a of l){if(T[s.path]?.[a.text]!==void 0){const n=`${s.path} ${a.text}`;u.set(n,(u.get(n)??0)+1);continue}f.push(`${s.path}:${a.line} ${a.text}`)}}i("every file parses",h.length===0,h.join(`
10
+ `)),i("no stored option is read by a hand-written conditional (use parseOption)",f.length===0,f.join(`
11
+ `));const w=Object.entries(T).flatMap(([s,l])=>Object.keys(l).map(a=>[`${s} ${a}`,u.get(`${s} ${a}`)??0]).filter(([,a])=>a!==1).map(([a,n])=>`${a} (found ${n})`));return i("every kept entry is found exactly once in its file",w.length===0,w.join(`
12
+ `)),y()}export{K as oneOptionParser,E as optionReads};
@@ -3,7 +3,8 @@ export declare const THEME_STORAGE_KEY = "storefront-theme";
3
3
  export declare const THEME_MODE_KEY = "sf:theme-mode";
4
4
  export declare const THEME_SWITCH_KEY = "sf:theme-switch";
5
5
  export declare const THEME_SWITCH_HIDE = "hide";
6
- export type ThemeMode = "light" | "dark" | "auto";
6
+ export declare const THEME_MODES: readonly ["light", "dark", "auto"];
7
+ export type ThemeMode = (typeof THEME_MODES)[number];
7
8
  export type Theme = "light" | "dark";
8
9
  export declare const DEFAULT_THEME_MODE: ThemeMode;
9
10
  export declare const DEFAULT_SWITCH_SHOWN = false;
@@ -1,18 +1,18 @@
1
- import{contrastRatio as J,hexToRgb as d,parseHexColor as s,readableInk as H,relativeLuminance as g}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as Q,pictureShadowColor as v}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as ee}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as te,siteLengthHeld as ne}from"./content/css-length.js";const re="storefront-theme",je="sf:theme-mode",Ve="sf:theme-switch",Ze="hide",qe="light",Je=!1,L=7,N=18;function oe(e){return e>=L&&e<N}function Qe(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?oe(o)?"light":"dark":t==="light"?"light":"dark"}function ve(e){const{mode:t,switchShown:n}=e;return`
1
+ import{contrastRatio as v,hexToRgb as d,parseHexColor as s,readableInk as L,relativeLuminance as g}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as ee,pictureShadowColor as te}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as ne}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as re,siteLengthHeld as oe}from"./content/css-length.js";import{parseOption as E}from"./parse-option.js";const ce="storefront-theme",qe="sf:theme-mode",Je="sf:theme-switch",Qe="hide",ve=["light","dark","auto"],et="light",tt=!1,N=7,k=18;function ie(e){return e>=N&&e<k}function nt(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?ie(o)?"light":"dark":E(["light","dark"],"dark",t)}function rt(e){const{mode:t,switchShown:n}=e;return`
2
2
  try {
3
3
  var mode = ${JSON.stringify(t)};
4
4
  var shown = ${n?"true":"false"};
5
- var override = localStorage.getItem(${JSON.stringify(re)});
5
+ var override = localStorage.getItem(${JSON.stringify(ce)});
6
6
  var theme;
7
7
  if (shown && (override === 'light' || override === 'dark')) {
8
8
  theme = override;
9
9
  } else if (mode === 'auto') {
10
10
  var h = new Date().getHours();
11
- theme = (h >= ${L} && h < ${N}) ? 'light' : 'dark';
11
+ theme = (h >= ${N} && h < ${k}) ? 'light' : 'dark';
12
12
  } else {
13
13
  theme = mode === 'light' ? 'light' : 'dark';
14
14
  }
15
15
  if (theme === 'light') document.documentElement.setAttribute('data-theme', 'light');
16
16
  else document.documentElement.removeAttribute('data-theme');
17
17
  } catch (e) {}
18
- `}const l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},ce=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ie={selected:0,themes:ce};function k(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ie}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function E(e,t,n){const r=d(e),o=d(t);if(r===null||o===null)return e;const c=(i,a)=>Math.max(0,Math.min(255,Math.round(i+(a-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const se={light:"#ffffff",dark:"#0a0a0a"},et=["light","dark"];function tt(e,t){const n=se[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:E(e,r,.1),line:E(e,r,.22),muted:E(n,e,.35),brandInk:t}}function f(e){const t=k(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function nt(e){return{fill:u(e).background,accent:e.accent}}const ae=.4,ue="#f5f1e8",P="#0a0a0a";function le(e){const t=f(e).text,n=g(t);return n===null||n>=ae?t:null}const fe=4.5,he=3,rt={good:"Good","large-only":"Large text only",hard:"Hard to read"};function ot(e){return e>=fe?"good":e>=he?"large-only":"hard"}const de=["#000000","#ffffff"];function m(e){return H(e,de)}function ct(e,t){const n=t!==void 0&&g(t)!==null?t:ue;return H(e,[P,n])===n&&n!==P}const ge=[.25,.4,.55];function it(e){const t=d(e);return t===null?[]:ge.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function st(e){const n={"--theme-fg":f(e).text},r=le(e);return r!==null&&(n["--overlay-fg"]=r),n}const me=82;function S(e){return`color-mix(in srgb, ${e} ${me}%, #000)`}function at(e){const t=f(e);return{"--theme-accent":t.accent,"--theme-accent-2":S(t.accent),"--theme-accent-ink":m(t.accent)}}function A(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function ut(e){const t=f(e),n=A(t),r=F(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=S(n)),o["--theme-btn-ink"]=r??m(n),o}function F(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function xe(e,t){return F(e)??m(A(e)??t)}function lt(e){const t=f(e);return{fill:A(t)??t.accent.toLowerCase(),ink:xe(t,t.accent)}}function ft(e){const t={};return k(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=S(o.accent),t[`--theme-preset-${r}-accent-ink`]=m(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const T=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},b=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function $([e,t,n]){const[r,o,c]=[T(e),T(t),T(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),h=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*h,1.9779984951*i-2.428592205*a+.4505937099*h,.0259040371*i+.7827717662*a-.808675766*h]}function pe([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[b(4.0767416621*r-3.3077115913*o+.2309699292*c),b(-1.2684380046*r+2.6097574011*o-.3413193965*c),b(-.0041960863*r-.7034186147*o+1.707614701*c)]}const I=e=>{const t=d(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},U=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],G=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,Y=e=>U(I(e.surface),I(e.line),.6);function ht(e){return G(Y(u(e)))}function z(e){const t=u(e);return G(pe(U($(Y(t)),$(I(t.text)),.92)))}function dt(e){return{...e,background:z(e)}}function B(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,h)=>{if(h===t)return!1;const _=u(a);return s(_.background)!==c?!1:!r||s(_.text??"")===s(i.text??"")&&s(_.accent??"")===s(i.accent??"")})}function gt(e,t){return B(e,t,z,!1)}function mt(e,t){return B(e,t,n=>s(n.surface??""),!0)}const _e=1;function Ee(e,t){const n=(e??[]).flatMap((r,o)=>{const c=g(r.background??""),i=g(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??_e}function xt(e){return Ee(e?.themes,e?.selected)}const pt=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function _t(e){const t=u(f(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const Se=["heading","body","label"],Et={heading:"Headings",body:"Body",label:"Labels"};function St(e){if(!e)return null;for(const t of Se)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const X=["headingLarge","headingMedium","headingSmall","accent","body","label"],At={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Tt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},Ae=8,Te=200;function be(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=Ae&&t<=Te?t:null}function Ie(e){const t={};for(const n of X)t[n]=be(e?.[n]);return t}function bt(e){const t=Ie(e),n={};for(const r of X){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const Re=["square","small","large"],Ce="small";function De(e){return Re.includes(e??"")?e:Ce}function It(e){return D(ye[De(e)])}const x=0,K=40,Me={min:x,max:K,step:1},ye={square:0,small:null,large:16},R={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function C(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;const t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(K,Math.max(x,Math.round(t))):null}function D(e,t){if(ee(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};const r=Math.max(0,e);return Object.fromEntries(Object.entries(R).map(([o,c])=>{const i=Math.round(r*c*1e4)/1e4;return[o,i===0?"0":te(i,t)]}))}const n=C(e);return n===null?{}:Object.fromEntries(Object.entries(R).map(([r,o])=>{const c=n*o/16;return[r,c===0?"0":`${c}rem`]}))}function Rt(e){return(C(e)??x)*R["--sf-button-radius"]}function Ct(e,t){const n=ne(e,t,"radius",Me);return n!==null?D(n,t):D(C(e)??x)}const Oe=["none","soft","lifted"],we="soft",W="none",He=["tight","normal","roomy"],Le="normal",Ne="normal",ke=["none","lift","highlight"],Pe="lift",Fe="highlight";import{DEFAULT_SHADOW_COLOR as Yt}from"efficient-easel/screen/lib/document/shadow-values";function j(e){return Oe.includes(e??"")?e:we}function $e(e){return He.includes(e??"")?e:Le}function V(e){return ke.includes(e??"")?e:Pe}function Dt(e){const t=j(e);return t===W?void 0:t}function Mt(e){const t=$e(e);return t===Ne?void 0:t}function yt(e){const t=V(e);return t===Fe?void 0:t}function Ot(e,t,n){const r=v(t);return r===Q?{}:j(e)!==W||V(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ue=["normal","tight","compressed"],Z="normal";function q(e){return Ue.includes(e??"")?e:Z}function wt(e){const t=q(e);return t===Z?void 0:t}function Ht(e){switch(q(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Lt=["authored","sentence"],Nt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},M=100,y=900,Ge=24,Ye=200;function p(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function O(e){const t=p(e?.weight,M,y),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:p(c,M,y),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:p(e?.weightStrong,M,y),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:p(e?.maxPx,Ge,Ye),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function kt(e){const t=O(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function Pt(e){return O({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function Ft(e){const t=O(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}const w="siteTheme";function ze(e){const t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(r=>!!r&&typeof r=="object"))return{};const n=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[w]:{selected:n,themes:t.themes}}}function $t(e){return ze(e?.[w])[w]}export{ge as ACCENT_DARKEN_STEPS,et as BRAND_INKS,He as CARD_GAPS,Oe as CARD_SHADOWS,Me as CORNER_RADIUS_GRID,K as CORNER_RADIUS_MAX,x as CORNER_RADIUS_MIN,Re as CORNER_STYLES,ye as CORNER_STYLE_TO_PX,Le as DEFAULT_CARD_GAP,we as DEFAULT_CARD_SHADOW,Ce as DEFAULT_CORNER_STYLE,Z as DEFAULT_HEADING_COMPRESSION,Nt as DEFAULT_HEADING_TYPOGRAPHY,Pe as DEFAULT_HOVER_EFFECT,Yt as DEFAULT_SHADOW_COLOR,Tt as DEFAULT_SIZES,l as DEFAULT_SURFACES,Je as DEFAULT_SWITCH_SHOWN,ce as DEFAULT_THEMES,qe as DEFAULT_THEME_MODE,ie as DEFAULT_THEME_VALUE,rt as GRADE_LABEL,Lt as HEADING_CASES,Ue as HEADING_COMPRESSIONS,Ye as HEADING_MAX_PX_MAX,Ge as HEADING_MAX_PX_MIN,y as HEADING_WEIGHT_MAX,M as HEADING_WEIGHT_MIN,ke as HOVER_EFFECTS,Ne as IDENTITY_CARD_GAP,W as IDENTITY_CARD_SHADOW,Fe as IDENTITY_HOVER_EFFECT,P as OVERLAY_INK_DARK,ue as OVERLAY_INK_LIGHT,fe as READABILITY_AA,he as READABILITY_AA_LARGE,At as SCALE_OF_STEP,w as SITE_THEME_KEY,X as SIZE_STEPS,Te as TEXT_SIZE_MAX,Ae as TEXT_SIZE_MIN,N as THEME_DAY_END_HOUR,L as THEME_DAY_START_HOUR,je as THEME_MODE_KEY,re as THEME_STORAGE_KEY,pt as THEME_SURFACE_KEYS,Ze as THEME_SWITCH_HIDE,Ve as THEME_SWITCH_KEY,Se as TYPE_GROUPS,Et as TYPE_GROUP_LABELS,m as accentInk,dt as bandPresetFor,gt as bandPresetIndex,tt as brandTheme,ve as buildThemeBootScript,Mt as cardGapAttr,Dt as cardShadowAttr,Ht as compressionMetrics,J as contrastRatio,D as cornerRadiusTokens,It as cornerStyleTokens,xt as darkBandIndex,Ee as darkPresetIndex,it as darkerAccents,ct as fillIsDark,ot as gradeContrast,wt as headingCompressionAttr,Pt as headingTypographyFromRow,kt as headingTypographyStyle,Ft as headingTypographyToRow,yt as hoverEffectAttr,oe as isDayHour,$e as normalizeCardGap,j as normalizeCardShadow,C as normalizeCornerRadius,De as normalizeCornerStyle,q as normalizeHeadingCompression,O as normalizeHeadingTypography,V as normalizeHoverEffect,be as normalizeSize,Ie as normalizeSizes,k as normalizeTheme,u as normalizeThemeColors,Qe as resolveTheme,xe as resolvedButtonInk,z as sectionBandTone,f as selectedThemeColors,Ot as shadowColorTokens,lt as siteButtonPaint,Rt as siteButtonRadiusPx,Ct as siteCornerRadiusTokens,ze as siteThemeMetadata,$t as siteThemeOf,mt as surfacePresetIndex,ht as surfaceTwoTone,at as themeAccentStyle,A as themeButtonColour,F as themeButtonInk,ut as themeButtonStyle,st as themeColorStyle,le as themeLightInk,ft as themePresetAccentVars,_t as themeSurfaceStyle,nt as themeSwatchColors,St as typeScaleGroupOfClassName,bt as typeSizesStyle};
18
+ `}const l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},se=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ae={selected:0,themes:se};function P(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ae}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function S(e,t,n){const r=d(e),o=d(t);if(r===null||o===null)return e;const c=(i,a)=>Math.max(0,Math.min(255,Math.round(i+(a-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const ue={light:"#ffffff",dark:"#0a0a0a"},ot=["light","dark"];function ct(e,t){const n=ue[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:S(e,r,.1),line:S(e,r,.22),muted:S(n,e,.35),brandInk:t}}function f(e){const t=P(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function it(e){return{fill:u(e).background,accent:e.accent}}const le=.4,fe="#f5f1e8",F="#0a0a0a";function he(e){const t=f(e).text,n=g(t);return n===null||n>=le?t:null}const de=4.5,ge=3,st={good:"Good","large-only":"Large text only",hard:"Hard to read"};function at(e){return e>=de?"good":e>=ge?"large-only":"hard"}const me=["#000000","#ffffff"];function m(e){return L(e,me)}function ut(e,t){const n=t!==void 0&&g(t)!==null?t:fe;return L(e,[F,n])===n&&n!==F}const pe=[.25,.4,.55];function lt(e){const t=d(e);return t===null?[]:pe.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function ft(e){const n={"--theme-fg":f(e).text},r=he(e);return r!==null&&(n["--overlay-fg"]=r),n}const xe=82;function A(e){return`color-mix(in srgb, ${e} ${xe}%, #000)`}function ht(e){const t=f(e);return{"--theme-accent":t.accent,"--theme-accent-2":A(t.accent),"--theme-accent-ink":m(t.accent)}}function T(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function dt(e){const t=f(e),n=T(t),r=$(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=A(n)),o["--theme-btn-ink"]=r??m(n),o}function $(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function _e(e,t){return $(e)??m(T(e)??t)}function gt(e){const t=f(e);return{fill:T(t)??t.accent.toLowerCase(),ink:_e(t,t.accent)}}function mt(e){const t={};return P(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=A(o.accent),t[`--theme-preset-${r}-accent-ink`]=m(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const b=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},I=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function U([e,t,n]){const[r,o,c]=[b(e),b(t),b(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),h=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*h,1.9779984951*i-2.428592205*a+.4505937099*h,.0259040371*i+.7827717662*a-.808675766*h]}function Ee([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[I(4.0767416621*r-3.3077115913*o+.2309699292*c),I(-1.2684380046*r+2.6097574011*o-.3413193965*c),I(-.0041960863*r-.7034186147*o+1.707614701*c)]}const R=e=>{const t=d(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},G=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],Y=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,z=e=>G(R(e.surface),R(e.line),.6);function pt(e){return Y(z(u(e)))}function B(e){const t=u(e);return Y(Ee(G(U(z(t)),U(R(t.text)),.92)))}function xt(e){return{...e,background:B(e)}}function X(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,h)=>{if(h===t)return!1;const _=u(a);return s(_.background)!==c?!1:!r||s(_.text??"")===s(i.text??"")&&s(_.accent??"")===s(i.accent??"")})}function _t(e,t){return X(e,t,B,!1)}function Et(e,t){return X(e,t,n=>s(n.surface??""),!0)}const Se=1;function Ae(e,t){const n=(e??[]).flatMap((r,o)=>{const c=g(r.background??""),i=g(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??Se}function St(e){return Ae(e?.themes,e?.selected)}const At=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Tt(e){const t=u(f(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const Te=["heading","body","label"],bt={heading:"Headings",body:"Body",label:"Labels"};function It(e){if(!e)return null;for(const t of Te)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const K=["headingLarge","headingMedium","headingSmall","accent","body","label"],Rt={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Ct={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},be=8,Ie=200;function Re(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=be&&t<=Ie?t:null}function Ce(e){const t={};for(const n of K)t[n]=Re(e?.[n]);return t}function Dt(e){const t=Ce(e),n={};for(const r of K){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const De=["square","small","large"],Me="small";function Oe(e){return De.includes(e??"")?e:Me}function Mt(e){return M(we[Oe(e)])}const p=0,W=40,ye={min:p,max:W,step:1},we={square:0,small:null,large:16},C={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function D(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;const t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(W,Math.max(p,Math.round(t))):null}function M(e,t){if(ne(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};const r=Math.max(0,e);return Object.fromEntries(Object.entries(C).map(([o,c])=>{const i=Math.round(r*c*1e4)/1e4;return[o,i===0?"0":re(i,t)]}))}const n=D(e);return n===null?{}:Object.fromEntries(Object.entries(C).map(([r,o])=>{const c=n*o/16;return[r,c===0?"0":`${c}rem`]}))}function Ot(e){return(D(e)??p)*C["--sf-button-radius"]}function yt(e,t){const n=oe(e,t,"radius",ye);return n!==null?M(n,t):M(D(e)??p)}const He=["none","soft","lifted"],Le="soft",j="none",Ne=["tight","normal","roomy"],ke="normal",Pe="normal",Fe=["none","lift","highlight"],$e="lift",Ue="highlight";import{DEFAULT_SHADOW_COLOR as Xt}from"efficient-easel/screen/lib/document/shadow-values";function V(e){return He.includes(e??"")?e:Le}function Ge(e){return Ne.includes(e??"")?e:ke}function Z(e){return Fe.includes(e??"")?e:$e}function wt(e){const t=V(e);return t===j?void 0:t}function Ht(e){const t=Ge(e);return t===Pe?void 0:t}function Lt(e){const t=Z(e);return t===Ue?void 0:t}function Nt(e,t,n){const r=te(t);return r===ee?{}:V(e)!==j||Z(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ye=["normal","tight","compressed"],q="normal";function J(e){return Ye.includes(e??"")?e:q}function kt(e){const t=J(e);return t===q?void 0:t}function Pt(e){switch(J(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Q=["authored","sentence"],Ft={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},O=100,y=900,ze=24,Be=200;function x(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function w(e){const t=x(e?.weight,O,y),n=E(Q,"authored",e?.case),r=c=>c==null?t:x(c,O,y),o=c=>E(Q,n,c);return{case:n,weight:t,weightStrong:x(e?.weightStrong,O,y),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:x(e?.maxPx,ze,Be),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function $t(e){const t=w(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function Ut(e){return w({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function Gt(e){const t=w(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}const H="siteTheme";function Xe(e){const t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(r=>!!r&&typeof r=="object"))return{};const n=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[H]:{selected:n,themes:t.themes}}}function Yt(e){return Xe(e?.[H])[H]}export{pe as ACCENT_DARKEN_STEPS,ot as BRAND_INKS,Ne as CARD_GAPS,He as CARD_SHADOWS,ye as CORNER_RADIUS_GRID,W as CORNER_RADIUS_MAX,p as CORNER_RADIUS_MIN,De as CORNER_STYLES,we as CORNER_STYLE_TO_PX,ke as DEFAULT_CARD_GAP,Le as DEFAULT_CARD_SHADOW,Me as DEFAULT_CORNER_STYLE,q as DEFAULT_HEADING_COMPRESSION,Ft as DEFAULT_HEADING_TYPOGRAPHY,$e as DEFAULT_HOVER_EFFECT,Xt as DEFAULT_SHADOW_COLOR,Ct as DEFAULT_SIZES,l as DEFAULT_SURFACES,tt as DEFAULT_SWITCH_SHOWN,se as DEFAULT_THEMES,et as DEFAULT_THEME_MODE,ae as DEFAULT_THEME_VALUE,st as GRADE_LABEL,Q as HEADING_CASES,Ye as HEADING_COMPRESSIONS,Be as HEADING_MAX_PX_MAX,ze as HEADING_MAX_PX_MIN,y as HEADING_WEIGHT_MAX,O as HEADING_WEIGHT_MIN,Fe as HOVER_EFFECTS,Pe as IDENTITY_CARD_GAP,j as IDENTITY_CARD_SHADOW,Ue as IDENTITY_HOVER_EFFECT,F as OVERLAY_INK_DARK,fe as OVERLAY_INK_LIGHT,de as READABILITY_AA,ge as READABILITY_AA_LARGE,Rt as SCALE_OF_STEP,H as SITE_THEME_KEY,K as SIZE_STEPS,Ie as TEXT_SIZE_MAX,be as TEXT_SIZE_MIN,k as THEME_DAY_END_HOUR,N as THEME_DAY_START_HOUR,ve as THEME_MODES,qe as THEME_MODE_KEY,ce as THEME_STORAGE_KEY,At as THEME_SURFACE_KEYS,Qe as THEME_SWITCH_HIDE,Je as THEME_SWITCH_KEY,Te as TYPE_GROUPS,bt as TYPE_GROUP_LABELS,m as accentInk,xt as bandPresetFor,_t as bandPresetIndex,ct as brandTheme,rt as buildThemeBootScript,Ht as cardGapAttr,wt as cardShadowAttr,Pt as compressionMetrics,v as contrastRatio,M as cornerRadiusTokens,Mt as cornerStyleTokens,St as darkBandIndex,Ae as darkPresetIndex,lt as darkerAccents,ut as fillIsDark,at as gradeContrast,kt as headingCompressionAttr,Ut as headingTypographyFromRow,$t as headingTypographyStyle,Gt as headingTypographyToRow,Lt as hoverEffectAttr,ie as isDayHour,Ge as normalizeCardGap,V as normalizeCardShadow,D as normalizeCornerRadius,Oe as normalizeCornerStyle,J as normalizeHeadingCompression,w as normalizeHeadingTypography,Z as normalizeHoverEffect,Re as normalizeSize,Ce as normalizeSizes,P as normalizeTheme,u as normalizeThemeColors,nt as resolveTheme,_e as resolvedButtonInk,B as sectionBandTone,f as selectedThemeColors,Nt as shadowColorTokens,gt as siteButtonPaint,Ot as siteButtonRadiusPx,yt as siteCornerRadiusTokens,Xe as siteThemeMetadata,Yt as siteThemeOf,Et as surfacePresetIndex,pt as surfaceTwoTone,ht as themeAccentStyle,T as themeButtonColour,$ as themeButtonInk,dt as themeButtonStyle,ft as themeColorStyle,he as themeLightInk,mt as themePresetAccentVars,Tt as themeSurfaceStyle,it as themeSwatchColors,It as typeScaleGroupOfClassName,Dt as typeSizesStyle};
@@ -1,9 +1,8 @@
1
- import type { AccordionRowStyle } from "../../format/lib/content/accordion-row-style.js";
2
1
  export type BoxPaneKind = false | "tabs" | "accordion";
3
2
  export declare const BoxTabPaneContext: import("react").Context<BoxPaneKind>;
4
3
  export declare const useBoxPaneKind: () => BoxPaneKind;
5
4
  export declare const useIsTabPane: () => boolean;
6
- export declare const AccordionRowStyleContext: import("react").Context<AccordionRowStyle>;
7
- export declare const useAccordionRowStyle: () => AccordionRowStyle;
5
+ export declare const AccordionRowStyleContext: import("react").Context<"plain" | "numbered" | "chevron">;
6
+ export declare const useAccordionRowStyle: () => "plain" | "numbered" | "chevron";
8
7
  export declare const FirstCopyOpensContext: import("react").Context<boolean>;
9
8
  export declare const useFirstCopyOpens: () => boolean;
@@ -1,4 +1,5 @@
1
1
  import type { BorderValue } from "../../format/lib/content/borders.js";
2
+ import { type PadValues } from "../lib/content/section-padding.js";
2
3
  import { type BlockAlign as Align } from "../../format/lib/content/block-align.js";
3
4
  type Variant = "primary" | "ghost";
4
5
  export declare const BUTTON_BLOCK_CLASS = "sf-button-block";
@@ -10,6 +11,7 @@ interface ButtonBlockProps {
10
11
  alignTablet?: unknown;
11
12
  alignPhone?: unknown;
12
13
  contained: boolean;
14
+ blockPad?: PadValues;
13
15
  arrow?: boolean;
14
16
  icon?: string;
15
17
  iconPosition?: string;
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{buttonArrowShown as N}from"../../format/lib/content/button-arrow.js";import{buttonIconAtEnd as R,buttonIconSide as _,buttonWidthClass as j,storedButtonIcon as E}from"../../format/lib/content/button-icon.js";import{buttonCornersStyle as F,buttonPadAttrs as O,buttonPaint as $}from"../lib/content/button-look.js";import{ArrowLongRightIcon as G,ArrowRightIcon as U,ArrowUpRightIcon as D,BagIcon as K,CarIcon as V,CartIcon as W,ChatIcon as Y,ChevronLeftIcon as z,ChevronRightIcon as H,DownloadIcon as J,EmailIcon as q,ExternalIcon as M,LocationIcon as Q,PackageIcon as X,PhoneIcon as Z,PlayIcon as oo,ReceiptRefundIcon as to,SearchIcon as no,ShieldCheckIcon as ro,TagIcon as eo,TruckIcon as ao,WheelIcon as co}from"efficient-shell/icons/efficient";import io from"./BlockFrame.js";import lo from"./Btn.js";import{renderGold as so}from"./goldPhrases.js";import{alignViewClasses as ho,BLOCK_ALIGN_JUSTIFY as uo}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as mo}from"./InBoxContext.js";import{partAttr as c}from"../../format/lib/content/part-names.js";const po="sf-button-block",fo={"arrow-right":U,"arrow-long-right":G,"arrow-up-right":D,"chevron-right":H,external:M,cart:W,bag:K,tag:eo,email:q,location:Q,play:oo,download:J,search:no,car:V,phone:Z,wheel:co,chat:Y,"chevron-left":z,package:X,truck:ao,"shield-check":ro,"receipt-refund":to},go=o=>o?` ${o}`:"";function Io(o){const{label:w,href:i,variant:l,align:e,alignTablet:b,alignPhone:C,contained:k,arrow:y,icon:B,iconPosition:s,widthFit:h,widthFitPhone:P,widthFitTablet:S,buttonColor:t,buttonTextColor:d,hrefRewrite:u}=o,m=mo(),n=E(B),p=n&&n!=="none"?fo[n]:void 0,A=n===void 0?N(y)?{}:{arrow:null}:p?{arrow:r(p,{size:16}),..._(s)==="before"?{glyphBefore:!0}:{}}:{arrow:null},f=O(o),g=[j(h,P,S,{atSectionLine:!m}),f?.className??""].filter(Boolean).join(" "),L=g?{className:g}:{},T=R(s,h)?{spread:!0}:{},a=$(o),x=a?a.background==="transparent"?"ghost":"primary":l,I={...a??(t?l==="ghost"?{borderColor:t}:{background:t,borderColor:t}:{}),...d?{color:d}:{},...f?.style??{},...F(o)??{}},v=Object.keys(I).length?{style:I}:{};return r(io,{contained:k,className:`${po} py-4`,part:c("button-block"),children:r("div",{className:`flex${e?` ${uo[e]}`:""}${go(ho("justify",e,b,C,{atSectionLine:!m}))}`,children:r(lo,{href:i||"#",variant:x,...L,...T,...A,...v,...i&&u?{hrefRewrite:u}:{},part:c("button"),glyphPart:c("button-icon"),children:so(w)})})})}export{po as BUTTON_BLOCK_CLASS,Io as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{buttonArrowShown as v}from"../../format/lib/content/button-arrow.js";import{buttonIconAtEnd as O,buttonIconSide as E,buttonWidthClass as F,storedButtonIcon as $}from"../../format/lib/content/button-icon.js";import{buttonCornersStyle as j,buttonPadAttrs as G,buttonPaint as U}from"../lib/content/button-look.js";import{ArrowLongRightIcon as D,ArrowRightIcon as K,ArrowUpRightIcon as V,BagIcon as W,CarIcon as Y,CartIcon as z,ChatIcon as H,ChevronLeftIcon as J,ChevronRightIcon as M,DownloadIcon as q,EmailIcon as Q,ExternalIcon as X,LocationIcon as Z,PackageIcon as oo,PhoneIcon as to,PlayIcon as no,ReceiptRefundIcon as ro,SearchIcon as eo,ShieldCheckIcon as ao,TagIcon as co,TruckIcon as io,WheelIcon as lo}from"efficient-shell/icons/efficient";import so from"./BlockFrame.js";import{BLOCK_PAD_FRAME as ho,ownPadOf as mo}from"../lib/content/section-padding.js";import uo from"./Btn.js";import{renderGold as fo}from"./goldPhrases.js";import{alignViewClasses as po,BLOCK_ALIGN_JUSTIFY as go}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as wo}from"./InBoxContext.js";import{partAttr as c}from"../../format/lib/content/part-names.js";const Io="sf-button-block",bo={"arrow-right":K,"arrow-long-right":D,"arrow-up-right":V,"chevron-right":M,external:X,cart:z,bag:W,tag:co,email:Q,location:Z,play:no,download:q,search:eo,car:Y,phone:to,wheel:lo,chat:H,"chevron-left":J,package:oo,truck:io,"shield-check":ao,"receipt-refund":ro},Co=o=>o?` ${o}`:"";function ko(o){const{label:b,href:i,variant:l,align:e,alignTablet:C,alignPhone:k,contained:P,arrow:B,icon:y,iconPosition:s,widthFit:h,widthFitPhone:A,widthFitTablet:L,buttonColor:t,buttonTextColor:d,hrefRewrite:m,blockPad:S}=o,u=wo(),n=$(y),f=n&&n!=="none"?bo[n]:void 0,T=n===void 0?v(B)?{}:{arrow:null}:f?{arrow:r(f,{size:16}),...E(s)==="before"?{glyphBefore:!0}:{}}:{arrow:null},p=G(o),g=[F(h,A,L,{atSectionLine:!u}),p?.className??""].filter(Boolean).join(" "),x=g?{className:g}:{},N=O(s,h)?{spread:!0}:{},a=U(o),R=a?a.background==="transparent"?"ghost":"primary":l,w={...a??(t?l==="ghost"?{borderColor:t}:{background:t,borderColor:t}:{}),...d?{color:d}:{},...p?.style??{},...j(o)??{}},_=Object.keys(w).length?{style:w}:{},I=mo(S,ho.text);return r(so,{contained:P,...I,className:`${Io} ${I.className}`,part:c("button-block"),children:r("div",{className:`flex${e?` ${go[e]}`:""}${Co(po("justify",e,C,k,{atSectionLine:!u}))}`,children:r(uo,{href:i||"#",variant:R,...x,...N,...T,..._,...i&&m?{hrefRewrite:m}:{},part:c("button"),glyphPart:c("button-icon"),children:fo(b)})})})}export{Io as BUTTON_BLOCK_CLASS,ko as default};
@@ -1,7 +1,9 @@
1
+ import { type ReactNode } from "react";
1
2
  import type { SlotComponent } from "efficient-easel/blocks";
2
3
  import type { MapThemeMode } from "../../format/lib/map-styles.js";
3
4
  import { type DealerListPosition } from "../lib/dealer-source.js";
4
- export default function DealerFinder({ mapLabel, mapTheme, search, searchHint, noMatchText, listPosition, showDistance, editing, template, ownerId, }: {
5
+ import { type FootprintListColumns, type FootprintShows } from "../../format/lib/content/footprint.js";
6
+ export default function DealerFinder({ mapLabel, mapTheme, search, searchHint, noMatchText, listPosition, showDistance, shows, listColumns, fullHeight, sectionHead, editing, template, ownerId, }: {
5
7
  mapLabel: string;
6
8
  mapTheme: MapThemeMode;
7
9
  search: boolean;
@@ -9,6 +11,10 @@ export default function DealerFinder({ mapLabel, mapTheme, search, searchHint, n
9
11
  noMatchText: string;
10
12
  listPosition: DealerListPosition;
11
13
  showDistance: boolean;
14
+ shows?: FootprintShows;
15
+ listColumns?: FootprintListColumns;
16
+ fullHeight?: boolean;
17
+ sectionHead?: ReactNode;
12
18
  editing?: boolean;
13
19
  template?: SlotComponent;
14
20
  ownerId?: string;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as c,Fragment as V}from"react/jsx-runtime";import{useEffect as K,useMemo as h,useRef as Q,useState as o}from"react";import{CardTemplateRows as Y}from"./CardRowContext.js";import{DEALER_FIELDS as $,dealerCardRow as G,dealerPins as J,dealerPressLabel as U,parseDealerListPosition as X,useDealerSource as Z}from"../lib/dealer-source.js";import{groupColsClass as H}from"../../format/lib/locations-grid.js";import{say as ee}from"../../format/lib/editor-words.js";import te from"./SiteMap.js";import re,{SIDE_MAP_CLASS as ae,SIDE_ROW_REACH_CLASS as se}from"./SideListLayout.js";import{InsideSiteColumn as le}from"./SiteGutterFrame.js";const C={near:null,dealers:[]},ne=5;function oe({mapLabel:E,mapTheme:L,search:k,searchHint:d,noMatchText:g,listPosition:N,showDistance:R,editing:D,template:I,ownerId:A=""}){const l=Z(),[a,i]=o(C),[b,M]=o(""),[T,x]=o(!1),[y,u]=o(null),[j,F]=o(null),m=Q(null);K(()=>{if(!l)return;let e=!0;return l({}).then(s=>e&&i(s)).catch(()=>e&&i(C)),()=>{e=!1}},[l]);const n=h(()=>J(a.dealers),[a.dealers]),P=h(()=>new Set(n.map(e=>e.key)),[n]),z=h(()=>a.near==="found"?n.slice(0,ne).map(e=>e.key):null,[a.near,n]),B=e=>{u(e),P.has(e)&&F(s=>({key:e,n:(s?.n??0)+1}))},O=e=>{u(e),m.current?.querySelector(`[data-dealer="${CSS.escape(e)}"]`)?.scrollIntoView({block:"nearest"})};if(!l)return D?r("p",{"data-dealers-unavailable":!0,className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:ee("Dealers are not available on this website")}):null;const W=e=>{e.preventDefault();const s=b.trim();x(!0),u(null),l(s?{near:s}:{}).then(i).catch(()=>i(t=>({...t,near:"try_again"}))).finally(()=>x(!1))},p=X(N),q=p!=="below",f=a.near==="not_found"||a.near==="try_again",S=k?c("form",{role:"search",onSubmit:W,className:"mb-4 flex gap-2",children:[r("input",{type:"search",value:b,onChange:e=>M(e.target.value),placeholder:d,"aria-label":d,"aria-invalid":f||void 0,className:["min-w-0 flex-1 border bg-bg px-3 py-2 text-[length:var(--size-body,14px)] text-fg outline-none",f?"border-accent":"border-line focus:border-fg"].join(" ")}),r("button",{type:"submit","aria-label":d,disabled:T,className:"grid w-10 shrink-0 place-items-center bg-fg text-bg disabled:opacity-50",children:c("svg",{"aria-hidden":!0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[r("circle",{cx:"11",cy:"11",r:"7"}),r("path",{d:"M20 20l-3.5-3.5"})]})})]}):null,w=f&&g?r("p",{role:"status",className:"mb-3 text-[length:var(--size-body,14px)] text-fg-dim",children:g}):null,v=(e,s=!1)=>r(le,{children:r(Y,{ownerId:A,ownerType:"Footprint",Template:I,rows:a.dealers.map(t=>G(t,R)),fields:$,states:a.dealers.map(t=>y===t.id?{selected:!0}:void 0),actions:a.dealers.map(t=>({press:()=>B(t.id),label:U(t)})),copyAttrs:t=>({"data-dealer":a.dealers[t.index]?.id??""}),wrapCopy:s?t=>r("div",{className:se,children:t}):void 0,fallback:null,children:t=>e(t)})}),_=r(te,{pins:n,mapTheme:L,selectedKey:y,focus:j,onSelect:O,ariaLabel:E,className:ae,groupCrowded:!0,fitTo:z});return q?r(re,{position:p,attrs:{"data-dealer-finder":p},head:c(V,{children:[S,w]}),listRef:m,list:v(e=>e,!0),rowsReachOut:!0,map:_}):c("div",{"data-dealer-finder":"below",children:[S,w,_,a.dealers.length>0&&v(e=>r("div",{ref:m,className:["mt-12 grid gap-[2px] bg-bg",H(e.length),e.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":"max-[700px]:grid-cols-1"].join(" "),children:e}))]})}export{oe as default};
1
+ "use client";import{jsx as a,jsxs as c,Fragment as H}from"react/jsx-runtime";import{useEffect as J,useMemo as g,useRef as X,useState as o}from"react";import{CardTemplateRows as Z}from"./CardRowContext.js";import{DEALER_FIELDS as ee,dealerCardRow as te,dealerPins as ae,dealerPressLabel as re,useDealerSource as se}from"../lib/dealer-source.js";import{groupColsClass as le}from"../../format/lib/locations-grid.js";import{FOOTPRINT_LIST_COLUMNS_DEFAULT as R,FOOTPRINT_SHOWS_DEFAULT as ne,footprintListColsClass as oe,footprintListPosition as ie}from"../../format/lib/content/footprint.js";import{say as ce}from"../../format/lib/editor-words.js";import de from"./SiteMap.js";import ue,{SIDE_MAP_CLASS as pe,SIDE_ROW_REACH_CLASS as me,sideMapClass as fe}from"./SideListLayout.js";import{InsideSiteColumn as he}from"./SiteGutterFrame.js";const k={near:null,dealers:[]},ge=5;function be({mapLabel:D,mapTheme:F,search:M,searchHint:d,noMatchText:b,listPosition:A,showDistance:O,shows:u=ne,listColumns:x=R,fullHeight:S=!1,sectionHead:P,editing:j,template:W,ownerId:z=""}){const l=se(),[r,i]=o(k),[y,B]=o(""),[U,w]=o(!1),[_,p]=o(null),[q,V]=o(null),m=X(null);J(()=>{if(!l)return;let e=!0;return l({}).then(s=>e&&i(s)).catch(()=>e&&i(k)),()=>{e=!1}},[l]);const n=g(()=>ae(r.dealers),[r.dealers]),K=g(()=>new Set(n.map(e=>e.key)),[n]),Q=g(()=>r.near==="found"?n.slice(0,ge).map(e=>e.key):null,[r.near,n]),Y=e=>{p(e),K.has(e)&&V(s=>({key:e,n:(s?.n??0)+1}))},$=e=>{p(e),m.current?.querySelector(`[data-dealer="${CSS.escape(e)}"]`)?.scrollIntoView({block:"nearest"})};if(!l)return j?a("p",{"data-dealers-unavailable":!0,className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:ce("Dealers are not available on this website")}):null;const G=e=>{e.preventDefault();const s=y.trim();w(!0),p(null),l(s?{near:s}:{}).then(i).catch(()=>i(t=>({...t,near:"try_again"}))).finally(()=>w(!1))},L=u!=="list",v=u!=="map",f=ie({shows:u,listPosition:A}),C=f!=="below",h=r.near==="not_found"||r.near==="try_again",T=M&&v?c("form",{role:"search",onSubmit:G,className:"mb-4 flex gap-2",children:[a("input",{type:"search",value:y,onChange:e=>B(e.target.value),placeholder:d,"aria-label":d,"aria-invalid":h||void 0,className:["min-w-0 flex-1 border bg-bg px-3 py-2 text-[length:var(--size-body,14px)] text-fg outline-none",h?"border-accent":"border-line focus:border-fg"].join(" ")}),a("button",{type:"submit","aria-label":d,disabled:U,className:"grid w-10 shrink-0 place-items-center bg-fg text-bg disabled:opacity-50",children:c("svg",{"aria-hidden":!0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a("circle",{cx:"11",cy:"11",r:"7"}),a("path",{d:"M20 20l-3.5-3.5"})]})})]}):null,E=h&&b?a("p",{role:"status",className:"mb-3 text-[length:var(--size-body,14px)] text-fg-dim",children:b}):null,N=(e,s=!1)=>a(he,{children:a(Z,{ownerId:z,ownerType:"Footprint",Template:W,rows:r.dealers.map(t=>te(t,O)),fields:ee,states:r.dealers.map(t=>_===t.id?{selected:!0}:void 0),actions:r.dealers.map(t=>({press:()=>Y(t.id),label:re(t)})),copyAttrs:t=>({"data-dealer":r.dealers[t.index]?.id??""}),wrapCopy:s?t=>a("div",{className:me,children:t}):void 0,fallback:null,children:t=>e(t)})}),I=L?a(de,{pins:n,mapTheme:F,selectedKey:_,focus:q,onSelect:$,ariaLabel:D,className:C?fe(S):pe,groupCrowded:!0,fitTo:Q}):null;return C?a(ue,{position:f,attrs:{"data-dealer-finder":f},fullHeight:S,head:c(H,{children:[P,T,E]}),listRef:m,list:N(e=>e,!0),rowsReachOut:!0,map:I}):c("div",{"data-dealer-finder":"below",children:[T,E,I,v&&r.dealers.length>0&&N(e=>a("div",{ref:m,className:[...L?["mt-12"]:[],"grid gap-[2px] bg-bg",...x===R?[le(e.length),e.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":"max-[700px]:grid-cols-1"]:[oe(x,e.length)]].join(" "),children:e}))]})}export{be as default};
@@ -2,7 +2,7 @@ import { type BandPad } from "../lib/content/section-padding.js";
2
2
  import type { SlotComponent } from "efficient-easel/blocks";
3
3
  import type { CardPressTitle } from "../lib/document/card-press-titles.js";
4
4
  import type { MapThemeMode } from "../../format/lib/map-styles.js";
5
- import { type FootprintOffice } from "../../format/lib/content/footprint.js";
5
+ import { type FootprintListColumns, type FootprintMapHeight, type FootprintOffice, type FootprintShows } from "../../format/lib/content/footprint.js";
6
6
  import type { DealerListPosition } from "../lib/dealer-source.js";
7
7
  export interface FootprintProps {
8
8
  sectionNumber?: string;
@@ -21,8 +21,12 @@ export interface FootprintProps {
21
21
  noMatchText?: string;
22
22
  listPosition?: DealerListPosition;
23
23
  showDistance?: boolean;
24
+ shows?: FootprintShows;
25
+ listColumns?: FootprintListColumns;
26
+ mapHeight?: FootprintMapHeight;
27
+ headInList?: boolean;
24
28
  template?: SlotComponent;
25
29
  ownerId?: string;
26
30
  pressTitles?: readonly CardPressTitle[];
27
31
  }
28
- export default function Footprint({ sectionNumber, heading, tagline, offices, mapTheme, padTop, padBottom, bandPad, editing, omitHead, dealers, search, searchHint, noMatchText, listPosition, showDistance, template, ownerId, pressTitles, }: FootprintProps): import("react").JSX.Element | null;
32
+ export default function Footprint({ sectionNumber, heading, tagline, offices, mapTheme, padTop, padBottom, bandPad, editing, omitHead, dealers, search, searchHint, noMatchText, listPosition, showDistance, shows, listColumns, mapHeight, headInList, template, ownerId, pressTitles, }: FootprintProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as f}from"react/jsx-runtime";import{bandPadAttrs as W}from"../lib/content/section-padding.js";import{innerPaddingFallback as q}from"../lib/document/passes/section-padding.js";import{HideTaker as Q}from"./ViewHideRoot.js";import{isWebAddress as X}from"../../format/lib/content/box-link.js";import{SiteLink as Y}from"../lib/site-runtime.js";import{useEffect as I,useMemo as Z,useState as j}from"react";import{CardTemplateRows as E}from"./CardRowContext.js";import{footprintCardRow as P,footprintPins as J,footprintSearchText as U}from"../../format/lib/content/footprint.js";import{LIST_KEY_ATTR as V,LIST_ROW_ATTR as ee,LIST_TEXT_ATTR as te}from"../../format/lib/content/list-query.js";import{parseListPosition as le}from"../../format/lib/content/list-position.js";import{bucketByGroup as re,groupColsClass as ae}from"../../format/lib/locations-grid.js";import ne from"./EditorialSectionHead.js";import{LocationGroupHeader as ie}from"./LocationGroupHeader.js";import{renderGold as oe,renderHeadline as se}from"./goldPhrases.js";import me from"./PartStyledText.js";import{say as R}from"../../format/lib/editor-words.js";import ce from"./DealerFinder.js";import de from"./ListSearchBox.js";import pe,{SIDE_MAP_CLASS as fe}from"./SideListLayout.js";import ue from"./SiteMap.js";import{InsideSiteColumn as B}from"./SiteGutterFrame.js";const a={bodySmall:"text-[length:var(--size-body,10px)]",bodyLarge:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"},G=`absolute bottom-5 left-6 font-mono ${a.labelSmall} uppercase tracking-[0.24em] text-accent hover:underline`;function be({sectionNumber:u="",heading:s="",tagline:x="",offices:r=[],mapTheme:b="auto",padTop:T,padBottom:L,bandPad:g,editing:m,omitHead:$=!1,dealers:c=!1,search:d=!1,searchHint:n="",noMatchText:S="",listPosition:p="below",showDistance:K=!0,template:_,ownerId:y="",pressTitles:O}){const k=c===!0,w=le(p),C=g??W({padTop:T,padBottom:L},q("Footprint")),[v,h]=j(null),z=r.length===0&&!k&&!u&&!s&&!x;if(I(()=>{h(e=>e!==null&&e>=r.length?null:e)},[r]),z&&!m)return null;const M=re(r,e=>String(e.group??""),()=>""),D=(e,l)=>{const o=v===l,i=e.href&&e.linkLabel?{href:e.href,label:e.linkLabel}:null,N=f("button",{type:"button",onClick:()=>h(l),"aria-pressed":o,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",o?"outline-accent":"outline-transparent hover:outline-line",i?"w-full pb-11":""].filter(Boolean).join(" "),children:[f("span",{className:`flex items-center gap-2.5 font-mono ${a.labelSmall} uppercase tracking-[0.28em]`,children:[e.hq&&t("span",{className:`border border-accent bg-accent px-1.5 py-0.5 ${a.bodySmall} text-bg`,children:"HQ"}),e.role&&t("span",{className:"text-accent",children:e.role})]}),e.city&&t("span",{className:`font-display ${a.bodyLarge} font-medium leading-[1.2] tracking-[-0.01em] text-fg`,children:t(me,{value:e.city,children:e.city})}),e.country&&t("span",{className:`font-mono ${a.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.country}),e.address&&t("span",{className:`font-mono ${a.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:oe(e.address)})]},i?void 0:l);return i?f("div",{className:"relative flex",children:[N,X(i.href)?t(Y,{newTab:"auto",href:i.href,className:G,children:`→ ${i.label}`}):t("a",{href:i.href,className:G,children:`→ ${i.label}`})]},l):N},A=M.flatMap(e=>e.items),F=e=>t("div",{className:"mt-12 flex flex-col gap-8",children:M.map((l,o)=>f("div",{children:[l.key&&t(ie,{groupKey:l.key,count:l.items.length}),t("div",{className:["grid gap-[2px] bg-bg",ae(l.items.length),l.items.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":l.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:e(l)})]},l.key?`g:${l.key}`:`ungrouped:${o}`))});return t(Q,{as:"section",className:"relative z-[2] bg-bg",children:f("div",{className:["mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",C.className].filter(Boolean).join(" "),style:C.style,children:[!$&&(u||s||x)&&t(ne,{num:u,title:s?se(s):void 0,desc:x||void 0,spaceBelow:"mb-12"}),k?t(ce,{mapLabel:s.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:b,search:d,searchHint:n,noMatchText:S,listPosition:p,showDistance:K,editing:m,template:_,ownerId:y}):w!=="below"?t(pe,{position:w,attrs:{"data-footprint-list":w},head:d?t("div",{className:"mb-4",children:t(de,{hint:n,noMatchText:S,listKey:`${y}:offices`,editing:m})}):null,listAttrs:d?{[V]:`${y}:offices`}:void 0,list:t(B,{children:t(E,{ownerId:y,ownerType:"Footprint",Template:_,rows:r.map(P),states:r.map((e,l)=>v===l?{selected:!0}:void 0),actions:r.map((e,l)=>({press:()=>h(l)})),pressTitles:O,copyAttrs:e=>({[ee]:"",[te]:U(r[e.index])}),fallback:null,children:e=>e})}),map:t(H,{offices:r,mapLabel:s.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:b,activeIndex:v,onSelect:h,editing:m,frame:`sf-card relative w-full overflow-hidden border border-line ${fe}`})}):t(H,{offices:r,mapLabel:s.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:b,activeIndex:v,onSelect:h,editing:m}),!k&&w==="below"&&r.length>0&&t(E,{ownerId:y,ownerType:"Footprint",Template:_,rows:A.map(({item:e})=>P(e)),states:A.map(({index:e})=>v===e?{selected:!0}:void 0),actions:A.map(({index:e})=>({press:()=>h(e)})),fallback:F(e=>e.items.map(({item:l,index:o})=>D(l,o))),children:e=>{const l=e;let o=0;return t(B,{children:F(i=>{const N=l.slice(o,o+i.items.length);return o+=i.items.length,N})})}}),!k&&r.length===0&&m&&t("p",{className:`mt-8 font-mono ${a.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:R("Add an office in the inspector")})]})})}function H({offices:u,mapLabel:s,mapTheme:x,activeIndex:r,onSelect:b,editing:T,frame:L}){const g=Z(()=>J(u),[u]),[m,$]=j(null),c=r===null?null:String(r),d=c!==null&&g.some(p=>p.key===c);if(I(()=>{c!==null&&d&&$(p=>({key:c,n:(p?.n??0)+1}))},[c,d]),g.length===0)return T?t("div",{className:"relative flex aspect-[16/9] w-full items-center justify-center overflow-hidden border border-line bg-bg px-6 text-center max-view-tablet:aspect-[4/5]",children:t("span",{className:`font-mono ${a.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:R("Add office coordinates to plot the map")})}):null;const n=d&&r!==null?u[r]:null,S=n?f("div",{className:"flex items-start gap-3 border border-line bg-bg px-3.5 py-2.5 text-fg shadow-[0_8px_24px_rgba(0,0,0,.4)]",children:[f("div",{className:"min-w-0 flex-1",children:[f("div",{className:`flex items-center gap-2 font-mono ${a.labelSmall} uppercase tracking-[0.28em]`,children:[n.hq&&t("span",{className:`bg-accent px-1.5 py-px ${a.bodySmall} text-bg`,children:"HQ"}),n.role&&t("span",{className:"text-accent",children:n.role})]}),n.city&&t("div",{className:`mt-1.5 font-display ${a.bodyLarge} font-medium leading-[1.2] text-fg`,children:n.city}),n.country&&t("div",{className:`mt-1 font-mono ${a.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:n.country})]}),t("button",{type:"button",onClick:()=>b(null),"aria-label":"Close",className:"-mr-1 grid h-6 w-6 shrink-0 place-items-center text-fg-dim hover:text-fg",children:t("svg",{"aria-hidden":!0,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:t("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}):null;return t(ue,{pins:g,mapTheme:x,ariaLabel:s||"Offices",className:L??"sf-card relative aspect-[16/9] w-full overflow-hidden border border-line max-view-tablet:aspect-[4/5]",selectedKey:d?c:null,focus:m,onSelect:p=>b(Number(p)),card:S})}export{be as default};
1
+ "use client";import{jsx as t,jsxs as m,Fragment as le}from"react/jsx-runtime";import{bandPadAttrs as ne}from"../lib/content/section-padding.js";import{innerPaddingFallback as re}from"../lib/document/passes/section-padding.js";import{HideTaker as ae}from"./ViewHideRoot.js";import{isWebAddress as ie}from"../../format/lib/content/box-link.js";import{SiteLink as oe}from"../lib/site-runtime.js";import{useEffect as B,useMemo as se,useState as G}from"react";import{CardTemplateRows as K}from"./CardRowContext.js";import{FOOTPRINT_LIST_COLUMNS_DEFAULT as ce,FOOTPRINT_MAP_HEIGHT_FULL as me,FOOTPRINT_SHOWS_DEFAULT as de,footprintCardRow as z,footprintListColsClass as pe,footprintListPosition as fe,footprintPins as ue,footprintSearchText as be}from"../../format/lib/content/footprint.js";import{LIST_KEY_ATTR as he,LIST_ROW_ATTR as xe,LIST_TEXT_ATTR as ge}from"../../format/lib/content/list-query.js";import{bucketByGroup as ye}from"../../format/lib/locations-grid.js";import ve from"./EditorialSectionHead.js";import Te from"./SectionHeader.js";import{LocationGroupHeader as Se}from"./LocationGroupHeader.js";import{renderGold as we,renderHeadline as D}from"./goldPhrases.js";import Ne from"./PartStyledText.js";import{say as U}from"../../format/lib/editor-words.js";import ke from"./DealerFinder.js";import Le from"./ListSearchBox.js";import _e,{sideMapClass as $e}from"./SideListLayout.js";import Fe from"./SiteMap.js";import{InsideSiteColumn as W}from"./SiteGutterFrame.js";const r={bodySmall:"text-[length:var(--size-body,10px)]",bodyLarge:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"},q=`absolute bottom-5 left-6 font-mono ${r.labelSmall} uppercase tracking-[0.24em] text-accent hover:underline`;function He({sectionNumber:d="",heading:a="",tagline:b="",offices:n=[],mapTheme:h="auto",padTop:L,padBottom:_,bandPad:g,editing:p,omitHead:$=!1,dealers:f=!1,search:c=!1,searchHint:i="",noMatchText:S="",listPosition:u="below",showDistance:X=!0,shows:w=de,listColumns:O=ce,mapHeight:Y,headInList:Z=!1,template:F,ownerId:y="",pressTitles:J}){const N=f===!0,C=w!=="list",V=w!=="map",v=fe({shows:w,listPosition:u}),H=Y===me,M=Z&&v!=="below",E=g??ne({padTop:L,padBottom:_},re("Footprint")),[T,x]=G(null),ee=n.length===0&&!N&&!d&&!a&&!b;if(B(()=>{x(e=>e!==null&&e>=n.length?null:e)},[n]),ee&&!p)return null;const P=ye(n,e=>String(e.group??""),()=>""),te=(e,l)=>{const s=T===l,o=e.href&&e.linkLabel?{href:e.href,label:e.linkLabel}:null,k=m("button",{type:"button",onClick:()=>x(l),"aria-pressed":s,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",s?"outline-accent":"outline-transparent hover:outline-line",o?"w-full pb-11":""].filter(Boolean).join(" "),children:[m("span",{className:`flex items-center gap-2.5 font-mono ${r.labelSmall} uppercase tracking-[0.28em]`,children:[e.hq&&t("span",{className:`border border-accent bg-accent px-1.5 py-0.5 ${r.bodySmall} text-bg`,children:"HQ"}),e.role&&t("span",{className:"text-accent",children:e.role})]}),e.city&&t("span",{className:`font-display ${r.bodyLarge} font-medium leading-[1.2] tracking-[-0.01em] text-fg`,children:t(Ne,{value:e.city,children:e.city})}),e.country&&t("span",{className:`font-mono ${r.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.country}),e.address&&t("span",{className:`font-mono ${r.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:we(e.address)})]},o?void 0:l);return o?m("div",{className:"relative flex",children:[k,ie(o.href)?t(oe,{newTab:"auto",href:o.href,className:q,children:`→ ${o.label}`}):t("a",{href:o.href,className:q,children:`→ ${o.label}`})]},l):k},A=P.flatMap(e=>e.items),R=e=>t("div",{className:C?"mt-12 flex flex-col gap-8":"flex flex-col gap-8",children:P.map((l,s)=>m("div",{children:[l.key&&t(Se,{groupKey:l.key,count:l.items.length}),t("div",{className:["grid gap-[2px] bg-bg",pe(O,l.items.length)].join(" "),children:e(l)})]},l.key?`g:${l.key}`:`ungrouped:${s}`))}),j=!$&&!!(d||a||b),I=M&&j?t(Te,{look:"natural",num:d||void 0,title:a?D(a):void 0,description:b||void 0,spaceBelow:"mb-8"}):null;return t(ae,{as:"section",className:"relative z-[2] bg-bg",children:m("div",{className:["mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",E.className].filter(Boolean).join(" "),style:E.style,children:[j&&!M&&t(ve,{num:d,title:a?D(a):void 0,desc:b||void 0,spaceBelow:"mb-12"}),N?t(ke,{mapLabel:a.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:h,search:c,searchHint:i,noMatchText:S,listPosition:u,showDistance:X,shows:w,listColumns:O,fullHeight:H,sectionHead:I,editing:p,template:F,ownerId:y}):v!=="below"?t(_e,{position:v,attrs:{"data-footprint-list":v},fullHeight:H,head:I||c?m(le,{children:[I,c?t("div",{className:"mb-4",children:t(Le,{hint:i,noMatchText:S,listKey:`${y}:offices`,editing:p})}):null]}):null,listAttrs:c?{[he]:`${y}:offices`}:void 0,list:t(W,{children:t(K,{ownerId:y,ownerType:"Footprint",Template:F,rows:n.map(z),states:n.map((e,l)=>T===l?{selected:!0}:void 0),actions:n.map((e,l)=>({press:()=>x(l)})),pressTitles:J,copyAttrs:e=>({[xe]:"",[ge]:be(n[e.index])}),fallback:null,children:e=>e})}),map:t(Q,{offices:n,mapLabel:a.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:h,activeIndex:T,onSelect:x,editing:p,frame:`sf-card relative w-full overflow-hidden border border-line ${$e(H)}`})}):C?t(Q,{offices:n,mapLabel:a.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:h,activeIndex:T,onSelect:x,editing:p}):null,!N&&V&&v==="below"&&n.length>0&&t(K,{ownerId:y,ownerType:"Footprint",Template:F,rows:A.map(({item:e})=>z(e)),states:A.map(({index:e})=>T===e?{selected:!0}:void 0),actions:A.map(({index:e})=>({press:()=>x(e)})),fallback:R(e=>e.items.map(({item:l,index:s})=>te(l,s))),children:e=>{const l=e;let s=0;return t(W,{children:R(o=>{const k=l.slice(s,s+o.items.length);return s+=o.items.length,k})})}}),!N&&n.length===0&&p&&t("p",{className:`mt-8 font-mono ${r.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:U("Add an office in the inspector")})]})})}function Q({offices:d,mapLabel:a,mapTheme:b,activeIndex:n,onSelect:h,editing:L,frame:_}){const g=se(()=>ue(d),[d]),[p,$]=G(null),f=n===null?null:String(n),c=f!==null&&g.some(u=>u.key===f);if(B(()=>{f!==null&&c&&$(u=>({key:f,n:(u?.n??0)+1}))},[f,c]),g.length===0)return L?t("div",{className:"relative flex aspect-[16/9] w-full items-center justify-center overflow-hidden border border-line bg-bg px-6 text-center max-view-tablet:aspect-[4/5]",children:t("span",{className:`font-mono ${r.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:U("Add office coordinates to plot the map")})}):null;const i=c&&n!==null?d[n]:null,S=i?m("div",{className:"flex items-start gap-3 border border-line bg-bg px-3.5 py-2.5 text-fg shadow-[0_8px_24px_rgba(0,0,0,.4)]",children:[m("div",{className:"min-w-0 flex-1",children:[m("div",{className:`flex items-center gap-2 font-mono ${r.labelSmall} uppercase tracking-[0.28em]`,children:[i.hq&&t("span",{className:`bg-accent px-1.5 py-px ${r.bodySmall} text-bg`,children:"HQ"}),i.role&&t("span",{className:"text-accent",children:i.role})]}),i.city&&t("div",{className:`mt-1.5 font-display ${r.bodyLarge} font-medium leading-[1.2] text-fg`,children:i.city}),i.country&&t("div",{className:`mt-1 font-mono ${r.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:i.country})]}),t("button",{type:"button",onClick:()=>h(null),"aria-label":"Close",className:"-mr-1 grid h-6 w-6 shrink-0 place-items-center text-fg-dim hover:text-fg",children:t("svg",{"aria-hidden":!0,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:t("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}):null;return t(Fe,{pins:g,mapTheme:b,ariaLabel:a||"Offices",className:_??"sf-card relative aspect-[16/9] w-full overflow-hidden border border-line max-view-tablet:aspect-[4/5]",selectedKey:c?f:null,focus:p,onSelect:u=>h(Number(u)),card:S})}export{He as default};
@@ -1,4 +1,4 @@
1
- import type { PadValues } from "../lib/content/section-padding.js";
1
+ import { type PadValues } from "../lib/content/section-padding.js";
2
2
  import type { CSSProperties } from "react";
3
3
  export type HeadingLevel = "1" | "2" | "3" | "4" | "5" | "6";
4
4
  type Level = HeadingLevel;
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{resolveTypeSize as g}from"../../format/lib/content/section-type-size.js";import p from"./BlockFrame.js";import{partAttr as o}from"../../format/lib/content/part-names.js";import{renderHeadline as r}from"./goldPhrases.js";const m={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"64px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}},f="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-view-wide:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-view-wide:leading-[0.95]";function x(a,n="font-display"){const e=m[a],t=g(void 0,e.size,e.role,e.step),i=e.sizeMobile?g(void 0,e.sizeMobile,e.role,e.step):void 0,d={"--heading-size":t,...i?{"--heading-size-m":i}:{}},s=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",h=["text-[length:var(--heading-size)]",e.leading,i?"max-view-wide:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return{className:`${n} ${s} tracking-[-0.03em] text-fg ${h} text-left`,style:d}}function c({level:a,text:n,contained:e,hero:t=!1,pad:i}){if(t)return l("h1",{className:f,children:r(n,!1)});const d=`h${a}`,s=x(a);return l(p,{contained:e,className:"py-6",pad:i?{values:i,frame:24}:void 0,part:o("heading-block"),children:l(d,{className:s.className,style:s.style,...o("heading"),children:r(n,!1)})})}export{c as default,x as headingLook};
1
+ import{jsx as l}from"react/jsx-runtime";import{BLOCK_PAD_FRAME as p,ownPadOf as m}from"../lib/content/section-padding.js";import{resolveTypeSize as o}from"../../format/lib/content/section-type-size.js";import f from"./BlockFrame.js";import{partAttr as g}from"../../format/lib/content/part-names.js";import{renderHeadline as r}from"./goldPhrases.js";const x={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"64px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}},c="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-view-wide:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-view-wide:leading-[0.95]";function z(a,n="font-display"){const e=x[a],s=o(void 0,e.size,e.role,e.step),i=e.sizeMobile?o(void 0,e.sizeMobile,e.role,e.step):void 0,d={"--heading-size":s,...i?{"--heading-size-m":i}:{}},t=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",h=["text-[length:var(--heading-size)]",e.leading,i?"max-view-wide:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return{className:`${n} ${t} tracking-[-0.03em] text-fg ${h} text-left`,style:d}}function w({level:a,text:n,contained:e,hero:s=!1,pad:i}){if(s)return l("h1",{className:c,children:r(n,!1)});const d=`h${a}`,t=z(a);return l(f,{contained:e,...m(i,p.heading),part:g("heading-block"),children:l(d,{className:t.className,style:t.style,...g("heading"),children:r(n,!1)})})}export{w as default,z as headingLook};
@@ -16,6 +16,9 @@ interface Props {
16
16
  textureColor?: string;
17
17
  phoneUpDown?: string;
18
18
  phoneSideways?: string;
19
+ phoneWordsTop?: number;
20
+ phoneWordsBottom?: number;
21
+ phoneBoxGap?: number;
19
22
  autoplay?: boolean;
20
23
  autoplayInterval?: number;
21
24
  showTicker?: boolean;
@@ -37,4 +40,4 @@ interface Props {
37
40
  editing?: boolean;
38
41
  partMotion?: Record<string, unknown>;
39
42
  }
40
- export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
43
+ export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, phoneWordsTop, phoneWordsBottom, phoneBoxGap, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as Ve}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as $e,useRef as u,useState as y}from"react";import{markOverlayPortal as oe}from"../../format/lib/document/overlay-portal.js";import Be from"./Ticker.js";import{HeroSlideStyleContext as ze}from"./HeroSlide.js";import Xe from"./HeroArrows.js";import Ge from"./Reel.js";import{TICKER_PART_ATTR as Ye}from"./PreviewTickerContext.js";import{useReducedMotion as je}from"./useReducedMotion.js";import{heroHeightBox as qe,heroStoresRatio as Ke}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Fe}from"../lib/document/header-clearance.js";import{nextReel as Je,normaliseHeroReelShape as Qe,reelShown as Ue}from"../../format/lib/reel.js";import{arrowsShown as We,arrowStep as Ze}from"../../format/lib/hero-arrows.js";import{swipeEnabled as et,swipeStep as tt}from"../../format/lib/hero-swipe.js";import{videoControlShown as rt,videoHeld as ot}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ne}from"../../format/lib/editor-words.js";import{markedChildren as se}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as nt,TICKER_MOTION_PART as ce}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as st}from"../../format/lib/content/ink.js";import{HeroPartBox as ct,heroPartScroll as at}from"./HeroPictures.js";import{entranceDrawn as lt}from"../lib/animation/entrance.js";import{readPartMotion as it}from"../lib/animation/part-motion.js";import{scrim as ae}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const ut="Play video",dt="Hold video",mt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",ft=()=>ne("item"),le=new Map;function ht(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener(B,l),()=>d.removeEventListener(B,l)}function pt({slides:m,strip:l,alignment:d,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:ie,phoneSideways:ue,autoplay:z,autoplayInterval:H,showTicker:de,tickerItems:X,heightDesktop:me,heightTablet:fe,heightMobile:he,heightFixed:pe,heightFixedTablet:ve,heightFixedMobile:be,showPicker:xe,pickerShape:we,pickerPlacement:ke,showArrows:ye,arrowsShape:Ee,arrowsPlacement:ge,editing:s,partMotion:G}){const Y=qe({heightDesktop:me,heightTablet:fe,heightMobile:he,heightFixed:pe,heightFixedTablet:ve,heightFixedMobile:be}),{className:_e,style:Re}=Y,N=Ke(Y),j=(l?.blockCount??0)>0,Te=!j&&nt({showTicker:de,tickerItems:X}),q=(X??[]).map(e=>e?.text?.trim()?e.text:s?ft():"").filter(Boolean),Se=lt(it({_partMotion:G},ce)),Oe=at(G,ce),f=u(null),K=u(null),F=u(null),A=u(null),J=$e(),L=u(J),[E,He]=y([]),[Ne,Q]=y(0),x=u(0),[U,W]=y(!1),[Ae,Z]=y(null),[g,Le]=y(!1),M=je(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{Q(e),Z(o=>o===e?o:null),x.current=e,le.set(L.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||J;L.current=t;const r=le.get(t);typeof r=="number"&&(Q(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{He(o=>Je(o,se(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[_]),k(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||L.current;r.id&&r.id!==p||i(r.index,!0)};return ht(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Ne,0),Math.max(0,c-1)),P=Ae===a,C=Ue({shown:xe,count:c}),ee=We({shown:ye,count:c}),te=rt({editing:s,shown:a,slides:E}),Me=ot({editing:s,playing:g,controlShown:te}),R=et({count:c,editing:s}),h=u(null),w=u(null),Pe=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ce=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),De=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=tt(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||U||P||M||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,U,P,M,c,a,i]),k(()=>{const e=[K.current,F.current,A.current].filter(Boolean),t=e.map(o=>oe(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,re=I??p.closest("[data-idx]");if(!re)return;o.stopPropagation(),o.preventDefault();const V=I?Ze(I.dataset.heroNav,x.current,c):Number(re.dataset.idx);Number.isNaN(V)||(i(V,s),se(_(),"data-slide-name")[V]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,_,s]);const Ie=v(e=>{if(!e)return;const t=oe(e),r=o=>{o.stopPropagation(),o.preventDefault(),Le(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(ze.Provider,{value:{alignment:d,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:Me,phoneUpDown:ie,phoneSideways:ue,holdReel:()=>Z(a),reelHeld:P,shownSlide:a,ratioMin:N},children:$(Ve,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${_e} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Re,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onTouchStart:Pe,onTouchMove:Ce,onTouchEnd:De,...b("hero"),children:[n(m,{className:N?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),te&&n("div",{ref:Ie,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Fe} + 16px)`},children:$("button",{type:"button",className:mt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ne(g?dt:ut)]})}),(C||ee)&&$("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(Ge,{ref:K,slides:E,active:a,shape:Qe(we),placement:ke}),ee&&n(Xe,{ref:A,shape:Ee,placement:ge,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:F,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...b("dot")},t))}),j&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ae(.55),...st},...b("strip"),children:n(l,{})}),Te&&q.length>0&&n(vt,{editing:!!s,entrance:Se,scroll:Oe,children:n(Be,{items:q,backdrop:"dark-media"})})]})})}function vt({editing:m,entrance:l,scroll:d,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=m?{[Ye]:""}:void 0;return n(ct,{entrance:l,scroll:d,editing:m,className:S,attrs:O,style:{background:ae(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,dt as HERO_VIDEO_HOLD_LABEL,ut as HERO_VIDEO_PLAY_LABEL,pt as default,ht as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as ze}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as Xe,useRef as u,useState as y}from"react";import{markOverlayPortal as oe}from"../../format/lib/document/overlay-portal.js";import Ge from"./Ticker.js";import{HeroSlideStyleContext as Ye}from"./HeroSlide.js";import je from"./HeroArrows.js";import qe from"./Reel.js";import{TICKER_PART_ATTR as Ke}from"./PreviewTickerContext.js";import{useReducedMotion as Fe}from"./useReducedMotion.js";import{heroHeightBox as Je,heroStoresRatio as Qe}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ue}from"../lib/document/header-clearance.js";import{nextReel as We,normaliseHeroReelShape as Ze,reelShown as et}from"../../format/lib/reel.js";import{arrowsShown as tt,arrowStep as rt}from"../../format/lib/hero-arrows.js";import{swipeEnabled as ot,swipeStep as nt}from"../../format/lib/hero-swipe.js";import{videoControlShown as st,videoHeld as ct}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ne}from"../../format/lib/editor-words.js";import{markedChildren as se}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as at,TICKER_MOTION_PART as ce}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as lt}from"../../format/lib/content/ink.js";import{HeroPartBox as it,heroPartScroll as ut}from"./HeroPictures.js";import{entranceDrawn as dt}from"../lib/animation/entrance.js";import{readPartMotion as mt}from"../lib/animation/part-motion.js";import{scrim as ae}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const ft="Play video",ht="Hold video",pt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",vt=()=>ne("item"),le=new Map;function bt(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener(B,l),()=>d.removeEventListener(B,l)}function xt({slides:m,strip:l,alignment:d,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,autoplay:z,autoplayInterval:H,showTicker:he,tickerItems:X,heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke,showPicker:ye,pickerShape:Ee,pickerPlacement:ge,showArrows:_e,arrowsShape:Re,arrowsPlacement:Te,editing:s,partMotion:G}){const Y=Je({heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke}),{className:Se,style:Oe}=Y,N=Qe(Y),j=(l?.blockCount??0)>0,He=!j&&at({showTicker:he,tickerItems:X}),q=(X??[]).map(e=>e?.text?.trim()?e.text:s?vt():"").filter(Boolean),Ne=dt(mt({_partMotion:G},ce)),Ae=ut(G,ce),f=u(null),K=u(null),F=u(null),A=u(null),J=Xe(),L=u(J),[E,Le]=y([]),[Me,Q]=y(0),x=u(0),[U,W]=y(!1),[Pe,Z]=y(null),[g,Ce]=y(!1),M=Fe(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{Q(e),Z(o=>o===e?o:null),x.current=e,le.set(L.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||J;L.current=t;const r=le.get(t);typeof r=="number"&&(Q(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{Le(o=>We(o,se(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[_]),k(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||L.current;r.id&&r.id!==p||i(r.index,!0)};return bt(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Me,0),Math.max(0,c-1)),P=Pe===a,C=et({shown:ye,count:c}),ee=tt({shown:_e,count:c}),te=st({editing:s,shown:a,slides:E}),De=ct({editing:s,playing:g,controlShown:te}),R=ot({count:c,editing:s}),h=u(null),w=u(null),Ie=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ve=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),$e=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=nt(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||U||P||M||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,U,P,M,c,a,i]),k(()=>{const e=[K.current,F.current,A.current].filter(Boolean),t=e.map(o=>oe(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,re=I??p.closest("[data-idx]");if(!re)return;o.stopPropagation(),o.preventDefault();const V=I?rt(I.dataset.heroNav,x.current,c):Number(re.dataset.idx);Number.isNaN(V)||(i(V,s),se(_(),"data-slide-name")[V]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,_,s]);const Be=v(e=>{if(!e)return;const t=oe(e),r=o=>{o.stopPropagation(),o.preventDefault(),Ce(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Ye.Provider,{value:{alignment:d,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:De,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,holdReel:()=>Z(a),reelHeld:P,shownSlide:a,ratioMin:N},children:$(ze,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Se} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Oe,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onTouchStart:Ie,onTouchMove:Ve,onTouchEnd:$e,...b("hero"),children:[n(m,{className:N?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),te&&n("div",{ref:Be,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ue} + 16px)`},children:$("button",{type:"button",className:pt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ne(g?ht:ft)]})}),(C||ee)&&$("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(qe,{ref:K,slides:E,active:a,shape:Ze(Ee),placement:ge}),ee&&n(je,{ref:A,shape:Re,placement:Te,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:F,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...b("dot")},t))}),j&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ae(.55),...lt},...b("strip"),children:n(l,{})}),He&&q.length>0&&n(wt,{editing:!!s,entrance:Ne,scroll:Ae,children:n(Ge,{items:q,backdrop:"dark-media"})})]})})}function wt({editing:m,entrance:l,scroll:d,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=m?{[Ke]:""}:void 0;return n(it,{entrance:l,scroll:d,editing:m,className:S,attrs:O,style:{background:ae(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,ht as HERO_VIDEO_HOLD_LABEL,ft as HERO_VIDEO_PLAY_LABEL,xt as default,bt as subscribeSliderGoto};
@@ -1,6 +1,9 @@
1
1
  import { type SlotComponent } from "efficient-easel/blocks";
2
2
  import { type HeroMediaType } from "../../format/lib/hero-media-layout.js";
3
3
  export interface HeroSingleProps {
4
+ phoneWordsTop?: number;
5
+ phoneWordsBottom?: number;
6
+ phoneBoxGap?: number;
4
7
  overlay?: number;
5
8
  overlayColor?: string;
6
9
  overlayPosition?: string;
@@ -32,4 +35,4 @@ export interface HeroSingleProps {
32
35
  editing?: boolean;
33
36
  partMotion?: Record<string, unknown>;
34
37
  }
35
- export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
38
+ export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, phoneWordsTop, phoneWordsBottom, phoneBoxGap, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as k}from"react/jsx-runtime";import{HideTaker as oe}from"./ViewHideRoot.js";import{useRef as re,useState as te}from"react";import ie from"./HeroPoster.js";import{HeroMediaLayer as se,heroMediaReading as ae,HeroPickArea as ne,heroPartEntrance as le,heroPartHover as ce,heroPartScroll as me,heroPictureOrigins as ue,HeroPictureHover as he,heroPicturesHover as de,HeroTint as fe,HeroTwoPictures as pe}from"./HeroPictures.js";import{HeroVideoBackdrop as ge,HeroVideoPlayer as ve}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as ye,heroStoresRatio as He}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as xe,overlayGradient as Pe}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as be}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as u}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as we}from"../../format/lib/hero-media-layout.js";import Te from"./PhotoHoverSheet.js";import{partAttr as h}from"../../format/lib/content/part-names.js";function _e({overlay:A=100,overlayColor:I=u,overlayPosition:L=xe,mediaType:d=we.HeroSingle,mediaSrc:s,poster:f,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p=u,tintOpacity:g=0,heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,boxes:v,videoSource:M,youtubeUrl:B,videoPlayback:D,mediaLayout:Y,mediaLayoutPhone:F,mediaImage2:C,objectPosition2:U,objectPosition2Phone:$,objectPosition2Tablet:G,tintColor2:K=u,tintOpacity2:q=0,editing:o=!1,partMotion:r}){const y=ye({heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:J,style:Q}=y,H=He(y),c=d==="video",x=c?i(s):void 0,P=c?i(f):i(s)??i(f),{fromYouTube:b,onClick:w,youTubeId:T,backgroundFile:_,desktopLayout:W,phoneLayout:X,twoPictures:S}=ae({isVideo:c,videoSource:M,videoPlayback:D,youtubeUrl:B,mediaLayout:Y,mediaLayoutPhone:F}),[E,Z]=te(!1),m=!E,ee=re(null),t=d==="video"?"media":"image",N=de(r);return k(oe,{as:"section",ref:ee,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${J} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:Q,...N.hostAttrs,...h("hero"),children:[e(Te,{sheet:N.sheet}),e(se,{partMotion:r,editing:o,children:S?e(pe,{desktopLayout:W,phoneLayout:X,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p,tintOpacity:g},second:{src:C,objectPosition:U,objectPositionPhone:$,objectPositionTablet:G,tintColor:K,tintOpacity:q}}):e(ne,{part:t,editing:o,entrance:t==="image"?le(r,"image"):null,scroll:t==="image"?me(r,"image"):null,origins:ue({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(he,{treatment:t==="image"?ce(r,"image"):{},children:[e(ie,{videoSrc:_?x:void 0,posterSrc:P,showVideo:_,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),b&&e(ge,{youTubeId:T,ownPoster:!!P,background:!w,editing:o})]})})}),w&&e(ve,{youTubeId:T,fileSrc:b?void 0:x,playing:E,onPlay:()=>Z(!0),editing:o}),m&&!S&&e(fe,{color:p,opacity:g}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:Pe(I,L),opacity:Math.min(Math.max(A,0),100)/100},...h("overlay")}),m&&v&&e("div",{className:[H?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:be,...h("hero-content"),children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{_e as default};
1
+ "use client";import{jsx as e,jsxs as k}from"react/jsx-runtime";import{heroPhoneWordsStyle as ie}from"../../format/lib/hero-phone-stack.js";import{HideTaker as se}from"./ViewHideRoot.js";import{useRef as ae,useState as ne}from"react";import le from"./HeroPoster.js";import{HeroMediaLayer as ce,heroMediaReading as me,HeroPickArea as he,heroPartEntrance as ue,heroPartHover as de,heroPartScroll as fe,heroPictureOrigins as pe,HeroPictureHover as ge,heroPicturesHover as ve,HeroTint as ye,HeroTwoPictures as He}from"./HeroPictures.js";import{HeroVideoBackdrop as Pe,HeroVideoPlayer as xe}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as be,heroStoresRatio as we}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as Te,overlayGradient as Se}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as _e}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as h}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as Ee}from"../../format/lib/hero-media-layout.js";import Ne from"./PhotoHoverSheet.js";import{partAttr as u}from"../../format/lib/content/part-names.js";function ke({overlay:A=100,overlayColor:I=h,overlayPosition:L=Te,mediaType:d=Ee.HeroSingle,mediaSrc:s,poster:f,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p=h,tintOpacity:g=0,heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,phoneWordsTop:M,phoneWordsBottom:B,phoneBoxGap:D,boxes:v,videoSource:Y,youtubeUrl:F,videoPlayback:C,mediaLayout:U,mediaLayoutPhone:$,mediaImage2:G,objectPosition2:K,objectPosition2Phone:W,objectPosition2Tablet:q,tintColor2:J=h,tintOpacity2:Q=0,editing:o=!1,partMotion:r}){const y=be({heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:X,style:Z}=y,H=we(y),c=d==="video",P=c?i(s):void 0,x=c?i(f):i(s)??i(f),{fromYouTube:b,onClick:w,youTubeId:T,backgroundFile:S,desktopLayout:ee,phoneLayout:oe,twoPictures:_}=me({isVideo:c,videoSource:Y,videoPlayback:C,youtubeUrl:F,mediaLayout:U,mediaLayoutPhone:$}),[E,re]=ne(!1),m=!E,te=ae(null),t=d==="video"?"media":"image",N=ve(r);return k(se,{as:"section",ref:te,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${X} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:Z,...N.hostAttrs,...u("hero"),children:[e(Ne,{sheet:N.sheet}),e(ce,{partMotion:r,editing:o,children:_?e(He,{desktopLayout:ee,phoneLayout:oe,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p,tintOpacity:g},second:{src:G,objectPosition:K,objectPositionPhone:W,objectPositionTablet:q,tintColor:J,tintOpacity:Q}}):e(he,{part:t,editing:o,entrance:t==="image"?ue(r,"image"):null,scroll:t==="image"?fe(r,"image"):null,origins:pe({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(ge,{treatment:t==="image"?de(r,"image"):{},children:[e(le,{videoSrc:S?P:void 0,posterSrc:x,showVideo:S,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),b&&e(Pe,{youTubeId:T,ownPoster:!!x,background:!w,editing:o})]})})}),w&&e(xe,{youTubeId:T,fileSrc:b?void 0:P,playing:E,onPlay:()=>re(!0),editing:o}),m&&!_&&e(ye,{color:p,opacity:g}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:Se(I,L),opacity:Math.min(Math.max(A,0),100)/100},...u("overlay")}),m&&v&&e("div",{className:[H?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{..._e,...ie(M,B,D)},...u("hero-content"),children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{ke as default};
@@ -9,6 +9,9 @@ export interface HeroSlideStyle {
9
9
  textureColor?: string;
10
10
  phoneUpDown?: string;
11
11
  phoneSideways?: string;
12
+ phoneWordsTop?: number;
13
+ phoneWordsBottom?: number;
14
+ phoneBoxGap?: number;
12
15
  quietVideo?: boolean;
13
16
  holdReel?: () => void;
14
17
  reelHeld?: boolean;