efficient-web-builder 55.0.0 → 55.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/editor/lib/document/blocks/general/CardList/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +19 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +2 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-phone-place.d.ts +3 -3
- package/dist/format/lib/content/box-phone-place.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/card-state.d.ts +2 -0
- package/dist/format/lib/content/card-state.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +9 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/phone-focus.js +1 -1
- package/dist/format/lib/content/view-var-split.d.ts +11 -0
- package/dist/format/lib/content/view-var-split.js +1 -0
- package/dist/format/lib/document/blocks/general/CardList/item-seed.d.ts +4 -0
- package/dist/format/lib/document/blocks/general/CardList/item-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/CardList/meta.d.ts +8 -0
- package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +1 -0
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/fit-words.d.ts +8 -0
- package/dist/format/lib/fit-words.js +23 -12
- package/dist/render/components/CardRowContext.d.ts +3 -2
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Flex.d.ts +7 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +2 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/lib/content/block-size.d.ts +2 -6
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -0
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 55.1.0 - 2026-11-06
|
|
4
|
+
|
|
5
|
+
From main at `868416f8`: #548, #550, #553, #530. A minor: additions only, no `!` in any title. The peers stay `efficient-easel` `^28.2.0` and `efficient-shell` `^12.13.0`. No declared export is removed (`CardRowFieldKind` gains `"list"`; the Box phone-place class strings gain their Card list twin). No stored key or value moves.
|
|
6
|
+
|
|
7
|
+
**For hosts:** a Box's view Fill and Darken (#548) draw with the efficient-storefront-blocks site sheet rules of #389 (`sf-fill-tablet|phone`, `sf-wash-tablet|phone`); take that blocks release with this one. Byte pins recorded before #530 can read a draw back without the Card list half through `withoutBoxItemsHalf`.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Text fit and Min font take a Tablet value; a Box's Fill colour, Darken and Darken style take a Tablet and a Phone value** (#548). New optional keys `textFitTablet`, `minFontTablet`, `fillColorTablet`, `fillColorPhone`, `darkenTablet`, `darkenPhone`, `darkenStyleTablet`, `darkenStylePhone`. A node with no view value draws the same bytes; the inline fit boot script reads the tablet attributes.
|
|
12
|
+
- **A Card list part for card templates** (#530). It draws its own template once per item of a `list` field of the card's row, with a seed (one Box with one Text that shows the item's `label`). A Box's rules reach the items through a twin class for `[data-sf-box-items]` (`BOX_ITEMS_ATTR`); main's classes keep their bytes. New exports `withoutBoxItemsHalf`, `CARD_STATE_UNDER_LINE_CLASS`, type `CardStateLine`; `CardTemplateRows` takes `stateLine` (`frame`, the default, or `under`).
|
|
13
|
+
- **A new Breadcrumb or DocBody insert draws as a Box** (#553). Stored nodes do not change (`SECTION_TO_BOX_ON` stays empty). A long Breadcrumb trail wraps.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **One guard: every catalog section has a Box path, or a named owner** (#550). `scripts/test-every-section-has-a-box-path.tsx` with its baseline replaces `test-section-to-box` §5. Test and comment changes only; built `dist/` is byte-identical.
|
|
18
|
+
|
|
3
19
|
## 55.0.0 - 2026-11-06
|
|
4
20
|
|
|
5
21
|
From main at `a21fd3f8`: #518, #532, #534, #538, #540, #541, #542, #543, #545, #546, #547, #549. A major because the peers rise to `efficient-easel` `^28.2.0` (was `^27.7.0`; #532 to ^28.1.0, #545 to ^28.2.0) and `efficient-shell` `^12.13.0` (was `^11.8.0`) (#532), and a declared export is removed and a module moves (#541). No stored key or value moves.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{CARD_ROW_FACTS as s,cardRowField as d,cardRowFields as t}from"../../../card-row-fields.js";import{CardListSlots as e}from"../../../../../../format/lib/document/blocks/general/CardList/meta.js";const a={fields:{_gCardList:r("Card list"),rowField:d("Shows","list"),...e},resolveFields:(i,o)=>t(o.fields,i,o),showWhenFacts:s};export{a as CardListFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{phoneKey as n,tabletKey as t}from"efficient-easel/draw";import{BOX_CARD_PAD as u,isBackgroundBox as eo}from"../../../../../../format/lib/content/box-background.js";import{darkenFields as no}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as to,REEL_SHAPE_LABELS as ro}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as io,TAB_SHAPE_PICTURES as ao}from"../../../choice-pictures.js";import{deviceField as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{phoneKey as n,tabletKey as t}from"efficient-easel/draw";import{BOX_CARD_PAD as u,isBackgroundBox as eo}from"../../../../../../format/lib/content/box-background.js";import{darkenFields as no}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as to,REEL_SHAPE_LABELS as ro}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as io,TAB_SHAPE_PICTURES as ao}from"../../../choice-pictures.js";import{deviceField as d}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as lo,ClockIcon as so,CropIcon as N,MediaLayoutStackedIcon as co,LineBetweenIcon as po,LineSolidIcon as _o,ShadowIcon as So,StylesIcon as mo,TableIcon as F,TargetIcon as ho,WrapIcon as Oo}from"efficient-easel/icons";import{boxBlockSpacingField as fo,boxFillField as uo,boxColumnsFields as Ao,boxShareField as Ro,boxSharePhoneField as wo,boxShareTabletField as go,containerDirectionField as Co,containerGapRows as Eo,linkField as bo,plainText as To,swapPadding as k,toggle as S,upload as D,withPanelOnly as Lo}from"../../../controls.js";import{BOX_STACK_LINE as I,BOX_STACK_RANGE as R,STACK_BELOW_PROP as P}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as x,boxShapeOf as No}from"../../../../../../format/lib/content/box-shape.js";import{shapeLines as H}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as B}from"../../../shape-picker.js";import{BOX_COLUMNS_MAX as w,BOX_COLUMNS_MIN as g,boxPhoneRowOneLine as Fo,boxWrapWordOf as ko}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as y}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as Do,VIEW_KEY_ACCESS as l,group as m,phoneTwinFields as a}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Io,boxJustifyField as Po,boxWrapField as A,iconPickerRow as xo,placementField as Ho,select as M,sidesPaddingFields as W,slider as Bo}from"../../../box-fields.js";import{withRowRules as yo}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Mo}from"../../../separator-field.js";import{LOOP_SCROLLS as Wo}from"../../../../../../format/lib/animation/index.js";import{accordionOnSet as Uo}from"../../../box-accordion-seed.js";import{FlexSlots as U}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{boxPhoneOrderField as Ko}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Xo,ON_A_CARD as jo,cardDisplayField as vo}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Go,MIRROR_CARDS_MIRRORS as Yo,mirrorCardsField as Vo}from"../../../mirror-cards-field.js";import{SHOW_FOR_FACTS as Jo,showForField as zo,showForFields as qo}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as h,SHARED_COLUMNS_LABEL as K,SHARED_COLUMNS_OFF as X,sharedColumnsDrawn as j,sharedColumnsFits as v,SHARED_COLUMNS_PHONE_POINTS as Qo,SHARED_COLUMNS_POINTS as Zo}from"../../../../../../render/lib/content/box-shared-columns.js";const C={field:"bgImage",set:!0},G={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},$o={field:"direction",is:"tabs"},oe={field:"line",in:[!0,!1]},ee={field:"anchor",set:!0},E=["fixed","screen"],ne={not:{any:[{field:"sectionHeightMode",in:E},{field:"sectionHeightModeTablet",in:E},{field:"sectionHeightModePhone",in:E}]}},te={context:"parent.line",is:!0},c={not:{field:"direction",is:"accordion"}},Y="notAccordionRow",re={not:{context:Y,is:!0}},ie={[Y]:(o,e)=>e.parent?.props?.direction!=="accordion"},b={field:"direction",is:"row",default:"row"},p={not:Wo},O={all:[b,p,{not:{field:"separator",in:y.map(o=>o.value)}},{not:{field:"line",is:!0}}]},V={all:[O,...["columns",t("columns")].map(o=>({not:{field:o,in:Array.from({length:w},(e,r)=>r+g)}}))]},ae={all:[p,{not:{all:[b,{field:"separator",in:y.map(o=>o.value)}]}}]},T={not:{all:[O,{field:"columns",in:Array.from({length:w},(o,e)=>e+g)}]}},le="sharedColumnsFits",J="sharedColumnsMisfit",z="sharedColumnsDraws",q="sharedColumnsPhoneDraws",se={[le]:o=>v(o.props??{}),[J]:o=>!v(o.props??{}),[z]:o=>j(o.props??{}).desktop,[q]:o=>j(o.props??{}).phone};function Q(o){return{all:[{not:{context:J,is:!0}},{any:[jo,{field:o,set:!0}]}]}}const _={not:{context:z,is:!0}},f={not:{context:q,is:!0}},de={any:[_,f]},L={not:C},ce={not:{context:Yo,is:!0}},Z={all:[c,L,_,f,ce]},pe={field:"direction",is:"row"},_e={field:"align",in:["start","center","end"]},Se={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function me(){const{darken:o,darkenStyle:e}=no();return{...a("darken",o,l),...a("darkenStyle",e,l)}}const $={not:{all:[O,{field:t("columns"),in:Array.from({length:w},(o,e)=>e+g)}]}};function he(){const o=S(Do,!1,i(Oo,{})),e=r=>{const s=ko(r);return s===void 0?void 0:s==="wrap"};return{...A(),render:r=>o.render({...r,value:e(r.value),follows:e(r.follows)??!1,onChange:s=>r.onChange(s===void 0?void 0:s?"wrap":"nowrap")})}}function Oe(o){return{...o,render:e=>o.render({...e,value:Fo(e.value)?"nowrap":"wrap"})}}const Ge={fields:yo({_gContent:m("Content"),rowTitle:U.rowTitle,content:U.content,_gCardDisplay:m("Display"),cardDisplay:vo(),showFor:zo(),_gLayout:m("Layout"),direction:Co("Flex"),tabShape:xo("Tab shape",i(mo,{}),to.map(o=>({label:ro[o],value:o,picture:ao[o]})),"tabs",{columns:2,cell:io}),mirrorCards:Vo(),[P]:d("desktop",Bo("Stacks below",i(co,{}),R.min,R.max,R.step,I,"px",{clear:{hint:I},hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),startsOpen:d("desktop",S("Starts open",!1,i(lo,{}))),label:Lo(To("Tab name")),...Eo("Flex"),...a("justify",Po(),l),...a("align",Io(),l),...(()=>{const o=a("wrap",A(),void 0,{phoneRow:Oe(A())}),e=a("wrap",A(),l,{phoneRow:he()});return{wrap:o.wrap,[t("wrap")]:e[t("wrap")],[n("wrap")]:o[n("wrap")]}})(),[n("order")]:Ko(),...a("boxShape",B("Box shape",i(N,{}),H(x),"shape","auto"),l,{phoneRow:B("Box shape",i(N,{}),H(x),"shape","auto",{phoneRest:o=>No(o)})}),separator:Mo(i(po,{size:18}),"none"),share:d("desktop",Ro()),[t("share")]:go(),[n("share")]:wo(),[h]:d("desktop",M(K,i(F,{}),[...Zo],X)),[n(h)]:d("mobile",M(K,i(F,{}),[...Qo],X)),...Ao(),...a("blockSpacing",fo(),l),line:S("Line",!1,i(_o,{}),"A line across the blocks, with a dot on each."),upcoming:S("Upcoming",!1,i(so,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:m("Shadow"),...a("shadow",S("Shadow",!1,i(So,{})),l),...a("fillColor",uo(),l),_gBackground:m("Background image"),bgImage:d("desktop",D("Image","image/*")),bgImagePhone:d("mobile",D("Image","image/*")),...me(),placement:Ho("Content position"),_gLink:m("Link"),link:bo("Link to"),jumpHighlight:S("Highlight when a link jumps here",!1,i(ho,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],C],[[n("share")],{all:[G,f]}],[[h],Q(h)],[[n(h)],Q(n(h))],[[n("wrap")],{all:[G,p,f]}],[[n("order")],{all:[O,f,_]}],[["phoneRow"],{all:[f,c]}],[["tabShape"],$o],[["rowTitle","startsOpen"],re],[["align","blockSpacing",t("blockSpacing"),n("blockSpacing")],c],[[t("justify"),n("justify")],{all:[p,Z]}],[[t("align"),n("align")],{all:[pe,_e,Z]}],[[t("wrap")],{all:[p,T,$,_,c]}],[[t("shadow"),n("shadow")],L],[[t("darken"),n("darken"),t("darkenStyle"),n("darkenStyle")],{all:[C,Se]}],[["separator"],b],[["columns",t("columns")],O],[[P],{all:[O,L,$,{not:{all:[V,{field:t("share"),set:!0}]}}]}],[[t("gap")],ae],[["justify"],{all:[p,de,c]}],[["wrap"],{all:[p,T,_,c]}],[["share"],{all:[T,_,c]}],[[t("share")],{all:[V,_]}],[["line"],oe],[["upcoming"],te],[["jumpHighlight"],ee],[["boxShape",t("boxShape"),n("boxShape")],ne]]),resolveData:(o,e)=>{const r=o.props;return r.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:Uo(r)}:o},resolveFields:(o,e)=>qo(fe(o,e),o.props),showWhenFacts:{...Xo,...Go,...se,...Jo,...ie}};function fe(...[o,{fields:e}]){{const r=o.props;if(eo(r.bgImage)){const oo=W({fallback:{top:u.desktop,bottom:u.desktop,left:u.side,right:u.side},tablet:!0});return k(e,oo)}return o.props.padV2!==!0?k(e,W({fallback:{top:24,bottom:24},tablet:!0})):e}}export{Ge as FlexFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assembleGeneralBlocks: () => Record<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Text" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
-
export declare const generalBlocks: Record<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Text" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Text" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "CardList" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
+
export declare const generalBlocks: Record<"ImageBlock" | "Manifesto" | "Split" | "ContactLocations" | "Grid" | "HeroGroup" | "HeroSlide" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Text" | "Eyebrow" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "CardList" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{DocBodyFields as n}from"./DocBody/fields.js";import{DocMastheadFields as c}from"./DocMasthead/fields.js";import{DocMetaCardsFields as S}from"./DocMetaCards/fields.js";import{DocTabsFields as B}from"./DocTabs/fields.js";import{EyebrowFields as g}from"./Eyebrow/fields.js";import{FAQFields as
|
|
1
|
+
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{DocBodyFields as n}from"./DocBody/fields.js";import{DocMastheadFields as c}from"./DocMasthead/fields.js";import{DocMetaCardsFields as S}from"./DocMetaCards/fields.js";import{DocTabsFields as B}from"./DocTabs/fields.js";import{EyebrowFields as g}from"./Eyebrow/fields.js";import{FAQFields as C}from"./FAQ/fields.js";import{FeaturedCoverFields as u}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as L}from"./Footprint/fields.js";import{GridFields as k}from"./Grid/fields.js";import{HeadingFields as H}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as h}from"./HeroGroup/fields.js";import{HeroSingleFields as y}from"./HeroSingle/fields.js";import{HeroSlideFields as D}from"./HeroSlide/fields.js";import{ImageBlockFields as P}from"./ImageBlock/fields.js";import{IntegrationsFields as E}from"./Integrations/fields.js";import{IntroBleedFields as b}from"./IntroBleed/fields.js";import{KeyFeaturesFields as G}from"./KeyFeatures/fields.js";import{LocationMapFields as I}from"./LocationMap/fields.js";import{LogoBlockFields as R}from"./LogoBlock/fields.js";import{LogosFields as x}from"./Logos/fields.js";import{LongReadFields as A}from"./LongRead/fields.js";import{ManifestoFields as w}from"./Manifesto/fields.js";import{MastheadFields as v}from"./Masthead/fields.js";import{MockupFields as N}from"./Mockup/fields.js";import{OrderSummaryFields as K}from"./OrderSummary/fields.js";import{CardListFields as O}from"./CardList/fields.js";import{ParagraphsAFields as Q}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as W}from"./PaymentBadges/fields.js";import{PostCardFields as _}from"./PostCard/fields.js";import{ProcessStepsFields as j}from"./ProcessSteps/fields.js";import{ProseFields as q}from"./Prose/fields.js";import{SectionHeaderFields as z}from"./SectionHeader/fields.js";import{SeriesFields as J}from"./Series/fields.js";import{SpacerFields as U}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as V}from"./SpecStrip/fields.js";import{SplitFields as X}from"./Split/fields.js";import{StatsFields as Y}from"./Stats/fields.js";import{StatsParagraphFields as Z}from"./StatsParagraph/fields.js";import{TestimonialsFields as $}from"./Testimonials/fields.js";import{TextFields as oo}from"./Text/fields.js";import{TickerFields as ro}from"./Ticker/fields.js";import{TimelineFields as eo}from"./Timeline/fields.js";import{TimelineTrackFields as io}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as to}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as mo}from"../../../../../render/lib/document/blocks/general/renders.js";const so={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:l,Countdown:a,CustomHTML:p,Divider:F,Contents:f,DocBody:n,DocMasthead:c,DocMetaCards:S,DocTabs:B,Eyebrow:g,FAQ:C,FeaturedCover:u,Flex:T,Footprint:L,Grid:k,Heading:H,Hero:M,HeroGroup:h,HeroSingle:y,HeroSlide:D,ImageBlock:P,Integrations:E,IntroBleed:b,KeyFeatures:G,LocationMap:I,LogoBlock:R,Logos:x,LongRead:A,Manifesto:w,Masthead:v,Mockup:N,OrderSummary:K,CardList:O,ParagraphsA:Q,PaymentBadges:W,PostCard:_,ProcessSteps:j,Prose:q,SectionHeader:z,Series:J,Spacer:U,SpecStrip:V,Split:X,Stats:Y,StatsParagraph:Z,Testimonials:$,Text:oo,Ticker:ro,Timeline:eo,TimelineTrack:io,TitleWithButtons:to},lo=()=>(r(),o(mo,so)),Sr=lo();export{lo as assembleGeneralBlocks,Sr as generalBlocks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as _}from"react/jsx-runtime";import{ListIcon as D}from"efficient-easel/icons";import{FieldGlyph as I}from"../../components/FieldGlyph.js";import{CARD_LIST_TYPE as b,cardListFieldsOf as M,cardListShows as P,cardTemplateFieldsOf as W,cardTemplateOwner as S}from"../../../format/lib/content/card-template.js";import{recordRowFields as k}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as B}from"../../../format/lib/content/record-types.js";import{editorRecordType as $}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as G,declaredBlockSource as A}from"../../../format/lib/content/block-sources.js";import{select as N}from"./box-fields.js";import{withShowWhen as U}from"../../../format/lib/document/show-when-attach.js";function C(t){const e=t?.data?.root,o=$(e?.props)??"";return o&&k(o,"text").length?o:""}const E="outsideCardTemplate",Y={not:{context:E,is:!0}},rt={[E]:(t,e)=>{const o=S(e.appState,t.props?.id);if(o!==void 0)return o===null&&!C(e.appState)}};function nt(t,e){const o=e==="link"?_(I,{noun:"link"}):_(D,{}),a={...N(t,o,[{label:"Typed here",value:""}],""),cardRowKind:e};return U(a,Y)}function q(t){return!!(t&&typeof t=="object"&&"cardRowKind"in t)}const F=new WeakMap;function pt(t,e,o){const a=Object.keys(t).filter(n=>q(t[n]));if(!a.length)return t;const m=e.props??{},r=S(o.appState,m.id),d=typeof r?.type=="string"?r.type:"",c=a.map(n=>typeof m[n]=="string"?m[n].trim():""),K=A(r?.props),s=d===b?S(o.appState,r?.props?.id):null,O=s?P(r?.props,s.type):"",L=s?A(s.props):"",j=s?`${String(s.type??"")}\0${L}`:"",w=r?"":C(o.appState),h=[d,K,O,j,G(),w,B(),...c].join("\0");let u=F.get(t);u||F.set(t,u=new Map);const x=u.get(h);if(x)return x;const f={...t};return a.forEach((n,l)=>{const i=t[n],y=d===b?M(o.appState,r,i.cardRowKind):d?W(r,i.cardRowKind):k(w,i.cardRowKind);if(!d&&w&&!y.length&&!c[l]){delete f[n];return}const R=c[l]&&!y.some(p=>p.key===c[l])?c[l]:"",g=i.cardRowKind==="list",v=(p,T)=>g&&T===0&&p.key!==c[l]?"":p.key;f[n]={...i,options:[...g?[]:i.options,...y.map((p,T)=>({label:p.label,value:v(p,T)})),...R?[{label:R,value:R}]:[]]}}),u.set(h,f),f}export{rt as CARD_ROW_FACTS,Y as IN_CARD_TEMPLATE,E as OUTSIDE_CARD_TEMPLATE,nt as cardRowField,pt as cardRowFields};
|
|
@@ -1 +1 @@
|
|
|
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
|
+
"use client";import{jsx as l,jsxs as N,Fragment as k}from"react/jsx-runtime";import{cloneElement as Pe,createContext as Kt,useContext as $t,useEffect as Xt,useId as Be,useRef as V,useState as z}from"react";import{useEasel as ue,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as jt,fromDateKey as Vt}from"efficient-shell/format";import{say as i,editorEaselWords as w}from"../../../format/lib/editor-words.js";import{mediaValueSrc as ve}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as De,loadingShowsOf as zt}from"../../../format/lib/hero-video.js";import{readHidable as He,hidableText as Ge}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as de,LINK_FIELD_MARKER as Me,MEDIA_FIELD_MARKER as We,SCAFFOLD_FIELD_MARKER as Ue,TEXT_FIELD_MARKER as E,foldMetaOf as pe,textFieldIdentifier as Yt}from"efficient-easel/draw";import qt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Ke}from"../../../render/lib/document/show-when.js";import Jt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Zt,CORNER_RADIUS_MAX as $e,CORNER_RADIUS_MIN as W}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 Xe,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 je,CornerIcon as xn,DirectionDownIcon as Sn,DirectionLeftIcon as wn,DirectionRightIcon as yn,DirectionUpIcon as Cn,EditIcon as _n,GapIcon as Rn,GridIcon as On,GroundIcon as he,HashIcon as Ve,HeightIcon as En,ImageIcon as In,ListIcon as Tn,LocationIcon as ze,PaddingBottomIcon as Ye,PaddingLeftIcon as qe,PaddingRightIcon as Je,PaddingTopIcon as Ze,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 Qe}from"../../components/FieldGlyph.js";import{resolvePageBackground as Bn}from"../../../format/lib/content/page-background.js";import{boxFillOf as vn}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as et,CORNER_SIDE_POINTS as Dn,hasOwnSectionCorners as Hn,normalizeCornerSides as tt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Gn,enclosingSection as Mn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as Wn,SettingsField as x,SettingsGroup as Un,SettingsGroupSub as Kn,SettingsSegmented as $n,SettingsBorder as Xn,SettingsSidesEach as jn,SettingsSwitch as me,borderSides as Vn,borderStartEach as zn}from"efficient-easel/panel";import{ListField as Yn}from"efficient-easel/fields";import{DisplayChips as qn}from"efficient-shell/ui";import{desktopDisplayChanged as Jn,partShownOnDesktop as Zn,partShownOnPhone as Qn,phoneDisplayChanged as eo,withDesktopPart as to,withPhonePart as no}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as oo,Checkbox as ro,ColorSwatch as lo,CornersInput as io,DatePicker as so,DateTimePicker as ao,FOCAL_DEFAULT as co,IconPicker as nt,COLUMN_COUNT_MAX as ot,COLUMN_SHARE_MIN as uo,COLUMN_SHARES_EQUAL as po,resolveColumnShares as rt,WidthsBar as fo,useShellStrings as ho,IconButton as lt,InputNumber as it,Slider as mo,Tooltip as ne}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as go}from"./geocode-resolve.js";import{ColourRow as st,InheritedColourRow as ge}from"./ColourControl.js";import{keptByRow as bo}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 xo,NoControlMark as So,noControlField as ct}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as wo}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as yo,resolvePhoneValue as be}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as U}from"efficient-easel/draw";import{SuppressibleText as Co}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as _o,CARD_OUTLINE_OPTIONS as Ro,DEFAULT_CARD_INDEX_FORMAT as Oo,DEFAULT_CARD_OUTLINE as Eo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Io,DEFAULT_COVER_INDEX as To}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ko}from"efficient-easel/draw";import Fo from"../../components/MediaUploadField.js";import Ao from"../../components/MultiSelectField.js";import Lo from"../../components/SectionThemePicker.js";import No from"../../components/SearchSelectField.js";import Po 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 Bo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as vo}from"efficient-easel/draw/client";import{encodePartId as Do}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Ho,useEaselStrings as Go}from"efficient-easel/strings";import{hasPhoneHeight as Mo,hasTabletHeight as xe,resolveSectionMinHeight as Wo,resolveTabletHeight as Uo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as oe,SECTION_STICK_LABEL as Se,hasPhoneStick as Ko,hasTabletStick as $o,resolveSectionStick as dt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Xo,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as jo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Vo,resolveContainerDirection as pt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as zo,BOX_BLOCK_SPACING_POINTS as ft,BOX_PHONE_ROW_LABEL as ht,BOX_COLUMNS_MAX as Yo,BOX_COLUMNS_MIN as mt,BOX_PHONE_ROW_MAX as qo,BOX_PHONE_ROW_MIN as we,BOX_SHARE_CHOICES as gt,BOX_SHARE_LABEL as K,boxShareChoiceOf as bt,boxShareWidthsOf as ye,BOX_SHARE_PHONE_DEFAULT as Jo,BOX_SHARE_PHONE_POINTS as Zo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as B}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Qo,borderBySide as xt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as er,normalizeTheme as St,normalizeThemeColors as tr,sectionBandTone as nr,surfaceTwoTone as or}from"../../../format/lib/theme.js";import{CONTAINER_GAP as wt,CONTAINER_GAP_BUILT_IN as rr,CONTAINER_GAP_PHONE as Ce,GAP_FIELD_CONTAINER as _e,followsSitePhoneGap as lr,hasOwnContainerGap as ir,hasOwnPhoneGap as Re,resolveContainerGap as yt,resolvePhoneContainerGap as Ct}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as sr,CARD_IMAGE_BG_OFF as ar,CARD_IMAGE_BG_SWATCH_NAMES as cr,CARD_IMAGE_BG_SWATCHES as ur,isCardImageBackgroundInheriting as dr,cardImageBackgroundChoice as pr,THEME_CARD_IMAGE_BG as fr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as hr,SECTION_BG_NO_FILL as mr,sectionBackgroundChoice as gr,THEME_SECTION_BG as Oe,isSectionBackgroundEmpty as br,sectionBackgroundHex as _t}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as xr,nestedAccentValue as Rt,resolveSectionAccent as re}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Sr,TYPE_SIZE_INHERIT as wr,isTypeSizeInheriting as yr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Cr,WIDTH_CHOICE_LABEL as _r,WIDTH_INHERIT as Rr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Or}from"./panel-heading-scope.js";import{useEaselSession as Er}from"efficient-easel/screen/lib/session-context";import{backendOf as Ir}from"../website-session.js";import{BOX_GAP as Tr,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 Ee,onDesktopWords as v,phoneTwinFields as le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as kr,gapField as Ie,iconPickerRow as Fr,pickerCellIcon as Ar,pickerNoneIcon as Lr,Segmented as Te,segmented as Nr,select as Z,slider as $}from"./box-fields.js";function ws({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 Pr(){const{blockGap:e}=B();return e===null?i("this container's own spacing"):D(`${e}px`,i("Styles"))}function Br({inherited:e,onReset:t,label:n}){return l(y,{words:w()?.panel,label:i(n),changed:!e,detail:Pr(),onReset:t})}function vr(e){return Ie({...Tr,builtIn:rr[e],resolve:(t,n)=>yt(e,t,n?.siteGap),action:(t,n)=>l(Br,{inherited:!ir(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[_e]:e}})}function Dr(e){return Ke(R("mobile",{[_e]:e,type:"custom",render:t=>l(Mr,{container:e,...t})}),Ot)}function Hr(e){return Ke(R("tablet",{[_e]:e,type:"custom",render:t=>l(Gr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-wt.min},(e,t)=>wt.min+t)}};function ys(e){return{gap:R("desktop",vr(e)),[U("gap")]:Hr(e),[F("gap")]:Dr(e)}}function Gr({container:e,...t}){const[n]=A("gap"),{siteGap:o}=t.field??{},r=Math.max(Ce.min,yt(e,n,o));return Ie({...Ce,builtIn:r,resolve:a=>Re(a)?a:r,action:(a,c)=>l(y,{words:w()?.panel,label:i("Gap"),changed:Re(a),detail:v(u=>i(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Mr({container:e,...t}){const[n]=A("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Ct(e,void 0,n,o,r);return Ie({...Ce,builtIn:s,resolve:c=>Ct(e,c,n,o,r),action:(c,u)=>l(y,{words:w()?.panel,label:i("Gap"),changed:Re(c),detail:D(`${s}px`,lr(e,n,r)?i("Styles"):i("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Cs(e){return kr({offered:Vo(e),fallback:pt(e,void 0),resolve:t=>pt(e,t)})}function _s(e,t){return an(t?sn(e,t):[],t)}function Wr({inherited:e,onReset:t,label:n}){return l(y,{words:w()?.panel,label:i(n),changed:!e,detail:D(i("Full"),i("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:u,hidden:f}=He(e),m=V(null),p=V(null),d=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:u,hidden:!f}),h=a&&f,C=Be(),S=r?jr(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:C,className:h?"is-hidden":void 0,hint:S,action:a?l(ne,{content:b,children:l(lt,{"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:C,ref:p,value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)}):l("input",{id:C,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)})]})})}function Rs(e,t){return{...e,[Ue]:t}}function Os(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Es(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Et="sfPanelOnly";function Is(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Et]:!0}}function Ts(e){return!!e&&typeof e=="object"&&e[Et]===!0}function ks(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 Ua,SCALAR_TEXT_CONTROLS as Ka}from"efficient-easel/draw";function Fs(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[xo]:o,...r}=e;return{...r,[wo]:!0,render:t}}const Ur=new Set(ko),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"}}}},G=(e,t)=>{const n=T({...t,[E]:e},{...It[e.control],label:e.label});if(!Ur.has(e.control))return n;const o=t.render;return{...ct(n,"authored-copy"),render:r=>l(Co,{name:r.name,children:o(r)})}},As="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Kr={field:"source.slug",set:!0},Ls={not:Kr},$r="Select a word, then press the highlighter.",Xr=new Set([$r]),jr=e=>Xr.has(e);function Ns(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ps(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Bs(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function vs(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ds(e){return{type:"custom",[Me]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>l(Po,{value:Ge(t),onChange:n,label:e})}}function Hs(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Gs={Design:pn,Animation:hn};function Ms(e){return{type:"custom",render:()=>l(Vr,{text:e})}}function Vr({text:e}){return l("p",{className:"sf-note",children:i(e)})}function Ws(e){return pe(e)!==null&&e?.tabs!==void 0}const Tt=new Map;function Us(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 Ks(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 zr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function $s(e,t){return zr(e)===t?e:{...e,marker:!0,fold:t,render:()=>l(k,{})}}function Xs(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 js({title:e,children:t}){const[n,o]=z(()=>!ke.has(e));return l(Un,{title:e,open:n,onToggle:r=>{o(r),r?ke.delete(e):ke.add(e)},children:t})}const ke=new Set;function Vs({label:e}){return l(Kn,{title:i(e),level:Or(2)})}function Yr({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(lo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),l("span",{className:"sf-swatch-hex",children:a})]})}function zs(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>l(qr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function qr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Ut(),u={background:a.background,surface:a.surface,surface2:or(a),band:nr(a)},f=n?Oe:t,m=br(s,t,f),p=_t(void 0,f,u),d=n?hr:void 0,g=gr(s,t),h=f===Oe?i("the theme's section background"):i("Theme {n} background",{n:c});return l(ge,{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(mr)},{label:`${i("Section band")} · ${u.band.toUpperCase()}`,color:u.band,selected:g==="band",onPick:()=>r(Oe)}]})}function Jr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=dr(r,t);return l(x,{label:i(e),icon:l(he,{}),changed:!s,action:l(y,{words:w()?.panel,label:i(e),changed:!s,detail:i("the theme's image stage"),onReset:()=>o(sr)}),children:Yr({swatches:ur,current:s?fr:pr(r,t),onPick:o,names:cr})})}}}function Ys(e=n=>n,t){return J({_gSectionTheme:O(xr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>l(Lo,{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(mo,{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?Pe(u,{changed:!h,onReset:()=>d(null)}):l(y,{words:w()?.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 Fe(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:Pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:l(Qr,{tier:e,px:o,onRadius:n})})}}}function A(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function At(){return ct({type:"custom",render:()=>l(So,{})},"always")}function Zr(){const e=M();return t=>e?.onChangeMany(t)}function Qr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=A(e.sidesKey),a=tt(r)??[...et];return l(io,{label:i(ie),value:a,corners:Dn,onChange:c=>{const u=tt(c)??[];s(u.length===et.length?null:u)},radius:t,onRadiusChange:n,radiusMin:W,radiusMax:$e,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Lt(){return At()}function el({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=B(),r=typeof o=="number"?`${o}px`:i("not set");return l(y,{words:w()?.panel,label:i(e),changed:t,detail:o==null?i("the built-in corners"):D(r,i("Styles")),onReset:n})}function tl(){const{cornerRadiusPx:e}=B();return typeof e=="number"?e:W}function nl(){return Fe({sidesKey:"sectionCornerSides",useFollowed:tl,mark:l(el,{label:ie}),hint:ol})}const ol="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function qs(){return J({_gShape:O("Shape"),sectionCorners:nl(),sectionCornerSides:Lt(),...X("sectionBorder",Nt)})}const rl=()=>({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 ll(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function il(){let e;try{const t=St(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||er.line}function sl({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?zn(c,a):!1),m=rl(),p=d=>ll(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(jn,{each:u,label:i("Each side"),onChange:f}):void 0,children:l(Xn,{label:i("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:m,styles:s,max:Qo})})}function al({value:e,onChange:t,view:n}){const[o]=A("sectionBorder"),[r]=A(U("sectionBorder")),s=il(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...xt(a(o)),...xt(a(r))}:n==="tablet"?a(o):{};return l(sl,{value:e,onChange:t,placeholder:{sides:Vn(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function Js(e){return R(e,Nt(e==="mobile"?"phone":e))}function Nt(e){return{type:"custom",render:({value:t,onChange:n})=>l(al,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>le(e,t(o),Ee)[r];return{[e]:n("desktop",e),[U(e)]:n("tablet",U(e)),[F(e)]:n("phone",F(e))}}function Zs(e){return{type:"custom",render:()=>l(cl,{partKey:e})}}function cl({partKey:e}){const[t]=A("id"),[n]=A("_partStyles"),{textStyles:o}=B(),r=Go();let s=null;try{s=vo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return l(Wn,{name:i("Text"),preview:Bo(a,c,{noStyle:i("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Ho.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?Mn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Hn(r)?r:n}function ul({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Pt(W);return l(y,{words:w()?.panel,label:i(e),changed:t,detail:D(`${o}px`,i("the section")),onReset:n})}function dl(){return l(k,{children:i("Follows the section's Corners until you set a number here.")})}function pl(){return Fe({sidesKey:"cardCornerSides",useFollowed:()=>Pt(W),mark:l(ul,{label:ie}),hint:l(dl,{})})}function fl(){return{type:"custom",render:()=>l(qt,{})}}function Qs(e){return{...e,render:t=>l(Jt,{render:e.render,props:t})}}function ea(){return{_gShape:O("Shape"),cardCorners:pl(),cardCornerSides:Lt(),cardCornersApplyAll:fl()}}function hl(){return T({type:"custom",render:e=>l(gl,{...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 ml(e,t){const n=bt(e);if(n!=="custom")return i(gt.find(r=>r.value===n)?.label??"");const o=rt(ye(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):i("Custom")}function gl(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<=ot,m=()=>[...po[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:ot}),C=a&&(s||t!=="content"),S=ho().widths.hint(r,uo);return l(x,{label:i(K),icon:l(fe,{}),changed:C,hint:u!=="custom"?void 0:f?S:h,action:l(y,{words:w()?.panel,label:i(K),changed:C,disabled:e.readOnly===!0,detail:s?v(b=>i(b),ml(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(nt,{label:i(K),value:u,options:gt.map(b=>({value:b.value,label:b.value==="custom"&&!f?h:i(b.label),icon:Ar(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:vt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&f?l("div",{onFocus:()=>{p.current={value:t,shares:rt(ye(c,r),r)}},onBlur:()=>{p.current=null},children:l(fo,{label:i(K),count:r,value:ye(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 ta(){return Z(zo,l(Rn,{}),ft,ft[0].value)}function na(){return R("mobile",Fr(K,l(fe,{}),Zo.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))})})),Jo,{columns:2,cell:vt}))}const vt={width:"5.75rem",height:"3.25rem"};function oa(){return le("share",hl(),Ee)[U("share")]}function bl(){return R("mobile",$(ht,l(je,{}),we,qo,1,we,"",{clear:{phoneFollows:!1,hint:we}}))}const Dt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function ra(){const e=$(ht,l(je,{}),mt,Yo,1,mt,"",{clear:{emptyLabel:"Auto"}}),t=le("columns",e,{...Dt,tablet:Ee.tablet}),n=le("columns",e,Dt,{phoneRow:bl()});return{...t,phoneRow:n.phoneRow}}function la(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>l(x,{label:i(e),icon:l(Qe,{noun:s}),action:l(y,{words:w()?.panel,label:i(e),changed:!yr(a),detail:i("the Text style in Styles"),onReset:()=>c(wr),defaultAction:{onPress:()=>c(Sr),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 ia(){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(xl),t=ue(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const xl=Kt(null);function Sl({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const u=L()[a],f=be(void 0,u,c);return l(k,{children:ee({min:e,max:t,step:n,value:be(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function wl({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=L()[t],c=be(void 0,a,n);return l(y,{words:w()?.panel,label:i(e),changed:r,detail:v(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(wl,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>l(Sl,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Cl={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_l={Top:Ze,Bottom:Ye,Left:qe,Right:Je},Rl=e=>{const t=_l[e];return l(t,{})};function sa(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(Ze,{}),I.min,I.max,I.step,S,"px"),a=(S,b,_,j=I)=>R("mobile",yl({label:r(S),icon:Rl(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,C=S=>h?R("desktop",S):S;return J({...o?{_gSpacing:O("Padding")}:{},[t]:C(s(c)),...h?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:C($(r("Bottom"),l(Ye,{}),I.min,I.max,I.step,u,"px")),...h?{[F(n)]:a("Bottom",n,u)}:{}},...e.sides?{[f]:C($(r("Left"),l(qe,{}),p.min,p.max,p.step,d,"px")),...h?{[F(f)]:a("Left",f,g,p)}:{},[m]:C($(r("Right"),l(Je,{}),p.min,p.max,p.step,d,"px")),...h?{[F(m)]:a("Right",m,g,p)}:{}}:{}})}function aa(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 ca(e,t=Cr,n=!0){const o=t.map(r=>({label:_r[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(Wr,{inherited:s?.inherited??!1,onReset:()=>r(Rr),label:se}):void 0,children:Te({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:se})})}})}function ua(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>l(Ol,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>l(Il,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Nr("Unit",l(Ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>l(Tl,{props:a,draw:s,view:o})}};return J({_gHeight:O(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>l(kl,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function Ol({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:Te({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"&&xe(t)?Uo(t):Wo(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?xe(t):Mo(t))?null:Ht(e,t)}const P=(e,t)=>e==="tablet"?U(t):F(t);function El(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=M(),r=ae(e,L());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=El(e,c,t,a);return u===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(u).length?u:null})}}function Il({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==="%"?jo:Xo;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 Tl({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 kl({view:e,onClear:t}){const n=L(),o=ae(e,n)===null,r=e==="phone"&&xe(n),s=Ht(e,n),a=v(c=>i(c),s.mode==="auto"?i("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return l(y,{words:w()?.panel,label:i(Y),changed:o,detail:a,onReset:t})}function da(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>l(Ll,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>l(Fl,{value:o,onChange:r,view:n})});return{_gStick:O(Se),...X("stickTop",e),...X("stickTopDistance",t)}}function Fl({value:e,onChange:t,view:n}){const o=M(),r=L(),s=n==="desktop"||Ae(n,r)?null:Mt(n,dt(r)),a=s&&o?c=>o.onChangeMany(u=>{const f=Al(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 Ae(e,t){return e==="tablet"?$o(t):Ko(t)}function Mt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Al(e,t,n){return e==="desktop"||Ae(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Ll({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(Se),labelId:n,icon:q(l(Fn,{})),action:N(k,{children:[o!=="desktop"?l(y,{words:w()?.panel,label:i(Se),changed:Ae(o,r),detail:v(m=>i(m),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,l(me,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Wt="e.g. about";function pa(){return{_gAnchor:O("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Wt},{type:"custom",render:({value:e,onChange:t})=>l(dn,{value:e,onChange:t,nameBox:(n,o)=>l(H,{value:n,onChange:o,label:"Name",placeholder:Wt,hideable:!1,markup:!1})})})}}function fa(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(ao,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function ha(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(so,{id:c,value:Vt(typeof o=="string"?o:null),onChange:u=>r(u?jt(u):"")})})}}}function Nl(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`,C=m.readOnly===!0,S=l(me,{checked:g,onChange:a,disabled:C,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(y,{words:w()?.panel,label:i(e),changed:p,detail:v(b=>i(b),i(d?"On":"Off"),m.followsView),disabled:C,onReset:()=>a(void 0)}),S]}):S})}}}function ma(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return l(st,{label:i("Background"),icon:l(kn,{}),id:r,value:Bn(e),onChange:t})}}}function ga(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(ro,{id:a,checked:s,onChange:o})})}}}function ba(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>l(st,{label:i(e),icon:n,value:o||t,onChange:r})}}function xa(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return l(Pl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Pl({value:e,onChange:t,twin:n}){const{hex:o,n:r}=vl(),s=D(o.toUpperCase(),i("Theme {n} background",{n:r}));if(n){const a=vn(n.follows);return l(ge,{label:i("Fill"),icon:l(he,{}),value:e,inherited:a??o,resetTo:v(c=>i(c),a?a.toUpperCase():s,n.view),onChange:t,onReset:()=>t(void 0)})}return l(ge,{label:i("Fill"),icon:l(he,{}),value:e,inherited:o,resetTo:s,onChange:t,onReset:()=>t("")})}function Bl(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return re(n);const r=Gn(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 vl(){const{colors:e,n:t}=Ut();return{hex:e.background,n:t}}function Ut(){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?Bl(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:tr(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 Hl({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(oo,{label:i(e),value:t,points:r,onChange:n})}function Sa(){return At()}const wa={top:l(Cn,{}),right:l(yn,{}),bottom:l(Sn,{}),left:l(wn,{})};function ya(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:Hl({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})=>l(Ao,{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 _a(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>l(No,{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 Ra(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return l(e,{...r})}}}const Oa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ea(e,t,n){const o=Object.keys(De).map(r=>({label:De[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(Gl,{label:e,icon:t,options:o,onChange:r})}}function Gl({label:e,icon:t,options:n,onChange:o}){const r=M()?.values??{},s=zt(r),a=s==="frame"&&!!ve(r.mediaVideo)&&!ve(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:Te({options:n,value:s,onChange:o,ariaLabel:e})})}function Ia(e,t,n,o={}){const r={type:"custom",[We]:!0,render:({value:s,onChange:a,name:c})=>l(Fo,{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 Ta={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ml(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 ka({value:e,onChange:t,label:n}){const o=e||{},r=M(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,u=a?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!Ir(Er()).geocode,m=Be(),p=(d,g)=>t({...o,[d]:g??void 0});return N(k,{children:[l(x,{label:i(n),icon:l(ze,{}),action:f?l(ne,{content:i("Find from the address (OpenStreetMap)"),children:l(lt,{"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:Ml(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(go):i(o.status)})}):null}),l(x,{label:i("Enter by hand"),labelId:m,icon:l(_n,{}),action:l(me,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&l(x,{label:i("Latitude, longitude"),icon:l(ze,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[l(it,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>p("lat",d),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),l(it,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>p("lng",d),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function Wl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ul(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 Fa(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 Aa={label:"Ticker items",icon:l(Tn,{})};function La(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($l,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function $l({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(Yn,{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:Wl(n,c),onChange:p=>r(Ul(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 Na(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>l(H,{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 Pa(e){return{_gCards:O("Cards"),coverIndex:Z("Cover image",l(In,{}),Io,String(To),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Jr("Image background",ar),cardImage:Vl()}}function Ba(){return{outline:Z("Card outline",l(Ln,{}),Ro,Eo),indexBadge:Z("Card number",l(Ve,{}),_o,Oo),showBadge:Nl("Product badge",!0,l(Qe,{noun:"tag"}))}}function va(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(bo(Le),n(r));return{_gShowOnCard:O("Show on a card"),[Le]:T({type:"custom",render:()=>l(Xl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Le)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Le="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 Xl({rest:e}){const t=L(),n=Zr(),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(Ne,{parts:ce,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ce.map(({id:a})=>[a,void 0])))})}function Da(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>l(Ne,{parts:e,changed:Jn(o),shown:s=>Zn(o,s),onPress:(s,a)=>r(to(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>l(jl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ne({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(y,{words:w()?.panel,label:c,changed:t,detail:s,onReset:r}),children:l(qn,{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 jl({parts:e,desktopKey:t,value:n,onChange:o}){const r=L()[t];return l(Ne,{parts:e,changed:eo(n),shown:s=>Qn(r,n,s),onPress:(s,a)=>o(no(n,s,a)),onReset:()=>o(yo),detail:i("the same as Desktop")})}function Vl(){return Ft("Card image",{min:W,max:$e,step:Zt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ha(){return Fe({sidesKey:"cornerSides",step:Qt,useFollowed:()=>W,mark:l(zl,{label:en}),hint:i("Rounds the picture. Left alone it stays square.")})}function zl({label:e,changed:t=!1,onReset:n=()=>{}}){return l(y,{words:w()?.panel,label:i(e),changed:t,onReset:n})}function Ga(){return{type:"custom",render:({value:e,onChange:t})=>l(Zl,{value:typeof e=="string"?e:"",onChange:t})}}function Yl({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 ql={width:"3.5rem",height:"2.5rem"},Jl=200;function Zl({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>=Jl?4:3);g();const h=new ResizeObserver(g);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in te?e:"",u=Xe(n,c),f=Xe(n,"").length,m=ln("no-symbol"),p=[{value:"",label:i("Not chosen"),icon:Lr(m,i("Not chosen"))},...u.map(d=>({value:d,label:i(te[d].label),icon:l(Yl,{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(nt,{label:i("Layout"),value:c,options:p,onChange:t,columns:r,cell:ql,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($n,{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,As as BOUND_TO_POST_NOTE,Gs as BUCKET_ICONS,Ta as CUSTOM_FIELD_MEDIA,ka as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Ne as DisplayRow,wa as EDGE_ARROWS,co as FOCAL_DEFAULT,Dl as FOCAL_POINTS,de as FOLD_FIELD_MARKER,Hl as FocalPicker,Vs as GroupLabel,$r as HIGHLIGHT_HINT,H as HidableTextField,Me as LINK_FIELD_MARKER,ws as Label,We as MEDIA_FIELD_MARKER,Oa as MEDIA_TYPE_OPTIONS,Ls as NOT_BOUND_TO_POST,js as PanelBand,Vr as PanelNoteLine,xl as RowPropsContext,Ue as SCAFFOLD_FIELD_MARKER,Ka as SCALAR_TEXT_CONTROLS,Br as SiteGapDefaultReset,ee as Slider,Yr as Swatches,Ua as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,Aa as TICKER_ITEMS_ROW,$l as TextListField,se as WIDTH_LABEL,Wr as WidthDefaultReset,Kl as aimAfterListChange,pa as anchorFields,D as backTo,zs as backgroundField,ta as boxBlockSpacingField,ra as boxColumnsFields,xa as boxFillField,bl as boxPhoneRowField,hl as boxShareField,na as boxSharePhoneField,oa as boxShareTabletField,Bl as boxThemeIndexOf,Us as bucketHeader,Zs as buttonWordsEntryField,pl as cardCornersField,Jr as cardImageBackgroundField,Vl as cardImageField,Pa as cardMediaFields,ea as cardShapeFields,va as cardShowFields,Ba as cardStyleFields,ia as cellWidthFields,ga as checkbox,ba as colorInput,Cs as containerDirectionField,vr as containerGapField,Dr as containerGapPhoneField,ys as containerGapRows,Hr as containerGapTabletField,Ml as coordsResultTip,vs as copyText,Lt as cornerSidesField,Fe as cornersRowField,ha as date,fa as dateTime,Ks as designGroupHeader,Da as displayFields,ya as edgePad,Fa as focusAfterRemove,Sa as focusKeptField,$s as foldMarker,pe as foldMetaOf,zr as foldTitleOf,El as followedHeightPatch,Al as followedStickPatch,Ga as galleryLayoutField,ua as heightFields,ae as heightFollowedBy,_s as heroGroupPlacementPoints,Ge as hidableText,jr as hintIsWhileTyping,Ha as imageCornersField,Fs as inOwnBox,Ws as isBucketHeader,At as keptBy,Ds as linkField,Ea as loadingShowsField,Ca as multiSelect,ma as pageBackgroundField,Ms as panelNote,yl as phoneOverrideField,Bs as plainText,Hs as plainTextarea,Ft as pxField,Xs as quietMarker,He as readHidable,Wl as rowText,_a as searchSelect,Js as sectionBorderField,nl as sectionCornersField,qs as sectionShapeFields,Ys as sectionThemeFields,Ul as setRowText,la as sizeField,Ra as sourceField,sa as spacingFields,da as stickFields,aa as swapPadding,Qs as templateField,Ns as text,Yt as textFieldIdentifier,Es as textFieldOffPage,Ts as textFieldPanelOnly,La as textList,Na as textListRowField,Ps as textarea,Nl as toggle,Ia as upload,Zr as useSelectedPatch,L as useSelectedProps,A as useSelectedSibling,Pr as useSiteGapDetail,ca as widthField,ks as withIdentifier,Os as withOffPage,Is as withPanelOnly,Rs as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
+
import { type ViewVarNames } from "./view-var-split.js";
|
|
2
3
|
export declare const CARD_SHADOW_CLASS = "sf-card";
|
|
3
4
|
export declare const BOX_DARKEN: {
|
|
4
5
|
readonly min: 0;
|
|
@@ -28,4 +29,22 @@ export declare const BOX_CARD_SIDE: {
|
|
|
28
29
|
};
|
|
29
30
|
export declare function isBackgroundBox(src?: string | null): boolean;
|
|
30
31
|
export declare function boxDarkenStyle(darken: unknown, style?: unknown): CSSProperties | null;
|
|
32
|
+
export declare const boxFillOf: (value: unknown) => string | null;
|
|
33
|
+
export declare const BOX_FILL_VIEWS: ViewVarNames;
|
|
34
|
+
export declare function boxFillViews(fill: unknown, fillTablet: unknown, fillPhone: unknown): {
|
|
35
|
+
className: string;
|
|
36
|
+
style: CSSProperties;
|
|
37
|
+
};
|
|
38
|
+
export declare const BOX_WASH_VIEWS: ViewVarNames;
|
|
39
|
+
export declare function boxWashViews(views: {
|
|
40
|
+
darken: unknown;
|
|
41
|
+
darkenStyle: unknown;
|
|
42
|
+
darkenTablet: unknown;
|
|
43
|
+
darkenStyleTablet: unknown;
|
|
44
|
+
darkenPhone: unknown;
|
|
45
|
+
darkenStylePhone: unknown;
|
|
46
|
+
}): {
|
|
47
|
+
className: string;
|
|
48
|
+
style: CSSProperties;
|
|
49
|
+
};
|
|
31
50
|
export declare function boxPlacementClasses(anchor: string, direction: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{scrim as
|
|
1
|
+
import{parseHexColor as h}from"efficient-shell/format";import{scrim as p}from"./scrim.js";import{viewVarSplit as b}from"./view-var-split.js";const C="sf-card",S={min:0,max:100,step:5,fallback:0,unit:"%"},_=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],g="68%",E={desktop:20,phone:20,side:40,sidePhone:24},B="sf-box-sides",F={min:0,max:200,step:10};function N(t){return typeof t=="string"&&t.trim()!==""}function x(t,o){const e=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(e)||e<=0)return null;const r=(Math.min(S.max,Math.max(S.min,e))/100).toFixed(2);return o!=="bottom"?{background:p(Number(r))}:{background:`linear-gradient(0deg, ${p(Number(r))} 0%, ${p(0)} ${g})`}}const d=t=>typeof t=="string"?h(t.trim()):null,k={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function T(t,o,e){return b(k,d(t),d(o),d(e))}const y={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function V(t){const o=x(t.darken,t.darkenStyle);if(!o)return{className:"",style:{}};const e=(n,f)=>String(x(n,f)?.background??"none"),s=n=>(typeof n=="number"||typeof n=="string"&&n.trim()!=="")&&Number.isFinite(Number(n))?n:void 0,r=n=>_.some(f=>f.value===n)?n:void 0,[a,l,i,c]=[s(t.darkenTablet),r(t.darkenStyleTablet),s(t.darkenPhone),r(t.darkenStylePhone)],u=a??t.darken,m=l??t.darkenStyle;return b(y,String(o.background),a!==void 0||l!==void 0?e(u,m):null,i!==void 0||c!==void 0?e(i??u,c??m):null)}function P(t,o){const e={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[s,r]=e[t]??e.center,[a,l]=o==="column"?[r,s]:[s,r],i={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${i[a]} ${c[l]}`}export{E as BOX_CARD_PAD,F as BOX_CARD_SIDE,S as BOX_DARKEN,_ as BOX_DARKEN_STYLES,k as BOX_FILL_VIEWS,B as BOX_OWNS_SIDES_CLASS,y as BOX_WASH_VIEWS,C as CARD_SHADOW_CLASS,x as boxDarkenStyle,d as boxFillOf,T as boxFillViews,P as boxPlacementClasses,V as boxWashViews,N as isBackgroundBox};
|