efficient-web-builder 54.0.0 → 55.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 +24 -0
- package/dist/editor/components/BlockGapField.js +1 -1
- package/dist/editor/components/CornersField.js +1 -1
- package/dist/editor/components/SectionWidthRows.d.ts +2 -1
- package/dist/editor/components/SectionWidthRows.js +1 -1
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +29 -2
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/blocks/shared-fields.d.ts +1 -5
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-accordion-seed.d.ts +3 -0
- package/dist/editor/lib/document/box-accordion-seed.js +1 -0
- package/dist/editor/lib/document/box-fields.d.ts +11 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +3 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/mirror-cards-field.d.ts +1 -0
- package/dist/editor/lib/document/mirror-cards-field.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/document/section-own-width-fields.d.ts +4 -0
- package/dist/editor/lib/document/section-own-width-fields.js +1 -0
- package/dist/editor/lib/document/shape-picker.d.ts +8 -0
- package/dist/editor/lib/document/shape-picker.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +4 -1
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +5 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shadow.d.ts +4 -0
- package/dist/format/lib/content/box-shadow.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +2 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/container-direction.d.ts +1 -1
- package/dist/format/lib/content/container-direction.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +16 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +2 -0
- package/dist/format/lib/content/image-aspect.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +3 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/picture-focus-rows.js +1 -0
- package/dist/format/lib/content/section-height.d.ts +31 -2
- package/dist/format/lib/content/section-height.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +2 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-width.d.ts +38 -1
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/content/site-gutter.d.ts +2 -0
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/content/view-overrides.d.ts +7 -0
- package/dist/format/lib/content/view-overrides.js +1 -0
- package/dist/format/lib/document/blocks/general/Flex/meta.d.ts +4 -0
- package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +3 -0
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
- package/dist/format/lib/editor-words-catalogue.js +5 -5
- package/dist/format/lib/markup.d.ts +1 -0
- package/dist/format/lib/markup.js +2 -2
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/sections/intro-bleed-layout.d.ts +1 -0
- package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
- package/dist/format/lib/source-rules/padding-units-declared.d.ts +2 -0
- package/dist/format/lib/source-rules/padding-units-declared.js +6 -0
- package/dist/render/components/AccordionMark.d.ts +4 -0
- package/dist/render/components/AccordionMark.js +1 -0
- package/dist/render/components/BoxAccordionRow.d.ts +7 -0
- package/dist/render/components/BoxAccordionRow.js +1 -0
- package/dist/render/components/BoxTabPaneContext.d.ts +3 -1
- package/dist/render/components/BoxTabPaneContext.js +1 -1
- package/dist/render/components/BoxTabs.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/Eyebrow.d.ts +2 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/Flex.d.ts +14 -2
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroSection.d.ts +4 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +4 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +1 -0
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/LogoBlock.d.ts +1 -0
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/ProcessSteps.d.ts +1 -0
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +16 -0
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Split.d.ts +2 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.d.ts +2 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/TitleWithButtons.d.ts +2 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/lib/content/box-shared-columns.d.ts +2 -2
- package/dist/render/lib/content/box-shared-columns.js +1 -1
- package/dist/render/lib/content/box-stack-line.d.ts +15 -0
- package/dist/render/lib/content/box-stack-line.js +1 -0
- package/dist/render/lib/content/button-look.js +1 -1
- package/dist/render/lib/content/empty-hides.d.ts +8 -0
- package/dist/render/lib/content/empty-hides.js +1 -0
- package/dist/render/lib/content/section-edge.d.ts +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/content/section-padding.d.ts +17 -3
- package/dist/render/lib/content/section-padding.js +1 -1
- package/dist/render/lib/content/view-values.d.ts +1 -7
- package/dist/render/lib/content/view-values.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
- 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-docbody.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
- package/dist/render/lib/document/head-core-boxes.js +1 -0
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/passes/head-core.d.ts +3 -0
- package/dist/render/lib/document/passes/head-core.js +1 -0
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-theme.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +5 -5
- package/dist/render/lib/content/picture-focus-rows.js +0 -1
- /package/dist/{render → format}/lib/content/picture-focus-rows.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as P,Fragment as L}from"react/jsx-runtime";import{cloneElement as Le,createContext as Ut,useContext as $t,useEffect as Xt,useId as Ne,useRef as j,useState as V}from"react";import{useEasel as ue,useSelectedHost as G}from"efficient-easel/easel";import{toDateKey as jt,fromDateKey as Vt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Pe}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Be,loadingShowsOf as zt}from"../../../format/lib/hero-video.js";import{readHidable as De,hidableText as ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as de,LINK_FIELD_MARKER as He,MEDIA_FIELD_MARKER as Ge,SCAFFOLD_FIELD_MARKER as Me,TEXT_FIELD_MARKER as E,foldMetaOf as pe,textFieldIdentifier as Yt}from"efficient-easel/draw";import qt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as We}from"../../../render/lib/document/show-when.js";import Jt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Zt,CORNER_RADIUS_MAX as Ke,CORNER_RADIUS_MIN as M}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Qt,IMAGE_CORNERS_LABEL as en}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as tn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as nn,GALLERY_LAYOUTS as te,GALLERY_LAYOUT_KEYS as on,galleryChoices as Ue,galleryPictureCells as rn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as ln}from"./shell-glyph.js";import{anchorSiblingsOf as sn,placementPoints as an}from"../../../format/lib/hero-group-placement.js";import cn,{KEEP_HINT_CLASS as un}from"../../components/KeepHint.js";import dn from"../../components/AnchorField.js";import{AdjustIcon as pn,EyeIcon as fn,AnimationIcon as hn,BackgroundIcon as mn,BorderAllIcon as gn,BlockSectionIcon as bn,ColumnWidthsIcon as fe,ColumnsIcon as $e,CornerIcon as xn,DirectionDownIcon as Sn,DirectionLeftIcon as Cn,DirectionRightIcon as yn,DirectionUpIcon as wn,EditIcon as _n,GapIcon as Rn,GridIcon as On,GroundIcon as Xe,HashIcon as je,HeightIcon as En,ImageIcon as In,ListIcon as Tn,LocationIcon as Ve,PaddingBottomIcon as ze,PaddingLeftIcon as Ye,PaddingRightIcon as qe,PaddingTopIcon as Je,PageIcon as kn,StickyIcon as Fn,SearchIcon as An,SquareIcon as Ln,TypeIcon as Nn,WidthIcon as Pn}from"efficient-easel/icons";import{FieldGlyph as Ze}from"../../components/FieldGlyph.js";import{resolvePageBackground as Bn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Qe,CORNER_SIDE_POINTS as Dn,hasOwnSectionCorners as vn,normalizeCornerSides as et}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Hn,enclosingSection as Gn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as Mn,SettingsField as x,SettingsGroup as Wn,SettingsGroupSub as Kn,SettingsSegmented as Un,SettingsBorder as $n,SettingsSidesEach as Xn,SettingsSwitch as he,borderSides as jn,borderStartEach as Vn}from"efficient-easel/panel";import{ListField as zn}from"efficient-easel/fields";import{DisplayChips as Yn}from"efficient-shell/ui";import{desktopDisplayChanged as qn,partShownOnDesktop as Jn,partShownOnPhone as Zn,phoneDisplayChanged as Qn,withDesktopPart as eo,withPhonePart as to}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as no,Checkbox as oo,ColorSwatch as ro,CornersInput as io,DatePicker as lo,DateTimePicker as so,FOCAL_DEFAULT as ao,IconPicker as tt,COLUMN_COUNT_MAX as nt,COLUMN_SHARE_MIN as co,COLUMN_SHARES_EQUAL as uo,resolveColumnShares as ot,WidthsBar as po,useShellStrings as fo,IconButton as rt,InputNumber as it,Slider as ho,Tooltip as ne}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as mo}from"./geocode-resolve.js";import{ColourRow as lt,InheritedColourRow as st}from"./ColourControl.js";import{keptByRow as go}from"efficient-easel/screen/lib/document/style-fields";import at from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as bo,NoControlMark as xo,noControlField as ct}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as So}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Co,resolvePhoneValue as me}from"../../../format/lib/document/phone-override.js";import{phoneKey as k,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as yo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as wo,CARD_OUTLINE_OPTIONS as _o,DEFAULT_CARD_INDEX_FORMAT as Ro,DEFAULT_CARD_OUTLINE as Oo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Eo,DEFAULT_COVER_INDEX as Io}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as To}from"efficient-easel/draw";import ko from"../../components/MediaUploadField.js";import Fo from"../../components/MultiSelectField.js";import Ao from"../../components/SectionThemePicker.js";import Lo from"../../components/SearchSelectField.js";import No from"../../components/StorefrontLinkField.js";import{UiIcon as ut}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Po}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Bo}from"efficient-easel/draw/client";import{encodePartId as Do}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as vo,useEaselStrings as Ho}from"efficient-easel/strings";import{hasPhoneHeight as Go,hasTabletHeight as ge,resolveSectionMinHeight as Mo,resolveTabletHeight as Wo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as oe,SECTION_STICK_LABEL as be,hasPhoneStick as Ko,hasTabletStick as Uo,resolveSectionStick as dt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as $o,SECTION_MIN_HEIGHT_GROUP_LABEL as z,SECTION_SCREEN_PCT as Xo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as jo,resolveContainerDirection as pt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Vo,BOX_BLOCK_SPACING_POINTS as ft,BOX_PHONE_ROW_LABEL as ht,BOX_COLUMNS_MAX as zo,BOX_COLUMNS_MIN as mt,BOX_PHONE_ROW_MAX as Yo,BOX_PHONE_ROW_MIN as xe,BOX_SHARE_CHOICES as gt,BOX_SHARE_LABEL as K,boxShareChoiceOf as bt,boxShareWidthsOf as Se,BOX_SHARE_PHONE_DEFAULT as qo,BOX_SHARE_PHONE_POINTS as Jo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as B}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Zo,borderBySide as xt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Qo,normalizeTheme as St,normalizeThemeColors as er,sectionBandTone as tr,surfaceTwoTone as nr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Ct,CONTAINER_GAP_BUILT_IN as or,CONTAINER_GAP_PHONE as Ce,GAP_FIELD_CONTAINER as ye,followsSitePhoneGap as rr,hasOwnContainerGap as ir,hasOwnPhoneGap as we,resolveContainerGap as yt,resolvePhoneContainerGap as wt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as lr,CARD_IMAGE_BG_OFF as sr,CARD_IMAGE_BG_SWATCH_NAMES as ar,CARD_IMAGE_BG_SWATCHES as cr,isCardImageBackgroundInheriting as ur,cardImageBackgroundChoice as dr,THEME_CARD_IMAGE_BG as pr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as fr,SECTION_BG_NO_FILL as hr,sectionBackgroundChoice as mr,THEME_SECTION_BG as _e,isSectionBackgroundEmpty as gr,sectionBackgroundHex as _t}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as br,nestedAccentValue as Rt,resolveSectionAccent as re}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xr,TYPE_SIZE_INHERIT as Sr,isTypeSizeInheriting as Cr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as yr,WIDTH_CHOICE_LABEL as wr,WIDTH_INHERIT as _r}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Rr}from"./panel-heading-scope.js";import{useEaselSession as Or}from"efficient-easel/screen/lib/session-context";import{backendOf as Er}from"../website-session.js";import{BOX_GAP as Ir,describedAs as T,group as O,iconOf as Y,sharedStyleKinds as q}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Re,onDesktopWords as J,phoneTwinFields as ie}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Tr,gapField as Oe,iconPickerRow as kr,pickerCellIcon as Fr,pickerNoneIcon as Ar,Segmented as Ee,segmented as Lr,select as Z,slider as U}from"./box-fields.js";function xs({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 Nr(){const{blockGap:e}=B();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function Pr({inherited:e,onReset:t,label:n}){return i(C,{words:S()?.panel,label:l(n),changed:!e,detail:Nr(),onReset:t})}function Br(e){return Oe({...Ir,builtIn:or[e],resolve:(t,n)=>yt(e,t,n?.siteGap),action:(t,n)=>i(Pr,{inherited:!ir(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ye]:e}})}function Dr(e){return We(R("mobile",{[ye]:e,type:"custom",render:t=>i(Gr,{container:e,...t})}),Ot)}function vr(e){return We(R("tablet",{[ye]:e,type:"custom",render:t=>i(Hr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-Ct.min},(e,t)=>Ct.min+t)}};function Ss(e){return{gap:R("desktop",Br(e)),[W("gap")]:vr(e),[k("gap")]:Dr(e)}}function Hr({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(Ce.min,yt(e,n,o));return Oe({...Ce,builtIn:r,resolve:a=>we(a)?a:r,action:(a,c)=>i(C,{words:S()?.panel,label:l("Gap"),changed:we(a),detail:J(u=>l(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Gr({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=wt(e,void 0,n,o,r);return Oe({...Ce,builtIn:s,resolve:c=>wt(e,c,n,o,r),action:(c,u)=>i(C,{words:S()?.panel,label:l("Gap"),changed:we(c),detail:D(`${s}px`,rr(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Cs(e){return Tr({offered:jo(e),fallback:pt(e,void 0),resolve:t=>pt(e,t)})}function ys(e,t){return an(t?sn(e,t):[],t)}function Mr({inherited:e,onReset:t,label:n}){return i(C,{words:S()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function v({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:u,hidden:p}=De(e),m=j(null),f=j(null),d=y=>t(a?{text:y,hidden:p}:y),g=()=>t({text:u,hidden:!p}),h=a&&p,_=Ne(),w=r?Xr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(cn,{children:l(r)}):void 0,b=p?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(x,{label:l(n),icon:i(Nn,{}),htmlFor:_,className:h?"is-hidden":void 0,hint:w,action:a?i(ne,{content:b,children:i(rt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(ut,{name:"eye-off",size:14}):i(ut,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[c&&i(at,{target:s?f:m,value:u,onChange:d}),s?i("textarea",{id:_,ref:f,value:u,placeholder:o===void 0?void 0:l(o),onChange:y=>d(y.target.value)}):i("input",{id:_,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:y=>d(y.target.value)})]})})}function ws(e,t){return{...e,[Me]:t}}function _s(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Rs(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Et="sfPanelOnly";function Os(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Et]:!0}}function Es(e){return!!e&&typeof e=="object"&&e[Et]===!0}function Is(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ma,SCALAR_TEXT_CONTROLS as Wa}from"efficient-easel/draw";function Ts(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[bo]:o,...r}=e;return{...r,[So]:!0,render:t}}const Wr=new Set(To),Q={type:"radio",options:[{value:!0},{value:!1}]},It={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"}}}},H=(e,t)=>{const n=T({...t,[E]:e},{...It[e.control],label:e.label});if(!Wr.has(e.control))return n;const o=t.render;return{...ct(n,"authored-copy"),render:r=>i(yo,{name:r.name,children:o(r)})}},ks="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Kr={field:"source.slug",set:!0},Fs={not:Kr},Ur="Select a word, then press the highlighter.",$r=new Set([Ur]),Xr=e=>$r.has(e);function As(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ls(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ns(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Ps(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Bs(e){return{type:"custom",[He]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(No,{value:ve(t),onChange:n,label:e})}}function Ds(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const vs={Design:pn,Animation:hn};function Hs(e){return{type:"custom",render:()=>i(jr,{text:e})}}function jr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function Gs(e){return pe(e)!==null&&e?.tabs!==void 0}const Tt=new Map;function Ms(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Tt.get(n)??{type:"custom",tabs:t,[de]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return Tt.set(n,o),o}const kt=new Map;function Ws(e){const t=kt.get(e)??{type:"custom",[de]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return kt.set(e,t),t}function Vr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ks(e,t){return Vr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Us(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(L,{})}}function $s({title:e,children:t}){const[n,o]=V(()=>!Ie.has(e));return i(Wn,{title:e,open:n,onToggle:r=>{o(r),r?Ie.delete(e):Ie.add(e)},children:t})}const Ie=new Set;function Xs({label:e}){return i(Kn,{title:l(e),level:Rr(2)})}function zr({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 P("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?l(o[c]):c;return i(ne,{content:u,children:i(ro,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function js(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Yr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Yr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Kt(),u={background:a.background,surface:a.surface,surface2:nr(a),band:tr(a)},p=n?_e:t,m=gr(s,t,p),f=_t(void 0,p,u),d=n?fr:void 0,g=mr(s,t),h=p===_e?l("the theme's section background"):l("Theme {n} background",{n:c});return i(st,{label:l(e),icon:i(mn,{}),value:m?"":_t(s,t,u),inherited:f,resetTo:D(f.toUpperCase(),h),onChange:r,onReset:()=>r(d),choices:[{label:l("No fill"),color:"",selected:g==="none",onPick:()=>r(hr)},{label:`${l("Section band")} · ${u.band.toUpperCase()}`,color:u.band,selected:g==="band",onPick:()=>r(_e)}]})}function qr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ur(r,t);return i(x,{label:l(e),icon:i(Xe,{}),changed:!s,action:i(C,{words:S()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(lr)}),children:zr({swatches:cr,current:s?pr:dr(r,t),onPick:o,names:ar})})}}}function Vs(e=n=>n,t){return q({_gSectionTheme:O(br),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Ao,{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:u,disabled:p=!1,placeholder:m}){const f=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(ho,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},suffix:s||void 0,showInput:a,label:u===void 0?void 0:l(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:d=>{d!==null&&d!==o&&r(d)}})})}function Ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:u,icon:p,unit:m="px"}=t;return{type:"custom",render:({value:f,onChange:d})=>{const g=typeof f=="number"?f:null,h=g===null;return i(x,{label:l(e),icon:p?Y(p):void 0,value:h?u||s===void 0?void 0:l(s):`${g}${m}`,changed:!h,action:u?Le(u,{changed:!h,onReset:()=>d(null)}):i(C,{words:S()?.panel,label:l(e),changed:!h,onReset:()=>d(null)}),hint:typeof a=="string"?l(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const le="Corners";function Te(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(x,{label:l(le),icon:i(xn,{}),changed:r,action:Le(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Zr,{tier:e,px:o,onRadius:n})})}}}function F(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function At(){return ct({type:"custom",render:()=>i(xo,{})},"always")}function Jr(){const e=G();return t=>e?.onChangeMany(t)}function Zr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=F(e.sidesKey),a=et(r)??[...Qe];return i(io,{label:l(le),value:a,corners:Dn,onChange:c=>{const u=et(c)??[];s(u.length===Qe.length?null:u)},radius:t,onRadiusChange:n,radiusMin:M,radiusMax:Ke,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Lt(){return At()}function Qr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=B(),r=typeof o=="number"?`${o}px`:l("not set");return i(C,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function ei(){const{cornerRadiusPx:e}=B();return typeof e=="number"?e:M}function ti(){return Te({sidesKey:"sectionCornerSides",useFollowed:ei,mark:i(Qr,{label:le}),hint:ni})}const ni="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function zs(){return q({_gShape:O("Shape"),sectionCorners:ti(),sectionCornerSides:Lt(),...$("sectionBorder",Nt)})}const oi=()=>({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 ri(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ii(){let e;try{const t=St(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Qo.line}function li({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[u,p]=V(()=>r?Vn(c,a):!1),m=oi(),f=d=>ri(r&&s?d:{width:d.width,color:d.color,...s?{style:d.style}:{}});return i(x,{label:l("Border"),icon:i(gn,{}),action:r?i(Xn,{each:u,label:l("Each side"),onChange:p}):void 0,children:i($n,{label:l("Border"),value:c,each:u,onChange:d=>t(f(d)),placeholder:n,presets:o,words:m,styles:s,max:Zo})})}function si({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(W("sectionBorder")),s=ii(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...xt(a(o)),...xt(a(r))}:n==="tablet"?a(o):{};return i(li,{value:e,onChange:t,placeholder:{sides:jn(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function Ys(e){return R(e,Nt(e==="mobile"?"phone":e))}function Nt(e){return{type:"custom",render:({value:t,onChange:n})=>i(si,{value:t,onChange:n,view:e})}}function $(e,t){const n=(o,r)=>ie(e,t(o),Re)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[k(e)]:n("phone",k(e))}}function qs(e){return{type:"custom",render:()=>i(ai,{partKey:e})}}function ai({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=B(),r=Ho();let s=null;try{s=Bo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Mn,{name:l("Text"),preview:Po(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??vo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Do(t,e))}})}function Pt(e){const{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=ue(u=>u),c=a?.props?.id?String(a.props.id):void 0;o=c?Gn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return vn(r)?r:n}function ci({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Pt(M);return i(C,{words:S()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function ui(){return i(L,{children:l("Follows the section's Corners until you set a number here.")})}function di(){return Te({sidesKey:"cardCornerSides",useFollowed:()=>Pt(M),mark:i(ci,{label:le}),hint:i(ui,{})})}function pi(){return{type:"custom",render:()=>i(qt,{})}}function Js(e){return{...e,render:t=>i(Jt,{render:e.render,props:t})}}function Zs(){return{_gShape:O("Shape"),cardCorners:di(),cardCornerSides:Lt(),cardCornersApplyAll:pi()}}function fi(){return T({type:"custom",render:e=>i(mi,{...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 hi(e,t){const n=bt(e);if(n!=="custom")return l(gt.find(r=>r.value===n)?.label??"");const o=ot(Se(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function mi(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,u=bt(c),p=r>=2&&r<=nt,m=()=>[...uo[r]??[]],f=j(null),d=b=>{const y=f.current;y&&JSON.stringify(b)===JSON.stringify(y.shares)?n(y.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!p||n(b==="custom"?m():b)},h=l("The width bar works for 2 to {count} blocks.",{count:nt}),_=a&&(s||t!=="content"),w=fo().widths.hint(r,co);return i(x,{label:l(K),icon:i(fe,{}),changed:_,hint:u!=="custom"?void 0:p?w:h,action:i(C,{words:S()?.panel,label:l(K),changed:_,disabled:e.readOnly===!0,detail:s?J(b=>l(b),hi(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:P("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(tt,{label:l(K),value:u,options:gt.map(b=>({value:b.value,label:b.value==="custom"&&!p?h:l(b.label),icon:Fr(i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(b.weights).map((y,X)=>i("i",{style:{gridColumn:`span ${y}`}},X))}),l(b.label),b.value==="custom"&&!p?h:l(b.label))})),onChange:g,columns:3,cell:Dt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:ot(Se(c,r),r)}},onBlur:()=>{f.current=null},children:i(po,{label:l(K),count:r,value:Se(c,r),onChange:d,readOnly:e.readOnly===!0})}):null]})})}function Bt(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 Qs(){return Z(Vo,i(Rn,{}),ft,ft[0].value)}function ea(){return R("mobile",kr(K,i(fe,{}),Jo.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),qo,{columns:2,cell:Dt}))}const Dt={width:"5.75rem",height:"3.25rem"};function ta(){return ie("share",fi(),Re)[W("share")]}function gi(){return R("mobile",U(ht,i($e,{}),xe,Yo,1,xe,"",{clear:{phoneFollows:!1,hint:xe}}))}const vt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function na(){const e=U(ht,i($e,{}),mt,zo,1,mt,"",{clear:{emptyLabel:"Auto"}}),t=ie("columns",e,{...vt,tablet:Re.tablet}),n=ie("columns",e,vt,{phoneRow:gi()});return{...t,phoneRow:n.phoneRow}}function oa(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(x,{label:l(e),icon:i(Ze,{noun:s}),action:i(C,{words:S()?.panel,label:l(e),changed:!Cr(a),detail:l("the Text style in Styles"),onReset:()=>c(Sr),defaultAction:{onPress:()=>c(xr),title:l("Keep this section's own built-in size"),icon:i(bn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ra(){return{_gCellWidth:O("Cell width"),gridSpan:Z("Positions",i(fe,{}),[{label:"Auto",value:""},...Array.from({length:tn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function A(){let e=null,t=null;try{e=$t(bi),t=ue(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const bi=Ut(null);function xi({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const u=A()[a],p=me(void 0,u,c);return i(L,{children:ee({min:e,max:t,step:n,value:me(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function Si({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=A()[t],c=me(void 0,a,n);return i(C,{words:S()?.panel,label:l(e),changed:r,detail:J(u=>l(u),`${c}${o}`),onReset:s})}function Ci(e){return Ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Si,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(xi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const yi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},wi={Top:Je,Bottom:ze,Left:Ye,Right:qe},_i=e=>{const t=wi[e];return i(t,{})};function ia(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=w=>yi[w],s=w=>U(r("Top"),i(Je,{}),I.min,I.max,I.step,w,"px"),a=(w,b,y,X=I)=>R("mobile",Ci({label:r(w),icon:_i(w),desktopKey:b,min:X.min,max:X.max,step:X.step,fallback:y})),c=e.top??I.min,u=e.bottom??I.min,p="sectionPaddingLeft",m="sectionPaddingRight",f=e.sideBounds??I,d=e.side??f.min,g=e.sidePhone??d,h=e.phone===!0,_=w=>h?R("desktop",w):w;return q({...o?{_gSpacing:O("Padding")}:{},[t]:_(s(c)),...h?{[k(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:_(U(r("Bottom"),i(ze,{}),I.min,I.max,I.step,u,"px")),...h?{[k(n)]:a("Bottom",n,u)}:{}},...e.sides?{[p]:_(U(r("Left"),i(Ye,{}),f.min,f.max,f.step,d,"px")),...h?{[k(p)]:a("Left",p,g,f)}:{},[m]:_(U(r("Right"),i(qe,{}),f.min,f.max,f.step,d,"px")),...h?{[k(m)]:a("Right",m,g,f)}:{}}:{}})}function la(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&pe(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 se="Width";function sa(e,t=yr,n=!0){const o=t.map(r=>({label:wr[r],value:r}));return q({...n?{_gWidth:O(se)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(x,{label:l(se),icon:i(Pn,{}),action:n?i(Mr,{inherited:s?.inherited??!1,onReset:()=>r(_r),label:se}):void 0,children:Ee({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:se})})}})}function aa(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(Ri,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Ei,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Lr("Unit",i(je,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(Ii,{props:a,draw:s,view:o})}};return q({_gHeight:O(z),...$("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Ti,{view:o,onClear:()=>r(void 0)}))),...$("sectionHeightValue",t),...$("sectionHeightUnit",n)})}function Ri({value:e,onChange:t,view:n,badge:o}){const r=A(),s=c=>["auto","fixed","screen"].includes(c),a=ae(n,r)?.mode??"auto";return i(x,{label:z,icon:Y(i(En,{})),action:o?o(t):void 0,children:Ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:z})})}function Ht(e,t){return e==="phone"&&ge(t)?Wo(t):Mo(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?ge(t):Go(t))?null:Ht(e,t)}const N=(e,t)=>e==="tablet"?W(t):k(t);function Oi(e,t,n,o){const r=ae(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[N(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[N(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[N(e,"sectionHeightValue")]:r.value}:{},[N(e,n)]:o}}function Gt(e,t,n){const o=G(),r=ae(e,A());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=Oi(e,c,t,a);return u===null?{[e==="desktop"?t:N(e,t)]:a}:Object.keys(u).length?u:null})}}function Ei({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Gt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Xo:$o;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:z,onChange:s})})}function Ii({props:e,draw:t,view:n}){const{followed:o,write:r}=Gt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Ti({view:e,onClear:t}){const n=A(),o=ae(e,n)===null,r=e==="phone"&&ge(n),s=Ht(e,n),a=J(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(C,{words:S()?.panel,label:l(z),changed:o,detail:a,onReset:t})}function ca(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(Ai,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(ki,{value:o,onChange:r,view:n})});return{_gStick:O(be),...$("stickTop",e),...$("stickTopDistance",t)}}function ki({value:e,onChange:t,view:n}){const o=G(),r=A(),s=n==="desktop"||ke(n,r)?null:Mt(n,dt(r)),a=s&&o?c=>o.onChangeMany(u=>{const p=Fi(n,u,c);return p===null?{[N(n,"stickTopDistance")]:c}:Object.keys(p).length?p:null}):t;return i("div",{className:"sf-field",children:ee({min:oe.min,max:oe.max,step:oe.step,value:s?null:typeof e=="number"?e:oe.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})}function ke(e,t){return e==="tablet"?Uo(t):Ko(t)}function Mt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Fi(e,t,n){return e==="desktop"||ke(e,t)?null:n===void 0?{}:{[N(e,"stickTop")]:!0,[N(e,"stickTopDistance")]:n}}function Ai({value:e,onChange:t,labelId:n,view:o}){const r=A(),s=dt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,u=o==="desktop"?null:Mt(o,s),p=u?.on?`${u.distance}px`:l("Off");return i(x,{label:l(be),labelId:n,icon:Y(i(Fn,{})),action:P(L,{children:[o!=="desktop"?i(C,{words:S()?.panel,label:l(be),changed:ke(o,r),detail:J(m=>l(m),p,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(he,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Wt="e.g. about";function ua(){return{_gAnchor:O("Anchor"),anchor:H({control:"plainText",label:"Name",placeholder:Wt},{type:"custom",render:({value:e,onChange:t})=>i(dn,{value:e,onChange:t,nameBox:(n,o)=>i(v,{value:n,onChange:o,label:"Name",placeholder:Wt,hideable:!1,markup:!1})})})}}function da(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(x,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(so,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function pa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(x,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(lo,{id:c,value:Vt(typeof o=="string"?o:null),onChange:u=>r(u?jt(u):"")})})}}}function Li(e,t,n,o){return{type:"custom",...T({},{...Q,label:e}),render:({value:r,onChange:s,id:a,name:c})=>{const u=typeof r=="boolean"?r:t,p=`${a??c??e}-label`;return i(x,{label:l(e),labelId:p,icon:n,hint:o===void 0?void 0:l(o),action:i(he,{checked:u,onChange:s,ariaLabelledBy:p})})}}}function fa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(lt,{label:l("Background"),icon:i(kn,{}),id:r,value:Bn(e),onChange:t})}}}function ha(e,t){return{type:"custom",...T({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(x,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(oo,{id:a,checked:s,onChange:o})})}}}function ma(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(lt,{label:l(e),icon:n,value:o||t,onChange:r})}}function ga(){return{type:"custom",render:({value:e,onChange:t})=>i(Ni,{value:typeof e=="string"?e:"",onChange:t})}}function Ni({value:e,onChange:t}){const{hex:n,n:o}=Bi();return i(st,{label:l("Fill"),icon:i(Xe,{}),value:e,inherited:n,resetTo:D(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Pi(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return re(n);const r=Hn(e,t);if(r.length===0)return null;const s=re(Rt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=re(Rt(r[a].sectionAccent));if(c!==null)return c}return re(r[0].sectionAccent)}function Bi(){const{colors:e,n:t}=Kt();return{hex:e.background,n:t}}function Kt(){const e=St(B().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=ue(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Pi(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:er(e.themes[o]),n:o+1}}const Di=[{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 vi({label:e,value:t,onChange:n,points:o=Di}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(no,{label:l(e),value:t,points:r,onChange:n})}function ba(){return At()}const xa={top:i(wn,{}),right:i(yn,{}),bottom:i(Sn,{}),left:i(Cn,{})};function Sa(e,t,n,o,r,s,a){const c=f=>t.find(d=>d.value===f),u=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const d=t.find(h=>h.cell===f);if(!d)return u(`missing-${f}`);const g=s?.[f];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},m=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:d})=>{const g=t.some(h=>h.value===f)?f:n;return i(x,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:vi({label:e,value:g,onChange:d,points:m})})}}}function Ca(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Fo,{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 ya(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Lo,{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 wa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const _a=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ra(e,t,n){const o=Object.keys(Be).map(r=>({label:Be[r],value:r,picture:n[r]}));return{type:"custom",...T({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Hi,{label:e,icon:t,options:o,onChange:r})}}function Hi({label:e,icon:t,options:n,onChange:o}){const r=G()?.values??{},s=zt(r),a=s==="frame"&&!!Pe(r.mediaVideo)&&!Pe(r.videoFrame);return i(x,{label:l(e),icon:Y(t),hint:a?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Ee({options:n,value:s,onChange:o,ariaLabel:e})})}function Oa(e,t,n,o={}){const r={type:"custom",[Ge]:!0,render:({value:s,onChange:a,name:c})=>i(ko,{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 Ea={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Gi(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 Ia({value:e,onChange:t,label:n}){const o=e||{},r=G(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,u=a?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",p=!!Er(Or()).geocode,m=Ne(),f=(d,g)=>t({...o,[d]:g??void 0});return P(L,{children:[i(x,{label:l(n),icon:i(Ve,{}),action:p?i(ne,{content:l("Find from the address (OpenStreetMap)"),children:i(rt,{"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(An,{})})}):void 0,children:p&&o.status?i(ne,{content:Gi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${un}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:a?l("Finding…"):c?l(mo):l(o.status)})}):null}),i(x,{label:l("Enter by hand"),labelId:m,icon:i(_n,{}),action:i(he,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&i(x,{label:l("Latitude, longitude"),icon:i(Ve,{}),children:P("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(it,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>f("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(it,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>f("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Mi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Wi(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 Ta(e,t){return e===null?null:t>e?e:null}function Ki(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 ka={label:"Ticker items",icon:i(Tn,{})};function Fa(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...T({},{...It.textList,label:e}),render:({value:r,onChange:s})=>i(Ui,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Ui({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=j(null),[c,u]=V(null),p=f=>f.map(d=>({text:d?.text??""})),m=f=>{const d=Ki(n,f,c);d===null&&(a.current=null),u(d),r(p(f))};return i(zn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(at,{target:a,value:Mi(n,c),onChange:f=>r(Wi(n,c??-1,f)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,d,g)=>i("input",{type:"text",className:s&&c===d?"sf-list-marking":void 0,value:f?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:d+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,u(d)}})})}function Aa(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(v,{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 La(e){return{_gCards:O("Cards"),coverIndex:Z("Cover image",i(In,{}),Eo,String(Io),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:qr("Image background",sr),cardImage:ji()}}function Na(){return{outline:Z("Card outline",i(Ln,{}),_o,Oo),indexBadge:Z("Card number",i(je,{}),wo,Ro),showBadge:Li("Product badge",!0,i(Ze,{noun:"tag"}))}}function Pa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ce.find(s=>s.id===r).label}),o=r=>T(go(Fe),n(r));return{_gShowOnCard:O("Show on a card"),[Fe]:T({type:"custom",render:()=>i($i,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Fe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Fe="showCardPrice",ce=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function $i({rest:e}){const t=A(),n=Jr(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ce.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ae,{parts:ce,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ce.map(({id:a})=>[a,void 0])))})}function Ba(e,t="display"){const n=k(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ae,{parts:e,changed:qn(o),shown:s=>Jn(o,s),onPress:(s,a)=>r(eo(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Xi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ae({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(x,{label:c,icon:i(fn,{}),changed:t,action:i(C,{words:S()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Yn,{label:c,items:e.map(u=>({id:u.id,label:l(u.label),shown:n(u.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function Xi({parts:e,desktopKey:t,value:n,onChange:o}){const r=A()[t];return i(Ae,{parts:e,changed:Qn(n),shown:s=>Zn(r,n,s),onPress:(s,a)=>o(to(n,s,a)),onReset:()=>o(Co),detail:l("the same as Desktop")})}function ji(){return Ft("Card image",{min:M,max:Ke,step:Zt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Da(){return Te({sidesKey:"cornerSides",step:Qt,useFollowed:()=>M,mark:i(Vi,{label:en}),hint:l("Rounds the picture. Left alone it stays square.")})}function Vi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function va(){return{type:"custom",render:({value:e,onChange:t})=>i(Ji,{value:typeof e=="string"?e:"",onChange:t})}}function zi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:rn(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const Yi={width:"3.5rem",height:"2.5rem"},qi=200;function Ji({value:e,onChange:t}){const[n,o]=V(null),[r,s]=V(4),a=j(null);Xt(()=>{const d=a.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>s(d.getBoundingClientRect().width>=qi?4:3);g();const h=new ResizeObserver(g);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in te?e:"",u=Ue(n,c),p=Ue(n,"").length,m=ln("no-symbol"),f=[{value:"",label:l("Not chosen"),icon:Ar(m,l("Not chosen"))},...u.map(d=>({value:d,label:l(te[d].label),icon:i(zi,{layout:te[d],width:40})}))];return i(x,{label:l("Layout"),icon:i(On,{}),value:c?l(te[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(tt,{label:l("Layout"),value:c,options:f,onChange:t,columns:r,cell:Yi,header:P("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(Un,{options:[{id:"all",label:l("All")},...nn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:p,total:on.length})})]})})})})}export{Kr as BOUND_TO_POST,ks as BOUND_TO_POST_NOTE,vs as BUCKET_ICONS,Ea as CUSTOM_FIELD_MEDIA,Ia as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Ae as DisplayRow,xa as EDGE_ARROWS,ao as FOCAL_DEFAULT,Di as FOCAL_POINTS,de as FOLD_FIELD_MARKER,vi as FocalPicker,Xs as GroupLabel,Ur as HIGHLIGHT_HINT,v as HidableTextField,He as LINK_FIELD_MARKER,xs as Label,Ge as MEDIA_FIELD_MARKER,_a as MEDIA_TYPE_OPTIONS,Fs as NOT_BOUND_TO_POST,$s as PanelBand,jr as PanelNoteLine,bi as RowPropsContext,Me as SCAFFOLD_FIELD_MARKER,Wa as SCALAR_TEXT_CONTROLS,Pr as SiteGapDefaultReset,ee as Slider,zr as Swatches,Ma as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,ka as TICKER_ITEMS_ROW,Ui as TextListField,se as WIDTH_LABEL,Mr as WidthDefaultReset,Ki as aimAfterListChange,ua as anchorFields,D as backTo,js as backgroundField,Qs as boxBlockSpacingField,na as boxColumnsFields,ga as boxFillField,gi as boxPhoneRowField,fi as boxShareField,ea as boxSharePhoneField,ta as boxShareTabletField,Pi as boxThemeIndexOf,Ms as bucketHeader,qs as buttonWordsEntryField,di as cardCornersField,qr as cardImageBackgroundField,ji as cardImageField,La as cardMediaFields,Zs as cardShapeFields,Pa as cardShowFields,Na as cardStyleFields,ra as cellWidthFields,ha as checkbox,ma as colorInput,Cs as containerDirectionField,Br as containerGapField,Dr as containerGapPhoneField,Ss as containerGapRows,vr as containerGapTabletField,Gi as coordsResultTip,Ps as copyText,Lt as cornerSidesField,Te as cornersRowField,pa as date,da as dateTime,Ws as designGroupHeader,Ba as displayFields,Sa as edgePad,Ta as focusAfterRemove,ba as focusKeptField,Ks as foldMarker,pe as foldMetaOf,Vr as foldTitleOf,Oi as followedHeightPatch,Fi as followedStickPatch,va as galleryLayoutField,aa as heightFields,ae as heightFollowedBy,ys as heroGroupPlacementPoints,ve as hidableText,Xr as hintIsWhileTyping,Da as imageCornersField,Ts as inOwnBox,Gs as isBucketHeader,At as keptBy,Bs as linkField,Ra as loadingShowsField,Ca as multiSelect,fa as pageBackgroundField,Hs as panelNote,Ci as phoneOverrideField,Ns as plainText,Ds as plainTextarea,Ft as pxField,Us as quietMarker,De as readHidable,Mi as rowText,ya as searchSelect,Ys as sectionBorderField,ti as sectionCornersField,zs as sectionShapeFields,Vs as sectionThemeFields,Wi as setRowText,oa as sizeField,wa as sourceField,ia as spacingFields,ca as stickFields,la as swapPadding,Js as templateField,As as text,Yt as textFieldIdentifier,Rs as textFieldOffPage,Es as textFieldPanelOnly,Fa as textList,Aa as textListRowField,Ls as textarea,Li as toggle,Oa as upload,Jr as useSelectedPatch,A as useSelectedProps,F as useSelectedSibling,Nr as useSiteGapDetail,sa as widthField,Is as withIdentifier,_s as withOffPage,Os as withPanelOnly,ws as withScaffold};
|
|
1
|
+
"use client";import{jsx as l,jsxs as N,Fragment as k}from"react/jsx-runtime";import{cloneElement as Le,createContext as Ut,useContext as $t,useEffect as Xt,useId as Ne,useRef as V,useState as z}from"react";import{useEasel as ue,useSelectedHost as G}from"efficient-easel/easel";import{toDateKey as jt,fromDateKey as Vt}from"efficient-shell/format";import{say as i,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Pe}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Be,loadingShowsOf as zt}from"../../../format/lib/hero-video.js";import{readHidable as De,hidableText as ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as de,LINK_FIELD_MARKER as He,MEDIA_FIELD_MARKER as Ge,SCAFFOLD_FIELD_MARKER as Me,TEXT_FIELD_MARKER as E,foldMetaOf as pe,textFieldIdentifier as Yt}from"efficient-easel/draw";import qt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as We}from"../../../render/lib/document/show-when.js";import Jt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Zt,CORNER_RADIUS_MAX as Ke,CORNER_RADIUS_MIN as M}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Qt,IMAGE_CORNERS_LABEL as en}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as tn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as nn,GALLERY_LAYOUTS as te,GALLERY_LAYOUT_KEYS as on,galleryChoices as Ue,galleryPictureCells as rn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as ln}from"./shell-glyph.js";import{anchorSiblingsOf as sn,placementPoints as an}from"../../../format/lib/hero-group-placement.js";import cn,{KEEP_HINT_CLASS as un}from"../../components/KeepHint.js";import dn from"../../components/AnchorField.js";import{AdjustIcon as pn,EyeIcon as fn,AnimationIcon as hn,BackgroundIcon as mn,BorderAllIcon as gn,BlockSectionIcon as bn,ColumnWidthsIcon as fe,ColumnsIcon as $e,CornerIcon as xn,DirectionDownIcon as Sn,DirectionLeftIcon as yn,DirectionRightIcon as Cn,DirectionUpIcon as wn,EditIcon as _n,GapIcon as Rn,GridIcon as On,GroundIcon as Xe,HashIcon as je,HeightIcon as En,ImageIcon as In,ListIcon as Tn,LocationIcon as Ve,PaddingBottomIcon as ze,PaddingLeftIcon as Ye,PaddingRightIcon as qe,PaddingTopIcon as Je,PageIcon as kn,StickyIcon as Fn,SearchIcon as An,SquareIcon as Ln,TypeIcon as Nn,WidthIcon as Pn}from"efficient-easel/icons";import{FieldGlyph as Ze}from"../../components/FieldGlyph.js";import{resolvePageBackground as Bn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Qe,CORNER_SIDE_POINTS as Dn,hasOwnSectionCorners as vn,normalizeCornerSides as et}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Hn,enclosingSection as Gn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as Mn,SettingsField as x,SettingsGroup as Wn,SettingsGroupSub as Kn,SettingsSegmented as Un,SettingsBorder as $n,SettingsSidesEach as Xn,SettingsSwitch as he,borderSides as jn,borderStartEach as Vn}from"efficient-easel/panel";import{ListField as zn}from"efficient-easel/fields";import{DisplayChips as Yn}from"efficient-shell/ui";import{desktopDisplayChanged as qn,partShownOnDesktop as Jn,partShownOnPhone as Zn,phoneDisplayChanged as Qn,withDesktopPart as eo,withPhonePart as to}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as no,Checkbox as oo,ColorSwatch as ro,CornersInput as lo,DatePicker as io,DateTimePicker as so,FOCAL_DEFAULT as ao,IconPicker as tt,COLUMN_COUNT_MAX as nt,COLUMN_SHARE_MIN as co,COLUMN_SHARES_EQUAL as uo,resolveColumnShares as ot,WidthsBar as po,useShellStrings as fo,IconButton as rt,InputNumber as lt,Slider as ho,Tooltip as ne}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as mo}from"./geocode-resolve.js";import{ColourRow as it,InheritedColourRow as st}from"./ColourControl.js";import{keptByRow as go}from"efficient-easel/screen/lib/document/style-fields";import at from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as bo,NoControlMark as xo,noControlField as ct}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as So}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as yo,resolvePhoneValue as me}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as Co}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as wo,CARD_OUTLINE_OPTIONS as _o,DEFAULT_CARD_INDEX_FORMAT as Ro,DEFAULT_CARD_OUTLINE as Oo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Eo,DEFAULT_COVER_INDEX as Io}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as To}from"efficient-easel/draw";import ko from"../../components/MediaUploadField.js";import Fo from"../../components/MultiSelectField.js";import Ao from"../../components/SectionThemePicker.js";import Lo from"../../components/SearchSelectField.js";import No from"../../components/StorefrontLinkField.js";import{UiIcon as ut}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Po}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Bo}from"efficient-easel/draw/client";import{encodePartId as Do}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as vo,useEaselStrings as Ho}from"efficient-easel/strings";import{hasPhoneHeight as Go,hasTabletHeight as ge,resolveSectionMinHeight as Mo,resolveTabletHeight as Wo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as oe,SECTION_STICK_LABEL as be,hasPhoneStick as Ko,hasTabletStick as Uo,resolveSectionStick as dt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as $o,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as Xo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as jo,resolveContainerDirection as pt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Vo,BOX_BLOCK_SPACING_POINTS as ft,BOX_PHONE_ROW_LABEL as ht,BOX_COLUMNS_MAX as zo,BOX_COLUMNS_MIN as mt,BOX_PHONE_ROW_MAX as Yo,BOX_PHONE_ROW_MIN as xe,BOX_SHARE_CHOICES as gt,BOX_SHARE_LABEL as K,boxShareChoiceOf as bt,boxShareWidthsOf as Se,BOX_SHARE_PHONE_DEFAULT as qo,BOX_SHARE_PHONE_POINTS as Jo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as B}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Zo,borderBySide as xt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Qo,normalizeTheme as St,normalizeThemeColors as er,sectionBandTone as tr,surfaceTwoTone as nr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as yt,CONTAINER_GAP_BUILT_IN as or,CONTAINER_GAP_PHONE as ye,GAP_FIELD_CONTAINER as Ce,followsSitePhoneGap as rr,hasOwnContainerGap as lr,hasOwnPhoneGap as we,resolveContainerGap as Ct,resolvePhoneContainerGap as wt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ir,CARD_IMAGE_BG_OFF as sr,CARD_IMAGE_BG_SWATCH_NAMES as ar,CARD_IMAGE_BG_SWATCHES as cr,isCardImageBackgroundInheriting as ur,cardImageBackgroundChoice as dr,THEME_CARD_IMAGE_BG as pr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as fr,SECTION_BG_NO_FILL as hr,sectionBackgroundChoice as mr,THEME_SECTION_BG as _e,isSectionBackgroundEmpty as gr,sectionBackgroundHex as _t}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as br,nestedAccentValue as Rt,resolveSectionAccent as re}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xr,TYPE_SIZE_INHERIT as Sr,isTypeSizeInheriting as yr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Cr,WIDTH_CHOICE_LABEL as wr,WIDTH_INHERIT as _r}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Rr}from"./panel-heading-scope.js";import{useEaselSession as Or}from"efficient-easel/screen/lib/session-context";import{backendOf as Er}from"../website-session.js";import{BOX_GAP as Ir,describedAs as T,group as O,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Re,onDesktopWords as U,phoneTwinFields as le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Tr,gapField as Oe,iconPickerRow as kr,pickerCellIcon as Fr,pickerNoneIcon as Ar,Segmented as Ee,segmented as Lr,select as Z,slider as $}from"./box-fields.js";function xs({children:e}){return l("div",{className:"sf-field-label",children:typeof e=="string"?i(e):e})}function D(e,t){return i("{value} from {from}",{value:e,from:t})}function Nr(){const{blockGap:e}=B();return e===null?i("this container's own spacing"):D(`${e}px`,i("Styles"))}function Pr({inherited:e,onReset:t,label:n}){return l(C,{words:y()?.panel,label:i(n),changed:!e,detail:Nr(),onReset:t})}function Br(e){return Oe({...Ir,builtIn:or[e],resolve:(t,n)=>Ct(e,t,n?.siteGap),action:(t,n)=>l(Pr,{inherited:!lr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ce]:e}})}function Dr(e){return We(R("mobile",{[Ce]:e,type:"custom",render:t=>l(Gr,{container:e,...t})}),Ot)}function vr(e){return We(R("tablet",{[Ce]:e,type:"custom",render:t=>l(Hr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-yt.min},(e,t)=>yt.min+t)}};function Ss(e){return{gap:R("desktop",Br(e)),[W("gap")]:vr(e),[F("gap")]:Dr(e)}}function Hr({container:e,...t}){const[n]=A("gap"),{siteGap:o}=t.field??{},r=Math.max(ye.min,Ct(e,n,o));return Oe({...ye,builtIn:r,resolve:a=>we(a)?a:r,action:(a,c)=>l(C,{words:y()?.panel,label:i("Gap"),changed:we(a),detail:U(u=>i(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Gr({container:e,...t}){const[n]=A("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=wt(e,void 0,n,o,r);return Oe({...ye,builtIn:s,resolve:c=>wt(e,c,n,o,r),action:(c,u)=>l(C,{words:y()?.panel,label:i("Gap"),changed:we(c),detail:D(`${s}px`,rr(e,n,r)?i("Styles"):i("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ys(e){return Tr({offered:jo(e),fallback:pt(e,void 0),resolve:t=>pt(e,t)})}function Cs(e,t){return an(t?sn(e,t):[],t)}function Mr({inherited:e,onReset:t,label:n}){return l(C,{words:y()?.panel,label:i(n),changed:!e,detail:D(i("Full"),i("the page")),onReset:t})}function v({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:u,hidden:f}=De(e),m=V(null),p=V(null),d=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:u,hidden:!f}),h=a&&f,w=Ne(),S=r?Xr(r)?l("span",{className:"sf-hint-keep sf-hint-while-typing",children:i(r)}):l(cn,{children:i(r)}):void 0,b=f?i("Show {label} on the slide",{label:i(n)}):i("Hide {label} on the slide",{label:i(n)});return l(x,{label:i(n),icon:l(Nn,{}),htmlFor:w,className:h?"is-hidden":void 0,hint:S,action:a?l(ne,{content:b,children:l(rt,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?l(ut,{name:"eye-off",size:14}):l(ut,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&l(at,{target:s?p:m,value:u,onChange:d}),s?l("textarea",{id:w,ref:p,value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)}):l("input",{id:w,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)})]})})}function ws(e,t){return{...e,[Me]:t}}function _s(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Rs(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Et="sfPanelOnly";function Os(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Et]:!0}}function Es(e){return!!e&&typeof e=="object"&&e[Et]===!0}function Is(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ma,SCALAR_TEXT_CONTROLS as Wa}from"efficient-easel/draw";function Ts(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[bo]:o,...r}=e;return{...r,[So]:!0,render:t}}const Wr=new Set(To),Q={type:"radio",options:[{value:!0},{value:!1}]},It={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"}}}},H=(e,t)=>{const n=T({...t,[E]:e},{...It[e.control],label:e.label});if(!Wr.has(e.control))return n;const o=t.render;return{...ct(n,"authored-copy"),render:r=>l(Co,{name:r.name,children:o(r)})}},ks="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Kr={field:"source.slug",set:!0},Fs={not:Kr},Ur="Select a word, then press the highlighter.",$r=new Set([Ur]),Xr=e=>$r.has(e);function As(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(v,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ls(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ns(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Ps(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Bs(e){return{type:"custom",[He]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>l(No,{value:ve(t),onChange:n,label:e})}}function Ds(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const vs={Design:pn,Animation:hn};function Hs(e){return{type:"custom",render:()=>l(jr,{text:e})}}function jr({text:e}){return l("p",{className:"sf-note",children:i(e)})}function Gs(e){return pe(e)!==null&&e?.tabs!==void 0}const Tt=new Map;function Ms(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Tt.get(n)??{type:"custom",tabs:t,[de]:{label:e,level:1},bucket:e,marker:!0,render:()=>l(k,{})};return Tt.set(n,o),o}const kt=new Map;function Ws(e){const t=kt.get(e)??{type:"custom",[de]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>l(k,{})};return kt.set(e,t),t}function Vr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ks(e,t){return Vr(e)===t?e:{...e,marker:!0,fold:t,render:()=>l(k,{})}}function Us(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>l(k,{})}}function $s({title:e,children:t}){const[n,o]=z(()=>!Ie.has(e));return l(Wn,{title:e,open:n,onToggle:r=>{o(r),r?Ie.delete(e):Ie.add(e)},children:t})}const Ie=new Set;function Xs({label:e}){return l(Kn,{title:i(e),level:Rr(2)})}function zr({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?i(s):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?i(o[c]):c;return l(ne,{content:u,children:l(ro,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),l("span",{className:"sf-swatch-hex",children:a})]})}function js(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>l(Yr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Yr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Kt(),u={background:a.background,surface:a.surface,surface2:nr(a),band:tr(a)},f=n?_e:t,m=gr(s,t,f),p=_t(void 0,f,u),d=n?fr:void 0,g=mr(s,t),h=f===_e?i("the theme's section background"):i("Theme {n} background",{n:c});return l(st,{label:i(e),icon:l(mn,{}),value:m?"":_t(s,t,u),inherited:p,resetTo:D(p.toUpperCase(),h),onChange:r,onReset:()=>r(d),choices:[{label:i("No fill"),color:"",selected:g==="none",onPick:()=>r(hr)},{label:`${i("Section band")} · ${u.band.toUpperCase()}`,color:u.band,selected:g==="band",onPick:()=>r(_e)}]})}function qr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ur(r,t);return l(x,{label:i(e),icon:l(Xe,{}),changed:!s,action:l(C,{words:y()?.panel,label:i(e),changed:!s,detail:i("the theme's image stage"),onReset:()=>o(ir)}),children:zr({swatches:cr,current:s?pr:dr(r,t),onPick:o,names:ar})})}}}function Vs(e=n=>n,t){return J({_gSectionTheme:O(br),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>l(Ao,{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:u,disabled:f=!1,placeholder:m,placeholderWord:p,onClear:d}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return l("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:l(ho,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},...p?{emptyLabel:i(p)}:{},suffix:s||void 0,showInput:a,label:u===void 0?void 0:i(u),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:h=>{h===null?d?.():h!==o&&r(h)}})})}function Ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:u,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:d})=>{const g=typeof p=="number"?p:null,h=g===null;return l(x,{label:i(e),icon:f?q(f):void 0,value:h?u||s===void 0?void 0:i(s):`${g}${m}`,changed:!h,action:u?Le(u,{changed:!h,onReset:()=>d(null)}):l(C,{words:y()?.panel,label:i(e),changed:!h,onReset:()=>d(null)}),hint:typeof a=="string"?i(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const ie="Corners";function Te(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return l(x,{label:i(ie),icon:l(xn,{}),changed:r,action:Le(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:l(Zr,{tier:e,px:o,onRadius:n})})}}}function A(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function At(){return ct({type:"custom",render:()=>l(xo,{})},"always")}function Jr(){const e=G();return t=>e?.onChangeMany(t)}function Zr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=A(e.sidesKey),a=et(r)??[...Qe];return l(lo,{label:i(ie),value:a,corners:Dn,onChange:c=>{const u=et(c)??[];s(u.length===Qe.length?null:u)},radius:t,onRadiusChange:n,radiusMin:M,radiusMax:Ke,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Lt(){return At()}function Qr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=B(),r=typeof o=="number"?`${o}px`:i("not set");return l(C,{words:y()?.panel,label:i(e),changed:t,detail:o==null?i("the built-in corners"):D(r,i("Styles")),onReset:n})}function el(){const{cornerRadiusPx:e}=B();return typeof e=="number"?e:M}function tl(){return Te({sidesKey:"sectionCornerSides",useFollowed:el,mark:l(Qr,{label:ie}),hint:nl})}const nl="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function zs(){return J({_gShape:O("Shape"),sectionCorners:tl(),sectionCornerSides:Lt(),...X("sectionBorder",Nt)})}const ol=()=>({width:i("Border width"),sides:{top:i("Border top"),right:i("Border right"),bottom:i("Border bottom"),left:i("Border left")},style:i("Border style"),styles:{solid:i("Solid"),dashed:i("Dashed"),dotted:i("Dotted")},color:i("Border color"),unit:"px"});function rl(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ll(){let e;try{const t=St(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Qo.line}function il({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[u,f]=z(()=>r?Vn(c,a):!1),m=ol(),p=d=>rl(r&&s?d:{width:d.width,color:d.color,...s?{style:d.style}:{}});return l(x,{label:i("Border"),icon:l(gn,{}),action:r?l(Xn,{each:u,label:i("Each side"),onChange:f}):void 0,children:l($n,{label:i("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:m,styles:s,max:Zo})})}function sl({value:e,onChange:t,view:n}){const[o]=A("sectionBorder"),[r]=A(W("sectionBorder")),s=ll(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...xt(a(o)),...xt(a(r))}:n==="tablet"?a(o):{};return l(il,{value:e,onChange:t,placeholder:{sides:jn(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function Ys(e){return R(e,Nt(e==="mobile"?"phone":e))}function Nt(e){return{type:"custom",render:({value:t,onChange:n})=>l(sl,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>le(e,t(o),Re)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[F(e)]:n("phone",F(e))}}function qs(e){return{type:"custom",render:()=>l(al,{partKey:e})}}function al({partKey:e}){const[t]=A("id"),[n]=A("_partStyles"),{textStyles:o}=B(),r=Ho();let s=null;try{s=Bo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return l(Mn,{name:i("Text"),preview:Po(a,c,{noStyle:i("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??vo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Do(t,e))}})}function Pt(e){const{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=ue(u=>u),c=a?.props?.id?String(a.props.id):void 0;o=c?Gn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return vn(r)?r:n}function cl({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Pt(M);return l(C,{words:y()?.panel,label:i(e),changed:t,detail:D(`${o}px`,i("the section")),onReset:n})}function ul(){return l(k,{children:i("Follows the section's Corners until you set a number here.")})}function dl(){return Te({sidesKey:"cardCornerSides",useFollowed:()=>Pt(M),mark:l(cl,{label:ie}),hint:l(ul,{})})}function pl(){return{type:"custom",render:()=>l(qt,{})}}function Js(e){return{...e,render:t=>l(Jt,{render:e.render,props:t})}}function Zs(){return{_gShape:O("Shape"),cardCorners:dl(),cardCornerSides:Lt(),cardCornersApplyAll:pl()}}function fl(){return T({type:"custom",render:e=>l(ml,{...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 hl(e,t){const n=bt(e);if(n!=="custom")return i(gt.find(r=>r.value===n)?.label??"");const o=ot(Se(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):i("Custom")}function ml(e){const{value:t,onChange:n}=e,[o]=A("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,u=bt(c),f=r>=2&&r<=nt,m=()=>[...uo[r]??[]],p=V(null),d=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!f||n(b==="custom"?m():b)},h=i("The width bar works for 2 to {count} blocks.",{count:nt}),w=a&&(s||t!=="content"),S=fo().widths.hint(r,co);return l(x,{label:i(K),icon:l(fe,{}),changed:w,hint:u!=="custom"?void 0:f?S:h,action:l(C,{words:y()?.panel,label:i(K),changed:w,disabled:e.readOnly===!0,detail:s?U(b=>i(b),hl(e.follows,r),e.followsView):i("Fit content"),onReset:()=>n(void 0)}),children:N("div",{className:"sf-share-row",children:[l("div",{className:"sf-share-pick",children:l(tt,{label:i(K),value:u,options:gt.map(b=>({value:b.value,label:b.value==="custom"&&!f?h:i(b.label),icon:Fr(l("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(b.weights).map((_,j)=>l("i",{style:{gridColumn:`span ${_}`}},j))}),i(b.label),b.value==="custom"&&!f?h:i(b.label))})),onChange:g,columns:3,cell:Dt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&f?l("div",{onFocus:()=>{p.current={value:t,shares:ot(Se(c,r),r)}},onBlur:()=>{p.current=null},children:l(po,{label:i(K),count:r,value:Se(c,r),onChange:d,readOnly:e.readOnly===!0})}):null]})})}function Bt(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 Qs(){return Z(Vo,l(Rn,{}),ft,ft[0].value)}function ea(){return R("mobile",kr(K,l(fe,{}),Jo.map(e=>({label:e.label,value:e.value,picture:l("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(e.weights).map((t,n)=>l("i",{style:{gridColumn:`span ${t}`}},n))})})),qo,{columns:2,cell:Dt}))}const Dt={width:"5.75rem",height:"3.25rem"};function ta(){return le("share",fl(),Re)[W("share")]}function gl(){return R("mobile",$(ht,l($e,{}),xe,Yo,1,xe,"",{clear:{phoneFollows:!1,hint:xe}}))}const vt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function na(){const e=$(ht,l($e,{}),mt,zo,1,mt,"",{clear:{emptyLabel:"Auto"}}),t=le("columns",e,{...vt,tablet:Re.tablet}),n=le("columns",e,vt,{phoneRow:gl()});return{...t,phoneRow:n.phoneRow}}function oa(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>l(x,{label:i(e),icon:l(Ze,{noun:s}),action:l(C,{words:y()?.panel,label:i(e),changed:!yr(a),detail:i("the Text style in Styles"),onReset:()=>c(Sr),defaultAction:{onPress:()=>c(xr),title:i("Keep this section's own built-in size"),icon:l(bn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ra(){return{_gCellWidth:O("Cell width"),gridSpan:Z("Positions",l(fe,{}),[{label:"Auto",value:""},...Array.from({length:tn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null,t=null;try{e=$t(bl),t=ue(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const bl=Ut(null);function xl({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const u=L()[a],f=me(void 0,u,c);return l(k,{children:ee({min:e,max:t,step:n,value:me(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function Sl({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=L()[t],c=me(void 0,a,n);return l(C,{words:y()?.panel,label:i(e),changed:r,detail:U(u=>i(u),`${c}${o}`),onReset:s})}function yl(e){return Ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:l(Sl,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>l(xl,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Cl={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},wl={Top:Je,Bottom:ze,Left:Ye,Right:qe},_l=e=>{const t=wl[e];return l(t,{})};function la(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Cl[S],s=S=>$(r("Top"),l(Je,{}),I.min,I.max,I.step,S,"px"),a=(S,b,_,j=I)=>R("mobile",yl({label:r(S),icon:_l(S),desktopKey:b,min:j.min,max:j.max,step:j.step,fallback:_})),c=e.top??I.min,u=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,d=e.side??p.min,g=e.sidePhone??d,h=e.phone===!0,w=S=>h?R("desktop",S):S;return J({...o?{_gSpacing:O("Padding")}:{},[t]:w(s(c)),...h?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w($(r("Bottom"),l(ze,{}),I.min,I.max,I.step,u,"px")),...h?{[F(n)]:a("Bottom",n,u)}:{}},...e.sides?{[f]:w($(r("Left"),l(Ye,{}),p.min,p.max,p.step,d,"px")),...h?{[F(f)]:a("Left",f,g,p)}:{},[m]:w($(r("Right"),l(qe,{}),p.min,p.max,p.step,d,"px")),...h?{[F(m)]:a("Right",m,g,p)}:{}}:{}})}function ia(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&pe(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 se="Width";function sa(e,t=Cr,n=!0){const o=t.map(r=>({label:wr[r],value:r}));return J({...n?{_gWidth:O(se)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>l(x,{label:i(se),icon:l(Pn,{}),action:n?l(Mr,{inherited:s?.inherited??!1,onReset:()=>r(_r),label:se}):void 0,children:Ee({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:se})})}})}function aa(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>l(Rl,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>l(El,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Lr("Unit",l(je,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>l(Il,{props:a,draw:s,view:o})}};return J({_gHeight:O(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>l(Tl,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function Rl({value:e,onChange:t,view:n,badge:o}){const r=L(),s=c=>["auto","fixed","screen"].includes(c),a=ae(n,r)?.mode??"auto";return l(x,{label:Y,icon:q(l(En,{})),action:o?o(t):void 0,children:Ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:Y})})}function Ht(e,t){return e==="phone"&&ge(t)?Wo(t):Mo(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?ge(t):Go(t))?null:Ht(e,t)}const P=(e,t)=>e==="tablet"?W(t):F(t);function Ol(e,t,n,o){const r=ae(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 Gt(e,t,n){const o=G(),r=ae(e,L());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=Ol(e,c,t,a);return u===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(u).length?u:null})}}function El({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Gt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Xo:$o;return l("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 Il({props:e,draw:t,view:n}){const{followed:o,write:r}=Gt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Tl({view:e,onClear:t}){const n=L(),o=ae(e,n)===null,r=e==="phone"&&ge(n),s=Ht(e,n),a=U(c=>i(c),s.mode==="auto"?i("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return l(C,{words:y()?.panel,label:i(Y),changed:o,detail:a,onReset:t})}function ca(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>l(Al,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>l(kl,{value:o,onChange:r,view:n})});return{_gStick:O(be),...X("stickTop",e),...X("stickTopDistance",t)}}function kl({value:e,onChange:t,view:n}){const o=G(),r=L(),s=n==="desktop"||ke(n,r)?null:Mt(n,dt(r)),a=s&&o?c=>o.onChangeMany(u=>{const f=Fl(n,u,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return l("div",{className:"sf-field",children:ee({min:oe.min,max:oe.max,step:oe.step,value:s?null:typeof e=="number"?e:oe.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:i("Distance from top"),onChange:a})})}function ke(e,t){return e==="tablet"?Uo(t):Ko(t)}function Mt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Fl(e,t,n){return e==="desktop"||ke(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Al({value:e,onChange:t,labelId:n,view:o}){const r=L(),s=dt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,u=o==="desktop"?null:Mt(o,s),f=u?.on?`${u.distance}px`:i("Off");return l(x,{label:i(be),labelId:n,icon:q(l(Fn,{})),action:N(k,{children:[o!=="desktop"?l(C,{words:y()?.panel,label:i(be),changed:ke(o,r),detail:U(m=>i(m),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,l(he,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Wt="e.g. about";function ua(){return{_gAnchor:O("Anchor"),anchor:H({control:"plainText",label:"Name",placeholder:Wt},{type:"custom",render:({value:e,onChange:t})=>l(dn,{value:e,onChange:t,nameBox:(n,o)=>l(v,{value:n,onChange:o,label:"Name",placeholder:Wt,hideable:!1,markup:!1})})})}}function da(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return l(x,{label:i(e),icon:t,htmlFor:c,hint:n===void 0?void 0:i(n),children:l(so,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function pa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return l(x,{label:i(e),icon:t,htmlFor:c,hint:n===void 0?void 0:i(n),children:l(io,{id:c,value:Vt(typeof o=="string"?o:null),onChange:u=>r(u?jt(u):"")})})}}}function Ll(e,t,n,o){return{type:"custom",...T({},{...Q,label:e}),render:r=>{const{value:s,onChange:a,id:c,name:u}=r,f="follows"in r,m=r,p=typeof s=="boolean",d=typeof m.follows=="boolean"?m.follows:t,g=p?s:f?d:t,h=`${c??u??e}-label`,w=m.readOnly===!0,S=l(he,{checked:g,onChange:a,disabled:w,ariaLabelledBy:h});return l(x,{label:i(e),labelId:h,icon:n,hint:o===void 0?void 0:i(o),action:f?N(k,{children:[l(C,{words:y()?.panel,label:i(e),changed:p,detail:U(b=>i(b),i(d?"On":"Off"),m.followsView),disabled:w,onReset:()=>a(void 0)}),S]}):S})}}}function fa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return l(it,{label:i("Background"),icon:l(kn,{}),id:r,value:Bn(e),onChange:t})}}}function ha(e,t){return{type:"custom",...T({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return l(x,{label:i(e),htmlFor:a,className:"sf-checkbox",action:l(oo,{id:a,checked:s,onChange:o})})}}}function ma(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>l(it,{label:i(e),icon:n,value:o||t,onChange:r})}}function ga(){return{type:"custom",render:({value:e,onChange:t})=>l(Nl,{value:typeof e=="string"?e:"",onChange:t})}}function Nl({value:e,onChange:t}){const{hex:n,n:o}=Bl();return l(st,{label:i("Fill"),icon:l(Xe,{}),value:e,inherited:n,resetTo:D(n.toUpperCase(),i("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Pl(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return re(n);const r=Hn(e,t);if(r.length===0)return null;const s=re(Rt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=re(Rt(r[a].sectionAccent));if(c!==null)return c}return re(r[0].sectionAccent)}function Bl(){const{colors:e,n:t}=Kt();return{hex:e.background,n:t}}function Kt(){const e=St(B().theme),[t]=A("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=ue(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Pl(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:er(e.themes[o]),n:o+1}}const Dl=[{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 vl({label:e,value:t,onChange:n,points:o=Dl}){const r=o.map(s=>({...s,label:i(s.label),...s.title?{title:i(s.title)}:null}));return l(no,{label:i(e),value:t,points:r,onChange:n})}function ba(){return At()}const xa={top:l(wn,{}),right:l(Cn,{}),bottom:l(Sn,{}),left:l(yn,{})};function Sa(e,t,n,o,r,s,a){const c=p=>t.find(d=>d.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const d=t.find(h=>h.cell===p);if(!d)return u(`missing-${p}`);const g=s?.[p];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},m=[u("corner-top-left"),f("top"),u("corner-top-right"),f("left"),u("centre"),f("right"),u("corner-bottom-left"),f("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:d})=>{const g=t.some(h=>h.value===p)?p:n;return l(x,{label:i(e),icon:r,value:c(g)?.label?i(c(g).label):a?i(a):"",children:vl({label:e,value:g,onChange:d,points:m})})}}}function ya(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>l(Fo,{label:e,options:(s.options??t).map(a=>({...a,label:i(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:i(n)}:{}})}}function Ca(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>l(Lo,{label:e,options:(a.options??t).map(c=>({...c,label:i(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:i(o)})}}function wa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return l(e,{...r})}}}const _a=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ra(e,t,n){const o=Object.keys(Be).map(r=>({label:Be[r],value:r,picture:n[r]}));return{type:"custom",...T({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>l(Hl,{label:e,icon:t,options:o,onChange:r})}}function Hl({label:e,icon:t,options:n,onChange:o}){const r=G()?.values??{},s=zt(r),a=s==="frame"&&!!Pe(r.mediaVideo)&&!Pe(r.videoFrame);return l(x,{label:i(e),icon:q(t),hint:a?i("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Ee({options:n,value:s,onChange:o,ariaLabel:e})})}function Oa(e,t,n,o={}){const r={type:"custom",[Ge]:!0,render:({value:s,onChange:a,name:c})=>l(ko,{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 Ea={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Gl(e){const t=i(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ia({value:e,onChange:t,label:n}){const o=e||{},r=G(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,u=a?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!Er(Or()).geocode,m=Ne(),p=(d,g)=>t({...o,[d]:g??void 0});return N(k,{children:[l(x,{label:i(n),icon:l(Ve,{}),action:f?l(ne,{content:i("Find from the address (OpenStreetMap)"),children:l(rt,{"aria-label":i("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:l(An,{})})}):void 0,children:f&&o.status?l(ne,{content:Gl(o),className:"sf-name-tip",children:l("div",{className:`es-field-hint ${un}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:a?i("Finding…"):c?i(mo):i(o.status)})}):null}),l(x,{label:i("Enter by hand"),labelId:m,icon:l(_n,{}),action:l(he,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&l(x,{label:i("Latitude, longitude"),icon:l(Ve,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[l(lt,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>p("lat",d),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),l(lt,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>p("lng",d),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function Ml(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Wl(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 Ta(e,t){return e===null?null:t>e?e:null}function Kl(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 ka={label:"Ticker items",icon:l(Tn,{})};function Fa(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...T({},{...It.textList,label:e}),render:({value:r,onChange:s})=>l(Ul,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Ul({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=V(null),[c,u]=z(null),f=p=>p.map(d=>({text:d?.text??""})),m=p=>{const d=Kl(n,p,c);d===null&&(a.current=null),u(d),r(f(p))};return l(zn,{label:i(e),icon:t,noun:i("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?l(at,{target:a,value:Ml(n,c),onChange:p=>r(Wl(n,c??-1,p)),disabled:c===null,label:c===null?i("Formatting — click a row first"):i("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,d,g)=>l("input",{type:"text",className:s&&c===d?"sf-list-marking":void 0,value:p?.text??"",placeholder:i(o),"aria-label":i("{label} {n}",{label:i(e),n:d+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,u(d)}})})}function Aa(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>l(v,{value:o,onChange:r,label:i("{label} — row {n}",{label:i(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function La(e){return{_gCards:O("Cards"),coverIndex:Z("Cover image",l(In,{}),Eo,String(Io),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:qr("Image background",sr),cardImage:jl()}}function Na(){return{outline:Z("Card outline",l(Ln,{}),_o,Oo),indexBadge:Z("Card number",l(je,{}),wo,Ro),showBadge:Ll("Product badge",!0,l(Ze,{noun:"tag"}))}}function Pa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ce.find(s=>s.id===r).label}),o=r=>T(go(Fe),n(r));return{_gShowOnCard:O("Show on a card"),[Fe]:T({type:"custom",render:()=>l($l,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Fe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Fe="showCardPrice",ce=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function $l({rest:e}){const t=L(),n=Jr(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ce.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return l(Ae,{parts:ce,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ce.map(({id:a})=>[a,void 0])))})}function Ba(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>l(Ae,{parts:e,changed:qn(o),shown:s=>Jn(o,s),onPress:(s,a)=>r(eo(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>l(Xl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ae({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=i("Display");return l(x,{label:c,icon:l(fn,{}),changed:t,action:l(C,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:l(Yn,{label:c,items:e.map(u=>({id:u.id,label:i(u.label),shown:n(u.id),...a?{disabled:!0,disabledReason:i(a)}:{}})),onChange:o})})}function Xl({parts:e,desktopKey:t,value:n,onChange:o}){const r=L()[t];return l(Ae,{parts:e,changed:Qn(n),shown:s=>Zn(r,n,s),onPress:(s,a)=>o(to(n,s,a)),onReset:()=>o(yo),detail:i("the same as Desktop")})}function jl(){return Ft("Card image",{min:M,max:Ke,step:Zt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Da(){return Te({sidesKey:"cornerSides",step:Qt,useFollowed:()=>M,mark:l(Vl,{label:en}),hint:i("Rounds the picture. Left alone it stays square.")})}function Vl({label:e,changed:t=!1,onReset:n=()=>{}}){return l(C,{words:y()?.panel,label:i(e),changed:t,onReset:n})}function va(){return{type:"custom",render:({value:e,onChange:t})=>l(Jl,{value:typeof e=="string"?e:"",onChange:t})}}function zl({layout:e,width:t}){return l("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:rn(e).map(([n,o],r)=>l("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const Yl={width:"3.5rem",height:"2.5rem"},ql=200;function Jl({value:e,onChange:t}){const[n,o]=z(null),[r,s]=z(4),a=V(null);Xt(()=>{const d=a.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>s(d.getBoundingClientRect().width>=ql?4:3);g();const h=new ResizeObserver(g);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in te?e:"",u=Ue(n,c),f=Ue(n,"").length,m=ln("no-symbol"),p=[{value:"",label:i("Not chosen"),icon:Ar(m,i("Not chosen"))},...u.map(d=>({value:d,label:i(te[d].label),icon:l(zl,{layout:te[d],width:40})}))];return l(x,{label:i("Layout"),icon:l(On,{}),value:c?i(te[c].label):void 0,children:l("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:l(tt,{label:i("Layout"),value:c,options:p,onChange:t,columns:r,cell:Yl,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[l("span",{className:"text-2xs text-ink-faint",children:i("Photos in a row")}),l(Un,{options:[{id:"all",label:i("All")},...nn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:i("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),l("span",{className:"text-2xs text-ink-faint",children:i("{n} of {total} layouts",{n:f,total:on.length})})]})})})})}export{Kr as BOUND_TO_POST,ks as BOUND_TO_POST_NOTE,vs as BUCKET_ICONS,Ea as CUSTOM_FIELD_MEDIA,Ia as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Ae as DisplayRow,xa as EDGE_ARROWS,ao as FOCAL_DEFAULT,Dl as FOCAL_POINTS,de as FOLD_FIELD_MARKER,vl as FocalPicker,Xs as GroupLabel,Ur as HIGHLIGHT_HINT,v as HidableTextField,He as LINK_FIELD_MARKER,xs as Label,Ge as MEDIA_FIELD_MARKER,_a as MEDIA_TYPE_OPTIONS,Fs as NOT_BOUND_TO_POST,$s as PanelBand,jr as PanelNoteLine,bl as RowPropsContext,Me as SCAFFOLD_FIELD_MARKER,Wa as SCALAR_TEXT_CONTROLS,Pr as SiteGapDefaultReset,ee as Slider,zr as Swatches,Ma as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,ka as TICKER_ITEMS_ROW,Ul as TextListField,se as WIDTH_LABEL,Mr as WidthDefaultReset,Kl as aimAfterListChange,ua as anchorFields,D as backTo,js as backgroundField,Qs as boxBlockSpacingField,na as boxColumnsFields,ga as boxFillField,gl as boxPhoneRowField,fl as boxShareField,ea as boxSharePhoneField,ta as boxShareTabletField,Pl as boxThemeIndexOf,Ms as bucketHeader,qs as buttonWordsEntryField,dl as cardCornersField,qr as cardImageBackgroundField,jl as cardImageField,La as cardMediaFields,Zs as cardShapeFields,Pa as cardShowFields,Na as cardStyleFields,ra as cellWidthFields,ha as checkbox,ma as colorInput,ys as containerDirectionField,Br as containerGapField,Dr as containerGapPhoneField,Ss as containerGapRows,vr as containerGapTabletField,Gl as coordsResultTip,Ps as copyText,Lt as cornerSidesField,Te as cornersRowField,pa as date,da as dateTime,Ws as designGroupHeader,Ba as displayFields,Sa as edgePad,Ta as focusAfterRemove,ba as focusKeptField,Ks as foldMarker,pe as foldMetaOf,Vr as foldTitleOf,Ol as followedHeightPatch,Fl as followedStickPatch,va as galleryLayoutField,aa as heightFields,ae as heightFollowedBy,Cs as heroGroupPlacementPoints,ve as hidableText,Xr as hintIsWhileTyping,Da as imageCornersField,Ts as inOwnBox,Gs as isBucketHeader,At as keptBy,Bs as linkField,Ra as loadingShowsField,ya as multiSelect,fa as pageBackgroundField,Hs as panelNote,yl as phoneOverrideField,Ns as plainText,Ds as plainTextarea,Ft as pxField,Us as quietMarker,De as readHidable,Ml as rowText,Ca as searchSelect,Ys as sectionBorderField,tl as sectionCornersField,zs as sectionShapeFields,Vs as sectionThemeFields,Wl as setRowText,oa as sizeField,wa as sourceField,la as spacingFields,ca as stickFields,ia as swapPadding,Js as templateField,As as text,Yt as textFieldIdentifier,Rs as textFieldOffPage,Es as textFieldPanelOnly,Fa as textList,Aa as textListRowField,Ls as textarea,Ll as toggle,Oa as upload,Jr as useSelectedPatch,L as useSelectedProps,A as useSelectedSibling,Nr as useSiteGapDetail,sa as widthField,Is as withIdentifier,_s as withOffPage,Os as withPanelOnly,ws as withScaffold};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MIRROR_CARDS_OPTIONS } from "../../../format/lib/content/mirror-cards.js";
|
|
2
2
|
import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
|
|
3
3
|
export declare const MIRROR_CARDS_IDLE = "mirrorCardsIdle";
|
|
4
|
+
export declare const MIRROR_CARDS_MIRRORS = "mirrorCardsMirrors";
|
|
4
5
|
export declare const MIRROR_CARDS_FACTS: BlockShowWhenFacts;
|
|
5
6
|
type Answer = (typeof MIRROR_CARDS_OPTIONS)[number]["value"];
|
|
6
7
|
export declare function mirrorCardsOptions(disabled?: boolean): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as i}from"react/jsx-runtime";import{SettingsDefaultReset as C,SettingsField as S}from"efficient-easel/panel";import{Segmented as O}from"efficient-shell/ui";import{SwapIcon as _}from"efficient-easel/icons";import{describedAs as I}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as A}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as s,MIRROR_CARDS_OFF as a,MIRROR_CARDS_OPTIONS as p,MIRROR_CARDS_TITLES as b,mirrorCardsActs as d,mirrorCardsOf as l,mirrorCardsWrite as D,ownsCard as m}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as M,say as n}from"../../../format/lib/editor-words.js";import{cardCopyPlace as R}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as u}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as v}from"../../../format/lib/document/show-when-attach.js";const c="mirrorCardsIdle",h="mirrorCardsMirrors",B={[h]:(r,e)=>{const o=R(e.appState,r.props?.id),t=r.props??{};return o===void 0?void 0:d(t,m(o),u(t).desktop)&&l(t.mirrorCards)!==null},[c]:(r,e)=>{const o=R(e.appState,r.props?.id),t=r.props??{};return o===void 0?void 0:!d(t,m(o),u(t).desktop)}};function w(r=!1){return p.map(e=>({value:e.value,label:n(e.label),title:e.value===a?void 0:n(b[e.value]),disabled:r}))}function x({value:r,onChange:e,readOnly:o}){const t=l(r)??a;return i(S,{label:n(s),icon:i(_,{}),action:i(C,{words:M()?.panel,label:n(s),changed:t!==a,detail:n("Off"),onReset:()=>e(void 0)}),children:i(O,{size:"sm",block:!0,label:n(s),value:t,onChange:f=>e(D(f)),options:w(o===!0)})})}function N(){return v(A("desktop",{type:"custom",...I({},{type:"radio",label:s,options:p.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:o})=>i(x,{value:r,onChange:e,readOnly:o})}),{not:{context:c,is:!0}})}export{B as MIRROR_CARDS_FACTS,c as MIRROR_CARDS_IDLE,h as MIRROR_CARDS_MIRRORS,N as mirrorCardsField,w as mirrorCardsOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as
|
|
1
|
+
import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as p,heightFields as l,sectionShapeFields as F,sectionThemeFields as n,spacingFields as a,stickFields as c,widthField as S}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as E,sidesPaddingFields as L}from"../box-fields.js";import{assignSectionGroups as _}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as w}from"../section-own-width-fields.js";import{dropEmptyHeadings as A}from"../panel-drop-empty-headings.js";import{rowsShownForNode as P}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:L,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:p,widthField:S,boxGutterFields:O,sectionOwnWidthFields:w,heightFields:l,anchorFields:m,stickFields:c,sectionThemeFields:n,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:E,...i?{phone:f}:{}}),assignSectionGroups:_,dropEmptyHeadings:A,rowsShownForNode:P,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as i}from"react/jsx-runtime";import{group as k,sharedStyleKinds as l}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as x}from"efficient-easel/screen/lib/document/device-fields";import{usePreviewHeader as R}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as b,ContentWidthRow as S}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as h}from"../../../format/lib/content/page-width.js";import{SECTION_WIDTH_KEYS as s,chromeOwnWidth as _,ownSectionWidth as m,sectionBackgroundPatch as E,sectionContentMaxPatch as I,sectionContentPatch as P,sectionWidthResetPatch as f}from"../../../format/lib/content/section-width.js";import{say as F}from"../../../format/lib/editor-words.js";import{finiteNumber as N}from"../../../format/lib/finite-number.js";import{WIDTH_LABEL as T,keptBy as w,useSelectedPatch as p,useSelectedProps as g}from"./controls.js";const B="Content cannot be wider than the background.",u=t=>F(t==="content"?"Content width":"Full width");function W(t){const{siteWidth:n,sectionBackgroundWidth:r,sectionContentWidth:e,themeFromDocument:o}=R(),c=N(n)??h.default;return t.drawsFullOnItsOwn?{px:c,background:"full",content:"full"}:{px:c,background:(o?null:r)??"full",content:(o?null:e)??"content"}}const D={read:m},H={read:m,drawsFullOnItsOwn:!0},M={read:_,clearOnContent:{fullWidth:void 0}};function A({source:t}){const n=t.read(g()),r=p(),e=W(t);return i(b,{value:n.background??e.background,changed:n.background!==null,detail:u(e.background),onChange:o=>r(E(o)),onReset:()=>r(f("background"))})}function U({source:t}){const n=t.read(g()),r=p(),e=d=>r({...d,...t.clearOnContent}),o=W(t),c=(n.background??o.background)==="content",a=n.content??o.content;return i(S,{mode:c&&a==="full"?"content":a,px:n.contentMax??o.px,max:c?o.px:h.max,changed:n.content!==null,detail:o.content==="full"?u("full"):`${u("content")} ${o.px}px`,fullClosed:c,hint:c?B:void 0,onMode:d=>e(P(d)),onPx:d=>e(I(d)),onReset:()=>e(f("content"))})}const C=(t,n)=>x("desktop",{type:"custom",render:()=>i(t,{source:n})}),O=t=>({[s.background]:C(A,t),[s.content]:C(U,t),[s.contentMax]:w()});function J(t){const n=t?.drawsFullOnItsOwn?H:D;return l({_gWidth:k(T),...O(n)})}function Q(){return l({...O(M),fullWidth:w()})}export{Q as chromeOwnWidthFields,J as sectionOwnWidthFields};
|
|
@@ -11,6 +11,14 @@ export declare function fillRowCell<V extends string>(option: {
|
|
|
11
11
|
value: V;
|
|
12
12
|
showWhen: ShowWhenRule;
|
|
13
13
|
};
|
|
14
|
+
export declare function ShapePicker<V extends string>({ label, lines, column, value, onChange, disabled }: {
|
|
15
|
+
label: string;
|
|
16
|
+
lines: readonly ShapeLine[];
|
|
17
|
+
column: "shape" | "image";
|
|
18
|
+
value: V;
|
|
19
|
+
onChange: (next: V) => void;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
14
22
|
export declare function shapePickerRow<V extends string>(label: string, icon: ReactElement, lines: readonly ShapeLine[], column: "shape" | "image", fallback: V, extra?: {
|
|
15
23
|
phoneRest?: (follows: unknown) => V | undefined;
|
|
16
24
|
more?: readonly {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n,jsxs as d}from"react/jsx-runtime";import{IconPicker as x}from"efficient-shell/ui";import{iconPickerRow as f,pickerCellsOf as m}from"./box-fields.js";import{say as k}from"../../../format/lib/editor-words.js";const e=28,t=1.5;function w({ratio:r}){const[i,o]=r??[1,1],c=(e-t*2)/Math.max(i,o),l=i*c,s=o*c;return n("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:n("rect",{x:(e-l)/2,y:(e-s)/2,width:l,height:s,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t,strokeDasharray:r?void 0:"3 2"})})}function C(){const r=t*2;return d("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:[n("line",{x1:t,y1:t/2,x2:e-t,y2:t/2,stroke:"currentColor",strokeWidth:t}),n("line",{x1:t,y1:e-t/2,x2:e-t,y2:e-t/2,stroke:"currentColor",strokeWidth:t}),n("rect",{x:e/4,y:r,width:e/2,height:e-r*2,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t})]})}function R(r){return{...r,picture:n(C,{})}}const h={width:"5.25rem",height:"3.5rem"},u=3;function a(r,i){return r.map(o=>({value:o[i],label:o.label,picture:n(w,{ratio:o.ratio})}))}function S({label:r,lines:i,column:o,value:c,onChange:l,disabled:s}){return n(x,{label:k(r),value:c,options:m(a(i,o)),onChange:l,columns:u,cell:h,tooltips:!1,disabled:s})}function b(r,i,o,c,l,s={}){const p=[...a(o,c),...s.more??[]];return f(r,i,p,l,{columns:u,cell:h,phoneRest:s.phoneRest})}export{S as ShapePicker,R as fillRowCell,b as shapePickerRow};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { type ViewOverrides } from "./view-overrides.js";
|
|
1
2
|
export type BlockAlign = "left" | "center" | "right";
|
|
2
3
|
export declare const BLOCK_ALIGN_JUSTIFY: Record<BlockAlign, string>;
|
|
4
|
+
export type AlignKind = "text" | "place" | "justify" | "items";
|
|
3
5
|
export declare function blockAlignOf(value: unknown): BlockAlign | undefined;
|
|
4
|
-
export declare function
|
|
6
|
+
export declare function alignViewAnswers(desktop: unknown, tablet: unknown, phone: unknown): ViewOverrides<BlockAlign>;
|
|
7
|
+
export declare function alignViewClasses(kind: AlignKind, desktop: unknown, tablet: unknown, phone: unknown): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{viewOverrides as n}from"./view-overrides.js";const v={left:"justify-start",center:"justify-center",right:"justify-end"},o={text:{left:"view-tablet:max-view-desktop:text-left",center:"view-tablet:max-view-desktop:text-center",right:"view-tablet:max-view-desktop:text-right"},place:{left:"view-tablet:max-view-desktop:mx-0",center:"view-tablet:max-view-desktop:mx-auto",right:"view-tablet:max-view-desktop:ml-auto view-tablet:max-view-desktop:mr-0"},items:{left:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-start",center:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-center",right:"view-tablet:max-view-desktop:justify-items-end"},justify:{left:"view-tablet:max-view-desktop:justify-start",center:"view-tablet:max-view-desktop:justify-center",right:"view-tablet:max-view-desktop:justify-end"}},w={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function r(e){return e==="left"||e==="center"||e==="right"?e:void 0}function m(e,a,s){const i=r(e)??"left",t=n("same",i,r(a),r(s)),l={};return t.tablet&&t.tablet!==i&&(l.tablet=t.tablet),t.phone&&t.phone!==i&&(l.phone=t.phone),l}function f(e,a,s,i){const t=m(a,s,i);return[t.tablet?o[e][t.tablet]:"",t.phone?w[e][t.phone]:""].filter(Boolean).join(" ")}export{v as BLOCK_ALIGN_JUSTIFY,m as alignViewAnswers,f as alignViewClasses,r as blockAlignOf};
|
|
@@ -7,6 +7,10 @@ export declare const NESTED_BOX_PADDING: {
|
|
|
7
7
|
export declare const BOX_ALIGN_CLASS: Record<BoxAlign, string>;
|
|
8
8
|
export declare function boxLayoutClasses(justify: unknown, align: unknown): string;
|
|
9
9
|
export declare function boxWrapClass(wrap: unknown): string;
|
|
10
|
+
export declare function boxJustifyViewClasses(justify: unknown, justifyTablet: unknown, justifyPhone: unknown): string;
|
|
11
|
+
export declare function boxAlignViewClasses(align: unknown, alignTablet: unknown, alignPhone: unknown): string;
|
|
12
|
+
export declare function boxWrapWordOf(wrap: unknown): "wrap" | "nowrap" | undefined;
|
|
13
|
+
export declare function boxWrapTabletClass(wrap: unknown, wrapTablet: unknown): string;
|
|
10
14
|
export declare const BOX_SHARE_LABEL = "Block widths";
|
|
11
15
|
export declare const BOX_SHARE_POINTS: readonly [{
|
|
12
16
|
readonly label: "Fit content";
|
|
@@ -110,3 +114,4 @@ export declare const BOX_BLOCK_SPACING_POINTS: readonly [{
|
|
|
110
114
|
export type BoxBlockSpacing = (typeof BOX_BLOCK_SPACING_POINTS)[number]["value"];
|
|
111
115
|
export declare const BOX_GAP_ONLY_CLASS = "sf-box-gap-only";
|
|
112
116
|
export declare function boxBlockSpacingClass(spacing: unknown): string;
|
|
117
|
+
export declare function boxBlockSpacingViewClasses(spacing: unknown, spacingTablet: unknown, spacingPhone: unknown): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isStripBox as p}from"./box-separator.js";const W={sectionPaddingTop:0,sectionPaddingBottom:0},x={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},h={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function U(e,t){const i=typeof e=="string"&&e in x?x[e]:"",n=typeof t=="string"&&t in h?h[t]:"";return[i,n].filter(Boolean).join(" ")}function q(e){return e===!0||e==="wrap"?"flex-wrap":""}const F="Block widths",f=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],G=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function j(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in v?"custom":"content"}const u=4,_=10;function k(e,t){if(!Number.isInteger(t)||t<2||t>u||e.length!==t-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const i=[];let n=0;return e.forEach((a,o)=>{const r=100-n-_*(t-1-o),c=Math.min(r,Math.max(_,Math.round(a)));i.push(c),n+=c}),i}function m(e,t,i){if(!Array.isArray(t))return;const n=k(t,i),a=n?[...n,100-n.reduce((r,c)=>r+c,0)]:[],o={};for(let r=0;r<u;r+=1)o[`--${e}-${r+1}`]=a[r]??1;return o}function D(e,t,i){const n=m("sf-share",e,i),a=m("sf-share-tablet",t,i);return n||a?{...n,...a}:void 0}function C(e,t){const i=Array.from({length:t},()=>1),n=f.find(r=>r.value===e);if(!n?.weights||t<1)return i;const[a,o]=n.weights;return a>1&&(i[0]=a),o>1&&(i[t-1]=o),i}function K(e,t){if(typeof e!="string"||!(e in v)||e==="equal")return e;const i=C(e,t),n=i.reduce((a,o)=>a+o,0);return i.slice(0,-1).map(a=>Math.round(a/n*100))}const s="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",v={equal:s,bigLeft:`${s} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${s} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${s} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${s} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${s} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`},L=`${s} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function E(e){return Array.isArray(e)?L:typeof e=="string"?v[e]??"":""}const V={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},{not:{context:"parent.bgImage",set:!0}},{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(v)}]}]}]},b="view-tablet:max-view-desktop:flex-row!",l=`${b} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,g={content:`${b} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:l,bigLeft:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${l} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${l} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},B=`${l} [&>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function N(e){return Array.isArray(e)||typeof e=="string"&&e in g?e:null}function Q(e){if(e.direction!=="row"||p(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||S(e.columns)!==""||O(e.columnsTablet)!=="")return"";const t=N(e.shareTablet);return t===null?"":typeof t=="string"?g[t]:B}const T="[&>*]:view-wide:basis-[content]";function Y(e){return E(e)===""?T:""}const J="Columns",z=1,Z=3,d={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ee=f.filter(e=>e.value==="content"||e.value==="equal"),te="equal",ie=1,ne=6,w="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",y={1:`${w} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function S(e){return typeof e=="number"?y[e]??"":""}const R={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function O(e){return typeof e=="number"?R[e]??"":""}function ae(e){return e.direction!=="row"||p(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":O(e.columnsTablet)}function re(e){return e.direction!=="row"||p(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":S(e.columns)}const P="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",$={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},H="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function X(e){return e===!1||e==="nowrap"}function oe(e,t,i){const n=d[Number(e)];if(!n)return"max-view-wide:flex-col";const a=X(i);return A(e,t)?a?H:P:a?$[Number(e)]:n}function se(e,t){return Number(e)in d&&!A(e,t)}function A(e,t){return Number(e)in d&&t==="content"}const le="Block spacing",we=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],I="sf-box-gap-only";function ce(e){return e==="gap"?I:""}export{h as BOX_ALIGN_CLASS,le as BOX_BLOCK_SPACING_LABEL,we as BOX_BLOCK_SPACING_POINTS,ne as BOX_COLUMNS_MAX,ie as BOX_COLUMNS_MIN,I as BOX_GAP_ONLY_CLASS,V as BOX_GIVES_PICTURES_A_HEIGHT,J as BOX_PHONE_ROW_LABEL,Z as BOX_PHONE_ROW_MAX,z as BOX_PHONE_ROW_MIN,G as BOX_SHARE_CHOICES,F as BOX_SHARE_LABEL,te as BOX_SHARE_PHONE_DEFAULT,ee as BOX_SHARE_PHONE_POINTS,f as BOX_SHARE_POINTS,W as NESTED_BOX_PADDING,ce as boxBlockSpacingClass,S as boxColumnsClass,Y as boxFitContentClass,U as boxLayoutClasses,se as boxPhoneCellsShareLine,oe as boxPhoneRowClasses,A as boxPhoneRowFits,X as boxPhoneRowOneLine,re as boxRowColumnsClass,ae as boxRowTabletColumnsClass,Q as boxRowTabletShareClass,j as boxShareChoiceOf,E as boxShareClasses,N as boxShareTabletOf,D as boxShareVars,K as boxShareWidthsOf,O as boxTabletColumnsClass,q as boxWrapClass};
|
|
1
|
+
import{isStripBox as f}from"./box-separator.js";import{viewOverrides as y}from"./view-overrides.js";const te={sectionPaddingTop:0,sectionPaddingBottom:0},p={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function ie(e,t){const n=typeof e=="string"&&e in p?p[e]:"",i=typeof t=="string"&&t in v?v[t]:"";return[n,i].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const N={start:"view-tablet:max-view-desktop:justify-start!",center:"view-tablet:max-view-desktop:justify-center!",between:"view-tablet:max-view-desktop:justify-between!",end:"view-tablet:max-view-desktop:justify-end!"},T={start:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",between:"max-view-tablet:justify-between",end:"max-view-tablet:justify-end"},P={start:"view-tablet:max-view-desktop:items-start!",center:"view-tablet:max-view-desktop:items-center!",end:"view-tablet:max-view-desktop:items-end!",stretch:"view-tablet:max-view-desktop:items-stretch!"},R={start:"max-view-tablet:items-start",center:"max-view-tablet:items-center",end:"max-view-tablet:items-end",stretch:"max-view-tablet:items-stretch"},I={wrap:"view-tablet:max-view-desktop:flex-wrap!",nowrap:"view-tablet:max-view-desktop:flex-nowrap!"};function s(e,t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(e,t)?t:void 0}function h(e,t,n){const i=y("same",e,t,n),a={};return i.tablet!==void 0&&i.tablet!==e&&(a.tablet=i.tablet),i.phone!==void 0&&i.phone!==e&&(a.phone=i.phone),a}function u(e,t,n){return[e.tablet?t[e.tablet]:"",e.phone?n[e.phone]:""].filter(Boolean).join(" ")}function H(e,t,n){return h(s(p,e)??"start",s(p,t),s(p,n))}function ne(e,t,n){return u(H(e,t,n),N,T)}function ae(e,t,n){const i=s(v,e)??"stretch";if(i==="stretch")return"";const a=h(i,s(v,t),s(v,n));return u(a,P,R)}function $(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function oe(e,t){const n=B(e)===""?"nowrap":"wrap",i=$(t);return i&&i!==n?I[i]:""}const re="Block widths",m=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],se=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function le(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in x?"custom":"content"}const _=4,g=10;function X(e,t){if(!Number.isInteger(t)||t<2||t>_||e.length!==t-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const n=[];let i=0;return e.forEach((a,o)=>{const r=100-i-g*(t-1-o),d=Math.min(r,Math.max(g,Math.round(a)));n.push(d),i+=d}),n}function S(e,t,n){if(!Array.isArray(t))return;const i=X(t,n),a=i?[...i,100-i.reduce((r,d)=>r+d,0)]:[],o={};for(let r=0;r<_;r+=1)o[`--${e}-${r+1}`]=a[r]??1;return o}function we(e,t,n){const i=S("sf-share",e,n),a=S("sf-share-tablet",t,n);return i||a?{...i,...a}:void 0}function W(e,t){const n=Array.from({length:t},()=>1),i=m.find(r=>r.value===e);if(!i?.weights||t<1)return n;const[a,o]=i.weights;return a>1&&(n[0]=a),o>1&&(n[t-1]=o),n}function ce(e,t){if(typeof e!="string"||!(e in x)||e==="equal")return e;const n=W(e,t),i=n.reduce((a,o)=>a+o,0);return n.slice(0,-1).map(a=>Math.round(a/i*100))}const l="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",x={equal:l,bigLeft:`${l} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${l} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${l} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${l} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${l} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`},M=`${l} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function j(e){return Array.isArray(e)?M:typeof e=="string"?x[e]??"":""}const pe={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},{not:{context:"parent.bgImage",set:!0}},{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(x)}]}]}]},A="view-tablet:max-view-desktop:flex-row!",w=`${A} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,O={content:`${A} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:w,bigLeft:`${w} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${w} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${w} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${w} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${w} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},U=`${w} [&>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function F(e){return Array.isArray(e)||typeof e=="string"&&e in O?e:null}function ve(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||C(e.columns)!==""||L(e.columnsTablet)!=="")return"";const t=F(e.shareTablet);return t===null?"":typeof t=="string"?O[t]:U}const G="[&>*]:view-wide:basis-[content]";function de(e){return j(e)===""?G:""}const xe="Columns",fe=1,he=3,b={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ue=m.filter(e=>e.value==="content"||e.value==="equal"),be="equal",me=1,_e=6,c="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",q={1:`${c} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function C(e){return typeof e=="number"?q[e]??"":""}const V={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function L(e){return typeof e=="number"?V[e]??"":""}function ge(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columnsTablet)}function Se(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":C(e.columns)}const J="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",K={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},D="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function Y(e){return e===!1||e==="nowrap"}function Ae(e,t,n){const i=b[Number(e)];if(!i)return"max-view-wide:flex-col";const a=Y(n);return k(e,t)?a?D:J:a?K[Number(e)]:i}function Oe(e,t){return Number(e)in b&&!k(e,t)}function k(e,t){return Number(e)in b&&t==="content"}const Ce="Block spacing",Le=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],Q="sf-box-gap-only";function ke(e){return e==="gap"?Q:""}const E={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},z={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Ee(e,t,n){const i=o=>s(E,o),a=h(e==="gap"?"gap":"each",i(t),i(n));return u(a,E,z)}export{v as BOX_ALIGN_CLASS,Ce as BOX_BLOCK_SPACING_LABEL,Le as BOX_BLOCK_SPACING_POINTS,_e as BOX_COLUMNS_MAX,me as BOX_COLUMNS_MIN,Q as BOX_GAP_ONLY_CLASS,pe as BOX_GIVES_PICTURES_A_HEIGHT,xe as BOX_PHONE_ROW_LABEL,he as BOX_PHONE_ROW_MAX,fe as BOX_PHONE_ROW_MIN,se as BOX_SHARE_CHOICES,re as BOX_SHARE_LABEL,be as BOX_SHARE_PHONE_DEFAULT,ue as BOX_SHARE_PHONE_POINTS,m as BOX_SHARE_POINTS,te as NESTED_BOX_PADDING,ae as boxAlignViewClasses,ke as boxBlockSpacingClass,Ee as boxBlockSpacingViewClasses,C as boxColumnsClass,de as boxFitContentClass,ne as boxJustifyViewClasses,ie as boxLayoutClasses,Oe as boxPhoneCellsShareLine,Ae as boxPhoneRowClasses,k as boxPhoneRowFits,Y as boxPhoneRowOneLine,Se as boxRowColumnsClass,ge as boxRowTabletColumnsClass,ve as boxRowTabletShareClass,le as boxShareChoiceOf,j as boxShareClasses,F as boxShareTabletOf,we as boxShareVars,ce as boxShareWidthsOf,L as boxTabletColumnsClass,B as boxWrapClass,oe as boxWrapTabletClass,$ as boxWrapWordOf};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export declare const BOX_SHADOW_ATTR = "data-sf-box-shadow";
|
|
2
2
|
export declare function boxShadowOn(value: unknown): boolean;
|
|
3
3
|
export declare function boxShadowAttrs(value: unknown): Record<string, string>;
|
|
4
|
+
export declare const BOX_SHADOW_TABLET_ATTR = "data-sf-box-shadow-tablet";
|
|
5
|
+
export declare const BOX_SHADOW_PHONE_ATTR = "data-sf-box-shadow-phone";
|
|
6
|
+
export declare function boxShadowViewAttrs(desktop: unknown, tablet: unknown, phone: unknown): Record<string, string>;
|
|
7
|
+
export declare function boxShadowOnAnyView(desktop: unknown, tablet: unknown, phone: unknown): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{viewOverrides as u}from"./view-overrides.js";const i="data-sf-box-shadow";function d(o){return o===!0}function w(o){return d(o)?{[i]:""}:{}}const b="data-sf-box-shadow-tablet",h="data-sf-box-shadow-phone",f=o=>typeof o=="boolean"?o:void 0;function s(o,e,r){const t=d(o),n=u("same",t,f(e),f(r)),a={};return n.tablet!==void 0&&n.tablet!==t&&(a.tablet=n.tablet),n.phone!==void 0&&n.phone!==t&&(a.phone=n.phone),a}function c(o,e,r){const t=s(o,e,r);return{...t.tablet===void 0?null:{[b]:t.tablet?"on":"off"},...t.phone===void 0?null:{[h]:t.phone?"on":"off"}}}function x(o,e,r){const t=s(o,e,r);return d(o)||t.tablet===!0||t.phone===!0}export{i as BOX_SHADOW_ATTR,h as BOX_SHADOW_PHONE_ATTR,b as BOX_SHADOW_TABLET_ATTR,w as boxShadowAttrs,d as boxShadowOn,x as boxShadowOnAnyView,c as boxShadowViewAttrs};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BOX_SHAPES:
|
|
1
|
+
export declare const BOX_SHAPES: ("square" | "video" | "poster" | "auto" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story")[];
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{galleryCardRatioClass as
|
|
1
|
+
import{galleryCardRatioClass as d,SHAPE_TABLE as l}from"./gallery-card-layout.js";const w=l.map(e=>e.shape);function o(e){return w.includes(String(e??""))?e:"auto"}function p(e){const t=o(e);return t==="auto"?"":d(t)}const u={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",video:"view-wide:aspect-[16/9]",wide:"view-wide:aspect-[2/1]",panorama:"view-wide:aspect-[21/9]",story:"view-wide:aspect-[9/16]",poster:"view-wide:aspect-[2/3]",portrait:"view-wide:aspect-[4/5]"},r={auto:"max-view-wide:aspect-auto",tall:"max-view-wide:h-auto max-view-wide:aspect-[3/4]",square:"max-view-wide:h-auto max-view-wide:aspect-square",landscape:"max-view-wide:h-auto max-view-wide:aspect-[4/3]",video:"max-view-wide:h-auto max-view-wide:aspect-[16/9]",wide:"max-view-wide:h-auto max-view-wide:aspect-[2/1]",panorama:"max-view-wide:h-auto max-view-wide:aspect-[21/9]",story:"max-view-wide:h-auto max-view-wide:aspect-[9/16]",poster:"max-view-wide:h-auto max-view-wide:aspect-[2/3]",portrait:"max-view-wide:h-auto max-view-wide:aspect-[4/5]"};function c(e,t){return w.includes(String(t??""))?t===o(e)?null:t:null}const n={auto:"view-tablet:max-view-desktop:aspect-auto!",tall:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[3/4]!",square:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-square!",landscape:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[4/3]!",video:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[16/9]!",wide:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[2/1]!",panorama:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[21/9]!",story:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[9/16]!",poster:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[2/3]!",portrait:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[4/5]!"};function x(e){return w.includes(String(e??""))?e:null}function b(e,t,v){const a=x(v),i=c(e,w.includes(String(t??""))?t:a);if(i===null&&a===null)return p(e);const s=o(e);return[i===null?p(e):s==="auto"?"":u[s],i===null?"":r[i],a===null?"":n[a]].filter(Boolean).join(" ")}export{w as BOX_SHAPES,p as boxShapeClass,b as boxShapeClasses,o as boxShapeOf,c as boxShapePhoneOf,x as boxShapeTabletOf};
|
|
@@ -18,6 +18,7 @@ export interface CardRowFieldSpec {
|
|
|
18
18
|
alt?: string;
|
|
19
19
|
next?: string;
|
|
20
20
|
everySource?: boolean;
|
|
21
|
+
mark?: "accentItalic";
|
|
21
22
|
}
|
|
22
23
|
export interface CardTemplateSpec {
|
|
23
24
|
block: string;
|
|
@@ -54,7 +55,7 @@ export declare function rowNextPicture(item: unknown, next: string | undefined,
|
|
|
54
55
|
export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
|
|
55
56
|
export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
|
|
56
57
|
export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
|
|
57
|
-
export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined): Record<string, unknown>;
|
|
58
|
+
export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string): Record<string, unknown>;
|
|
58
59
|
type DocNode = {
|
|
59
60
|
type?: unknown;
|
|
60
61
|
props?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSourceSpec as x,declaredBlockSource as g}from"./block-sources.js";import{isNodeList as T}from"efficient-easel/data";import{BOX_TYPE as w}from"../document/container-blocks.js";import{globalRegistry as C}from"../global-registry.js";import{nonEmptyString as
|
|
1
|
+
import{blockSourceSpec as x,declaredBlockSource as g}from"./block-sources.js";import{isNodeList as T}from"efficient-easel/data";import{BOX_TYPE as w}from"../document/container-blocks.js";import{globalRegistry as C}from"../global-registry.js";import{nonEmptyString as y}from"../non-empty-string.js";import{accentItalicRuns as B}from"../markup.js";import{withCardsTemplate as R}from"../document/cards-template-on-read.js";const A="template",U="Card template",O=["Text","ImageBlock","ButtonBlock","Flex"],f="rowField",h="rowLinkField";function H(){return{type:"slot",allow:[...O]}}const _=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>R("Cards",e)}];function s(){return C("efficient.card-templates",()=>new Map(_.map(e=>[e.block,e])))}function V(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(c=>c.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=y(t.typedRows);s().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:r,typedRows:n,...t.seed?{seed:t.seed}:{}})}}function E(e,t){const r=e?s().get(e)?.seed:void 0;return r?r(t):t}function X(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:n,...o}=t,c=E(e,o);return c===o?t:c}function Y(){for(const e of s().values())if(e.blocks?.length)return!0;return!1}function $(e){return s().get(e)?.blocks??[]}function q(e){for(const t of s().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function z(e){return typeof e=="string"&&s().get(e)?.typedRows||""}function L(e){return typeof e=="string"&&s().has(e)}function G(e,t){const r=s().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function P(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=s().get(r)?.fields??[],o=x(g(e?.props))?.fields,c=o?.length?[...o.map(l=>({...l})),...n.filter(l=>l.everySource&&!o.some(i=>i.key===l.key))]:n;return t?c.filter(l=>(l.kind??"text")===t):c}function S(e,t,r){return e?r?P(r).find(n=>n.key===t)??null:s().get(e)?.fields.find(n=>n.key===t)??null:null}function m(e,t=f){const r=e?.[t];return typeof r=="string"?r.trim():""}function J(e,t){return e.key||String(t+1)}function Q(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}function Z(e,t,r=""){const n=t&&e&&typeof e=="object"?e[t]:void 0;if(!Array.isArray(n))return"";for(const o of n){const c=typeof o=="string"?o:o?.src,l=y(typeof c=="string"?c.trim():void 0);if(l&&l!==r.trim())return l}return""}const b={Text:{text:f},ImageBlock:{src:f},ButtonBlock:{label:f,href:h},Breadcrumb:{currentCrumb:f}};function ee(e,t,r){return F(e,t,r)!==""}function F(e,t,r){const n=b[e]?.[r];return n?m(t,n):""}function I(e,t){return!t||!e?null:e[t]??""}function te(e,t,r,n){if(!r)return t;let o=null;for(const[c,l]of Object.entries(b[e]??{})){const i=m(t,l),u=I(r,i);u!==null&&(o??={...t},o[c]=n&&S(n,i)?.mark==="accentItalic"?B(u):u)}return o??t}function a(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(c,l)=>{for(const i of c){if(i?.props?.id===t)return l;for(const[u,d]of Object.entries(i?.props??{})){if(!T(d))continue;const k=u===A&&L(i.type)?{owner:i,direct:!0,nested:l!==null,underBox:!1}:l&&{owner:l.owner,direct:!1,nested:l.nested,underBox:l.underBox||i.type===w},p=n(d,k);if(p!==void 0)return p}}},o=n(r,null);return o===void 0?null:o}function re(e,t){const r=a(e,t);return r&&r.owner}function ne(e,t){const r=a(e,t);return r&&(r.direct?r.owner:null)}function oe(e,t){const r=a(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}export{f as CARD_ROW_FIELD_PROP,h as CARD_ROW_LINK_PROP,O as CARD_TEMPLATE_BLOCKS,U as CARD_TEMPLATE_LABEL,A as CARD_TEMPLATE_SLOT,oe as cardCopyPlace,J as cardKeyOf,Q as cardRow,$ as cardTemplateBlocks,ne as cardTemplateCardOwner,S as cardTemplateField,G as cardTemplateFields,P as cardTemplateFieldsOf,re as cardTemplateOwner,H as cardTemplateSlot,z as cardTemplateTypedRows,Y as cardTemplatesNameBlocks,L as hasCardTemplate,q as isCardTemplateBlock,m as namedRowField,V as registerCardTemplates,ee as rowBound,F as rowFieldOf,I as rowFieldText,te as rowFilledProps,Z as rowNextPicture,X as templateOnInsert,E as templateOnRead};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type DirectionContainer = "Flex" | "HeroGroup";
|
|
2
|
-
export declare const CONTAINER_DIRECTIONS: readonly ["column", "row", "tabs"];
|
|
2
|
+
export declare const CONTAINER_DIRECTIONS: readonly ["column", "row", "tabs", "accordion"];
|
|
3
3
|
export type ContainerDirection = (typeof CONTAINER_DIRECTIONS)[number];
|
|
4
4
|
export declare const CONTAINER_DIRECTION_LABEL = "Direction";
|
|
5
5
|
export declare const CONTAINER_DIRECTION_LABELS: Readonly<Record<ContainerDirection, string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const c=["column","row","tabs","accordion"],N="Direction",t={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},n={Flex:c,HeroGroup:["column","row"]},e={Flex:"row",HeroGroup:"column"},I={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function i(r,o){return n[r].includes(o)?o:e[r]}function l(r,o){return I[i(r,o)]}function E(r){return n[r].map(o=>({label:t[o],value:o}))}export{c as CONTAINER_DIRECTIONS,e as CONTAINER_DIRECTION_BUILT_IN,I as CONTAINER_DIRECTION_CLASS,N as CONTAINER_DIRECTION_LABEL,t as CONTAINER_DIRECTION_LABELS,n as CONTAINER_DIRECTION_OFFERED,l as containerDirectionClass,E as containerDirectionPoints,i as resolveContainerDirection};
|