efficient-web-builder 42.0.0 → 43.0.1

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 (147) hide show
  1. package/CHANGELOG.md +168 -0
  2. package/dist/editor/components/AnchorField.js +1 -1
  3. package/dist/editor/components/DuplicatePageDialog.js +1 -1
  4. package/dist/editor/components/MediaUploadField.d.ts +3 -1
  5. package/dist/editor/components/MediaUploadField.js +1 -1
  6. package/dist/editor/components/PagesPanel.js +1 -1
  7. package/dist/editor/components/SectionEditor.d.ts +5 -1
  8. package/dist/editor/components/SectionEditor.js +1 -1
  9. package/dist/editor/components/SectionIcon.js +1 -1
  10. package/dist/editor/components/SectionThumbnail.js +1 -1
  11. package/dist/editor/components/SiteFields.d.ts +2 -1
  12. package/dist/editor/components/SiteFields.js +1 -1
  13. package/dist/editor/components/StorefrontEditor.js +1 -1
  14. package/dist/editor/components/StylesPanel.d.ts +3 -1
  15. package/dist/editor/components/StylesPanel.js +1 -1
  16. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  17. package/dist/editor/components/WebsiteSettingsPanel.d.ts +6 -1
  18. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  19. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  20. package/dist/editor/components/useLocationsTree.js +1 -1
  21. package/dist/editor/components/useSectionToBoxPass.js +1 -1
  22. package/dist/editor/components/useSocialSettings.d.ts +2 -2
  23. package/dist/editor/lib/document/ColourControl.d.ts +7 -2
  24. package/dist/editor/lib/document/ColourControl.js +1 -1
  25. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  26. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  27. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  28. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  29. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  30. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  31. package/dist/editor/lib/document/canvas-typing.js +1 -1
  32. package/dist/editor/lib/document/consent-words-field.d.ts +6 -0
  33. package/dist/editor/lib/document/consent-words-field.js +1 -0
  34. package/dist/editor/lib/document/controls.d.ts +13 -2
  35. package/dist/editor/lib/document/controls.js +1 -1
  36. package/dist/editor/lib/document/field-groups.js +1 -1
  37. package/dist/editor/lib/document/footer-blocks.js +1 -1
  38. package/dist/editor/lib/document/locked-blocks.d.ts +3 -0
  39. package/dist/editor/lib/document/locked-blocks.js +1 -1
  40. package/dist/editor/lib/document/overrides.js +1 -1
  41. package/dist/editor/lib/document/page-root-fields.d.ts +1 -0
  42. package/dist/editor/lib/document/page-root-fields.js +1 -1
  43. package/dist/editor/lib/document/section-width-fields.js +1 -1
  44. package/dist/editor/lib/document/selected-host.d.ts +2 -0
  45. package/dist/editor/lib/document/selected-host.js +1 -0
  46. package/dist/editor/lib/page-copy.js +1 -1
  47. package/dist/editor/lib/sections/section-dry-run.d.ts +2 -9
  48. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  49. package/dist/format/lib/content/authored-props.js +1 -1
  50. package/dist/format/lib/content/block-sources.js +1 -1
  51. package/dist/format/lib/content/box-layout.d.ts +1 -0
  52. package/dist/format/lib/content/box-layout.js +1 -1
  53. package/dist/format/lib/content/box-shadow.d.ts +3 -0
  54. package/dist/format/lib/content/box-shadow.js +1 -0
  55. package/dist/format/lib/content/button-icon.d.ts +2 -1
  56. package/dist/format/lib/content/button-icon.js +1 -1
  57. package/dist/format/lib/content/button-look.d.ts +46 -0
  58. package/dist/format/lib/content/button-look.js +1 -0
  59. package/dist/format/lib/content/consent-banner.d.ts +21 -0
  60. package/dist/format/lib/content/consent-banner.js +1 -1
  61. package/dist/format/lib/content/contact.js +1 -1
  62. package/dist/format/lib/content/footer.d.ts +10 -0
  63. package/dist/format/lib/content/footer.js +1 -1
  64. package/dist/format/lib/content/gallery-layout.d.ts +12 -0
  65. package/dist/format/lib/content/gallery-layout.js +1 -1
  66. package/dist/format/lib/content/section-padding.d.ts +10 -0
  67. package/dist/format/lib/content/section-padding.js +1 -1
  68. package/dist/format/lib/content/section-width.d.ts +0 -4
  69. package/dist/format/lib/content/section-width.js +1 -1
  70. package/dist/format/lib/document/blocks/general/Logos/meta.d.ts +6 -0
  71. package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
  72. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  73. package/dist/format/lib/document/box-footer.js +1 -1
  74. package/dist/format/lib/document/container-blocks.js +1 -1
  75. package/dist/format/lib/document/media-manifest.json +5 -3
  76. package/dist/format/lib/document/nestable-content-sections.js +1 -1
  77. package/dist/format/lib/document/passes/settings-groups.js +1 -1
  78. package/dist/format/lib/document/root-panel.d.ts +8 -0
  79. package/dist/format/lib/document/root-panel.js +1 -0
  80. package/dist/format/lib/document/section-catalog.js +1 -1
  81. package/dist/format/lib/document/source-bound-parts.js +1 -1
  82. package/dist/format/lib/editor-words-catalogue.d.ts +23 -4
  83. package/dist/format/lib/editor-words-catalogue.js +4 -4
  84. package/dist/format/lib/editor-words.js +1 -1
  85. package/dist/format/lib/hero-texture.js +1 -1
  86. package/dist/format/lib/hero-video.d.ts +7 -0
  87. package/dist/format/lib/hero-video.js +1 -1
  88. package/dist/format/lib/links/page-link-rules.js +1 -1
  89. package/dist/format/lib/non-empty-string.d.ts +1 -0
  90. package/dist/format/lib/non-empty-string.js +1 -0
  91. package/dist/format/lib/popup/look.d.ts +1 -1
  92. package/dist/format/lib/popup/look.js +1 -1
  93. package/dist/format/lib/reel.d.ts +2 -1
  94. package/dist/format/lib/reel.js +1 -1
  95. package/dist/format/lib/sections/hero-overlay.js +1 -1
  96. package/dist/format/lib/sections/logo-look.d.ts +7 -0
  97. package/dist/format/lib/sections/logo-look.js +1 -0
  98. package/dist/format/lib/sections/section-head-placement.d.ts +1 -0
  99. package/dist/format/lib/sections/section-head-placement.js +1 -1
  100. package/dist/format/lib/site-theme-row.d.ts +0 -1
  101. package/dist/format/lib/slugify.d.ts +1 -1
  102. package/dist/format/lib/slugify.js +1 -1
  103. package/dist/format/lib/theme.d.ts +2 -1
  104. package/dist/format/lib/theme.js +4 -4
  105. package/dist/render/components/BoxTabs.d.ts +2 -1
  106. package/dist/render/components/BoxTabs.js +1 -1
  107. package/dist/render/components/Btn.d.ts +1 -0
  108. package/dist/render/components/Btn.js +1 -1
  109. package/dist/render/components/ButtonBlock.d.ts +12 -1
  110. package/dist/render/components/ButtonBlock.js +1 -1
  111. package/dist/render/components/DocBody.js +5 -5
  112. package/dist/render/components/Flex.d.ts +3 -1
  113. package/dist/render/components/Flex.js +1 -1
  114. package/dist/render/components/LogoBlock.d.ts +1 -1
  115. package/dist/render/components/LogoBlock.js +1 -1
  116. package/dist/render/components/LogoWallContext.d.ts +12 -0
  117. package/dist/render/components/LogoWallContext.js +1 -0
  118. package/dist/render/components/Logos.d.ts +16 -1
  119. package/dist/render/components/Logos.js +1 -1
  120. package/dist/render/components/PaymentBadges.d.ts +3 -1
  121. package/dist/render/components/PaymentBadges.js +1 -1
  122. package/dist/render/components/PreviewHeaderContext.d.ts +1 -3
  123. package/dist/render/components/PreviewHeaderContext.js +1 -1
  124. package/dist/render/components/Reel.js +1 -1
  125. package/dist/render/components/SiteGutterFrame.d.ts +2 -1
  126. package/dist/render/components/SiteGutterFrame.js +1 -1
  127. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  128. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  129. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  130. package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
  131. package/dist/render/lib/document/blocks/general/PaymentBadges/render.js +1 -1
  132. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +4 -1
  133. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  134. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +2 -0
  135. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -0
  136. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.d.ts +5 -0
  137. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -0
  138. package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +0 -4
  139. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  140. package/dist/render/lib/document/page-render.js +1 -1
  141. package/dist/render/lib/document/part-rows.js +1 -1
  142. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  143. package/dist/render/lib/document/text-parts.js +1 -1
  144. package/dist/render/lib/sections/section-to-box.d.ts +2 -11
  145. package/dist/render/lib/sections/section-to-box.js +1 -1
  146. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  147. package/package.json +5 -5
@@ -1 +1 @@
1
- import{HOME_PAGE_SLUG as f}from"../document/home-page.js";import{slugify as p}from"../slugify.js";const i=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function g(e){return e.offersCommerce&&e.offersService?i:i.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}const u="#popup:";function P(e){return`${u}${e}`}function b(e){return e.startsWith(u)&&e.slice(u.length).trim()||null}function a(e){return e===f?"/":`/${e}`}function $(e){return`/journal/${e}`}function A(e){return`/wheels/${e}`}function y(e,t){return`${a(e)}#${t}`}function l(e){return p(e)}function h(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function O(...e){const t=new Set,n=[];for(const o of e)for(const s of o?.content??[]){const c=h(s?.props?.anchor);if(!c)continue;const r=l(c);!r||t.has(r)||(t.add(r),n.push({slug:r,name:c}))}return n}function S(e){const t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function m(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}function w(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(m(e))return"product";if(e.includes("#")){const n=e.slice(0,e.indexOf("#"));if(n===""||n==="/"||t.includes(n))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}export{i as LINK_KINDS,u as POPUP_LINK_PREFIX,y as anchorPath,w as inferKind,m as isProductPath,g as linkKindsFor,S as linkPagePath,O as pageAnchors,a as pagePath,P as popupPath,b as popupSlugOf,$ as postPath,l as slugifyAnchor,A as wheelPath};
1
+ import{HOME_PAGE_SLUG as p}from"../document/home-page.js";import{slugify as i}from"efficient-shell/format";const s=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function x(e){return e.offersCommerce&&e.offersService?s:s.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}const u="#popup:";function g(e){return`${u}${e}`}function P(e){return e.startsWith(u)&&e.slice(u.length).trim()||null}function a(e){return e===p?"/":`/${e}`}function b(e){return`/journal/${e}`}function $(e){return`/wheels/${e}`}function A(e,t){return`${a(e)}#${t}`}function y(e){return i(e)}function l(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function O(...e){const t=new Set,n=[];for(const o of e)for(const f of o?.content??[]){const c=l(f?.props?.anchor);if(!c)continue;const r=i(c);!r||t.has(r)||(t.add(r),n.push({slug:r,name:c}))}return n}function S(e){const t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function h(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}function w(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(h(e))return"product";if(e.includes("#")){const n=e.slice(0,e.indexOf("#"));if(n===""||n==="/"||t.includes(n))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}export{s as LINK_KINDS,u as POPUP_LINK_PREFIX,A as anchorPath,w as inferKind,h as isProductPath,x as linkKindsFor,S as linkPagePath,O as pageAnchors,a as pagePath,g as popupPath,P as popupSlugOf,b as postPath,y as slugifyAnchor,$ as wheelPath};
@@ -0,0 +1 @@
1
+ export declare const nonEmptyString: (v: unknown) => string | undefined;
@@ -0,0 +1 @@
1
+ const t=n=>typeof n=="string"&&n?n:void 0;export{t as nonEmptyString};
@@ -25,4 +25,4 @@ export interface PopupLook {
25
25
  closeButton: PopupCloseButton;
26
26
  }
27
27
  export declare const POPUP_LOOK_DEFAULTS: PopupLook;
28
- export declare function resolvePopupLook(rootProps: Record<string, unknown> | undefined | null): PopupLook;
28
+ export declare function resolvePopupLook(rootProps: Record<string, unknown> | undefined | null, defaults?: PopupLook): PopupLook;
@@ -1 +1 @@
1
- import{HERO_GROUP_PLACEMENTS as r}from"../hero-group-placement.js";import{authoredBoolean as n}from"../content/authored-props.js";import{inRange as l,oneOf as e}from"./behavior.js";const f="popup",c=r,P=["auto","full"],p=["inside","outside","none"],s={min:240,max:1440},u={min:0,max:100},O={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:"#000000",tintOpacity:60,outsideClick:!0,closeButton:"inside"};function h(i,t){return typeof i=="string"&&/^#[0-9a-fA-F]{6}$/.test(i.trim())?i.trim():t}function _(i){const t=i??{},o=O;return{placement:e(c,t.placement,o.placement),fullWidth:n(t.fullWidth,o.fullWidth),width:l(t.width,s,o.width),height:e(P,t.height,o.height),tintColor:h(t.tintColor,o.tintColor),tintOpacity:l(t.tintOpacity,u,o.tintOpacity),outsideClick:n(t.outsideClick,o.outsideClick),closeButton:e(p,t.closeButton,o.closeButton)}}export{p as POPUP_CLOSE_BUTTONS,P as POPUP_HEIGHTS,O as POPUP_LOOK_DEFAULTS,f as POPUP_PAGE_KIND,c as POPUP_PLACEMENTS,u as POPUP_TINT_OPACITY_RANGE,s as POPUP_WIDTH_RANGE,_ as resolvePopupLook};
1
+ import{HERO_GROUP_PLACEMENTS as c}from"../hero-group-placement.js";import{authoredBoolean as l}from"../content/authored-props.js";import{inRange as r,oneOf as n}from"./behavior.js";const _="popup",P=c,p=["auto","full"],s=["inside","outside","none"],u={min:240,max:1440},O={min:0,max:100},h={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:"#000000",tintOpacity:60,outsideClick:!0,closeButton:"inside"};function a(i,e){return typeof i=="string"&&/^#[0-9a-fA-F]{6}$/.test(i.trim())?i.trim():e}function C(i,e=h){const t=i??{},o=e;return{placement:n(P,t.placement,o.placement),fullWidth:l(t.fullWidth,o.fullWidth),width:r(t.width,u,o.width),height:n(p,t.height,o.height),tintColor:a(t.tintColor,o.tintColor),tintOpacity:r(t.tintOpacity,O,o.tintOpacity),outsideClick:l(t.outsideClick,o.outsideClick),closeButton:n(s,t.closeButton,o.closeButton)}}export{s as POPUP_CLOSE_BUTTONS,p as POPUP_HEIGHTS,h as POPUP_LOOK_DEFAULTS,_ as POPUP_PAGE_KIND,P as POPUP_PLACEMENTS,O as POPUP_TINT_OPACITY_RANGE,u as POPUP_WIDTH_RANGE,C as resolvePopupLook};
@@ -2,12 +2,13 @@ import { type HeroGroupPlacement } from "./hero-group-placement.js";
2
2
  export declare const REEL_PLACEMENTS: readonly ["top-left", "top-center", "top-right", "left", "center", "right", "bottom-left", "bottom-center", "bottom-right"];
3
3
  export type ReelPlacement = HeroGroupPlacement;
4
4
  export declare const REEL_PLACEMENT_DEFAULT: ReelPlacement;
5
- export declare const REEL_SHAPES: readonly ["cards", "dots", "numbers", "bar", "squares", "tabs"];
5
+ export declare const REEL_SHAPES: readonly ["cards", "dots", "numbers", "bar", "squares", "tabs", "largeTabs"];
6
6
  export type ReelShape = (typeof REEL_SHAPES)[number];
7
7
  export declare const HERO_REEL_SHAPES: readonly ["cards", "dots", "numbers", "bar", "squares"];
8
8
  export type HeroReelShape = (typeof HERO_REEL_SHAPES)[number];
9
9
  export declare const REEL_SHAPE_DEFAULT: HeroReelShape;
10
10
  export declare const REEL_SHAPE_LABELS: Readonly<Record<ReelShape, string>>;
11
+ export declare const BOX_TAB_SHAPES: readonly ["tabs", "largeTabs"];
11
12
  export declare const REEL_SHOWN_DEFAULT = true;
12
13
  export declare function normaliseReelShape(value: unknown): ReelShape;
13
14
  export declare function normaliseHeroReelShape(value: unknown): HeroReelShape;
@@ -1 +1 @@
1
- import{HERO_GROUP_PLACEMENTS as l}from"./hero-group-placement.js";import{heroOverlayRailClass as c}from"./hero-overlay-anchor.js";const u=l,i="top-right",E=["cards","dots","numbers","bar","squares","tabs"],d=["cards","dots","numbers","bar","squares"],o="cards",L={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",squares:"Squares",tabs:"Tabs"},S=!0;function n(e){return E.includes(e)?e:o}function _(e){return d.includes(e)?e:o}function p(e){return u.includes(e)?e:i}const a={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",squares:"flex-col gap-0",tabs:"flex-row items-stretch w-full overflow-x-auto"};function A(e,r){return c(p(r),a[n(e)])}function h(e){return`flex ${a[n(e)]}`}function P(e){return e.shown!==!1&&(e.count??0)>1}function f(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function x(e,r){return e===r?!0:e.length!==r.length?!1:e.every((t,s)=>t.name===r[s].name&&t.process===r[s].process&&t.video===r[s].video)}function b(e,r){const t=Array.from(r,f);return x(e,t)?e:t}export{d as HERO_REEL_SHAPES,u as REEL_PLACEMENTS,i as REEL_PLACEMENT_DEFAULT,E as REEL_SHAPES,o as REEL_SHAPE_DEFAULT,L as REEL_SHAPE_LABELS,S as REEL_SHOWN_DEFAULT,b as nextReel,_ as normaliseHeroReelShape,p as normaliseReelPlacement,n as normaliseReelShape,A as reelRailClass,P as reelShown,h as reelSurfaceRailClass,x as sameReel};
1
+ import{HERO_GROUP_PLACEMENTS as l}from"./hero-group-placement.js";import{heroOverlayRailClass as c}from"./hero-overlay-anchor.js";const u=l,i="top-right",d=["cards","dots","numbers","bar","squares","tabs","largeTabs"],E=["cards","dots","numbers","bar","squares"],o="cards",S={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",squares:"Squares",tabs:"Tabs",largeTabs:"Large tabs"},b=["tabs","largeTabs"],L=!0;function a(e){return d.includes(e)?e:o}function _(e){return E.includes(e)?e:o}function p(e){return u.includes(e)?e:i}const n={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",squares:"flex-col gap-0",tabs:"flex-row items-stretch w-full overflow-x-auto",largeTabs:"items-stretch border-y border-line"};function A(e,r){return c(p(r),n[a(e)])}function g(e){return`flex ${n[a(e)]}`}function h(e){return e.shown!==!1&&(e.count??0)>1}function f(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function x(e,r){return e===r?!0:e.length!==r.length?!1:e.every((t,s)=>t.name===r[s].name&&t.process===r[s].process&&t.video===r[s].video)}function P(e,r){const t=Array.from(r,f);return x(e,t)?e:t}export{b as BOX_TAB_SHAPES,E as HERO_REEL_SHAPES,u as REEL_PLACEMENTS,i as REEL_PLACEMENT_DEFAULT,d as REEL_SHAPES,o as REEL_SHAPE_DEFAULT,S as REEL_SHAPE_LABELS,L as REEL_SHOWN_DEFAULT,P as nextReel,_ as normaliseHeroReelShape,p as normaliseReelPlacement,a as normaliseReelShape,A as reelRailClass,h as reelShown,g as reelSurfaceRailClass,x as sameReel};
@@ -1 +1 @@
1
- import{parseOption as i}from"../parse-option.js";const r="bottom",a="#0A0A0A",p=[{label:"Bottom",value:"bottom",cell:"bottom"},{label:"Top",value:"top",cell:"top"},{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"}],O={bottom:180,top:0,left:270,right:90},u=[[.55,0],[.15,18],[null,35],[null,55],[.85,100]],b=[[null,33],[.6,67],[.94,100]];function A(t,n){const o=/^#[0-9a-f]{6}$/i.test(t)?t:a,e=parseInt(o.slice(1),16);return`rgba(${e>>16&255},${e>>8&255},${e&255},${n})`}function L(t){return i(p,r,t)}function m(t=a,n=r){const o=L(n),s=(o==="top"||o==="bottom"?u:b).map(([l,c])=>`${l===null?"transparent":A(t,l)} ${c}%`);return`linear-gradient(${O[o]}deg, ${s.join(", ")})`}export{a as DEFAULT_OVERLAY_COLOR,r as DEFAULT_OVERLAY_POSITION,p as OVERLAY_POSITION_OPTIONS,m as overlayGradient,L as parseOverlayPosition};
1
+ import{hexToRgb as a}from"efficient-shell/format";import{parseOption as O}from"../parse-option.js";const i="bottom",c="#0A0A0A",u=[{label:"Bottom",value:"bottom",cell:"bottom"},{label:"Top",value:"top",cell:"top"},{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"}],b={bottom:180,top:0,left:270,right:90},m=[[.55,0],[.15,18],[null,35],[null,55],[.85,100]],A=[[null,33],[.6,67],[.94,100]];function T(t,e){const{r:o,g:l,b:n}=a(t)??a(c);return`rgba(${o},${l},${n},${e})`}function g(t){return O(u,i,t)}function v(t=c,e=i){const o=g(e),p=(o==="top"||o==="bottom"?m:A).map(([r,s])=>`${r===null?"transparent":T(t,r)} ${s}%`);return`linear-gradient(${b[o]}deg, ${p.join(", ")})`}export{c as DEFAULT_OVERLAY_COLOR,i as DEFAULT_OVERLAY_POSITION,u as OVERLAY_POSITION_OPTIONS,v as overlayGradient,g as parseOverlayPosition};
@@ -0,0 +1,7 @@
1
+ export type LogoLook = "plain" | "cards";
2
+ export declare const DEFAULT_LOGO_LOOK: LogoLook;
3
+ export declare const LOGO_LOOK_OPTIONS: readonly {
4
+ label: string;
5
+ value: LogoLook;
6
+ }[];
7
+ export declare const parseLogoLook: (value: unknown) => LogoLook;
@@ -0,0 +1 @@
1
+ import{parseOption as a}from"../parse-option.js";const O="plain",e=[{label:"Plain",value:"plain"},{label:"Cards",value:"cards"}],p=o=>a(e,O,o);export{O as DEFAULT_LOGO_LOOK,e as LOGO_LOOK_OPTIONS,p as parseLogoLook};
@@ -31,4 +31,5 @@ export declare function widthFieldsForParent<T extends Record<string, unknown>>(
31
31
  type?: string;
32
32
  } | null | undefined, widthKeys: readonly string[]): T;
33
33
  export declare const HEAD_ROWS_SHOW_WHEN: ShowWhenRule;
34
+ export declare const OWN_BOX_ROWS_SHOW_WHEN: ShowWhenRule;
34
35
  export declare function headFieldsForPlacement<T extends Record<string, unknown>>(fields: T, _placement: unknown, headKeys: readonly string[]): T;
@@ -1 +1 @@
1
- import{parseOption as o}from"../parse-option.js";import{withRowsShownWhen as r}from"../document/show-when-attach.js";const d="inline",l=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];function u(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>typeof t=="string"&&t.length>0)}const a={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:"DynamicBundleOffer"},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"},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"}},h="SectionHeader";function w(e){return e in a}function y(e){return o(l,d,e)}const n=new Set(["Flex"]);function S(e){return!!e?.type&&n.has(e.type)}const s={not:{context:"parentType",in:[...n]}};function T(e,t,i){return r(e,i,s)}const p={not:{field:"headPlacement",is:"own-box"}};function R(e,t,i){return r(e,i,p)}export{d as DEFAULT_SECTION_HEAD_PLACEMENT,p as HEAD_ROWS_SHOW_WHEN,l as SECTION_HEAD_PLACEMENT_OPTIONS,h as SECTION_HEAD_TYPE,a as SPLITTABLE_SECTIONS,s as WIDTH_ROWS_SHOW_WHEN,w as canSplitHead,R as headFieldsForPlacement,u as headRoleProps,S as parentCapsWidth,y as parseSectionHeadPlacement,T as widthFieldsForParent};
1
+ import{parseOption as d}from"../parse-option.js";import{withRowsShownWhen as r}from"../document/show-when-attach.js";import{nonEmptyString as l}from"../non-empty-string.js";const a="inline",s=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];function w(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>l(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:"DynamicBundleOffer"},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"},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"}},y="SectionHeader";function S(e){return e in p}function T(e){return d(s,a,e)}const n=new Set(["Flex"]);function R(e){return!!e?.type&&n.has(e.type)}const m={not:{context:"parentType",in:[...n]}};function b(e,t,i){return r(e,i,m)}const o={not:{field:"headPlacement",is:"own-box"}},P={not:o};function x(e,t,i){return r(e,i,o)}export{a as DEFAULT_SECTION_HEAD_PLACEMENT,o as HEAD_ROWS_SHOW_WHEN,P as OWN_BOX_ROWS_SHOW_WHEN,s as SECTION_HEAD_PLACEMENT_OPTIONS,y as SECTION_HEAD_TYPE,p as SPLITTABLE_SECTIONS,m as WIDTH_ROWS_SHOW_WHEN,S as canSplitHead,x as headFieldsForPlacement,w as headRoleProps,R as parentCapsWidth,T as parseSectionHeadPlacement,b as widthFieldsForParent};
@@ -33,7 +33,6 @@ export interface SiteThemeRow {
33
33
  corner_radius_px?: number | null;
34
34
  heading_compression: "normal" | "tight" | "compressed";
35
35
  card_shadow?: "none" | "soft" | "lifted" | null;
36
- card_theme_index?: number | null;
37
36
  shadow_color?: string | null;
38
37
  card_gap: "tight" | "normal" | "roomy";
39
38
  hover_effect?: "none" | "lift" | "highlight" | null;
@@ -1 +1 @@
1
- export declare function slugify(value: string | null | undefined): string;
1
+ export { slugify } from "efficient-shell/format";
@@ -1 +1 @@
1
- function r(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}export{r as slugify};
1
+ import{slugify as r}from"efficient-shell/format";export{r as slugify};
@@ -1,3 +1,4 @@
1
+ import { contrastRatio } from "efficient-shell/format";
1
2
  export declare const THEME_STORAGE_KEY = "storefront-theme";
2
3
  export declare const THEME_MODE_KEY = "sf:theme-mode";
3
4
  export declare const THEME_SWITCH_KEY = "sf:theme-switch";
@@ -51,7 +52,7 @@ export declare function themeSwatchColors(c: ThemeColors): {
51
52
  export declare const READABILITY_AA = 4.5;
52
53
  export declare const READABILITY_AA_LARGE = 3;
53
54
  export type ReadabilityGrade = "good" | "large-only" | "hard";
54
- export declare function contrastRatio(a: string, b: string): number | null;
55
+ export { contrastRatio };
55
56
  export declare const GRADE_LABEL: Record<ReadabilityGrade, string>;
56
57
  export declare function gradeContrast(ratio: number): ReadabilityGrade;
57
58
  export declare function accentInk(accent: string): string;
@@ -1,18 +1,18 @@
1
- const L="storefront-theme",pe="sf:theme-mode",xe="sf:theme-switch",_e="hide",Ee="light",Se=!1,Ae=7,Te=18;function k(e){return e>=7&&e<18}function be(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?k(o)?"light":"dark":t==="light"?"light":"dark"}function Ce(e){const{mode:t,switchShown:n}=e;return`
1
+ import{contrastRatio as L,hexToRgb as l,readableInk as k,relativeLuminance as $}from"efficient-shell/format";const F="storefront-theme",Se="sf:theme-mode",Ae="sf:theme-switch",Te="hide",be="light",we=!1,E=7,S=18;function P(e){return e>=E&&e<S}function Ce(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?P(o)?"light":"dark":t==="light"?"light":"dark"}function Ie(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(L)});
5
+ var override = localStorage.getItem(${JSON.stringify(F)});
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 >= 7 && h < 18) ? 'light' : 'dark';
11
+ theme = (h >= ${E} && h < ${S}) ? '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 a={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},$=[{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"}],F={selected:0,themes:$};function A(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...F}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function f(e,t,n){const r=u(e),o=u(t);if(r===null||o===null)return e;const i=c=>Math.max(0,Math.min(255,Math.round(c))).toString(16).padStart(2,"0");return`#${r.map((c,O)=>i(c+(o[O]-c)*n)).join("")}`}const P={light:"#ffffff",dark:"#0a0a0a"},Re=["light","dark"];function we(e,t){const n=P[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:f(e,r,.1),line:f(e,r,.22),muted:f(n,e,.35),brandInk:t}}function s(e){const t=A(e);return t.themes[t.selected]}function d(e){return{text:e.text,accent:e.accent,background:e.background||a.background,surface:e.surface||a.surface,line:e.line||a.line,muted:e.muted||a.muted}}function De(e){return{fill:d(e).background,accent:e.accent}}function u(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;const n=t[1].length===3?[...t[1]].map(c=>c+c).join(""):t[1],[r,o,i]=[0,2,4].map(c=>parseInt(n.slice(c,c+2),16));return[r,o,i]}function g(e){const t=u(e);if(t===null)return null;const[n,r,o]=t.map(i=>{const c=i/255;return c<=.04045?c/12.92:((c+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}const U=.4,G=4.5,Y=3;function z(e,t){const n=g(e),r=g(t);if(n===null||r===null)return null;const[o,i]=n>=r?[n,r]:[r,n];return(o+.05)/(i+.05)}const He={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Ie(e){return e>=G?"good":e>=Y?"large-only":"hard"}const m=["#000000","#ffffff"];function l(e){let t=m[0],n=-1;for(const r of m){const o=z(e,r);if(o===null)return m[0];o>n&&(n=o,t=r)}return t}const B=[.25,.4,.55];function Me(e){const t=u(e);return t===null?[]:B.map(n=>"#"+t.map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function ye(e){const t=s(e),n={"--theme-fg":t.text},r=g(t.text);return(r===null||r>=U)&&(n["--overlay-fg"]=t.text),n}const X=82;function p(e){return`color-mix(in srgb, ${e} ${X}%, #000)`}function Ne(e){const t=s(e);return{"--theme-accent":t.accent,"--theme-accent-2":p(t.accent),"--theme-accent-ink":l(t.accent)}}function x(e){const t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Oe(e){const t=s(e),n=x(t),r=T(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=p(n)),o["--theme-btn-ink"]=r??l(n),o}function T(e){const t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function W(e,t){return T(e)??l(x(e)??t)}function Le(e){const t=s(e);return{fill:x(t)??t.accent.toLowerCase(),ink:W(t,t.accent)}}function ke(e){const t={};return A(e).themes.forEach((n,r)=>{const o=d(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=p(o.accent),t[`--theme-preset-${r}-accent-ink`]=l(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 $e=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Fe(e){const t=d(s(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!==a.surface||t.line!==a.line)&&(r["--theme-surface-2"]=n),r}const K=["heading","body","label"],Pe={heading:"Headings",body:"Body",label:"Labels"};function Ue(e){if(!e)return null;for(const t of K)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const b=["headingLarge","headingMedium","headingSmall","accent","body","label"],Ge={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Ye={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},V=8,j=200;function Z(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=V&&t<=j?t:null}function q(e){const t={};for(const n of b)t[n]=Z(e?.[n]);return t}function ze(e){const t=q(e),n={};for(const r of b){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const J=["square","small","large"],Q="small";function v(e){return J.includes(e??"")?e:Q}function Be(e){return w(te[v(e)])}const C=0,ee=40,te={square:0,small:null,large:16},ne={"--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 R(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(ee,Math.max(C,Math.round(t))):null}function w(e){const t=R(e);return t===null?{}:Object.fromEntries(Object.entries(ne).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function Xe(e){return w(R(e)??C)}const re=["none","soft","lifted"],oe="soft",D="none",ie=["tight","normal","roomy"],ce="normal",ae="normal",se=["none","lift","highlight"],ue="lift",le="highlight",H="#141416";function I(e){return re.includes(e??"")?e:oe}function he(e){return ie.includes(e??"")?e:ce}function M(e){return se.includes(e??"")?e:ue}function fe(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():H}function We(e){const t=I(e);return t===D?void 0:t}function Ke(e){const t=he(e);return t===ae?void 0:t}function Ve(e){const t=M(e);return t===le?void 0:t}function je(e,t,n){const r=fe(t);return r===H?{}:I(e)!==D||M(n)==="lift"?{"--sf-shadow-color":r}:{}}const de=["normal","tight","compressed"],y="normal";function N(e){return de.includes(e??"")?e:y}function Ze(e){const t=N(e);return t===y?void 0:t}function qe(e){switch(N(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Je=["authored","sentence"],Qe={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},_=100,E=900,ge=24,me=200;function h(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function S(e){const t=h(e?.weight,_,E),n=e?.case==="sentence"?"sentence":"authored",r=i=>i==null?t:h(i,_,E),o=i=>i==="sentence"?"sentence":i==="authored"?"authored":n;return{case:n,weight:t,weightStrong:h(e?.weightStrong,_,E),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:h(e?.maxPx,ge,me),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function ve(e){const t=S(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 et(e){return S({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 tt(e){const t=S(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}}export{B as ACCENT_DARKEN_STEPS,Re as BRAND_INKS,ie as CARD_GAPS,re as CARD_SHADOWS,ee as CORNER_RADIUS_MAX,C as CORNER_RADIUS_MIN,J as CORNER_STYLES,te as CORNER_STYLE_TO_PX,ce as DEFAULT_CARD_GAP,oe as DEFAULT_CARD_SHADOW,Q as DEFAULT_CORNER_STYLE,y as DEFAULT_HEADING_COMPRESSION,Qe as DEFAULT_HEADING_TYPOGRAPHY,ue as DEFAULT_HOVER_EFFECT,H as DEFAULT_SHADOW_COLOR,Ye as DEFAULT_SIZES,a as DEFAULT_SURFACES,Se as DEFAULT_SWITCH_SHOWN,$ as DEFAULT_THEMES,Ee as DEFAULT_THEME_MODE,F as DEFAULT_THEME_VALUE,He as GRADE_LABEL,Je as HEADING_CASES,de as HEADING_COMPRESSIONS,me as HEADING_MAX_PX_MAX,ge as HEADING_MAX_PX_MIN,E as HEADING_WEIGHT_MAX,_ as HEADING_WEIGHT_MIN,se as HOVER_EFFECTS,ae as IDENTITY_CARD_GAP,D as IDENTITY_CARD_SHADOW,le as IDENTITY_HOVER_EFFECT,G as READABILITY_AA,Y as READABILITY_AA_LARGE,Ge as SCALE_OF_STEP,b as SIZE_STEPS,j as TEXT_SIZE_MAX,V as TEXT_SIZE_MIN,Te as THEME_DAY_END_HOUR,Ae as THEME_DAY_START_HOUR,pe as THEME_MODE_KEY,L as THEME_STORAGE_KEY,$e as THEME_SURFACE_KEYS,_e as THEME_SWITCH_HIDE,xe as THEME_SWITCH_KEY,K as TYPE_GROUPS,Pe as TYPE_GROUP_LABELS,l as accentInk,we as brandTheme,Ce as buildThemeBootScript,Ke as cardGapAttr,We as cardShadowAttr,qe as compressionMetrics,z as contrastRatio,w as cornerRadiusTokens,Be as cornerStyleTokens,Me as darkerAccents,Ie as gradeContrast,Ze as headingCompressionAttr,et as headingTypographyFromRow,ve as headingTypographyStyle,tt as headingTypographyToRow,Ve as hoverEffectAttr,k as isDayHour,he as normalizeCardGap,I as normalizeCardShadow,R as normalizeCornerRadius,v as normalizeCornerStyle,N as normalizeHeadingCompression,S as normalizeHeadingTypography,M as normalizeHoverEffect,fe as normalizeShadowColor,Z as normalizeSize,q as normalizeSizes,A as normalizeTheme,d as normalizeThemeColors,be as resolveTheme,W as resolvedButtonInk,s as selectedThemeColors,je as shadowColorTokens,Le as siteButtonPaint,Xe as siteCornerRadiusTokens,Ne as themeAccentStyle,x as themeButtonColour,T as themeButtonInk,Oe as themeButtonStyle,ye as themeColorStyle,ke as themePresetAccentVars,Fe as themeSurfaceStyle,De as themeSwatchColors,Ue as typeScaleGroupOfClassName,ze as typeSizesStyle};
18
+ `}const c={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},G=[{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"}],U={selected:0,themes:G};function A(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...U}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function h(e,t,n){const r=l(e),o=l(t);if(r===null||o===null)return e;const i=(_,O)=>Math.max(0,Math.min(255,Math.round(_+(O-_)*n))).toString(16).padStart(2,"0");return`#${i(r.r,o.r)}${i(r.g,o.g)}${i(r.b,o.b)}`}const Y={light:"#ffffff",dark:"#0a0a0a"},Re=["light","dark"];function De(e,t){const n=Y[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:h(e,r,.1),line:h(e,r,.22),muted:h(n,e,.35),brandInk:t}}function a(e){const t=A(e);return t.themes[t.selected]}function f(e){return{text:e.text,accent:e.accent,background:e.background||c.background,surface:e.surface||c.surface,line:e.line||c.line,muted:e.muted||c.muted}}function ye(e){return{fill:f(e).background,accent:e.accent}}const z=.4,B=4.5,X=3,Me={good:"Good","large-only":"Large text only",hard:"Hard to read"};function He(e){return e>=B?"good":e>=X?"large-only":"hard"}const W=["#000000","#ffffff"];function s(e){return k(e,W)}const K=[.25,.4,.55];function Ne(e){const t=l(e);return t===null?[]:K.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Oe(e){const t=a(e),n={"--theme-fg":t.text},r=$(t.text);return(r===null||r>=z)&&(n["--overlay-fg"]=t.text),n}const V=82;function d(e){return`color-mix(in srgb, ${e} ${V}%, #000)`}function Le(e){const t=a(e);return{"--theme-accent":t.accent,"--theme-accent-2":d(t.accent),"--theme-accent-ink":s(t.accent)}}function g(e){const t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function ke(e){const t=a(e),n=g(t),r=T(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=d(n)),o["--theme-btn-ink"]=r??s(n),o}function T(e){const t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Z(e,t){return T(e)??s(g(e)??t)}function $e(e){const t=a(e);return{fill:g(t)??t.accent.toLowerCase(),ink:Z(t,t.accent)}}function Fe(e){const t={};return A(e).themes.forEach((n,r)=>{const o=f(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=d(o.accent),t[`--theme-preset-${r}-accent-ink`]=s(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 Pe=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Ge(e){const t=f(a(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!==c.surface||t.line!==c.line)&&(r["--theme-surface-2"]=n),r}const j=["heading","body","label"],Ue={heading:"Headings",body:"Body",label:"Labels"};function Ye(e){if(!e)return null;for(const t of j)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const b=["headingLarge","headingMedium","headingSmall","accent","body","label"],ze={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Be={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},q=8,J=200;function Q(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=q&&t<=J?t:null}function v(e){const t={};for(const n of b)t[n]=Q(e?.[n]);return t}function Xe(e){const t=v(e),n={};for(const r of b){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const ee=["square","small","large"],te="small";function ne(e){return ee.includes(e??"")?e:te}function We(e){return I(oe[ne(e)])}const w=0,re=40,oe={square:0,small:null,large:16},ie={"--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(re,Math.max(w,Math.round(t))):null}function I(e){const t=C(e);return t===null?{}:Object.fromEntries(Object.entries(ie).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function Ke(e){return I(C(e)??w)}const ce=["none","soft","lifted"],ae="soft",R="none",se=["tight","normal","roomy"],ue="normal",le="normal",he=["none","lift","highlight"],fe="lift",de="highlight",D="#141416";function y(e){return ce.includes(e??"")?e:ae}function ge(e){return se.includes(e??"")?e:ue}function M(e){return he.includes(e??"")?e:fe}function me(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():D}function Ve(e){const t=y(e);return t===R?void 0:t}function Ze(e){const t=ge(e);return t===le?void 0:t}function je(e){const t=M(e);return t===de?void 0:t}function qe(e,t,n){const r=me(t);return r===D?{}:y(e)!==R||M(n)==="lift"?{"--sf-shadow-color":r}:{}}const pe=["normal","tight","compressed"],H="normal";function N(e){return pe.includes(e??"")?e:H}function Je(e){const t=N(e);return t===H?void 0:t}function Qe(e){switch(N(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const ve=["authored","sentence"],et={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},m=100,p=900,xe=24,_e=200;function u(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function x(e){const t=u(e?.weight,m,p),n=e?.case==="sentence"?"sentence":"authored",r=i=>i==null?t:u(i,m,p),o=i=>i==="sentence"?"sentence":i==="authored"?"authored":n;return{case:n,weight:t,weightStrong:u(e?.weightStrong,m,p),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:u(e?.maxPx,xe,_e),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function tt(e){const t=x(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 nt(e){return x({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 rt(e){const t=x(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}}export{K as ACCENT_DARKEN_STEPS,Re as BRAND_INKS,se as CARD_GAPS,ce as CARD_SHADOWS,re as CORNER_RADIUS_MAX,w as CORNER_RADIUS_MIN,ee as CORNER_STYLES,oe as CORNER_STYLE_TO_PX,ue as DEFAULT_CARD_GAP,ae as DEFAULT_CARD_SHADOW,te as DEFAULT_CORNER_STYLE,H as DEFAULT_HEADING_COMPRESSION,et as DEFAULT_HEADING_TYPOGRAPHY,fe as DEFAULT_HOVER_EFFECT,D as DEFAULT_SHADOW_COLOR,Be as DEFAULT_SIZES,c as DEFAULT_SURFACES,we as DEFAULT_SWITCH_SHOWN,G as DEFAULT_THEMES,be as DEFAULT_THEME_MODE,U as DEFAULT_THEME_VALUE,Me as GRADE_LABEL,ve as HEADING_CASES,pe as HEADING_COMPRESSIONS,_e as HEADING_MAX_PX_MAX,xe as HEADING_MAX_PX_MIN,p as HEADING_WEIGHT_MAX,m as HEADING_WEIGHT_MIN,he as HOVER_EFFECTS,le as IDENTITY_CARD_GAP,R as IDENTITY_CARD_SHADOW,de as IDENTITY_HOVER_EFFECT,B as READABILITY_AA,X as READABILITY_AA_LARGE,ze as SCALE_OF_STEP,b as SIZE_STEPS,J as TEXT_SIZE_MAX,q as TEXT_SIZE_MIN,S as THEME_DAY_END_HOUR,E as THEME_DAY_START_HOUR,Se as THEME_MODE_KEY,F as THEME_STORAGE_KEY,Pe as THEME_SURFACE_KEYS,Te as THEME_SWITCH_HIDE,Ae as THEME_SWITCH_KEY,j as TYPE_GROUPS,Ue as TYPE_GROUP_LABELS,s as accentInk,De as brandTheme,Ie as buildThemeBootScript,Ze as cardGapAttr,Ve as cardShadowAttr,Qe as compressionMetrics,L as contrastRatio,I as cornerRadiusTokens,We as cornerStyleTokens,Ne as darkerAccents,He as gradeContrast,Je as headingCompressionAttr,nt as headingTypographyFromRow,tt as headingTypographyStyle,rt as headingTypographyToRow,je as hoverEffectAttr,P as isDayHour,ge as normalizeCardGap,y as normalizeCardShadow,C as normalizeCornerRadius,ne as normalizeCornerStyle,N as normalizeHeadingCompression,x as normalizeHeadingTypography,M as normalizeHoverEffect,me as normalizeShadowColor,Q as normalizeSize,v as normalizeSizes,A as normalizeTheme,f as normalizeThemeColors,Ce as resolveTheme,Z as resolvedButtonInk,a as selectedThemeColors,qe as shadowColorTokens,$e as siteButtonPaint,Ke as siteCornerRadiusTokens,Le as themeAccentStyle,g as themeButtonColour,T as themeButtonInk,ke as themeButtonStyle,Oe as themeColorStyle,Fe as themePresetAccentVars,Ge as themeSurfaceStyle,ye as themeSwatchColors,Ye as typeScaleGroupOfClassName,Xe as typeSizesStyle};
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from "react";
2
- export default function BoxTabs({ children, className, style, }: {
2
+ export default function BoxTabs({ children, className, style, shape, }: {
3
3
  children: ReactNode;
4
4
  className?: string;
5
5
  style?: React.CSSProperties;
6
+ shape?: unknown;
6
7
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as o,Fragment as v,jsxs as j}from"react/jsx-runtime";import{useEffect as i,useRef as T,useState as l}from"react";import F from"./Reel.js";import{BoxTabPaneContext as L}from"./BoxTabPaneContext.js";import{markedChildren as c}from"../../format/lib/marked-children.js";function R({children:u,className:d,style:b}){const s=T(null),[a,f]=l([]),[m,h]=l(0);i(()=>{const t=s.current;if(!t)return;const r=()=>{const p=c(t,"data-tab-label");f(p.map((x,g)=>x.dataset.tabLabel?.trim()||`Tab ${g+1}`))};r();const e=new MutationObserver(r);return e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tab-label"]}),()=>e.disconnect()},[]);const n=a.length?Math.min(m,a.length-1):0;return i(()=>{const t=s.current;t&&c(t,"data-tab-label").forEach((r,e)=>{r.hidden=a.length>1&&e!==n})},[a,n]),j(v,{children:[a.length>1&&o(F,{slides:a.map(t=>({name:t,process:""})),active:n,shape:"tabs",tone:"surface",label:"Tabs",ref:t=>{t&&(t.onclick=r=>{const e=r.target?.closest?.("[data-idx]")?.getAttribute("data-idx");e!=null&&h(Number(e))})}}),o("div",{ref:s,"data-box-tabs":!0,className:d,style:b,children:o(L.Provider,{value:!0,children:u})})]})}export{R as default};
1
+ "use client";import{jsx as o,Fragment as _,jsxs as j}from"react/jsx-runtime";import{useEffect as i,useRef as A,useState as l}from"react";import B from"./Reel.js";import{BOX_TAB_SHAPES as S}from"../../format/lib/reel.js";import{parseOption as E}from"../../format/lib/parse-option.js";import{BoxTabPaneContext as F}from"./BoxTabPaneContext.js";import{markedChildren as c}from"../../format/lib/marked-children.js";function L({children:u,className:b,style:d,shape:m}){const s=A(null),[r,f]=l([]),p=E(S,"tabs",m),[h,x]=l(0);i(()=>{const t=s.current;if(!t)return;const a=()=>{const g=c(t,"data-tab-label");f(g.map((v,T)=>v.dataset.tabLabel?.trim()||`Tab ${T+1}`))};a();const e=new MutationObserver(a);return e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tab-label"]}),()=>e.disconnect()},[]);const n=r.length?Math.min(h,r.length-1):0;return i(()=>{const t=s.current;t&&c(t,"data-tab-label").forEach((a,e)=>{a.hidden=r.length>1&&e!==n})},[r,n]),j(_,{children:[r.length>1&&o(B,{slides:r.map(t=>({name:t,process:""})),active:n,shape:p,tone:"surface",label:"Tabs",ref:t=>{t&&(t.onclick=a=>{const e=a.target?.closest?.("[data-idx]")?.getAttribute("data-idx");e!=null&&x(Number(e))})}}),o("div",{ref:s,"data-box-tabs":!0,className:b,style:d,children:o(F.Provider,{value:!0,children:u})})]})}export{L as default};
@@ -4,6 +4,7 @@ interface CommonProps {
4
4
  variant?: Variant;
5
5
  arrow?: ReactNode | null;
6
6
  glyphBefore?: boolean;
7
+ spread?: boolean;
7
8
  className?: string;
8
9
  style?: CSSProperties;
9
10
  children: ReactNode;
@@ -1 +1 @@
1
- import{jsx as e,Fragment as i,jsxs as l}from"react/jsx-runtime";import{SiteLink as f}from"../lib/site-runtime.js";const g="sf-button group inline-flex items-center justify-center gap-2.5 border px-[22px] py-4 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors",c={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function x(p){const{variant:b="primary",arrow:r,glyphBefore:h,className:m,style:n,children:t,href:a,newTab:d,...u}=p,s=`${g} ${c[b]??c.primary} ${m??""}`,o=h?l(i,{children:[r!==null&&e("span",{"aria-hidden":!0,className:"inline-flex",children:r??"→"}),t]}):l(i,{children:[t,r!==null&&e("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:r??"→"})]});return a?e(f,{href:a,className:s,style:n,...d?{target:"_blank",rel:"noopener noreferrer"}:{},children:o}):e("button",{type:"button",className:s,style:n,...u,children:o})}export{x as default};
1
+ import{jsx as r,Fragment as i,jsxs as l}from"react/jsx-runtime";import{SiteLink as x}from"../lib/site-runtime.js";import{BUTTON_PAD_CLASSES as y}from"../../format/lib/content/button-look.js";const c=`sf-button group inline-flex items-center justify-center gap-2.5 border ${y} font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors`,b={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function j(p){const{variant:m="primary",arrow:e,glyphBefore:h,spread:f,className:u,style:n,children:t,href:s,newTab:d,...g}=p,a=`${f?c.replace("justify-center","justify-between"):c} ${b[m]??b.primary} ${u??""}`,o=h?l(i,{children:[e!==null&&r("span",{"aria-hidden":!0,className:"inline-flex",children:e??"→"}),t]}):l(i,{children:[t,e!==null&&r("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:e??"→"})]});return s?r(x,{href:s,className:a,style:n,...d?{target:"_blank",rel:"noopener noreferrer"}:{},children:o}):r("button",{type:"button",className:a,style:n,...g,children:o})}export{j as default};
@@ -1,3 +1,4 @@
1
+ import type { BorderValue } from "../../format/lib/content/borders.js";
1
2
  import { type BlockAlign as Align } from "../../format/lib/content/block-align.js";
2
3
  type Variant = "primary" | "ghost";
3
4
  export declare const BUTTON_BLOCK_CLASS = "sf-button-block";
@@ -13,6 +14,16 @@ interface ButtonBlockProps {
13
14
  widthFit?: string;
14
15
  buttonColor?: string;
15
16
  buttonTextColor?: string;
17
+ buttonFillOpacity?: number;
18
+ buttonBorder?: BorderValue;
19
+ buttonPaddingTop?: number;
20
+ buttonPaddingRight?: number;
21
+ buttonPaddingBottom?: number;
22
+ buttonPaddingLeft?: number;
23
+ buttonPaddingTopPhone?: number;
24
+ buttonPaddingRightPhone?: number;
25
+ buttonPaddingBottomPhone?: number;
26
+ buttonPaddingLeftPhone?: number;
16
27
  }
17
- export default function ButtonBlock({ label, href, variant, align, contained, arrow, icon, iconPosition, widthFit, buttonColor, buttonTextColor }: ButtonBlockProps): import("react").JSX.Element;
28
+ export default function ButtonBlock(props: ButtonBlockProps): import("react").JSX.Element;
18
29
  export {};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{buttonArrowShown as u}from"../../format/lib/content/button-arrow.js";import{buttonIconSide as B,buttonWidth as y,storedButtonIcon as L}from"../../format/lib/content/button-icon.js";import{ArrowLongRightIcon as S,ArrowRightIcon as A,ArrowUpRightIcon as N,BagIcon as _,CarIcon as x,CartIcon as b,ChevronRightIcon as k,DownloadIcon as G,EmailIcon as O,ExternalIcon as P,LocationIcon as R,PlayIcon as T,SearchIcon as U,TagIcon as v}from"efficient-shell/icons/efficient";import j from"./BlockFrame.js";import C from"./Btn.js";import{renderGold as E}from"./goldPhrases.js";import{BLOCK_ALIGN_JUSTIFY as F}from"../../format/lib/content/block-align.js";const K="sf-button-block",Y={"arrow-right":A,"arrow-long-right":S,"arrow-up-right":N,"chevron-right":k,external:P,cart:b,bag:_,tag:v,email:O,location:R,play:T,download:G,search:U,car:x};function $({label:a,href:i,variant:t,align:l,contained:s,arrow:h,icon:m,iconPosition:d,widthFit:f,buttonColor:o,buttonTextColor:c}){const r=L(m),e=r&&r!=="none"?Y[r]:void 0,p=r===void 0?u(h)?{}:{arrow:null}:e?{arrow:n(e,{size:16}),...B(d)==="before"?{glyphBefore:!0}:{}}:{arrow:null},I=y(f)==="fill"?{className:"w-full"}:{},g={...o?t==="ghost"?{borderColor:o}:{background:o,borderColor:o}:{},...c?{color:c}:{}},w=o||c?{style:g}:{};return n(j,{contained:s,className:`${K} py-4`,children:n("div",{className:`flex ${F[l]}`,children:n(C,{href:i||"#",variant:t,...I,...p,...w,children:E(a)})})})}export{K as BUTTON_BLOCK_CLASS,$ as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{buttonArrowShown as A}from"../../format/lib/content/button-arrow.js";import{buttonIconAtEnd as k,buttonIconSide as L,buttonWidth as N,storedButtonIcon as P}from"../../format/lib/content/button-icon.js";import{buttonPadAttrs as S,buttonPaint as T}from"../../format/lib/content/button-look.js";import{ArrowLongRightIcon as _,ArrowRightIcon as v,ArrowUpRightIcon as O,BagIcon as j,CarIcon as G,CartIcon as R,ChevronRightIcon as U,DownloadIcon as E,EmailIcon as F,ExternalIcon as K,LocationIcon as Y,PlayIcon as $,SearchIcon as z,TagIcon as D}from"efficient-shell/icons/efficient";import H from"./BlockFrame.js";import J from"./Btn.js";import{renderGold as W}from"./goldPhrases.js";import{BLOCK_ALIGN_JUSTIFY as q}from"../../format/lib/content/block-align.js";const M="sf-button-block",Q={"arrow-right":v,"arrow-long-right":_,"arrow-up-right":O,"chevron-right":U,external:K,cart:R,bag:j,tag:D,email:F,location:Y,play:$,download:E,search:z,car:G};function V(n){const{label:u,href:f,variant:c,align:g,contained:p,arrow:w,icon:I,iconPosition:e,widthFit:l,buttonColor:o,buttonTextColor:i}=n,t=P(I),s=t&&t!=="none"?Q[t]:void 0,b=t===void 0?A(w)?{}:{arrow:null}:s?{arrow:r(s,{size:16}),...L(e)==="before"?{glyphBefore:!0}:{}}:{arrow:null},d=S(n),h=[N(l)==="fill"?"w-full":"",d?.className??""].filter(Boolean).join(" "),B=h?{className:h}:{},C=k(e,l)?{spread:!0}:{},a=T(n),y=a?a.background==="transparent"?"ghost":"primary":c,m={...a??(o?c==="ghost"?{borderColor:o}:{background:o,borderColor:o}:{}),...i?{color:i}:{},...d?.style??{}},x=Object.keys(m).length?{style:m}:{};return r(H,{contained:p,className:`${M} py-4`,children:r("div",{className:`flex ${q[g]}`,children:r(J,{href:f||"#",variant:y,...B,...C,...b,...x,children:W(u)})})})}export{M as BUTTON_BLOCK_CLASS,V as default};
@@ -1,7 +1,7 @@
1
- import{jsx as r,jsxs as f}from"react/jsx-runtime";import{renderGold as c}from"./goldPhrases.js";import{storefrontLines as u}from"../../format/lib/markup.js";import{say as p}from"../../format/lib/editor-words.js";function y(o,s){return o.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||`section-${s+1}`}function v(o){const s=[];for(const d of o.replace(/\r\n?/g,`
2
- `).split(/\n[ \t]*\n/))d.split(`
3
- `).map(a=>a.replace(/\s+$/,"")).filter(a=>a.trim()!=="").forEach((a,x)=>{const m=u(a)[0].bullet,n=s.at(-1),e=x===0||!n||n.type==="ul"!==m;if(m){const t=a.slice(2);!e&&n?.type==="ul"?n.items.push(t):s.push({type:"ul",items:[t]})}else!e&&n?.type==="p"?n.text+=`
4
- ${a}`:s.push({type:"p",text:a})});return s}const w=()=>[{label:p("First section"),heading:p("Your *first* section."),body:p(`Write the opening paragraph here.
1
+ import{jsx as r,jsxs as m}from"react/jsx-runtime";import{slugify as u}from"efficient-shell/format";import{renderGold as c}from"./goldPhrases.js";import{storefrontLines as y}from"../../format/lib/markup.js";import{say as p}from"../../format/lib/editor-words.js";function v(i,s){return u(i)||`section-${s+1}`}function w(i){const s=[];for(const f of i.replace(/\r\n?/g,`
2
+ `).split(/\n[ \t]*\n/))f.split(`
3
+ `).map(a=>a.replace(/\s+$/,"")).filter(a=>a.trim()!=="").forEach((a,d)=>{const x=y(a)[0].bullet,n=s.at(-1),e=d===0||!n||n.type==="ul"!==x;if(x){const t=a.slice(2);!e&&n?.type==="ul"?n.items.push(t):s.push({type:"ul",items:[t]})}else!e&&n?.type==="p"?n.text+=`
4
+ ${a}`:s.push({type:"p",text:a})});return s}const N=()=>[{label:p("First section"),heading:p("Your *first* section."),body:p(`Write the opening paragraph here.
5
5
 
6
6
  - Start a line with a dash for a bullet.
7
- - Add as many as you like.`)},{label:p("Second section"),heading:p("Your *second* section."),body:p("Leave a blank line between paragraphs to start a new one.")}],N=120;function S({tocTitle:o,sections:s,editing:d=!1,stickyTop:g=N}){const a=(s??[]).filter(e=>(e.heading??"").trim()!==""||(e.label??"").trim()!==""||(e.body??"").trim()!=="");if(a.length===0&&!d)return null;const x=a.length===0&&d?w():a,m=new Set,n=x.map((e,t)=>{const i=y(e.label||e.heading||"",t);let l=i,h=2;for(;m.has(l);)l=`${i}-${h++}`;return m.add(l),l});return r("section",{className:"relative z-[2] bg-bg",children:f("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[240px_1fr] items-start gap-20 border-b border-line px-[var(--sf-site-gutter,40px)] py-20 max-[900px]:grid-cols-1 max-[900px]:gap-10 max-[900px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[900px]:py-[60px]",children:[f("aside",{className:"sticky flex flex-col self-start max-[900px]:static",style:{top:g},children:[o&&r("h4",{className:"mb-[18px] font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:c(o)}),x.map((e,t)=>f("a",{href:`#${n[t]}`,className:`flex items-center justify-between gap-3 border-b border-line py-2.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim transition-colors hover:text-fg${t===0?" border-t":""}`,children:[r("span",{children:c(e.label||"Section")}),r("span",{className:"text-accent",children:String(t+1).padStart(2,"0")})]},n[t]))]}),r("div",{className:"flex flex-col gap-16",children:x.map((e,t)=>f("article",{id:n[t],className:"flex flex-col gap-[18px]",style:{scrollMarginTop:g},children:[f("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:[String(t+1).padStart(2,"0")," · ",c(e.label||"Section")]}),e.heading&&r("h2",{className:"mb-2 border-b border-line pb-[18px] font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.5vw,44px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.025em]",children:c(e.heading)}),v(e.body??"").map((i,l)=>i.type==="ul"?r("ul",{className:"flex max-w-[680px] list-none flex-col gap-2.5 pl-0",children:i.items.map((h,b)=>r("li",{className:"relative pl-6 font-serif text-[length:var(--size-body,17px)] leading-[1.65] text-fg-dim before:absolute before:-top-0.5 before:left-1.5 before:text-[length:var(--size-body,24px)] before:leading-none before:text-accent before:content-['·']",children:c(h)},b))},l):r("p",{className:"max-w-[680px] font-serif text-[length:var(--size-body,17px)] leading-[1.7] text-fg-dim",children:c(i.text)},l))]},n[t]))})]})})}export{S as default,y as sectionAnchorId};
7
+ - Add as many as you like.`)},{label:p("Second section"),heading:p("Your *second* section."),body:p("Leave a blank line between paragraphs to start a new one.")}],S=120;function k({tocTitle:i,sections:s,editing:f=!1,stickyTop:h=S}){const a=(s??[]).filter(e=>(e.heading??"").trim()!==""||(e.label??"").trim()!==""||(e.body??"").trim()!=="");if(a.length===0&&!f)return null;const d=a.length===0&&f?N():a,x=new Set,n=d.map((e,t)=>{const o=v(e.label||e.heading||"",t);let l=o,g=2;for(;x.has(l);)l=`${o}-${g++}`;return x.add(l),l});return r("section",{className:"relative z-[2] bg-bg",children:m("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[240px_1fr] items-start gap-20 border-b border-line px-[var(--sf-site-gutter,40px)] py-20 max-[900px]:grid-cols-1 max-[900px]:gap-10 max-[900px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[900px]:py-[60px]",children:[m("aside",{className:"sticky flex flex-col self-start max-[900px]:static",style:{top:h},children:[i&&r("h4",{className:"mb-[18px] font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:c(i)}),d.map((e,t)=>m("a",{href:`#${n[t]}`,className:`flex items-center justify-between gap-3 border-b border-line py-2.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim transition-colors hover:text-fg${t===0?" border-t":""}`,children:[r("span",{children:c(e.label||"Section")}),r("span",{className:"text-accent",children:String(t+1).padStart(2,"0")})]},n[t]))]}),r("div",{className:"flex flex-col gap-16",children:d.map((e,t)=>m("article",{id:n[t],className:"flex flex-col gap-[18px]",style:{scrollMarginTop:h},children:[m("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:[String(t+1).padStart(2,"0")," · ",c(e.label||"Section")]}),e.heading&&r("h2",{className:"mb-2 border-b border-line pb-[18px] font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.5vw,44px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.025em]",children:c(e.heading)}),w(e.body??"").map((o,l)=>o.type==="ul"?r("ul",{className:"flex max-w-[680px] list-none flex-col gap-2.5 pl-0",children:o.items.map((g,b)=>r("li",{className:"relative pl-6 font-serif text-[length:var(--size-body,17px)] leading-[1.65] text-fg-dim before:absolute before:-top-0.5 before:left-1.5 before:text-[length:var(--size-body,24px)] before:leading-none before:text-accent before:content-['·']",children:c(g)},b))},l):r("p",{className:"max-w-[680px] font-serif text-[length:var(--size-body,17px)] leading-[1.7] text-fg-dim",children:c(o.text)},l))]},n[t]))})]})})}export{k as default,v as sectionAnchorId};
@@ -8,6 +8,7 @@ interface FlexProps {
8
8
  borderPhone?: unknown;
9
9
  direction: Direction;
10
10
  label?: string;
11
+ tabShape?: unknown;
11
12
  gap?: number | string;
12
13
  justify: Justify;
13
14
  align: AlignItems;
@@ -30,7 +31,8 @@ interface FlexProps {
30
31
  padLeftPhone?: unknown;
31
32
  padRightPhone?: unknown;
32
33
  fillHeight?: boolean;
34
+ shadow?: unknown;
33
35
  content: SlotComponent;
34
36
  }
35
- export default function Flex({ direction, label, gap, justify, align, wrap, share, phoneRow, blockSpacing, bgImage, bgImagePhone, darken, darkenStyle, placement, padV2, border, borderPhone, padTop, padBottom, padTopPhone, padBottomPhone, padLeft, padRight, padLeftPhone, padRightPhone, contained, fillHeight, content: Content, }: FlexProps): import("react").JSX.Element;
37
+ export default function Flex({ direction, label, tabShape, gap, justify, align, wrap, share, phoneRow, blockSpacing, bgImage, bgImagePhone, darken, darkenStyle, placement, padV2, border, borderPhone, padTop, padBottom, padTopPhone, padBottomPhone, padLeft, padRight, padLeftPhone, padRightPhone, contained, fillHeight, shadow, content: Content, }: FlexProps): import("react").JSX.Element;
36
38
  export {};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as le,Fragment as ae}from"react/jsx-runtime";import ie from"./BoxTabs.js";import{BoxTabPaneContext as ce,useIsTabPane as me}from"./BoxTabPaneContext.js";import fe from"./SiteGutterFrame.js";import{BoxSurfaceProvider as ue}from"./BoxSurfaceContext.js";import{BoxCellWidthContext as be}from"./BoxCellWidthContext.js";import{useInSiteHeader as de}from"./PhoneMenuTools.js";import{FRAME_BASE as H,FRAME_GUTTER as T}from"./BlockFrame.js";import{containerGapProps as xe}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as pe,boxBlockSpacingClass as $e,boxPhoneRowClasses as _,boxShareClasses as W,boxWrapClass as ye}from"../../format/lib/content/box-layout.js";import{BOX_CARD_PAD as s,BOX_OWNS_SIDES_CLASS as Ce,boxDarkenStyle as Se,boxPlacementClasses as _e,CARD_SHADOW_CLASS as he,isBackgroundBox as R}from"../../format/lib/content/box-background.js";import{sectionBorderStyle as ve}from"../../format/lib/content/borders.js";import{sectionPadAttrs as Pe}from"../../format/lib/content/section-padding.js";import{ON_MEDIA_INK_STYLE as ge}from"../../format/lib/content/ink.js";import{sizedBackground as h}from"../../format/lib/sized-image.js";const z={"--sf-site-gutter":"0px"},Ae="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-[720px]:bg-[image:var(--sf-box-bg-p)]";function Ee({direction:r,label:G,gap:I,justify:L,align:i,wrap:M,share:v,phoneRow:P,blockSpacing:U,bgImage:c,bgImagePhone:g,darken:X,darkenStyle:K,placement:Y,padV2:q=!1,border:J,borderPhone:Q,padTop:m,padBottom:f,padTopPhone:u,padBottomPhone:b,padLeft:d,padRight:x,padLeftPhone:p,padRightPhone:$,contained:V=!0,fillHeight:A=!1,content:Z}){const t=R(c),E=de(),N=me(),B=[W(v),$e(U)].filter(Boolean).join(" "),ee=B?` ${B}`:"",k=["flex",r==="row"?`flex-row ${_(P)}`:"flex-col",ye(M),t?_e(Y??"center",r):pe(L,i)].join(" ")+ee,o=A||t?" h-full":"",y=t||E||q?"":" py-6",se=`${H}${y} ${T}${o}`,oe=E?o.trim():`w-full${y}${o}`,n=xe("Flex",I,r==="row"?"inline":"block"),w=e(Z,{className:`${k}${n.className}${o}`,style:n.style,minEmptyHeight:120}),D=r==="tabs"?e(ie,{className:`${k}${n.className}${o}`,style:n.style,children:w}):w,C=N?e(ce.Provider,{value:!1,children:D}):D,re=G?.trim()||(N?"":void 0),te={values:{top:m,bottom:f,topPhone:u,bottomPhone:b,left:d,right:x,leftPhone:p,rightPhone:$},frame:y?24:0},F=a=>e(fe,{contained:V,framedClass:se,fillClass:oe,columnClass:`${H} ${T}${o}`,tabLabel:re,pad:t?void 0:te,border:ve(J,Q),children:a});if(!t){const a=i===void 0||i==="stretch",ne=W(v)!==""&&(a||_(P)!==_(void 0));return F((r==="row"?ne:r==="column"&&a)?e(be.Provider,{value:!0,children:C}):C)}const l=Se(X,K),O=R(g),S=Pe(typeof m=="number"?m:s.desktop,typeof f=="number"?f:s.desktop,typeof u=="number"?u:s.phone,typeof b=="number"?b:s.phone,typeof d=="number"?d:s.side,typeof x=="number"?x:s.side,typeof p=="number"?p:s.sidePhone,typeof $=="number"?$:s.sidePhone),j=e("div",{className:`relative z-[1] ${Ce} ${S?.className??""}${A?" h-full":""}`.trimEnd(),style:l?{...S?.style,...z,...ge}:{...S?.style,...z},children:C});return F(e(ae,{children:le("div",{className:`relative isolate overflow-hidden ${he}${o}${O?` ${Ae}`:""}`,style:O?{"--sf-box-bg":h(c??""),"--sf-box-bg-p":h(g??"")}:{backgroundImage:h(c??""),backgroundSize:"cover",backgroundPosition:"center"},children:[l&&e("div",{className:"absolute inset-0 z-0",style:l,"aria-hidden":!0}),l?e(ue,{children:j}):j]})}))}export{Ee as default};
1
+ import{jsx as e,jsxs as ie,Fragment as ce}from"react/jsx-runtime";import me from"./BoxTabs.js";import{BoxTabPaneContext as fe,useIsTabPane as ue}from"./BoxTabPaneContext.js";import be from"./SiteGutterFrame.js";import{BoxSurfaceProvider as de}from"./BoxSurfaceContext.js";import{BoxCellWidthContext as xe}from"./BoxCellWidthContext.js";import{useInSiteHeader as pe}from"./PhoneMenuTools.js";import{FRAME_BASE as H,FRAME_GUTTER as T}from"./BlockFrame.js";import{containerGapProps as Ce}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as $e,boxBlockSpacingClass as ye,boxFitContentClass as Se,boxPhoneRowClasses as _,boxShareClasses as W,boxWrapClass as he}from"../../format/lib/content/box-layout.js";import{BOX_CARD_PAD as s,BOX_OWNS_SIDES_CLASS as _e,boxDarkenStyle as ve,boxPlacementClasses as Pe,CARD_SHADOW_CLASS as Ae,isBackgroundBox as R}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as ge}from"../../format/lib/content/box-shadow.js";import{sectionBorderStyle as Ee}from"../../format/lib/content/borders.js";import{sectionPadAttrs as Ne}from"../../format/lib/content/section-padding.js";import{ON_MEDIA_INK_STYLE as Be}from"../../format/lib/content/ink.js";import{sizedBackground as v}from"../../format/lib/sized-image.js";const z={"--sf-site-gutter":"0px"},ke="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-[720px]:bg-[image:var(--sf-box-bg-p)]";function we({direction:o,label:G,tabShape:I,gap:L,justify:M,align:i,wrap:U,share:c,phoneRow:P,blockSpacing:X,bgImage:m,bgImagePhone:A,darken:K,darkenStyle:Y,placement:q,padV2:J=!1,border:Q,borderPhone:V,padTop:f,padBottom:u,padTopPhone:b,padBottomPhone:d,padLeft:x,padRight:p,padLeftPhone:C,padRightPhone:$,contained:Z=!0,fillHeight:g=!1,shadow:ee,content:se}){const r=R(m),E=pe(),N=ue(),B=[W(c),o==="row"?Se(c):"",ye(X)].filter(Boolean).join(" "),oe=B?` ${B}`:"",k=["flex",o==="row"?`flex-row ${_(P)}`:"flex-col",he(U),r?Pe(q??"center",o):$e(M,i)].join(" ")+oe,t=g||r?" h-full":"",y=r||E||J?"":" py-6",te=`${H}${y} ${T}${t}`,re=E?t.trim():`w-full${y}${t}`,n=Ce("Flex",L,o==="row"?"inline":"block"),w=e(se,{className:`${k}${n.className}${t}`,style:n.style,minEmptyHeight:120}),D=o==="tabs"?e(me,{className:`${k}${n.className}${t}`,style:n.style,shape:I,children:w}):w,S=N?e(fe.Provider,{value:!1,children:D}):D,ne=G?.trim()||(N?"":void 0),le={values:{top:f,bottom:u,topPhone:b,bottomPhone:d,left:x,right:p,leftPhone:C,rightPhone:$},frame:y?24:0},F=a=>e(be,{contained:Z,framedClass:te,fillClass:re,columnClass:`${H} ${T}${t}`,tabLabel:ne,pad:r?void 0:le,border:Ee(Q,V),outerAttrs:r?void 0:ge(ee),children:a});if(!r){const a=i===void 0||i==="stretch",ae=W(c)!==""&&(a||_(P)!==_(void 0));return F((o==="row"?ae:o==="column"&&a)?e(xe.Provider,{value:!0,children:S}):S)}const l=ve(K,Y),O=R(A),h=Ne(typeof f=="number"?f:s.desktop,typeof u=="number"?u:s.desktop,typeof b=="number"?b:s.phone,typeof d=="number"?d:s.phone,typeof x=="number"?x:s.side,typeof p=="number"?p:s.side,typeof C=="number"?C:s.sidePhone,typeof $=="number"?$:s.sidePhone),j=e("div",{className:`relative z-[1] ${_e} ${h?.className??""}${g?" h-full":""}`.trimEnd(),style:l?{...h?.style,...z,...Be}:{...h?.style,...z},children:S});return F(e(ce,{children:ie("div",{className:`relative isolate overflow-hidden ${Ae}${t}${O?` ${ke}`:""}`,style:O?{"--sf-box-bg":v(m??""),"--sf-box-bg-p":v(A??"")}:{backgroundImage:v(m??""),backgroundSize:"cover",backgroundPosition:"center"},children:[l&&e("div",{className:"absolute inset-0 z-0",style:l,"aria-hidden":!0}),l?e(de,{children:j}):j]})}))}export{we as default};
@@ -8,4 +8,4 @@ export interface LogoBlockProps {
8
8
  align?: BlockAlign;
9
9
  color?: string | null;
10
10
  }
11
- export default function LogoBlock({ src, alt, href, heightPx, reverse, align, color, }: LogoBlockProps): import("react").JSX.Element;
11
+ export default function LogoBlock(props: LogoBlockProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as i}from"react/jsx-runtime";import{useContext as L}from"react";import{SiteLink as v}from"../lib/site-runtime.js";import I,{FOOTER_LOGO_PX as C,WORDMARK_FIT_FLOOR_PX as O}from"./Logo.js";import{media as _}from"../lib/media.js";import{BoxSurfaceContext as h}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as D}from"./BoxCellWidthContext.js";import{useInSiteHeader as N}from"./PhoneMenuTools.js";import{useSiteLogo as B}from"./SiteLogoContext.js";import{BLOCK_ALIGN_JUSTIFY as F}from"../../format/lib/content/block-align.js";function T({src:f,alt:d,href:t,heightPx:k=C,reverse:u=!0,align:s,color:p=null}){const e=B(),a=(f??"").trim(),o=a?{src:_(a),reversedSrc:null,inkIsDark:null,wordmark:d?.trim()||null}:{src:e.src,reversedSrc:e.reversedSrc,inkIsDark:e.inkIsDark,wordmark:e.wordmark},x=L(h),l=N(),S=D(),r=!l&&S,n=i(I,{variant:"footer",sizePx:k,src:o.src,reverse:u,color:p,reversedSrc:o.reversedSrc,inkIsDark:o.inkIsDark,wordmark:o.wordmark,siteName:e.siteName,fitToContainer:l,fitWordmarkToContainer:r,fitFloorPx:r?O:void 0,...x?.dark?{onLightSurface:!1}:{}}),c=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",m=t?i(v,{href:t,className:c,children:n}):r?i("span",{className:c,children:n}):n;if(!s&&!r)return m;const w=["flex min-w-0",s?F[s]:"",r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return i("div",{className:w,children:m})}export{T as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{useContext as g}from"react";import{SiteLink as S}from"../lib/site-runtime.js";import v,{FOOTER_LOGO_PX as h,WORDMARK_FIT_FLOOR_PX as I}from"./Logo.js";import{media as C}from"../lib/media.js";import{BoxSurfaceContext as O}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as _}from"./BoxCellWidthContext.js";import{useInSiteHeader as N}from"./PhoneMenuTools.js";import{useSiteLogo as B}from"./SiteLogoContext.js";import{useLogoWall as D}from"./LogoWallContext.js";import{LogoWallMark as H}from"./Logos.js";import{BLOCK_ALIGN_JUSTIFY as W}from"../../format/lib/content/block-align.js";function F(t){const e=D();if(!e)return r(T,{...t});const n=(t.src??"").trim();return r("div",{className:"text-center",children:r(H,{src:n||void 0,alt:t.alt,look:e.look,logoHeight:e.logoHeight,grayscale:e.grayscale})})}function T({src:t,alt:e,href:n,heightPx:k=h,reverse:u=!0,align:l,color:x=null}){const i=B(),c=(t??"").trim(),s=c?{src:C(c),reversedSrc:null,inkIsDark:null,wordmark:e?.trim()||null}:{src:i.src,reversedSrc:i.reversedSrc,inkIsDark:i.inkIsDark,wordmark:i.wordmark},p=g(O),m=N(),L=_(),o=!m&&L,a=r(v,{variant:"footer",sizePx:k,src:s.src,reverse:u,color:x,reversedSrc:s.reversedSrc,inkIsDark:s.inkIsDark,wordmark:s.wordmark,siteName:i.siteName,fitToContainer:m,fitWordmarkToContainer:o,fitFloorPx:o?I:void 0,...p?.dark?{onLightSurface:!1}:{}}),f=o?"inline-flex max-w-full overflow-x-clip":"inline-flex",d=n?r(S,{href:n,className:f,children:a}):o?r("span",{className:f,children:a}):a;if(!l&&!o)return d;const w=["flex min-w-0",l?W[l]:"",o?"[container-type:inline-size]":""].filter(Boolean).join(" ");return r("div",{className:w,children:d})}export{F as default};
@@ -0,0 +1,12 @@
1
+ import { type ReactNode } from "react";
2
+ import type { LogoLook } from "../../format/lib/sections/logo-look.js";
3
+ export type LogoWall = {
4
+ look: LogoLook;
5
+ logoHeight?: number;
6
+ grayscale?: boolean;
7
+ };
8
+ export declare function LogoWallProvider({ value, children }: {
9
+ value: LogoWall;
10
+ children: ReactNode;
11
+ }): import("react").JSX.Element;
12
+ export declare function useLogoWall(): LogoWall | null;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{createContext as n,useContext as l}from"react";const o=n(null);function s({value:e,children:r}){return t(o.Provider,{value:e,children:r})}function x(){return l(o)}export{s as LogoWallProvider,x as useLogoWall};
@@ -1,3 +1,6 @@
1
+ import type { SlotComponent } from "efficient-easel/blocks";
2
+ import type { ReactNode } from "react";
3
+ import { type LogoLook } from "../../format/lib/sections/logo-look.js";
1
4
  interface LogoItem {
2
5
  src: string;
3
6
  alt: string;
@@ -10,6 +13,18 @@ interface LogosProps {
10
13
  grayscale?: boolean;
11
14
  logoHeight?: number;
12
15
  bandPadding?: number;
16
+ logos?: SlotComponent;
17
+ look?: LogoLook;
18
+ omitHead?: boolean;
13
19
  }
14
- export default function Logos({ items, contained, heading, columns, grayscale, logoHeight, bandPadding, }: LogosProps): import("react").JSX.Element;
20
+ export default function Logos({ items, contained, heading, columns, grayscale, logoHeight, bandPadding, logos: LogoBlocks, look, omitHead, }: LogosProps): import("react").JSX.Element;
21
+ export declare const CARD_WORDS_CLASS = "font-mono text-[12px] uppercase tracking-[0.18em]";
22
+ export declare function LogoWallMark({ src, alt, look, logoHeight, grayscale, mark, }: {
23
+ src?: string;
24
+ alt?: string;
25
+ look: LogoLook;
26
+ logoHeight?: number;
27
+ grayscale?: boolean;
28
+ mark?: ReactNode;
29
+ }): import("react").JSX.Element;
15
30
  export {};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as f}from"react/jsx-runtime";import x from"./BlockFrame.js";import{renderChrome as u,renderHeadline as d}from"./goldPhrases.js";import{media as y}from"../lib/media.js";import{sizedImage as h}from"../../format/lib/sized-image.js";const c={label:"text-[length:var(--size-label,13px)]"};function g({items:l,contained:e,heading:s,columns:n,grayscale:i,logoHeight:o,bandPadding:a}){const m=n!=null?{flex:`0 0 calc((100% - ${(n-1)*3.5}rem) / ${n})`}:void 0;return f(x,{contained:e,className:a==null?"py-10":"",style:a==null?void 0:{paddingTop:`${a}px`,paddingBottom:`${a}px`},children:[s!=null&&s!==""?t("h2",{className:`mb-8 text-center font-mono ${c.label} uppercase tracking-[0.2em] text-fg-dim`,children:d(s,!1)}):null,t("div",{className:"flex flex-wrap items-center justify-center gap-x-14 gap-y-8",children:(l??[]).map((r,p)=>t("div",{className:"text-center",style:m,children:r.src?t("img",{...$(y(r.src)),alt:r.alt,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",o==null?"h-7":"",i===!1?"":"grayscale"].filter(Boolean).join(" "),style:o==null?void 0:{height:`${o}px`}}):t("span",{className:`font-mono ${c.label} uppercase tracking-[0.2em] text-fg-dim`,children:u(r.alt||"Logo")})},p))})]})}function $(l){const e=h(l,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:l}}export{g as default};
1
+ import{jsx as a,jsxs as y}from"react/jsx-runtime";import{PaymentMark as A,paymentMarkItems as j}from"efficient-shell/icons/payment";import v from"./BlockFrame.js";import{renderChrome as z,renderGold as C,renderHeadline as E}from"./goldPhrases.js";import{LogoWallProvider as G}from"./LogoWallContext.js";import{media as h}from"../lib/media.js";import{sizedImage as g}from"../../format/lib/sized-image.js";import{stripMarkup as S}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as R}from"../../format/lib/sections/logo-look.js";const $={label:"text-[length:var(--size-label,13px)]"},o="sf-logo-wall",_="sf-logo-items",L="flex flex-wrap items-center justify-center",m="plain",p={plain:{x:3.5,y:2},cards:{x:.75,y:.75}},N=t=>({columnGap:`${p[t].x}rem`,rowGap:`${p[t].y}rem`}),O=(t,e)=>`calc((100% - ${(t-1)*p[e].x}rem) / ${t})`;function M({items:t,contained:e,heading:n,columns:r,grayscale:s,logoHeight:l,bandPadding:i,logos:f,look:c=R,omitHead:d=!1}){const b=r!=null?{flex:`0 0 ${O(r,m)}`}:void 0,x=!d;return y(v,{contained:e,className:x&&i==null?"py-10":"",style:!x||i==null?void 0:{paddingTop:`${i}px`,paddingBottom:`${i}px`},children:[!d&&n!=null&&n!==""?a("h2",{className:`mb-8 text-center font-mono ${$.label} uppercase tracking-[0.2em] text-fg-dim`,children:E(n,!1)}):null,f?y(G,{value:{look:c,logoHeight:l,grayscale:s},children:[a("style",{children:`.${o}:empty{display:none}.${o}:not(:empty)~.${_}{display:none}`+(r!=null?`.${o}-c${r}>*{flex:0 0 ${O(r,c)}}`:"")}),a(f,{className:[o,r!=null?`${o}-c${r}`:"",L].filter(Boolean).join(" "),style:N(c),minEmptyHeight:80})]}):null,a("div",{className:`${_} ${L}`,style:N(m),children:(t??[]).map((u,k)=>a("div",{className:"text-center",style:b,children:a(T,{src:u.src,alt:u.alt,look:m,logoHeight:l,grayscale:s})},k))})]})}const W="font-mono text-[12px] uppercase tracking-[0.18em]";function w(t){const e=j({name:S(t)});return!e.length||e.length===1&&e[0].kind==="words"&&!e[0].glyph?null:a("span",{className:"flex items-center gap-3",children:e.map((n,r)=>a(A,{item:n,size:20,className:W},r))})}function T({src:t,alt:e,look:n,logoHeight:r,grayscale:s,mark:l}){return n==="cards"?a("div",{className:"sf-card flex h-10 items-center border border-line bg-surface px-4",children:l||(!t&&e&&w(e)?w(e):t?a("img",{...I(h(t)),alt:S(e||""),className:s===!1?"max-h-5 w-auto opacity-90":"max-h-5 w-auto opacity-90 grayscale"}):e&&a("span",{className:W,children:C(e)}))}):t?a("img",{...B(h(t)),alt:e,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",r==null?"h-7":"",s===!1?"":"grayscale"].filter(Boolean).join(" "),style:r==null?void 0:{height:`${r}px`}}):a("span",{className:`font-mono ${$.label} uppercase tracking-[0.2em] text-fg-dim`,children:z(e||"Logo")})}function I(t){const e=g(t,{fallbackWidth:320,maxWidth:640});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"120px"}:{src:t}}function B(t){const e=g(t,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:t}}export{W as CARD_WORDS_CLASS,T as LogoWallMark,M as default};
@@ -1,6 +1,7 @@
1
1
  export interface PaymentBadge {
2
2
  label?: string;
3
3
  src?: string;
4
+ kind?: string;
4
5
  }
5
6
  interface PaymentBadgesProps {
6
7
  heading?: string;
@@ -9,6 +10,7 @@ interface PaymentBadgesProps {
9
10
  text?: string;
10
11
  }[];
11
12
  contained: boolean;
13
+ sourced?: boolean;
12
14
  }
13
- export default function PaymentBadges({ heading, badges, assurances, contained }: PaymentBadgesProps): import("react").JSX.Element;
15
+ export default function PaymentBadges({ heading, badges, assurances, contained, sourced }: PaymentBadgesProps): import("react").JSX.Element;
14
16
  export {};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as i}from"react/jsx-runtime";import n from"./BlockFrame.js";import{media as o}from"../lib/media.js";import{sizedImage as p}from"../../format/lib/sized-image.js";import{stripMarkup as d}from"../../format/lib/markup.js";import{renderGold as c}from"./goldPhrases.js";function x({heading:a,badges:t,assurances:l,contained:m}){return r(n,{contained:m,className:"py-6",children:i("div",{className:"flex flex-col items-center gap-5 border-y border-line py-8 text-center",children:[a&&r("span",{className:"font-mono text-[13px] uppercase tracking-[0.3em] opacity-70",children:c(a)}),t.length>0&&r("ul",{className:"flex flex-wrap items-center justify-center gap-3",children:t.map((e,s)=>r("li",{className:"sf-card flex h-10 items-center border border-line bg-surface px-4",children:e.src?r("img",{...f(o(e.src)),alt:d(e.label||""),className:"max-h-5 w-auto opacity-90"}):e.label&&r("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em]",children:c(e.label)})},s))}),l.length>0&&r("ul",{className:"flex flex-wrap items-center justify-center gap-x-6 gap-y-1",children:l.map((e,s)=>e.text&&i("li",{className:"flex items-center gap-2 text-[13px] opacity-60",children:[r("span",{className:"h-1 w-1 rounded-full bg-accent","aria-hidden":!0}),c(e.text)]},s))})]})})}function f(a){const t=p(a,{fallbackWidth:320,maxWidth:640});return t.srcSet?{src:t.src,srcSet:t.srcSet,sizes:"120px"}:{src:a}}export{x as default};
1
+ import{jsx as a,jsxs as n}from"react/jsx-runtime";import{PaymentMark as d,paymentMarks as f}from"efficient-shell/icons/payment";import x from"./BlockFrame.js";import{CARD_WORDS_CLASS as y,LogoWallMark as c}from"./Logos.js";import{renderGold as i}from"./goldPhrases.js";function g({heading:r,badges:t,assurances:s,contained:o,sourced:p=!1}){const m=p?f(t.map(e=>({name:e.label,kind:e.kind}))).map(e=>({item:e})):t.map(e=>({src:e.src,label:e.label||""}));return a(x,{contained:o,className:"py-6",children:n("div",{className:"flex flex-col items-center gap-5 border-y border-line py-8 text-center",children:[r&&a("span",{className:"font-mono text-[13px] uppercase tracking-[0.3em] opacity-70",children:i(r)}),m.length>0&&a("ul",{className:"flex flex-wrap items-center justify-center gap-3",children:m.map((e,l)=>a("li",{children:"item"in e?a(c,{look:"cards",alt:e.item.label,mark:a(d,{item:e.item,size:20,className:y})}):a(c,{src:e.src,alt:e.label,look:"cards",grayscale:!1})},l))}),s.length>0&&a("ul",{className:"flex flex-wrap items-center justify-center gap-x-6 gap-y-1",children:s.map((e,l)=>e.text&&n("li",{className:"flex items-center gap-2 text-[13px] opacity-60",children:[a("span",{className:"h-1 w-1 rounded-full bg-accent","aria-hidden":!0}),i(e.text)]},l))})]})})}export{g as default};
@@ -39,7 +39,6 @@ type Ctx = {
39
39
  textStyles: unknown;
40
40
  setTextStyles: (v: unknown) => void;
41
41
  wordStyles: Record<WordStyleName, ResolvedWordStyle> | null;
42
- cardThemeIndex: number | null;
43
42
  siteWidth: number | null;
44
43
  setSiteWidth: (v: number | null) => void;
45
44
  siteGutter: number | null;
@@ -63,7 +62,7 @@ type Ctx = {
63
62
  setSelectHandler: (fn: () => void) => void;
64
63
  };
65
64
  export declare const PreviewHeaderContext: import("react").Context<Ctx>;
66
- export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, blockGap, onSiteGutterChange, onBlockGapChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, cardThemeIndex, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
65
+ export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, blockGap, onSiteGutterChange, onBlockGapChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
67
66
  children: ReactNode;
68
67
  websiteName?: string | null;
69
68
  templateChrome?: boolean;
@@ -100,7 +99,6 @@ export declare function PreviewHeaderProvider({ children, websiteName, templateC
100
99
  textStyles?: unknown;
101
100
  onTextStylesChange?: (v: unknown) => void;
102
101
  wordStyles?: Record<WordStyleName, ResolvedWordStyle> | null;
103
- cardThemeIndex?: number | null;
104
102
  headingTypography?: ResolvedHeadingTypography;
105
103
  onHeadingTypographyChange?: (v: ResolvedHeadingTypography) => void;
106
104
  heroBackgroundFollowsWidth?: boolean | null;