efficient-web-builder 37.0.0 → 37.2.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 (41) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/editor/components/AnchorField.d.ts +8 -0
  3. package/dist/editor/components/AnchorField.js +1 -0
  4. package/dist/editor/components/PartSettingsPanel.js +1 -1
  5. package/dist/editor/components/SiteTextStylesField.d.ts +1 -1
  6. package/dist/editor/components/SiteTextStylesField.js +1 -1
  7. package/dist/editor/components/StorefrontEditor.js +1 -1
  8. package/dist/editor/components/StylesPanel.js +1 -1
  9. package/dist/editor/components/ThemeCard.js +1 -1
  10. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  11. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  12. package/dist/editor/components/storefront-editor.css +31 -7
  13. package/dist/editor/lib/puck/blocks/general/Footprint/fields.d.ts +1 -0
  14. package/dist/editor/lib/puck/blocks/general/Footprint/fields.js +1 -1
  15. package/dist/editor/lib/puck/controls.d.ts +0 -1
  16. package/dist/editor/lib/puck/controls.js +1 -1
  17. package/dist/editor/lib/puck/page-root.js +1 -1
  18. package/dist/editor/lib/puck/section-width-fields.js +1 -1
  19. package/dist/editor/lib/site-text-styles-writer.d.ts +1 -1
  20. package/dist/editor/lib/site-text-styles-writer.js +1 -1
  21. package/dist/editor/lib/site-text-styles.d.ts +1 -83
  22. package/dist/editor/lib/site-text-styles.js +1 -2
  23. package/dist/format/lib/content/footprint.d.ts +3 -0
  24. package/dist/format/lib/content/footprint.js +1 -1
  25. package/dist/format/lib/content/subscribe.d.ts +2 -18
  26. package/dist/format/lib/content/subscribe.js +2 -2
  27. package/dist/format/lib/editor-words-catalogue.d.ts +13 -10
  28. package/dist/format/lib/editor-words-catalogue.js +4 -4
  29. package/dist/format/lib/popup/behavior.d.ts +43 -0
  30. package/dist/format/lib/popup/behavior.js +1 -0
  31. package/dist/format/lib/popup/look.d.ts +28 -0
  32. package/dist/format/lib/popup/look.js +1 -0
  33. package/dist/format/lib/popup/rules.d.ts +35 -0
  34. package/dist/format/lib/popup/rules.js +1 -0
  35. package/dist/format/lib/source-rules/panel-no-divider-lines.js +1 -1
  36. package/dist/format/lib/web-backend.d.ts +3 -0
  37. package/dist/render/components/Footprint.js +1 -1
  38. package/dist/render/lib/puck/blocks/general/Footprint/render.js +2 -2
  39. package/dist/render/lib/text-styles/site-text-styles.d.ts +83 -0
  40. package/dist/render/lib/text-styles/site-text-styles.js +2 -0
  41. package/package.json +2 -2
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as w,Fragment as T}from"react/jsx-runtime";import{cloneElement as fe,useId as ht,useRef as oe,useState as V}from"react";import{useEasel as W,useSelectedFields as re}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Y,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as q,textFieldIdentifier as mt}from"efficient-easel/draw";import gt from"../../components/ApplyCornersToSiblings.js";import bt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as xt,CORNER_RADIUS_MAX as ye,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as yt,IMAGE_CORNERS_LABEL as St}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Ct}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as _t,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as Se}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as It,HERO_GROUP_PLACEMENTS as Et,HERO_GROUP_PLACEMENT_DEFAULT as Tt,normalisePlacement as Rt,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import Ot from"../../components/KeepHint.js";import{AdjustIcon as wt,AlignLeftIcon as Pt,EyeIcon as kt,AlignSeparateIcon as Nt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as vt,BlockSectionIcon as At,CartIcon as Ft,ColumnWidthsIcon as Ie,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 Ee,GridIcon as Xt,GroundIcon as $t,HashIcon as Te,HeightIcon as jt,ImageIcon as zt,ListIcon as Vt,LocationIcon as ie,NudgeIcon as Yt,PaddingAllIcon as qt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Jt,PlacementIcon as Zt,ProductSizeIcon as Qt,StickyIcon as en,RotateIcon as tn,SquareIcon as nn,TypeIcon as on,WidthIcon as rn,WrapIcon as ln}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as an}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as sn,hasOwnSectionCorners as cn,normalizeCornerSides as ve}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as dn,SECTION_MOTION_OPTIONS as un}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as Ae}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsField as h,SettingsGroupHead as pn,SettingsGroupSub as fn,SettingsBorder as hn,SettingsSegmented as mn,SettingsSides as gn,SettingsSidesEach as Fe,sidesStartEach as bn,SettingsSwitch as De,borderSides as xn,borderStartEach as yn}from"efficient-easel/panel";import{FieldSelect as Sn,ListField as Cn}from"efficient-easel/fields";import{DisplayChips as _n}from"efficient-shell/ui";import{desktopDisplayChanged as In,partShownOnDesktop as En,partShownOnPhone as Tn,phoneDisplayChanged as Rn,withDesktopPart as On,withPhonePart as wn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Pn,Checkbox as kn,CornersInput as Nn,DateTimePicker as Ln,FOCAL_DEFAULT as vn,PictureTiles as Be,PositionInput as An,Slider as Fn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as Dn}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as Bn,NoControlMark as J,noControlField as X}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{OWN_BOX_FIELD as Hn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Gn,phoneKey as F,resolvePhoneValue as le}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Mn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Kn,CARD_OUTLINE_OPTIONS as Wn,DEFAULT_CARD_INDEX_FORMAT as Un,DEFAULT_CARD_OUTLINE as Xn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as $n,DEFAULT_COVER_INDEX as jn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as zn}from"efficient-easel/draw";import Vn from"../../components/MediaUploadField.js";import Yn from"../../components/MultiSelectField.js";import qn from"../../components/SectionThemePicker.js";import Jn from"../../components/SearchSelectField.js";import Zn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as Qn,resolveSectionMinHeight as eo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as ae,hasPhoneStick as to,resolveSectionStick as no}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as oo,SECTION_MIN_HEIGHT_GROUP_LABEL as $,SECTION_SCREEN_PCT as ro}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as io,containerDirectionPoints as lo,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as ao,BOX_BLOCK_SPACING_LABEL as so,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as co,BOX_PHONE_ROW_MAX as uo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as se,BOX_WRAP_LABEL as po,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as fo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ho,normalizeTheme as mo,siteButtonPaint as go}from"../../../format/lib/theme.js";import{CONTAINER_GAP as ce,CONTAINER_GAP_BUILT_IN as bo,GAP_FIELD_CONTAINER as xo,hasOwnContainerGap as yo,resolveContainerGap as So}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Co,CARD_IMAGE_BG_OFF as _o,CARD_IMAGE_BG_SWATCH_NAMES as Io,CARD_IMAGE_BG_SWATCHES as Eo,isCardImageBackgroundInheriting as To,cardImageBackgroundChoice as Ro,THEME_CARD_IMAGE_BG as Oo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as wo,SECTION_BG_SWATCHES as Po,SECTION_BG_SWATCH_NAMES as ko,THEME_SECTION_BG as No,isSectionBackgroundInheriting as Lo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as vo}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ao,TYPE_SIZE_INHERIT as Fo,isTypeSizeInheriting as Do}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Bo,WIDTH_CHOICE_LABEL as Ho,WIDTH_INHERIT as Go,resolveWidth as Mo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Ko}from"efficient-easel/style-clipboard";function B(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!q(n)&&Ko(n,`section:${t}`);return e}function el({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Wo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Uo(e){return e.type===qe}function P(e){return Uo(e)?void 0:e}function N(e,t){return l("{value} from {from}",{value:e,from:t})}function Xo(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Mo(t,"full");return n==="page"?N(`${o}px`,l("the page")):n==="contained"?N(l("Contained"),l("the page")):N(l("Full"),l("the page"))}function $o(){const{blockGap:e}=D();return e===null?l("this container's own spacing"):N(`${e}px`,l("Site styles"))}function jo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:$o(),onReset:t})}function zo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Xo(),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}=he(e),f=oe(null),p=oe(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ht(),_=i?Qo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Ot,{children:l(i)}):void 0,z=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(on,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:z,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":z,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:w("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function tl(e,t){return{...e,[xe]:t}}function nl(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function ol(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function rl(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function il(e){return!!e&&typeof e=="object"&&e[Je]===!0}function ll(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 Ea,SCALAR_TEXT_CONTROLS as Ta}from"efficient-easel/draw";function al(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Bn]:o,...i}=e;return{...i,[Hn]:!0,render:t}}const Vo=new Set(zn),G=(e,t)=>{const n={...t,[I]:e};if(!Vo.has(e.control))return n;const o=t.render;return{...X(n,"authored-copy"),render:i=>r(Mn,{name:i.name,children:o(i)})}},sl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Yo={field:"source.slug",set:!0},cl={not:Yo},qo="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([qo]),Qo=e=>Zo.has(e);function dl(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 ul(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 er(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 pl(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 fl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Zn,{value:me(t),onChange:n,label:e})}}function hl(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 ml={Design:wt,Animation:_e};function gl(e,t){return e.includes("Design")?t!=="Design":null}function tr({label:e}){return r(pn,{title:l(e),level:Ye(1)})}function nr({level:e,label:t}){return e===1?r(tr,{label:t}):r(ir,{label:t})}function Ze(e,t){return{type:"custom",[Y]:{label:e,level:t},render:()=>r(nr,{level:t,label:e})}}function S(e){return Ze(e,2)}function bl(e){return{type:"custom",render:()=>r(or,{text:e})}}function or({text:e}){return r("p",{className:"sf-note",children:l(e)})}function xl(e){return Ze(e,1)}function yl(e){return q(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function Sl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[Y]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function Cl(e){return q(e)!==null&&e?.designGroup!==void 0}const et=new Map;function _l(e){const t=et.get(e)??{type:"custom",[Y]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function rr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Il(e,t){return rr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function El(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function ir({label:e}){return r(fn,{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 w("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 Tl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Lo(n,t);return r(h,{label:l(e),icon:r(Lt,{}),changed:!i,action:r(y,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(wo)}),children:tt({swatches:Po,current:i?No:n??t??"",onPick:o,names:ko})})}}}function lr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=To(i,t);return r(h,{label:l(e),icon:r($t,{}),changed:!a,action:r(y,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Co)}),children:tt({swatches:Eo,current:a?Oo:Ro(i,t),onPick:o,names:Io})})}}}function Rl(e=n=>n,t){return B({_gSectionTheme:S(vo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(qn,{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(Fn,{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(h,{label:l(e),icon:P(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 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 m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?P(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?fe(d,{changed:!b,onReset:()=>p(null)}):r(y,{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:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function Ol(e){const t=K("Gap",r(Ee,{}),ce.min,ce.max,ce.step,bo[e],"px",(n,o)=>r(jo,{inherited:!yo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[xo]:e,render:n=>t.render({...n,value:So(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Q="Corners";function de(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Q),icon:r(Bt,{}),changed:i,action:fe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(ar,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=re()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function ar({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=ve(a)??[...Le];return r(Nn,{label:l(Q),value:s,corners:sn,onChange:d=>{const u=ve(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:A,radiusMax:ye,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return X({type:"custom",render:()=>r(J,{})},"always")}function sr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),i=typeof o=="number"?`${o}px`:l("not set");return r(y,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):N(i,l("Site styles")),onReset:n})}function cr(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:A}function dr(){return de({sidesKey:"sectionCornerSides",useFollowed:cr,useClosedReason:()=>lt()?l(it):null,mark:r(sr,{label:Q}),hint:r(ur,{})})}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 ur(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function wl(){return B({_gShape:S("Shape"),sectionCorners:dr(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const pr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function fr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function hr(){let e;try{const t=mo(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ho.line}function mr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=hr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=V(()=>yn(a,c)),u=pr();return r(h,{label:l("Border"),icon:r(vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Border"),value:a,each:s,onChange:f=>t(fr(f)),placeholder:{sides:xn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:fo})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(mr,{value:t,onChange:n,tier:e})})}function Pl(){return{_gMotion:S("Motion"),sectionAnimation:pe("Entrance",r(_e,{}),[...un],dn)}}function ue(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ae(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=D(),n=ue(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Ae(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return cn(a)?a:o}function gr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ue(),i=st(A),a=o?"Site":"Section";return r(y,{words:x()?.panel,label:l(e),changed:t,detail:N(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function br(){return r(T,{children:ue()?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 xr(){return de({sidesKey:"cardCornerSides",useFollowed:()=>st(A),mark:r(gr,{label:Q}),hint:r(br,{})})}function yr(){return{type:"custom",render:()=>r(gt,{})}}function kl(e){return{...e,render:t=>r(bt,{render:e.render,props:t})}}function Nl(){return{_gShape:S("Shape"),cardCorners:xr(),cardCornerSides:rt(),cardCornersApplyAll:yr()}}function Ll(){return k("Justify",r(Nt,{}),Xe,Xe[0].value)}function vl(){return k("Item alignment",r(Pt,{}),ao,"stretch")}function Al(){return k(po,r(ln,{}),ze,ze[0].value)}function Fl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=se.find(o=>o.value===e)??se[0];return r(h,{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:se.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:Sr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function Sr(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 Dl(){return k(so,r(Ee,{}),Ue,Ue[0].value)}function Bl(){return K(co,r(Jt,{}),$e,uo,1,$e)}function Hl(e){const t=pe(io,Wo("`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)."),lo(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Gl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Ne,{noun:a}),action:r(y,{words:x()?.panel,label:l(e),changed:!Do(c),detail:l("the Text style in Site styles"),onReset:()=>s(Fo),defaultAction:{onPress:()=>s(Ao),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ml(){return{_gCellWidth:S("Cell width"),gridSpan:k("Positions",r(Ie,{}),[{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=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Cr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=L()[c],u=le(void 0,d,s);return r(T,{children:M({min:e,max:t,step:n,value:le(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function _r({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=L()[t],c=le(void 0,a,n);return r(y,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function Ir(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(_r,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Cr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Kl(e){return{type:"custom",render:({value:t,onChange:n})=>r(Tr,{...e,value:t,onChange:n})}}function Er({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:P(t),action:r(y,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:te({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function Tr({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(Er,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Rr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Or={Top:Pe,Bottom:Re,Left:Oe,Right:we},wr=e=>{const t=Or[e];return r(t,{})};function Wl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Rr[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,z,O,ne=E)=>g("mobile",Ir({label:i(_),icon:wr(_),desktopKey:z,min:ne.min,max:ne.max,step:ne.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,R=_=>C?g("desktop",_):_;return B({...o?{_gSpacing:S("Padding")}:{},[t]:R(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:R(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const j=["top","right","bottom","left"],Pr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function kr(e,t,n){const o={};for(const i of j)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Nr({tier:e,o:t}){let n=null;try{n=re()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries(j.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries(j.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=V(()=>bn(a,c));return r(h,{label:l("Padding"),icon:r(qt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(gn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=kr(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 Ul(e={}){const t={...Pr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(j.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(Nr,{tier:s,o:n})};return o?g(s,d):d},a=()=>X({type:"custom",render:()=>r(J,{})},"always"),c=j.filter(s=>s!=="top");return B({...e.group===!1?{}:{_gSpacing:S("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 dt=e=>typeof e=="number"?e:null;function Lr(e,t,n){const o={};for(const i of["x","y"])n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function vr({o:e}){let t=null;try{t=re()}catch{t=null}const n=t?.values??{},o={x:dt(n[e.keys.x]),y:dt(n[e.keys.y])},i=l(e.label??"Position"),a=!!(o.x||o.y),c=u=>{const f=Lr(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},s=r(An,{label:i,value:o,onChange:c,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=r(y,{words:x()?.panel,label:i,changed:a,detail:"0 px, 0 px",onReset:()=>c({x:null,y:null})});return e.label===null?w("div",{className:"sf-position-line",children:[s,d]}):r(h,{label:i,icon:r(Yt,{}),changed:a,action:d,children:s})}function Xl(e){return{[e.keys.x]:{type:"custom",render:()=>r(vr,{o:e})},[e.keys.y]:{...X({type:"custom",render:()=>r(J,{})},"always"),reachedBy:e.keys.x}}}const Ar={contained:"Contained",page:"Page",full:"Full"},ee="Width";function $l(e,t=Bo,n=!0){const o=t.map(i=>({label:Ho[i]??Ar[i],value:i}));return B({...n?{_gWidth:S(ee)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(ee),icon:r(rn,{}),action:n?r(zo,{inherited:a?.inherited??!1,onReset:()=>i(Go),label:ee}):void 0,children:te({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:ee})})}})}function jl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:$,icon:P(r(jt,{})),action:o?o(a):void 0,children:te({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:$})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?ro:oo;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:$,onChange:i})})}}),n=()=>pe("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return B({_gHeight:S($),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Fr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Fr({onClear:e}){const t=L(),n=Qn(t),o=eo(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(y,{words:x()?.panel,label:l($),changed:n,detail:i,onReset:e})}function zl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Dr,{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:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:S(ae),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Dr({value:e,onChange:t,labelId:n,phone:o}){const i=L(),a=no(i),c=o?a.phone:e===!0;return r(h,{label:l(ae),labelId:n,icon:P(r(en,{})),action:w(T,{children:[o?r(y,{words:x()?.panel,label:l(ae),changed:to(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 Vl(){return{_gAnchor:S("Anchor"),anchor:er("Anchor name","e.g. about",Jo)}}function Yl(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(h,{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 v(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(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function ql(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:an(e),onChange:t})})}}}function Jl(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(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(kn,{id:c,checked:a,onChange:o})})}}}const Zl={follows:"fill"},Ql={follows:"ink"};function ea(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Br,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Br({label:e,part:t,icon:n,value:o,onChange:i}){const a=go(D().theme),c=t==="fill"?a.fill:a.ink;return r(Dn,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:N(c.toUpperCase(),l("Site styles")),onChange:i,onReset:()=>i("")})}const Hr=[{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=Hr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(Pn,{label:l(e),value:t,points:i,onChange:n})}function ta(){return X({type:"custom",render:()=>r(J,{})},"always")}const Gr=Ce([]);function na(e,{stacking:t,fallback:n=Tt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Et.includes(o)?o:n;return t?r(Mr,{label:e,value:a,onChange:i}):pt({label:e,value:a,onChange:i,points:Gr})}}}function Mr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(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:Ce(c,a)})}function pt({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(Zt,{}),hint:i?.title?l(i.title):void 0,children:ut({label:e,value:Rt(t),onChange:n,points:o})})}const oa={top:r(Kt,{}),right:r(Mt,{}),bottom:r(Ht,{}),left:r(Gt,{})};function ra(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 m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{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 m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:ut({label:e,value:m,onChange:p,points:u})})}}}const Kr="\0note";function k(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(h,{label:l(e),icon:P(t),children:r(Sn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Kr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function ia(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(Yn,{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 la(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Jn,{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 aa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function te({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 sa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function pe(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(h,{label:l(e),icon:P(t),children:te({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ca(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(Vn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const da={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ua({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 w(h,{label:l(n),icon:r(ie,{}),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&&w("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(ie,{}),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(h,{label:l("Longitude"),icon:r(ie,{}),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 Wr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ur(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 pa(e,t){return e===null?null:t>e?e:null}function Xr(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const fa={label:"Ticker items",icon:r(Vt,{})};function ha(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r($r,{label:e,icon:P(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function $r({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=oe(null),[s,d]=V(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Xr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(Cn,{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:Wr(n,s),onChange:p=>i(Ur(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,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function ma(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 ga(e){return{_gCards:S("Cards"),coverIndex:k("Cover image",r(zt,{}),$n,String(jn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:lr("Image background",_o),cardImage:zr(),spinOnHover:v("Rotate on hover",e?.spinDefault??!0,r(tn,{}))}}function ba(){return{outline:k("Card outline",r(nn,{}),Wn,Xn),indexBadge:k("Card number",r(Te,{}),Kn,Un),showBadge:v("Product badge",!0,r(Ne,{noun:"tag"}))}}function xa(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:S("Show on a card"),showCardPrice:v("Price",!0,r(Wt,{})),showCardFinishes:v("Finish swatches",!0,r(Ut,{})),showCardSizes:v("Sizes",n.showCardSizes,r(Qt,{})),showCardBuy:v("Buy button",n.showCardBuy,r(Ft,{})),showCardPage:v("Page button",n.showCardPage,r(ke,{}))}}function ya(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ft,{parts:e,changed:In(o),shown:a=>En(o,a),onPress:(a,c)=>i(On(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(jr,{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(h,{label:c,icon:r(kt,{}),changed:t,action:r(y,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(_n,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function jr({parts:e,desktopKey:t,value:n,onChange:o}){const i=L()[t];return r(ft,{parts:e,changed:Rn(n),shown:a=>Tn(i,n,a),onPress:(a,c)=>o(wn(n,a,c)),onReset:()=>o(Gn),detail:l("the same as Desktop")})}function zr(){return nt("Card image",{min:A,max:ye,step:xt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function Sa(){return de({sidesKey:"cornerSides",step:yt,useFollowed:()=>A,mark:r(Vr,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Vr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(y,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function Ca(){return{type:"custom",render:({value:e,onChange:t})=>r(Yr,{value:typeof e=="string"?e:"",onChange:t})}}function Yr({value:e,onChange:t}){const[n,o]=V(null),i=Se.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return w(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Dt,{}),children:w("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(h,{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(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Jo as ANCHOR_HINT,Yo as BOUND_TO_POST,sl as BOUND_TO_POST_NOTE,ml as BUCKET_ICONS,da as CUSTOM_FIELD_MEDIA,ua as CoordsField,oa as EDGE_ARROWS,vn as FOCAL_DEFAULT,Hr as FOCAL_POINTS,Y as FOLD_FIELD_MARKER,Zl as FOLLOWS_SITE_BUTTON,Ql as FOLLOWS_SITE_BUTTON_INK,ut as FocalPicker,ir as GroupLabel,qo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,el as Label,be as MEDIA_FIELD_MARKER,sa as MEDIA_TYPE_OPTIONS,cl as NOT_BOUND_TO_POST,or as PanelNoteLine,Tr as PhoneChoiceRow,Er as PhoneChoiceStrip,pt as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Ta as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Pr as SIDE_PAD_KEYS,tr as SectionHeading,te as Segmented,jo as SiteGapDefaultReset,M as Slider,tt as Swatches,Ea as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,fa as TICKER_ITEMS_ROW,$r as TextListField,zo as WidthDefaultReset,Xr as aimAfterListChange,Vl as anchorFields,N as backTo,Tl as backgroundField,vl as boxAlignField,Dl as boxBlockSpacingField,Ll as boxJustifyField,Bl as boxPhoneRowField,Fl as boxShareField,Al as boxWrapField,Sl as bucketHeader,xr as cardCornersField,lr as cardImageBackgroundField,zr as cardImageField,ga as cardMediaFields,Nl as cardShapeFields,xa as cardShowFields,ba as cardStyleFields,Ml as cellWidthFields,Jl as checkbox,ea as colorInput,pl as copyText,rt as cornerSidesField,de as cornersRowField,Yl as dateTime,_l as designGroupHeader,Hl as directionField,ya as displayFields,ra as edgePad,gl as entriesHiddenForTab,pa as focusAfterRemove,ta as focusKeptField,Il as foldMarker,q as foldMetaOf,rr as foldTitleOf,Ca as galleryLayoutField,Ol as gapField,S as group,jl as heightFields,me as hidableText,Qo as hintIsWhileTyping,P as iconOf,Sa as imageCornersField,al as inOwnBox,yl as isBucketHeader,Cl as isDesignGroupHeader,Uo as isNoGlyph,fl as linkField,ia as multiSelect,Wo as noGlyph,ql as pageBackgroundField,bl as panelNote,Kl as phoneChoiceField,Ir as phoneOverrideField,na as placementField,er as plainText,hl as plainTextarea,Xl as positionFields,Lr as positionPatch,nt as pxField,El as quietMarker,he as readHidable,Wr as rowText,la as searchSelect,xl as section,Pl as sectionAnimationFields,at as sectionBorderField,dr as sectionCornersField,wl as sectionShapeFields,Rl as sectionThemeFields,pe as segmented,k as select,Ur as setRowText,B as sharedStyleKinds,Ul as sidesPaddingFields,kr as sidesPaddingPatch,Gl as sizeField,K as slider,aa as sourceField,Wl as spacingFields,zl as stickFields,kl as templateField,dl as text,mt as textFieldIdentifier,ol as textFieldOffPage,il as textFieldPanelOnly,ha as textList,ma as textListRowField,ul as textarea,v as toggle,ca as upload,Xo as usePageWidthDetail,L as useSelectedProps,ot as useSelectedSibling,$o as useSiteGapDetail,$l as widthField,ll as withIdentifier,nl as withOffPage,rl as withPanelOnly,tl as withScaffold};
1
+ "use client";import{jsx as r,jsxs as w,Fragment as T}from"react/jsx-runtime";import{cloneElement as fe,useId as mt,useRef as oe,useState as V}from"react";import{useEasel as W,useSelectedFields as re}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Y,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as q,textFieldIdentifier as gt}from"efficient-easel/draw";import bt from"../../components/ApplyCornersToSiblings.js";import xt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as yt,CORNER_RADIUS_MAX as ye,CORNER_RADIUS_MIN as D}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as St,IMAGE_CORNERS_LABEL as Ct}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as _t}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as It,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as Se}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as Et,HERO_GROUP_PLACEMENTS as Tt,HERO_GROUP_PLACEMENT_DEFAULT as Rt,normalisePlacement as Ot,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import wt from"../../components/KeepHint.js";import Pt from"../../components/AnchorField.js";import{AdjustIcon as kt,AlignLeftIcon as Nt,EyeIcon as Lt,AlignSeparateIcon as vt,AnimationIcon as _e,BackgroundIcon as At,BorderAllIcon as Ft,BlockSectionIcon as Dt,CartIcon as Bt,ColumnWidthsIcon as Ie,ColumnsIcon as Ht,CornerIcon as Gt,DirectionDownIcon as Mt,DirectionLeftIcon as Kt,DirectionRightIcon as Wt,DirectionUpIcon as Ut,DollarIcon as Xt,FinishIcon as $t,GapIcon as Ee,GridIcon as jt,GroundIcon as zt,HashIcon as Te,HeightIcon as Vt,ImageIcon as Yt,ListIcon as qt,LocationIcon as ie,NudgeIcon as Jt,PaddingAllIcon as Zt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Qt,PlacementIcon as en,ProductSizeIcon as tn,StickyIcon as nn,RotateIcon as on,SquareIcon as rn,TypeIcon as ln,WidthIcon as an,WrapIcon as sn}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as cn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as dn,hasOwnSectionCorners as un,normalizeCornerSides as ve}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as pn,SECTION_MOTION_OPTIONS as fn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as Ae}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsField as h,SettingsGroupHead as hn,SettingsGroupSub as mn,SettingsBorder as gn,SettingsSegmented as bn,SettingsSides as xn,SettingsSidesEach as Fe,sidesStartEach as yn,SettingsSwitch as De,borderSides as Sn,borderStartEach as Cn}from"efficient-easel/panel";import{FieldSelect as _n,ListField as In}from"efficient-easel/fields";import{DisplayChips as En}from"efficient-shell/ui";import{desktopDisplayChanged as Tn,partShownOnDesktop as Rn,partShownOnPhone as On,phoneDisplayChanged as wn,withDesktopPart as Pn,withPhonePart as kn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Nn,Checkbox as Ln,CornersInput as vn,DateTimePicker as An,FOCAL_DEFAULT as Fn,PictureTiles as Be,PositionInput as Dn,Slider as Bn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as Hn}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as Gn,NoControlMark as J,noControlField as X}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{OWN_BOX_FIELD as Mn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Kn,phoneKey as B,resolvePhoneValue as le}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Wn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Un,CARD_OUTLINE_OPTIONS as Xn,DEFAULT_CARD_INDEX_FORMAT as $n,DEFAULT_CARD_OUTLINE as jn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as zn,DEFAULT_COVER_INDEX as Vn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Yn}from"efficient-easel/draw";import qn from"../../components/MediaUploadField.js";import Jn from"../../components/MultiSelectField.js";import Zn from"../../components/SectionThemePicker.js";import Qn from"../../components/SearchSelectField.js";import eo from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as to,resolveSectionMinHeight as no}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as ae,hasPhoneStick as oo,resolveSectionStick as ro}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as io,SECTION_MIN_HEIGHT_GROUP_LABEL as $,SECTION_SCREEN_PCT as lo}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as ao,containerDirectionPoints as so,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as co,BOX_BLOCK_SPACING_LABEL as uo,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as po,BOX_PHONE_ROW_MAX as fo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as se,BOX_WRAP_LABEL as ho,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as mo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as go,normalizeTheme as bo,siteButtonPaint as xo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as ce,CONTAINER_GAP_BUILT_IN as yo,GAP_FIELD_CONTAINER as So,hasOwnContainerGap as Co,resolveContainerGap as _o}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Io,CARD_IMAGE_BG_OFF as Eo,CARD_IMAGE_BG_SWATCH_NAMES as To,CARD_IMAGE_BG_SWATCHES as Ro,isCardImageBackgroundInheriting as Oo,cardImageBackgroundChoice as wo,THEME_CARD_IMAGE_BG as Po}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as ko,SECTION_BG_SWATCHES as No,SECTION_BG_SWATCH_NAMES as Lo,THEME_SECTION_BG as vo,isSectionBackgroundInheriting as Ao}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Fo}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Do,TYPE_SIZE_INHERIT as Bo,isTypeSizeInheriting as Ho}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Go,WIDTH_CHOICE_LABEL as Mo,WIDTH_INHERIT as Ko,resolveWidth as Wo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Uo}from"efficient-easel/style-clipboard";function G(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!q(n)&&Uo(n,`section:${t}`);return e}function tl({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Xo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function $o(e){return e.type===qe}function P(e){return $o(e)?void 0:e}function N(e,t){return l("{value} from {from}",{value:e,from:t})}function jo(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Wo(t,"full");return n==="page"?N(`${o}px`,l("the page")):n==="contained"?N(l("Contained"),l("the page")):N(l("Full"),l("the page"))}function zo(){const{blockGap:e}=H();return e===null?l("this container's own spacing"):N(`${e}px`,l("Styles"))}function Vo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:zo(),onReset:t})}function Yo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:jo(),onReset:t})}function L({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=he(e),f=oe(null),p=oe(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=mt(),_=i?er(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(wt,{children:l(i)}):void 0,z=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(ln,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:z,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":z,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:w("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function nl(e,t){return{...e,[xe]:t}}function ol(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function rl(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function il(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function ll(e){return!!e&&typeof e=="object"&&e[Je]===!0}function al(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 Ra,SCALAR_TEXT_CONTROLS as Oa}from"efficient-easel/draw";function sl(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Gn]:o,...i}=e;return{...i,[Mn]:!0,render:t}}const qo=new Set(Yn),v=(e,t)=>{const n={...t,[I]:e};if(!qo.has(e.control))return n;const o=t.render;return{...X(n,"authored-copy"),render:i=>r(Wn,{name:i.name,children:o(i)})}},cl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Jo={field:"source.slug",set:!0},dl={not:Jo},Zo="Select a word, then press the highlighter.",Qo=new Set([Zo]),er=e=>Qo.has(e);function ul(e,t,n){return v({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function pl(e,t,n){return v({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function fl(e,t,n){return v({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function hl(e,t,n){return v({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function ml(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(eo,{value:me(t),onChange:n,label:e})}}function gl(e,t,n){return v({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const bl={Design:kt,Animation:_e};function xl(e,t){return e.includes("Design")?t!=="Design":null}function tr({label:e}){return r(hn,{title:l(e),level:Ye(1)})}function nr({level:e,label:t}){return e===1?r(tr,{label:t}):r(ir,{label:t})}function Ze(e,t){return{type:"custom",[Y]:{label:e,level:t},render:()=>r(nr,{level:t,label:e})}}function S(e){return Ze(e,2)}function yl(e){return{type:"custom",render:()=>r(or,{text:e})}}function or({text:e}){return r("p",{className:"sf-note",children:l(e)})}function Sl(e){return Ze(e,1)}function Cl(e){return q(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function _l(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[Y]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function Il(e){return q(e)!==null&&e?.designGroup!==void 0}const et=new Map;function El(e){const t=et.get(e)??{type:"custom",[Y]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function rr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Tl(e,t){return rr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function Rl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function ir({label:e}){return r(mn,{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 w("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 Ol(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Ao(n,t);return r(h,{label:l(e),icon:r(At,{}),changed:!i,action:r(y,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(ko)}),children:tt({swatches:No,current:i?vo:n??t??"",onPick:o,names:Lo})})}}}function lr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Oo(i,t);return r(h,{label:l(e),icon:r(zt,{}),changed:!a,action:r(y,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Io)}),children:tt({swatches:Ro,current:a?Po:wo(i,t),onPick:o,names:To})})}}}function wl(e=n=>n,t){return G({_gSectionTheme:S(Fo),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(Bn,{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(h,{label:l(e),icon:P(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 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 m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?P(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?fe(d,{changed:!b,onReset:()=>p(null)}):r(y,{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:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function Pl(e){const t=K("Gap",r(Ee,{}),ce.min,ce.max,ce.step,yo[e],"px",(n,o)=>r(Vo,{inherited:!Co(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[So]:e,render:n=>t.render({...n,value:_o(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Q="Corners";function de(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Q),icon:r(Gt,{}),changed:i,action:fe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(ar,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=re()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function ar({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=ve(a)??[...Le];return r(vn,{label:l(Q),value:s,corners:dn,onChange:d=>{const u=ve(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:D,radiusMax:ye,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return X({type:"custom",render:()=>r(J,{})},"always")}function sr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),i=typeof o=="number"?`${o}px`:l("not set");return r(y,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):N(i,l("Styles")),onReset:n})}function cr(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:D}function dr(){return de({sidesKey:"sectionCornerSides",useFollowed:cr,useClosedReason:()=>lt()?l(it):null,mark:r(sr,{label:Q}),hint:r(ur,{})})}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(A())}function ur(){return r(T,{children:lt()?it:"Follows Styles ▸ Basics ▸ Corners until you set a number here."})}function kl(){return G({_gShape:S("Shape"),sectionCorners:dr(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const pr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function fr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function hr(){let e;try{const t=bo(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||go.line}function mr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=hr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=V(()=>Cn(a,c)),u=pr();return r(h,{label:l("Border"),icon:r(Ft,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(gn,{label:l("Border"),value:a,each:s,onChange:f=>t(fr(f)),placeholder:{sides:Sn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:mo})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(mr,{value:t,onChange:n,tier:e})})}function Nl(){return{_gMotion:S("Motion"),sectionAnimation:pe("Entrance",r(_e,{}),[...fn],pn)}}function ue(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ae(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=H(),n=ue(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Ae(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return un(a)?a:o}function gr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ue(),i=st(D),a=o?"Site":"Section";return r(y,{words:x()?.panel,label:l(e),changed:t,detail:N(`${i}px`,o?l("Styles"):l("the section")),onReset:n})}function br(){return r(T,{children:ue()?l("The section is full width, so this card follows Styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function xr(){return de({sidesKey:"cardCornerSides",useFollowed:()=>st(D),mark:r(gr,{label:Q}),hint:r(br,{})})}function yr(){return{type:"custom",render:()=>r(bt,{})}}function Ll(e){return{...e,render:t=>r(xt,{render:e.render,props:t})}}function vl(){return{_gShape:S("Shape"),cardCorners:xr(),cardCornerSides:rt(),cardCornersApplyAll:yr()}}function Al(){return k("Justify",r(vt,{}),Xe,Xe[0].value)}function Fl(){return k("Item alignment",r(Nt,{}),co,"stretch")}function Dl(){return k(ho,r(sn,{}),ze,ze[0].value)}function Bl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=se.find(o=>o.value===e)??se[0];return r(h,{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:se.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:Sr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function Sr(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 Hl(){return k(uo,r(Ee,{}),Ue,Ue[0].value)}function Gl(){return K(po,r(Qt,{}),$e,fo,1,$e)}function Ml(e){const t=pe(ao,Xo("`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)."),so(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Kl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Ne,{noun:a}),action:r(y,{words:x()?.panel,label:l(e),changed:!Ho(c),detail:l("the Text style in Styles"),onReset:()=>s(Bo),defaultAction:{onPress:()=>s(Do),title:l("Keep this section's own built-in size"),icon:r(Dt,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Wl(){return{_gCellWidth:S("Cell width"),gridSpan:k("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:_t},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function A(){let e=null;try{e=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Cr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=A()[c],u=le(void 0,d,s);return r(T,{children:M({min:e,max:t,step:n,value:le(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function _r({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=A()[t],c=le(void 0,a,n);return r(y,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function Ir(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(_r,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Cr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ul(e){return{type:"custom",render:({value:t,onChange:n})=>r(Tr,{...e,value:t,onChange:n})}}function Er({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:P(t),action:r(y,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:te({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function Tr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=A()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Er,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Rr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Or={Top:Pe,Bottom:Re,Left:Oe,Right:we},wr=e=>{const t=Or[e];return r(t,{})};function Xl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Rr[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,z,O,ne=E)=>g("mobile",Ir({label:i(_),icon:wr(_),desktopKey:z,min:ne.min,max:ne.max,step:ne.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,R=_=>C?g("desktop",_):_;return G({...o?{_gSpacing:S("Padding")}:{},[t]:R(a(s)),...C?{[B(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[B(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[B(u)]:c("Left",u,b,p)}:{},[f]:R(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[B(f)]:c("Right",f,b,p)}:{}}:{}})}const j=["top","right","bottom","left"],Pr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function kr(e,t,n){const o={};for(const i of j)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Nr({tier:e,o:t}){let n=null;try{n=re()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries(j.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries(j.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=V(()=>yn(a,c));return r(h,{label:l("Padding"),icon:r(Zt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(xn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=kr(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 $l(e={}){const t={...Pr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(j.map(s=>[s,B(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(Nr,{tier:s,o:n})};return o?g(s,d):d},a=()=>X({type:"custom",render:()=>r(J,{})},"always"),c=j.filter(s=>s!=="top");return G({...e.group===!1?{}:{_gSpacing:S("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 dt=e=>typeof e=="number"?e:null;function Lr(e,t,n){const o={};for(const i of["x","y"])n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function vr({o:e}){let t=null;try{t=re()}catch{t=null}const n=t?.values??{},o={x:dt(n[e.keys.x]),y:dt(n[e.keys.y])},i=l(e.label??"Position"),a=!!(o.x||o.y),c=u=>{const f=Lr(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},s=r(Dn,{label:i,value:o,onChange:c,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=r(y,{words:x()?.panel,label:i,changed:a,detail:"0 px, 0 px",onReset:()=>c({x:null,y:null})});return e.label===null?w("div",{className:"sf-position-line",children:[s,d]}):r(h,{label:i,icon:r(Jt,{}),changed:a,action:d,children:s})}function jl(e){return{[e.keys.x]:{type:"custom",render:()=>r(vr,{o:e})},[e.keys.y]:{...X({type:"custom",render:()=>r(J,{})},"always"),reachedBy:e.keys.x}}}const Ar={contained:"Contained",page:"Page",full:"Full"},ee="Width";function zl(e,t=Go,n=!0){const o=t.map(i=>({label:Mo[i]??Ar[i],value:i}));return G({...n?{_gWidth:S(ee)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(ee),icon:r(an,{}),action:n?r(Yo,{inherited:a?.inherited??!1,onReset:()=>i(Ko),label:ee}):void 0,children:te({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:ee})})}})}function Vl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:$,icon:P(r(Vt,{})),action:o?o(a):void 0,children:te({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:$})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?lo:io;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:$,onChange:i})})}}),n=()=>pe("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return G({_gHeight:S($),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Fr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Fr({onClear:e}){const t=A(),n=to(t),o=no(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(y,{words:x()?.panel,label:l($),changed:n,detail:i,onReset:e})}function Yl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Dr,{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:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:S(ae),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Dr({value:e,onChange:t,labelId:n,phone:o}){const i=A(),a=ro(i),c=o?a.phone:e===!0;return r(h,{label:l(ae),labelId:n,icon:P(r(nn,{})),action:w(T,{children:[o?r(y,{words:x()?.panel,label:l(ae),changed:oo(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})]})})}const ut="e.g. about";function ql(){return{_gAnchor:S("Anchor"),anchor:v({control:"plainText",label:"Name",placeholder:ut},{type:"custom",render:({value:e,onChange:t})=>r(Pt,{value:e,onChange:t,nameBox:(n,o)=>r(L,{value:n,onChange:o,label:"Name",placeholder:ut,hideable:!1,markup:!1})})})}}function Jl(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(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(An,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function F(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(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Zl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:cn(e),onChange:t})})}}}function Ql(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(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(Ln,{id:c,checked:a,onChange:o})})}}}const ea={follows:"fill"},ta={follows:"ink"};function na(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Br,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Br({label:e,part:t,icon:n,value:o,onChange:i}){const a=xo(H().theme),c=t==="fill"?a.fill:a.ink;return r(Hn,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:N(c.toUpperCase(),l("Styles")),onChange:i,onReset:()=>i("")})}const Hr=[{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 pt({label:e,value:t,onChange:n,points:o=Hr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(Nn,{label:l(e),value:t,points:i,onChange:n})}function oa(){return X({type:"custom",render:()=>r(J,{})},"always")}const Gr=Ce([]);function ra(e,{stacking:t,fallback:n=Rt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Tt.includes(o)?o:n;return t?r(Mr,{label:e,value:a,onChange:i}):ft({label:e,value:a,onChange:i,points:Gr})}}}function Mr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?Et(o?.data,a):[];return ft({label:e,value:t,onChange:n,points:Ce(c,a)})}function ft({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(en,{}),hint:i?.title?l(i.title):void 0,children:pt({label:e,value:Ot(t),onChange:n,points:o})})}const ia={top:r(Ut,{}),right:r(Wt,{}),bottom:r(Mt,{}),left:r(Kt,{})};function la(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 m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{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 m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:pt({label:e,value:m,onChange:p,points:u})})}}}const Kr="\0note";function k(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(h,{label:l(e),icon:P(t),children:r(_n,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Kr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function aa(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 sa(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Qn,{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 ca(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function te({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(bn,{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 da=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function pe(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(h,{label:l(e),icon:P(t),children:te({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ua(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(qn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const pa={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function fa({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 w(h,{label:l(n),icon:r(ie,{}),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&&w("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(ie,{}),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(h,{label:l("Longitude"),icon:r(ie,{}),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 Wr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ur(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 ha(e,t){return e===null?null:t>e?e:null}function Xr(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 ma={label:"Ticker items",icon:r(qt,{})};function ga(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r($r,{label:e,icon:P(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function $r({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=oe(null),[s,d]=V(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Xr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(In,{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:Wr(n,s),onChange:p=>i(Ur(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,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function ba(e,t){const n=`${e.label} — row ${t+1}`;return v({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(L,{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 xa(e){return{_gCards:S("Cards"),coverIndex:k("Cover image",r(Yt,{}),zn,String(Vn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:lr("Image background",Eo),cardImage:zr(),spinOnHover:F("Rotate on hover",e?.spinDefault??!0,r(on,{}))}}function ya(){return{outline:k("Card outline",r(rn,{}),Xn,jn),indexBadge:k("Card number",r(Te,{}),Un,$n),showBadge:F("Product badge",!0,r(Ne,{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:S("Show on a card"),showCardPrice:F("Price",!0,r(Xt,{})),showCardFinishes:F("Finish swatches",!0,r($t,{})),showCardSizes:F("Sizes",n.showCardSizes,r(tn,{})),showCardBuy:F("Buy button",n.showCardBuy,r(Bt,{})),showCardPage:F("Page button",n.showCardPage,r(ke,{}))}}function Ca(e,t="display"){const n=B(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ht,{parts:e,changed:Tn(o),shown:a=>Rn(o,a),onPress:(a,c)=>i(Pn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(jr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function ht({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Lt,{}),changed:t,action:r(y,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(En,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function jr({parts:e,desktopKey:t,value:n,onChange:o}){const i=A()[t];return r(ht,{parts:e,changed:wn(n),shown:a=>On(i,n,a),onPress:(a,c)=>o(kn(n,a,c)),onReset:()=>o(Kn),detail:l("the same as Desktop")})}function zr(){return nt("Card image",{min:D,max:ye,step:yt,hint:"Rounds the picture. The card's own corner is in Styles."})}function _a(){return de({sidesKey:"cornerSides",step:St,useFollowed:()=>D,mark:r(Vr,{label:Ct}),hint:l("Rounds the picture. Left alone it stays square.")})}function Vr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(y,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function Ia(){return{type:"custom",render:({value:e,onChange:t})=>r(Yr,{value:typeof e=="string"?e:"",onChange:t})}}function Yr({value:e,onChange:t}){const[n,o]=V(null),i=Se.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return w(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Ht,{}),children:w("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),It.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(jt,{}),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(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Jo as BOUND_TO_POST,cl as BOUND_TO_POST_NOTE,bl as BUCKET_ICONS,pa as CUSTOM_FIELD_MEDIA,fa as CoordsField,ia as EDGE_ARROWS,Fn as FOCAL_DEFAULT,Hr as FOCAL_POINTS,Y as FOLD_FIELD_MARKER,ea as FOLLOWS_SITE_BUTTON,ta as FOLLOWS_SITE_BUTTON_INK,pt as FocalPicker,ir as GroupLabel,Zo as HIGHLIGHT_HINT,L as HidableTextField,ge as LINK_FIELD_MARKER,tl as Label,be as MEDIA_FIELD_MARKER,da as MEDIA_TYPE_OPTIONS,dl as NOT_BOUND_TO_POST,or as PanelNoteLine,Tr as PhoneChoiceRow,Er as PhoneChoiceStrip,ft as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Oa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Pr as SIDE_PAD_KEYS,tr as SectionHeading,te as Segmented,Vo as SiteGapDefaultReset,M as Slider,tt as Swatches,Ra as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,ma as TICKER_ITEMS_ROW,$r as TextListField,Yo as WidthDefaultReset,Xr as aimAfterListChange,ql as anchorFields,N as backTo,Ol as backgroundField,Fl as boxAlignField,Hl as boxBlockSpacingField,Al as boxJustifyField,Gl as boxPhoneRowField,Bl as boxShareField,Dl as boxWrapField,_l as bucketHeader,xr as cardCornersField,lr as cardImageBackgroundField,zr as cardImageField,xa as cardMediaFields,vl as cardShapeFields,Sa as cardShowFields,ya as cardStyleFields,Wl as cellWidthFields,Ql as checkbox,na as colorInput,hl as copyText,rt as cornerSidesField,de as cornersRowField,Jl as dateTime,El as designGroupHeader,Ml as directionField,Ca as displayFields,la as edgePad,xl as entriesHiddenForTab,ha as focusAfterRemove,oa as focusKeptField,Tl as foldMarker,q as foldMetaOf,rr as foldTitleOf,Ia as galleryLayoutField,Pl as gapField,S as group,Vl as heightFields,me as hidableText,er as hintIsWhileTyping,P as iconOf,_a as imageCornersField,sl as inOwnBox,Cl as isBucketHeader,Il as isDesignGroupHeader,$o as isNoGlyph,ml as linkField,aa as multiSelect,Xo as noGlyph,Zl as pageBackgroundField,yl as panelNote,Ul as phoneChoiceField,Ir as phoneOverrideField,ra as placementField,fl as plainText,gl as plainTextarea,jl as positionFields,Lr as positionPatch,nt as pxField,Rl as quietMarker,he as readHidable,Wr as rowText,sa as searchSelect,Sl as section,Nl as sectionAnimationFields,at as sectionBorderField,dr as sectionCornersField,kl as sectionShapeFields,wl as sectionThemeFields,pe as segmented,k as select,Ur as setRowText,G as sharedStyleKinds,$l as sidesPaddingFields,kr as sidesPaddingPatch,Kl as sizeField,K as slider,ca as sourceField,Xl as spacingFields,Yl as stickFields,Ll as templateField,ul as text,gt as textFieldIdentifier,rl as textFieldOffPage,ll as textFieldPanelOnly,ga as textList,ba as textListRowField,pl as textarea,F as toggle,ua as upload,jo as usePageWidthDetail,A as useSelectedProps,ot as useSelectedSibling,zo as useSiteGapDetail,zl as widthField,al as withIdentifier,ol as withOffPage,il as withPanelOnly,nl as withScaffold};
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as E}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as X,textStylesCss as Y}from"../site-text-styles.js";import{pageWidthMarker as q,PAGE_WIDTH_ATTR as J,siteWidthTokens as Q,siteGutterTokens as U,heroBackgroundTokens as Z}from"../../../format/lib/content/page-width.js";import{siteBlockGapTokens as ee}from"../../../format/lib/content/container-gap.js";import{siteCardRadiusTokens as te}from"../../../format/lib/content/card-corners.js";import{usePreviewHeader as oe}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as re}from"../../../render/components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as ne,normalizeCornerStyle as ae,normalizeCornerRadius as se,themeColorStyle as ie,typeSizesStyle as de,headingTypographyStyle as ce,normalizeHeadingTypography as le,themeAccentStyle as pe,themeButtonStyle as he,themePresetAccentVars as me,themeSurfaceStyle as fe,siteCornerRadiusTokens as A,shadowColorTokens as ue,headingCompressionAttr as ge,cardShadowAttr as Se,cardGapAttr as ye,hoverEffectAttr as xe}from"../../../format/lib/theme.js";import{fontRoleStyle as Te}from"../../../format/lib/fonts.js";import{wordStyleTokens as ke}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Ce,pageHasHeaderSection as P,pageTakesTopSpace as Ee,topSpaceMarker as Ae,TOP_SPACE_ATTR as Pe,HEADER_CLEARANCE_CLASS as ve}from"../../../render/lib/puck/header-clearance.js";import{leadSectionInk as _e,HEADER_INK_ATTR as Re}from"../../../render/lib/puck/header-ink.js";import{useEasel as we}from"efficient-easel/easel";import{pageBackgroundVars as Ie}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as We}from"../../../render/lib/puck/page-frame.js";import{EditingBridgesProvider as Be}from"../../../render/lib/puck/editing-bridges.js";import Ge from"../../components/SectionTextPartBridge.js";const He={SectionTextParts:Ge};import{PageWidthWrapper as at,PublishedPageFrame as st,pageWidthTokens as it}from"../../../render/lib/puck/page-frame.js";const Ne="color-mix(in oklab, var(--bg) 40%, #ffffff)",be="12vh";function De({style:o,frameClass:n,children:d}){const{appState:a}=we(g=>g),t=a.data.content,s=a.data.root;if(Ce(t))return r("div",{className:`sf-themed-content${n?` ${n}`:""}`,style:{...o,background:Ne,minHeight:"100vh",paddingBottom:be},children:r("div",{style:{background:"var(--bg)"},children:d})});const c=P(t)&&Ee(s,t),l=P(t)?Ae(s,t):null,m=l?{[Pe]:l}:null,p=q(s?.widthChoice),f=p?{[J]:p}:null,h=c?null:_e(t),u=h?{[Re]:h}:null;return r("div",{className:`sf-themed-content${c?` ${ve}`:""}${n?` ${n}`:""}`,style:o,...u,...m,...f,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:d})})}function tt({propsTheme:o,propsFonts:n,propsCornerStyle:d,propsCornerRadiusPx:a,propsHeadingCompression:t,propsHeadingTypography:s,widthMode:c,fullWidth:l,pageWidth:m,pageBackground:p,chromeInheritsSiteBackground:f,suppressPreviewNav:h,footer:u,overlay:g,children:v}){const{theme:_,fonts:R,sizes:w,cornerRadiusPx:I,cardShadow:S,shadowColor:W,cardGap:B,hoverEffect:y,headingCompression:G,siteWidth:H,siteGutter:N,blockGap:b,headingTypography:D,heroBackgroundFollowsWidth:z,photographyGrayscale:V,textStyles:$,wordStyles:j,themeFromDocument:e}=oe(),i=e?o:_,F=e?n:R,L=e?void 0:w,x=e?a===void 0?ne[ae(d)]:se(a):I,O=e?t:G,T=e?s:D,k=[Y(X(e?void 0:$)),K(le(T).italicStrong)].filter(Boolean).join(`
1
+ import{jsx as r,jsxs as E}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as X,textStylesCss as Y}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as q,PAGE_WIDTH_ATTR as J,siteWidthTokens as Q,siteGutterTokens as U,heroBackgroundTokens as Z}from"../../../format/lib/content/page-width.js";import{siteBlockGapTokens as ee}from"../../../format/lib/content/container-gap.js";import{siteCardRadiusTokens as te}from"../../../format/lib/content/card-corners.js";import{usePreviewHeader as oe}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as re}from"../../../render/components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as ne,normalizeCornerStyle as ae,normalizeCornerRadius as se,themeColorStyle as ie,typeSizesStyle as de,headingTypographyStyle as ce,normalizeHeadingTypography as le,themeAccentStyle as pe,themeButtonStyle as he,themePresetAccentVars as me,themeSurfaceStyle as fe,siteCornerRadiusTokens as A,shadowColorTokens as ue,headingCompressionAttr as ge,cardShadowAttr as Se,cardGapAttr as ye,hoverEffectAttr as xe}from"../../../format/lib/theme.js";import{fontRoleStyle as Te}from"../../../format/lib/fonts.js";import{wordStyleTokens as ke}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Ce,pageHasHeaderSection as P,pageTakesTopSpace as Ee,topSpaceMarker as Ae,TOP_SPACE_ATTR as Pe,HEADER_CLEARANCE_CLASS as ve}from"../../../render/lib/puck/header-clearance.js";import{leadSectionInk as _e,HEADER_INK_ATTR as Re}from"../../../render/lib/puck/header-ink.js";import{useEasel as we}from"efficient-easel/easel";import{pageBackgroundVars as Ie}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as We}from"../../../render/lib/puck/page-frame.js";import{EditingBridgesProvider as Be}from"../../../render/lib/puck/editing-bridges.js";import Ge from"../../components/SectionTextPartBridge.js";const He={SectionTextParts:Ge};import{PageWidthWrapper as at,PublishedPageFrame as st,pageWidthTokens as it}from"../../../render/lib/puck/page-frame.js";const Ne="color-mix(in oklab, var(--bg) 40%, #ffffff)",be="12vh";function De({style:o,frameClass:n,children:d}){const{appState:a}=we(g=>g),t=a.data.content,s=a.data.root;if(Ce(t))return r("div",{className:`sf-themed-content${n?` ${n}`:""}`,style:{...o,background:Ne,minHeight:"100vh",paddingBottom:be},children:r("div",{style:{background:"var(--bg)"},children:d})});const c=P(t)&&Ee(s,t),l=P(t)?Ae(s,t):null,m=l?{[Pe]:l}:null,p=q(s?.widthChoice),f=p?{[J]:p}:null,h=c?null:_e(t),u=h?{[Re]:h}:null;return r("div",{className:`sf-themed-content${c?` ${ve}`:""}${n?` ${n}`:""}`,style:o,...u,...m,...f,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:d})})}function tt({propsTheme:o,propsFonts:n,propsCornerStyle:d,propsCornerRadiusPx:a,propsHeadingCompression:t,propsHeadingTypography:s,widthMode:c,fullWidth:l,pageWidth:m,pageBackground:p,chromeInheritsSiteBackground:f,suppressPreviewNav:h,footer:u,overlay:g,children:v}){const{theme:_,fonts:R,sizes:w,cornerRadiusPx:I,cardShadow:S,shadowColor:W,cardGap:B,hoverEffect:y,headingCompression:G,siteWidth:H,siteGutter:N,blockGap:b,headingTypography:D,heroBackgroundFollowsWidth:z,photographyGrayscale:V,textStyles:$,wordStyles:j,themeFromDocument:e}=oe(),i=e?o:_,F=e?n:R,L=e?void 0:w,x=e?a===void 0?ne[ae(d)]:se(a):I,O=e?t:G,T=e?s:D,k=[Y(X(e?void 0:$)),K(le(T).italicStrong)].filter(Boolean).join(`
2
2
  `),C=We({widthMode:c,fullWidth:l,pageWidth:m}),M={...ie(i),...de(L),...ce(T),...C.style,...f?{}:Ie(p)};return E("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...Te(F),...ke(e?null:j),...pe(i),...he(i),...me(i),...fe(i),...A(x),...te(A(x)),...ue(e?void 0:S,e?void 0:W,e?void 0:y),...Q(e?void 0:H),...U(e?void 0:N),...ee(e?void 0:b),...Z(e?void 0:z)},"data-sf-headings":ge(O),"data-sf-card-shadow":e?void 0:Se(S),"data-sf-card-gap":e?void 0:ye(B),"data-sf-card-hover":e?void 0:xe(y),onClickCapture:h,children:[k?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:k}}):null,r(re,{grayscale:e?void 0:V,children:E(Be,{value:He,children:[r(De,{style:M,frameClass:C.frameClass,children:v}),u,g]})})]})}const ot=o=>{o.target?.closest?.("a")&&o.preventDefault()};export{He as EDITING_BRIDGES,De as EditorPageBody,tt as EditorThemedBody,at as PageWidthWrapper,st as PublishedPageFrame,Ne as SECTION_PREVIEW_CANVAS,be as SECTION_PREVIEW_CANVAS_TAIL,it as pageWidthTokens,ot as suppressPreviewNav};
@@ -1 +1 @@
1
- "use client";import{jsx as c}from"react/jsx-runtime";import{usePreviewDevice as y}from"efficient-easel/draw/client";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as S,CONTENT_INSIDE_BACKGROUND_HINT as I,ContentWidthRow as C,WIDTH_GROUP_LABEL as E,WIDTH_PHONE_HINT as T}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as p}from"../../../format/lib/content/page-width.js";import{FOLLOW_SITE as m,WIDTH_CHOICE_LABEL as H,resolveSectionWidth as f}from"../../../format/lib/content/section-width.js";import{say as h}from"../../../format/lib/editor-words.js";import{group as D,sharedStyleKinds as N,useSelectedProps as W,useSelectedSibling as O}from"./controls.js";import{NoControlMark as g,noControlField as b}from"efficient-easel/screen/lib/puck/panel-no-control-mark";const l=t=>h(H[t==="content"?"page":"full"]),x=t=>`${t} ${h("from Site styles")}`;function _(){const{siteWidth:t,sectionBackgroundWidth:n,sectionContentWidth:i}=w();return{px:typeof t=="number"?t:p.default,background:n??"full",content:i??"content"}}function k(){try{return y()==="mobile"}catch{return!1}}function B({type:t,onChange:n}){const i=W(),o=_(),e=k(),d=f(t,i).background;return c(S,{value:d??o.background,changed:d!==null,detail:x(l(o.background)),onChange:r=>n(r),onReset:()=>n(m),disabled:e})}function P({type:t,onChange:n}){const i=W(),[,o]=O("contentMax"),e=_(),d=k(),r=f(t,i),u=(r.background??e.background)==="content",a=r.content??e.content;return c(C,{mode:u&&a==="full"?"content":a,px:r.contentMax??e.px,max:u?e.px:p.max,changed:r.content!==null,detail:x(e.content==="full"?l("full"):`${l("content")} ${e.px}px`),fullClosed:u,disabled:d,hint:d?T:u?I:void 0,onMode:s=>{n(s),s==="full"&&o(null)},onPx:s=>{n("content"),o(s===e.px?null:s)},onReset:()=>{n(m),o(null)}})}function R(t){return N({_gWidth:D(E),backgroundWidth:{type:"custom",render:({onChange:n})=>c(B,{type:t,onChange:n})},contentWidth:{type:"custom",render:({onChange:n})=>c(P,{type:t,onChange:n})},contentMax:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"contentWidth"},widthMode:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"backgroundWidth"}})}const V=Object.keys(R(""));export{V as SECTION_WIDTH_FIELD_KEYS,R as sectionWidthFields};
1
+ "use client";import{jsx as c}from"react/jsx-runtime";import{usePreviewDevice as y}from"efficient-easel/draw/client";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as S,CONTENT_INSIDE_BACKGROUND_HINT as I,ContentWidthRow as C,WIDTH_GROUP_LABEL as E,WIDTH_PHONE_HINT as T}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as p}from"../../../format/lib/content/page-width.js";import{FOLLOW_SITE as m,WIDTH_CHOICE_LABEL as H,resolveSectionWidth as f}from"../../../format/lib/content/section-width.js";import{say as h}from"../../../format/lib/editor-words.js";import{group as D,sharedStyleKinds as N,useSelectedProps as W,useSelectedSibling as O}from"./controls.js";import{NoControlMark as g,noControlField as b}from"efficient-easel/screen/lib/puck/panel-no-control-mark";const l=t=>h(H[t==="content"?"page":"full"]),x=t=>`${t} ${h("from Styles")}`;function _(){const{siteWidth:t,sectionBackgroundWidth:n,sectionContentWidth:i}=w();return{px:typeof t=="number"?t:p.default,background:n??"full",content:i??"content"}}function k(){try{return y()==="mobile"}catch{return!1}}function B({type:t,onChange:n}){const i=W(),e=_(),o=k(),d=f(t,i).background;return c(S,{value:d??e.background,changed:d!==null,detail:x(l(e.background)),onChange:r=>n(r),onReset:()=>n(m),disabled:o})}function P({type:t,onChange:n}){const i=W(),[,e]=O("contentMax"),o=_(),d=k(),r=f(t,i),u=(r.background??o.background)==="content",a=r.content??o.content;return c(C,{mode:u&&a==="full"?"content":a,px:r.contentMax??o.px,max:u?o.px:p.max,changed:r.content!==null,detail:x(o.content==="full"?l("full"):`${l("content")} ${o.px}px`),fullClosed:u,disabled:d,hint:d?T:u?I:void 0,onMode:s=>{n(s),s==="full"&&e(null)},onPx:s=>{n("content"),e(s===o.px?null:s)},onReset:()=>{n(m),e(null)}})}function R(t){return N({_gWidth:D(E),backgroundWidth:{type:"custom",render:({onChange:n})=>c(B,{type:t,onChange:n})},contentWidth:{type:"custom",render:({onChange:n})=>c(P,{type:t,onChange:n})},contentMax:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"contentWidth"},widthMode:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"backgroundWidth"}})}const V=Object.keys(R(""));export{V as SECTION_WIDTH_FIELD_KEYS,R as sectionWidthFields};
@@ -1,6 +1,6 @@
1
1
  import { type FontsValue } from "../../format/lib/fonts.js";
2
2
  import type { SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
3
- import { type OldSiteText, type StoredTextStyle } from "./site-text-styles.js";
3
+ import { type OldSiteText, type StoredTextStyle } from "../../render/lib/text-styles/site-text-styles.js";
4
4
  import { type HeadingCompression, type ResolvedHeadingTypography, type SizesValue } from "../../format/lib/theme.js";
5
5
  export type SiteTextStylesWriter = {
6
6
  fonts: FontsValue;
@@ -1 +1 @@
1
- "use client";import{useEasel as E}from"efficient-easel/easel";import{usePreviewHeader as P}from"../../render/components/PreviewHeaderContext.js";import{normalizeFonts as R}from"../../format/lib/fonts.js";import{listChangePatch as A,resolveTextStyles as I,textStylesToOld as L}from"./site-text-styles.js";import{DEFAULT_SIZES as O,normalizeHeadingCompression as U,normalizeHeadingTypography as W}from"../../format/lib/theme.js";function B({themeFromDocument:t,persist:c}){const{appState:g,dispatch:l}=E(s=>s),{fonts:f,setFonts:h,sizes:S,setSizes:T,headingCompression:z,setHeadingCompression:m,headingTypography:C,setHeadingTypography:u,textStyles:v,setTextStyles:H}=P(),r=g.data,e=r.root?.props??{},i=t?R(e.fonts):f,p=t?O:S,n=t?U(e.headingCompression):z,a=t?W(e.headingTypography):C,y={fonts:i,sizes:p,compression:n,typography:a},w=t?e.textStyles:v,d=s=>l({type:"replaceRoot",root:{...r.root,props:{...e,...s}},recordHistory:!0});return{fonts:i,sizes:p,compression:n,typography:a,old:y,saved:w,write:(s,x)=>{const o=L(I(s.saved,s.old),s.old);t?d({textStyles:s.saved,fonts:o.fonts,headingCompression:o.compression,headingTypography:o.typography}):(H(s.saved),h(o.fonts),T(o.sizes),m(o.compression),u(o.typography)),c(A(s,y),x)},writeRoot:d}}export{B as useSiteTextStylesWriter};
1
+ "use client";import{useEasel as E}from"efficient-easel/easel";import{usePreviewHeader as P}from"../../render/components/PreviewHeaderContext.js";import{normalizeFonts as R}from"../../format/lib/fonts.js";import{listChangePatch as A,resolveTextStyles as I,textStylesToOld as L}from"../../render/lib/text-styles/site-text-styles.js";import{DEFAULT_SIZES as O,normalizeHeadingCompression as U,normalizeHeadingTypography as W}from"../../format/lib/theme.js";function B({themeFromDocument:t,persist:c}){const{appState:g,dispatch:l}=E(s=>s),{fonts:f,setFonts:h,sizes:S,setSizes:T,headingCompression:z,setHeadingCompression:m,headingTypography:C,setHeadingTypography:u,textStyles:v,setTextStyles:H}=P(),r=g.data,e=r.root?.props??{},i=t?R(e.fonts):f,p=t?O:S,n=t?U(e.headingCompression):z,a=t?W(e.headingTypography):C,y={fonts:i,sizes:p,compression:n,typography:a},w=t?e.textStyles:v,d=s=>l({type:"replaceRoot",root:{...r.root,props:{...e,...s}},recordHistory:!0});return{fonts:i,sizes:p,compression:n,typography:a,old:y,saved:w,write:(s,x)=>{const o=L(I(s.saved,s.old),s.old);t?d({textStyles:s.saved,fonts:o.fonts,headingCompression:o.compression,headingTypography:o.typography}):(H(s.saved),h(o.fonts),T(o.sizes),m(o.compression),u(o.typography)),c(A(s,y),x)},writeRoot:d}}export{B as useSiteTextStylesWriter};
@@ -1,83 +1 @@
1
- import { type TextStyle, type TextStyleCase } from "efficient-easel/text-styles";
2
- import { type FontRole, type FontsValue } from "../../format/lib/fonts.js";
3
- import { type PartStyle } from "../../render/lib/puck/part-styles.js";
4
- import { faceClassOf } from "../../format/lib/text-style-face.js";
5
- export { faceClassOf };
6
- import type { SiteThemeRow, SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
7
- import { type HeadingCompression, type ResolvedHeadingTypography, type SizesValue } from "../../format/lib/theme.js";
8
- export type StoredTextStyleValues = {
9
- font?: string;
10
- color?: string;
11
- size?: number;
12
- weight?: number;
13
- italic?: boolean;
14
- lineHeight?: number;
15
- letterSpacing?: number;
16
- paragraphSpacing?: number;
17
- letterCase?: TextStyleCase;
18
- largestSize?: number;
19
- sizePhone?: number;
20
- };
21
- export type StoredTextStyle = {
22
- id: string;
23
- kind: "heading" | "body";
24
- name: string;
25
- values: StoredTextStyleValues;
26
- auto?: (keyof StoredTextStyleValues)[];
27
- };
28
- export type OldSiteText = {
29
- fonts: Partial<FontsValue> | Record<string, string>;
30
- sizes: Partial<SizesValue> | Record<string, number | null>;
31
- compression: string;
32
- typography: Partial<ResolvedHeadingTypography> | Record<string, unknown>;
33
- };
34
- export declare function textStylesFromOld(old: OldSiteText): StoredTextStyle[];
35
- export declare function storedTextStyles(value: unknown): StoredTextStyle[];
36
- export declare function resolveTextStyles(saved: unknown, old: OldSiteText): StoredTextStyle[];
37
- export declare function applyListChange({ saved, old, cur, next, sizeOf, }: {
38
- saved: unknown;
39
- old: OldSiteText;
40
- cur: readonly TextStyle[];
41
- next: readonly TextStyle[];
42
- sizeOf: (style: StoredTextStyle) => number;
43
- }): {
44
- saved: StoredTextStyle[];
45
- old: OldSiteText;
46
- };
47
- export declare function listChangePatch(next: {
48
- saved: StoredTextStyle[];
49
- old: OldSiteText;
50
- }, prev: OldSiteText): SiteThemeRowPatch;
51
- export declare function toPanelStyles(stored: readonly StoredTextStyle[], sizeOf: (s: StoredTextStyle) => number): TextStyle[];
52
- export declare function fromPanelStyles(list: readonly TextStyle[], sizeOf: (s: StoredTextStyle) => number): StoredTextStyle[];
53
- export type SiteTextSeed = {
54
- fonts: FontsValue;
55
- sizes: SizesValue;
56
- compression: HeadingCompression;
57
- typography: ResolvedHeadingTypography;
58
- textStyles: unknown;
59
- };
60
- export declare function siteTextFromRow(row: Partial<SiteThemeRow>): SiteTextSeed;
61
- export declare function textStylesToOld(list: readonly StoredTextStyle[], prev: OldSiteText): OldSiteText;
62
- export declare function themeWithTextStyles<T extends {
63
- fonts?: unknown;
64
- sizes?: unknown;
65
- headingCompression?: unknown;
66
- headingTypography?: unknown;
67
- textStyles?: unknown;
68
- }>(theme: T): T;
69
- export declare function textStylesCss(list: readonly StoredTextStyle[]): string;
70
- export declare function accentItalicCss(italic: boolean | null | undefined): string;
71
- export declare function styleIdOfRole(role: FontRole | null | undefined): string | undefined;
72
- export declare function partStyleToTextStyleValues(style: PartStyle): StoredTextStyleValues;
73
- export declare function hasStyleChange(style: PartStyle): boolean;
74
- export declare function pushIntoStyle({ saved, old, styleId, values, }: {
75
- saved: unknown;
76
- old: OldSiteText;
77
- styleId: string;
78
- values: StoredTextStyleValues;
79
- }): {
80
- saved: StoredTextStyle[];
81
- old: OldSiteText;
82
- };
83
- export declare function eyebrowStyleId(list: readonly Pick<StoredTextStyle, "id" | "kind">[]): string;
1
+ export * from "../../render/lib/text-styles/site-text-styles.js";
@@ -1,2 +1 @@
1
- import{defaultTextStyles as J}from"efficient-easel/text-styles";import{textStyleCaseCss as X}from"efficient-easel/draw";import{FONT_OPTIONS as Y,normalizeFonts as F}from"../../format/lib/fonts.js";import{PART_PHONE_MAX_CSS as G,STYLE_ID_OF_ROLE as U,TEXT_STYLE_ATTR as W,partSpacingOf as Z}from"../../render/lib/puck/part-styles.js";import{faceClassOf as I}from"../../format/lib/text-style-face.js";import{compressionMetrics as q,headingTypographyFromRow as B,normalizeHeadingCompression as C,normalizeSizes as L}from"../../format/lib/theme.js";const T=e=>e==="sentence"?"none":void 0,h=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,_=e=>typeof e=="string"&&e?e:void 0,j=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function p(e){const i={};for(const n of j)e[n]!==void 0&&(i[n]=e[n]);return i}function H(e,i){const{auto:n,...t}=e,s=new Set(i??[]),r=j.filter(o=>s.has(o)&&e.values[o]===void 0);return r.length?{...t,auto:r}:t}function O(e){const i=e.fonts,n=e.sizes,t=e.typography,s=q(e.compression),r={"heading-1":{font:_(i.heading),size:h(n.headingLarge),weight:h(t.weight),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:T(t.case),largestSize:h(t.maxPx)},"heading-2":{font:_(i.heading2),size:h(n.headingMedium),weight:h(t.weight2),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:T(t.case2)},"heading-3":{font:_(i.heading3),size:h(n.headingSmall),weight:h(t.weight3),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:T(t.case3)},"body-1":{font:_(i.body),size:h(n.body)},"body-5":{font:_(i.label),size:h(n.label)}};return J().map(({id:o,kind:l,name:d})=>({id:o,kind:l,name:d,values:p(r[o]??{})}))}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=>H({...n,values:p(n.values??{})},Array.isArray(n.auto)?n.auto:void 0)):null}function de(e){return $(e)??[]}function w(e,i){const n=O(i),t=$(e);return t?t.map(s=>{const r={...P(n,s.id)};for(const o of s.auto??[])delete r[o];return{...s,values:p({...r,...s.values})}}):n}const P=(e,i)=>e.find(n=>n.id===i)?.values??{},R=["heading-1","heading-2","heading-3"];function ce({saved:e,old:i,cur:n,next:t,sizeOf:s}){const r=O(i),o=$(e)??r.map(a=>({...a,values:{}})),l=w(o,i),d=[],y=t.map(a=>{const c=n.find(f=>f.id===a.id),b=o.find(f=>f.id===a.id);if(!c||!b)return K([a],s)[0];const u={...b.values},z=new Set(b.auto??[]),v=a.values,A=c.values,N=[...new Set([...Object.keys(v),...Object.keys(A)])].filter(f=>JSON.stringify(v[f])!==JSON.stringify(A[f]));N.sort((f,m)=>+(f==="letterSpacing")-+(m==="letterSpacing"));for(const f of N){const m=f==="lineSpacing"?"lineHeight":f,k=v[f];if(k===void 0){delete u[m],P(r,a.id)[m]!==void 0&&(d.push([a.id,m]),z.add(m));continue}if(z.delete(m),f==="lineSpacing")u.lineHeight=x(k/100,3);else if(f==="letterSpacing"){const V=l.find(D=>D.id===a.id),E=s({...a,values:p({...V?.values??{},...u})});u.letterSpacing=E?x(k/E,4):0}else u[m]=k}return H({id:a.id,kind:a.kind,name:a.name,values:p(u)},z)});let g=i.compression;if(d.some(([a,c])=>(c==="lineHeight"||c==="letterSpacing")&&R.includes(a))&&C(g)!=="normal"){for(const a of R){const c=y.find(u=>u.id===a);if(!c)continue;const b={...c.values};for(const u of["lineHeight","letterSpacing"])d.some(([z,v])=>z===a&&v===u)||b[u]===void 0&&!(c.auto??[]).includes(u)&&(b[u]=P(r,a)[u]);c.values=p(b)}g="normal"}return{saved:y,old:{...i,compression:g}}}function ue(e,i){const n={text_styles:e.saved};return e.old.compression!==i.compression&&(n.heading_compression=C(e.old.compression)),n}const x=(e,i)=>Number(e.toFixed(i));function fe(e,i){return e.map(n=>{const{lineHeight:t,letterSpacing:s,...r}=n.values,o={...r};return t!==void 0&&(o.lineSpacing=x(t*100,1)),s!==void 0&&(o.letterSpacing=x(s*i(n),2)),{id:n.id,kind:n.kind,name:n.name,values:o}})}function K(e,i){return e.map(n=>{const{lineSpacing:t,letterSpacing:s,...r}=n.values,o={id:n.id,kind:n.kind,name:n.name,values:p({...r})},l={...o.values};if(t!==void 0&&(l.lineHeight=x(t/100,3)),s!==void 0){const d=i({...o,values:{...o.values}});l.letterSpacing=d?x(s/d,4):0}return{...o,values:p(l)}})}function ge(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: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:B(e)},n=e.text_styles??null,t=Array.isArray(n)?M(w(n,i),i):i;return{fonts:F(t.fonts),sizes:L(t.sizes),compression:C(t.compression),typography:t.typography,textStyles:n}}function M(e,i){const n=a=>e.find(c=>c.id===a)?.values??{},t=n("heading-1"),s=n("heading-2"),r=n("heading-3"),o=n("body-1"),l=n("body-5"),d=i.fonts,y=i.sizes,g=i.typography,S=a=>a==="none"?"sentence":"authored";return{fonts:{...d,heading:t.font??d.heading,heading2:s.font??t.font??d.heading2,heading3:r.font??t.font??d.heading3,body:o.font??d.body,label:l.font??d.label},sizes:{...y,headingLarge:t.size??null,headingMedium:s.size??null,headingSmall:r.size??null,body:o.size??null,label:l.size??null},compression:i.compression,typography:{...g,case:S(t.letterCase),weight:t.weight??null,maxPx:t.largestSize??null,weight2:s.weight??null,weight3:r.weight??null,case2:S(s.letterCase),case3:S(r.letterCase)}}}function pe(e){const i=$(e.textStyles);if(!i||i.every(s=>Object.keys(s.values).length===0&&!s.auto))return e;const n={fonts:e.fonts??{},sizes:e.sizes??{},compression:String(e.headingCompression??"normal"),typography:e.headingTypography??{}},t=M(w(i,n),n);return{...e,fonts:t.fonts,sizes:t.sizes,headingCompression:t.compression,headingTypography:t.typography}}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 ee(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 he(e){const i=[];for(const n of e){const t=n.values,s=`.${I(n)}`,r=`[${W}="${n.id}"]`,o=`${s}, ${r}`,l=[],d=t.font!==void 0?Y.find(a=>a.key===t.font)?.cssVar:void 0;if(d&&l.push(`font-family: var(${d})`),t.size!==void 0){const a=t.largestSize!==void 0?Math.min(t.size,t.largestSize):t.size;l.push(`font-size: ${a}px`)}const y=t.color!==void 0?Q(t.color):null;y&&l.push(`color: ${y}`),t.italic===!0&&l.push("font-style: italic"),t.weight!==void 0&&l.push(`font-weight: ${t.weight}`);const g=[];t.lineHeight!==void 0&&g.push(`line-height: ${t.lineHeight}`),t.letterSpacing!==void 0&&g.push(`letter-spacing: ${t.letterSpacing}em`),n.kind==="body"&&l.push(...g);const S=X(t.letterCase);if(S&&l.push(`text-transform: ${S}`),t.paragraphSpacing&&l.push(`--sf-part-para: ${t.paragraphSpacing}px`),l.length&&i.push(`${o} { ${l.join("; ")} }`),n.kind==="heading"&&g.length&&i.push(`${o}, ${s}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${g.join("; ")} }`),t.paragraphSpacing&&i.push(...ee(`:is(${o})`)),t.sizePhone!==void 0){const a=ne[n.id],c=[`${o} { font-size: ${t.sizePhone}px }`];a&&c.push(`.sf-themed-content { --size-${a}: ${t.sizePhone}px !important }`),i.push(`@media ${G} { ${c.join(" ")} }`)}}return i.join(`
2
- `)}const ne={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function me(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function ye(e){return e?U[e]:void 0}function te(e){const i=Z(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 Se(e){return Object.keys(te(e)).length>0}function be({saved:e,old:i,styleId:n,values:t}){return{saved:($(e)??O(i).map(o=>({...o,values:{}}))).map(o=>o.id===n?H({...o,values:p({...o.values,...t})},o.auto):o),old:i}}function xe(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{me as accentItalicCss,ce as applyListChange,xe as eyebrowStyleId,I as faceClassOf,K as fromPanelStyles,Se as hasStyleChange,ue as listChangePatch,te as partStyleToTextStyleValues,be as pushIntoStyle,w as resolveTextStyles,ge as siteTextFromRow,de as storedTextStyles,ye as styleIdOfRole,he as textStylesCss,O as textStylesFromOld,M as textStylesToOld,pe as themeWithTextStyles,fe as toPanelStyles};
1
+ export*from"../../render/lib/text-styles/site-text-styles.js";
@@ -11,7 +11,10 @@ export interface FootprintOffice {
11
11
  geocode?: GeocodeState;
12
12
  hq: boolean;
13
13
  group?: string;
14
+ href?: string;
15
+ linkLabel?: string;
14
16
  }
17
+ export declare function footprintOfficeOfRow(row: Readonly<Record<string, string>>): FootprintOffice;
15
18
  export interface FootprintContent {
16
19
  sectionNumber: string;
17
20
  heading: string;
@@ -1 +1 @@
1
- import{hasMapCoords as l}from"../map-styles.js";const o={sectionNumber:"",heading:"",tagline:"",mapTheme:"auto"};function p(r){const n=[];return r.forEach((t,a)=>{l(t.lat,t.lng)&&n.push({key:String(a),label:t.city||t.role||"Office",lat:t.lat,lng:t.lng,glyph:"",tone:"",...t.hq?{badge:"HQ"}:{}})}),n}export{o as FOOTPRINT_DEFAULTS,p as footprintPins};
1
+ import{hasMapCoords as a}from"../map-styles.js";const i=/^https?:\/\//i;function r(t){const e=Number.parseFloat(t??"");return Number.isFinite(e)?e:0}function o(t){const e=(t.href??"").trim(),n=(t.linkLabel??"").trim();return{role:t.role??"",city:t.city??"",country:t.country??"",address:t.address??"",hq:t.hq==="true",lat:r(t.lat),lng:r(t.lng),...e&&n&&i.test(e)?{href:e,linkLabel:n}:{}}}const u={sectionNumber:"",heading:"",tagline:"",mapTheme:"auto"};function c(t){const e=[];return t.forEach((n,l)=>{a(n.lat,n.lng)&&e.push({key:String(l),label:n.city||n.role||"Office",lat:n.lat,lng:n.lng,glyph:"",tone:"",...n.hq?{badge:"HQ"}:{}})}),e}export{u as FOOTPRINT_DEFAULTS,o as footprintOfficeOfRow,c as footprintPins};
@@ -1,5 +1,6 @@
1
1
  import type { FontRole } from "../fonts.js";
2
2
  import { type PopupTextKind } from "../popup/text-kinds.js";
3
+ import { type PopupHideAfter, type PopupShowOn, type PopupTrigger } from "../popup/behavior.js";
3
4
  export declare const SUBSCRIBE_POPUP_SLUG = "subscribe-popup";
4
5
  export declare const SUBSCRIBE_POPUP_KIND = "subscribe-popup";
5
6
  export declare const SUBSCRIBE_POPUP_PAGE_TITLE = "Pop up - SubscribePopup";
@@ -52,25 +53,8 @@ export interface SubscribePopupContent {
52
53
  sectionCornerSides: unknown;
53
54
  textStyles: Partial<Record<PopupTextKind, FontRole>>;
54
55
  }
55
- export declare const POPUP_TRIGGERS: readonly ["delay", "scroll", "exit"];
56
- export type PopupTrigger = (typeof POPUP_TRIGGERS)[number];
57
- export declare const POPUP_SHOW_ON: readonly ["all", "chosen"];
58
- export type PopupShowOn = (typeof POPUP_SHOW_ON)[number];
59
- export declare const POPUP_HIDE_AFTER: readonly ["visit", "days", "never"];
60
- export type PopupHideAfter = (typeof POPUP_HIDE_AFTER)[number];
56
+ export { POPUP_TRIGGERS, POPUP_SHOW_ON, POPUP_HIDE_AFTER, POPUP_DELAY_RANGE, POPUP_SCROLL_RANGE, POPUP_DAYS_RANGE, type PopupTrigger, type PopupShowOn, type PopupHideAfter, } from "../popup/behavior.js";
61
57
  export declare const POPUP_FORM_SIDES: readonly ["right", "left"];
62
58
  export type PopupFormSide = (typeof POPUP_FORM_SIDES)[number];
63
- export declare const POPUP_DELAY_RANGE: {
64
- readonly min: 0;
65
- readonly max: 60;
66
- };
67
- export declare const POPUP_SCROLL_RANGE: {
68
- readonly min: 10;
69
- readonly max: 90;
70
- };
71
- export declare const POPUP_DAYS_RANGE: {
72
- readonly min: 1;
73
- readonly max: 90;
74
- };
75
59
  export declare const SUBSCRIBE_POPUP_DEFAULTS: SubscribePopupContent;
76
60
  export declare function resolveSubscribeContent(rootProps: Record<string, unknown> | undefined | null): SubscribePopupContent;
@@ -1,2 +1,2 @@
1
- import{authoredBoolean as d,authoredNumber as m,authoredString as f,authoredStringList as b}from"./authored-props.js";import{CART_DRAWER_SLUG as p}from"./cart-drawer.js";import{CONSENT_BANNER_SLUG as P}from"./consent-banner.js";import{popupTextStyles as h}from"../popup/text-kinds.js";import{SITE_FOOTER_SLUG as g}from"./footer.js";const S="subscribe-popup",H="subscribe-popup",v="Pop up - SubscribePopup",L=[S,g,p,P];function F(r){return L.includes(r)}const x=["delay","scroll","exit"],O=["all","chosen"],y=["visit","days","never"],T=["right","left"],A={min:0,max:60},_={min:10,max:90},E={min:1,max:90},o={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
2
- *Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy — the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},n=f,N=m,l=d,u=b;function s(r,e,t){return typeof e=="string"&&r.includes(e)?e:t}function a(r,e,t){const i=N(r,t);return Math.min(e.max,Math.max(e.min,Math.round(i)))}function B(r){return typeof r.hideAfter=="string"?s(y,r.hideAfter,o.hideAfter):r.oncePerSession===!0?"visit":r.oncePerSession===!1?"never":o.hideAfter}function U(r){return Array.isArray(r)?r.map(e=>typeof e=="string"?e.trim():"").filter(Boolean).map(e=>e.startsWith("/")?e:`/${e}`):[]}function c(r,e){if(r==null)return e;const t=i=>i.trim()?i:"";if(typeof r=="string")return t(r);if(typeof r=="object"&&"text"in r){const i=r.text;return typeof i=="string"?t(i):""}return e}function k(r,e){return Array.isArray(r)?u(r,[]):e}function I(r,e){return Array.isArray(r)?r.map(t=>{const i=t??{};return{label:n(i.label,""),value:n(i.value,"")}}).filter(t=>t.label||t.value):e}function M(r){const e=r??{},t=o;return{metaLabel:n(e.metaLabel,t.metaLabel),issueLabel:c(e.issueLabel,t.issueLabel),issueNumber:c(e.issueNumber,t.issueNumber),kicker:n(e.kicker,t.kicker),heading:n(e.heading,t.heading),deck:n(e.deck,t.deck),stats:I(e.stats,t.stats),formLabel:n(e.formLabel,t.formLabel),formHeading:n(e.formHeading,t.formHeading),formIntro:n(e.formIntro,t.formIntro),firstNameLabel:n(e.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:n(e.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:n(e.emailLabel,t.emailLabel),emailPlaceholder:n(e.emailPlaceholder,t.emailPlaceholder),interestsLabel:n(e.interestsLabel,t.interestsLabel),interests:u(e.interests,t.interests),frequencyLabel:n(e.frequencyLabel,t.frequencyLabel),frequencies:k(e.frequencies,t.frequencies),submitText:n(e.submitText,t.submitText),finePrint:n(e.finePrint,t.finePrint),dismissText:n(e.dismissText,t.dismissText),emailInvalidText:n(e.emailInvalidText,t.emailInvalidText),submitErrorText:n(e.submitErrorText,t.submitErrorText),successHeading:n(e.successHeading,t.successHeading),successBody:n(e.successBody,t.successBody),keepBrowsingText:n(e.keepBrowsingText,t.keepBrowsingText),formSlug:typeof e.formSlug=="string"?e.formSlug.trim():t.formSlug,autoOpen:l(e.autoOpen,t.autoOpen),autoOpenDelaySec:a(e.autoOpenDelaySec,A,t.autoOpenDelaySec),trigger:s(x,e.trigger,t.trigger),scrollPercent:a(e.scrollPercent,_,t.scrollPercent),showOn:s(O,e.showOn,t.showOn),showOnPages:U(e.showOnPages),hideAfter:B(e),hideDays:a(e.hideDays,E,t.hideDays),formSide:s(T,e.formSide,t.formSide),valuePanelOnPhone:l(e.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:e.sectionAccent,sectionCorners:e.sectionCorners,sectionCornerSides:e.sectionCornerSides,textStyles:h(e)}}export{E as POPUP_DAYS_RANGE,A as POPUP_DELAY_RANGE,T as POPUP_FORM_SIDES,y as POPUP_HIDE_AFTER,_ as POPUP_SCROLL_RANGE,O as POPUP_SHOW_ON,x as POPUP_TRIGGERS,o as SUBSCRIBE_POPUP_DEFAULTS,H as SUBSCRIBE_POPUP_KIND,v as SUBSCRIBE_POPUP_PAGE_TITLE,S as SUBSCRIBE_POPUP_SLUG,L as SYSTEM_PAGE_SLUGS,F as isSystemPageSlug,M as resolveSubscribeContent};
1
+ import{authoredBoolean as l,authoredString as u,authoredStringList as c}from"./authored-props.js";import{CART_DRAWER_SLUG as d}from"./cart-drawer.js";import{CONSENT_BANNER_SLUG as m}from"./consent-banner.js";import{popupTextStyles as f}from"../popup/text-kinds.js";import{oneOf as b,POPUP_BEHAVIOR_DEFAULTS as s,resolvePopupBehavior as P}from"../popup/behavior.js";import{SITE_FOOTER_SLUG as p}from"./footer.js";const g="subscribe-popup",N="subscribe-popup",k="Pop up - SubscribePopup",h=[g,p,d,m];function I(i){return h.includes(i)}import{POPUP_TRIGGERS as C,POPUP_SHOW_ON as v,POPUP_HIDE_AFTER as G,POPUP_DELAY_RANGE as H,POPUP_SCROLL_RANGE as F,POPUP_DAYS_RANGE as q}from"../popup/behavior.js";const S=["right","left"],L={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
2
+ *Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy — the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:s.autoOpen,autoOpenDelaySec:s.autoOpenDelaySec,formSlug:"",trigger:s.trigger,scrollPercent:s.scrollPercent,showOn:s.showOn,showOnPages:[],hideAfter:s.hideAfter,hideDays:s.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},r=u,O=l,o=c;function a(i,e){if(i==null)return e;const t=n=>n.trim()?n:"";if(typeof i=="string")return t(i);if(typeof i=="object"&&"text"in i){const n=i.text;return typeof n=="string"?t(n):""}return e}function x(i,e){return Array.isArray(i)?o(i,[]):e}function y(i,e){return Array.isArray(i)?i.map(t=>{const n=t??{};return{label:r(n.label,""),value:r(n.value,"")}}).filter(t=>t.label||t.value):e}function R(i){const e=i??{},t=L,n=P(e);return{metaLabel:r(e.metaLabel,t.metaLabel),issueLabel:a(e.issueLabel,t.issueLabel),issueNumber:a(e.issueNumber,t.issueNumber),kicker:r(e.kicker,t.kicker),heading:r(e.heading,t.heading),deck:r(e.deck,t.deck),stats:y(e.stats,t.stats),formLabel:r(e.formLabel,t.formLabel),formHeading:r(e.formHeading,t.formHeading),formIntro:r(e.formIntro,t.formIntro),firstNameLabel:r(e.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:r(e.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:r(e.emailLabel,t.emailLabel),emailPlaceholder:r(e.emailPlaceholder,t.emailPlaceholder),interestsLabel:r(e.interestsLabel,t.interestsLabel),interests:o(e.interests,t.interests),frequencyLabel:r(e.frequencyLabel,t.frequencyLabel),frequencies:x(e.frequencies,t.frequencies),submitText:r(e.submitText,t.submitText),finePrint:r(e.finePrint,t.finePrint),dismissText:r(e.dismissText,t.dismissText),emailInvalidText:r(e.emailInvalidText,t.emailInvalidText),submitErrorText:r(e.submitErrorText,t.submitErrorText),successHeading:r(e.successHeading,t.successHeading),successBody:r(e.successBody,t.successBody),keepBrowsingText:r(e.keepBrowsingText,t.keepBrowsingText),formSlug:typeof e.formSlug=="string"?e.formSlug.trim():t.formSlug,autoOpen:n.autoOpen,autoOpenDelaySec:n.autoOpenDelaySec,trigger:n.trigger,scrollPercent:n.scrollPercent,showOn:n.showOn,showOnPages:n.showOnPages,hideAfter:n.hideAfter,hideDays:n.hideDays,formSide:b(S,e.formSide,t.formSide),valuePanelOnPhone:O(e.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:e.sectionAccent,sectionCorners:e.sectionCorners,sectionCornerSides:e.sectionCornerSides,textStyles:f(e)}}export{q as POPUP_DAYS_RANGE,H as POPUP_DELAY_RANGE,S as POPUP_FORM_SIDES,G as POPUP_HIDE_AFTER,F as POPUP_SCROLL_RANGE,v as POPUP_SHOW_ON,C as POPUP_TRIGGERS,L as SUBSCRIBE_POPUP_DEFAULTS,N as SUBSCRIBE_POPUP_KIND,k as SUBSCRIBE_POPUP_PAGE_TITLE,g as SUBSCRIBE_POPUP_SLUG,h as SYSTEM_PAGE_SLUGS,I as isSystemPageSlug,R as resolveSubscribeContent};