efficient-web-builder 67.0.0 → 67.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 +12 -0
- package/dist/editor/components/storefront-editor.css +47 -0
- package/dist/editor/lib/document/block-offer.d.ts +2 -0
- package/dist/editor/lib/document/block-offer.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +4 -12
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +11 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/document/blocks/general/Split/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Split/meta.js +2 -2
- package/dist/format/lib/document/easel-row-words.d.ts +2 -0
- package/dist/format/lib/document/easel-row-words.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +3 -1
- package/dist/format/lib/document/section-catalog.d.ts +5 -0
- package/dist/format/lib/document/section-catalog.js +10 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +3 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/fit-words.js +4 -2
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +6 -0
- package/dist/render/components/ViewHideRoot.js +1 -1
- package/dist/render/lib/content/block-size.d.ts +1 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-height.d.ts +5 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 67.1.0 - 2026-11-11
|
|
4
|
+
|
|
5
|
+
From main at `df10d50a`: #697, #700. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0` (#697 raises only the easel devDependency, to `^34.2.0`). One stored key is added (`imageOverlay` on Split) and one stored value (`textFit: "ellipsis"`); no stored key or value moves.
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- Nothing to change. A Split saved before this release has no `imageOverlay` and draws the 40% wash it always drew. With easel 34.1.0 the text fit row shows three answers and a stored "ellipsis" draws as nothing stored; with 34.2.0 it shows Shorten (#697).
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Text fit: Shorten** (#697): the text fit row (`When the text does not fit`) offers its fourth answer, Shorten (stored `ellipsis`): the words stay on one line and the cut words end with "...", each view capped by its own Content width. A Shorten heading is never shrunk.
|
|
13
|
+
- **Image & Text Split: an Image overlay row** (#700): the black wash over the image column's picture was a fixed 40% with no row to change it, so an illustration or a screenshot read as greyed out (coloquo.com). The row sits in the Image column's Style group beside Black and white (a Design group, so Copy style copies it), 0 to 100%, 40 unless changed; 0 draws no wash. New export `splitImageOverlay` (`lib/document/blocks/general/Split/meta`). The Box conversion carries it as the Picture Box's Darken (none at 0).
|
|
14
|
+
|
|
3
15
|
## 67.0.0 - 2026-11-10
|
|
4
16
|
|
|
5
17
|
From main at `25036624`: #689, #691, #675, #692, #690. A MAJOR: #690 has `!` (narrowed peers). Peers move: `efficient-easel` `^33.0.0` -> `^34.1.0`, `efficient-shell` `^12.30.0` -> `^12.33.0` (#690). No export is removed. No stored key changes; no stored page needs a data move.
|
|
@@ -797,6 +797,53 @@
|
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
|
|
800
|
+
/* ── A block on Height Fill ───────────────────────────────────────────────
|
|
801
|
+
On the page, the block's outermost element is its Box's flex item and grows
|
|
802
|
+
(lib/content/section-min-height `sectionHeightFillClass`: the grow in a
|
|
803
|
+
column, the stretch in a row). On the canvas the engine's own item
|
|
804
|
+
(`[data-easel-block]`, with the part host between them, display: contents)
|
|
805
|
+
is the flex item, so it grows instead, in the views the root names
|
|
806
|
+
(`data-sf-height-fill="desktop tablet mobile"`, at the one edge, 800, and
|
|
807
|
+
1100, as a Box's other views), and it is a one-column grid so the block in
|
|
808
|
+
it stretches to that height. A block with no Fill wears no attribute and
|
|
809
|
+
matches nothing. */
|
|
810
|
+
@media (width >= 1100px) { /* height fill */
|
|
811
|
+
[data-easel-block]:is(.flex-col > *):has(> [data-sf-height-fill~="desktop"]),
|
|
812
|
+
[data-easel-block]:is(.flex-col > *):has(> [data-sf-part-host] > [data-sf-height-fill~="desktop"]) {
|
|
813
|
+
flex-grow: 1;
|
|
814
|
+
display: grid;
|
|
815
|
+
grid-template-columns: 100%;
|
|
816
|
+
}
|
|
817
|
+
[data-easel-block]:is(.flex-row > *):has(> [data-sf-height-fill~="desktop"]),
|
|
818
|
+
[data-easel-block]:is(.flex-row > *):has(> [data-sf-part-host] > [data-sf-height-fill~="desktop"]) {
|
|
819
|
+
align-self: stretch;
|
|
820
|
+
display: grid;
|
|
821
|
+
grid-template-columns: 100%;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
@media (800px <= width < 1100px) { /* height fill */
|
|
825
|
+
[data-easel-block]:is(.flex-col > *):has(> [data-sf-height-fill~="tablet"]),
|
|
826
|
+
[data-easel-block]:is(.flex-col > *):has(> [data-sf-part-host] > [data-sf-height-fill~="tablet"]) {
|
|
827
|
+
flex-grow: 1;
|
|
828
|
+
display: grid;
|
|
829
|
+
grid-template-columns: 100%;
|
|
830
|
+
}
|
|
831
|
+
[data-easel-block]:is(.flex-row > *):has(> [data-sf-height-fill~="tablet"]),
|
|
832
|
+
[data-easel-block]:is(.flex-row > *):has(> [data-sf-part-host] > [data-sf-height-fill~="tablet"]) {
|
|
833
|
+
align-self: stretch;
|
|
834
|
+
display: grid;
|
|
835
|
+
grid-template-columns: 100%;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
@media (width < 800px) { /* height fill */
|
|
839
|
+
[data-easel-block]:is(.flex-col > *):has(> [data-sf-height-fill~="mobile"]),
|
|
840
|
+
[data-easel-block]:is(.flex-col > *):has(> [data-sf-part-host] > [data-sf-height-fill~="mobile"]) {
|
|
841
|
+
flex-grow: 1;
|
|
842
|
+
display: grid;
|
|
843
|
+
grid-template-columns: 100%;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
800
847
|
/* @tokens canvas-end */
|
|
801
848
|
|
|
802
849
|
/* ── Canvas "Add section" seams (overlay between preview sections) ──────────
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type EditorBlocks, type OfferedSets } from "../editor-blocks.js";
|
|
2
2
|
import { type EaselSession as EditorSession } from "efficient-easel/screen/lib/session";
|
|
3
|
+
import { type BlockSet, type PressNeedsSet } from "../../../format/lib/document/section-catalog.js";
|
|
3
4
|
export interface BlockOffer {
|
|
4
5
|
readonly sets: OfferedSets;
|
|
5
6
|
offers(type: string): boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare function blocksLaidDownBy(type: string): readonly string[];
|
|
9
|
+
export declare function blocksOutsideItsSet(type: string, laid?: readonly string[], setOf?: (type: string) => BlockSet | undefined, needs?: Readonly<Record<string, PressNeedsSet>>): readonly string[];
|
|
8
10
|
export declare function resolveBlockOffer(blocks: EditorBlocks | null | undefined): BlockOffer | null;
|
|
9
11
|
export declare function blockOfferOf(session?: EditorSession): BlockOffer | null;
|
|
10
12
|
export declare function blockIsOffered(type: string, session?: EditorSession): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{offeredSets as
|
|
1
|
+
import{offeredSets as h}from"../editor-blocks.js";import{currentEaselSession as u}from"efficient-easel/screen/lib/session";import{blocksOf as E}from"../website-session.js";import{layoutPresetFor as T}from"../sections/text-layouts.js";import{blockTypesIn as d}from"efficient-easel/screen/lib/document/block-types-in";import{blockSetOf as w,PRESS_NEEDS_SET as _}from"../../../format/lib/document/section-catalog.js";import{SLOT_SECTION_SPECS as S}from"../../../render/lib/document/slot-specs.js";const m=()=>({}),O=new Map;function p(e){const n=O.get(e);if(n)return n;const t=new Set,f=Object.prototype.hasOwnProperty.call(S,e)?S[e]:void 0;if(f)for(const r of f.seeds(m))for(const s of d({type:f.childType,props:r}))t.add(s);const c=T(e);if(c){let r=0;for(const s of d(c(m,o=>`${o}-${r+=1}`)))t.add(s)}t.delete(e);const i=[...t].sort();return O.set(e,i),i}function N(e,n=p(e),t=w,f=_){const c=new Set(["general"]),i=t(e);return i&&c.add(i),Object.prototype.hasOwnProperty.call(f,e)&&c.add(f[e].set),n.filter(r=>{const s=t(r);return!s||!c.has(s)})}function x(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;const n=h(e),t=e.allow?new Set(e.allow):null,f=new Set(e.deny??[]),c=new Set(Object.keys(e.host??{})),i=o=>{if(f.has(o))return!1;if(c.has(o))return!0;const l=w(o);return!l||!n[l]?!1:t?t.has(o):!0},r=new Map,s=o=>{const l=r.get(o);if(l!==void 0)return l;r.set(o,!1);const a=i(o)&&p(o).every(s);return r.set(o,a),a};return{sets:n,offers:s}}const P="block-offer";function b(e=u()){return e.cache(P,()=>x(E(e)))}function v(e,n=u()){const t=b(n);return t?t.offers(e):!0}export{v as blockIsOffered,b as blockOfferOf,p as blocksLaidDownBy,N as blocksOutsideItsSet,x as resolveBlockOffer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{phoneKey as r,tabletKey as i}from"efficient-easel/draw";import{BOX_CARD_PAD as E,BOX_SWATCH_PROP as bo,boxCardProps as Po,boxIsCard as x}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as ko,BOX_IS_NOT_CARD_RULE as Fo,BOX_ROW_IMAGE_PROP as Ho}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Wo,cardRowField as y,cardRowFields as Bo,cardRowLinkField as xo,typedLinkField as yo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Mo,cardCopyPlace as Uo}from"../../../../../../format/lib/content/card-template.js";import{HOVER_KEY as M}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as Ko}from"../../../../animation/hover-fields.js";import{darkenFields as Xo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as Go,REEL_SHAPE_LABELS as Yo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as U,CARD_LIST_STYLE_PICTURES as vo,TAB_SHAPE_PICTURES as jo}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as C,CARD_STYLE_POINTS as Vo,applyCardStyle as Jo,isCardStyle as zo}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as qo,ClockIcon as Qo,CropIcon as K,GapIcon as Zo,MediaLayoutStackedIcon as X,LineBetweenIcon as $o,LineSolidIcon as oe,ListIcon as ee,NumberedListIcon as G,ShadowIcon as ne,StylesIcon as Y,TableIcon as v,TargetIcon as te,WrapIcon as j}from"efficient-easel/icons";import{boxBlockSpacingField as re,boxFillField as ie,boxColumnsFields as le,boxShareField as ae,boxSharePhoneField as se,boxShareTabletField as de,containerDirectionField as ce,containerGapRows as _e,linkField as pe,plainText as Se,swapPadding as V,toggle as c,upload as J,withPanelOnly as Oe}from"../../../controls.js";import{BOX_STACK_LINE as L,BOX_STACK_RANGE as f,STACK_BELOW_PROP as T}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as z,boxShapeOf as me}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as fe}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as q}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as Q}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as Re,ACCORDION_PHONE_COLUMN_COUNTS as he,BOX_COLUMNS_MAX as D,BOX_COLUMNS_MIN as I,boxPhoneRowOneLine as ue,boxWrapWordOf as Z}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as $}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as oo,VIEW_KEY_ACCESS as s,group as R,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Ae,boxAlignField as Ce,boxJustifyField as we,boxWrapField as N,iconPickerRow as g,placementField as Ee,select as b,sidesPaddingFields as eo,slider as no}from"../../../box-fields.js";import{withRowRules as Te,withShowWhen as to}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Ne}from"../../../separator-field.js";import{LOOP_SCROLLS as Le}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as De,TICKER_JOIN_OPTIONS as Ie}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as ro}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as io}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as ge}from"../../../box-side-space-field.js";import{accordionOnSet as be}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as Pe,ACCORDION_ROW_STYLE_PROP as P}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as lo}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as ke,CONTAINER_BLOCKS_SLOT as Fe}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as He}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as We,ON_A_CARD as ao,cardDisplayField as k}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Be,MIRROR_CARDS_MIRRORS as xe,mirrorCardsField as ye}from"../../../mirror-cards-field.js";import{handedRowOf as so}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Me,showForField as Ue,showForFields as Ke}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as h,SHARED_COLUMNS_LABEL as co,SHARED_COLUMNS_OFF as _o,sharedColumnsDrawn as po,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as Xe,SHARED_COLUMNS_POINTS as Ge,sharedRowsDrawn as Ye}from"../../../../../../render/lib/content/box-shared-columns.js";const Oo=ko,mo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},ve={field:"direction",is:"tabs"},je={field:"line",in:[!0,!1]},Ve={field:"anchor",set:!0},F=["fixed","screen"],Je={not:{any:[{field:"sectionHeightMode",in:F},{field:"sectionHeightModeTablet",in:F},{field:"sectionHeightModePhone",in:F}]}},ze={context:"parent.line",is:!0},_={not:{field:"direction",is:"accordion"}},fo={field:"direction",is:"accordion"},Ro={any:[_,{not:{field:P,is:"numbered"}},{field:"columns",in:[...Re]},{field:"phoneRow",in:[...he]}]},ho="notAccordionRow",qe={not:{context:ho,is:!0}},Qe={[ho]:(o,e)=>e.parent?.props?.direction!=="accordion"},H={field:"direction",is:"row",default:"row"},p={not:Le},S={all:[H,p,{not:{field:"separator",in:$.map(o=>o.value)}},{not:{field:"line",is:!0}}]},Ze={field:"direction",is:"column"},uo={all:[S,...["columns",i("columns")].map(o=>({not:{field:o,in:Array.from({length:D},(e,n)=>n+I)}}))]},$e={all:[p,{not:{all:[H,{field:"separator",in:$.map(o=>o.value)}]}}]},W={not:{all:[S,{field:"columns",in:Array.from({length:D},(o,e)=>e+I)}]}},on="sharedColumnsFits",Ao="sharedColumnsMisfit",Co="sharedColumnsDraws",wo="sharedColumnsPhoneDraws";function O(o,e){return Po(o.props??{},Uo(e.appState,o.props?.id)?.inCopy!==!1)}const en={[on]:(o,e)=>So(O(o,e)),[Ao]:(o,e)=>!So(O(o,e)),[Co]:(o,e)=>po(O(o,e)).desktop,[wo]:(o,e)=>po(O(o,e)).phone};function Eo(o){return{all:[{not:{context:Ao,is:!0}},{any:[ao,{field:o,set:!0}]}]}}const m={not:{context:Co,is:!0}},u={not:{context:wo,is:!0}},To="sharedRowsDraws",nn={[To]:(o,e)=>Ye(O(o,e))&&so(e.appState,o.props?.id)?.row===void 0},w={not:{context:To,is:!0}},tn={any:[m,u]},B=Fo,rn={not:{context:xe,is:!0}},No="rowHanded",ln={not:{context:No,is:!0}},an={[No]:(o,e)=>{const n=so(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Lo={all:[_,B,m,u,rn]},sn={field:"direction",is:"row"},dn={field:"align",in:["start","center","end"]},cn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function _n(){const{darken:o,darkenStyle:e}=Xo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Do={not:{all:[S,{field:i("columns"),in:Array.from({length:D},(o,e)=>e+I)}]}};function pn(){const o=c(oo,!1,t(j,{})),e=n=>{const l=Z(n);return l===void 0?void 0:l==="wrap"};return{...N(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:l=>n.onChange(l===void 0?void 0:l?"wrap":"nowrap")})}}function Sn(){const o=c(oo,!0,t(j,{})),e=n=>{const l=Z(n);return l===void 0?void 0:l==="wrap"};return{...N(),render:n=>{const l=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!ue(void 0,l?n.follows:void 0),followsNoView:!l,onChange:A=>n.onChange(A===void 0?void 0:A?"wrap":"nowrap")})}}}const Io={hint:L},go={all:[B,{any:[Ze,{all:[S,Do,{not:{all:[uo,{field:i("share"),set:!0}]}}]}]}]},On=to(a("desktop",no("Narrows below",t(X,{}),f.min,f.max,f.step,L,{kind:"breakpoint"},{clear:Io,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),go);function mn(o,e){const n=o;return!(T in n)||e.direction!=="column"?o:{...n,[T]:On}}const lt={fields:Te({_gContent:R("Content"),rowTitle:lo.rowTitle,content:lo.content,_gCardDisplay:R("Display"),cardDisplay:k("desktop"),cardDisplayTablet:k("tablet"),cardDisplayPhone:k("mobile"),showFor:Ue(),_gLayout:R("Layout"),direction:ce("Flex"),tabShape:g("Tab shape",t(Y,{}),Go.map(o=>({label:Yo[o],value:o,picture:jo[o]})),"tabs",{columns:2,cell:U}),mirrorCards:ye(),[T]:a("desktop",no("Stacks below",t(X,{}),f.min,f.max,f.step,L,{kind:"breakpoint"},{clear:Io,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[io]:ge(),startsOpen:a("desktop",c("Starts open",!1,t(qo,{}))),[P]:a("desktop",g("Row style",t(G,{}),Pe.map(o=>({...o,picture:o.value==="numbered"?t(G,{}):t(ee,{})})),"plain",{columns:2})),label:Oe(Se("Tab name")),..._e("Flex"),...d("justify",we(),s),...d("align",Ce(),s),...(()=>{const o=d("wrap",N(),s,{phoneRow:Sn()}),e=d("wrap",N(),s,{phoneRow:pn()});return{wrap:e.wrap,[i("wrap")]:e[i("wrap")],[r("wrap")]:o[r("wrap")]}})(),[r("order")]:He(),...d("boxShape",Q("Box shape",t(K,{}),q(z),"shape","auto"),s,{phoneRow:Q("Box shape",t(K,{}),q(z),"shape","auto",{phoneRest:o=>me(o)})}),[fe]:a("desktop",Ae(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:Ne(t($o,{size:18}),"none"),[C]:a("desktop",g("Card style",t(Y,{}),Vo.map(o=>({...o,picture:vo[o.value]})),"table",{columns:2,cell:U})),share:a("desktop",ae()),[i("share")]:de(),[r("share")]:se(),[h]:a("desktop",b(co,t(v,{}),[...Ge],_o)),[r(h)]:a("mobile",b(co,t(v,{}),[...Xe],_o)),...le(),...d("blockSpacing",re(),s),line:c("Line",!1,t(oe,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,t(Qo,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:b("Join",t(Zo,{}),Ie,De),_gShadow:R("Shadow"),...d("shadow",c("Shadow",!1,t(ne,{})),s),...d("fillColor",ie(),s),[bo]:y("Fill content","colour"),_gBackground:R("Background image"),bgImage:a("desktop",J("Image","image/*")),bgImagePhone:a("mobile",J("Image","image/*")),[Ho]:y("Image content","image",{content:!0}),..._n(),placement:Ee("Content position"),_gLink:R("Link"),link:yo(pe("Link to")),[Mo]:xo(),jumpHighlight:c("Highlight when a link jumps here",!1,t(te,{}),"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"],Oo],[[r("share")],{all:[mo,u]}],[[h],Eo(h)],[[r(h)],Eo(r(h))],[[r("wrap")],{all:[mo,p,u,w]}],[[r("order")],{all:[S,u,m]}],[["phoneRow"],u],[[P],fo],[["tabShape"],ve],[["rowTitle","startsOpen"],qe],[["align","blockSpacing",i("blockSpacing"),r("blockSpacing")],_],[[i("justify"),r("justify")],{all:[p,Lo,w]}],[[i("align"),r("align")],{all:[sn,dn,Lo]}],[[i("wrap")],{all:[p,W,Do,m,_,w]}],[[i("shadow"),r("shadow")],B],[[i("darken"),r("darken"),i("darkenStyle"),r("darkenStyle")],{all:[Oo,cn]}],[["separator"],H],[[C],{field:C,set:!0}],[["columns"],{any:[S,fo]}],[[i("columns")],S],[[T],go],[[i("gap")],{all:[$e,Ro]}],[["gap",r("gap")],Ro],[["justify"],{all:[p,tn,_,w]}],[["wrap"],{all:[p,W,m,_,w]}],[["share"],{all:[W,m,_]}],[[i("share")],{all:[uo,m]}],[["line"],je],[["upcoming"],ze],[["jumpHighlight"],Ve],[["boxShape",i("boxShape"),r("boxShape")],Je],[["direction","share",r("order")],ln],[["join"],ro],[[io],ro]]),resolveData:(o,e)=>{const n=o.props,l=n[C];return e.changed?.[C]===!0&&zo(l)?{...o,props:Jo(n,l,ke,Fe)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:be(n)}:o},resolveFields:(o,e)=>mn(Rn(Ke(hn(o,{...e,fields:Bo(e.fields,o,e)}),o.props),O(o,e)),o.props),showWhenFacts:{...Wo,...We,...Be,...an,...en,...nn,...Me,...Qe}},fn=to(Ko,ao);function Rn(o,e){const n=o;return!(M in n)||x(e)?o:{...n,[M]:fn}}function hn(...[o,e]){const{fields:n}=e;{if(x(O(o,e))){const A=eo({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return V(n,A)}return o.props.padV2!==!0?V(n,eo({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{lt as FlexFields};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{phoneKey as r,tabletKey as i}from"efficient-easel/draw";import{BOX_CARD_PAD as E,BOX_SWATCH_PROP as bo,boxCardProps as Po,boxIsCard as x}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as ko,BOX_IS_NOT_CARD_RULE as Fo,BOX_ROW_IMAGE_PROP as Ho}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Wo,cardRowField as y,cardRowFields as Bo,cardRowLinkField as xo,typedLinkField as yo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Mo,cardCopyPlace as Uo}from"../../../../../../format/lib/content/card-template.js";import{HOVER_KEY as M}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as Ko}from"../../../../animation/hover-fields.js";import{darkenFields as Xo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as Go,REEL_SHAPE_LABELS as Yo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as U,CARD_LIST_STYLE_PICTURES as vo,TAB_SHAPE_PICTURES as jo}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as C,CARD_STYLE_POINTS as Vo,applyCardStyle as Jo,isCardStyle as zo}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as qo,ClockIcon as Qo,CropIcon as K,GapIcon as Zo,MediaLayoutStackedIcon as X,LineBetweenIcon as $o,LineSolidIcon as oe,ListIcon as ee,NumberedListIcon as G,ShadowIcon as ne,StylesIcon as Y,TableIcon as v,TargetIcon as te,WrapIcon as j}from"efficient-easel/icons";import{boxBlockSpacingField as re,boxFillField as ie,boxColumnsFields as le,boxShareField as ae,boxSharePhoneField as se,boxShareTabletField as de,containerDirectionField as ce,containerGapRows as _e,linkField as pe,plainText as Se,swapPadding as V,toggle as c,upload as J,withPanelOnly as Oe}from"../../../controls.js";import{BOX_STACK_LINE as L,BOX_STACK_RANGE as f,STACK_BELOW_PROP as T}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as z,boxShapeOf as me}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as fe}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as q}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as Q}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as Re,ACCORDION_PHONE_COLUMN_COUNTS as he,BOX_COLUMNS_MAX as D,BOX_COLUMNS_MIN as I,boxPhoneRowOneLine as ue,boxWrapWordOf as Z}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as $}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as oo,VIEW_KEY_ACCESS as s,group as R,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Ae,boxAlignField as Ce,boxJustifyField as we,boxWrapField as N,iconPickerRow as g,placementField as Ee,select as b,sidesPaddingFields as eo,slider as no}from"../../../box-fields.js";import{withRowRules as Te,withShowWhen as to}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Ne}from"../../../separator-field.js";import{LOOP_SCROLLS as Le}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as De,TICKER_JOIN_OPTIONS as Ie}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as ro}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as io}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as ge}from"../../../box-side-space-field.js";import{accordionOnSet as be}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as Pe,ACCORDION_ROW_STYLE_PROP as P}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as lo}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as ke,CONTAINER_BLOCKS_SLOT as Fe}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as He}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as We,ON_A_CARD as ao,cardDisplayField as k}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Be,MIRROR_CARDS_MIRRORS as xe,mirrorCardsField as ye}from"../../../mirror-cards-field.js";import{handedRowOf as so}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Me,showForField as Ue,showForFields as Ke}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as h,SHARED_COLUMNS_LABEL as co,SHARED_COLUMNS_OFF as _o,sharedColumnsDrawn as po,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as Xe,SHARED_COLUMNS_POINTS as Ge,sharedRowsDrawn as Ye}from"../../../../../../render/lib/content/box-shared-columns.js";const Oo=ko,mo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},ve={field:"direction",is:"tabs"},je={field:"line",in:[!0,!1]},Ve={field:"anchor",set:!0},F=["fixed","screen","fill"],Je={not:{any:[{field:"sectionHeightMode",in:F},{field:"sectionHeightModeTablet",in:F},{field:"sectionHeightModePhone",in:F}]}},ze={context:"parent.line",is:!0},_={not:{field:"direction",is:"accordion"}},fo={field:"direction",is:"accordion"},Ro={any:[_,{not:{field:P,is:"numbered"}},{field:"columns",in:[...Re]},{field:"phoneRow",in:[...he]}]},ho="notAccordionRow",qe={not:{context:ho,is:!0}},Qe={[ho]:(o,e)=>e.parent?.props?.direction!=="accordion"},H={field:"direction",is:"row",default:"row"},p={not:Le},S={all:[H,p,{not:{field:"separator",in:$.map(o=>o.value)}},{not:{field:"line",is:!0}}]},Ze={field:"direction",is:"column"},uo={all:[S,...["columns",i("columns")].map(o=>({not:{field:o,in:Array.from({length:D},(e,n)=>n+I)}}))]},$e={all:[p,{not:{all:[H,{field:"separator",in:$.map(o=>o.value)}]}}]},W={not:{all:[S,{field:"columns",in:Array.from({length:D},(o,e)=>e+I)}]}},on="sharedColumnsFits",Ao="sharedColumnsMisfit",Co="sharedColumnsDraws",wo="sharedColumnsPhoneDraws";function O(o,e){return Po(o.props??{},Uo(e.appState,o.props?.id)?.inCopy!==!1)}const en={[on]:(o,e)=>So(O(o,e)),[Ao]:(o,e)=>!So(O(o,e)),[Co]:(o,e)=>po(O(o,e)).desktop,[wo]:(o,e)=>po(O(o,e)).phone};function Eo(o){return{all:[{not:{context:Ao,is:!0}},{any:[ao,{field:o,set:!0}]}]}}const m={not:{context:Co,is:!0}},u={not:{context:wo,is:!0}},To="sharedRowsDraws",nn={[To]:(o,e)=>Ye(O(o,e))&&so(e.appState,o.props?.id)?.row===void 0},w={not:{context:To,is:!0}},tn={any:[m,u]},B=Fo,rn={not:{context:xe,is:!0}},No="rowHanded",ln={not:{context:No,is:!0}},an={[No]:(o,e)=>{const n=so(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Lo={all:[_,B,m,u,rn]},sn={field:"direction",is:"row"},dn={field:"align",in:["start","center","end"]},cn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function _n(){const{darken:o,darkenStyle:e}=Xo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Do={not:{all:[S,{field:i("columns"),in:Array.from({length:D},(o,e)=>e+I)}]}};function pn(){const o=c(oo,!1,t(j,{})),e=n=>{const l=Z(n);return l===void 0?void 0:l==="wrap"};return{...N(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:l=>n.onChange(l===void 0?void 0:l?"wrap":"nowrap")})}}function Sn(){const o=c(oo,!0,t(j,{})),e=n=>{const l=Z(n);return l===void 0?void 0:l==="wrap"};return{...N(),render:n=>{const l=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!ue(void 0,l?n.follows:void 0),followsNoView:!l,onChange:A=>n.onChange(A===void 0?void 0:A?"wrap":"nowrap")})}}}const Io={hint:L},go={all:[B,{any:[Ze,{all:[S,Do,{not:{all:[uo,{field:i("share"),set:!0}]}}]}]}]},On=to(a("desktop",no("Narrows below",t(X,{}),f.min,f.max,f.step,L,{kind:"breakpoint"},{clear:Io,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),go);function mn(o,e){const n=o;return!(T in n)||e.direction!=="column"?o:{...n,[T]:On}}const lt={fields:Te({_gContent:R("Content"),rowTitle:lo.rowTitle,content:lo.content,_gCardDisplay:R("Display"),cardDisplay:k("desktop"),cardDisplayTablet:k("tablet"),cardDisplayPhone:k("mobile"),showFor:Ue(),_gLayout:R("Layout"),direction:ce("Flex"),tabShape:g("Tab shape",t(Y,{}),Go.map(o=>({label:Yo[o],value:o,picture:jo[o]})),"tabs",{columns:2,cell:U}),mirrorCards:ye(),[T]:a("desktop",no("Stacks below",t(X,{}),f.min,f.max,f.step,L,{kind:"breakpoint"},{clear:Io,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[io]:ge(),startsOpen:a("desktop",c("Starts open",!1,t(qo,{}))),[P]:a("desktop",g("Row style",t(G,{}),Pe.map(o=>({...o,picture:o.value==="numbered"?t(G,{}):t(ee,{})})),"plain",{columns:2})),label:Oe(Se("Tab name")),..._e("Flex"),...d("justify",we(),s),...d("align",Ce(),s),...(()=>{const o=d("wrap",N(),s,{phoneRow:Sn()}),e=d("wrap",N(),s,{phoneRow:pn()});return{wrap:e.wrap,[i("wrap")]:e[i("wrap")],[r("wrap")]:o[r("wrap")]}})(),[r("order")]:He(),...d("boxShape",Q("Box shape",t(K,{}),q(z),"shape","auto"),s,{phoneRow:Q("Box shape",t(K,{}),q(z),"shape","auto",{phoneRest:o=>me(o)})}),[fe]:a("desktop",Ae(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:Ne(t($o,{size:18}),"none"),[C]:a("desktop",g("Card style",t(Y,{}),Vo.map(o=>({...o,picture:vo[o.value]})),"table",{columns:2,cell:U})),share:a("desktop",ae()),[i("share")]:de(),[r("share")]:se(),[h]:a("desktop",b(co,t(v,{}),[...Ge],_o)),[r(h)]:a("mobile",b(co,t(v,{}),[...Xe],_o)),...le(),...d("blockSpacing",re(),s),line:c("Line",!1,t(oe,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,t(Qo,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:b("Join",t(Zo,{}),Ie,De),_gShadow:R("Shadow"),...d("shadow",c("Shadow",!1,t(ne,{})),s),...d("fillColor",ie(),s),[bo]:y("Fill content","colour"),_gBackground:R("Background image"),bgImage:a("desktop",J("Image","image/*")),bgImagePhone:a("mobile",J("Image","image/*")),[Ho]:y("Image content","image",{content:!0}),..._n(),placement:Ee("Content position"),_gLink:R("Link"),link:yo(pe("Link to")),[Mo]:xo(),jumpHighlight:c("Highlight when a link jumps here",!1,t(te,{}),"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"],Oo],[[r("share")],{all:[mo,u]}],[[h],Eo(h)],[[r(h)],Eo(r(h))],[[r("wrap")],{all:[mo,p,u,w]}],[[r("order")],{all:[S,u,m]}],[["phoneRow"],u],[[P],fo],[["tabShape"],ve],[["rowTitle","startsOpen"],qe],[["align","blockSpacing",i("blockSpacing"),r("blockSpacing")],_],[[i("justify"),r("justify")],{all:[p,Lo,w]}],[[i("align"),r("align")],{all:[sn,dn,Lo]}],[[i("wrap")],{all:[p,W,Do,m,_,w]}],[[i("shadow"),r("shadow")],B],[[i("darken"),r("darken"),i("darkenStyle"),r("darkenStyle")],{all:[Oo,cn]}],[["separator"],H],[[C],{field:C,set:!0}],[["columns"],{any:[S,fo]}],[[i("columns")],S],[[T],go],[[i("gap")],{all:[$e,Ro]}],[["gap",r("gap")],Ro],[["justify"],{all:[p,tn,_,w]}],[["wrap"],{all:[p,W,m,_,w]}],[["share"],{all:[W,m,_]}],[[i("share")],{all:[uo,m]}],[["line"],je],[["upcoming"],ze],[["jumpHighlight"],Ve],[["boxShape",i("boxShape"),r("boxShape")],Je],[["direction","share",r("order")],ln],[["join"],ro],[[io],ro]]),resolveData:(o,e)=>{const n=o.props,l=n[C];return e.changed?.[C]===!0&&zo(l)?{...o,props:Jo(n,l,ke,Fe)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:be(n)}:o},resolveFields:(o,e)=>mn(Rn(Ke(hn(o,{...e,fields:Bo(e.fields,o,e)}),o.props),O(o,e)),o.props),showWhenFacts:{...Wo,...We,...Be,...an,...en,...nn,...Me,...Qe}},fn=to(Ko,ao);function Rn(o,e){const n=o;return!(M in n)||x(e)?o:{...n,[M]:fn}}function hn(...[o,e]){const{fields:n}=e;{if(x(O(o,e))){const A=eo({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return V(n,A)}return o.props.padV2!==!0?V(n,eo({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{lt as FlexFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{CaseIcon as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{CaseIcon as n,OpacityIcon as o,PlacementIcon as s}from"efficient-easel/icons";import{linkField as c,text as r,textarea as g,toggle as p,upload as l}from"../../../controls.js";import{group as e,section as m}from"efficient-easel/screen/lib/document/box-fields";import{alignmentFields as y,segmented as d,slider as i}from"../../../box-fields.js";import{VIEW_KEY_ACCESS as I}from"efficient-easel/screen/lib/document/box-fields";import{ctaField as u,photographyToggle as f}from"../../shared-fields.js";import{SPLIT_PH as a,IMGBTN_PH as _}from"../../../../../../format/lib/document/blocks/general/Split/meta.js";const h={fields:{_sText:m("Text column"),_gContent:e("Content"),eyebrow:r("Eyebrow",a.eyebrow),title:g("Heading",a.title),body:g("Body",a.body),uppercase:p("Uppercase heading",!1,t(n,{})),...y("textAlign",{access:I}),_gButton:e("Button"),...u,_gTextBg:e("Background image"),textBgSrc:l("Background image","image/*"),overlay:i("Overlay",t(o,{}),0,100,5,60,"%"),_sImage:m("Image column"),_gImage:e("Image"),imageSrc:l("Image","image/*"),reverse:d("Image side",t(s,{}),[{label:"Image left",value:!1},{label:"Image right",value:!0}],!1),_gImageBtn:e("Overlay button"),imageBtnText:r("Overlay button",_.text),imageBtnHref:c("Overlay button link"),_gStyle:e("Style"),grayscale:f(),imageOverlay:i("Image overlay",t(o,{}),0,100,5,40,"%")}};export{h as SplitFields};
|
|
@@ -6,7 +6,7 @@ import { readHidable, hidableText, type HidableValue } from "efficient-easel/dra
|
|
|
6
6
|
import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "efficient-easel/draw";
|
|
7
7
|
import { type ShowWhenRule } from "../../../render/lib/document/show-when.js";
|
|
8
8
|
import { CARD_IMAGE_RADIUS_ROW } from "../../../format/lib/content/card-image-shape.js";
|
|
9
|
-
import {
|
|
9
|
+
import { FOCAL_DEFAULT, type UnitChoice as ShellUnitChoice } from "efficient-shell/ui";
|
|
10
10
|
import { type ColourChoice } from "./ColourControl.js";
|
|
11
11
|
import { type DeviceTier } from "efficient-easel/screen/lib/document/device-fields";
|
|
12
12
|
import type { GeocodeState } from "../../../format/lib/content/contact.js";
|
|
@@ -271,7 +271,9 @@ export declare function spacingFields(opts?: {
|
|
|
271
271
|
export declare function swapPadding(fields: Record<string, unknown>, padding: Record<string, unknown>): Record<string, unknown>;
|
|
272
272
|
export declare const WIDTH_LABEL = "Width";
|
|
273
273
|
export declare function widthField(defaultMode: WidthMode, modes?: readonly WidthMode[], inheritable?: boolean): Record<string, CustomField<undefined> | CustomField<string> | CustomField<number>>;
|
|
274
|
-
export declare function heightFields(
|
|
274
|
+
export declare function heightFields({ fill }?: {
|
|
275
|
+
fill?: boolean;
|
|
276
|
+
}): Record<string, CustomField<undefined> | CustomField<string> | CustomField<number>>;
|
|
275
277
|
export declare function heightFollowedBy(view: PanelView, props: Record<string, unknown>): {
|
|
276
278
|
mode: SectionHeightMode;
|
|
277
279
|
value: number;
|
|
@@ -307,17 +309,7 @@ export declare function ThemeFillRow({ label, icon, id, value, shown, onChange,
|
|
|
307
309
|
export declare function boxFillField(): CustomField<string>;
|
|
308
310
|
export declare function fillSlotChoices(value: string, colors: ReturnType<typeof normalizeThemeColors>, n: number, onChange: (next: string) => void): ColourChoice[];
|
|
309
311
|
export declare function boxThemeIndexOf(data: unknown, id: string, own: unknown): number | null;
|
|
310
|
-
export declare const FOCAL_POINTS: {
|
|
311
|
-
value: string;
|
|
312
|
-
label: string;
|
|
313
|
-
}[];
|
|
314
312
|
export { FOCAL_DEFAULT };
|
|
315
|
-
export declare function FocalPicker({ label, value, onChange, points, }: {
|
|
316
|
-
label: string;
|
|
317
|
-
value: string;
|
|
318
|
-
onChange: (next: string) => void;
|
|
319
|
-
points?: readonly AlignmentPoint[];
|
|
320
|
-
}): import("react").JSX.Element;
|
|
321
313
|
export declare function focusKeptField(): CustomField<string>;
|
|
322
314
|
export type { EdgeCell };
|
|
323
315
|
export declare const EDGE_ARROWS: Record<EdgeCell, ReactNode>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as k,Fragment as P}from"react/jsx-runtime";import{cloneElement as be,createContext as wn,useContext as Qe,useEffect as Sn,useId as et,useRef as J,useState as Z}from"react";import{useEasel as oe,useSelectedHost as v}from"efficient-easel/easel";import{PIN_LENGTH as re,toDateKey as Cn,fromDateKey as _n}from"efficient-shell/format";import{say as a,editorEaselWords as _}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as tt,firstFrameHint as yn,loadingShowsOf as xn,loadingStillHint as In}from"../../../format/lib/hero-video.js";import{pageFramesFor as On,usePageVideoFrames as Tn}from"../page-video-frames.js";import{ScreenDocumentContext as Rn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as nt,hidableText as ot}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as we,LINK_FIELD_MARKER as rt,MEDIA_FIELD_MARKER as it,SCAFFOLD_FIELD_MARKER as st,TEXT_FIELD_MARKER as E,foldMetaOf as Se,textFieldIdentifier as En}from"efficient-easel/draw";import Nn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as lt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as kn,CARD_IMAGE_RADIUS_ROW as at,CARD_IMAGE_RADIUS_STEP as Pn,CORNER_RADIUS_MAX as Ce,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as An,IMAGE_CORNERS_LABEL as Ln,IMAGE_CORNERS_ROW as Fn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Bn,GALLERY_LAYOUTS as ie,GALLERY_LAYOUT_KEYS as Dn,galleryChoices as ct,galleryLayoutRatio as Hn,galleryPictureCells as Gn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mn}from"./shell-glyph.js";import{anchorSiblingsOf as Wn,placementPoints as Un}from"../../../format/lib/hero-group-placement.js";import Kn from"../../components/AnchorField.js";import $n from"../../components/SourceStatus.js";import{AdjustIcon as Xn,EyeIcon as Vn,AnimationIcon as jn,BackgroundIcon as ut,BorderAllIcon as zn,BlockSectionIcon as Yn,ColumnWidthsIcon as _e,ColumnsIcon as dt,CornerIcon as pt,DirectionDownIcon as qn,DirectionLeftIcon as Jn,DirectionRightIcon as Zn,DirectionUpIcon as Qn,EditIcon as eo,GapIcon as to,GridIcon as no,GroundIcon as ye,HashIcon as oo,HeightIcon as ft,ImageIcon as ro,ListIcon as io,LocationIcon as ht,PaddingBottomIcon as mt,PaddingLeftIcon as gt,PaddingRightIcon as bt,PaddingTopIcon as xe,PageIcon as so,StickyIcon as wt,SearchIcon as lo,SquareIcon as ao,TypeIcon as co,WidthIcon as uo}from"efficient-easel/icons";import{FieldGlyph as St}from"../../components/FieldGlyph.js";import{resolvePageBackground as po}from"../../../format/lib/content/page-background.js";import{boxFillOf as fo,boxFillSlot as Ie}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Ct,CORNER_SIDE_POINTS as ho,SECTION_CORNERS_ROW as _t,hasOwnSectionCorners as mo,normalizeCornerSides as yt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as xt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as go,enclosingSection as bo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as wo,SettingsField as C,SettingsGroup as So,SettingsSegmented as Co,SettingsBorder as _o,SettingsSidesEach as yo,SettingsSwitch as Oe,borderSides as xo,borderStartEach as Io}from"efficient-easel/panel";import{ListField as Oo}from"efficient-easel/fields";import{DisplayChips as To}from"efficient-shell/ui";import{desktopDisplayChanged as Ro,partShownOnDesktop as Eo,partShownOnPhone as No,phoneDisplayChanged as ko,withDesktopPart as Po,withPhonePart as Ao}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Lo,ColorSwatch as Fo,CornersInput as vo,DatePicker as Bo,DateTimePicker as Do,FOCAL_DEFAULT as Ho,IconPicker as It,COLUMN_COUNT_MAX as Ot,COLUMN_SHARE_MIN as Go,COLUMN_SHARES_EQUAL as Mo,resolveColumnShares as Tt,WidthsBar as Wo,useShellStrings as Uo,IconButton as Rt,InputNumber as Et,Slider as Ko,Tooltip as Te}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as $o}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Nt}from"./ColourControl.js";import{fillThemeColors as Xo,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Re}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ee}from"efficient-easel/screen/lib/document/style-fields";import kt from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Vo,NoControlMark as jo,noControlField as Pt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as zo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Yo,PANEL_ONLY_FIELD as qo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Jo,resolvePhoneValue as Ne}from"../../../format/lib/document/phone-override.js";import{phoneKey as X,tabletKey as ke,viewKeyAt as Pe}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as B}from"../animation/view-rows.js";import{SuppressibleText as Zo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Qo,CARD_OUTLINE_OPTIONS as er,DEFAULT_CARD_INDEX_FORMAT as tr,DEFAULT_CARD_OUTLINE as nr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as or,DEFAULT_COVER_INDEX as rr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ir}from"efficient-easel/draw";import sr from"../../components/MediaUploadField.js";import lr from"../../components/MultiSelectField.js";import ar from"../../components/SectionThemePicker.js";import cr from"../../components/SearchSelectField.js";import ur from"../../components/StorefrontLinkField.js";import{UiIcon as At}from"efficient-easel/draw/client";import{SECTION_PADDING as N}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as dr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as pr}from"efficient-easel/draw/client";import{encodePartId as fr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as hr,useEaselStrings as mr}from"efficient-easel/strings";import{hasPhoneHeight as gr,hasTabletHeight as Ae,resolveSectionMinHeight as br,resolveTabletHeight as wr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Sr,SECTION_PIN_ABOVE_HINT as Cr,SECTION_PIN_ABOVE_KEY as _r,SECTION_PIN_ABOVE_LABEL as yr,SECTION_PIN_GROUP as xr,SECTION_PIN_LABEL as Lt,SECTION_PIN_SCREENS_KEY as Le,SECTION_PIN_SCREENS_LABEL as Ft,SECTION_PIN_STOP_DEFAULT as Ir,SECTION_PIN_STOP_HINT as Or,SECTION_PIN_STOP_KEY as Tr,SECTION_PIN_STOP_LABEL as Rr,SECTION_PIN_STOP_OPTIONS as Er,SECTION_STICK_DISTANCE as D,SECTION_STICK_DISTANCE_ROW as Fe,SOME_VIEW_PINS as vt,hasPhoneStick as Nr,hasTabletStick as kr,resolveSectionStick as ae,sectionPinStopOf as Pr,sectionPinStopWrite as Ar}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Lr}from"../../../format/lib/content/css-length.js";import{SECTION_MIN_HEIGHT as Fr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as vr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Br,resolveContainerDirection as Bt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Dr,BOX_BLOCK_SPACING_POINTS as Dt,BOX_PHONE_ROW_LABEL as Ht,BOX_COLUMNS_MAX as Hr,BOX_COLUMNS_MIN as Gt,BOX_PHONE_ROW_MAX as Gr,BOX_PHONE_ROW_MIN as ve,BOX_SHARE_CHOICES as Mt,BOX_SHARE_LABEL as V,boxShareChoiceOf as Wt,boxShareWidthsOf as Be,BOX_SHARE_PHONE_DEFAULT as Mr,BOX_SHARE_PHONE_POINTS as Wr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Ut,BORDER_SIDES as Ur,SECTION_BORDER_ROW as Kt,borderBySide as $t}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Kr,normalizeTheme as Xt,normalizeThemeColors as $r,sectionBandTone as Xr,surfaceTwoTone as Vr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Vt,CONTAINER_GAP_BUILT_IN as jr,CONTAINER_GAP_PHONE as De,GAP_FIELD_CONTAINER as He,followsSitePhoneGap as zr,hasOwnContainerGap as Yr,hasOwnPhoneGap as Ge,resolveContainerGap as jt,resolvePhoneContainerGap as zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as qr,CARD_IMAGE_BG_OFF as Jr,CARD_IMAGE_BG_SWATCH_NAMES as Zr,CARD_IMAGE_BG_SWATCHES as Qr,isCardImageBackgroundInheriting as ei,cardImageBackgroundChoice as ti,THEME_CARD_IMAGE_BG as ni}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as oi,SECTION_BG_NO_FILL as ri,sectionBackgroundChoice as ii,THEME_SECTION_BG as Me,isSectionBackgroundEmpty as si,sectionBackgroundHex as Yt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as li,nestedAccentValue as qt,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as ai,TYPE_SIZE_INHERIT as ci,isTypeSizeInheriting as ui}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as di,WIDTH_CHOICE_LABEL as pi,WIDTH_INHERIT as fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as hi}from"efficient-easel/screen/lib/session-context";import{backendOf as mi}from"../website-session.js";import{BOX_GAP as gi,describedAs as L,group as R,iconOf as j,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Jt,onDesktopWords as G,phoneTwinFields as We,useLengthUnit as bi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as wi,directionField as Si,gapField as Ue,iconPickerRow as Ci,lengthUnitFields as ue,pickerCellIcon as _i,pickerNoneIcon as yi,Segmented as Ke,select as z,slider as M}from"./box-fields.js";import{VIEW_ABOVE as $e}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as Zt,viewOfTier as xi}from"../../../format/lib/content/view-tier.js";function Na({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function W(e,t){return a("{value} from {from}",{value:e,from:t})}function Ii(){const{blockGap:e}=H();return e===null?a("this container's own spacing"):W(`${e}px`,a("Styles"))}function Oi({inherited:e,onReset:t,label:n}){return i(y,{words:_()?.panel,label:a(n),changed:!e,detail:Ii(),onReset:t})}function Ti(e){return Ue({...gi,builtIn:jr[e],resolve:(t,n)=>jt(e,t,n?.siteGap),action:(t,n)=>i(Oi,{inherited:!Yr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[He]:e}})}function Ri(e){return lt(T("mobile",{[He]:e,type:"custom",render:t=>i(ki,{container:e,...t})}),Qt)}function Ei(e){return lt(T("tablet",{[He]:e,type:"custom",render:t=>i(Ni,{container:e,...t})}),Qt)}const Qt={not:{field:"gap",in:Array.from({length:-Vt.min},(e,t)=>Vt.min+t)}};function ka(e){return{gap:T("desktop",Ti(e)),[ke("gap")]:Ei(e),[X("gap")]:Ri(e)}}function Ni({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(De.min,jt(e,n,o));return Ue({...De,builtIn:r,resolve:l=>Ge(l)?l:r,action:(l,c)=>i(y,{words:_()?.panel,label:a("Gap"),changed:Ge(l),detail:G(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function ki({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=zt(e,void 0,n,o,r);return Ue({...De,builtIn:s,resolve:c=>zt(e,c,n,o,r),action:(c,u)=>i(y,{words:_()?.panel,label:a("Gap"),changed:Ge(c),detail:W(`${s}px`,zr(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Pa(e){return Si({offered:Br(e),fallback:Bt(e,void 0),resolve:t=>Bt(e,t)})}function Aa(e,t){return Un(t?Wn(e,t):[],t)}function Pi({inherited:e,onReset:t,label:n}){return i(y,{words:_()?.panel,label:a(n),changed:!e,detail:W(a("Full"),a("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:p}=nt(e),h=J(null),d=J(null),f=x=>t(l?{text:x,hidden:p}:x),m=()=>t({text:u,hidden:!p}),g=l&&p,b=et(),S=r?Bi(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=p?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(C,{label:a(n),icon:i(co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Te,{content:w,children:i(Rt,{"aria-pressed":p,"aria-label":w,onClick:m,children:p?i(At,{name:"eye-off",size:14}):i(At,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(kt,{target:s?d:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:d,value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)})]})})}function La(e,t){return{...e,[st]:t}}function Fa(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function va(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}function Ba(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[qo]:!0}}function Da(e){return Yo(e)}function Ha(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 zc,SCALAR_TEXT_CONTROLS as Yc}from"efficient-easel/draw";function Ga(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Vo]:o,...r}=e;return{...r,[zo]:!0,render:t}}const Ai=new Set(ir),de={type:"radio",options:[{value:!0},{value:!1}]},en={text:{type:"object",objectFields:{text:{type:"text"},hidden:de}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:de}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},K=(e,t)=>{const n=L({...t,[E]:e},{...en[e.control],label:e.label});if(!Ai.has(e.control))return n;const o=t.render;return{...Pt(n,"authored-copy"),render:r=>i(Zo,{name:r.name,children:o(r)})}},Ma="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Li={field:"source.slug",set:!0},Wa={not:Li},Fi="Select a word, then press the highlighter.",vi=new Set([Fi]),Bi=e=>vi.has(e);function Ua(e,t,n){return K({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ka(e,t,n){return K({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function $a(e,t,n){return K({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Xa(e,t,n){return K({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Va(e){return{type:"custom",[rt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(ur,{value:ot(t),onChange:n,label:e})}}function ja(e,t,n){return K({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const za={Design:Xn,Animation:jn};function Ya(e){return{type:"custom",render:()=>i(Di,{text:e})}}function Di({text:e}){return i("p",{className:"sf-note",children:a(e)})}function qa(e){return Se(e)!==null&&e?.tabs!==void 0}const tn=new Map;function Ja(e,t){const n=`${e}\0${t?t.join(""):""}`,o=tn.get(n)??{type:"custom",tabs:t,[we]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(P,{})};return tn.set(n,o),o}const nn=new Map;function Za(e){const t=nn.get(e)??{type:"custom",[we]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(P,{})};return nn.set(e,t),t}function Hi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Qa(e,t){return Hi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(P,{})}}function ec(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(P,{})}}function tc({title:e,children:t}){const[n,o]=Z(()=>!Xe.has(e));return i(So,{title:e,open:n,onToggle:r=>{o(r),r?Xe.delete(e):Xe.add(e)},children:t})}const Xe=new Set;function Gi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Te,{content:u,children:i(Fo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function nc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Mi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Mi({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=qe(),u={background:l.background,surface:l.surface,surface2:Vr(l),band:Xr(l)},p=n?Me:t,h=si(s,t,p),d=Yt(void 0,p,u),f=n?oi:void 0,m=p===Me?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Wi(s,t,l,c,u,r),b=W(d.toUpperCase(),m),S=Re(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ut,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Nt,{label:a(e),icon:i(ut,{}),value:h?"":Yt(s,t,u),inherited:d,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Wi(e,t,n,o,r,s){const l=ii(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(ri)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Me)},...Ye(Re(e)??"",n,o,s)]}function Ui(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ei(r,t);return i(C,{label:a(e),icon:i(ye,{}),changed:!s,action:i(y,{words:_()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(qr)}),children:Gi({swatches:Qr,current:s?ni:ti(r,t),onPick:o,names:Zr})})}}}function oc(e=n=>n,t){return ee({_gSectionTheme:R(li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(ar,{value:e(n),onChange:o,followLabel:t})}})}function pe(e){const t=O(),n=Zt(e?.view),o=l=>Pe(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??os(n,r);return bi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:wi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function Y({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:d,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Ko,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...d?{emptyLabel:a(d)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function Ki(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:d,onChange:f})=>{const m=typeof d=="number"?d:null,g=m===null;return i(C,{label:a(e),icon:p?j(p):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?be(u,{changed:!g,onReset:()=>f(null)}):i(y,{words:_()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):Y({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",$i={kind:"radius"};function Ve(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(C,{label:a(te),icon:i(pt,{}),changed:s,action:be(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(Xi,{tier:e,px:r,name:t.name,onRadius:o})})}}}function F(e){const t=v();return[t?.values?.[e],n=>t?.onChange(e,n)]}function on(){return Pt({type:"custom",render:()=>i(jo,{})},"always")}function fe(){const e=v();return t=>e?.onChangeMany(t)}function Xi({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=F(e.sidesKey),c=fe(),u=pe({row:e.row??$i,label:te,grid:{min:A,max:Ce,step:e.step??1},valueKey:n??"",view:"desktop"}),p=yt(s)??[...Ct];return i(vo,{label:a(te),value:p,corners:ho,onChange:h=>{const d=yt(h)??[];l(d.length===Ct.length?null:d)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??Ce,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function rn(e,t){return ue(e,t)}function sn(){return on()}function Vi({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),r=typeof o=="number"?`${o}px`:a("not set");return i(y,{words:_()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):W(r,a("Styles")),onReset:n})}function ji(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:A}function zi(){return Ve({sidesKey:"sectionCornerSides",row:_t,useFollowed:ji,mark:i(Vi,{label:te}),hint:Yi})}const Yi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function rc(){return ee({_gShape:R("Shape"),sectionCorners:zi(),...rn(_t,"sectionCorners"),sectionCornerSides:sn(),...B("sectionBorder",ns),...ue(Kt,"sectionBorder",{tablet:!0,phone:!0})})}const qi=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function Ji(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Zi(){let e;try{const t=Xt(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Kr.line}function Qi({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[p,h]=Z(()=>r?Io(u,l):!1),d=qi(),f=m=>Ji(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(C,{label:a("Border"),icon:i(zn,{}),action:r?i(yo,{each:p,label:a("Each side"),onChange:h}):void 0,children:i(_o,{label:a("Border"),value:u,each:p,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...d,unit:c.unit}:d,styles:s,max:c?.grid.max??Ut,...c?{step:c.grid.step,units:c.units}:{}})})}function es({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(ke("sectionBorder")),s=Zi(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...$t(l(o)),...$t(l(r))}:n==="tablet"?l(o):{},u=O(),p=fe(),h=I("sectionBorder",n),d=pe({row:Kt,label:"Border",grid:{min:0,max:Ut,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>je(u[Pe("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return je(m)?{[h]:ts(m,f)}:{}}});return i(Qi,{value:e,length:d,onChange:d?f=>p({[h]:f,...d.unitPatch(!je(f))}):t,placeholder:{sides:xo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const ln=["width",...Ur];function je(e){if(!e||typeof e!="object")return!1;const t=e;return ln.some(n=>$(t[n])!==void 0)}function ts(e,t){const n={...e};for(const o of ln){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function ns(e){return{type:"custom",render:({value:t,onChange:n})=>i(es,{value:t,onChange:n,view:e})}}function os(e,t){let n=$e[e];for(;n&&$e[n]!==null&&!t(n);)n=$e[n];return n??e}function ic(e){return{type:"custom",render:()=>i(rs,{partKey:e})}}function rs({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=H(),r=mr();let s=null;try{s=pr().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(wo,{name:a("Text"),preview:dr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??hr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(fr(t,e))}})}function an(e){const{cornerRadiusPx:t}=H(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=oe(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?bo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return mo(r)?r:n}function is({label:e,changed:t=!1,onReset:n=()=>{}}){const o=an(A);return i(y,{words:_()?.panel,label:a(e),changed:t,detail:W(`${o}px`,a("the section")),onReset:n})}function ss(){return i(P,{children:a("Follows the section's Corners until you set a number here.")})}function ls(){return Ve({sidesKey:"cardCornerSides",row:xt,useFollowed:()=>an(A),mark:i(is,{label:te}),hint:i(ss,{})})}function as(){return{type:"custom",render:()=>i(Nn,{})}}function sc(){return{_gShape:R("Shape"),cardCorners:ls(),...rn(xt,"cardCorners"),cardCornerSides:sn(),cardCornersApplyAll:as()}}function cs(){return L({type:"custom",render:e=>i(ds,{...e})},{type:"select",label:V,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 us(e,t){const n=Wt(e);if(n!=="custom")return a(Mt.find(r=>r.value===n)?.label??"");const o=Tt(Be(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function ds(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Wt(c),p=r>=2&&r<=Ot,h=()=>[...Mo[r]??[]],d=J(null),f=w=>{const x=d.current;x&&JSON.stringify(w)===JSON.stringify(x.shares)?n(x.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!p||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ot}),b=l&&(s||t!=="content"),S=Uo().widths.hint(r,Go);return i(C,{label:a(V),icon:i(_e,{}),changed:b,hint:u!=="custom"?void 0:p?S:g,action:i(y,{words:_()?.panel,label:a(V),changed:b,disabled:e.readOnly===!0,detail:s?G(w=>a(w),us(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(It,{label:a(V),value:u,options:Mt.map(w=>({value:w.value,label:w.value==="custom"&&!p?g:a(w.label),icon:_i(i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(w.weights).map((x,q)=>i("i",{style:{gridColumn:`span ${x}`}},q))}),a(w.label),w.value==="custom"&&!p?g:a(w.label))})),onChange:m,columns:3,cell:un,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{d.current={value:t,shares:Tt(Be(c,r),r)}},onBlur:()=>{d.current=null},children:i(Wo,{label:a(V),count:r,value:Be(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function cn(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 lc(){return z(Dr,i(to,{}),Dt,Dt[0].value)}function ac(){return T("mobile",Ci(V,i(_e,{}),Wr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Mr,{columns:2,cell:un}))}const un={width:"5.75rem",height:"3.25rem"};function cc(){return We("share",cs(),Jt)[ke("share")]}function ps(){return T("mobile",M(Ht,i(dt,{}),ve,Gr,1,ve,"",{clear:{phoneFollows:!1,hint:ve}}))}const dn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function uc(){const e=M(Ht,i(dt,{}),Gt,Hr,1,Gt,"",{clear:{emptyLabel:"Auto"}}),t=We("columns",e,{...dn,tablet:Jt.tablet}),n=We("columns",e,dn,{phoneRow:ps()});return{...t,phoneRow:n.phoneRow}}function dc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:p})=>i(fs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:p??"",length:l})}}function fs({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:p}){const h=O(),d=fe(),f=Zt(p?.view),m=pe({row:p?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:p?u:"",view:p?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?d({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(C,{label:a(e),icon:i(St,{noun:s}),action:i(y,{words:_()?.panel,label:a(e),changed:!ui(l),detail:a("the Text style in Styles"),onReset:()=>g(ci),defaultAction:{onPress:()=>g(ai),title:a("Keep this section's own built-in size"),icon:i(Yn,{})}}),children:Y({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function pc(){return{_gCellWidth:R("Cell width"),gridSpan:z("Positions",i(_e,{}),[{label:"Auto",value:""},...Array.from({length:vn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function O(){let e=null,t=null;try{e=Qe(hs),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const hs=wn(null);function ms({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=O()[l],p=Ne(void 0,u,c);return i(P,{children:Y({min:e,max:t,step:n,value:Ne(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function gs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=O()[t],c=Ne(void 0,l,n);return i(y,{words:_()?.panel,label:a(e),changed:r,detail:G(u=>a(u),`${c}${o}`),onReset:s})}function bs(e){return Ki(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(gs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ms,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const ws={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ss={Top:xe,Bottom:mt,Left:gt,Right:bt},Cs=e=>{const t=Ss[e];return i(t,{})};function fc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>ws[S],s=S=>M(r("Top"),i(xe,{}),N.min,N.max,N.step,S,"px"),l=(S,w,x,q=N)=>T("mobile",bs({label:r(S),icon:Cs(S),desktopKey:w,min:q.min,max:q.max,step:q.step,fallback:x})),c=e.top??N.min,u=e.bottom??N.min,p="sectionPaddingLeft",h="sectionPaddingRight",d=e.sideBounds??N,f=e.side??d.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?T("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(s(c)),...g?{[X(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(M(r("Bottom"),i(mt,{}),N.min,N.max,N.step,u,"px")),...g?{[X(n)]:l("Bottom",n,u)}:{}},...e.sides?{[p]:b(M(r("Left"),i(gt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(p)]:l("Left",p,m,d)}:{},[h]:b(M(r("Right"),i(bt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(h)]:l("Right",h,m,d)}:{}}:{}})}function hc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Se(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const he="Width";function mc(e,t=di,n=!0){const o=t.map(r=>({label:pi[r],value:r}));return ee({...n?{_gWidth:R(he)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(C,{label:a(he),icon:i(uo,{}),action:n?i(Pi,{inherited:s?.inherited??!1,onReset:()=>r(fi),label:he}):void 0,children:Ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:he})})}})}function gc(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:l})=>i(_s,{value:s,onChange:l,view:o,badge:r})}),t=()=>Ee("sectionHeightMode"),n=()=>Ee("sectionHeightMode");return ee({_gHeight:R(Q),...B("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Os,{view:o,onClear:()=>r(void 0)}))),...B("sectionHeightValue",t),...B("sectionHeightUnit",n)})}function _s({value:e,onChange:t,view:n,badge:o}){const r=O(),{mode:s,number:l,unit:c}=ys(n,r,e);return i(C,{label:Q,icon:j(i(ft,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[Ke({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s,onChange:t,ariaLabel:Q}),l?i(Is,{view:n,mode:s,menu:c}):null]})})}function pn(e,t){return e==="phone"&&Ae(t)?wr(t):br(t)}function me(e,t){return e==="desktop"||(e==="tablet"?Ae(t):gr(t))?null:pn(e,t)}function ys(e,t,n){const r=(s=>["auto","fixed","screen"].includes(s))(n)?n:me(e,t)?.mode??"auto";return{mode:r,number:r!=="auto",unit:r==="fixed"}}function xs(e,t,n,o){const r=me(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function fn(e,t,n){const o=v(),r=me(e,O());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=xs(e,c,t,l);return u===null?{[I(t,e)]:l}:Object.keys(u).length?u:null})}}function Is({view:e,mode:t,menu:n}){const o=v(),r=O(),s=I("sectionHeightValue",e),l=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:p}=fn(e,"sectionHeightValue",c(s)),{write:h}=fn(e,"sectionHeightUnit",c(l)),d=t==="screen"?"%":r[l],f=(u?u.unit:d)==="%"?"%":"px",m=f==="%"?vr:Fr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return Y({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:p})}function Os({view:e,onClear:t}){const n=O(),o=me(e,n)===null,r=e==="phone"&&Ae(n),s=pn(e,n),l=G(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:_()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function bc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:p})=>i(As,{value:l,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ns,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(ks,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(xr,{dot:t?Es:vt}),...B("stickTop",n),...B("stickTopDistance",o),...ue(Fe,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?B(Le,r):{},...t?{}:{[Tr]:Ts()},...t||e.above===!1?{}:{[_r]:Rs()}}}function Ts(){const e=z(Rr,i(xe,{}),Er,Ir);return T("desktop",{...e,render:t=>{const n=e.render({...t,value:Pr(t.value),onChange:o=>t.onChange(Ar(o))});return be(n,{hint:a(Or)})}})}function Rs(){const e=gn(yr,!1,i(wt,{}),Cr);return T("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Es={any:[vt,Sr]};function hn(e,t,n,o,r){const s=v(),l=O(),c=e==="desktop"||ne(e,l)?null:ze(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?p=>s.onChangeMany(h=>{const d=Ps(e,h,p,t,o),f=d===null?{[I(t,e)]:p}:d;return Object.keys(f).length?{...f,...r?.(p)??{}}:null}):n}}function Ns({value:e,onChange:t,view:n,intro:o}){const r=O(),s=ae(r,{intro:o}),l=h=>{const d=xi(h);return d==="desktop"||ne(d,r)},c=pe({row:Fe,label:"Distance from top",grid:{min:D.min,max:D.max,step:D.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[Pe("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:p}=hn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:Y({min:c?.grid.min??D.min,max:c?.grid.max??D.max,step:c?.grid.step??D.step,value:u?null:typeof e=="number"?e:D.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:p})})}function ks({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=hn(n,Le,t,o);return i(C,{label:a(Ft),icon:j(i(ft,{})),children:Y({min:re.min,max:re.max,step:re.step,value:r?null:$(e)??re.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ft),onChange:s})})}function ne(e,t){return e==="tablet"?kr(t):Nr(t)}function ze(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Ps(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=ze(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,d)=>t[l(h)]==null?{}:{[I(h,e)]:d},u=Fe.unitKey,p=t[l(u)]==null?{}:{[I(u,e)]:s.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...p,...c(Le,s.screens),[I(o,e)]:n}}function As({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=O(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,p=o==="desktop"?null:ze(o,l),h=p?.on?Lr(p.distance,p.unit):a("Off");return i(C,{label:a(Lt),labelId:n,icon:j(i(wt,{})),action:k(P,{children:[o!=="desktop"?i(y,{words:_()?.panel,label:a(Lt),changed:ne(o,s),detail:G(d=>a(d),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Oe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const mn="e.g. about";function wc(){return{_gAnchor:R("Anchor"),anchor:K({control:"plainText",label:"Name",placeholder:mn},{type:"custom",render:({value:e,onChange:t})=>i(Kn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:mn,hideable:!1,markup:!1})})})}}function Sc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(C,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Do,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Cc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(C,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Bo,{id:c,value:_n(typeof o=="string"?o:null),onChange:u=>r(u?Cn(u):"")})})}}}function gn(e,t,n,o){return{type:"custom",...L({},{...de,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,p="follows"in r,h=r,d=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=d?s:p?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Oe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(C,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:p?k(P,{children:[i(y,{words:_()?.panel,label:a(e),changed:d,detail:h.followsNoView?a(f?"On":"Off"):G(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function _c(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ls,{label:"Background",icon:i(so,{}),id:r,value:e,shown:po(e),onChange:t})}}}function yc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Ls({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=qe(),u=Re(o),p=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:s,choices:Ye(u??"",l,c,s)})}function xc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Fs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ye(e,t,n,o){const r=Ie(e);return Xo(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Fs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=qe(),s=o.background,l=W(s.toUpperCase(),a("Theme {n} background",{n:r})),c=Ie(e),u=c?le(c,o,r):null,p=Ye(e,o,r,t),h=n?()=>t(void 0):()=>t("");let d=s,f=l;if(n){const m=Ie(n.follows),g=fo(n.follows),b=m?le(m,o,r):g?{hex:g,words:g.toUpperCase()}:null;d=b?.hex??s,f=G(S=>a(S),b?b.words:l,n.view)}return u?i(se,{label:a("Fill"),icon:i(ye,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:f,choices:p}):i(Nt,{label:a("Fill"),icon:i(ye,{}),value:e,inherited:d,resetTo:f,onChange:t,onReset:h,choices:p})}function vs(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=go(e,t);if(r.length===0)return null;const s=ce(qt(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(qt(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function qe(){const e=Xt(H().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=oe(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?vs(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:$r(e.themes[o]),n:o+1}}const Bs=[{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 Ds({label:e,value:t,onChange:n,points:o=Bs}){const r=o.map(s=>({...s,label:a(s.label),...s.title?{title:a(s.title)}:null}));return i(Lo,{label:a(e),value:t,points:r,onChange:n})}function Ic(){return on()}const Oc={top:i(Qn,{}),right:i(Zn,{}),bottom:i(qn,{}),left:i(Jn,{})};function Tc(e,t,n,o,r,s,l){const c=d=>t.find(f=>f.value===d),u=d=>({value:d,label:"",disabled:!0,title:o}),p=d=>{const f=t.find(g=>g.cell===d);if(!f)return u(`missing-${d}`);const m=s?.[d];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:d,onChange:f})=>{const m=t.some(g=>g.value===d)?d:n;return i(C,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Ds({label:e,value:m,onChange:f,points:h})})}}}function Rc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(lr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Ec(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(cr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Nc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const kc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Pc(e,t,n){const o=Object.keys(tt).map(r=>({label:tt[r],value:r,picture:n[r]}));return{type:"custom",...L({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Gs,{label:e,icon:t,options:o,onChange:r})}}function Hs(e,t,n){const o=yn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=In(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function Gs({label:e,icon:t,options:n,onChange:o}){const r=v(),s=r?.values??{},l=xn(s),c=Qe(Rn),u=Tn(c?.docId??null);let p=null;try{p=oe(d=>d.appState.data)}catch{p=null}const h=On(r?.id,p,u);return i(C,{label:a(e),icon:j(t),hint:Hs(s,h,c?.hasUnsavedEdits??!1),children:Ke({options:n,value:l,onChange:o,ariaLabel:e})})}function Ac(e,t,n,o={}){const r={type:"custom",[it]:!0,render:({value:s,onChange:l,name:c})=>i(sr,{value:s||"",onChange:l,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?T("each",r):r}const Lc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ms(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Fc({value:e,onChange:t,label:n}){const o=e||{},r=v(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!mi(hi()).geocode,p=et(),h=(d,f)=>t({...o,[d]:f??void 0});return k(P,{children:[i(C,{label:a(n),icon:i(ht,{}),action:u?i(Te,{content:a("Find from the address (OpenStreetMap)"),children:i(Rt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(lo,{})})}):void 0,children:u&&o.status?i($n,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a($o):a(o.status),hint:Ms(o)}):null}),i(C,{label:a("Enter by hand"),labelId:p,icon:i(eo,{}),action:i(Oe,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:p})}),o.manual&&i(C,{label:a("Latitude, longitude"),icon:i(ht,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Et,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>h("lat",d),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Et,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>h("lng",d),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Ws(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Us(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 vc(e,t){return e===null?null:t>e?e:null}function Ks(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 Bc={label:"Ticker items",icon:i(io,{})};function Dc(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...en.textList,label:e}),render:({value:r,onChange:s})=>i($s,{label:e,icon:j(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function $s({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),p=d=>d.map(f=>({text:f?.text??""})),h=d=>{const f=Ks(n,d,c);f===null&&(l.current=null),u(f),r(p(d))};return i(Oo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(kt,{target:l,value:Ws(n,c),onChange:d=>r(Us(n,c??-1,d)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(d,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:d?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function Hc(e,t){const n=`${e.label} — row ${t+1}`;return K({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Gc(e){return{_gCards:R("Cards"),coverIndex:z("Cover image",i(ro,{}),or,String(rr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ui("Image background",Jr),cardImage:bn()}}function Mc(){return{outline:z("Card outline",i(ao,{}),er,nr),indexBadge:z("Card number",i(oo,{}),Qo,tr),showBadge:gn("Product badge",!0,i(St,{noun:"tag"}))}}function Wc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...de,label:ge.find(s=>s.id===r).label}),o=r=>L(Ee(Je),n(r));return{_gShowOnCard:R("Show on a card"),[Je]:L({type:"custom",render:()=>i(Xs,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Je)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Je="showCardPrice",ge=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Xs({rest:e}){const t=O(),n=fe(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=ge.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(Ze,{parts:ge,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(ge.map(({id:l})=>[l,void 0])))})}function Uc(e,t="display"){const n=X(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ze,{parts:e,changed:Ro(o),shown:s=>Eo(o,s),onPress:(s,l)=>r(Po(o,s,l)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Vs,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ze({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(C,{label:c,icon:i(Vn,{}),changed:t,action:i(y,{words:_()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(To,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function Vs({parts:e,desktopKey:t,value:n,onChange:o}){const r=O()[t];return i(Ze,{parts:e,changed:ko(n),shown:s=>No(r,n,s),onPress:(s,l)=>o(Ao(n,s,l)),onReset:()=>o(Jo),detail:a("the same as Desktop")})}function bn(e=kn){return M("Card image",i(pt,{}),A,Ce,Pn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function js(){return ue(at,"cardImage")}function Kc(){return{cardImage:bn(at),...js()}}function $c(){return Ve({sidesKey:"cornerSides",row:Fn,step:An,useFollowed:()=>A,mark:i(zs,{label:Ln}),hint:a("Rounds the picture. Left alone it stays square.")})}function zs({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:_()?.panel,label:a(e),changed:t,onReset:n})}function Xc(){return{type:"custom",render:({value:e,onChange:t})=>i(Zs,{value:typeof e=="string"?e:"",onChange:t})}}function Ys({layout:e,width:t}){const n=Hn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Gn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const qs={width:"3.5rem",height:"2.5rem"},Js=200;function Zs({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Sn(()=>{const f=l.current;if(!f||typeof ResizeObserver!="function")return;const m=()=>s(f.getBoundingClientRect().width>=Js?4:3);m();const g=new ResizeObserver(m);return g.observe(f),()=>g.disconnect()},[]);const c=e&&e in ie?e:"",u=ct(n,c),p=ct(n,"").length,h=Mn("no-symbol"),d=[{value:"",label:a("Not chosen"),icon:yi(h,a("Not chosen"))},...u.map(f=>({value:f,label:a(ie[f].label),icon:i(Ys,{layout:ie[f],width:40})}))];return i(C,{label:a("Layout"),icon:i(no,{}),value:c?a(ie[c].label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(It,{label:a("Layout"),value:c,options:d,onChange:t,columns:r,cell:qs,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Co,{options:[{id:"all",label:a("All")},...Bn.map(f=>({id:String(f),label:String(f)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:f=>o(f==="all"?null:Number(f))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:p,total:Dn.length})})]})})})})}export{Li as BOUND_TO_POST,Ma as BOUND_TO_POST_NOTE,za as BUCKET_ICONS,Lc as CUSTOM_FIELD_MEDIA,Fc as CoordsField,Qt as DESKTOP_GAP_NOT_OVERLAP,Ze as DisplayRow,Oc as EDGE_ARROWS,Ho as FOCAL_DEFAULT,Bs as FOCAL_POINTS,we as FOLD_FIELD_MARKER,Ds as FocalPicker,Fi as HIGHLIGHT_HINT,U as HidableTextField,rt as LINK_FIELD_MARKER,Na as Label,it as MEDIA_FIELD_MARKER,kc as MEDIA_TYPE_OPTIONS,Wa as NOT_BOUND_TO_POST,tc as PanelBand,Di as PanelNoteLine,hs as RowPropsContext,st as SCAFFOLD_FIELD_MARKER,Yc as SCALAR_TEXT_CONTROLS,Oi as SiteGapDefaultReset,Y as Slider,Gi as Swatches,zc as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,Bc as TICKER_ITEMS_ROW,$s as TextListField,Ls as ThemeFillRow,he as WIDTH_LABEL,Pi as WidthDefaultReset,Ks as aimAfterListChange,wc as anchorFields,W as backTo,nc as backgroundField,lc as boxBlockSpacingField,uc as boxColumnsFields,xc as boxFillField,ps as boxPhoneRowField,cs as boxShareField,ac as boxSharePhoneField,cc as boxShareTabletField,vs as boxThemeIndexOf,Ja as bucketHeader,ic as buttonWordsEntryField,ls as cardCornersField,Ui as cardImageBackgroundField,bn as cardImageField,Kc as cardImageFields,Gc as cardMediaFields,sc as cardShapeFields,Wc as cardShowFields,Mc as cardStyleFields,pc as cellWidthFields,yc as colorInput,Pa as containerDirectionField,Ti as containerGapField,Ri as containerGapPhoneField,ka as containerGapRows,Ei as containerGapTabletField,Ms as coordsResultTip,Xa as copyText,sn as cornerSidesField,Ve as cornersRowField,rn as cornersUnitFields,Cc as date,Sc as dateTime,Za as designGroupHeader,Uc as displayFields,Tc as edgePad,Ye as fillSlotChoices,vc as focusAfterRemove,Ic as focusKeptField,Qa as foldMarker,Se as foldMetaOf,Hi as foldTitleOf,xs as followedHeightPatch,Ps as followedStickPatch,Xc as galleryLayoutField,gc as heightFields,me as heightFollowedBy,ys as heightLayersAt,Aa as heroGroupPlacementPoints,ot as hidableText,Bi as hintIsWhileTyping,$c as imageCornersField,Ga as inOwnBox,qa as isBucketHeader,on as keptBy,Va as linkField,Hs as loadingRowHint,Pc as loadingShowsField,Rc as multiSelect,_c as pageBackgroundField,Ya as panelNote,bs as phoneOverrideField,$a as plainText,ja as plainTextarea,Ki as pxField,ec as quietMarker,nt as readHidable,Ws as rowText,Ec as searchSelect,Wi as sectionBandChoices,zi as sectionCornersField,rc as sectionShapeFields,oc as sectionThemeFields,Us as setRowText,dc as sizeField,Nc as sourceField,fc as spacingFields,bc as stickFields,hc as swapPadding,Ua as text,En as textFieldIdentifier,va as textFieldOffPage,Da as textFieldPanelOnly,Dc as textList,Hc as textListRowField,Ka as textarea,gn as toggle,Ac as upload,pe as useLengthRow,fe as useSelectedPatch,O as useSelectedProps,F as useSelectedSibling,Ii as useSiteGapDetail,mc as widthField,Ha as withIdentifier,Fa as withOffPage,Ba as withPanelOnly,La as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as k,Fragment as P}from"react/jsx-runtime";import{cloneElement as be,createContext as wn,useContext as Qe,useEffect as Sn,useId as et,useRef as J,useState as Z}from"react";import{useEasel as oe,useSelectedHost as v}from"efficient-easel/easel";import{PIN_LENGTH as re,toDateKey as _n,fromDateKey as Cn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as tt,firstFrameHint as yn,loadingShowsOf as xn,loadingStillHint as In}from"../../../format/lib/hero-video.js";import{pageFramesFor as On,usePageVideoFrames as Tn}from"../page-video-frames.js";import{ScreenDocumentContext as En}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as nt,hidableText as ot}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as we,LINK_FIELD_MARKER as rt,MEDIA_FIELD_MARKER as it,SCAFFOLD_FIELD_MARKER as st,TEXT_FIELD_MARKER as R,foldMetaOf as Se,textFieldIdentifier as Rn}from"efficient-easel/draw";import Nn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as lt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as kn,CARD_IMAGE_RADIUS_ROW as at,CARD_IMAGE_RADIUS_STEP as Pn,CORNER_RADIUS_MAX as _e,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as An,IMAGE_CORNERS_LABEL as Ln,IMAGE_CORNERS_ROW as Fn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Bn,GALLERY_LAYOUTS as ie,GALLERY_LAYOUT_KEYS as Dn,galleryChoices as ct,galleryLayoutRatio as Hn,galleryPictureCells as Gn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mn}from"./shell-glyph.js";import{anchorSiblingsOf as Wn,placementPoints as Un}from"../../../format/lib/hero-group-placement.js";import Kn from"../../components/AnchorField.js";import $n from"../../components/SourceStatus.js";import{AdjustIcon as Xn,EyeIcon as Vn,AnimationIcon as jn,BackgroundIcon as ut,BorderAllIcon as zn,BlockSectionIcon as Yn,ColumnWidthsIcon as Ce,ColumnsIcon as dt,CornerIcon as pt,DirectionDownIcon as qn,DirectionLeftIcon as Jn,DirectionRightIcon as Zn,DirectionUpIcon as Qn,EditIcon as eo,GapIcon as to,GridIcon as no,GroundIcon as ye,HashIcon as oo,HeightIcon as ft,ImageIcon as ro,ListIcon as io,LocationIcon as ht,PaddingBottomIcon as mt,PaddingLeftIcon as gt,PaddingRightIcon as bt,PaddingTopIcon as xe,PageIcon as so,StickyIcon as wt,SearchIcon as lo,SquareIcon as ao,TypeIcon as co,WidthIcon as uo}from"efficient-easel/icons";import{FieldGlyph as St}from"../../components/FieldGlyph.js";import{resolvePageBackground as po}from"../../../format/lib/content/page-background.js";import{boxFillOf as fo,boxFillSlot as Ie}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as _t,CORNER_SIDE_POINTS as ho,SECTION_CORNERS_ROW as Ct,hasOwnSectionCorners as mo,normalizeCornerSides as yt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as xt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as go,enclosingSection as bo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as wo,SettingsField as _,SettingsGroup as So,SettingsSegmented as _o,SettingsBorder as Co,SettingsSidesEach as yo,SettingsSwitch as Oe,borderSides as xo,borderStartEach as Io}from"efficient-easel/panel";import{ListField as Oo}from"efficient-easel/fields";import{DisplayChips as To}from"efficient-shell/ui";import{desktopDisplayChanged as Eo,partShownOnDesktop as Ro,partShownOnPhone as No,phoneDisplayChanged as ko,withDesktopPart as Po,withPhonePart as Ao}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Lo,CornersInput as Fo,DatePicker as vo,DateTimePicker as Bo,FOCAL_DEFAULT as Do,IconPicker as It,COLUMN_COUNT_MAX as Ot,COLUMN_SHARE_MIN as Ho,COLUMN_SHARES_EQUAL as Go,resolveColumnShares as Tt,WidthsBar as Mo,useShellStrings as Wo,IconButton as Et,InputNumber as Rt,Slider as Uo,Tooltip as Te}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Ko}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Nt}from"./ColourControl.js";import{fillThemeColors as $o,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Ee}from"../../../format/lib/document/part-inks.js";import{keptByRow as Re}from"efficient-easel/screen/lib/document/style-fields";import kt from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Xo,NoControlMark as Vo,noControlField as Pt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as jo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as zo,PANEL_ONLY_FIELD as Yo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as qo,resolvePhoneValue as Ne}from"../../../format/lib/document/phone-override.js";import{phoneKey as X,tabletKey as ke,viewKeyAt as Pe}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as B}from"../animation/view-rows.js";import{SuppressibleText as Jo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Zo,CARD_OUTLINE_OPTIONS as Qo,DEFAULT_CARD_INDEX_FORMAT as er,DEFAULT_CARD_OUTLINE as tr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as nr,DEFAULT_COVER_INDEX as or}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as rr}from"efficient-easel/draw";import ir from"../../components/MediaUploadField.js";import sr from"../../components/MultiSelectField.js";import lr from"../../components/SectionThemePicker.js";import ar from"../../components/SearchSelectField.js";import cr from"../../components/StorefrontLinkField.js";import{UiIcon as At}from"efficient-easel/draw/client";import{SECTION_PADDING as N}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as ur}from"../../../render/lib/content/button-look.js";import{usePreviewParts as dr}from"efficient-easel/draw/client";import{encodePartId as pr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as fr,useEaselStrings as hr}from"efficient-easel/strings";import{hasPhoneHeight as mr,hasTabletHeight as Ae,resolveSectionMinHeight as gr,resolveTabletHeight as br}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as wr,SECTION_PIN_ABOVE_HINT as Sr,SECTION_PIN_ABOVE_KEY as _r,SECTION_PIN_ABOVE_LABEL as Cr,SECTION_PIN_GROUP as yr,SECTION_PIN_LABEL as Lt,SECTION_PIN_SCREENS_KEY as Le,SECTION_PIN_SCREENS_LABEL as Ft,SECTION_PIN_STOP_DEFAULT as xr,SECTION_PIN_STOP_HINT as Ir,SECTION_PIN_STOP_KEY as Or,SECTION_PIN_STOP_LABEL as Tr,SECTION_PIN_STOP_OPTIONS as Er,SECTION_STICK_DISTANCE as D,SECTION_STICK_DISTANCE_ROW as Fe,SOME_VIEW_PINS as vt,hasPhoneStick as Rr,hasTabletStick as Nr,resolveSectionStick as ae,sectionPinStopOf as kr,sectionPinStopWrite as Pr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Ar}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Lr,SECTION_MIN_HEIGHT as Fr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as vr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Br,resolveContainerDirection as Bt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Dr,BOX_BLOCK_SPACING_POINTS as Dt,BOX_PHONE_ROW_LABEL as Ht,BOX_COLUMNS_MAX as Hr,BOX_COLUMNS_MIN as Gt,BOX_PHONE_ROW_MAX as Gr,BOX_PHONE_ROW_MIN as ve,BOX_SHARE_CHOICES as Mt,BOX_SHARE_LABEL as V,boxShareChoiceOf as Wt,boxShareWidthsOf as Be,BOX_SHARE_PHONE_DEFAULT as Mr,BOX_SHARE_PHONE_POINTS as Wr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Ut,BORDER_SIDES as Ur,SECTION_BORDER_ROW as Kt,borderBySide as $t}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Kr,normalizeTheme as Xt,normalizeThemeColors as $r,sectionBandTone as Xr,surfaceTwoTone as Vr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Vt,CONTAINER_GAP_BUILT_IN as jr,CONTAINER_GAP_PHONE as De,GAP_FIELD_CONTAINER as He,followsSitePhoneGap as zr,hasOwnContainerGap as Yr,hasOwnPhoneGap as Ge,resolveContainerGap as jt,resolvePhoneContainerGap as zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as qr,CARD_IMAGE_BG_OFF as Jr,CARD_IMAGE_BG_SWATCH_NAMES as Zr,CARD_IMAGE_BG_SWATCHES as Qr,isCardImageBackgroundInheriting as ei,cardImageBackgroundChoice as ti,THEME_CARD_IMAGE_BG as ni}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as oi,SECTION_BG_NO_FILL as ri,sectionBackgroundChoice as ii,THEME_SECTION_BG as Me,isSectionBackgroundEmpty as si,sectionBackgroundHex as Yt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as li,nestedAccentValue as qt,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as ai,TYPE_SIZE_INHERIT as ci,isTypeSizeInheriting as ui}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as di,WIDTH_CHOICE_LABEL as pi,WIDTH_INHERIT as fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as hi}from"efficient-easel/screen/lib/session-context";import{backendOf as mi}from"../website-session.js";import{BOX_GAP as gi,describedAs as L,group as E,iconOf as j,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Jt,onDesktopWords as G,phoneTwinFields as We,saidAlignmentGrid as bi,useLengthUnit as wi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Si,directionField as _i,gapField as Ue,iconPickerRow as Ci,lengthUnitFields as ue,pickerCellIcon as yi,pickerNoneIcon as xi,Segmented as Ke,select as z,slider as M}from"./box-fields.js";import{VIEW_ABOVE as $e}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as Zt,viewOfTier as Ii}from"../../../format/lib/content/view-tier.js";function Ra({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function W(e,t){return a("{value} from {from}",{value:e,from:t})}function Oi(){const{blockGap:e}=H();return e===null?a("this container's own spacing"):W(`${e}px`,a("Styles"))}function Ti({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:Oi(),onReset:t})}function Ei(e){return Ue({...gi,builtIn:jr[e],resolve:(t,n)=>jt(e,t,n?.siteGap),action:(t,n)=>i(Ti,{inherited:!Yr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[He]:e}})}function Ri(e){return lt(T("mobile",{[He]:e,type:"custom",render:t=>i(Pi,{container:e,...t})}),Qt)}function Ni(e){return lt(T("tablet",{[He]:e,type:"custom",render:t=>i(ki,{container:e,...t})}),Qt)}const Qt={not:{field:"gap",in:Array.from({length:-Vt.min},(e,t)=>Vt.min+t)}};function Na(e){return{gap:T("desktop",Ei(e)),[ke("gap")]:Ni(e),[X("gap")]:Ri(e)}}function ki({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(De.min,jt(e,n,o));return Ue({...De,builtIn:r,resolve:l=>Ge(l)?l:r,action:(l,c)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(l),detail:G(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Pi({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=zt(e,void 0,n,o,r);return Ue({...De,builtIn:s,resolve:c=>zt(e,c,n,o,r),action:(c,u)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(c),detail:W(`${s}px`,zr(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ka(e){return _i({offered:Br(e),fallback:Bt(e,void 0),resolve:t=>Bt(e,t)})}function Pa(e,t){return Un(t?Wn(e,t):[],t)}function Ai({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:W(a("Full"),a("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:p}=nt(e),h=J(null),d=J(null),f=x=>t(l?{text:x,hidden:p}:x),m=()=>t({text:u,hidden:!p}),g=l&&p,b=et(),S=r?Di(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=p?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Te,{content:w,children:i(Et,{"aria-pressed":p,"aria-label":w,onClick:m,children:p?i(At,{name:"eye-off",size:14}):i(At,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(kt,{target:s?d:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:d,value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)})]})})}function Aa(e,t){return{...e,[st]:t}}function La(e){const t=e[R];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[R]:{...t,offPage:!0}}}function Fa(e){return!e||typeof e!="object"?!1:e[R]?.offPage===!0}function va(e){if(!e[R])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Yo]:!0}}function Ba(e){return zo(e)}function Da(e){const t=e[R];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[R]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as jc,SCALAR_TEXT_CONTROLS as zc}from"efficient-easel/draw";function Ha(e,t){if(!e[R])throw new Error("inOwnBox: the field holds no authored text");const{[Xo]:o,...r}=e;return{...r,[jo]:!0,render:t}}const Li=new Set(rr),de={type:"radio",options:[{value:!0},{value:!1}]},en={text:{type:"object",objectFields:{text:{type:"text"},hidden:de}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:de}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},K=(e,t)=>{const n=L({...t,[R]:e},{...en[e.control],label:e.label});if(!Li.has(e.control))return n;const o=t.render;return{...Pt(n,"authored-copy"),render:r=>i(Jo,{name:r.name,children:o(r)})}},Ga="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Fi={field:"source.slug",set:!0},Ma={not:Fi},vi="Select a word, then press the highlighter.",Bi=new Set([vi]),Di=e=>Bi.has(e);function Wa(e,t,n){return K({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ua(e,t,n){return K({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ka(e,t,n){return K({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function $a(e,t,n){return K({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Xa(e){return{type:"custom",[rt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(cr,{value:ot(t),onChange:n,label:e})}}function Va(e,t,n){return K({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ja={Design:Xn,Animation:jn};function za(e){return{type:"custom",render:()=>i(Hi,{text:e})}}function Hi({text:e}){return i("p",{className:"sf-note",children:a(e)})}function Ya(e){return Se(e)!==null&&e?.tabs!==void 0}const tn=new Map;function qa(e,t){const n=`${e}\0${t?t.join(""):""}`,o=tn.get(n)??{type:"custom",tabs:t,[we]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(P,{})};return tn.set(n,o),o}const nn=new Map;function Ja(e){const t=nn.get(e)??{type:"custom",[we]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(P,{})};return nn.set(e,t),t}function Gi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Za(e,t){return Gi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(P,{})}}function Qa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(P,{})}}function ec({title:e,children:t}){const[n,o]=Z(()=>!Xe.has(e));return i(So,{title:e,open:n,onToggle:r=>{o(r),r?Xe.delete(e):Xe.add(e)},children:t})}const Xe=new Set;function Mi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Te,{content:u,children:i(Lo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function tc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Wi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Wi({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=qe(),u={background:l.background,surface:l.surface,surface2:Vr(l),band:Xr(l)},p=n?Me:t,h=si(s,t,p),d=Yt(void 0,p,u),f=n?oi:void 0,m=p===Me?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Ui(s,t,l,c,u,r),b=W(d.toUpperCase(),m),S=Ee(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ut,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Nt,{label:a(e),icon:i(ut,{}),value:h?"":Yt(s,t,u),inherited:d,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Ui(e,t,n,o,r,s){const l=ii(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(ri)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Me)},...Ye(Ee(e)??"",n,o,s)]}function Ki(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ei(r,t);return i(_,{label:a(e),icon:i(ye,{}),changed:!s,action:i(y,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(qr)}),children:Mi({swatches:Qr,current:s?ni:ti(r,t),onPick:o,names:Zr})})}}}function nc(e=n=>n,t){return ee({_gSectionTheme:E(li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(lr,{value:e(n),onChange:o,followLabel:t})}})}function pe(e){const t=O(),n=Zt(e?.view),o=l=>Pe(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??rs(n,r);return wi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Si,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function Y({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:d,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Uo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...d?{emptyLabel:a(d)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function $i(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:d,onChange:f})=>{const m=typeof d=="number"?d:null,g=m===null;return i(_,{label:a(e),icon:p?j(p):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?be(u,{changed:!g,onReset:()=>f(null)}):i(y,{words:C()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):Y({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",Xi={kind:"radius"};function Ve(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(pt,{}),changed:s,action:be(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(Vi,{tier:e,px:r,name:t.name,onRadius:o})})}}}function F(e){const t=v();return[t?.values?.[e],n=>t?.onChange(e,n)]}function on(){return Pt({type:"custom",render:()=>i(Vo,{})},"always")}function fe(){const e=v();return t=>e?.onChangeMany(t)}function Vi({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=F(e.sidesKey),c=fe(),u=pe({row:e.row??Xi,label:te,grid:{min:A,max:_e,step:e.step??1},valueKey:n??"",view:"desktop"}),p=yt(s)??[..._t];return i(Fo,{label:a(te),value:p,corners:ho,onChange:h=>{const d=yt(h)??[];l(d.length===_t.length?null:d)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??_e,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function rn(e,t){return ue(e,t)}function sn(){return on()}function ji({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),r=typeof o=="number"?`${o}px`:a("not set");return i(y,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):W(r,a("Styles")),onReset:n})}function zi(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:A}function Yi(){return Ve({sidesKey:"sectionCornerSides",row:Ct,useFollowed:zi,mark:i(ji,{label:te}),hint:qi})}const qi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function oc(){return ee({_gShape:E("Shape"),sectionCorners:Yi(),...rn(Ct,"sectionCorners"),sectionCornerSides:sn(),...B("sectionBorder",os),...ue(Kt,"sectionBorder",{tablet:!0,phone:!0})})}const Ji=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function Zi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Qi(){let e;try{const t=Xt(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Kr.line}function es({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[p,h]=Z(()=>r?Io(u,l):!1),d=Ji(),f=m=>Zi(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(zn,{}),action:r?i(yo,{each:p,label:a("Each side"),onChange:h}):void 0,children:i(Co,{label:a("Border"),value:u,each:p,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...d,unit:c.unit}:d,styles:s,max:c?.grid.max??Ut,...c?{step:c.grid.step,units:c.units}:{}})})}function ts({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(ke("sectionBorder")),s=Qi(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...$t(l(o)),...$t(l(r))}:n==="tablet"?l(o):{},u=O(),p=fe(),h=I("sectionBorder",n),d=pe({row:Kt,label:"Border",grid:{min:0,max:Ut,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>je(u[Pe("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return je(m)?{[h]:ns(m,f)}:{}}});return i(es,{value:e,length:d,onChange:d?f=>p({[h]:f,...d.unitPatch(!je(f))}):t,placeholder:{sides:xo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const ln=["width",...Ur];function je(e){if(!e||typeof e!="object")return!1;const t=e;return ln.some(n=>$(t[n])!==void 0)}function ns(e,t){const n={...e};for(const o of ln){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function os(e){return{type:"custom",render:({value:t,onChange:n})=>i(ts,{value:t,onChange:n,view:e})}}function rs(e,t){let n=$e[e];for(;n&&$e[n]!==null&&!t(n);)n=$e[n];return n??e}function rc(e){return{type:"custom",render:()=>i(is,{partKey:e})}}function is({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=H(),r=hr();let s=null;try{s=dr().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(wo,{name:a("Text"),preview:ur(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??fr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(pr(t,e))}})}function an(e){const{cornerRadiusPx:t}=H(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=oe(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?bo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return mo(r)?r:n}function ss({label:e,changed:t=!1,onReset:n=()=>{}}){const o=an(A);return i(y,{words:C()?.panel,label:a(e),changed:t,detail:W(`${o}px`,a("the section")),onReset:n})}function ls(){return i(P,{children:a("Follows the section's Corners until you set a number here.")})}function as(){return Ve({sidesKey:"cardCornerSides",row:xt,useFollowed:()=>an(A),mark:i(ss,{label:te}),hint:i(ls,{})})}function cs(){return{type:"custom",render:()=>i(Nn,{})}}function ic(){return{_gShape:E("Shape"),cardCorners:as(),...rn(xt,"cardCorners"),cardCornerSides:sn(),cardCornersApplyAll:cs()}}function us(){return L({type:"custom",render:e=>i(ps,{...e})},{type:"select",label:V,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 ds(e,t){const n=Wt(e);if(n!=="custom")return a(Mt.find(r=>r.value===n)?.label??"");const o=Tt(Be(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function ps(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Wt(c),p=r>=2&&r<=Ot,h=()=>[...Go[r]??[]],d=J(null),f=w=>{const x=d.current;x&&JSON.stringify(w)===JSON.stringify(x.shares)?n(x.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!p||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ot}),b=l&&(s||t!=="content"),S=Wo().widths.hint(r,Ho);return i(_,{label:a(V),icon:i(Ce,{}),changed:b,hint:u!=="custom"?void 0:p?S:g,action:i(y,{words:C()?.panel,label:a(V),changed:b,disabled:e.readOnly===!0,detail:s?G(w=>a(w),ds(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(It,{label:a(V),value:u,options:Mt.map(w=>({value:w.value,label:w.value==="custom"&&!p?g:a(w.label),icon:yi(i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(w.weights).map((x,q)=>i("i",{style:{gridColumn:`span ${x}`}},q))}),a(w.label),w.value==="custom"&&!p?g:a(w.label))})),onChange:m,columns:3,cell:un,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{d.current={value:t,shares:Tt(Be(c,r),r)}},onBlur:()=>{d.current=null},children:i(Mo,{label:a(V),count:r,value:Be(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function cn(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 sc(){return z(Dr,i(to,{}),Dt,Dt[0].value)}function lc(){return T("mobile",Ci(V,i(Ce,{}),Wr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Mr,{columns:2,cell:un}))}const un={width:"5.75rem",height:"3.25rem"};function ac(){return We("share",us(),Jt)[ke("share")]}function fs(){return T("mobile",M(Ht,i(dt,{}),ve,Gr,1,ve,"",{clear:{phoneFollows:!1,hint:ve}}))}const dn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function cc(){const e=M(Ht,i(dt,{}),Gt,Hr,1,Gt,"",{clear:{emptyLabel:"Auto"}}),t=We("columns",e,{...dn,tablet:Jt.tablet}),n=We("columns",e,dn,{phoneRow:fs()});return{...t,phoneRow:n.phoneRow}}function uc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:p})=>i(hs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:p??"",length:l})}}function hs({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:p}){const h=O(),d=fe(),f=Zt(p?.view),m=pe({row:p?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:p?u:"",view:p?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?d({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(St,{noun:s}),action:i(y,{words:C()?.panel,label:a(e),changed:!ui(l),detail:a("the Text style in Styles"),onReset:()=>g(ci),defaultAction:{onPress:()=>g(ai),title:a("Keep this section's own built-in size"),icon:i(Yn,{})}}),children:Y({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function dc(){return{_gCellWidth:E("Cell width"),gridSpan:z("Positions",i(Ce,{}),[{label:"Auto",value:""},...Array.from({length:vn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function O(){let e=null,t=null;try{e=Qe(ms),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const ms=wn(null);function gs({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=O()[l],p=Ne(void 0,u,c);return i(P,{children:Y({min:e,max:t,step:n,value:Ne(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function bs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=O()[t],c=Ne(void 0,l,n);return i(y,{words:C()?.panel,label:a(e),changed:r,detail:G(u=>a(u),`${c}${o}`),onReset:s})}function ws(e){return $i(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(bs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(gs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ss={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_s={Top:xe,Bottom:mt,Left:gt,Right:bt},Cs=e=>{const t=_s[e];return i(t,{})};function pc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Ss[S],s=S=>M(r("Top"),i(xe,{}),N.min,N.max,N.step,S,"px"),l=(S,w,x,q=N)=>T("mobile",ws({label:r(S),icon:Cs(S),desktopKey:w,min:q.min,max:q.max,step:q.step,fallback:x})),c=e.top??N.min,u=e.bottom??N.min,p="sectionPaddingLeft",h="sectionPaddingRight",d=e.sideBounds??N,f=e.side??d.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?T("desktop",S):S;return ee({...o?{_gSpacing:E("Padding")}:{},[t]:b(s(c)),...g?{[X(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(M(r("Bottom"),i(mt,{}),N.min,N.max,N.step,u,"px")),...g?{[X(n)]:l("Bottom",n,u)}:{}},...e.sides?{[p]:b(M(r("Left"),i(gt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(p)]:l("Left",p,m,d)}:{},[h]:b(M(r("Right"),i(bt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(h)]:l("Right",h,m,d)}:{}}:{}})}function fc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Se(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const he="Width";function hc(e,t=di,n=!0){const o=t.map(r=>({label:pi[r],value:r}));return ee({...n?{_gWidth:E(he)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(he),icon:i(uo,{}),action:n?i(Ai,{inherited:s?.inherited??!1,onReset:()=>r(fi),label:he}):void 0,children:Ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:he})})}})}function mc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(ys,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Re("sectionHeightMode"),o=()=>Re("sectionHeightMode");return ee({_gHeight:E(Q),...B("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ts,{view:r,onClear:()=>s(void 0)}))),...B("sectionHeightValue",n),...B("sectionHeightUnit",o)})}function ys({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=O(),{mode:l,number:c,unit:u}=xs(n,s,e);return i(_,{label:Q,icon:j(i(ft,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[Ke({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Os,{view:n,mode:l,menu:u}):null]})})}function pn(e,t){return e==="phone"&&Ae(t)?br(t):gr(t)}function me(e,t){return e==="desktop"||(e==="tablet"?Ae(t):mr(t))?null:pn(e,t)}function xs(e,t,n){const r=(s=>Lr.includes(s))(n)?n:me(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Is(e,t,n,o){const r=me(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function fn(e,t,n){const o=v(),r=me(e,O());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Is(e,c,t,l);return u===null?{[I(t,e)]:l}:Object.keys(u).length?u:null})}}function Os({view:e,mode:t,menu:n}){const o=v(),r=O(),s=I("sectionHeightValue",e),l=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:p}=fn(e,"sectionHeightValue",c(s)),{write:h}=fn(e,"sectionHeightUnit",c(l)),d=t==="screen"?"%":r[l],f=(u?u.unit:d)==="%"?"%":"px",m=f==="%"?vr:Fr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return Y({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:p})}function Ts({view:e,onClear:t}){const n=O(),o=me(e,n)===null,r=e==="phone"&&Ae(n),s=pn(e,n),l=G(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function gc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:p})=>i(Ls,{value:l,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(ks,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ps,{value:l,onChange:c,view:s,intro:t})});return{_gStick:E(yr,{dot:t?Ns:vt}),...B("stickTop",n),...B("stickTopDistance",o),...ue(Fe,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?B(Le,r):{},...t?{}:{[Or]:Es()},...t||e.above===!1?{}:{[_r]:Rs()}}}function Es(){const e=z(Tr,i(xe,{}),Er,xr);return T("desktop",{...e,render:t=>{const n=e.render({...t,value:kr(t.value),onChange:o=>t.onChange(Pr(o))});return be(n,{hint:a(Ir)})}})}function Rs(){const e=gn(Cr,!1,i(wt,{}),Sr);return T("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Ns={any:[vt,wr]};function hn(e,t,n,o,r){const s=v(),l=O(),c=e==="desktop"||ne(e,l)?null:ze(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?p=>s.onChangeMany(h=>{const d=As(e,h,p,t,o),f=d===null?{[I(t,e)]:p}:d;return Object.keys(f).length?{...f,...r?.(p)??{}}:null}):n}}function ks({value:e,onChange:t,view:n,intro:o}){const r=O(),s=ae(r,{intro:o}),l=h=>{const d=Ii(h);return d==="desktop"||ne(d,r)},c=pe({row:Fe,label:"Distance from top",grid:{min:D.min,max:D.max,step:D.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[Pe("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:p}=hn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:Y({min:c?.grid.min??D.min,max:c?.grid.max??D.max,step:c?.grid.step??D.step,value:u?null:typeof e=="number"?e:D.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:p})})}function Ps({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=hn(n,Le,t,o);return i(_,{label:a(Ft),icon:j(i(ft,{})),children:Y({min:re.min,max:re.max,step:re.step,value:r?null:$(e)??re.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ft),onChange:s})})}function ne(e,t){return e==="tablet"?Nr(t):Rr(t)}function ze(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function As(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=ze(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,d)=>t[l(h)]==null?{}:{[I(h,e)]:d},u=Fe.unitKey,p=t[l(u)]==null?{}:{[I(u,e)]:s.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...p,...c(Le,s.screens),[I(o,e)]:n}}function Ls({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=O(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,p=o==="desktop"?null:ze(o,l),h=p?.on?Ar(p.distance,p.unit):a("Off");return i(_,{label:a(Lt),labelId:n,icon:j(i(wt,{})),action:k(P,{children:[o!=="desktop"?i(y,{words:C()?.panel,label:a(Lt),changed:ne(o,s),detail:G(d=>a(d),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Oe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const mn="e.g. about";function bc(){return{_gAnchor:E("Anchor"),anchor:K({control:"plainText",label:"Name",placeholder:mn},{type:"custom",render:({value:e,onChange:t})=>i(Kn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:mn,hideable:!1,markup:!1})})})}}function wc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Bo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Sc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(vo,{id:c,value:Cn(typeof o=="string"?o:null),onChange:u=>r(u?_n(u):"")})})}}}function gn(e,t,n,o){return{type:"custom",...L({},{...de,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,p="follows"in r,h=r,d=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=d?s:p?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Oe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:p?k(P,{children:[i(y,{words:C()?.panel,label:a(e),changed:d,detail:h.followsNoView?a(f?"On":"Off"):G(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function _c(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Fs,{label:"Background",icon:i(so,{}),id:r,value:e,shown:po(e),onChange:t})}}}function Cc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Fs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=qe(),u=Ee(o),p=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:s,choices:Ye(u??"",l,c,s)})}function yc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(vs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ye(e,t,n,o){const r=Ie(e);return $o(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function vs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=qe(),s=o.background,l=W(s.toUpperCase(),a("Theme {n} background",{n:r})),c=Ie(e),u=c?le(c,o,r):null,p=Ye(e,o,r,t),h=n?()=>t(void 0):()=>t("");let d=s,f=l;if(n){const m=Ie(n.follows),g=fo(n.follows),b=m?le(m,o,r):g?{hex:g,words:g.toUpperCase()}:null;d=b?.hex??s,f=G(S=>a(S),b?b.words:l,n.view)}return u?i(se,{label:a("Fill"),icon:i(ye,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:f,choices:p}):i(Nt,{label:a("Fill"),icon:i(ye,{}),value:e,inherited:d,resetTo:f,onChange:t,onReset:h,choices:p})}function Bs(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=go(e,t);if(r.length===0)return null;const s=ce(qt(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(qt(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function qe(){const e=Xt(H().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=oe(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Bs(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:$r(e.themes[o]),n:o+1}}function xc(){return on()}const Ic={top:i(Qn,{}),right:i(Zn,{}),bottom:i(qn,{}),left:i(Jn,{})};function Oc(e,t,n,o,r,s,l){const c=d=>t.find(f=>f.value===d),u=d=>({value:d,label:"",disabled:!0,title:o}),p=d=>{const f=t.find(g=>g.cell===d);if(!f)return u(`missing-${d}`);const m=s?.[d];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:d,onChange:f})=>{const m=t.some(g=>g.value===d)?d:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:bi(a,{label:e,value:m,onChange:f,points:h})})}}}function Tc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(sr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Ec(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(ar,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Rc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Nc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function kc(e,t,n){const o=Object.keys(tt).map(r=>({label:tt[r],value:r,picture:n[r]}));return{type:"custom",...L({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Hs,{label:e,icon:t,options:o,onChange:r})}}function Ds(e,t,n){const o=yn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=In(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function Hs({label:e,icon:t,options:n,onChange:o}){const r=v(),s=r?.values??{},l=xn(s),c=Qe(En),u=Tn(c?.docId??null);let p=null;try{p=oe(d=>d.appState.data)}catch{p=null}const h=On(r?.id,p,u);return i(_,{label:a(e),icon:j(t),hint:Ds(s,h,c?.hasUnsavedEdits??!1),children:Ke({options:n,value:l,onChange:o,ariaLabel:e})})}function Pc(e,t,n,o={}){const r={type:"custom",[it]:!0,render:({value:s,onChange:l,name:c})=>i(ir,{value:s||"",onChange:l,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?T("each",r):r}const Ac={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Gs(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Lc({value:e,onChange:t,label:n}){const o=e||{},r=v(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!mi(hi()).geocode,p=et(),h=(d,f)=>t({...o,[d]:f??void 0});return k(P,{children:[i(_,{label:a(n),icon:i(ht,{}),action:u?i(Te,{content:a("Find from the address (OpenStreetMap)"),children:i(Et,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(lo,{})})}):void 0,children:u&&o.status?i($n,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(Ko):a(o.status),hint:Gs(o)}):null}),i(_,{label:a("Enter by hand"),labelId:p,icon:i(eo,{}),action:i(Oe,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:p})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(ht,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Rt,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>h("lat",d),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Rt,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>h("lng",d),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Ms(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ws(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 Fc(e,t){return e===null?null:t>e?e:null}function Us(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 vc={label:"Ticker items",icon:i(io,{})};function Bc(e,t,n,o){return{type:"custom",[R]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...en.textList,label:e}),render:({value:r,onChange:s})=>i(Ks,{label:e,icon:j(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Ks({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),p=d=>d.map(f=>({text:f?.text??""})),h=d=>{const f=Us(n,d,c);f===null&&(l.current=null),u(f),r(p(d))};return i(Oo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(kt,{target:l,value:Ms(n,c),onChange:d=>r(Ws(n,c??-1,d)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(d,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:d?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function Dc(e,t){const n=`${e.label} — row ${t+1}`;return K({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Hc(e){return{_gCards:E("Cards"),coverIndex:z("Cover image",i(ro,{}),nr,String(or),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ki("Image background",Jr),cardImage:bn()}}function Gc(){return{outline:z("Card outline",i(ao,{}),Qo,tr),indexBadge:z("Card number",i(oo,{}),Zo,er),showBadge:gn("Product badge",!0,i(St,{noun:"tag"}))}}function Mc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...de,label:ge.find(s=>s.id===r).label}),o=r=>L(Re(Je),n(r));return{_gShowOnCard:E("Show on a card"),[Je]:L({type:"custom",render:()=>i($s,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Je)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Je="showCardPrice",ge=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function $s({rest:e}){const t=O(),n=fe(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=ge.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(Ze,{parts:ge,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(ge.map(({id:l})=>[l,void 0])))})}function Wc(e,t="display"){const n=X(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ze,{parts:e,changed:Eo(o),shown:s=>Ro(o,s),onPress:(s,l)=>r(Po(o,s,l)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Xs,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ze({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(Vn,{}),changed:t,action:i(y,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(To,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function Xs({parts:e,desktopKey:t,value:n,onChange:o}){const r=O()[t];return i(Ze,{parts:e,changed:ko(n),shown:s=>No(r,n,s),onPress:(s,l)=>o(Ao(n,s,l)),onReset:()=>o(qo),detail:a("the same as Desktop")})}function bn(e=kn){return M("Card image",i(pt,{}),A,_e,Pn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function Vs(){return ue(at,"cardImage")}function Uc(){return{cardImage:bn(at),...Vs()}}function Kc(){return Ve({sidesKey:"cornerSides",row:Fn,step:An,useFollowed:()=>A,mark:i(js,{label:Ln}),hint:a("Rounds the picture. Left alone it stays square.")})}function js({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function $c(){return{type:"custom",render:({value:e,onChange:t})=>i(Js,{value:typeof e=="string"?e:"",onChange:t})}}function zs({layout:e,width:t}){const n=Hn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Gn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const Ys={width:"3.5rem",height:"2.5rem"},qs=200;function Js({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Sn(()=>{const f=l.current;if(!f||typeof ResizeObserver!="function")return;const m=()=>s(f.getBoundingClientRect().width>=qs?4:3);m();const g=new ResizeObserver(m);return g.observe(f),()=>g.disconnect()},[]);const c=e&&e in ie?e:"",u=ct(n,c),p=ct(n,"").length,h=Mn("no-symbol"),d=[{value:"",label:a("Not chosen"),icon:xi(h,a("Not chosen"))},...u.map(f=>({value:f,label:a(ie[f].label),icon:i(zs,{layout:ie[f],width:40})}))];return i(_,{label:a("Layout"),icon:i(no,{}),value:c?a(ie[c].label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(It,{label:a("Layout"),value:c,options:d,onChange:t,columns:r,cell:Ys,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(_o,{options:[{id:"all",label:a("All")},...Bn.map(f=>({id:String(f),label:String(f)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:f=>o(f==="all"?null:Number(f))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:p,total:Dn.length})})]})})})})}export{Fi as BOUND_TO_POST,Ga as BOUND_TO_POST_NOTE,ja as BUCKET_ICONS,Ac as CUSTOM_FIELD_MEDIA,Lc as CoordsField,Qt as DESKTOP_GAP_NOT_OVERLAP,Ze as DisplayRow,Ic as EDGE_ARROWS,Do as FOCAL_DEFAULT,we as FOLD_FIELD_MARKER,vi as HIGHLIGHT_HINT,U as HidableTextField,rt as LINK_FIELD_MARKER,Ra as Label,it as MEDIA_FIELD_MARKER,Nc as MEDIA_TYPE_OPTIONS,Ma as NOT_BOUND_TO_POST,ec as PanelBand,Hi as PanelNoteLine,ms as RowPropsContext,st as SCAFFOLD_FIELD_MARKER,zc as SCALAR_TEXT_CONTROLS,Ti as SiteGapDefaultReset,Y as Slider,Mi as Swatches,jc as TEXT_CONTROL_KINDS,R as TEXT_FIELD_MARKER,vc as TICKER_ITEMS_ROW,Ks as TextListField,Fs as ThemeFillRow,he as WIDTH_LABEL,Ai as WidthDefaultReset,Us as aimAfterListChange,bc as anchorFields,W as backTo,tc as backgroundField,sc as boxBlockSpacingField,cc as boxColumnsFields,yc as boxFillField,fs as boxPhoneRowField,us as boxShareField,lc as boxSharePhoneField,ac as boxShareTabletField,Bs as boxThemeIndexOf,qa as bucketHeader,rc as buttonWordsEntryField,as as cardCornersField,Ki as cardImageBackgroundField,bn as cardImageField,Uc as cardImageFields,Hc as cardMediaFields,ic as cardShapeFields,Mc as cardShowFields,Gc as cardStyleFields,dc as cellWidthFields,Cc as colorInput,ka as containerDirectionField,Ei as containerGapField,Ri as containerGapPhoneField,Na as containerGapRows,Ni as containerGapTabletField,Gs as coordsResultTip,$a as copyText,sn as cornerSidesField,Ve as cornersRowField,rn as cornersUnitFields,Sc as date,wc as dateTime,Ja as designGroupHeader,Wc as displayFields,Oc as edgePad,Ye as fillSlotChoices,Fc as focusAfterRemove,xc as focusKeptField,Za as foldMarker,Se as foldMetaOf,Gi as foldTitleOf,Is as followedHeightPatch,As as followedStickPatch,$c as galleryLayoutField,mc as heightFields,me as heightFollowedBy,xs as heightLayersAt,Pa as heroGroupPlacementPoints,ot as hidableText,Di as hintIsWhileTyping,Kc as imageCornersField,Ha as inOwnBox,Ya as isBucketHeader,on as keptBy,Xa as linkField,Ds as loadingRowHint,kc as loadingShowsField,Tc as multiSelect,_c as pageBackgroundField,za as panelNote,ws as phoneOverrideField,Ka as plainText,Va as plainTextarea,$i as pxField,Qa as quietMarker,nt as readHidable,Ms as rowText,Ec as searchSelect,Ui as sectionBandChoices,Yi as sectionCornersField,oc as sectionShapeFields,nc as sectionThemeFields,Ws as setRowText,uc as sizeField,Rc as sourceField,pc as spacingFields,gc as stickFields,fc as swapPadding,Wa as text,Rn as textFieldIdentifier,Fa as textFieldOffPage,Ba as textFieldPanelOnly,Bc as textList,Dc as textListRowField,Ua as textarea,gn as toggle,Pc as upload,pe as useLengthRow,fe as useSelectedPatch,O as useSelectedProps,F as useSelectedSibling,Oi as useSiteGapDetail,hc as widthField,Da as withIdentifier,La as withOffPage,va as withPanelOnly,Aa as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as l,heightFields as
|
|
1
|
+
import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as l,heightFields as n,sectionShapeFields as p,sectionThemeFields as F,spacingFields as a,stickFields as h,widthField as S}from"../controls.js";import{blockSizeFieldSet as c}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as E}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as f,rowSay as L,sidesPaddingFields as _}from"../box-fields.js";import{assignSectionGroups as T}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as A}from"../section-own-width-fields.js";import{dropEmptyHeadings as g}from"../panel-drop-empty-headings.js";import{rowsShownForNode as w}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:_,sectionShapeFields:p,cardShapeFields:d,cellWidthFields:l,widthField:S,boxGutterFields:O,sectionOwnWidthFields:A,heightFields:n,anchorFields:m,stickFields:h,sectionThemeFields:F,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>c({...o,shorten:!0,say:L,lengthUnits:f,...i?{phone:E}:{}}),assignSectionGroups:T,dropEmptyHeadings:g,rowsShownForNode:w,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
+
import { type ViewTier } from "efficient-easel/screen/lib/content/view-tiers";
|
|
2
3
|
import { type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
|
|
3
|
-
export type SectionHeightMode = "auto" | "fixed" | "screen";
|
|
4
|
+
export type SectionHeightMode = "auto" | "fixed" | "screen" | "fill";
|
|
4
5
|
export declare const SECTION_HEIGHT_MODES: readonly SectionHeightMode[];
|
|
5
6
|
export type SectionHeightUnit = Extract<LengthUnit, "px" | "%">;
|
|
6
7
|
export declare const SECTION_HEIGHT_UNITS: readonly SectionHeightUnit[];
|
|
@@ -80,3 +81,12 @@ export declare const SECTION_FILL_PASS_CLASS = "grid grid-cols-[minmax(0,1fr)]";
|
|
|
80
81
|
export declare const SECTION_FILL_CLASS = "h-full";
|
|
81
82
|
export declare const SECTION_FILL_PASS_PHONE_CLASS = "max-view-tablet:grid grid-cols-[minmax(0,1fr)]";
|
|
82
83
|
export declare function sectionFillPassClass(props: Record<string, unknown>): string;
|
|
84
|
+
export declare const SECTION_HEIGHT_FILL_ATTR = "data-sf-height-fill";
|
|
85
|
+
type FillView = ViewTier;
|
|
86
|
+
export declare function sectionHeightFillViews(props: Record<string, unknown>): FillView[];
|
|
87
|
+
export declare function sectionHeightFillClass(props: Record<string, unknown>): string;
|
|
88
|
+
export declare function sectionHeightWrap(props: Record<string, unknown>): {
|
|
89
|
+
className: string;
|
|
90
|
+
style?: CSSProperties;
|
|
91
|
+
} | null;
|
|
92
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{LENGTH_UNITS as
|
|
1
|
+
import{FOLLOW_RULES as C,resolveViewValue as M}from"efficient-easel/screen/lib/content/view-tiers";import{LENGTH_UNITS as O}from"efficient-easel/screen/lib/content/length-units";const p=["auto","fixed","screen","fill"],A=O.filter(e=>e==="px"||e==="%"),w="svh",P="vh",V="var(--sf-header-h, 88px)",v={min:40,max:2e3,step:10,fallback:600},G={min:10,max:200,step:5,fallback:100},U="sf-section-minh",l="grid-cols-[minmax(0,1fr)]",u={base:"--sf-section-minh",small:"--sf-section-minh-s"},h=e=>typeof e=="string"&&p.includes(e),k=e=>typeof e=="string"&&A.includes(e);function r(e){const t=h(e.sectionHeightMode)?e.sectionHeightMode:"auto",n=t==="screen"?"%":k(e.sectionHeightUnit)?e.sectionHeightUnit:"px",i=t==="screen"?G.fallback:v.fallback,o=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:i;return{mode:t,value:o,unit:n}}function _(e){const{mode:t,value:n,unit:i}=r(e);if(t==="auto"||t==="fill")return;if(t==="fixed"&&i==="px")return[`${n}px`,null];const o=n/100,c=s=>t==="screen"?`(100${s} - ${V})`:`100${s}`;return[`calc(${c(P)} * ${o})`,`calc(${c(w)} * ${o})`]}function g(e){const t=_(e);if(!t)return;const[n,i]=t;return{display:"grid",[u.base]:n,...i?{[u.small]:i}:{}}}const K=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),X="Height",I="sf-section-minh-phone",T={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function d(e){return h(e.sectionHeightModePhone)}function F(e){return r({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}const S="sf-section-minh-tablet",x={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function E(e){return h(e.sectionHeightModeTablet)}function R(e){return r({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function H(e){const t=g(e),n=(N,L,b)=>_({sectionHeightMode:N,sectionHeightValue:L,sectionHeightUnit:b})??(t?["auto",null]:void 0),i=E(e)?n(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,o=d(e)?n(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):i;if(!t&&!i&&!o)return null;const c=[U,l],s={...t??{}};return i&&(c.push(S),s[x.base]=i[0],i[1]&&(s[x.small]=i[1])),o&&(c.push(I),s[T.base]=o[0],o[1]&&(s[T.small]=o[1])),{className:c.join(" "),style:s}}function q(e){return H(e)!==null||a(e).length>0}const f=`grid ${l}`,z="h-full",$="view-tablet:max-view-desktop:grid",m="max-view-tablet:grid",y=`${m} ${l}`;function J(e){if(a(e).length>0)return f;const t=H(e);if(!t)return"";if(g(e))return f;const n=t.className.split(" ");if(!n.includes(S))return y;const o=n.includes(I);return[$,o?m:"",l].filter(Boolean).join(" ")}const Q="data-sf-height-fill",B=["desktop","tablet","mobile"],D={desktop:"view-desktop:[.flex-col>&]:grow! view-desktop:[.flex-row>&]:self-stretch",tablet:"view-wide:max-view-desktop:[.flex-col>&]:grow! view-wide:max-view-desktop:[.flex-row>&]:self-stretch",mobile:"max-view-wide:[.flex-col>&]:grow!"};function a(e){const t=e,n=M("heightMode",r(t).mode,E(t)?R(t).mode:null,d(t)?F(t).mode:null,C),i={desktop:n.desktop==="fill",tablet:n.tablet==="fill",mobile:n.phone==="fill"};return B.filter(o=>i[o])}function Y(e){return a(e).map(t=>D[t]).join(" ")}function Z(e){const t=H(e);return a(e).length===0?t:t?{className:`${t.className} grid`,style:t.style}:{className:f}}export{V as HEADER_HEIGHT_VAR,z as SECTION_FILL_CLASS,f as SECTION_FILL_PASS_CLASS,y as SECTION_FILL_PASS_PHONE_CLASS,l as SECTION_GRID_COLUMN_CLASS,Q as SECTION_HEIGHT_FILL_ATTR,p as SECTION_HEIGHT_MODES,A as SECTION_HEIGHT_UNITS,v as SECTION_MIN_HEIGHT,U as SECTION_MIN_HEIGHT_CLASS,K as SECTION_MIN_HEIGHT_EXCLUDED,X as SECTION_MIN_HEIGHT_GROUP_LABEL,I as SECTION_MIN_HEIGHT_PHONE_CLASS,T as SECTION_MIN_HEIGHT_PHONE_VARS,S as SECTION_MIN_HEIGHT_TABLET_CLASS,x as SECTION_MIN_HEIGHT_TABLET_VARS,u as SECTION_MIN_HEIGHT_VARS,G as SECTION_SCREEN_PCT,w as VIEWPORT_UNIT,P as VIEWPORT_UNIT_FALLBACK,d as hasPhoneHeight,E as hasTabletHeight,F as resolvePhoneHeight,r as resolveSectionMinHeight,R as resolveTabletHeight,J as sectionFillPassClass,q as sectionFillsHeight,Y as sectionHeightFillClass,a as sectionHeightFillViews,Z as sectionHeightWrap,H as sectionMinHeightAttrs,_ as sectionMinHeightLengths,g as sectionMinHeightStyle};
|