efficient-web-builder 63.0.0 → 65.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/loop-fields.js +1 -1
- package/dist/editor/lib/animation/scroll-fields.d.ts +3 -0
- package/dist/editor/lib/animation/scroll-fields.js +1 -0
- package/dist/editor/lib/animation/view-rows.d.ts +20 -0
- package/dist/editor/lib/animation/view-rows.js +1 -0
- package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +3 -2
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +8 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -1
- package/dist/editor/lib/document/part-motion-canvas.js +1 -1
- package/dist/format/lib/animation/entrance-keys.d.ts +8 -0
- package/dist/format/lib/animation/entrance-keys.js +1 -0
- package/dist/format/lib/animation/loop.d.ts +1 -0
- package/dist/format/lib/animation/loop.js +1 -1
- package/dist/format/lib/animation/mark-zoom.d.ts +11 -0
- package/dist/format/lib/animation/mark-zoom.js +1 -0
- package/dist/format/lib/animation/scroll.d.ts +19 -0
- package/dist/format/lib/animation/scroll.js +1 -0
- package/dist/format/lib/animation/views.d.ts +6 -0
- package/dist/format/lib/animation/views.js +1 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/card-template.d.ts +8 -5
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +6 -0
- package/dist/format/lib/content/image-aspect.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +57 -13
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/content/slot-field-blocks.d.ts +1 -0
- package/dist/format/lib/content/slot-field-blocks.js +1 -0
- package/dist/format/lib/document/blocks/block-types.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ContactLocations/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FeaturedCover/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ImageBlock/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +2 -2
- package/dist/format/lib/document/blocks/general/LogoBlock/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/LongRead/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Manifesto/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Split/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Timeline/meta.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +6 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +16 -0
- package/dist/format/lib/editor-words-catalogue.js +5 -5
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/source-rules/motion-vars-from-the-shell.d.ts +6 -0
- package/dist/format/lib/source-rules/motion-vars-from-the-shell.js +4 -0
- package/dist/render/components/Banner.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +1 -0
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/HeroPictures.d.ts +23 -6
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +2 -1
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/IntroBleed.d.ts +1 -2
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/PictureZoom.d.ts +24 -0
- package/dist/render/components/PictureZoom.js +1 -0
- package/dist/render/components/Placeholder.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/ScrollEffect.d.ts +14 -0
- package/dist/render/components/ScrollEffect.js +1 -0
- package/dist/render/components/ScrollProgressArm.d.ts +5 -0
- package/dist/render/components/ScrollProgressArm.js +1 -0
- package/dist/render/components/SectionAnimation.d.ts +9 -13
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SectionHeader.js +1 -1
- package/dist/render/lib/animation/entrance.d.ts +6 -14
- package/dist/render/lib/animation/entrance.js +1 -1
- package/dist/render/lib/animation/part-motion.d.ts +4 -1
- package/dist/render/lib/animation/part-motion.js +2 -2
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/page-frame.d.ts +2 -1
- package/dist/render/lib/document/page-frame.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +10 -0
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/scroll-effect.d.ts +3 -0
- package/dist/render/lib/document/passes/scroll-effect.js +1 -0
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as A,Fragment as k}from"react/jsx-runtime";import{cloneElement as Ge,createContext as zt,useContext as Me,useEffect as Yt,useId as Ue,useRef as V,useState as z}from"react";import{useEasel as te,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as qt,fromDateKey as Jt}from"efficient-shell/format";import{say as l,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{LOADING_SHOWS_LABELS as We,firstFrameHint as Zt,loadingShowsOf as Qt,loadingStillHint as en}from"../../../format/lib/hero-video.js";import{pageFramesFor as tn,usePageVideoFrames as nn}from"../page-video-frames.js";import{ScreenDocumentContext as on}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as Ke,hidableText as $e}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as pe,LINK_FIELD_MARKER as Xe,MEDIA_FIELD_MARKER as je,SCAFFOLD_FIELD_MARKER as Ve,TEXT_FIELD_MARKER as O,foldMetaOf as fe,textFieldIdentifier as rn}from"efficient-easel/draw";import ln from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ze}from"../../../render/lib/document/show-when.js";import sn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as an,CORNER_RADIUS_MAX as Ye,CORNER_RADIUS_MIN as U}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as cn,IMAGE_CORNERS_LABEL as dn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as un}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as pn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as fn,galleryChoices as qe,galleryLayoutRatio as hn,galleryPictureCells as mn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as gn}from"./shell-glyph.js";import{anchorSiblingsOf as bn,placementPoints as wn}from"../../../format/lib/hero-group-placement.js";import xn from"../../components/AnchorField.js";import Sn from"../../components/SourceStatus.js";import{AdjustIcon as yn,EyeIcon as Cn,AnimationIcon as _n,BackgroundIcon as Je,BorderAllIcon as Rn,BlockSectionIcon as Tn,ColumnWidthsIcon as he,ColumnsIcon as Ze,CornerIcon as Qe,DirectionDownIcon as On,DirectionLeftIcon as In,DirectionRightIcon as En,DirectionUpIcon as kn,EditIcon as Fn,GapIcon as Ln,GridIcon as Nn,GroundIcon as me,HashIcon as et,HeightIcon as An,ImageIcon as Pn,ListIcon as vn,LocationIcon as tt,PaddingBottomIcon as nt,PaddingLeftIcon as ot,PaddingRightIcon as rt,PaddingTopIcon as it,PageIcon as Bn,StickyIcon as Dn,SearchIcon as Hn,SquareIcon as Gn,TypeIcon as Mn,WidthIcon as Un}from"efficient-easel/icons";import{FieldGlyph as lt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Wn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Kn,boxFillSlot as ge}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as st,CORNER_SIDE_POINTS as $n,hasOwnSectionCorners as Xn,normalizeCornerSides as at}from"../../../format/lib/content/section-corners.js";import{enclosingPath as jn,enclosingSection as Vn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as zn,SettingsField as S,SettingsGroup as Yn,SettingsGroupSub as qn,SettingsSegmented as Jn,SettingsBorder as Zn,SettingsSidesEach as Qn,SettingsSwitch as be,borderSides as eo,borderStartEach as to}from"efficient-easel/panel";import{ListField as no}from"efficient-easel/fields";import{DisplayChips as oo}from"efficient-shell/ui";import{desktopDisplayChanged as ro,partShownOnDesktop as io,partShownOnPhone as lo,phoneDisplayChanged as so,withDesktopPart as ao,withPhonePart as co}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as uo,Checkbox as po,ColorSwatch as fo,CornersInput as ho,DatePicker as mo,DateTimePicker as go,FOCAL_DEFAULT as bo,IconPicker as ct,COLUMN_COUNT_MAX as dt,COLUMN_SHARE_MIN as wo,COLUMN_SHARES_EQUAL as xo,resolveColumnShares as ut,WidthsBar as So,useShellStrings as yo,IconButton as pt,InputNumber as ft,Slider as Co,Tooltip as we}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as _o}from"./geocode-resolve.js";import{ColourRow as oe,InheritedColourRow as ht}from"./ColourControl.js";import{fillThemeColors as Ro,slotFill as re}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as xe}from"../../../format/lib/document/part-inks.js";import{keptByRow as To}from"efficient-easel/screen/lib/document/style-fields";import mt from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Oo,NoControlMark as Io,noControlField as gt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Eo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as ko,PANEL_ONLY_FIELD as Fo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Lo,resolvePhoneValue as Se}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as No}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Ao,CARD_OUTLINE_OPTIONS as Po,DEFAULT_CARD_INDEX_FORMAT as vo,DEFAULT_CARD_OUTLINE as Bo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Do,DEFAULT_COVER_INDEX as Ho}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Go}from"efficient-easel/draw";import Mo from"../../components/MediaUploadField.js";import Uo from"../../components/MultiSelectField.js";import Wo from"../../components/SectionThemePicker.js";import Ko from"../../components/SearchSelectField.js";import $o from"../../components/StorefrontLinkField.js";import{UiIcon as bt}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Xo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as jo}from"efficient-easel/draw/client";import{encodePartId as Vo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as zo,useEaselStrings as Yo}from"efficient-easel/strings";import{hasPhoneHeight as qo,hasTabletHeight as ye,resolveSectionMinHeight as Jo,resolveTabletHeight as Zo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as ie,SECTION_STICK_LABEL as Ce,hasPhoneStick as Qo,hasTabletStick as er,resolveSectionStick as wt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as tr,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as nr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as or,resolveContainerDirection as xt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as rr,BOX_BLOCK_SPACING_POINTS as St,BOX_PHONE_ROW_LABEL as yt,BOX_COLUMNS_MAX as ir,BOX_COLUMNS_MIN as Ct,BOX_PHONE_ROW_MAX as lr,BOX_PHONE_ROW_MIN as _e,BOX_SHARE_CHOICES as _t,BOX_SHARE_LABEL as K,boxShareChoiceOf as Rt,boxShareWidthsOf as Re,BOX_SHARE_PHONE_DEFAULT as sr,BOX_SHARE_PHONE_POINTS as ar}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as cr,borderBySide as Tt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as dr,normalizeTheme as Ot,normalizeThemeColors as ur,sectionBandTone as pr,surfaceTwoTone as fr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as It,CONTAINER_GAP_BUILT_IN as hr,CONTAINER_GAP_PHONE as Te,GAP_FIELD_CONTAINER as Oe,followsSitePhoneGap as mr,hasOwnContainerGap as gr,hasOwnPhoneGap as Ie,resolveContainerGap as Et,resolvePhoneContainerGap as kt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as br,CARD_IMAGE_BG_OFF as wr,CARD_IMAGE_BG_SWATCH_NAMES as xr,CARD_IMAGE_BG_SWATCHES as Sr,isCardImageBackgroundInheriting as yr,cardImageBackgroundChoice as Cr,THEME_CARD_IMAGE_BG as _r}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Rr,SECTION_BG_NO_FILL as Tr,sectionBackgroundChoice as Or,THEME_SECTION_BG as Ee,isSectionBackgroundEmpty as Ir,sectionBackgroundHex as Ft}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Er,nestedAccentValue as Lt,resolveSectionAccent as le}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as kr,TYPE_SIZE_INHERIT as Fr,isTypeSizeInheriting as Lr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Nr,WIDTH_CHOICE_LABEL as Ar,WIDTH_INHERIT as Pr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as vr}from"./panel-heading-scope.js";import{useEaselSession as Br}from"efficient-easel/screen/lib/session-context";import{backendOf as Dr}from"../website-session.js";import{BOX_GAP as Hr,describedAs as E,group as T,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ke,onDesktopWords as B,phoneTwinFields as se}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Gr,gapField as Fe,iconPickerRow as Mr,pickerCellIcon as Ur,pickerNoneIcon as Wr,Segmented as Le,segmented as Kr,select as Z,slider as $}from"./box-fields.js";function Bs({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function $r(){const{blockGap:e}=v();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function Xr({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:l(n),changed:!e,detail:$r(),onReset:t})}function jr(e){return Fe({...Hr,builtIn:hr[e],resolve:(t,n)=>Et(e,t,n?.siteGap),action:(t,n)=>i(Xr,{inherited:!gr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Oe]:e}})}function Vr(e){return ze(R("mobile",{[Oe]:e,type:"custom",render:t=>i(qr,{container:e,...t})}),Nt)}function zr(e){return ze(R("tablet",{[Oe]:e,type:"custom",render:t=>i(Yr,{container:e,...t})}),Nt)}const Nt={not:{field:"gap",in:Array.from({length:-It.min},(e,t)=>It.min+t)}};function Ds(e){return{gap:R("desktop",jr(e)),[W("gap")]:zr(e),[F("gap")]:Vr(e)}}function Yr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(Te.min,Et(e,n,o));return Fe({...Te,builtIn:r,resolve:a=>Ie(a)?a:r,action:(a,c)=>i(C,{words:y()?.panel,label:l("Gap"),changed:Ie(a),detail:B(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function qr({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=kt(e,void 0,n,o,r);return Fe({...Te,builtIn:s,resolve:c=>kt(e,c,n,o,r),action:(c,d)=>i(C,{words:y()?.panel,label:l("Gap"),changed:Ie(c),detail:D(`${s}px`,mr(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Hs(e){return Gr({offered:or(e),fallback:xt(e,void 0),resolve:t=>xt(e,t)})}function Gs(e,t){return wn(t?bn(e,t):[],t)}function Jr({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:d,hidden:f}=Ke(e),m=V(null),p=V(null),u=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:d,hidden:!f}),h=a&&f,w=Ue(),x=r?ni(r)?i("span",{className:"sf-hint-while-typing",children:l(r)}):l(r):void 0,b=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(S,{label:l(n),icon:i(Mn,{}),htmlFor:w,className:h?"is-hidden":void 0,hint:x,action:a?i(we,{content:b,children:i(pt,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?i(bt,{name:"eye-off",size:14}):i(bt,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(mt,{target:s?p:m,value:d,onChange:u}),s?i("textarea",{id:w,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)}):i("input",{id:w,ref:m,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)})]})})}function Ms(e,t){return{...e,[Ve]:t}}function Us(e){const t=e[O];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[O]:{...t,offPage:!0}}}function Ws(e){return!e||typeof e!="object"?!1:e[O]?.offPage===!0}function Ks(e){if(!e[O])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Fo]:!0}}function $s(e){return ko(e)}function Xs(e){const t=e[O];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[O]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as rc,SCALAR_TEXT_CONTROLS as ic}from"efficient-easel/draw";function js(e,t){if(!e[O])throw new Error("inOwnBox: the field holds no authored text");const{[Oo]:o,...r}=e;return{...r,[Eo]:!0,render:t}}const Zr=new Set(Go),Q={type:"radio",options:[{value:!0},{value:!1}]},At={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=E({...t,[O]:e},{...At[e.control],label:e.label});if(!Zr.has(e.control))return n;const o=t.render;return{...gt(n,"authored-copy"),render:r=>i(No,{name:r.name,children:o(r)})}},Vs="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Qr={field:"source.slug",set:!0},zs={not:Qr},ei="Select a word, then press the highlighter.",ti=new Set([ei]),ni=e=>ti.has(e);function Ys(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function qs(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Js(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Zs(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Qs(e){return{type:"custom",[Xe]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i($o,{value:$e(t),onChange:n,label:e})}}function ea(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ta={Design:yn,Animation:_n};function na(e){return{type:"custom",render:()=>i(oi,{text:e})}}function oi({text:e}){return i("p",{className:"sf-note",children:l(e)})}function oa(e){return fe(e)!==null&&e?.tabs!==void 0}const Pt=new Map;function ra(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Pt.get(n)??{type:"custom",tabs:t,[pe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Pt.set(n,o),o}const vt=new Map;function ia(e){const t=vt.get(e)??{type:"custom",[pe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return vt.set(e,t),t}function ri(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function la(e,t){return ri(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function sa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(k,{})}}function aa({title:e,children:t}){const[n,o]=z(()=>!Ne.has(e));return i(Yn,{title:e,open:n,onToggle:r=>{o(r),r?Ne.delete(e):Ne.add(e)},children:t})}const Ne=new Set;function ca({label:e}){return i(qn,{title:l(e),level:vr(2)})}function ii({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,a=s?l(s):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(we,{content:d,children:i(fo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function da(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(li,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function li({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Be(),d={background:a.background,surface:a.surface,surface2:fr(a),band:pr(a)},f=n?Ee:t,m=Ir(s,t,f),p=Ft(void 0,f,d),u=n?Rr:void 0,g=f===Ee?l("the theme's section background"):l("Theme {n} background",{n:c}),h=si(s,t,a,c,d,r),w=D(p.toUpperCase(),g),x=xe(s),b=x?re(x,a,c):null;return b?i(oe,{label:l(e),icon:i(Je,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:w,choices:h}):i(ht,{label:l(e),icon:i(Je,{}),value:m?"":Ft(s,t,d),inherited:p,resetTo:w,onChange:r,onReset:()=>r(u),choices:h})}function si(e,t,n,o,r,s){const a=Or(e,t);return[{label:l("No fill"),color:"",selected:a==="none",onPick:()=>s(Tr)},{label:`${l("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>s(Ee)},...ve(xe(e)??"",n,o,s)]}function ai(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=yr(r,t);return i(S,{label:l(e),icon:i(me,{}),changed:!s,action:i(C,{words:y()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(br)}),children:ii({swatches:Sr,current:s?_r:Cr(r,t),onPick:o,names:xr})})}}}function ua(e=n=>n,t){return J({_gSectionTheme:T(Er),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Wo,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:a=!0,notch:c,ariaLabel:d,disabled:f=!1,placeholder:m,placeholderWord:p,onClear:u}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Co,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},...p?{emptyLabel:l(p)}:{},suffix:s||void 0,showInput:a,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:h=>{h===null?u?.():h!==o&&r(h)}})})}function Bt(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:d,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const g=typeof p=="number"?p:null,h=g===null;return i(S,{label:l(e),icon:f?q(f):void 0,value:h?d||s===void 0?void 0:l(s):`${g}${m}`,changed:!h,action:d?Ge(d,{changed:!h,onReset:()=>u(null)}):i(C,{words:y()?.panel,label:l(e),changed:!h,onReset:()=>u(null)}),hint:typeof a=="string"?l(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const ae="Corners";function Ae(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(S,{label:l(ae),icon:i(Qe,{}),changed:r,action:Ge(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(di,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Dt(){return gt({type:"custom",render:()=>i(Io,{})},"always")}function ci(){const e=M();return t=>e?.onChangeMany(t)}function di({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=L(e.sidesKey),a=at(r)??[...st];return i(ho,{label:l(ae),value:a,corners:$n,onChange:c=>{const d=at(c)??[];s(d.length===st.length?null:d)},radius:t,onRadiusChange:n,radiusMin:U,radiusMax:Ye,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Ht(){return Dt()}function ui({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:l("not set");return i(C,{words:y()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function pi(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:U}function fi(){return Ae({sidesKey:"sectionCornerSides",useFollowed:pi,mark:i(ui,{label:ae}),hint:hi})}const hi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function pa(){return J({_gShape:T("Shape"),sectionCorners:fi(),sectionCornerSides:Ht(),...X("sectionBorder",Gt)})}const mi=()=>({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 gi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function bi(){let e;try{const t=Ot(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||dr.line}function wi({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,f]=z(()=>r?to(c,a):!1),m=mi(),p=u=>gi(r&&s?u:{width:u.width,color:u.color,...s?{style:u.style}:{}});return i(S,{label:l("Border"),icon:i(Rn,{}),action:r?i(Qn,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(Zn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:m,styles:s,max:cr})})}function xi({value:e,onChange:t,view:n}){const[o]=L("sectionBorder"),[r]=L(W("sectionBorder")),s=bi(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Tt(a(o)),...Tt(a(r))}:n==="tablet"?a(o):{};return i(wi,{value:e,onChange:t,placeholder:{sides:eo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function fa(e){return R(e,Gt(e==="mobile"?"phone":e))}function Gt(e){return{type:"custom",render:({value:t,onChange:n})=>i(xi,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>se(e,t(o),ke)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[F(e)]:n("phone",F(e))}}function ha(e){return{type:"custom",render:()=>i(Si,{partKey:e})}}function Si({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=v(),r=Yo();let s=null;try{s=jo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(zn,{name:l("Text"),preview:Xo(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??zo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Vo(t,e))}})}function Mt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=te(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?Vn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Xn(r)?r:n}function yi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Mt(U);return i(C,{words:y()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function Ci(){return i(k,{children:l("Follows the section's Corners until you set a number here.")})}function _i(){return Ae({sidesKey:"cardCornerSides",useFollowed:()=>Mt(U),mark:i(yi,{label:ae}),hint:i(Ci,{})})}function Ri(){return{type:"custom",render:()=>i(ln,{})}}function ma(e){return{...e,render:t=>i(sn,{render:e.render,props:t})}}function ga(){return{_gShape:T("Shape"),cardCorners:_i(),cardCornerSides:Ht(),cardCornersApplyAll:Ri()}}function Ti(){return E({type:"custom",render:e=>i(Ii,{...e})},{type:"select",label:K,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Oi(e,t){const n=Rt(e);if(n!=="custom")return l(_t.find(r=>r.value===n)?.label??"");const o=ut(Re(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function Ii(e){const{value:t,onChange:n}=e,[o]=L("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,d=Rt(c),f=r>=2&&r<=dt,m=()=>[...xo[r]??[]],p=V(null),u=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!f||n(b==="custom"?m():b)},h=l("The width bar works for 2 to {count} blocks.",{count:dt}),w=a&&(s||t!=="content"),x=yo().widths.hint(r,wo);return i(S,{label:l(K),icon:i(he,{}),changed:w,hint:d!=="custom"?void 0:f?x:h,action:i(C,{words:y()?.panel,label:l(K),changed:w,disabled:e.readOnly===!0,detail:s?B(b=>l(b),Oi(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ct,{label:l(K),value:d,options:_t.map(b=>({value:b.value,label:b.value==="custom"&&!f?h:l(b.label),icon:Ur(i("span",{className:"sf-gallery-pic sf-share-pic",children:Ut(b.weights).map((_,j)=>i("i",{style:{gridColumn:`span ${_}`}},j))}),l(b.label),b.value==="custom"&&!f?h:l(b.label))})),onChange:g,columns:3,cell:Wt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&f?i("div",{onFocus:()=>{p.current={value:t,shares:ut(Re(c,r),r)}},onBlur:()=>{p.current=null},children:i(So,{label:l(K),count:r,value:Re(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function Ut(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 ba(){return Z(rr,i(Ln,{}),St,St[0].value)}function wa(){return R("mobile",Mr(K,i(he,{}),ar.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Ut(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),sr,{columns:2,cell:Wt}))}const Wt={width:"5.75rem",height:"3.25rem"};function xa(){return se("share",Ti(),ke)[W("share")]}function Ei(){return R("mobile",$(yt,i(Ze,{}),_e,lr,1,_e,"",{clear:{phoneFollows:!1,hint:_e}}))}const Kt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Sa(){const e=$(yt,i(Ze,{}),Ct,ir,1,Ct,"",{clear:{emptyLabel:"Auto"}}),t=se("columns",e,{...Kt,tablet:ke.tablet}),n=se("columns",e,Kt,{phoneRow:Ei()});return{...t,phoneRow:n.phoneRow}}function ya(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(S,{label:l(e),icon:i(lt,{noun:s}),action:i(C,{words:y()?.panel,label:l(e),changed:!Lr(a),detail:l("the Text style in Styles"),onReset:()=>c(Fr),defaultAction:{onPress:()=>c(kr),title:l("Keep this section's own built-in size"),icon:i(Tn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Ca(){return{_gCellWidth:T("Cell width"),gridSpan:Z("Positions",i(he,{}),[{label:"Auto",value:""},...Array.from({length:un},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null,t=null;try{e=Me(ki),t=te(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const ki=zt(null);function Fi({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const d=N()[a],f=Se(void 0,d,c);return i(k,{children:ee({min:e,max:t,step:n,value:Se(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function Li({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=N()[t],c=Se(void 0,a,n);return i(C,{words:y()?.panel,label:l(e),changed:r,detail:B(d=>l(d),`${c}${o}`),onReset:s})}function Ni(e){return Bt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Li,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Fi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ai={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Pi={Top:it,Bottom:nt,Left:ot,Right:rt},vi=e=>{const t=Pi[e];return i(t,{})};function _a(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Ai[x],s=x=>$(r("Top"),i(it,{}),I.min,I.max,I.step,x,"px"),a=(x,b,_,j=I)=>R("mobile",Ni({label:r(x),icon:vi(x),desktopKey:b,min:j.min,max:j.max,step:j.step,fallback:_})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,g=e.sidePhone??u,h=e.phone===!0,w=x=>h?R("desktop",x):x;return J({...o?{_gSpacing:T("Padding")}:{},[t]:w(s(c)),...h?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w($(r("Bottom"),i(nt,{}),I.min,I.max,I.step,d,"px")),...h?{[F(n)]:a("Bottom",n,d)}:{}},...e.sides?{[f]:w($(r("Left"),i(ot,{}),p.min,p.max,p.step,u,"px")),...h?{[F(f)]:a("Left",f,g,p)}:{},[m]:w($(r("Right"),i(rt,{}),p.min,p.max,p.step,u,"px")),...h?{[F(m)]:a("Right",m,g,p)}:{}}:{}})}function Ra(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&fe(a)?e[s]:a])),o={};let r=!1;for(const[s,a]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=a}return r||Object.assign(o,n),o}const ce="Width";function Ta(e,t=Nr,n=!0){const o=t.map(r=>({label:Ar[r],value:r}));return J({...n?{_gWidth:T(ce)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(S,{label:l(ce),icon:i(Un,{}),action:n?i(Jr,{inherited:s?.inherited??!1,onReset:()=>r(Pr),label:ce}):void 0,children:Le({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:ce})})}})}function Oa(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(Bi,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Hi,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Kr("Unit",i(et,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(Gi,{props:a,draw:s,view:o})}};return J({_gHeight:T(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Mi,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function Bi({value:e,onChange:t,view:n,badge:o}){const r=N(),s=c=>["auto","fixed","screen"].includes(c),a=de(n,r)?.mode??"auto";return i(S,{label:Y,icon:q(i(An,{})),action:o?o(t):void 0,children:Le({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:Y})})}function $t(e,t){return e==="phone"&&ye(t)?Zo(t):Jo(t)}function de(e,t){return e==="desktop"||(e==="tablet"?ye(t):qo(t))?null:$t(e,t)}const P=(e,t)=>e==="tablet"?W(t):F(t);function Di(e,t,n,o){const r=de(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[P(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[P(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[P(e,"sectionHeightValue")]:r.value}:{},[P(e,n)]:o}}function Xt(e,t,n){const o=M(),r=de(e,N());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=Di(e,c,t,a);return d===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(d).length?d:null})}}function Hi({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Xt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?nr:tr;return i("div",{className:"sf-field",children:ee({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:Y,onChange:s})})}function Gi({props:e,draw:t,view:n}){const{followed:o,write:r}=Xt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Mi({view:e,onClear:t}){const n=N(),o=de(e,n)===null,r=e==="phone"&&ye(n),s=$t(e,n),a=B(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(C,{words:y()?.panel,label:l(Y),changed:o,detail:a,onReset:t})}function Ia(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(Ki,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(Ui,{value:o,onChange:r,view:n})});return{_gStick:T(Ce),...X("stickTop",e),...X("stickTopDistance",t)}}function Ui({value:e,onChange:t,view:n}){const o=M(),r=N(),s=n==="desktop"||Pe(n,r)?null:jt(n,wt(r)),a=s&&o?c=>o.onChangeMany(d=>{const f=Wi(n,d,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return i("div",{className:"sf-field",children:ee({min:ie.min,max:ie.max,step:ie.step,value:s?null:typeof e=="number"?e:ie.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})}function Pe(e,t){return e==="tablet"?er(t):Qo(t)}function jt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Wi(e,t,n){return e==="desktop"||Pe(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Ki({value:e,onChange:t,labelId:n,view:o}){const r=N(),s=wt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,d=o==="desktop"?null:jt(o,s),f=d?.on?`${d.distance}px`:l("Off");return i(S,{label:l(Ce),labelId:n,icon:q(i(Dn,{})),action:A(k,{children:[o!=="desktop"?i(C,{words:y()?.panel,label:l(Ce),changed:Pe(o,r),detail:B(m=>l(m),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(be,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Vt="e.g. about";function Ea(){return{_gAnchor:T("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Vt},{type:"custom",render:({value:e,onChange:t})=>i(xn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:Vt,hideable:!1,markup:!1})})})}}function ka(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(S,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(go,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Fa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(S,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(mo,{id:c,value:Jt(typeof o=="string"?o:null),onChange:d=>r(d?qt(d):"")})})}}}function $i(e,t,n,o){return{type:"custom",...E({},{...Q,label:e}),render:r=>{const{value:s,onChange:a,id:c,name:d}=r,f="follows"in r,m=r,p=typeof s=="boolean",u=typeof m.follows=="boolean"?m.follows:t,g=p?s:f?u:t,h=`${c??d??e}-label`,w=m.readOnly===!0,x=i(be,{checked:g,onChange:a,disabled:w,ariaLabelledBy:h});return i(S,{label:l(e),labelId:h,icon:n,hint:o===void 0?void 0:l(o),action:f?A(k,{children:[i(C,{words:y()?.panel,label:l(e),changed:p,detail:m.followsNoView?l(u?"On":"Off"):B(b=>l(b),l(u?"On":"Off"),m.followsView),disabled:w,onReset:()=>a(void 0)}),x]}):x})}}}function La(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Xi,{label:"Background",icon:i(Bn,{}),id:r,value:e,shown:Wn(e),onChange:t})}}}function Na(e,t){return{type:"custom",...E({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(S,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(po,{id:a,checked:s,onChange:o})})}}}function Aa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(oe,{label:l(e),icon:n,value:o||t,onChange:r})}}function Xi({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:a,n:c}=Be(),d=xe(o),f=d?re(d,a,c):null;return i(oe,{label:l(e),icon:t,id:n,value:f?f.hex:r,caption:f?.words,onChange:s,choices:ve(d??"",a,c,s)})}function Pa(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(ji,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function ve(e,t,n,o){const r=ge(e);return Ro(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function ji({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Be(),s=o.background,a=D(s.toUpperCase(),l("Theme {n} background",{n:r})),c=ge(e),d=c?re(c,o,r):null,f=ve(e,o,r,t),m=n?()=>t(void 0):()=>t("");let p=s,u=a;if(n){const g=ge(n.follows),h=Kn(n.follows),w=g?re(g,o,r):h?{hex:h,words:h.toUpperCase()}:null;p=w?.hex??s,u=B(x=>l(x),w?w.words:a,n.view)}return d?i(oe,{label:l("Fill"),icon:i(me,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:m,resetTo:u,choices:f}):i(ht,{label:l("Fill"),icon:i(me,{}),value:e,inherited:p,resetTo:u,onChange:t,onReset:m,choices:f})}function Vi(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return le(n);const r=jn(e,t);if(r.length===0)return null;const s=le(Lt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=le(Lt(r[a].sectionAccent));if(c!==null)return c}return le(r[0].sectionAccent)}function Be(){const e=Ot(v().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=te(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Vi(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ur(e.themes[o]),n:o+1}}const zi=[{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 Yi({label:e,value:t,onChange:n,points:o=zi}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(uo,{label:l(e),value:t,points:r,onChange:n})}function va(){return Dt()}const Ba={top:i(kn,{}),right:i(En,{}),bottom:i(On,{}),left:i(In,{})};function Da(e,t,n,o,r,s,a){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(h=>h.cell===p);if(!u)return d(`missing-${p}`);const g=s?.[p];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},m=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const g=t.some(h=>h.value===p)?p:n;return i(S,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:Yi({label:e,value:g,onChange:u,points:m})})}}}function Ha(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Uo,{label:e,options:(s.options??t).map(a=>({...a,label:l(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Ga(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Ko,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:l(o)})}}function Ma(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ua=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Wa(e,t,n){const o=Object.keys(We).map(r=>({label:We[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Ji,{label:e,icon:t,options:o,onChange:r})}}function qi(e,t,n){const o=Zt(e,t,n);if(o!==void 0)return o==="save-makes-frame"?l("A frame is made from this video when you save the page."):o==="starts-dark"?l("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?l("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?l("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?l("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?l("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=en(e);return r==="frame-missing-image"?l("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?l("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?l("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?l("No image yet. The slide shows its background colour until you choose one."):void 0}function Ji({label:e,icon:t,options:n,onChange:o}){const r=M(),s=r?.values??{},a=Qt(s),c=Me(on),d=nn(c?.docId??null);let f=null;try{f=te(p=>p.appState.data)}catch{f=null}const m=tn(r?.id,f,d);return i(S,{label:l(e),icon:q(t),hint:qi(s,m,c?.hasUnsavedEdits??!1),children:Le({options:n,value:a,onChange:o,ariaLabel:e})})}function Ka(e,t,n,o={}){const r={type:"custom",[je]:!0,render:({value:s,onChange:a,name:c})=>i(Mo,{value:s||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?R("each",r):r}const $a={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Zi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Xa({value:e,onChange:t,label:n}){const o=e||{},r=M(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,d=!!Dr(Br()).geocode,f=Ue(),m=(p,u)=>t({...o,[p]:u??void 0});return A(k,{children:[i(S,{label:l(n),icon:i(tt,{}),action:d?i(we,{content:l("Find from the address (OpenStreetMap)"),children:i(pt,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Hn,{})})}):void 0,children:d&&o.status?i(Sn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?l("Finding…"):c?l(_o):l(o.status),hint:Zi(o)}):null}),i(S,{label:l("Enter by hand"),labelId:f,icon:i(Fn,{}),action:i(be,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:f})}),o.manual&&i(S,{label:l("Latitude, longitude"),icon:i(tt,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(ft,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>m("lat",p),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(ft,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>m("lng",p),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Qi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function el(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function ja(e,t){return e===null?null:t>e?e:null}function tl(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 Va={label:"Ticker items",icon:i(vn,{})};function za(e,t,n,o){return{type:"custom",[O]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...At.textList,label:e}),render:({value:r,onChange:s})=>i(nl,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function nl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=V(null),[c,d]=z(null),f=p=>p.map(u=>({text:u?.text??""})),m=p=>{const u=tl(n,p,c);u===null&&(a.current=null),d(u),r(f(p))};return i(no,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(mt,{target:a,value:Qi(n,c),onChange:p=>r(el(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,g)=>i("input",{type:"text",className:s&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,d(u)}})})}function Ya(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:r})=>i(H,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function qa(e){return{_gCards:T("Cards"),coverIndex:Z("Cover image",i(Pn,{}),Do,String(Ho),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ai("Image background",wr),cardImage:il()}}function Ja(){return{outline:Z("Card outline",i(Gn,{}),Po,Bo),indexBadge:Z("Card number",i(et,{}),Ao,vo),showBadge:$i("Product badge",!0,i(lt,{noun:"tag"}))}}function Za(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ue.find(s=>s.id===r).label}),o=r=>E(To(De),n(r));return{_gShowOnCard:T("Show on a card"),[De]:E({type:"custom",render:()=>i(ol,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(De)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const De="showCardPrice",ue=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function ol({rest:e}){const t=N(),n=ci(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ue.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(He,{parts:ue,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ue.map(({id:a})=>[a,void 0])))})}function Qa(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(He,{parts:e,changed:ro(o),shown:s=>io(o,s),onPress:(s,a)=>r(ao(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(rl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function He({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(S,{label:c,icon:i(Cn,{}),changed:t,action:i(C,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(oo,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function rl({parts:e,desktopKey:t,value:n,onChange:o}){const r=N()[t];return i(He,{parts:e,changed:so(n),shown:s=>lo(r,n,s),onPress:(s,a)=>o(co(n,s,a)),onReset:()=>o(Lo),detail:l("the same as Desktop")})}function il(){return Bt("Card image",{min:U,max:Ye,step:an,icon:i(Qe,{}),hint:"Rounds the picture. The card's own corner is in Styles."})}function ec(){return Ae({sidesKey:"cornerSides",step:cn,useFollowed:()=>U,mark:i(ll,{label:dn}),hint:l("Rounds the picture. Left alone it stays square.")})}function ll({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:y()?.panel,label:l(e),changed:t,onReset:n})}function tc(){return{type:"custom",render:({value:e,onChange:t})=>i(dl,{value:typeof e=="string"?e:"",onChange:t})}}function sl({layout:e,width:t}){const n=hn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:mn(e).map(([r,s],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},a))})}const al={width:"3.5rem",height:"2.5rem"},cl=200;function dl({value:e,onChange:t}){const[n,o]=z(null),[r,s]=z(4),a=V(null);Yt(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>s(u.getBoundingClientRect().width>=cl?4:3);g();const h=new ResizeObserver(g);return h.observe(u),()=>h.disconnect()},[]);const c=e&&e in ne?e:"",d=qe(n,c),f=qe(n,"").length,m=gn("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:Wr(m,l("Not chosen"))},...d.map(u=>({value:u,label:l(ne[u].label),icon:i(sl,{layout:ne[u],width:40})}))];return i(S,{label:l("Layout"),icon:i(Nn,{}),value:c?l(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ct,{label:l("Layout"),value:c,options:p,onChange:t,columns:r,cell:al,header:A("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Jn,{options:[{id:"all",label:l("All")},...pn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:fn.length})})]})})})})}export{Qr as BOUND_TO_POST,Vs as BOUND_TO_POST_NOTE,ta as BUCKET_ICONS,$a as CUSTOM_FIELD_MEDIA,Xa as CoordsField,Nt as DESKTOP_GAP_NOT_OVERLAP,He as DisplayRow,Ba as EDGE_ARROWS,bo as FOCAL_DEFAULT,zi as FOCAL_POINTS,pe as FOLD_FIELD_MARKER,Yi as FocalPicker,ca as GroupLabel,ei as HIGHLIGHT_HINT,H as HidableTextField,Xe as LINK_FIELD_MARKER,Bs as Label,je as MEDIA_FIELD_MARKER,Ua as MEDIA_TYPE_OPTIONS,zs as NOT_BOUND_TO_POST,aa as PanelBand,oi as PanelNoteLine,ki as RowPropsContext,Ve as SCAFFOLD_FIELD_MARKER,ic as SCALAR_TEXT_CONTROLS,Xr as SiteGapDefaultReset,ee as Slider,ii as Swatches,rc as TEXT_CONTROL_KINDS,O as TEXT_FIELD_MARKER,Va as TICKER_ITEMS_ROW,nl as TextListField,Xi as ThemeFillRow,ce as WIDTH_LABEL,Jr as WidthDefaultReset,tl as aimAfterListChange,Ea as anchorFields,D as backTo,da as backgroundField,ba as boxBlockSpacingField,Sa as boxColumnsFields,Pa as boxFillField,Ei as boxPhoneRowField,Ti as boxShareField,wa as boxSharePhoneField,xa as boxShareTabletField,Vi as boxThemeIndexOf,ra as bucketHeader,ha as buttonWordsEntryField,_i as cardCornersField,ai as cardImageBackgroundField,il as cardImageField,qa as cardMediaFields,ga as cardShapeFields,Za as cardShowFields,Ja as cardStyleFields,Ca as cellWidthFields,Na as checkbox,Aa as colorInput,Hs as containerDirectionField,jr as containerGapField,Vr as containerGapPhoneField,Ds as containerGapRows,zr as containerGapTabletField,Zi as coordsResultTip,Zs as copyText,Ht as cornerSidesField,Ae as cornersRowField,Fa as date,ka as dateTime,ia as designGroupHeader,Qa as displayFields,Da as edgePad,ve as fillSlotChoices,ja as focusAfterRemove,va as focusKeptField,la as foldMarker,fe as foldMetaOf,ri as foldTitleOf,Di as followedHeightPatch,Wi as followedStickPatch,tc as galleryLayoutField,Oa as heightFields,de as heightFollowedBy,Gs as heroGroupPlacementPoints,$e as hidableText,ni as hintIsWhileTyping,ec as imageCornersField,js as inOwnBox,oa as isBucketHeader,Dt as keptBy,Qs as linkField,qi as loadingRowHint,Wa as loadingShowsField,Ha as multiSelect,La as pageBackgroundField,na as panelNote,Ni as phoneOverrideField,Js as plainText,ea as plainTextarea,Bt as pxField,sa as quietMarker,Ke as readHidable,Qi as rowText,Ga as searchSelect,si as sectionBandChoices,fa as sectionBorderField,fi as sectionCornersField,pa as sectionShapeFields,ua as sectionThemeFields,el as setRowText,ya as sizeField,Ma as sourceField,_a as spacingFields,Ia as stickFields,Ra as swapPadding,ma as templateField,Ys as text,rn as textFieldIdentifier,Ws as textFieldOffPage,$s as textFieldPanelOnly,za as textList,Ya as textListRowField,qs as textarea,$i as toggle,Ka as upload,ci as useSelectedPatch,N as useSelectedProps,L as useSelectedSibling,$r as useSiteGapDetail,Ta as widthField,Xs as withIdentifier,Us as withOffPage,Ks as withPanelOnly,Ms as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as L,Fragment as k}from"react/jsx-runtime";import{cloneElement as pe,createContext as nn,useContext as Ke,useEffect as on,useId as $e,useRef as z,useState as q}from"react";import{useEasel as ee,useSelectedHost as M}from"efficient-easel/easel";import{PIN_LENGTH as te,toDateKey as rn,fromDateKey as ln}from"efficient-shell/format";import{say as s,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as sn}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as Xe,firstFrameHint as an,loadingShowsOf as cn,loadingStillHint as dn}from"../../../format/lib/hero-video.js";import{pageFramesFor as un,usePageVideoFrames as pn}from"../page-video-frames.js";import{ScreenDocumentContext as fn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as je,hidableText as Ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as fe,LINK_FIELD_MARKER as Ye,MEDIA_FIELD_MARKER as ze,SCAFFOLD_FIELD_MARKER as qe,TEXT_FIELD_MARKER as O,foldMetaOf as he,textFieldIdentifier as hn}from"efficient-easel/draw";import mn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Je}from"../../../render/lib/document/show-when.js";import gn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bn,CORNER_RADIUS_MAX as Ze,CORNER_RADIUS_MIN as W}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Sn,IMAGE_CORNERS_LABEL as wn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Cn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as yn,galleryChoices as Qe,galleryLayoutRatio as _n,galleryPictureCells as In}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Tn}from"./shell-glyph.js";import{anchorSiblingsOf as On,placementPoints as En}from"../../../format/lib/hero-group-placement.js";import Rn from"../../components/AnchorField.js";import Nn from"../../components/SourceStatus.js";import{AdjustIcon as kn,EyeIcon as Pn,AnimationIcon as Fn,BackgroundIcon as et,BorderAllIcon as Ln,BlockSectionIcon as An,ColumnWidthsIcon as me,ColumnsIcon as tt,CornerIcon as nt,DirectionDownIcon as vn,DirectionLeftIcon as Bn,DirectionRightIcon as Dn,DirectionUpIcon as Hn,EditIcon as Gn,GapIcon as Mn,GridIcon as Wn,GroundIcon as ge,HashIcon as ot,HeightIcon as rt,ImageIcon as Un,ListIcon as Kn,LocationIcon as it,PaddingBottomIcon as lt,PaddingLeftIcon as st,PaddingRightIcon as at,PaddingTopIcon as be,PageIcon as $n,StickyIcon as ct,SearchIcon as Xn,SquareIcon as jn,TypeIcon as Vn,WidthIcon as Yn}from"efficient-easel/icons";import{FieldGlyph as dt}from"../../components/FieldGlyph.js";import{resolvePageBackground as zn}from"../../../format/lib/content/page-background.js";import{boxFillOf as qn,boxFillSlot as Se}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as ut,CORNER_SIDE_POINTS as Jn,hasOwnSectionCorners as Zn,normalizeCornerSides as pt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Qn,enclosingSection as eo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as to,SettingsField as S,SettingsGroup as no,SettingsGroupSub as oo,SettingsSegmented as ro,SettingsBorder as io,SettingsSidesEach as lo,SettingsSwitch as we,borderSides as so,borderStartEach as ao}from"efficient-easel/panel";import{ListField as co}from"efficient-easel/fields";import{DisplayChips as uo}from"efficient-shell/ui";import{desktopDisplayChanged as po,partShownOnDesktop as fo,partShownOnPhone as ho,phoneDisplayChanged as mo,withDesktopPart as go,withPhonePart as bo}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as So,Checkbox as wo,ColorSwatch as xo,CornersInput as Co,DatePicker as yo,DateTimePicker as _o,FOCAL_DEFAULT as Io,IconPicker as ft,COLUMN_COUNT_MAX as ht,COLUMN_SHARE_MIN as To,COLUMN_SHARES_EQUAL as Oo,resolveColumnShares as mt,WidthsBar as Eo,useShellStrings as Ro,IconButton as gt,InputNumber as bt,Slider as No,Tooltip as xe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as ko}from"./geocode-resolve.js";import{ColourRow as oe,InheritedColourRow as St}from"./ColourControl.js";import{fillThemeColors as Po,slotFill as re}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Ce}from"../../../format/lib/document/part-inks.js";import{keptByRow as Fo}from"efficient-easel/screen/lib/document/style-fields";import wt from"./MarkupToolbar.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Lo,NoControlMark as Ao,noControlField as xt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as vo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Bo,PANEL_ONLY_FIELD as Do}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Ho,resolvePhoneValue as ye}from"../../../format/lib/document/phone-override.js";import{phoneKey as U,tabletKey as _e}from"efficient-easel/draw";import{viewKey as E}from"../../../format/lib/animation/views.js";import{viewRows as A}from"../animation/view-rows.js";import{SuppressibleText as Go}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Mo,CARD_OUTLINE_OPTIONS as Wo,DEFAULT_CARD_INDEX_FORMAT as Uo,DEFAULT_CARD_OUTLINE as Ko}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as $o,DEFAULT_COVER_INDEX as Xo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as jo}from"efficient-easel/draw";import Vo from"../../components/MediaUploadField.js";import Yo from"../../components/MultiSelectField.js";import zo from"../../components/SectionThemePicker.js";import qo from"../../components/SearchSelectField.js";import Jo from"../../components/StorefrontLinkField.js";import{UiIcon as Ct}from"efficient-easel/draw/client";import{SECTION_PADDING as R}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Zo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Qo}from"efficient-easel/draw/client";import{encodePartId as er}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as tr,useEaselStrings as nr}from"efficient-easel/strings";import{hasPhoneHeight as or,hasTabletHeight as Ie,resolveSectionMinHeight as rr,resolveTabletHeight as ir}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as lr,SECTION_PIN_ABOVE_HINT as sr,SECTION_PIN_ABOVE_KEY as ar,SECTION_PIN_ABOVE_LABEL as cr,SECTION_PIN_GROUP as dr,SECTION_PIN_LABEL as yt,SECTION_PIN_SCREENS_KEY as Te,SECTION_PIN_SCREENS_LABEL as _t,SECTION_PIN_STOP_DEFAULT as ur,SECTION_PIN_STOP_HINT as pr,SECTION_PIN_STOP_KEY as fr,SECTION_PIN_STOP_LABEL as hr,SECTION_PIN_STOP_OPTIONS as mr,SECTION_STICK_DISTANCE as ie,SOME_VIEW_PINS as It,hasPhoneStick as gr,hasTabletStick as br,resolveSectionStick as Oe,sectionPinStopOf as Sr,sectionPinStopWrite as wr}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as xr,SECTION_MIN_HEIGHT_GROUP_LABEL as J,SECTION_SCREEN_PCT as Cr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as yr,resolveContainerDirection as Tt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as _r,BOX_BLOCK_SPACING_POINTS as Ot,BOX_PHONE_ROW_LABEL as Et,BOX_COLUMNS_MAX as Ir,BOX_COLUMNS_MIN as Rt,BOX_PHONE_ROW_MAX as Tr,BOX_PHONE_ROW_MIN as Ee,BOX_SHARE_CHOICES as Nt,BOX_SHARE_LABEL as K,boxShareChoiceOf as kt,boxShareWidthsOf as Re,BOX_SHARE_PHONE_DEFAULT as Or,BOX_SHARE_PHONE_POINTS as Er}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Rr,borderBySide as Pt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Nr,normalizeTheme as Ft,normalizeThemeColors as kr,sectionBandTone as Pr,surfaceTwoTone as Fr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Lt,CONTAINER_GAP_BUILT_IN as Lr,CONTAINER_GAP_PHONE as Ne,GAP_FIELD_CONTAINER as ke,followsSitePhoneGap as Ar,hasOwnContainerGap as vr,hasOwnPhoneGap as Pe,resolveContainerGap as At,resolvePhoneContainerGap as vt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Br,CARD_IMAGE_BG_OFF as Dr,CARD_IMAGE_BG_SWATCH_NAMES as Hr,CARD_IMAGE_BG_SWATCHES as Gr,isCardImageBackgroundInheriting as Mr,cardImageBackgroundChoice as Wr,THEME_CARD_IMAGE_BG as Ur}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Kr,SECTION_BG_NO_FILL as $r,sectionBackgroundChoice as Xr,THEME_SECTION_BG as Fe,isSectionBackgroundEmpty as jr,sectionBackgroundHex as Bt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Vr,nestedAccentValue as Dt,resolveSectionAccent as le}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Yr,TYPE_SIZE_INHERIT as zr,isTypeSizeInheriting as qr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Jr,WIDTH_CHOICE_LABEL as Zr,WIDTH_INHERIT as Qr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as ei}from"./panel-heading-scope.js";import{useEaselSession as ti}from"efficient-easel/screen/lib/session-context";import{backendOf as ni}from"../website-session.js";import{BOX_GAP as oi,describedAs as N,group as T,iconOf as $,sharedStyleKinds as Z}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Ht,onDesktopWords as B,phoneTwinFields as Le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ri,gapField as Ae,iconPickerRow as ii,pickerCellIcon as li,pickerNoneIcon as si,Segmented as ve,segmented as ai,select as X,slider as j}from"./box-fields.js";function sa({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function D(e,t){return s("{value} from {from}",{value:e,from:t})}function ci(){const{blockGap:e}=v();return e===null?s("this container's own spacing"):D(`${e}px`,s("Styles"))}function di({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:s(n),changed:!e,detail:ci(),onReset:t})}function ui(e){return Ae({...oi,builtIn:Lr[e],resolve:(t,n)=>At(e,t,n?.siteGap),action:(t,n)=>i(di,{inherited:!vr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ke]:e}})}function pi(e){return Je(I("mobile",{[ke]:e,type:"custom",render:t=>i(mi,{container:e,...t})}),Gt)}function fi(e){return Je(I("tablet",{[ke]:e,type:"custom",render:t=>i(hi,{container:e,...t})}),Gt)}const Gt={not:{field:"gap",in:Array.from({length:-Lt.min},(e,t)=>Lt.min+t)}};function aa(e){return{gap:I("desktop",ui(e)),[_e("gap")]:fi(e),[U("gap")]:pi(e)}}function hi({container:e,...t}){const[n]=P("gap"),{siteGap:o}=t.field??{},r=Math.max(Ne.min,At(e,n,o));return Ae({...Ne,builtIn:r,resolve:a=>Pe(a)?a:r,action:(a,c)=>i(y,{words:C()?.panel,label:s("Gap"),changed:Pe(a),detail:B(d=>s(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function mi({container:e,...t}){const[n]=P("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=vt(e,void 0,n,o,r);return Ae({...Ne,builtIn:l,resolve:c=>vt(e,c,n,o,r),action:(c,d)=>i(y,{words:C()?.panel,label:s("Gap"),changed:Pe(c),detail:D(`${l}px`,Ar(e,n,r)?s("Styles"):s("Desktop")),onReset:()=>d(void 0)})}).render(t)}function ca(e){return ri({offered:yr(e),fallback:Tt(e,void 0),resolve:t=>Tt(e,t)})}function da(e,t){return En(t?On(e,t):[],t)}function gi({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:s(n),changed:!e,detail:D(s("Full"),s("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:d,hidden:p}=je(e),h=z(null),f=z(null),u=_=>t(a?{text:_,hidden:p}:_),g=()=>t({text:d,hidden:!p}),m=a&&p,w=$e(),x=r?Ci(r)?i("span",{className:"sf-hint-while-typing",children:s(r)}):s(r):void 0,b=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(S,{label:s(n),icon:i(Vn,{}),htmlFor:w,className:m?"is-hidden":void 0,hint:x,action:a?i(xe,{content:b,children:i(gt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(Ct,{name:"eye-off",size:14}):i(Ct,{name:"eye",size:14})})}):void 0,children:L("div",{className:"sf-copybox",children:[c&&i(wt,{target:l?f:h,value:d,onChange:u}),l?i("textarea",{id:w,ref:f,value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)}):i("input",{id:w,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)})]})})}function ua(e,t){return{...e,[qe]:t}}function pa(e){const t=e[O];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[O]:{...t,offPage:!0}}}function fa(e){return!e||typeof e!="object"?!1:e[O]?.offPage===!0}function ha(e){if(!e[O])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Do]:!0}}function ma(e){return Bo(e)}function ga(e){const t=e[O];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[O]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Nc,SCALAR_TEXT_CONTROLS as kc}from"efficient-easel/draw";function ba(e,t){if(!e[O])throw new Error("inOwnBox: the field holds no authored text");const{[Lo]:o,...r}=e;return{...r,[vo]:!0,render:t}}const bi=new Set(jo),Q={type:"radio",options:[{value:!0},{value:!1}]},Mt={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=N({...t,[O]:e},{...Mt[e.control],label:e.label});if(!bi.has(e.control))return n;const o=t.render;return{...xt(n,"authored-copy"),render:r=>i(Go,{name:r.name,children:o(r)})}},Sa="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Si={field:"source.slug",set:!0},wa={not:Si},wi="Select a word, then press the highlighter.",xi=new Set([wi]),Ci=e=>xi.has(e);function xa(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ca(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function ya(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function _a(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ia(e){return{type:"custom",[Ye]:{label:e},...N({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Jo,{value:Ve(t),onChange:n,label:e})}}function Ta(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Oa={Design:kn,Animation:Fn};function Ea(e){return{type:"custom",render:()=>i(yi,{text:e})}}function yi({text:e}){return i("p",{className:"sf-note",children:s(e)})}function Ra(e){return he(e)!==null&&e?.tabs!==void 0}const Wt=new Map;function Na(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Wt.get(n)??{type:"custom",tabs:t,[fe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Wt.set(n,o),o}const Ut=new Map;function ka(e){const t=Ut.get(e)??{type:"custom",[fe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return Ut.set(e,t),t}function _i(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Pa(e,t){return _i(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function Fa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(k,{})}}function La({title:e,children:t}){const[n,o]=q(()=>!Be.has(e));return i(no,{title:e,open:n,onToggle:r=>{o(r),r?Be.delete(e):Be.add(e)},children:t})}const Be=new Set;function Aa({label:e}){return i(oo,{title:s(e),level:ei(2)})}function Ii({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return L("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?s(o[c]):c;return i(xe,{content:d,children:i(xo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function va(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ti,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ti({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:a,n:c}=Me(),d={background:a.background,surface:a.surface,surface2:Fr(a),band:Pr(a)},p=n?Fe:t,h=jr(l,t,p),f=Bt(void 0,p,d),u=n?Kr:void 0,g=p===Fe?s("the theme's section background"):s("Theme {n} background",{n:c}),m=Oi(l,t,a,c,d,r),w=D(f.toUpperCase(),g),x=Ce(l),b=x?re(x,a,c):null;return b?i(oe,{label:s(e),icon:i(et,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:w,choices:m}):i(St,{label:s(e),icon:i(et,{}),value:h?"":Bt(l,t,d),inherited:f,resetTo:w,onChange:r,onReset:()=>r(u),choices:m})}function Oi(e,t,n,o,r,l){const a=Xr(e,t);return[{label:s("No fill"),color:"",selected:a==="none",onPick:()=>l($r)},{label:`${s("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>l(Fe)},...Ge(Ce(e)??"",n,o,l)]}function Ei(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Mr(r,t);return i(S,{label:s(e),icon:i(ge,{}),changed:!l,action:i(y,{words:C()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Br)}),children:Ii({swatches:Gr,current:l?Ur:Wr(r,t),onPick:o,names:Hr})})}}}function Ba(e=n=>n,t){return Z({_gSectionTheme:T(Vr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(zo,{value:e(n),onChange:o,followLabel:t})}})}function V({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:d,disabled:p=!1,placeholder:h,placeholderWord:f,onClear:u}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(No,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...f?{emptyLabel:s(f)}:{},suffix:l||void 0,showInput:a,label:d===void 0?void 0:s(d),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m===null?u?.():m!==o&&r(m)}})})}function Kt(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:d,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:u})=>{const g=typeof f=="number"?f:null,m=g===null;return i(S,{label:s(e),icon:p?$(p):void 0,value:m?d||l===void 0?void 0:s(l):`${g}${h}`,changed:!m,action:d?pe(d,{changed:!m,onReset:()=>u(null)}):i(y,{words:C()?.panel,label:s(e),changed:!m,onReset:()=>u(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):V({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const se="Corners";function De(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(S,{label:s(se),icon:i(nt,{}),changed:r,action:pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ni,{tier:e,px:o,onRadius:n})})}}}function P(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function $t(){return xt({type:"custom",render:()=>i(Ao,{})},"always")}function Ri(){const e=M();return t=>e?.onChangeMany(t)}function Ni({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=P(e.sidesKey),a=pt(r)??[...ut];return i(Co,{label:s(se),value:a,corners:Jn,onChange:c=>{const d=pt(c)??[];l(d.length===ut.length?null:d)},radius:t,onRadiusChange:n,radiusMin:W,radiusMax:Ze,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Xt(){return $t()}function ki({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:s("not set");return i(y,{words:C()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):D(r,s("Styles")),onReset:n})}function Pi(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:W}function Fi(){return De({sidesKey:"sectionCornerSides",useFollowed:Pi,mark:i(ki,{label:se}),hint:Li})}const Li="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Da(){return Z({_gShape:T("Shape"),sectionCorners:Fi(),sectionCornerSides:Xt(),...A("sectionBorder",jt)})}const Ai=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function vi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Bi(){let e;try{const t=Ft(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Nr.line}function Di({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,p]=q(()=>r?ao(c,a):!1),h=Ai(),f=u=>vi(r&&l?u:{width:u.width,color:u.color,...l?{style:u.style}:{}});return i(S,{label:s("Border"),icon:i(Ln,{}),action:r?i(lo,{each:d,label:s("Each side"),onChange:p}):void 0,children:i(io,{label:s("Border"),value:c,each:d,onChange:u=>t(f(u)),placeholder:n,presets:o,words:h,styles:l,max:Rr})})}function Hi({value:e,onChange:t,view:n}){const[o]=P("sectionBorder"),[r]=P(_e("sectionBorder")),l=Bi(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Pt(a(o)),...Pt(a(r))}:n==="tablet"?a(o):{};return i(Di,{value:e,onChange:t,placeholder:{sides:so(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}function Ha(e){return I(e,jt(e==="mobile"?"phone":e))}function jt(e){return{type:"custom",render:({value:t,onChange:n})=>i(Hi,{value:t,onChange:n,view:e})}}function Ga(e){return{type:"custom",render:()=>i(Gi,{partKey:e})}}function Gi({partKey:e}){const[t]=P("id"),[n]=P("_partStyles"),{textStyles:o}=v(),r=nr();let l=null;try{l=Qo().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(to,{name:s("Text"),preview:Zo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??tr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(er(t,e))}})}function Vt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=ee(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?eo(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Zn(r)?r:n}function Mi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Vt(W);return i(y,{words:C()?.panel,label:s(e),changed:t,detail:D(`${o}px`,s("the section")),onReset:n})}function Wi(){return i(k,{children:s("Follows the section's Corners until you set a number here.")})}function Ui(){return De({sidesKey:"cardCornerSides",useFollowed:()=>Vt(W),mark:i(Mi,{label:se}),hint:i(Wi,{})})}function Ki(){return{type:"custom",render:()=>i(mn,{})}}function Ma(e){return{...e,render:t=>i(gn,{render:e.render,props:t})}}function Wa(){return{_gShape:T("Shape"),cardCorners:Ui(),cardCornerSides:Xt(),cardCornersApplyAll:Ki()}}function $i(){return N({type:"custom",render:e=>i(ji,{...e})},{type:"select",label:K,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Xi(e,t){const n=kt(e);if(n!=="custom")return s(Nt.find(r=>r.value===n)?.label??"");const o=mt(Re(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):s("Custom")}function ji(e){const{value:t,onChange:n}=e,[o]=P("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,a=t!=null,c=a?t:l?e.follows:void 0,d=kt(c),p=r>=2&&r<=ht,h=()=>[...Oo[r]??[]],f=z(null),u=b=>{const _=f.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!p||n(b==="custom"?h():b)},m=s("The width bar works for 2 to {count} blocks.",{count:ht}),w=a&&(l||t!=="content"),x=Ro().widths.hint(r,To);return i(S,{label:s(K),icon:i(me,{}),changed:w,hint:d!=="custom"?void 0:p?x:m,action:i(y,{words:C()?.panel,label:s(K),changed:w,disabled:e.readOnly===!0,detail:l?B(b=>s(b),Xi(e.follows,r),e.followsView):s("Fit content"),onReset:()=>n(void 0)}),children:L("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ft,{label:s(K),value:d,options:Nt.map(b=>({value:b.value,label:b.value==="custom"&&!p?m:s(b.label),icon:li(i("span",{className:"sf-gallery-pic sf-share-pic",children:Yt(b.weights).map((_,Y)=>i("i",{style:{gridColumn:`span ${_}`}},Y))}),s(b.label),b.value==="custom"&&!p?m:s(b.label))})),onChange:g,columns:3,cell:zt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:mt(Re(c,r),r)}},onBlur:()=>{f.current=null},children:i(Eo,{label:s(K),count:r,value:Re(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function Yt(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 Ua(){return X(_r,i(Mn,{}),Ot,Ot[0].value)}function Ka(){return I("mobile",ii(K,i(me,{}),Er.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Yt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Or,{columns:2,cell:zt}))}const zt={width:"5.75rem",height:"3.25rem"};function $a(){return Le("share",$i(),Ht)[_e("share")]}function Vi(){return I("mobile",j(Et,i(tt,{}),Ee,Tr,1,Ee,"",{clear:{phoneFollows:!1,hint:Ee}}))}const qt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Xa(){const e=j(Et,i(tt,{}),Rt,Ir,1,Rt,"",{clear:{emptyLabel:"Auto"}}),t=Le("columns",e,{...qt,tablet:Ht.tablet}),n=Le("columns",e,qt,{phoneRow:Vi()});return{...t,phoneRow:n.phoneRow}}function ja(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(S,{label:s(e),icon:i(dt,{noun:l}),action:i(y,{words:C()?.panel,label:s(e),changed:!qr(a),detail:s("the Text style in Styles"),onReset:()=>c(zr),defaultAction:{onPress:()=>c(Yr),title:s("Keep this section's own built-in size"),icon:i(An,{})}}),children:V({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Va(){return{_gCellWidth:T("Cell width"),gridSpan:X("Positions",i(me,{}),[{label:"Auto",value:""},...Array.from({length:xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function F(){let e=null,t=null;try{e=Ke(Yi),t=ee(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Yi=nn(null);function zi({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const d=F()[a],p=ye(void 0,d,c);return i(k,{children:V({min:e,max:t,step:n,value:ye(o,d,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function qi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=F()[t],c=ye(void 0,a,n);return i(y,{words:C()?.panel,label:s(e),changed:r,detail:B(d=>s(d),`${c}${o}`),onReset:l})}function Ji(e){return Kt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(qi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(zi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Zi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Qi={Top:be,Bottom:lt,Left:st,Right:at},el=e=>{const t=Qi[e];return i(t,{})};function Ya(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Zi[x],l=x=>j(r("Top"),i(be,{}),R.min,R.max,R.step,x,"px"),a=(x,b,_,Y=R)=>I("mobile",Ji({label:r(x),icon:el(x),desktopKey:b,min:Y.min,max:Y.max,step:Y.step,fallback:_})),c=e.top??R.min,d=e.bottom??R.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??R,u=e.side??f.min,g=e.sidePhone??u,m=e.phone===!0,w=x=>m?I("desktop",x):x;return Z({...o?{_gSpacing:T("Padding")}:{},[t]:w(l(c)),...m?{[U(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w(j(r("Bottom"),i(lt,{}),R.min,R.max,R.step,d,"px")),...m?{[U(n)]:a("Bottom",n,d)}:{}},...e.sides?{[p]:w(j(r("Left"),i(st,{}),f.min,f.max,f.step,u,"px")),...m?{[U(p)]:a("Left",p,g,f)}:{},[h]:w(j(r("Right"),i(at,{}),f.min,f.max,f.step,u,"px")),...m?{[U(h)]:a("Right",h,g,f)}:{}}:{}})}function za(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&he(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const ae="Width";function qa(e,t=Jr,n=!0){const o=t.map(r=>({label:Zr[r],value:r}));return Z({...n?{_gWidth:T(ae)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(S,{label:s(ae),icon:i(Yn,{}),action:n?i(gi,{inherited:l?.inherited??!1,onReset:()=>r(Qr),label:ae}):void 0,children:ve({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ae})})}})}function Ja(){const e=(o,r)=>({type:"custom",render:({value:l,onChange:a})=>i(tl,{value:l,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:l,field:a})=>i(ol,{value:r,onChange:l,unit:a?.unit,view:o})}),n=o=>{const r=ai("Unit",i(ot,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const l=r.render;return{...r,render:a=>i(rl,{props:a,draw:l,view:o})}};return Z({_gHeight:T(J),...A("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(il,{view:o,onClear:()=>r(void 0)}))),...A("sectionHeightValue",t),...A("sectionHeightUnit",n)})}function tl({value:e,onChange:t,view:n,badge:o}){const r=F(),l=c=>["auto","fixed","screen"].includes(c),a=ce(n,r)?.mode??"auto";return i(S,{label:J,icon:$(i(rt,{})),action:o?o(t):void 0,children:ve({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:l(e)?e:a,onChange:t,ariaLabel:J})})}function Jt(e,t){return e==="phone"&&Ie(t)?ir(t):rr(t)}function ce(e,t){return e==="desktop"||(e==="tablet"?Ie(t):or(t))?null:Jt(e,t)}function nl(e,t,n,o){const r=ce(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[E("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[E("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[E("sectionHeightValue",e)]:r.value}:{},[E(n,e)]:o}}function Zt(e,t,n){const o=M(),r=ce(e,F());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=nl(e,c,t,a);return d===null?{[E(t,e)]:a}:Object.keys(d).length?d:null})}}function ol({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:l}=Zt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Cr:xr;return i("div",{className:"sf-field",children:V({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:J,onChange:l})})}function rl({props:e,draw:t,view:n}){const{followed:o,write:r}=Zt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function il({view:e,onClear:t}){const n=F(),o=ce(e,n)===null,r=e==="phone"&&Ie(n),l=Jt(e,n),a=B(c=>s(c),l.mode==="auto"?s("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(y,{words:C()?.panel,label:s(J),changed:o,detail:a,onReset:t})}function Za(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:a,onChange:c,id:d,name:p})=>i(pl,{value:a,onChange:c,labelId:`${d??p??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:a,onChange:c})=>i(cl,{value:a,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:a,onChange:c})=>i(dl,{value:a,onChange:c,view:l,intro:t})});return{_gStick:T(dr,{dot:t?al:It}),...A("stickTop",n),...A("stickTopDistance",o),...e.screens?A(Te,r):{},...t?{}:{[fr]:ll()},...t||e.above===!1?{}:{[ar]:sl()}}}function ll(){const e=X(hr,i(be,{}),mr,ur);return I("desktop",{...e,render:t=>{const n=e.render({...t,value:Sr(t.value),onChange:o=>t.onChange(wr(o))});return pe(n,{hint:s(pr)})}})}function sl(){const e=tn(cr,!1,i(ct,{}),sr);return I("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const al={any:[It,lr]};function Qt(e,t,n,o){const r=M(),l=F(),a=e==="desktop"||de(e,l)?null:He(e,Oe(l,{intro:o}));return{followed:a,write:a&&r?d=>r.onChangeMany(p=>{const h=ul(e,p,d,t,o);return h===null?{[E(t,e)]:d}:Object.keys(h).length?h:null}):n}}function cl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Qt(n,"stickTopDistance",t,o);return i("div",{className:"sf-field",children:V({min:ie.min,max:ie.max,step:ie.step,value:r?null:typeof e=="number"?e:ie.fallback,...r?{placeholder:r.distance}:{},suffix:"px",ariaLabel:s("Distance from top"),onChange:l})})}function dl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Qt(n,Te,t,o);return i(S,{label:s(_t),icon:$(i(rt,{})),children:V({min:te.min,max:te.max,step:te.step,value:r?null:sn(e)??te.default,...r?{placeholder:r.screens}:{},ariaLabel:s(_t),onChange:l})})}function de(e,t){return e==="tablet"?br(t):gr(t)}function He(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,screens:t.desktopScreens}}function ul(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||de(e,t))return null;if(n===void 0)return{};const l=He(e,Oe(t,{intro:r})),a=e==="phone"&&de("tablet",t)?d=>E(d,"tablet"):d=>d,c=(d,p)=>t[a(d)]==null?{}:{[E(d,e)]:p};return{[E("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...c(Te,l.screens),[E(o,e)]:n}}function pl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=F(),a=Oe(l,{intro:r}),c=o==="phone"?a.phone:o==="tablet"?a.tablet:r?a.desktop:e===!0,d=o==="phone"&&a.ownTablet,p=o==="desktop"?null:He(o,a),h=p?.on?`${p.distance}px`:s("Off");return i(S,{label:s(yt),labelId:n,icon:$(i(ct,{})),action:L(k,{children:[o!=="desktop"?i(y,{words:C()?.panel,label:s(yt),changed:de(o,l),detail:B(f=>s(f),h,d?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(we,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const en="e.g. about";function Qa(){return{_gAnchor:T("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:en},{type:"custom",render:({value:e,onChange:t})=>i(Rn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:en,hideable:!1,markup:!1})})})}}function ec(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(S,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(_o,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:p=>r(p?p.toISOString():"")})})}}}function tc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(S,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(yo,{id:c,value:ln(typeof o=="string"?o:null),onChange:d=>r(d?rn(d):"")})})}}}function tn(e,t,n,o){return{type:"custom",...N({},{...Q,label:e}),render:r=>{const{value:l,onChange:a,id:c,name:d}=r,p="follows"in r,h=r,f=typeof l=="boolean",u=typeof h.follows=="boolean"?h.follows:t,g=f?l:p?u:t,m=`${c??d??e}-label`,w=h.readOnly===!0,x=i(we,{checked:g,onChange:a,disabled:w,ariaLabelledBy:m});return i(S,{label:s(e),labelId:m,icon:n,hint:o===void 0?void 0:s(o),action:p?L(k,{children:[i(y,{words:C()?.panel,label:s(e),changed:f,detail:h.followsNoView?s(u?"On":"Off"):B(b=>s(b),s(u?"On":"Off"),h.followsView),disabled:w,onReset:()=>a(void 0)}),x]}):x})}}}function nc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(fl,{label:"Background",icon:i($n,{}),id:r,value:e,shown:zn(e),onChange:t})}}}function oc(e,t){return{type:"custom",...N({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(S,{label:s(e),htmlFor:a,className:"sf-checkbox",action:i(wo,{id:a,checked:l,onChange:o})})}}}function rc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(oe,{label:s(e),icon:n,value:o||t,onChange:r})}}function fl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:a,n:c}=Me(),d=Ce(o),p=d?re(d,a,c):null;return i(oe,{label:s(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:l,choices:Ge(d??"",a,c,l)})}function ic(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(hl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ge(e,t,n,o){const r=Se(e);return Po(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function hl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Me(),l=o.background,a=D(l.toUpperCase(),s("Theme {n} background",{n:r})),c=Se(e),d=c?re(c,o,r):null,p=Ge(e,o,r,t),h=n?()=>t(void 0):()=>t("");let f=l,u=a;if(n){const g=Se(n.follows),m=qn(n.follows),w=g?re(g,o,r):m?{hex:m,words:m.toUpperCase()}:null;f=w?.hex??l,u=B(x=>s(x),w?w.words:a,n.view)}return d?i(oe,{label:s("Fill"),icon:i(ge,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:h,resetTo:u,choices:p}):i(St,{label:s("Fill"),icon:i(ge,{}),value:e,inherited:f,resetTo:u,onChange:t,onReset:h,choices:p})}function ml(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return le(n);const r=Qn(e,t);if(r.length===0)return null;const l=le(Dt(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=le(Dt(r[a].sectionAccent));if(c!==null)return c}return le(r[0].sectionAccent)}function Me(){const e=Ft(v().theme),[t]=P("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=ee(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?ml(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:kr(e.themes[o]),n:o+1}}const gl=[{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 bl({label:e,value:t,onChange:n,points:o=gl}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(So,{label:s(e),value:t,points:r,onChange:n})}function lc(){return $t()}const sc={top:i(Hn,{}),right:i(Dn,{}),bottom:i(vn,{}),left:i(Bn,{})};function ac(e,t,n,o,r,l,a){const c=f=>t.find(u=>u.value===f),d=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const u=t.find(m=>m.cell===f);if(!u)return d(`missing-${f}`);const g=l?.[f];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},h=[d("corner-top-left"),p("top"),d("corner-top-right"),p("left"),d("centre"),p("right"),d("corner-bottom-left"),p("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const g=t.some(m=>m.value===f)?f:n;return i(S,{label:s(e),icon:r,value:c(g)?.label?s(c(g).label):a?s(a):"",children:bl({label:e,value:g,onChange:u,points:h})})}}}function cc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Yo,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function dc(e,t,n,o){return{type:"custom",options:t,fallback:n,...N({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(qo,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function uc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const pc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function fc(e,t,n){const o=Object.keys(Xe).map(r=>({label:Xe[r],value:r,picture:n[r]}));return{type:"custom",...N({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(wl,{label:e,icon:t,options:o,onChange:r})}}function Sl(e,t,n){const o=an(e,t,n);if(o!==void 0)return o==="save-makes-frame"?s("A frame is made from this video when you save the page."):o==="starts-dark"?s("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?s("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?s("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?s("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?s("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=dn(e);return r==="frame-missing-image"?s("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?s("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?s("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?s("No image yet. The slide shows its background colour until you choose one."):void 0}function wl({label:e,icon:t,options:n,onChange:o}){const r=M(),l=r?.values??{},a=cn(l),c=Ke(fn),d=pn(c?.docId??null);let p=null;try{p=ee(f=>f.appState.data)}catch{p=null}const h=un(r?.id,p,d);return i(S,{label:s(e),icon:$(t),hint:Sl(l,h,c?.hasUnsavedEdits??!1),children:ve({options:n,value:a,onChange:o,ariaLabel:e})})}function hc(e,t,n,o={}){const r={type:"custom",[ze]:!0,render:({value:l,onChange:a,name:c})=>i(Vo,{value:l||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?I("each",r):r}const mc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function xl(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function gc({value:e,onChange:t,label:n}){const o=e||{},r=M(),l=r?r.values!==r.node.props:!0,a=!!o.pending&&l,c=!!o.pending&&!l,d=!!ni(ti()).geocode,p=$e(),h=(f,u)=>t({...o,[f]:u??void 0});return L(k,{children:[i(S,{label:s(n),icon:i(it,{}),action:d?i(xe,{content:s("Find from the address (OpenStreetMap)"),children:i(gt,{"aria-label":s("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Xn,{})})}):void 0,children:d&&o.status?i(Nn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?s("Finding…"):c?s(ko):s(o.status),hint:xl(o)}):null}),i(S,{label:s("Enter by hand"),labelId:p,icon:i(Gn,{}),action:i(we,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:p})}),o.manual&&i(S,{label:s("Latitude, longitude"),icon:i(it,{}),children:L("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(bt,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>h("lat",f),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(bt,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>h("lng",f),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function Cl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function yl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function bc(e,t){return e===null?null:t>e?e:null}function _l(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 Sc={label:"Ticker items",icon:i(Kn,{})};function wc(e,t,n,o){return{type:"custom",[O]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...N({},{...Mt.textList,label:e}),render:({value:r,onChange:l})=>i(Il,{label:e,icon:$(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Il({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=z(null),[c,d]=q(null),p=f=>f.map(u=>({text:u?.text??""})),h=f=>{const u=_l(n,f,c);u===null&&(a.current=null),d(u),r(p(f))};return i(co,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(wt,{target:a,value:Cl(n,c),onChange:f=>r(yl(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,u,g)=>i("input",{type:"text",className:l&&c===u?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:u+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,d(u)}})})}function xc(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:r})=>i(H,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Cc(e){return{_gCards:T("Cards"),coverIndex:X("Cover image",i(Un,{}),$o,String(Xo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ei("Image background",Dr),cardImage:El()}}function yc(){return{outline:X("Card outline",i(jn,{}),Wo,Ko),indexBadge:X("Card number",i(ot,{}),Mo,Uo),showBadge:tn("Product badge",!0,i(dt,{noun:"tag"}))}}function _c(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ue.find(l=>l.id===r).label}),o=r=>N(Fo(We),n(r));return{_gShowOnCard:T("Show on a card"),[We]:N({type:"custom",render:()=>i(Tl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(We)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const We="showCardPrice",ue=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Tl({rest:e}){const t=F(),n=Ri(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=ue.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ue,{parts:ue,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ue.map(({id:a})=>[a,void 0])))})}function Ic(e,t="display"){const n=U(t);return{[t]:I("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ue,{parts:e,changed:po(o),shown:l=>fo(o,l),onPress:(l,a)=>r(go(o,l,a)),onReset:()=>r(void 0)})}),[n]:I("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Ol,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ue({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:a}){const c=s("Display");return i(S,{label:c,icon:i(Pn,{}),changed:t,action:i(y,{words:C()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(uo,{label:c,items:e.map(d=>({id:d.id,label:s(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:s(a)}:{}})),onChange:o})})}function Ol({parts:e,desktopKey:t,value:n,onChange:o}){const r=F()[t];return i(Ue,{parts:e,changed:mo(n),shown:l=>ho(r,n,l),onPress:(l,a)=>o(bo(n,l,a)),onReset:()=>o(Ho),detail:s("the same as Desktop")})}function El(){return Kt("Card image",{min:W,max:Ze,step:bn,icon:i(nt,{}),hint:"Rounds the picture. The card's own corner is in Styles."})}function Tc(){return De({sidesKey:"cornerSides",step:Sn,useFollowed:()=>W,mark:i(Rl,{label:wn}),hint:s("Rounds the picture. Left alone it stays square.")})}function Rl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:C()?.panel,label:s(e),changed:t,onReset:n})}function Oc(){return{type:"custom",render:({value:e,onChange:t})=>i(Fl,{value:typeof e=="string"?e:"",onChange:t})}}function Nl({layout:e,width:t}){const n=_n(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:In(e).map(([r,l],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},a))})}const kl={width:"3.5rem",height:"2.5rem"},Pl=200;function Fl({value:e,onChange:t}){const[n,o]=q(null),[r,l]=q(4),a=z(null);on(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>l(u.getBoundingClientRect().width>=Pl?4:3);g();const m=new ResizeObserver(g);return m.observe(u),()=>m.disconnect()},[]);const c=e&&e in ne?e:"",d=Qe(n,c),p=Qe(n,"").length,h=Tn("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:si(h,s("Not chosen"))},...d.map(u=>({value:u,label:s(ne[u].label),icon:i(Nl,{layout:ne[u],width:40})}))];return i(S,{label:s("Layout"),icon:i(Wn,{}),value:c?s(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ft,{label:s("Layout"),value:c,options:f,onChange:t,columns:r,cell:kl,header:L("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(ro,{options:[{id:"all",label:s("All")},...Cn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:yn.length})})]})})})})}export{Si as BOUND_TO_POST,Sa as BOUND_TO_POST_NOTE,Oa as BUCKET_ICONS,mc as CUSTOM_FIELD_MEDIA,gc as CoordsField,Gt as DESKTOP_GAP_NOT_OVERLAP,Ue as DisplayRow,sc as EDGE_ARROWS,Io as FOCAL_DEFAULT,gl as FOCAL_POINTS,fe as FOLD_FIELD_MARKER,bl as FocalPicker,Aa as GroupLabel,wi as HIGHLIGHT_HINT,H as HidableTextField,Ye as LINK_FIELD_MARKER,sa as Label,ze as MEDIA_FIELD_MARKER,pc as MEDIA_TYPE_OPTIONS,wa as NOT_BOUND_TO_POST,La as PanelBand,yi as PanelNoteLine,Yi as RowPropsContext,qe as SCAFFOLD_FIELD_MARKER,kc as SCALAR_TEXT_CONTROLS,di as SiteGapDefaultReset,V as Slider,Ii as Swatches,Nc as TEXT_CONTROL_KINDS,O as TEXT_FIELD_MARKER,Sc as TICKER_ITEMS_ROW,Il as TextListField,fl as ThemeFillRow,ae as WIDTH_LABEL,gi as WidthDefaultReset,_l as aimAfterListChange,Qa as anchorFields,D as backTo,va as backgroundField,Ua as boxBlockSpacingField,Xa as boxColumnsFields,ic as boxFillField,Vi as boxPhoneRowField,$i as boxShareField,Ka as boxSharePhoneField,$a as boxShareTabletField,ml as boxThemeIndexOf,Na as bucketHeader,Ga as buttonWordsEntryField,Ui as cardCornersField,Ei as cardImageBackgroundField,El as cardImageField,Cc as cardMediaFields,Wa as cardShapeFields,_c as cardShowFields,yc as cardStyleFields,Va as cellWidthFields,oc as checkbox,rc as colorInput,ca as containerDirectionField,ui as containerGapField,pi as containerGapPhoneField,aa as containerGapRows,fi as containerGapTabletField,xl as coordsResultTip,_a as copyText,Xt as cornerSidesField,De as cornersRowField,tc as date,ec as dateTime,ka as designGroupHeader,Ic as displayFields,ac as edgePad,Ge as fillSlotChoices,bc as focusAfterRemove,lc as focusKeptField,Pa as foldMarker,he as foldMetaOf,_i as foldTitleOf,nl as followedHeightPatch,ul as followedStickPatch,Oc as galleryLayoutField,Ja as heightFields,ce as heightFollowedBy,da as heroGroupPlacementPoints,Ve as hidableText,Ci as hintIsWhileTyping,Tc as imageCornersField,ba as inOwnBox,Ra as isBucketHeader,$t as keptBy,Ia as linkField,Sl as loadingRowHint,fc as loadingShowsField,cc as multiSelect,nc as pageBackgroundField,Ea as panelNote,Ji as phoneOverrideField,ya as plainText,Ta as plainTextarea,Kt as pxField,Fa as quietMarker,je as readHidable,Cl as rowText,dc as searchSelect,Oi as sectionBandChoices,Ha as sectionBorderField,Fi as sectionCornersField,Da as sectionShapeFields,Ba as sectionThemeFields,yl as setRowText,ja as sizeField,uc as sourceField,Ya as spacingFields,Za as stickFields,za as swapPadding,Ma as templateField,xa as text,hn as textFieldIdentifier,fa as textFieldOffPage,ma as textFieldPanelOnly,wc as textList,xc as textListRowField,Ca as textarea,tn as toggle,hc as upload,Ri as useSelectedPatch,F as useSelectedProps,P as useSelectedSibling,ci as useSiteGapDetail,qa as widthField,ga as withIdentifier,pa as withOffPage,ha as withPanelOnly,ua as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as A}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const B=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(A()),...Object.keys(A())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...A()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=B.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return B.some(t=>d[t]in e)}function Oe(e){const t=B.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,B as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SeenEntrance } from "../../../render/components/SectionAnimation.js";
|
|
2
|
+
import type { MotionView } from "../../../format/lib/animation/views.js";
|
|
2
3
|
import { PART_LIFT_ATTR, type PartMotion } from "../../../render/lib/animation/part-motion.js";
|
|
3
4
|
export { PART_LIFT_ATTR };
|
|
4
5
|
export type SeenPartEntrances = Map<string, SeenEntrance>;
|
|
@@ -6,4 +7,4 @@ type StampedPart = {
|
|
|
6
7
|
element: HTMLElement;
|
|
7
8
|
partKey: string;
|
|
8
9
|
};
|
|
9
|
-
export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined,
|
|
10
|
+
export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, viewOrPhone: MotionView | boolean, seen: SeenPartEntrances): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ENTRANCE_ATTR as
|
|
1
|
+
import{ENTRANCE_ATTR as K,playEntrance as g}from"efficient-shell/format";import{entranceReplay as b}from"../../../render/components/SectionAnimation.js";import{entranceOf as h,entranceViews as E}from"../../../render/lib/animation/entrance.js";import{scrollOf as A}from"../../../format/lib/animation/scroll.js";import{PART_LIFT_ATTR as y,drawPartEntrance as M,drawPartScroll as R,ensurePartLiftSheet as P,firstOnPage as x,partBoxOf as _,partMotionDrawn as k}from"../../../render/lib/animation/part-motion.js";const d=new WeakMap;function C(f,s,i,w){const c=typeof i=="boolean"?i?"phone":"desktop":i,p=[],l=new Map;for(const{partKey:e}of f){if(l.has(e))continue;const t=s(e)??{},a=E(t),n=w.get(e),o=n?b.next(n,a,c):null;w.set(e,o?o.seen:b.seed(a)),l.set(e,o?.play??!1)}const u=new Map,T=f.filter(e=>!f.some(t=>t!==e&&t.partKey===e.partKey&&t.element.contains(e.element)));for(const e of T){const t=_(e.element);t&&u.set(t,[...u.get(t)??[],e])}for(const[e,t]of u){const a=r=>k(s(r.partKey)??{}),n=x(t.filter(r=>a(r).entrance));if(n){const r=s(n.partKey)??{};p.push(M(e,h(r,c)));const m=d.get(e);d.set(e,n.partKey),(l.get(n.partKey)||m!==void 0&&m!==n.partKey)&&e.hasAttribute(K)&&g(e)}else d.delete(e);const o=e.hasAttribute(K)?void 0:x(t.filter(r=>A(s(r.partKey)??{},c).effect!=="none"));o&&p.push(R(e,A(s(o.partKey)??{},c))),t.some(r=>a(r).hover==="lift")&&(P(e.ownerDocument),e.setAttribute(y,""),p.push(()=>e.removeAttribute(y)))}return()=>p.forEach(e=>e())}export{y as PART_LIFT_ATTR,C as paintPartMotion};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ENTRANCE_KEYS: {
|
|
2
|
+
readonly kind: "entrance";
|
|
3
|
+
readonly from: "entranceFrom";
|
|
4
|
+
readonly duration: "entranceDuration";
|
|
5
|
+
readonly delay: "entranceDelay";
|
|
6
|
+
};
|
|
7
|
+
export declare const LEGACY_ENTRANCE_KEY = "sectionAnimation";
|
|
8
|
+
export declare const ENTRANCE_STORE_KEYS: readonly string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{viewStoreKeys as e}from"./views.js";const n={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},o="sectionAnimation",r=e(Object.values(n));export{n as ENTRANCE_KEYS,r as ENTRANCE_STORE_KEYS,o as LEGACY_ENTRANCE_KEY};
|
|
@@ -7,6 +7,7 @@ export declare const LOOP_OPTIONS: readonly {
|
|
|
7
7
|
value: Loop;
|
|
8
8
|
}[];
|
|
9
9
|
export declare function parseLoop(value: unknown): Loop;
|
|
10
|
+
export declare const LOOP_GROUP_KEY = "_gLoop";
|
|
10
11
|
export declare const LOOP_SCROLLS: ShowWhenRule;
|
|
11
12
|
export type LoopDirection = "left" | "right" | "up" | "down";
|
|
12
13
|
export declare const DEFAULT_LOOP_DIRECTION: LoopDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const
|
|
1
|
+
import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const O="none",i=[{label:"None",value:"none"},{label:"Marquee",value:"scroll"}];function _(o){return r(i,O,o)}const x="_gLoop",D={field:"loop",is:"scroll"},u="left",c=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],a={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function d(o){return r(c,u,o)}function E(o){return o==="up"||o==="down"}function N(o){return l("loop","duration",o.loopDuration!=null?o.loopDuration:o.speed)}const I=e.loop.duration.default,f=e.loop.delay.default;function P(o){return l("loop","delay",o.loopDelay)}function T(o,n,t=f){return`${a[o]} ${n}s ${p.loop}${t?` ${t}s`:""} infinite`}export{f as DEFAULT_LOOP_DELAY,u as DEFAULT_LOOP_DIRECTION,I as DEFAULT_LOOP_SECONDS,c as LOOP_DIRECTION_OPTIONS,x as LOOP_GROUP_KEY,O as LOOP_NONE,i as LOOP_OPTIONS,D as LOOP_SCROLLS,E as isVerticalLoop,T as loopAnimation,P as loopDelayOf,N as loopSecondsOf,_ as parseLoop,d as parseLoopDirection};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const MARK_GAP_PX = 4;
|
|
2
|
+
export interface MarkRect {
|
|
3
|
+
readonly left: number;
|
|
4
|
+
readonly top: number;
|
|
5
|
+
readonly width: number;
|
|
6
|
+
readonly height: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function markZoomCap(mark: MarkRect, others: readonly {
|
|
9
|
+
rect: MarkRect;
|
|
10
|
+
mark: boolean;
|
|
11
|
+
}[], zoom: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const x=4;function s(h,i,e,n){return i<=0?1/0:n?2*(h-4)/(i+e):2*(h-e/2-4)/i}function g(h,i,e){const n=t=>t.width>0&&t.height>0;if(!n(h)||i.some(t=>t.mark&&!n(t.rect)))return 1;const a=h.left+h.width/2,d=h.top+h.height/2;let o=e;for(const{rect:t,mark:c}of i){const f=Math.abs(t.left+t.width/2-a),M=Math.abs(t.top+t.height/2-d),r=Math.max(s(f,h.width,t.width,c),s(M,h.height,t.height,c));o=Math.min(o,Math.max(1,r))}return o}export{x as MARK_GAP_PX,g as markZoomCap};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ScrollValue } from "efficient-shell/format";
|
|
2
|
+
import { type MotionView } from "./views.js";
|
|
3
|
+
export declare const SCROLL_KEYS: {
|
|
4
|
+
readonly effect: "scroll";
|
|
5
|
+
readonly zoom: "scrollZoom";
|
|
6
|
+
readonly start: "scrollStart";
|
|
7
|
+
readonly end: "scrollEnd";
|
|
8
|
+
};
|
|
9
|
+
export declare const SCROLL_GROUP_KEY = "_gScroll";
|
|
10
|
+
export declare const SCROLL_CUSTOMIZE_KEY = "_cScroll";
|
|
11
|
+
export declare const SCROLL_STORE_KEYS: readonly string[];
|
|
12
|
+
type Props = Readonly<Record<string, unknown>>;
|
|
13
|
+
export declare function scrollOf(props: Props, view: MotionView): ScrollValue;
|
|
14
|
+
export type ScrollViews = Readonly<Record<MotionView, ScrollValue>>;
|
|
15
|
+
export declare function scrollDrawn(props: Props): ScrollViews | null;
|
|
16
|
+
export type ScrollOrigins = Readonly<Partial<Record<MotionView, string>>>;
|
|
17
|
+
export declare function scrollOrigins(points: Readonly<Partial<Record<MotionView, string>>>): ScrollOrigins;
|
|
18
|
+
export declare function scrollOriginsOf(props: Props, focusKey: string): ScrollOrigins;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parseFocal as u,formatFocal as i,readScroll as O}from"efficient-shell/format";import{viewFocusValues as S}from"../content/picture-focus-rows.js";import{MOTION_VIEWS as d,followViews as p,followedIn as l,viewStoreKeys as m}from"./views.js";const r={effect:"scroll",zoom:"scrollZoom",start:"scrollStart",end:"scrollEnd"},b="_gScroll",R="_cScroll",g=m(Object.values(r));function n(o,t){return O(l(o,r.effect,t),l(o,r.zoom,t),l(o,r.start,t),l(o,r.end,t))}function h(o){const t={desktop:n(o,"desktop"),tablet:n(o,"tablet"),phone:n(o,"phone")};return d.every(e=>t[e].effect==="none")?null:t}function _(o){const t=p(o.desktop,o.tablet,o.phone),e=s=>{const c=t[s];if(typeof c!="string")return;const{x:f,y:a}=u(c);return i(f,a)};return{desktop:e("desktop"),tablet:e("tablet"),phone:e("phone")}}function k(o,t){return _(S(o,t))}export{R as SCROLL_CUSTOMIZE_KEY,b as SCROLL_GROUP_KEY,r as SCROLL_KEYS,g as SCROLL_STORE_KEYS,h as scrollDrawn,n as scrollOf,_ as scrollOrigins,k as scrollOriginsOf};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type MotionView = "desktop" | "tablet" | "phone";
|
|
2
|
+
export declare const MOTION_VIEWS: readonly MotionView[];
|
|
3
|
+
export declare const viewKey: (key: string, view: MotionView) => string;
|
|
4
|
+
export declare const viewStoreKeys: (keys: readonly string[]) => readonly string[];
|
|
5
|
+
export declare const followViews: (desktop: unknown, tablet: unknown, phone: unknown) => Readonly<Record<MotionView, unknown>>;
|
|
6
|
+
export declare function followedIn(props: Readonly<Record<string, unknown>>, key: string, view: MotionView, desktop?: unknown): unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FOLLOW_RULES as r,phoneKey as c,resolveViewValue as s,tabletKey as a}from"efficient-easel/screen/lib/content/view-tiers";const i=["desktop","tablet","phone"],n=(e,t)=>t==="phone"?c(e):t==="tablet"?a(e):e,w=e=>e.flatMap(t=>i.map(o=>n(t,o))),l=e=>e===null||e===""?void 0:e,f=(e,t,o)=>s("same",l(e),l(t),l(o),r);function x(e,t,o,p=e[t]){return f(p,e[n(t,"tablet")],e[n(t,"phone")])[o]}export{i as MOTION_VIEWS,f as followViews,x as followedIn,n as viewKey,w as viewStoreKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";const
|
|
1
|
+
import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as a}from"../non-empty-string.js";import{slotFieldBlocks as f}from"./slot-field-blocks.js";const p="dataSource",g="dataSourceOptions",u="dataRows",w="countKey",A="counts",C="location-payment-methods",P="shop-payment-methods",v="delivery-options";function y(e){return typeof e.open=="function"}const m=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function n(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const d=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),b=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),l=e=>typeof e=="string"&&e.trim()!=="";function h(e){if(!e||!l(e.label))return null;if(y(e))return{label:e.label.trim(),open:e.open};const t=e.href;return l(t)?{label:e.label.trim(),href:t.trim()}:null}function k(e){if(typeof e.key!="string"||!m.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);const t=e.blocks.find(r=>f().has(r));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);const o=h(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>i(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(d)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(b).map(r=>({...r}))}:{},...o?{edit:o}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(r=>typeof r=="string"&&r.trim()!=="").map(r=>r.trim())}:{}}}function T(e){const t=e.map(k),o=n();for(const r of t)o.sources.set(r.key,r);t.length&&(o.revision+=1)}function U(e){const t=[...n().sources.values()];return e===void 0?t:t.filter(o=>o.blocks.includes(e))}function O(e){return n().sources.get(e)??null}function N(e){return n().sources.get(e)?.choices??[]}function B(){return n().revision}function S(e){const t=e?.[p];return typeof t=="string"?t.trim():""}function i(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[o,r]of Object.entries(e)){const s=a(r);s&&(t[o]=s)}return Object.keys(t).length?t:null}function E(e){const t=e?.[u];return Array.isArray(t)?t.map(i).filter(o=>o!==null):null}function K(e,t,o=[]){const r=E(e);if(r!==null&&(r.length||!t))return{rows:r,sample:!1};if(!t)return{rows:[],sample:!1};const s=O(S(e))?.sample;return{rows:s?.length?s:o,sample:!0}}export{g as BLOCK_SOURCE_OPTIONS_PROP,p as BLOCK_SOURCE_PROP,u as BLOCK_SOURCE_ROWS_PROP,A as COUNTS_SOURCE,w as COUNT_KEY_PROP,v as DELIVERY_OPTIONS_SOURCE,C as LOCATION_PAYMENT_METHODS_SOURCE,P as SHOP_PAYMENT_METHODS_SOURCE,O as blockSourceSpec,U as blockSources,B as blockSourcesRevision,S as declaredBlockSource,y as isSourceEditAction,T as registerBlockSources,E as servedRows,N as sourceChoices,K as sourcedRows};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "
|
|
1
|
+
export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
|
|
2
2
|
export type BoxShape = (typeof BOX_SHAPES)[number];
|
|
3
3
|
export declare function boxShapeOf(value: unknown): BoxShape;
|
|
4
4
|
export declare function boxShapeClass(value: unknown): string;
|
|
@@ -32,6 +32,7 @@ export interface CardRowFieldSpec {
|
|
|
32
32
|
export interface CardTemplateSlotSpec {
|
|
33
33
|
slot: string;
|
|
34
34
|
label?: string;
|
|
35
|
+
fields?: readonly CardRowFieldSpec[];
|
|
35
36
|
}
|
|
36
37
|
export interface CardTemplateSpec {
|
|
37
38
|
block: string;
|
|
@@ -60,18 +61,19 @@ export declare function cardTemplateSlotNames(type: unknown): readonly string[];
|
|
|
60
61
|
export declare function isCardTemplateSlot(type: unknown, slot: string): boolean;
|
|
61
62
|
export declare function cardTemplateSlotLabel(type: unknown, slot: string): string | null;
|
|
62
63
|
export declare function cardTemplateFields(type: string, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
|
|
63
|
-
export declare function defaultListField(type: unknown): string;
|
|
64
|
-
export declare function cardListShows(props: Record<string, unknown> | null | undefined, ownerType: unknown): string;
|
|
64
|
+
export declare function defaultListField(type: unknown, slot?: string): string;
|
|
65
|
+
export declare function cardListShows(props: Record<string, unknown> | null | undefined, ownerType: unknown, slot?: string): string;
|
|
65
66
|
export declare function cardTemplateFieldsOf(owner: {
|
|
66
67
|
type?: unknown;
|
|
67
68
|
props?: Record<string, unknown>;
|
|
68
|
-
} | null | undefined, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
|
|
69
|
+
} | null | undefined, kind?: CardRowFieldKind, slot?: string): readonly CardRowFieldSpec[];
|
|
69
70
|
export declare function cardTemplateField(type: string | undefined, key: string, owner?: {
|
|
70
71
|
type?: unknown;
|
|
71
72
|
props?: Record<string, unknown>;
|
|
72
|
-
} | null): CardRowFieldSpec | null;
|
|
73
|
+
} | null, slot?: string): CardRowFieldSpec | null;
|
|
73
74
|
export declare function rowFieldSpec(copy: {
|
|
74
75
|
ownerType?: string;
|
|
76
|
+
slot?: string;
|
|
75
77
|
fields?: readonly CardRowFieldSpec[];
|
|
76
78
|
owner?: {
|
|
77
79
|
type?: unknown;
|
|
@@ -90,12 +92,13 @@ export declare function rowPartByKey(type: string, props: Record<string, unknown
|
|
|
90
92
|
export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
|
|
91
93
|
export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
|
|
92
94
|
export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
|
|
93
|
-
export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[]): Record<string, unknown>;
|
|
95
|
+
export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[], slot?: string): Record<string, unknown>;
|
|
94
96
|
type DocNode = {
|
|
95
97
|
type?: unknown;
|
|
96
98
|
props?: Record<string, unknown>;
|
|
97
99
|
};
|
|
98
100
|
export declare function cardTemplateOwner(appState: unknown, id: unknown): DocNode | null | undefined;
|
|
101
|
+
export declare function cardTemplateSlotOf(appState: unknown, id: unknown): string | null | undefined;
|
|
99
102
|
export declare function cardTemplateCardOwner(appState: unknown, id: unknown): DocNode | null | undefined;
|
|
100
103
|
export declare function cardCopyPlace(appState: unknown, id: unknown): CardCopyPlace | undefined;
|
|
101
104
|
export declare function cardListFieldsOf(appState: unknown, list: {
|