efficient-web-builder 21.0.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/dist/components/AnimatedStat.js +1 -1
  3. package/dist/components/Banner.js +1 -1
  4. package/dist/components/Cards.js +1 -1
  5. package/dist/components/CategoryBar.js +1 -1
  6. package/dist/components/ChartSection.js +1 -1
  7. package/dist/components/Countdown.js +1 -1
  8. package/dist/components/DealerFinder.d.ts +12 -0
  9. package/dist/components/DealerFinder.js +1 -0
  10. package/dist/components/DocMasthead.js +1 -1
  11. package/dist/components/DocMetaCards.js +1 -1
  12. package/dist/components/DocTabs.js +1 -1
  13. package/dist/components/FeaturedCover.js +1 -1
  14. package/dist/components/Footprint.d.ts +8 -1
  15. package/dist/components/Footprint.js +5 -5
  16. package/dist/components/HeroPoster.d.ts +2 -1
  17. package/dist/components/HeroPoster.js +1 -1
  18. package/dist/components/HeroSingle.d.ts +3 -1
  19. package/dist/components/HeroSingle.js +4 -4
  20. package/dist/components/HeroSlide.d.ts +2 -1
  21. package/dist/components/HeroSlide.js +1 -1
  22. package/dist/components/ImageBlock.d.ts +2 -1
  23. package/dist/components/ImageBlock.js +1 -1
  24. package/dist/components/KeyFeatures.js +1 -1
  25. package/dist/components/LocationGroupHeader.js +1 -1
  26. package/dist/components/Logos.js +1 -1
  27. package/dist/components/LongRead.js +1 -1
  28. package/dist/components/Manifesto.js +1 -1
  29. package/dist/components/Masthead.js +1 -1
  30. package/dist/components/MediaUploadField.d.ts +3 -1
  31. package/dist/components/MediaUploadField.js +1 -1
  32. package/dist/components/MockupSection.js +1 -1
  33. package/dist/components/OrderSummary.js +1 -1
  34. package/dist/components/PagesPanel.js +1 -1
  35. package/dist/components/ParagraphsA.js +1 -1
  36. package/dist/components/PostCard.js +1 -1
  37. package/dist/components/ProcessSteps.js +1 -1
  38. package/dist/components/Prose.js +1 -1
  39. package/dist/components/SectionEyebrow.js +1 -1
  40. package/dist/components/SectionHeader.js +1 -1
  41. package/dist/components/Series.js +1 -1
  42. package/dist/components/SiteTextStylesField.js +1 -1
  43. package/dist/components/Split.js +1 -1
  44. package/dist/components/Stats.js +1 -1
  45. package/dist/components/StatsParagraph.js +1 -1
  46. package/dist/components/Testimonials.js +1 -1
  47. package/dist/components/Text.js +1 -1
  48. package/dist/components/ThemeField.js +1 -1
  49. package/dist/components/Timeline.js +1 -1
  50. package/dist/components/TimelineTrack.js +1 -1
  51. package/dist/components/WebsiteScreenParts.js +1 -1
  52. package/dist/components/storefront-editor.css +96 -271
  53. package/dist/components/useLocationsTree.js +1 -1
  54. package/dist/lib/content/phone-focus.d.ts +7 -0
  55. package/dist/lib/content/phone-focus.js +1 -0
  56. package/dist/lib/dealer-source.d.ts +34 -0
  57. package/dist/lib/dealer-source.js +1 -0
  58. package/dist/lib/editor-words-catalogue.d.ts +9 -5
  59. package/dist/lib/editor-words-catalogue.js +4 -4
  60. package/dist/lib/puck/MarkupToolbar.d.ts +1 -1
  61. package/dist/lib/puck/MarkupToolbar.js +1 -1
  62. package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -1
  63. package/dist/lib/puck/blocks/general/Footprint/render.js +2 -2
  64. package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
  65. package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -1
  66. package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -1
  67. package/dist/lib/puck/blocks/general/HeroSlide/render.js +1 -1
  68. package/dist/lib/puck/blocks/general/ImageBlock/fields.js +1 -1
  69. package/dist/lib/puck/blocks/general/ImageBlock/render.js +1 -1
  70. package/dist/lib/puck/controls.d.ts +5 -2
  71. package/dist/lib/puck/controls.js +1 -1
  72. package/dist/lib/puck/field-groups.js +1 -1
  73. package/dist/lib/sections/collection-card-text-regions.d.ts +9 -1
  74. package/dist/lib/sections/collection-card-text-regions.js +1 -1
  75. package/dist/lib/sections/text-regions.d.ts +1 -0
  76. package/dist/lib/sections/text-regions.js +1 -1
  77. package/dist/lib/site-text-styles.d.ts +1 -0
  78. package/dist/lib/site-text-styles.js +2 -2
  79. package/dist/lib/source-rules/heading-ceiling-sweep.js +3 -3
  80. package/dist/lib/source-rules/part-style-naming.js +2 -2
  81. package/dist/lib/source-rules/rule.d.ts +1 -0
  82. package/dist/lib/source-rules/rule.js +3 -1
  83. package/dist/lib/source-rules/size-token-paints.js +4 -4
  84. package/dist/lib/source-rules/style-face-matches-size.js +3 -3
  85. package/package.json +7 -5
  86. package/dist/components/ImageFocusRow.d.ts +0 -7
  87. package/dist/components/ImageFocusRow.js +0 -1
  88. package/dist/components/TemplateGlyph.d.ts +0 -6
  89. package/dist/components/TemplateGlyph.js +0 -1
  90. package/dist/components/TextStyleRow.d.ts +0 -13
  91. package/dist/components/TextStyleRow.js +0 -1
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{ImageIcon as _,ImagesIcon as c,MediaIcon as E,MediaLayoutSideBySideIcon as A,MediaLayoutStackedIcon as S,OpacityIcon as l,PlacementIcon as T,PlayIcon as b,UploadIcon as P}from"efficient-easel/icons";import{colorInput as d,edgePad as D,FOCAL_DEFAULT as n,focalPicker as p,group as i,MEDIA_TYPE_OPTIONS as F,phoneChoiceField as U,plainText as f,segmented as a,slider as m,upload as t}from"../../../controls.js";import{MEDIA_LAYOUT_DEFAULT as v,MEDIA_LAYOUT_LABELS as g,MEDIA_LAYOUTS as y,resolvePhoneLayout as h}from"../../../../hero-media-layout.js";import{deviceNote as C}from"../../../device-fields.js";import{DEFAULT_OVERLAY_COLOR as k,DEFAULT_OVERLAY_POSITION as V,OVERLAY_POSITION_OPTIONS as M}from"../../../../sections/hero-overlay.js";import{heightField as s,slotNoticeField as Y}from"../../shared-fields.js";import{forMediaType as I,heroMediaFields as B,VIDEO_FILE_LABEL as x,VIDEO_FILE_PROMPT as N}from"../../../hero-media-parts.js";import{VIDEO_PLAYBACK_DEFAULT as R,VIDEO_PLAYBACK_LABELS as K,VIDEO_PLAYBACKS as w,VIDEO_SOURCE_DEFAULT as r,VIDEO_SOURCE_LABELS as H,VIDEO_SOURCES as j}from"../../../../hero-video.js";const L=I("video","image"),O=I("image","image"),u={one:o(_,{}),side:o(A,{}),stacked:o(S,{})};import{HeroSingleSlots as G}from"./render.js";const ie={fields:B({_dDevice:C(),boxNotice:Y("HeroSingle"),boxes:G.boxes,_gStyle:i("Style"),overlay:m("Overlay",o(l,{}),0,100,5,100,"%"),overlayColor:d("Overlay color",k),overlayPosition:D("Overlay position",M,V,"A corner would need a diagonal ramp, which this overlay does not draw.",o(T,{})),_gLayout:i("Layout"),heightDesktop:s("desktop"),heightMobile:s("mobile"),_gMedia:i("Media"),mediaType:a("Type",o(E,{}),F,"image"),mediaLayout:a("Layout",o(c,{}),y.map(e=>({label:g[e],value:e,picture:u[e]})),v),mediaLayoutPhone:U({label:"Layout",icon:o(c,{}),options:y.map(e=>({label:g[e],value:e,picture:u[e]})),desktopKey:"mediaLayout",resolve:h}),mediaImage:t("Background image","image/*","Upload a background image"),imageFocal:p("Image focus",n),videoSource:a("Source",o(P,{}),j.map(e=>({label:H[e],value:e})),r),mediaVideo:t(x,"video/*",N),youtubeUrl:f("YouTube link","https://youtu.be/…"),videoPlayback:a("Playback",o(b,{}),w.map(e=>({label:K[e],value:e})),R),poster:t("Video poster","image/*","Upload a poster still"),_gTint:i("Image tint"),tintColor:d("Tint color","#000000"),tintOpacity:m("Tint opacity",o(l,{}),0,100,5,0,"%"),mediaImage2:t("Background image","image/*","Upload a background image"),imageFocal2:p("Image focus",n),tintColor2:d("Tint color","#000000"),tintOpacity2:m("Tint opacity",o(l,{}),0,100,5,0,"%")},{parts:{media:["mediaType","mediaLayout","mediaLayoutPhone","videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:["mediaImage","imageFocal","tintColor","tintOpacity"],image2:["mediaImage2","imageFocal2","tintColor2","tintOpacity2"]},onlyFor:{image:["mediaImage","imageFocal","_gTint","tintColor","tintOpacity","mediaImage2","imageFocal2","tintColor2","tintOpacity2"],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[L,{field:"videoSource",is:"upload",default:r}]},youtubeUrl:{all:[L,{field:"videoSource",is:"youtube",default:r}]},mediaLayout:{all:[O,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[O,{context:"device",is:"mobile"}]}},fallback:"image"})};export{ie as HeroSingleFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{ImageIcon as O,ImagesIcon as n,MediaIcon as _,MediaLayoutSideBySideIcon as E,MediaLayoutStackedIcon as P,OpacityIcon as m,PlacementIcon as S,PlayIcon as A,UploadIcon as F}from"efficient-easel/icons";import{colorInput as d,edgePad as T,focusKeptField as i,group as a,MEDIA_TYPE_OPTIONS as b,phoneChoiceField as h,plainText as f,segmented as t,slider as c,upload as l}from"../../../controls.js";import{MEDIA_LAYOUT_DEFAULT as D,MEDIA_LAYOUT_LABELS as g,MEDIA_LAYOUTS as p,resolvePhoneLayout as U}from"../../../../hero-media-layout.js";import{deviceNote as v}from"../../../device-fields.js";import{DEFAULT_OVERLAY_COLOR as C,DEFAULT_OVERLAY_POSITION as V,OVERLAY_POSITION_OPTIONS as k}from"../../../../sections/hero-overlay.js";import{heightField as y,slotNoticeField as M}from"../../shared-fields.js";import{forMediaType as s,heroMediaFields as Y,VIDEO_FILE_LABEL as B,VIDEO_FILE_PROMPT as x}from"../../../hero-media-parts.js";import{VIDEO_PLAYBACK_DEFAULT as N,VIDEO_PLAYBACK_LABELS as R,VIDEO_PLAYBACKS as K,VIDEO_SOURCE_DEFAULT as r,VIDEO_SOURCE_LABELS as w,VIDEO_SOURCES as H}from"../../../../hero-video.js";const u=s("video","image"),I=s("image","image"),L={one:o(O,{}),side:o(E,{}),stacked:o(P,{})};import{HeroSingleSlots as j}from"./render.js";const oe={fields:Y({_dDevice:v(),boxNotice:M("HeroSingle"),boxes:j.boxes,_gStyle:a("Style"),overlay:c("Overlay",o(m,{}),0,100,5,100,"%"),overlayColor:d("Overlay color",C),overlayPosition:T("Overlay position",k,V,"A corner would need a diagonal ramp, which this overlay does not draw.",o(S,{})),_gLayout:a("Layout"),heightDesktop:y("desktop"),heightMobile:y("mobile"),_gMedia:a("Media"),mediaType:t("Type",o(_,{}),b,"image"),mediaLayout:t("Layout",o(n,{}),p.map(e=>({label:g[e],value:e,picture:L[e]})),D),mediaLayoutPhone:h({label:"Layout",icon:o(n,{}),options:p.map(e=>({label:g[e],value:e,picture:L[e]})),desktopKey:"mediaLayout",resolve:U}),mediaImage:l("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),videoSource:t("Source",o(F,{}),H.map(e=>({label:w[e],value:e})),r),mediaVideo:l(B,"video/*",x),youtubeUrl:f("YouTube link","https://youtu.be/…"),videoPlayback:t("Playback",o(A,{}),K.map(e=>({label:R[e],value:e})),N),poster:l("Video poster","image/*","Upload a poster still"),_gTint:a("Image tint"),tintColor:d("Tint color","#000000"),tintOpacity:c("Tint opacity",o(m,{}),0,100,5,0,"%"),mediaImage2:l("Background image","image/*","Upload a background image",{focus:"imageFocal2"}),imageFocal2:i(),imageFocal2Phone:i(),tintColor2:d("Tint color","#000000"),tintOpacity2:c("Tint opacity",o(m,{}),0,100,5,0,"%")},{parts:{media:["mediaType","mediaLayout","mediaLayoutPhone","videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:["mediaImage","imageFocal","imageFocalPhone","tintColor","tintOpacity"],image2:["mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"]},onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","tintOpacity","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[u,{field:"videoSource",is:"upload",default:r}]},youtubeUrl:{all:[u,{field:"videoSource",is:"youtube",default:r}]},mediaLayout:{all:[I,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[I,{context:"device",is:"mobile"}]}},fallback:"image"})};export{oe as HeroSingleFields};
@@ -1 +1 @@
1
- import{jsx as S}from"react/jsx-runtime";import x from"../../../../../components/HeroSingle.js";import{FOCAL_DEFAULT as A}from"efficient-shell/format";import{DEFAULT_OVERLAY_COLOR as E,DEFAULT_OVERLAY_POSITION as _}from"../../../../sections/hero-overlay.js";const h={boxes:{type:"slot",allow:["HeroGroup"]}},R={label:"Hero",fields:h,defaultProps:{mediaType:"image",imageFocal:A,tintColor:"#000000",tintOpacity:0,overlay:100,overlayColor:E,overlayPosition:_},render:({mediaType:o,mediaImage:e,mediaVideo:i,poster:t,imageFocal:r,tintColor:n,tintOpacity:a,overlay:l,overlayColor:d,overlayPosition:s,heightDesktop:m,heightMobile:g,boxes:p,videoSource:u,youtubeUrl:y,videoPlayback:f,mediaLayout:c,mediaLayoutPhone:O,mediaImage2:L,imageFocal2:b,tintColor2:v,tintOpacity2:P,puck:C})=>S(x,{mediaType:o,videoSource:u,youtubeUrl:y,videoPlayback:f,mediaLayout:c,mediaLayoutPhone:O,mediaImage2:L||void 0,objectPosition2:b||void 0,tintColor2:v,tintOpacity2:P,mediaSrc:(o==="image"?e:i)||void 0,poster:t||void 0,objectPosition:o==="image"&&r||void 0,tintColor:n,tintOpacity:o==="image"?a:0,overlay:l,overlayColor:d,overlayPosition:s,heightDesktop:m,heightMobile:g,boxes:p,editing:C?.isEditing})};export{R as HeroSingleRender,h as HeroSingleSlots};
1
+ import{jsx as x}from"react/jsx-runtime";import A from"../../../../../components/HeroSingle.js";import{FOCAL_DEFAULT as E}from"efficient-shell/format";import{DEFAULT_OVERLAY_COLOR as _,DEFAULT_OVERLAY_POSITION as h}from"../../../../sections/hero-overlay.js";const H={boxes:{type:"slot",allow:["HeroGroup"]}},I={label:"Hero",fields:H,defaultProps:{mediaType:"image",imageFocal:E,tintColor:"#000000",tintOpacity:0,overlay:100,overlayColor:_,overlayPosition:h},render:({mediaType:o,mediaImage:t,mediaVideo:n,poster:r,imageFocal:d,tintColor:l,tintOpacity:a,overlay:s,overlayColor:f,overlayPosition:m,heightDesktop:u,heightMobile:g,boxes:p,videoSource:y,youtubeUrl:c,videoPlayback:b,mediaLayout:O,mediaLayoutPhone:P,mediaImage2:L,imageFocal2:v,imageFocalPhone:e,imageFocal2Phone:i,tintColor2:C,tintOpacity2:S,puck:j})=>x(A,{mediaType:o,videoSource:y,youtubeUrl:c,videoPlayback:b,mediaLayout:O,mediaLayoutPhone:P,mediaImage2:L||void 0,objectPosition2:v||void 0,objectPosition2Phone:typeof i=="string"?i:void 0,tintColor2:C,tintOpacity2:S,mediaSrc:(o==="image"?t:n)||void 0,poster:r||void 0,objectPosition:o==="image"&&d||void 0,objectPositionPhone:o==="image"&&typeof e=="string"?e:void 0,tintColor:l,tintOpacity:o==="image"?a:0,overlay:s,overlayColor:f,overlayPosition:m,heightDesktop:u,heightMobile:g,boxes:p,editing:j?.isEditing})};export{I as HeroSingleRender,H as HeroSingleSlots};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{MediaIcon as t,OpacityIcon as l,PlayIcon as d}from"efficient-easel/icons";import{colorInput as m,FOCAL_DEFAULT as p,focalPicker as n,group as o,MEDIA_TYPE_OPTIONS as s,plainText as g,segmented as c,slider as a,text as I,upload as i,withIdentifier as f,withPanelOnly as r}from"../../../controls.js";import{PH as _}from"../../placeholders.js";import{slotNoticeField as y}from"../../shared-fields.js";import{heroMediaFields as F,VIDEO_FILE_LABEL as T,VIDEO_FILE_PROMPT as u}from"../../../hero-media-parts.js";import{HeroSlideSlots as v}from"./render.js";const k={fields:F({_gContent:o("Content"),name:r(f(g("Slide name",_.slideName))),process:r(I("Reel label","Label")),groupNotice:y("HeroSlide"),groups:v.groups,_gMedia:o("Media"),mediaType:c("Type",e(t,{}),s,"video"),mediaVideo:i(T,"video/*",u),videoSpeed:a("Playback speed",e(d,{}),25,100,5,100,"%"),mediaImage:i("Background image","image/*","Upload a background image"),imageFocal:n("Image focus",p),poster:i("Video poster","image/*","Upload a poster still"),_gTint:o("Image tint"),tintColor:m("Tint color","#000000"),overlay:a("Overlay",e(l,{}),0,100,5,0,"%")},{onlyFor:{image:["mediaImage","imageFocal","_gTint","tintColor","overlay"],video:["mediaVideo","videoSpeed","poster"]},fallback:"video"})};export{k as HeroSlideFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{MediaIcon as r,OpacityIcon as d,PlayIcon as m}from"efficient-easel/icons";import{colorInput as p,focusKeptField as a,group as o,MEDIA_TYPE_OPTIONS as n,plainText as g,segmented as s,slider as l,text as c,upload as i,withIdentifier as I,withPanelOnly as t}from"../../../controls.js";import{PH as f}from"../../placeholders.js";import{slotNoticeField as F}from"../../shared-fields.js";import{heroMediaFields as _,VIDEO_FILE_LABEL as u,VIDEO_FILE_PROMPT as y}from"../../../hero-media-parts.js";import{HeroSlideSlots as P}from"./render.js";const h={fields:_({_gContent:o("Content"),name:t(I(g("Slide name",f.slideName))),process:t(c("Reel label","Label")),groupNotice:F("HeroSlide"),groups:P.groups,_gMedia:o("Media"),mediaType:s("Type",e(r,{}),n,"video"),mediaVideo:i(u,"video/*",y),videoSpeed:l("Playback speed",e(m,{}),25,100,5,100,"%"),mediaImage:i("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:a(),imageFocalPhone:a(),poster:i("Video poster","image/*","Upload a poster still"),_gTint:o("Image tint"),tintColor:p("Tint color","#000000"),overlay:l("Overlay",e(d,{}),0,100,5,0,"%")},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["mediaVideo","videoSpeed","poster"]},fallback:"video"})};export{h as HeroSlideFields};
@@ -1 +1 @@
1
- import{jsx as g}from"react/jsx-runtime";import S from"../../../../../components/HeroSlide.js";import{FOCAL_DEFAULT as H}from"efficient-shell/format";import{nestedAccentValue as h,sectionThemeWrap as y}from"../../../../content/section-surface.js";import{phHide as A}from"../../scaffold.js";const b={groups:{type:"slot",allow:["HeroGroup"]}},L={label:"Hero Slide",fields:b,defaultProps:{mediaType:"video",videoSpeed:100,imageFocal:H,tintColor:"#000000",overlay:0},render:({name:r,process:d,mediaType:e,mediaVideo:s,mediaImage:l,poster:m,mediaSrc:a,videoSpeed:o,imageFocal:c,tintColor:p,overlay:f,groups:u,puck:t,...i})=>{const n=y({...i,sectionAccent:h(i.sectionAccent)});return g(S,{themeClassName:n?.className,themeStyle:n?.style,name:r||void 0,process:A(d,"Label",t),mediaType:e,mediaSrc:(e==="image"?l:s||a)||void 0,videoSpeed:typeof o=="number"?o:void 0,poster:m||void 0,objectPosition:e==="image"&&c||void 0,tintColor:p,tintOpacity:e==="image"?f:0,groups:u,editing:t?.isEditing})}};export{L as HeroSlideRender,b as HeroSlideSlots};
1
+ import{jsx as S}from"react/jsx-runtime";import H from"../../../../../components/HeroSlide.js";import{FOCAL_DEFAULT as b}from"efficient-shell/format";import{nestedAccentValue as h,sectionThemeWrap as y}from"../../../../content/section-surface.js";import{phHide as A}from"../../scaffold.js";const j={groups:{type:"slot",allow:["HeroGroup"]}},E={label:"Hero Slide",fields:j,defaultProps:{mediaType:"video",videoSpeed:100,imageFocal:b,tintColor:"#000000",overlay:0},render:({name:d,process:s,mediaType:e,mediaVideo:l,mediaImage:m,poster:a,mediaSrc:c,videoSpeed:o,imageFocal:p,imageFocalPhone:t,tintColor:f,overlay:u,groups:g,puck:i,...n})=>{const r=y({...n,sectionAccent:h(n.sectionAccent)});return S(H,{themeClassName:r?.className,themeStyle:r?.style,name:d||void 0,process:A(s,"Label",i),mediaType:e,mediaSrc:(e==="image"?m:l||c)||void 0,videoSpeed:typeof o=="number"?o:void 0,poster:a||void 0,objectPosition:e==="image"&&p||void 0,objectPositionPhone:e==="image"&&typeof t=="string"?t:void 0,tintColor:f,tintOpacity:e==="image"?u:0,groups:g,editing:i?.isEditing})}};export{E as HeroSlideRender,j as HeroSlideSlots};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as i,imageFitOptions as s,imageIsCropped as p,parseImageFit as c}from"../../../../content/image-fit.js";import{ImageIcon as m}from"efficient-easel/icons";import{FOCAL_DEFAULT as g,focalPicker as n,group as e,imageCornersField as f,linkField as u,plainText as I,cornerSidesField as d,select as F,upload as v,withPanelOnly as _}from"../../../controls.js";import{photographyToggle as A}from"../../shared-fields.js";const L={fields:{_gImage:e("Image"),src:v("Image","image/*"),alt:_(I("Alt text")),aspect:{type:"select",label:"Aspect ratio",options:[{label:"Auto",value:"auto"},{label:"21 : 9",value:"21/9"},{label:"16 : 9",value:"16/9"},{label:"4 : 3",value:"4/3"},{label:"1 : 1",value:"1/1"}]},fit:F(i,t(m,{}),s(),"cover"),focal:n("Image focus",g,"src"),href:u("Link"),_gStyle:e("Style"),grayscale:A(),_gShape:e("Shape"),corners:f(),cornerSides:d()},resolveFields:(r,{fields:l})=>{const o=r.props??{};if(p(o.aspect,c(o.fit,"cover")))return l;const a={...l};return delete a.focal,a}};export{L as ImageBlockFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as t,imageFitOptions as i,imageIsCropped as r,parseImageFit as s}from"../../../../content/image-fit.js";import{ImageIcon as c}from"efficient-easel/icons";import{focusKeptField as a,group as e,imageCornersField as p,linkField as m,plainText as g,cornerSidesField as n,select as f,upload as u,withPanelOnly as d}from"../../../controls.js";import{photographyToggle as I}from"../../shared-fields.js";const y={fields:{_gImage:e("Image"),src:u("Image","image/*",void 0,{focus:"focal",focusWhen:l=>r(l.aspect,s(l.fit,"cover"))}),alt:d(g("Alt text")),aspect:{type:"select",label:"Aspect ratio",options:[{label:"Auto",value:"auto"},{label:"21 : 9",value:"21/9"},{label:"16 : 9",value:"16/9"},{label:"4 : 3",value:"4/3"},{label:"1 : 1",value:"1/1"}]},fit:f(t,o(c,{}),i(),"cover"),focal:a(),focalPhone:a(),href:m("Link"),_gStyle:e("Style"),grayscale:I(),_gShape:e("Shape"),corners:p(),cornerSides:n()}};export{y as ImageBlockFields};
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import m from"../../../../../components/ImageBlock.js";const x={label:"Image",defaultProps:{src:"",alt:"",aspect:"16/9",contained:!1},render:({src:e,alt:r,aspect:a,contained:o,grayscale:c,href:s,width:t,fit:l,focal:n,corners:d,cornerSides:f})=>i(m,{src:e,alt:r,aspect:a,contained:o,grayscale:c,href:s,width:t,fit:l,focal:n,corners:d,cornerSides:f})};export{x as ImageBlockRender};
1
+ import{jsx as m}from"react/jsx-runtime";import p from"../../../../../components/ImageBlock.js";const I={label:"Image",defaultProps:{src:"",alt:"",aspect:"16/9",contained:!1},render:({src:r,alt:a,aspect:o,contained:t,grayscale:s,href:c,width:n,fit:l,focal:d,focalPhone:e,corners:f,cornerSides:i})=>m(p,{src:r,alt:a,aspect:o,contained:t,grayscale:s,href:c,width:n,fit:l,focal:d,focalPhone:typeof e=="string"?e:void 0,corners:f,cornerSides:i})};export{I as ImageBlockRender};
@@ -284,7 +284,7 @@ export declare function FocalPicker({ label, value, onChange, points, }: {
284
284
  onChange: (next: string) => void;
285
285
  points?: readonly AlignmentPoint[];
286
286
  }): import("react").JSX.Element;
287
- export declare function focalPicker(label: string, fallback?: string, imageProp?: string): CustomField<string>;
287
+ export declare function focusKeptField(): CustomField<string>;
288
288
  export interface PlacementFieldOptions {
289
289
  stacking: boolean;
290
290
  fallback?: HeroGroupPlacement;
@@ -349,7 +349,10 @@ export declare function segmented<V>(label: string, icon: ReactElement, options:
349
349
  value: V;
350
350
  picture?: ReactElement;
351
351
  }[], fallback: V): CustomField<V>;
352
- export declare function upload(label: string, accept: string, placeholder?: string): CustomField<string>;
352
+ export declare function upload(label: string, accept: string, placeholder?: string, opts?: {
353
+ focus?: string;
354
+ focusWhen?: (props: Record<string, unknown>) => boolean;
355
+ }): CustomField<string>;
353
356
  export declare const CUSTOM_FIELD_MEDIA: Record<string, string[]>;
354
357
  export declare function CoordsField({ value, onChange, label, }: {
355
358
  value: GeocodeState | undefined;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as k,Fragment as R}from"react/jsx-runtime";import{cloneElement as ue,useId as mt,useRef as te,useState as z}from"react";import{useEasel as N,useSelectedFields as pe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as fe,hidableText as me}from"./hidable.js";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as he,MEDIA_FIELD_MARKER as ge,SCAFFOLD_FIELD_MARKER as be,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ht}from"./field-markers.js";import gt from"../../components/ApplyCornersToSiblings.js";import bt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as xt,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as v}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as St,IMAGE_CORNERS_LABEL as yt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as Ct}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as _t,GALLERY_LAYOUTS as W,GALLERY_LAYOUT_KEYS as Se}from"../content/gallery-layout.js";import{anchorSiblingsOf as It,HERO_GROUP_PLACEMENTS as Et,HERO_GROUP_PLACEMENT_DEFAULT as Rt,normalisePlacement as Tt,placementPoints as ye}from"../hero-group-placement.js";import wt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as Pt,EyeIcon as kt,AlignSeparateIcon as Lt,AnimationIcon as Ce,BackgroundIcon as At,BorderAllIcon as Nt,BlockSectionIcon as vt,CartIcon as Ft,ColumnWidthsIcon as _e,ColumnsIcon as Dt,CornerIcon as Bt,DirectionDownIcon as Ht,DirectionLeftIcon as Gt,DirectionRightIcon as Mt,DirectionUpIcon as Kt,DollarIcon as Wt,FinishIcon as Ut,GapIcon as Ie,GridIcon as Xt,GroundIcon as $t,HashIcon as Ee,HeightIcon as jt,ImageIcon as zt,ListIcon as Vt,LocationIcon as ne,PaddingAllIcon as Yt,PaddingBottomIcon as Re,PaddingLeftIcon as Te,PaddingRightIcon as we,PaddingTopIcon as Oe,PageIcon as Pe,PhoneIcon as qt,PlacementIcon as Jt,ProductSizeIcon as Zt,StickyIcon as Qt,RotateIcon as en,SquareIcon as tn,TypeIcon as nn,WidthIcon as on,WrapIcon as rn}from"efficient-easel/icons";import{FieldGlyph as ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as ln}from"../content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as an,hasOwnSectionCorners as sn,normalizeCornerSides as Ae}from"../content/section-corners.js";import{SECTION_MOTION_NONE as cn,SECTION_MOTION_OPTIONS as dn}from"../content/section-animation.js";import{enclosingSectionProps as Ne}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as m,SettingsGroupHead as un,SettingsGroupSub as pn,SettingsBorder as fn,SettingsSegmented as mn,SettingsSides as hn,SettingsSidesEach as ve,sidesStartEach as gn,SettingsSwitch as Fe,borderSides as bn,borderStartEach as xn}from"efficient-easel/panel";import{FieldSelect as Sn,ListField as yn}from"efficient-easel/fields";import{DisplayChips as Cn}from"efficient-shell/ui";import{desktopDisplayChanged as _n,partShownOnDesktop as In,partShownOnPhone as En,phoneDisplayChanged as Rn,withDesktopPart as Tn,withPhonePart as wn}from"../content/part-display.js";import{AlignmentGrid as On,Checkbox as Pn,CornersInput as kn,DateTimePicker as Ln,FOCAL_DEFAULT as De,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 Ke,noControlField as oe}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as vn}from"./own-box.js";import{PHONE_CLEAR as Fn,phoneKey as F,resolvePhoneValue as re}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/ImageFocusRow.js";import $n from"../../components/MediaUploadField.js";import jn from"../../components/MultiSelectField.js";import zn from"../../components/SectionThemePicker.js";import Vn from"../../components/SearchSelectField.js";import Yn from"../../components/StorefrontLinkField.js";import We from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as qn,resolveSectionMinHeight as Jn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as q,SECTION_STICK_LABEL as ie,hasPhoneStick as Zn,resolveSectionStick as Qn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as eo,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as to}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as no,containerDirectionPoints as oo,resolveContainerDirection as Ue}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as ro,BOX_BLOCK_SPACING_LABEL as io,BOX_BLOCK_SPACING_POINTS as Xe,BOX_JUSTIFY_POINTS as $e,BOX_PHONE_ROW_LABEL as lo,BOX_PHONE_ROW_MAX as ao,BOX_PHONE_ROW_MIN as je,BOX_SHARE_LABEL as ze,BOX_SHARE_POINTS as le,BOX_WRAP_LABEL as so,BOX_WRAP_POINTS as Ve}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as co}from"../content/borders.js";import{DEFAULT_SURFACES as uo,normalizeTheme as po}from"../theme.js";import{CONTAINER_GAP as ae,CONTAINER_GAP_BUILT_IN as fo,GAP_FIELD_CONTAINER as mo,hasOwnContainerGap as ho,resolveContainerGap as go}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as bo,CARD_IMAGE_BG_OFF as xo,CARD_IMAGE_BG_SWATCH_NAMES as So,CARD_IMAGE_BG_SWATCHES as yo,isCardImageBackgroundInheriting as Co,cardImageBackgroundChoice as _o,THEME_CARD_IMAGE_BG as Io}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Eo,SECTION_BG_SWATCHES as Ro,SECTION_BG_SWATCH_NAMES as To,THEME_SECTION_BG as wo,isSectionBackgroundInheriting as Oo}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Po}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as ko,TYPE_SIZE_INHERIT as Lo,isTypeSizeInheriting as Ao}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as No,WIDTH_CHOICE_LABEL as vo,WIDTH_INHERIT as Fo,resolveWidth as Do,sectionRunsFullWidth as Ye}from"../content/section-width.js";import{useFoldHeadingLevel as qe}from"./panel-heading-scope.js";import{withStyleKind as Bo}from"efficient-easel/style-clipboard";function D(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Bo(n,`section:${t}`);return e}function Vi({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function Je(){return null}function Ho(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Je,{},e)}function Go(e){return e.type===Je}function O(e){return Go(e)?void 0:e}function B(e,t){return l("{value} from {from}",{value:e,from:t})}function Mo(){const{appState:e}=N(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Do(t,"full");return n==="page"?B(`${o}px`,l("the page")):n==="contained"?B(l("Contained"),l("the page")):B(l("Full"),l("the page"))}function Ko(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):B(`${e}px`,l("Site styles"))}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ko(),onReset:t})}function Uo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=fe(e),f=te(null),p=te(null),h=w=>t(c?{text:w,hidden:u}:w),b=()=>t({text:d,hidden:!u}),C=c&&u,T=mt(),_=i?Vo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(wt,{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(nn,{}),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(We,{name:"eye-off",size:14}):r(We,{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 Yi(e,t){return{...e,[be]:t}}function qi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Ji(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Ze="sfPanelOnly";function Zi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Ze]:!0}}function Qi(e){return!!e&&typeof e=="object"&&e[Ze]===!0}function el(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 ma,SCALAR_TEXT_CONTROLS as ha}from"./text-control-kinds.js";function tl(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 Xo=new Set(Un),G=(e,t)=>{const n={...t,[I]:e};if(!Xo.has(e.control))return n;const o=t.render;return{...oe(n,"authored-copy"),render:i=>r(Dn,{name:i.name,children:o(i)})}},nl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",$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 ol(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function rl(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Yo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function il(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function ll(e){return{type:"custom",[he]:{label:e},render:({value:t,onChange:n})=>r(Yn,{value:me(t),onChange:n,label:e})}}function al(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const sl={Design:Ot,Animation:Ce};function cl(e,t){return e.includes("Design")?t!=="Design":null}function qo({label:e}){return r(un,{title:l(e),level:qe(1)})}function Jo({level:e,label:t}){return e===1?r(qo,{label:t}):r(er,{label:t})}function Qe(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Jo,{level:t,label:e})}}function y(e){return Qe(e,2)}function dl(e){return{type:"custom",render:()=>r(Zo,{text:e})}}function Zo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function ul(e){return Qe(e,1)}function pl(e){return Y(e)!==null&&e?.tabs!==void 0}const et=new Map;function fl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=et.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(R,{})};return et.set(n,o),o}function ml(e){return Y(e)!==null&&e?.designGroup!==void 0}const tt=new Map;function hl(e){const t=tt.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(R,{})};return tt.set(e,t),t}function Qo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function gl(e,t){return Qo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(R,{})}}function bl(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 er({label:e}){return r(pn,{title:l(e),level:qe(2)})}function nt({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 xl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Oo(n,t);return r(m,{label:l(e),icon:r(At,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Eo)}),children:nt({swatches:Ro,current:i?wo:n??t??"",onPick:o,names:To})})}}}function tr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Co(i,t);return r(m,{label:l(e),icon:r($t,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(bo)}),children:nt({swatches:yo,current:a?Io:_o(i,t),onPick:o,names:So})})}}}function Sl(e=n=>n,t){return D({_gSectionTheme:y(Po),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(zn,{value:e(n),onChange:o,followLabel:t})}})}function M({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 K(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:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function ot(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?ue(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}):M({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function yl(e){const t=K("Gap",r(Ie,{}),ae.min,ae.max,ae.step,fo[e],"px",(n,o)=>r(Wo,{inherited:!ho(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[mo]:e,render:n=>t.render({...n,value:go(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const J="Corners";function se(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(J),icon:r(Bt,{}),changed:i,action:ue(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(nr,{tier:e,px:o,onRadius:n})})}}}function rt(e){let t=null;try{t=pe()}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]=rt(e.sidesKey),s=Ae(a)??[...Le];return r(kn,{label:l(J),value:s,corners:an,onChange:d=>{const u=Ae(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:xe,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function it(){return oe({type:"custom",render:()=>r(Ke,{})},"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"):B(i,l("Site styles")),onReset:n})}function rr(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:v}function ir(){return se({sidesKey:"sectionCornerSides",useFollowed:rr,useClosedReason:()=>at()?l(lt):null,mark:r(or,{label:J}),hint:r(lr,{})})}const lt="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function at(){return Ye(L())}function lr(){return r(R,{children:at()?lt:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Cl(){return D({_gShape:y("Shape"),sectionCorners:ir(),sectionCornerSides:it(),sectionBorder:st("desktop"),sectionBorderPhone:st("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=po(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||uo.line}function dr({value:e,onChange:t,tier:n}){const[o]=rt("sectionBorder"),i=cr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>xn(a,c)),u=ar();return r(m,{label:l("Border"),icon:r(Nt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(fn,{label:l("Border"),value:a,each:s,onChange:f=>t(sr(f)),placeholder:{sides:bn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:co})})}function st(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(dr,{value:t,onChange:n,tier:e})})}function _l(){return{_gMotion:y("Motion"),sectionAnimation:de("Entrance",r(Ce,{}),[...dn],cn)}}function ce(){let e=null;try{const{appState:t,selectedItem:n}=N(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ne(t?.data,o):null}catch{e=null}return e!==null&&Ye(e)}function ct(e){const{cornerRadiusPx:t}=X(),n=ce(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=N(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Ne(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return sn(a)?a:o}function ur({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ce(),i=ct(v),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:B(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function pr(){return r(R,{children:ce()?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 se({sidesKey:"cardCornerSides",useFollowed:()=>ct(v),mark:r(ur,{label:J}),hint:r(pr,{})})}function mr(){return{type:"custom",render:()=>r(gt,{})}}function Il(e){return{...e,render:t=>r(bt,{render:e.render,props:t})}}function El(){return{_gShape:y("Shape"),cardCorners:fr(),cardCornerSides:it(),cardCornersApplyAll:mr()}}function Rl(){return P("Justify",r(Lt,{}),$e,$e[0].value)}function Tl(){return P("Item alignment",r(Pt,{}),ro,"stretch")}function wl(){return P(so,r(rn,{}),Ve,Ve[0].value)}function Ol(){return{type:"custom",render:({value:e,onChange:t})=>{const n=le.find(o=>o.value===e)??le[0];return r(m,{label:l(ze),icon:r(_e,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(ze),value:n.value,onChange:t,options:le.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 Pl(){return P(io,r(Ie,{}),Xe,Xe[0].value)}function kl(){return K(lo,r(qt,{}),je,ao,1,je)}function Ll(e){const t=de(no,Ho("`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)."),oo(e),Ue(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Ue(e,n.value),onChange:o=>n.onChange(o)})}}function Al(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(ke,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Ao(c),detail:l("the Text style in Site styles"),onReset:()=>s(Lo),defaultAction:{onPress:()=>s(ko),title:l("Keep this section's own built-in size"),icon:r(vt,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Nl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(_e,{}),[{label:"Auto",value:""},...Array.from({length:Ct},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null;try{e=N(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=L()[c],u=re(void 0,d,s);return r(R,{children:M({min:e,max:t,step:n,value:re(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=L()[t],c=re(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 ot(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 vl(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: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:Q({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=L()[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:Oe,Bottom:Re,Left:Te,Right:we},Ir=e=>{const t=_r[e];return r(t,{})};function Fl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Cr[_],a=_=>K(i("Top"),r(Oe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,w,ee=E)=>g("mobile",xr({label:i(_),icon:Ir(_),desktopKey:j,min:ee.min,max:ee.max,step:ee.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 D({...o?{_gSpacing:y("Padding")}:{},[t]:T(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:T(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:T(K(i("Left"),r(Te,{}),p.min,p.max,p.step,h,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:T(K(i("Right"),r(we,{}),p.min,p.max,p.step,h,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Er={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},dt=e=>typeof e=="number"?e:null;function Rr(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Tr({tier:e,o:t}){let n=null;try{n=pe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,dt(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?dt(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>gn(a,c));return r(m,{label:l("Padding"),icon:r(Yt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Rr(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 Dl(e={}){const t={...Er,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,F(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(Tr,{tier:s,o:n})};return o?g(s,d):d},a=()=>oe({type:"custom",render:()=>r(Ke,{})},"always"),c=$.filter(s=>s!=="top");return D({...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 wr={contained:"Contained",page:"Page",full:"Full"},Z="Width";function Bl(e,t=No,n=!0){const o=t.map(i=>({label:vo[i]??wr[i],value:i}));return D({...n?{_gWidth:y(Z)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(Z),icon:r(on,{}),action:n?r(Uo,{inherited:a?.inherited??!1,onReset:()=>i(Fo),label:Z}):void 0,children:Q({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Z})})}})}function Hl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:U,icon:O(r(jt,{})),action:o?o(a):void 0,children:Q({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==="%"?to:eo;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>de("Unit",r(Ee,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return D({_gHeight:y(U),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Or,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Or({onClear:e}){const t=L(),n=qn(t),o=Jn(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 Gl(){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:M({min:q.min,max:q.max,step:q.step,value:typeof n=="number"?n:q.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(ie),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=L(),a=Qn(i),c=o?a.phone:e===!0;return r(m,{label:l(ie),labelId:n,icon:O(r(Qt,{})),action:k(R,{children:[o?r(S,{words:x()?.panel,label:l(ie),changed:Zn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(Fe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Ml(){return{_gAnchor:y("Anchor"),anchor:Yo("Anchor name","e.g. about",jo)}}function Kl(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(Ln,{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(Fe,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Wl(){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(Pe,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:ln(e),onChange:t})})}}}function Ul(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(Pn,{id:c,checked:a,onChange:o})})}}}function Xl(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 ut({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 $l(e,t=De,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Lr,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Lr({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=N(c=>c),a=i?.props?.[o];return r(Xn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const Ar=ye([]);function jl(e,{stacking:t,fallback:n=Rt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Et.includes(o)?o:n;return t?r(Nr,{label:e,value:a,onChange:i}):pt({label:e,value:a,onChange:i,points:Ar})}}}function Nr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=N(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?It(o?.data,a):[];return pt({label:e,value:t,onChange:n,points:ye(c,a)})}function pt({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(Jt,{}),hint:i?.title?l(i.title):void 0,children:ut({label:e,value:Tt(t),onChange:n,points:o})})}const zl={top:r(Kt,{}),right:r(Mt,{}),bottom:r(Ht,{}),left:r(Gt,{})};function Vl(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:ut({label:e,value:h,onChange:p,points:u})})}}}const vr="\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(Sn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:vr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Yl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(jn,{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 ql(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Vn,{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 Jl(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function Q({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(mn,{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 Zl=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function de(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:Q({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function Ql(e,t,n){return{type:"custom",[ge]:!0,render:({value:o,onChange:i})=>r($n,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const ea={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ta({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(ne,{}),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(ne,{}),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(ne,{}),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 Fr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Dr(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 na(e,t){return e===null?null:t>e?e:null}function Br(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 oa={label:"Ticker items",icon:r(Vt,{})};function ra(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Hr,{label:e,icon:O(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Hr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=te(null),[s,d]=z(null),u=p=>p.map(h=>({text:h?.text??""})),f=p=>{const h=Br(n,p,s);h===null&&(c.current=null),d(h),i(u(p))};return r(yn,{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:Fr(n,s),onChange:p=>i(Dr(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 ia(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(H,{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 la(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(zt,{}),Kn,String(Wn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:tr("Image background",xo),cardImage:Mr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(en,{}))}}function aa(){return{outline:P("Card outline",r(tn,{}),Hn,Mn),indexBadge:P("Card number",r(Ee,{}),Bn,Gn),showBadge:A("Product badge",!0,r(ke,{noun:"tag"}))}}function sa(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(Wt,{})),showCardFinishes:A("Finish swatches",!0,r(Ut,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Zt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(Ft,{})),showCardPage:A("Page button",n.showCardPage,r(Pe,{}))}}function ca(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ft,{parts:e,changed:_n(o),shown:a=>In(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(Gr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function ft({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(m,{label:c,icon:r(kt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(Cn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Gr({parts:e,desktopKey:t,value:n,onChange:o}){const i=L()[t];return r(ft,{parts:e,changed:Rn(n),shown:a=>En(i,n,a),onPress:(a,c)=>o(wn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Mr(){return ot("Card image",{min:v,max:xe,step:xt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function da(){return se({sidesKey:"cornerSides",step:St,useFollowed:()=>v,mark:r(Kr,{label:yt}),hint:l("Rounds the picture. Left alone it stays square.")})}function Kr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ua(){return{type:"custom",render:({value:e,onChange:t})=>r(Wr,{value:typeof e=="string"?e:"",onChange:t})}}function Wr({value:e,onChange:t}){const[n,o]=z(null),i=Se.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(Dt,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),_t.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(m,{label:l("Layout"),icon:r(Xt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:Se.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,nl as BOUND_TO_POST_NOTE,sl as BUCKET_ICONS,ea as CUSTOM_FIELD_MEDIA,ta as CoordsField,zl as EDGE_ARROWS,De as FOCAL_DEFAULT,kr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,ut as FocalPicker,er as GroupLabel,$o as HIGHLIGHT_HINT,H as HidableTextField,he as LINK_FIELD_MARKER,Vi as Label,ge as MEDIA_FIELD_MARKER,Zl as MEDIA_TYPE_OPTIONS,Zo as PanelNoteLine,yr as PhoneChoiceRow,Sr as PhoneChoiceStrip,pt as PlacementGridView,be as SCAFFOLD_FIELD_MARKER,ha as SCALAR_TEXT_CONTROLS,lt as SECTION_BLEEDS_HINT,Er as SIDE_PAD_KEYS,qo as SectionHeading,Q as Segmented,Wo as SiteGapDefaultReset,M as Slider,nt as Swatches,ma as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,oa as TICKER_ITEMS_ROW,Hr as TextListField,Uo as WidthDefaultReset,Br as aimAfterListChange,Ml as anchorFields,B as backTo,xl as backgroundField,Tl as boxAlignField,Pl as boxBlockSpacingField,Rl as boxJustifyField,kl as boxPhoneRowField,Ol as boxShareField,wl as boxWrapField,fl as bucketHeader,fr as cardCornersField,tr as cardImageBackgroundField,Mr as cardImageField,la as cardMediaFields,El as cardShapeFields,sa as cardShowFields,aa as cardStyleFields,Nl as cellWidthFields,Ul as checkbox,Xl as colorInput,il as copyText,it as cornerSidesField,se as cornersRowField,Kl as dateTime,hl as designGroupHeader,Ll as directionField,ca as displayFields,Vl as edgePad,cl as entriesHiddenForTab,$l as focalPicker,na as focusAfterRemove,gl as foldMarker,Y as foldMetaOf,Qo as foldTitleOf,ua as galleryLayoutField,yl as gapField,y as group,Hl as heightFields,me as hidableText,Vo as hintIsWhileTyping,O as iconOf,da as imageCornersField,tl as inOwnBox,pl as isBucketHeader,ml as isDesignGroupHeader,Go as isNoGlyph,ll as linkField,Yl as multiSelect,Ho as noGlyph,Wl as pageBackgroundField,dl as panelNote,vl as phoneChoiceField,xr as phoneOverrideField,jl as placementField,Yo as plainText,al as plainTextarea,ot as pxField,bl as quietMarker,fe as readHidable,Fr as rowText,ql as searchSelect,ul as section,_l as sectionAnimationFields,st as sectionBorderField,ir as sectionCornersField,Cl as sectionShapeFields,Sl as sectionThemeFields,de as segmented,P as select,Dr as setRowText,Dl as sidesPaddingFields,Rr as sidesPaddingPatch,Al as sizeField,K as slider,Jl as sourceField,Fl as spacingFields,Gl as stickFields,Il as templateField,ol as text,ht as textFieldIdentifier,Ji as textFieldOffPage,Qi as textFieldPanelOnly,ra as textList,ia as textListRowField,rl as textarea,A as toggle,Ql as upload,Mo as usePageWidthDetail,Ko as useSiteGapDetail,Bl as widthField,el as withIdentifier,qi as withOffPage,Zi as withPanelOnly,Yi as withScaffold};
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 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,group as q,quietMarker as J,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as Q,deviceMetaOf as P}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return G[a]??$[a]??I[n]}function he(e,t,n){const a=_(e,t,n);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of H(u))t.includes(g)||t.push(g)}return t}const be=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],Ce=[...S(D()),...Object.keys(D())],pe=[...S(O()),...Object.keys(O())],ge=[...S(w()),...Object.keys(w())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),ye=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ke=Object.keys(W()),_e=Object.keys(U({bottomDefault:!0})),oe={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function Se(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(oe).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function re(e,t){const n=P(e),a=q(t);return n?Q(n.tier,a):a}function de(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?z(t,n.label):J(t):t}function j(e){return e==="Design"?k:["Animation"]}function ve(e,t){const n=[],a=new Set(ie(t)),C=new Set;let p=!1,u=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ne.has(o))throw new Error(`${t}.${o}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(o===d.Design||o===d.Animation)&&(p=!0),n.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||n.push(u={place:"Content",entries:[]}),u.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(o)&&C.add(o),n.push(u={place:s,entries:[]});continue}const l=_(t,o,i.label);if(!l)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);n.push(u={place:l,entries:[[o,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${o} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>R.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!R.has(r))continue;const i=n.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=F(r));for(const l of i)for(const[s,N]of l.entries)y[s]=de(r,N)}}return y}function fe(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function me(e){return A.some(t=>d[t]in e)}function Le(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{G as BLOCK_KEY_GROUP,ye as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,_e as CARD_SHOW_FIELD_KEYS,ke as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,oe as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,ve as assignSectionGroups,he as bucketOf,X as bucketOfPlace,Se as foldTopTier,me as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Le as reseatBucketTabs,ie as retiredHeadings,fe as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,group as q,quietMarker as J,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as Q,deviceMetaOf as P}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function he(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of H(u))t.includes(g)||t.push(g)}return t}const be=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],Ce=[...S(D()),...Object.keys(D())],pe=[...S(O()),...Object.keys(O())],ge=[...S(w()),...Object.keys(w())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),ye=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ke=Object.keys(W()),_e=Object.keys(U({bottomDefault:!0})),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function Se(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=q(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):J(t):t}function j(e){return e==="Design"?k:["Animation"]}function ve(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,u=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||o.push(u={place:"Content",entries:[]}),u.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(u={place:s,entries:[]});continue}const l=_(t,n,i.label);if(!l)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:l,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const l of i)for(const[s,N]of l.entries)y[s]=de(r,N)}}return y}function fe(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function me(e){return A.some(t=>d[t]in e)}function Le(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,ye as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,_e as CARD_SHOW_FIELD_KEYS,ke as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,ve as assignSectionGroups,he as bucketOf,X as bucketOfPlace,Se as foldTopTier,me as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Le as reseatBucketTabs,ie as retiredHeadings,fe as seatDesignBucket};
@@ -1,4 +1,12 @@
1
- import type { TextRegions } from "./text-regions.js";
1
+ import { type TextRegions } from "./text-regions.js";
2
2
  export type CollectionCardRegionKey = "tag" | "name" | "body" | "price" | "link";
3
+ export declare const COLLECTION_CARD_TEXT_SIZE: {
4
+ readonly tag: "text-[length:var(--size-label,13px)]";
5
+ readonly name: "text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]";
6
+ readonly namePhone: "max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]";
7
+ readonly body: "text-[length:var(--size-body,14px)]";
8
+ readonly price: "text-[length:var(--size-label,15px)]";
9
+ readonly link: "text-[length:var(--size-label,14px)]";
10
+ };
3
11
  export declare const COLLECTION_CARD_REGIONS: Readonly<Record<CollectionCardRegionKey, TextRegions[string]>>;
4
12
  export declare const COLLECTION_CARD_TEXT_REGIONS: TextRegions;
@@ -1 +1 @@
1
- const l={tag:{label:"Tag",follows:"Labels",builtIn:"13px",writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:"48px",writable:!0},body:{label:"Body",follows:"Body",builtIn:"14px",writable:!0},price:{label:"Price",follows:"Labels",builtIn:"15px",writable:!0},link:{label:"Link",follows:"Labels",builtIn:"14px",writable:!0}},e=l;export{l as COLLECTION_CARD_REGIONS,e as COLLECTION_CARD_TEXT_REGIONS};
1
+ import{builtInOf as e}from"./text-regions.js";const l={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,14px)]",price:"text-[length:var(--size-label,15px)]",link:"text-[length:var(--size-label,14px)]"},t={tag:{label:"Tag",follows:"Labels",builtIn:e(l.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:e(l.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:e(l.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:e(l.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:e(l.link),writable:!0}},i=t;export{t as COLLECTION_CARD_REGIONS,i as COLLECTION_CARD_TEXT_REGIONS,l as COLLECTION_CARD_TEXT_SIZE};
@@ -11,6 +11,7 @@ export declare function regionStyle(role: string | null | undefined, region: Tex
11
11
  fontSize: string;
12
12
  } | undefined;
13
13
  export type TextRegions = Readonly<Record<string, TextRegion>>;
14
+ export declare function builtInOf(sizeClass: string): string;
14
15
  export declare function textRegionPartKey(key: string): string;
15
16
  export declare function textRegionOfPartKey(regions: TextRegions, propKey: string): string | null;
16
17
  export declare function textRegionOfAttr(regions: TextRegions, value: string | null): string | null;
@@ -1 +1 @@
1
- const i="data-sf-spec-region",u="@";function f(t,n,e){if(!t)return;const r=e[t];if(r)return{fontFamily:`var(--font-role-${t})`,fontSize:`var(--size-${r}, ${n.builtIn})`}}function s(t){return`@${t}`}function c(t,n){if(!n.startsWith("@"))return null;const e=n.slice(1);return e in t?e:null}function o(t,n){return n&&n in t?n:null}function l(t,n){const e=n?.closest(`[${i}]`)?.getAttribute(i);return o(t,e??null)}export{i as TEXT_REGION_ATTR,u as TEXT_REGION_PREFIX,f as regionStyle,l as textRegionForClick,o as textRegionOfAttr,c as textRegionOfPartKey,s as textRegionPartKey};
1
+ const i="data-sf-spec-region",u="@";function f(t,n,e){if(!t)return;const r=e[t];if(r)return{fontFamily:`var(--font-role-${t})`,fontSize:`var(--size-${r}, ${n.builtIn})`}}function c(t){const n=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(t);if(!n)throw new Error(`builtInOf: no --size-* fallback in ${t}`);return n[1]}function l(t){return`@${t}`}function s(t,n){if(!n.startsWith("@"))return null;const e=n.slice(1);return e in t?e:null}function o(t,n){return n&&n in t?n:null}function E(t,n){const e=n?.closest(`[${i}]`)?.getAttribute(i);return o(t,e??null)}export{i as TEXT_REGION_ATTR,u as TEXT_REGION_PREFIX,c as builtInOf,f as regionStyle,E as textRegionForClick,o as textRegionOfAttr,s as textRegionOfPartKey,l as textRegionPartKey};
@@ -14,6 +14,7 @@ export type StoredTextStyleValues = {
14
14
  paragraphSpacing?: number;
15
15
  letterCase?: TextStyleCase;
16
16
  largestSize?: number;
17
+ sizePhone?: number;
17
18
  };
18
19
  export type StoredTextStyle = {
19
20
  id: string;
@@ -1,2 +1,2 @@
1
- import{FONT_OPTIONS as D,normalizeFonts as I}from"./fonts.js";import{partSpacingOf as J}from"./puck/part-styles.js";import{compressionMetrics as B,headingTypographyFromRow as G,normalizeHeadingCompression as C,normalizeSizes as L}from"./theme.js";const H=e=>e==="sentence"?"none":void 0,p=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,z=e=>typeof e=="string"&&e?e:void 0,M=["font","color","size","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function g(e){const i={};for(const n of M)e[n]!==void 0&&(i[n]=e[n]);return i}function w(e,i){const{auto:n,...t}=e,a=new Set(i??[]),s=M.filter(o=>a.has(o)&&e.values[o]===void 0);return s.length?{...t,auto:s}:t}function O(e){const i=e.fonts,n=e.sizes,t=e.typography,a=B(e.compression),s=(l,r)=>({id:`heading-${l}`,kind:"heading",name:`Heading ${l}`,values:g(r)}),o=(l,r={})=>({id:`body-${l}`,kind:"body",name:`Body ${l}`,values:g(r)});return[s(1,{font:z(i.heading),size:p(n.headingLarge),weight:p(t.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:H(t.case),largestSize:p(t.maxPx)}),s(2,{font:z(i.heading2),size:p(n.headingMedium),weight:p(t.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:H(t.case2)}),s(3,{font:z(i.heading3),size:p(n.headingSmall),weight:p(t.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:H(t.case3)}),o(1,{font:z(i.body),size:p(n.body)}),o(2),o(3),o(4),o(5,{font:z(i.label),size:p(n.label)})]}function _(e){return Array.isArray(e)&&e.every(n=>n&&typeof n=="object"&&typeof n.id=="string"&&(n.kind==="heading"||n.kind==="body")&&typeof n.name=="string")?e.map(n=>w({...n,values:g(n.values??{})},Array.isArray(n.auto)?n.auto:void 0)):null}function ne(e){return _(e)??[]}function T(e,i){const n=O(i),t=_(e);return t?t.map(a=>{const s={...N(n,a.id)};for(const o of a.auto??[])delete s[o];return{...a,values:g({...s,...a.values})}}):n}const N=(e,i)=>e.find(n=>n.id===i)?.values??{},P=["heading-1","heading-2","heading-3"];function te({saved:e,old:i,cur:n,next:t,sizeOf:a}){const s=O(i),o=_(e)??s.map(d=>({...d,values:{}})),l=T(o,i),r=[],h=t.map(d=>{const f=n.find(u=>u.id===d.id),m=o.find(u=>u.id===d.id);if(!f||!m)return U([d],a)[0];const c={...m.values},x=new Set(m.auto??[]),v=d.values,A=f.values,j=[...new Set([...Object.keys(v),...Object.keys(A)])].filter(u=>JSON.stringify(v[u])!==JSON.stringify(A[u]));j.sort((u,y)=>+(u==="letterSpacing")-+(y==="letterSpacing"));for(const u of j){const y=u==="lineSpacing"?"lineHeight":u,k=v[u];if(k===void 0){delete c[y],N(s,d.id)[y]!==void 0&&(r.push([d.id,y]),x.add(y));continue}if(x.delete(y),u==="lineSpacing")c.lineHeight=S(k/100,3);else if(u==="letterSpacing"){const E=l.find(V=>V.id===d.id),F=a({...d,values:g({...E?.values??{},...c})});c.letterSpacing=F?S(k/F,4):0}else c[y]=k}return w({id:d.id,kind:d.kind,name:d.name,values:g(c)},x)});let b=i.compression;if(r.some(([d,f])=>(f==="lineHeight"||f==="letterSpacing")&&P.includes(d))&&C(b)!=="normal"){for(const d of P){const f=h.find(c=>c.id===d);if(!f)continue;const m={...f.values};for(const c of["lineHeight","letterSpacing"])r.some(([x,v])=>x===d&&v===c)||m[c]===void 0&&!(f.auto??[]).includes(c)&&(m[c]=N(s,d)[c]);f.values=g(m)}b="normal"}return{saved:h,old:{...i,compression:b}}}function ie(e,i){const n={text_styles:e.saved};return e.old.compression!==i.compression&&(n.heading_compression=C(e.old.compression)),n}const S=(e,i)=>Number(e.toFixed(i));function ae(e,i){return e.map(n=>{const{lineHeight:t,letterSpacing:a,...s}=n.values,o={...s};return t!==void 0&&(o.lineSpacing=S(t*100,1)),a!==void 0&&(o.letterSpacing=S(a*i(n),2)),{id:n.id,kind:n.kind,name:n.name,values:o}})}function U(e,i){return e.map(n=>{const{lineSpacing:t,letterSpacing:a,...s}=n.values,o={id:n.id,kind:n.kind,name:n.name,values:g({...s})},l={...o.values};if(t!==void 0&&(l.lineHeight=S(t/100,3)),a!==void 0){const r=i({...o,values:{...o.values}});l.letterSpacing=r?S(a/r,4):0}return{...o,values:g(l)}})}function oe(e){const i={fonts:I({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:L({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:C(e.heading_compression),typography:G(e)},n=e.text_styles??null,t=Array.isArray(n)?R(T(n,i),i):i;return{fonts:I(t.fonts),sizes:L(t.sizes),compression:C(t.compression),typography:t.typography,textStyles:n}}function R(e,i){const n=d=>e.find(f=>f.id===d)?.values??{},t=n("heading-1"),a=n("heading-2"),s=n("heading-3"),o=n("body-1"),l=n("body-5"),r=i.fonts,h=i.sizes,b=i.typography,$=d=>d==="none"?"sentence":"authored";return{fonts:{...r,heading:t.font??r.heading,heading2:a.font??t.font??r.heading2,heading3:s.font??t.font??r.heading3,body:o.font??r.body,label:l.font??r.label},sizes:{...h,headingLarge:t.size??null,headingMedium:a.size??null,headingSmall:s.size??null,body:o.size??null,label:l.size??null},compression:i.compression,typography:{...b,case:$(t.letterCase),weight:t.weight??null,maxPx:t.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:$(a.letterCase),case3:$(s.letterCase)}}}function se(e){const i=_(e.textStyles);if(!i||i.every(a=>Object.keys(a.values).length===0&&!a.auto))return e;const n={fonts:e.fonts??{},sizes:e.sizes??{},compression:String(e.headingCompression??"normal"),typography:e.headingTypography??{}},t=R(T(i,n),n);return{...e,fonts:t.fonts,sizes:t.sizes,headingCompression:t.compression,headingTypography:t.typography}}function W(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}const q={none:"none",upper:"uppercase",capitalize:"capitalize",lower:"lowercase"};function K(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function Q(e){const i=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function re(e){const i=[];for(const n of e){const t=n.values,a=`.${W(n)}`,s=[],o=t.font!==void 0?D.find(h=>h.key===t.font)?.cssVar:void 0;if(o&&s.push(`font-family: var(${o})`),t.size!==void 0){const h=t.largestSize!==void 0?Math.min(t.size,t.largestSize):t.size;s.push(`font-size: ${h}px`)}const l=t.color!==void 0?K(t.color):null;l&&s.push(`color: ${l}`),t.italic===!0&&s.push("font-style: italic"),t.weight!==void 0&&s.push(`font-weight: ${t.weight}`);const r=[];t.lineHeight!==void 0&&r.push(`line-height: ${t.lineHeight}`),t.letterSpacing!==void 0&&r.push(`letter-spacing: ${t.letterSpacing}em`),n.kind==="body"&&s.push(...r),t.letterCase!==void 0&&s.push(`text-transform: ${q[t.letterCase]}`),t.paragraphSpacing&&s.push(`--sf-part-para: ${t.paragraphSpacing}px`),s.length&&i.push(`${a} { ${s.join("; ")} }`),n.kind==="heading"&&r.length&&i.push(`${a}, ${a}:is(h1, h2, h3, h4) { ${r.join("; ")} }`),t.paragraphSpacing&&i.push(...Q(a))}return i.join(`
2
- `)}function de(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function le(e){switch(e){case"heading":return"heading-1";case"heading2":return"heading-2";case"heading3":return"heading-3";case"body":return"body-1";case"label":return"body-5";default:return}}function X(e){const i=J(e);return g({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:i.lineHeight,letterSpacing:i.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function ce(e){return Object.keys(X(e)).length>0}function ue({saved:e,old:i,styleId:n,values:t}){return{saved:(_(e)??O(i).map(o=>({...o,values:{}}))).map(o=>o.id===n?w({...o,values:g({...o.values,...t})},o.auto):o),old:i}}function fe(e){const i=e.filter(n=>n.kind==="body").map(n=>Number(/^body-(\d+)$/.exec(n.id)?.[1])).filter(n=>Number.isInteger(n)&&n>0);return i.length?`body-${Math.max(...i)}`:"body-1"}export{de as accentItalicCss,te as applyListChange,fe as eyebrowStyleId,W as faceClassOf,U as fromPanelStyles,ce as hasStyleChange,ie as listChangePatch,X as partStyleToTextStyleValues,ue as pushIntoStyle,T as resolveTextStyles,oe as siteTextFromRow,ne as storedTextStyles,le as styleIdOfRole,re as textStylesCss,O as textStylesFromOld,R as textStylesToOld,se as themeWithTextStyles,ae as toPanelStyles};
1
+ import{FONT_OPTIONS as D,normalizeFonts as F}from"./fonts.js";import{PART_PHONE_MAX_CSS as J,partSpacingOf as B}from"./puck/part-styles.js";import{compressionMetrics as G,headingTypographyFromRow as U,normalizeHeadingCompression as C,normalizeSizes as I}from"./theme.js";const H=e=>e==="sentence"?"none":void 0,h=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,v=e=>typeof e=="string"&&e?e:void 0,E=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function p(e){const i={};for(const n of E)e[n]!==void 0&&(i[n]=e[n]);return i}function w(e,i){const{auto:n,...t}=e,a=new Set(i??[]),s=E.filter(o=>a.has(o)&&e.values[o]===void 0);return s.length?{...t,auto:s}:t}function O(e){const i=e.fonts,n=e.sizes,t=e.typography,a=G(e.compression),s=(l,r)=>({id:`heading-${l}`,kind:"heading",name:`Heading ${l}`,values:p(r)}),o=(l,r={})=>({id:`body-${l}`,kind:"body",name:`Body ${l}`,values:p(r)});return[s(1,{font:v(i.heading),size:h(n.headingLarge),weight:h(t.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:H(t.case),largestSize:h(t.maxPx)}),s(2,{font:v(i.heading2),size:h(n.headingMedium),weight:h(t.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:H(t.case2)}),s(3,{font:v(i.heading3),size:h(n.headingSmall),weight:h(t.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:H(t.case3)}),o(1,{font:v(i.body),size:h(n.body)}),o(2),o(3),o(4),o(5,{font:v(i.label),size:h(n.label)})]}function _(e){return Array.isArray(e)&&e.every(n=>n&&typeof n=="object"&&typeof n.id=="string"&&(n.kind==="heading"||n.kind==="body")&&typeof n.name=="string")?e.map(n=>w({...n,values:p(n.values??{})},Array.isArray(n.auto)?n.auto:void 0)):null}function ie(e){return _(e)??[]}function T(e,i){const n=O(i),t=_(e);return t?t.map(a=>{const s={...P(n,a.id)};for(const o of a.auto??[])delete s[o];return{...a,values:p({...s,...a.values})}}):n}const P=(e,i)=>e.find(n=>n.id===i)?.values??{},M=["heading-1","heading-2","heading-3"];function ae({saved:e,old:i,cur:n,next:t,sizeOf:a}){const s=O(i),o=_(e)??s.map(d=>({...d,values:{}})),l=T(o,i),r=[],g=t.map(d=>{const f=n.find(u=>u.id===d.id),S=o.find(u=>u.id===d.id);if(!f||!S)return W([d],a)[0];const c={...S.values},x=new Set(S.auto??[]),z=d.values,A=f.values,N=[...new Set([...Object.keys(z),...Object.keys(A)])].filter(u=>JSON.stringify(z[u])!==JSON.stringify(A[u]));N.sort((u,m)=>+(u==="letterSpacing")-+(m==="letterSpacing"));for(const u of N){const m=u==="lineSpacing"?"lineHeight":u,k=z[u];if(k===void 0){delete c[m],P(s,d.id)[m]!==void 0&&(r.push([d.id,m]),x.add(m));continue}if(x.delete(m),u==="lineSpacing")c.lineHeight=b(k/100,3);else if(u==="letterSpacing"){const R=l.find(V=>V.id===d.id),j=a({...d,values:p({...R?.values??{},...c})});c.letterSpacing=j?b(k/j,4):0}else c[m]=k}return w({id:d.id,kind:d.kind,name:d.name,values:p(c)},x)});let y=i.compression;if(r.some(([d,f])=>(f==="lineHeight"||f==="letterSpacing")&&M.includes(d))&&C(y)!=="normal"){for(const d of M){const f=g.find(c=>c.id===d);if(!f)continue;const S={...f.values};for(const c of["lineHeight","letterSpacing"])r.some(([x,z])=>x===d&&z===c)||S[c]===void 0&&!(f.auto??[]).includes(c)&&(S[c]=P(s,d)[c]);f.values=p(S)}y="normal"}return{saved:g,old:{...i,compression:y}}}function oe(e,i){const n={text_styles:e.saved};return e.old.compression!==i.compression&&(n.heading_compression=C(e.old.compression)),n}const b=(e,i)=>Number(e.toFixed(i));function se(e,i){return e.map(n=>{const{lineHeight:t,letterSpacing:a,...s}=n.values,o={...s};return t!==void 0&&(o.lineSpacing=b(t*100,1)),a!==void 0&&(o.letterSpacing=b(a*i(n),2)),{id:n.id,kind:n.kind,name:n.name,values:o}})}function W(e,i){return e.map(n=>{const{lineSpacing:t,letterSpacing:a,...s}=n.values,o={id:n.id,kind:n.kind,name:n.name,values:p({...s})},l={...o.values};if(t!==void 0&&(l.lineHeight=b(t/100,3)),a!==void 0){const r=i({...o,values:{...o.values}});l.letterSpacing=r?b(a/r,4):0}return{...o,values:p(l)}})}function re(e){const i={fonts:F({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:I({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:C(e.heading_compression),typography:U(e)},n=e.text_styles??null,t=Array.isArray(n)?L(T(n,i),i):i;return{fonts:F(t.fonts),sizes:I(t.sizes),compression:C(t.compression),typography:t.typography,textStyles:n}}function L(e,i){const n=d=>e.find(f=>f.id===d)?.values??{},t=n("heading-1"),a=n("heading-2"),s=n("heading-3"),o=n("body-1"),l=n("body-5"),r=i.fonts,g=i.sizes,y=i.typography,$=d=>d==="none"?"sentence":"authored";return{fonts:{...r,heading:t.font??r.heading,heading2:a.font??t.font??r.heading2,heading3:s.font??t.font??r.heading3,body:o.font??r.body,label:l.font??r.label},sizes:{...g,headingLarge:t.size??null,headingMedium:a.size??null,headingSmall:s.size??null,body:o.size??null,label:l.size??null},compression:i.compression,typography:{...y,case:$(t.letterCase),weight:t.weight??null,maxPx:t.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:$(a.letterCase),case3:$(s.letterCase)}}}function de(e){const i=_(e.textStyles);if(!i||i.every(a=>Object.keys(a.values).length===0&&!a.auto))return e;const n={fonts:e.fonts??{},sizes:e.sizes??{},compression:String(e.headingCompression??"normal"),typography:e.headingTypography??{}},t=L(T(i,n),n);return{...e,fonts:t.fonts,sizes:t.sizes,headingCompression:t.compression,headingTypography:t.typography}}function X(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}const Z={none:"none",upper:"uppercase",capitalize:"capitalize",lower:"lowercase"};function q(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function K(e){const i=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function le(e){const i=[];for(const n of e){const t=n.values,a=`.${X(n)}`,s=[],o=t.font!==void 0?D.find(g=>g.key===t.font)?.cssVar:void 0;if(o&&s.push(`font-family: var(${o})`),t.size!==void 0){const g=t.largestSize!==void 0?Math.min(t.size,t.largestSize):t.size;s.push(`font-size: ${g}px`)}const l=t.color!==void 0?q(t.color):null;l&&s.push(`color: ${l}`),t.italic===!0&&s.push("font-style: italic"),t.weight!==void 0&&s.push(`font-weight: ${t.weight}`);const r=[];if(t.lineHeight!==void 0&&r.push(`line-height: ${t.lineHeight}`),t.letterSpacing!==void 0&&r.push(`letter-spacing: ${t.letterSpacing}em`),n.kind==="body"&&s.push(...r),t.letterCase!==void 0&&s.push(`text-transform: ${Z[t.letterCase]}`),t.paragraphSpacing&&s.push(`--sf-part-para: ${t.paragraphSpacing}px`),s.length&&i.push(`${a} { ${s.join("; ")} }`),n.kind==="heading"&&r.length&&i.push(`${a}, ${a}:is(h1, h2, h3, h4) { ${r.join("; ")} }`),t.paragraphSpacing&&i.push(...K(a)),t.sizePhone!==void 0){const g=Q[n.id],y=[`${a} { font-size: ${t.sizePhone}px }`];g&&y.push(`.sf-themed-content { --size-${g}: ${t.sizePhone}px !important }`),i.push(`@media ${J} { ${y.join(" ")} }`)}}return i.join(`
2
+ `)}const Q={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function ce(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function ue(e){switch(e){case"heading":return"heading-1";case"heading2":return"heading-2";case"heading3":return"heading-3";case"body":return"body-1";case"label":return"body-5";default:return}}function Y(e){const i=B(e);return p({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:i.lineHeight,letterSpacing:i.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function fe(e){return Object.keys(Y(e)).length>0}function ge({saved:e,old:i,styleId:n,values:t}){return{saved:(_(e)??O(i).map(o=>({...o,values:{}}))).map(o=>o.id===n?w({...o,values:p({...o.values,...t})},o.auto):o),old:i}}function pe(e){const i=e.filter(n=>n.kind==="body").map(n=>Number(/^body-(\d+)$/.exec(n.id)?.[1])).filter(n=>Number.isInteger(n)&&n>0);return i.length?`body-${Math.max(...i)}`:"body-1"}export{ce as accentItalicCss,ae as applyListChange,pe as eyebrowStyleId,X as faceClassOf,W as fromPanelStyles,fe as hasStyleChange,oe as listChangePatch,Y as partStyleToTextStyleValues,ge as pushIntoStyle,T as resolveTextStyles,re as siteTextFromRow,ie as storedTextStyles,ue as styleIdOfRole,le as textStylesCss,O as textStylesFromOld,L as textStylesToOld,de as themeWithTextStyles,se as toPanelStyles};
@@ -1,8 +1,8 @@
1
- import{HEADING_FACE_UTILITIES as _}from"../fonts.js";import{isRuleSource as k,ruleChecks as T}from"./rule.js";import{evalLength as S}from"./support/css-length.js";const j=["app/","components/","lib/"],v="40px",E=["1","1.4"],b=/(?:^|\s)((?:[a-z0-9@_.-]*\[[^\]]*\]:|[a-z0-9@_.-]+:)*)text-\[([^\]]*)\]/g;function L(t){const e=/max-\[(\d+)px\]:/.exec(t);return e?Number(e[1]):1600}function O(t,e){let s=-1,o="";for(let i=e;i>0;i--){const l=t[i-1];if((l==="`"||l==="'"||l==='"')&&t[i-2]!=="\\"){o=l,s=i;break}}if(s===-1)return null;for(let i=e;i<t.length;i++)if(t[i]===o&&t[i-1]!=="\\")return t.slice(s,i);return null}const A=/^(#|rgb|hsl|oklch|color|currentColor|inherit|transparent)/;function y(t){const e=[];for(const s of t){const o=s.text,i=new RegExp(_.join("|"),"g");let l;for(;l=i.exec(o);){const a=O(o,l.index);if(!a)continue;const h=[];b.lastIndex=0;let c;for(;c=b.exec(a);){const p=c[2].replace(/^length:/,"");A.test(p)||h.push({token:c[0].trim(),expr:p,vw:L(c[1])})}h.length!==0&&e.push({file:s.path,line:o.slice(0,l.index).split(`
2
- `).length,className:a,steps:h})}}return e}function u(t,e){return S(t.expr,t.vw,e)}const C=t=>u(t,{"--scale-heading":"1"})>40;function m(t,e){return t[`${e.file}:${e.line}`]??Object.entries(t).find(([s])=>{const o=s.indexOf("#");return o>0&&s.slice(0,o)===e.file&&e.className.includes(s.slice(o+1))})?.[1]??t[e.file]}const I=t=>t.filter(e=>/\.tsx?$/.test(e.path)&&!k(e.path)&&j.some(s=>e.path.startsWith(s)));function D(t,e){const s=e.notSwept??{},o=y(I(t)).filter(l=>!m(s,l)).flatMap(l=>l.steps.filter(a=>!C(a)&&u(a,{"--sf-heading-max":v,"--scale-heading":"1.4"})>40).map(a=>`${l.file}:${l.line} · ${a.token}`)),i=[];if(o.length){i.push(` note — ${o.length} step(s) clear 40px at the default heading scale but not at 1.4; outside this card's census, listed so they are not a silent gap:`);for(const l of o)i.push(` ${l}`)}for(const[l,a]of Object.entries(s))i.push(` note — not swept: ${l} — ${a}`);return i}function H(t,e){const{check:s,report:o}=T("heading ceiling sweep"),i=e.notSwept??{},l=I(t),a=y(l);s(`read the source (${l.length} .ts/.tsx files)`,l.length>0,"found no source to sweep — this rule is not measuring anything"),s(`the scanner finds display headings at all (${a.length}, at least ${e.minSites})`,a.length>=e.minSites,`found ${a.length} heading-face class lists with a text-[…] size`);const h=a.filter(n=>!m(i,n)&&n.steps.some(C));for(const n of Object.keys(i)){const r=n.split(/[:#]/)[0];s(`notSwept["${n}"] still matches a real site`,a.some(f=>f.file===r&&m(i,f)===i[n]))}s(`the census finds the headings a 40px ceiling has to bring down (${h.length}, at least ${e.minSwept})`,h.length>=e.minSwept,`only ${h.length} class lists declare a size above 40px`);const c=[];for(const n of h)for(const r of n.steps)for(const f of E){const d=u(r,{"--sf-heading-max":v,"--scale-heading":f});d>40&&c.push(`${n.file}:${n.line} @scale ${f} → ${d}px · ${r.token}`)}s("no swept display heading renders above the site's 40px ceiling",c.length===0,`${c.length} step(s) ignore it:
1
+ import{HEADING_FACE_UTILITIES as _}from"../fonts.js";import{inlineTextSizes as T,isRuleSource as k,ruleChecks as j}from"./rule.js";import{evalLength as S}from"./support/css-length.js";const L=["app/","components/","lib/"],v="40px",E=["1","1.4"],b=/(?:^|\s)((?:[a-z0-9@_.-]*\[[^\]]*\]:|[a-z0-9@_.-]+:)*)text-\[([^\]]*)\]/g;function O(t){const e=/max-\[(\d+)px\]:/.exec(t);return e?Number(e[1]):1600}function z(t,e){let s=-1,o="";for(let i=e;i>0;i--){const l=t[i-1];if((l==="`"||l==="'"||l==='"')&&t[i-2]!=="\\"){o=l,s=i;break}}if(s===-1)return null;for(let i=e;i<t.length;i++)if(t[i]===o&&t[i-1]!=="\\")return t.slice(s,i);return null}const A=/^(#|rgb|hsl|oklch|color|currentColor|inherit|transparent)/;function y(t){const e=[];for(const s of t){const o=T(s.text),i=new RegExp(_.join("|"),"g");let l;for(;l=i.exec(o);){const a=z(o,l.index);if(!a)continue;const h=[];b.lastIndex=0;let c;for(;c=b.exec(a);){const p=c[2].replace(/^length:/,"");A.test(p)||h.push({token:c[0].trim(),expr:p,vw:O(c[1])})}h.length!==0&&e.push({file:s.path,line:o.slice(0,l.index).split(`
2
+ `).length,className:a,steps:h})}}return e}function u(t,e){return S(t.expr,t.vw,e)}const C=t=>u(t,{"--scale-heading":"1"})>40;function m(t,e){return t[`${e.file}:${e.line}`]??Object.entries(t).find(([s])=>{const o=s.indexOf("#");return o>0&&s.slice(0,o)===e.file&&e.className.includes(s.slice(o+1))})?.[1]??t[e.file]}const I=t=>t.filter(e=>/\.tsx?$/.test(e.path)&&!k(e.path)&&L.some(s=>e.path.startsWith(s)));function H(t,e){const s=e.notSwept??{},o=y(I(t)).filter(l=>!m(s,l)).flatMap(l=>l.steps.filter(a=>!C(a)&&u(a,{"--sf-heading-max":v,"--scale-heading":"1.4"})>40).map(a=>`${l.file}:${l.line} · ${a.token}`)),i=[];if(o.length){i.push(` note — ${o.length} step(s) clear 40px at the default heading scale but not at 1.4; outside this card's census, listed so they are not a silent gap:`);for(const l of o)i.push(` ${l}`)}for(const[l,a]of Object.entries(s))i.push(` note — not swept: ${l} — ${a}`);return i}function F(t,e){const{check:s,report:o}=j("heading ceiling sweep"),i=e.notSwept??{},l=I(t),a=y(l);s(`read the source (${l.length} .ts/.tsx files)`,l.length>0,"found no source to sweep — this rule is not measuring anything"),s(`the scanner finds display headings at all (${a.length}, at least ${e.minSites})`,a.length>=e.minSites,`found ${a.length} heading-face class lists with a text-[…] size`);const h=a.filter(n=>!m(i,n)&&n.steps.some(C));for(const n of Object.keys(i)){const r=n.split(/[:#]/)[0];s(`notSwept["${n}"] still matches a real site`,a.some(f=>f.file===r&&m(i,f)===i[n]))}s(`the census finds the headings a 40px ceiling has to bring down (${h.length}, at least ${e.minSwept})`,h.length>=e.minSwept,`only ${h.length} class lists declare a size above 40px`);const c=[];for(const n of h)for(const r of n.steps)for(const f of E){const d=u(r,{"--sf-heading-max":v,"--scale-heading":f});d>40&&c.push(`${n.file}:${n.line} @scale ${f} → ${d}px · ${r.token}`)}s("no swept display heading renders above the site's 40px ceiling",c.length===0,`${c.length} step(s) ignore it:
3
3
  ${c.join(`
4
4
  `)}`);const p=a.flatMap(n=>n.steps.filter(r=>r.expr.includes("--sf-heading-max")).map(r=>({site:n,step:r})));s(`the sweep actually capped headings (${p.length} steps read --sf-heading-max, at least ${e.minCapped})`,p.length>=e.minCapped);const g=[];for(const{site:n,step:r}of p){const f=/^min\((.*),\s*var\(--sf-heading-max,[^)]*\)\)$/.exec(r.expr)?.[1];if(f!==void 0)for(const d of E){const $=S(f,r.vw,{"--scale-heading":d}),w=u(r,{"--scale-heading":d});$!==w&&g.push(`${n.file}:${n.line} @scale ${d}: ${$}px → ${w}px`)}}if(s("a tenant that sets no ceiling renders exactly what it renders today",g.length===0,`${g.length} step(s) moved:
5
5
  ${g.join(`
6
6
  `)}`),e.reference!==void 0){const n=t.find(r=>r.path===e.reference);s(`the reference component still spells the ceiling the one way (${e.reference})`,!!n&&/var\(--sf-heading-max,\s*9999px\)/.test(n.text),`${e.reference} no longer reads var(--sf-heading-max,9999px)`)}const N=/^var\(--sf-heading-max,/,x=p.filter(({step:n})=>!N.test(n.expr)).filter(({step:n})=>!/^min\(.*,var\(--sf-heading-max,9999px\)\)$/.test(n.expr)).map(({site:n,step:r})=>`${n.file}:${n.line} · ${r.token}`);return s("every capped step is spelt the reference's way",x.length===0,`${x.length} second spelling(s):
7
7
  ${x.join(`
8
- `)}`),o()}export{O as enclosingLiteral,D as headingCeilingNotes,H as headingCeilingSweep};
8
+ `)}`),o()}export{z as enclosingLiteral,H as headingCeilingNotes,F as headingCeilingSweep};