efficient-web-builder 52.0.0 → 54.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/editor/components/ChatSettingsPanel.js +1 -1
  3. package/dist/editor/components/DuplicateToPageMenu.d.ts +2 -0
  4. package/dist/editor/components/DuplicateToPageMenu.js +1 -1
  5. package/dist/editor/components/MediaUploadField.d.ts +7 -7
  6. package/dist/editor/components/MediaUploadField.js +1 -1
  7. package/dist/editor/components/PartSettingsPanel.js +1 -1
  8. package/dist/editor/components/PartTextBox.js +1 -1
  9. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  10. package/dist/editor/components/SectionTextPartBridge.js +1 -1
  11. package/dist/editor/components/SiteAccentField.js +1 -1
  12. package/dist/editor/components/SiteTextStylesField.d.ts +3 -3
  13. package/dist/editor/components/SiteTextStylesField.js +1 -1
  14. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  15. package/dist/editor/components/storefront-editor.css +70 -20
  16. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  17. package/dist/editor/lib/animation/hover-fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  24. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  25. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  26. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  27. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  28. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  29. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  30. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  31. package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
  32. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  33. package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
  34. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  35. package/dist/editor/lib/document/blocks/shared-fields.d.ts +5 -0
  36. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  37. package/dist/editor/lib/document/box-fields.d.ts +23 -2
  38. package/dist/editor/lib/document/box-fields.js +1 -1
  39. package/dist/editor/lib/document/box-phone-order-field.d.ts +8 -0
  40. package/dist/editor/lib/document/box-phone-order-field.js +1 -0
  41. package/dist/editor/lib/document/card-row-fields.js +1 -1
  42. package/dist/editor/lib/document/choice-pictures.d.ts +21 -0
  43. package/dist/editor/lib/document/choice-pictures.js +1 -0
  44. package/dist/editor/lib/document/controls.d.ts +19 -5
  45. package/dist/editor/lib/document/controls.js +1 -1
  46. package/dist/editor/lib/document/hidable-rows-drawn.d.ts +1 -0
  47. package/dist/editor/lib/document/hidable-rows-drawn.js +1 -1
  48. package/dist/editor/lib/document/part-panel-rows.d.ts +1 -0
  49. package/dist/editor/lib/document/part-panel-rows.js +1 -1
  50. package/dist/editor/lib/document/separator-field.d.ts +9 -1
  51. package/dist/editor/lib/document/separator-field.js +1 -1
  52. package/dist/editor/lib/document/shape-picker.d.ts +37 -0
  53. package/dist/editor/lib/document/shape-picker.js +1 -0
  54. package/dist/editor/lib/document/show-for-field.d.ts +6 -0
  55. package/dist/editor/lib/document/show-for-field.js +1 -0
  56. package/dist/format/lib/animation/hover.d.ts +0 -2
  57. package/dist/format/lib/animation/hover.js +1 -1
  58. package/dist/format/lib/content/box-layout.d.ts +21 -6
  59. package/dist/format/lib/content/box-layout.js +1 -1
  60. package/dist/format/lib/content/box-phone-place.d.ts +11 -0
  61. package/dist/format/lib/content/box-phone-place.js +1 -0
  62. package/dist/format/lib/content/box-shape.d.ts +1 -5
  63. package/dist/format/lib/content/box-shape.js +1 -1
  64. package/dist/format/lib/content/box-show-for-choices.d.ts +9 -0
  65. package/dist/format/lib/content/box-show-for-choices.js +1 -0
  66. package/dist/format/lib/content/card-template.js +1 -1
  67. package/dist/format/lib/content/gallery-card-layout.d.ts +45 -1
  68. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  69. package/dist/format/lib/content/image-aspect.d.ts +47 -0
  70. package/dist/format/lib/content/image-aspect.js +1 -0
  71. package/dist/format/lib/content/list-number.d.ts +11 -0
  72. package/dist/format/lib/content/list-number.js +1 -1
  73. package/dist/format/lib/content/phone-focus.d.ts +4 -1
  74. package/dist/format/lib/content/phone-focus.js +1 -1
  75. package/dist/format/lib/content/record-row.d.ts +14 -0
  76. package/dist/format/lib/content/record-row.js +1 -0
  77. package/dist/format/lib/content/record-types.d.ts +1 -1
  78. package/dist/format/lib/content/record-types.js +1 -1
  79. package/dist/format/lib/content/section-height.d.ts +8 -0
  80. package/dist/format/lib/content/section-height.js +1 -1
  81. package/dist/format/lib/document/blocks/block-types.d.ts +1 -1
  82. package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
  83. package/dist/format/lib/document/blocks/general/text-part-shapes.json +2 -2
  84. package/dist/format/lib/document/media-manifest.json +5 -2
  85. package/dist/format/lib/document/mockup-variant-fields.d.ts +1 -0
  86. package/dist/format/lib/document/mockup-variant-fields.js +1 -1
  87. package/dist/format/lib/document/section-catalog.js +2 -2
  88. package/dist/format/lib/document/section-descriptions.js +1 -1
  89. package/dist/format/lib/editor-words-catalogue.d.ts +26 -11
  90. package/dist/format/lib/editor-words-catalogue.js +4 -4
  91. package/dist/format/lib/fonts.js +1 -1
  92. package/dist/format/lib/sections/divider-style.d.ts +4 -0
  93. package/dist/format/lib/sections/divider-style.js +1 -1
  94. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  95. package/dist/format/lib/sections/section-presets.js +1 -1
  96. package/dist/format/lib/source-rules/editor-words.js +2 -2
  97. package/dist/format/lib/source-rules/mirrored-rows-agree.js +4 -4
  98. package/dist/format/lib/source-rules/shape-rows-use-the-picker.d.ts +7 -0
  99. package/dist/format/lib/source-rules/shape-rows-use-the-picker.js +2 -0
  100. package/dist/format/lib/text-styles/site-text-colours.d.ts +2 -9
  101. package/dist/format/lib/text-styles/site-text-colours.js +1 -1
  102. package/dist/render/components/Breadcrumb.d.ts +2 -1
  103. package/dist/render/components/Breadcrumb.js +1 -1
  104. package/dist/render/components/CardRowContext.d.ts +1 -1
  105. package/dist/render/components/CardRowContext.js +1 -1
  106. package/dist/render/components/ContentsList.d.ts +4 -1
  107. package/dist/render/components/ContentsList.js +1 -1
  108. package/dist/render/components/CurrentRecord.d.ts +23 -0
  109. package/dist/render/components/CurrentRecord.js +1 -0
  110. package/dist/render/components/Flex.d.ts +3 -2
  111. package/dist/render/components/Flex.js +1 -1
  112. package/dist/render/components/HeroPictures.d.ts +2 -0
  113. package/dist/render/components/HeroPictures.js +1 -1
  114. package/dist/render/components/HeroPoster.d.ts +2 -1
  115. package/dist/render/components/HeroPoster.js +1 -1
  116. package/dist/render/components/HeroSection.d.ts +2 -1
  117. package/dist/render/components/HeroSection.js +1 -1
  118. package/dist/render/components/HeroSingle.d.ts +3 -1
  119. package/dist/render/components/HeroSingle.js +1 -1
  120. package/dist/render/components/HeroSlide.d.ts +3 -1
  121. package/dist/render/components/HeroSlide.js +1 -1
  122. package/dist/render/components/ImageBlock.d.ts +5 -3
  123. package/dist/render/components/ImageBlock.js +1 -1
  124. package/dist/render/components/InBoxContext.d.ts +4 -0
  125. package/dist/render/components/SiteGutterFrame.d.ts +1 -0
  126. package/dist/render/components/SiteGutterFrame.js +1 -1
  127. package/dist/render/lib/content/block-size.d.ts +3 -0
  128. package/dist/render/lib/content/block-size.js +1 -1
  129. package/dist/render/lib/content/box-show-for.d.ts +14 -0
  130. package/dist/render/lib/content/box-show-for.js +1 -0
  131. package/dist/render/lib/content/page-contents.d.ts +1 -0
  132. package/dist/render/lib/content/page-contents.js +1 -1
  133. package/dist/render/lib/content/picture-focus-rows.d.ts +13 -0
  134. package/dist/render/lib/content/picture-focus-rows.js +1 -0
  135. package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
  136. package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
  137. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  138. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  139. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  140. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  141. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  142. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +1 -1
  143. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  144. package/dist/render/lib/document/part-styles.d.ts +21 -7
  145. package/dist/render/lib/document/part-styles.js +2 -2
  146. package/dist/render/lib/document/passes/block-size.js +1 -1
  147. package/dist/render/lib/document/passes/index.js +1 -1
  148. package/dist/render/lib/document/passes/show-for.d.ts +2 -0
  149. package/dist/render/lib/document/passes/show-for.js +1 -0
  150. package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
  151. package/dist/render/lib/document/show-when.js +1 -1
  152. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  153. package/package.json +3 -3
@@ -1 +1 @@
1
- const c=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],n=new Map(c.map(e=>[e.key,e])),g={sans:"Sans",serif:"Serif",mono:"Mono"};function m(){return Object.keys(g).map(e=>[e,c.filter(t=>t.category===e)]).filter(([,e])=>e.length>0)}function O(e){return n.get(e)?.italic??!1}function S(e){return n.get(e)?.italicLoaded??!1}function _(e){return n.get(e)}const s=["heading","heading2","heading3","body","accent","label"];function x(e){return typeof e=="string"&&s.includes(e)?e:null}const k={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Accent",label:"Labels"},u=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],y=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,V={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},p={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function E(e){const t=e?y.exec(e):null;return t?p[t[1]]??null:h(e)}function h(e){if(!e)return null;const t=e.split(/\s+/).filter(a=>!a.slice(0,a.lastIndexOf(":")+1).includes("&")).map(a=>a.slice(a.lastIndexOf(":")+1));for(const[a,i]of u)if(t.includes(a))return i;return null}const I=["heading","heading2","heading3"],b=["font-display","font-heading2","font-heading3"];function T(e){if(!e)return!1;const t=e.split(/\s+/).filter(a=>!a.slice(0,a.lastIndexOf(":")+1).includes("&")).map(a=>a.slice(a.lastIndexOf(":")+1));return b.some(a=>t.includes(a))}const r={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function d(e){const t=a=>{const i=e?.[a];if(i&&n.has(i))return i;if(a==="heading2"||a==="heading3"){const l=e?.heading;return l&&n.has(l)?l:r.heading}return r[a]};return Object.fromEntries(s.map(a=>[a,t(a)]))}function f(e,t){return n.get(e[t])??n.get(r[t])}function o(e,t){return`var(${f(e,t).cssVar})`}function F(e){const t=d(e);return[...new Set([...L,...s.map(a=>f(t,a).cssVar)])]}const L=[...new Set(s.map(e=>n.get(r[e]).cssVar))],A=[...new Set(c.map(e=>e.cssVar))];function R(e){const t=d(e);return{"--font-role-heading":o(t,"heading"),"--font-role-heading2":o(t,"heading2"),"--font-role-heading3":o(t,"heading3"),"--font-role-body":o(t,"body"),"--font-role-accent":o(t,"accent"),"--font-role-label":o(t,"label"),fontFamily:"var(--font-role-body)"}}export{A as ALL_FONT_CSS_VARS,r as DEFAULT_FONTS,g as FONT_CATEGORY_LABELS,c as FONT_OPTIONS,s as FONT_ROLES,k as FONT_ROLE_LABELS,b as HEADING_FACE_UTILITIES,I as HEADING_FONT_ROLES,L as ROOT_FALLBACK_CSS_VARS,V as SIZE_STEP_OF_ROLE,T as drawsHeadingFace,O as fontHasItalic,S as fontItalicIsUsable,_ as fontOption,x as fontRoleOf,h as fontRoleOfClassName,R as fontRoleStyle,m as fontsByCategory,d as normalizeFonts,F as siteFontCssVars,E as styleRoleOfClassName};
1
+ const c=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],n=new Map(c.map(e=>[e.key,e])),g={sans:"Sans",serif:"Serif",mono:"Mono"};function m(){return Object.keys(g).map(e=>[e,c.filter(t=>t.category===e)]).filter(([,e])=>e.length>0)}function O(e){return n.get(e)?.italic??!1}function S(e){return n.get(e)?.italicLoaded??!1}function _(e){return n.get(e)}const s=["heading","heading2","heading3","body","accent","label"];function x(e){return typeof e=="string"&&s.includes(e)?e:null}const k={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},u=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],y=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,V={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},p={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function E(e){const t=e?y.exec(e):null;return t?p[t[1]]??null:h(e)}function h(e){if(!e)return null;const t=e.split(/\s+/).filter(a=>!a.slice(0,a.lastIndexOf(":")+1).includes("&")).map(a=>a.slice(a.lastIndexOf(":")+1));for(const[a,i]of u)if(t.includes(a))return i;return null}const I=["heading","heading2","heading3"],b=["font-display","font-heading2","font-heading3"];function T(e){if(!e)return!1;const t=e.split(/\s+/).filter(a=>!a.slice(0,a.lastIndexOf(":")+1).includes("&")).map(a=>a.slice(a.lastIndexOf(":")+1));return b.some(a=>t.includes(a))}const r={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function d(e){const t=a=>{const i=e?.[a];if(i&&n.has(i))return i;if(a==="heading2"||a==="heading3"){const l=e?.heading;return l&&n.has(l)?l:r.heading}return r[a]};return Object.fromEntries(s.map(a=>[a,t(a)]))}function f(e,t){return n.get(e[t])??n.get(r[t])}function o(e,t){return`var(${f(e,t).cssVar})`}function F(e){const t=d(e);return[...new Set([...L,...s.map(a=>f(t,a).cssVar)])]}const L=[...new Set(s.map(e=>n.get(r[e]).cssVar))],A=[...new Set(c.map(e=>e.cssVar))];function R(e){const t=d(e);return{"--font-role-heading":o(t,"heading"),"--font-role-heading2":o(t,"heading2"),"--font-role-heading3":o(t,"heading3"),"--font-role-body":o(t,"body"),"--font-role-accent":o(t,"accent"),"--font-role-label":o(t,"label"),fontFamily:"var(--font-role-body)"}}export{A as ALL_FONT_CSS_VARS,r as DEFAULT_FONTS,g as FONT_CATEGORY_LABELS,c as FONT_OPTIONS,s as FONT_ROLES,k as FONT_ROLE_LABELS,b as HEADING_FACE_UTILITIES,I as HEADING_FONT_ROLES,L as ROOT_FALLBACK_CSS_VARS,V as SIZE_STEP_OF_ROLE,T as drawsHeadingFace,O as fontHasItalic,S as fontItalicIsUsable,_ as fontOption,x as fontRoleOf,h as fontRoleOfClassName,R as fontRoleStyle,m as fontsByCategory,d as normalizeFonts,F as siteFontCssVars,E as styleRoleOfClassName};
@@ -4,6 +4,10 @@ export declare const DIVIDER_STYLE_OPTIONS: readonly {
4
4
  label: string;
5
5
  value: DividerStyle;
6
6
  }[];
7
+ export declare const STRIPE_GEOMETRY: Record<Exclude<DividerStyle, "none" | "line">, {
8
+ ink: number;
9
+ period: number;
10
+ }>;
7
11
  export declare const STRIPE_BAND_HEIGHT_PX = 28;
8
12
  export declare const STRIPE_ANGLE = "-45deg";
9
13
  export declare const STRIPE_INK = "color-mix(in oklab, var(--accent) 50%, var(--bg))";
@@ -1 +1 @@
1
- import{parseOption as n}from"../parse-option.js";const i="line",o=[{label:"None",value:"none"},{label:"Line",value:"line"},{label:"Stripes · fine",value:"stripes-fine"},{label:"Stripes · medium",value:"stripes-medium"},{label:"Stripes · bold",value:"stripes-bold"}],p={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},E=28,s="-45deg",l="color-mix(in oklab, var(--accent) 50%, var(--bg))";function a(e){return e!=="line"&&e!=="none"}const c={sm:24,md:48,lg:80},u="md",I=Object.keys(c);function S(e){return n(I,u,e)}function x(e){return n(o,i,e)}function D(e){if(!a(e))return null;const{ink:r,period:t}=p[e];return`repeating-linear-gradient(${s}, ${l} 0 ${r}px, transparent ${r}px ${t}px)`}export{u as DEFAULT_DIVIDER_SPACING,i as DEFAULT_DIVIDER_STYLE,c as DIVIDER_SPACE_PX,o as DIVIDER_STYLE_OPTIONS,s as STRIPE_ANGLE,E as STRIPE_BAND_HEIGHT_PX,l as STRIPE_INK,a as isStriped,S as parseDividerSpacing,x as parseDividerStyle,D as stripeBackground};
1
+ import{parseOption as n}from"../parse-option.js";const i="line",o=[{label:"None",value:"none"},{label:"Line",value:"line"},{label:"Stripes · fine",value:"stripes-fine"},{label:"Stripes · medium",value:"stripes-medium"},{label:"Stripes · bold",value:"stripes-bold"}],p={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},E=28,s="-45deg",l="color-mix(in oklab, var(--accent) 50%, var(--bg))";function a(e){return e!=="line"&&e!=="none"}const c={sm:24,md:48,lg:80},u="md",I=Object.keys(c);function S(e){return n(I,u,e)}function x(e){return n(o,i,e)}function D(e){if(!a(e))return null;const{ink:r,period:t}=p[e];return`repeating-linear-gradient(${s}, ${l} 0 ${r}px, transparent ${r}px ${t}px)`}export{u as DEFAULT_DIVIDER_SPACING,i as DEFAULT_DIVIDER_STYLE,c as DIVIDER_SPACE_PX,o as DIVIDER_STYLE_OPTIONS,s as STRIPE_ANGLE,E as STRIPE_BAND_HEIGHT_PX,p as STRIPE_GEOMETRY,l as STRIPE_INK,a as isStriped,S as parseDividerSpacing,x as parseDividerStyle,D as stripeBackground};
@@ -1 +1 @@
1
- import{DEFAULT_TINT as y}from"../content/tint.js";import{finiteNumber as m}from"../finite-number.js";import{nonEmptyString as s}from"../non-empty-string.js";import{DEFAULT_OVERLAY_POSITION as u}from"./hero-overlay.js";import{normaliseVideoSource as v}from"../hero-video.js";const S=50,c=["mediaImage","mediaVideo","poster","imageFocal","imageFocalPhone","tintColor","mediaLayout","mediaLayoutPhone","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2","videoSource","youtubeUrl","videoPlayback","_partMotion"],T=["heightDesktop","heightMobile","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","entrance","entrancePhone","entranceFrom","entranceFromPhone","entranceDuration","entranceDurationPhone","entranceDelay","entranceDelayPhone","sectionAnimation","_hidden"],f=new Set(T),b="the Hero does not read this key as a section setting (only the section pass rows both heroes share carry), so it is not copied",l={eyebrow:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleTop:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleLevel:"it set the level of the copy the single Hero stopped drawing on 2026-09-09; a Text block in a box sets its own level",alignment:"its row was deleted on 2026-09-09 with the copy it placed; a box places itself on nine anchors, and the value was drawn by nothing"};function x(p){const e=p.props,a=s(e.id)??"HeroSingle",i=[],r=[],t={id:`${a}~slide`},n={id:`${a}~hero`};t.mediaType=e.mediaType==="video"?"video":"image","mediaType"in e&&i.push({key:"mediaType",home:"HeroSlide.mediaType"}),t.mediaType==="video"&&v(e.videoSource)==="upload"&&(t.videoSpeed=S);for(const o of c)o in e&&(t[o]=e[o],i.push({key:o,home:`HeroSlide.${o}`}));"tintOpacity"in e&&(t.overlay=e.tintOpacity,i.push({key:"tintOpacity",home:"HeroSlide.overlay (Image tint)"})),t.overlayColor=s(e.overlayColor)??y,t.overlayPosition=s(e.overlayPosition)??u,"overlayColor"in e&&i.push({key:"overlayColor",home:"HeroSlide.overlayColor"}),"overlayPosition"in e&&i.push({key:"overlayPosition",home:"HeroSlide.overlayPosition"}),Array.isArray(e.boxes)?(t.groups=e.boxes,i.push({key:"boxes",home:"HeroSlide.groups (the same HeroGroup boxes)"})):"boxes"in e&&i.push({key:"boxes",home:"HeroSlide.groups (none stored)"}),n.textureOpacity=m(e.overlay)??100,"overlay"in e&&i.push({key:"overlay",home:"Hero.textureOpacity (the ramp's opacity)"}),n.showTicker=!1;const d=new Set(["id","mediaType","tintOpacity","overlay","overlayColor","overlayPosition","boxes",...c]);for(const[o,h]of Object.entries(e))if(!d.has(o)){if(o in l){r.push({key:o,why:l[o]});continue}if(!f.has(o)){r.push({key:o,why:b});continue}n[o]=h,i.push({key:o,home:`Hero.${o} (section pass)`})}return n.slides=[{type:"HeroSlide",props:t}],{node:{type:"Hero",props:n},carried:i,dropped:r}}export{T as HERO_SECTION_PASS_KEYS,x as heroSingleToHero};
1
+ import{DEFAULT_TINT as y}from"../content/tint.js";import{finiteNumber as m}from"../finite-number.js";import{nonEmptyString as s}from"../non-empty-string.js";import{DEFAULT_OVERLAY_POSITION as u}from"./hero-overlay.js";import{normaliseVideoSource as v}from"../hero-video.js";const T=50,l=["mediaImage","mediaVideo","poster","imageFocal","imageFocalTablet","imageFocalPhone","tintColor","mediaLayout","mediaLayoutPhone","mediaImage2","imageFocal2","imageFocal2Tablet","imageFocal2Phone","tintColor2","tintOpacity2","videoSource","youtubeUrl","videoPlayback","_partMotion"],S=["heightDesktop","heightMobile","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","entrance","entrancePhone","entranceFrom","entranceFromPhone","entranceDuration","entranceDurationPhone","entranceDelay","entranceDelayPhone","sectionAnimation","_hidden"],b=new Set(S),g="the Hero does not read this key as a section setting (only the section pass rows both heroes share carry), so it is not copied",c={eyebrow:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleTop:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleLevel:"it set the level of the copy the single Hero stopped drawing on 2026-09-09; a Text block in a box sets its own level",alignment:"its row was deleted on 2026-09-09 with the copy it placed; a box places itself on nine anchors, and the value was drawn by nothing"};function x(p){const e=p.props,a=s(e.id)??"HeroSingle",i=[],r=[],t={id:`${a}~slide`},n={id:`${a}~hero`};t.mediaType=e.mediaType==="video"?"video":"image","mediaType"in e&&i.push({key:"mediaType",home:"HeroSlide.mediaType"}),t.mediaType==="video"&&v(e.videoSource)==="upload"&&(t.videoSpeed=T);for(const o of l)o in e&&(t[o]=e[o],i.push({key:o,home:`HeroSlide.${o}`}));"tintOpacity"in e&&(t.overlay=e.tintOpacity,i.push({key:"tintOpacity",home:"HeroSlide.overlay (Image tint)"})),t.overlayColor=s(e.overlayColor)??y,t.overlayPosition=s(e.overlayPosition)??u,"overlayColor"in e&&i.push({key:"overlayColor",home:"HeroSlide.overlayColor"}),"overlayPosition"in e&&i.push({key:"overlayPosition",home:"HeroSlide.overlayPosition"}),Array.isArray(e.boxes)?(t.groups=e.boxes,i.push({key:"boxes",home:"HeroSlide.groups (the same HeroGroup boxes)"})):"boxes"in e&&i.push({key:"boxes",home:"HeroSlide.groups (none stored)"}),n.textureOpacity=m(e.overlay)??100,"overlay"in e&&i.push({key:"overlay",home:"Hero.textureOpacity (the ramp's opacity)"}),n.showTicker=!1;const d=new Set(["id","mediaType","tintOpacity","overlay","overlayColor","overlayPosition","boxes",...l]);for(const[o,h]of Object.entries(e))if(!d.has(o)){if(o in c){r.push({key:o,why:c[o]});continue}if(!b.has(o)){r.push({key:o,why:g});continue}n[o]=h,i.push({key:o,home:`Hero.${o} (section pass)`})}return n.slides=[{type:"HeroSlide",props:t}],{node:{type:"Hero",props:n},carried:i,dropped:r}}export{S as HERO_SECTION_PASS_KEYS,x as heroSingleToHero};
@@ -1 +1 @@
1
- import{BOX_TYPE as i}from"../document/container-blocks.js";import{headingTextSeed as c,labelTextSeed as p}from"../document/text-seeds.js";import{TICKER_SCAFFOLD_ITEMS as P}from"../document/blocks/general/Ticker/meta.js";import{specStripScaffold as S}from"../document/blocks/general/SpecStrip/meta.js";import{TIMELINE_YEAR_BOX as B,TIMELINE_YEAR_HEAD as h}from"./timeline-year-shape.js";import{SPEC_PAD as s,SPEC_STRIP as E,SPEC_TEXT as _,STRIP_BOX as R,TICKER_PAD as b,TICKER_SMALL as y,TICKER_STRIP as C}from"./strip-shape.js";function e(t,n,o,m={}){return{type:t,props:{...n(t),id:o(t),...m}}}function a(t,n,o){return e(i,t,n,{...o,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}const k={Manifesto:(t,n)=>({type:i,props:{...t(i),id:n(i),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[e(i,t,n,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n),e("Stats",t,n)]}),a(t,n,{direction:"column",name:"Picture",content:[]})]}}),Split:(t,n)=>({type:i,props:{...t(i),id:n(i),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[e(i,t,n,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n),e("ButtonBlock",t,n)]}),a(t,n,{direction:"column",name:"Image",content:[e("ImageBlock",t,n)]})]}}),Subscribe:(t,n)=>({type:i,props:{...t(i),id:n(i),direction:"column",name:"Subscribe",content:[e("Text",t,n,c()),e("Text",t,n),e("Form",t,n)]}}),Ticker:(t,n)=>x("Scrolling Bar",C,b,P.map(o=>({text:o.text,style:y,muted:!0})),t,n),SpecStrip:(t,n)=>x("Spec Strip",{...E,sectionBorder:{top:1}},s,S().map(o=>({text:o.text??"",style:_,muted:o.tone==="muted"})),t,n),TimelineTrack:(t,n)=>{const o=m=>e(i,t,n,{...B,name:"Year",sectionPaddingTop:0,sectionPaddingBottom:0,...m?{upcoming:!0}:{},content:[e(i,t,n,{...h,sectionPaddingTop:0,sectionPaddingBottom:0,content:[e("Text",t,n,p()),e("Text",t,n,c())]}),e("Text",t,n)]});return{type:i,props:{...t(i),id:n(i),direction:"column",gap:48,name:"Milestone Timeline",content:[e(i,t,n,{direction:"row",align:"end",justify:"between",share:"content",name:"Heading",content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n)]}),e(i,t,n,{direction:"row",share:"equal",gap:0,line:!0,name:"Years",content:[o(!1),o(!1),o(!0)]}),e("ButtonBlock",t,n)]}}},Timeline:(t,n)=>{const o=()=>e(i,t,n,{direction:"row",share:"biggerRight",gap:24,name:"Chapter",content:[e("Text",t,n,p()),e(i,t,n,{direction:"column",gap:12,name:"Words",content:[e("Text",t,n,c()),e("Text",t,n)]})]});return{type:i,props:{...t(i),id:n(i),direction:"row",share:"bigRight",gap:48,name:"Story Timeline",content:[e(i,t,n,{direction:"column",gap:24,name:"Heading",content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n),e("ImageBlock",t,n),e("ButtonBlock",t,n)]}),e(i,t,n,{direction:"column",gap:48,line:!1,name:"Chapters",content:[o(),o(),o()]})]}}}};function x(t,n,o,m,T,g){return e(i,T,g,{...R,...n,blockSpacing:"gap",padV2:!0,name:t,sectionPaddingTop:o.top,sectionPaddingBottom:o.bottom,sectionPaddingTopPhone:o.topPhone,sectionPaddingBottomPhone:o.bottomPhone,content:m.map(r=>e("Text",T,g,{text:r.text,...r.muted?{tone:"dim"}:{},_partStyles:{text:r.style}}))})}function Y(t){return k[t]??null}export{k as SECTION_PRESETS,Y as presetFor};
1
+ import{BOX_TYPE as i}from"../document/container-blocks.js";import{headingTextSeed as c,labelTextSeed as p}from"../document/text-seeds.js";import{TICKER_SCAFFOLD_ITEMS as P}from"../document/blocks/general/Ticker/meta.js";import{specStripScaffold as S}from"../document/blocks/general/SpecStrip/meta.js";import{TIMELINE_YEAR_BOX as B,TIMELINE_YEAR_HEAD as s}from"./timeline-year-shape.js";import{SPEC_PAD as E,SPEC_STRIP as h,SPEC_TEXT as _,STRIP_BOX as y,TICKER_PAD as R,TICKER_SMALL as b,TICKER_STRIP as C}from"./strip-shape.js";function e(t,n,o,m={}){return{type:t,props:{...n(t),id:o(t),...m}}}function a(t,n,o){return e(i,t,n,{...o,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}const k={Manifesto:(t,n)=>({type:i,props:{...t(i),id:n(i),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[e(i,t,n,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n),e("Stats",t,n)]}),a(t,n,{direction:"column",name:"Picture",content:[]})]}}),Split:(t,n)=>({type:i,props:{...t(i),id:n(i),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[e(i,t,n,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n),e("ButtonBlock",t,n)]}),a(t,n,{direction:"column",name:"Image",content:[e("ImageBlock",t,n)]})]}}),Subscribe:(t,n)=>({type:i,props:{...t(i),id:n(i),direction:"column",name:"Subscribe",content:[e("Text",t,n,c()),e("Text",t,n),e("Form",t,n)]}}),Ticker:(t,n)=>x("Scrolling Bar",C,R,P.map(o=>({text:o.text,style:b,muted:!0})),t,n),SpecStrip:(t,n)=>x("Spec Strip",{...h,sectionBorder:{top:1}},E,S().map(o=>({text:o.text??"",style:_,muted:o.tone==="muted"})),t,n),TimelineTrack:(t,n)=>{const o=m=>e(i,t,n,{...B,name:"Year",sectionPaddingTop:0,sectionPaddingBottom:0,...m?{upcoming:!0}:{},content:[e(i,t,n,{...s,sectionPaddingTop:0,sectionPaddingBottom:0,content:[e("Text",t,n,p()),e("Text",t,n,c())]}),e("Text",t,n)]});return{type:i,props:{...t(i),id:n(i),direction:"column",gap:48,name:"Milestone Timeline",content:[e(i,t,n,{direction:"row",align:"end",justify:"between",share:"content",name:"Heading",content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n)]}),e(i,t,n,{direction:"row",share:"equal",gap:0,line:!0,name:"Years",content:[o(!1),o(!1),o(!0)]}),e("ButtonBlock",t,n)]}}},Timeline:(t,n)=>{const o=()=>e(i,t,n,{direction:"row",share:[25],gap:24,name:"Chapter",content:[e("Text",t,n,p()),e(i,t,n,{direction:"column",gap:12,name:"Words",content:[e("Text",t,n,c()),e("Text",t,n)]})]});return{type:i,props:{...t(i),id:n(i),direction:"row",share:[33],gap:48,name:"Story Timeline",content:[e(i,t,n,{direction:"column",gap:24,name:"Heading",content:[e("Text",t,n,p()),e("Text",t,n,c()),e("Text",t,n),e("ImageBlock",t,n),e("ButtonBlock",t,n)]}),e(i,t,n,{direction:"column",gap:48,line:!1,name:"Chapters",content:[o(),o(),o()]})]}}}};function x(t,n,o,m,T,g){return e(i,T,g,{...y,...n,blockSpacing:"gap",padV2:!0,name:t,sectionPaddingTop:o.top,sectionPaddingBottom:o.bottom,sectionPaddingTopPhone:o.topPhone,sectionPaddingBottomPhone:o.bottomPhone,content:m.map(r=>e("Text",T,g,{text:r.text,...r.muted?{tone:"dim"}:{},_partStyles:{text:r.style}}))})}function Y(t){return k[t]??null}export{k as SECTION_PRESETS,Y as presetFor};
@@ -1,3 +1,3 @@
1
- import{ruleChecks as A}from"./rule.js";const E={text:[0,1,2],textarea:[0,1,2],plainText:[0,1,2],copyText:[0,1,2],plainTextarea:[0,1,2],linkField:[0],textList:[0,2],upload:[0,2],toggle:[0,3],checkbox:[0],select:[0,4],searchSelect:[0,3],segmented:[0],iconPickerRow:[0],multiSelect:[0,2],slider:[0],colorInput:[0],focalPicker:[0],sizeField:[0],backgroundField:[0],cardImageBackgroundField:[0],placementField:[0],pxField:[0],dateTime:[0,2],edgePad:[0,3],blockSourceField:[0,1],phPrev:[1],phHide:[1],phHideDefault:[1],group:[0],section:[0],panelNote:[0]},b=new Set(["value","render","defaultProps","fields","type","arrayFields","icon"]),N=/(^|_)(PH|LABELS?|HINTS?|NOTES?|TITLES?|SWATCH_NAMES|GROUP|REASON|ROWS|PANELS|TABS|LINES)$/,O=new Set(["key","value","id","type","href","slug","kind","cell","set","icon","token","unit","path","url","src","className","variant","mode","side","align","role"]),$=new Set(["hint","coverHint","unsetLabel","emptyLabel","addLabel"]),_=new Set(["say","sayCount"]);function C(t){return/\p{L}/u.test(t)&&t.trim()===t&&t.length>0&&!/^[a-z0-9]+(?:-[a-z0-9]+)+$/.test(t)}const P=/(?:Key|Id|Slug|Href|Url|ClassName)$/;function L(t,p,s={}){const a=new Map,k=new Set(s.skip??[]),S=new Map((s.dataFiles??[]).map(e=>[e.path,e.keys])),u=(e,l)=>{if(!C(e))return;let d=a.get(e);d||a.set(e,d=new Set),d.add(l)},f=e=>e&&(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))?e.text:null,o=e=>{if(!e)return[];const l=f(e);return l!==null?[l]:t.isParenthesizedExpression(e)?o(e.expression):t.isConditionalExpression(e)?[...o(e.whenTrue),...o(e.whenFalse)]:t.isBinaryExpression(e)&&(e.operatorToken.kind===t.SyntaxKind.QuestionQuestionToken||e.operatorToken.kind===t.SyntaxKind.BarBarToken)?[...o(e.left),...o(e.right)]:[]},y=e=>{const l=e.expression;return t.isIdentifier(l)?l.text:t.isPropertyAccessExpression(l)?l.name.text:null},g=e=>e.name&&(t.isIdentifier(e.name)||t.isStringLiteral(e.name))?e.name.text:null;for(const e of p){if(!/\.tsx?$/.test(e.path)||k.has(e.path))continue;const l=S.get(e.path),d=t.createSourceFile(e.path,e.text,t.ScriptTarget.Latest,!0,e.path.endsWith(".tsx")?t.ScriptKind.TSX:t.ScriptKind.TS),T=n=>{if(t.isCallExpression(n)){const r=y(n);if(r&&_.has(r))for(const c of n.arguments){const i=f(c);i!==null&&u(i,e.path)}else if(r&&t.isIdentifier(n.expression)&&Object.prototype.hasOwnProperty.call(E,r)){for(const c of E[r])for(const i of o(n.arguments[c]))u(i,e.path);if(r==="segmented"){const c=n.arguments[2];if(c&&t.isArrayLiteralExpression(c))for(const i of c.elements){const h=f(i);h!==null&&u(h,e.path)}}}}else if(t.isJsxAttribute(n)&&n.name.getText(d)==="label"&&n.initializer&&t.isStringLiteral(n.initializer)&&/^[A-Z]/.test(n.parent.parent.tagName.getText(d).split(".").pop()??""))u(n.initializer.text,e.path);else if(t.isObjectLiteralExpression(n)){const r=n.properties.filter(t.isPropertyAssignment),c=r.find(i=>g(i)==="label");if(c&&r.some(i=>b.has(g(i)??""))){const i=f(c.initializer);i!==null&&u(i,e.path)}for(const i of r){const h=g(i);if(h!==null&&$.has(h))for(const x of o(i.initializer))u(x,e.path)}if(l)for(const i of r){const h=g(i);if(h!==null&&(l==="*"||l.includes(h))){const x=f(i.initializer);x!==null&&u(x,e.path)}}}else if(t.isVariableDeclaration(n)&&t.isIdentifier(n.name)&&N.test(n.name.text)&&n.initializer&&!/CSSProperties|Style\b/.test(n.type?.getText(d)??"")){const r=f(n.initializer);r!==null&&!/^[a-z0-9_]+$/.test(r)&&u(r,e.path);const c=i=>{const h=t.isPropertyAssignment(i)?g(i)??"":"";if(t.isPropertyAssignment(i)&&!O.has(h)&&!P.test(h)){const x=f(i.initializer);x!==null&&u(x,e.path)}t.forEachChild(i,c)};c(n.initializer)}t.forEachChild(n,T)};T(d)}const m=new Map;for(const e of[...a.keys()].sort(w))s.known?.has(e)||m.set(e,[...a.get(e)].sort());return m}function w(t,p){return t<p?-1:t>p?1:0}function R(t,p){return["/**",...p.header.map(a=>a?` * ${a}`:" *")," */",`export const ${p.constant} = {`,...[...t].map(a=>` ${JSON.stringify(a)}: ${JSON.stringify(a)},`),"} as const;","",`/** Every phrase of {@link ${p.constant}}: what a host's words are keyed by. */`,`export type ${p.phraseType} = keyof typeof ${p.constant};`,""].join(`
1
+ import{ruleChecks as A}from"./rule.js";const E={text:[0,1,2],textarea:[0,1,2],plainText:[0,1,2],copyText:[0,1,2],plainTextarea:[0,1,2],linkField:[0],textList:[0,2],upload:[0,2],toggle:[0,3],checkbox:[0],select:[0,4],searchSelect:[0,3],segmented:[0],iconPickerRow:[0],shapePickerRow:[0],multiSelect:[0,2],slider:[0],colorInput:[0],focalPicker:[0],sizeField:[0],backgroundField:[0],cardImageBackgroundField:[0],placementField:[0],pxField:[0],dateTime:[0,2],edgePad:[0,3],blockSourceField:[0,1],phPrev:[1],phHide:[1],phHideDefault:[1],group:[0],section:[0],panelNote:[0]},b=new Set(["value","render","defaultProps","fields","type","arrayFields","icon","shape"]),N=/(^|_)(PH|LABELS?|HINTS?|NOTES?|TITLES?|SWATCH_NAMES|GROUP|REASON|ROWS|PANELS|TABS|LINES)$/,O=new Set(["key","value","id","type","href","slug","kind","cell","set","icon","token","unit","path","url","src","className","variant","mode","side","align","role"]),$=new Set(["hint","coverHint","unsetLabel","emptyLabel","addLabel"]),P=new Set(["say","sayCount"]);function _(t){return/\p{L}/u.test(t)&&t.trim()===t&&t.length>0&&!/^[a-z0-9]+(?:-[a-z0-9]+)+$/.test(t)}const C=/(?:Key|Id|Slug|Href|Url|ClassName)$/;function w(t,p,s={}){const a=new Map,k=new Set(s.skip??[]),S=new Map((s.dataFiles??[]).map(e=>[e.path,e.keys])),u=(e,l)=>{if(!_(e))return;let d=a.get(e);d||a.set(e,d=new Set),d.add(l)},f=e=>e&&(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))?e.text:null,o=e=>{if(!e)return[];const l=f(e);return l!==null?[l]:t.isParenthesizedExpression(e)?o(e.expression):t.isConditionalExpression(e)?[...o(e.whenTrue),...o(e.whenFalse)]:t.isBinaryExpression(e)&&(e.operatorToken.kind===t.SyntaxKind.QuestionQuestionToken||e.operatorToken.kind===t.SyntaxKind.BarBarToken)?[...o(e.left),...o(e.right)]:[]},y=e=>{const l=e.expression;return t.isIdentifier(l)?l.text:t.isPropertyAccessExpression(l)?l.name.text:null},g=e=>e.name&&(t.isIdentifier(e.name)||t.isStringLiteral(e.name))?e.name.text:null;for(const e of p){if(!/\.tsx?$/.test(e.path)||k.has(e.path))continue;const l=S.get(e.path),d=t.createSourceFile(e.path,e.text,t.ScriptTarget.Latest,!0,e.path.endsWith(".tsx")?t.ScriptKind.TSX:t.ScriptKind.TS),T=n=>{if(t.isCallExpression(n)){const r=y(n);if(r&&P.has(r))for(const c of n.arguments){const i=f(c);i!==null&&u(i,e.path)}else if(r&&t.isIdentifier(n.expression)&&Object.prototype.hasOwnProperty.call(E,r)){for(const c of E[r])for(const i of o(n.arguments[c]))u(i,e.path);if(r==="segmented"){const c=n.arguments[2];if(c&&t.isArrayLiteralExpression(c))for(const i of c.elements){const h=f(i);h!==null&&u(h,e.path)}}}}else if(t.isJsxAttribute(n)&&n.name.getText(d)==="label"&&n.initializer&&t.isStringLiteral(n.initializer)&&/^[A-Z]/.test(n.parent.parent.tagName.getText(d).split(".").pop()??""))u(n.initializer.text,e.path);else if(t.isObjectLiteralExpression(n)){const r=n.properties.filter(t.isPropertyAssignment),c=r.find(i=>g(i)==="label");if(c&&r.some(i=>b.has(g(i)??""))){const i=f(c.initializer);i!==null&&u(i,e.path)}for(const i of r){const h=g(i);if(h!==null&&$.has(h))for(const x of o(i.initializer))u(x,e.path)}if(l)for(const i of r){const h=g(i);if(h!==null&&(l==="*"||l.includes(h))){const x=f(i.initializer);x!==null&&u(x,e.path)}}}else if(t.isVariableDeclaration(n)&&t.isIdentifier(n.name)&&N.test(n.name.text)&&n.initializer&&!/CSSProperties|Style\b/.test(n.type?.getText(d)??"")){const r=f(n.initializer);r!==null&&!/^[a-z0-9_]+$/.test(r)&&u(r,e.path);const c=i=>{const h=t.isPropertyAssignment(i)?g(i)??"":"";if(t.isPropertyAssignment(i)&&!O.has(h)&&!C.test(h)){const x=f(i.initializer);x!==null&&u(x,e.path)}t.forEachChild(i,c)};c(n.initializer)}t.forEachChild(n,T)};T(d)}const m=new Map;for(const e of[...a.keys()].sort(L))s.known?.has(e)||m.set(e,[...a.get(e)].sort());return m}function L(t,p){return t<p?-1:t>p?1:0}function R(t,p){return["/**",...p.header.map(a=>a?` * ${a}`:" *")," */",`export const ${p.constant} = {`,...[...t].map(a=>` ${JSON.stringify(a)}: ${JSON.stringify(a)},`),"} as const;","",`/** Every phrase of {@link ${p.constant}}: what a host's words are keyed by. */`,`export type ${p.phraseType} = keyof typeof ${p.constant};`,""].join(`
2
2
  `)}function I(t,p,s){const{check:a,report:k}=A("editor words");{const f=[{path:"fixture.tsx",text:['const a = say("Delete {name}", { name });','const b = sayCount("{n} page", "{n} pages", n);','const c = text("Heading", "Main heading", "A hint");','const d = select("Align", icon, [{ label: "Left", value: "left" }], "left", "A note");','const e = segmented("Size", icon, ["Small", "Large"], "Small");','const SERIES_PH = { headTitle: "Section heading", link: "#" };','export const CORNER_SIDES_LABEL = "Corner sides";','const VIEW_TIER_LABEL = { desktop: "Desktop" };',"const DEFAULT_LABEL_KEY = 12;",'const FOCUS_HINT: CSSProperties = { display: "flex" };','const LAYOUT_TABS = "tabs";','const TEMPLATE_GROUP = { group: "Template pages", groupKey: "template" };','const a4 = <MenuLink label="text-fg" />;','const THEME_COLOUR_ROWS = [{ key: "fg", label: "Text color" }, { group: "Borders" }];','const a1 = <GroupLabel label="Wording" />;','const a2 = <input label="raw" />;','const a3 = say("Already listed");','const f = toggle("Show", false, "not-a-word");','const i = pxField("Corners", { min: 0, unsetLabel: on ? "Square" : "Round", hint: opts?.hint ?? "Rounds it." });','const g = { label: "Content", href: "/" };',"const h = say(`${x} colour`);"].join(`
3
- `)},{path:"names.ts",text:'export const N = [{ key: "openers", title: "Hero & intros", sections: [{ type: "Hero", label: "Hero Slideshow" }] }];'},{path:"block.tsx",text:'export const B = { label: "Banner", fields: {}, defaultProps: { cta: { label: "Shop now", href: "/" } } };'}],o=[...L(t,f,{dataFiles:[{path:"names.ts",keys:["title"]}],known:new Set(["Already listed"])}).keys()],y=["A hint","A note","Align","Banner","Borders","Corner sides","Corners","Round","Rounds it.","Square","Template pages","Text color","Wording","Desktop","Delete {name}","Heading","Hero & intros","Hero Slideshow","Large","Left","Main heading","Section heading","Show","Size","Small","{n} page","{n} pages"].sort(w);a("the reader reads every shape on a fixture, and no value, link or built phrase",JSON.stringify(o)===JSON.stringify(y),`read ${JSON.stringify(o)}`)}const S=L(t,p,s);a(`the source says at least ${s.floor} phrases`,S.size>=s.floor,`read ${S.size}: the reader broke, or the editor stopped saying its words through it`);const u=R(S.keys(),s.shape);if(!s.catalogue)a("the catalogue exists",!1,`run ${s.write}`);else{const f=s.catalogue.text===u;let o;if(!f){const y=new Set([...s.catalogue.text.matchAll(/^ {2}("(?:[^"\\]|\\.)*"): /gm)].map(e=>JSON.parse(e[1]))),g=[...S.keys()].filter(e=>!y.has(e)),m=[...y].filter(e=>!S.has(e));o=`${s.catalogue.path} is not what the source says — run ${s.write}. Missing ${g.length}${g.length?` (${g.slice(0,5).map(e=>JSON.stringify(e)).join(", ")}…)`:""}; no longer said ${m.length}${m.length?` (${m.slice(0,5).map(e=>JSON.stringify(e)).join(", ")}…)`:""}.`}a(`${s.catalogue.path} lists exactly the ${S.size} phrases the source says`,f,o)}return k()}export{E as BUILDER_WORDS,L as editorPhrases,I as editorWordsCatalogue,R as editorWordsCatalogueText,C as isPhrase};
3
+ `)},{path:"names.ts",text:'export const N = [{ key: "openers", title: "Hero & intros", sections: [{ type: "Hero", label: "Hero Slideshow" }] }];'},{path:"block.tsx",text:'export const B = { label: "Banner", fields: {}, defaultProps: { cta: { label: "Shop now", href: "/" } } };'}],o=[...w(t,f,{dataFiles:[{path:"names.ts",keys:["title"]}],known:new Set(["Already listed"])}).keys()],y=["A hint","A note","Align","Banner","Borders","Corner sides","Corners","Round","Rounds it.","Square","Template pages","Text color","Wording","Desktop","Delete {name}","Heading","Hero & intros","Hero Slideshow","Large","Left","Main heading","Section heading","Show","Size","Small","{n} page","{n} pages"].sort(L);a("the reader reads every shape on a fixture, and no value, link or built phrase",JSON.stringify(o)===JSON.stringify(y),`read ${JSON.stringify(o)}`)}const S=w(t,p,s);a(`the source says at least ${s.floor} phrases`,S.size>=s.floor,`read ${S.size}: the reader broke, or the editor stopped saying its words through it`);const u=R(S.keys(),s.shape);if(!s.catalogue)a("the catalogue exists",!1,`run ${s.write}`);else{const f=s.catalogue.text===u;let o;if(!f){const y=new Set([...s.catalogue.text.matchAll(/^ {2}("(?:[^"\\]|\\.)*"): /gm)].map(e=>JSON.parse(e[1]))),g=[...S.keys()].filter(e=>!y.has(e)),m=[...y].filter(e=>!S.has(e));o=`${s.catalogue.path} is not what the source says — run ${s.write}. Missing ${g.length}${g.length?` (${g.slice(0,5).map(e=>JSON.stringify(e)).join(", ")}…)`:""}; no longer said ${m.length}${m.length?` (${m.slice(0,5).map(e=>JSON.stringify(e)).join(", ")}…)`:""}.`}a(`${s.catalogue.path} lists exactly the ${S.size} phrases the source says`,f,o)}return k()}export{E as BUILDER_WORDS,w as editorPhrases,I as editorWordsCatalogue,R as editorWordsCatalogueText,_ as isPhrase};
@@ -1,7 +1,7 @@
1
- import{ruleChecks as R}from"./rule.js";import{blockSource as E,registryFiles as k}from"./support/registry-source.js";import{isDocumentPath as S}from"./support/document-folder.js";const j="lib/document/controls.tsx",P=["slider","select","segmented","textList"];function x(c){return/icon=\{<([A-Z][A-Za-z0-9]*Icon)\s*\/>\}/.exec(c)?.[1]??/<([A-Z][A-Za-z0-9]*Icon)\s*\/>/.exec(c)?.[1]??/<FieldGlyph noun="([a-z]+)"/.exec(c)?.[1]??"none"}function y(c){const l=new Map;for(const s of c)s.text.split(`
2
- `).forEach((t,p)=>{const a=t.trim();if(!(a.startsWith("//")||a.startsWith("*")||a.startsWith("/*")))for(const h of P){if(new RegExp(`^(export )?function ${h}\\(`).test(a))continue;const d=t.match(new RegExp(`(^|[^.\\w])${h}\\(\\s*"([^"]+)"`));d&&l.set(d[2],[...l.get(d[2])??[],{file:s,line:p+1,builder:h}])}});return l}function I(c){const l=[];for(const s of c)s.text.split(`
3
- `).forEach((t,p)=>{const a=t.match(/<SettingsField\s+label=(?:\{say\()?"([^"]+)"/);a&&l.push({file:s.path,line:p+1,label:a[1].trim(),glyph:x(t)})});return l}function N(c,l,s){const{check:t,report:p}=R("mirrored rows agree"),a=s.mirrored??[],h=s.sameWord??[];{const e={path:"fixture.tsx",text:["export function select(label: string) {}",'const a = select("Product", <BoxIcon />, options);','// select("In a comment", <BoxIcon />)','const b = usePreviewParts().select("Not a row");','const c = <SettingsField label="Product" icon={<BoxIcon />}>{x}</SettingsField>;'].join(`
4
- `)},o=y([e]),n=I([e]);t("the builder-label reader finds a call, and not its declaration, a comment or another object's method",[...o.keys()].join()==="Product"&&o.get("Product")?.[0].line===2,JSON.stringify([...o.keys()])),t("the row reader finds a hand-drawn row and the glyph it wears",n.length===1&&n[0].label==="Product"&&n[0].glyph==="BoxIcon",JSON.stringify(n))}const d=l.find(e=>S(e.path,"controls.tsx"));for(const e of a){const o=d?new RegExp(`export const ${e.constant} = \\{[\\s\\S]*?\\} as const;`).exec(d.text):null;t(`${e.constant} is declared in ${j}`,o!==null),o&&(t("…and carries the label",/label:\s*"/.test(o[0]),o[0].slice(0,120)),t("…and carries the glyph",/icon:\s*</.test(o[0]),o[0].slice(0,120)));let n=null;try{n=E(c,l,e.declaredIn)}catch{n=null}t(`read the ${e.declaredIn} block`,n!==null,`no block "${e.declaredIn}" among the files handed in`);const r=l.find(i=>i.path===e.drawnIn)?.text??null;t(`read ${e.drawnIn}`,r!==null);for(const[i,$]of[[`the ${e.declaredIn} block`,n],[e.drawnIn,r]])$!==null&&(t(`${i} spreads ${e.constant}`,new RegExp(`${e.constant}\\.(label|icon)`).test($)),t(`…and no longer hard-codes "${e.row}"`,!new RegExp(`"${e.row}"`).test($),`${i} still contains the literal`))}t(`the mirrored pairs were checked (${a.length}, at least ${s.floors.pairs}; an empty sweep proves nothing)`,a.length>=s.floors.pairs);const f=y([...k(l),...d?[d]:[]]),m=l.filter(e=>/^components\/[^/]+\.tsx$/.test(e.path)),u=I(m),g=[],w=[];for(const e of u){if(!f.has(e.label))continue;if(h.includes(e.label)){w.push({at:`${e.file}:${e.line}`,label:e.label,glyph:e.glyph});continue}const o=(f.get(e.label)??[]).map(n=>`${n.builder} @ ${n.file.path}:${n.line}`).join(" · ");g.push(`${e.file}:${e.line} "${e.label}" — also ${o}`)}t(`the builder-label scan read something (${f.size} labels, at least ${s.floors.labels})`,f.size>=s.floors.labels),t(`the component scan read something (${u.length} hand-drawn rows in ${m.length} component files, at least ${s.floors.panelRows})`,u.length>=s.floors.panelRows),t("no NEW hard-coded mirror",g.length===0,`
1
+ import{ruleChecks as R}from"./rule.js";import{blockSource as k,registryFiles as E}from"./support/registry-source.js";import{isDocumentPath as P}from"./support/document-folder.js";const S="lib/document/controls.tsx",j=["slider","select","segmented","textList","iconPickerRow","shapePickerRow"];function x(a){return/icon=\{<([A-Z][A-Za-z0-9]*Icon)\s*\/>\}/.exec(a)?.[1]??/<([A-Z][A-Za-z0-9]*Icon)\s*\/>/.exec(a)?.[1]??/<FieldGlyph noun="([a-z]+)"/.exec(a)?.[1]??"none"}function y(a){const l=new Map;for(const s of a)s.text.split(`
2
+ `).forEach((t,p)=>{const c=t.trim();if(!(c.startsWith("//")||c.startsWith("*")||c.startsWith("/*")))for(const h of j){if(new RegExp(`^(export )?function ${h}\\(`).test(c))continue;const d=t.match(new RegExp(`(^|[^.\\w])${h}\\(\\s*"([^"]+)"`));d&&l.set(d[2],[...l.get(d[2])??[],{file:s,line:p+1,builder:h}])}});return l}function I(a){const l=[];for(const s of a)s.text.split(`
3
+ `).forEach((t,p)=>{const c=t.match(/<SettingsField\s+label=(?:\{say\()?"([^"]+)"/);c&&l.push({file:s.path,line:p+1,label:c[1].trim(),glyph:x(t)})});return l}function N(a,l,s){const{check:t,report:p}=R("mirrored rows agree"),c=s.mirrored??[],h=s.sameWord??[];{const e={path:"fixture.tsx",text:["export function select(label: string) {}",'const a = select("Product", <BoxIcon />, options);','// select("In a comment", <BoxIcon />)','const b = usePreviewParts().select("Not a row");','const c = <SettingsField label="Product" icon={<BoxIcon />}>{x}</SettingsField>;'].join(`
4
+ `)},o=y([e]),n=I([e]);t("the builder-label reader finds a call, and not its declaration, a comment or another object's method",[...o.keys()].join()==="Product"&&o.get("Product")?.[0].line===2,JSON.stringify([...o.keys()])),t("the row reader finds a hand-drawn row and the glyph it wears",n.length===1&&n[0].label==="Product"&&n[0].glyph==="BoxIcon",JSON.stringify(n))}const d=l.find(e=>P(e.path,"controls.tsx"));for(const e of c){const o=d?new RegExp(`export const ${e.constant} = \\{[\\s\\S]*?\\} as const;`).exec(d.text):null;t(`${e.constant} is declared in ${S}`,o!==null),o&&(t("…and carries the label",/label:\s*"/.test(o[0]),o[0].slice(0,120)),t("…and carries the glyph",/icon:\s*</.test(o[0]),o[0].slice(0,120)));let n=null;try{n=k(a,l,e.declaredIn)}catch{n=null}t(`read the ${e.declaredIn} block`,n!==null,`no block "${e.declaredIn}" among the files handed in`);const r=l.find(i=>i.path===e.drawnIn)?.text??null;t(`read ${e.drawnIn}`,r!==null);for(const[i,$]of[[`the ${e.declaredIn} block`,n],[e.drawnIn,r]])$!==null&&(t(`${i} spreads ${e.constant}`,new RegExp(`${e.constant}\\.(label|icon)`).test($)),t(`…and no longer hard-codes "${e.row}"`,!new RegExp(`"${e.row}"`).test($),`${i} still contains the literal`))}t(`the mirrored pairs were checked (${c.length}, at least ${s.floors.pairs}; an empty sweep proves nothing)`,c.length>=s.floors.pairs);const f=y([...E(l),...d?[d]:[]]),m=l.filter(e=>/^components\/[^/]+\.tsx$/.test(e.path)),u=I(m),g=[],w=[];for(const e of u){if(!f.has(e.label))continue;if(h.includes(e.label)){w.push({at:`${e.file}:${e.line}`,label:e.label,glyph:e.glyph});continue}const o=(f.get(e.label)??[]).map(n=>`${n.builder} @ ${n.file.path}:${n.line}`).join(" · ");g.push(`${e.file}:${e.line} "${e.label}" — also ${o}`)}t(`the builder-label scan read something (${f.size} labels, at least ${s.floors.labels})`,f.size>=s.floors.labels),t(`the component scan read something (${u.length} hand-drawn rows in ${m.length} component files, at least ${s.floors.panelRows})`,u.length>=s.floors.panelRows),t("no NEW hard-coded mirror",g.length===0,`
5
5
  ${g.join(`
6
6
  `)}`);const b=h.filter(e=>!f.has(e));t("no same-word entry has outlived its subject",b.length===0,b.join(" · "));for(const e of h){const o=new Set,n=[];for(const r of w.filter(i=>i.label===e))o.add(r.glyph),n.push(`${r.at} → ${r.glyph}`);for(const r of f.get(e)??[]){const i=x(r.file.text.split(`
7
7
  `).slice(r.line-1,r.line+6).join(`
@@ -0,0 +1,7 @@
1
+ import type * as TS from "typescript";
2
+ import { type RuleReport, type SourceFile } from "./rule.js";
3
+ export type ShapeRowsOptions = {
4
+ readonly selectRows: readonly string[];
5
+ readonly minFiles: number;
6
+ };
7
+ export declare function shapeRowsUseThePicker(ts: typeof TS, files: readonly SourceFile[], options: ShapeRowsOptions): RuleReport;
@@ -0,0 +1,2 @@
1
+ import{isRuleSource as b,ruleChecks as S}from"./rule.js";const k=new Set(["Select","SettingsSelect","FieldSelect"]);function u(s,n){const i=s.createSourceFile(n.path,n.text,s.ScriptTarget.Latest,!0,s.ScriptKind.TSX),r=[],p=[],c=e=>i.getLineAndCharacterOfPosition(e.getStart(i)).line+1,d=e=>{let t=e;for(;t&&(s.isAsExpression(t)||s.isSatisfiesExpression(t)||s.isParenthesizedExpression(t));)t=t.expression;return t},a=e=>e?s.isStringLiteralLike(e)?e.text:e.getText(i):"(no label)",x=e=>e.name&&(s.isIdentifier(e.name)||s.isStringLiteralLike(e.name))?e.name.text:void 0,f=(e,t)=>{for(const o of e.properties)if(x(o)===t){if(s.isPropertyAssignment(o))return o.initializer;if(s.isShorthandPropertyAssignment(o))return o.name}},h=e=>{const t=e.parent;return s.isCallExpression(t)&&s.isIdentifier(t.expression)&&t.expression.text==="describedAs"&&t.arguments[1]===e},m=e=>{if(s.isCallExpression(e)){const t=e.arguments[0];(s.isIdentifier(e.expression)&&e.expression.text==="select"||s.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="select")&&e.arguments.length>=2&&t&&!s.isObjectLiteralExpression(t)&&r.push(`${n.path}|${a(t)}`);const l=e.arguments[1];(e.expression.getText(i).endsWith("createElement")||s.isIdentifier(e.expression)&&e.expression.text==="h")&&t&&t.getText(i).replace(/<[\s\S]*>$/,"")==="IconPicker"&&l&&s.isObjectLiteralExpression(l)&&l.properties.some(y=>x(y)==="emptyValue")&&p.push(c(l))}if(s.isImportSpecifier(e)&&e.propertyName&&(e.propertyName.text==="select"||e.propertyName.text==="IconPicker")&&r.push(`${n.path}|alias ${e.name.text}`),s.isBindingElement(e)&&e.propertyName&&s.isIdentifier(e.propertyName)&&e.propertyName.text==="select"&&r.push(`${n.path}|alias ${e.name.getText(i)}`),(s.isJsxOpeningElement(e)||s.isJsxSelfClosingElement(e))&&k.has(e.tagName.getText(i))){const t=e.attributes.properties.find(l=>s.isJsxAttribute(l)&&l.name.getText(i)==="label"),o=t&&s.isJsxAttribute(t)?t.initializer:void 0;r.push(`${n.path}|<${e.tagName.getText(i)}> ${o?a(s.isJsxExpression(o)?o.expression:o):"(no label)"}`)}if(s.isObjectLiteralExpression(e))for(const t of["type","kind"]){const o=d(f(e,t));o&&s.isStringLiteralLike(o)&&o.text==="select"&&!h(e)&&r.push(`${n.path}|${a(f(e,"label"))}`)}s.isJsxAttribute(e)&&e.name.getText(i)==="emptyValue"&&e.parent.parent.tagName.getText(i)==="IconPicker"&&p.push(c(e)),s.isJsxSpreadAttribute(e)&&e.parent.parent.tagName.getText(i)==="IconPicker"&&p.push(c(e)),s.forEachChild(e,m)};return m(i),{selects:r,emptyValues:p}}function g(s){const n=new Map;for(const i of s)n.set(i,(n.get(i)??0)+1);return n}function A(s,n,i){const{check:r,report:p}=S("shape rows use the picker");{const e=['const a = select("Corner shape", icon, options);','const b = { type: "select", label: "Card shape", options };','const c = { type: "select" as const, label: LABEL, options };',"const d = select(item);",'const e = iconPickerRow("Corner shape", icon, options, "a");','const f = <IconPicker label="x" emptyValue="none" options={o} />;','const g = <IconPicker label="x" options={o} />;','const h = <Other emptyValue="none" />;','// select("A comment", icon) is not a use','const i = select(say("Said"), icon, options);',"const j = select(LABELS.x, icon, options);","const k = select(`A ${b}`, icon, options);",'const l = { "type": "select", label, options };',"const m = select({ index }, other);",'import { select as pick } from "x";','const n = createElement(IconPicker<V>, { label: "x", emptyValue: "none" });','const o = createElement(IconPicker, { label: "x" });','const p = rows.select("By a member", icon, options);',"const { select: q } = rows;",'const r = { type: "select" satisfies string, label: "Satisfied", options };','const s = { kind: "select", label: "A kind", options };','const t = <SettingsSelect label="Hand drawn" options={o} />;',"const u = <FieldSelect value={v} options={o} />;",'const v = <IconPicker label="x" {...rest} />;','import { IconPicker as Pick } from "x";','const w = describedAs(field, { type: "select", label: "Described" });',"const x = rows.select(item);"].join(`
2
+ `),t=u(s,{path:"f.tsx",text:e});r("R1 finds the builder and both field forms, and nothing else",JSON.stringify(t.selects)===JSON.stringify(["f.tsx|Corner shape","f.tsx|Card shape","f.tsx|LABEL",'f.tsx|say("Said")',"f.tsx|LABELS.x","f.tsx|`A ${b}`","f.tsx|label","f.tsx|alias pick","f.tsx|By a member","f.tsx|alias q","f.tsx|Satisfied","f.tsx|A kind","f.tsx|<SettingsSelect> Hand drawn","f.tsx|<FieldSelect> (no label)","f.tsx|alias Pick"]),JSON.stringify(t.selects)),r("R2 finds emptyValue on an IconPicker only, in both forms, and a spread",JSON.stringify(t.emptyValues)==="[6,16,24]",JSON.stringify(t.emptyValues))}const c=n.filter(e=>/\.tsx?$/.test(e.path)&&!e.path.endsWith(".d.ts")&&!b(e.path)),d=[],a=[];for(const e of c){const t=u(s,e);d.push(...t.selects),t.emptyValues.forEach(o=>a.push(`${e.path}:${o}`))}const x=g(d),f=g(i.selectRows),h=[...x].filter(([e,t])=>t>(f.get(e)??0)).map(([e])=>e).sort(),m=[...f].filter(([e,t])=>t>(x.get(e)??0)).map(([e])=>e);return r("R1 every select row is on the repository's list",h.length===0,`${h.join(", ")}: a row that picks between shapes uses iconPickerRow or shapePickerRow; a row that picks words joins the list`),r("R1 every name on the list is still a select row",m.length===0,`${m.join(", ")}: remove the entry`),r("R2 no IconPicker takes emptyValue",a.length===0,`${a.join(", ")}: use pickerNoneIcon, so the closed word has the size of every other`),r(`walked the source (${c.length} TS/TSX files, at least ${i.minFiles})`,c.length>=i.minFiles),p()}export{A as shapeRowsUseThePicker};
@@ -1,11 +1,4 @@
1
- import type { TextStyle, TextStyleColour } from "efficient-easel/text-styles";
1
+ import type { TextStyleColour, TextStyleColourNameOf } from "efficient-easel/text-styles";
2
2
  import { type ThemeValue } from "../theme.js";
3
3
  export declare function siteTextColours(theme: ThemeValue): TextStyleColour[];
4
- export declare function siteTextColoursNotOffered(theme: ThemeValue): TextStyleColour[];
5
- export declare function showColoursNotOffered(list: readonly TextStyle[], notOffered: readonly TextStyleColour[]): TextStyle[];
6
- export declare function keepColoursNotOffered(next: readonly TextStyle[], cur: readonly TextStyle[], stored: readonly {
7
- id: string;
8
- values: {
9
- color?: string;
10
- };
11
- }[], notOffered: readonly TextStyleColour[]): TextStyle[];
4
+ export declare function siteTextColourNameOf(theme: ThemeValue): TextStyleColourNameOf;
@@ -1 +1 @@
1
- import{partThemeColors as m}from"../document/part-inks.js";import{normalizeThemeColors as d,selectedThemeColors as s}from"../theme.js";const c="background";function i(r){const e=d(s(r));return m({main:e.accent,text:e.text,background:e.background,muted:e.muted}).map(o=>({key:o.name,name:o.label??o.name,value:o.value}))}function v(r){return i(r).filter(e=>e.key!==c)}function x(r){return i(r).filter(e=>e.key===c)}function C(r,e){return r.map(o=>{const t=e.find(n=>n.key===o.values.color);return t?{...o,values:{...o.values,color:t.value}}:o})}function T(r,e,o,t){return r.map(n=>{if(e.some(u=>u.id===n.id))return n;const l=e.filter(u=>u.kind===n.kind).at(-1),f=o.find(u=>u.id===l?.id)?.values.color,a=t.find(u=>u.key===f);return a&&a.value===n.values.color?{...n,values:{...n.values,color:a.key}}:n})}export{T as keepColoursNotOffered,C as showColoursNotOffered,v as siteTextColours,x as siteTextColoursNotOffered};
1
+ import{partColourName as m,partThemeColors as c}from"../document/part-inks.js";import{normalizeThemeColors as l,selectedThemeColors as i}from"../theme.js";const n="background";function a(r){const e=l(i(r));return c({main:e.accent,text:e.text,background:e.background,muted:e.muted}).map(o=>({key:o.name,name:o.label??o.name,value:o.value}))}function d(r){return a(r).filter(e=>e.key!==n)}function k(r){const e=a(r).filter(o=>o.key===n);return o=>{const t=m(o);return e.find(u=>u.key===t)?.value??t}}export{k as siteTextColourNameOf,d as siteTextColours};
@@ -4,7 +4,8 @@ export interface BreadcrumbItem {
4
4
  }
5
5
  export interface BreadcrumbProps {
6
6
  items?: BreadcrumbItem[];
7
+ current?: string;
7
8
  meta?: string;
8
9
  editing?: boolean;
9
10
  }
10
- export default function Breadcrumb({ items, meta, editing }: BreadcrumbProps): import("react").JSX.Element | null;
11
+ export default function Breadcrumb({ items, current, meta, editing }: BreadcrumbProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as s,Fragment as p}from"react/jsx-runtime";import{Fragment as f}from"react";import{SiteLink as d}from"../lib/site-runtime.js";import{renderChrome as m,renderGold as x}from"./goldPhrases.js";import{say as h}from"../../format/lib/editor-words.js";function u({items:o,meta:a,editing:c=!1}){const l=(o??[]).filter(e=>e?.label?.trim()),t=l.length>0?l:c?[{label:h("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 i=n===t.length-1;return s(f,{children:[n>0&&r("span",{className:"opacity-40",children:"/"}),e.href&&!i?r(d,{href:e.href,className:"hover:text-fg",children:m(e.label)}):r("span",{className:i?"text-fg":void 0,children:m(e.label)})]},n)}),a&&s(p,{children:[r("span",{className:"opacity-40",children:"·"}),r("span",{children:x(a)})]})]})})}export{u as default};
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 g}from"../../format/lib/editor-words.js";function u({items:p,current:l,meta:t,editing:d=!1}){const i=(p??[]).filter(e=>e?.label?.trim()),m=l?.trim()?[...i,{label:l}]:i,a=m.length>0?m:d?[{label:g("Breadcrumb")}]:[];return a.length===0&&!t?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:[a.map((e,n)=>{const o=n===a.length-1;return s(x,{children:[n>0&&r("span",{className:"opacity-40",children:"/"}),e.href&&!o?r(h,{href:e.href,className:"hover:text-fg",children:c(e.label)}):r("span",{className:o?"text-fg":void 0,children:c(e.label)})]},n)}),t&&s(f,{children:[r("span",{className:"opacity-40",children:"·"}),r("span",{children:b(t)})]})]})})}export{u as default};
@@ -16,7 +16,7 @@ export declare function useCardRow(): CardRow | null;
16
16
  export declare function CardRowDrawn({ type, props, children, }: {
17
17
  type: string;
18
18
  props: Record<string, unknown>;
19
- children: (drawn: Record<string, unknown>, at: CardRow | null) => ReactNode;
19
+ children: (drawn: Record<string, unknown>, at: CardRow | null, row: SourceRow | null) => ReactNode;
20
20
  }): import("react").JSX.Element;
21
21
  type CardTemplateRowsProps = {
22
22
  ownerId: string;
@@ -1 +1 @@
1
- "use client";import{Fragment as s,jsx as r,jsxs as h}from"react/jsx-runtime";import{createContext as x,useContext as i}from"react";import{REPEAT_ATTRIBUTE as w,REPEAT_INDEX_ATTRIBUTE as S}from"efficient-easel/draw";import{CARD_TEMPLATE_SLOT as P,rowFilledProps as j}from"../../format/lib/content/card-template.js";import{CARD_STATE_LINE_CLASS as D,cardStateAttrs as I,cardStateValue as L}from"../../format/lib/content/card-state.js";const c=x(null);function U(){return i(c)}function $({type:a,props:u,children:t}){const n=i(c);return r(s,{children:t(j(a,u,n?.row),n)})}function b({ownerId:a,ownerType:u,Template:t,rows:n,items:E,states:T,fallback:_,wrapCopy:l,children:A}){const C=i(c);if(!t||(t.blockCount??0)<=0)return r(s,{children:_});const R=C!==null,f=n.map((p,o)=>{const e=T?.[o],d={row:p,index:o,ownerType:u,item:E?.[o],nested:R,...e?{state:e}:null},m=r("div",{[w]:`${a}:${P}`,[S]:o,...I(e),children:L(e)?h(s,{children:[r(t,{}),r("span",{"aria-hidden":"true",className:D})]}):r(t,{})});return r(c.Provider,{value:d,children:l?l(m,d):m},o)});return r(s,{children:A(f)})}export{c as CardRowContext,$ as CardRowDrawn,b as CardTemplateRows,U as useCardRow};
1
+ "use client";import{Fragment as c,jsx as r,jsxs as w}from"react/jsx-runtime";import{createContext as h,useContext as l}from"react";import{REPEAT_ATTRIBUTE as x,REPEAT_INDEX_ATTRIBUTE as P}from"efficient-easel/draw";import{CARD_TEMPLATE_SLOT as S,rowFilledProps as g}from"../../format/lib/content/card-template.js";import{CARD_STATE_LINE_CLASS as j,cardStateAttrs as D,cardStateValue as I}from"../../format/lib/content/card-state.js";import{usePageRecordRow as L}from"./CurrentRecord.js";const a=h(null);function b(){return l(a)}function k({type:u,props:i,children:t}){const e=l(a),d=L(),n=e?.row??d;return r(c,{children:t(g(u,i,n),e,n)})}function M({ownerId:u,ownerType:i,Template:t,rows:e,items:d,states:n,fallback:E,wrapCopy:m,children:T}){const _=l(a);if(!t||(t.blockCount??0)<=0)return r(c,{children:E});const f=_!==null,A=e.map((C,o)=>{const s=n?.[o],R={row:C,index:o,ownerType:i,item:d?.[o],nested:f,...s?{state:s}:null},p=r("div",{[x]:`${u}:${S}`,[P]:o,...D(s),children:I(s)?w(c,{children:[r(t,{}),r("span",{"aria-hidden":"true",className:j})]}):r(t,{})});return r(a.Provider,{value:R,children:m?m(p,R):p},o)});return r(c,{children:T(A)})}export{a as CardRowContext,k as CardRowDrawn,M as CardTemplateRows,b as useCardRow};
@@ -1,14 +1,17 @@
1
+ import { type ListNumberForm } from "../../format/lib/content/list-number.js";
1
2
  import type { PartStyles } from "../lib/document/part-styles.js";
2
3
  export interface ContentsEntry {
3
4
  label: string;
4
5
  anchor: string;
5
6
  }
6
7
  export declare const CONTENTS_STICKY_TOP = 120;
7
- export default function ContentsList({ title, entries, stickyTop, sticky, editing, partStyles, }: {
8
+ export default function ContentsList({ title, entries, stickyTop, sticky, editing, partStyles, numberForm, hideClass, }: {
8
9
  title?: string;
9
10
  entries: readonly ContentsEntry[];
10
11
  stickyTop: number;
11
12
  sticky?: boolean;
12
13
  editing?: boolean;
13
14
  partStyles?: PartStyles;
15
+ numberForm?: ListNumberForm;
16
+ hideClass?: string;
14
17
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as n,jsxs as m}from"react/jsx-runtime";import{renderGold as c}from"./goldPhrases.js";import{listNumber as x}from"../../format/lib/content/list-number.js";import{STICKY_ASIDE_TOP as d}from"../../format/lib/content/sticky-aside.js";import{SIZE_STEP_OF_ROLE as T}from"../../format/lib/fonts.js";import{CONTENTS_REGIONS as b}from"../../format/lib/sections/contents-text-regions.js";import{TEXT_REGION_ATTR as h,regionStyle as u,textRegionPartKey as _}from"../../format/lib/sections/text-regions.js";const i=(e,t)=>e?{[h]:t}:{},p=(e,t)=>u(e?.[_(t)]?.role,b[t],T),C=d;function N({title:e,entries:t,stickyTop:f,sticky:s=!0,editing:a=!1,partStyles:l}){return m("aside",{className:`${s?"sticky ":""}flex flex-col self-start max-[900px]:static`,style:s?{top:f}:void 0,children:[e&&n("h4",{className:"mb-[18px] font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:c(e)}),t.map((r,o)=>m("a",{href:`#${r.anchor}`,className:`flex items-center justify-between gap-3 border-b border-line py-2.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim transition-colors hover:text-fg${o===0?" border-t":""}`,children:[n("span",{...i(a,"entry"),style:p(l,"entry"),children:c(r.label||"Section")}),n("span",{...i(a,"number"),style:p(l,"number"),className:"text-accent",children:x(o)})]},`${o}-${r.anchor}`))]})}export{C as CONTENTS_STICKY_TOP,N as default};
1
+ import{jsx as s,jsxs as f}from"react/jsx-runtime";import{renderGold as x}from"./goldPhrases.js";import{LIST_NUMBER_FORM_DEFAULT as b,listNumberIn as d}from"../../format/lib/content/list-number.js";import{STICKY_ASIDE_TOP as N}from"../../format/lib/content/sticky-aside.js";import{SIZE_STEP_OF_ROLE as h}from"../../format/lib/fonts.js";import{CONTENTS_REGIONS as E}from"../../format/lib/sections/contents-text-regions.js";import{TEXT_REGION_ATTR as S,regionStyle as g,textRegionPartKey as y}from"../../format/lib/sections/text-regions.js";const u=(e,t)=>e?{[S]:t}:{},T=(e,t)=>g(e?.[y(t)]?.role,E[t],h),v=N;function O({title:e,entries:t,stickyTop:_,sticky:a=!0,editing:l=!1,partStyles:c,numberForm:m=b,hideClass:i=""}){const r=m==="plain";return f("aside",{className:`${a?"sticky ":""}flex flex-col self-start max-[900px]:static${i?` ${i}`:""}`,style:a?{top:_}:void 0,children:[e&&s("h4",{className:"mb-[18px] font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:x(e)}),t.map((n,o)=>{const p=s("span",{...u(l,"number"),style:T(c,"number"),className:"text-accent",children:d(m,o)});return f("a",{href:`#${n.anchor}`,className:`flex items-center ${r?"justify-start gap-1":"justify-between gap-3"} border-b border-line py-2.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim transition-colors hover:text-fg${o===0?" border-t":""}`,children:[r&&p,s("span",{...u(l,"entry"),style:T(c,"entry"),children:x(n.label||"Section")}),!r&&p]},`${o}-${n.anchor}`)})]})}export{v as CONTENTS_STICKY_TOP,O as default};
@@ -0,0 +1,23 @@
1
+ import { type ReactNode } from "react";
2
+ import type { SourceRow } from "../../format/lib/content/block-sources.js";
3
+ export interface RecordSchemaField {
4
+ key: string;
5
+ label: string;
6
+ kind: string;
7
+ }
8
+ export interface CurrentRecord<TValue = unknown> {
9
+ type: string;
10
+ key: string;
11
+ title: string;
12
+ fields: Readonly<Record<string, unknown>>;
13
+ value: TValue;
14
+ schema?: readonly RecordSchemaField[];
15
+ }
16
+ export declare function CurrentRecordProvider({ record, dateWords, children, }: {
17
+ record: CurrentRecord;
18
+ dateWords?: (iso: string) => string;
19
+ children: ReactNode;
20
+ }): import("react").JSX.Element;
21
+ export declare function useCurrentRecord(): CurrentRecord | null;
22
+ export declare function useCurrentRecordOf<TValue = unknown>(type: string): CurrentRecord<TValue> | null;
23
+ export declare function usePageRecordRow(): SourceRow | null;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as l}from"react/jsx-runtime";import{createContext as d,useContext as t,useMemo as n}from"react";import{recordRow as s}from"../../format/lib/content/record-row.js";import{PRODUCT_RECORD_TYPE as i}from"../../format/lib/content/record-types.js";const o=d(null);function C({record:r,dateWords:e,children:u}){const c=n(()=>({record:r,dateWords:e}),[r,e]);return l(o.Provider,{value:c,children:u})}function p(){return t(o)?.record??null}function P(r){const e=p();return e!==null&&e.type===r?e:null}function a(){const r=t(o);return n(()=>r&&r.record.type!==i?s(r.record,r.dateWords):null,[r])}export{C as CurrentRecordProvider,p as useCurrentRecord,P as useCurrentRecordOf,a as usePageRecordRow};
@@ -20,10 +20,11 @@ interface FlexProps {
20
20
  justify: Justify;
21
21
  align: AlignItems;
22
22
  wrap: boolean;
23
- share?: string;
23
+ share?: unknown;
24
24
  sharePhone?: string;
25
25
  shareTablet?: unknown;
26
26
  wrapPhone?: unknown;
27
+ orderPhone?: unknown;
27
28
  phoneRow?: number | string;
28
29
  columns?: number | string;
29
30
  columnsTablet?: number | string;
@@ -61,5 +62,5 @@ interface FlexProps {
61
62
  mirrorCards?: unknown;
62
63
  content: SlotComponent;
63
64
  }
64
- export default function Flex({ direction, label, tabShape, gap, gapPhone, gapTablet, justify, align, wrap, share, sharePhone, shareTablet, wrapPhone, phoneRow, columns, columnsTablet, separator, blockSpacing, bgImage, bgImagePhone, pictureHover, darken, darkenStyle, placement, padV2, border, borderTablet, borderPhone, pad, contained, fillHeight, shadow, loop, scrollDirection, loopSeconds, loopDelay, editing, fillColor, line, upcoming, link, boxShape, boxShapePhone, boxShapeTablet, jumpHighlight, anchor, sharedSides, boxId, mirrorCards, content: Content, }: FlexProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
65
+ export default function Flex({ direction, label, tabShape, gap, gapPhone, gapTablet, justify, align, wrap, share, sharePhone, shareTablet, wrapPhone, orderPhone, phoneRow, columns, columnsTablet, separator, blockSpacing, bgImage, bgImagePhone, pictureHover, darken, darkenStyle, placement, padV2, border, borderTablet, borderPhone, pad, contained, fillHeight, shadow, loop, scrollDirection, loopSeconds, loopDelay, editing, fillColor, line, upcoming, link, boxShape, boxShapePhone, boxShapeTablet, jumpHighlight, anchor, sharedSides, boxId, mirrorCards, content: Content, }: FlexProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
65
66
  export {};
@@ -1 +1 @@
1
- import{Fragment as g,jsx as s,jsxs as eo}from"react/jsx-runtime";import{useId as Me}from"react";import{parseHexColor as We}from"efficient-shell/format";import je from"./BoxTabs.js";import{BoxTabPaneContext as He,useIsTabPane as Ue}from"./BoxTabPaneContext.js";import{CellFillContext as Xe,InBoxContext as Ge,useCellOfStretchedRow as ze,useFillsCell as Je}from"./InBoxContext.js";import Ke,{InsideSiteColumn as Ko,useInsideSiteGutter as Ye,useSectionRoot as qe}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Qe}from"./BoxSurfaceContext.js";import Ve from"./PictureWash.js";import{BoxCellWidthContext as Ze}from"./BoxCellWidthContext.js";import{useInSiteHeader as os}from"./PhoneMenuTools.js";import{useCardRow as es}from"./CardRowContext.js";import{framesItsCards as ss}from"../../format/lib/content/card-place.js";import{MirrorContext as ts,useMirroredCopy as rs,useUnderCardBox as ns}from"./MirrorContext.js";import{isMirroredCopy as ls,mirrorCardsActs as as,mirroredBoxClass as cs,MIRROR_ROW_CLASS as ms,ownsCard as is}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as so,FRAME_GUTTER as to}from"./BlockFrame.js";import{containerGapProps as us}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as ds,boxBlockSpacingClass as fs,boxFitContentClass as Cs,boxRowColumnsClass as ps,boxRowTabletColumnsClass as Ss,boxRowTabletShareClass as xs,boxPhoneRowClasses as L,boxPhoneRowFits as bs,boxShareClasses as F,boxWrapClass as hs}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as $s,boxSeparatorSeamClass as _s,boxSeparatorStyle as Ps,isStripBox as Rs}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as ys,DEFAULT_LOOP_DIRECTION as Ls,DEFAULT_LOOP_SECONDS as As,isVerticalLoop as ws}from"../../format/lib/animation/index.js";import{LoopTrack as Os}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as m,BOX_OWNS_SIDES_CLASS as Bs,boxDarkenStyle as Ts,boxPlacementClasses as vs,CARD_SHADOW_CLASS as Ns,isBackgroundBox as Yo}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as qo}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Es,drawsSiteGutter as ks}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as gs,boxShapeClasses as Fs}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as Ds,BOX_LINK_ATTR as Qo,BOX_LINK_CLASS as Vo,BOX_LINKED_CLASS as Is,boxJumpBlocksClass as Ms,boxJumpCss as Ws,boxJumpSlug as js,boxLinkOf as Hs}from"../../format/lib/content/box-link.js";import{SiteLink as Us}from"../lib/site-runtime.js";import{sectionBorderStyle as Zo}from"../../format/lib/content/borders.js";import{finiteNumber as i}from"../../format/lib/finite-number.js";import{sectionPadAttrs as Xs}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as D}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as Gs}from"../../format/lib/content/ink.js";import{sizedBackground as ro}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as zs,resolveImageTreatment as Js}from"../../format/lib/content/image-treatment.js";import{BoxRail as Ks,BoxRailStop as Ys,RAIL_STOPS_CLASS as qs,useTimelineRail as Qs}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as Vs,sharedColumnsClasses as Zs,sharedColumnsCss as ot}from"../lib/content/box-shared-columns.js";import et from"./PhotoHoverSheet.js";const no={"--sf-site-gutter":"0px"},st={overflowX:"clip",overflowY:"visible"},tt={desktop:!1,phone:!1},oe="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",lo=o=>o==null||o==="",ao=o=>!lo(o)&&Number(o)===0;function rt({children:o}){return s(g,{children:o(Me())})}function nt({direction:o,label:ee,tabShape:se,gap:co,gapPhone:te,gapTablet:I,justify:A,align:C,wrap:mo,share:p,sharePhone:M,shareTablet:io,wrapPhone:re,phoneRow:w,columns:O,columnsTablet:W,separator:n,blockSpacing:ne,bgImage:h,bgImagePhone:uo,pictureHover:le,darken:ae,darkenStyle:ce,placement:me,padV2:fo=!1,border:Co,borderTablet:po,borderPhone:So,pad:r={},contained:j=!0,fillHeight:u=!1,shadow:xo,loop:S,scrollDirection:H=Ls,loopSeconds:ie=As,loopDelay:ue=ys,editing:bo=!1,fillColor:ho,line:$,upcoming:de,link:fe,boxShape:$o,boxShapePhone:Ce,boxShapeTablet:pe,jumpHighlight:Se,anchor:xe,sharedSides:B=tt,boxId:_o,mirrorCards:be,content:_}){const x=bo?"":Hs(fe),l=u?"":Fs($o,Ce,pe),he=!u&&gs($o)!=="",d=js(Se,xe),U=typeof ho=="string"?We(ho.trim()):null,Po=U?{backgroundColor:U}:void 0,Ro=Qs(),X=$===!0&&o!=="tabs",t=Yo(h),T=os(),$e=qe(),yo=Ue(),G=Je(),_e=ze(),v=Rs(o,n),a=S==="scroll"&&o!=="tabs",b=es(),Pe=rs(),Re=ns(),N=is({inCopy:b!==null,nestedCopy:b?.nested===!0,underBox:Re}),z=N&&ss(b?.ownerType),Lo=as({direction:o,separator:n,loop:S,line:$,bgImage:h,columns:O,columnsTablet:W,share:p,wrap:mo},N,B.desktop)&&ls(be,b?.index),Ao=t||N?"":cs(Pe,o,a?void 0:A,C),E=ps({direction:o,separator:n,loop:S,line:$,columns:O}),J=Ss({direction:o,separator:n,loop:S,line:$,columnsTablet:W}),wo=xs({direction:o,separator:n,loop:S,line:$,columns:O,columnsTablet:W,share:p,shareTablet:io}),ye=Ye(),k=Zs(B,_.blockCount??0),Le=k&&(!b||b.index===0)?ot(B,_.blockCount??0):"",Oo=[F(p),o==="row"?Cs(p):"",E,J,wo,fs(ne),$s(o,n)].filter(Boolean).join(" "),Ae=Oo?` ${Oo}`:"",Bo=["flex",o==="row"?v||a?"flex-row":`flex-row ${L(w,M,re)}`:"flex-col",hs(a?!1:mo),t?vs(me??"center",o):ds(a?void 0:A,C)+(Ao?` ${Ao}`:"")].join(" ")+Ae,P=u||t||l||G?` ${D}`:"",K=he?` ${l}`:l?`${P} ${l}`:P,To=_e&&o==="column"&&!t&&!a&&F(p)===""&&typeof A=="string"&&A!=="start",vo=P||(To?` ${D}`:""),Y=x?` ${Is}`:"",q=t||T||fo?"":" py-6",we=`${so}${q} ${to}${K}${Y}`,Oe=T?`${K}${Y}`.trim():`w-full${q}${K}${Y}`,R=us("Flex",co,o==="row"?"inline":"block",te,v||a?void 0:I),Be=v?{...R.style,...Ps(o,n)}:R.style,No=(e="")=>s(_,{className:`${Bo}${Lo?` ${ms}`:""}${R.className}${vo}${e?` ${e}`:""}${X?` ${qs}`:""}${d?` ${Ms(d)}`:""}${k}`,style:Be,minEmptyHeight:120}),Eo=ws(H)?"":_s(o,n),ko=a?s(Os,{direction:H,seconds:ie,delay:ue,editing:bo,copy:e=>No(e&&Eo?`${e} ${Eo}`:e)}):No(),go=o==="tabs"?s(je,{className:`${Bo}${R.className}${G&&!u&&!t&&!l?"":P}`,style:R.style,shape:se,children:ko}):ko,Fo=yo?s(He.Provider,{value:!1,children:go}):go,Te={stretchedRow:o==="row"&&!t&&(C===void 0||C==="stretch"),fillingColumn:o==="column"&&(G||To),columnsRow:E!==""||J!==""||k!=="",..._o?{id:_o}:null},Do=s(Ge.Provider,{value:Te,children:s(Xe.Provider,{value:!1,children:N?s(ts.Provider,{value:Lo,children:Fo}):Fo})}),Q=X?s(Ks,{row:o==="row",stops:_.blockCount??0,children:Do}):Do,ve=ee?.trim()||(yo?"":void 0),Ne={values:r,frame:q?24:0},Ee=e=>Ro?s(Ys,{on:Ro,future:de===!0,children:e}):e,ke=e=>x.startsWith("/")?s(Us,{href:x,className:Vo,"aria-labelledby":e,[Qo]:""}):s("a",{href:x,className:Vo,"aria-labelledby":e,[Qo]:""}),Io=(d?Ws(d):"")+Le,Mo=Io?s("style",{dangerouslySetInnerHTML:{__html:Io}}):null,y=Es({loop:S,direction:o,scrollDirection:H,bgImage:h}),ge=B.desktop&&k!==""&&!U&&!Zo(Co,So,po)&&Object.keys(qo(xo)).length===0&&!x&&!l&&!u&&!d&&!ks(j&&!y,ye)&&ao(co)&&(lo(I)||ao(I))&&fo&&Object.values(r).every(e=>lo(e)||ao(e)),Fe=e=>({...ge?{[Vs]:""}:null,...t?null:qo(xo),...d?{[Ds]:d}:null,...e?{id:e}:null}),Wo=E!==""?Number(O):0,De=L(w,M)===L(void 0),Ie=(o==="column"||o==="row"&&!v&&!a&&(Wo===1&&De||Wo===0&&_.blockCount===1))&&!t&&!X&&!T,jo=t&&$e&&!T,Ho=(e,c)=>Ee(s(Ke,{contained:j&&!y,style:y?no:void 0,framedClass:we,fillClass:Oe,columnClass:`${so} ${to}${vo}`,tabLabel:ve,pad:t?void 0:Ne,border:Zo(Co,So,po),outerAttrs:Fe(c),box:!0,edge:Ie,outerStyle:t?void 0:Po,bleed:jo,children:Mo||c?eo(g,{children:[Mo,c?ke(c):null,y?s(Ko,{children:e}):e]}):y?s(Ko,{children:e}):e})),Uo=e=>x?s(rt,{children:c=>Ho(e,c)}):Ho(e);if(!t){const e=C===void 0||C==="stretch",c=(F(p)!==""||E!==""||J!=="")&&!bs(w,M)&&!(wo!==""&&F(io)==="")&&(e||L(w)!==L(void 0));return Uo((o==="row"?c:o==="column"&&e)?s(Ze.Provider,{value:!0,children:Q}):Q)}const V=Ts(ae,ce),Z=Yo(uo),Xo=Z?{"--sf-box-bg":ro(h??""),"--sf-box-bg-p":ro(uo??"")}:{backgroundImage:ro(h??""),backgroundSize:"cover",backgroundPosition:"center"},Go=Js(void 0,void 0,le),f=Go.className?Go:null,oo=Xs({...r,top:i(r.top)??m.desktop,bottom:i(r.bottom)??m.desktop,topPhone:i(r.topPhone)??m.phone,bottomPhone:i(r.bottomPhone)??m.phone,left:i(r.left)??m.side,right:i(r.right)??m.side,leftPhone:i(r.leftPhone)??m.sidePhone,rightPhone:i(r.rightPhone)??m.sidePhone}),zo=s("div",{className:`relative z-[1] ${Bs} ${oo?.className??""}${u||l?` ${D}`:""}`.trimEnd(),style:V?{...oo?.style,...no,...Gs}:{...oo?.style,...no},children:Q}),Jo=jo&&j?s("div",{className:`${so} ${to}${u||l?` ${D}`:""}`,children:zo}):zo;return Uo(s(g,{children:eo("div",{className:`relative isolate overflow-hidden ${Ns}${P}${Z&&!f?` ${oe}`:""}`,style:{...z?st:{},...Po,...f?{}:Xo},...f?{[zs]:""}:{},children:[f&&eo(g,{children:[s(et,{sheet:f.sheet}),s("div",{"aria-hidden":!0,className:`absolute inset-0${z?" rounded-[inherit]":""}${Z?` ${oe}`:""} ${f.className}`,style:{...Xo,...f.style??{}}})]}),s(Ve,{wash:V,...z?{className:"rounded-[inherit]"}:{}}),V?s(Qe,{children:Jo}):Jo]})}))}export{nt as default};
1
+ import{Fragment as H,jsx as s,jsxs as lo}from"react/jsx-runtime";import{useId as Ve}from"react";import{parseHexColor as qe}from"efficient-shell/format";import Qe from"./BoxTabs.js";import{BoxTabPaneContext as Ze,useIsTabPane as os}from"./BoxTabPaneContext.js";import{boxPhoneCell as es,boxPhoneOrder as ss}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as ts,InBoxContext as rs,useCellOfStretchedRow as ns,useFillsCell as ls}from"./InBoxContext.js";import as,{InsideSiteColumn as se,useInsideSiteGutter as cs,useSectionRoot as ms}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as is}from"./BoxSurfaceContext.js";import us from"./PictureWash.js";import{BoxCellWidthContext as ds}from"./BoxCellWidthContext.js";import{useInSiteHeader as fs}from"./PhoneMenuTools.js";import{useCardRow as Cs}from"./CardRowContext.js";import{framesItsCards as ps}from"../../format/lib/content/card-place.js";import{MirrorContext as bs,useMirroredCopy as Ss,useUnderCardBox as xs}from"./MirrorContext.js";import{isMirroredCopy as hs,mirrorCardsActs as $s,mirroredBoxClass as _s,MIRROR_ROW_CLASS as ys,ownsCard as Ps}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as ao,FRAME_GUTTER as co}from"./BlockFrame.js";import{containerGapProps as Rs}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as As,boxBlockSpacingClass as Ls,boxFitContentClass as ws,boxRowColumnsClass as Os,boxRowTabletColumnsClass as Ns,boxRowTabletShareClass as Bs,boxPhoneCellsShareLine as vs,boxPhoneRowClasses as T,boxPhoneRowFits as ks,boxShareClasses as P,boxShareVars as Es,boxWrapClass as Ts}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Fs,boxSeparatorSeamClass as gs,boxSeparatorStyle as Ds,isStripBox as Is}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Ms,DEFAULT_LOOP_DIRECTION as Ws,DEFAULT_LOOP_SECONDS as js,isVerticalLoop as Hs}from"../../format/lib/animation/index.js";import{LoopTrack as Us}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as u,BOX_OWNS_SIDES_CLASS as Xs,boxDarkenStyle as Gs,boxPlacementClasses as Ks,CARD_SHADOW_CLASS as zs,isBackgroundBox as te}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as re}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Js,drawsSiteGutter as Ys}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Vs,boxShapeClasses as qs}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as Qs,BOX_LINK_ATTR as ne,BOX_LINK_CLASS as le,BOX_LINKED_CLASS as Zs,boxJumpBlocksClass as ot,boxJumpCss as et,boxJumpSlug as st,boxLinkOf as tt}from"../../format/lib/content/box-link.js";import{SiteLink as rt}from"../lib/site-runtime.js";import{sectionBorderStyle as ae}from"../../format/lib/content/borders.js";import{finiteNumber as d}from"../../format/lib/finite-number.js";import{sectionPadAttrs as nt}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as U}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as lt}from"../../format/lib/content/ink.js";import{sizedBackground as mo}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as at,resolveImageTreatment as ct}from"../../format/lib/content/image-treatment.js";import{BoxRail as mt,BoxRailStop as it,RAIL_STOPS_CLASS as ut,useTimelineRail as dt}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as ft,sharedColumnsClasses as Ct,sharedColumnsCss as pt}from"../lib/content/box-shared-columns.js";import bt from"./PhotoHoverSheet.js";const io={"--sf-site-gutter":"0px"},St={overflowX:"clip",overflowY:"visible"},xt={desktop:!1,phone:!1},ce="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",uo=o=>o==null||o==="",fo=o=>!uo(o)&&Number(o)===0;function ht({children:o}){return s(H,{children:o(Ve())})}function $t({direction:o,label:me,tabShape:ie,gap:Co,gapPhone:ue,gapTablet:X,justify:F,align:b,wrap:po,share:n,sharePhone:g,shareTablet:R,wrapPhone:de,orderPhone:fe,phoneRow:A,columns:L,columnsTablet:w,separator:a,blockSpacing:Ce,bgImage:O,bgImagePhone:bo,pictureHover:pe,darken:be,darkenStyle:Se,placement:xe,padV2:So=!1,border:xo,borderTablet:ho,borderPhone:$o,pad:r={},contained:G=!0,fillHeight:f=!1,shadow:_o,loop:S,scrollDirection:K=Ws,loopSeconds:he=js,loopDelay:$e=Ms,editing:D=!1,fillColor:yo,line:x,upcoming:_e,link:ye,boxShape:Po,boxShapePhone:Pe,boxShapeTablet:Re,jumpHighlight:Ae,anchor:Le,sharedSides:h=xt,boxId:Ro,mirrorCards:we,content:c}){const $=D?"":tt(ye),m=f?"":qs(Po,Pe,Re),Oe=!f&&Vs(Po)!=="",C=st(Ae,Le),z=typeof yo=="string"?qe(yo.trim()):null,Ao=z?{backgroundColor:z}:void 0,Lo=dt(),J=x===!0&&o!=="tabs",t=te(O),I=fs(),Ne=ms(),wo=os(),Y=ls(),Be=ns(),N=Is(o,a),l=S==="scroll"&&o!=="tabs",_=Cs(),ve=Ss(),ke=xs(),M=Ps({inCopy:_!==null,nestedCopy:_?.nested===!0,underBox:ke}),V=M&&ps(_?.ownerType),Oo=$s({direction:o,separator:a,loop:S,line:x,bgImage:O,columns:L,columnsTablet:w,share:n,wrap:po},M,h.desktop)&&hs(we,_?.index),No=t||M?"":_s(ve,o,l?void 0:F,b),B=Os({direction:o,separator:a,loop:S,line:x,columns:L}),y=Ns({direction:o,separator:a,loop:S,line:x,columnsTablet:w}),W=Bs({direction:o,separator:a,loop:S,line:x,columns:L,columnsTablet:w,share:n,shareTablet:R}),Ee=cs(),j=Ct(h,c.blockCount??0),Te=j&&(!_||_.index===0)?pt(h,c.blockCount??0):"",Bo=y!==""?Number(w)>=2:W===""||P(R)!=="",q=y!==""||W!=="",Fe=q&&!(y!==""&&Number(w)<2),vo=o==="row"&&!N&&!l&&x!==!0,Q=vo&&!h.phone&&!h.desktop?es(ss(fe,c.blockIds??[]),{tabletKeepsRow:Fe,editing:D}):void 0,ko=Q!==void 0&&!D,ge=B!==""?Number(L)>=2:P(n)!=="",Eo=[P(n),o==="row"?ws(n):"",B,y,W,Ls(Ce),Fs(o,a)].filter(Boolean).join(" "),De=Eo?` ${Eo}`:"",To=["flex",o==="row"?N||l?"flex-row":`flex-row ${T(A,g,de)}`:"flex-col",Ts(l?!1:po),t?Ks(xe??"center",o):As(l?void 0:F,b)+(No?` ${No}`:"")].join(" ")+De,v=f||t||m||Y?` ${U}`:"",Z=Oe?` ${m}`:m?`${v} ${m}`:v,Fo=Be&&o==="column"&&!t&&!l&&P(n)===""&&typeof F=="string"&&F!=="start",go=v||(Fo?` ${U}`:""),oo=$?` ${Zs}`:"",eo=t||I||So?"":" py-6",Ie=`${ao}${eo} ${co}${Z}${oo}`,Me=I?`${Z}${oo}`.trim():`w-full${eo}${Z}${oo}`,k=Rs("Flex",Co,o==="row"?"inline":"block",ue,N||l?void 0:X),Do=Es(n,R,o==="row"?c.blockCount??0:0),Io=N?{...k.style,...Ds(o,a)}:k.style,We=Do?{...Io,...Do}:Io,Mo=(e="")=>s(c,{className:`${To}${Oo?` ${ys}`:""}${k.className}${go}${e?` ${e}`:""}${J?` ${ut}`:""}${C?` ${ot(C)}`:""}${j}`,style:We,minEmptyHeight:120,...Q?{cell:Q}:null}),Wo=Hs(K)?"":gs(o,a),jo=l?s(Us,{direction:K,seconds:he,delay:$e,editing:D,copy:e=>Mo(e&&Wo?`${e} ${Wo}`:e)}):Mo(),Ho=o==="tabs"?s(Qe,{className:`${To}${k.className}${Y&&!f&&!t&&!m?"":v}`,style:k.style,shape:ie,children:jo}):jo,Uo=wo?s(Ze.Provider,{value:!1,children:Ho}):Ho,Xo=o==="row"&&!t&&(b===void 0||b==="stretch"),je={stretchedRow:Xo,fillingColumn:o==="column"&&(Y||Fo),columnsRow:B!==""||y!==""||j!==""||o==="row"&&(Array.isArray(n)||Array.isArray(R))||ko,...ko?{phoneCells:!0}:null,...Xo&&vo&&(c.blockCount??0)>=2&&ge?{picturesFillRow:!0}:null,...q?{fillFrom:Bo?"tablet":"desktop"}:null,...vs(A,g)&&(!q||Bo)?{phoneRowFills:!0}:null,...Ro?{id:Ro}:null},Go=s(rs.Provider,{value:je,children:s(ts.Provider,{value:!1,children:M?s(bs.Provider,{value:Oo,children:Uo}):Uo})}),so=J?s(mt,{row:o==="row",stops:c.blockCount??0,children:Go}):Go,He=me?.trim()||(wo?"":void 0),Ue={values:r,frame:eo?24:0},Xe=e=>Lo?s(it,{on:Lo,future:_e===!0,children:e}):e,Ge=e=>$.startsWith("/")?s(rt,{href:$,className:le,"aria-labelledby":e,[ne]:""}):s("a",{href:$,className:le,"aria-labelledby":e,[ne]:""}),Ko=(C?et(C):"")+Te,zo=Ko?s("style",{dangerouslySetInnerHTML:{__html:Ko}}):null,E=Js({loop:S,direction:o,scrollDirection:K,bgImage:O}),Ke=h.desktop&&j!==""&&!z&&!ae(xo,$o,ho)&&Object.keys(re(_o)).length===0&&!$&&!m&&!f&&!C&&!Ys(G&&!E,Ee)&&fo(Co)&&(uo(X)||fo(X))&&So&&Object.values(r).every(e=>uo(e)||fo(e)),ze=e=>({...Ke?{[ft]:""}:null,...t?null:re(_o),...C?{[Qs]:C}:null,...e?{id:e}:null}),Jo=B!==""?Number(L):0,Je=T(A,g)===T(void 0),Ye=(o==="column"||o==="row"&&!N&&!l&&(Jo===1&&Je||Jo===0&&c.blockCount===1))&&!t&&!J&&!I,Yo=t&&Ne&&!I,Vo=(e,i)=>Xe(s(as,{contained:G&&!E,style:E?io:void 0,framedClass:Ie,fillClass:Me,columnClass:`${ao} ${co}${go}`,tabLabel:He,pad:t?void 0:Ue,border:ae(xo,$o,ho),outerAttrs:ze(i),box:!0,edge:Ye,outerStyle:t?void 0:Ao,bleed:Yo,children:zo||i?lo(H,{children:[zo,i?Ge(i):null,E?s(se,{children:e}):e]}):E?s(se,{children:e}):e})),qo=e=>$?s(ht,{children:i=>Vo(e,i)}):Vo(e);if(!t){const e=b===void 0||b==="stretch",i=(P(n)!==""||B!==""||y!=="")&&!ks(A,g)&&!(W!==""&&P(R)==="")&&(e||T(A)!==T(void 0));return qo((o==="row"?i:o==="column"&&e)?s(ds.Provider,{value:!0,children:so}):so)}const to=Gs(be,Se),ro=te(bo),Qo=ro?{"--sf-box-bg":mo(O??""),"--sf-box-bg-p":mo(bo??"")}:{backgroundImage:mo(O??""),backgroundSize:"cover",backgroundPosition:"center"},Zo=ct(void 0,void 0,pe),p=Zo.className?Zo:null,no=nt({...r,top:d(r.top)??u.desktop,bottom:d(r.bottom)??u.desktop,topPhone:d(r.topPhone)??u.phone,bottomPhone:d(r.bottomPhone)??u.phone,left:d(r.left)??u.side,right:d(r.right)??u.side,leftPhone:d(r.leftPhone)??u.sidePhone,rightPhone:d(r.rightPhone)??u.sidePhone}),oe=s("div",{className:`relative z-[1] ${Xs} ${no?.className??""}${f||m?` ${U}`:""}`.trimEnd(),style:to?{...no?.style,...io,...lt}:{...no?.style,...io},children:so}),ee=Yo&&G?s("div",{className:`${ao} ${co}${f||m?` ${U}`:""}`,children:oe}):oe;return qo(s(H,{children:lo("div",{className:`relative isolate overflow-hidden ${zs}${v}${ro&&!p?` ${ce}`:""}`,style:{...V?St:{},...Ao,...p?{}:Qo},...p?{[at]:""}:{},children:[p&&lo(H,{children:[s(bt,{sheet:p.sheet}),s("div",{"aria-hidden":!0,className:`absolute inset-0${V?" rounded-[inherit]":""}${ro?` ${ce}`:""} ${p.className}`,style:{...Qo,...p.style??{}}})]}),s(us,{wash:to,...V?{className:"rounded-[inherit]"}:{}}),to?s(is,{children:ee}):ee]})}))}export{$t as default};
@@ -60,6 +60,7 @@ export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, m
60
60
  src?: string;
61
61
  objectPosition?: string;
62
62
  objectPositionPhone?: string;
63
+ objectPositionTablet?: string;
63
64
  tintColor: string;
64
65
  tintOpacity: number;
65
66
  };
@@ -67,6 +68,7 @@ export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, m
67
68
  src?: string;
68
69
  objectPosition?: string;
69
70
  objectPositionPhone?: string;
71
+ objectPositionTablet?: string;
70
72
  tintColor: string;
71
73
  tintOpacity: number;
72
74
  };
@@ -1 +1 @@
1
- "use client";import{Fragment as m,jsx as i,jsxs as l}from"react/jsx-runtime";import u from"./HeroPoster.js";import{SectionAnimation as h}from"./SectionAnimation.js";import{resolveMedia as p}from"../lib/media.js";import{HERO_MEDIA_PARTS as g,HERO_PART_ATTR as v}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as b}from"../lib/animation/part-motion.js";import{pictureHoverOf as w}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as T,SITE_PHOTO_CSS as H,resolveImageTreatment as _}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as k,normaliseMediaLayout as j,resolvePhoneLayout as N}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as O,normaliseVideoSource as S,parseYouTubeId as A}from"../../format/lib/hero-video.js";import{hidableText as R}from"efficient-easel/draw";const V={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},C={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function q(e){const o=e.isVideo&&S(e.videoSource)==="youtube",r=e.isVideo&&O(e.videoPlayback)==="click",n=o?A(R(e.youtubeUrl)):null,t=j(e.mediaLayout);return{fromYouTube:o,onClick:r,youTubeId:n,backgroundFile:e.isVideo&&!o&&!r,desktopLayout:t,phoneLayout:N(e.mediaLayoutPhone,t),twoPictures:!e.isVideo&&k(e)>1}}function d(e,o){return y(b({_partMotion:e},o))}function c(e,o){return _(void 0,void 0,w(b({_partMotion:e},o)))}function B(e){return g.some(r=>c(e,r).className)?{hostAttrs:{[T]:""},sheet:H}:{}}function x({treatment:e,children:o}){return e.className?i("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):i(m,{children:o})}function P({color:e,opacity:o,passClicks:r=!0}){return o>0?i("div",{className:r?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function f({part:e,editing:o,marked:r=!0,entrance:n,className:t,children:s}){const a=o&&r?{[v]:e}:void 0;return n?i(h,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:t,boxAttrs:a,children:s}):i("div",{className:t,...a,children:s})}function J({partMotion:e,editing:o,children:r}){const n=d(e,"media"),t=c(e,"media"),s=t.className?i("div",{className:`absolute inset-0 z-[1] ${t.className}`,...t.style?{style:t.style}:{},children:r}):r;return n?i(h,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:s}):i(m,{children:s})}function Q({desktopLayout:e,phoneLayout:o,editing:r,marked:n=!0,partMotion:t,first:s,second:a}){return l("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${C[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[i(f,{part:"image",editing:r,marked:n,entrance:d(t,"image"),className:"relative overflow-hidden",children:l(x,{treatment:c(t,"image"),children:[i(u,{posterSrc:p(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone}),i(P,{color:s.tintColor,opacity:s.tintOpacity})]})}),i(f,{part:"image2",editing:r,marked:n,entrance:d(t,"image2"),className:`relative overflow-hidden${o==="one"?" max-[719px]:hidden":""}${e==="one"?" view-tablet:hidden":""}`,children:l(x,{treatment:c(t,"image2"),children:[i(u,{posterSrc:p(a.src),showVideo:!1,objectPosition:a.objectPosition,objectPositionPhone:a.objectPositionPhone}),i(P,{color:a.tintColor,opacity:a.tintOpacity})]})})]})}export{J as HeroMediaLayer,f as HeroPickArea,x as HeroPictureHover,P as HeroTint,Q as HeroTwoPictures,q as heroMediaReading,d as heroPartEntrance,c as heroPartHover,B as heroPicturesHover};
1
+ "use client";import{Fragment as m,jsx as r,jsxs as l}from"react/jsx-runtime";import u from"./HeroPoster.js";import{SectionAnimation as b}from"./SectionAnimation.js";import{resolveMedia as h}from"../lib/media.js";import{HERO_MEDIA_PARTS as g,HERO_PART_ATTR as v}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as P}from"../lib/animation/part-motion.js";import{pictureHoverOf as T}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as w,SITE_PHOTO_CSS as j,resolveImageTreatment as H}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as _,normaliseMediaLayout as k,resolvePhoneLayout as N}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as O,normaliseVideoSource as S,parseYouTubeId as A}from"../../format/lib/hero-video.js";import{hidableText as R}from"efficient-easel/draw";const V={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},C={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function q(e){const o=e.isVideo&&S(e.videoSource)==="youtube",i=e.isVideo&&O(e.videoPlayback)==="click",n=o?A(R(e.youtubeUrl)):null,t=k(e.mediaLayout);return{fromYouTube:o,onClick:i,youTubeId:n,backgroundFile:e.isVideo&&!o&&!i,desktopLayout:t,phoneLayout:N(e.mediaLayoutPhone,t),twoPictures:!e.isVideo&&_(e)>1}}function d(e,o){return y(P({_partMotion:e},o))}function c(e,o){return H(void 0,void 0,T(P({_partMotion:e},o)))}function B(e){return g.some(i=>c(e,i).className)?{hostAttrs:{[w]:""},sheet:j}:{}}function p({treatment:e,children:o}){return e.className?r("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):r(m,{children:o})}function x({color:e,opacity:o,passClicks:i=!0}){return o>0?r("div",{className:i?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function f({part:e,editing:o,marked:i=!0,entrance:n,className:t,children:a}){const s=o&&i?{[v]:e}:void 0;return n?r(b,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:t,boxAttrs:s,children:a}):r("div",{className:t,...s,children:a})}function J({partMotion:e,editing:o,children:i}){const n=d(e,"media"),t=c(e,"media"),a=t.className?r("div",{className:`absolute inset-0 z-[1] ${t.className}`,...t.style?{style:t.style}:{},children:i}):i;return n?r(b,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:a}):r(m,{children:a})}function Q({desktopLayout:e,phoneLayout:o,editing:i,marked:n=!0,partMotion:t,first:a,second:s}){return l("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${C[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[r(f,{part:"image",editing:i,marked:n,entrance:d(t,"image"),className:"relative overflow-hidden",children:l(p,{treatment:c(t,"image"),children:[r(u,{posterSrc:h(a.src),showVideo:!1,objectPosition:a.objectPosition,objectPositionPhone:a.objectPositionPhone,objectPositionTablet:a.objectPositionTablet}),r(x,{color:a.tintColor,opacity:a.tintOpacity})]})}),r(f,{part:"image2",editing:i,marked:n,entrance:d(t,"image2"),className:`relative overflow-hidden${o==="one"?" max-[719px]:hidden":""}${e==="one"?" view-tablet:hidden":""}`,children:l(p,{treatment:c(t,"image2"),children:[r(u,{posterSrc:h(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone,objectPositionTablet:s.objectPositionTablet}),r(x,{color:s.tintColor,opacity:s.tintOpacity})]})})]})}export{J as HeroMediaLayer,f as HeroPickArea,p as HeroPictureHover,x as HeroTint,Q as HeroTwoPictures,q as heroMediaReading,d as heroPartEntrance,c as heroPartHover,B as heroPicturesHover};
@@ -5,7 +5,8 @@ interface HeroPosterProps {
5
5
  playbackRate?: number;
6
6
  objectPosition?: string;
7
7
  objectPositionPhone?: string;
8
+ objectPositionTablet?: string;
8
9
  quiet?: boolean;
9
10
  }
10
- export default function HeroPoster({ videoSrc, posterSrc, showVideo, playbackRate, objectPosition, objectPositionPhone, quiet, }: HeroPosterProps): import("react").JSX.Element;
11
+ export default function HeroPoster({ videoSrc, posterSrc, showVideo, playbackRate, objectPosition, objectPositionPhone, objectPositionTablet, quiet, }: HeroPosterProps): import("react").JSX.Element;
11
12
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useEffect as m,useRef as C,useState as a}from"react";import{SiteImage as L}from"../lib/site-runtime.js";import P from"./HeroHeldFrame.js";import{hasAv1Variant as R,isExternalMediaUrl as A}from"../lib/media.js";import{sizedImage as H}from"../../format/lib/sized-image.js";import{phoneFocus as S}from"../../format/lib/content/phone-focus.js";const _=.5;function $({videoSrc:d,posterSrc:f,showVideo:p=!0,playbackRate:v=_,objectPosition:l="50% 50%",objectPositionPhone:I,quiet:y=!1}){const n=S(I),e=f||"",t=d||"",[c,u]=a(!1),[g,w]=a(!1),[j,F]=a(!1),[k,E]=a(!1),[b,h]=a(!1),z=C(null);m(()=>{u(!1),w(!1),F(!1),E(!1)},[d,f]),m(()=>{if(typeof window>"u")return;const s=()=>{const r=window;r.requestIdleCallback?r.requestIdleCallback(()=>h(!0),{timeout:2e3}):setTimeout(()=>h(!0),800)};if(document.readyState==="complete"){s();return}return window.addEventListener("load",s,{once:!0}),()=>window.removeEventListener("load",s)},[]),m(()=>{const s=z.current;if(!s)return;const r=()=>{s.playbackRate=v};return r(),s.addEventListener("loadedmetadata",r),()=>s.removeEventListener("loadedmetadata",r)},[d,v]);const x=A(e),i=e&&x&&!g?H(e):{src:e};return N("div",{className:"absolute inset-0 z-[1]",children:[o("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),e&&(x?o("img",{src:i.src,...i.srcSet?{srcSet:i.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>i.srcSet?w(!0):u(!0)},e):o(L,{src:e,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>u(!0)},e)),p&&!y&&t&&b&&!j&&N("video",{ref:z,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:l},onError:()=>F(!0),children:[R(t)&&o("source",{src:t.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),o("source",{src:t,type:"video/mp4"})]},t),p&&y&&t&&b&&!k&&(!e||c)&&o(P,{src:t,objectPosition:l,onError:()=>E(!0)},t)]})}export{$ as default};
1
+ "use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useEffect as m,useRef as L,useState as a}from"react";import{SiteImage as P}from"../lib/site-runtime.js";import R from"./HeroHeldFrame.js";import{hasAv1Variant as A,isExternalMediaUrl as H}from"../lib/media.js";import{sizedImage as S}from"../../format/lib/sized-image.js";import{phoneFocus as _}from"../../format/lib/content/phone-focus.js";const $=.5;function M({videoSrc:d,posterSrc:f,showVideo:p=!0,playbackRate:v=$,objectPosition:l="50% 50%",objectPositionPhone:I,objectPositionTablet:g,quiet:y=!1}){const n=_(I,g),e=f||"",t=d||"",[c,u]=a(!1),[j,w]=a(!1),[k,F]=a(!1),[C,E]=a(!1),[b,h]=a(!1),z=L(null);m(()=>{u(!1),w(!1),F(!1),E(!1)},[d,f]),m(()=>{if(typeof window>"u")return;const s=()=>{const r=window;r.requestIdleCallback?r.requestIdleCallback(()=>h(!0),{timeout:2e3}):setTimeout(()=>h(!0),800)};if(document.readyState==="complete"){s();return}return window.addEventListener("load",s,{once:!0}),()=>window.removeEventListener("load",s)},[]),m(()=>{const s=z.current;if(!s)return;const r=()=>{s.playbackRate=v};return r(),s.addEventListener("loadedmetadata",r),()=>s.removeEventListener("loadedmetadata",r)},[d,v]);const x=H(e),i=e&&x&&!j?S(e):{src:e};return N("div",{className:"absolute inset-0 z-[1]",children:[o("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),e&&(x?o("img",{src:i.src,...i.srcSet?{srcSet:i.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>i.srcSet?w(!0):u(!0)},e):o(P,{src:e,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>u(!0)},e)),p&&!y&&t&&b&&!k&&N("video",{ref:z,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:l},onError:()=>F(!0),children:[A(t)&&o("source",{src:t.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),o("source",{src:t,type:"video/mp4"})]},t),p&&y&&t&&b&&!C&&(!e||c)&&o(R,{src:t,objectPosition:l,onError:()=>E(!0)},t)]})}export{M as default};
@@ -23,6 +23,7 @@ interface Props {
23
23
  text?: string;
24
24
  }[];
25
25
  heightDesktop?: number;
26
+ heightTablet?: number;
26
27
  heightMobile?: number;
27
28
  showPicker?: boolean;
28
29
  pickerShape?: HeroReelShape;
@@ -33,4 +34,4 @@ interface Props {
33
34
  editing?: boolean;
34
35
  partMotion?: Record<string, unknown>;
35
36
  }
36
- export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
37
+ export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;