efficient-web-builder 47.1.0 → 48.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 (194) hide show
  1. package/CHANGELOG.md +67 -1
  2. package/dist/editor/components/BlockGapField.d.ts +15 -1
  3. package/dist/editor/components/BlockGapField.js +1 -1
  4. package/dist/editor/components/DuplicateToPageMenu.d.ts +2 -0
  5. package/dist/editor/components/DuplicateToPageMenu.js +1 -1
  6. package/dist/editor/components/HeroPartPanel.js +1 -1
  7. package/dist/editor/components/HoverEffectField.d.ts +1 -0
  8. package/dist/editor/components/HoverEffectField.js +1 -1
  9. package/dist/editor/components/MediaUploadField.d.ts +9 -0
  10. package/dist/editor/components/MediaUploadField.js +1 -1
  11. package/dist/editor/components/PartSettingsPanel.d.ts +2 -1
  12. package/dist/editor/components/PartSettingsPanel.js +1 -1
  13. package/dist/editor/components/PreviewPartAnchors.d.ts +3 -1
  14. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  15. package/dist/editor/components/SameInEveryViewNote.d.ts +1 -0
  16. package/dist/editor/components/SameInEveryViewNote.js +1 -0
  17. package/dist/editor/components/SaveAsTemplateButton.d.ts +5 -0
  18. package/dist/editor/components/SaveAsTemplateButton.js +1 -0
  19. package/dist/editor/components/SideSpaceField.d.ts +31 -1
  20. package/dist/editor/components/SideSpaceField.js +1 -1
  21. package/dist/editor/components/SiteFields.d.ts +4 -1
  22. package/dist/editor/components/SiteFields.js +1 -1
  23. package/dist/editor/components/SiteRestoreNotice.js +1 -1
  24. package/dist/editor/components/SiteTextStylesField.js +1 -1
  25. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  26. package/dist/editor/components/StorefrontEditor.js +1 -1
  27. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  28. package/dist/editor/components/VersionHistoryDrawer.js +1 -1
  29. package/dist/editor/components/WebsitePreviewButton.d.ts +2 -1
  30. package/dist/editor/components/WebsitePreviewButton.js +1 -1
  31. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  32. package/dist/editor/components/WebsiteSettingsPanel.d.ts +10 -0
  33. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  34. package/dist/editor/components/usePartMotion.d.ts +10 -0
  35. package/dist/editor/components/usePartMotion.js +1 -0
  36. package/dist/editor/components/useSocialSettings.d.ts +2 -2
  37. package/dist/editor/lib/animation/AnimationDurationRow.d.ts +4 -0
  38. package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
  39. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  40. package/dist/editor/lib/animation/fields.d.ts +1 -1
  41. package/dist/editor/lib/animation/fields.js +1 -1
  42. package/dist/editor/lib/animation/hover-fields.d.ts +1 -0
  43. package/dist/editor/lib/animation/hover-fields.js +1 -0
  44. package/dist/editor/lib/animation/loop-fields.js +1 -1
  45. package/dist/editor/lib/document/add-target.d.ts +2 -1
  46. package/dist/editor/lib/document/add-target.js +1 -1
  47. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  48. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  49. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  50. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  51. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  52. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  53. package/dist/editor/lib/document/build-config.js +1 -1
  54. package/dist/editor/lib/document/canvas-typing.js +1 -1
  55. package/dist/editor/lib/document/card-display-chips.d.ts +33 -0
  56. package/dist/editor/lib/document/card-display-chips.js +1 -0
  57. package/dist/editor/lib/document/controls.d.ts +19 -2
  58. package/dist/editor/lib/document/controls.js +1 -1
  59. package/dist/editor/lib/document/field-groups.js +1 -1
  60. package/dist/editor/lib/document/geocode-resolve.d.ts +1 -0
  61. package/dist/editor/lib/document/geocode-resolve.js +1 -1
  62. package/dist/editor/lib/document/live-number-field.d.ts +12 -0
  63. package/dist/editor/lib/document/live-number-field.js +1 -0
  64. package/dist/editor/lib/document/page-root.js +2 -2
  65. package/dist/editor/lib/document/part-motion-canvas.d.ts +10 -0
  66. package/dist/editor/lib/document/part-motion-canvas.js +2 -0
  67. package/dist/editor/lib/editor-document-adapter.d.ts +5 -1
  68. package/dist/editor/lib/editor-document-adapter.js +1 -1
  69. package/dist/editor/lib/sections/section-dry-run.d.ts +34 -0
  70. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  71. package/dist/format/lib/animation/hover.d.ts +5 -0
  72. package/dist/format/lib/animation/hover.js +1 -0
  73. package/dist/format/lib/animation/index.d.ts +1 -0
  74. package/dist/format/lib/animation/index.js +1 -1
  75. package/dist/format/lib/content/block-sources.d.ts +9 -0
  76. package/dist/format/lib/content/block-sources.js +1 -1
  77. package/dist/format/lib/content/box-layout.d.ts +20 -1
  78. package/dist/format/lib/content/box-layout.js +1 -1
  79. package/dist/format/lib/content/box-separator.js +1 -1
  80. package/dist/format/lib/content/card-template.d.ts +9 -0
  81. package/dist/format/lib/content/card-template.js +1 -1
  82. package/dist/format/lib/content/container-gap.d.ts +11 -2
  83. package/dist/format/lib/content/container-gap.js +1 -1
  84. package/dist/format/lib/content/count-numbers.d.ts +7 -0
  85. package/dist/format/lib/content/count-numbers.js +1 -0
  86. package/dist/format/lib/content/page-width.d.ts +11 -0
  87. package/dist/format/lib/content/page-width.js +1 -1
  88. package/dist/format/lib/content/section-sticky.d.ts +1 -0
  89. package/dist/format/lib/content/section-sticky.js +1 -1
  90. package/dist/format/lib/content/site-gutter.d.ts +6 -0
  91. package/dist/format/lib/content/site-gutter.js +1 -1
  92. package/dist/format/lib/document/easel-row-words.d.ts +2 -0
  93. package/dist/format/lib/document/easel-row-words.js +1 -1
  94. package/dist/format/lib/document/panel-bands.d.ts +1 -0
  95. package/dist/format/lib/document/panel-bands.js +1 -1
  96. package/dist/format/lib/document/panel-tabs.d.ts +8 -0
  97. package/dist/format/lib/document/panel-tabs.js +1 -0
  98. package/dist/format/lib/document/part-records.d.ts +6 -0
  99. package/dist/format/lib/document/part-records.js +1 -0
  100. package/dist/format/lib/document/passes/registry-context.d.ts +1 -1
  101. package/dist/format/lib/document/passes/registry-context.js +1 -1
  102. package/dist/format/lib/document/passes/settings-groups.js +1 -1
  103. package/dist/format/lib/document/passes/types.d.ts +2 -0
  104. package/dist/format/lib/document/section-groups.d.ts +1 -1
  105. package/dist/format/lib/document/site-gap-fields.d.ts +1 -1
  106. package/dist/format/lib/document/site-gap-fields.js +1 -1
  107. package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
  108. package/dist/format/lib/editor-words-catalogue.js +4 -4
  109. package/dist/format/lib/fit-words.js +4 -3
  110. package/dist/format/lib/hero-ticker.d.ts +1 -0
  111. package/dist/format/lib/hero-ticker.js +1 -1
  112. package/dist/format/lib/sections/strip-shape.d.ts +1 -0
  113. package/dist/format/lib/sections/strip-shape.js +1 -1
  114. package/dist/format/lib/site-theme-row.d.ts +2 -0
  115. package/dist/format/lib/site-twin-row.d.ts +5 -0
  116. package/dist/format/lib/site-twin-row.js +1 -0
  117. package/dist/format/lib/source-rules/flat-theme-palette.js +1 -1
  118. package/dist/format/lib/source-rules/one-loop-module.js +3 -3
  119. package/dist/render/components/BlockFrame.d.ts +2 -1
  120. package/dist/render/components/BlockFrame.js +1 -1
  121. package/dist/render/components/Btn.js +1 -1
  122. package/dist/render/components/CardRowContext.d.ts +3 -1
  123. package/dist/render/components/CardRowContext.js +1 -1
  124. package/dist/render/components/CountRowsContext.d.ts +8 -0
  125. package/dist/render/components/CountRowsContext.js +1 -0
  126. package/dist/render/components/Flex.d.ts +5 -1
  127. package/dist/render/components/Flex.js +1 -1
  128. package/dist/render/components/Grid.d.ts +2 -1
  129. package/dist/render/components/Grid.js +1 -1
  130. package/dist/render/components/HeroGroup.d.ts +2 -1
  131. package/dist/render/components/HeroGroup.js +1 -1
  132. package/dist/render/components/HeroSection.d.ts +2 -1
  133. package/dist/render/components/HeroSection.js +1 -1
  134. package/dist/render/components/HeroSingle.d.ts +2 -1
  135. package/dist/render/components/HeroSingle.js +1 -1
  136. package/dist/render/components/ImageBlock.d.ts +4 -1
  137. package/dist/render/components/ImageBlock.js +1 -1
  138. package/dist/render/components/InBoxContext.d.ts +1 -0
  139. package/dist/render/components/InBoxContext.js +1 -1
  140. package/dist/render/components/IntroBleed.js +1 -1
  141. package/dist/render/components/LocationMap.js +1 -1
  142. package/dist/render/components/PartStyledKind.js +1 -1
  143. package/dist/render/components/PartStyledText.js +1 -1
  144. package/dist/render/components/PreviewHeaderContext.d.ts +9 -1
  145. package/dist/render/components/PreviewHeaderContext.js +1 -1
  146. package/dist/render/components/PublishedPartStylesContext.d.ts +4 -1
  147. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  148. package/dist/render/components/SectionAnimation.d.ts +8 -2
  149. package/dist/render/components/SectionAnimation.js +1 -1
  150. package/dist/render/components/SiteGutterFrame.d.ts +7 -1
  151. package/dist/render/components/SiteGutterFrame.js +1 -1
  152. package/dist/render/lib/animation/LoopTrack.d.ts +2 -2
  153. package/dist/render/lib/animation/LoopTrack.js +1 -1
  154. package/dist/render/lib/animation/part-motion.d.ts +21 -0
  155. package/dist/render/lib/animation/part-motion.js +1 -0
  156. package/dist/render/lib/content/block-size.js +1 -1
  157. package/dist/render/lib/content/button-look.js +1 -1
  158. package/dist/render/lib/content/section-edge.d.ts +10 -0
  159. package/dist/render/lib/content/section-edge.js +1 -0
  160. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  161. package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
  162. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  163. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  164. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  165. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  166. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  167. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
  168. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  169. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +8 -0
  170. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  171. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +1 -1
  172. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  173. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  174. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.d.ts +2 -0
  175. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -0
  176. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  177. package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
  178. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  179. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  180. package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
  181. package/dist/render/lib/document/part-styles.d.ts +10 -1
  182. package/dist/render/lib/document/part-styles.js +2 -2
  183. package/dist/render/lib/document/passes/block-size.js +1 -1
  184. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  185. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  186. package/dist/render/lib/document/passes/section-padding.js +1 -1
  187. package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
  188. package/dist/render/lib/sections/section-to-box.d.ts +5 -1
  189. package/dist/render/lib/sections/section-to-box.js +1 -1
  190. package/dist/render/lib/text-styles/site-text-styles.d.ts +16 -4
  191. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  192. package/package.json +3 -3
  193. package/dist/editor/lib/document/selected-host.d.ts +0 -2
  194. package/dist/editor/lib/document/selected-host.js +0 -1
@@ -1 +1 @@
1
- import{resolveBlockOffer as k}from"./block-offer.js";import{applyBlockPasses as j,registryPassContext as O}from"../../../render/lib/document/passes/index.js";import{PASS_INSPECTOR as S}from"./passes/inspector.js";function w(i,f,a){if(!i)return i;let h=!1;const p={};for(const[g,e]of Object.entries(i)){let o=e;if(e&&typeof e=="object")if(e.type==="slot")if(e.allow){const s=e.allow.filter(f);s.length!==e.allow.length&&(o={...e,allow:s})}else{const s=new Set(e.disallow??[]),d=a.filter(u=>!s.has(u));d.length>0&&(o={...e,disallow:[...e.disallow??[],...d]})}else{const s=w(e.arrayFields,f,a),d=w(e.objectFields,f,a);(s!==e.arrayFields||d!==e.objectFields)&&(o={...e,...s?{arrayFields:s}:null,...d?{objectFields:d}:null})}o!==e&&(h=!0),p[g]=o}return h?p:i}function F(i,f,a){const h={};for(const[o,s]of Object.entries(f.fields??{}))h[o]=s&&typeof s=="object"&&s.type==="slot"?{...s}:s;const p={...f,...f.fields?{fields:h}:null},g=j(i,p,a),e=Object.keys(h).filter(o=>g.fields?.[o]!==h[o]);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host["${i}"] declares ${e.map(o=>`"${o}"`).join(", ")}, ${e.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return g}function B(i,f){const a=Object.entries(f?.host??{}),h=f?.categories??[],p=k(f);if(!p&&a.length===0&&h.length===0)return i;const g=i.components,e=a.map(([t])=>t).filter(t=>t in g);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${e.map(t=>`"${t}"`).join(", ")}, which ${e.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);const o=t=>p?p.offers(t):!0,s=Object.keys(g).filter(t=>!o(t)),d={};for(const[t,n]of Object.entries(g)){const c=p?w(n?.fields,o,s):n?.fields;d[t]=c===n?.fields?n:{...n,fields:c}}if(a.length>0){const t=new Set(a.map(([r])=>r)),n=i.categories?.structure?.components??[],c=O(Object.keys(g),n),m={...c,isSection:r=>t.has(r)||c.isSection(r),isHostBlock:r=>t.has(r),inspector:S};for(const[r,l]of a){const b=F(r,l,m),y=w(b.fields,o,s);d[r]=y===b.fields?b:{...b,fields:y}}}const u=[];for(const[t,n]of Object.entries(i.categories??{})){const c=n?.components??[],m=c.filter(o);m.length===c.length?u.push([t,n]):m.length>0&&u.push([t,{...n,components:m}])}for(const t of h){const n=t.components.filter(l=>l in d&&o(l));if(n.length===0)continue;const c=u.find(([l])=>l===t.key);if(c){const[,l]=c,b=new Set(l.components??[]);c[1]={...l,components:[...l.components??[],...n.filter(y=>!b.has(y))]};continue}const m=[t.key,{title:t.title,components:n}],r=t.before?u.findIndex(([l])=>l===t.before):-1;r===-1?u.push(m):u.splice(r,0,m)}return{...i,components:d,categories:Object.fromEntries(u)}}export{B as buildConfig};
1
+ import{cardTemplateBlocks as w,hasCardTemplate as j,isCardTemplateBlock as O}from"../../../format/lib/content/card-template.js";import{resolveBlockOffer as $}from"./block-offer.js";import{applyBlockPasses as B,registryPassContext as C}from"../../../render/lib/document/passes/index.js";import{PASS_INSPECTOR as F}from"./passes/inspector.js";function k(n,a,c){if(!n)return n;let l=!1;const d={};for(const[s,e]of Object.entries(n)){let o=e;if(e&&typeof e=="object")if(e.type==="slot")if(e.allow){const r=e.allow.filter(a);r.length!==e.allow.length&&(o={...e,allow:r})}else{const r=new Set(e.disallow??[]),p=c.filter(m=>!r.has(m));p.length>0&&(o={...e,disallow:[...e.disallow??[],...p]})}else{const r=k(e.arrayFields,a,c),p=k(e.objectFields,a,c);(r!==e.arrayFields||p!==e.objectFields)&&(o={...e,...r?{arrayFields:r}:null,...p?{objectFields:p}:null})}o!==e&&(l=!0),d[s]=o}return l?d:n}function S(n,a,c){const l={};for(const[o,r]of Object.entries(a.fields??{}))l[o]=r&&typeof r=="object"&&r.type==="slot"?{...r}:r;const d={...a,...a.fields?{fields:l}:null},s=B(n,d,c),e=Object.keys(l).filter(o=>s.fields?.[o]!==l[o]);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host["${n}"] declares ${e.map(o=>`"${o}"`).join(", ")}, ${e.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return s}function v(n,a,c){const l=new Set([...Object.keys(n.components??{}),...a]),d=[...Object.entries(n.categories??{}).map(([s,e])=>({key:s,components:e?.components??[]})),...c];for(const s of d){const e=s.components.filter(O);if(e.length>0)throw new Error(`efficient-web-builder: the category "${s.key}" lists ${e.map(o=>`"${o}"`).join(", ")}, a block a card template declares. A card's block is added in its card only; take it out of the category.`)}for(const s of l){if(!j(s))continue;const e=w(s).filter(o=>!l.has(o.type)).map(o=>`"${o.type}"`);if(e.length>0)throw new Error(`efficient-web-builder: the card template of "${s}" declares ${e.join(", ")}, which the editor does not register. Register it in the registry or in blocks.host.`)}}function A(n,a){const c=Object.entries(a?.host??{}),l=a?.categories??[],d=$(a);if(v(n,c.map(([t])=>t),l),!d&&c.length===0&&l.length===0)return n;const s=n.components,e=c.map(([t])=>t).filter(t=>t in s);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${e.map(t=>`"${t}"`).join(", ")}, which ${e.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);const o=t=>d?d.offers(t):!0,r=Object.keys(s).filter(t=>!o(t)),p={};for(const[t,i]of Object.entries(s)){const h=d?k(i?.fields,o,r):i?.fields;p[t]=h===i?.fields?i:{...i,fields:h}}if(c.length>0){const t=new Set(c.map(([y])=>y)),i=n.categories?.structure?.components??[],g={...C(Object.keys(s),i,t),isHostBlock:y=>t.has(y),inspector:F};for(const[y,f]of c){const b=S(y,f,g),u=k(b.fields,o,r);p[y]=u===b.fields?b:{...b,fields:u}}}const m=[];for(const[t,i]of Object.entries(n.categories??{})){const h=i?.components??[],g=h.filter(o);g.length===h.length?m.push([t,i]):g.length>0&&m.push([t,{...i,components:g}])}for(const t of l){const i=t.components.filter(f=>f in p&&o(f));if(i.length===0)continue;const h=m.find(([f])=>f===t.key);if(h){const[,f]=h,b=new Set(f.components??[]);h[1]={...f,components:[...f.components??[],...i.filter(u=>!b.has(u))]};continue}const g=[t.key,{title:t.title,components:i}],y=t.before?m.findIndex(([f])=>f===t.before):-1;y===-1?m.push(g):m.splice(y,0,g)}return{...n,components:p,categories:Object.fromEntries(m)}}export{A as buildConfig};
@@ -1 +1 @@
1
- import{useSyncExternalStore as T}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{SHOP_MARKUP as v}from"../../../format/lib/markup.js";import{readHidable as O,textFieldOffPage as S}from"./controls.js";import{decodePartId as k}from"efficient-easel/draw";import{canTypeOnCanvas as b,PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as K}from"./part-row-field.js";import{decodePartKey as w,partRowValue as A}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as R,typeInPlaceKind as C}from"../../../render/lib/document/part-text.js";import{commitPartText as F}from"./part-typing.js";import{consentWordsOf as E}from"../../../format/lib/content/consent-banner.js";const I=["bold","italic","underline","strike","link","sup","sub"],_=["bullet","number"];function h(e,n){return e?[...I,...n?_:[]]:[]}function g(e,n){const r=k(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=n.getItemById(u),c=n.getSelectorForId(u);if(!o||!c)return null;const{key:t,row:i}=w(s),p=n.components[o.type]?.fields?.[t],d=i?K(p,i):p,m=C(d);if(!m)return null;const l=o.props??{};if(E(l)!==null||!i&&P(o.type,l,t)||i&&!(Array.isArray(l[t])&&i.index<l[t].length))return null;const x=i?A(l[t],i):l[t];return{node:o,selector:c,propKey:s,kind:m,stored:x,offPage:S(d)}}function J(e,n){const r=g(e,n);if(!r)return null;const{text:u,hidden:s}=O(r.stored);if(!b({offPage:r.offPage,hidden:!!s}))return null;const o=R(r.kind);return{partId:e,value:u,rules:v,multiline:o,offered:h(r.kind!=="plainText",o),write:c=>{const t=g(e,n);t&&F({node:t.node,propKey:t.propKey,kind:t.kind,zone:t.selector.zone,index:t.selector.index},c,n.replace)}}}function Q(e,n,r){return e?.isConnected&&e.getAttribute(y)===r?e:n?.querySelector(`[${y}="${B(r)}"]`)??null}function B(e){return e.replace(/["\\]/g,"\\$&")}function X(e){const n=e.activeElement;return n?n.tagName==="IFRAME"||!!n.closest(".es-canvas"):!1}let f=null;const a=new Set;function L(){return f}function Y(e){if(e!==f){f=e;for(const n of a)n()}}function M(e){return a.add(e),()=>{a.delete(e)}}function Z(){return T(M,L,()=>null)}export{L as canvasTypingPart,X as keysOnCanvas,Q as partElement,h as partTextTools,J as partTypingTarget,Y as setCanvasTypingPart,M as subscribeCanvasTypingPart,Z as useCanvasTypingPart};
1
+ import{useSyncExternalStore as T}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{linkedCount as k}from"../../../format/lib/content/count-numbers.js";import{SHOP_MARKUP as v}from"../../../format/lib/markup.js";import{readHidable as O,textFieldOffPage as S}from"./controls.js";import{decodePartId as b}from"efficient-easel/draw";import{canTypeOnCanvas as K,PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as w}from"./part-row-field.js";import{decodePartKey as A,partRowValue as C}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as R,typeInPlaceKind as F}from"../../../render/lib/document/part-text.js";import{commitPartText as E}from"./part-typing.js";import{consentWordsOf as I}from"../../../format/lib/content/consent-banner.js";const _=["bold","italic","underline","strike","link","sup","sub"],h=["bullet","number"];function B(e,n){return e?[..._,...n?h:[]]:[]}function x(e,n){const r=b(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=n.getItemById(u),c=n.getSelectorForId(u);if(!o||!c)return null;const{key:t,row:i}=A(s),p=n.components[o.type]?.fields?.[t],d=i?w(p,i):p,m=F(d);if(!m)return null;const l=o.props??{};if(I(l)!==null||!i&&P(o.type,l,t)||o.type==="Text"&&t==="text"&&k(l)||i&&!(Array.isArray(l[t])&&i.index<l[t].length))return null;const g=i?C(l[t],i):l[t];return{node:o,selector:c,propKey:s,kind:m,stored:g,offPage:S(d)}}function X(e,n){const r=x(e,n);if(!r)return null;const{text:u,hidden:s}=O(r.stored);if(!K({offPage:r.offPage,hidden:!!s}))return null;const o=R(r.kind);return{partId:e,value:u,rules:v,multiline:o,offered:B(r.kind!=="plainText",o),write:c=>{const t=x(e,n);t&&E({node:t.node,propKey:t.propKey,kind:t.kind,zone:t.selector.zone,index:t.selector.index},c,n.replace)}}}function Y(e,n,r){return e?.isConnected&&e.getAttribute(y)===r?e:n?.querySelector(`[${y}="${L(r)}"]`)??null}function L(e){return e.replace(/["\\]/g,"\\$&")}function Z(e){const n=e.activeElement;return n?n.tagName==="IFRAME"||!!n.closest(".es-canvas"):!1}let f=null;const a=new Set;function M(){return f}function ee(e){if(e!==f){f=e;for(const n of a)n()}}function $(e){return a.add(e),()=>{a.delete(e)}}function ne(){return T($,M,()=>null)}export{M as canvasTypingPart,Z as keysOnCanvas,Y as partElement,B as partTextTools,X as partTypingTarget,ee as setCanvasTypingPart,$ as subscribeCanvasTypingPart,ne as useCanvasTypingPart};
@@ -0,0 +1,33 @@
1
+ import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
2
+ export declare const NOT_CARD_OF_TEMPLATE = "notCardOfTemplate";
3
+ export declare const CARD_BOX_FACTS: BlockShowWhenFacts;
4
+ type Child = {
5
+ type: string;
6
+ props: Record<string, unknown>;
7
+ };
8
+ type Card = {
9
+ type?: unknown;
10
+ props: Record<string, unknown>;
11
+ };
12
+ export declare function cardDisplayParts(card: Card, locked?: (child: Child) => boolean): Child[];
13
+ export declare function cardDisplayItems(card: Card, label: (child: Child) => string, locked?: (child: Child) => boolean): {
14
+ id: string;
15
+ label: string;
16
+ shown: boolean;
17
+ }[];
18
+ export declare function withChildShown<C extends Card>(card: C, id: string, shown: boolean): C;
19
+ export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string): string;
20
+ export declare function CardDisplayChips({ card, ownerType, labelOf, write, readOnly, }: {
21
+ card: Card;
22
+ ownerType: string | undefined;
23
+ labelOf: (type: string) => string;
24
+ write: (next: (latest: Card) => Card) => void;
25
+ readOnly?: boolean;
26
+ }): import("react").JSX.Element;
27
+ export declare function cardDisplayField(): {
28
+ type: "custom";
29
+ render: ({ readOnly }: {
30
+ readOnly?: boolean;
31
+ }) => import("react").JSX.Element;
32
+ };
33
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as x}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return x(n)?n:[]}const m=e=>!!e.props?._hidden;function R(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?R(t,n):n(t)?[]:[t])}function P(e,n,t){const i=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,R as cardDisplayParts,w as withChildShown};
@@ -1,4 +1,5 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
+ import { type FieldsPatch } from "efficient-easel/easel";
2
3
  import { type MediaValue } from "../../../format/lib/media-value.js";
3
4
  import { type LoadingShows } from "../../../format/lib/hero-video.js";
4
5
  import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
@@ -56,6 +57,7 @@ export declare function SiteGapDefaultReset({ inherited, onReset, label, }: {
56
57
  }): import("react").JSX.Element;
57
58
  export declare function containerGapField(container: GapContainer): import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number>;
58
59
  export declare function containerGapPhoneField(container: GapContainer): CustomField<string | number>;
60
+ export declare function containerGapTabletField(container: GapContainer): CustomField<string | number>;
59
61
  export declare const DESKTOP_GAP_NOT_OVERLAP: ShowWhenRule;
60
62
  export declare function containerGapRows(container: GapContainer): {
61
63
  [x: string]: import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number> | CustomField<string | number>;
@@ -113,7 +115,6 @@ export declare function plainTextarea(label: string, placeholder?: string, hint?
113
115
  export declare const BUCKET_ICONS: Record<Bucket, (props: {
114
116
  size?: number;
115
117
  }) => ReactElement>;
116
- export declare function entriesHiddenForTab(buckets: readonly Bucket[], active: string): boolean | null;
117
118
  export declare function panelNote(text: string): CustomField<undefined>;
118
119
  export declare function PanelNoteLine({ text }: {
119
120
  text: string;
@@ -180,7 +181,7 @@ interface CornersRowTier {
180
181
  export declare function cornersRowField(tier: CornersRowTier): CustomField<number | null>;
181
182
  export declare function useSelectedSibling(key: string): [unknown, (next: unknown) => void];
182
183
  export declare function keptBy<T = unknown>(): CustomField<T>;
183
- export declare function useSelectedPatch(): (patch: Record<string, unknown>) => void;
184
+ export declare function useSelectedPatch(): (patch: FieldsPatch) => void;
184
185
  export declare function cornerSidesField(): CustomField<string[] | null>;
185
186
  export declare function sectionCornersField(): CustomField<number | null>;
186
187
  export declare function sectionShapeFields(): Record<string, unknown>;
@@ -193,9 +194,13 @@ export declare function boxShareField(points?: readonly (typeof BOX_SHARE_POINTS
193
194
  export declare function boxBlockSpacingField(): SelectField;
194
195
  export declare function boxSharePhoneField(): CustomField<string>;
195
196
  export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
197
+ export declare function boxColumnsFields(): {
198
+ phoneRow: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
199
+ };
196
200
  export declare function sizeField(label: string, min: number, max: number, step: number, fallback: number, role: TypeRole): CustomField<TypeSizeValue>;
197
201
  export declare function cellWidthFields(): Record<string, unknown>;
198
202
  export declare function useSelectedProps(): Record<string, unknown>;
203
+ export declare const RowPropsContext: import("react").Context<Record<string, unknown> | null>;
199
204
  export declare function phoneOverrideField(opts: {
200
205
  label: string;
201
206
  desktopKey: string;
@@ -332,6 +337,18 @@ export declare function displayFields(parts: readonly {
332
337
  id: string;
333
338
  label: string;
334
339
  }[], key?: string): Record<string, CustomField<unknown>>;
340
+ export declare function DisplayRow({ parts, changed, shown, onPress, onReset, detail, disabledReason, }: {
341
+ parts: readonly {
342
+ id: string;
343
+ label: string;
344
+ }[];
345
+ changed: boolean;
346
+ shown: (id: string) => boolean;
347
+ onPress: (id: string, shown: boolean) => void;
348
+ onReset: () => void;
349
+ detail?: string;
350
+ disabledReason?: string;
351
+ }): import("react").JSX.Element;
335
352
  export declare function cardImageField(): CustomField<number | null>;
336
353
  export declare function imageCornersField(): CustomField<number | null>;
337
354
  export declare function galleryLayoutField(): CustomField<string>;
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as k,Fragment as O}from"react/jsx-runtime";import{cloneElement as he,useEffect as ut,useId as ge,useRef as z,useState as H}from"react";import{useEasel as ne}from"efficient-easel/easel";import{toDateKey as pt,fromDateKey as ft}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as be}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as xe,loadingShowsOf as mt}from"../../../format/lib/hero-video.js";import{readHidable as Se,hidableText as ye}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as oe,LINK_FIELD_MARKER as Ce,MEDIA_FIELD_MARKER as _e,SCAFFOLD_FIELD_MARKER as we,TEXT_FIELD_MARKER as w,foldMetaOf as re,textFieldIdentifier as ht}from"efficient-easel/draw";import gt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as bt}from"../../../render/lib/document/show-when.js";import xt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as St,CORNER_RADIUS_MAX as Ie,CORNER_RADIUS_MIN as L}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as yt,IMAGE_CORNERS_LABEL as Ct}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as _t}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as wt,GALLERY_LAYOUTS as Y,GALLERY_LAYOUT_KEYS as It,galleryChoices as Ee,galleryPictureCells as Et}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Rt}from"./shell-glyph.js";import{anchorSiblingsOf as Tt,placementPoints as Ot}from"../../../format/lib/hero-group-placement.js";import Pt,{KEEP_HINT_CLASS as At}from"../../components/KeepHint.js";import Ft from"../../components/AnchorField.js";import{AdjustIcon as kt,EyeIcon as Lt,AnimationIcon as Nt,BackgroundIcon as vt,BorderAllIcon as Dt,BlockSectionIcon as Bt,ColumnWidthsIcon as Re,ColumnsIcon as Ht,CornerIcon as Gt,DirectionDownIcon as Mt,DirectionLeftIcon as Kt,DirectionRightIcon as Wt,DirectionUpIcon as Ut,EditIcon as $t,GapIcon as Xt,GridIcon as jt,GroundIcon as Te,HashIcon as Oe,HeightIcon as zt,ImageIcon as Yt,ListIcon as Vt,LocationIcon as Pe,PaddingBottomIcon as Ae,PaddingLeftIcon as Fe,PaddingRightIcon as ke,PaddingTopIcon as Le,PageIcon as qt,StickyIcon as Zt,RotateIcon as Jt,SearchIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as on}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as ve,CORNER_SIDE_POINTS as rn,hasOwnSectionCorners as ln,normalizeCornerSides as De}from"../../../format/lib/content/section-corners.js";import{enclosingPath as an,enclosingSection as sn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as cn,SettingsField as h,SettingsGroup as dn,SettingsGroupSub as un,SettingsSegmented as pn,SettingsBorder as fn,SettingsSidesEach as mn,SettingsSwitch as ie,borderSides as hn,borderStartEach as gn}from"efficient-easel/panel";import{ListField as bn}from"efficient-easel/fields";import{DisplayChips as xn}from"efficient-shell/ui";import{desktopDisplayChanged as Sn,partShownOnDesktop as yn,partShownOnPhone as Cn,phoneDisplayChanged as _n,withDesktopPart as wn,withPhonePart as In}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as En,Checkbox as Rn,ColorSwatch as Tn,CornersInput as On,DatePicker as Pn,DateTimePicker as An,FOCAL_DEFAULT as Fn,PictureTiles as kn,IconPicker as Ln,IconButton as Be,InputNumber as He,Slider as Nn,Tooltip as V}from"efficient-shell/ui";import{ColourRow as Ge,InheritedColourRow as vn}from"./ColourControl.js";import{keptByRow as Dn}from"efficient-easel/screen/lib/document/style-fields";import Me from"./MarkupToolbar.js";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Bn,NoControlMark as Hn,noControlField as Ke}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Gn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Mn,resolvePhoneValue as le}from"../../../format/lib/document/phone-override.js";import{phoneKey as N}from"efficient-easel/draw";import{SuppressibleText as Kn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Wn,CARD_OUTLINE_OPTIONS as Un,DEFAULT_CARD_INDEX_FORMAT as $n,DEFAULT_CARD_OUTLINE as Xn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as jn,DEFAULT_COVER_INDEX as zn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Yn}from"efficient-easel/draw";import Vn from"../../components/MediaUploadField.js";import{useSelectedHost as ae}from"./selected-host.js";import qn from"../../components/MultiSelectField.js";import Zn from"../../components/SectionThemePicker.js";import Jn from"../../components/SearchSelectField.js";import Qn from"../../components/StorefrontLinkField.js";import{UiIcon as We}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as eo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as to}from"efficient-easel/draw/client";import{encodePartId as no}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as oo,useEaselStrings as ro}from"efficient-easel/strings";import{hasPhoneHeight as io,resolveSectionMinHeight as lo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as q,SECTION_STICK_LABEL as se,hasPhoneStick as ao,resolveSectionStick as so}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as co,SECTION_MIN_HEIGHT_GROUP_LABEL as G,SECTION_SCREEN_PCT as uo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as po,resolveContainerDirection as Ue}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as fo,BOX_BLOCK_SPACING_POINTS as $e,BOX_PHONE_ROW_LABEL as mo,BOX_PHONE_ROW_MAX as ho,BOX_PHONE_ROW_MIN as Xe,BOX_SHARE_LABEL as ce,BOX_SHARE_PHONE_DEFAULT as go,BOX_SHARE_PHONE_POINTS as bo,BOX_SHARE_POINTS as xo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as So}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as je,normalizeTheme as ze}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Ye,CONTAINER_GAP_BUILT_IN as yo,CONTAINER_GAP_PHONE as Co,GAP_FIELD_CONTAINER as Ve,hasOwnContainerGap as _o,hasOwnPhoneGap as wo,resolveContainerGap as Io,resolvePhoneContainerGap as qe}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Eo,CARD_IMAGE_BG_OFF as Ro,CARD_IMAGE_BG_SWATCH_NAMES as To,CARD_IMAGE_BG_SWATCHES as Oo,isCardImageBackgroundInheriting as Po,cardImageBackgroundChoice as Ao,THEME_CARD_IMAGE_BG as Fo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as ko,SECTION_BG_SWATCHES as Lo,SECTION_BG_SWATCH_NAMES as No,THEME_SECTION_BG as vo,isSectionBackgroundInheriting as Do}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Bo,nestedAccentValue as Ze,resolveSectionAccent as Z}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ho,TYPE_SIZE_INHERIT as Go,isTypeSizeInheriting as Mo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ko,WIDTH_CHOICE_LABEL as Wo,WIDTH_INHERIT as Uo}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as $o}from"./panel-heading-scope.js";import{useEaselSession as Xo}from"efficient-easel/screen/lib/session-context";import{backendOf as jo}from"../website-session.js";import{BOX_GAP as zo,describedAs as E,group as _,iconOf as M,sharedStyleKinds as K}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Yo,gapField as Je,Segmented as de,segmented as Vo,select as W,slider as U}from"./box-fields.js";function Cl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function v(e,t){return l("{value} from {from}",{value:e,from:t})}function qo(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):v(`${e}px`,l("Styles"))}function Zo({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:qo(),onReset:t})}function Jo(e){return Je({...zo,builtIn:yo[e],resolve:(t,n)=>Io(e,t,n?.siteGap),action:(t,n)=>i(Zo,{inherited:!_o(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ve]:e}})}function Qo(e){return bt(b("mobile",{[Ve]:e,type:"custom",render:t=>i(tr,{container:e,...t})}),er)}const er={not:{field:"gap",in:Array.from({length:-Ye.min},(e,t)=>Ye.min+t)}};function _l(e){return{gap:b("desktop",Jo(e)),[N("gap")]:Qo(e)}}function tr({container:e,...t}){const[n]=D("gap"),o=t.field?.siteGap,r=qe(e,void 0,n,o);return Je({...Co,builtIn:r,resolve:s=>qe(e,s,n,o),action:(s,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:wo(s),detail:v(`${r}px`,l("Desktop")),onReset:()=>c(void 0)})}).render(t)}function wl(e){return Yo({offered:po(e),fallback:Ue(e,void 0),resolve:t=>Ue(e,t)})}function Il(e,t){return Ot(t?Tt(e,t):[],t)}function nr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:v(l("Full"),l("the page")),onReset:t})}function A({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:d,hidden:f}=Se(e),m=z(null),p=z(null),u=T=>t(s?{text:T,hidden:f}:T),x=()=>t({text:d,hidden:!f}),g=s&&f,R=ge(),C=r?ar(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(Pt,{children:l(r)}):void 0,j=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(h,{label:l(n),icon:i(tn,{}),htmlFor:R,className:g?"is-hidden":void 0,hint:C,action:s?i(V,{content:j,children:i(Be,{"aria-pressed":f,"aria-label":j,onClick:x,children:f?i(We,{name:"eye-off",size:14}):i(We,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(Me,{target:a?p:m,value:d,onChange:u}),a?i("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:T=>u(T.target.value)}):i("input",{id:R,ref:m,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:T=>u(T.target.value)})]})})}function El(e,t){return{...e,[we]:t}}function Rl(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Tl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const Qe="sfPanelOnly";function Ol(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Qe]:!0}}function Pl(e){return!!e&&typeof e=="object"&&e[Qe]===!0}function Al(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Wa,SCALAR_TEXT_CONTROLS as Ua}from"efficient-easel/draw";function Fl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[Bn]:o,...r}=e;return{...r,[Gn]:!0,render:t}}const or=new Set(Yn),$={type:"radio",options:[{value:!0},{value:!1}]},et={text:{type:"object",objectFields:{text:{type:"text"},hidden:$}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},F=(e,t)=>{const n=E({...t,[w]:e},{...et[e.control],label:e.label});if(!or.has(e.control))return n;const o=t.render;return{...Ke(n,"authored-copy"),render:r=>i(Kn,{name:r.name,children:o(r)})}},kl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",rr={field:"source.slug",set:!0},Ll={not:rr},ir="Select a word, then press the highlighter.",lr=new Set([ir]),ar=e=>lr.has(e);function Nl(e,t,n){return F({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function vl(e,t,n){return F({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Dl(e,t,n){return F({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Bl(e,t,n){return F({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Hl(e){return{type:"custom",[Ce]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Qn,{value:ye(t),onChange:n,label:e})}}function Gl(e,t,n){return F({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Ml={Design:kt,Animation:Nt};function Kl(e,t){return e.includes("Design")?t!=="Design":null}function Wl(e){return{type:"custom",render:()=>i(sr,{text:e})}}function sr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function Ul(e){return re(e)!==null&&e?.tabs!==void 0}const tt=new Map;function $l(e,t){const n=`${e}\0${t?t.join(""):""}`,o=tt.get(n)??{type:"custom",tabs:t,[oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(O,{})};return tt.set(n,o),o}const nt=new Map;function Xl(e){const t=nt.get(e)??{type:"custom",[oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(O,{})};return nt.set(e,t),t}function cr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function jl(e,t){return cr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(O,{})}}function zl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(O,{})}}function Yl({title:e,children:t}){const[n,o]=H(()=>!ue.has(e));return i(dn,{title:e,open:n,onToggle:r=>{o(r),r?ue.delete(e):ue.add(e)},children:t})}const ue=new Set;function Vl({label:e}){return i(un,{title:l(e),level:$o(2)})}function ot({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(V,{content:d,children:i(Tn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function ql(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=Do(n,t);return i(h,{label:l(e),icon:i(vt,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(ko)}),children:ot({swatches:Lo,current:r?vo:n??t??"",onPick:o,names:No})})}}}function dr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=Po(r,t);return i(h,{label:l(e),icon:i(Te,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Eo)}),children:ot({swatches:Oo,current:a?Fo:Ao(r,t),onPick:o,names:To})})}}}function Zl(e=n=>n,t){return K({_gSectionTheme:_(Bo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Zn,{value:e(n),onChange:o,followLabel:t})}})}function X({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:d,disabled:f=!1}){const m=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Nn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function rt(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:d,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const x=typeof p=="number"?p:null,g=x===null;return i(h,{label:l(e),icon:f?M(f):void 0,value:g?d||a===void 0?void 0:l(a):`${x}${m}`,changed:!g,action:d?he(d,{changed:!g,onReset:()=>u(null)}):i(y,{words:S()?.panel,label:l(e),changed:!g,onReset:()=>u(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:x,label:e,onChange:u}):X({min:n,max:o,step:r,value:x??n,readout:!1,ariaLabel:e,onChange:u})})}}}const J="Corners";function pe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(h,{label:l(J),icon:i(Gt,{}),changed:r,action:he(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(pr,{tier:e,px:o,onRadius:n})})}}}function D(e){const t=ae();return[t?.values?.[e],n=>t?.onChange(e,n)]}function it(){return Ke({type:"custom",render:()=>i(Hn,{})},"always")}function ur(){const e=ae();return t=>e?.onChangeMany(t)}function pr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=D(e.sidesKey),s=De(r)??[...ve];return i(On,{label:l(J),value:s,corners:rn,onChange:c=>{const d=De(c)??[];a(d.length===ve.length?null:d)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:Ie,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function lt(){return it()}function fr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):v(r,l("Styles")),onReset:n})}function mr(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:L}function hr(){return pe({sidesKey:"sectionCornerSides",useFollowed:mr,mark:i(fr,{label:J}),hint:gr})}const gr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Jl(){return K({_gShape:_("Shape"),sectionCorners:hr(),sectionCornerSides:lt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const br=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function xr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Sr(){let e;try{const t=ze(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||je.line}function yr({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[d,f]=H(()=>r?gn(c,s):!1),m=br(),p=u=>xr(r&&a?u:{width:u.width,color:u.color,...a?{style:u.style}:{}});return i(h,{label:l("Border"),icon:i(Dt,{}),action:r?i(mn,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(fn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:m,styles:a,max:So})})}function Cr({value:e,onChange:t,tier:n}){const[o]=D("sectionBorder"),r=Sr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(yr,{value:e,onChange:t,placeholder:{sides:hn(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function at(e){return b(e,{type:"custom",render:({value:t,onChange:n})=>i(Cr,{value:t,onChange:n,tier:e})})}function Ql(e){return{type:"custom",render:()=>i(_r,{partKey:e})}}function _r({partKey:e}){const[t]=D("id"),[n]=D("_partStyles"),{textStyles:o}=P(),r=ro();let a=null;try{a=to().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(cn,{name:l("Text"),preview:eo(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??oo.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(no(t,e))}})}function st(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=ne(d=>d),c=s?.props?.id?String(s.props.id):void 0;o=c?sn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return ln(r)?r:n}function wr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=st(L);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:v(`${o}px`,l("the section")),onReset:n})}function Ir(){return i(O,{children:l("Follows the section's Corners until you set a number here.")})}function Er(){return pe({sidesKey:"cardCornerSides",useFollowed:()=>st(L),mark:i(wr,{label:J}),hint:i(Ir,{})})}function Rr(){return{type:"custom",render:()=>i(gt,{})}}function ea(e){return{...e,render:t=>i(xt,{render:e.render,props:t})}}function ta(){return{_gShape:_("Shape"),cardCorners:Er(),cardCornerSides:lt(),cardCornersApplyAll:Rr()}}function Tr(e=xo,t=e[0].value){return E({type:"custom",render:({value:n,onChange:o})=>{const r=e.find(a=>a.value===n)??e.find(a=>a.value===t)??e[0];return i(h,{label:l(ce),icon:i(Re,{}),value:l(r.label),children:i(kn,{className:"sf-gallery-layouts",label:l(ce),value:r.value,onChange:o,options:e.map(a=>({value:a.value,label:l(a.label),picture:i("span",{className:"sf-gallery-pic",children:Or(a.weights).map((s,c)=>i("i",{style:{gridColumn:`span ${s}`}},c))})}))})})}},{type:"select",label:ce,options:e.map(n=>({value:n.value,label:n.label}))})}function Or(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function na(){return W(fo,i(Xt,{}),$e,$e[0].value)}function oa(){return b("mobile",Tr(bo,go))}function ra(){return b("mobile",U(mo,i(Ht,{}),Xe,ho,1,Xe))}function ia(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(h,{label:l(e),icon:i(Ne,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!Mo(s),detail:l("the Text style in Styles"),onReset:()=>c(Go),defaultAction:{onPress:()=>c(Ho),title:l("Keep this section's own built-in size"),icon:i(Bt,{})}}),children:X({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function la(){return{_gCellWidth:_("Cell width"),gridSpan:W("Positions",i(Re,{}),[{label:"Auto",value:""},...Array.from({length:_t},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function B(){let e=null;try{e=ne(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Pr({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const d=B()[s],f=le(void 0,d,c);return i(O,{children:X({min:e,max:t,step:n,value:le(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function Ar({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=B()[t],c=le(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${c}${o}`}),onReset:a})}function Fr(e){return rt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ar,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Pr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const kr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Lr={Top:Le,Bottom:Ae,Left:Fe,Right:ke},Nr=e=>{const t=Lr[e];return i(t,{})};function aa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=C=>kr[C],a=C=>U(r("Top"),i(Le,{}),I.min,I.max,I.step,C,"px"),s=(C,j,T,te=I)=>b("mobile",Fr({label:r(C),icon:Nr(C),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:T})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,x=e.sidePhone??u,g=e.phone===!0,R=C=>g?b("desktop",C):C;return K({...o?{_gSpacing:_("Padding")}:{},[t]:R(a(c)),...g?{[N(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:R(U(r("Bottom"),i(Ae,{}),I.min,I.max,I.step,d,"px")),...g?{[N(n)]:s("Bottom",n,d)}:{}},...e.sides?{[f]:R(U(r("Left"),i(Fe,{}),p.min,p.max,p.step,u,"px")),...g?{[N(f)]:s("Left",f,x,p)}:{},[m]:R(U(r("Right"),i(ke,{}),p.min,p.max,p.step,u,"px")),...g?{[N(m)]:s("Right",m,x,p)}:{}}:{}})}function sa(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&re(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const Q="Width";function ca(e,t=Ko,n=!0){const o=t.map(r=>({label:Wo[r],value:r}));return K({...n?{_gWidth:_(Q)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(h,{label:l(Q),icon:i(nn,{}),action:n?i(nr,{inherited:a?.inherited??!1,onReset:()=>r(Uo),label:Q}):void 0,children:de({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:Q})})}})}function da(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(h,{label:G,icon:M(i(zt,{})),action:o?o(a):void 0,children:de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:G})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?uo:co;return i("div",{className:"sf-field",children:X({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:G,onChange:r})})}}),n=()=>Vo("Unit",i(Oe,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return K({_gHeight:_(G),sectionHeightMode:b("desktop",e()),sectionHeightValue:b("desktop",t()),sectionHeightUnit:b("desktop",n()),sectionHeightModePhone:b("mobile",e(o=>i(vr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:b("mobile",t()),sectionHeightUnitPhone:b("mobile",n())})}function vr({onClear:e}){const t=B(),n=io(t),o=lo(t),r=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return i(y,{words:S()?.panel,label:l(G),changed:n,detail:r,onReset:e})}function ua(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(Dr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:X({min:q.min,max:q.max,step:q.step,value:typeof n=="number"?n:q.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:_(se),stickTop:b("desktop",e(!1)),stickTopDistance:b("desktop",t()),stickTopPhone:b("mobile",e(!0)),stickTopDistancePhone:b("mobile",t())}}function Dr({value:e,onChange:t,labelId:n,phone:o}){const r=B(),a=so(r),s=o?a.phone:e===!0;return i(h,{label:l(se),labelId:n,icon:M(i(Zt,{})),action:k(O,{children:[o?i(y,{words:S()?.panel,label:l(se),changed:ao(r),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,i(ie,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const ct="e.g. about";function pa(){return{_gAnchor:_("Anchor"),anchor:F({control:"plainText",label:"Name",placeholder:ct},{type:"custom",render:({value:e,onChange:t})=>i(Ft,{value:e,onChange:t,nameBox:(n,o)=>i(A,{value:n,onChange:o,label:"Name",placeholder:ct,hideable:!1,markup:!1})})})}}function fa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(An,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function ma(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Pn,{id:c,value:ft(typeof o=="string"?o:null),onChange:d=>r(d?pt(d):"")})})}}}function dt(e,t,n,o){return{type:"custom",...E({},{...$,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const d=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(h,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(ie,{checked:d,onChange:a,ariaLabelledBy:f})})}}}function ha(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ge,{label:l("Background"),icon:i(qt,{}),id:r,value:on(e),onChange:t})}}}function ga(e,t){return{type:"custom",...E({},{...$,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(h,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Rn,{id:s,checked:a,onChange:o})})}}}function ba(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(Ge,{label:l(e),icon:n,value:o||t,onChange:r})}}function xa(){return{type:"custom",render:({value:e,onChange:t})=>i(Br,{value:typeof e=="string"?e:"",onChange:t})}}function Br({value:e,onChange:t}){const{hex:n,n:o}=Gr();return i(vn,{label:l("Fill"),icon:i(Te,{}),value:e,inherited:n,resetTo:v(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Hr(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return Z(n);const r=an(e,t);if(r.length===0)return null;const a=Z(Ze(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=Z(Ze(r[s].sectionAccent));if(c!==null)return c}return Z(r[0].sectionAccent)}function Gr(){const e=ze(P().theme),[t]=D("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=ne(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Hr(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??je.background,n:o+1}}const Mr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Kr({label:e,value:t,onChange:n,points:o=Mr}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(En,{label:l(e),value:t,points:r,onChange:n})}function Sa(){return it()}const ya={top:i(Ut,{}),right:i(Wt,{}),bottom:i(Mt,{}),left:i(Kt,{})};function Ca(e,t,n,o,r,a){const s=m=>t.find(p=>p.value===m),c=m=>({value:m,label:"",disabled:!0,title:o}),d=m=>{const p=t.find(x=>x.cell===m);if(!p)return c(`missing-${m}`);const u=a?.[m];return u?{value:p.value,label:p.label,icon:u}:{value:p.value,label:p.label}},f=[c("corner-top-left"),d("top"),c("corner-top-right"),d("left"),c("centre"),d("right"),c("corner-bottom-left"),d("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:p})=>{const u=t.some(x=>x.value===m)?m:n;return i(h,{label:l(e),icon:r,value:s(u)?.label?l(s(u).label):"",children:Kr({label:e,value:u,onChange:p,points:f})})}}}function _a(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(qn,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function wa(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(Jn,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Ia(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ea=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ra(e,t,n){const o=Object.keys(xe).map(r=>({label:xe[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Wr,{label:e,icon:t,options:o,onChange:r})}}function Wr({label:e,icon:t,options:n,onChange:o}){const r=ae()?.values??{},a=mt(r),s=a==="frame"&&!!be(r.mediaVideo)&&!be(r.videoFrame);return i(h,{label:l(e),icon:M(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:de({options:n,value:a,onChange:o,ariaLabel:e})})}function Ta(e,t,n,o={}){return{type:"custom",[_e]:!0,render:({value:r,onChange:a,name:s})=>i(Vn,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const Oa={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ur(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Pa({value:e,onChange:t,label:n}){const o=e||{},r=!!o.pending,a=r?"var(--ink-faint)":o.ok?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",s=!!jo(Xo()).geocode,c=ge(),d=(f,m)=>t({...o,[f]:m??void 0});return k(O,{children:[i(h,{label:l(n),icon:i(Pe,{}),action:s?i(V,{content:l("Find from the address (OpenStreetMap)"),children:i(Be,{"aria-label":l("Find from the address"),"aria-busy":r||void 0,disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Qt,{})})}):void 0,children:s&&o.status?i(V,{content:Ur(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${At}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:a},children:r?l("Finding…"):l(o.status)})}):null}),i(h,{label:l("Enter by hand"),labelId:c,icon:i($t,{}),action:i(ie,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:c})}),o.manual&&i(h,{label:l("Latitude, longitude"),icon:i(Pe,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(He,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>d("lat",f),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(He,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>d("lng",f),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function $r(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Xr(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function Aa(e,t){return e===null?null:t>e?e:null}function jr(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Fa={label:"Ticker items",icon:i(Vt,{})};function ka(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...et.textList,label:e}),render:({value:r,onChange:a})=>i(zr,{label:e,icon:M(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function zr({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=z(null),[c,d]=H(null),f=p=>p.map(u=>({text:u?.text??""})),m=p=>{const u=jr(n,p,c);u===null&&(s.current=null),d(u),r(f(p))};return i(bn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(Me,{target:s,value:$r(n,c),onChange:p=>r(Xr(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,x)=>i("input",{type:"text",className:a&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:g=>x({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,d(u)}})})}function La(e,t){const n=`${e.label} — row ${t+1}`;return F({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Na(e){return{_gCards:_("Cards"),coverIndex:W("Cover image",i(Yt,{}),jn,String(zn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:dr("Image background",Ro),cardImage:qr(),spinOnHover:dt("Rotate on hover",e?.spinDefault??!0,i(Jt,{}))}}function va(){return{outline:W("Card outline",i(en,{}),Un,Xn),indexBadge:W("Card number",i(Oe,{}),Wn,$n),showBadge:dt("Product badge",!0,i(Ne,{noun:"tag"}))}}function Da(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...$,label:ee.find(a=>a.id===r).label}),o=r=>E(Dn(fe),n(r));return{_gShowOnCard:_("Show on a card"),[fe]:E({type:"custom",render:()=>i(Yr,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(fe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const fe="showCardPrice",ee=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Yr({rest:e}){const t=B(),n=ur(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=ee.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(me,{parts:ee,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(ee.map(({id:s})=>[s,void 0])))})}function Ba(e,t="display"){const n=N(t);return{[t]:b("desktop",{type:"custom",render:({value:o,onChange:r})=>i(me,{parts:e,changed:Sn(o),shown:a=>yn(o,a),onPress:(a,s)=>r(wn(o,a,s)),onReset:()=>r(void 0)})}),[n]:b("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Vr,{parts:e,desktopKey:t,value:o,onChange:r})})}}function me({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a}){const s=l("Display");return i(h,{label:s,icon:i(Lt,{}),changed:t,action:i(y,{words:S()?.panel,label:s,changed:t,detail:a,onReset:r}),children:i(xn,{label:s,items:e.map(c=>({id:c.id,label:l(c.label),shown:n(c.id)})),onChange:o})})}function Vr({parts:e,desktopKey:t,value:n,onChange:o}){const r=B()[t];return i(me,{parts:e,changed:_n(n),shown:a=>Cn(r,n,a),onPress:(a,s)=>o(In(n,a,s)),onReset:()=>o(Mn),detail:l("the same as Desktop")})}function qr(){return rt("Card image",{min:L,max:Ie,step:St,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ha(){return pe({sidesKey:"cornerSides",step:yt,useFollowed:()=>L,mark:i(Zr,{label:Ct}),hint:l("Rounds the picture. Left alone it stays square.")})}function Zr({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function Ga(){return{type:"custom",render:({value:e,onChange:t})=>i(ti,{value:typeof e=="string"?e:"",onChange:t})}}function Jr({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Et(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const Qr={width:"3.5rem",height:"2.5rem"},ei=200;function ti({value:e,onChange:t}){const[n,o]=H(null),[r,a]=H(4),s=z(null);ut(()=>{const u=s.current;if(!u||typeof ResizeObserver!="function")return;const x=()=>a(u.getBoundingClientRect().width>=ei?4:3);x();const g=new ResizeObserver(x);return g.observe(u),()=>g.disconnect()},[]);const c=e&&e in Y?e:"",d=Ee(n,c),f=Ee(n,"").length,m=Rt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:m},...d.map(u=>({value:u,label:l(Y[u].label),icon:i(Jr,{layout:Y[u],width:40})}))];return i(h,{label:l("Layout"),icon:i(jt,{}),value:c?l(Y[c].label):l("Not chosen"),children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Ln,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:Qr,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(pn,{options:[{id:"all",label:l("All")},...wt.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:It.length})})]})})})})}export{rr as BOUND_TO_POST,kl as BOUND_TO_POST_NOTE,Ml as BUCKET_ICONS,Oa as CUSTOM_FIELD_MEDIA,Pa as CoordsField,er as DESKTOP_GAP_NOT_OVERLAP,ya as EDGE_ARROWS,Fn as FOCAL_DEFAULT,Mr as FOCAL_POINTS,oe as FOLD_FIELD_MARKER,Kr as FocalPicker,Vl as GroupLabel,ir as HIGHLIGHT_HINT,A as HidableTextField,Ce as LINK_FIELD_MARKER,Cl as Label,_e as MEDIA_FIELD_MARKER,Ea as MEDIA_TYPE_OPTIONS,Ll as NOT_BOUND_TO_POST,Yl as PanelBand,sr as PanelNoteLine,we as SCAFFOLD_FIELD_MARKER,Ua as SCALAR_TEXT_CONTROLS,Zo as SiteGapDefaultReset,X as Slider,ot as Swatches,Wa as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,Fa as TICKER_ITEMS_ROW,zr as TextListField,Q as WIDTH_LABEL,nr as WidthDefaultReset,jr as aimAfterListChange,pa as anchorFields,v as backTo,ql as backgroundField,na as boxBlockSpacingField,xa as boxFillField,ra as boxPhoneRowField,Tr as boxShareField,oa as boxSharePhoneField,Hr as boxThemeIndexOf,$l as bucketHeader,Ql as buttonWordsEntryField,Er as cardCornersField,dr as cardImageBackgroundField,qr as cardImageField,Na as cardMediaFields,ta as cardShapeFields,Da as cardShowFields,va as cardStyleFields,la as cellWidthFields,ga as checkbox,ba as colorInput,wl as containerDirectionField,Jo as containerGapField,Qo as containerGapPhoneField,_l as containerGapRows,Ur as coordsResultTip,Bl as copyText,lt as cornerSidesField,pe as cornersRowField,ma as date,fa as dateTime,Xl as designGroupHeader,Ba as displayFields,Ca as edgePad,Kl as entriesHiddenForTab,Aa as focusAfterRemove,Sa as focusKeptField,jl as foldMarker,re as foldMetaOf,cr as foldTitleOf,Ga as galleryLayoutField,da as heightFields,Il as heroGroupPlacementPoints,ye as hidableText,ar as hintIsWhileTyping,Ha as imageCornersField,Fl as inOwnBox,Ul as isBucketHeader,it as keptBy,Hl as linkField,Ra as loadingShowsField,_a as multiSelect,ha as pageBackgroundField,Wl as panelNote,Fr as phoneOverrideField,Dl as plainText,Gl as plainTextarea,rt as pxField,zl as quietMarker,Se as readHidable,$r as rowText,wa as searchSelect,at as sectionBorderField,hr as sectionCornersField,Jl as sectionShapeFields,Zl as sectionThemeFields,Xr as setRowText,ia as sizeField,Ia as sourceField,aa as spacingFields,ua as stickFields,sa as swapPadding,ea as templateField,Nl as text,ht as textFieldIdentifier,Tl as textFieldOffPage,Pl as textFieldPanelOnly,ka as textList,La as textListRowField,vl as textarea,dt as toggle,Ta as upload,ur as useSelectedPatch,B as useSelectedProps,D as useSelectedSibling,qo as useSiteGapDetail,ca as widthField,Al as withIdentifier,Rl as withOffPage,Ol as withPanelOnly,El as withScaffold};
1
+ "use client";import{jsx as i,jsxs as N,Fragment as T}from"react/jsx-runtime";import{cloneElement as ye,createContext as Ct,useContext as _t,useEffect as wt,useId as Ce,useRef as z,useState as H}from"react";import{useEasel as oe,useSelectedHost as Y}from"efficient-easel/easel";import{toDateKey as It,fromDateKey as Rt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as _e}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as we,loadingShowsOf as Et}from"../../../format/lib/hero-video.js";import{readHidable as Ie,hidableText as Re}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as re,LINK_FIELD_MARKER as Ee,MEDIA_FIELD_MARKER as Oe,SCAFFOLD_FIELD_MARKER as Te,TEXT_FIELD_MARKER as w,foldMetaOf as ie,textFieldIdentifier as Ot}from"efficient-easel/draw";import Tt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Pe}from"../../../render/lib/document/show-when.js";import Pt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as At,CORNER_RADIUS_MAX as Ae,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Ft,IMAGE_CORNERS_LABEL as kt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Lt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Nt,GALLERY_LAYOUTS as V,GALLERY_LAYOUT_KEYS as vt,galleryChoices as Fe,galleryPictureCells as Bt}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Dt}from"./shell-glyph.js";import{anchorSiblingsOf as Gt,placementPoints as Ht}from"../../../format/lib/hero-group-placement.js";import Mt,{KEEP_HINT_CLASS as Kt}from"../../components/KeepHint.js";import Wt from"../../components/AnchorField.js";import{AdjustIcon as Ut,EyeIcon as $t,AnimationIcon as Xt,BackgroundIcon as jt,BorderAllIcon as zt,BlockSectionIcon as Yt,ColumnWidthsIcon as ke,ColumnsIcon as Le,CornerIcon as Vt,DirectionDownIcon as qt,DirectionLeftIcon as Zt,DirectionRightIcon as Jt,DirectionUpIcon as Qt,EditIcon as en,GapIcon as tn,GridIcon as nn,GroundIcon as Ne,HashIcon as ve,HeightIcon as on,ImageIcon as rn,ListIcon as ln,LocationIcon as Be,PaddingBottomIcon as De,PaddingLeftIcon as Ge,PaddingRightIcon as He,PaddingTopIcon as Me,PageIcon as an,StickyIcon as sn,RotateIcon as cn,SearchIcon as dn,SquareIcon as un,TypeIcon as pn,WidthIcon as fn}from"efficient-easel/icons";import{FieldGlyph as Ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as mn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as We,CORNER_SIDE_POINTS as hn,hasOwnSectionCorners as gn,normalizeCornerSides as Ue}from"../../../format/lib/content/section-corners.js";import{enclosingPath as bn,enclosingSection as xn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as Sn,SettingsField as h,SettingsGroup as yn,SettingsGroupSub as Cn,SettingsSegmented as _n,SettingsBorder as wn,SettingsSidesEach as In,SettingsSwitch as le,borderSides as Rn,borderStartEach as En}from"efficient-easel/panel";import{ListField as On}from"efficient-easel/fields";import{DisplayChips as Tn}from"efficient-shell/ui";import{desktopDisplayChanged as Pn,partShownOnDesktop as An,partShownOnPhone as Fn,phoneDisplayChanged as kn,withDesktopPart as Ln,withPhonePart as Nn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as vn,Checkbox as Bn,ColorSwatch as Dn,CornersInput as Gn,DatePicker as Hn,DateTimePicker as Mn,FOCAL_DEFAULT as Kn,PictureTiles as Wn,IconPicker as Un,IconButton as $e,InputNumber as Xe,Slider as $n,Tooltip as q}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Xn}from"./geocode-resolve.js";import{ColourRow as je,InheritedColourRow as jn}from"./ColourControl.js";import{keptByRow as zn}from"efficient-easel/screen/lib/document/style-fields";import ze from"./MarkupToolbar.js";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Yn,NoControlMark as Vn,noControlField as Ye}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as qn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Zn,resolvePhoneValue as ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Jn}from"efficient-easel/draw";import{SuppressibleText as Qn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as eo,CARD_OUTLINE_OPTIONS as to,DEFAULT_CARD_INDEX_FORMAT as no,DEFAULT_CARD_OUTLINE as oo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as ro,DEFAULT_COVER_INDEX as io}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as lo}from"efficient-easel/draw";import ao from"../../components/MediaUploadField.js";import so from"../../components/MultiSelectField.js";import co from"../../components/SectionThemePicker.js";import uo from"../../components/SearchSelectField.js";import po from"../../components/StorefrontLinkField.js";import{UiIcon as Ve}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as fo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as mo}from"efficient-easel/draw/client";import{encodePartId as ho}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as go,useEaselStrings as bo}from"efficient-easel/strings";import{hasPhoneHeight as xo,resolveSectionMinHeight as So}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as se,hasPhoneStick as yo,resolveSectionStick as Co}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as _o,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as wo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Io,resolveContainerDirection as qe}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Ro,BOX_BLOCK_SPACING_POINTS as Ze,BOX_PHONE_ROW_LABEL as Je,BOX_COLUMNS_MAX as Eo,BOX_COLUMNS_MIN as Qe,BOX_PHONE_ROW_MAX as Oo,BOX_PHONE_ROW_MIN as ce,BOX_SHARE_LABEL as de,BOX_SHARE_PHONE_DEFAULT as To,BOX_SHARE_PHONE_POINTS as Po,BOX_SHARE_POINTS as Ao}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Fo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as et,normalizeTheme as tt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as nt,CONTAINER_GAP_BUILT_IN as ko,CONTAINER_GAP_PHONE as ue,GAP_FIELD_CONTAINER as pe,followsSitePhoneGap as Lo,hasOwnContainerGap as No,hasOwnPhoneGap as fe,resolveContainerGap as ot,resolvePhoneContainerGap as rt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as vo,CARD_IMAGE_BG_OFF as Bo,CARD_IMAGE_BG_SWATCH_NAMES as Do,CARD_IMAGE_BG_SWATCHES as Go,isCardImageBackgroundInheriting as Ho,cardImageBackgroundChoice as Mo,THEME_CARD_IMAGE_BG as Ko}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Wo,SECTION_BG_SWATCHES as Uo,SECTION_BG_SWATCH_NAMES as $o,THEME_SECTION_BG as Xo,isSectionBackgroundInheriting as jo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as zo,nestedAccentValue as it,resolveSectionAccent as J}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Yo,TYPE_SIZE_INHERIT as Vo,isTypeSizeInheriting as qo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Zo,WIDTH_CHOICE_LABEL as Jo,WIDTH_INHERIT as Qo}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as er}from"./panel-heading-scope.js";import{useEaselSession as tr}from"efficient-easel/screen/lib/session-context";import{backendOf as nr}from"../website-session.js";import{BOX_GAP as or,describedAs as R,group as _,iconOf as K,sharedStyleKinds as W}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as rr,phoneTwinFields as lt}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ir,gapField as me,Segmented as he,segmented as lr,select as U,slider as D}from"./box-fields.js";function Bl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function A(e,t){return l("{value} from {from}",{value:e,from:t})}function ar(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):A(`${e}px`,l("Styles"))}function sr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:ar(),onReset:t})}function cr(e){return me({...or,builtIn:ko[e],resolve:(t,n)=>ot(e,t,n?.siteGap),action:(t,n)=>i(sr,{inherited:!No(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[pe]:e}})}function dr(e){return Pe(b("mobile",{[pe]:e,type:"custom",render:t=>i(fr,{container:e,...t})}),at)}function ur(e){return Pe(b("tablet",{[pe]:e,type:"custom",render:t=>i(pr,{container:e,...t})}),at)}const at={not:{field:"gap",in:Array.from({length:-nt.min},(e,t)=>nt.min+t)}};function Dl(e){return{gap:b("desktop",cr(e)),[Jn("gap")]:ur(e),[B("gap")]:dr(e)}}function pr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(ue.min,ot(e,n,o));return me({...ue,builtIn:r,resolve:s=>fe(s)?s:r,action:(s,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(s),detail:A(`${r}px`,l("Desktop")),onReset:()=>c(void 0)})}).render(t)}function fr({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=rt(e,void 0,n,o,r);return me({...ue,builtIn:a,resolve:c=>rt(e,c,n,o,r),action:(c,u)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(c),detail:A(`${a}px`,Lo(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Gl(e){return ir({offered:Io(e),fallback:qe(e,void 0),resolve:t=>qe(e,t)})}function Hl(e,t){return Ht(t?Gt(e,t):[],t)}function mr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:A(l("Full"),l("the page")),onReset:t})}function F({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:u,hidden:f}=Ie(e),m=z(null),p=z(null),d=O=>t(s?{text:O,hidden:f}:O),g=()=>t({text:u,hidden:!f}),x=s&&f,E=Ce(),C=r?Sr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(Mt,{children:l(r)}):void 0,j=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(h,{label:l(n),icon:i(pn,{}),htmlFor:E,className:x?"is-hidden":void 0,hint:C,action:s?i(q,{content:j,children:i($e,{"aria-pressed":f,"aria-label":j,onClick:g,children:f?i(Ve,{name:"eye-off",size:14}):i(Ve,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(ze,{target:a?p:m,value:u,onChange:d}),a?i("textarea",{id:E,ref:p,value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)}):i("input",{id:E,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)})]})})}function Ml(e,t){return{...e,[Te]:t}}function Kl(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Wl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const st="sfPanelOnly";function Ul(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[st]:!0}}function $l(e){return!!e&&typeof e=="object"&&e[st]===!0}function Xl(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ns,SCALAR_TEXT_CONTROLS as os}from"efficient-easel/draw";function jl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[Yn]:o,...r}=e;return{...r,[qn]:!0,render:t}}const hr=new Set(lo),$={type:"radio",options:[{value:!0},{value:!1}]},ct={text:{type:"object",objectFields:{text:{type:"text"},hidden:$}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},k=(e,t)=>{const n=R({...t,[w]:e},{...ct[e.control],label:e.label});if(!hr.has(e.control))return n;const o=t.render;return{...Ye(n,"authored-copy"),render:r=>i(Qn,{name:r.name,children:o(r)})}},zl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",gr={field:"source.slug",set:!0},Yl={not:gr},br="Select a word, then press the highlighter.",xr=new Set([br]),Sr=e=>xr.has(e);function Vl(e,t,n){return k({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ql(e,t,n){return k({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Zl(e,t,n){return k({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Jl(e,t,n){return k({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ql(e){return{type:"custom",[Ee]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(po,{value:Re(t),onChange:n,label:e})}}function ea(e,t,n){return k({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ta={Design:Ut,Animation:Xt};function na(e){return{type:"custom",render:()=>i(yr,{text:e})}}function yr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function oa(e){return ie(e)!==null&&e?.tabs!==void 0}const dt=new Map;function ra(e,t){const n=`${e}\0${t?t.join(""):""}`,o=dt.get(n)??{type:"custom",tabs:t,[re]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(T,{})};return dt.set(n,o),o}const ut=new Map;function ia(e){const t=ut.get(e)??{type:"custom",[re]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(T,{})};return ut.set(e,t),t}function Cr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function la(e,t){return Cr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(T,{})}}function aa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(T,{})}}function sa({title:e,children:t}){const[n,o]=H(()=>!ge.has(e));return i(yn,{title:e,open:n,onToggle:r=>{o(r),r?ge.delete(e):ge.add(e)},children:t})}const ge=new Set;function ca({label:e}){return i(Cn,{title:l(e),level:er(2)})}function pt({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?l(o[c]):c;return i(q,{content:u,children:i(Dn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function da(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=jo(n,t);return i(h,{label:l(e),icon:i(jt,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(Wo)}),children:pt({swatches:Uo,current:r?Xo:n??t??"",onPick:o,names:$o})})}}}function _r(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=Ho(r,t);return i(h,{label:l(e),icon:i(Ne,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(vo)}),children:pt({swatches:Go,current:a?Ko:Mo(r,t),onPick:o,names:Do})})}}}function ua(e=n=>n,t){return W({_gSectionTheme:_(zo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(co,{value:e(n),onChange:o,followLabel:t})}})}function X({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:u,disabled:f=!1}){const m=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i($n,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:u===void 0?void 0:l(u),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:u,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:d})=>{const g=typeof p=="number"?p:null,x=g===null;return i(h,{label:l(e),icon:f?K(f):void 0,value:x?u||a===void 0?void 0:l(a):`${g}${m}`,changed:!x,action:u?ye(u,{changed:!x,onReset:()=>d(null)}):i(y,{words:S()?.panel,label:l(e),changed:!x,onReset:()=>d(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):X({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const Q="Corners";function be(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(h,{label:l(Q),icon:i(Vt,{}),changed:r,action:ye(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ir,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=Y();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mt(){return Ye({type:"custom",render:()=>i(Vn,{})},"always")}function wr(){const e=Y();return t=>e?.onChangeMany(t)}function Ir({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=L(e.sidesKey),s=Ue(r)??[...We];return i(Gn,{label:l(Q),value:s,corners:hn,onChange:c=>{const u=Ue(c)??[];a(u.length===We.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Ae,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function ht(){return mt()}function Rr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):A(r,l("Styles")),onReset:n})}function Er(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:v}function Or(){return be({sidesKey:"sectionCornerSides",useFollowed:Er,mark:i(Rr,{label:Q}),hint:Tr})}const Tr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function pa(){return W({_gShape:_("Shape"),sectionCorners:Or(),sectionCornerSides:ht(),sectionBorder:gt("desktop"),sectionBorderPhone:gt("mobile")})}const Pr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function Ar(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Fr(){let e;try{const t=tt(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||et.line}function kr({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[u,f]=H(()=>r?En(c,s):!1),m=Pr(),p=d=>Ar(r&&a?d:{width:d.width,color:d.color,...a?{style:d.style}:{}});return i(h,{label:l("Border"),icon:i(zt,{}),action:r?i(In,{each:u,label:l("Each side"),onChange:f}):void 0,children:i(wn,{label:l("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:m,styles:a,max:Fo})})}function Lr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Fr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(kr,{value:e,onChange:t,placeholder:{sides:Rn(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function gt(e){return b(e,{type:"custom",render:({value:t,onChange:n})=>i(Lr,{value:t,onChange:n,tier:e})})}function fa(e){return{type:"custom",render:()=>i(Nr,{partKey:e})}}function Nr({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=P(),r=bo();let a=null;try{a=mo().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Sn,{name:l("Text"),preview:fo(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??go.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(ho(t,e))}})}function bt(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=oe(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?xn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return gn(r)?r:n}function vr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=bt(v);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:A(`${o}px`,l("the section")),onReset:n})}function Br(){return i(T,{children:l("Follows the section's Corners until you set a number here.")})}function Dr(){return be({sidesKey:"cardCornerSides",useFollowed:()=>bt(v),mark:i(vr,{label:Q}),hint:i(Br,{})})}function Gr(){return{type:"custom",render:()=>i(Tt,{})}}function ma(e){return{...e,render:t=>i(Pt,{render:e.render,props:t})}}function ha(){return{_gShape:_("Shape"),cardCorners:Dr(),cardCornerSides:ht(),cardCornersApplyAll:Gr()}}function Hr(e=Ao,t=e[0].value){return R({type:"custom",render:({value:n,onChange:o})=>{const r=e.find(a=>a.value===n)??e.find(a=>a.value===t)??e[0];return i(h,{label:l(de),icon:i(ke,{}),value:l(r.label),children:i(Wn,{className:"sf-gallery-layouts",label:l(de),value:r.value,onChange:o,options:e.map(a=>({value:a.value,label:l(a.label),picture:i("span",{className:"sf-gallery-pic",children:Mr(a.weights).map((s,c)=>i("i",{style:{gridColumn:`span ${s}`}},c))})}))})})}},{type:"select",label:de,options:e.map(n=>({value:n.value,label:n.label}))})}function Mr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function ga(){return U(Ro,i(tn,{}),Ze,Ze[0].value)}function ba(){return b("mobile",Hr(Po,To))}function Kr(){return b("mobile",D(Je,i(Le,{}),ce,Oo,1,ce,"",{clear:{phoneFollows:!1,hint:ce}}))}const xt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function xa(){const e=D(Je,i(Le,{}),Qe,Eo,1,Qe,"",{clear:{emptyLabel:"Auto"}}),t=lt("columns",e,{...xt,tablet:rr.tablet}),n=lt("columns",e,xt,{phoneRow:Kr()});return{...t,phoneRow:n.phoneRow}}function Sa(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(h,{label:l(e),icon:i(Ke,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!qo(s),detail:l("the Text style in Styles"),onReset:()=>c(Vo),defaultAction:{onPress:()=>c(Yo),title:l("Keep this section's own built-in size"),icon:i(Yt,{})}}),children:X({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ya(){return{_gCellWidth:_("Cell width"),gridSpan:U("Positions",i(ke,{}),[{label:"Auto",value:""},...Array.from({length:Lt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function G(){let e=null,t=null;try{e=_t(Wr),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Wr=Ct(null);function Ur({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const u=G()[s],f=ae(void 0,u,c);return i(T,{children:X({min:e,max:t,step:n,value:ae(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function $r({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=G()[t],c=ae(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${c}${o}`}),onReset:a})}function Xr(e){return ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i($r,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ur,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const jr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},zr={Top:Me,Bottom:De,Left:Ge,Right:He},Yr=e=>{const t=zr[e];return i(t,{})};function Ca(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=C=>jr[C],a=C=>D(r("Top"),i(Me,{}),I.min,I.max,I.step,C,"px"),s=(C,j,O,ne=I)=>b("mobile",Xr({label:r(C),icon:Yr(C),desktopKey:j,min:ne.min,max:ne.max,step:ne.step,fallback:O})),c=e.top??I.min,u=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,d=e.side??p.min,g=e.sidePhone??d,x=e.phone===!0,E=C=>x?b("desktop",C):C;return W({...o?{_gSpacing:_("Padding")}:{},[t]:E(a(c)),...x?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:E(D(r("Bottom"),i(De,{}),I.min,I.max,I.step,u,"px")),...x?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[f]:E(D(r("Left"),i(Ge,{}),p.min,p.max,p.step,d,"px")),...x?{[B(f)]:s("Left",f,g,p)}:{},[m]:E(D(r("Right"),i(He,{}),p.min,p.max,p.step,d,"px")),...x?{[B(m)]:s("Right",m,g,p)}:{}}:{}})}function _a(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&ie(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const ee="Width";function wa(e,t=Zo,n=!0){const o=t.map(r=>({label:Jo[r],value:r}));return W({...n?{_gWidth:_(ee)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(h,{label:l(ee),icon:i(fn,{}),action:n?i(mr,{inherited:a?.inherited??!1,onReset:()=>r(Qo),label:ee}):void 0,children:he({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:ee})})}})}function Ia(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(h,{label:M,icon:K(i(on,{})),action:o?o(a):void 0,children:he({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:M})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?wo:_o;return i("div",{className:"sf-field",children:X({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:M,onChange:r})})}}),n=()=>lr("Unit",i(ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return W({_gHeight:_(M),sectionHeightMode:b("desktop",e()),sectionHeightValue:b("desktop",t()),sectionHeightUnit:b("desktop",n()),sectionHeightModePhone:b("mobile",e(o=>i(Vr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:b("mobile",t()),sectionHeightUnitPhone:b("mobile",n())})}function Vr({onClear:e}){const t=G(),n=xo(t),o=So(t),r=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return i(y,{words:S()?.panel,label:l(M),changed:n,detail:r,onReset:e})}function Ra(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(qr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:X({min:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:_(se),stickTop:b("desktop",e(!1)),stickTopDistance:b("desktop",t()),stickTopPhone:b("mobile",e(!0)),stickTopDistancePhone:b("mobile",t())}}function qr({value:e,onChange:t,labelId:n,phone:o}){const r=G(),a=Co(r),s=o?a.phone:e===!0;return i(h,{label:l(se),labelId:n,icon:K(i(sn,{})),action:N(T,{children:[o?i(y,{words:S()?.panel,label:l(se),changed:yo(r),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,i(le,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const St="e.g. about";function Ea(){return{_gAnchor:_("Anchor"),anchor:k({control:"plainText",label:"Name",placeholder:St},{type:"custom",render:({value:e,onChange:t})=>i(Wt,{value:e,onChange:t,nameBox:(n,o)=>i(F,{value:n,onChange:o,label:"Name",placeholder:St,hideable:!1,markup:!1})})})}}function Oa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Mn,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Ta(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Hn,{id:c,value:Rt(typeof o=="string"?o:null),onChange:u=>r(u?It(u):"")})})}}}function yt(e,t,n,o){return{type:"custom",...R({},{...$,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const u=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(h,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(le,{checked:u,onChange:a,ariaLabelledBy:f})})}}}function Pa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(je,{label:l("Background"),icon:i(an,{}),id:r,value:mn(e),onChange:t})}}}function Aa(e,t){return{type:"custom",...R({},{...$,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(h,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Bn,{id:s,checked:a,onChange:o})})}}}function Fa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(je,{label:l(e),icon:n,value:o||t,onChange:r})}}function ka(){return{type:"custom",render:({value:e,onChange:t})=>i(Zr,{value:typeof e=="string"?e:"",onChange:t})}}function Zr({value:e,onChange:t}){const{hex:n,n:o}=Qr();return i(jn,{label:l("Fill"),icon:i(Ne,{}),value:e,inherited:n,resetTo:A(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Jr(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return J(n);const r=bn(e,t);if(r.length===0)return null;const a=J(it(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=J(it(r[s].sectionAccent));if(c!==null)return c}return J(r[0].sectionAccent)}function Qr(){const e=tt(P().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=oe(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Jr(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??et.background,n:o+1}}const ei=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function ti({label:e,value:t,onChange:n,points:o=ei}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(vn,{label:l(e),value:t,points:r,onChange:n})}function La(){return mt()}const Na={top:i(Qt,{}),right:i(Jt,{}),bottom:i(qt,{}),left:i(Zt,{})};function va(e,t,n,o,r,a){const s=m=>t.find(p=>p.value===m),c=m=>({value:m,label:"",disabled:!0,title:o}),u=m=>{const p=t.find(g=>g.cell===m);if(!p)return c(`missing-${m}`);const d=a?.[m];return d?{value:p.value,label:p.label,icon:d}:{value:p.value,label:p.label}},f=[c("corner-top-left"),u("top"),c("corner-top-right"),u("left"),c("centre"),u("right"),c("corner-bottom-left"),u("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:p})=>{const d=t.some(g=>g.value===m)?m:n;return i(h,{label:l(e),icon:r,value:s(d)?.label?l(s(d).label):"",children:ti({label:e,value:d,onChange:p,points:f})})}}}function Ba(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(so,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Da(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(uo,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Ga(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ha=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ma(e,t,n){const o=Object.keys(we).map(r=>({label:we[r],value:r,picture:n[r]}));return{type:"custom",...R({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ni,{label:e,icon:t,options:o,onChange:r})}}function ni({label:e,icon:t,options:n,onChange:o}){const r=Y()?.values??{},a=Et(r),s=a==="frame"&&!!_e(r.mediaVideo)&&!_e(r.videoFrame);return i(h,{label:l(e),icon:K(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:he({options:n,value:a,onChange:o,ariaLabel:e})})}function Ka(e,t,n,o={}){return{type:"custom",[Oe]:!0,render:({value:r,onChange:a,name:s})=>i(ao,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const Wa={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function oi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ua({value:e,onChange:t,label:n}){const o=e||{},r=Y(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,u=s?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!nr(tr()).geocode,m=Ce(),p=(d,g)=>t({...o,[d]:g??void 0});return N(T,{children:[i(h,{label:l(n),icon:i(Be,{}),action:f?i(q,{content:l("Find from the address (OpenStreetMap)"),children:i($e,{"aria-label":l("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(dn,{})})}):void 0,children:f&&o.status?i(q,{content:oi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${Kt}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:s?l("Finding…"):c?l(Xn):l(o.status)})}):null}),i(h,{label:l("Enter by hand"),labelId:m,icon:i(en,{}),action:i(le,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&i(h,{label:l("Latitude, longitude"),icon:i(Be,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Xe,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>p("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(Xe,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>p("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function ri(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ii(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function $a(e,t){return e===null?null:t>e?e:null}function li(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Xa={label:"Ticker items",icon:i(ln,{})};function ja(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...ct.textList,label:e}),render:({value:r,onChange:a})=>i(ai,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function ai({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=z(null),[c,u]=H(null),f=p=>p.map(d=>({text:d?.text??""})),m=p=>{const d=li(n,p,c);d===null&&(s.current=null),u(d),r(f(p))};return i(On,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(ze,{target:s,value:ri(n,c),onChange:p=>r(ii(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,d,g)=>i("input",{type:"text",className:a&&c===d?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:d+1}),onChange:x=>g({text:x.target.value}),onFocus:x=>{s.current=x.currentTarget,u(d)}})})}function za(e,t){const n=`${e.label} — row ${t+1}`;return k({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ya(e){return{_gCards:_("Cards"),coverIndex:U("Cover image",i(rn,{}),ro,String(io),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:_r("Image background",Bo),cardImage:di(),spinOnHover:yt("Rotate on hover",e?.spinDefault??!0,i(cn,{}))}}function Va(){return{outline:U("Card outline",i(un,{}),to,oo),indexBadge:U("Card number",i(ve,{}),eo,no),showBadge:yt("Product badge",!0,i(Ke,{noun:"tag"}))}}function qa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...$,label:te.find(a=>a.id===r).label}),o=r=>R(zn(xe),n(r));return{_gShowOnCard:_("Show on a card"),[xe]:R({type:"custom",render:()=>i(si,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(xe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const xe="showCardPrice",te=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function si({rest:e}){const t=G(),n=wr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=te.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(Se,{parts:te,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(te.map(({id:s})=>[s,void 0])))})}function Za(e,t="display"){const n=B(t);return{[t]:b("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Se,{parts:e,changed:Pn(o),shown:a=>An(o,a),onPress:(a,s)=>r(Ln(o,a,s)),onReset:()=>r(void 0)})}),[n]:b("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ci,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Se({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(h,{label:c,icon:i($t,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(Tn,{label:c,items:e.map(u=>({id:u.id,label:l(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function ci({parts:e,desktopKey:t,value:n,onChange:o}){const r=G()[t];return i(Se,{parts:e,changed:kn(n),shown:a=>Fn(r,n,a),onPress:(a,s)=>o(Nn(n,a,s)),onReset:()=>o(Zn),detail:l("the same as Desktop")})}function di(){return ft("Card image",{min:v,max:Ae,step:At,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ja(){return be({sidesKey:"cornerSides",step:Ft,useFollowed:()=>v,mark:i(ui,{label:kt}),hint:l("Rounds the picture. Left alone it stays square.")})}function ui({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function Qa(){return{type:"custom",render:({value:e,onChange:t})=>i(hi,{value:typeof e=="string"?e:"",onChange:t})}}function pi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Bt(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const fi={width:"3.5rem",height:"2.5rem"},mi=200;function hi({value:e,onChange:t}){const[n,o]=H(null),[r,a]=H(4),s=z(null);wt(()=>{const d=s.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>a(d.getBoundingClientRect().width>=mi?4:3);g();const x=new ResizeObserver(g);return x.observe(d),()=>x.disconnect()},[]);const c=e&&e in V?e:"",u=Fe(n,c),f=Fe(n,"").length,m=Dt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:m},...u.map(d=>({value:d,label:l(V[d].label),icon:i(pi,{layout:V[d],width:40})}))];return i(h,{label:l("Layout"),icon:i(nn,{}),value:c?l(V[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Un,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:fi,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(_n,{options:[{id:"all",label:l("All")},...Nt.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:vt.length})})]})})})})}export{gr as BOUND_TO_POST,zl as BOUND_TO_POST_NOTE,ta as BUCKET_ICONS,Wa as CUSTOM_FIELD_MEDIA,Ua as CoordsField,at as DESKTOP_GAP_NOT_OVERLAP,Se as DisplayRow,Na as EDGE_ARROWS,Kn as FOCAL_DEFAULT,ei as FOCAL_POINTS,re as FOLD_FIELD_MARKER,ti as FocalPicker,ca as GroupLabel,br as HIGHLIGHT_HINT,F as HidableTextField,Ee as LINK_FIELD_MARKER,Bl as Label,Oe as MEDIA_FIELD_MARKER,Ha as MEDIA_TYPE_OPTIONS,Yl as NOT_BOUND_TO_POST,sa as PanelBand,yr as PanelNoteLine,Wr as RowPropsContext,Te as SCAFFOLD_FIELD_MARKER,os as SCALAR_TEXT_CONTROLS,sr as SiteGapDefaultReset,X as Slider,pt as Swatches,ns as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,Xa as TICKER_ITEMS_ROW,ai as TextListField,ee as WIDTH_LABEL,mr as WidthDefaultReset,li as aimAfterListChange,Ea as anchorFields,A as backTo,da as backgroundField,ga as boxBlockSpacingField,xa as boxColumnsFields,ka as boxFillField,Kr as boxPhoneRowField,Hr as boxShareField,ba as boxSharePhoneField,Jr as boxThemeIndexOf,ra as bucketHeader,fa as buttonWordsEntryField,Dr as cardCornersField,_r as cardImageBackgroundField,di as cardImageField,Ya as cardMediaFields,ha as cardShapeFields,qa as cardShowFields,Va as cardStyleFields,ya as cellWidthFields,Aa as checkbox,Fa as colorInput,Gl as containerDirectionField,cr as containerGapField,dr as containerGapPhoneField,Dl as containerGapRows,ur as containerGapTabletField,oi as coordsResultTip,Jl as copyText,ht as cornerSidesField,be as cornersRowField,Ta as date,Oa as dateTime,ia as designGroupHeader,Za as displayFields,va as edgePad,$a as focusAfterRemove,La as focusKeptField,la as foldMarker,ie as foldMetaOf,Cr as foldTitleOf,Qa as galleryLayoutField,Ia as heightFields,Hl as heroGroupPlacementPoints,Re as hidableText,Sr as hintIsWhileTyping,Ja as imageCornersField,jl as inOwnBox,oa as isBucketHeader,mt as keptBy,Ql as linkField,Ma as loadingShowsField,Ba as multiSelect,Pa as pageBackgroundField,na as panelNote,Xr as phoneOverrideField,Zl as plainText,ea as plainTextarea,ft as pxField,aa as quietMarker,Ie as readHidable,ri as rowText,Da as searchSelect,gt as sectionBorderField,Or as sectionCornersField,pa as sectionShapeFields,ua as sectionThemeFields,ii as setRowText,Sa as sizeField,Ga as sourceField,Ca as spacingFields,Ra as stickFields,_a as swapPadding,ma as templateField,Vl as text,Ot as textFieldIdentifier,Wl as textFieldOffPage,$l as textFieldPanelOnly,ja as textList,za as textListRowField,ql as textarea,yt as toggle,Ka as upload,wr as useSelectedPatch,G as useSelectedProps,L as useSelectedSibling,ar as useSiteGapDetail,wa as widthField,Xl as withIdentifier,Kl as withOffPage,Ul as withPanelOnly,Ml as withScaffold};
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as B}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as T}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Entrance:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(B(),D("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(T()),...Object.keys(T())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B(),...D("full"),...E(),...m(),...O(),...w(),...T()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
@@ -1,5 +1,6 @@
1
1
  import { type GeocodeResult } from "../geocode.js";
2
2
  import type { GeocodeState } from "../../../format/lib/content/contact.js";
3
+ export declare const LOOKUP_BUSY_NOTE = "Lookup busy \u2014 try again in a moment.";
3
4
  export interface Geocodable {
4
5
  lat: number;
5
6
  lng: number;
@@ -1 +1 @@
1
- import{geocodeAddress as c}from"../geocode.js";const i=a=>typeof a=="number"&&Number.isFinite(a);function r(a){return a.some(g=>{const l=g?.geocode;return l?l.pending||l.manual&&l.lat===void 0&&l.lng===void 0?!0:i(l.lat)&&l.lat!==g.lat||i(l.lng)&&l.lng!==g.lng:!1})}async function m(a,g,{geocode:l=c,courtesyGapMs:s=1100}={}){const u=e=>new Promise(n=>setTimeout(n,e));let d=a.slice();if(a.some(e=>e?.geocode?.pending)){const e=[];let n=!1;for(const t of a){if(!t?.geocode?.pending){e.push(t);continue}n&&s>0&&await u(s),n=!0;try{const o=await l(g(t));e.push(o?{...t,lat:o.lat,lng:o.lng,geocode:{...t.geocode,pending:!1,ok:!0,status:`Found — ${o.label.split(",").slice(0,3).join(",").trim()}`,lat:o.lat,lng:o.lng}}:{...t,geocode:{...t.geocode,pending:!1,ok:!1,status:"No match — check the address and try again."}})}catch{e.push({...t,geocode:{...t.geocode,pending:!1,ok:!1,status:"Lookup busy — try again in a moment."}})}}d=e}return d.map(e=>{const n=e?.geocode;if(!n)return e;if(n.manual&&n.lat===void 0&&n.lng===void 0)return{...e,geocode:{...n,lat:e.lat,lng:e.lng}};const t=i(n.lat)&&n.lat!==e.lat?n.lat:e.lat,o=i(n.lng)&&n.lng!==e.lng?n.lng:e.lng;return t!==e.lat||o!==e.lng?{...e,lat:t,lng:o}:e})}export{r as needsGeocodeWork,m as resolveGeocodeRows};
1
+ import{geocodeAddress as c}from"../geocode.js";const f="Lookup busy — try again in a moment.",g=a=>typeof a=="number"&&Number.isFinite(a);function p(a){return a.some(s=>{const l=s?.geocode;return l?l.pending||l.manual&&l.lat===void 0&&l.lng===void 0?!0:g(l.lat)&&l.lat!==s.lat||g(l.lng)&&l.lng!==s.lng:!1})}async function m(a,s,{geocode:l=c,courtesyGapMs:i=1100}={}){const u=e=>new Promise(n=>setTimeout(n,e));let d=a.slice();if(a.some(e=>e?.geocode?.pending)){const e=[];let n=!1;for(const t of a){if(!t?.geocode?.pending){e.push(t);continue}n&&i>0&&await u(i),n=!0;try{const o=await l(s(t));e.push(o?{...t,lat:o.lat,lng:o.lng,geocode:{...t.geocode,pending:!1,ok:!0,status:`Found — ${o.label.split(",").slice(0,3).join(",").trim()}`,lat:o.lat,lng:o.lng}}:{...t,geocode:{...t.geocode,pending:!1,ok:!1,status:"No match — check the address and try again."}})}catch{e.push({...t,geocode:{...t.geocode,pending:!1,ok:!1,status:f}})}}d=e}return d.map(e=>{const n=e?.geocode;if(!n)return e;if(n.manual&&n.lat===void 0&&n.lng===void 0)return{...e,geocode:{...n,lat:e.lat,lng:e.lng}};const t=g(n.lat)&&n.lat!==e.lat?n.lat:e.lat,o=g(n.lng)&&n.lng!==e.lng?n.lng:e.lng;return t!==e.lat||o!==e.lng?{...e,lat:t,lng:o}:e})}export{f as LOOKUP_BUSY_NOTE,p as needsGeocodeWork,m as resolveGeocodeRows};
@@ -0,0 +1,12 @@
1
+ import type { DropdownMenuEntry } from "efficient-shell/ui";
2
+ import { type SourceChoice } from "../../../format/lib/content/block-sources.js";
3
+ export declare function liveNumberMenu(choices: readonly SourceChoice[], onLink: (key: string) => void): DropdownMenuEntry[];
4
+ export declare function LiveNumberBox({ id, text, countKey, choices, onText, onLink, }: {
5
+ id: string;
6
+ text: string;
7
+ countKey: string;
8
+ choices: readonly SourceChoice[];
9
+ onText: (next: string) => void;
10
+ onLink: (key: string) => void;
11
+ }): import("react").JSX.Element;
12
+ export declare function withLiveNumberRow<F extends Record<string, unknown>>(fields: F, props: Record<string, unknown> | undefined): F;
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{useId as b}from"react";import{useEasel as v,useSelectedHost as y}from"efficient-easel/easel";import{CloseIcon as C,LinkIcon as x,LockIcon as k}from"efficient-easel/icons";import{SettingsField as N}from"efficient-easel/panel";import{deviceField as h,deviceNote as O}from"efficient-easel/screen/lib/document/device-fields";import{Input as s}from"efficient-shell/ui";import{namedRowField as g}from"../../../format/lib/content/card-template.js";import{COUNT_KEY_PROP as c,COUNTS_SOURCE as I,sourceChoices as R}from"../../../format/lib/content/block-sources.js";import{consentWordsOf as S}from"../../../format/lib/content/consent-banner.js";import{countsReachText as w,countWords as d,linkedCount as _}from"../../../format/lib/content/count-numbers.js";import{readHidable as E,useSelectedSibling as L}from"./controls.js";import{partValueWithText as T}from"../../../render/lib/document/part-text.js";import{say as i}from"../../../format/lib/editor-words.js";const f=(e,t)=>t==="number"?`${d(e.value)} · ${i(e.label)}`:`${i(e.label)} · ${d(e.value)}`;function W(e,t){return[{type:"label",key:"heading",label:i("Live numbers")},...e.map(n=>({key:n.key,label:f(n,"name"),onSelect:()=>t(n.key)}))]}function F({id:e,text:t,countKey:n,choices:r,onText:u,onLink:a}){const l=n?r.find(m=>m.key===n):void 0;return o("div",{className:"sf-copybox",children:n?o(s,{id:e,readOnly:!0,value:l?f(l,"number"):t,leftIcon:o(k,{size:16}),endAction:{label:i("Unlink"),icon:o(C,{size:16}),onClick:()=>a("")}}):o(s,{id:e,value:t,onChange:m=>u(m.target.value),endAction:r.length?{label:i("Connect to a live number"),icon:o(x,{size:16}),menu:W(r,a)}:void 0})})}function U(){const e=y();try{return v(t=>w(t.appState.data.content,e?.id))}catch{return!0}}function $({value:e,onChange:t}){const n=b(),[r,u]=L(c),a=U();return o(N,{label:i("Body"),htmlFor:n,children:o(F,{id:n,text:E(e).text,countKey:_({[c]:r}),choices:a?R(I):z,onText:l=>t(T("textarea",e,l)),onLink:u})})}const j=O(),z=[],p=new WeakMap;function H(e){let t=p.get(e);if(!t){const n={...e,render:({value:r,onChange:u})=>o($,{value:r,onChange:u})};t=h("desktop",n),p.set(e,t)}return t}function ee(e,t){if(typeof t?.[c]!="string"||S(t)!==null||g(t))return e;const n=e.text;return!n||typeof n!="object"?e:{_dDevice:j,...e,text:H(n)}}export{F as LiveNumberBox,W as liveNumberMenu,ee as withLiveNumberRow};
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as T}from"react/jsx-runtime";import{accentItalicCss as L,storedTextStyles as O,textStylesCss as M}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as $,PAGE_WIDTH_ATTR as K,siteWidthTokens as X,siteGutterTokens as Y,heroBackgroundTokens as q}from"../../../format/lib/content/page-width.js";import{siteBlockGapTokens as J}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as Q}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as U}from"../../../render/components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as Z,normalizeCornerStyle as ee,normalizeCornerRadius as te,themeColorStyle as oe,typeSizesStyle as re,headingTypographyStyle as ne,normalizeHeadingTypography as ae,themeAccentStyle as se,themeButtonStyle as ie,themePresetAccentVars as de,themeSurfaceStyle as ce,siteCornerRadiusTokens as le,shadowColorTokens as pe,headingCompressionAttr as he,cardShadowAttr as me,cardGapAttr as fe,hoverEffectAttr as ue}from"../../../format/lib/theme.js";import{fontRoleStyle as ge}from"../../../format/lib/fonts.js";import{wordStyleTokens as Se}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as ye,pageHasHeaderSection as k,pageTakesTopSpace as xe,topSpaceMarker as Te,TOP_SPACE_ATTR as ke,HEADER_CLEARANCE_CLASS as Ce}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as Ee,HEADER_INK_ATTR as Ae}from"../../../render/lib/document/header-ink.js";import{useEasel as Pe}from"efficient-easel/easel";import{pageBackgroundVars as ve}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as _e}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as Re}from"../../../render/lib/document/editing-bridges.js";import we from"../../components/SectionTextPartBridge.js";const Ie={SectionTextParts:we};import{PageWidthWrapper as et,PublishedPageFrame as tt,pageWidthTokens as ot}from"../../../render/lib/document/page-frame.js";const We="color-mix(in oklab, var(--bg) 40%, #ffffff)",Be="12vh";function Ge({style:o,children:s}){const{appState:i}=Pe(u=>u),t=i.data.content,n=i.data.root;if(ye(t))return r("div",{className:"sf-themed-content",style:{...o,background:We,minHeight:"100vh",paddingBottom:Be},children:r("div",{style:{background:"var(--bg)"},children:s})});const d=k(t)&&xe(n,t),c=k(t)?Te(n,t):null,h=c?{[ke]:c}:null,l=$(n?.widthChoice),m=l?{[K]:l}:null,p=d?null:Ee(t),f=p?{[Ae]:p}:null;return r("div",{className:`sf-themed-content${d?` ${Ce}`:""}`,style:o,...f,...h,...m,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:s})})}function Je({propsTheme:o,propsFonts:s,propsCornerStyle:i,propsCornerRadiusPx:t,propsHeadingCompression:n,propsHeadingTypography:d,pageBackground:c,chromeInheritsSiteBackground:h,suppressPreviewNav:l,footer:m,overlay:p,children:f}){const{theme:u,fonts:C,sizes:E,cornerRadiusPx:A,cardShadow:g,shadowColor:P,cardGap:v,hoverEffect:S,headingCompression:_,siteWidth:R,siteGutter:w,blockGap:I,headingTypography:W,heroBackgroundFollowsWidth:B,photographyGrayscale:G,textStyles:H,wordStyles:N,themeFromDocument:e}=Q(),a=e?o:u,b=e?s:C,D=e?void 0:E,z=e?t===void 0?Z[ee(i)]:te(t):A,V=e?n:_,y=e?d:W,x=[M(O(e?void 0:H)),L(ae(y).italicStrong)].filter(Boolean).join(`
2
- `),j=_e(),F={...oe(a),...re(D),...ne(y),...j.style,...h?{}:ve(c)};return T("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...ge(b),...Se(e?null:N),...se(a),...ie(a),...de(a),...ce(a),...le(z),...pe(e?void 0:g,e?void 0:P,e?void 0:S),...X(e?void 0:R),...Y(e?void 0:w),...J(e?void 0:I),...q(e?void 0:B)},"data-sf-headings":he(V),"data-sf-card-shadow":e?void 0:me(g),"data-sf-card-gap":e?void 0:fe(v),"data-sf-card-hover":e?void 0:ue(S),onClickCapture:l,children:[x?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:x}}):null,r(U,{grayscale:e?void 0:G,children:T(Re,{value:Ie,children:[r(Ge,{style:F,children:f}),m,p]})})]})}const Qe=o=>{o.target?.closest?.("a")&&o.preventDefault()};export{Ie as EDITING_BRIDGES,Ge as EditorPageBody,Je as EditorThemedBody,et as PageWidthWrapper,tt as PublishedPageFrame,We as SECTION_PREVIEW_CANVAS,Be as SECTION_PREVIEW_CANVAS_TAIL,ot as pageWidthTokens,Qe as suppressPreviewNav};
1
+ import{jsx as n,jsxs as P}from"react/jsx-runtime";import{accentItalicCss as M,storedTextStyles as $,textStylesCss as K}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as X,PAGE_WIDTH_ATTR as Y,siteWidthTokens as q,siteGutterTokens as J,siteGutterPhoneClass as Q,siteGutterPhoneTokens as U,heroBackgroundTokens as Z}from"../../../format/lib/content/page-width.js";import{siteBlockGapPhoneClass as ee,siteBlockGapPhoneTokens as te,siteBlockGapTokens as oe}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as ne}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as re}from"../../../render/components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as se,normalizeCornerStyle as ae,normalizeCornerRadius as ie,themeColorStyle as de,typeSizesStyle as ce,headingTypographyStyle as le,normalizeHeadingTypography as he,themeAccentStyle as pe,themeButtonStyle as fe,themePresetAccentVars as me,themeSurfaceStyle as ue,siteCornerRadiusTokens as Se,shadowColorTokens as ge,headingCompressionAttr as ye,cardShadowAttr as xe,cardGapAttr as Te,hoverEffectAttr as ke}from"../../../format/lib/theme.js";import{fontRoleStyle as Pe}from"../../../format/lib/fonts.js";import{wordStyleTokens as Ce}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Ee,pageHasHeaderSection as C,pageTakesTopSpace as Ae,topSpaceMarker as Ge,TOP_SPACE_ATTR as ve,HEADER_CLEARANCE_CLASS as _e}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as Be,HEADER_INK_ATTR as Re}from"../../../render/lib/document/header-ink.js";import{useEasel as we}from"efficient-easel/easel";import{pageBackgroundVars as Ie}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as We}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as He}from"../../../render/lib/document/editing-bridges.js";import Ne from"../../components/SectionTextPartBridge.js";const be={SectionTextParts:Ne};import{PageWidthWrapper as at,PublishedPageFrame as it,pageWidthTokens as dt}from"../../../render/lib/document/page-frame.js";const De="color-mix(in oklab, var(--bg) 40%, #ffffff)",ze="12vh";function je({style:o,children:a}){const{appState:i}=we(u=>u),t=i.data.content,r=i.data.root;if(Ee(t))return n("div",{className:"sf-themed-content",style:{...o,background:De,minHeight:"100vh",paddingBottom:ze},children:n("div",{style:{background:"var(--bg)"},children:a})});const d=C(t)&&Ae(r,t),c=C(t)?Ge(r,t):null,p=c?{[ve]:c}:null,l=X(r?.widthChoice),f=l?{[Y]:l}:null,h=d?null:Be(t),m=h?{[Re]:h}:null;return n("div",{className:`sf-themed-content${d?` ${_e}`:""}`,style:o,...m,...p,...f,children:n("div",{style:{background:"var(--bg)",minHeight:"100%"},children:a})})}function ot({propsTheme:o,propsFonts:a,propsCornerStyle:i,propsCornerRadiusPx:t,propsHeadingCompression:r,propsHeadingTypography:d,pageBackground:c,chromeInheritsSiteBackground:p,suppressPreviewNav:l,footer:f,overlay:h,children:m}){const{theme:u,fonts:E,sizes:A,cornerRadiusPx:G,cardShadow:S,shadowColor:v,cardGap:_,hoverEffect:g,headingCompression:B,siteWidth:R,siteGutter:w,siteGutterPhone:y,blockGap:I,blockGapPhone:x,headingTypography:W,heroBackgroundFollowsWidth:H,photographyGrayscale:N,textStyles:b,wordStyles:D,themeFromDocument:e}=ne(),s=e?o:u,z=e?a:E,j=e?void 0:A,V=e?t===void 0?se[ae(i)]:ie(t):G,F=e?r:B,T=e?d:W,k=[K($(e?void 0:b)),M(he(T).italicStrong)].filter(Boolean).join(`
2
+ `),L=We(),O={...de(s),...ce(j),...le(T),...L.style,...p?{}:Ie(c)};return P("div",{className:`sf-theme-surfaces sf-theme-accent ${[Q(e?void 0:y),ee(e?void 0:x)].filter(Boolean).join(" ")}`.trim(),style:{...Pe(z),...Ce(e?null:D),...pe(s),...fe(s),...me(s),...ue(s),...Se(V),...ge(e?void 0:S,e?void 0:v,e?void 0:g),...q(e?void 0:R),...J(e?void 0:w),...U(e?void 0:y),...oe(e?void 0:I),...te(e?void 0:x),...Z(e?void 0:H)},"data-sf-headings":ye(F),"data-sf-card-shadow":e?void 0:xe(S),"data-sf-card-gap":e?void 0:Te(_),"data-sf-card-hover":e?void 0:ke(g),onClickCapture:l,children:[k?n("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:k}}):null,n(re,{grayscale:e?void 0:N,children:P(He,{value:be,children:[n(je,{style:O,children:m}),f,h]})})]})}const nt=o=>{o.target?.closest?.("a")&&o.preventDefault()};export{be as EDITING_BRIDGES,je as EditorPageBody,ot as EditorThemedBody,at as PageWidthWrapper,it as PublishedPageFrame,De as SECTION_PREVIEW_CANVAS,ze as SECTION_PREVIEW_CANVAS_TAIL,dt as pageWidthTokens,nt as suppressPreviewNav};
@@ -0,0 +1,10 @@
1
+ import { type SeenEntrance } from "../../../render/components/SectionAnimation.js";
2
+ import { type PartMotion } from "../../../render/lib/animation/part-motion.js";
3
+ export declare const PART_LIFT_ATTR = "data-sf-part-lift";
4
+ export type SeenPartEntrances = Map<string, SeenEntrance>;
5
+ type StampedPart = {
6
+ element: HTMLElement;
7
+ partKey: string;
8
+ };
9
+ export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, phone: boolean, seen: SeenPartEntrances): () => void;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import{ENTRANCE_ATTR as T,playEntrance as w}from"efficient-shell/format";import{entranceReplay as m}from"../../../render/components/SectionAnimation.js";import{entranceOf as d}from"../../../render/lib/animation/entrance.js";import{drawPartEntrance as A,firstOnPage as E,partMotionDrawn as b}from"../../../render/lib/animation/part-motion.js";import{partLiftRules as x}from"../../../render/lib/document/part-styles.js";const h="data-sf-part-lift",y="sf-part-lift-canvas";function R(n){if(n.getElementById(y))return;const o=n.createElement("style");o.id=y,o.textContent=x(`[${h}]`).join(`
2
+ `),n.head.appendChild(o)}const _="data-sf-part-host";function g(n){const o=n.ownerDocument.defaultView;let r=n;for(;r&&!r.hasAttribute(_);){const i=o?.getComputedStyle(r).display??"";if(i!=="inline"&&i!=="contents")return r;r=r.parentElement}return null}function K(n,o,r,i){const c=[],f=new Map;for(const{partKey:t}of n){if(f.has(t))continue;const s=o(t)??{},p=d(s,"desktop"),a=d(s,"phone"),e=i.get(t),u=e?m.next(e,p,a,r):null;i.set(t,u?u.seen:m.seed(p,a)),f.set(t,u?.play??!1)}const l=new Map;for(const t of n){const s=g(t.element);s&&l.set(s,[...l.get(s)??[],t])}for(const[t,s]of l){const p=e=>b(o(e.partKey)??{}),a=E(s.filter(e=>p(e).entrance));if(a){const e=o(a.partKey)??{};c.push(A(t,d(e,r?"phone":"desktop"))),f.get(a.partKey)&&t.hasAttribute(T)&&w(t)}s.some(e=>p(e).hover==="lift")&&(R(t.ownerDocument),t.setAttribute(h,""),c.push(()=>t.removeAttribute(h)))}return()=>c.forEach(t=>t())}export{h as PART_LIFT_ATTR,K as paintPartMotion};