efficient-web-builder 73.2.0 → 74.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/editor/components/CustomHtmlCodeWindow.d.ts +11 -0
  3. package/dist/editor/components/CustomHtmlCodeWindow.js +20 -0
  4. package/dist/editor/components/PreviewPartAnchors.d.ts +2 -1
  5. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  6. package/dist/editor/components/SectionThemePicker.d.ts +3 -2
  7. package/dist/editor/components/SectionThemePicker.js +1 -1
  8. package/dist/editor/components/SiteTextStylesField.d.ts +2 -1
  9. package/dist/editor/components/SiteTextStylesField.js +1 -1
  10. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  11. package/dist/editor/components/StorefrontEditor.js +1 -1
  12. package/dist/editor/components/WebsiteSettingsPanel.d.ts +2 -0
  13. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  14. package/dist/editor/components/storefront-editor.css +111 -0
  15. package/dist/editor/lib/document/blocks/general/CustomHTML/fields.d.ts +6 -0
  16. package/dist/editor/lib/document/blocks/general/CustomHTML/fields.js +1 -0
  17. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  18. package/dist/editor/lib/document/controls.d.ts +2 -0
  19. package/dist/editor/lib/document/controls.js +1 -1
  20. package/dist/editor/lib/document/custom-html-preview.d.ts +12 -0
  21. package/dist/editor/lib/document/custom-html-preview.js +1 -0
  22. package/dist/editor/lib/document/own-pad-fields.d.ts +7 -1
  23. package/dist/editor/lib/document/own-pad-fields.js +1 -1
  24. package/dist/format/lib/animation/hover.js +1 -1
  25. package/dist/format/lib/animation/loop.js +1 -1
  26. package/dist/format/lib/content/accordion-row-style.js +1 -1
  27. package/dist/format/lib/content/borders.d.ts +2 -1
  28. package/dist/format/lib/content/borders.js +1 -1
  29. package/dist/format/lib/content/box-layout.js +1 -1
  30. package/dist/format/lib/content/button-icon.js +1 -1
  31. package/dist/format/lib/content/card-place.js +1 -1
  32. package/dist/format/lib/content/chat-launcher.js +1 -1
  33. package/dist/format/lib/content/container-direction.js +1 -1
  34. package/dist/format/lib/content/footprint.js +1 -1
  35. package/dist/format/lib/content/image-fit.js +1 -1
  36. package/dist/format/lib/content/image-text-rows.js +1 -1
  37. package/dist/format/lib/content/list-number.js +1 -1
  38. package/dist/format/lib/content/list-position.js +1 -1
  39. package/dist/format/lib/content/text-tag.js +1 -1
  40. package/dist/format/lib/document/blocks/block-types.d.ts +1 -0
  41. package/dist/format/lib/document/blocks/general/text-part-shapes.json +0 -6
  42. package/dist/format/lib/document/box-footer.js +1 -1
  43. package/dist/format/lib/document/custom-html-place.d.ts +19 -0
  44. package/dist/format/lib/document/custom-html-place.js +7 -0
  45. package/dist/format/lib/document/left-view.js +1 -1
  46. package/dist/format/lib/document/mockup-variant-fields.js +1 -1
  47. package/dist/format/lib/document/part-inks.d.ts +1 -0
  48. package/dist/format/lib/document/part-inks.js +1 -1
  49. package/dist/format/lib/document/passes/types.d.ts +4 -2
  50. package/dist/format/lib/editor-words-catalogue.d.ts +19 -0
  51. package/dist/format/lib/editor-words-catalogue.js +4 -4
  52. package/dist/format/lib/hero-arrows.js +1 -1
  53. package/dist/format/lib/hero-group-placement.js +1 -1
  54. package/dist/format/lib/hero-media-layout.js +1 -1
  55. package/dist/format/lib/hero-phone-stack.js +1 -1
  56. package/dist/format/lib/hero-video.js +1 -1
  57. package/dist/format/lib/reel.js +1 -1
  58. package/dist/format/lib/sections/divider-style.js +1 -1
  59. package/dist/format/lib/sections/hero-overlay.js +1 -1
  60. package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
  61. package/dist/format/lib/sections/logo-look.js +1 -1
  62. package/dist/format/lib/sections/product-card-style.js +1 -1
  63. package/dist/format/lib/sections/section-eyebrow-look.js +1 -1
  64. package/dist/format/lib/sections/section-head-placement.js +1 -1
  65. package/dist/format/lib/sections/section-head-style.js +1 -1
  66. package/dist/format/lib/sections/section-number-style.js +1 -1
  67. package/dist/format/lib/sections/strip-shape.d.ts +1 -0
  68. package/dist/format/lib/sections/strip-shape.js +1 -1
  69. package/dist/format/lib/sections/ticker-style.js +1 -1
  70. package/dist/format/lib/text-style-face.d.ts +6 -0
  71. package/dist/format/lib/text-style-face.js +2 -1
  72. package/dist/format/lib/theme.d.ts +2 -1
  73. package/dist/format/lib/theme.js +3 -3
  74. package/dist/render/components/BoxTabs.js +1 -1
  75. package/dist/render/components/Breadcrumb.d.ts +4 -1
  76. package/dist/render/components/Breadcrumb.js +1 -1
  77. package/dist/render/components/PhoneMenuTools.d.ts +3 -1
  78. package/dist/render/components/PhoneMenuTools.js +1 -1
  79. package/dist/render/components/PublishedPartStylesContext.d.ts +2 -1
  80. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  81. package/dist/render/components/SpecStrip.d.ts +4 -1
  82. package/dist/render/components/SpecStrip.js +1 -1
  83. package/dist/render/lib/content/section-padding.d.ts +24 -14
  84. package/dist/render/lib/content/section-padding.js +1 -1
  85. package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
  86. package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
  87. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  88. package/dist/render/lib/document/blocks/general/SpecStrip/render.js +1 -1
  89. package/dist/render/lib/document/blocks/general/section-head-looks.js +1 -1
  90. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
  91. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  92. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  93. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  94. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  95. package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
  96. package/dist/render/lib/document/custom-css.d.ts +4 -0
  97. package/dist/render/lib/document/custom-css.js +3 -2
  98. package/dist/render/lib/document/header-clearance.js +1 -1
  99. package/dist/render/lib/document/header-ink.js +1 -1
  100. package/dist/render/lib/document/part-styles.d.ts +7 -4
  101. package/dist/render/lib/document/part-styles.js +2 -2
  102. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  103. package/dist/render/lib/document/passes/section-padding.d.ts +2 -1
  104. package/dist/render/lib/document/passes/section-padding.js +1 -1
  105. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  106. package/dist/routine-index.json +1 -1
  107. package/dist/value-index.json +1 -1
  108. package/package.json +27 -6
  109. package/dist/format/lib/document/blocks/general/CustomHTML/fields.d.ts +0 -2
  110. package/dist/format/lib/document/blocks/general/CustomHTML/fields.js +0 -1
  111. package/dist/format/lib/parse-option.d.ts +0 -3
  112. package/dist/format/lib/parse-option.js +0 -1
  113. package/dist/format/lib/source-rules/one-option-parser.d.ts +0 -12
  114. package/dist/format/lib/source-rules/one-option-parser.js +0 -12
@@ -1 +1 @@
1
- import{parseOption as o}from"../parse-option.js";import{ownEntry as t}from"../own-entry.js";const l="plain",r=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],E="line",O={KeyFeatures:"filled"};function i(e){return t(O,e)??l}function L(e,n){return o(r,i(n),e)}function _(e){return o(r,E,e)}export{E as DEFAULT_EYEBROW_BLOCK_LOOK,l as DEFAULT_SECTION_EYEBROW_LOOK,O as SECTION_EYEBROW_DEFAULTS,r as SECTION_EYEBROW_LOOK_OPTIONS,i as eyebrowLookFor,_ as parseEyebrowBlockLook,L as parseSectionEyebrowLook};
1
+ import{parseOption as o}from"efficient-shell/format";import{ownEntry as t}from"../own-entry.js";const l="plain",r=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],E="line",O={KeyFeatures:"filled"};function i(e){return t(O,e)??l}function L(e,n){return o(r,i(n),e)}function _(e){return o(r,E,e)}export{E as DEFAULT_EYEBROW_BLOCK_LOOK,l as DEFAULT_SECTION_EYEBROW_LOOK,O as SECTION_EYEBROW_DEFAULTS,r as SECTION_EYEBROW_LOOK_OPTIONS,i as eyebrowLookFor,_ as parseEyebrowBlockLook,L as parseSectionEyebrowLook};
@@ -1 +1 @@
1
- import{parseOption as n}from"../parse-option.js";import{withRowsShownWhen as o}from"../document/show-when-attach.js";import{nonEmptyString as d}from"../non-empty-string.js";import{hasOwnEntry as l}from"../own-entry.js";const a="inline",s=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"},{label:"In the list column",value:"list-column",only:["Footprint"]}],y="list-column";function S(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>d(t)!==void 0)}const p={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},Subscribe:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Subscribe"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},T="SectionHeader";function R(e){return l(p,e)}function b(e){return n(s,a,e)}const m=new Set(["Flex"]);function P(e){return!!e?.type&&m.has(e.type)}const i={not:{field:"headPlacement",is:"own-box"}},E={not:i};function x(e,t,r){return o(e,r,i)}export{a as DEFAULT_SECTION_HEAD_PLACEMENT,y as HEAD_IN_LIST_COLUMN,i as HEAD_ROWS_SHOW_WHEN,E as OWN_BOX_ROWS_SHOW_WHEN,s as SECTION_HEAD_PLACEMENT_OPTIONS,T as SECTION_HEAD_TYPE,p as SPLITTABLE_SECTIONS,R as canSplitHead,x as headFieldsForPlacement,S as headRoleProps,P as parentCapsWidth,b as parseSectionHeadPlacement};
1
+ import{parseOption as n}from"efficient-shell/format";import{withRowsShownWhen as o}from"../document/show-when-attach.js";import{nonEmptyString as d}from"../non-empty-string.js";import{hasOwnEntry as l}from"../own-entry.js";const a="inline",s=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"},{label:"In the list column",value:"list-column",only:["Footprint"]}],y="list-column";function S(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>d(t)!==void 0)}const p={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},Subscribe:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Subscribe"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},T="SectionHeader";function R(e){return l(p,e)}function b(e){return n(s,a,e)}const m=new Set(["Flex"]);function P(e){return!!e?.type&&m.has(e.type)}const i={not:{field:"headPlacement",is:"own-box"}},E={not:i};function x(e,t,r){return o(e,r,i)}export{a as DEFAULT_SECTION_HEAD_PLACEMENT,y as HEAD_IN_LIST_COLUMN,i as HEAD_ROWS_SHOW_WHEN,E as OWN_BOX_ROWS_SHOW_WHEN,s as SECTION_HEAD_PLACEMENT_OPTIONS,T as SECTION_HEAD_TYPE,p as SPLITTABLE_SECTIONS,R as canSplitHead,x as headFieldsForPlacement,S as headRoleProps,P as parentCapsWidth,b as parseSectionHeadPlacement};
@@ -1 +1 @@
1
- import{parseOption as a}from"../parse-option.js";import{shownForOption as c,withRowRules as _}from"../document/show-when-attach.js";const n="standard",s=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],o=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],r=[...o,"description"],p={standard:["eyebrowLook"],editorial:[...o,"eyebrowLook"],simple:r,statement:r,natural:o,essay:r},i=["gap-5","gap-3"],S=["text-[length:var(--size-body,16px)]","text-[15px]"];function D(e){return a(i,i[0],e)}function m(e){return a(S,S[0],e)}function A(e){return a(s,n,e)}function L(e){const l=s.map(t=>t.value),u=[...new Set(Object.values(p).flat())];return _(e,u.map(t=>[[t],c("headStyle",l,n,l.filter(E=>!p[E].includes(t)))]))}export{n as DEFAULT_SECTION_HEAD_STYLE,o as EDITORIAL_HEAD_UNUSED_FIELDS,p as HEAD_UNUSED_FIELDS,S as NATURAL_DESCRIPTION_SIZES,i as NATURAL_ROW_GAPS,s as SECTION_HEAD_STYLE_OPTIONS,r as SIMPLE_HEAD_UNUSED_FIELDS,m as parseNaturalDescriptionSize,D as parseNaturalRowGap,A as parseSectionHeadStyle,L as withHeadStyleRules};
1
+ import{parseOption as a}from"efficient-shell/format";import{shownForOption as c,withRowRules as _}from"../document/show-when-attach.js";const n="standard",s=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],o=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],r=[...o,"description"],p={standard:["eyebrowLook"],editorial:[...o,"eyebrowLook"],simple:r,statement:r,natural:o,essay:r},i=["gap-5","gap-3"],S=["text-[length:var(--size-body,16px)]","text-[15px]"];function D(e){return a(i,i[0],e)}function m(e){return a(S,S[0],e)}function A(e){return a(s,n,e)}function L(e){const l=s.map(t=>t.value),u=[...new Set(Object.values(p).flat())];return _(e,u.map(t=>[[t],c("headStyle",l,n,l.filter(E=>!p[E].includes(t)))]))}export{n as DEFAULT_SECTION_HEAD_STYLE,o as EDITORIAL_HEAD_UNUSED_FIELDS,p as HEAD_UNUSED_FIELDS,S as NATURAL_DESCRIPTION_SIZES,i as NATURAL_ROW_GAPS,s as SECTION_HEAD_STYLE_OPTIONS,r as SIMPLE_HEAD_UNUSED_FIELDS,m as parseNaturalDescriptionSize,D as parseNaturalRowGap,A as parseSectionHeadStyle,L as withHeadStyleRules};
@@ -1 +1 @@
1
- import{parseOption as t}from"../parse-option.js";const o="solid",r=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function l(e){return t(r,o,e)}const i="sf-secnum-outline",s="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",p=`@supports (-webkit-text-stroke: 1px currentColor){.${i}{color:var(--site-surface-2);-webkit-text-stroke:1px var(--site-line)}}`;export{o as DEFAULT_SECTION_NUMBER_STYLE,i as OUTLINED_NUMBER_CLASS,p as OUTLINED_NUMBER_CSS,s as OUTLINED_NUMBER_LAYOUT,r as SECTION_NUMBER_STYLE_OPTIONS,l as parseSectionNumberStyle};
1
+ import{parseOption as t}from"efficient-shell/format";const o="solid",r=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function l(e){return t(r,o,e)}const i="sf-secnum-outline",s="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",p=`@supports (-webkit-text-stroke: 1px currentColor){.${i}{color:var(--site-surface-2);-webkit-text-stroke:1px var(--site-line)}}`;export{o as DEFAULT_SECTION_NUMBER_STYLE,i as OUTLINED_NUMBER_CLASS,p as OUTLINED_NUMBER_CSS,s as OUTLINED_NUMBER_LAYOUT,r as SECTION_NUMBER_STYLE_OPTIONS,l as parseSectionNumberStyle};
@@ -11,6 +11,7 @@ export declare const TICKER_STRIP: Props;
11
11
  export declare const TICKER_BARE_GAP: Props;
12
12
  export declare const TICKER_SMALL: Props;
13
13
  export declare const TICKER_DISPLAY: Props;
14
+ export declare const CRUMB_PAD: StripPad;
14
15
  export declare const SPEC_PAD: StripPad;
15
16
  export declare const SPEC_STRIP: Props;
16
17
  export declare const SPEC_TEXT: Props;
@@ -1 +1 @@
1
- import{SECTION_ACCENT_DEFAULT as o}from"../content/section-surface.js";import{LABEL_FACE as t}from"../document/seed-parts.js";const p={direction:"row",share:"content",align:"center"},r={top:14,bottom:14,topPhone:12,bottomPhone:12},a={wrap:"nowrap",loop:"scroll",sectionAccent:o,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},c={gap:120,gapPhone:64},i={...t,sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,lineHeight:1.5},s={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},P={top:16,bottom:16,topPhone:12,bottomPhone:12},E={justify:"between",wrap:"wrap",gap:32,separator:"none"},T={...t,letterSpacing:.1,lineHeight:1.5};export{P as SPEC_PAD,E as SPEC_STRIP,T as SPEC_TEXT,p as STRIP_BOX,c as TICKER_BARE_GAP,s as TICKER_DISPLAY,r as TICKER_PAD,i as TICKER_SMALL,a as TICKER_STRIP};
1
+ import{SECTION_ACCENT_DEFAULT as t}from"../content/section-surface.js";import{LABEL_FACE as o}from"../document/seed-parts.js";const p={direction:"row",share:"content",align:"center"},r={top:14,bottom:14,topPhone:12,bottomPhone:12},c={wrap:"nowrap",loop:"scroll",sectionAccent:t,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},a={gap:120,gapPhone:64},s={...o,sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,lineHeight:1.5},P={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},i={top:24,bottom:24,topPhone:16,bottomPhone:16},E={top:16,bottom:16,topPhone:12,bottomPhone:12},h={justify:"between",wrap:"wrap",gap:32,separator:"none"},T={...o,letterSpacing:.1,lineHeight:1.5};export{i as CRUMB_PAD,E as SPEC_PAD,h as SPEC_STRIP,T as SPEC_TEXT,p as STRIP_BOX,a as TICKER_BARE_GAP,P as TICKER_DISPLAY,r as TICKER_PAD,s as TICKER_SMALL,c as TICKER_STRIP};
@@ -1 +1 @@
1
- import{parseOption as t}from"../parse-option.js";const l="small",n="dot",s=[{label:"Small",value:"small"},{label:"Display",value:"display"}],o=[{label:"Dot ●",value:"dot"},{label:"Cross ✕",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle ▼",value:"triangle"},{label:"None",value:"none"}],x={dot:"●",cross:"✕",slash:"/",triangle:"▼",none:""},r={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},i={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function c(e){return t(s,l,e)}function m(e){return t(o,n,e)}function u(e){return r[e]}function d(e,a){return i[e][a]}export{n as DEFAULT_TICKER_SEPARATOR,l as DEFAULT_TICKER_SIZE,x as SEPARATOR_GLYPH,o as TICKER_SEPARATOR_OPTIONS,s as TICKER_SIZE_OPTIONS,m as parseTickerSeparator,c as parseTickerSize,d as separatorScaleClass,u as tickerTypeClass};
1
+ import{parseOption as t}from"efficient-shell/format";const l="small",n="dot",s=[{label:"Small",value:"small"},{label:"Display",value:"display"}],o=[{label:"Dot ●",value:"dot"},{label:"Cross ✕",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle ▼",value:"triangle"},{label:"None",value:"none"}],x={dot:"●",cross:"✕",slash:"/",triangle:"▼",none:""},r={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},i={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function c(e){return t(s,l,e)}function m(e){return t(o,n,e)}function u(e){return r[e]}function d(e,a){return i[e][a]}export{n as DEFAULT_TICKER_SEPARATOR,l as DEFAULT_TICKER_SIZE,x as SEPARATOR_GLYPH,o as TICKER_SEPARATOR_OPTIONS,s as TICKER_SIZE_OPTIONS,m as parseTickerSeparator,c as parseTickerSize,d as separatorScaleClass,u as tickerTypeClass};
@@ -1,3 +1,9 @@
1
1
  export declare function faceClassOf(style: {
2
2
  id: string;
3
3
  }): string;
4
+ export declare const FACE_SIZE: Readonly<Record<string, {
5
+ step: string;
6
+ fallbackPx: number;
7
+ weight?: string;
8
+ }>>;
9
+ export declare function faceClassBaseCss(scope: string, markup: string): string;
@@ -1 +1,2 @@
1
- function e(n){switch(n.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${n.id}`}}export{e as faceClassOf};
1
+ function g(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}const t="var(--sf-heading-weight, 500)",l={"heading-1":{step:"headingLarge",fallbackPx:76,weight:t},"heading-2":{step:"headingMedium",fallbackPx:44,weight:`var(--sf-heading-2-weight, ${t})`},"heading-3":{step:"headingSmall",fallbackPx:30,weight:`var(--sf-heading-3-weight, ${t})`},"body-1":{step:"body",fallbackPx:16},"body-5":{step:"label",fallbackPx:12}};function b(e,d){const s=new Set;for(const a of d.matchAll(/\bclass="([^"]*)"/g))for(const n of a[1].split(/\s+/))n&&s.add(n);const i=[];for(const[a,{step:n,fallbackPx:r,weight:o}]of Object.entries(l)){const f=g({id:a});if(!s.has(f))continue;const c=`var(--size-${n}, ${r}px)`,h=o?[`font-size: min(${c}, var(--sf-heading-max, 9999px))`,`font-weight: ${o}`]:[`font-size: ${c}`];i.push(`:where(${e} .${f}) { ${h.join("; ")} }`)}return i.join(`
2
+ `)}export{l as FACE_SIZE,b as faceClassBaseCss,g as faceClassOf};
@@ -1,4 +1,5 @@
1
1
  import { contrastRatio } from "efficient-shell/format";
2
+ import { CORNER_RADIUS_MAX } from "efficient-easel/screen/lib/content/style-keys";
2
3
  export declare const THEME_STORAGE_KEY = "storefront-theme";
3
4
  export declare const THEME_MODE_KEY = "sf:theme-mode";
4
5
  export declare const THEME_SWITCH_KEY = "sf:theme-switch";
@@ -103,7 +104,7 @@ export declare const DEFAULT_CORNER_STYLE: CornerStyle;
103
104
  export declare function normalizeCornerStyle(v?: string | null): CornerStyle;
104
105
  export declare function cornerStyleTokens(v?: string | null): Record<string, string>;
105
106
  export declare const CORNER_RADIUS_MIN = 0;
106
- export declare const CORNER_RADIUS_MAX = 40;
107
+ export { CORNER_RADIUS_MAX };
107
108
  export declare const CORNER_RADIUS_GRID: {
108
109
  readonly min: 0;
109
110
  readonly max: 40;
@@ -1,4 +1,4 @@
1
- import{contrastRatio as v,hexToRgb as d,parseHexColor as s,readableInk as L,relativeLuminance as g}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as ee,pictureShadowColor as te}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as ne}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as re,siteLengthHeld as oe}from"./content/css-length.js";import{parseOption as E}from"./parse-option.js";const ce="storefront-theme",qe="sf:theme-mode",Je="sf:theme-switch",Qe="hide",ve=["light","dark","auto"],et="light",tt=!1,N=7,k=18;function ie(e){return e>=N&&e<k}function nt(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?ie(o)?"light":"dark":E(["light","dark"],"dark",t)}function rt(e){const{mode:t,switchShown:n}=e;return`
1
+ import{contrastRatio as v,hexToRgb as d,parseHexColor as s,readableInk as N,relativeLuminance as g,parseOption as E}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as ee,pictureShadowColor as te}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as ne}from"efficient-easel/screen/lib/content/length-units";import{CORNER_RADIUS_MAX as S}from"efficient-easel/screen/lib/content/style-keys";import{cssLengthOf as re,siteLengthHeld as oe}from"./content/css-length.js";const ce="storefront-theme",qe="sf:theme-mode",Je="sf:theme-switch",Qe="hide",ve=["light","dark","auto"],et="light",tt=!1,k=7,P=18;function ie(e){return e>=k&&e<P}function nt(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?ie(o)?"light":"dark":E(["light","dark"],"dark",t)}function rt(e){const{mode:t,switchShown:n}=e;return`
2
2
  try {
3
3
  var mode = ${JSON.stringify(t)};
4
4
  var shown = ${n?"true":"false"};
@@ -8,11 +8,11 @@ import{contrastRatio as v,hexToRgb as d,parseHexColor as s,readableInk as L,rela
8
8
  theme = override;
9
9
  } else if (mode === 'auto') {
10
10
  var h = new Date().getHours();
11
- theme = (h >= ${N} && h < ${k}) ? 'light' : 'dark';
11
+ theme = (h >= ${k} && h < ${P}) ? 'light' : 'dark';
12
12
  } else {
13
13
  theme = mode === 'light' ? 'light' : 'dark';
14
14
  }
15
15
  if (theme === 'light') document.documentElement.setAttribute('data-theme', 'light');
16
16
  else document.documentElement.removeAttribute('data-theme');
17
17
  } catch (e) {}
18
- `}const l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},se=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ae={selected:0,themes:se};function P(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ae}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function S(e,t,n){const r=d(e),o=d(t);if(r===null||o===null)return e;const c=(i,a)=>Math.max(0,Math.min(255,Math.round(i+(a-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const ue={light:"#ffffff",dark:"#0a0a0a"},ot=["light","dark"];function ct(e,t){const n=ue[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:S(e,r,.1),line:S(e,r,.22),muted:S(n,e,.35),brandInk:t}}function f(e){const t=P(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function it(e){return{fill:u(e).background,accent:e.accent}}const le=.4,fe="#f5f1e8",F="#0a0a0a";function he(e){const t=f(e).text,n=g(t);return n===null||n>=le?t:null}const de=4.5,ge=3,st={good:"Good","large-only":"Large text only",hard:"Hard to read"};function at(e){return e>=de?"good":e>=ge?"large-only":"hard"}const me=["#000000","#ffffff"];function m(e){return L(e,me)}function ut(e,t){const n=t!==void 0&&g(t)!==null?t:fe;return L(e,[F,n])===n&&n!==F}const pe=[.25,.4,.55];function lt(e){const t=d(e);return t===null?[]:pe.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function ft(e){const n={"--theme-fg":f(e).text},r=he(e);return r!==null&&(n["--overlay-fg"]=r),n}const xe=82;function A(e){return`color-mix(in srgb, ${e} ${xe}%, #000)`}function ht(e){const t=f(e);return{"--theme-accent":t.accent,"--theme-accent-2":A(t.accent),"--theme-accent-ink":m(t.accent)}}function T(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function dt(e){const t=f(e),n=T(t),r=$(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=A(n)),o["--theme-btn-ink"]=r??m(n),o}function $(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function _e(e,t){return $(e)??m(T(e)??t)}function gt(e){const t=f(e);return{fill:T(t)??t.accent.toLowerCase(),ink:_e(t,t.accent)}}function mt(e){const t={};return P(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=A(o.accent),t[`--theme-preset-${r}-accent-ink`]=m(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const b=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},I=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function U([e,t,n]){const[r,o,c]=[b(e),b(t),b(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),h=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*h,1.9779984951*i-2.428592205*a+.4505937099*h,.0259040371*i+.7827717662*a-.808675766*h]}function Ee([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[I(4.0767416621*r-3.3077115913*o+.2309699292*c),I(-1.2684380046*r+2.6097574011*o-.3413193965*c),I(-.0041960863*r-.7034186147*o+1.707614701*c)]}const R=e=>{const t=d(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},G=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],Y=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,z=e=>G(R(e.surface),R(e.line),.6);function pt(e){return Y(z(u(e)))}function B(e){const t=u(e);return Y(Ee(G(U(z(t)),U(R(t.text)),.92)))}function xt(e){return{...e,background:B(e)}}function X(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,h)=>{if(h===t)return!1;const _=u(a);return s(_.background)!==c?!1:!r||s(_.text??"")===s(i.text??"")&&s(_.accent??"")===s(i.accent??"")})}function _t(e,t){return X(e,t,B,!1)}function Et(e,t){return X(e,t,n=>s(n.surface??""),!0)}const Se=1;function Ae(e,t){const n=(e??[]).flatMap((r,o)=>{const c=g(r.background??""),i=g(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??Se}function St(e){return Ae(e?.themes,e?.selected)}const At=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Tt(e){const t=u(f(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const Te=["heading","body","label"],bt={heading:"Headings",body:"Body",label:"Labels"};function It(e){if(!e)return null;for(const t of Te)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const K=["headingLarge","headingMedium","headingSmall","accent","body","label"],Rt={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Ct={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},be=8,Ie=200;function Re(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=be&&t<=Ie?t:null}function Ce(e){const t={};for(const n of K)t[n]=Re(e?.[n]);return t}function Dt(e){const t=Ce(e),n={};for(const r of K){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const De=["square","small","large"],Me="small";function Oe(e){return De.includes(e??"")?e:Me}function Mt(e){return M(we[Oe(e)])}const p=0,W=40,ye={min:p,max:W,step:1},we={square:0,small:null,large:16},C={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function D(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;const t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(W,Math.max(p,Math.round(t))):null}function M(e,t){if(ne(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};const r=Math.max(0,e);return Object.fromEntries(Object.entries(C).map(([o,c])=>{const i=Math.round(r*c*1e4)/1e4;return[o,i===0?"0":re(i,t)]}))}const n=D(e);return n===null?{}:Object.fromEntries(Object.entries(C).map(([r,o])=>{const c=n*o/16;return[r,c===0?"0":`${c}rem`]}))}function Ot(e){return(D(e)??p)*C["--sf-button-radius"]}function yt(e,t){const n=oe(e,t,"radius",ye);return n!==null?M(n,t):M(D(e)??p)}const He=["none","soft","lifted"],Le="soft",j="none",Ne=["tight","normal","roomy"],ke="normal",Pe="normal",Fe=["none","lift","highlight"],$e="lift",Ue="highlight";import{DEFAULT_SHADOW_COLOR as Xt}from"efficient-easel/screen/lib/document/shadow-values";function V(e){return He.includes(e??"")?e:Le}function Ge(e){return Ne.includes(e??"")?e:ke}function Z(e){return Fe.includes(e??"")?e:$e}function wt(e){const t=V(e);return t===j?void 0:t}function Ht(e){const t=Ge(e);return t===Pe?void 0:t}function Lt(e){const t=Z(e);return t===Ue?void 0:t}function Nt(e,t,n){const r=te(t);return r===ee?{}:V(e)!==j||Z(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ye=["normal","tight","compressed"],q="normal";function J(e){return Ye.includes(e??"")?e:q}function kt(e){const t=J(e);return t===q?void 0:t}function Pt(e){switch(J(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Q=["authored","sentence"],Ft={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},O=100,y=900,ze=24,Be=200;function x(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function w(e){const t=x(e?.weight,O,y),n=E(Q,"authored",e?.case),r=c=>c==null?t:x(c,O,y),o=c=>E(Q,n,c);return{case:n,weight:t,weightStrong:x(e?.weightStrong,O,y),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:x(e?.maxPx,ze,Be),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function $t(e){const t=w(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function Ut(e){return w({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function Gt(e){const t=w(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}const H="siteTheme";function Xe(e){const t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(r=>!!r&&typeof r=="object"))return{};const n=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[H]:{selected:n,themes:t.themes}}}function Yt(e){return Xe(e?.[H])[H]}export{pe as ACCENT_DARKEN_STEPS,ot as BRAND_INKS,Ne as CARD_GAPS,He as CARD_SHADOWS,ye as CORNER_RADIUS_GRID,W as CORNER_RADIUS_MAX,p as CORNER_RADIUS_MIN,De as CORNER_STYLES,we as CORNER_STYLE_TO_PX,ke as DEFAULT_CARD_GAP,Le as DEFAULT_CARD_SHADOW,Me as DEFAULT_CORNER_STYLE,q as DEFAULT_HEADING_COMPRESSION,Ft as DEFAULT_HEADING_TYPOGRAPHY,$e as DEFAULT_HOVER_EFFECT,Xt as DEFAULT_SHADOW_COLOR,Ct as DEFAULT_SIZES,l as DEFAULT_SURFACES,tt as DEFAULT_SWITCH_SHOWN,se as DEFAULT_THEMES,et as DEFAULT_THEME_MODE,ae as DEFAULT_THEME_VALUE,st as GRADE_LABEL,Q as HEADING_CASES,Ye as HEADING_COMPRESSIONS,Be as HEADING_MAX_PX_MAX,ze as HEADING_MAX_PX_MIN,y as HEADING_WEIGHT_MAX,O as HEADING_WEIGHT_MIN,Fe as HOVER_EFFECTS,Pe as IDENTITY_CARD_GAP,j as IDENTITY_CARD_SHADOW,Ue as IDENTITY_HOVER_EFFECT,F as OVERLAY_INK_DARK,fe as OVERLAY_INK_LIGHT,de as READABILITY_AA,ge as READABILITY_AA_LARGE,Rt as SCALE_OF_STEP,H as SITE_THEME_KEY,K as SIZE_STEPS,Ie as TEXT_SIZE_MAX,be as TEXT_SIZE_MIN,k as THEME_DAY_END_HOUR,N as THEME_DAY_START_HOUR,ve as THEME_MODES,qe as THEME_MODE_KEY,ce as THEME_STORAGE_KEY,At as THEME_SURFACE_KEYS,Qe as THEME_SWITCH_HIDE,Je as THEME_SWITCH_KEY,Te as TYPE_GROUPS,bt as TYPE_GROUP_LABELS,m as accentInk,xt as bandPresetFor,_t as bandPresetIndex,ct as brandTheme,rt as buildThemeBootScript,Ht as cardGapAttr,wt as cardShadowAttr,Pt as compressionMetrics,v as contrastRatio,M as cornerRadiusTokens,Mt as cornerStyleTokens,St as darkBandIndex,Ae as darkPresetIndex,lt as darkerAccents,ut as fillIsDark,at as gradeContrast,kt as headingCompressionAttr,Ut as headingTypographyFromRow,$t as headingTypographyStyle,Gt as headingTypographyToRow,Lt as hoverEffectAttr,ie as isDayHour,Ge as normalizeCardGap,V as normalizeCardShadow,D as normalizeCornerRadius,Oe as normalizeCornerStyle,J as normalizeHeadingCompression,w as normalizeHeadingTypography,Z as normalizeHoverEffect,Re as normalizeSize,Ce as normalizeSizes,P as normalizeTheme,u as normalizeThemeColors,nt as resolveTheme,_e as resolvedButtonInk,B as sectionBandTone,f as selectedThemeColors,Nt as shadowColorTokens,gt as siteButtonPaint,Ot as siteButtonRadiusPx,yt as siteCornerRadiusTokens,Xe as siteThemeMetadata,Yt as siteThemeOf,Et as surfacePresetIndex,pt as surfaceTwoTone,ht as themeAccentStyle,T as themeButtonColour,$ as themeButtonInk,dt as themeButtonStyle,ft as themeColorStyle,he as themeLightInk,mt as themePresetAccentVars,Tt as themeSurfaceStyle,it as themeSwatchColors,It as typeScaleGroupOfClassName,Dt as typeSizesStyle};
18
+ `}const l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},se=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ae={selected:0,themes:se};function F(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ae}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function A(e,t,n){const r=d(e),o=d(t);if(r===null||o===null)return e;const c=(i,a)=>Math.max(0,Math.min(255,Math.round(i+(a-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const ue={light:"#ffffff",dark:"#0a0a0a"},ot=["light","dark"];function ct(e,t){const n=ue[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:A(e,r,.1),line:A(e,r,.22),muted:A(n,e,.35),brandInk:t}}function f(e){const t=F(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function it(e){return{fill:u(e).background,accent:e.accent}}const le=.4,fe="#f5f1e8",$="#0a0a0a";function he(e){const t=f(e).text,n=g(t);return n===null||n>=le?t:null}const de=4.5,ge=3,st={good:"Good","large-only":"Large text only",hard:"Hard to read"};function at(e){return e>=de?"good":e>=ge?"large-only":"hard"}const me=["#000000","#ffffff"];function m(e){return N(e,me)}function ut(e,t){const n=t!==void 0&&g(t)!==null?t:fe;return N(e,[$,n])===n&&n!==$}const pe=[.25,.4,.55];function lt(e){const t=d(e);return t===null?[]:pe.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function ft(e){const n={"--theme-fg":f(e).text},r=he(e);return r!==null&&(n["--overlay-fg"]=r),n}const xe=82;function T(e){return`color-mix(in srgb, ${e} ${xe}%, #000)`}function ht(e){const t=f(e);return{"--theme-accent":t.accent,"--theme-accent-2":T(t.accent),"--theme-accent-ink":m(t.accent)}}function b(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function dt(e){const t=f(e),n=b(t),r=U(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=T(n)),o["--theme-btn-ink"]=r??m(n),o}function U(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function _e(e,t){return U(e)??m(b(e)??t)}function gt(e){const t=f(e);return{fill:b(t)??t.accent.toLowerCase(),ink:_e(t,t.accent)}}function mt(e){const t={};return F(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=T(o.accent),t[`--theme-preset-${r}-accent-ink`]=m(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const I=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},R=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function G([e,t,n]){const[r,o,c]=[I(e),I(t),I(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),h=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*h,1.9779984951*i-2.428592205*a+.4505937099*h,.0259040371*i+.7827717662*a-.808675766*h]}function Ee([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[R(4.0767416621*r-3.3077115913*o+.2309699292*c),R(-1.2684380046*r+2.6097574011*o-.3413193965*c),R(-.0041960863*r-.7034186147*o+1.707614701*c)]}const C=e=>{const t=d(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},Y=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],z=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,B=e=>Y(C(e.surface),C(e.line),.6);function pt(e){return z(B(u(e)))}function X(e){const t=u(e);return z(Ee(Y(G(B(t)),G(C(t.text)),.92)))}function xt(e){return{...e,background:X(e)}}function K(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,h)=>{if(h===t)return!1;const _=u(a);return s(_.background)!==c?!1:!r||s(_.text??"")===s(i.text??"")&&s(_.accent??"")===s(i.accent??"")})}function _t(e,t){return K(e,t,X,!1)}function Et(e,t){return K(e,t,n=>s(n.surface??""),!0)}const Se=1;function Ae(e,t){const n=(e??[]).flatMap((r,o)=>{const c=g(r.background??""),i=g(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??Se}function St(e){return Ae(e?.themes,e?.selected)}const At=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Tt(e){const t=u(f(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const Te=["heading","body","label"],bt={heading:"Headings",body:"Body",label:"Labels"};function It(e){if(!e)return null;for(const t of Te)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const W=["headingLarge","headingMedium","headingSmall","accent","body","label"],Rt={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Ct={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},be=8,Ie=200;function Re(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=be&&t<=Ie?t:null}function Ce(e){const t={};for(const n of W)t[n]=Re(e?.[n]);return t}function Dt(e){const t=Ce(e),n={};for(const r of W){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const De=["square","small","large"],Me="small";function Oe(e){return De.includes(e??"")?e:Me}function Mt(e){return O(we[Oe(e)])}const p=0,ye={min:p,max:S,step:1},we={square:0,small:null,large:16},D={"--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 M(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(S,Math.max(p,Math.round(t))):null}function O(e,t){if(ne(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};const r=Math.max(0,e);return Object.fromEntries(Object.entries(D).map(([o,c])=>{const i=Math.round(r*c*1e4)/1e4;return[o,i===0?"0":re(i,t)]}))}const n=M(e);return n===null?{}:Object.fromEntries(Object.entries(D).map(([r,o])=>{const c=n*o/16;return[r,c===0?"0":`${c}rem`]}))}function Ot(e){return(M(e)??p)*D["--sf-button-radius"]}function yt(e,t){const n=oe(e,t,"radius",ye);return n!==null?O(n,t):O(M(e)??p)}const He=["none","soft","lifted"],Le="soft",j="none",Ne=["tight","normal","roomy"],ke="normal",Pe="normal",Fe=["none","lift","highlight"],$e="lift",Ue="highlight";import{DEFAULT_SHADOW_COLOR as Xt}from"efficient-easel/screen/lib/document/shadow-values";function V(e){return He.includes(e??"")?e:Le}function Ge(e){return Ne.includes(e??"")?e:ke}function Z(e){return Fe.includes(e??"")?e:$e}function wt(e){const t=V(e);return t===j?void 0:t}function Ht(e){const t=Ge(e);return t===Pe?void 0:t}function Lt(e){const t=Z(e);return t===Ue?void 0:t}function Nt(e,t,n){const r=te(t);return r===ee?{}:V(e)!==j||Z(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ye=["normal","tight","compressed"],q="normal";function J(e){return Ye.includes(e??"")?e:q}function kt(e){const t=J(e);return t===q?void 0:t}function Pt(e){switch(J(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Q=["authored","sentence"],Ft={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},y=100,w=900,ze=24,Be=200;function x(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function H(e){const t=x(e?.weight,y,w),n=E(Q,"authored",e?.case),r=c=>c==null?t:x(c,y,w),o=c=>E(Q,n,c);return{case:n,weight:t,weightStrong:x(e?.weightStrong,y,w),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:x(e?.maxPx,ze,Be),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function $t(e){const t=H(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function Ut(e){return H({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function Gt(e){const t=H(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}const L="siteTheme";function Xe(e){const t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(r=>!!r&&typeof r=="object"))return{};const n=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[L]:{selected:n,themes:t.themes}}}function Yt(e){return Xe(e?.[L])[L]}export{pe as ACCENT_DARKEN_STEPS,ot as BRAND_INKS,Ne as CARD_GAPS,He as CARD_SHADOWS,ye as CORNER_RADIUS_GRID,S as CORNER_RADIUS_MAX,p as CORNER_RADIUS_MIN,De as CORNER_STYLES,we as CORNER_STYLE_TO_PX,ke as DEFAULT_CARD_GAP,Le as DEFAULT_CARD_SHADOW,Me as DEFAULT_CORNER_STYLE,q as DEFAULT_HEADING_COMPRESSION,Ft as DEFAULT_HEADING_TYPOGRAPHY,$e as DEFAULT_HOVER_EFFECT,Xt as DEFAULT_SHADOW_COLOR,Ct as DEFAULT_SIZES,l as DEFAULT_SURFACES,tt as DEFAULT_SWITCH_SHOWN,se as DEFAULT_THEMES,et as DEFAULT_THEME_MODE,ae as DEFAULT_THEME_VALUE,st as GRADE_LABEL,Q as HEADING_CASES,Ye as HEADING_COMPRESSIONS,Be as HEADING_MAX_PX_MAX,ze as HEADING_MAX_PX_MIN,w as HEADING_WEIGHT_MAX,y as HEADING_WEIGHT_MIN,Fe as HOVER_EFFECTS,Pe as IDENTITY_CARD_GAP,j as IDENTITY_CARD_SHADOW,Ue as IDENTITY_HOVER_EFFECT,$ as OVERLAY_INK_DARK,fe as OVERLAY_INK_LIGHT,de as READABILITY_AA,ge as READABILITY_AA_LARGE,Rt as SCALE_OF_STEP,L as SITE_THEME_KEY,W as SIZE_STEPS,Ie as TEXT_SIZE_MAX,be as TEXT_SIZE_MIN,P as THEME_DAY_END_HOUR,k as THEME_DAY_START_HOUR,ve as THEME_MODES,qe as THEME_MODE_KEY,ce as THEME_STORAGE_KEY,At as THEME_SURFACE_KEYS,Qe as THEME_SWITCH_HIDE,Je as THEME_SWITCH_KEY,Te as TYPE_GROUPS,bt as TYPE_GROUP_LABELS,m as accentInk,xt as bandPresetFor,_t as bandPresetIndex,ct as brandTheme,rt as buildThemeBootScript,Ht as cardGapAttr,wt as cardShadowAttr,Pt as compressionMetrics,v as contrastRatio,O as cornerRadiusTokens,Mt as cornerStyleTokens,St as darkBandIndex,Ae as darkPresetIndex,lt as darkerAccents,ut as fillIsDark,at as gradeContrast,kt as headingCompressionAttr,Ut as headingTypographyFromRow,$t as headingTypographyStyle,Gt as headingTypographyToRow,Lt as hoverEffectAttr,ie as isDayHour,Ge as normalizeCardGap,V as normalizeCardShadow,M as normalizeCornerRadius,Oe as normalizeCornerStyle,J as normalizeHeadingCompression,H as normalizeHeadingTypography,Z as normalizeHoverEffect,Re as normalizeSize,Ce as normalizeSizes,F as normalizeTheme,u as normalizeThemeColors,nt as resolveTheme,_e as resolvedButtonInk,X as sectionBandTone,f as selectedThemeColors,Nt as shadowColorTokens,gt as siteButtonPaint,Ot as siteButtonRadiusPx,yt as siteCornerRadiusTokens,Xe as siteThemeMetadata,Yt as siteThemeOf,Et as surfacePresetIndex,pt as surfaceTwoTone,ht as themeAccentStyle,b as themeButtonColour,U as themeButtonInk,dt as themeButtonStyle,ft as themeColorStyle,he as themeLightInk,mt as themePresetAccentVars,Tt as themeSurfaceStyle,it as themeSwatchColors,It as typeScaleGroupOfClassName,Dt as typeSizesStyle};
@@ -1 +1 @@
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),[a,f]=l([]),p=E(S,"tabs",m),[h,x]=l(0);i(()=>{const t=s.current;if(!t)return;const r=()=>{const g=c(t,"data-tab-label");f(g.map((v,T)=>v.dataset.tabLabel?.trim()||`Tab ${T+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(h,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(_,{children:[a.length>1&&o(B,{slides:a.map(t=>({name:t,process:""})),active:n,shape:p,tone:"surface",label:"Tabs",ref:t=>{t&&(t.onclick=r=>{const e=r.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:"tabs",children:u})})]})}export{L 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"efficient-shell/format";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),[a,f]=l([]),p=E(S,"tabs",m),[h,x]=l(0);i(()=>{const t=s.current;if(!t)return;const r=()=>{const g=c(t,"data-tab-label");f(g.map((v,T)=>v.dataset.tabLabel?.trim()||`Tab ${T+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(h,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(_,{children:[a.length>1&&o(B,{slides:a.map(t=>({name:t,process:""})),active:n,shape:p,tone:"surface",label:"Tabs",ref:t=>{t&&(t.onclick=r=>{const e=r.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:"tabs",children:u})})]})}export{L as default};
@@ -1,3 +1,5 @@
1
+ import { type RootPadAttrs } from "../lib/content/section-padding.js";
2
+ export declare const crumbPad: (props: Record<string, unknown>) => RootPadAttrs | null;
1
3
  export interface BreadcrumbItem {
2
4
  label: string;
3
5
  href?: string;
@@ -7,5 +9,6 @@ export interface BreadcrumbProps {
7
9
  current?: string;
8
10
  meta?: string;
9
11
  editing?: boolean;
12
+ pad?: RootPadAttrs | null;
10
13
  }
11
- export default function Breadcrumb({ items, current, meta, editing }: BreadcrumbProps): import("react").JSX.Element | null;
14
+ export default function Breadcrumb({ items, current, meta, editing, pad }: BreadcrumbProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as s,Fragment as f}from"react/jsx-runtime";import{Fragment as x}from"react";import{SiteLink as h}from"../lib/site-runtime.js";import{renderChrome as c,renderGold as b}from"./goldPhrases.js";import{say as u}from"../../format/lib/editor-words.js";function g({items:p,current:l,meta:a,editing:d=!1}){const i=(p??[]).filter(e=>e?.label?.trim()),m=l?.trim()?[...i,{label:l}]:i,t=m.length>0?m:d?[{label:u("Breadcrumb")}]:[];return t.length===0&&!a?null:r("nav",{className:"border-b border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-4",children:s("div",{className:"mx-auto flex max-w-[var(--sf-content-cap,none)] items-center gap-4",children:[t.map((e,n)=>{const o=n===t.length-1;return s(x,{children:[n>0&&r("span",{className:"opacity-40",children:"/"}),e.href&&!o?r(h,{newTab:"auto",href:e.href,className:"hover:text-fg",children:c(e.label)}):r("span",{className:o?"text-fg":void 0,children:c(e.label)})]},n)}),a&&s(f,{children:[r("span",{className:"opacity-40",children:"·"}),r("span",{children:b(a)})]})]})})}export{g as default};
1
+ import{jsx as t,jsxs as o,Fragment as h}from"react/jsx-runtime";import{Fragment as x}from"react";import{SiteLink as b}from"../lib/site-runtime.js";import{renderChrome as u,renderGold as g}from"./goldPhrases.js";import{say as v}from"../../format/lib/editor-words.js";import{PY_CLASS as N,SECTION_PAD_KEYS as _,framePadAttrs as y,padValuesOf as P,tierFramesOf as j}from"../lib/content/section-padding.js";import{CRUMB_PAD as m}from"../../format/lib/sections/strip-shape.js";const w={16:"max-view-tablet:py-4"},E=a=>y({values:P(a,_,!0),frame:j(m),drawsFrame:!0},!0).root;function B({items:a,current:i,meta:s,editing:d=!1,pad:e}){const c=(a??[]).filter(r=>r?.label?.trim()),f=i?.trim()?[...c,{label:i}]:c,n=f.length>0?f:d?[{label:v("Breadcrumb")}]:[];return n.length===0&&!s?null:t("nav",{className:["border-b border-line px-[var(--sf-site-gutter,40px)]",e?null:N.all[m.top],"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]",e?e.className:w[m.topPhone]].filter(Boolean).join(" "),style:e&&Object.keys(e.style).length?e.style:void 0,...e?.attrs,children:o("div",{className:"mx-auto flex max-w-[var(--sf-content-cap,none)] items-center gap-4",children:[n.map((r,l)=>{const p=l===n.length-1;return o(x,{children:[l>0&&t("span",{className:"opacity-40",children:"/"}),r.href&&!p?t(b,{newTab:"auto",href:r.href,className:"hover:text-fg",children:u(r.label)}):t("span",{className:p?"text-fg":void 0,children:u(r.label)})]},l)}),s&&o(h,{children:[t("span",{className:"opacity-40",children:"·"}),t("span",{children:g(s)})]})]})})}export{E as crumbPad,B as default};
@@ -1,9 +1,11 @@
1
1
  import { type ReactNode } from "react";
2
- export type PhoneMenuTool = "search" | "region" | "account" | "theme";
2
+ export type PhoneMenuTool = "search" | "region" | "account" | "cart" | "theme";
3
+ export type PhonePlace = "header" | "menu";
3
4
  export interface PhoneMenuTools {
4
5
  search: boolean;
5
6
  region: boolean;
6
7
  account: boolean;
8
+ cart: boolean;
7
9
  theme: boolean;
8
10
  }
9
11
  export declare function PhoneMenuToolsProvider({ children }: {
@@ -1 +1 @@
1
- "use client";import{jsx as f}from"react/jsx-runtime";import{createContext as l,useContext as s,useEffect as d,useState as a,useSyncExternalStore as h}from"react";const u=[];function x(){let e=u;const n=new Set,c=r=>{e=r;for(const t of n)t()};return{offer:r=>(c([...e,r]),()=>{const t=e.indexOf(r);t>=0&&c([...e.slice(0,t),...e.slice(t+1)])}),subscribe:r=>(n.add(r),()=>n.delete(r)),offered:()=>e}}const o=l(null);function P({children:e}){const[n]=a(x);return f(o.Provider,{value:n,children:e})}const S=()=>s(o)!==null;function b(e){const n=s(o);d(()=>{if(!(!n||!e))return n.offer(e)},[n,e])}const g=()=>()=>{},i=()=>u;function y(){const e=s(o),n=h(e?.subscribe??g,e?.offered??i,i);return e?{search:n.includes("search"),region:n.includes("region"),account:n.includes("account"),theme:n.includes("theme")}:null}export{P as PhoneMenuToolsProvider,S as useInSiteHeader,b as useOfferToPhoneMenu,y as usePhoneMenuTools};
1
+ "use client";import{jsx as f}from"react/jsx-runtime";import{createContext as l,useContext as s,useEffect as d,useState as a,useSyncExternalStore as h}from"react";const u=[];function x(){let e=u;const n=new Set,c=r=>{e=r;for(const t of n)t()};return{offer:r=>(c([...e,r]),()=>{const t=e.indexOf(r);t>=0&&c([...e.slice(0,t),...e.slice(t+1)])}),subscribe:r=>(n.add(r),()=>n.delete(r)),offered:()=>e}}const o=l(null);function P({children:e}){const[n]=a(x);return f(o.Provider,{value:n,children:e})}const S=()=>s(o)!==null;function b(e){const n=s(o);d(()=>{if(!(!n||!e))return n.offer(e)},[n,e])}const g=()=>()=>{},i=()=>u;function y(){const e=s(o),n=h(e?.subscribe??g,e?.offered??i,i);return e?{search:n.includes("search"),region:n.includes("region"),account:n.includes("account"),cart:n.includes("cart"),theme:n.includes("theme")}:null}export{P as PhoneMenuToolsProvider,S as useInSiteHeader,b as useOfferToPhoneMenu,y as usePhoneMenuTools};
@@ -2,12 +2,13 @@ import { type ReactNode } from "react";
2
2
  import { type PartStyles, type PublishedPartRule } from "../lib/document/part-styles.js";
3
3
  import { type PartMotion } from "../lib/animation/part-motion.js";
4
4
  import type { PartNeedle } from "../lib/document/text-parts.js";
5
- export declare function PublishedPartStyles({ needles, styles, motions, type, atEdge, children, }: {
5
+ export declare function PublishedPartStyles({ needles, styles, motions, type, atEdge, sizeCaps, children, }: {
6
6
  needles: PartNeedle[];
7
7
  styles: PartStyles;
8
8
  motions?: Readonly<Record<string, PartMotion>>;
9
9
  type?: string;
10
10
  atEdge?: boolean;
11
+ sizeCaps?: Readonly<Record<string, true>>;
11
12
  children: ReactNode;
12
13
  }): import("react").JSX.Element;
13
14
  export declare function usePartEntrance(rule: PublishedPartRule | null): import("react").RefObject<HTMLSpanElement | null>;
@@ -1 +1 @@
1
- "use client";import{Fragment as E,jsx as f,jsxs as O}from"react/jsx-runtime";import{createContext as P,useContext as m,useEffect as A,useId as k,useMemo as F,useRef as M}from"react";import{armEntrance as j}from"efficient-shell/format";import{blockDrawsTextStyle as D,partRuleForKind as y,partRuleForText as K,partStyleCss as L,publishedPartStyles as N}from"../lib/document/part-styles.js";import{useViewWidth as I}from"./SectionAnimation.js";import{useDrawsAtEdge as $}from"./InBoxContext.js";import{styleKeyForPart as B}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as H,PART_LIFT_ATTR as T,drawPartEntrance as J,drawPartScroll as W,ensurePartLiftSheet as Y,firstOnPage as b,partBoxOf as V,partMotionDrawn as q,partMoves as z}from"../lib/animation/part-motion.js";import{styleElementText as G}from"../../format/lib/document/style-text.js";const S=P(null),R=P(null),_=P(null);function ue({needles:e,styles:t,motions:r=H,type:o,atEdge:n=!1,children:i}){const u=k(),d=$(n?"edge":"by-box"),x=JSON.stringify([u,e,t,r,o]),c=F(()=>{const p=Object.keys(r).filter(l=>z(r[l]));return N(e,t,u,l=>B(o,l),l=>D(o,l),l=>p.includes(l)?q(r[l]):null,p)},[x]);if(!c)return f(E,{children:i});const s=L(c,{inBox:d});return O(E,{children:[s&&f("style",{href:`${Q}${u}-${U(s)}`,precedence:w,dangerouslySetInnerHTML:{__html:G(s)}}),f(S.Provider,{value:c,children:i})]})}const g=new WeakMap;function v(e,t){const r=b(t.filter(n=>n.arm)),o=t.some(n=>n.entering)?void 0:b(t.filter(n=>n.scroll));for(const n of t)n!==r&&n.undo&&(n.undo(),n.undo=void 0),n!==o&&n.undoScroll&&(n.undoScroll(),n.undoScroll=void 0);r?.arm&&!r.undo&&(r.undo=r.arm()),o?.scroll&&!o.undoScroll&&(o.undoScroll=o.scroll()),t.some(n=>n.lift)?(Y(e.ownerDocument),e.setAttribute(T,"")):e.removeAttribute(T)}function ce(e){const t=M(null),r=e?.motion?.entrance??null,o=e?.motion?.scroll??null,n=e?.motion?.hover==="lift",i=I(t,r!==null||o!==null),u=r?r[i]:null,d=o&&o[i].effect!=="none"?o[i]:null,x=JSON.stringify([u,d]);return A(()=>{const c=t.current,s=V(c?.parentElement??null);if(!r&&!o&&!n||!c||!s)return;const p=u?()=>{const h=J(s,u),C=j(s);return()=>{C?.(),h()}}:null,l=g.get(s)??[];g.set(s,l);const a={element:c,arm:p,entering:u!==null&&u.kind!=="none",scroll:d?()=>W(s,d):null,lift:n};return l.push(a),v(s,l),()=>{const h=l.indexOf(a);h<0||(l.splice(h,1),a.undo?.(),a.undo=void 0,a.undoScroll?.(),a.undoScroll=void 0,v(s,l),l.length||g.delete(s))}},[x,n]),t}const w="sf-part-styles",Q=`${w}-`;function U(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function ie(e){const t=m(S),r=m(R),o=K(t,e);return o&&o.stamp!==r?o:null}function ae(e){return y(m(S),e)}function de({stamp:e,children:t}){return f(R.Provider,{value:e,children:t})}function fe({children:e}){const t=m(S);return f(_.Provider,{value:t,children:e})}function me(e){return y(m(_),e)}export{de as ClaimedStamp,w as PART_STYLES_PRECEDENCE,ue as PublishedPartStyles,fe as SharedPartKinds,ce as usePartEntrance,ae as usePublishedPartKindRule,ie as usePublishedPartRule,me as usePublishedSharedKindRule};
1
+ "use client";import{Fragment as E,jsx as m,jsxs as O}from"react/jsx-runtime";import{createContext as P,useContext as p,useEffect as k,useId as A,useMemo as F,useRef as M}from"react";import{armEntrance as j}from"efficient-shell/format";import{blockCapsPartSize as D,blockDrawsTextStyle as K,partRuleForKind as y,partRuleForText as L,partStyleCss as N,publishedPartStyles as I}from"../lib/document/part-styles.js";import{useViewWidth as $}from"./SectionAnimation.js";import{useDrawsAtEdge as B}from"./InBoxContext.js";import{styleKeyForPart as H}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as J,PART_LIFT_ATTR as b,drawPartEntrance as W,drawPartScroll as Y,ensurePartLiftSheet as V,firstOnPage as T,partBoxOf as q,partMotionDrawn as z,partMoves as G}from"../lib/animation/part-motion.js";import{styleElementText as Q}from"../../format/lib/document/style-text.js";const h=P(null),R=P(null),_=P(null);function ce({needles:e,styles:t,motions:r=J,type:o,atEdge:n=!1,sizeCaps:a,children:c}){const i=A(),x=B(n?"edge":"by-box"),d=JSON.stringify([i,e,t,r,o,a]),s=F(()=>{const u=Object.keys(r).filter(l=>G(r[l]));return I(e,t,i,l=>H(o,l),l=>K(o,l),l=>u.includes(l)?z(r[l]):null,u,l=>D(a,l))},[d]);if(!s)return m(E,{children:c});const f=N(s,{inBox:x});return O(E,{children:[f&&m("style",{href:`${U}${i}-${X(f)}`,precedence:w,dangerouslySetInnerHTML:{__html:Q(f)}}),m(h.Provider,{value:s,children:c})]})}const g=new WeakMap;function v(e,t){const r=T(t.filter(n=>n.arm)),o=t.some(n=>n.entering)?void 0:T(t.filter(n=>n.scroll));for(const n of t)n!==r&&n.undo&&(n.undo(),n.undo=void 0),n!==o&&n.undoScroll&&(n.undoScroll(),n.undoScroll=void 0);r?.arm&&!r.undo&&(r.undo=r.arm()),o?.scroll&&!o.undoScroll&&(o.undoScroll=o.scroll()),t.some(n=>n.lift)?(V(e.ownerDocument),e.setAttribute(b,"")):e.removeAttribute(b)}function ie(e){const t=M(null),r=e?.motion?.entrance??null,o=e?.motion?.scroll??null,n=e?.motion?.hover==="lift",a=$(t,r!==null||o!==null),c=r?r[a]:null,i=o&&o[a].effect!=="none"?o[a]:null,x=JSON.stringify([c,i]);return k(()=>{const d=t.current,s=q(d?.parentElement??null);if(!r&&!o&&!n||!d||!s)return;const f=c?()=>{const S=W(s,c),C=j(s);return()=>{C?.(),S()}}:null,u=g.get(s)??[];g.set(s,u);const l={element:d,arm:f,entering:c!==null&&c.kind!=="none",scroll:i?()=>Y(s,i):null,lift:n};return u.push(l),v(s,u),()=>{const S=u.indexOf(l);S<0||(u.splice(S,1),l.undo?.(),l.undo=void 0,l.undoScroll?.(),l.undoScroll=void 0,v(s,u),u.length||g.delete(s))}},[x,n]),t}const w="sf-part-styles",U=`${w}-`;function X(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function ae(e){const t=p(h),r=p(R),o=L(t,e);return o&&o.stamp!==r?o:null}function de(e){return y(p(h),e)}function fe({stamp:e,children:t}){return m(R.Provider,{value:e,children:t})}function me({children:e}){const t=p(h);return m(_.Provider,{value:t,children:e})}function pe(e){return y(p(_),e)}export{fe as ClaimedStamp,w as PART_STYLES_PRECEDENCE,ce as PublishedPartStyles,me as SharedPartKinds,ie as usePartEntrance,de as usePublishedPartKindRule,ae as usePublishedPartRule,pe as usePublishedSharedKindRule};
@@ -1,8 +1,11 @@
1
1
  import { type StripCell } from "../../format/lib/document/blocks/general/SpecStrip/meta.js";
2
+ import { type RootPadAttrs } from "../lib/content/section-padding.js";
2
3
  export type { StripCell };
4
+ export declare const specPad: (props: Record<string, unknown>) => RootPadAttrs | null;
3
5
  export interface SpecStripProps {
4
6
  cells?: StripCell[];
5
7
  fill?: "dark" | "none";
6
8
  editing?: boolean;
9
+ pad?: RootPadAttrs | null;
7
10
  }
8
- export default function SpecStrip({ cells, fill, editing }: SpecStripProps): import("react").JSX.Element | null;
11
+ export default function SpecStrip({ cells, fill, editing, pad }: SpecStripProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{HideTaker as d}from"./ViewHideRoot.js";import{specStripScaffold as m}from"../../format/lib/document/blocks/general/SpecStrip/meta.js";function o({cells:n,fill:p="dark",editing:l=!1}){const a=(n??[]).filter(e=>(e?.text??"").trim()),r=a.length>0?a:l?m():[];if(r.length===0)return null;const i=p!=="none",s=t("div",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-baseline justify-between gap-x-8 gap-y-1 px-[var(--sf-site-gutter,40px)] py-4 text-[length:var(--size-label,12px)] uppercase tracking-[0.1em] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:py-3",children:r.map((e,x)=>t("span",{className:i?e.tone==="muted"?"text-plate-band-fg-dim":"text-plate-band-fg":e.tone==="muted"?"text-fg-dim":"text-fg",children:e.text},x))});return t(d,{as:"section",className:"w-full",children:i?t("div",{className:"bg-plate-band",children:s}):t("div",{className:"border-t border-line",children:s})})}export{o as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{HideTaker as x}from"./ViewHideRoot.js";import{specStripScaffold as c}from"../../format/lib/document/blocks/general/SpecStrip/meta.js";import{PY_CLASS as m,SECTION_PAD_KEYS as u,framePadAttrs as g,padValuesOf as h,tierFramesOf as v}from"../lib/content/section-padding.js";import{SPEC_PAD as s}from"../../format/lib/sections/strip-shape.js";const y=a=>g({values:h(a,u,!0),frame:v(s),drawsFrame:!0,edge:!0},!0).root;function w({cells:a,fill:f="dark",editing:p=!1,pad:e}){const i=(a??[]).filter(t=>(t?.text??"").trim()),l=i.length>0?i:p?c():[];if(l.length===0)return null;const n=f!=="none",o=r("div",{className:["mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-baseline justify-between gap-x-8 gap-y-1 px-[var(--sf-site-gutter,40px)]",e?null:m.all[s.top],"text-[length:var(--size-label,12px)] uppercase tracking-[0.1em] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",e?e.className:m.edge[s.topPhone]].filter(Boolean).join(" "),style:e&&Object.keys(e.style).length?e.style:void 0,...e?.attrs,children:l.map((t,d)=>r("span",{className:n?t.tone==="muted"?"text-plate-band-fg-dim":"text-plate-band-fg":t.tone==="muted"?"text-fg-dim":"text-fg",children:t.text},d))});return r(x,{as:"section",className:"w-full",children:n?r("div",{className:"bg-plate-band",children:o}):r("div",{className:"border-t border-line",children:o})})}export{w as default,y as specPad};
@@ -8,7 +8,8 @@ export declare const SECTION_PADDING: {
8
8
  };
9
9
  export declare function sectionPadStyle(pt: unknown, pb: unknown, unit?: unknown, frame?: number): CSSProperties | undefined;
10
10
  type SideFrames = (side: "top" | "bottom", tier: ViewTier) => number;
11
- type TierFrames = Readonly<Record<ViewTier, number>>;
11
+ export type TierFrames = Readonly<Record<ViewTier, number>>;
12
+ export declare const frameAt: (frame: number | TierFrames | undefined, tier: ViewTier) => number;
12
13
  export declare const PAD_TOP_PHONE_CLASS = "sf-pad-top-phone";
13
14
  export declare const PAD_BOTTOM_PHONE_CLASS = "sf-pad-bottom-phone";
14
15
  export declare const PAD_TOP_PHONE_VAR = "--sf-pad-t-phone";
@@ -99,7 +100,7 @@ export type PadValues = {
99
100
  unit?: unknown;
100
101
  unitTablet?: unknown;
101
102
  unitPhone?: unknown;
102
- frame?: number;
103
+ frame?: number | TierFrames;
103
104
  totals?: readonly string[];
104
105
  sideSpace?: "box" | "site";
105
106
  };
@@ -120,6 +121,7 @@ export declare const BLOCK_PAD_FRAME: {
120
121
  readonly heading: 24;
121
122
  readonly line: 0;
122
123
  };
124
+ export declare const PY_CLASS: Readonly<Record<"all" | "edge", Readonly<Record<number, string>>>>;
123
125
  export declare const FRAME_CLASS: Readonly<Record<number, string>>;
124
126
  export declare function ownPadOf(pad: PadValues | undefined, frame: number): {
125
127
  className: string;
@@ -128,24 +130,32 @@ export declare function ownPadOf(pad: PadValues | undefined, frame: number): {
128
130
  frame: number;
129
131
  };
130
132
  };
131
- export declare function framePadAttrs(pad: {
133
+ export declare const tierFramesOf: (own: {
134
+ top: number;
135
+ topPhone: number;
136
+ }) => TierFrames;
137
+ export type FramePad = {
132
138
  values: PadValues;
133
- frame: number;
134
- }, drawsGutter: boolean): {
135
- root: {
136
- className: string;
137
- style: CSSProperties;
138
- } | null;
139
- outer: {
140
- className: string;
141
- style: CSSProperties;
142
- } | null;
139
+ frame: number | TierFrames;
140
+ drawsFrame?: boolean;
141
+ edge?: boolean;
142
+ };
143
+ export declare function framePadAttrs(pad: FramePad, drawsGutter: boolean): {
144
+ root: RootPadAttrs | null;
145
+ outer: PadAttrs | null;
146
+ };
147
+ type PadAttrs = {
148
+ className: string;
149
+ style: CSSProperties;
150
+ };
151
+ export type RootPadAttrs = PadAttrs & {
152
+ attrs?: Readonly<Record<string, string>>;
143
153
  };
144
154
  export declare function wrapperPadAttrs(v: PadValues): {
145
155
  className: string;
146
156
  style: CSSProperties;
147
157
  } | null;
148
- export declare function rootPadAttrs(v: PadValues, frame: number): {
158
+ export declare function rootPadAttrs(pad: PadValues, frame: number | TierFrames): {
149
159
  className: string;
150
160
  style: CSSProperties;
151
161
  } | null;
@@ -1 +1 @@
1
- import{storedUnit as X}from"../../../format/lib/content/css-length.js";import{VIEW_TIERS as R,phoneKey as I,resolveViewValue as q,tabletKey as y,viewKeyAt as b}from"efficient-easel/draw";import{ownEntry as z}from"../../../format/lib/own-entry.js";import{SECTION_PAD_UNIT_KEY as C,SITE_SIDE as J,convertLength as Q,isLengthUnit as Z,isSiteSide as V,sideLengthAt as v,sideValueAt as tt,withLength as S}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as k}from"../../../format/lib/content/page-width.js";import{viewRules as ot}from"../../../format/lib/content/view-overrides.js";import{finiteNumber as l}from"../../../format/lib/finite-number.js";const et={min:10,max:200,step:10};function nt(t,o,e,s=0){const n=l(t),d=l(o);if(n===void 0&&d===void 0)return;const i=E(e),r=p=>p===void 0?void 0:i==="px"?p:S(p,i,s);return{paddingTop:r(n),paddingBottom:r(d)}}const E=t=>X(t),st={top:"top",bottom:"bottom"};function it(t,o,e,s){const n=l(t),d=l(o);if(n===void 0&&d===void 0)return;const i=E(e),r=(p,m)=>p===void 0?void 0:i==="px"?p:S(p,i,m);return{paddingTop:r(n,s("top","desktop")),paddingBottom:r(d,s("bottom","desktop"))}}const dt="sf-pad-top-phone",rt="sf-pad-bottom-phone",pt="--sf-pad-t-phone",at="--sf-pad-b-phone",lt="sf-pad-left-phone",ft="sf-pad-right-phone",ct="--sf-pad-l-phone",ut="--sf-pad-r-phone",bt="sf-pad-top-tablet",mt="sf-pad-bottom-tablet",Tt="sf-pad-left-tablet",At="sf-pad-right-tablet",_t="--sf-pad-t-tablet",Pt="--sf-pad-b-tablet",ht="--sf-pad-l-tablet",xt="--sf-pad-r-tablet",w="sf-section-pad";function N(t){const o={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},e=t.totals?.length?(d,i)=>t.totals.includes(b(d,i))?0:t.frame??0:t.frame,s=typeof e=="function"?it(t.top,t.bottom,t.unit,e):nt(t.top,t.bottom,t.unit,t.frame),n=Dt({left:t.left,right:t.right},{top:t.topPhone,bottom:t.bottomPhone,left:t.leftPhone,right:t.rightPhone},{top:t.topTablet,bottom:t.bottomTablet,left:t.leftTablet,right:t.rightTablet},{top:t.top,bottom:t.bottom,left:t.left,right:t.right},o,e,t.sideSpace);return s===void 0&&!n.classes.length&&!Object.keys(n.style).length?null:{className:[w,...n.classes].join(" "),style:{...s,...n.style}}}const gt=t=>V(t)?t:l(t),Et=[["top","paddingTop",[bt,_t],[dt,pt]],["bottom","paddingBottom",[mt,Pt],[rt,at]],["left","paddingLeft",[Tt,ht],[lt,ct]],["right","paddingRight",[At,xt],[ft,ut]]];function H(t,o,e){return!Z(o)||o==="px"?t:Q(t,"px",o,e,{min:0,max:et.max,step:1})}function St(t,o,e,s={},n=0){const d={desktop:!0,tablet:o!==void 0,mobile:e!==void 0},i={desktop:["desktop"],tablet:["tablet","desktop"],mobile:["mobile","tablet","desktop"]},r=a=>typeof n=="object"?n[a]:n,p=(a,u,h)=>{if(u==="px")return`${a}px`;const x=i[h].find(O=>d[O])??"desktop",g=S(a,u,r(x));return typeof g=="number"?`${g}px`:g},m={n:t,[y("n")]:o,[I("n")]:e,u:s.desktop,[y("u")]:s.tablet,[I("u")]:s.phone},A=q("spacing",l(t),l(o),l(e),ot()),T=(a,u,h)=>{if(tt(m,{side:"n"},a,"side",["side"])?.value===J)return k().value;const x=v(m,{side:"n"},"u",a,"side");if(!x)return;const g=u!==null&&!h&&x.unit==="px"&&typeof A[u]=="number";return p(g?A[u]:x.value,x.unit,a)},f=T("desktop",null,!0),_={},P=T("tablet","tablet",o!==void 0);P!==void 0&&(o!==void 0||P!==f)&&(_.tablet=P);const c=T("mobile","phone",e!==void 0);return c!==void 0&&(e!==void 0||c!==f)&&(_.phone=c),_}function Dt(t,o,e={},s=t,n={},d=0,i="box"){const r={},p={},m=[],A=k(i);let T=!1;for(const[f,_,...P]of Et){const c=f==="left"||f==="right"?gt:l,a=c(t[f]),u=z(st,f),h=u?typeof d=="function"?{desktop:d(u,"desktop"),tablet:d(u,"tablet"),mobile:d(u,"mobile")}:d:0,x=typeof h=="object"?h.desktop:h;V(a)?(r[_]=A.value,T=!0):a!==void 0&&(r[_]=E(n.desktop)==="px"?a:S(a,E(n.desktop),x));const g=St(c(s[f]),c(e[f]),c(o[f]),n,h);for(const[O,[$,W]]of[["tablet",P[0]],["phone",P[1]]]){const L=g[O];L!==void 0&&(m.push($),p[W]=L,L===A.value&&(T=!0))}}return T&&m.push(...A.className.split(" ")),{classes:m,style:{...r,...p}}}function M(t,o,e){const s=l(t)??e,n=l(o);return s===void 0?n:n===void 0?s:s+n}function Mt(t,o={}){return{top:M(t.padTop,t.sectionPaddingTop,o.top),bottom:M(t.padBottom,t.sectionPaddingBottom,o.bottom)}}const F={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},B="padUnit";function Ot(t,o){const e=t[B],s=(n,d,i)=>{const r=l(n)??(i===void 0?void 0:H(i,e,"desktop")),p=l(d);return p===void 0?r:(r??0)+H(p,e,"desktop")};return{top:s(t.padTop,t.sectionPaddingTop,o.top),bottom:s(t.padBottom,t.sectionPaddingBottom,o.bottom)}}function Ft(t,o,e={}){const s=Ot(t,o),n={...Lt(t,F,!0,B),top:s.top,bottom:s.bottom};e.noTop&&Object.assign(n,{top:0,topTablet:void 0,topPhone:void 0});const d=N(n),i=d?d.className.split(" ").filter(r=>r!==w):[];return{...i.length?{className:i.join(" ")}:{},style:d?.style??{}}}const D={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},jt=[...["top","bottom","left","right"].map(t=>[F[t],D[t]]),[B,C]].flatMap(([t,o])=>[[t,o],...["tablet","mobile"].map(e=>[b(t,e),b(o,e)])]);function Lt(t,o=D,e=!0,s=o===D?C:void 0){const n={};if(s){t[s]!==void 0&&(n.unit=t[s]);for(const i of["tablet","mobile"])t[b(s,i)]!==void 0&&(n[b("unit",i)]=t[b(s,i)])}for(const i of e?["top","bottom","left","right"]:["top","bottom"]){n[i]=t[o[i]];for(const r of["tablet","mobile"])n[b(i,r)]=t[b(o[i],r)]}const d=t[Nt];if(Array.isArray(d)){const i=j.flatMap(r=>R.filter(p=>d.includes(b(o[r],p))).map(p=>b(r,p)));i.length&&(n.totals=i)}return n}const Nt="padTotal",j=["top","bottom"];function Gt(t=D){return j.flatMap(o=>R.map(e=>b(t[o],e)))}const G=16,K=24,Bt={text:G,heading:K,line:0},Rt={[G]:"py-4",[K]:"py-6",[Bt.line]:""};function Kt(t,o){return{className:Rt[o]??"",...t?{pad:{values:t,frame:o}}:{}}}function Ut(t,o){if(!o)return{root:Y(t.values,t.frame),outer:null};if(!t.values.totals?.length)return{root:null,outer:U(t.values)};const e=t.values,{top:s,bottom:n,topTablet:d,bottomTablet:i,topPhone:r,bottomPhone:p,left:m,right:A,leftTablet:T,rightTablet:f,leftPhone:_,rightPhone:P,...c}=e;return{root:Y({...c,top:s,bottom:n,topTablet:d,bottomTablet:i,topPhone:r,bottomPhone:p},t.frame),outer:U({...c,totals:void 0,left:m,right:A,leftTablet:T,rightTablet:f,leftPhone:_,rightPhone:P})}}function U(t){return N(t)}function Y(t,o){const e=(s,n,d)=>typeof s!="number"?void 0:E(n)==="px"&&!t.totals?.includes(d)?s+o:s;return N({...t,frame:o,top:e(t.top,t.unit,"top"),bottom:e(t.bottom,t.unit,"bottom"),topTablet:e(t.topTablet,t.unitTablet,"topTablet"),bottomTablet:e(t.bottomTablet,t.unitTablet,"bottomTablet"),topPhone:e(t.topPhone,t.unitPhone,"topPhone"),bottomPhone:e(t.bottomPhone,t.unitPhone,"bottomPhone")})}export{F as BAND_PAD_KEYS,B as BAND_PAD_UNIT_KEY,jt as BAND_TO_SECTION_PAD,Bt as BLOCK_PAD_FRAME,Rt as FRAME_CLASS,K as HEADING_PAD_FRAME,rt as PAD_BOTTOM_PHONE_CLASS,at as PAD_BOTTOM_PHONE_VAR,mt as PAD_BOTTOM_TABLET_CLASS,Pt as PAD_BOTTOM_TABLET_VAR,lt as PAD_LEFT_PHONE_CLASS,ct as PAD_LEFT_PHONE_VAR,Tt as PAD_LEFT_TABLET_CLASS,ht as PAD_LEFT_TABLET_VAR,ft as PAD_RIGHT_PHONE_CLASS,ut as PAD_RIGHT_PHONE_VAR,At as PAD_RIGHT_TABLET_CLASS,xt as PAD_RIGHT_TABLET_VAR,dt as PAD_TOP_PHONE_CLASS,pt as PAD_TOP_PHONE_VAR,bt as PAD_TOP_TABLET_CLASS,_t as PAD_TOP_TABLET_VAR,Nt as PAD_TOTAL_KEY,et as SECTION_PADDING,w as SECTION_PAD_CLASS,D as SECTION_PAD_KEYS,G as TEXT_PAD_FRAME,Ft as bandPadAttrs,Ot as bandTopBottom,Ut as framePadAttrs,Kt as ownPadOf,H as padDefaultIn,Dt as padSideAttrs,gt as padSideValue,Gt as padTotalKeys,Lt as padValuesOf,Mt as resolveSectionPadding,Y as rootPadAttrs,N as sectionPadAttrs,nt as sectionPadStyle,St as sideViewLengths,U as wrapperPadAttrs};
1
+ import{storedUnit as v}from"../../../format/lib/content/css-length.js";import{VIEW_TIERS as D,phoneKey as k,resolveViewValue as tt,tabletKey as H,viewKeyAt as p}from"efficient-easel/draw";import{ownEntry as ot}from"../../../format/lib/own-entry.js";import{SECTION_PAD_UNIT_KEY as M,SITE_SIDE as et,VIEW_ABOVE as nt,convertLength as j,isLengthUnit as st,isSiteSide as G,sideLengthAt as it,sideValueAt as rt,withLength as O}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as K}from"../../../format/lib/content/page-width.js";import{viewRules as dt}from"../../../format/lib/content/view-overrides.js";import{EDGE_LINE_ATTRS as at}from"../../../format/lib/content/view-lines.js";import{finiteNumber as c}from"../../../format/lib/finite-number.js";const Y={min:10,max:200,step:10};function pt(t,e,o,i=0){const n=c(t),r=c(e);if(n===void 0&&r===void 0)return;const s=x(o),d=a=>a===void 0?void 0:s==="px"?a:O(a,s,i);return{paddingTop:d(n),paddingBottom:d(r)}}const x=t=>v(t),L=(t,e)=>typeof t=="object"?t[e]:t??0,ct={top:"top",bottom:"bottom"};function lt(t,e,o,i){const n=c(t),r=c(e);if(n===void 0&&r===void 0)return;const s=x(o),d=(a,u)=>a===void 0?void 0:s==="px"?a:O(a,s,u);return{paddingTop:d(n,i("top","desktop")),paddingBottom:d(r,i("bottom","desktop"))}}const ft="sf-pad-top-phone",ut="sf-pad-bottom-phone",mt="--sf-pad-t-phone",bt="--sf-pad-b-phone",Tt="sf-pad-left-phone",_t="sf-pad-right-phone",At="--sf-pad-l-phone",Pt="--sf-pad-r-phone",ht="sf-pad-top-tablet",xt="sf-pad-bottom-tablet",gt="sf-pad-left-tablet",Et="sf-pad-right-tablet",St="--sf-pad-t-tablet",Dt="--sf-pad-b-tablet",Ot="--sf-pad-l-tablet",Lt="--sf-pad-r-tablet",w="sf-section-pad";function R(t){const e={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},o=t.totals?.length||typeof t.frame=="object"?(r,s)=>t.totals?.includes(p(r,s))?0:L(t.frame,s):t.frame,i=typeof o=="function"?lt(t.top,t.bottom,t.unit,o):pt(t.top,t.bottom,t.unit,o),n=wt({left:t.left,right:t.right},{top:t.topPhone,bottom:t.bottomPhone,left:t.leftPhone,right:t.rightPhone},{top:t.topTablet,bottom:t.bottomTablet,left:t.leftTablet,right:t.rightTablet},{top:t.top,bottom:t.bottom,left:t.left,right:t.right},e,o,t.sideSpace);return i===void 0&&!n.classes.length&&!Object.keys(n.style).length?null:{className:[w,...n.classes].join(" "),style:{...i,...n.style}}}const Nt=t=>G(t)?t:c(t),Bt=[["top","paddingTop",[ht,St],[ft,mt]],["bottom","paddingBottom",[xt,Dt],[ut,bt]],["left","paddingLeft",[gt,Ot],[Tt,At]],["right","paddingRight",[Et,Lt],[_t,Pt]]];function I(t,e,o){return!st(e)||e==="px"?t:j(t,"px",e,o,{min:0,max:Y.max,step:1})}const U=t=>{const e=nt[t];return e?[t,...U(e)]:[t]},N=Object.fromEntries(D.map(t=>[t,U(t)]));function yt(t,e,o,i={},n=0){const r={desktop:!0,tablet:e!==void 0,mobile:o!==void 0},s=(_,m,A)=>{if(m==="px")return`${_}px`;const l=N[A].find(E=>r[E])??"desktop",f=O(_,m,L(n,l));return typeof f=="number"?`${f}px`:f},d={n:t,[H("n")]:e,[k("n")]:o,u:i.desktop,[H("u")]:i.tablet,[k("u")]:i.phone},a=tt("spacing",c(t),c(e),c(o),dt()),u=(_,m,A)=>{if(rt(d,{side:"n"},_,"side",["side"])?.value===et)return K().value;const l=it(d,{side:"n"},"u",_,"side");if(!l)return;const f=m!==null&&!A&&l.unit==="px"&&typeof a[m]=="number";return s(f?a[m]:l.value,l.unit,_)},b=u("desktop",null,!0),P={},T=u("tablet","tablet",e!==void 0);T!==void 0&&(e!==void 0||T!==b)&&(P.tablet=T);const h=u("mobile","phone",o!==void 0);return h!==void 0&&(o!==void 0||h!==b)&&(P.phone=h),P}function wt(t,e,o={},i=t,n={},r=0,s="box"){const d={},a={},u=[],b=K(s);let P=!1;for(const[T,h,..._]of Bt){const m=T==="left"||T==="right"?Nt:c,A=m(t[T]),l=ot(ct,T),f=l?typeof r=="function"?{desktop:r(l,"desktop"),tablet:r(l,"tablet"),mobile:r(l,"mobile")}:r:0,E=typeof f=="object"?f.desktop:f;G(A)?(d[h]=b.value,P=!0):A!==void 0&&(d[h]=x(n.desktop)==="px"?A:O(A,x(n.desktop),E));const g=yt(m(i[T]),m(o[T]),m(e[T]),n,f);for(const[S,[Q,Z]]of[["tablet",_[0]],["phone",_[1]]]){const y=g[S];y!==void 0&&(u.push(Q),a[Z]=y,y===b.value&&(P=!0))}}return P&&u.push(...b.className.split(" ")),{classes:u,style:{...d,...a}}}function W(t,e,o){const i=c(t)??o,n=c(e);return i===void 0?n:n===void 0?i:i+n}function Xt(t,e={}){return{top:W(t.padTop,t.sectionPaddingTop,e.top),bottom:W(t.padBottom,t.sectionPaddingBottom,e.bottom)}}const $={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},C="padUnit";function Rt(t,e){const o=t[C],i=(n,r,s)=>{const d=c(n)??(s===void 0?void 0:I(s,o,"desktop")),a=c(r);return a===void 0?d:(d??0)+I(a,o,"desktop")};return{top:i(t.padTop,t.sectionPaddingTop,e.top),bottom:i(t.padBottom,t.sectionPaddingBottom,e.bottom)}}function qt(t,e,o={}){const i=Rt(t,e),n={...It(t,$,!0,C),top:i.top,bottom:i.bottom};o.noTop&&Object.assign(n,{top:0,topTablet:void 0,topPhone:void 0});const r=R(n),s=r?r.className.split(" ").filter(d=>d!==w):[];return{...s.length?{className:s.join(" ")}:{},style:r?.style??{}}}const B={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},zt=[...["top","bottom","left","right"].map(t=>[$[t],B[t]]),[C,M]].flatMap(([t,e])=>[[t,e],...["tablet","mobile"].map(o=>[p(t,o),p(e,o)])]);function It(t,e=B,o=!0,i=e===B?M:void 0){const n={};if(i){t[i]!==void 0&&(n.unit=t[i]);for(const s of["tablet","mobile"])t[p(i,s)]!==void 0&&(n[p("unit",s)]=t[p(i,s)])}for(const s of o?["top","bottom","left","right"]:["top","bottom"]){n[s]=t[e[s]];for(const d of["tablet","mobile"])n[p(s,d)]=t[p(e[s],d)]}const r=t[Ct];if(Array.isArray(r)){const s=X.flatMap(d=>D.filter(a=>r.includes(p(e[d],a))).map(a=>p(d,a)));s.length&&(n.totals=s)}return n}const Ct="padTotal",X=["top","bottom"];function Jt(t=B){return X.flatMap(e=>D.map(o=>p(t[e],o)))}const V=16,F=24,Vt={text:V,heading:F,line:0},q={all:{12:"py-3",16:"py-4",24:"py-6"},edge:{12:"max-view-wide:py-3"}},Ft={[V]:q.all[V],[F]:q.all[F],[Vt.line]:""};function Qt(t,e){return{className:Ft[e]??"",...t?{pad:{values:t,frame:e}}:{}}}const Zt=t=>({desktop:t.top,tablet:t.top,mobile:t.topPhone});function vt(t,e){if(!e)return{root:J(t.values,t.frame),outer:null};if(!t.values.totals?.length)return{root:null,outer:z(t.values)};const o=t.values,{top:i,bottom:n,topTablet:r,bottomTablet:s,topPhone:d,bottomPhone:a,left:u,right:b,leftTablet:P,rightTablet:T,leftPhone:h,rightPhone:_,...m}=o,A={...m,top:i,bottom:n,topTablet:r,bottomTablet:s,topPhone:d,bottomPhone:a},l=J(t.drawsFrame?kt(A,t.frame):A,t.frame),f=l&&t.drawsFrame?{...l,className:l.className.split(" ").filter(g=>g!==w).join(" ")}:l,E=["tablet","mobile"].some(g=>["top","bottom"].some(S=>typeof o[p(S,g)]=="number"&&!o.totals?.includes(p(S,g))));return{root:f&&t.edge&&f.className&&!E?{...f,attrs:at}:f,outer:z({...m,totals:void 0,left:u,right:b,leftTablet:P,rightTablet:T,leftPhone:h,rightPhone:_})}}function kt(t,e){const o=r=>L(e,r),i={...t},n=[...t.totals??[]];for(const r of D)for(const s of["top","bottom"]){if(N[r].some(a=>c(t[p(s,a)])!==void 0))continue;const d=N[r][1];d&&o(d)===o(r)||(i[p(s,r)]=I(o(r),t[p("unit",r)],r),n.push(p(s,r)))}return{...i,totals:n}}function Ht(t,e){const o={...t};for(const i of["tablet","mobile"]){const n=p("unit",i),r=["top","bottom","left","right"].some(s=>c(t[p(s,i)])!==void 0);for(const s of["top","bottom"]){if(c(o[p(s,i)])!==void 0)continue;const d=N[i].slice(1).find(b=>c(o[p(s,b)])!==void 0);if(!d||e[d]===e[i]||t.totals?.includes(p(s,d)))continue;const a=c(o[p(s,d)]),u=x(o[p("unit",d)]);if(r){const b=x(o[n]);o[p(s,i)]=u===b?a:j(a,u,b,i,{min:0,max:Y.max,step:1})}else o[p(s,i)]=a,o[n]=o[p("unit",d)]}}return o}function z(t){return R(t)}function J(t,e){const o=typeof e=="object"?Ht(t,e):t,i=r=>L(e,r),n=(r,s,d,a)=>typeof r!="number"?void 0:x(s)==="px"&&!o.totals?.includes(d)?r+i(a):r;return R({...o,frame:e,top:n(o.top,o.unit,"top","desktop"),bottom:n(o.bottom,o.unit,"bottom","desktop"),topTablet:n(o.topTablet,o.unitTablet,"topTablet","tablet"),bottomTablet:n(o.bottomTablet,o.unitTablet,"bottomTablet","tablet"),topPhone:n(o.topPhone,o.unitPhone,"topPhone","mobile"),bottomPhone:n(o.bottomPhone,o.unitPhone,"bottomPhone","mobile")})}export{$ as BAND_PAD_KEYS,C as BAND_PAD_UNIT_KEY,zt as BAND_TO_SECTION_PAD,Vt as BLOCK_PAD_FRAME,Ft as FRAME_CLASS,F as HEADING_PAD_FRAME,ut as PAD_BOTTOM_PHONE_CLASS,bt as PAD_BOTTOM_PHONE_VAR,xt as PAD_BOTTOM_TABLET_CLASS,Dt as PAD_BOTTOM_TABLET_VAR,Tt as PAD_LEFT_PHONE_CLASS,At as PAD_LEFT_PHONE_VAR,gt as PAD_LEFT_TABLET_CLASS,Ot as PAD_LEFT_TABLET_VAR,_t as PAD_RIGHT_PHONE_CLASS,Pt as PAD_RIGHT_PHONE_VAR,Et as PAD_RIGHT_TABLET_CLASS,Lt as PAD_RIGHT_TABLET_VAR,ft as PAD_TOP_PHONE_CLASS,mt as PAD_TOP_PHONE_VAR,ht as PAD_TOP_TABLET_CLASS,St as PAD_TOP_TABLET_VAR,Ct as PAD_TOTAL_KEY,q as PY_CLASS,Y as SECTION_PADDING,w as SECTION_PAD_CLASS,B as SECTION_PAD_KEYS,V as TEXT_PAD_FRAME,qt as bandPadAttrs,Rt as bandTopBottom,L as frameAt,vt as framePadAttrs,Qt as ownPadOf,I as padDefaultIn,wt as padSideAttrs,Nt as padSideValue,Jt as padTotalKeys,It as padValuesOf,Xt as resolveSectionPadding,J as rootPadAttrs,R as sectionPadAttrs,pt as sectionPadStyle,yt as sideViewLengths,Zt as tierFramesOf,z as wrapperPadAttrs};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import n from"../../../../../components/Breadcrumb.js";import{CardRowDrawn as f}from"../../../../../components/CardRowContext.js";import{namedRowField as c}from"../../../../../../format/lib/content/card-template.js";import{phRows as s,phHide as p}from"../../scaffold.js";import{say as i}from"../../../../../../format/lib/editor-words.js";import{BreadcrumbMeta as u,BREADCRUMB_PH as b}from"../../../../../../format/lib/document/blocks/general/Breadcrumb/meta.js";const l=()=>[{label:i("Home"),href:"/"},{label:i("Section"),href:""}],C={...u,render:e=>{const{items:a,meta:d,editor:t}=e,m=r=>o(n,{items:s(a,l(),t),current:typeof r=="string"?r:void 0,meta:p(d,b.meta,t),editing:t?.isEditing});return c(e)?o(f,{type:"Breadcrumb",props:e,children:r=>m(r.currentCrumb)}):m()}};export{C as BreadcrumbRender};
1
+ import{jsx as o}from"react/jsx-runtime";import n,{crumbPad as c}from"../../../../../components/Breadcrumb.js";import{CardRowDrawn as f}from"../../../../../components/CardRowContext.js";import{namedRowField as s}from"../../../../../../format/lib/content/card-template.js";import{phRows as u,phHide as b}from"../../scaffold.js";import{say as i}from"../../../../../../format/lib/editor-words.js";import{BreadcrumbMeta as p,BREADCRUMB_PH as l}from"../../../../../../format/lib/document/blocks/general/Breadcrumb/meta.js";const B=()=>[{label:i("Home"),href:"/"},{label:i("Section"),href:""}],H={...p,render:r=>{const{items:a,meta:d,editor:t}=r,m=e=>o(n,{items:u(a,B(),t),current:typeof e=="string"?e:void 0,meta:b(d,l.meta,t),editing:t?.isEditing,pad:c(r)});return s(r)?o(f,{type:"Breadcrumb",props:r,children:e=>m(e.currentCrumb)}):m()}};export{H as BreadcrumbRender};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{HideTaker as m}from"../../../../../components/ViewHideRoot.js";import{CUSTOM_HTML_SCOPE_ATTR as u,scopeCustomCss as T,splitCustomHtml as i}from"../../../custom-css.js";import{CustomHTMLMeta as l}from"../../../../../../format/lib/document/blocks/general/CustomHTML/meta.js";const M={...l,render:({html:n,id:t})=>{const{css:r,markup:s,ids:p}=i(n??"",String(t??"")),e=r?T(r,String(t??""),void 0,p):"";return e?o(m,{[u]:t,dangerouslySetInnerHTML:{__html:`<style>${e}</style>${s}`}}):o(m,{dangerouslySetInnerHTML:{__html:s}})}};export{M as CustomHTMLRender};
1
+ import{jsx as e}from"react/jsx-runtime";import{HideTaker as o}from"../../../../../components/ViewHideRoot.js";import{CUSTOM_HTML_SCOPE_ATTR as s,customHtmlDrawn as T}from"../../../custom-css.js";import{CustomHTMLMeta as _}from"../../../../../../format/lib/document/blocks/general/CustomHTML/meta.js";const p={..._,render:({html:n,id:r})=>{const{scoped:m,inner:t}=T(n??"",String(r??""));return m?e(o,{[s]:r,dangerouslySetInnerHTML:{__html:t}}):e(o,{dangerouslySetInnerHTML:{__html:t}})}};export{p as CustomHTMLRender};
@@ -1 +1 @@
1
- import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";import{parseOption as x}from"../../../../../../format/lib/parse-option.js";const h="relative overflow-hidden h-full min-h-[560px] max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",p="relative overflow-hidden grow shrink-0 max-view-wide:shrink basis-0 min-h-[560px] max-view-desktop:basis-auto max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",w=new Set(["auto","dark","light"]),t=e=>s(e).text.trim();function f(e){return a(l,{...e,takesViewHide:!0,boxClass:d()?.fillingColumn?p:h})}const L={...c,render:e=>{const o=Number(e.lat),i=Number(e.lng),n=e.editor?.isEditing===!0;if(!n&&!u(o,i))return a(m,{});const r=e.mapTheme;return a(f,{name:t(e.name),state:t(e.state),country:t(e.country),lat:o,lng:i,mapsUrl:t(e.mapsUrl),mapTheme:x([...w],"auto",r),editing:n})}};export{L as LocationMapRender};
1
+ import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";import{parseOption as x}from"efficient-shell/format";const h="relative overflow-hidden h-full min-h-[560px] max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",p="relative overflow-hidden grow shrink-0 max-view-wide:shrink basis-0 min-h-[560px] max-view-desktop:basis-auto max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",w=new Set(["auto","dark","light"]),t=e=>s(e).text.trim();function f(e){return a(l,{...e,takesViewHide:!0,boxClass:d()?.fillingColumn?p:h})}const L={...c,render:e=>{const o=Number(e.lat),i=Number(e.lng),n=e.editor?.isEditing===!0;if(!n&&!u(o,i))return a(m,{});const r=e.mapTheme;return a(f,{name:t(e.name),state:t(e.state),country:t(e.country),lat:o,lng:i,mapsUrl:t(e.mapsUrl),mapTheme:x([...w],"auto",r),editing:n})}};export{L as LocationMapRender};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import p from"../../../../../components/SpecStrip.js";import{SpecStripMeta as o}from"../../../../../../format/lib/document/blocks/general/SpecStrip/meta.js";const c={...o,render:({cells:r,fill:i,editor:e})=>t(p,{cells:r,fill:i,editing:e?.isEditing})};export{c as SpecStripRender};
1
+ import{jsx as i}from"react/jsx-runtime";import t,{specPad as r}from"../../../../../components/SpecStrip.js";import{SpecStripMeta as l}from"../../../../../../format/lib/document/blocks/general/SpecStrip/meta.js";const o={...l,render:e=>i(t,{cells:e.cells,fill:e.fill,editing:e.editor?.isEditing,pad:r(e)})};export{o as SpecStripRender};
@@ -1,2 +1,2 @@
1
- import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as R,TEXT as h,smallText as C}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as K}from"../../../content/box-stack-line.js";import{PHONE_EDGE as F}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";import{parseOption as z}from"../../../../../format/lib/parse-option.js";const U=["standard","editorial","simple","essay"];function E(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return z(U,"standard",t)}const se={standard:64,editorial:60,simple:36,essay:28,shelf:20},j={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function $(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function le(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=y({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const O={[K]:w},m={top:0,right:0,bottom:1,left:0};import{token as he}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>C(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=F,v=w,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),b={...M,align:"right",alignPhone:"left",...R},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:b,style:{...x(e),color:"labels"}}),N=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?G(D()):{},...n.style}}}}},G=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function X(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(X)}}function Q(e,t){const n=u(j,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[N(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[N(t.title,`Three ranges,
1
+ import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as R,TEXT as h,smallText as C}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as K}from"../../../content/box-stack-line.js";import{PHONE_EDGE as F}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";import{parseOption as z}from"efficient-shell/format";const U=["standard","editorial","simple","essay"];function E(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return z(U,"standard",t)}const se={standard:64,editorial:60,simple:36,essay:28,shelf:20},j={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function $(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function le(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=y({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const O={[K]:w},m={top:0,right:0,bottom:1,left:0};import{token as he}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>C(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=F,v=w,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),b={...M,align:"right",alignPhone:"left",...R},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:b,style:{...x(e),color:"labels"}}),N=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?G(D()):{},...n.style}}}}},G=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function X(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(X)}}function Q(e,t){const n=u(j,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[N(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[N(t.title,`Three ranges,
2
2
  one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...b,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function L(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>L(n,t))}:e}function y(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...O},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...O},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},L(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[H("maxWidth")]:v,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[H("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],V=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function q(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>V(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function ce(e){return E(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,J={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function de(e){const t=p.get(e);if(t)return t;const n=$(e),i=E(e),o=i==="editorial"?y(n):i==="simple"?B(n,J):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?q(n):Q(e,n);return p.set(e,o),o}export{O as EDITORIAL_LINE,se as HEAD_BELOW,J as SIMPLE_HEADING_LOOK,le as editorialHeadTree,_ as fluidToken,E as headLookOf,ce as headReads,de as headTree,X as headWordsOnPhoneLine,he as token,L as withAccentItalic};
@@ -12,6 +12,7 @@ export declare const FOLLOW_THE_BOX: Props;
12
12
  export declare const SAME_KEYS: readonly BoxEntry[];
13
13
  export declare const DROP_COMMON: Readonly<Record<string, string>>;
14
14
  export declare const DROP_SIDE_PADDING: Readonly<Record<string, string>>;
15
+ export declare const DROP_PAD_TOTALS: Readonly<Record<string, string>>;
15
16
  export type OwnPad = {
16
17
  top: number;
17
18
  bottom: number;