efficient-web-builder 48.1.1 → 48.3.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 +26 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/lib/animation/AnimationDurationRow.d.ts +3 -0
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/fields.d.ts +2 -2
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +2 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +15 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/sections/city-presets.d.ts +1 -1
- package/dist/editor/lib/sections/city-presets.js +1 -1
- package/dist/editor/lib/sections/text-layouts.d.ts +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +32 -2
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +1 -1
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +6 -1
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/global-registry.d.ts +1 -0
- package/dist/format/lib/global-registry.js +1 -0
- package/dist/format/lib/links/link-href-rewrites.d.ts +10 -0
- package/dist/format/lib/links/link-href-rewrites.js +1 -0
- package/dist/format/lib/sections/hero-overlay.d.ts +8 -0
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.d.ts +7 -0
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -0
- package/dist/render/components/Btn.d.ts +2 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +2 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Flex.d.ts +2 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +63 -0
- package/dist/render/components/HeroPictures.js +1 -0
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +15 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +2 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +3 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +10 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +8 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +3 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/site-runtime.d.ts +3 -1
- package/dist/render/lib/site-runtime.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 48.3.0 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
From main at `ee1edea1`: #469, #475, #478, #480. A minor: exports are added, no export is removed, peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: nothing is seeded, and the single Hero converter (`heroSingleToHero`) is not run by this package.
|
|
6
|
+
|
|
7
|
+
**For hosts:** efficient-storefront-blocks draws the card pictures (ProductCard, PlpCard, WheelPlaceholder); its next PR reads `cardHoverOf` so the new Hover rows move them (#469). Until then a card turns as it does today.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- A card's picture motion on hover moves to the Animation tab, in a Hover group (#469): Hover effect (None / Rotate), Angle, Duration and Delay, on the Product Grid, Related Products and the Alloy Wheels Listing. One list of kinds in `lib/animation/hover` (`HOVER_KINDS`, `cardHoverOf`, `CardHover`). At the default nothing changes.
|
|
12
|
+
- A host wraps each drawn copy of a card template (#475): `CardTemplateRows` takes `wrapCopy(copy, row)`; no prop draws today's markup.
|
|
13
|
+
- A Button can send its link through a host's named href rewrite (#478): `registerLinkHrefRewrite`, `namedLinkHrefRewrite`, `LINK_HREF_REWRITE_PROP` (`lib/links/link-href-rewrites`), and `globalRegistry` (`lib/global-registry`), the one home of a `Symbol.for` registry.
|
|
14
|
+
- A Hero slide draws everything the single Hero drew (#480): its own overlay colour and side, an uploaded video, a YouTube link, play-on-click, two pictures and the picture entrances. `heroSingleToHero` turns a stored single Hero into a Hero with one slide (for the layered data batch; not run here). The single Hero stays in the Add menu.
|
|
15
|
+
|
|
16
|
+
## 48.2.0 - 2026-11-04
|
|
17
|
+
|
|
18
|
+
From main at `1ac8ab56`: #467, #468, #470, #472. A minor: exports are added, no export is removed, four signatures take an optional argument or a new value, peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). The converter rows stay OFF (`SECTION_TO_BOX_ON` is empty) and the new Add-menu list is empty (`SECTION_TO_BOX_PRESS`), so no stored page converts and the Add menu does not change.
|
|
19
|
+
|
|
20
|
+
**For hosts:** SpecTable, FitmentTable and FitmentFinder no longer get a head-only row from this package (#470). A host that wants them convertible registers its own row with `headOnlyRow(type, ext)` (`HOST_ROW_HEAD_TYPES` names them); until then they have no converter row.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Scroll-Over Text (`IntroBleed`), Brand Text (`Manifesto`) and Image & Text Split (`Split`) get converter rows, switched off (#467, `EDITORIAL_SECTION_TO_BOX`). The Box shape offers Landscape (4:3) from the shared ratio table (`BOX_SHAPES` gains `landscape`); a section's root Box draws its picture across the section (`useSectionRoot`, `pictureCell`, `lineSides`, `NO_PAD`, `siteGutterOf`).
|
|
25
|
+
- The Add menu has its own list of types that press as a Box (#468): `SECTION_TO_BOX_PRESS` and `pressesAsBox(type, press?)`. `layoutPresetFor(type, press?)` and `cityPalettePresets(press?)` read it, not the render switch.
|
|
26
|
+
- A host gives the whole converter row for 3 head-only types (#470): `HOST_ROW_HEAD_TYPES`; `headOnlyRow(type, ext?)` takes a `HeadOnlyRowExtension` (`slots`, `partsAfter`, `drop`).
|
|
27
|
+
- A Box hands its own id to the blocks it holds (#472): `useBoxId()` reads the nearest Box's id; `Flex` takes `boxId`. No markup change.
|
|
28
|
+
|
|
3
29
|
## 48.1.1 - 2026-11-04
|
|
4
30
|
|
|
5
31
|
A patch from main: #465 only. No export is added or removed; peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No drawing changes; no stored page changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t}from"react/jsx-runtime";import{SettingsDefaultReset as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{SettingsDefaultReset as d,SettingsField as E,SettingsSegmented as p}from"efficient-easel/panel";import{HoverIcon as h}from"efficient-easel/icons";import{HOVER_KIND_LABELS as s}from"../../format/lib/animation/hover.js";import{say as e,editorEaselWords as m}from"../../format/lib/editor-words.js";import{HOVER_EFFECTS as u,DEFAULT_HOVER_EFFECT as f}from"../../format/lib/theme.js";const o={none:s.none,lift:s.lift,highlight:"Highlight"},H="What a card does when a shopper points at it — or taps it, on a phone. Highlight is the effect your cards already use.";function g({value:i,onChange:n,showHint:c=!0}){const r=i===null,a=i??f;return t(E,{label:e("Hover effect"),icon:t(h,{}),value:e(o[a]),changed:!r,action:t(d,{words:m()?.panel,label:e("Hover effect"),changed:!r,detail:e(o[f]),onReset:()=>n(null)}),hint:c?e(H):void 0,children:t(p,{options:u.map(l=>({id:l,label:e(o[l])})),value:a,ariaLabel:e("Hover effect"),onChange:n})})}export{o as HOVER_EFFECT_LABELS,g as default};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type TimedMotionGroup } from "efficient-shell/format";
|
|
2
2
|
export declare function animationDurationField(group: TimedMotionGroup): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
3
3
|
export declare function animationDelayField(group: TimedMotionGroup): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
4
|
+
export declare function showsWhatRuns<F extends {
|
|
5
|
+
render?: unknown;
|
|
6
|
+
}>(field: F, read: (stored: unknown, node: Record<string, unknown> | undefined) => unknown): F;
|
|
4
7
|
export declare function loopDurationField({ readsSpeed }: {
|
|
5
8
|
readsSpeed: boolean;
|
|
6
9
|
}): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{ClockIcon as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{ClockIcon as p,DurationIcon as m}from"efficient-easel/icons";import{MOTION_TIMING as a}from"efficient-shell/format";import{slider as s}from"../document/box-fields.js";import{useSelectedHost as d}from"efficient-easel/easel";import{loopDelayOf as c,loopSecondsOf as f}from"../../../format/lib/animation/loop.js";function x(o){const{min:t,max:n,step:r,default:e}=a[o].duration;return s("Duration",i(m,{}),t,n,r,e,"s")}function D(o){const{min:t,max:n,step:r,default:e}=a[o].delay;return s("Delay",i(p,{}),t,n,r,e,"s")}function u(o,t){const n=o.render,r=e=>{const l=d();return n({...e,value:t(e.value,l?.values)})};return{...o,render:e=>i(r,{...e})}}function w({readsSpeed:o}){return u(x("loop"),(t,n)=>f({loopDuration:t,speed:o?n?.speed:void 0}))}function g(){return u(D("loop"),o=>c({loopDelay:o}))}export{D as animationDelayField,x as animationDurationField,g as loopDelayField,w as loopDurationField,u as showsWhatRuns};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type AnimationTabKind = "section" | "block" | "box" | "marquee" | "textPart";
|
|
2
|
-
export declare function animationTabFields(kind: AnimationTabKind): Record<string, unknown>;
|
|
1
|
+
export type AnimationTabKind = "section" | "block" | "box" | "marquee" | "textPart" | "cards";
|
|
2
|
+
export declare function animationTabFields(kind: AnimationTabKind, blockKey?: string): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loopDelayField as
|
|
1
|
+
import{loopDelayField as i,loopDurationField as t}from"./AnimationDurationRow.js";import{entranceFields as e}from"./entrance-fields.js";import{cardHoverResting as a}from"../../../format/lib/animation/hover.js";import{cardHoverFields as l,hoverFields as c}from"./hover-fields.js";import{loopDirectionField as n,loopFields as s}from"./loop-fields.js";function f(r,o=""){switch(r){case"section":case"block":return e();case"box":return{...e(),...s()};case"textPart":return{...e(),...c()};case"cards":return{...e(),...l(a(o))};case"marquee":return{...e(),scrollDirection:n(),loopDuration:t({readsSpeed:!0}),loopDelay:i()}}}export{f as animationTabFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{HoverIcon as h,RotateIcon as l}from"efficient-easel/icons";import{group as d}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as H,noControlField as f}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{segmented as E,slider as u}from"../document/box-fields.js";import{withShowWhen as i}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as v,animationDurationField as O,showsWhatRuns as m}from"./AnimationDurationRow.js";import{CARD_HOVER_ANGLE as s,CARD_HOVER_KEYS as n,CARD_HOVER_KINDS as D,CARD_HOVER_TURN as A,HOVER_KEY as V,HOVER_KIND_LABELS as N,OLD_SPIN_KEY as w,PART_HOVER_KINDS as I,cardHoverAngleOf as K,cardHoverKindOf as C,cardRotatesRule as k}from"../../../format/lib/animation/hover.js";const R="_gHover",F="What this does when a shopper points at it, or taps it on a phone.",S="What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.";function c(o,e){return E("Hover effect",a(h,{}),o.map(r=>({label:N[r],value:r})),e)}function G(){return{[R]:d("Hover"),[V]:t("desktop",{...c(I,"none"),description:F})}}function U(o){const e=k(o),r=u("Angle",a(l,{}),s.min,s.max,s.step,A,"°");return{[R]:d("Hover"),[n.kind]:t("desktop",{...m(c(D,o),(p,_)=>C(_??{},o)),description:S}),[w]:f({type:"custom",render:()=>a(H,{})},"always"),[n.angle]:t("desktop",i(m(r,p=>K(p)),e)),[n.duration]:t("desktop",i(O("hover"),e)),[n.delay]:t("desktop",i(v("hover"),e))}}export{U as cardHoverFields,G as hoverFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{ImageIcon as T,ImagesIcon as c,MediaIcon as E,MediaLayoutSideBySideIcon as P,MediaLayoutStackedIcon as S,OpacityIcon as m}from"efficient-easel/icons";import{colorInput as n,focusKeptField as i,MEDIA_TYPE_OPTIONS as b,upload as a}from"../../../controls.js";import{group as t,phoneTwinFields as h}from"efficient-easel/screen/lib/document/box-fields";import{segmented as l,slider as d}from"../../../box-fields.js";import{MEDIA_LAYOUT_DEFAULT as g,MEDIA_LAYOUT_LABELS as p,MEDIA_LAYOUTS as y,resolvePhoneLayout as v}from"../../../../../../format/lib/hero-media-layout.js";import{deviceNote as U}from"efficient-easel/screen/lib/document/device-fields";import{HERO_OVERLAY_ROWS as u,HERO_VIDEO_ROWS as r}from"../../hero-shared-fields.js";import{heightField as s,slotNoticeField as A}from"../../shared-fields.js";import{forMediaType as I,heroMediaFields as D,VIDEO_FILE_LABEL as M,VIDEO_FILE_PROMPT as k}from"../../../../../../render/lib/document/hero-media-parts.js";import{VIDEO_SOURCE_DEFAULT as L}from"../../../../../../format/lib/hero-video.js";const O=I("video","image"),_=I("image","image"),F={one:e(T,{}),side:e(P,{}),stacked:e(S,{})};import{HeroSingleSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{DEFAULT_TINT as f}from"../../../../../../format/lib/content/tint.js";const z={fields:D({_dDevice:U(),boxNotice:A("HeroSingle"),boxes:C.boxes,_gStyle:t("Style"),overlay:d("Overlay",e(m,{}),0,100,5,100,"%"),overlayColor:u.overlayColor,overlayPosition:u.overlayPosition,_gLayout:t("Layout"),heightDesktop:s("desktop"),heightMobile:s("mobile"),_gMedia:t("Media"),mediaType:l("Type",e(E,{}),b,"image"),mediaLayout:l("Layout",e(c,{}),y.map(o=>({label:p[o],value:o,picture:F[o]})),g),mediaLayoutPhone:h("mediaLayout",l("Layout",e(c,{}),y.map(o=>({label:p[o],value:o,picture:F[o]})),g,{phoneRest:o=>v(void 0,o)})).mediaLayoutPhone,mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),videoSource:r.videoSource,mediaVideo:a(M,"video/*",k),youtubeUrl:r.youtubeUrl,videoPlayback:r.videoPlayback,poster:a("Video poster","image/*","Upload a poster still"),_gTint:t("Image tint"),tintColor:n("Tint color",f),tintOpacity:d("Tint opacity",e(m,{}),0,100,5,0,"%"),mediaImage2:a("Background image","image/*","Upload a background image",{focus:"imageFocal2"}),imageFocal2:i(),imageFocal2Phone:i(),tintColor2:n("Tint color",f),tintOpacity2:d("Tint opacity",e(m,{}),0,100,5,0,"%")},{parts:{media:["mediaType","mediaLayout","mediaLayoutPhone","videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:["mediaImage","imageFocal","imageFocalPhone","tintColor","tintOpacity"],image2:["mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"]},onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","tintOpacity","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[O,{field:"videoSource",is:"upload",default:L}]},youtubeUrl:{all:[O,{field:"videoSource",is:"youtube",default:L}]},mediaLayout:{all:[_,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[_,{context:"device",is:"mobile"}]}},fallback:"image"})};export{z as HeroSingleFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{BlockVideoIcon as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{BlockVideoIcon as c,ClockIcon as p,ImageIcon as g,MediaIcon as s,OpacityIcon as u,PlayIcon as v}from"efficient-easel/icons";import{colorInput as f,focusKeptField as i,loadingShowsField as I,MEDIA_TYPE_OPTIONS as y,plainText as _,text as S,upload as a,withIdentifier as O,withPanelOnly as m}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{segmented as E,slider as t}from"../../../box-fields.js";import{LOADING_SHOWS_IMAGE as F,VIDEO_PLAYBACK_DEFAULT as P,VIDEO_SOURCE_DEFAULT as l}from"../../../../../../format/lib/hero-video.js";import{HERO_SLIDE_OVERLAY_ROWS as n,HERO_VIDEO_ROWS as d}from"../../hero-shared-fields.js";import{PH as T}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as b}from"../../shared-fields.js";import{forMediaType as L,heroMediaFields as D,VIDEO_FILE_LABEL as h,VIDEO_FILE_PROMPT as k}from"../../../../../../render/lib/document/hero-media-parts.js";import{DEFAULT_TINT as A}from"../../../../../../format/lib/content/tint.js";import{HeroSlideSlots as C}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const r=L("video","video"),G={fields:D({_gContent:o("Content"),name:m(O(_("Slide name",T.slideName))),process:m(S("Reel label","Label")),groupNotice:b("HeroSlide"),groups:C.groups,_gMedia:o("Media"),mediaType:E("Type",e(s,{}),y,"video"),videoSource:d.videoSource,mediaVideo:a(h,"video/*",k,{frame:"videoFrame"}),youtubeUrl:d.youtubeUrl,videoPlayback:d.videoPlayback,videoSpeed:t("Playback speed",e(v,{}),25,100,5,100,"%"),loadingShows:I("Show while loading",e(p,{}),{frame:e(c,{}),image:e(g,{})}),videoFrame:i(),mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),poster:a("Image","image/*","Choose an image"),_gTint:o("Image tint"),tintColor:f("Tint color",A),overlay:t("Overlay",e(u,{}),0,100,5,0,"%"),_gOverlay:o("Overlay"),overlayColor:n.overlayColor,overlayPosition:n.overlayPosition},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["videoSource","videoPlayback","loadingShows","videoFrame"]},fallback:"video",rules:{mediaVideo:{all:[r,{field:"videoSource",is:"upload",default:l}]},youtubeUrl:{all:[r,{field:"videoSource",is:"youtube",default:l}]},videoSpeed:{all:[r,{field:"videoSource",is:"upload",default:l},{field:"videoPlayback",is:"background",default:P}]},poster:{all:[{field:"mediaType",is:"video",default:"video"},F]}}})};export{G as HeroSlideFields};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CustomField } from "../controls.js";
|
|
2
|
+
export declare const HERO_OVERLAY_ROWS: {
|
|
3
|
+
overlayColor: CustomField<string>;
|
|
4
|
+
overlayPosition: CustomField<string>;
|
|
5
|
+
};
|
|
6
|
+
export declare function textureColorOfSlide(appState: unknown, slideId: unknown): string | undefined;
|
|
7
|
+
export declare const HERO_SLIDE_OVERLAY_ROWS: {
|
|
8
|
+
overlayColor: CustomField<string>;
|
|
9
|
+
overlayPosition: CustomField<string>;
|
|
10
|
+
};
|
|
11
|
+
export declare const HERO_VIDEO_ROWS: {
|
|
12
|
+
videoSource: import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
|
|
13
|
+
youtubeUrl: CustomField<import("efficient-easel/draw").HidableValue>;
|
|
14
|
+
videoPlayback: import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,Fragment as v}from"react/jsx-runtime";import{PlacementIcon as i,PlayIcon as P,UploadIcon as f}from"efficient-easel/icons";import{useEasel as A}from"efficient-easel/easel";import{colorInput as I,edgePad as s,plainText as L,useSelectedSibling as c}from"../controls.js";import{InheritedColourRow as C}from"../ColourControl.js";import{segmented as O}from"../box-fields.js";import{DEFAULT_TINT as R}from"../../../../format/lib/content/tint.js";import{say as d}from"../../../../format/lib/editor-words.js";import{nonEmptyString as m}from"../../../../format/lib/non-empty-string.js";import{findParentNode as T}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as p,OVERLAY_POSITION_OPTIONS as u,slideOverlayState as n}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as h,VIDEO_PLAYBACK_LABELS as D,VIDEO_PLAYBACKS as w,VIDEO_SOURCE_DEFAULT as x,VIDEO_SOURCE_LABELS as V,VIDEO_SOURCES as b}from"../../../../format/lib/hero-video.js";const Z={overlayColor:I("Overlay color",R),overlayPosition:s("Overlay position",u,p,"A corner would need a diagonal ramp, which this overlay does not draw.",r(i,{}))},y="Texture",E=o=>s("Overlay position",u,o,"A corner would need a diagonal ramp, which this overlay does not draw.",r(i,{}),void 0,y);function g(){try{const{appState:o,selectedItem:e}=A(t=>t);return U(o,e?.props?.id)}catch{return}}function U(o,e){return m(T(o,e)?.props?.textureColor)}function F({value:o,onChange:e}){const[t]=c("overlayPosition"),S=g(),l=m(o)??"",_=n({overlayColor:l,overlayPosition:t},S),a=n({overlayPosition:t});return r(C,{label:d("Overlay color"),value:l,inherited:_.color,resetTo:a.own?a.color:d(y),onChange:e,onReset:()=>e("")})}const Y=E(p),N=E("");function W(o){const[e]=c("overlayColor"),t=n({overlayColor:e,overlayPosition:o.value}).own?Y:N;return r(v,{children:t.render(o)})}const $={overlayColor:{type:"custom",render:({value:o,onChange:e})=>r(F,{value:o,onChange:e})},overlayPosition:{type:"custom",render:({value:o,onChange:e})=>r(W,{value:o,onChange:e})}},oo={videoSource:O("Source",r(f,{}),b.map(o=>({label:V[o],value:o})),x),youtubeUrl:L("YouTube link","https://youtu.be/…"),videoPlayback:O("Playback",r(P,{}),w.map(o=>({label:D[o],value:o})),h)};export{Z as HERO_OVERLAY_ROWS,$ as HERO_SLIDE_OVERLAY_ROWS,oo as HERO_VIDEO_ROWS,U as textureColorOfSlide};
|
|
@@ -262,7 +262,7 @@ export declare function edgePad(label: string, options: readonly {
|
|
|
262
262
|
label: string;
|
|
263
263
|
value: string;
|
|
264
264
|
cell: EdgeCell;
|
|
265
|
-
}[], fallback: string, hint: string, glyph: ReactNode, icons?: Partial<Record<EdgeCell, ReactNode
|
|
265
|
+
}[], fallback: string, hint: string, glyph: ReactNode, icons?: Partial<Record<EdgeCell, ReactNode>>, emptyReadout?: string): CustomField<string>;
|
|
266
266
|
export type MultiSelectFieldType = CustomField<string[]> & {
|
|
267
267
|
options: readonly SelectOption[];
|
|
268
268
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as N,Fragment as T}from"react/jsx-runtime";import{cloneElement as ye,createContext as Ct,useContext as _t,useEffect as wt,useId as Ce,useRef as z,useState as H}from"react";import{useEasel as oe,useSelectedHost as Y}from"efficient-easel/easel";import{toDateKey as It,fromDateKey as Rt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as _e}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as we,loadingShowsOf as Et}from"../../../format/lib/hero-video.js";import{readHidable as Ie,hidableText as Re}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as re,LINK_FIELD_MARKER as Ee,MEDIA_FIELD_MARKER as Oe,SCAFFOLD_FIELD_MARKER as Te,TEXT_FIELD_MARKER as w,foldMetaOf as ie,textFieldIdentifier as Ot}from"efficient-easel/draw";import Tt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Pe}from"../../../render/lib/document/show-when.js";import Pt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as At,CORNER_RADIUS_MAX as Ae,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Ft,IMAGE_CORNERS_LABEL as kt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Lt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Nt,GALLERY_LAYOUTS as V,GALLERY_LAYOUT_KEYS as vt,galleryChoices as Fe,galleryPictureCells as Bt}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Dt}from"./shell-glyph.js";import{anchorSiblingsOf as Gt,placementPoints as Ht}from"../../../format/lib/hero-group-placement.js";import Mt,{KEEP_HINT_CLASS as Kt}from"../../components/KeepHint.js";import Wt from"../../components/AnchorField.js";import{AdjustIcon as Ut,EyeIcon as $t,AnimationIcon as Xt,BackgroundIcon as jt,BorderAllIcon as zt,BlockSectionIcon as Yt,ColumnWidthsIcon as ke,ColumnsIcon as Le,CornerIcon as Vt,DirectionDownIcon as qt,DirectionLeftIcon as Zt,DirectionRightIcon as Jt,DirectionUpIcon as Qt,EditIcon as en,GapIcon as tn,GridIcon as nn,GroundIcon as Ne,HashIcon as ve,HeightIcon as on,ImageIcon as rn,ListIcon as ln,LocationIcon as Be,PaddingBottomIcon as De,PaddingLeftIcon as Ge,PaddingRightIcon as He,PaddingTopIcon as Me,PageIcon as an,StickyIcon as sn,RotateIcon as cn,SearchIcon as dn,SquareIcon as un,TypeIcon as pn,WidthIcon as fn}from"efficient-easel/icons";import{FieldGlyph as Ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as mn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as We,CORNER_SIDE_POINTS as hn,hasOwnSectionCorners as gn,normalizeCornerSides as Ue}from"../../../format/lib/content/section-corners.js";import{enclosingPath as bn,enclosingSection as xn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as Sn,SettingsField as h,SettingsGroup as yn,SettingsGroupSub as Cn,SettingsSegmented as _n,SettingsBorder as wn,SettingsSidesEach as In,SettingsSwitch as le,borderSides as Rn,borderStartEach as En}from"efficient-easel/panel";import{ListField as On}from"efficient-easel/fields";import{DisplayChips as Tn}from"efficient-shell/ui";import{desktopDisplayChanged as Pn,partShownOnDesktop as An,partShownOnPhone as Fn,phoneDisplayChanged as kn,withDesktopPart as Ln,withPhonePart as Nn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as vn,Checkbox as Bn,ColorSwatch as Dn,CornersInput as Gn,DatePicker as Hn,DateTimePicker as Mn,FOCAL_DEFAULT as Kn,PictureTiles as Wn,IconPicker as Un,IconButton as $e,InputNumber as Xe,Slider as $n,Tooltip as q}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Xn}from"./geocode-resolve.js";import{ColourRow as je,InheritedColourRow as jn}from"./ColourControl.js";import{keptByRow as zn}from"efficient-easel/screen/lib/document/style-fields";import ze from"./MarkupToolbar.js";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Yn,NoControlMark as Vn,noControlField as Ye}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as qn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Zn,resolvePhoneValue as ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Jn}from"efficient-easel/draw";import{SuppressibleText as Qn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as eo,CARD_OUTLINE_OPTIONS as to,DEFAULT_CARD_INDEX_FORMAT as no,DEFAULT_CARD_OUTLINE as oo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as ro,DEFAULT_COVER_INDEX as io}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as lo}from"efficient-easel/draw";import ao from"../../components/MediaUploadField.js";import so from"../../components/MultiSelectField.js";import co from"../../components/SectionThemePicker.js";import uo from"../../components/SearchSelectField.js";import po from"../../components/StorefrontLinkField.js";import{UiIcon as Ve}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as fo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as mo}from"efficient-easel/draw/client";import{encodePartId as ho}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as go,useEaselStrings as bo}from"efficient-easel/strings";import{hasPhoneHeight as xo,resolveSectionMinHeight as So}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as se,hasPhoneStick as yo,resolveSectionStick as Co}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as _o,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as wo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Io,resolveContainerDirection as qe}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Ro,BOX_BLOCK_SPACING_POINTS as Ze,BOX_PHONE_ROW_LABEL as Je,BOX_COLUMNS_MAX as Eo,BOX_COLUMNS_MIN as Qe,BOX_PHONE_ROW_MAX as Oo,BOX_PHONE_ROW_MIN as ce,BOX_SHARE_LABEL as de,BOX_SHARE_PHONE_DEFAULT as To,BOX_SHARE_PHONE_POINTS as Po,BOX_SHARE_POINTS as Ao}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Fo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as et,normalizeTheme as tt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as nt,CONTAINER_GAP_BUILT_IN as ko,CONTAINER_GAP_PHONE as ue,GAP_FIELD_CONTAINER as pe,followsSitePhoneGap as Lo,hasOwnContainerGap as No,hasOwnPhoneGap as fe,resolveContainerGap as ot,resolvePhoneContainerGap as rt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as vo,CARD_IMAGE_BG_OFF as Bo,CARD_IMAGE_BG_SWATCH_NAMES as Do,CARD_IMAGE_BG_SWATCHES as Go,isCardImageBackgroundInheriting as Ho,cardImageBackgroundChoice as Mo,THEME_CARD_IMAGE_BG as Ko}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Wo,SECTION_BG_SWATCHES as Uo,SECTION_BG_SWATCH_NAMES as $o,THEME_SECTION_BG as Xo,isSectionBackgroundInheriting as jo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as zo,nestedAccentValue as it,resolveSectionAccent as J}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Yo,TYPE_SIZE_INHERIT as Vo,isTypeSizeInheriting as qo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Zo,WIDTH_CHOICE_LABEL as Jo,WIDTH_INHERIT as Qo}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as er}from"./panel-heading-scope.js";import{useEaselSession as tr}from"efficient-easel/screen/lib/session-context";import{backendOf as nr}from"../website-session.js";import{BOX_GAP as or,describedAs as R,group as _,iconOf as K,sharedStyleKinds as W}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as rr,phoneTwinFields as lt}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ir,gapField as me,Segmented as he,segmented as lr,select as U,slider as D}from"./box-fields.js";function Bl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function A(e,t){return l("{value} from {from}",{value:e,from:t})}function ar(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):A(`${e}px`,l("Styles"))}function sr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:ar(),onReset:t})}function cr(e){return me({...or,builtIn:ko[e],resolve:(t,n)=>ot(e,t,n?.siteGap),action:(t,n)=>i(sr,{inherited:!No(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[pe]:e}})}function dr(e){return Pe(b("mobile",{[pe]:e,type:"custom",render:t=>i(fr,{container:e,...t})}),at)}function ur(e){return Pe(b("tablet",{[pe]:e,type:"custom",render:t=>i(pr,{container:e,...t})}),at)}const at={not:{field:"gap",in:Array.from({length:-nt.min},(e,t)=>nt.min+t)}};function Dl(e){return{gap:b("desktop",cr(e)),[Jn("gap")]:ur(e),[B("gap")]:dr(e)}}function pr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(ue.min,ot(e,n,o));return me({...ue,builtIn:r,resolve:s=>fe(s)?s:r,action:(s,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(s),detail:A(`${r}px`,l("Desktop")),onReset:()=>c(void 0)})}).render(t)}function fr({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=rt(e,void 0,n,o,r);return me({...ue,builtIn:a,resolve:c=>rt(e,c,n,o,r),action:(c,u)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(c),detail:A(`${a}px`,Lo(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Gl(e){return ir({offered:Io(e),fallback:qe(e,void 0),resolve:t=>qe(e,t)})}function Hl(e,t){return Ht(t?Gt(e,t):[],t)}function mr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:A(l("Full"),l("the page")),onReset:t})}function F({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:u,hidden:f}=Ie(e),m=z(null),p=z(null),d=O=>t(s?{text:O,hidden:f}:O),g=()=>t({text:u,hidden:!f}),x=s&&f,E=Ce(),C=r?Sr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(Mt,{children:l(r)}):void 0,j=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(h,{label:l(n),icon:i(pn,{}),htmlFor:E,className:x?"is-hidden":void 0,hint:C,action:s?i(q,{content:j,children:i($e,{"aria-pressed":f,"aria-label":j,onClick:g,children:f?i(Ve,{name:"eye-off",size:14}):i(Ve,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(ze,{target:a?p:m,value:u,onChange:d}),a?i("textarea",{id:E,ref:p,value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)}):i("input",{id:E,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)})]})})}function Ml(e,t){return{...e,[Te]:t}}function Kl(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Wl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const st="sfPanelOnly";function Ul(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[st]:!0}}function $l(e){return!!e&&typeof e=="object"&&e[st]===!0}function Xl(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ns,SCALAR_TEXT_CONTROLS as os}from"efficient-easel/draw";function jl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[Yn]:o,...r}=e;return{...r,[qn]:!0,render:t}}const hr=new Set(lo),$={type:"radio",options:[{value:!0},{value:!1}]},ct={text:{type:"object",objectFields:{text:{type:"text"},hidden:$}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},k=(e,t)=>{const n=R({...t,[w]:e},{...ct[e.control],label:e.label});if(!hr.has(e.control))return n;const o=t.render;return{...Ye(n,"authored-copy"),render:r=>i(Qn,{name:r.name,children:o(r)})}},zl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",gr={field:"source.slug",set:!0},Yl={not:gr},br="Select a word, then press the highlighter.",xr=new Set([br]),Sr=e=>xr.has(e);function Vl(e,t,n){return k({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ql(e,t,n){return k({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Zl(e,t,n){return k({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Jl(e,t,n){return k({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ql(e){return{type:"custom",[Ee]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(po,{value:Re(t),onChange:n,label:e})}}function ea(e,t,n){return k({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ta={Design:Ut,Animation:Xt};function na(e){return{type:"custom",render:()=>i(yr,{text:e})}}function yr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function oa(e){return ie(e)!==null&&e?.tabs!==void 0}const dt=new Map;function ra(e,t){const n=`${e}\0${t?t.join(""):""}`,o=dt.get(n)??{type:"custom",tabs:t,[re]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(T,{})};return dt.set(n,o),o}const ut=new Map;function ia(e){const t=ut.get(e)??{type:"custom",[re]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(T,{})};return ut.set(e,t),t}function Cr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function la(e,t){return Cr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(T,{})}}function aa(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(T,{})}}function sa({title:e,children:t}){const[n,o]=H(()=>!ge.has(e));return i(yn,{title:e,open:n,onToggle:r=>{o(r),r?ge.delete(e):ge.add(e)},children:t})}const ge=new Set;function ca({label:e}){return i(Cn,{title:l(e),level:er(2)})}function pt({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?l(o[c]):c;return i(q,{content:u,children:i(Dn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function da(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=jo(n,t);return i(h,{label:l(e),icon:i(jt,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(Wo)}),children:pt({swatches:Uo,current:r?Xo:n??t??"",onPick:o,names:$o})})}}}function _r(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=Ho(r,t);return i(h,{label:l(e),icon:i(Ne,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(vo)}),children:pt({swatches:Go,current:a?Ko:Mo(r,t),onPick:o,names:Do})})}}}function ua(e=n=>n,t){return W({_gSectionTheme:_(zo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(co,{value:e(n),onChange:o,followLabel:t})}})}function X({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:u,disabled:f=!1}){const m=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i($n,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:u===void 0?void 0:l(u),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:u,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:d})=>{const g=typeof p=="number"?p:null,x=g===null;return i(h,{label:l(e),icon:f?K(f):void 0,value:x?u||a===void 0?void 0:l(a):`${g}${m}`,changed:!x,action:u?ye(u,{changed:!x,onReset:()=>d(null)}):i(y,{words:S()?.panel,label:l(e),changed:!x,onReset:()=>d(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):X({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const Q="Corners";function be(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(h,{label:l(Q),icon:i(Vt,{}),changed:r,action:ye(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ir,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=Y();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mt(){return Ye({type:"custom",render:()=>i(Vn,{})},"always")}function wr(){const e=Y();return t=>e?.onChangeMany(t)}function Ir({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=L(e.sidesKey),s=Ue(r)??[...We];return i(Gn,{label:l(Q),value:s,corners:hn,onChange:c=>{const u=Ue(c)??[];a(u.length===We.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Ae,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function ht(){return mt()}function Rr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):A(r,l("Styles")),onReset:n})}function Er(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:v}function Or(){return be({sidesKey:"sectionCornerSides",useFollowed:Er,mark:i(Rr,{label:Q}),hint:Tr})}const Tr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function pa(){return W({_gShape:_("Shape"),sectionCorners:Or(),sectionCornerSides:ht(),sectionBorder:gt("desktop"),sectionBorderPhone:gt("mobile")})}const Pr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function Ar(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Fr(){let e;try{const t=tt(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||et.line}function kr({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[u,f]=H(()=>r?En(c,s):!1),m=Pr(),p=d=>Ar(r&&a?d:{width:d.width,color:d.color,...a?{style:d.style}:{}});return i(h,{label:l("Border"),icon:i(zt,{}),action:r?i(In,{each:u,label:l("Each side"),onChange:f}):void 0,children:i(wn,{label:l("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:m,styles:a,max:Fo})})}function Lr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Fr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(kr,{value:e,onChange:t,placeholder:{sides:Rn(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function gt(e){return b(e,{type:"custom",render:({value:t,onChange:n})=>i(Lr,{value:t,onChange:n,tier:e})})}function fa(e){return{type:"custom",render:()=>i(Nr,{partKey:e})}}function Nr({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=P(),r=bo();let a=null;try{a=mo().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Sn,{name:l("Text"),preview:fo(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??go.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(ho(t,e))}})}function bt(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=oe(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?xn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return gn(r)?r:n}function vr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=bt(v);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:A(`${o}px`,l("the section")),onReset:n})}function Br(){return i(T,{children:l("Follows the section's Corners until you set a number here.")})}function Dr(){return be({sidesKey:"cardCornerSides",useFollowed:()=>bt(v),mark:i(vr,{label:Q}),hint:i(Br,{})})}function Gr(){return{type:"custom",render:()=>i(Tt,{})}}function ma(e){return{...e,render:t=>i(Pt,{render:e.render,props:t})}}function ha(){return{_gShape:_("Shape"),cardCorners:Dr(),cardCornerSides:ht(),cardCornersApplyAll:Gr()}}function Hr(e=Ao,t=e[0].value){return R({type:"custom",render:({value:n,onChange:o})=>{const r=e.find(a=>a.value===n)??e.find(a=>a.value===t)??e[0];return i(h,{label:l(de),icon:i(ke,{}),value:l(r.label),children:i(Wn,{className:"sf-gallery-layouts",label:l(de),value:r.value,onChange:o,options:e.map(a=>({value:a.value,label:l(a.label),picture:i("span",{className:"sf-gallery-pic",children:Mr(a.weights).map((s,c)=>i("i",{style:{gridColumn:`span ${s}`}},c))})}))})})}},{type:"select",label:de,options:e.map(n=>({value:n.value,label:n.label}))})}function Mr(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 ga(){return U(Ro,i(tn,{}),Ze,Ze[0].value)}function ba(){return b("mobile",Hr(Po,To))}function Kr(){return b("mobile",D(Je,i(Le,{}),ce,Oo,1,ce,"",{clear:{phoneFollows:!1,hint:ce}}))}const xt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function xa(){const e=D(Je,i(Le,{}),Qe,Eo,1,Qe,"",{clear:{emptyLabel:"Auto"}}),t=lt("columns",e,{...xt,tablet:rr.tablet}),n=lt("columns",e,xt,{phoneRow:Kr()});return{...t,phoneRow:n.phoneRow}}function Sa(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(h,{label:l(e),icon:i(Ke,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!qo(s),detail:l("the Text style in Styles"),onReset:()=>c(Vo),defaultAction:{onPress:()=>c(Yo),title:l("Keep this section's own built-in size"),icon:i(Yt,{})}}),children:X({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ya(){return{_gCellWidth:_("Cell width"),gridSpan:U("Positions",i(ke,{}),[{label:"Auto",value:""},...Array.from({length:Lt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function G(){let e=null,t=null;try{e=_t(Wr),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Wr=Ct(null);function Ur({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const u=G()[s],f=ae(void 0,u,c);return i(T,{children:X({min:e,max:t,step:n,value:ae(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function $r({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=G()[t],c=ae(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${c}${o}`}),onReset:a})}function Xr(e){return ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i($r,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ur,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const jr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},zr={Top:Me,Bottom:De,Left:Ge,Right:He},Yr=e=>{const t=zr[e];return i(t,{})};function Ca(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=C=>jr[C],a=C=>D(r("Top"),i(Me,{}),I.min,I.max,I.step,C,"px"),s=(C,j,O,ne=I)=>b("mobile",Xr({label:r(C),icon:Yr(C),desktopKey:j,min:ne.min,max:ne.max,step:ne.step,fallback:O})),c=e.top??I.min,u=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,d=e.side??p.min,g=e.sidePhone??d,x=e.phone===!0,E=C=>x?b("desktop",C):C;return W({...o?{_gSpacing:_("Padding")}:{},[t]:E(a(c)),...x?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:E(D(r("Bottom"),i(De,{}),I.min,I.max,I.step,u,"px")),...x?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[f]:E(D(r("Left"),i(Ge,{}),p.min,p.max,p.step,d,"px")),...x?{[B(f)]:s("Left",f,g,p)}:{},[m]:E(D(r("Right"),i(He,{}),p.min,p.max,p.step,d,"px")),...x?{[B(m)]:s("Right",m,g,p)}:{}}:{}})}function _a(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&ie(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const ee="Width";function wa(e,t=Zo,n=!0){const o=t.map(r=>({label:Jo[r],value:r}));return W({...n?{_gWidth:_(ee)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(h,{label:l(ee),icon:i(fn,{}),action:n?i(mr,{inherited:a?.inherited??!1,onReset:()=>r(Qo),label:ee}):void 0,children:he({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:ee})})}})}function Ia(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(h,{label:M,icon:K(i(on,{})),action:o?o(a):void 0,children:he({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:M})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?wo:_o;return i("div",{className:"sf-field",children:X({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:M,onChange:r})})}}),n=()=>lr("Unit",i(ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return W({_gHeight:_(M),sectionHeightMode:b("desktop",e()),sectionHeightValue:b("desktop",t()),sectionHeightUnit:b("desktop",n()),sectionHeightModePhone:b("mobile",e(o=>i(Vr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:b("mobile",t()),sectionHeightUnitPhone:b("mobile",n())})}function Vr({onClear:e}){const t=G(),n=xo(t),o=So(t),r=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return i(y,{words:S()?.panel,label:l(M),changed:n,detail:r,onReset:e})}function Ra(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(qr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:X({min:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:_(se),stickTop:b("desktop",e(!1)),stickTopDistance:b("desktop",t()),stickTopPhone:b("mobile",e(!0)),stickTopDistancePhone:b("mobile",t())}}function qr({value:e,onChange:t,labelId:n,phone:o}){const r=G(),a=Co(r),s=o?a.phone:e===!0;return i(h,{label:l(se),labelId:n,icon:K(i(sn,{})),action:N(T,{children:[o?i(y,{words:S()?.panel,label:l(se),changed:yo(r),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,i(le,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const St="e.g. about";function Ea(){return{_gAnchor:_("Anchor"),anchor:k({control:"plainText",label:"Name",placeholder:St},{type:"custom",render:({value:e,onChange:t})=>i(Wt,{value:e,onChange:t,nameBox:(n,o)=>i(F,{value:n,onChange:o,label:"Name",placeholder:St,hideable:!1,markup:!1})})})}}function Oa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Mn,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Ta(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Hn,{id:c,value:Rt(typeof o=="string"?o:null),onChange:u=>r(u?It(u):"")})})}}}function yt(e,t,n,o){return{type:"custom",...R({},{...$,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const u=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(h,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(le,{checked:u,onChange:a,ariaLabelledBy:f})})}}}function Pa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(je,{label:l("Background"),icon:i(an,{}),id:r,value:mn(e),onChange:t})}}}function Aa(e,t){return{type:"custom",...R({},{...$,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(h,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Bn,{id:s,checked:a,onChange:o})})}}}function Fa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(je,{label:l(e),icon:n,value:o||t,onChange:r})}}function ka(){return{type:"custom",render:({value:e,onChange:t})=>i(Zr,{value:typeof e=="string"?e:"",onChange:t})}}function Zr({value:e,onChange:t}){const{hex:n,n:o}=Qr();return i(jn,{label:l("Fill"),icon:i(Ne,{}),value:e,inherited:n,resetTo:A(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Jr(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return J(n);const r=bn(e,t);if(r.length===0)return null;const a=J(it(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=J(it(r[s].sectionAccent));if(c!==null)return c}return J(r[0].sectionAccent)}function Qr(){const e=tt(P().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=oe(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Jr(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??et.background,n:o+1}}const ei=[{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 ti({label:e,value:t,onChange:n,points:o=ei}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(vn,{label:l(e),value:t,points:r,onChange:n})}function La(){return mt()}const Na={top:i(Qt,{}),right:i(Jt,{}),bottom:i(qt,{}),left:i(Zt,{})};function va(e,t,n,o,r,a){const s=m=>t.find(p=>p.value===m),c=m=>({value:m,label:"",disabled:!0,title:o}),u=m=>{const p=t.find(g=>g.cell===m);if(!p)return c(`missing-${m}`);const d=a?.[m];return d?{value:p.value,label:p.label,icon:d}:{value:p.value,label:p.label}},f=[c("corner-top-left"),u("top"),c("corner-top-right"),u("left"),c("centre"),u("right"),c("corner-bottom-left"),u("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:p})=>{const d=t.some(g=>g.value===m)?m:n;return i(h,{label:l(e),icon:r,value:s(d)?.label?l(s(d).label):"",children:ti({label:e,value:d,onChange:p,points:f})})}}}function Ba(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(so,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Da(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(uo,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Ga(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ha=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ma(e,t,n){const o=Object.keys(we).map(r=>({label:we[r],value:r,picture:n[r]}));return{type:"custom",...R({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ni,{label:e,icon:t,options:o,onChange:r})}}function ni({label:e,icon:t,options:n,onChange:o}){const r=Y()?.values??{},a=Et(r),s=a==="frame"&&!!_e(r.mediaVideo)&&!_e(r.videoFrame);return i(h,{label:l(e),icon:K(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:he({options:n,value:a,onChange:o,ariaLabel:e})})}function Ka(e,t,n,o={}){return{type:"custom",[Oe]:!0,render:({value:r,onChange:a,name:s})=>i(ao,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const Wa={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function oi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ua({value:e,onChange:t,label:n}){const o=e||{},r=Y(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,u=s?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!nr(tr()).geocode,m=Ce(),p=(d,g)=>t({...o,[d]:g??void 0});return N(T,{children:[i(h,{label:l(n),icon:i(Be,{}),action:f?i(q,{content:l("Find from the address (OpenStreetMap)"),children:i($e,{"aria-label":l("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(dn,{})})}):void 0,children:f&&o.status?i(q,{content:oi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${Kt}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:s?l("Finding…"):c?l(Xn):l(o.status)})}):null}),i(h,{label:l("Enter by hand"),labelId:m,icon:i(en,{}),action:i(le,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&i(h,{label:l("Latitude, longitude"),icon:i(Be,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Xe,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>p("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(Xe,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>p("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function ri(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ii(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function $a(e,t){return e===null?null:t>e?e:null}function li(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 Xa={label:"Ticker items",icon:i(ln,{})};function ja(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...ct.textList,label:e}),render:({value:r,onChange:a})=>i(ai,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function ai({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=z(null),[c,u]=H(null),f=p=>p.map(d=>({text:d?.text??""})),m=p=>{const d=li(n,p,c);d===null&&(s.current=null),u(d),r(f(p))};return i(On,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(ze,{target:s,value:ri(n,c),onChange:p=>r(ii(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,d,g)=>i("input",{type:"text",className:a&&c===d?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:d+1}),onChange:x=>g({text:x.target.value}),onFocus:x=>{s.current=x.currentTarget,u(d)}})})}function za(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(F,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ya(e){return{_gCards:_("Cards"),coverIndex:U("Cover image",i(rn,{}),ro,String(io),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:_r("Image background",Bo),cardImage:di(),spinOnHover:yt("Rotate on hover",e?.spinDefault??!0,i(cn,{}))}}function Va(){return{outline:U("Card outline",i(un,{}),to,oo),indexBadge:U("Card number",i(ve,{}),eo,no),showBadge:yt("Product badge",!0,i(Ke,{noun:"tag"}))}}function qa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...$,label:te.find(a=>a.id===r).label}),o=r=>R(zn(xe),n(r));return{_gShowOnCard:_("Show on a card"),[xe]:R({type:"custom",render:()=>i(si,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(xe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const xe="showCardPrice",te=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function si({rest:e}){const t=G(),n=wr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=te.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(Se,{parts:te,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(te.map(({id:s})=>[s,void 0])))})}function Za(e,t="display"){const n=B(t);return{[t]:b("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Se,{parts:e,changed:Pn(o),shown:a=>An(o,a),onPress:(a,s)=>r(Ln(o,a,s)),onReset:()=>r(void 0)})}),[n]:b("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ci,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Se({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(h,{label:c,icon:i($t,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(Tn,{label:c,items:e.map(u=>({id:u.id,label:l(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function ci({parts:e,desktopKey:t,value:n,onChange:o}){const r=G()[t];return i(Se,{parts:e,changed:kn(n),shown:a=>Fn(r,n,a),onPress:(a,s)=>o(Nn(n,a,s)),onReset:()=>o(Zn),detail:l("the same as Desktop")})}function di(){return ft("Card image",{min:v,max:Ae,step:At,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ja(){return be({sidesKey:"cornerSides",step:Ft,useFollowed:()=>v,mark:i(ui,{label:kt}),hint:l("Rounds the picture. Left alone it stays square.")})}function ui({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function Qa(){return{type:"custom",render:({value:e,onChange:t})=>i(hi,{value:typeof e=="string"?e:"",onChange:t})}}function pi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Bt(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const fi={width:"3.5rem",height:"2.5rem"},mi=200;function hi({value:e,onChange:t}){const[n,o]=H(null),[r,a]=H(4),s=z(null);wt(()=>{const d=s.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>a(d.getBoundingClientRect().width>=mi?4:3);g();const x=new ResizeObserver(g);return x.observe(d),()=>x.disconnect()},[]);const c=e&&e in V?e:"",u=Fe(n,c),f=Fe(n,"").length,m=Dt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:m},...u.map(d=>({value:d,label:l(V[d].label),icon:i(pi,{layout:V[d],width:40})}))];return i(h,{label:l("Layout"),icon:i(nn,{}),value:c?l(V[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Un,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:fi,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(_n,{options:[{id:"all",label:l("All")},...Nt.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:vt.length})})]})})})})}export{gr as BOUND_TO_POST,zl as BOUND_TO_POST_NOTE,ta as BUCKET_ICONS,Wa as CUSTOM_FIELD_MEDIA,Ua as CoordsField,at as DESKTOP_GAP_NOT_OVERLAP,Se as DisplayRow,Na as EDGE_ARROWS,Kn as FOCAL_DEFAULT,ei as FOCAL_POINTS,re as FOLD_FIELD_MARKER,ti as FocalPicker,ca as GroupLabel,br as HIGHLIGHT_HINT,F as HidableTextField,Ee as LINK_FIELD_MARKER,Bl as Label,Oe as MEDIA_FIELD_MARKER,Ha as MEDIA_TYPE_OPTIONS,Yl as NOT_BOUND_TO_POST,sa as PanelBand,yr as PanelNoteLine,Wr as RowPropsContext,Te as SCAFFOLD_FIELD_MARKER,os as SCALAR_TEXT_CONTROLS,sr as SiteGapDefaultReset,X as Slider,pt as Swatches,ns as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,Xa as TICKER_ITEMS_ROW,ai as TextListField,ee as WIDTH_LABEL,mr as WidthDefaultReset,li as aimAfterListChange,Ea as anchorFields,A as backTo,da as backgroundField,ga as boxBlockSpacingField,xa as boxColumnsFields,ka as boxFillField,Kr as boxPhoneRowField,Hr as boxShareField,ba as boxSharePhoneField,Jr as boxThemeIndexOf,ra as bucketHeader,fa as buttonWordsEntryField,Dr as cardCornersField,_r as cardImageBackgroundField,di as cardImageField,Ya as cardMediaFields,ha as cardShapeFields,qa as cardShowFields,Va as cardStyleFields,ya as cellWidthFields,Aa as checkbox,Fa as colorInput,Gl as containerDirectionField,cr as containerGapField,dr as containerGapPhoneField,Dl as containerGapRows,ur as containerGapTabletField,oi as coordsResultTip,Jl as copyText,ht as cornerSidesField,be as cornersRowField,Ta as date,Oa as dateTime,ia as designGroupHeader,Za as displayFields,va as edgePad,$a as focusAfterRemove,La as focusKeptField,la as foldMarker,ie as foldMetaOf,Cr as foldTitleOf,Qa as galleryLayoutField,Ia as heightFields,Hl as heroGroupPlacementPoints,Re as hidableText,Sr as hintIsWhileTyping,Ja as imageCornersField,jl as inOwnBox,oa as isBucketHeader,mt as keptBy,Ql as linkField,Ma as loadingShowsField,Ba as multiSelect,Pa as pageBackgroundField,na as panelNote,Xr as phoneOverrideField,Zl as plainText,ea as plainTextarea,ft as pxField,aa as quietMarker,Ie as readHidable,ri as rowText,Da as searchSelect,gt as sectionBorderField,Or as sectionCornersField,pa as sectionShapeFields,ua as sectionThemeFields,ii as setRowText,Sa as sizeField,Ga as sourceField,Ca as spacingFields,Ra as stickFields,_a as swapPadding,ma as templateField,Vl as text,Ot as textFieldIdentifier,Wl as textFieldOffPage,$l as textFieldPanelOnly,ja as textList,za as textListRowField,ql as textarea,yt as toggle,Ka as upload,wr as useSelectedPatch,G as useSelectedProps,L as useSelectedSibling,ar as useSiteGapDetail,wa as widthField,Xl as withIdentifier,Kl as withOffPage,Ul as withPanelOnly,Ml as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as N,Fragment as T}from"react/jsx-runtime";import{cloneElement as ye,createContext as yt,useContext as Ct,useEffect as _t,useId as Ce,useRef as z,useState as H}from"react";import{useEasel as oe,useSelectedHost as Y}from"efficient-easel/easel";import{toDateKey as wt,fromDateKey as It}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as _e}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as we,loadingShowsOf as Et}from"../../../format/lib/hero-video.js";import{readHidable as Ie,hidableText as Ee}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as re,LINK_FIELD_MARKER as Re,MEDIA_FIELD_MARKER as Oe,SCAFFOLD_FIELD_MARKER as Te,TEXT_FIELD_MARKER as w,foldMetaOf as ie,textFieldIdentifier as Rt}from"efficient-easel/draw";import Ot from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Pe}from"../../../render/lib/document/show-when.js";import Tt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Pt,CORNER_RADIUS_MAX as Ae,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as At,IMAGE_CORNERS_LABEL as Ft}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as kt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Lt,GALLERY_LAYOUTS as V,GALLERY_LAYOUT_KEYS as Nt,galleryChoices as Fe,galleryPictureCells as vt}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Bt}from"./shell-glyph.js";import{anchorSiblingsOf as Dt,placementPoints as Gt}from"../../../format/lib/hero-group-placement.js";import Ht,{KEEP_HINT_CLASS as Mt}from"../../components/KeepHint.js";import Kt from"../../components/AnchorField.js";import{AdjustIcon as Wt,EyeIcon as Ut,AnimationIcon as $t,BackgroundIcon as Xt,BorderAllIcon as jt,BlockSectionIcon as zt,ColumnWidthsIcon as ke,ColumnsIcon as Le,CornerIcon as Yt,DirectionDownIcon as Vt,DirectionLeftIcon as qt,DirectionRightIcon as Zt,DirectionUpIcon as Jt,EditIcon as Qt,GapIcon as en,GridIcon as tn,GroundIcon as Ne,HashIcon as ve,HeightIcon as nn,ImageIcon as on,ListIcon as rn,LocationIcon as Be,PaddingBottomIcon as De,PaddingLeftIcon as Ge,PaddingRightIcon as He,PaddingTopIcon as Me,PageIcon as ln,StickyIcon as an,SearchIcon as sn,SquareIcon as cn,TypeIcon as dn,WidthIcon as un}from"efficient-easel/icons";import{FieldGlyph as Ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as pn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as We,CORNER_SIDE_POINTS as fn,hasOwnSectionCorners as mn,normalizeCornerSides as Ue}from"../../../format/lib/content/section-corners.js";import{enclosingPath as hn,enclosingSection as gn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as bn,SettingsField as b,SettingsGroup as xn,SettingsGroupSub as Sn,SettingsSegmented as yn,SettingsBorder as Cn,SettingsSidesEach as _n,SettingsSwitch as le,borderSides as wn,borderStartEach as In}from"efficient-easel/panel";import{ListField as En}from"efficient-easel/fields";import{DisplayChips as Rn}from"efficient-shell/ui";import{desktopDisplayChanged as On,partShownOnDesktop as Tn,partShownOnPhone as Pn,phoneDisplayChanged as An,withDesktopPart as Fn,withPhonePart as kn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Ln,Checkbox as Nn,ColorSwatch as vn,CornersInput as Bn,DatePicker as Dn,DateTimePicker as Gn,FOCAL_DEFAULT as Hn,PictureTiles as Mn,IconPicker as Kn,IconButton as $e,InputNumber as Xe,Slider as Wn,Tooltip as q}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Un}from"./geocode-resolve.js";import{ColourRow as je,InheritedColourRow as $n}from"./ColourControl.js";import{keptByRow as Xn}from"efficient-easel/screen/lib/document/style-fields";import ze from"./MarkupToolbar.js";import{deviceField as x}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as jn,NoControlMark as zn,noControlField as Ye}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Yn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Vn,resolvePhoneValue as ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as qn}from"efficient-easel/draw";import{SuppressibleText as Zn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Jn,CARD_OUTLINE_OPTIONS as Qn,DEFAULT_CARD_INDEX_FORMAT as eo,DEFAULT_CARD_OUTLINE as to}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as no,DEFAULT_COVER_INDEX as oo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ro}from"efficient-easel/draw";import io from"../../components/MediaUploadField.js";import lo from"../../components/MultiSelectField.js";import ao from"../../components/SectionThemePicker.js";import so from"../../components/SearchSelectField.js";import co from"../../components/StorefrontLinkField.js";import{UiIcon as Ve}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as uo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as po}from"efficient-easel/draw/client";import{encodePartId as fo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as mo,useEaselStrings as ho}from"efficient-easel/strings";import{hasPhoneHeight as go,resolveSectionMinHeight as bo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as se,hasPhoneStick as xo,resolveSectionStick as So}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as yo,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as Co}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as _o,resolveContainerDirection as qe}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as wo,BOX_BLOCK_SPACING_POINTS as Ze,BOX_PHONE_ROW_LABEL as Je,BOX_COLUMNS_MAX as Io,BOX_COLUMNS_MIN as Qe,BOX_PHONE_ROW_MAX as Eo,BOX_PHONE_ROW_MIN as ce,BOX_SHARE_LABEL as de,BOX_SHARE_PHONE_DEFAULT as Ro,BOX_SHARE_PHONE_POINTS as Oo,BOX_SHARE_POINTS as To}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Po}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as et,normalizeTheme as tt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as nt,CONTAINER_GAP_BUILT_IN as Ao,CONTAINER_GAP_PHONE as ue,GAP_FIELD_CONTAINER as pe,followsSitePhoneGap as Fo,hasOwnContainerGap as ko,hasOwnPhoneGap as fe,resolveContainerGap as ot,resolvePhoneContainerGap as rt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Lo,CARD_IMAGE_BG_OFF as No,CARD_IMAGE_BG_SWATCH_NAMES as vo,CARD_IMAGE_BG_SWATCHES as Bo,isCardImageBackgroundInheriting as Do,cardImageBackgroundChoice as Go,THEME_CARD_IMAGE_BG as Ho}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Mo,SECTION_BG_SWATCHES as Ko,SECTION_BG_SWATCH_NAMES as Wo,THEME_SECTION_BG as Uo,isSectionBackgroundInheriting as $o}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Xo,nestedAccentValue as it,resolveSectionAccent as J}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as jo,TYPE_SIZE_INHERIT as zo,isTypeSizeInheriting as Yo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Vo,WIDTH_CHOICE_LABEL as qo,WIDTH_INHERIT as Zo}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Jo}from"./panel-heading-scope.js";import{useEaselSession as Qo}from"efficient-easel/screen/lib/session-context";import{backendOf as er}from"../website-session.js";import{BOX_GAP as tr,describedAs as E,group as _,iconOf as K,sharedStyleKinds as W}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nr,phoneTwinFields as lt}from"efficient-easel/screen/lib/document/box-fields";import{directionField as or,gapField as me,Segmented as he,segmented as rr,select as U,slider as D}from"./box-fields.js";function vl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function A(e,t){return l("{value} from {from}",{value:e,from:t})}function ir(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):A(`${e}px`,l("Styles"))}function lr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:ir(),onReset:t})}function ar(e){return me({...tr,builtIn:Ao[e],resolve:(t,n)=>ot(e,t,n?.siteGap),action:(t,n)=>i(lr,{inherited:!ko(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[pe]:e}})}function sr(e){return Pe(x("mobile",{[pe]:e,type:"custom",render:t=>i(ur,{container:e,...t})}),at)}function cr(e){return Pe(x("tablet",{[pe]:e,type:"custom",render:t=>i(dr,{container:e,...t})}),at)}const at={not:{field:"gap",in:Array.from({length:-nt.min},(e,t)=>nt.min+t)}};function Bl(e){return{gap:x("desktop",ar(e)),[qn("gap")]:cr(e),[B("gap")]:sr(e)}}function dr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(ue.min,ot(e,n,o));return me({...ue,builtIn:r,resolve:s=>fe(s)?s:r,action:(s,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(s),detail:A(`${r}px`,l("Desktop")),onReset:()=>c(void 0)})}).render(t)}function ur({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=rt(e,void 0,n,o,r);return me({...ue,builtIn:a,resolve:c=>rt(e,c,n,o,r),action:(c,u)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(c),detail:A(`${a}px`,Fo(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Dl(e){return or({offered:_o(e),fallback:qe(e,void 0),resolve:t=>qe(e,t)})}function Gl(e,t){return Gt(t?Dt(e,t):[],t)}function pr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:A(l("Full"),l("the page")),onReset:t})}function F({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:u,hidden:f}=Ie(e),g=z(null),p=z(null),d=O=>t(s?{text:O,hidden:f}:O),m=()=>t({text:u,hidden:!f}),h=s&&f,R=Ce(),C=r?br(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(Ht,{children:l(r)}):void 0,j=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(b,{label:l(n),icon:i(dn,{}),htmlFor:R,className:h?"is-hidden":void 0,hint:C,action:s?i(q,{content:j,children:i($e,{"aria-pressed":f,"aria-label":j,onClick:m,children:f?i(Ve,{name:"eye-off",size:14}):i(Ve,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(ze,{target:a?p:g,value:u,onChange:d}),a?i("textarea",{id:R,ref:p,value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)}):i("input",{id:R,ref:g,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)})]})})}function Hl(e,t){return{...e,[Te]:t}}function Ml(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Kl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const st="sfPanelOnly";function Wl(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[st]:!0}}function Ul(e){return!!e&&typeof e=="object"&&e[st]===!0}function $l(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ts,SCALAR_TEXT_CONTROLS as ns}from"efficient-easel/draw";function Xl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[jn]:o,...r}=e;return{...r,[Yn]:!0,render:t}}const fr=new Set(ro),$={type:"radio",options:[{value:!0},{value:!1}]},ct={text:{type:"object",objectFields:{text:{type:"text"},hidden:$}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},k=(e,t)=>{const n=E({...t,[w]:e},{...ct[e.control],label:e.label});if(!fr.has(e.control))return n;const o=t.render;return{...Ye(n,"authored-copy"),render:r=>i(Zn,{name:r.name,children:o(r)})}},jl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",mr={field:"source.slug",set:!0},zl={not:mr},hr="Select a word, then press the highlighter.",gr=new Set([hr]),br=e=>gr.has(e);function Yl(e,t,n){return k({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Vl(e,t,n){return k({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function ql(e,t,n){return k({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Zl(e,t,n){return k({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Jl(e){return{type:"custom",[Re]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(co,{value:Ee(t),onChange:n,label:e})}}function Ql(e,t,n){return k({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ea={Design:Wt,Animation:$t};function ta(e){return{type:"custom",render:()=>i(xr,{text:e})}}function xr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function na(e){return ie(e)!==null&&e?.tabs!==void 0}const dt=new Map;function oa(e,t){const n=`${e}\0${t?t.join(""):""}`,o=dt.get(n)??{type:"custom",tabs:t,[re]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(T,{})};return dt.set(n,o),o}const ut=new Map;function ra(e){const t=ut.get(e)??{type:"custom",[re]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(T,{})};return ut.set(e,t),t}function Sr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ia(e,t){return Sr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(T,{})}}function la(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(T,{})}}function aa({title:e,children:t}){const[n,o]=H(()=>!ge.has(e));return i(xn,{title:e,open:n,onToggle:r=>{o(r),r?ge.delete(e):ge.add(e)},children:t})}const ge=new Set;function sa({label:e}){return i(Sn,{title:l(e),level:Jo(2)})}function pt({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?l(o[c]):c;return i(q,{content:u,children:i(vn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function ca(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=$o(n,t);return i(b,{label:l(e),icon:i(Xt,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(Mo)}),children:pt({swatches:Ko,current:r?Uo:n??t??"",onPick:o,names:Wo})})}}}function yr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=Do(r,t);return i(b,{label:l(e),icon:i(Ne,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Lo)}),children:pt({swatches:Bo,current:a?Ho:Go(r,t),onPick:o,names:vo})})}}}function da(e=n=>n,t){return W({_gSectionTheme:_(Xo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(ao,{value:e(n),onChange:o,followLabel:t})}})}function X({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:u,disabled:f=!1}){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(Wn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:u===void 0?void 0:l(u),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:u,icon:f,unit:g="px"}=t;return{type:"custom",render:({value:p,onChange:d})=>{const m=typeof p=="number"?p:null,h=m===null;return i(b,{label:l(e),icon:f?K(f):void 0,value:h?u||a===void 0?void 0:l(a):`${m}${g}`,changed:!h,action:u?ye(u,{changed:!h,onReset:()=>d(null)}):i(y,{words:S()?.panel,label:l(e),changed:!h,onReset:()=>d(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:d}):X({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:d})})}}}const Q="Corners";function be(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(b,{label:l(Q),icon:i(Yt,{}),changed:r,action:ye(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(_r,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=Y();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mt(){return Ye({type:"custom",render:()=>i(zn,{})},"always")}function Cr(){const e=Y();return t=>e?.onChangeMany(t)}function _r({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=L(e.sidesKey),s=Ue(r)??[...We];return i(Bn,{label:l(Q),value:s,corners:fn,onChange:c=>{const u=Ue(c)??[];a(u.length===We.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Ae,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function ht(){return mt()}function wr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):A(r,l("Styles")),onReset:n})}function Ir(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:v}function Er(){return be({sidesKey:"sectionCornerSides",useFollowed:Ir,mark:i(wr,{label:Q}),hint:Rr})}const Rr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function ua(){return W({_gShape:_("Shape"),sectionCorners:Er(),sectionCornerSides:ht(),sectionBorder:gt("desktop"),sectionBorderPhone:gt("mobile")})}const Or=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function Tr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Pr(){let e;try{const t=tt(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||et.line}function Ar({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[u,f]=H(()=>r?In(c,s):!1),g=Or(),p=d=>Tr(r&&a?d:{width:d.width,color:d.color,...a?{style:d.style}:{}});return i(b,{label:l("Border"),icon:i(jt,{}),action:r?i(_n,{each:u,label:l("Each side"),onChange:f}):void 0,children:i(Cn,{label:l("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:g,styles:a,max:Po})})}function Fr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Pr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(Ar,{value:e,onChange:t,placeholder:{sides:wn(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function gt(e){return x(e,{type:"custom",render:({value:t,onChange:n})=>i(Fr,{value:t,onChange:n,tier:e})})}function pa(e){return{type:"custom",render:()=>i(kr,{partKey:e})}}function kr({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=P(),r=ho();let a=null;try{a=po().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(bn,{name:l("Text"),preview:uo(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??mo.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(fo(t,e))}})}function bt(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=oe(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?gn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return mn(r)?r:n}function Lr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=bt(v);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:A(`${o}px`,l("the section")),onReset:n})}function Nr(){return i(T,{children:l("Follows the section's Corners until you set a number here.")})}function vr(){return be({sidesKey:"cardCornerSides",useFollowed:()=>bt(v),mark:i(Lr,{label:Q}),hint:i(Nr,{})})}function Br(){return{type:"custom",render:()=>i(Ot,{})}}function fa(e){return{...e,render:t=>i(Tt,{render:e.render,props:t})}}function ma(){return{_gShape:_("Shape"),cardCorners:vr(),cardCornerSides:ht(),cardCornersApplyAll:Br()}}function Dr(e=To,t=e[0].value){return E({type:"custom",render:({value:n,onChange:o})=>{const r=e.find(a=>a.value===n)??e.find(a=>a.value===t)??e[0];return i(b,{label:l(de),icon:i(ke,{}),value:l(r.label),children:i(Mn,{className:"sf-gallery-layouts",label:l(de),value:r.value,onChange:o,options:e.map(a=>({value:a.value,label:l(a.label),picture:i("span",{className:"sf-gallery-pic",children:Gr(a.weights).map((s,c)=>i("i",{style:{gridColumn:`span ${s}`}},c))})}))})})}},{type:"select",label:de,options:e.map(n=>({value:n.value,label:n.label}))})}function Gr(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 ha(){return U(wo,i(en,{}),Ze,Ze[0].value)}function ga(){return x("mobile",Dr(Oo,Ro))}function Hr(){return x("mobile",D(Je,i(Le,{}),ce,Eo,1,ce,"",{clear:{phoneFollows:!1,hint:ce}}))}const xt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function ba(){const e=D(Je,i(Le,{}),Qe,Io,1,Qe,"",{clear:{emptyLabel:"Auto"}}),t=lt("columns",e,{...xt,tablet:nr.tablet}),n=lt("columns",e,xt,{phoneRow:Hr()});return{...t,phoneRow:n.phoneRow}}function xa(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(b,{label:l(e),icon:i(Ke,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!Yo(s),detail:l("the Text style in Styles"),onReset:()=>c(zo),defaultAction:{onPress:()=>c(jo),title:l("Keep this section's own built-in size"),icon:i(zt,{})}}),children:X({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Sa(){return{_gCellWidth:_("Cell width"),gridSpan:U("Positions",i(ke,{}),[{label:"Auto",value:""},...Array.from({length:kt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function G(){let e=null,t=null;try{e=Ct(Mr),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Mr=yt(null);function Kr({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const u=G()[s],f=ae(void 0,u,c);return i(T,{children:X({min:e,max:t,step:n,value:ae(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function Wr({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=G()[t],c=ae(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${c}${o}`}),onReset:a})}function Ur(e){return ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Wr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Kr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const $r={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Xr={Top:Me,Bottom:De,Left:Ge,Right:He},jr=e=>{const t=Xr[e];return i(t,{})};function ya(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=C=>$r[C],a=C=>D(r("Top"),i(Me,{}),I.min,I.max,I.step,C,"px"),s=(C,j,O,ne=I)=>x("mobile",Ur({label:r(C),icon:jr(C),desktopKey:j,min:ne.min,max:ne.max,step:ne.step,fallback:O})),c=e.top??I.min,u=e.bottom??I.min,f="sectionPaddingLeft",g="sectionPaddingRight",p=e.sideBounds??I,d=e.side??p.min,m=e.sidePhone??d,h=e.phone===!0,R=C=>h?x("desktop",C):C;return W({...o?{_gSpacing:_("Padding")}:{},[t]:R(a(c)),...h?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:R(D(r("Bottom"),i(De,{}),I.min,I.max,I.step,u,"px")),...h?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[f]:R(D(r("Left"),i(Ge,{}),p.min,p.max,p.step,d,"px")),...h?{[B(f)]:s("Left",f,m,p)}:{},[g]:R(D(r("Right"),i(He,{}),p.min,p.max,p.step,d,"px")),...h?{[B(g)]:s("Right",g,m,p)}:{}}:{}})}function Ca(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&ie(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const ee="Width";function _a(e,t=Vo,n=!0){const o=t.map(r=>({label:qo[r],value:r}));return W({...n?{_gWidth:_(ee)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(b,{label:l(ee),icon:i(un,{}),action:n?i(pr,{inherited:a?.inherited??!1,onReset:()=>r(Zo),label:ee}):void 0,children:he({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:ee})})}})}function wa(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(b,{label:M,icon:K(i(nn,{})),action:o?o(a):void 0,children:he({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:M})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?Co:yo;return i("div",{className:"sf-field",children:X({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:M,onChange:r})})}}),n=()=>rr("Unit",i(ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return W({_gHeight:_(M),sectionHeightMode:x("desktop",e()),sectionHeightValue:x("desktop",t()),sectionHeightUnit:x("desktop",n()),sectionHeightModePhone:x("mobile",e(o=>i(zr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:x("mobile",t()),sectionHeightUnitPhone:x("mobile",n())})}function zr({onClear:e}){const t=G(),n=go(t),o=bo(t),r=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return i(y,{words:S()?.panel,label:l(M),changed:n,detail:r,onReset:e})}function Ia(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(Yr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:X({min:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:_(se),stickTop:x("desktop",e(!1)),stickTopDistance:x("desktop",t()),stickTopPhone:x("mobile",e(!0)),stickTopDistancePhone:x("mobile",t())}}function Yr({value:e,onChange:t,labelId:n,phone:o}){const r=G(),a=So(r),s=o?a.phone:e===!0;return i(b,{label:l(se),labelId:n,icon:K(i(an,{})),action:N(T,{children:[o?i(y,{words:S()?.panel,label:l(se),changed:xo(r),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,i(le,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const St="e.g. about";function Ea(){return{_gAnchor:_("Anchor"),anchor:k({control:"plainText",label:"Name",placeholder:St},{type:"custom",render:({value:e,onChange:t})=>i(Kt,{value:e,onChange:t,nameBox:(n,o)=>i(F,{value:n,onChange:o,label:"Name",placeholder:St,hideable:!1,markup:!1})})})}}function Ra(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Gn,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Oa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Dn,{id:c,value:It(typeof o=="string"?o:null),onChange:u=>r(u?wt(u):"")})})}}}function Vr(e,t,n,o){return{type:"custom",...E({},{...$,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const u=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(b,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(le,{checked:u,onChange:a,ariaLabelledBy:f})})}}}function Ta(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(je,{label:l("Background"),icon:i(ln,{}),id:r,value:pn(e),onChange:t})}}}function Pa(e,t){return{type:"custom",...E({},{...$,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(b,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Nn,{id:s,checked:a,onChange:o})})}}}function Aa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(je,{label:l(e),icon:n,value:o||t,onChange:r})}}function Fa(){return{type:"custom",render:({value:e,onChange:t})=>i(qr,{value:typeof e=="string"?e:"",onChange:t})}}function qr({value:e,onChange:t}){const{hex:n,n:o}=Jr();return i($n,{label:l("Fill"),icon:i(Ne,{}),value:e,inherited:n,resetTo:A(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Zr(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return J(n);const r=hn(e,t);if(r.length===0)return null;const a=J(it(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=J(it(r[s].sectionAccent));if(c!==null)return c}return J(r[0].sectionAccent)}function Jr(){const e=tt(P().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=oe(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Zr(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??et.background,n:o+1}}const Qr=[{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 ei({label:e,value:t,onChange:n,points:o=Qr}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(Ln,{label:l(e),value:t,points:r,onChange:n})}function ka(){return mt()}const La={top:i(Jt,{}),right:i(Zt,{}),bottom:i(Vt,{}),left:i(qt,{})};function Na(e,t,n,o,r,a,s){const c=p=>t.find(d=>d.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const d=t.find(h=>h.cell===p);if(!d)return u(`missing-${p}`);const m=a?.[p];return m?{value:d.value,label:d.label,icon:m}:{value:d.value,label:d.label}},g=[u("corner-top-left"),f("top"),u("corner-top-right"),f("left"),u("centre"),f("right"),u("corner-bottom-left"),f("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:d})=>{const m=t.some(h=>h.value===p)?p:n;return i(b,{label:l(e),icon:r,value:c(m)?.label?l(c(m).label):s?l(s):"",children:ei({label:e,value:m,onChange:d,points:g})})}}}function va(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(lo,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Ba(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(so,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Da(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ga=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ha(e,t,n){const o=Object.keys(we).map(r=>({label:we[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ti,{label:e,icon:t,options:o,onChange:r})}}function ti({label:e,icon:t,options:n,onChange:o}){const r=Y()?.values??{},a=Et(r),s=a==="frame"&&!!_e(r.mediaVideo)&&!_e(r.videoFrame);return i(b,{label:l(e),icon:K(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:he({options:n,value:a,onChange:o,ariaLabel:e})})}function Ma(e,t,n,o={}){return{type:"custom",[Oe]:!0,render:({value:r,onChange:a,name:s})=>i(io,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const Ka={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ni(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Wa({value:e,onChange:t,label:n}){const o=e||{},r=Y(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,u=s?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!er(Qo()).geocode,g=Ce(),p=(d,m)=>t({...o,[d]:m??void 0});return N(T,{children:[i(b,{label:l(n),icon:i(Be,{}),action:f?i(q,{content:l("Find from the address (OpenStreetMap)"),children:i($e,{"aria-label":l("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(sn,{})})}):void 0,children:f&&o.status?i(q,{content:ni(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${Mt}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:s?l("Finding…"):c?l(Un):l(o.status)})}):null}),i(b,{label:l("Enter by hand"),labelId:g,icon:i(Qt,{}),action:i(le,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:g})}),o.manual&&i(b,{label:l("Latitude, longitude"),icon:i(Be,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Xe,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>p("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(Xe,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>p("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function oi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ri(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function Ua(e,t){return e===null?null:t>e?e:null}function ii(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 $a={label:"Ticker items",icon:i(rn,{})};function Xa(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...ct.textList,label:e}),render:({value:r,onChange:a})=>i(li,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function li({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=z(null),[c,u]=H(null),f=p=>p.map(d=>({text:d?.text??""})),g=p=>{const d=ii(n,p,c);d===null&&(s.current=null),u(d),r(f(p))};return i(En,{label:l(e),icon:t,noun:l("item"),items:n,onChange:g,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(ze,{target:s,value:oi(n,c),onChange:p=>r(ri(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,d,m)=>i("input",{type:"text",className:a&&c===d?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:d+1}),onChange:h=>m({text:h.target.value}),onFocus:h=>{s.current=h.currentTarget,u(d)}})})}function ja(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(F,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function za(e){return{_gCards:_("Cards"),coverIndex:U("Cover image",i(on,{}),no,String(oo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:yr("Image background",No),cardImage:ci()}}function Ya(){return{outline:U("Card outline",i(cn,{}),Qn,to),indexBadge:U("Card number",i(ve,{}),Jn,eo),showBadge:Vr("Product badge",!0,i(Ke,{noun:"tag"}))}}function Va(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...$,label:te.find(a=>a.id===r).label}),o=r=>E(Xn(xe),n(r));return{_gShowOnCard:_("Show on a card"),[xe]:E({type:"custom",render:()=>i(ai,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(xe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const xe="showCardPrice",te=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function ai({rest:e}){const t=G(),n=Cr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=te.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(Se,{parts:te,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(te.map(({id:s})=>[s,void 0])))})}function qa(e,t="display"){const n=B(t);return{[t]:x("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Se,{parts:e,changed:On(o),shown:a=>Tn(o,a),onPress:(a,s)=>r(Fn(o,a,s)),onReset:()=>r(void 0)})}),[n]:x("mobile",{type:"custom",render:({value:o,onChange:r})=>i(si,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Se({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(b,{label:c,icon:i(Ut,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(Rn,{label:c,items:e.map(u=>({id:u.id,label:l(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function si({parts:e,desktopKey:t,value:n,onChange:o}){const r=G()[t];return i(Se,{parts:e,changed:An(n),shown:a=>Pn(r,n,a),onPress:(a,s)=>o(kn(n,a,s)),onReset:()=>o(Vn),detail:l("the same as Desktop")})}function ci(){return ft("Card image",{min:v,max:Ae,step:Pt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Za(){return be({sidesKey:"cornerSides",step:At,useFollowed:()=>v,mark:i(di,{label:Ft}),hint:l("Rounds the picture. Left alone it stays square.")})}function di({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function Ja(){return{type:"custom",render:({value:e,onChange:t})=>i(mi,{value:typeof e=="string"?e:"",onChange:t})}}function ui({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:vt(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const pi={width:"3.5rem",height:"2.5rem"},fi=200;function mi({value:e,onChange:t}){const[n,o]=H(null),[r,a]=H(4),s=z(null);_t(()=>{const d=s.current;if(!d||typeof ResizeObserver!="function")return;const m=()=>a(d.getBoundingClientRect().width>=fi?4:3);m();const h=new ResizeObserver(m);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in V?e:"",u=Fe(n,c),f=Fe(n,"").length,g=Bt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:g},...u.map(d=>({value:d,label:l(V[d].label),icon:i(ui,{layout:V[d],width:40})}))];return i(b,{label:l("Layout"),icon:i(tn,{}),value:c?l(V[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Kn,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:pi,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(yn,{options:[{id:"all",label:l("All")},...Lt.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:Nt.length})})]})})})})}export{mr as BOUND_TO_POST,jl as BOUND_TO_POST_NOTE,ea as BUCKET_ICONS,Ka as CUSTOM_FIELD_MEDIA,Wa as CoordsField,at as DESKTOP_GAP_NOT_OVERLAP,Se as DisplayRow,La as EDGE_ARROWS,Hn as FOCAL_DEFAULT,Qr as FOCAL_POINTS,re as FOLD_FIELD_MARKER,ei as FocalPicker,sa as GroupLabel,hr as HIGHLIGHT_HINT,F as HidableTextField,Re as LINK_FIELD_MARKER,vl as Label,Oe as MEDIA_FIELD_MARKER,Ga as MEDIA_TYPE_OPTIONS,zl as NOT_BOUND_TO_POST,aa as PanelBand,xr as PanelNoteLine,Mr as RowPropsContext,Te as SCAFFOLD_FIELD_MARKER,ns as SCALAR_TEXT_CONTROLS,lr as SiteGapDefaultReset,X as Slider,pt as Swatches,ts as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,$a as TICKER_ITEMS_ROW,li as TextListField,ee as WIDTH_LABEL,pr as WidthDefaultReset,ii as aimAfterListChange,Ea as anchorFields,A as backTo,ca as backgroundField,ha as boxBlockSpacingField,ba as boxColumnsFields,Fa as boxFillField,Hr as boxPhoneRowField,Dr as boxShareField,ga as boxSharePhoneField,Zr as boxThemeIndexOf,oa as bucketHeader,pa as buttonWordsEntryField,vr as cardCornersField,yr as cardImageBackgroundField,ci as cardImageField,za as cardMediaFields,ma as cardShapeFields,Va as cardShowFields,Ya as cardStyleFields,Sa as cellWidthFields,Pa as checkbox,Aa as colorInput,Dl as containerDirectionField,ar as containerGapField,sr as containerGapPhoneField,Bl as containerGapRows,cr as containerGapTabletField,ni as coordsResultTip,Zl as copyText,ht as cornerSidesField,be as cornersRowField,Oa as date,Ra as dateTime,ra as designGroupHeader,qa as displayFields,Na as edgePad,Ua as focusAfterRemove,ka as focusKeptField,ia as foldMarker,ie as foldMetaOf,Sr as foldTitleOf,Ja as galleryLayoutField,wa as heightFields,Gl as heroGroupPlacementPoints,Ee as hidableText,br as hintIsWhileTyping,Za as imageCornersField,Xl as inOwnBox,na as isBucketHeader,mt as keptBy,Jl as linkField,Ha as loadingShowsField,va as multiSelect,Ta as pageBackgroundField,ta as panelNote,Ur as phoneOverrideField,ql as plainText,Ql as plainTextarea,ft as pxField,la as quietMarker,Ie as readHidable,oi as rowText,Ba as searchSelect,gt as sectionBorderField,Er as sectionCornersField,ua as sectionShapeFields,da as sectionThemeFields,ri as setRowText,xa as sizeField,Da as sourceField,ya as spacingFields,Ia as stickFields,Ca as swapPadding,fa as templateField,Yl as text,Rt as textFieldIdentifier,Kl as textFieldOffPage,Ul as textFieldPanelOnly,Xa as textList,ja as textListRowField,Vl as textarea,Vr as toggle,Ma as upload,Cr as useSelectedPatch,G as useSelectedProps,L as useSelectedSibling,ir as useSiteGapDetail,_a as widthField,$l as withIdentifier,Ml as withOffPage,Wl as withPanelOnly,Hl as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PalettePreset } from "efficient-easel/screen/lib/document/palette-sections";
|
|
2
2
|
export declare const CITY_PICTURES = "CityPictures";
|
|
3
3
|
export declare const CITY_MAPS = "CityMaps";
|
|
4
|
-
export declare function cityPalettePresets(
|
|
4
|
+
export declare function cityPalettePresets(press?: readonly string[]): PalettePreset[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_CATALOG as p}from"../../../format/lib/document/section-catalog.js";import{
|
|
1
|
+
import{SECTION_CATALOG as p}from"../../../format/lib/document/section-catalog.js";import{SECTION_TO_BOX_PRESS as d,sectionToBoxRow as l}from"../../../render/lib/sections/section-to-box.js";import{conversionPreset as y}from"./text-layouts.js";const o="ContactLocations",u="CityPictures",C="CityMaps",f=[{key:u,label:"City pictures",desc:"A wall of city photos, grouped by region. Each photo links to its city's card."},{key:C,label:"City maps",desc:"A card per city, grouped by region: address, phone, hours and a map."}];function O(i=d){const s=p.find(t=>t.sections.some(e=>e.type===o))?.key;return!i.includes(o)||!s?[]:f.map(({key:t,label:e,desc:c},a)=>({key:t,label:e,cat:s,after:o,desc:c,alias:"locations offices stores branches",insert:r=>{const n=l(o);return n?y(o,n,a)(r.nodeDefaults,r.newNodeId):null}}))}export{C as CITY_MAPS,u as CITY_PICTURES,O as cityPalettePresets};
|
|
@@ -2,5 +2,5 @@ import { type SectionToBoxRow } from "../../../render/lib/sections/section-to-bo
|
|
|
2
2
|
import { type SectionPreset } from "../../../format/lib/sections/section-presets.js";
|
|
3
3
|
export declare const TEXT_LAYOUTS: readonly string[];
|
|
4
4
|
export declare function conversionPreset(type: string, row: SectionToBoxRow, piece?: number): SectionPreset;
|
|
5
|
-
export declare function layoutPresetFor(type: string): SectionPreset | null;
|
|
5
|
+
export declare function layoutPresetFor(type: string, press?: readonly string[]): SectionPreset | null;
|
|
6
6
|
export declare function layoutTypes(): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{convertSection as
|
|
1
|
+
import{convertSection as u,pressesAsBox as i,SECTION_TO_BOX_PRESS as f,sectionToBoxRow as O}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as T,presetFor as m}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as E}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{isNodeList as S}from"efficient-easel/data";const _=Object.keys(E);function c(r,o,t){const e={};for(const n of Object.keys(o(r.type)))e[n]=void 0;for(const[n,s]of Object.entries(r.props))e[n]=S(s)?s.map(p=>c(p,o,t)):s;return e.id=t(r.type),{type:r.type,props:e}}function x(r,o,t=0){return(e,n)=>{const{nodes:s}=u({type:r,props:{...e(r),id:n(r)}},o);return c(s[t],e,n)}}function k(r,o){if(!i(r,o))return null;const t=O(r);return t?x(r,t):null}function b(r,o=f){return m(r)??k(r,o)}function j(){return[...Object.keys(T),..._.filter(r=>i(r))]}export{_ as TEXT_LAYOUTS,x as conversionPreset,b as layoutPresetFor,j as layoutTypes};
|