efficient-web-builder 22.1.1 → 23.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +189 -5
  2. package/dist/components/DuplicateToPageMenu.d.ts +1 -1
  3. package/dist/components/DuplicateToPageMenu.js +1 -1
  4. package/dist/components/HeroArrows.js +1 -1
  5. package/dist/components/HeroSection.d.ts +1 -1
  6. package/dist/components/HeroSection.js +1 -1
  7. package/dist/components/HeroSingle.js +1 -1
  8. package/dist/components/HeroVideoPlay.js +1 -1
  9. package/dist/components/LocationsGroupedField.js +1 -1
  10. package/dist/components/MediaUploadField.js +1 -1
  11. package/dist/components/PagesPanel.js +1 -1
  12. package/dist/components/PartSettingsPanel.js +1 -1
  13. package/dist/components/PreviewChatContext.js +1 -1
  14. package/dist/components/PreviewHeaderContext.js +1 -1
  15. package/dist/components/PreviewHeroPartContext.d.ts +1 -1
  16. package/dist/components/PreviewHeroPartContext.js +1 -1
  17. package/dist/components/PreviewLocationPartContext.d.ts +1 -1
  18. package/dist/components/PreviewLocationPartContext.js +1 -1
  19. package/dist/components/PreviewPartAnchors.js +1 -1
  20. package/dist/components/PreviewTickerContext.d.ts +1 -1
  21. package/dist/components/PreviewTickerContext.js +1 -1
  22. package/dist/components/SectionEditor.js +1 -1
  23. package/dist/components/SectionTextEntries.js +1 -1
  24. package/dist/components/SectionTextPartBridge.js +1 -1
  25. package/dist/components/SiteFields.js +1 -1
  26. package/dist/components/SiteTextStylesField.js +1 -1
  27. package/dist/components/SlotChildRows.d.ts +1 -1
  28. package/dist/components/StandaloneSectionEditor.js +1 -1
  29. package/dist/components/StorefrontEditor.js +1 -1
  30. package/dist/components/WebsiteScreenParts.js +1 -1
  31. package/dist/components/preview-devices.d.ts +1 -1
  32. package/dist/components/preview-devices.js +1 -1
  33. package/dist/components/storefront-editor.css +5 -42
  34. package/dist/components/usePinnedChromeSeed.js +1 -1
  35. package/dist/lib/content/footer.d.ts +1 -1
  36. package/dist/lib/puck/apply-card-corners.d.ts +1 -1
  37. package/dist/lib/puck/block-source-fields.d.ts +2 -0
  38. package/dist/lib/puck/block-source-fields.js +1 -1
  39. package/dist/lib/puck/blocks/block-types.d.ts +4 -1
  40. package/dist/lib/puck/blocks/general/CategoryBar/render.js +1 -1
  41. package/dist/lib/puck/blocks/general/ContactLocations/render.js +1 -1
  42. package/dist/lib/puck/blocks/general/Eyebrow/render.js +1 -1
  43. package/dist/lib/puck/blocks/general/FAQ/render.js +1 -1
  44. package/dist/lib/puck/blocks/general/FeaturedCover/fields.js +1 -1
  45. package/dist/lib/puck/blocks/general/FeaturedCover/render.js +1 -1
  46. package/dist/lib/puck/blocks/general/Flex/fields.js +1 -1
  47. package/dist/lib/puck/blocks/general/Footprint/render.js +1 -1
  48. package/dist/lib/puck/blocks/general/Heading/render.js +1 -1
  49. package/dist/lib/puck/blocks/general/HeroGroup/fields.js +1 -1
  50. package/dist/lib/puck/blocks/general/IntroBleed/render.js +1 -1
  51. package/dist/lib/puck/blocks/general/LogoBlock/fields.js +1 -1
  52. package/dist/lib/puck/blocks/general/LogoBlock/render.js +1 -1
  53. package/dist/lib/puck/blocks/general/LongRead/fields.js +1 -1
  54. package/dist/lib/puck/blocks/general/LongRead/render.js +1 -1
  55. package/dist/lib/puck/blocks/general/Mockup/fields.js +2 -2
  56. package/dist/lib/puck/blocks/general/PostCard/fields.js +1 -1
  57. package/dist/lib/puck/blocks/general/PostCard/render.js +1 -1
  58. package/dist/lib/puck/blocks/general/ProcessSteps/fields.js +1 -1
  59. package/dist/lib/puck/blocks/general/SectionHeader/fields.js +1 -1
  60. package/dist/lib/puck/blocks/general/SectionHeader/render.js +1 -1
  61. package/dist/lib/puck/blocks/general/Split/render.js +1 -1
  62. package/dist/lib/puck/blocks/general/Text/render.js +1 -1
  63. package/dist/lib/puck/blocks/general/TitleWithButtons/render.js +1 -1
  64. package/dist/lib/puck/blocks/general/render-config.d.ts +8 -0
  65. package/dist/lib/puck/blocks/general/render-config.js +1 -0
  66. package/dist/lib/puck/blocks/scaffold.js +1 -1
  67. package/dist/lib/puck/blocks/shared-fields.d.ts +2 -2
  68. package/dist/lib/puck/canvas-typing.d.ts +1 -1
  69. package/dist/lib/puck/canvas-typing.js +1 -1
  70. package/dist/lib/puck/controls.d.ts +5 -3
  71. package/dist/lib/puck/controls.js +1 -1
  72. package/dist/lib/puck/footer-blocks.d.ts +1 -1
  73. package/dist/lib/puck/footer-blocks.js +1 -1
  74. package/dist/lib/puck/general-order.d.ts +3 -0
  75. package/dist/lib/puck/general-order.js +1 -0
  76. package/dist/lib/puck/general-registry.d.ts +1 -1
  77. package/dist/lib/puck/general-registry.js +1 -1
  78. package/dist/lib/puck/header-clearance.js +1 -1
  79. package/dist/lib/puck/heading-outline.d.ts +1 -1
  80. package/dist/lib/puck/heading-outline.js +1 -1
  81. package/dist/lib/puck/migrate-legacy.js +1 -1
  82. package/dist/lib/puck/mockup-variant-fields.d.ts +1 -1
  83. package/dist/lib/puck/mockup-variant-fields.js +1 -1
  84. package/dist/lib/puck/overrides.js +1 -1
  85. package/dist/lib/puck/page-frame.d.ts +34 -0
  86. package/dist/lib/puck/page-frame.js +1 -0
  87. package/dist/lib/puck/page-root.d.ts +1 -26
  88. package/dist/lib/puck/page-root.js +2 -2
  89. package/dist/lib/puck/part-rows.d.ts +1 -1
  90. package/dist/lib/puck/part-rows.js +1 -1
  91. package/dist/lib/puck/part-text.d.ts +2 -2
  92. package/dist/lib/puck/part-text.js +1 -1
  93. package/dist/lib/puck/part-typing.d.ts +1 -1
  94. package/dist/lib/puck/passes/cell-width.d.ts +2 -0
  95. package/dist/lib/puck/passes/cell-width.js +1 -1
  96. package/dist/lib/puck/passes/index.js +1 -1
  97. package/dist/lib/puck/passes/inspector.js +1 -1
  98. package/dist/lib/puck/passes/section-height.js +1 -1
  99. package/dist/lib/puck/passes/section-sticky.js +1 -1
  100. package/dist/lib/puck/passes/section-width.js +1 -1
  101. package/dist/lib/puck/passes/show-when-rows.d.ts +4 -0
  102. package/dist/lib/puck/passes/show-when-rows.js +1 -0
  103. package/dist/lib/puck/passes/types.d.ts +5 -0
  104. package/dist/lib/puck/registry.js +1 -1
  105. package/dist/lib/puck/selection-parent.d.ts +1 -1
  106. package/dist/lib/puck/selection-parent.js +1 -1
  107. package/dist/lib/puck/show-when-attach.d.ts +19 -0
  108. package/dist/lib/puck/show-when-attach.js +1 -0
  109. package/dist/lib/puck/show-when-resolve.d.ts +9 -0
  110. package/dist/lib/puck/show-when-resolve.js +1 -0
  111. package/dist/lib/puck/show-when.d.ts +12 -7
  112. package/dist/lib/puck/show-when.js +1 -1
  113. package/dist/lib/puck/slot-specs.d.ts +1 -1
  114. package/dist/lib/puck/slot-specs.js +1 -1
  115. package/dist/lib/puck/template-field.d.ts +1 -1
  116. package/dist/lib/puck/text-part-shape.d.ts +1 -1
  117. package/dist/lib/puck/text-part-shape.js +1 -1
  118. package/dist/lib/puck/text-parts.d.ts +2 -2
  119. package/dist/lib/puck/text-parts.js +1 -1
  120. package/dist/lib/sections/section-head-placement.d.ts +5 -2
  121. package/dist/lib/sections/section-head-placement.js +1 -1
  122. package/dist/lib/sections/section-head-style.d.ts +1 -0
  123. package/dist/lib/sections/section-head-style.js +1 -1
  124. package/dist/lib/sections/ticker-scroll.d.ts +1 -1
  125. package/dist/lib/source-rules/import-time-work.d.ts +9 -0
  126. package/dist/lib/source-rules/import-time-work.js +5 -0
  127. package/dist/lib/source-rules/one-show-when.d.ts +9 -0
  128. package/dist/lib/source-rules/one-show-when.js +4 -0
  129. package/dist/lib/source-rules/support/registry-source.d.ts +1 -1
  130. package/dist/lib/source-rules/support/registry-source.js +3 -3
  131. package/package.json +8 -5
  132. package/dist/lib/puck/part-id.d.ts +0 -1
  133. package/dist/lib/puck/part-id.js +0 -1
  134. package/dist/lib/puck/preview-events.d.ts +0 -2
  135. package/dist/lib/puck/preview-events.js +0 -1
  136. package/dist/lib/puck/preview-selection-context.d.ts +0 -2
  137. package/dist/lib/puck/preview-selection-context.js +0 -1
  138. package/dist/lib/puck/text-control-kinds.d.ts +0 -2
  139. package/dist/lib/puck/text-control-kinds.js +0 -1
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{BOX_DARKEN as t,BOX_DARKEN_STYLES as s}from"../../../../content/box-background.js";import{POST_CARD_HEIGHT as o,POST_CARD_LAYOUT_FALLBACK as f,POST_CARD_LAYOUTS as u}from"../../../../../components/PostCard.js";import _ from"../../../../../components/BlogPostSource.js";import{HeightIcon as k,ImageIcon as x,LayoutIcon as y,OpacityIcon as C,StylesIcon as S}from"efficient-easel/icons";import{group as T,linkField as h,placementField as A,select as m,slider as c,sourceField as D,text as l,textarea as p,toggle as L,upload as O}from"../../../controls.js";import{POSTCARD_PH as r}from"./render.js";const b={fields:{source:D(_),image:O("Cover image","image/*"),title:p("Heading",r.title),excerpt:p("Excerpt",r.excerpt),href:h("Link"),category:l("Category",r.category),date:l("Date",r.date),readLabel:l("Read time",r.readLabel),layout:m("Card layout",e(y,{}),u,f),showCover:L("Show cover image",!0,e(x,{})),placement:A("Text position",{stacking:!1}),minHeight:c("Card height",e(k,{}),o.min,o.max,o.step,o.fallback,o.unit),_gTint:T("Image tint"),darken:c("Darken",e(C,{}),t.min,t.max,t.step,t.fallback,t.unit),darkenStyle:m("Darken style",e(S,{}),s,s[0].value)},resolveFields:(d,{fields:g})=>{const n=d.props,a={...g};if(n.layout!=="cover")for(const i of["placement","darken","darkenStyle","minHeight","_gTint"])delete a[i];else delete a.showCover;if(n.source?.slug)for(const i of["image","title","excerpt","href"])delete a[i];return a}};export{b as PostCardFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{BOX_DARKEN as t,BOX_DARKEN_STYLES as i}from"../../../../content/box-background.js";import{POST_CARD_HEIGHT as o,POST_CARD_LAYOUT_FALLBACK as s,POST_CARD_LAYOUTS as g}from"../../../../../components/PostCard.js";import p from"../../../../../components/BlogPostSource.js";import{HeightIcon as O,ImageIcon as _,LayoutIcon as d,OpacityIcon as C,StylesIcon as T}from"efficient-easel/icons";import{NOT_BOUND_TO_POST as f,group as u,linkField as S,placementField as R,select as n,slider as l,sourceField as x,text as r,textarea as m,toggle as y,upload as D}from"../../../controls.js";import{withRowRules as h}from"../../../show-when.js";import{POSTCARD_PH as a}from"./render.js";const c={field:"layout",is:"cover"},k={not:c},A=["placement","darken","darkenStyle","minHeight","_gTint"],E=["showCover"],L=["image","title","excerpt","href"],b={fields:h({source:x(p),image:D("Cover image","image/*"),title:m("Heading",a.title),excerpt:m("Excerpt",a.excerpt),href:S("Link"),category:r("Category",a.category),date:r("Date",a.date),readLabel:r("Read time",a.readLabel),layout:n("Card layout",e(d,{}),g,s),showCover:y("Show cover image",!0,e(_,{})),placement:R("Text position",{stacking:!1}),minHeight:l("Card height",e(O,{}),o.min,o.max,o.step,o.fallback,o.unit),_gTint:u("Image tint"),darken:l("Darken",e(C,{}),t.min,t.max,t.step,t.fallback,t.unit),darkenStyle:n("Darken style",e(T,{}),i,i[0].value)},[[A,c],[E,k],[L,f]])};export{b as PostCardFields};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{BOX_DARKEN_STYLES as i}from"../../../../content/box-background.js";import o,{POST_CARD_HEIGHT as c,POST_CARD_LAYOUT_FALLBACK as m}from"../../../../../components/PostCard.js";import{hidableText as u}from"../../../hidable.js";import{PH as l}from"../../placeholders.js";import{phHide as d}from"../../scaffold.js";const r={title:"Add a *headline* for this post.",excerpt:"A short summary of the post — one or two sentences.",category:l.category,date:l.date,readLabel:"0 min read"},b={label:"Post Card",defaultProps:{source:null,image:"",title:"",excerpt:"",href:"",category:"",date:"",readLabel:"",layout:m,showCover:!0,placement:"bottom-left",darken:55,darkenStyle:i[0].value,minHeight:c.fallback},render:e=>{const t=e.source,a=!!t?.slug;return n(o,{post:{slug:a?t.slug:"post-card",title:(a?t.title:d(e.title,r.title,e.puck))||"",excerpt:(a?t.dek:d(e.excerpt,r.excerpt,e.puck))||"",cover:(a?t.image:e.image)||"",meta:d(e.category,r.category,e.puck)||void 0,dateLabel:(a?t.date:d(e.date,r.date,e.puck))||void 0,read:d(e.readLabel,r.readLabel,e.puck)||void 0},href:(a?t.href:u(e.href))||void 0,layout:e.layout,showCover:e.showCover,placement:e.placement,darken:e.darken,darkenStyle:e.darkenStyle,minHeight:e.minHeight,scaffold:!!e.puck?.isEditing&&!a})}};export{r as POSTCARD_PH,b as PostCardRender};
1
+ import{jsx as n}from"react/jsx-runtime";import{BOX_DARKEN_STYLES as i}from"../../../../content/box-background.js";import o,{POST_CARD_HEIGHT as c,POST_CARD_LAYOUT_FALLBACK as m}from"../../../../../components/PostCard.js";import{hidableText as u}from"efficient-easel/draw";import{PH as l}from"../../placeholders.js";import{phHide as d}from"../../scaffold.js";const r={title:"Add a *headline* for this post.",excerpt:"A short summary of the post — one or two sentences.",category:l.category,date:l.date,readLabel:"0 min read"},b={label:"Post Card",defaultProps:{source:null,image:"",title:"",excerpt:"",href:"",category:"",date:"",readLabel:"",layout:m,showCover:!0,placement:"bottom-left",darken:55,darkenStyle:i[0].value,minHeight:c.fallback},render:e=>{const t=e.source,a=!!t?.slug;return n(o,{post:{slug:a?t.slug:"post-card",title:(a?t.title:d(e.title,r.title,e.puck))||"",excerpt:(a?t.dek:d(e.excerpt,r.excerpt,e.puck))||"",cover:(a?t.image:e.image)||"",meta:d(e.category,r.category,e.puck)||void 0,dateLabel:(a?t.date:d(e.date,r.date,e.puck))||void 0,read:d(e.readLabel,r.readLabel,e.puck)||void 0},href:(a?t.href:u(e.href))||void 0,layout:e.layout,showCover:e.showCover,placement:e.placement,darken:e.darken,darkenStyle:e.darkenStyle,minHeight:e.minHeight,scaffold:!!e.puck?.isEditing&&!a})}};export{r as POSTCARD_PH,b as PostCardRender};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{ColumnsIcon as d,PlacementIcon as m}from"efficient-easel/icons";import{cardImageField as p,group as c,section as o,segmented as u,slider as x,text as t,textarea as P}from"../../../controls.js";import{SPLITTABLE_SECTIONS as S,headFieldsForPlacement as g,widthFieldsForParent as b}from"../../../../sections/section-head-placement.js";import{PH as f}from"../../placeholders.js";import{innerSpacingFields as _,WIDTH_ROW_KEYS as h}from"../../shared-fields.js";import{PROCESS_PH as i,ProcessStepsSlots as F}from"./render.js";const L={fields:{_sHeader:o("Header"),_gContent:c("Content"),num:t("Number",i.num),title:t("Heading",i.title),description:P("Body",f.body),boxes:F.boxes,_dDesign:o("Design"),columns:x("Columns",r(d,{}),2,4,1,3),cardImage:p(),cardText:u("Text position",r(m,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below"),_dLayout:o("Layout"),..._("ProcessSteps")},resolveFields:(e,{fields:n,parent:l})=>{const s=g(b(n,l,h),e.props.headPlacement,S.ProcessSteps.headRows);if(!(Array.isArray(e.props.boxes)&&e.props.boxes.length>0))return s;const{cardText:C,...a}=s;return a}};export{L as ProcessStepsFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{ColumnsIcon as m,PlacementIcon as n}from"efficient-easel/icons";import{cardImageField as a,group as d,section as e,segmented as p,slider as c,text as t,textarea as u}from"../../../controls.js";import{SPLITTABLE_SECTIONS as P,headFieldsForPlacement as S,widthFieldsForParent as f}from"../../../../sections/section-head-placement.js";import{PH as x}from"../../placeholders.js";import{innerSpacingFields as g,WIDTH_ROW_KEYS as b}from"../../shared-fields.js";import{withRowRules as _}from"../../../show-when.js";import{PROCESS_PH as s,ProcessStepsSlots as F}from"./render.js";const E={fields:_({_sHeader:e("Header"),_gContent:d("Content"),num:t("Number",s.num),title:t("Heading",s.title),description:u("Body",x.body),boxes:F.boxes,_dDesign:e("Design"),columns:c("Columns",o(m,{}),2,4,1,3),cardImage:a(),cardText:p("Text position",o(n,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below"),_dLayout:e("Layout"),...g("ProcessSteps")},[[["cardText"],{not:{field:"boxes",set:!0}}]]),resolveFields:(r,{fields:i,parent:l})=>S(f(i,l,b),r.props.headPlacement,P.ProcessSteps.headRows)};export{E as ProcessStepsFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{widthModeFields as d}from"../../../passes/section-width.js";import{resolveWidth as p}from"../../../../content/section-width.js";import{HashIcon as O,StylesIcon as i}from"efficient-easel/icons";import{group as l,linkField as T,plainText as L,segmented as a,select as r,text as n,textarea as S,upload as c,widthField as g,withPanelOnly as f}from"../../../controls.js";import{DEFAULT_SECTION_NUMBER_STYLE as N,SECTION_NUMBER_STYLE_OPTIONS as y}from"../../../../sections/section-number-style.js";import{HEAD_UNUSED_FIELDS as u,DEFAULT_SECTION_HEAD_STYLE as I,SECTION_HEAD_STYLE_OPTIONS as h,parseSectionHeadStyle as F}from"../../../../sections/section-head-style.js";import{SECTION_EYEBROW_LOOK_OPTIONS as x,DEFAULT_SECTION_EYEBROW_LOOK as C}from"../../../../sections/section-eyebrow-look.js";const b={fields:{_gContent:l("Content"),headStyle:r("Style",e(i,{}),[...h],I),num:n("Number","01 / Section"),eyebrowLook:r("Eyebrow style",e(i,{}),[...x],C),numStyle:a("Number style",e(O,{}),[...y],N),title:S("Heading","Section *title*"),description:S("Body","Short supporting line"),linkText:n("Button","View all"),linkHref:T("Link"),_gLogo:l("Logo"),logoSrc:c("Logo image","image/*"),logoAlt:f(L("Logo alt text","Logo description")),...g("full")},resolveFields:(o,{fields:s})=>{const E=d(s,p(o?.props??{},"full")),m=F(o?.props?.headStyle),t={...E};for(const _ of u[m])delete t[_];return t}};export{b as SectionHeaderFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{widthModeFields as S}from"../../../passes/section-width.js";import{resolveWidth as E}from"../../../../content/section-width.js";import{HashIcon as s,StylesIcon as o}from"efficient-easel/icons";import{group as t,linkField as _,plainText as d,segmented as O,select as i,text as l,textarea as r,upload as p,widthField as T,withPanelOnly as L}from"../../../controls.js";import{DEFAULT_SECTION_NUMBER_STYLE as a,SECTION_NUMBER_STYLE_OPTIONS as g}from"../../../../sections/section-number-style.js";import{DEFAULT_SECTION_HEAD_STYLE as N,SECTION_HEAD_STYLE_OPTIONS as f,withHeadStyleRules as u}from"../../../../sections/section-head-style.js";import{SECTION_EYEBROW_LOOK_OPTIONS as y,DEFAULT_SECTION_EYEBROW_LOOK as I}from"../../../../sections/section-eyebrow-look.js";const B={fields:u({_gContent:t("Content"),headStyle:i("Style",e(o,{}),[...f],N),num:l("Number","01 / Section"),eyebrowLook:i("Eyebrow style",e(o,{}),[...y],I),numStyle:O("Number style",e(s,{}),[...g],a),title:r("Heading","Section *title*"),description:r("Body","Short supporting line"),linkText:l("Button","View all"),linkHref:_("Link"),_gLogo:t("Logo"),logoSrc:p("Logo image","image/*"),logoAlt:L(d("Logo alt text","Logo description")),...T("full")}),resolveFields:(n,{fields:m})=>S(m,E(n?.props??{},"full"))};export{B as SectionHeaderFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{PAGE_WIDTH as N}from"../../../../content/page-width.js";import{resolveWidth as A}from"../../../../content/section-width.js";import{FRAME as L}from"../../../../../components/BlockFrame.js";import D from"../../../../../components/EditorialSectionHead.js";import{renderGold as b,renderHeadline as v}from"../../../../../components/goldPhrases.js";import a from"../../../../../components/SectionHeader.js";import{hidableText as c}from"../../../hidable.js";import{DEFAULT_SECTION_NUMBER_STYLE as G}from"../../../../sections/section-number-style.js";import{DEFAULT_SECTION_HEAD_STYLE as R,parseNaturalDescriptionSize as W,parseNaturalRowGap as F,parseSectionHeadStyle as I}from"../../../../sections/section-head-style.js";import{parseSectionEyebrowLook as s}from"../../../../sections/section-eyebrow-look.js";import{phHide as t}from"../../scaffold.js";const K={label:"Section Header",defaultProps:{headStyle:R,num:"01 / Section",numStyle:G,title:"Section *title*",description:"",logoSrc:"",logoAlt:"",linkText:"",linkHref:"",fullWidth:!0,pageWidth:N.default},render:({headStyle:f,num:i,numStyle:x,eyebrowLook:d,title:r,description:m,logoSrc:S,logoAlt:H,linkText:h,linkHref:u,rowGap:E,descriptionSize:g,widthMode:T,fullWidth:y,pageWidth:_,puck:e})=>{const p=t(h,"View all",e),w=A({widthMode:T,fullWidth:y,pageWidth:_},"full"),n=I(f);return o("section",{className:"px-[var(--sf-site-gutter,40px)] pt-10 max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-6",children:o("div",{className:w.mode==="page"?L:void 0,children:n==="editorial"?o(D,{num:t(i,"01 / Section",e),title:(()=>{const l=t(r,"Section *title*",e);return l?v(l,!0):void 0})(),desc:(()=>{const l=t(m,"Short supporting line",e);return l?b(l):void 0})(),spaceBelow:""}):n==="simple"?o(a,{look:"simple",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),eyebrowLook:s(d,"SectionHeader")}):n==="statement"?o(a,{look:"statement",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),eyebrowLook:s(d,"SectionHeader")}):n==="natural"?o(a,{look:"natural",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),description:t(m,"Short supporting line",e),eyebrowLook:s(d,"SectionHeader"),rowGap:F(E),descriptionSize:W(g)}):n==="essay"?o(a,{look:"essay",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),eyebrowLook:s(d,"SectionHeader")}):o(a,{num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),description:t(m,"Short supporting line",e),logo:S?{src:S,alt:c(H)}:void 0,link:p?{text:p,href:c(u)||"#"}:void 0,numStyle:x,accent:!0})})})}};export{K as SectionHeaderRender};
1
+ import{jsx as o}from"react/jsx-runtime";import{PAGE_WIDTH as N}from"../../../../content/page-width.js";import{resolveWidth as A}from"../../../../content/section-width.js";import{FRAME as L}from"../../../../../components/BlockFrame.js";import D from"../../../../../components/EditorialSectionHead.js";import{renderGold as b,renderHeadline as v}from"../../../../../components/goldPhrases.js";import a from"../../../../../components/SectionHeader.js";import{hidableText as c}from"efficient-easel/draw";import{DEFAULT_SECTION_NUMBER_STYLE as G}from"../../../../sections/section-number-style.js";import{DEFAULT_SECTION_HEAD_STYLE as R,parseNaturalDescriptionSize as W,parseNaturalRowGap as F,parseSectionHeadStyle as I}from"../../../../sections/section-head-style.js";import{parseSectionEyebrowLook as s}from"../../../../sections/section-eyebrow-look.js";import{phHide as t}from"../../scaffold.js";const K={label:"Section Header",defaultProps:{headStyle:R,num:"01 / Section",numStyle:G,title:"Section *title*",description:"",logoSrc:"",logoAlt:"",linkText:"",linkHref:"",fullWidth:!0,pageWidth:N.default},render:({headStyle:f,num:i,numStyle:x,eyebrowLook:d,title:r,description:m,logoSrc:S,logoAlt:H,linkText:h,linkHref:u,rowGap:E,descriptionSize:g,widthMode:T,fullWidth:y,pageWidth:_,puck:e})=>{const p=t(h,"View all",e),w=A({widthMode:T,fullWidth:y,pageWidth:_},"full"),n=I(f);return o("section",{className:"px-[var(--sf-site-gutter,40px)] pt-10 max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-6",children:o("div",{className:w.mode==="page"?L:void 0,children:n==="editorial"?o(D,{num:t(i,"01 / Section",e),title:(()=>{const l=t(r,"Section *title*",e);return l?v(l,!0):void 0})(),desc:(()=>{const l=t(m,"Short supporting line",e);return l?b(l):void 0})(),spaceBelow:""}):n==="simple"?o(a,{look:"simple",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),eyebrowLook:s(d,"SectionHeader")}):n==="statement"?o(a,{look:"statement",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),eyebrowLook:s(d,"SectionHeader")}):n==="natural"?o(a,{look:"natural",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),description:t(m,"Short supporting line",e),eyebrowLook:s(d,"SectionHeader"),rowGap:F(E),descriptionSize:W(g)}):n==="essay"?o(a,{look:"essay",num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),eyebrowLook:s(d,"SectionHeader")}):o(a,{num:t(i,"01 / Section",e),title:t(r,"Section *title*",e),description:t(m,"Short supporting line",e),logo:S?{src:S,alt:c(H)}:void 0,link:p?{text:p,href:c(u)||"#"}:void 0,numStyle:x,accent:!0})})})}};export{K as SectionHeaderRender};
@@ -1,2 +1,2 @@
1
- import{jsx as l}from"react/jsx-runtime";import c from"../../../../../components/Split.js";import{hidableText as g}from"../../../hidable.js";import{phHide as t,ctaHide as d}from"../../scaffold.js";const i={eyebrow:"— Label",title:`Section headline *here.*
1
+ import{jsx as l}from"react/jsx-runtime";import c from"../../../../../components/Split.js";import{hidableText as g}from"efficient-easel/draw";import{phHide as t,ctaHide as d}from"../../scaffold.js";const i={eyebrow:"— Label",title:`Section headline *here.*
2
2
  *Highlight line*`,body:"Describe this section in a sentence or two."},m={text:"Learn more"};function x(e,n,r){const a=t(e,m.text,r);if(a!==void 0)return{text:a,href:n||"#"}}const y={label:"Image & Text Split",defaultProps:{eyebrow:"",title:"",body:"",imageSrc:"",reverse:!1,uppercase:!1,textAlign:"left",ctaText:"",ctaHref:"",imageBtnText:"",imageBtnHref:"",textBgSrc:"",overlay:60},render:e=>l(c,{eyebrow:t(e.eyebrow,i.eyebrow,e.puck),title:t(e.title,i.title,e.puck),body:t(e.body,i.body,e.puck),imageLabel:g(e.title)||i.title,imageSrc:e.imageSrc||void 0,reverse:e.reverse,uppercase:e.uppercase,textAlign:e.textAlign,cta:d(e.ctaText,e.ctaHref,e.puck),imageButton:x(e.imageBtnText,e.imageBtnHref,e.puck),textBgSrc:e.textBgSrc||void 0,textBgTint:(typeof e.overlay=="number"?e.overlay:60)/100,grayscale:e.grayscale})};export{m as IMGBTN_PH,i as SPLIT_PH,y as SplitRender};
@@ -1 +1 @@
1
- import{Fragment as d,jsx as r}from"react/jsx-runtime";import{padValuesOf as m}from"../../../../content/section-padding.js";import f from"../../../../../components/Text.js";import{hidableText as l,readHidable as p}from"../../../hidable.js";import{PH as x}from"../../placeholders.js";import{phPrev as s}from"../../scaffold.js";const P={label:"Text",defaultProps:{text:"",align:"left",tone:"default",contained:!0},render:e=>{const{text:t,align:o,tone:n,contained:a,puck:i}=e;return p(t).hidden?r(d,{}):r(f,{text:s(l(t),x.body,i)??"",align:o,tone:n,contained:a,pad:m(e)})}};export{P as TextRender};
1
+ import{Fragment as d,jsx as r}from"react/jsx-runtime";import{padValuesOf as m}from"../../../../content/section-padding.js";import f from"../../../../../components/Text.js";import{hidableText as l,readHidable as p}from"efficient-easel/draw";import{PH as x}from"../../placeholders.js";import{phPrev as s}from"../../scaffold.js";const P={label:"Text",defaultProps:{text:"",align:"left",tone:"default",contained:!0},render:e=>{const{text:t,align:o,tone:n,contained:a,puck:i}=e;return p(t).hidden?r(d,{}):r(f,{text:s(l(t),x.body,i)??"",align:o,tone:n,contained:a,pad:m(e)})}};export{P as TextRender};
@@ -1,2 +1,2 @@
1
- import{jsx as m}from"react/jsx-runtime";import f from"../../../../../components/TitleWithButtons.js";import{readHidable as p}from"../../../hidable.js";import{CTA_PH as t}from"../../placeholders.js";import{phRows as h,phHide as b}from"../../scaffold.js";const u={title:`Section heading
1
+ import{jsx as m}from"react/jsx-runtime";import f from"../../../../../components/TitleWithButtons.js";import{readHidable as p}from"efficient-easel/draw";import{CTA_PH as t}from"../../placeholders.js";import{phRows as h,phHide as b}from"../../scaffold.js";const u={title:`Section heading
2
2
  *Highlight line*`},_=[{label:t.text,href:t.href,variant:"primary"},{label:t.text,href:t.href,variant:"outline"}],S={label:"Call-to-Action Heading",defaultProps:{title:"",buttons:[],padTop:140,padBottom:140},render:({title:i,buttons:s,padTop:n,padBottom:r,buttonsAlign:a,puck:e})=>{const o=a,d=o==="center"||o==="left",l=p(i),T=l.hidden?"":l.text.trim();return m(f,{title:d&&!T?void 0:b(i,u.title,e),buttons:h(s,_,e),padTop:typeof n=="number"?n:140,padBottom:typeof r=="number"?r:140,buttonsAlign:o,editing:e?.isEditing})}};export{u as TITLE_WITH_BUTTONS_PH,S as TitleWithButtonsRender};
@@ -0,0 +1,8 @@
1
+ import type { Config } from "efficient-easel/blocks";
2
+ import type { BlockRender } from "../block-types.js";
3
+ import { type GeneralBlockType } from "./renders.js";
4
+ export type DrawnBlock = BlockRender & {
5
+ textParts?: Record<string, unknown>;
6
+ };
7
+ export declare function generalRenderBlocks(): Record<GeneralBlockType, DrawnBlock>;
8
+ export declare function generalRenderConfig(): Config;
@@ -0,0 +1 @@
1
+ import{GENERAL_REGISTRATION_ORDER as i,generalCategories as f}from"../../general-order.js";import{drawPublishedRoot as s}from"../../page-frame.js";import{finishRenderRegistry as R}from"../../render-registry.js";import{GENERAL_RENDERS as c}from"./renders.js";import l from"./text-part-shapes.json";const m=l;function E(){const o={};for(const t of i){const n=c[t],e=m[t];o[t]={...n,...e?{textParts:e}:null}}return o}let r=null;function A(){if(r)return r;const o={root:{render:s},categories:f(),components:E()};return R(o),r=o,r}export{E as generalRenderBlocks,A as generalRenderConfig};
@@ -1 +1 @@
1
- import{say as d}from"../../editor-words.js";import{readHidable as i}from"../hidable.js";import{CTA_PH as o}from"./placeholders.js";function u(t,r,e){return t||(e?.isEditing?d(r):void 0)}function x(t,r,e){const n=Array.isArray(t)?t:[];return n.length?n:e?.isEditing?r:[]}function f(t,r,e){const n=i(t);if(!n.hidden)return u(n.text,r,e)}function s(t,r,e){return i(t).hidden?"":f(t,r,e)}function a(t,r,e){return{text:f(t,o.text,e),href:r||o.href}}export{a as ctaHide,f as phHide,s as phHideDefault,u as phPrev,x as phRows};
1
+ import{say as d}from"../../editor-words.js";import{readHidable as i}from"efficient-easel/draw";import{CTA_PH as o}from"./placeholders.js";function u(t,r,e){return t||(e?.isEditing?d(r):void 0)}function x(t,r,e){const n=Array.isArray(t)?t:[];return n.length?n:e?.isEditing?r:[]}function f(t,r,e){const n=i(t);if(!n.hidden)return u(n.text,r,e)}function s(t,r,e){return i(t).hidden?"":f(t,r,e)}function a(t,r,e){return{text:f(t,o.text,e),href:r||o.href}}export{a as ctaHide,f as phHide,s as phHideDefault,u as phPrev,x as phRows};
@@ -2,8 +2,8 @@ import type { ReactElement } from "react";
2
2
  import { toggle } from "../controls.js";
3
3
  export declare const heightField: (tier: "desktop" | "mobile") => import("../controls.js").CustomField<number>;
4
4
  export declare const ctaField: {
5
- ctaText: import("../controls.js").CustomField<import("../controls.js").HidableValue>;
6
- ctaHref: import("../controls.js").CustomField<import("../controls.js").HidableValue>;
5
+ ctaText: import("../controls.js").CustomField<import("efficient-easel/draw").HidableValue>;
6
+ ctaHref: import("../controls.js").CustomField<import("efficient-easel/draw").HidableValue>;
7
7
  };
8
8
  export declare const alignField: () => import("../controls.js").CustomField<string>;
9
9
  export declare const toneField: () => import("../controls.js").CustomField<string>;
@@ -1,5 +1,5 @@
1
1
  import { SHOP_MARKUP, type MarkStyle } from "../markup.js";
2
- import type { TreeItem } from "./content-tree.js";
2
+ import type { TreeItem } from "efficient-easel/draw";
3
3
  import { type ReplacePart } from "./part-typing.js";
4
4
  export declare function partTextTools(markup: boolean, multiline: boolean): MarkStyle[];
5
5
  export type PartTypingDeps = {
@@ -1 +1 @@
1
- import{useSyncExternalStore as T}from"react";import{SHOP_MARKUP as P}from"../markup.js";import{readHidable as S,textFieldOffPage as k}from"./controls.js";import{decodePartId as v}from"./part-id.js";import{PART_ATTR as y}from"./text-parts.js";import{partRowField as b}from"./part-row-field.js";import{decodePartKey as K,partRowValue as O}from"./part-rows.js";import{isMultilineKind as A,typeInPlaceKind as R}from"./part-text.js";import{commitPartText as w}from"./part-typing.js";const C=["bold","italic","underline","strike","link","sup","sub"],F=["bullet","number"];function E(e,t){return e?[...C,...t?F:[]]:[]}function g(e,t){const r=v(e);if(!r?.propKey)return null;const{nodeId:l,propKey:u}=r,o=t.getItemById(l),s=t.getSelectorForId(l);if(!o||!s)return null;const{key:n,row:i}=K(u),p=t.components[o.type]?.fields?.[n],d=i?b(p,i):p,m=R(d);if(!m)return null;const c=o.props??{};if(i&&!(Array.isArray(c[n])&&i.index<c[n].length))return null;const x=i?O(c[n],i):c[n];return{node:o,selector:s,propKey:u,kind:m,stored:x,offPage:k(d)}}function U(e,t){const r=g(e,t);if(!r||r.offPage)return null;const{text:l,hidden:u}=S(r.stored);if(u)return null;const o=A(r.kind);return{partId:e,value:l,rules:P,multiline:o,offered:E(r.kind!=="plainText",o),write:s=>{const n=g(e,t);n&&w({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},s,t.replace)}}}function V(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${I(r)}"]`)??null}function I(e){return e.replace(/["\\]/g,"\\$&")}function W(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let a=null;const f=new Set;function _(){return a}function j(e){if(e!==a){a=e;for(const t of f)t()}}function L(e){return f.add(e),()=>{f.delete(e)}}function G(){return T(L,_,()=>null)}export{_ as canvasTypingPart,W as keysOnCanvas,V as partElement,E as partTextTools,U as partTypingTarget,j as setCanvasTypingPart,L as subscribeCanvasTypingPart,G as useCanvasTypingPart};
1
+ import{useSyncExternalStore as T}from"react";import{SHOP_MARKUP as P}from"../markup.js";import{readHidable as S,textFieldOffPage as k}from"./controls.js";import{decodePartId as v}from"efficient-easel/draw";import{PART_ATTR as y}from"./text-parts.js";import{partRowField as b}from"./part-row-field.js";import{decodePartKey as K,partRowValue as O}from"./part-rows.js";import{isMultilineKind as A,typeInPlaceKind as R}from"./part-text.js";import{commitPartText as w}from"./part-typing.js";const C=["bold","italic","underline","strike","link","sup","sub"],F=["bullet","number"];function E(e,t){return e?[...C,...t?F:[]]:[]}function g(e,t){const r=v(e);if(!r?.propKey)return null;const{nodeId:l,propKey:u}=r,o=t.getItemById(l),s=t.getSelectorForId(l);if(!o||!s)return null;const{key:n,row:i}=K(u),p=t.components[o.type]?.fields?.[n],d=i?b(p,i):p,m=R(d);if(!m)return null;const c=o.props??{};if(i&&!(Array.isArray(c[n])&&i.index<c[n].length))return null;const x=i?O(c[n],i):c[n];return{node:o,selector:s,propKey:u,kind:m,stored:x,offPage:k(d)}}function U(e,t){const r=g(e,t);if(!r||r.offPage)return null;const{text:l,hidden:u}=S(r.stored);if(u)return null;const o=A(r.kind);return{partId:e,value:l,rules:P,multiline:o,offered:E(r.kind!=="plainText",o),write:s=>{const n=g(e,t);n&&w({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},s,t.replace)}}}function V(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${I(r)}"]`)??null}function I(e){return e.replace(/["\\]/g,"\\$&")}function W(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let a=null;const f=new Set;function _(){return a}function j(e){if(e!==a){a=e;for(const t of f)t()}}function L(e){return f.add(e),()=>{f.delete(e)}}function G(){return T(L,_,()=>null)}export{_ as canvasTypingPart,W as keysOnCanvas,V as partElement,E as partTextTools,U as partTypingTarget,j as setCanvasTypingPart,L as subscribeCanvasTypingPart,G as useCanvasTypingPart};
@@ -1,6 +1,6 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
- import { readHidable, hidableText, type HidableValue } from "./hidable.js";
3
- import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "./field-markers.js";
2
+ import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
3
+ import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "efficient-easel/draw";
4
4
  import type { ShowWhenRule } from "./show-when.js";
5
5
  import { type HeroGroupPlacement } from "../hero-group-placement.js";
6
6
  import { type SettingsSidesValue, type SettingsBorderValue } from "efficient-easel/panel";
@@ -80,13 +80,15 @@ export declare function textFieldOffPage(field: unknown): boolean;
80
80
  export declare function withPanelOnly<F extends object>(field: F): F;
81
81
  export declare function textFieldPanelOnly(field: unknown): boolean;
82
82
  export declare function withIdentifier<F extends object>(field: F): F;
83
- export { TEXT_CONTROL_KINDS, SCALAR_TEXT_CONTROLS, type TextControlKind, type ScalarTextControlKind, } from "./text-control-kinds.js";
83
+ export { TEXT_CONTROL_KINDS, SCALAR_TEXT_CONTROLS, type TextControlKind, type ScalarTextControlKind } from "efficient-easel/draw";
84
84
  export type { TextFieldMeta };
85
85
  export declare function inOwnBox<F extends object>(field: F, render: (props: {
86
86
  value?: unknown;
87
87
  onChange: (v: string) => void;
88
88
  }) => ReactElement): F;
89
89
  export declare const BOUND_TO_POST_NOTE = "Everything else on this block comes from the linked post. Unlink it to edit by hand.";
90
+ export declare const BOUND_TO_POST: ShowWhenRule;
91
+ export declare const NOT_BOUND_TO_POST: ShowWhenRule;
90
92
  export declare const HIGHLIGHT_HINT = "Select a word, then press the highlighter.";
91
93
  export declare const ANCHOR_HINT = "A short name so a link can jump straight to this section, like yoursite.com/page#about.";
92
94
  export declare const hintIsWhileTyping: (hint: string) => boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as k,Fragment as R}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as K,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as me,hidableText as he}from"./hidable.js";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as mt}from"./field-markers.js";import ht from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as N}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as W,GALLERY_LAYOUT_KEYS as ye}from"../content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Rt,placementPoints as Ce}from"../hero-group-placement.js";import Tt from"../../components/KeepHint.js";import{AdjustIcon as wt,AlignLeftIcon as Ot,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as At,BlockSectionIcon as Nt,CartIcon as vt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Re,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Te,PaddingLeftIcon as we,PaddingRightIcon as Oe,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Le}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../content/page-background.js";import{CORNER_SIDES as Ae,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ne}from"../content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as m,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as mn,SettingsSidesEach as Fe,sidesStartEach as hn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Rn,withPhonePart as Tn}from"../content/part-display.js";import{AlignmentGrid as wn,Checkbox as On,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Ln,PictureTiles as Be,Slider as An,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as Nn,NoControlMark as re,noControlField as q}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as vn}from"./own-box.js";import{PHONE_CLEAR as Fn,phoneKey as v,resolvePhoneValue as ie}from"./phone-override.js";import{SuppressibleText as Dn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Bn,CARD_OUTLINE_OPTIONS as Hn,DEFAULT_CARD_INDEX_FORMAT as Gn,DEFAULT_CARD_OUTLINE as Mn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Kn,DEFAULT_COVER_INDEX as Wn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Un}from"./text-control-kinds.js";import Xn from"../../components/MediaUploadField.js";import $n from"../../components/MultiSelectField.js";import jn from"../../components/SectionThemePicker.js";import zn from"../../components/SearchSelectField.js";import Vn from"../../components/StorefrontLinkField.js";import Ke from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as Yn,resolveSectionMinHeight as qn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Jn,resolveSectionStick as Zn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as Qn,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as eo}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as to,containerDirectionPoints as no,resolveContainerDirection as We}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as oo,BOX_BLOCK_SPACING_LABEL as ro,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as io,BOX_PHONE_ROW_MAX as lo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as ao,BOX_WRAP_POINTS as ze}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as so}from"../content/borders.js";import{DEFAULT_SURFACES as co,normalizeTheme as uo}from"../theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as po,GAP_FIELD_CONTAINER as fo,hasOwnContainerGap as mo,resolveContainerGap as ho}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as go,CARD_IMAGE_BG_OFF as bo,CARD_IMAGE_BG_SWATCH_NAMES as xo,CARD_IMAGE_BG_SWATCHES as So,isCardImageBackgroundInheriting as yo,cardImageBackgroundChoice as Co,THEME_CARD_IMAGE_BG as _o}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Io,SECTION_BG_SWATCHES as Eo,SECTION_BG_SWATCH_NAMES as Ro,THEME_SECTION_BG as To,isSectionBackgroundInheriting as wo}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Oo}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Po,TYPE_SIZE_INHERIT as ko,isTypeSizeInheriting as Lo}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ao,WIDTH_CHOICE_LABEL as No,WIDTH_INHERIT as vo,resolveWidth as Fo,sectionRunsFullWidth as Ve}from"../content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Do}from"efficient-easel/style-clipboard";function F(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Do(n,`section:${t}`);return e}function $i({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Bo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Ho(e){return e.type===qe}function O(e){return Ho(e)?void 0:e}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Go(){const{appState:e}=K(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Fo(t,"full");return n==="page"?D(`${o}px`,l("the page")):n==="contained"?D(l("Contained"),l("the page")):D(l("Full"),l("the page"))}function Mo(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):D(`${e}px`,l("Site styles"))}function Ko({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),onReset:t})}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Go(),onReset:t})}function B({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=me(e),f=ne(null),p=ne(null),h=w=>t(c?{text:w,hidden:u}:w),b=()=>t({text:d,hidden:!u}),C=c&&u,T=ft(),_=i?zo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Tt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(m,{label:l(n),icon:r(tn,{}),htmlFor:T,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:h}),a?r("textarea",{id:T,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)}):r("input",{id:T,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)})]})})}function ji(e,t){return{...e,[xe]:t}}function zi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Vi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function Yi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function qi(e){return!!e&&typeof e=="object"&&e[Je]===!0}function Ji(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ua,SCALAR_TEXT_CONTROLS as pa}from"./text-control-kinds.js";function Zi(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Nn]:o,...i}=e;return{...i,[vn]:!0,render:t}}const Uo=new Set(Un),H=(e,t)=>{const n={...t,[I]:e};if(!Uo.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Dn,{name:i.name,children:o(i)})}},Qi="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Xo="Select a word, then press the highlighter.",$o="A short name so a link can jump straight to this section, like yoursite.com/page#about.",jo=new Set([Xo]),zo=e=>jo.has(e);function el(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function tl(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Vo(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function nl(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function ol(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Vn,{value:he(t),onChange:n,label:e})}}function rl(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const il={Design:wt,Animation:_e};function ll(e,t){return e.includes("Design")?t!=="Design":null}function Yo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function qo({level:e,label:t}){return e===1?r(Yo,{label:t}):r(Qo,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(qo,{level:t,label:e})}}function y(e){return Ze(e,2)}function al(e){return{type:"custom",render:()=>r(Jo,{text:e})}}function Jo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function sl(e){return Ze(e,1)}function cl(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function dl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(R,{})};return Qe.set(n,o),o}function ul(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function pl(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(R,{})};return et.set(e,t),t}function Zo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function fl(e,t){return Zo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(R,{})}}function ml(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(R,{})}}function Qo({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function hl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=wo(n,t);return r(m,{label:l(e),icon:r(Lt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Io)}),children:tt({swatches:Eo,current:i?To:n??t??"",onPick:o,names:Ro})})}}}function er(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=yo(i,t);return r(m,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(go)}),children:tt({swatches:So,current:a?_o:Co(i,t),onPick:o,names:xo})})}}}function gl(e=n=>n,t){return F({_gSectionTheme:y(Oo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(jn,{value:e(n),onChange:o,followLabel:t})}})}function G({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(An,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function M(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(m,{label:l(e),icon:O(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:G({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const h=typeof f=="number"?f:null,b=h===null;return r(m,{label:l(e),icon:u?O(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:h,label:e,onChange:p}):G({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function bl(e){const t=M("Gap",r(Ee,{}),se.min,se.max,se.step,po[e],"px",(n,o)=>r(Ko,{inherited:!mo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[fo]:e,render:n=>t.render({...n,value:ho(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function ce(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(m,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(tr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function tr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ne(a)??[...Ae];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ne(d)??[];c(u.length===Ae.length?null:u)},radius:t,onRadiusChange:n,radiusMin:N,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return q({type:"custom",render:()=>r(re,{})},"always")}function nr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(i,l("Site styles")),onReset:n})}function or(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:N}function rr(){return ce({sidesKey:"sectionCornerSides",useFollowed:or,useClosedReason:()=>lt()?l(it):null,mark:r(nr,{label:Z}),hint:r(ir,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(L())}function ir(){return r(R,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function xl(){return F({_gShape:y("Shape"),sectionCorners:rr(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const lr=()=>({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 sr(){let e;try{const t=uo(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||co.line}function cr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=sr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=lr();return r(m,{label:l("Border"),icon:r(At,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(ar(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:so})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(cr,{value:t,onChange:n,tier:e})})}function Sl(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=K(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?ve(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=X(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=K(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?ve(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return an(a)?a:o}function dr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(N),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:D(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function ur(){return r(R,{children:de()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function pr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(N),mark:r(dr,{label:Z}),hint:r(ur,{})})}function fr(){return{type:"custom",render:()=>r(ht,{})}}function yl(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Cl(){return{_gShape:y("Shape"),cardCorners:pr(),cardCornerSides:rt(),cardCornersApplyAll:fr()}}function _l(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function Il(){return P("Item alignment",r(Ot,{}),oo,"stretch")}function El(){return P(ao,r(on,{}),ze,ze[0].value)}function Rl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(m,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:ae.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:mr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}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 Tl(){return P(ro,r(Ee,{}),Ue,Ue[0].value)}function wl(){return M(io,r(Yt,{}),$e,lo,1,$e)}function Ol(e){const t=ue(to,Bo("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),no(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Pl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(Le,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Lo(c),detail:l("the Text style in Site styles"),onReset:()=>s(ko),defaultAction:{onPress:()=>s(Po),title:l("Keep this section's own built-in size"),icon:r(Nt,{})}}),children:G({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function kl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null;try{e=K(t=>t).selectedItem}catch{e=null}return e?.props??{}}function hr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=L()[c],u=ie(void 0,d,s);return r(R,{children:G({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function gr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=L()[t],c=ie(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function br(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(gr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(hr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ll(e){return{type:"custom",render:({value:t,onChange:n})=>r(Sr,{...e,value:t,onChange:n})}}function xr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(m,{label:l(e),icon:O(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function Sr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=L()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(xr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const yr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Cr={Top:Pe,Bottom:Te,Left:we,Right:Oe},_r=e=>{const t=Cr[e];return r(t,{})};function Al(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>yr[_],a=_=>M(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,w,te=E)=>g("mobile",br({label:i(_),icon:_r(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:w})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,T=_=>C?g("desktop",_):_;return F({...o?{_gSpacing:y("Padding")}:{},[t]:T(a(s)),...C?{[v(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:T(M(i("Bottom"),r(Te,{}),E.min,E.max,E.step,d,"px")),...C?{[v(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:T(M(i("Left"),r(we,{}),p.min,p.max,p.step,h,"px")),...C?{[v(u)]:c("Left",u,b,p)}:{},[f]:T(M(i("Right"),r(Oe,{}),p.min,p.max,p.step,h,"px")),...C?{[v(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Ir={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Er(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Rr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>hn(a,c));return r(m,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(mn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Er(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Nl(e={}){const t={...Ir,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,v(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Rr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return F({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Tr={contained:"Contained",page:"Page",full:"Full"},Q="Width";function vl(e,t=Ao,n=!0){const o=t.map(i=>({label:No[i]??Tr[i],value:i}));return F({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(Q),icon:r(nn,{}),action:n?r(Wo,{inherited:a?.inherited??!1,onReset:()=>i(vo),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Fl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:U,icon:O(r($t,{})),action:o?o(a):void 0,children:ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:U})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?eo:Qn;return r("div",{className:"sf-field",children:G({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>ue("Unit",r(Re,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return F({_gHeight:y(U),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(wr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function wr({onClear:e}){const t=L(),n=Yn(t),o=qn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function Dl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Or,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:G({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(le),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Or({value:e,onChange:t,labelId:n,phone:o}){const i=L(),a=Zn(i),c=o?a.phone:e===!0;return r(m,{label:l(le),labelId:n,icon:O(r(Zt,{})),action:k(R,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Jn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Bl(){return{_gAnchor:y("Anchor"),anchor:Vo("Anchor name","e.g. about",$o)}}function Hl(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function A(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(m,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Gl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function Ml(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(On,{id:c,checked:a,onChange:o})})}}}function Kl(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:l(e),action:Ge({value:n||t,onChange:o,label:e})})}}const Pr=[{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 dt({label:e,value:t,onChange:n,points:o=Pr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(wn,{label:l(e),value:t,points:i,onChange:n})}function Wl(){return q({type:"custom",render:()=>r(re,{})},"always")}const kr=Ce([]);function Ul(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Lr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:kr})}}}function Lr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=K(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Rt(t),onChange:n,points:o})})}const Xl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function $l(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const h=t.some(b=>b.value===f)?f:n;return r(m,{label:l(e),icon:i,value:c(h)?.label?l(c(h).label):"",children:dt({label:e,value:h,onChange:p,points:u})})}}}const Ar="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:O(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Ar,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function jl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r($n,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function zl(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(zn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Vl(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ee({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const Yl=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(m,{label:l(e),icon:O(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ql(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(Xn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const Jl={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Zl({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(m,{label:l(n),icon:r(oe,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:l("Latitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(m,{label:l("Longitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function Nr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function vr(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function Ql(e,t){return e===null?null:t>e?e:null}function Fr(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 ea={label:"Ticker items",icon:r(zt,{})};function ta(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Dr,{label:e,icon:O(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Dr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ne(null),[s,d]=z(null),u=p=>p.map(h=>({text:h?.text??""})),f=p=>{const h=Fr(n,p,s);h===null&&(c.current=null),d(h),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Nr(n,s),onChange:p=>i(vr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&s===h?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:h+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(h)}})})}function na(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function oa(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Kn,String(Wn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:er("Image background",bo),cardImage:Hr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function ra(){return{outline:P("Card outline",r(en,{}),Hn,Mn),indexBadge:P("Card number",r(Re,{}),Bn,Gn),showBadge:A("Product badge",!0,r(Le,{noun:"tag"}))}}function ia(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:A("Price",!0,r(Kt,{})),showCardFinishes:A("Finish swatches",!0,r(Wt,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Jt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(vt,{})),showCardPage:A("Page button",n.showCardPage,r(ke,{}))}}function la(e,t="display"){const n=v(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Rn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Br,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(m,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Br({parts:e,desktopKey:t,value:n,onChange:o}){const i=L()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Tn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Hr(){return nt("Card image",{min:N,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function aa(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>N,mark:r(Gr,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Gr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function sa(){return{type:"custom",render:({value:e,onChange:t})=>r(Mr,{value:typeof e=="string"?e:"",onChange:t})}}function Mr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||W[c].across===n),a=e&&e in W?W[e]:null;return k(R,{children:[r(m,{label:l("Photos in a row"),icon:r(Ft,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(m,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(W[c].label),picture:r("span",{className:"sf-gallery-pic",children:W[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{$o as ANCHOR_HINT,Qi as BOUND_TO_POST_NOTE,il as BUCKET_ICONS,Jl as CUSTOM_FIELD_MEDIA,Zl as CoordsField,Xl as EDGE_ARROWS,Ln as FOCAL_DEFAULT,Pr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,dt as FocalPicker,Qo as GroupLabel,Xo as HIGHLIGHT_HINT,B as HidableTextField,ge as LINK_FIELD_MARKER,$i as Label,be as MEDIA_FIELD_MARKER,Yl as MEDIA_TYPE_OPTIONS,Jo as PanelNoteLine,Sr as PhoneChoiceRow,xr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,pa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Ir as SIDE_PAD_KEYS,Yo as SectionHeading,ee as Segmented,Ko as SiteGapDefaultReset,G as Slider,tt as Swatches,ua as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,ea as TICKER_ITEMS_ROW,Dr as TextListField,Wo as WidthDefaultReset,Fr as aimAfterListChange,Bl as anchorFields,D as backTo,hl as backgroundField,Il as boxAlignField,Tl as boxBlockSpacingField,_l as boxJustifyField,wl as boxPhoneRowField,Rl as boxShareField,El as boxWrapField,dl as bucketHeader,pr as cardCornersField,er as cardImageBackgroundField,Hr as cardImageField,oa as cardMediaFields,Cl as cardShapeFields,ia as cardShowFields,ra as cardStyleFields,kl as cellWidthFields,Ml as checkbox,Kl as colorInput,nl as copyText,rt as cornerSidesField,ce as cornersRowField,Hl as dateTime,pl as designGroupHeader,Ol as directionField,la as displayFields,$l as edgePad,ll as entriesHiddenForTab,Ql as focusAfterRemove,Wl as focusKeptField,fl as foldMarker,Y as foldMetaOf,Zo as foldTitleOf,sa as galleryLayoutField,bl as gapField,y as group,Fl as heightFields,he as hidableText,zo as hintIsWhileTyping,O as iconOf,aa as imageCornersField,Zi as inOwnBox,cl as isBucketHeader,ul as isDesignGroupHeader,Ho as isNoGlyph,ol as linkField,jl as multiSelect,Bo as noGlyph,Gl as pageBackgroundField,al as panelNote,Ll as phoneChoiceField,br as phoneOverrideField,Ul as placementField,Vo as plainText,rl as plainTextarea,nt as pxField,ml as quietMarker,me as readHidable,Nr as rowText,zl as searchSelect,sl as section,Sl as sectionAnimationFields,at as sectionBorderField,rr as sectionCornersField,xl as sectionShapeFields,gl as sectionThemeFields,ue as segmented,P as select,vr as setRowText,Nl as sidesPaddingFields,Er as sidesPaddingPatch,Pl as sizeField,M as slider,Vl as sourceField,Al as spacingFields,Dl as stickFields,yl as templateField,el as text,mt as textFieldIdentifier,Vi as textFieldOffPage,qi as textFieldPanelOnly,ta as textList,na as textListRowField,tl as textarea,A as toggle,ql as upload,Go as usePageWidthDetail,Mo as useSiteGapDetail,vl as widthField,Ji as withIdentifier,zi as withOffPage,Yi as withPanelOnly,ji as withScaffold};
1
+ "use client";import{jsx as r,jsxs as k,Fragment as T}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as K,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as me,hidableText as he}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as mt}from"efficient-easel/draw";import ht from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as A}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as W,GALLERY_LAYOUT_KEYS as ye}from"../content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Tt,placementPoints as Ce}from"../hero-group-placement.js";import Rt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as wt,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Nt,BorderAllIcon as Lt,BlockSectionIcon as At,CartIcon as vt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Te,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ae}from"../content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as m,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as mn,SettingsSidesEach as Fe,sidesStartEach as hn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Tn,withPhonePart as Rn}from"../content/part-display.js";import{AlignmentGrid as On,Checkbox as wn,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Nn,PictureTiles as Be,Slider as Ln,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as An,NoControlMark as re,noControlField as q}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as vn}from"./own-box.js";import{PHONE_CLEAR as Fn,phoneKey as v,resolvePhoneValue as ie}from"./phone-override.js";import{SuppressibleText as Dn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Bn,CARD_OUTLINE_OPTIONS as Hn,DEFAULT_CARD_INDEX_FORMAT as Gn,DEFAULT_CARD_OUTLINE as Mn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Kn,DEFAULT_COVER_INDEX as Wn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Un}from"efficient-easel/draw";import Xn from"../../components/MediaUploadField.js";import $n from"../../components/MultiSelectField.js";import jn from"../../components/SectionThemePicker.js";import zn from"../../components/SearchSelectField.js";import Vn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as Yn,resolveSectionMinHeight as qn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Jn,resolveSectionStick as Zn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as Qn,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as eo}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as to,containerDirectionPoints as no,resolveContainerDirection as We}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as oo,BOX_BLOCK_SPACING_LABEL as ro,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as io,BOX_PHONE_ROW_MAX as lo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as ao,BOX_WRAP_POINTS as ze}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as so}from"../content/borders.js";import{DEFAULT_SURFACES as co,normalizeTheme as uo}from"../theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as po,GAP_FIELD_CONTAINER as fo,hasOwnContainerGap as mo,resolveContainerGap as ho}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as go,CARD_IMAGE_BG_OFF as bo,CARD_IMAGE_BG_SWATCH_NAMES as xo,CARD_IMAGE_BG_SWATCHES as So,isCardImageBackgroundInheriting as yo,cardImageBackgroundChoice as Co,THEME_CARD_IMAGE_BG as _o}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Io,SECTION_BG_SWATCHES as Eo,SECTION_BG_SWATCH_NAMES as To,THEME_SECTION_BG as Ro,isSectionBackgroundInheriting as Oo}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as wo}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Po,TYPE_SIZE_INHERIT as ko,isTypeSizeInheriting as No}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Lo,WIDTH_CHOICE_LABEL as Ao,WIDTH_INHERIT as vo,resolveWidth as Fo,sectionRunsFullWidth as Ve}from"../content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Do}from"efficient-easel/style-clipboard";function F(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Do(n,`section:${t}`);return e}function ji({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Bo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Ho(e){return e.type===qe}function w(e){return Ho(e)?void 0:e}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Go(){const{appState:e}=K(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Fo(t,"full");return n==="page"?D(`${o}px`,l("the page")):n==="contained"?D(l("Contained"),l("the page")):D(l("Full"),l("the page"))}function Mo(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):D(`${e}px`,l("Site styles"))}function Ko({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),onReset:t})}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Go(),onReset:t})}function B({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=me(e),f=ne(null),p=ne(null),h=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ft(),_=i?Vo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Rt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(m,{label:l(n),icon:r(tn,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:h}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>h(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>h(O.target.value)})]})})}function zi(e,t){return{...e,[xe]:t}}function Vi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Yi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function qi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function Ji(e){return!!e&&typeof e=="object"&&e[Je]===!0}function Zi(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as fa,SCALAR_TEXT_CONTROLS as ma}from"efficient-easel/draw";function Qi(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[An]:o,...i}=e;return{...i,[vn]:!0,render:t}}const Uo=new Set(Un),H=(e,t)=>{const n={...t,[I]:e};if(!Uo.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Dn,{name:i.name,children:o(i)})}},el="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Xo={field:"source.slug",set:!0},tl={not:Xo},$o="Select a word, then press the highlighter.",jo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",zo=new Set([$o]),Vo=e=>zo.has(e);function nl(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ol(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Yo(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function rl(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function il(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Vn,{value:he(t),onChange:n,label:e})}}function ll(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const al={Design:Ot,Animation:_e};function sl(e,t){return e.includes("Design")?t!=="Design":null}function qo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function Jo({level:e,label:t}){return e===1?r(qo,{label:t}):r(er,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Jo,{level:t,label:e})}}function y(e){return Ze(e,2)}function cl(e){return{type:"custom",render:()=>r(Zo,{text:e})}}function Zo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function dl(e){return Ze(e,1)}function ul(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function pl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function fl(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function ml(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function Qo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function hl(e,t){return Qo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function gl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function er({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function bl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Oo(n,t);return r(m,{label:l(e),icon:r(Nt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Io)}),children:tt({swatches:Eo,current:i?Ro:n??t??"",onPick:o,names:To})})}}}function tr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=yo(i,t);return r(m,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(go)}),children:tt({swatches:So,current:a?_o:Co(i,t),onPick:o,names:xo})})}}}function xl(e=n=>n,t){return F({_gSectionTheme:y(wo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(jn,{value:e(n),onChange:o,followLabel:t})}})}function G({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Ln,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function M(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(m,{label:l(e),icon:w(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:G({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const h=typeof f=="number"?f:null,b=h===null;return r(m,{label:l(e),icon:u?w(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:h,label:e,onChange:p}):G({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function Sl(e){const t=M("Gap",r(Ee,{}),se.min,se.max,se.step,po[e],"px",(n,o)=>r(Ko,{inherited:!mo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[fo]:e,render:n=>t.render({...n,value:ho(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function ce(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(m,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(nr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function nr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ae(a)??[...Le];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ae(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:A,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return q({type:"custom",render:()=>r(re,{})},"always")}function or({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(i,l("Site styles")),onReset:n})}function rr(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:A}function ir(){return ce({sidesKey:"sectionCornerSides",useFollowed:rr,useClosedReason:()=>lt()?l(it):null,mark:r(or,{label:Z}),hint:r(lr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(N())}function lr(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function yl(){return F({_gShape:y("Shape"),sectionCorners:ir(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const ar=()=>({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 sr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function cr(){let e;try{const t=uo(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||co.line}function dr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=cr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=ar();return r(m,{label:l("Border"),icon:r(Lt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(sr(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:so})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(dr,{value:t,onChange:n,tier:e})})}function Cl(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=K(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?ve(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=X(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=K(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?ve(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return an(a)?a:o}function ur({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(A),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:D(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function pr(){return r(T,{children:de()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function fr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(A),mark:r(ur,{label:Z}),hint:r(pr,{})})}function mr(){return{type:"custom",render:()=>r(ht,{})}}function _l(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Il(){return{_gShape:y("Shape"),cardCorners:fr(),cardCornerSides:rt(),cardCornersApplyAll:mr()}}function El(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function Tl(){return P("Item alignment",r(wt,{}),oo,"stretch")}function Rl(){return P(ao,r(on,{}),ze,ze[0].value)}function Ol(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(m,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:ae.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:hr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function hr(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 wl(){return P(ro,r(Ee,{}),Ue,Ue[0].value)}function Pl(){return M(io,r(Yt,{}),$e,lo,1,$e)}function kl(e){const t=ue(to,Bo("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),no(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Nl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(Ne,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!No(c),detail:l("the Text style in Site styles"),onReset:()=>s(ko),defaultAction:{onPress:()=>s(Po),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:G({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ll(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null;try{e=K(t=>t).selectedItem}catch{e=null}return e?.props??{}}function gr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=N()[c],u=ie(void 0,d,s);return r(T,{children:G({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function br({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=N()[t],c=ie(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function xr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(br,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(gr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Al(e){return{type:"custom",render:({value:t,onChange:n})=>r(yr,{...e,value:t,onChange:n})}}function Sr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(m,{label:l(e),icon:w(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function yr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=N()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Sr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Cr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_r={Top:Pe,Bottom:Re,Left:Oe,Right:we},Ir=e=>{const t=_r[e];return r(t,{})};function vl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Cr[_],a=_=>M(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,te=E)=>g("mobile",xr({label:i(_),icon:Ir(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,R=_=>C?g("desktop",_):_;return F({...o?{_gSpacing:y("Padding")}:{},[t]:R(a(s)),...C?{[v(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(M(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[v(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(M(i("Left"),r(Oe,{}),p.min,p.max,p.step,h,"px")),...C?{[v(u)]:c("Left",u,b,p)}:{},[f]:R(M(i("Right"),r(we,{}),p.min,p.max,p.step,h,"px")),...C?{[v(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Er={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Tr(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Rr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>hn(a,c));return r(m,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(mn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Tr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Fl(e={}){const t={...Er,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,v(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Rr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return F({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Or={contained:"Contained",page:"Page",full:"Full"},Q="Width";function Dl(e,t=Lo,n=!0){const o=t.map(i=>({label:Ao[i]??Or[i],value:i}));return F({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(Q),icon:r(nn,{}),action:n?r(Wo,{inherited:a?.inherited??!1,onReset:()=>i(vo),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Bl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:U,icon:w(r($t,{})),action:o?o(a):void 0,children:ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:U})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?eo:Qn;return r("div",{className:"sf-field",children:G({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>ue("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return F({_gHeight:y(U),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(wr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function wr({onClear:e}){const t=N(),n=Yn(t),o=qn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function Hl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Pr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:G({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(le),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Pr({value:e,onChange:t,labelId:n,phone:o}){const i=N(),a=Zn(i),c=o?a.phone:e===!0;return r(m,{label:l(le),labelId:n,icon:w(r(Zt,{})),action:k(T,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Jn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Gl(){return{_gAnchor:y("Anchor"),anchor:Yo("Anchor name","e.g. about",jo)}}function Ml(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function L(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(m,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Kl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function Wl(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(wn,{id:c,checked:a,onChange:o})})}}}function Ul(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:l(e),action:Ge({value:n||t,onChange:o,label:e})})}}const kr=[{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 dt({label:e,value:t,onChange:n,points:o=kr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function Xl(){return q({type:"custom",render:()=>r(re,{})},"always")}const Nr=Ce([]);function $l(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Lr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:Nr})}}}function Lr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=K(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Tt(t),onChange:n,points:o})})}const jl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function zl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const h=t.some(b=>b.value===f)?f:n;return r(m,{label:l(e),icon:i,value:c(h)?.label?l(c(h).label):"",children:dt({label:e,value:h,onChange:p,points:u})})}}}const Ar="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:w(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Ar,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Vl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r($n,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function Yl(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(zn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ql(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ee({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const Jl=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(m,{label:l(e),icon:w(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function Zl(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(Xn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const Ql={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ea({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(m,{label:l(n),icon:r(oe,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:l("Latitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(m,{label:l("Longitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function vr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Fr(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function ta(e,t){return e===null?null:t>e?e:null}function Dr(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 na={label:"Ticker items",icon:r(zt,{})};function oa(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Br,{label:e,icon:w(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Br({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ne(null),[s,d]=z(null),u=p=>p.map(h=>({text:h?.text??""})),f=p=>{const h=Dr(n,p,s);h===null&&(c.current=null),d(h),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:vr(n,s),onChange:p=>i(Fr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&s===h?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:h+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(h)}})})}function ra(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function ia(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Kn,String(Wn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:tr("Image background",bo),cardImage:Gr(),spinOnHover:L("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function la(){return{outline:P("Card outline",r(en,{}),Hn,Mn),indexBadge:P("Card number",r(Te,{}),Bn,Gn),showBadge:L("Product badge",!0,r(Ne,{noun:"tag"}))}}function aa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:L("Price",!0,r(Kt,{})),showCardFinishes:L("Finish swatches",!0,r(Wt,{})),showCardSizes:L("Sizes",n.showCardSizes,r(Jt,{})),showCardBuy:L("Buy button",n.showCardBuy,r(vt,{})),showCardPage:L("Page button",n.showCardPage,r(ke,{}))}}function sa(e,t="display"){const n=v(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Hr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(m,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Hr({parts:e,desktopKey:t,value:n,onChange:o}){const i=N()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Rn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Gr(){return nt("Card image",{min:A,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function ca(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>A,mark:r(Mr,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Mr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function da(){return{type:"custom",render:({value:e,onChange:t})=>r(Kr,{value:typeof e=="string"?e:"",onChange:t})}}function Kr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||W[c].across===n),a=e&&e in W?W[e]:null;return k(T,{children:[r(m,{label:l("Photos in a row"),icon:r(Ft,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(m,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(W[c].label),picture:r("span",{className:"sf-gallery-pic",children:W[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{jo as ANCHOR_HINT,Xo as BOUND_TO_POST,el as BOUND_TO_POST_NOTE,al as BUCKET_ICONS,Ql as CUSTOM_FIELD_MEDIA,ea as CoordsField,jl as EDGE_ARROWS,Nn as FOCAL_DEFAULT,kr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,dt as FocalPicker,er as GroupLabel,$o as HIGHLIGHT_HINT,B as HidableTextField,ge as LINK_FIELD_MARKER,ji as Label,be as MEDIA_FIELD_MARKER,Jl as MEDIA_TYPE_OPTIONS,tl as NOT_BOUND_TO_POST,Zo as PanelNoteLine,yr as PhoneChoiceRow,Sr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,ma as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Er as SIDE_PAD_KEYS,qo as SectionHeading,ee as Segmented,Ko as SiteGapDefaultReset,G as Slider,tt as Swatches,fa as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,na as TICKER_ITEMS_ROW,Br as TextListField,Wo as WidthDefaultReset,Dr as aimAfterListChange,Gl as anchorFields,D as backTo,bl as backgroundField,Tl as boxAlignField,wl as boxBlockSpacingField,El as boxJustifyField,Pl as boxPhoneRowField,Ol as boxShareField,Rl as boxWrapField,pl as bucketHeader,fr as cardCornersField,tr as cardImageBackgroundField,Gr as cardImageField,ia as cardMediaFields,Il as cardShapeFields,aa as cardShowFields,la as cardStyleFields,Ll as cellWidthFields,Wl as checkbox,Ul as colorInput,rl as copyText,rt as cornerSidesField,ce as cornersRowField,Ml as dateTime,ml as designGroupHeader,kl as directionField,sa as displayFields,zl as edgePad,sl as entriesHiddenForTab,ta as focusAfterRemove,Xl as focusKeptField,hl as foldMarker,Y as foldMetaOf,Qo as foldTitleOf,da as galleryLayoutField,Sl as gapField,y as group,Bl as heightFields,he as hidableText,Vo as hintIsWhileTyping,w as iconOf,ca as imageCornersField,Qi as inOwnBox,ul as isBucketHeader,fl as isDesignGroupHeader,Ho as isNoGlyph,il as linkField,Vl as multiSelect,Bo as noGlyph,Kl as pageBackgroundField,cl as panelNote,Al as phoneChoiceField,xr as phoneOverrideField,$l as placementField,Yo as plainText,ll as plainTextarea,nt as pxField,gl as quietMarker,me as readHidable,vr as rowText,Yl as searchSelect,dl as section,Cl as sectionAnimationFields,at as sectionBorderField,ir as sectionCornersField,yl as sectionShapeFields,xl as sectionThemeFields,ue as segmented,P as select,Fr as setRowText,Fl as sidesPaddingFields,Tr as sidesPaddingPatch,Nl as sizeField,M as slider,ql as sourceField,vl as spacingFields,Hl as stickFields,_l as templateField,nl as text,mt as textFieldIdentifier,Yi as textFieldOffPage,Ji as textFieldPanelOnly,oa as textList,ra as textListRowField,ol as textarea,L as toggle,Zl as upload,Go as usePageWidthDetail,Mo as useSiteGapDetail,Dl as widthField,Zi as withIdentifier,Vi as withOffPage,qi as withPanelOnly,zi as withScaffold};
@@ -1,5 +1,5 @@
1
1
  import type { BlockChoice } from "./block-choice.js";
2
- import { HEADER_TYPE, FOOTER_TYPE, type TreeItem } from "./content-tree.js";
2
+ import { HEADER_TYPE, FOOTER_TYPE, type TreeItem } from "efficient-easel/draw";
3
3
  export { HEADER_TYPE, FOOTER_TYPE };
4
4
  export declare function buildDefaultHeaderNode(): TreeItem;
5
5
  export { blockRuns, type BlockChoice, type BlockChoiceRun } from "./block-choice.js";
@@ -1 +1 @@
1
- import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as n}from"./content-tree.js";function c(){return{type:e,props:{id:n(e)}}}import{blockRuns as E}from"./block-choice.js";const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],p=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),a="FooterGroup",F="blocks";function d(o){return o===r?l:o===a?p:null}function s(){const o=(t,i)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...i}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterGroup",{direction:"vertical",align:"start",blocks:[o("FooterText",{text:"Join our email list",size:"md",tone:"default"}),o("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}export{F as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,a as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,p as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,d as blockChoicesFor,E as blockRuns,s as buildDefaultFooterBlocks,c as buildDefaultHeaderNode};
1
+ import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as n}from"efficient-easel/draw";function c(){return{type:e,props:{id:n(e)}}}import{blockRuns as E}from"./block-choice.js";const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],p=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),a="FooterGroup",F="blocks";function d(o){return o===r?l:o===a?p:null}function s(){const o=(t,i)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...i}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterGroup",{direction:"vertical",align:"start",blocks:[o("FooterText",{text:"Join our email list",size:"md",tone:"default"}),o("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}export{F as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,a as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,p as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,d as blockChoicesFor,E as blockRuns,s as buildDefaultFooterBlocks,c as buildDefaultHeaderNode};
@@ -0,0 +1,3 @@
1
+ import type { Config } from "efficient-easel/blocks";
2
+ export declare const GENERAL_REGISTRATION_ORDER: readonly ["Heading", "Text", "Eyebrow", "ImageBlock", "LogoBlock", "ButtonBlock", "Spacer", "Divider", "Grid", "Flex", "Breadcrumb", "Masthead", "CategoryBar", "FeaturedCover", "LongRead", "Series", "Banner", "ParagraphsA", "StatsParagraph", "Timeline", "Footprint", "TimelineTrack", "TitleWithButtons", "Stats", "Integrations", "Mockup", "Chart", "KeyFeatures", "Testimonials", "Prose", "Cards", "Logos", "Ticker", "Countdown", "ContactLocations", "HeroSingle", "Hero", "HeroSlide", "HeroGroup", "PostCard", "DocMetaCards", "DocTabs", "DocMasthead", "DocBody", "FAQ", "SpecStrip", "Manifesto", "SectionHeader", "IntroBleed", "Split", "ProcessSteps", "OrderSummary", "PaymentBadges", "CustomHTML"];
3
+ export declare function generalCategories(): Config["categories"];
@@ -0,0 +1 @@
1
+ import{blockSetOf as n,buildPuckCategories as s}from"./section-catalog.js";const c=["Heading","Text","Eyebrow","ImageBlock","LogoBlock","ButtonBlock","Spacer","Divider","Grid","Flex","Breadcrumb","Masthead","CategoryBar","FeaturedCover","LongRead","Series","Banner","ParagraphsA","StatsParagraph","Timeline","Footprint","TimelineTrack","TitleWithButtons","Stats","Integrations","Mockup","Chart","KeyFeatures","Testimonials","Prose","Cards","Logos","Ticker","Countdown","ContactLocations","HeroSingle","Hero","HeroSlide","HeroGroup","PostCard","DocMetaCards","DocTabs","DocMasthead","DocBody","FAQ","SpecStrip","Manifesto","SectionHeader","IntroBleed","Split","ProcessSteps","OrderSummary","PaymentBadges","CustomHTML"];function d(){const e={};for(const[o,t]of Object.entries(s())){const r=t.components.filter(a=>n(a)==="general");(r.length>0||o==="structure")&&(e[o]={...t,components:r})}return e}export{c as GENERAL_REGISTRATION_ORDER,d as generalCategories};
@@ -1,4 +1,4 @@
1
1
  import type { Config } from "efficient-easel/blocks";
2
- export declare const GENERAL_REGISTRATION_ORDER: readonly ["Heading", "Text", "Eyebrow", "ImageBlock", "LogoBlock", "ButtonBlock", "Spacer", "Divider", "Grid", "Flex", "Breadcrumb", "Masthead", "CategoryBar", "FeaturedCover", "LongRead", "Series", "Banner", "ParagraphsA", "StatsParagraph", "Timeline", "Footprint", "TimelineTrack", "TitleWithButtons", "Stats", "Integrations", "Mockup", "Chart", "KeyFeatures", "Testimonials", "Prose", "Cards", "Logos", "Ticker", "Countdown", "ContactLocations", "HeroSingle", "Hero", "HeroSlide", "HeroGroup", "PostCard", "DocMetaCards", "DocTabs", "DocMasthead", "DocBody", "FAQ", "SpecStrip", "Manifesto", "SectionHeader", "IntroBleed", "Split", "ProcessSteps", "OrderSummary", "PaymentBadges", "CustomHTML"];
2
+ export { GENERAL_REGISTRATION_ORDER } from "./general-order.js";
3
3
  export declare const generalRegistry: Config;
4
4
  export default generalRegistry;
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{assembleGeneralBlocks as l}from"./blocks/general/index.js";import{EditorThemedBody as u,PublishedPageFrame as m,suppressPreviewNav as g}from"./page-root.js";import{GENERAL_ROOT_FIELDS as f}from"./page-root-fields.js";import{finishRegistry as h}from"./registry.js";import{blockSetOf as B,buildPuckCategories as S}from"./section-catalog.js";const k=["Heading","Text","Eyebrow","ImageBlock","LogoBlock","ButtonBlock","Spacer","Divider","Grid","Flex","Breadcrumb","Masthead","CategoryBar","FeaturedCover","LongRead","Series","Banner","ParagraphsA","StatsParagraph","Timeline","Footprint","TimelineTrack","TitleWithButtons","Stats","Integrations","Mockup","Chart","KeyFeatures","Testimonials","Prose","Cards","Logos","Ticker","Countdown","ContactLocations","HeroSingle","Hero","HeroSlide","HeroGroup","PostCard","DocMetaCards","DocTabs","DocMasthead","DocBody","FAQ","SpecStrip","Manifesto","SectionHeader","IntroBleed","Split","ProcessSteps","OrderSummary","PaymentBadges","CustomHTML"];function T(e){const r=Object.fromEntries(Object.entries(e.fields??{}).map(([t,o])=>[t,o&&typeof o=="object"&&o.type==="slot"?{...o}:o]));return{...e,...e.fields?{fields:r}:null}}function y(){const e={};for(const[r,t]of Object.entries(S())){const o=t.components.filter(s=>B(s)==="general");(o.length>0||r==="structure")&&(e[r]={...t,components:o})}return e}const E=l(),c={root:{fields:{...f},render:e=>{const{children:r,puck:t,widthMode:o,fullWidth:s,pageWidth:i,pageBackground:n,theme:d,fonts:p}=e;return t?.isEditing?a(u,{propsTheme:d,propsFonts:p,widthMode:o,fullWidth:s,pageWidth:i,pageBackground:typeof n=="string"?n:void 0,suppressPreviewNav:g,children:r}):a(m,{pageBackground:n,w:{widthMode:o,fullWidth:s,pageWidth:i},children:r})}},categories:y(),components:Object.fromEntries(k.map(e=>[e,T(E[e])]))};h(c);var F=c;export{k as GENERAL_REGISTRATION_ORDER,F as default,c as generalRegistry};
1
+ import{jsx as f}from"react/jsx-runtime";import{assembleGeneralBlocks as a}from"./blocks/general/index.js";import{drawPublishedRoot as c}from"./page-frame.js";import{EditorThemedBody as l,suppressPreviewNav as u}from"./page-root.js";import{GENERAL_ROOT_FIELDS as E}from"./page-root-fields.js";import{finishRegistry as R}from"./registry.js";import{GENERAL_REGISTRATION_ORDER as g,generalCategories as h}from"./general-order.js";import{GENERAL_REGISTRATION_ORDER as I}from"./general-order.js";function O(e){const t=Object.fromEntries(Object.entries(e.fields??{}).map(([o,r])=>[o,r&&typeof r=="object"&&r.type==="slot"?{...r}:r]));return{...e,...e.fields?{fields:t}:null}}const N=a(),i={root:{fields:{...E},render:e=>{const{children:t,puck:o,widthMode:r,fullWidth:n,pageWidth:p,pageBackground:s,theme:m,fonts:d}=e;return o?.isEditing?f(l,{propsTheme:m,propsFonts:d,widthMode:r,fullWidth:n,pageWidth:p,pageBackground:typeof s=="string"?s:void 0,suppressPreviewNav:u,children:t}):c(e)}},categories:h(),components:Object.fromEntries(g.map(e=>[e,O(N[e])]))};R(i);var y=i;export{I as GENERAL_REGISTRATION_ORDER,y as default,i as generalRegistry};
@@ -1 +1 @@
1
- import{HEADER_TYPE as o,FOOTER_TYPE as a}from"./content-tree.js";const E=new Set(["Hero","HeroSingle","IntroBleed"]),n={min:56,max:140,default:88},A={min:0,max:120,step:2,default:32},H=`var(--sf-header-h, ${n.default}px)`,s="--sf-header-set-h",d="--sf-header-h",l=`var(${s}, ${n.default}px)`,T="sf-header-clearance",R="sf-sticky-underheader";function c(e){return e?.find(t=>t?.type&&t.type!==o)??null}function p(e){const t=c(e)?.type;return!t||!E.has(t)}function D(e){return!p(e)}function P(e){return!!e?.some(t=>t?.type===o)}function h(e){return!e||e.length===0?!1:!e.some(t=>t?.type===o||t?.type===a)}const u=["auto","shared","own"],_="auto",S="topSpace",C="data-top-space";function f(e){return u.includes(e)?e:_}function x(e,t){const r=f(e?.props?.[S]);return r==="own"?!0:r==="shared"?!1:p(t)}function m(e,t){return x(e,t)?"own":null}export{_ as DEFAULT_TOP_SPACE,E as FULLBLEED_LEAD_SECTIONS,T as HEADER_CLEARANCE_CLASS,d as HEADER_DRAWN_HEIGHT_VAR,H as HEADER_HEIGHT_CSS,n as HEADER_HEIGHT_PX,A as HEADER_MENU_GAP_PX,l as HEADER_SET_HEIGHT_CSS,s as HEADER_SET_HEIGHT_VAR,R as STICKY_UNDERHEADER_CLASS,C as TOP_SPACE_ATTR,u as TOP_SPACE_MODES,S as TOP_SPACE_PROP,h as isStandaloneSectionDocument,c as leadSection,p as pageClearsHeader,P as pageHasHeaderSection,D as pageLeadsWithFullBleed,x as pageTakesTopSpace,f as resolveTopSpace,m as topSpaceMarker};
1
+ import{HEADER_TYPE as o,FOOTER_TYPE as a}from"efficient-easel/draw";const E=new Set(["Hero","HeroSingle","IntroBleed"]),n={min:56,max:140,default:88},A={min:0,max:120,step:2,default:32},H=`var(--sf-header-h, ${n.default}px)`,s="--sf-header-set-h",d="--sf-header-h",l=`var(${s}, ${n.default}px)`,T="sf-header-clearance",R="sf-sticky-underheader";function c(e){return e?.find(t=>t?.type&&t.type!==o)??null}function p(e){const t=c(e)?.type;return!t||!E.has(t)}function D(e){return!p(e)}function P(e){return!!e?.some(t=>t?.type===o)}function h(e){return!e||e.length===0?!1:!e.some(t=>t?.type===o||t?.type===a)}const u=["auto","shared","own"],_="auto",S="topSpace",C="data-top-space";function f(e){return u.includes(e)?e:_}function x(e,t){const r=f(e?.props?.[S]);return r==="own"?!0:r==="shared"?!1:p(t)}function m(e,t){return x(e,t)?"own":null}export{_ as DEFAULT_TOP_SPACE,E as FULLBLEED_LEAD_SECTIONS,T as HEADER_CLEARANCE_CLASS,d as HEADER_DRAWN_HEIGHT_VAR,H as HEADER_HEIGHT_CSS,n as HEADER_HEIGHT_PX,A as HEADER_MENU_GAP_PX,l as HEADER_SET_HEIGHT_CSS,s as HEADER_SET_HEIGHT_VAR,R as STICKY_UNDERHEADER_CLASS,C as TOP_SPACE_ATTR,u as TOP_SPACE_MODES,S as TOP_SPACE_PROP,h as isStandaloneSectionDocument,c as leadSection,p as pageClearsHeader,P as pageHasHeaderSection,D as pageLeadsWithFullBleed,x as pageTakesTopSpace,f as resolveTopSpace,m as topSpaceMarker};
@@ -1,4 +1,4 @@
1
- import { type SlotConfigView } from "./content-tree.js";
1
+ import { type SlotConfigView } from "efficient-easel/draw";
2
2
  export interface HeadingItem {
3
3
  level: number;
4
4
  text: string;
@@ -1 +1 @@
1
- import{slotFieldsOf as u}from"./content-tree.js";import{readHidable as l}from"./hidable.js";function d(s){return s.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function p(s){const n=[],e=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1>/gi;let a;for(;a=e.exec(s);)n.push({level:Number(a[1]),text:d(a[2])||"(empty)"});return n}const m=new Set(["SubmitBuild"]),h={AlloyWheelsListing:1,DocMasthead:1,AppointmentBooking:2,BookingBox:2,SubmitBox:2,Banner:2,BundleOffer:2,Cards:2,Chart:2,CheckoutCTA:2,CollectionCard:3,Collections:2,CompatibleTyres:2,ContactLocations:2,ContactRouting:2,DeliveryOptions:2,DetailRows:2,DocBody:2,EuTyreLabel:2,Events:2,FAQ:2,FeaturedCover:2,FitmentFinder:2,FitmentTable:2,FooterEmailSignup:4,FooterMenu:4,Footprint:2,Form:2,Gallery:2,GalleryB:2,GalleryItem:2,Integrations:2,IntroBleed:2,KeyFeatures:2,Logos:2,LongRead:2,Manifesto:2,Mockup:2,OrderSummary:2,PostCard:2,ProcessSteps:2,ProductGrid:2,Prose:2,RelatedProducts:2,ReviewForm:2,Reviews:2,SectionHeader:2,Series:2,SpecTable:2,Split:2,StatsParagraph:2,SubmitBuild:2,Subscribe:2,SubscribeBlogs:2,Testimonials:2,Timeline:2,TimelineTrack:2,TitleWithButtons:2,TyreFitment:2,TyreSizes:2};function b(s,n){const e=[];for(const a of s??[]){const r=a,i=r.props??{};switch(r.type){case"Heading":{const{text:t,hidden:o}=l(i.text);if(o)break;e.push({level:Number(i.level)||2,text:t||"(empty heading)"})}break;case"Hero":e.push({level:1,text:"Hero (brand headline)"});break;case"CustomHTML":e.push(...p(l(i.html).text));break;default:{const t=h[r.type??""],o=l(i.title??i.heading),c=o.text.trim();if(!t||o.hidden)break;c?e.push({level:t,text:c}):m.has(r.type??"")&&e.push({level:t,text:String(r.type)});break}}for(const t of u(n,r.type??"")){const o=i[t];Array.isArray(o)&&e.push(...b(o,n))}}return e}export{h as SECTION_TOP_LEVEL_FOR_TEST,b as headingOutline};
1
+ import{slotFieldsOf as u}from"efficient-easel/draw";import{readHidable as l}from"efficient-easel/draw";function d(s){return s.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function p(s){const n=[],e=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1>/gi;let a;for(;a=e.exec(s);)n.push({level:Number(a[1]),text:d(a[2])||"(empty)"});return n}const m=new Set(["SubmitBuild"]),h={AlloyWheelsListing:1,DocMasthead:1,AppointmentBooking:2,BookingBox:2,SubmitBox:2,Banner:2,BundleOffer:2,Cards:2,Chart:2,CheckoutCTA:2,CollectionCard:3,Collections:2,CompatibleTyres:2,ContactLocations:2,ContactRouting:2,DeliveryOptions:2,DetailRows:2,DocBody:2,EuTyreLabel:2,Events:2,FAQ:2,FeaturedCover:2,FitmentFinder:2,FitmentTable:2,FooterEmailSignup:4,FooterMenu:4,Footprint:2,Form:2,Gallery:2,GalleryB:2,GalleryItem:2,Integrations:2,IntroBleed:2,KeyFeatures:2,Logos:2,LongRead:2,Manifesto:2,Mockup:2,OrderSummary:2,PostCard:2,ProcessSteps:2,ProductGrid:2,Prose:2,RelatedProducts:2,ReviewForm:2,Reviews:2,SectionHeader:2,Series:2,SpecTable:2,Split:2,StatsParagraph:2,SubmitBuild:2,Subscribe:2,SubscribeBlogs:2,Testimonials:2,Timeline:2,TimelineTrack:2,TitleWithButtons:2,TyreFitment:2,TyreSizes:2};function b(s,n){const e=[];for(const a of s??[]){const r=a,i=r.props??{};switch(r.type){case"Heading":{const{text:t,hidden:o}=l(i.text);if(o)break;e.push({level:Number(i.level)||2,text:t||"(empty heading)"})}break;case"Hero":e.push({level:1,text:"Hero (brand headline)"});break;case"CustomHTML":e.push(...p(l(i.html).text));break;default:{const t=h[r.type??""],o=l(i.title??i.heading),c=o.text.trim();if(!t||o.hidden)break;c?e.push({level:t,text:c}):m.has(r.type??"")&&e.push({level:t,text:String(r.type)});break}}for(const t of u(n,r.type??"")){const o=i[t];Array.isArray(o)&&e.push(...b(o,n))}}return e}export{h as SECTION_TOP_LEVEL_FOR_TEST,b as headingOutline};
@@ -1 +1 @@
1
- import{pinnedDuplicateIndices as h}from"./content-tree.js";import{SLOT_SECTION_SPECS as A}from"./slot-specs.js";const S=["GalleryB"];function x(n){const o=n.content;if(!Array.isArray(o))return n;let i=!1;const c=o.map(t=>{const e=t?.type;if(!e||!S.includes(e))return t;const r=A[e];if(!r?.legacy)return t;const s=t.props??{},l=s[r.slot];if(Array.isArray(l)&&l.length>0)return t;const a=r.legacy(s);if(!a.length)return t;i=!0;const y=String(s.id??e),f=a.map((g,m)=>({type:r.childType,props:{id:`${r.childType}-${y}-${m}`,...g}}));return{...t,props:{...s,[r.slot]:f}}}),p=new Set(h(c)),u=p.size?c.filter((t,e)=>!p.has(e)):c;return p.size&&(i=!0),i?{...n,content:u}:n}export{x as migrateLegacyPageData};
1
+ import{pinnedDuplicateIndices as h}from"efficient-easel/draw";import{SLOT_SECTION_SPECS as A}from"./slot-specs.js";const S=["GalleryB"];function x(n){const o=n.content;if(!Array.isArray(o))return n;let i=!1;const c=o.map(t=>{const e=t?.type;if(!e||!S.includes(e))return t;const r=A[e];if(!r?.legacy)return t;const s=t.props??{},l=s[r.slot];if(Array.isArray(l)&&l.length>0)return t;const a=r.legacy(s);if(!a.length)return t;i=!0;const y=String(s.id??e),f=a.map((g,m)=>({type:r.childType,props:{id:`${r.childType}-${y}-${m}`,...g}}));return{...t,props:{...s,[r.slot]:f}}}),p=new Set(h(c)),u=p.size?c.filter((t,e)=>!p.has(e)):c;return p.size&&(i=!0),i?{...n,content:u}:n}export{x as migrateLegacyPageData};
@@ -7,4 +7,4 @@ export declare const MOCKUP_VARIANTS: readonly MockupVariant[];
7
7
  export declare const MOCKUP_DEFAULT_VARIANT: MockupVariant;
8
8
  export declare const MOCKUP_VARIANT_FIELDS: Readonly<Record<string, readonly MockupVariant[]>>;
9
9
  export declare function mockupVariantOf(value: unknown): MockupVariant;
10
- export declare function cullMockupFields<T extends Record<string, unknown>>(fields: T, variant: unknown): T;
10
+ export declare function withMockupVariantRules<T extends Record<string, unknown>>(fields: T): T;
@@ -1 +1 @@
1
- const o=[{label:"Product record (spec tiles)",value:"spec-card"},{label:"Selector guide (pills + results)",value:"fitment"},{label:"Portal card (stock + button + orders)",value:"portal"},{label:"Kanban board (job columns)",value:"kanban"},{label:"Claims panel (rows + defect bars)",value:"claims"},{label:"Browser storefront (hero + tiles)",value:"browser"},{label:"Terminal (CLI session)",value:"terminal"}],s=o.map(a=>a.value),c="spec-card",i={badge:["spec-card","fitment","portal","kanban","claims","browser"],cardTitle:["spec-card","fitment","portal","kanban","claims"],cardSubtitle:["spec-card","fitment","portal","kanban","claims"],rows:["spec-card","fitment","portal","kanban","claims"],button:["spec-card","fitment","portal","kanban","claims"],footnote:["spec-card","fitment","portal","kanban","claims"],pills:["fitment"],tiles:["spec-card","portal","kanban","claims"],_gKanban:["kanban"],col1Title:["kanban"],col1Cards:["kanban"],col2Title:["kanban"],col2Cards:["kanban"],col3Title:["kanban"],col3Cards:["kanban"],col4Title:["kanban"],col4Cards:["kanban"],_gClaims:["claims"],barsHeading:["claims"],bars:["claims"],_gTerminal:["terminal"],termLines:["terminal"],_gBrowser:["browser"],urlText:["browser"],heroTitle:["browser"],heroButton:["browser"],products:["browser"]};function b(a){return s.includes(a)?a:c}function p(a,r){const l=b(r),e={...a};for(const[t,n]of Object.entries(i))n.includes(l)||delete e[t];return e}export{c as MOCKUP_DEFAULT_VARIANT,s as MOCKUP_VARIANTS,i as MOCKUP_VARIANT_FIELDS,o as MOCKUP_VARIANT_OPTIONS,p as cullMockupFields,b as mockupVariantOf};
1
+ import{shownForOption as n,withRowRules as o}from"./show-when-attach.js";const s=[{label:"Product record (spec tiles)",value:"spec-card"},{label:"Selector guide (pills + results)",value:"fitment"},{label:"Portal card (stock + button + orders)",value:"portal"},{label:"Kanban board (job columns)",value:"kanban"},{label:"Claims panel (rows + defect bars)",value:"claims"},{label:"Browser storefront (hero + tiles)",value:"browser"},{label:"Terminal (CLI session)",value:"terminal"}],e=s.map(a=>a.value),r="spec-card",c={badge:["spec-card","fitment","portal","kanban","claims","browser"],cardTitle:["spec-card","fitment","portal","kanban","claims"],cardSubtitle:["spec-card","fitment","portal","kanban","claims"],rows:["spec-card","fitment","portal","kanban","claims"],button:["spec-card","fitment","portal","kanban","claims"],footnote:["spec-card","fitment","portal","kanban","claims"],pills:["fitment"],tiles:["spec-card","portal","kanban","claims"],_gKanban:["kanban"],col1Title:["kanban"],col1Cards:["kanban"],col2Title:["kanban"],col2Cards:["kanban"],col3Title:["kanban"],col3Cards:["kanban"],col4Title:["kanban"],col4Cards:["kanban"],_gClaims:["claims"],barsHeading:["claims"],bars:["claims"],_gTerminal:["terminal"],termLines:["terminal"],_gBrowser:["browser"],urlText:["browser"],heroTitle:["browser"],heroButton:["browser"],products:["browser"]};function b(a){return e.includes(a)?a:r}function p(a){return o(a,Object.entries(c).map(([t,l])=>[[t],n("variant",e,r,l)]))}export{r as MOCKUP_DEFAULT_VARIANT,e as MOCKUP_VARIANTS,c as MOCKUP_VARIANT_FIELDS,s as MOCKUP_VARIANT_OPTIONS,b as mockupVariantOf,p as withMockupVariantRules};
@@ -1 +1 @@
1
- "use client";import{Fragment as f,jsx as m,jsxs as S}from"react/jsx-runtime";import{useMemo as h,useRef as y}from"react";import{EaselCanvas as C,useEaselApi as P}from"efficient-easel/easel";import T from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as w}from"../../components/PinnedChromeLoadNotice.js";import{usePreviewParts as v}from"../../components/PreviewPartsContext.js";import{partElement as A,partTypingTarget as F,setCanvasTypingPart as I}from"./canvas-typing.js";import{partThemeColors as x,readInks as D}from"./part-inks.js";import{partOpenOn as O,PART_ATTR as u}from"./text-parts.js";import{useSectionOps as j}from"./use-section-ops.js";import{useBlockMetadata as E}from"../editor-block-metadata.js";import{useEditorCanvasStyles as _}from"../editor-canvas-styles.js";function b({children:n,componentId:o}){const{selectedPartId:a}=v();return O(a,o)?m(f,{}):m(f,{children:n})}function K(n){const{mirrorHostStyles:o}=_(),a=E(),l=y(null),s=B(l),{onDocument:p}=n,c=e=>{l.current=e,p?.(e)};return S(f,{children:[m(w,{}),m(C,{...n,onDocument:c,typing:s,metadata:n.metadata??a,height:"fill",mirrorStyles:o,frameWrapper:T,overlay:b})]})}function B(n){const o=P(),a=j(),l=v(),s=y({ops:a,parts:l});return s.current={ops:a,parts:l},h(()=>{const p={getItemById:e=>o.getState().getItemById(e),getSelectorForId:e=>o.getState().getSelectorForId(e),get components(){return o.getState().config.components},replace:(e,t,r)=>s.current.ops.replaceComponent(e,t,r)},c=(e,t)=>{const r=F(e,p);if(!r)return null;let i=t;const d=()=>(i=A(i,i?.ownerDocument??n.current,e),i),g=d();return g?{element:d,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?x(D(g)):void 0}}:null};return{at:e=>{const t=e.closest(`[${u}]`),r=t?.getAttribute(u);return t&&r?c(r,t):null},atSelection:()=>{const e=s.current.parts.selectedPartId;return e?c(e,null):null},onChange:e=>{if(!e.typing){I(null);return}const t=e.element.closest(`[${u}]`)?.getAttribute(u)??null;I(t),t&&s.current.parts.selectedPartId!==t&&s.current.parts.select(t)}}},[o,n])}export{K as SiteCanvas};
1
+ "use client";import{Fragment as f,jsx as m,jsxs as S}from"react/jsx-runtime";import{useMemo as h,useRef as y}from"react";import{EaselCanvas as C,useEaselApi as P}from"efficient-easel/easel";import T from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as w}from"../../components/PinnedChromeLoadNotice.js";import{usePreviewParts as v}from"efficient-easel/draw/client";import{partElement as A,partTypingTarget as F,setCanvasTypingPart as I}from"./canvas-typing.js";import{partThemeColors as x,readInks as D}from"./part-inks.js";import{partOpenOn as O,PART_ATTR as u}from"./text-parts.js";import{useSectionOps as j}from"./use-section-ops.js";import{useBlockMetadata as E}from"../editor-block-metadata.js";import{useEditorCanvasStyles as _}from"../editor-canvas-styles.js";function b({children:n,componentId:o}){const{selectedPartId:a}=v();return O(a,o)?m(f,{}):m(f,{children:n})}function K(n){const{mirrorHostStyles:o}=_(),a=E(),l=y(null),s=B(l),{onDocument:p}=n,c=e=>{l.current=e,p?.(e)};return S(f,{children:[m(w,{}),m(C,{...n,onDocument:c,typing:s,metadata:n.metadata??a,height:"fill",mirrorStyles:o,frameWrapper:T,overlay:b})]})}function B(n){const o=P(),a=j(),l=v(),s=y({ops:a,parts:l});return s.current={ops:a,parts:l},h(()=>{const p={getItemById:e=>o.getState().getItemById(e),getSelectorForId:e=>o.getState().getSelectorForId(e),get components(){return o.getState().config.components},replace:(e,t,r)=>s.current.ops.replaceComponent(e,t,r)},c=(e,t)=>{const r=F(e,p);if(!r)return null;let i=t;const d=()=>(i=A(i,i?.ownerDocument??n.current,e),i),g=d();return g?{element:d,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?x(D(g)):void 0}}:null};return{at:e=>{const t=e.closest(`[${u}]`),r=t?.getAttribute(u);return t&&r?c(r,t):null},atSelection:()=>{const e=s.current.parts.selectedPartId;return e?c(e,null):null},onChange:e=>{if(!e.typing){I(null);return}const t=e.element.closest(`[${u}]`)?.getAttribute(u)??null;I(t),t&&s.current.parts.selectedPartId!==t&&s.current.parts.select(t)}}},[o,n])}export{K as SiteCanvas};
@@ -0,0 +1,34 @@
1
+ import type { CSSProperties, ReactNode } from "react";
2
+ export declare function pageWidthTokens(w: {
3
+ widthMode?: unknown;
4
+ fullWidth?: unknown;
5
+ pageWidth?: unknown;
6
+ }): {
7
+ frameClass?: string;
8
+ style: CSSProperties;
9
+ };
10
+ export declare function PageWidthWrapper({ w, children, }: {
11
+ w: {
12
+ widthMode?: unknown;
13
+ fullWidth?: unknown;
14
+ pageWidth?: unknown;
15
+ };
16
+ children?: ReactNode;
17
+ }): import("react").JSX.Element;
18
+ export declare function PublishedPageFrame({ pageBackground, inheritBackground, w, children, }: {
19
+ pageBackground?: unknown;
20
+ inheritBackground?: boolean;
21
+ w: {
22
+ widthMode?: unknown;
23
+ fullWidth?: unknown;
24
+ pageWidth?: unknown;
25
+ };
26
+ children?: ReactNode;
27
+ }): import("react").JSX.Element;
28
+ export declare function drawPublishedRoot(rootProps: {
29
+ children?: ReactNode;
30
+ widthMode?: unknown;
31
+ fullWidth?: unknown;
32
+ pageWidth?: unknown;
33
+ pageBackground?: unknown;
34
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ import{jsx as n}from"react/jsx-runtime";import{pageBackgroundVars as d}from"../content/page-background.js";import{SITE_WIDTH_CAP as s}from"../content/page-width.js";function l(e){return{frameClass:void 0,style:{"--sf-page-width":s}}}function c({w:e,children:r}){const{frameClass:t,style:i}=l(e);return n("div",{className:t,style:i,children:r})}function p({pageBackground:e,inheritBackground:r=!1,w:t,children:i}){return n("div",{style:{...r?{}:d(e),background:"var(--bg)",minHeight:"100%",overflowX:"clip"},children:n(c,{w:t,children:i})})}function h(e){const{children:r,widthMode:t,fullWidth:i,pageWidth:o,pageBackground:a}=e;return n(p,{pageBackground:a,w:{widthMode:t,fullWidth:i,pageWidth:o},children:r})}export{c as PageWidthWrapper,p as PublishedPageFrame,h as drawPublishedRoot,l as pageWidthTokens};