efficient-web-builder 64.0.0 → 65.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  3. package/dist/editor/lib/animation/scroll-fields.js +1 -1
  4. package/dist/editor/lib/animation/view-rows.d.ts +20 -0
  5. package/dist/editor/lib/animation/view-rows.js +1 -0
  6. package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
  7. package/dist/editor/lib/document/controls.d.ts +1 -0
  8. package/dist/editor/lib/document/controls.js +1 -1
  9. package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -2
  10. package/dist/editor/lib/document/part-motion-canvas.js +1 -1
  11. package/dist/format/lib/animation/entrance-keys.d.ts +8 -0
  12. package/dist/format/lib/animation/entrance-keys.js +1 -0
  13. package/dist/format/lib/animation/scroll.d.ts +5 -6
  14. package/dist/format/lib/animation/scroll.js +1 -1
  15. package/dist/format/lib/animation/views.d.ts +6 -0
  16. package/dist/format/lib/animation/views.js +1 -0
  17. package/dist/format/lib/content/section-sticky.d.ts +28 -0
  18. package/dist/format/lib/content/section-sticky.js +1 -1
  19. package/dist/format/lib/document/passes/types.d.ts +1 -0
  20. package/dist/format/lib/editor-words-catalogue.d.ts +6 -0
  21. package/dist/format/lib/editor-words-catalogue.js +3 -3
  22. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  23. package/dist/format/lib/source-rules/motion-vars-from-the-shell.d.ts +6 -0
  24. package/dist/format/lib/source-rules/motion-vars-from-the-shell.js +4 -0
  25. package/dist/render/components/HeroPictures.d.ts +2 -5
  26. package/dist/render/components/HeroPictures.js +1 -1
  27. package/dist/render/components/PictureZoom.js +1 -1
  28. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  29. package/dist/render/components/SectionAnimation.d.ts +8 -16
  30. package/dist/render/components/SectionAnimation.js +1 -1
  31. package/dist/render/lib/animation/entrance.d.ts +6 -14
  32. package/dist/render/lib/animation/entrance.js +1 -1
  33. package/dist/render/lib/animation/part-motion.js +2 -2
  34. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  35. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  36. package/dist/render/lib/document/part-styles.d.ts +1 -0
  37. package/dist/render/lib/document/passes/section-animation.js +1 -1
  38. package/dist/render/lib/document/passes/section-sticky.js +1 -1
  39. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  40. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 65.0.0 - 2026-11-09
4
+
5
+ From main at `8a7ac743`: #667, #666, #671, #670. A MAJOR: #667 removes exports and #671 narrows the `efficient-shell` peer (#670 also has `!`; its own change is additive). `efficient-easel` `^30.1.0` does not change. No stored key or value moves.
6
+
7
+ **BREAKING (#671):** the peer `efficient-shell` moves to `^12.22.0` (was `^12.18.0`): the per-view stick form (`pinStickVars`, `PIN_STICK_VAR`, `PIN_TRACK_POSITION_VAR`) is new in 12.22.0.
8
+
9
+ **BREAKING (#667):** removed exports (vs 64.0.0): `usePhoneWidth` (`render/components/SectionAnimation`), `EntranceView` (`render/lib/animation/entrance`), `scrollViewKey` and `ScrollView` (`format/lib/animation/scroll`; use `viewKey` and `MotionView` from `lib/animation/views`). Changed signatures: `SectionAnimation` props `desktop`/`phone` -> `views: EntranceViews`; `entranceReplay.seed(views)` and `.next(seen, views, view)`; `SeenEntrance` gains `tablet`; `entranceDrawn` returns `EntranceViews | null` with `tablet`; `entranceOf(props, MotionView)`; `PublishedPartMotion.entrance` gains `tablet`; `useViewWidth` returns `MotionView`; `paintPartMotion` takes `MotionView | boolean`; `heroPartEntrance` returns `Readonly<Record<MotionView, EntranceValue>> | null` (was `{ desktop; phone }`).
10
+
11
+ **For hosts:**
12
+ - Install efficient-shell 12.22.0 or later with this release (#671).
13
+ - The Entrance has tablet keys: `entranceTablet`, `entranceFromTablet`, `entranceDurationTablet`, `entranceDelayTablet` (#667). 0 stored pages need a move; an empty tablet follows the desktop.
14
+ - storefront-blocks: map `--sf-pin-stick` and `--sf-pin-track-position` in the `[data-motion-pin]` rule (base, tablet, phone; phone falls back to desktop; no default), as `--sf-pin-on` / `--sf-pin-length` are mapped (#671). Until then a page draws as on 64.
15
+ - storefront-blocks: its bump to this release updates `scripts/test-mockup-variant-fields.ts:107` to spread `ENTRANCE_STORE_KEYS` (#667).
16
+ - storefront-blocks: `scripts/section-style-baseline.tsx` reads `Object.keys(stickFields())`, which now also holds `stickAbove`: re-run that baseline in the bump PR (#670).
17
+ - The storefront keeps the #651 hold (the `ThemeLightInkProvider` mount).
18
+
19
+ ### Added
20
+
21
+ - **Pin stops at** (#666): a pinned section or card can stop at the screen top (`stickTopStop: "screen"`) or under the header (unset, default). One key for every view. New `SECTION_PIN_KEYS`, the one list of pin keys a conversion carries.
22
+ - **The Entrance has a tablet value** (#667), on the same view machinery as Scroll: new modules `lib/animation/views` (`MOTION_VIEWS`, `MotionView`, `viewKey`, `viewStoreKeys`, `followViews`, `followedIn`), `lib/animation/view-rows` (`viewTileRows`, `followedViewRows`, `viewRows`) and `lib/animation/entrance-keys` (`ENTRANCE_STORE_KEYS`); `entranceViews`, `EntranceViews`.
23
+ - **A view with Screens 0 draws the stick look in a track** (#671): `SECTION_PIN_VARS` gets `stick` and `trackPosition`. New source rule `format/lib/source-rules/motion-vars-from-the-shell` fails any `--motion-` name typed in web-builder code.
24
+
25
+ - **Stays above** (#670): a pinned Box or section (not a card) can stay painted above the sections after it. New key `stickAbove` (`SECTION_PIN_ABOVE_KEY`; only `true` is stored; one value for every view), in `SECTION_PIN_KEYS`. On, the pin draws the shell's stick form with `pinAttrs(value, "stick", { above: true })` (efficient-shell 12.22.0 holds the mark and its z rule) and the Screens rows hide. 0 stored nodes move.
26
+
27
+ ### Changed
28
+
29
+ - The Entrance and Scroll rows share one builder (#667, #671); `PictureZoom` reads `SCROLL_ZOOM_VAR` from the shell (#671).
30
+
3
31
  ## 64.0.0 - 2026-11-09
4
32
 
5
33
  From main at `283356c0`: #598, #661, #663. A MAJOR: #598 has `!` (8 exports removed, one prop removed). Peers do not move: `efficient-easel` `^30.1.0`, `efficient-shell` `^12.18.0` (every shell name these PRs import is in 12.18.0). No stored key or value moves.
@@ -1 +1 @@
1
- import{jsx as n,Fragment as g,jsxs as S}from"react/jsx-runtime";import{useRef as I}from"react";import{phoneKey as i}from"efficient-easel/draw";import{SettingsDefaultReset as C}from"efficient-easel/panel";import{ClockIcon as v,DirectionDownIcon as w,DirectionIcon as L,DirectionLeftIcon as M,DirectionRightIcon as x,DirectionUpIcon as G,DurationIcon as P,EntranceBounceIcon as B,EntranceFadeIcon as U,EntranceFlipIcon as W,EntranceGlideIcon as Y,EntranceRevealIcon as j,EntranceRiseIcon as H,EntranceScaleIcon as $,EntranceSpinIcon as q,NoSymbolIcon as z}from"efficient-easel/icons";import{effectTiles as V}from"efficient-easel/screen/lib/document/effect-tiles";import{deviceField as c}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as J,noControlField as Q}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{customize as X,describedAs as R,group as Z,onDesktopWords as ee,phoneTwinFields as ne}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as oe,ENTRANCE_FROM_DEFAULT as N,ENTRANCE_KINDS as p,ENTRANCE_KINDS_WITH_FROM as y,MOTION_TIMING as te,entranceAttrs as ie,playEntrance as re,readEntrance as ce}from"efficient-shell/format";import{segmented as ae}from"../document/box-fields.js";import{phoneOverrideField as _,useSelectedProps as k}from"../document/controls.js";import{withRowRules as le}from"../../../format/lib/document/show-when-attach.js";import{editorEaselWords as se,say as s}from"../../../format/lib/editor-words.js";import{animationDelayField as de,animationDurationField as pe}from"./AnimationDurationRow.js";import{ENTRANCE_KEYS as t,LEGACY_ENTRANCE_KEY as D,entranceOf as F}from"../../../render/lib/animation/entrance.js";import{ENTRANCE_GROUP_KEY as me}from"../../../format/lib/animation/index.js";const u={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},fe={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},ue={top:()=>n(w,{}),bottom:()=>n(G,{}),left:()=>n(x,{}),right:()=>n(M,{})},E="Entrance",m=p.filter(e=>e!=="none"),f=e=>({any:[{field:t.kind,in:e},{all:[{field:t.kind,set:!1},{field:D,in:e}]}]}),T=e=>({any:[{field:i(t.kind),in:e},{all:[{field:i(t.kind),set:!1},f(e)]}]}),Ee={any:[f(m),{field:i(t.kind),in:m}]},Ie=[[[t.from],f(y)],[[i(t.from)],T(y)],[[t.duration,t.delay],f(m)],[[i(t.duration),i(t.delay)],T(m)]],Re={none:()=>n(z,{}),fade:()=>n(U,{}),rise:()=>n(H,{}),scale:()=>n($,{}),glide:()=>n(Y,{}),bounce:()=>n(B,{}),flip:()=>n(W,{}),reveal:()=>n(j,{}),spin:()=>n(q,{})},b="data-entrance-tile";function Ne({kind:e}){const{attrs:o}=ie(ce(e,N));return n("span",{className:"sf-entrance-stage",[b]:e,children:n("i",{...o,children:Re[e]()})})}const ye=e=>o=>{const r=e.current?.querySelector(`[${b}="${o}"] > i`);r&&re(r)},h=e=>V({label:s(E),options:p.map(o=>({value:o,label:s(u[o]),picture:n(Ne,{kind:o})})),fallback:"none",onPreview:e?ye(e):void 0});function O({row:e,children:o}){return n("div",{ref:e,style:{display:"contents"},children:o})}function _e({value:e,onChange:o}){const r=k(),a=F({...r,[t.kind]:e},"desktop").kind,l=I(null);return n(O,{row:l,children:h(l).render({value:a,onChange:d=>o(d??"none")})})}function ke({value:e,onChange:o}){const r=k(),a=typeof e=="string"&&p.includes(e),l=F(r,"desktop").kind,d=I(null);return S(g,{children:[n(O,{row:d,children:h(d).render({value:a?e:l,onChange:o})}),a&&n(C,{words:se()?.panel,label:s(De),changed:a,detail:ee(A=>s(A),s(u[l])),onReset:()=>o(void 0)})]})}const De="Effect",K={type:"select",label:E,options:p.map(e=>({value:e,label:u[e]}))},Fe=()=>R({type:"custom",render:({value:e,onChange:o})=>n(_e,{value:e,onChange:o})},K),Te=()=>R({type:"custom",render:({value:e,onChange:o})=>n(ke,{value:e,onChange:o})},K),be=oe.map(e=>({label:fe[e],value:e,picture:ue[e]()}));function Ye(){const{duration:e,delay:o}=te.entrance,r={[me]:Z(E,{dot:Ee}),[t.kind]:c("desktop",Fe()),[D]:Q({type:"custom",render:()=>n(J,{})},"always"),[i(t.kind)]:c("mobile",Te()),_cEntrance:X(),...ne(t.from,ae("From",n(L,{}),be,N)),[t.duration]:c("desktop",pe("entrance")),[i(t.duration)]:c("mobile",_({label:"Duration",desktopKey:t.duration,icon:n(P,{}),min:e.min,max:e.max,step:e.step,fallback:e.default,unit:"s"})),[t.delay]:c("desktop",de("entrance")),[i(t.delay)]:c("mobile",_({label:"Delay",desktopKey:t.delay,icon:n(v,{}),min:o.min,max:o.max,step:o.step,fallback:o.default,unit:"s"}))};return le(r,Ie)}export{Ye as entranceFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{DirectionDownIcon as u,DirectionIcon as _,DirectionLeftIcon as O,DirectionRightIcon as A,DirectionUpIcon as F,EntranceBounceIcon as T,EntranceFadeIcon as D,EntranceFlipIcon as S,EntranceGlideIcon as y,EntranceRevealIcon as K,EntranceRiseIcon as L,EntranceScaleIcon as w,EntranceSpinIcon as C,NoSymbolIcon as M}from"efficient-easel/icons";import{NoControlMark as g,noControlField as b}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{customize as h,group as k}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as G,ENTRANCE_FROM_DEFAULT as s,ENTRANCE_KINDS as d,ENTRANCE_KINDS_WITH_FROM as v,entranceAttrs as B,playEntrance as U,readEntrance as P}from"efficient-shell/format";import{segmented as W}from"../document/box-fields.js";import{shownByUsedValue as Y,withRowRules as x}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as H,animationDurationField as V}from"./AnimationDurationRow.js";import{ENTRANCE_KEYS as r,LEGACY_ENTRANCE_KEY as f,entranceOf as m}from"../../../render/lib/animation/entrance.js";import{ENTRANCE_GROUP_KEY as j}from"../../../format/lib/animation/index.js";import{followedViewRows as $,viewTileRows as q}from"./view-rows.js";import{MOTION_VIEWS as c,viewKey as i}from"../../../format/lib/animation/views.js";const z={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},J={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},Q={top:()=>e(u,{}),bottom:()=>e(F,{}),left:()=>e(A,{}),right:()=>e(O,{})},p="Entrance",a=d.filter(n=>n!=="none"),E=n=>({any:[{field:r.kind,in:n},{all:[{field:r.kind,set:!1},{field:f,in:n}]}]}),R=(n,t)=>Y(c.slice(0,c.indexOf(n)+1).reverse().map(o=>i(r.kind,o)),o=>({field:o,set:!0}),o=>o===r.kind?E(t):{field:o,in:t}),X={any:[E(a),...c.slice(1).map(n=>({field:i(r.kind,n),in:a}))]},Z=c.flatMap(n=>[[[i(r.from,n)],R(n,v)],[[i(r.duration,n),i(r.delay,n)],R(n,a)]]),nn={none:()=>e(M,{}),fade:()=>e(D,{}),rise:()=>e(L,{}),scale:()=>e(w,{}),glide:()=>e(y,{}),bounce:()=>e(T,{}),flip:()=>e(S,{}),reveal:()=>e(K,{}),spin:()=>e(C,{})},N="data-entrance-tile";function en({kind:n}){const{attrs:t}=B(P(n,s));return e("span",{className:"sf-entrance-stage",[N]:n,children:e("i",{...t,children:nn[n]()})})}const on=(n,t)=>{const o=n.querySelector(`[${N}="${t}"] > i`);o&&U(o)},tn="Effect",rn=()=>q(r.kind,{label:p,tileWord:tn,values:d,fallback:"none",word:n=>z[n],picture:n=>e(en,{kind:n}),read:(n,t)=>m(n,t).kind,preview:on}),l=(n,t)=>$(r[n],t,(o,I)=>m(o,I)[n]),cn=G.map(n=>({label:J[n],value:n,picture:Q[n]()}));function _n(){const n={[j]:k(p,{dot:X}),...rn(),[f]:b({type:"custom",render:()=>e(g,{})},"always"),_cEntrance:h(),...l("from",W("From",e(_,{}),cn,s)),...l("duration",V("entrance")),...l("delay",H("entrance"))};return x(n,Z)}export{_n as entranceFields};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as v,jsxs as x}from"react/jsx-runtime";import{SettingsDefaultReset as h}from"efficient-easel/panel";import{EntranceRevealIcon as T,NoSymbolIcon as b,PercentIcon as E,ScrollFadeInIcon as M,ScrollFadeOutIcon as Z,ScrollMoveDownIcon as y,ScrollMoveUpIcon as z,ScrollParallaxIcon as P,ScrollZoomInIcon as V,ScrollZoomOutIcon as g,ZoomInIcon as U}from"efficient-easel/icons";import{effectTiles as W}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as w,customize as k,describedAs as A,group as K,onDesktopWords as N,phoneTwinFields as L}from"efficient-easel/screen/lib/document/box-fields";import{SCROLL_EFFECTS as f,SCROLL_EFFECTS_WITH_ZOOM as Y,SCROLL_END as j,SCROLL_START as D,SCROLL_ZOOM as G}from"efficient-shell/format";import{slider as B}from"../document/box-fields.js";import{useSelectedProps as O}from"../document/controls.js";import{shownByUsedValue as H,withRowRules as q}from"../../../format/lib/document/show-when-attach.js";import{editorEaselWords as J,say as i}from"../../../format/lib/editor-words.js";import{SCROLL_CUSTOMIZE_KEY as Q,SCROLL_GROUP_KEY as X,SCROLL_KEYS as t,scrollOf as R,scrollViewKey as d}from"../../../format/lib/animation/scroll.js";const u="Scroll",S={none:"None","zoom-in":"Zoom in","zoom-out":"Zoom out","fade-in":"Fade in","fade-out":"Fade out","move-up":"Move up","move-down":"Move down",reveal:"Reveal",parallax:"Parallax"},$={none:()=>e(b,{}),"zoom-in":()=>e(V,{}),"zoom-out":()=>e(g,{}),"fade-in":()=>e(M,{}),"fade-out":()=>e(Z,{}),"move-up":()=>e(z,{}),"move-down":()=>e(y,{}),reveal:()=>e(T,{}),parallax:()=>e(P,{})},oo="Effect",_=f.filter(o=>o!=="none"),m=["desktop","tablet","phone"],C=(o,l)=>H(m.slice(0,m.indexOf(o)+1).reverse().map(n=>d(t.effect,n)),n=>({field:n,set:!0}),n=>({field:n,in:l})),eo={any:m.map(o=>({field:d(t.effect,o),in:_}))},no=m.flatMap(o=>[[[d(t.zoom,o)],C(o,Y)],[[d(t.start,o),d(t.end,o)],C(o,_)]]),to=W({label:i(u),options:f.map(o=>({value:o,label:i(S[o]),picture:$[o]()})),fallback:"none"}),lo=o=>typeof o=="string"&&f.includes(o);function ro(o){const l=lo(o.value),n="follows"in o,r=R(O(),o.followsView??"desktop").effect,s=l?o.value:n?r:"none",c=to.render;return x(v,{children:[c({value:s,onChange:a=>o.onChange(a??"none")}),n&&l&&e(h,{words:J()?.panel,label:i(oo),changed:!0,detail:N(a=>i(a),i(S[r]),o.followsView),onReset:()=>o.onChange(void 0)})]})}const so=()=>A({type:"custom",render:o=>e(ro,{...o})},{type:"select",label:u,options:f.map(o=>({value:o,label:S[o]}))});function co({row:o,part:l,...n}){const r=R(O(),n.followsView??"desktop")[l];return o({...n,follows:r})}const p=(o,l,n,r,s)=>{const c=B(n,r,s.min,s.max,s.step,s.default,"%"),a=c.render,F={...c,render:I=>e(co,{...I,row:a,part:l})};return L(o,c,w,{phoneRow:F})};function Ro(){const o={[X]:K(u,{dot:eo}),...L(t.effect,so(),w),[Q]:k(),...p(t.zoom,"zoom","Zoom",e(U,{}),G),...p(t.start,"start","Start",e(E,{}),D),...p(t.end,"end","End",e(E,{}),j)};return q(o,no)}export{eo as SCROLL_CHOSEN,Ro as scrollFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{EntranceRevealIcon as R,NoSymbolIcon as u,PercentIcon as f,ScrollFadeInIcon as I,ScrollFadeOutIcon as _,ScrollMoveDownIcon as C,ScrollMoveUpIcon as F,ScrollParallaxIcon as w,ScrollZoomInIcon as v,ScrollZoomOutIcon as T,ZoomInIcon as x}from"efficient-easel/icons";import{customize as M,group as Z}from"efficient-easel/screen/lib/document/box-fields";import{SCROLL_EFFECTS as s,SCROLL_EFFECTS_WITH_ZOOM as z,SCROLL_END as N,SCROLL_START as P,SCROLL_ZOOM as U}from"efficient-shell/format";import{slider as y}from"../document/box-fields.js";import{shownByUsedValue as G,withRowRules as K}from"../../../format/lib/document/show-when-attach.js";import{SCROLL_CUSTOMIZE_KEY as V,SCROLL_GROUP_KEY as W,SCROLL_KEYS as t,scrollOf as i}from"../../../format/lib/animation/scroll.js";import{followedViewRows as Y,viewTileRows as b}from"./view-rows.js";import{MOTION_VIEWS as m,viewKey as r}from"../../../format/lib/animation/views.js";const d="Scroll",A={none:"None","zoom-in":"Zoom in","zoom-out":"Zoom out","fade-in":"Fade in","fade-out":"Fade out","move-up":"Move up","move-down":"Move down",reveal:"Reveal",parallax:"Parallax"},B={none:()=>e(u,{}),"zoom-in":()=>e(v,{}),"zoom-out":()=>e(T,{}),"fade-in":()=>e(I,{}),"fade-out":()=>e(_,{}),"move-up":()=>e(F,{}),"move-down":()=>e(C,{}),reveal:()=>e(R,{}),parallax:()=>e(w,{})},H="Effect",S=s.filter(o=>o!=="none"),O=(o,l)=>G(m.slice(0,m.indexOf(o)+1).reverse().map(n=>r(t.effect,n)),n=>({field:n,set:!0}),n=>({field:n,in:l})),h={any:m.map(o=>({field:r(t.effect,o),in:S}))},j=m.flatMap(o=>[[[r(t.zoom,o)],O(o,z)],[[r(t.start,o),r(t.end,o)],O(o,S)]]),D=()=>b(t.effect,{label:d,tileWord:H,values:s,fallback:"none",word:o=>A[o],picture:o=>B[o](),read:(o,l)=>i(o,l).effect}),a=(o,l,n,p,c)=>Y(o,y(n,p,c.min,c.max,c.step,c.default,"%"),(L,E)=>i(L,E)[l]);function to(){const o={[W]:Z(d,{dot:h}),...D(),[V]:M(),...a(t.zoom,"zoom","Zoom",e(x,{}),U),...a(t.start,"start","Start",e(f,{}),P),...a(t.end,"end","End",e(f,{}),N)};return K(o,j)}export{h as SCROLL_CHOSEN,to as scrollFields};
@@ -0,0 +1,20 @@
1
+ import { type ReactElement } from "react";
2
+ import { type MotionView } from "../../../format/lib/animation/views.js";
3
+ export type ReadView<V = unknown> = (record: Readonly<Record<string, unknown>>, view: MotionView) => V;
4
+ type Row = {
5
+ render?: unknown;
6
+ };
7
+ export declare function viewRows<F>(key: string, rowFor: (view: MotionView) => F): Record<string, F>;
8
+ export declare function followedViewRows<F extends Row>(key: string, row: F, read: ReadView): Record<string, F>;
9
+ export type TileSpec<V extends string> = {
10
+ label: string;
11
+ tileWord: string;
12
+ values: readonly V[];
13
+ fallback: V;
14
+ word: (value: V) => string;
15
+ picture: (value: V) => ReactElement;
16
+ read: ReadView<V>;
17
+ preview?: (row: HTMLElement, value: V) => void;
18
+ };
19
+ export declare function viewTileRows<V extends string>(key: string, spec: TileSpec<V>): Record<string, unknown>;
20
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as a,Fragment as h,jsxs as v}from"react/jsx-runtime";import{useRef as x}from"react";import{SettingsDefaultReset as g}from"efficient-easel/panel";import{effectTiles as R}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as u,describedAs as k,onDesktopWords as E,phoneTwinFields as c}from"efficient-easel/screen/lib/document/box-fields";import{useSelectedProps as m}from"../document/controls.js";import{editorEaselWords as V,say as i}from"../../../format/lib/editor-words.js";import{MOTION_VIEWS as _,viewKey as j}from"../../../format/lib/animation/views.js";function y({row:e,read:o,...n}){const t=o(m(),n.followsView??"desktop");return e({...n,follows:t})}function C(e,o){return Object.fromEntries(_.map(n=>{const t=j(e,n);return[t,c(e,o(n),u)[t]]}))}function P(e,o,n){const t=o.render,s={...o,render:l=>a(y,{...l,row:t,read:n})};return C(e,l=>l==="desktop"?o:s)}function S({spec:e,...o}){const n=e.values.includes(o.value),t="follows"in o,s=e.read(m(),o.followsView??"desktop"),l=n?o.value:s,d=x(null),{preview:w}=e,b=R({label:i(e.label),options:e.values.map(r=>({value:r,label:i(e.word(r)),picture:e.picture(r)})),fallback:e.fallback,onPreview:w?r=>d.current&&w(d.current,r):void 0}).render,f=b({value:l,onChange:r=>o.onChange(r??e.fallback)});return v(h,{children:[w?a("div",{ref:d,style:{display:"contents"},children:f}):f,t&&n&&a(g,{words:V()?.panel,label:i(e.tileWord),changed:!0,detail:E(r=>i(r),i(e.word(s)),o.followsView),onReset:()=>o.onChange(void 0)})]})}function M(e,o){const n=k({type:"custom",render:t=>a(S,{...t,spec:o})},{type:"select",label:o.label,options:o.values.map(t=>({value:t,label:o.word(t)}))});return c(e,n,u)}export{P as followedViewRows,C as viewRows,M as viewTileRows};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{ChevronIcon as l}from"efficient-easel/icons";import{copyText as m,linkField as p,plainTextarea as u,text as s,textarea as c,toggle as f}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as T,headFieldsForPlacement as d}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as h}from"../../../../../../format/lib/document/show-when-attach.js";import{ENTRANCE_KEYS as A,LEGACY_ENTRANCE_KEY as E}from"../../../../../../render/lib/animation/entrance.js";import{drawsCopiesInTheBox as F}from"../../../../../../format/lib/content/copies-in-box.js";import{phoneKey as _}from"efficient-easel/draw";import{FAQ_PH as n,FAQSlots as w}from"../../../../../../format/lib/document/blocks/general/FAQ/meta.js";const i="faqOnTemplate",x={not:{context:i,is:!0}},N={[i]:t=>F("FAQ",t.props??{})},Q=new Set([E,...Object.values(A).flatMap(t=>[t,_(t)])]);function g(t){return Object.keys(t).filter(e=>["num","title","linkText","linkHref","anchor"].includes(e)||e.startsWith("sectionPadding")||e.startsWith("sectionHeight")||Q.has(e))}const b={fields:{_gContent:o("Content"),num:s("Number",n.num),title:c("Heading",n.title),linkText:s("Button",n.link),linkHref:p("Link"),_gQuestions:o("Questions"),items:{type:"array",label:"Questions",arrayFields:{question:m("Question"),answer:u("Answer")},getItemSummary:t=>t.question||"Question"},_gLayout:o("Layout"),defaultOpen:f("Open first answer",!0,a(l,{})),...w},resolveFields:(t,{fields:e})=>{const r=d(e,t.props.headPlacement,T.FAQ.headRows);return h(r,g(r),x)},showWhenFacts:N};export{b as FAQFields};
1
+ import{jsx as a}from"react/jsx-runtime";import{ChevronIcon as l}from"efficient-easel/icons";import{copyText as m,linkField as p,plainTextarea as u,text as r,textarea as c,toggle as T}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as f,headFieldsForPlacement as d}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as h}from"../../../../../../format/lib/document/show-when-attach.js";import{ENTRANCE_STORE_KEYS as E,LEGACY_ENTRANCE_KEY as A}from"../../../../../../render/lib/animation/entrance.js";import{drawsCopiesInTheBox as _}from"../../../../../../format/lib/content/copies-in-box.js";import{FAQ_PH as n,FAQSlots as F}from"../../../../../../format/lib/document/blocks/general/FAQ/meta.js";const i="faqOnTemplate",w={not:{context:i,is:!0}},x={[i]:t=>_("FAQ",t.props??{})},N=new Set([A,...E]);function Q(t){return Object.keys(t).filter(e=>["num","title","linkText","linkHref","anchor"].includes(e)||e.startsWith("sectionPadding")||e.startsWith("sectionHeight")||N.has(e))}const H={fields:{_gContent:o("Content"),num:r("Number",n.num),title:c("Heading",n.title),linkText:r("Button",n.link),linkHref:p("Link"),_gQuestions:o("Questions"),items:{type:"array",label:"Questions",arrayFields:{question:m("Question"),answer:u("Answer")},getItemSummary:t=>t.question||"Question"},_gLayout:o("Layout"),defaultOpen:T("Open first answer",!0,a(l,{})),...F},resolveFields:(t,{fields:e})=>{const s=d(e,t.props.headPlacement,f.FAQ.headRows);return h(s,Q(s),w)},showWhenFacts:x};export{H as FAQFields};
@@ -267,6 +267,7 @@ export declare function followedHeightPatch(view: PanelView, props: Record<strin
267
267
  export declare function stickFields(opts?: {
268
268
  intro?: boolean;
269
269
  screens?: boolean;
270
+ above?: boolean;
270
271
  }): Record<string, CustomField<undefined> | CustomField<boolean> | CustomField<number>>;
271
272
  type StickNumberKey = "stickTopDistance" | typeof SECTION_PIN_SCREENS_KEY;
272
273
  export declare function followedStickPatch(view: PanelView, props: Record<string, unknown>, next: unknown, base?: StickNumberKey, intro?: boolean): Record<string, unknown> | null;
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as A,Fragment as N}from"react/jsx-runtime";import{cloneElement as Ue,createContext as en,useContext as Ke,useEffect as tn,useId as $e,useRef as Y,useState as q}from"react";import{useEasel as te,useSelectedHost as W}from"efficient-easel/easel";import{PIN_LENGTH as ne,toDateKey as nn,fromDateKey as on}from"efficient-shell/format";import{say as s,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as rn}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as Xe,firstFrameHint as ln,loadingShowsOf as sn,loadingStillHint as an}from"../../../format/lib/hero-video.js";import{pageFramesFor as cn,usePageVideoFrames as dn}from"../page-video-frames.js";import{ScreenDocumentContext as un}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as je,hidableText as Ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as he,LINK_FIELD_MARKER as ze,MEDIA_FIELD_MARKER as Ye,SCAFFOLD_FIELD_MARKER as qe,TEXT_FIELD_MARKER as I,foldMetaOf as me,textFieldIdentifier as pn}from"efficient-easel/draw";import fn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Je}from"../../../render/lib/document/show-when.js";import hn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as mn,CORNER_RADIUS_MAX as Ze,CORNER_RADIUS_MIN as U}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as gn,IMAGE_CORNERS_LABEL as bn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as wn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Sn,GALLERY_LAYOUTS as oe,GALLERY_LAYOUT_KEYS as xn,galleryChoices as Qe,galleryLayoutRatio as yn,galleryPictureCells as Cn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as _n}from"./shell-glyph.js";import{anchorSiblingsOf as Tn,placementPoints as Rn}from"../../../format/lib/hero-group-placement.js";import In from"../../components/AnchorField.js";import On from"../../components/SourceStatus.js";import{AdjustIcon as En,EyeIcon as kn,AnimationIcon as Nn,BackgroundIcon as et,BorderAllIcon as Fn,BlockSectionIcon as Ln,ColumnWidthsIcon as ge,ColumnsIcon as tt,CornerIcon as nt,DirectionDownIcon as Pn,DirectionLeftIcon as An,DirectionRightIcon as vn,DirectionUpIcon as Bn,EditIcon as Dn,GapIcon as Hn,GridIcon as Gn,GroundIcon as be,HashIcon as ot,HeightIcon as rt,ImageIcon as Mn,ListIcon as Wn,LocationIcon as it,PaddingBottomIcon as lt,PaddingLeftIcon as st,PaddingRightIcon as at,PaddingTopIcon as ct,PageIcon as Un,StickyIcon as Kn,SearchIcon as $n,SquareIcon as Xn,TypeIcon as jn,WidthIcon as Vn}from"efficient-easel/icons";import{FieldGlyph as dt}from"../../components/FieldGlyph.js";import{resolvePageBackground as zn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Yn,boxFillSlot as we}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as ut,CORNER_SIDE_POINTS as qn,hasOwnSectionCorners as Jn,normalizeCornerSides as pt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Zn,enclosingSection as Qn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as eo,SettingsField as w,SettingsGroup as to,SettingsGroupSub as no,SettingsSegmented as oo,SettingsBorder as ro,SettingsSidesEach as io,SettingsSwitch as Se,borderSides as lo,borderStartEach as so}from"efficient-easel/panel";import{ListField as ao}from"efficient-easel/fields";import{DisplayChips as co}from"efficient-shell/ui";import{desktopDisplayChanged as uo,partShownOnDesktop as po,partShownOnPhone as fo,phoneDisplayChanged as ho,withDesktopPart as mo,withPhonePart as go}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as bo,Checkbox as wo,ColorSwatch as So,CornersInput as xo,DatePicker as yo,DateTimePicker as Co,FOCAL_DEFAULT as _o,IconPicker as ft,COLUMN_COUNT_MAX as ht,COLUMN_SHARE_MIN as To,COLUMN_SHARES_EQUAL as Ro,resolveColumnShares as mt,WidthsBar as Io,useShellStrings as Oo,IconButton as gt,InputNumber as bt,Slider as Eo,Tooltip as xe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as ko}from"./geocode-resolve.js";import{ColourRow as re,InheritedColourRow as wt}from"./ColourControl.js";import{fillThemeColors as No,slotFill as ie}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ye}from"../../../format/lib/document/part-inks.js";import{keptByRow as Fo}from"efficient-easel/screen/lib/document/style-fields";import St from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Lo,NoControlMark as Po,noControlField as xt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Ao}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as vo,PANEL_ONLY_FIELD as Bo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Do,resolvePhoneValue as Ce}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as K}from"efficient-easel/draw";import{SuppressibleText as Ho}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Go,CARD_OUTLINE_OPTIONS as Mo,DEFAULT_CARD_INDEX_FORMAT as Wo,DEFAULT_CARD_OUTLINE as Uo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Ko,DEFAULT_COVER_INDEX as $o}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Xo}from"efficient-easel/draw";import jo from"../../components/MediaUploadField.js";import Vo from"../../components/MultiSelectField.js";import zo from"../../components/SectionThemePicker.js";import Yo from"../../components/SearchSelectField.js";import qo from"../../components/StorefrontLinkField.js";import{UiIcon as yt}from"efficient-easel/draw/client";import{SECTION_PADDING as O}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Jo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Zo}from"efficient-easel/draw/client";import{encodePartId as Qo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as er,useEaselStrings as tr}from"efficient-easel/strings";import{hasPhoneHeight as nr,hasTabletHeight as _e,resolveSectionMinHeight as or,resolveTabletHeight as rr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as ir,SECTION_PIN_GROUP as lr,SECTION_PIN_LABEL as Ct,SECTION_PIN_SCREENS_KEY as Te,SECTION_PIN_SCREENS_LABEL as _t,SECTION_STICK_DISTANCE as le,hasPhoneStick as sr,hasTabletStick as ar,resolveSectionStick as Re}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as cr,SECTION_MIN_HEIGHT_GROUP_LABEL as J,SECTION_SCREEN_PCT as dr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as ur,resolveContainerDirection as Tt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as pr,BOX_BLOCK_SPACING_POINTS as Rt,BOX_PHONE_ROW_LABEL as It,BOX_COLUMNS_MAX as fr,BOX_COLUMNS_MIN as Ot,BOX_PHONE_ROW_MAX as hr,BOX_PHONE_ROW_MIN as Ie,BOX_SHARE_CHOICES as Et,BOX_SHARE_LABEL as $,boxShareChoiceOf as kt,boxShareWidthsOf as Oe,BOX_SHARE_PHONE_DEFAULT as mr,BOX_SHARE_PHONE_POINTS as gr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as br,borderBySide as Nt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as wr,normalizeTheme as Ft,normalizeThemeColors as Sr,sectionBandTone as xr,surfaceTwoTone as yr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Lt,CONTAINER_GAP_BUILT_IN as Cr,CONTAINER_GAP_PHONE as Ee,GAP_FIELD_CONTAINER as ke,followsSitePhoneGap as _r,hasOwnContainerGap as Tr,hasOwnPhoneGap as Ne,resolveContainerGap as Pt,resolvePhoneContainerGap as At}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Rr,CARD_IMAGE_BG_OFF as Ir,CARD_IMAGE_BG_SWATCH_NAMES as Or,CARD_IMAGE_BG_SWATCHES as Er,isCardImageBackgroundInheriting as kr,cardImageBackgroundChoice as Nr,THEME_CARD_IMAGE_BG as Fr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Lr,SECTION_BG_NO_FILL as Pr,sectionBackgroundChoice as Ar,THEME_SECTION_BG as Fe,isSectionBackgroundEmpty as vr,sectionBackgroundHex as vt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Br,nestedAccentValue as Bt,resolveSectionAccent as se}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Dr,TYPE_SIZE_INHERIT as Hr,isTypeSizeInheriting as Gr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Mr,WIDTH_CHOICE_LABEL as Wr,WIDTH_INHERIT as Ur}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Kr}from"./panel-heading-scope.js";import{useEaselSession as $r}from"efficient-easel/screen/lib/session-context";import{backendOf as Xr}from"../website-session.js";import{BOX_GAP as jr,describedAs as E,group as R,iconOf as X,sharedStyleKinds as Z}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Le,onDesktopWords as B,phoneTwinFields as ae}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Vr,gapField as Pe,iconPickerRow as zr,pickerCellIcon as Yr,pickerNoneIcon as qr,Segmented as Ae,segmented as Jr,select as Q,slider as j}from"./box-fields.js";function Vs({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function D(e,t){return s("{value} from {from}",{value:e,from:t})}function Zr(){const{blockGap:e}=v();return e===null?s("this container's own spacing"):D(`${e}px`,s("Styles"))}function Qr({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:Zr(),onReset:t})}function ei(e){return Pe({...jr,builtIn:Cr[e],resolve:(t,n)=>Pt(e,t,n?.siteGap),action:(t,n)=>i(Qr,{inherited:!Tr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ke]:e}})}function ti(e){return Je(T("mobile",{[ke]:e,type:"custom",render:t=>i(ri,{container:e,...t})}),Dt)}function ni(e){return Je(T("tablet",{[ke]:e,type:"custom",render:t=>i(oi,{container:e,...t})}),Dt)}const Dt={not:{field:"gap",in:Array.from({length:-Lt.min},(e,t)=>Lt.min+t)}};function zs(e){return{gap:T("desktop",ei(e)),[K("gap")]:ni(e),[F("gap")]:ti(e)}}function oi({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(Ee.min,Pt(e,n,o));return Pe({...Ee,builtIn:r,resolve:a=>Ne(a)?a:r,action:(a,c)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ne(a),detail:B(d=>s(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function ri({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=At(e,void 0,n,o,r);return Pe({...Ee,builtIn:l,resolve:c=>At(e,c,n,o,r),action:(c,d)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ne(c),detail:D(`${l}px`,_r(e,n,r)?s("Styles"):s("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Ys(e){return Vr({offered:ur(e),fallback:Tt(e,void 0),resolve:t=>Tt(e,t)})}function qs(e,t){return Rn(t?Tn(e,t):[],t)}function ii({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:D(s("Full"),s("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:d,hidden:p}=je(e),h=Y(null),f=Y(null),u=_=>t(a?{text:_,hidden:p}:_),g=()=>t({text:d,hidden:!p}),m=a&&p,S=$e(),x=r?di(r)?i("span",{className:"sf-hint-while-typing",children:s(r)}):s(r):void 0,b=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(w,{label:s(n),icon:i(jn,{}),htmlFor:S,className:m?"is-hidden":void 0,hint:x,action:a?i(xe,{content:b,children:i(gt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(yt,{name:"eye-off",size:14}):i(yt,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(St,{target:l?f:h,value:d,onChange:u}),l?i("textarea",{id:S,ref:f,value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)}):i("input",{id:S,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)})]})})}function Js(e,t){return{...e,[qe]:t}}function Zs(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Qs(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}function ea(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Bo]:!0}}function ta(e){return vo(e)}function na(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as mc,SCALAR_TEXT_CONTROLS as gc}from"efficient-easel/draw";function oa(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Lo]:o,...r}=e;return{...r,[Ao]:!0,render:t}}const li=new Set(Xo),ee={type:"radio",options:[{value:!0},{value:!1}]},Ht={text:{type:"object",objectFields:{text:{type:"text"},hidden:ee}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ee}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=E({...t,[I]:e},{...Ht[e.control],label:e.label});if(!li.has(e.control))return n;const o=t.render;return{...xt(n,"authored-copy"),render:r=>i(Ho,{name:r.name,children:o(r)})}},ra="Everything else on this block comes from the linked post. Unlink it to edit by hand.",si={field:"source.slug",set:!0},ia={not:si},ai="Select a word, then press the highlighter.",ci=new Set([ai]),di=e=>ci.has(e);function la(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function sa(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function aa(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ca(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function da(e){return{type:"custom",[ze]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(qo,{value:Ve(t),onChange:n,label:e})}}function ua(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const pa={Design:En,Animation:Nn};function fa(e){return{type:"custom",render:()=>i(ui,{text:e})}}function ui({text:e}){return i("p",{className:"sf-note",children:s(e)})}function ha(e){return me(e)!==null&&e?.tabs!==void 0}const Gt=new Map;function ma(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Gt.get(n)??{type:"custom",tabs:t,[he]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(N,{})};return Gt.set(n,o),o}const Mt=new Map;function ga(e){const t=Mt.get(e)??{type:"custom",[he]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(N,{})};return Mt.set(e,t),t}function pi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ba(e,t){return pi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(N,{})}}function wa(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(N,{})}}function Sa({title:e,children:t}){const[n,o]=q(()=>!ve.has(e));return i(to,{title:e,open:n,onToggle:r=>{o(r),r?ve.delete(e):ve.add(e)},children:t})}const ve=new Set;function xa({label:e}){return i(no,{title:s(e),level:Kr(2)})}function fi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?s(o[c]):c;return i(xe,{content:d,children:i(So,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function ya(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(hi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function hi({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:a,n:c}=Ge(),d={background:a.background,surface:a.surface,surface2:yr(a),band:xr(a)},p=n?Fe:t,h=vr(l,t,p),f=vt(void 0,p,d),u=n?Lr:void 0,g=p===Fe?s("the theme's section background"):s("Theme {n} background",{n:c}),m=mi(l,t,a,c,d,r),S=D(f.toUpperCase(),g),x=ye(l),b=x?ie(x,a,c):null;return b?i(re,{label:s(e),icon:i(et,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:S,choices:m}):i(wt,{label:s(e),icon:i(et,{}),value:h?"":vt(l,t,d),inherited:f,resetTo:S,onChange:r,onReset:()=>r(u),choices:m})}function mi(e,t,n,o,r,l){const a=Ar(e,t);return[{label:s("No fill"),color:"",selected:a==="none",onPick:()=>l(Pr)},{label:`${s("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>l(Fe)},...He(ye(e)??"",n,o,l)]}function gi(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=kr(r,t);return i(w,{label:s(e),icon:i(be,{}),changed:!l,action:i(C,{words:y()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Rr)}),children:fi({swatches:Er,current:l?Fr:Nr(r,t),onPick:o,names:Or})})}}}function Ca(e=n=>n,t){return Z({_gSectionTheme:R(Br),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(zo,{value:e(n),onChange:o,followLabel:t})}})}function V({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:d,disabled:p=!1,placeholder:h,placeholderWord:f,onClear:u}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Eo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...f?{emptyLabel:s(f)}:{},suffix:l||void 0,showInput:a,label:d===void 0?void 0:s(d),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m===null?u?.():m!==o&&r(m)}})})}function Wt(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:d,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:u})=>{const g=typeof f=="number"?f:null,m=g===null;return i(w,{label:s(e),icon:p?X(p):void 0,value:m?d||l===void 0?void 0:s(l):`${g}${h}`,changed:!m,action:d?Ue(d,{changed:!m,onReset:()=>u(null)}):i(C,{words:y()?.panel,label:s(e),changed:!m,onReset:()=>u(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):V({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const ce="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(w,{label:s(ce),icon:i(nt,{}),changed:r,action:Ue(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(wi,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=W();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Ut(){return xt({type:"custom",render:()=>i(Po,{})},"always")}function bi(){const e=W();return t=>e?.onChangeMany(t)}function wi({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=L(e.sidesKey),a=pt(r)??[...ut];return i(xo,{label:s(ce),value:a,corners:qn,onChange:c=>{const d=pt(c)??[];l(d.length===ut.length?null:d)},radius:t,onRadiusChange:n,radiusMin:U,radiusMax:Ze,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Kt(){return Ut()}function Si({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:s("not set");return i(C,{words:y()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):D(r,s("Styles")),onReset:n})}function xi(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:U}function yi(){return Be({sidesKey:"sectionCornerSides",useFollowed:xi,mark:i(Si,{label:ce}),hint:Ci})}const Ci="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function _a(){return Z({_gShape:R("Shape"),sectionCorners:yi(),sectionCornerSides:Kt(),...M("sectionBorder",$t)})}const _i=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function Ti(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Ri(){let e;try{const t=Ft(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||wr.line}function Ii({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,p]=q(()=>r?so(c,a):!1),h=_i(),f=u=>Ti(r&&l?u:{width:u.width,color:u.color,...l?{style:u.style}:{}});return i(w,{label:s("Border"),icon:i(Fn,{}),action:r?i(io,{each:d,label:s("Each side"),onChange:p}):void 0,children:i(ro,{label:s("Border"),value:c,each:d,onChange:u=>t(f(u)),placeholder:n,presets:o,words:h,styles:l,max:br})})}function Oi({value:e,onChange:t,view:n}){const[o]=L("sectionBorder"),[r]=L(K("sectionBorder")),l=Ri(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Nt(a(o)),...Nt(a(r))}:n==="tablet"?a(o):{};return i(Ii,{value:e,onChange:t,placeholder:{sides:lo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}function Ta(e){return T(e,$t(e==="mobile"?"phone":e))}function $t(e){return{type:"custom",render:({value:t,onChange:n})=>i(Oi,{value:t,onChange:n,view:e})}}function M(e,t){const n=(o,r)=>ae(e,t(o),Le)[r];return{[e]:n("desktop",e),[K(e)]:n("tablet",K(e)),[F(e)]:n("phone",F(e))}}function Ra(e){return{type:"custom",render:()=>i(Ei,{partKey:e})}}function Ei({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=v(),r=tr();let l=null;try{l=Zo().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(eo,{name:s("Text"),preview:Jo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??er.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Qo(t,e))}})}function Xt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=te(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?Qn(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Jn(r)?r:n}function ki({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Xt(U);return i(C,{words:y()?.panel,label:s(e),changed:t,detail:D(`${o}px`,s("the section")),onReset:n})}function Ni(){return i(N,{children:s("Follows the section's Corners until you set a number here.")})}function Fi(){return Be({sidesKey:"cardCornerSides",useFollowed:()=>Xt(U),mark:i(ki,{label:ce}),hint:i(Ni,{})})}function Li(){return{type:"custom",render:()=>i(fn,{})}}function Ia(e){return{...e,render:t=>i(hn,{render:e.render,props:t})}}function Oa(){return{_gShape:R("Shape"),cardCorners:Fi(),cardCornerSides:Kt(),cardCornersApplyAll:Li()}}function Pi(){return E({type:"custom",render:e=>i(vi,{...e})},{type:"select",label:$,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Ai(e,t){const n=kt(e);if(n!=="custom")return s(Et.find(r=>r.value===n)?.label??"");const o=mt(Oe(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):s("Custom")}function vi(e){const{value:t,onChange:n}=e,[o]=L("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,a=t!=null,c=a?t:l?e.follows:void 0,d=kt(c),p=r>=2&&r<=ht,h=()=>[...Ro[r]??[]],f=Y(null),u=b=>{const _=f.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!p||n(b==="custom"?h():b)},m=s("The width bar works for 2 to {count} blocks.",{count:ht}),S=a&&(l||t!=="content"),x=Oo().widths.hint(r,To);return i(w,{label:s($),icon:i(ge,{}),changed:S,hint:d!=="custom"?void 0:p?x:m,action:i(C,{words:y()?.panel,label:s($),changed:S,disabled:e.readOnly===!0,detail:l?B(b=>s(b),Ai(e.follows,r),e.followsView):s("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ft,{label:s($),value:d,options:Et.map(b=>({value:b.value,label:b.value==="custom"&&!p?m:s(b.label),icon:Yr(i("span",{className:"sf-gallery-pic sf-share-pic",children:jt(b.weights).map((_,z)=>i("i",{style:{gridColumn:`span ${_}`}},z))}),s(b.label),b.value==="custom"&&!p?m:s(b.label))})),onChange:g,columns:3,cell:Vt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:mt(Oe(c,r),r)}},onBlur:()=>{f.current=null},children:i(Io,{label:s($),count:r,value:Oe(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function jt(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 Ea(){return Q(pr,i(Hn,{}),Rt,Rt[0].value)}function ka(){return T("mobile",zr($,i(ge,{}),gr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:jt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),mr,{columns:2,cell:Vt}))}const Vt={width:"5.75rem",height:"3.25rem"};function Na(){return ae("share",Pi(),Le)[K("share")]}function Bi(){return T("mobile",j(It,i(tt,{}),Ie,hr,1,Ie,"",{clear:{phoneFollows:!1,hint:Ie}}))}const zt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Fa(){const e=j(It,i(tt,{}),Ot,fr,1,Ot,"",{clear:{emptyLabel:"Auto"}}),t=ae("columns",e,{...zt,tablet:Le.tablet}),n=ae("columns",e,zt,{phoneRow:Bi()});return{...t,phoneRow:n.phoneRow}}function La(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(w,{label:s(e),icon:i(dt,{noun:l}),action:i(C,{words:y()?.panel,label:s(e),changed:!Gr(a),detail:s("the Text style in Styles"),onReset:()=>c(Hr),defaultAction:{onPress:()=>c(Dr),title:s("Keep this section's own built-in size"),icon:i(Ln,{})}}),children:V({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Pa(){return{_gCellWidth:R("Cell width"),gridSpan:Q("Positions",i(ge,{}),[{label:"Auto",value:""},...Array.from({length:wn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function P(){let e=null,t=null;try{e=Ke(Di),t=te(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Di=en(null);function Hi({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const d=P()[a],p=Ce(void 0,d,c);return i(N,{children:V({min:e,max:t,step:n,value:Ce(o,d,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function Gi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=P()[t],c=Ce(void 0,a,n);return i(C,{words:y()?.panel,label:s(e),changed:r,detail:B(d=>s(d),`${c}${o}`),onReset:l})}function Mi(e){return Wt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Gi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Hi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Wi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ui={Top:ct,Bottom:lt,Left:st,Right:at},Ki=e=>{const t=Ui[e];return i(t,{})};function Aa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Wi[x],l=x=>j(r("Top"),i(ct,{}),O.min,O.max,O.step,x,"px"),a=(x,b,_,z=O)=>T("mobile",Mi({label:r(x),icon:Ki(x),desktopKey:b,min:z.min,max:z.max,step:z.step,fallback:_})),c=e.top??O.min,d=e.bottom??O.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??O,u=e.side??f.min,g=e.sidePhone??u,m=e.phone===!0,S=x=>m?T("desktop",x):x;return Z({...o?{_gSpacing:R("Padding")}:{},[t]:S(l(c)),...m?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:S(j(r("Bottom"),i(lt,{}),O.min,O.max,O.step,d,"px")),...m?{[F(n)]:a("Bottom",n,d)}:{}},...e.sides?{[p]:S(j(r("Left"),i(st,{}),f.min,f.max,f.step,u,"px")),...m?{[F(p)]:a("Left",p,g,f)}:{},[h]:S(j(r("Right"),i(at,{}),f.min,f.max,f.step,u,"px")),...m?{[F(h)]:a("Right",h,g,f)}:{}}:{}})}function va(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&me(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const de="Width";function Ba(e,t=Mr,n=!0){const o=t.map(r=>({label:Wr[r],value:r}));return Z({...n?{_gWidth:R(de)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(w,{label:s(de),icon:i(Vn,{}),action:n?i(ii,{inherited:l?.inherited??!1,onReset:()=>r(Ur),label:de}):void 0,children:Ae({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:de})})}})}function Da(){const e=(o,r)=>({type:"custom",render:({value:l,onChange:a})=>i($i,{value:l,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:l,field:a})=>i(ji,{value:r,onChange:l,unit:a?.unit,view:o})}),n=o=>{const r=Jr("Unit",i(ot,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const l=r.render;return{...r,render:a=>i(Vi,{props:a,draw:l,view:o})}};return Z({_gHeight:R(J),...M("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(zi,{view:o,onClear:()=>r(void 0)}))),...M("sectionHeightValue",t),...M("sectionHeightUnit",n)})}function $i({value:e,onChange:t,view:n,badge:o}){const r=P(),l=c=>["auto","fixed","screen"].includes(c),a=ue(n,r)?.mode??"auto";return i(w,{label:J,icon:X(i(rt,{})),action:o?o(t):void 0,children:Ae({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:l(e)?e:a,onChange:t,ariaLabel:J})})}function Yt(e,t){return e==="phone"&&_e(t)?rr(t):or(t)}function ue(e,t){return e==="desktop"||(e==="tablet"?_e(t):nr(t))?null:Yt(e,t)}const k=(e,t)=>e==="tablet"?K(t):F(t);function Xi(e,t,n,o){const r=ue(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[k(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[k(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[k(e,"sectionHeightValue")]:r.value}:{},[k(e,n)]:o}}function qt(e,t,n){const o=W(),r=ue(e,P());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=Xi(e,c,t,a);return d===null?{[e==="desktop"?t:k(e,t)]:a}:Object.keys(d).length?d:null})}}function ji({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:l}=qt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?dr:cr;return i("div",{className:"sf-field",children:V({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:J,onChange:l})})}function Vi({props:e,draw:t,view:n}){const{followed:o,write:r}=qt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function zi({view:e,onClear:t}){const n=P(),o=ue(e,n)===null,r=e==="phone"&&_e(n),l=Yt(e,n),a=B(c=>s(c),l.mode==="auto"?s("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(C,{words:y()?.panel,label:s(J),changed:o,detail:a,onReset:t})}function Ha(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:a,onChange:c,id:d,name:p})=>i(Qi,{value:a,onChange:c,labelId:`${d??p??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:a,onChange:c})=>i(qi,{value:a,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:a,onChange:c})=>i(Ji,{value:a,onChange:c,view:l,intro:t})});return{_gStick:R(lr,{dot:t?Yi:Jt}),...M("stickTop",n),...M("stickTopDistance",o),...e.screens?M(Te,r):{}}}const Jt={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},Yi={any:[Jt,ir]};function Zt(e,t,n,o){const r=W(),l=P(),a=e==="desktop"||pe(e,l)?null:De(e,Re(l,{intro:o}));return{followed:a,write:a&&r?d=>r.onChangeMany(p=>{const h=Zi(e,p,d,t,o);return h===null?{[k(e,t)]:d}:Object.keys(h).length?h:null}):n}}function qi({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,"stickTopDistance",t,o);return i("div",{className:"sf-field",children:V({min:le.min,max:le.max,step:le.step,value:r?null:typeof e=="number"?e:le.fallback,...r?{placeholder:r.distance}:{},suffix:"px",ariaLabel:s("Distance from top"),onChange:l})})}function Ji({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,Te,t,o);return i(w,{label:s(_t),icon:X(i(rt,{})),children:V({min:ne.min,max:ne.max,step:ne.step,value:r?null:rn(e)??ne.default,...r?{placeholder:r.screens}:{},ariaLabel:s(_t),onChange:l})})}function pe(e,t){return e==="tablet"?ar(t):sr(t)}function De(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,screens:t.desktopScreens}}function Zi(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||pe(e,t))return null;if(n===void 0)return{};const l=De(e,Re(t,{intro:r})),a=e==="phone"&&pe("tablet",t)?d=>k("tablet",d):d=>d,c=(d,p)=>t[a(d)]==null?{}:{[k(e,d)]:p};return{[k(e,"stickTop")]:!0,...c("stickTopDistance",l.distance),...c(Te,l.screens),[k(e,o)]:n}}function Qi({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=P(),a=Re(l,{intro:r}),c=o==="phone"?a.phone:o==="tablet"?a.tablet:r?a.desktop:e===!0,d=o==="phone"&&a.ownTablet,p=o==="desktop"?null:De(o,a),h=p?.on?`${p.distance}px`:s("Off");return i(w,{label:s(Ct),labelId:n,icon:X(i(Kn,{})),action:A(N,{children:[o!=="desktop"?i(C,{words:y()?.panel,label:s(Ct),changed:pe(o,l),detail:B(f=>s(f),h,d?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Se,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Qt="e.g. about";function Ga(){return{_gAnchor:R("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Qt},{type:"custom",render:({value:e,onChange:t})=>i(In,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:Qt,hideable:!1,markup:!1})})})}}function Ma(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(w,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(Co,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Wa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(w,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(yo,{id:c,value:on(typeof o=="string"?o:null),onChange:d=>r(d?nn(d):"")})})}}}function el(e,t,n,o){return{type:"custom",...E({},{...ee,label:e}),render:r=>{const{value:l,onChange:a,id:c,name:d}=r,p="follows"in r,h=r,f=typeof l=="boolean",u=typeof h.follows=="boolean"?h.follows:t,g=f?l:p?u:t,m=`${c??d??e}-label`,S=h.readOnly===!0,x=i(Se,{checked:g,onChange:a,disabled:S,ariaLabelledBy:m});return i(w,{label:s(e),labelId:m,icon:n,hint:o===void 0?void 0:s(o),action:p?A(N,{children:[i(C,{words:y()?.panel,label:s(e),changed:f,detail:h.followsNoView?s(u?"On":"Off"):B(b=>s(b),s(u?"On":"Off"),h.followsView),disabled:S,onReset:()=>a(void 0)}),x]}):x})}}}function Ua(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(tl,{label:"Background",icon:i(Un,{}),id:r,value:e,shown:zn(e),onChange:t})}}}function Ka(e,t){return{type:"custom",...E({},{...ee,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(w,{label:s(e),htmlFor:a,className:"sf-checkbox",action:i(wo,{id:a,checked:l,onChange:o})})}}}function $a(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(re,{label:s(e),icon:n,value:o||t,onChange:r})}}function tl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:a,n:c}=Ge(),d=ye(o),p=d?ie(d,a,c):null;return i(re,{label:s(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:l,choices:He(d??"",a,c,l)})}function Xa(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(nl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function He(e,t,n,o){const r=we(e);return No(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function nl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Ge(),l=o.background,a=D(l.toUpperCase(),s("Theme {n} background",{n:r})),c=we(e),d=c?ie(c,o,r):null,p=He(e,o,r,t),h=n?()=>t(void 0):()=>t("");let f=l,u=a;if(n){const g=we(n.follows),m=Yn(n.follows),S=g?ie(g,o,r):m?{hex:m,words:m.toUpperCase()}:null;f=S?.hex??l,u=B(x=>s(x),S?S.words:a,n.view)}return d?i(re,{label:s("Fill"),icon:i(be,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:h,resetTo:u,choices:p}):i(wt,{label:s("Fill"),icon:i(be,{}),value:e,inherited:f,resetTo:u,onChange:t,onReset:h,choices:p})}function ol(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return se(n);const r=Zn(e,t);if(r.length===0)return null;const l=se(Bt(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=se(Bt(r[a].sectionAccent));if(c!==null)return c}return se(r[0].sectionAccent)}function Ge(){const e=Ft(v().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=te(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?ol(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:Sr(e.themes[o]),n:o+1}}const rl=[{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 il({label:e,value:t,onChange:n,points:o=rl}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(bo,{label:s(e),value:t,points:r,onChange:n})}function ja(){return Ut()}const Va={top:i(Bn,{}),right:i(vn,{}),bottom:i(Pn,{}),left:i(An,{})};function za(e,t,n,o,r,l,a){const c=f=>t.find(u=>u.value===f),d=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const u=t.find(m=>m.cell===f);if(!u)return d(`missing-${f}`);const g=l?.[f];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},h=[d("corner-top-left"),p("top"),d("corner-top-right"),p("left"),d("centre"),p("right"),d("corner-bottom-left"),p("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const g=t.some(m=>m.value===f)?f:n;return i(w,{label:s(e),icon:r,value:c(g)?.label?s(c(g).label):a?s(a):"",children:il({label:e,value:g,onChange:u,points:h})})}}}function Ya(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Vo,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function qa(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(Yo,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function Ja(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Za=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Qa(e,t,n){const o=Object.keys(Xe).map(r=>({label:Xe[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(sl,{label:e,icon:t,options:o,onChange:r})}}function ll(e,t,n){const o=ln(e,t,n);if(o!==void 0)return o==="save-makes-frame"?s("A frame is made from this video when you save the page."):o==="starts-dark"?s("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?s("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?s("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?s("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?s("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=an(e);return r==="frame-missing-image"?s("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?s("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?s("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?s("No image yet. The slide shows its background colour until you choose one."):void 0}function sl({label:e,icon:t,options:n,onChange:o}){const r=W(),l=r?.values??{},a=sn(l),c=Ke(un),d=dn(c?.docId??null);let p=null;try{p=te(f=>f.appState.data)}catch{p=null}const h=cn(r?.id,p,d);return i(w,{label:s(e),icon:X(t),hint:ll(l,h,c?.hasUnsavedEdits??!1),children:Ae({options:n,value:a,onChange:o,ariaLabel:e})})}function ec(e,t,n,o={}){const r={type:"custom",[Ye]:!0,render:({value:l,onChange:a,name:c})=>i(jo,{value:l||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?T("each",r):r}const tc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function al(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function nc({value:e,onChange:t,label:n}){const o=e||{},r=W(),l=r?r.values!==r.node.props:!0,a=!!o.pending&&l,c=!!o.pending&&!l,d=!!Xr($r()).geocode,p=$e(),h=(f,u)=>t({...o,[f]:u??void 0});return A(N,{children:[i(w,{label:s(n),icon:i(it,{}),action:d?i(xe,{content:s("Find from the address (OpenStreetMap)"),children:i(gt,{"aria-label":s("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i($n,{})})}):void 0,children:d&&o.status?i(On,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?s("Finding…"):c?s(ko):s(o.status),hint:al(o)}):null}),i(w,{label:s("Enter by hand"),labelId:p,icon:i(Dn,{}),action:i(Se,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:p})}),o.manual&&i(w,{label:s("Latitude, longitude"),icon:i(it,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(bt,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>h("lat",f),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(bt,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>h("lng",f),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function cl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function dl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function oc(e,t){return e===null?null:t>e?e:null}function ul(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 rc={label:"Ticker items",icon:i(Wn,{})};function ic(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...Ht.textList,label:e}),render:({value:r,onChange:l})=>i(pl,{label:e,icon:X(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function pl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=Y(null),[c,d]=q(null),p=f=>f.map(u=>({text:u?.text??""})),h=f=>{const u=ul(n,f,c);u===null&&(a.current=null),d(u),r(p(f))};return i(ao,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(St,{target:a,value:cl(n,c),onChange:f=>r(dl(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,u,g)=>i("input",{type:"text",className:l&&c===u?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:u+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,d(u)}})})}function lc(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function sc(e){return{_gCards:R("Cards"),coverIndex:Q("Cover image",i(Mn,{}),Ko,String($o),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:gi("Image background",Ir),cardImage:ml()}}function ac(){return{outline:Q("Card outline",i(Xn,{}),Mo,Uo),indexBadge:Q("Card number",i(ot,{}),Go,Wo),showBadge:el("Product badge",!0,i(dt,{noun:"tag"}))}}function cc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...ee,label:fe.find(l=>l.id===r).label}),o=r=>E(Fo(Me),n(r));return{_gShowOnCard:R("Show on a card"),[Me]:E({type:"custom",render:()=>i(fl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Me)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Me="showCardPrice",fe=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function fl({rest:e}){const t=P(),n=bi(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=fe.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(We,{parts:fe,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(fe.map(({id:a})=>[a,void 0])))})}function dc(e,t="display"){const n=F(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(We,{parts:e,changed:uo(o),shown:l=>po(o,l),onPress:(l,a)=>r(mo(o,l,a)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(hl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function We({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:a}){const c=s("Display");return i(w,{label:c,icon:i(kn,{}),changed:t,action:i(C,{words:y()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(co,{label:c,items:e.map(d=>({id:d.id,label:s(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:s(a)}:{}})),onChange:o})})}function hl({parts:e,desktopKey:t,value:n,onChange:o}){const r=P()[t];return i(We,{parts:e,changed:ho(n),shown:l=>fo(r,n,l),onPress:(l,a)=>o(go(n,l,a)),onReset:()=>o(Do),detail:s("the same as Desktop")})}function ml(){return Wt("Card image",{min:U,max:Ze,step:mn,icon:i(nt,{}),hint:"Rounds the picture. The card's own corner is in Styles."})}function uc(){return Be({sidesKey:"cornerSides",step:gn,useFollowed:()=>U,mark:i(gl,{label:bn}),hint:s("Rounds the picture. Left alone it stays square.")})}function gl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:y()?.panel,label:s(e),changed:t,onReset:n})}function pc(){return{type:"custom",render:({value:e,onChange:t})=>i(xl,{value:typeof e=="string"?e:"",onChange:t})}}function bl({layout:e,width:t}){const n=yn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Cn(e).map(([r,l],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},a))})}const wl={width:"3.5rem",height:"2.5rem"},Sl=200;function xl({value:e,onChange:t}){const[n,o]=q(null),[r,l]=q(4),a=Y(null);tn(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>l(u.getBoundingClientRect().width>=Sl?4:3);g();const m=new ResizeObserver(g);return m.observe(u),()=>m.disconnect()},[]);const c=e&&e in oe?e:"",d=Qe(n,c),p=Qe(n,"").length,h=_n("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:qr(h,s("Not chosen"))},...d.map(u=>({value:u,label:s(oe[u].label),icon:i(bl,{layout:oe[u],width:40})}))];return i(w,{label:s("Layout"),icon:i(Gn,{}),value:c?s(oe[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ft,{label:s("Layout"),value:c,options:f,onChange:t,columns:r,cell:wl,header:A("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(oo,{options:[{id:"all",label:s("All")},...Sn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:xn.length})})]})})})})}export{si as BOUND_TO_POST,ra as BOUND_TO_POST_NOTE,pa as BUCKET_ICONS,tc as CUSTOM_FIELD_MEDIA,nc as CoordsField,Dt as DESKTOP_GAP_NOT_OVERLAP,We as DisplayRow,Va as EDGE_ARROWS,_o as FOCAL_DEFAULT,rl as FOCAL_POINTS,he as FOLD_FIELD_MARKER,il as FocalPicker,xa as GroupLabel,ai as HIGHLIGHT_HINT,H as HidableTextField,ze as LINK_FIELD_MARKER,Vs as Label,Ye as MEDIA_FIELD_MARKER,Za as MEDIA_TYPE_OPTIONS,ia as NOT_BOUND_TO_POST,Sa as PanelBand,ui as PanelNoteLine,Di as RowPropsContext,qe as SCAFFOLD_FIELD_MARKER,gc as SCALAR_TEXT_CONTROLS,Qr as SiteGapDefaultReset,V as Slider,fi as Swatches,mc as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,rc as TICKER_ITEMS_ROW,pl as TextListField,tl as ThemeFillRow,de as WIDTH_LABEL,ii as WidthDefaultReset,ul as aimAfterListChange,Ga as anchorFields,D as backTo,ya as backgroundField,Ea as boxBlockSpacingField,Fa as boxColumnsFields,Xa as boxFillField,Bi as boxPhoneRowField,Pi as boxShareField,ka as boxSharePhoneField,Na as boxShareTabletField,ol as boxThemeIndexOf,ma as bucketHeader,Ra as buttonWordsEntryField,Fi as cardCornersField,gi as cardImageBackgroundField,ml as cardImageField,sc as cardMediaFields,Oa as cardShapeFields,cc as cardShowFields,ac as cardStyleFields,Pa as cellWidthFields,Ka as checkbox,$a as colorInput,Ys as containerDirectionField,ei as containerGapField,ti as containerGapPhoneField,zs as containerGapRows,ni as containerGapTabletField,al as coordsResultTip,ca as copyText,Kt as cornerSidesField,Be as cornersRowField,Wa as date,Ma as dateTime,ga as designGroupHeader,dc as displayFields,za as edgePad,He as fillSlotChoices,oc as focusAfterRemove,ja as focusKeptField,ba as foldMarker,me as foldMetaOf,pi as foldTitleOf,Xi as followedHeightPatch,Zi as followedStickPatch,pc as galleryLayoutField,Da as heightFields,ue as heightFollowedBy,qs as heroGroupPlacementPoints,Ve as hidableText,di as hintIsWhileTyping,uc as imageCornersField,oa as inOwnBox,ha as isBucketHeader,Ut as keptBy,da as linkField,ll as loadingRowHint,Qa as loadingShowsField,Ya as multiSelect,Ua as pageBackgroundField,fa as panelNote,Mi as phoneOverrideField,aa as plainText,ua as plainTextarea,Wt as pxField,wa as quietMarker,je as readHidable,cl as rowText,qa as searchSelect,mi as sectionBandChoices,Ta as sectionBorderField,yi as sectionCornersField,_a as sectionShapeFields,Ca as sectionThemeFields,dl as setRowText,La as sizeField,Ja as sourceField,Aa as spacingFields,Ha as stickFields,va as swapPadding,Ia as templateField,la as text,pn as textFieldIdentifier,Qs as textFieldOffPage,ta as textFieldPanelOnly,ic as textList,lc as textListRowField,sa as textarea,el as toggle,ec as upload,bi as useSelectedPatch,P as useSelectedProps,L as useSelectedSibling,Zr as useSiteGapDetail,Ba as widthField,na as withIdentifier,Zs as withOffPage,ea as withPanelOnly,Js as withScaffold};
1
+ "use client";import{jsx as i,jsxs as L,Fragment as k}from"react/jsx-runtime";import{cloneElement as pe,createContext as nn,useContext as Ke,useEffect as on,useId as $e,useRef as z,useState as q}from"react";import{useEasel as ee,useSelectedHost as M}from"efficient-easel/easel";import{PIN_LENGTH as te,toDateKey as rn,fromDateKey as ln}from"efficient-shell/format";import{say as s,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as sn}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as Xe,firstFrameHint as an,loadingShowsOf as cn,loadingStillHint as dn}from"../../../format/lib/hero-video.js";import{pageFramesFor as un,usePageVideoFrames as pn}from"../page-video-frames.js";import{ScreenDocumentContext as fn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as je,hidableText as Ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as fe,LINK_FIELD_MARKER as Ye,MEDIA_FIELD_MARKER as ze,SCAFFOLD_FIELD_MARKER as qe,TEXT_FIELD_MARKER as O,foldMetaOf as he,textFieldIdentifier as hn}from"efficient-easel/draw";import mn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Je}from"../../../render/lib/document/show-when.js";import gn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bn,CORNER_RADIUS_MAX as Ze,CORNER_RADIUS_MIN as W}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Sn,IMAGE_CORNERS_LABEL as wn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Cn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as yn,galleryChoices as Qe,galleryLayoutRatio as _n,galleryPictureCells as In}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Tn}from"./shell-glyph.js";import{anchorSiblingsOf as On,placementPoints as En}from"../../../format/lib/hero-group-placement.js";import Rn from"../../components/AnchorField.js";import Nn from"../../components/SourceStatus.js";import{AdjustIcon as kn,EyeIcon as Pn,AnimationIcon as Fn,BackgroundIcon as et,BorderAllIcon as Ln,BlockSectionIcon as An,ColumnWidthsIcon as me,ColumnsIcon as tt,CornerIcon as nt,DirectionDownIcon as vn,DirectionLeftIcon as Bn,DirectionRightIcon as Dn,DirectionUpIcon as Hn,EditIcon as Gn,GapIcon as Mn,GridIcon as Wn,GroundIcon as ge,HashIcon as ot,HeightIcon as rt,ImageIcon as Un,ListIcon as Kn,LocationIcon as it,PaddingBottomIcon as lt,PaddingLeftIcon as st,PaddingRightIcon as at,PaddingTopIcon as be,PageIcon as $n,StickyIcon as ct,SearchIcon as Xn,SquareIcon as jn,TypeIcon as Vn,WidthIcon as Yn}from"efficient-easel/icons";import{FieldGlyph as dt}from"../../components/FieldGlyph.js";import{resolvePageBackground as zn}from"../../../format/lib/content/page-background.js";import{boxFillOf as qn,boxFillSlot as Se}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as ut,CORNER_SIDE_POINTS as Jn,hasOwnSectionCorners as Zn,normalizeCornerSides as pt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Qn,enclosingSection as eo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as to,SettingsField as S,SettingsGroup as no,SettingsGroupSub as oo,SettingsSegmented as ro,SettingsBorder as io,SettingsSidesEach as lo,SettingsSwitch as we,borderSides as so,borderStartEach as ao}from"efficient-easel/panel";import{ListField as co}from"efficient-easel/fields";import{DisplayChips as uo}from"efficient-shell/ui";import{desktopDisplayChanged as po,partShownOnDesktop as fo,partShownOnPhone as ho,phoneDisplayChanged as mo,withDesktopPart as go,withPhonePart as bo}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as So,Checkbox as wo,ColorSwatch as xo,CornersInput as Co,DatePicker as yo,DateTimePicker as _o,FOCAL_DEFAULT as Io,IconPicker as ft,COLUMN_COUNT_MAX as ht,COLUMN_SHARE_MIN as To,COLUMN_SHARES_EQUAL as Oo,resolveColumnShares as mt,WidthsBar as Eo,useShellStrings as Ro,IconButton as gt,InputNumber as bt,Slider as No,Tooltip as xe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as ko}from"./geocode-resolve.js";import{ColourRow as oe,InheritedColourRow as St}from"./ColourControl.js";import{fillThemeColors as Po,slotFill as re}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Ce}from"../../../format/lib/document/part-inks.js";import{keptByRow as Fo}from"efficient-easel/screen/lib/document/style-fields";import wt from"./MarkupToolbar.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Lo,NoControlMark as Ao,noControlField as xt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as vo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Bo,PANEL_ONLY_FIELD as Do}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Ho,resolvePhoneValue as ye}from"../../../format/lib/document/phone-override.js";import{phoneKey as U,tabletKey as _e}from"efficient-easel/draw";import{viewKey as E}from"../../../format/lib/animation/views.js";import{viewRows as A}from"../animation/view-rows.js";import{SuppressibleText as Go}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Mo,CARD_OUTLINE_OPTIONS as Wo,DEFAULT_CARD_INDEX_FORMAT as Uo,DEFAULT_CARD_OUTLINE as Ko}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as $o,DEFAULT_COVER_INDEX as Xo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as jo}from"efficient-easel/draw";import Vo from"../../components/MediaUploadField.js";import Yo from"../../components/MultiSelectField.js";import zo from"../../components/SectionThemePicker.js";import qo from"../../components/SearchSelectField.js";import Jo from"../../components/StorefrontLinkField.js";import{UiIcon as Ct}from"efficient-easel/draw/client";import{SECTION_PADDING as R}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Zo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Qo}from"efficient-easel/draw/client";import{encodePartId as er}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as tr,useEaselStrings as nr}from"efficient-easel/strings";import{hasPhoneHeight as or,hasTabletHeight as Ie,resolveSectionMinHeight as rr,resolveTabletHeight as ir}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as lr,SECTION_PIN_ABOVE_HINT as sr,SECTION_PIN_ABOVE_KEY as ar,SECTION_PIN_ABOVE_LABEL as cr,SECTION_PIN_GROUP as dr,SECTION_PIN_LABEL as yt,SECTION_PIN_SCREENS_KEY as Te,SECTION_PIN_SCREENS_LABEL as _t,SECTION_PIN_STOP_DEFAULT as ur,SECTION_PIN_STOP_HINT as pr,SECTION_PIN_STOP_KEY as fr,SECTION_PIN_STOP_LABEL as hr,SECTION_PIN_STOP_OPTIONS as mr,SECTION_STICK_DISTANCE as ie,SOME_VIEW_PINS as It,hasPhoneStick as gr,hasTabletStick as br,resolveSectionStick as Oe,sectionPinStopOf as Sr,sectionPinStopWrite as wr}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as xr,SECTION_MIN_HEIGHT_GROUP_LABEL as J,SECTION_SCREEN_PCT as Cr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as yr,resolveContainerDirection as Tt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as _r,BOX_BLOCK_SPACING_POINTS as Ot,BOX_PHONE_ROW_LABEL as Et,BOX_COLUMNS_MAX as Ir,BOX_COLUMNS_MIN as Rt,BOX_PHONE_ROW_MAX as Tr,BOX_PHONE_ROW_MIN as Ee,BOX_SHARE_CHOICES as Nt,BOX_SHARE_LABEL as K,boxShareChoiceOf as kt,boxShareWidthsOf as Re,BOX_SHARE_PHONE_DEFAULT as Or,BOX_SHARE_PHONE_POINTS as Er}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Rr,borderBySide as Pt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Nr,normalizeTheme as Ft,normalizeThemeColors as kr,sectionBandTone as Pr,surfaceTwoTone as Fr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Lt,CONTAINER_GAP_BUILT_IN as Lr,CONTAINER_GAP_PHONE as Ne,GAP_FIELD_CONTAINER as ke,followsSitePhoneGap as Ar,hasOwnContainerGap as vr,hasOwnPhoneGap as Pe,resolveContainerGap as At,resolvePhoneContainerGap as vt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Br,CARD_IMAGE_BG_OFF as Dr,CARD_IMAGE_BG_SWATCH_NAMES as Hr,CARD_IMAGE_BG_SWATCHES as Gr,isCardImageBackgroundInheriting as Mr,cardImageBackgroundChoice as Wr,THEME_CARD_IMAGE_BG as Ur}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Kr,SECTION_BG_NO_FILL as $r,sectionBackgroundChoice as Xr,THEME_SECTION_BG as Fe,isSectionBackgroundEmpty as jr,sectionBackgroundHex as Bt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Vr,nestedAccentValue as Dt,resolveSectionAccent as le}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Yr,TYPE_SIZE_INHERIT as zr,isTypeSizeInheriting as qr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Jr,WIDTH_CHOICE_LABEL as Zr,WIDTH_INHERIT as Qr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as ei}from"./panel-heading-scope.js";import{useEaselSession as ti}from"efficient-easel/screen/lib/session-context";import{backendOf as ni}from"../website-session.js";import{BOX_GAP as oi,describedAs as N,group as T,iconOf as $,sharedStyleKinds as Z}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Ht,onDesktopWords as B,phoneTwinFields as Le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ri,gapField as Ae,iconPickerRow as ii,pickerCellIcon as li,pickerNoneIcon as si,Segmented as ve,segmented as ai,select as X,slider as j}from"./box-fields.js";function sa({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function D(e,t){return s("{value} from {from}",{value:e,from:t})}function ci(){const{blockGap:e}=v();return e===null?s("this container's own spacing"):D(`${e}px`,s("Styles"))}function di({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:s(n),changed:!e,detail:ci(),onReset:t})}function ui(e){return Ae({...oi,builtIn:Lr[e],resolve:(t,n)=>At(e,t,n?.siteGap),action:(t,n)=>i(di,{inherited:!vr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ke]:e}})}function pi(e){return Je(I("mobile",{[ke]:e,type:"custom",render:t=>i(mi,{container:e,...t})}),Gt)}function fi(e){return Je(I("tablet",{[ke]:e,type:"custom",render:t=>i(hi,{container:e,...t})}),Gt)}const Gt={not:{field:"gap",in:Array.from({length:-Lt.min},(e,t)=>Lt.min+t)}};function aa(e){return{gap:I("desktop",ui(e)),[_e("gap")]:fi(e),[U("gap")]:pi(e)}}function hi({container:e,...t}){const[n]=P("gap"),{siteGap:o}=t.field??{},r=Math.max(Ne.min,At(e,n,o));return Ae({...Ne,builtIn:r,resolve:a=>Pe(a)?a:r,action:(a,c)=>i(y,{words:C()?.panel,label:s("Gap"),changed:Pe(a),detail:B(d=>s(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function mi({container:e,...t}){const[n]=P("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=vt(e,void 0,n,o,r);return Ae({...Ne,builtIn:l,resolve:c=>vt(e,c,n,o,r),action:(c,d)=>i(y,{words:C()?.panel,label:s("Gap"),changed:Pe(c),detail:D(`${l}px`,Ar(e,n,r)?s("Styles"):s("Desktop")),onReset:()=>d(void 0)})}).render(t)}function ca(e){return ri({offered:yr(e),fallback:Tt(e,void 0),resolve:t=>Tt(e,t)})}function da(e,t){return En(t?On(e,t):[],t)}function gi({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:s(n),changed:!e,detail:D(s("Full"),s("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:d,hidden:p}=je(e),h=z(null),f=z(null),u=_=>t(a?{text:_,hidden:p}:_),g=()=>t({text:d,hidden:!p}),m=a&&p,w=$e(),x=r?Ci(r)?i("span",{className:"sf-hint-while-typing",children:s(r)}):s(r):void 0,b=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(S,{label:s(n),icon:i(Vn,{}),htmlFor:w,className:m?"is-hidden":void 0,hint:x,action:a?i(xe,{content:b,children:i(gt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(Ct,{name:"eye-off",size:14}):i(Ct,{name:"eye",size:14})})}):void 0,children:L("div",{className:"sf-copybox",children:[c&&i(wt,{target:l?f:h,value:d,onChange:u}),l?i("textarea",{id:w,ref:f,value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)}):i("input",{id:w,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)})]})})}function ua(e,t){return{...e,[qe]:t}}function pa(e){const t=e[O];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[O]:{...t,offPage:!0}}}function fa(e){return!e||typeof e!="object"?!1:e[O]?.offPage===!0}function ha(e){if(!e[O])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Do]:!0}}function ma(e){return Bo(e)}function ga(e){const t=e[O];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[O]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Nc,SCALAR_TEXT_CONTROLS as kc}from"efficient-easel/draw";function ba(e,t){if(!e[O])throw new Error("inOwnBox: the field holds no authored text");const{[Lo]:o,...r}=e;return{...r,[vo]:!0,render:t}}const bi=new Set(jo),Q={type:"radio",options:[{value:!0},{value:!1}]},Mt={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=N({...t,[O]:e},{...Mt[e.control],label:e.label});if(!bi.has(e.control))return n;const o=t.render;return{...xt(n,"authored-copy"),render:r=>i(Go,{name:r.name,children:o(r)})}},Sa="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Si={field:"source.slug",set:!0},wa={not:Si},wi="Select a word, then press the highlighter.",xi=new Set([wi]),Ci=e=>xi.has(e);function xa(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ca(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function ya(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function _a(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ia(e){return{type:"custom",[Ye]:{label:e},...N({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Jo,{value:Ve(t),onChange:n,label:e})}}function Ta(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Oa={Design:kn,Animation:Fn};function Ea(e){return{type:"custom",render:()=>i(yi,{text:e})}}function yi({text:e}){return i("p",{className:"sf-note",children:s(e)})}function Ra(e){return he(e)!==null&&e?.tabs!==void 0}const Wt=new Map;function Na(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Wt.get(n)??{type:"custom",tabs:t,[fe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Wt.set(n,o),o}const Ut=new Map;function ka(e){const t=Ut.get(e)??{type:"custom",[fe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return Ut.set(e,t),t}function _i(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Pa(e,t){return _i(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function Fa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(k,{})}}function La({title:e,children:t}){const[n,o]=q(()=>!Be.has(e));return i(no,{title:e,open:n,onToggle:r=>{o(r),r?Be.delete(e):Be.add(e)},children:t})}const Be=new Set;function Aa({label:e}){return i(oo,{title:s(e),level:ei(2)})}function Ii({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return L("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?s(o[c]):c;return i(xe,{content:d,children:i(xo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function va(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ti,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ti({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:a,n:c}=Me(),d={background:a.background,surface:a.surface,surface2:Fr(a),band:Pr(a)},p=n?Fe:t,h=jr(l,t,p),f=Bt(void 0,p,d),u=n?Kr:void 0,g=p===Fe?s("the theme's section background"):s("Theme {n} background",{n:c}),m=Oi(l,t,a,c,d,r),w=D(f.toUpperCase(),g),x=Ce(l),b=x?re(x,a,c):null;return b?i(oe,{label:s(e),icon:i(et,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:w,choices:m}):i(St,{label:s(e),icon:i(et,{}),value:h?"":Bt(l,t,d),inherited:f,resetTo:w,onChange:r,onReset:()=>r(u),choices:m})}function Oi(e,t,n,o,r,l){const a=Xr(e,t);return[{label:s("No fill"),color:"",selected:a==="none",onPick:()=>l($r)},{label:`${s("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>l(Fe)},...Ge(Ce(e)??"",n,o,l)]}function Ei(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Mr(r,t);return i(S,{label:s(e),icon:i(ge,{}),changed:!l,action:i(y,{words:C()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Br)}),children:Ii({swatches:Gr,current:l?Ur:Wr(r,t),onPick:o,names:Hr})})}}}function Ba(e=n=>n,t){return Z({_gSectionTheme:T(Vr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(zo,{value:e(n),onChange:o,followLabel:t})}})}function V({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:d,disabled:p=!1,placeholder:h,placeholderWord:f,onClear:u}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(No,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...f?{emptyLabel:s(f)}:{},suffix:l||void 0,showInput:a,label:d===void 0?void 0:s(d),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m===null?u?.():m!==o&&r(m)}})})}function Kt(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:d,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:u})=>{const g=typeof f=="number"?f:null,m=g===null;return i(S,{label:s(e),icon:p?$(p):void 0,value:m?d||l===void 0?void 0:s(l):`${g}${h}`,changed:!m,action:d?pe(d,{changed:!m,onReset:()=>u(null)}):i(y,{words:C()?.panel,label:s(e),changed:!m,onReset:()=>u(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):V({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const se="Corners";function De(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(S,{label:s(se),icon:i(nt,{}),changed:r,action:pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ni,{tier:e,px:o,onRadius:n})})}}}function P(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function $t(){return xt({type:"custom",render:()=>i(Ao,{})},"always")}function Ri(){const e=M();return t=>e?.onChangeMany(t)}function Ni({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=P(e.sidesKey),a=pt(r)??[...ut];return i(Co,{label:s(se),value:a,corners:Jn,onChange:c=>{const d=pt(c)??[];l(d.length===ut.length?null:d)},radius:t,onRadiusChange:n,radiusMin:W,radiusMax:Ze,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Xt(){return $t()}function ki({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:s("not set");return i(y,{words:C()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):D(r,s("Styles")),onReset:n})}function Pi(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:W}function Fi(){return De({sidesKey:"sectionCornerSides",useFollowed:Pi,mark:i(ki,{label:se}),hint:Li})}const Li="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Da(){return Z({_gShape:T("Shape"),sectionCorners:Fi(),sectionCornerSides:Xt(),...A("sectionBorder",jt)})}const Ai=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function vi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Bi(){let e;try{const t=Ft(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Nr.line}function Di({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,p]=q(()=>r?ao(c,a):!1),h=Ai(),f=u=>vi(r&&l?u:{width:u.width,color:u.color,...l?{style:u.style}:{}});return i(S,{label:s("Border"),icon:i(Ln,{}),action:r?i(lo,{each:d,label:s("Each side"),onChange:p}):void 0,children:i(io,{label:s("Border"),value:c,each:d,onChange:u=>t(f(u)),placeholder:n,presets:o,words:h,styles:l,max:Rr})})}function Hi({value:e,onChange:t,view:n}){const[o]=P("sectionBorder"),[r]=P(_e("sectionBorder")),l=Bi(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Pt(a(o)),...Pt(a(r))}:n==="tablet"?a(o):{};return i(Di,{value:e,onChange:t,placeholder:{sides:so(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}function Ha(e){return I(e,jt(e==="mobile"?"phone":e))}function jt(e){return{type:"custom",render:({value:t,onChange:n})=>i(Hi,{value:t,onChange:n,view:e})}}function Ga(e){return{type:"custom",render:()=>i(Gi,{partKey:e})}}function Gi({partKey:e}){const[t]=P("id"),[n]=P("_partStyles"),{textStyles:o}=v(),r=nr();let l=null;try{l=Qo().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(to,{name:s("Text"),preview:Zo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??tr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(er(t,e))}})}function Vt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=ee(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?eo(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Zn(r)?r:n}function Mi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Vt(W);return i(y,{words:C()?.panel,label:s(e),changed:t,detail:D(`${o}px`,s("the section")),onReset:n})}function Wi(){return i(k,{children:s("Follows the section's Corners until you set a number here.")})}function Ui(){return De({sidesKey:"cardCornerSides",useFollowed:()=>Vt(W),mark:i(Mi,{label:se}),hint:i(Wi,{})})}function Ki(){return{type:"custom",render:()=>i(mn,{})}}function Ma(e){return{...e,render:t=>i(gn,{render:e.render,props:t})}}function Wa(){return{_gShape:T("Shape"),cardCorners:Ui(),cardCornerSides:Xt(),cardCornersApplyAll:Ki()}}function $i(){return N({type:"custom",render:e=>i(ji,{...e})},{type:"select",label:K,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Xi(e,t){const n=kt(e);if(n!=="custom")return s(Nt.find(r=>r.value===n)?.label??"");const o=mt(Re(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):s("Custom")}function ji(e){const{value:t,onChange:n}=e,[o]=P("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,a=t!=null,c=a?t:l?e.follows:void 0,d=kt(c),p=r>=2&&r<=ht,h=()=>[...Oo[r]??[]],f=z(null),u=b=>{const _=f.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!p||n(b==="custom"?h():b)},m=s("The width bar works for 2 to {count} blocks.",{count:ht}),w=a&&(l||t!=="content"),x=Ro().widths.hint(r,To);return i(S,{label:s(K),icon:i(me,{}),changed:w,hint:d!=="custom"?void 0:p?x:m,action:i(y,{words:C()?.panel,label:s(K),changed:w,disabled:e.readOnly===!0,detail:l?B(b=>s(b),Xi(e.follows,r),e.followsView):s("Fit content"),onReset:()=>n(void 0)}),children:L("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ft,{label:s(K),value:d,options:Nt.map(b=>({value:b.value,label:b.value==="custom"&&!p?m:s(b.label),icon:li(i("span",{className:"sf-gallery-pic sf-share-pic",children:Yt(b.weights).map((_,Y)=>i("i",{style:{gridColumn:`span ${_}`}},Y))}),s(b.label),b.value==="custom"&&!p?m:s(b.label))})),onChange:g,columns:3,cell:zt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:mt(Re(c,r),r)}},onBlur:()=>{f.current=null},children:i(Eo,{label:s(K),count:r,value:Re(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function Yt(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Ua(){return X(_r,i(Mn,{}),Ot,Ot[0].value)}function Ka(){return I("mobile",ii(K,i(me,{}),Er.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Yt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Or,{columns:2,cell:zt}))}const zt={width:"5.75rem",height:"3.25rem"};function $a(){return Le("share",$i(),Ht)[_e("share")]}function Vi(){return I("mobile",j(Et,i(tt,{}),Ee,Tr,1,Ee,"",{clear:{phoneFollows:!1,hint:Ee}}))}const qt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Xa(){const e=j(Et,i(tt,{}),Rt,Ir,1,Rt,"",{clear:{emptyLabel:"Auto"}}),t=Le("columns",e,{...qt,tablet:Ht.tablet}),n=Le("columns",e,qt,{phoneRow:Vi()});return{...t,phoneRow:n.phoneRow}}function ja(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(S,{label:s(e),icon:i(dt,{noun:l}),action:i(y,{words:C()?.panel,label:s(e),changed:!qr(a),detail:s("the Text style in Styles"),onReset:()=>c(zr),defaultAction:{onPress:()=>c(Yr),title:s("Keep this section's own built-in size"),icon:i(An,{})}}),children:V({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Va(){return{_gCellWidth:T("Cell width"),gridSpan:X("Positions",i(me,{}),[{label:"Auto",value:""},...Array.from({length:xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function F(){let e=null,t=null;try{e=Ke(Yi),t=ee(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Yi=nn(null);function zi({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const d=F()[a],p=ye(void 0,d,c);return i(k,{children:V({min:e,max:t,step:n,value:ye(o,d,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function qi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=F()[t],c=ye(void 0,a,n);return i(y,{words:C()?.panel,label:s(e),changed:r,detail:B(d=>s(d),`${c}${o}`),onReset:l})}function Ji(e){return Kt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(qi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(zi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Zi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Qi={Top:be,Bottom:lt,Left:st,Right:at},el=e=>{const t=Qi[e];return i(t,{})};function Ya(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Zi[x],l=x=>j(r("Top"),i(be,{}),R.min,R.max,R.step,x,"px"),a=(x,b,_,Y=R)=>I("mobile",Ji({label:r(x),icon:el(x),desktopKey:b,min:Y.min,max:Y.max,step:Y.step,fallback:_})),c=e.top??R.min,d=e.bottom??R.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??R,u=e.side??f.min,g=e.sidePhone??u,m=e.phone===!0,w=x=>m?I("desktop",x):x;return Z({...o?{_gSpacing:T("Padding")}:{},[t]:w(l(c)),...m?{[U(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w(j(r("Bottom"),i(lt,{}),R.min,R.max,R.step,d,"px")),...m?{[U(n)]:a("Bottom",n,d)}:{}},...e.sides?{[p]:w(j(r("Left"),i(st,{}),f.min,f.max,f.step,u,"px")),...m?{[U(p)]:a("Left",p,g,f)}:{},[h]:w(j(r("Right"),i(at,{}),f.min,f.max,f.step,u,"px")),...m?{[U(h)]:a("Right",h,g,f)}:{}}:{}})}function za(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&he(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const ae="Width";function qa(e,t=Jr,n=!0){const o=t.map(r=>({label:Zr[r],value:r}));return Z({...n?{_gWidth:T(ae)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(S,{label:s(ae),icon:i(Yn,{}),action:n?i(gi,{inherited:l?.inherited??!1,onReset:()=>r(Qr),label:ae}):void 0,children:ve({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ae})})}})}function Ja(){const e=(o,r)=>({type:"custom",render:({value:l,onChange:a})=>i(tl,{value:l,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:l,field:a})=>i(ol,{value:r,onChange:l,unit:a?.unit,view:o})}),n=o=>{const r=ai("Unit",i(ot,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const l=r.render;return{...r,render:a=>i(rl,{props:a,draw:l,view:o})}};return Z({_gHeight:T(J),...A("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(il,{view:o,onClear:()=>r(void 0)}))),...A("sectionHeightValue",t),...A("sectionHeightUnit",n)})}function tl({value:e,onChange:t,view:n,badge:o}){const r=F(),l=c=>["auto","fixed","screen"].includes(c),a=ce(n,r)?.mode??"auto";return i(S,{label:J,icon:$(i(rt,{})),action:o?o(t):void 0,children:ve({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:l(e)?e:a,onChange:t,ariaLabel:J})})}function Jt(e,t){return e==="phone"&&Ie(t)?ir(t):rr(t)}function ce(e,t){return e==="desktop"||(e==="tablet"?Ie(t):or(t))?null:Jt(e,t)}function nl(e,t,n,o){const r=ce(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[E("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[E("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[E("sectionHeightValue",e)]:r.value}:{},[E(n,e)]:o}}function Zt(e,t,n){const o=M(),r=ce(e,F());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=nl(e,c,t,a);return d===null?{[E(t,e)]:a}:Object.keys(d).length?d:null})}}function ol({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:l}=Zt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Cr:xr;return i("div",{className:"sf-field",children:V({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:J,onChange:l})})}function rl({props:e,draw:t,view:n}){const{followed:o,write:r}=Zt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function il({view:e,onClear:t}){const n=F(),o=ce(e,n)===null,r=e==="phone"&&Ie(n),l=Jt(e,n),a=B(c=>s(c),l.mode==="auto"?s("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(y,{words:C()?.panel,label:s(J),changed:o,detail:a,onReset:t})}function Za(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:a,onChange:c,id:d,name:p})=>i(pl,{value:a,onChange:c,labelId:`${d??p??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:a,onChange:c})=>i(cl,{value:a,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:a,onChange:c})=>i(dl,{value:a,onChange:c,view:l,intro:t})});return{_gStick:T(dr,{dot:t?al:It}),...A("stickTop",n),...A("stickTopDistance",o),...e.screens?A(Te,r):{},...t?{}:{[fr]:ll()},...t||e.above===!1?{}:{[ar]:sl()}}}function ll(){const e=X(hr,i(be,{}),mr,ur);return I("desktop",{...e,render:t=>{const n=e.render({...t,value:Sr(t.value),onChange:o=>t.onChange(wr(o))});return pe(n,{hint:s(pr)})}})}function sl(){const e=tn(cr,!1,i(ct,{}),sr);return I("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const al={any:[It,lr]};function Qt(e,t,n,o){const r=M(),l=F(),a=e==="desktop"||de(e,l)?null:He(e,Oe(l,{intro:o}));return{followed:a,write:a&&r?d=>r.onChangeMany(p=>{const h=ul(e,p,d,t,o);return h===null?{[E(t,e)]:d}:Object.keys(h).length?h:null}):n}}function cl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Qt(n,"stickTopDistance",t,o);return i("div",{className:"sf-field",children:V({min:ie.min,max:ie.max,step:ie.step,value:r?null:typeof e=="number"?e:ie.fallback,...r?{placeholder:r.distance}:{},suffix:"px",ariaLabel:s("Distance from top"),onChange:l})})}function dl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Qt(n,Te,t,o);return i(S,{label:s(_t),icon:$(i(rt,{})),children:V({min:te.min,max:te.max,step:te.step,value:r?null:sn(e)??te.default,...r?{placeholder:r.screens}:{},ariaLabel:s(_t),onChange:l})})}function de(e,t){return e==="tablet"?br(t):gr(t)}function He(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,screens:t.desktopScreens}}function ul(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||de(e,t))return null;if(n===void 0)return{};const l=He(e,Oe(t,{intro:r})),a=e==="phone"&&de("tablet",t)?d=>E(d,"tablet"):d=>d,c=(d,p)=>t[a(d)]==null?{}:{[E(d,e)]:p};return{[E("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...c(Te,l.screens),[E(o,e)]:n}}function pl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=F(),a=Oe(l,{intro:r}),c=o==="phone"?a.phone:o==="tablet"?a.tablet:r?a.desktop:e===!0,d=o==="phone"&&a.ownTablet,p=o==="desktop"?null:He(o,a),h=p?.on?`${p.distance}px`:s("Off");return i(S,{label:s(yt),labelId:n,icon:$(i(ct,{})),action:L(k,{children:[o!=="desktop"?i(y,{words:C()?.panel,label:s(yt),changed:de(o,l),detail:B(f=>s(f),h,d?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(we,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const en="e.g. about";function Qa(){return{_gAnchor:T("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:en},{type:"custom",render:({value:e,onChange:t})=>i(Rn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:en,hideable:!1,markup:!1})})})}}function ec(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(S,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(_o,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:p=>r(p?p.toISOString():"")})})}}}function tc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(S,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(yo,{id:c,value:ln(typeof o=="string"?o:null),onChange:d=>r(d?rn(d):"")})})}}}function tn(e,t,n,o){return{type:"custom",...N({},{...Q,label:e}),render:r=>{const{value:l,onChange:a,id:c,name:d}=r,p="follows"in r,h=r,f=typeof l=="boolean",u=typeof h.follows=="boolean"?h.follows:t,g=f?l:p?u:t,m=`${c??d??e}-label`,w=h.readOnly===!0,x=i(we,{checked:g,onChange:a,disabled:w,ariaLabelledBy:m});return i(S,{label:s(e),labelId:m,icon:n,hint:o===void 0?void 0:s(o),action:p?L(k,{children:[i(y,{words:C()?.panel,label:s(e),changed:f,detail:h.followsNoView?s(u?"On":"Off"):B(b=>s(b),s(u?"On":"Off"),h.followsView),disabled:w,onReset:()=>a(void 0)}),x]}):x})}}}function nc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(fl,{label:"Background",icon:i($n,{}),id:r,value:e,shown:zn(e),onChange:t})}}}function oc(e,t){return{type:"custom",...N({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(S,{label:s(e),htmlFor:a,className:"sf-checkbox",action:i(wo,{id:a,checked:l,onChange:o})})}}}function rc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(oe,{label:s(e),icon:n,value:o||t,onChange:r})}}function fl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:a,n:c}=Me(),d=Ce(o),p=d?re(d,a,c):null;return i(oe,{label:s(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:l,choices:Ge(d??"",a,c,l)})}function ic(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(hl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ge(e,t,n,o){const r=Se(e);return Po(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function hl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Me(),l=o.background,a=D(l.toUpperCase(),s("Theme {n} background",{n:r})),c=Se(e),d=c?re(c,o,r):null,p=Ge(e,o,r,t),h=n?()=>t(void 0):()=>t("");let f=l,u=a;if(n){const g=Se(n.follows),m=qn(n.follows),w=g?re(g,o,r):m?{hex:m,words:m.toUpperCase()}:null;f=w?.hex??l,u=B(x=>s(x),w?w.words:a,n.view)}return d?i(oe,{label:s("Fill"),icon:i(ge,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:h,resetTo:u,choices:p}):i(St,{label:s("Fill"),icon:i(ge,{}),value:e,inherited:f,resetTo:u,onChange:t,onReset:h,choices:p})}function ml(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return le(n);const r=Qn(e,t);if(r.length===0)return null;const l=le(Dt(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=le(Dt(r[a].sectionAccent));if(c!==null)return c}return le(r[0].sectionAccent)}function Me(){const e=Ft(v().theme),[t]=P("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=ee(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?ml(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:kr(e.themes[o]),n:o+1}}const gl=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function bl({label:e,value:t,onChange:n,points:o=gl}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(So,{label:s(e),value:t,points:r,onChange:n})}function lc(){return $t()}const sc={top:i(Hn,{}),right:i(Dn,{}),bottom:i(vn,{}),left:i(Bn,{})};function ac(e,t,n,o,r,l,a){const c=f=>t.find(u=>u.value===f),d=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const u=t.find(m=>m.cell===f);if(!u)return d(`missing-${f}`);const g=l?.[f];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},h=[d("corner-top-left"),p("top"),d("corner-top-right"),p("left"),d("centre"),p("right"),d("corner-bottom-left"),p("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const g=t.some(m=>m.value===f)?f:n;return i(S,{label:s(e),icon:r,value:c(g)?.label?s(c(g).label):a?s(a):"",children:bl({label:e,value:g,onChange:u,points:h})})}}}function cc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Yo,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function dc(e,t,n,o){return{type:"custom",options:t,fallback:n,...N({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(qo,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function uc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const pc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function fc(e,t,n){const o=Object.keys(Xe).map(r=>({label:Xe[r],value:r,picture:n[r]}));return{type:"custom",...N({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(wl,{label:e,icon:t,options:o,onChange:r})}}function Sl(e,t,n){const o=an(e,t,n);if(o!==void 0)return o==="save-makes-frame"?s("A frame is made from this video when you save the page."):o==="starts-dark"?s("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?s("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?s("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?s("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?s("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=dn(e);return r==="frame-missing-image"?s("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?s("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?s("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?s("No image yet. The slide shows its background colour until you choose one."):void 0}function wl({label:e,icon:t,options:n,onChange:o}){const r=M(),l=r?.values??{},a=cn(l),c=Ke(fn),d=pn(c?.docId??null);let p=null;try{p=ee(f=>f.appState.data)}catch{p=null}const h=un(r?.id,p,d);return i(S,{label:s(e),icon:$(t),hint:Sl(l,h,c?.hasUnsavedEdits??!1),children:ve({options:n,value:a,onChange:o,ariaLabel:e})})}function hc(e,t,n,o={}){const r={type:"custom",[ze]:!0,render:({value:l,onChange:a,name:c})=>i(Vo,{value:l||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?I("each",r):r}const mc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function xl(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function gc({value:e,onChange:t,label:n}){const o=e||{},r=M(),l=r?r.values!==r.node.props:!0,a=!!o.pending&&l,c=!!o.pending&&!l,d=!!ni(ti()).geocode,p=$e(),h=(f,u)=>t({...o,[f]:u??void 0});return L(k,{children:[i(S,{label:s(n),icon:i(it,{}),action:d?i(xe,{content:s("Find from the address (OpenStreetMap)"),children:i(gt,{"aria-label":s("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Xn,{})})}):void 0,children:d&&o.status?i(Nn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?s("Finding…"):c?s(ko):s(o.status),hint:xl(o)}):null}),i(S,{label:s("Enter by hand"),labelId:p,icon:i(Gn,{}),action:i(we,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:p})}),o.manual&&i(S,{label:s("Latitude, longitude"),icon:i(it,{}),children:L("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(bt,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>h("lat",f),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(bt,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>h("lng",f),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function Cl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function yl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function bc(e,t){return e===null?null:t>e?e:null}function _l(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Sc={label:"Ticker items",icon:i(Kn,{})};function wc(e,t,n,o){return{type:"custom",[O]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...N({},{...Mt.textList,label:e}),render:({value:r,onChange:l})=>i(Il,{label:e,icon:$(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Il({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=z(null),[c,d]=q(null),p=f=>f.map(u=>({text:u?.text??""})),h=f=>{const u=_l(n,f,c);u===null&&(a.current=null),d(u),r(p(f))};return i(co,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(wt,{target:a,value:Cl(n,c),onChange:f=>r(yl(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,u,g)=>i("input",{type:"text",className:l&&c===u?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:u+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,d(u)}})})}function xc(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Cc(e){return{_gCards:T("Cards"),coverIndex:X("Cover image",i(Un,{}),$o,String(Xo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ei("Image background",Dr),cardImage:El()}}function yc(){return{outline:X("Card outline",i(jn,{}),Wo,Ko),indexBadge:X("Card number",i(ot,{}),Mo,Uo),showBadge:tn("Product badge",!0,i(dt,{noun:"tag"}))}}function _c(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ue.find(l=>l.id===r).label}),o=r=>N(Fo(We),n(r));return{_gShowOnCard:T("Show on a card"),[We]:N({type:"custom",render:()=>i(Tl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(We)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const We="showCardPrice",ue=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Tl({rest:e}){const t=F(),n=Ri(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=ue.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ue,{parts:ue,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ue.map(({id:a})=>[a,void 0])))})}function Ic(e,t="display"){const n=U(t);return{[t]:I("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ue,{parts:e,changed:po(o),shown:l=>fo(o,l),onPress:(l,a)=>r(go(o,l,a)),onReset:()=>r(void 0)})}),[n]:I("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Ol,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ue({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:a}){const c=s("Display");return i(S,{label:c,icon:i(Pn,{}),changed:t,action:i(y,{words:C()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(uo,{label:c,items:e.map(d=>({id:d.id,label:s(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:s(a)}:{}})),onChange:o})})}function Ol({parts:e,desktopKey:t,value:n,onChange:o}){const r=F()[t];return i(Ue,{parts:e,changed:mo(n),shown:l=>ho(r,n,l),onPress:(l,a)=>o(bo(n,l,a)),onReset:()=>o(Ho),detail:s("the same as Desktop")})}function El(){return Kt("Card image",{min:W,max:Ze,step:bn,icon:i(nt,{}),hint:"Rounds the picture. The card's own corner is in Styles."})}function Tc(){return De({sidesKey:"cornerSides",step:Sn,useFollowed:()=>W,mark:i(Rl,{label:wn}),hint:s("Rounds the picture. Left alone it stays square.")})}function Rl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:C()?.panel,label:s(e),changed:t,onReset:n})}function Oc(){return{type:"custom",render:({value:e,onChange:t})=>i(Fl,{value:typeof e=="string"?e:"",onChange:t})}}function Nl({layout:e,width:t}){const n=_n(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:In(e).map(([r,l],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},a))})}const kl={width:"3.5rem",height:"2.5rem"},Pl=200;function Fl({value:e,onChange:t}){const[n,o]=q(null),[r,l]=q(4),a=z(null);on(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>l(u.getBoundingClientRect().width>=Pl?4:3);g();const m=new ResizeObserver(g);return m.observe(u),()=>m.disconnect()},[]);const c=e&&e in ne?e:"",d=Qe(n,c),p=Qe(n,"").length,h=Tn("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:si(h,s("Not chosen"))},...d.map(u=>({value:u,label:s(ne[u].label),icon:i(Nl,{layout:ne[u],width:40})}))];return i(S,{label:s("Layout"),icon:i(Wn,{}),value:c?s(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ft,{label:s("Layout"),value:c,options:f,onChange:t,columns:r,cell:kl,header:L("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(ro,{options:[{id:"all",label:s("All")},...Cn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:yn.length})})]})})})})}export{Si as BOUND_TO_POST,Sa as BOUND_TO_POST_NOTE,Oa as BUCKET_ICONS,mc as CUSTOM_FIELD_MEDIA,gc as CoordsField,Gt as DESKTOP_GAP_NOT_OVERLAP,Ue as DisplayRow,sc as EDGE_ARROWS,Io as FOCAL_DEFAULT,gl as FOCAL_POINTS,fe as FOLD_FIELD_MARKER,bl as FocalPicker,Aa as GroupLabel,wi as HIGHLIGHT_HINT,H as HidableTextField,Ye as LINK_FIELD_MARKER,sa as Label,ze as MEDIA_FIELD_MARKER,pc as MEDIA_TYPE_OPTIONS,wa as NOT_BOUND_TO_POST,La as PanelBand,yi as PanelNoteLine,Yi as RowPropsContext,qe as SCAFFOLD_FIELD_MARKER,kc as SCALAR_TEXT_CONTROLS,di as SiteGapDefaultReset,V as Slider,Ii as Swatches,Nc as TEXT_CONTROL_KINDS,O as TEXT_FIELD_MARKER,Sc as TICKER_ITEMS_ROW,Il as TextListField,fl as ThemeFillRow,ae as WIDTH_LABEL,gi as WidthDefaultReset,_l as aimAfterListChange,Qa as anchorFields,D as backTo,va as backgroundField,Ua as boxBlockSpacingField,Xa as boxColumnsFields,ic as boxFillField,Vi as boxPhoneRowField,$i as boxShareField,Ka as boxSharePhoneField,$a as boxShareTabletField,ml as boxThemeIndexOf,Na as bucketHeader,Ga as buttonWordsEntryField,Ui as cardCornersField,Ei as cardImageBackgroundField,El as cardImageField,Cc as cardMediaFields,Wa as cardShapeFields,_c as cardShowFields,yc as cardStyleFields,Va as cellWidthFields,oc as checkbox,rc as colorInput,ca as containerDirectionField,ui as containerGapField,pi as containerGapPhoneField,aa as containerGapRows,fi as containerGapTabletField,xl as coordsResultTip,_a as copyText,Xt as cornerSidesField,De as cornersRowField,tc as date,ec as dateTime,ka as designGroupHeader,Ic as displayFields,ac as edgePad,Ge as fillSlotChoices,bc as focusAfterRemove,lc as focusKeptField,Pa as foldMarker,he as foldMetaOf,_i as foldTitleOf,nl as followedHeightPatch,ul as followedStickPatch,Oc as galleryLayoutField,Ja as heightFields,ce as heightFollowedBy,da as heroGroupPlacementPoints,Ve as hidableText,Ci as hintIsWhileTyping,Tc as imageCornersField,ba as inOwnBox,Ra as isBucketHeader,$t as keptBy,Ia as linkField,Sl as loadingRowHint,fc as loadingShowsField,cc as multiSelect,nc as pageBackgroundField,Ea as panelNote,Ji as phoneOverrideField,ya as plainText,Ta as plainTextarea,Kt as pxField,Fa as quietMarker,je as readHidable,Cl as rowText,dc as searchSelect,Oi as sectionBandChoices,Ha as sectionBorderField,Fi as sectionCornersField,Da as sectionShapeFields,Ba as sectionThemeFields,yl as setRowText,ja as sizeField,uc as sourceField,Ya as spacingFields,Za as stickFields,za as swapPadding,Ma as templateField,xa as text,hn as textFieldIdentifier,fa as textFieldOffPage,ma as textFieldPanelOnly,wc as textList,xc as textListRowField,Ca as textarea,tn as toggle,hc as upload,Ri as useSelectedPatch,F as useSelectedProps,P as useSelectedSibling,ci as useSiteGapDetail,qa as widthField,ga as withIdentifier,pa as withOffPage,ha as withPanelOnly,ua as withScaffold};
@@ -1,5 +1,5 @@
1
1
  import { type SeenEntrance } from "../../../render/components/SectionAnimation.js";
2
- import { type ScrollView } from "../../../format/lib/animation/scroll.js";
2
+ import type { MotionView } from "../../../format/lib/animation/views.js";
3
3
  import { PART_LIFT_ATTR, type PartMotion } from "../../../render/lib/animation/part-motion.js";
4
4
  export { PART_LIFT_ATTR };
5
5
  export type SeenPartEntrances = Map<string, SeenEntrance>;
@@ -7,4 +7,4 @@ type StampedPart = {
7
7
  element: HTMLElement;
8
8
  partKey: string;
9
9
  };
10
- export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, viewOrPhone: ScrollView | boolean, seen: SeenPartEntrances): () => void;
10
+ export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, viewOrPhone: MotionView | boolean, seen: SeenPartEntrances): () => void;
@@ -1 +1 @@
1
- import{ENTRANCE_ATTR as b,playEntrance as k}from"efficient-shell/format";import{entranceReplay as A}from"../../../render/components/SectionAnimation.js";import{entranceOf as y}from"../../../render/lib/animation/entrance.js";import{scrollOf as x}from"../../../format/lib/animation/scroll.js";import{PART_LIFT_ATTR as d,drawPartEntrance as E,drawPartScroll as M,ensurePartLiftSheet as R,firstOnPage as T,partBoxOf as P,partMotionDrawn as _}from"../../../render/lib/animation/part-motion.js";const h=new WeakMap;function C(c,r,f,m){const i=typeof f=="boolean"?f?"phone":"desktop":f,w=i==="phone",p=[],l=new Map;for(const{partKey:e}of c){if(l.has(e))continue;const t=r(e)??{},s=y(t,"desktop"),n=y(t,"phone"),a=m.get(e),o=a?A.next(a,s,n,w):null;m.set(e,o?o.seen:A.seed(s,n)),l.set(e,o?.play??!1)}const u=new Map,g=c.filter(e=>!c.some(t=>t!==e&&t.partKey===e.partKey&&t.element.contains(e.element)));for(const e of g){const t=P(e.element);t&&u.set(t,[...u.get(t)??[],e])}for(const[e,t]of u){const s=o=>_(r(o.partKey)??{}),n=T(t.filter(o=>s(o).entrance));if(n){const o=r(n.partKey)??{};p.push(E(e,y(o,w?"phone":"desktop")));const K=h.get(e);h.set(e,n.partKey),(l.get(n.partKey)||K!==void 0&&K!==n.partKey)&&e.hasAttribute(b)&&k(e)}else h.delete(e);const a=e.hasAttribute(b)?void 0:T(t.filter(o=>x(r(o.partKey)??{},i).effect!=="none"));a&&p.push(M(e,x(r(a.partKey)??{},i))),t.some(o=>s(o).hover==="lift")&&(R(e.ownerDocument),e.setAttribute(d,""),p.push(()=>e.removeAttribute(d)))}return()=>p.forEach(e=>e())}export{d as PART_LIFT_ATTR,C as paintPartMotion};
1
+ import{ENTRANCE_ATTR as K,playEntrance as g}from"efficient-shell/format";import{entranceReplay as b}from"../../../render/components/SectionAnimation.js";import{entranceOf as h,entranceViews as E}from"../../../render/lib/animation/entrance.js";import{scrollOf as A}from"../../../format/lib/animation/scroll.js";import{PART_LIFT_ATTR as y,drawPartEntrance as M,drawPartScroll as R,ensurePartLiftSheet as P,firstOnPage as x,partBoxOf as _,partMotionDrawn as k}from"../../../render/lib/animation/part-motion.js";const d=new WeakMap;function C(f,s,i,w){const c=typeof i=="boolean"?i?"phone":"desktop":i,p=[],l=new Map;for(const{partKey:e}of f){if(l.has(e))continue;const t=s(e)??{},a=E(t),n=w.get(e),o=n?b.next(n,a,c):null;w.set(e,o?o.seen:b.seed(a)),l.set(e,o?.play??!1)}const u=new Map,T=f.filter(e=>!f.some(t=>t!==e&&t.partKey===e.partKey&&t.element.contains(e.element)));for(const e of T){const t=_(e.element);t&&u.set(t,[...u.get(t)??[],e])}for(const[e,t]of u){const a=r=>k(s(r.partKey)??{}),n=x(t.filter(r=>a(r).entrance));if(n){const r=s(n.partKey)??{};p.push(M(e,h(r,c)));const m=d.get(e);d.set(e,n.partKey),(l.get(n.partKey)||m!==void 0&&m!==n.partKey)&&e.hasAttribute(K)&&g(e)}else d.delete(e);const o=e.hasAttribute(K)?void 0:x(t.filter(r=>A(s(r.partKey)??{},c).effect!=="none"));o&&p.push(R(e,A(s(o.partKey)??{},c))),t.some(r=>a(r).hover==="lift")&&(P(e.ownerDocument),e.setAttribute(y,""),p.push(()=>e.removeAttribute(y)))}return()=>p.forEach(e=>e())}export{y as PART_LIFT_ATTR,C as paintPartMotion};
@@ -0,0 +1,8 @@
1
+ export declare const ENTRANCE_KEYS: {
2
+ readonly kind: "entrance";
3
+ readonly from: "entranceFrom";
4
+ readonly duration: "entranceDuration";
5
+ readonly delay: "entranceDelay";
6
+ };
7
+ export declare const LEGACY_ENTRANCE_KEY = "sectionAnimation";
8
+ export declare const ENTRANCE_STORE_KEYS: readonly string[];
@@ -0,0 +1 @@
1
+ import{viewStoreKeys as e}from"./views.js";const n={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},o="sectionAnimation",r=e(Object.values(n));export{n as ENTRANCE_KEYS,r as ENTRANCE_STORE_KEYS,o as LEGACY_ENTRANCE_KEY};
@@ -1,4 +1,5 @@
1
1
  import { type ScrollValue } from "efficient-shell/format";
2
+ import { type MotionView } from "./views.js";
2
3
  export declare const SCROLL_KEYS: {
3
4
  readonly effect: "scroll";
4
5
  readonly zoom: "scrollZoom";
@@ -7,14 +8,12 @@ export declare const SCROLL_KEYS: {
7
8
  };
8
9
  export declare const SCROLL_GROUP_KEY = "_gScroll";
9
10
  export declare const SCROLL_CUSTOMIZE_KEY = "_cScroll";
10
- export type ScrollView = "desktop" | "tablet" | "phone";
11
- export declare const scrollViewKey: (key: string, view: ScrollView) => string;
12
11
  export declare const SCROLL_STORE_KEYS: readonly string[];
13
12
  type Props = Readonly<Record<string, unknown>>;
14
- export declare function scrollOf(props: Props, view: ScrollView): ScrollValue;
15
- export type ScrollViews = Readonly<Record<ScrollView, ScrollValue>>;
13
+ export declare function scrollOf(props: Props, view: MotionView): ScrollValue;
14
+ export type ScrollViews = Readonly<Record<MotionView, ScrollValue>>;
16
15
  export declare function scrollDrawn(props: Props): ScrollViews | null;
17
- export type ScrollOrigins = Readonly<Partial<Record<ScrollView, string>>>;
18
- export declare function scrollOrigins(points: Readonly<Partial<Record<ScrollView, string>>>): ScrollOrigins;
16
+ export type ScrollOrigins = Readonly<Partial<Record<MotionView, string>>>;
17
+ export declare function scrollOrigins(points: Readonly<Partial<Record<MotionView, string>>>): ScrollOrigins;
19
18
  export declare function scrollOriginsOf(props: Props, focusKey: string): ScrollOrigins;
20
19
  export {};
@@ -1 +1 @@
1
- import{FOLLOW_RULES as O,phoneKey as S,resolveViewValue as m,tabletKey as L}from"efficient-easel/screen/lib/content/view-tiers";import{parseFocal as b,formatFocal as h,readScroll as x}from"efficient-shell/format";import{viewFocusValues as _}from"../content/picture-focus-rows.js";const n={effect:"scroll",zoom:"scrollZoom",start:"scrollStart",end:"scrollEnd"},C="_gScroll",V="_cScroll",f=["desktop","tablet","phone"],l=(t,o)=>o==="phone"?S(t):o==="tablet"?L(t):t,F=Object.values(n).flatMap(t=>f.map(o=>l(t,o))),c=t=>t===null||t===""?void 0:t,u=(t,o,e)=>m("same",c(t),c(o),c(e),O);function r(t,o,e){return u(t[l(o,"desktop")],t[l(o,"tablet")],t[l(o,"phone")])[e]}function s(t,o){return x(r(t,n.effect,o),r(t,n.zoom,o),r(t,n.start,o),r(t,n.end,o))}function Y(t){const o={desktop:s(t,"desktop"),tablet:s(t,"tablet"),phone:s(t,"phone")};return f.every(e=>o[e].effect==="none")?null:o}function E(t){const o=u(t.desktop,t.tablet,t.phone),e=i=>{const a=o[i];if(typeof a!="string")return;const{x:d,y:p}=b(a);return h(d,p)};return{desktop:e("desktop"),tablet:e("tablet"),phone:e("phone")}}function k(t,o){return E(_(t,o))}export{V as SCROLL_CUSTOMIZE_KEY,C as SCROLL_GROUP_KEY,n as SCROLL_KEYS,F as SCROLL_STORE_KEYS,Y as scrollDrawn,s as scrollOf,E as scrollOrigins,k as scrollOriginsOf,l as scrollViewKey};
1
+ import{parseFocal as u,formatFocal as i,readScroll as O}from"efficient-shell/format";import{viewFocusValues as S}from"../content/picture-focus-rows.js";import{MOTION_VIEWS as d,followViews as p,followedIn as l,viewStoreKeys as m}from"./views.js";const r={effect:"scroll",zoom:"scrollZoom",start:"scrollStart",end:"scrollEnd"},b="_gScroll",R="_cScroll",g=m(Object.values(r));function n(o,t){return O(l(o,r.effect,t),l(o,r.zoom,t),l(o,r.start,t),l(o,r.end,t))}function h(o){const t={desktop:n(o,"desktop"),tablet:n(o,"tablet"),phone:n(o,"phone")};return d.every(e=>t[e].effect==="none")?null:t}function _(o){const t=p(o.desktop,o.tablet,o.phone),e=s=>{const c=t[s];if(typeof c!="string")return;const{x:f,y:a}=u(c);return i(f,a)};return{desktop:e("desktop"),tablet:e("tablet"),phone:e("phone")}}function k(o,t){return _(S(o,t))}export{R as SCROLL_CUSTOMIZE_KEY,b as SCROLL_GROUP_KEY,r as SCROLL_KEYS,g as SCROLL_STORE_KEYS,h as scrollDrawn,n as scrollOf,_ as scrollOrigins,k as scrollOriginsOf};
@@ -0,0 +1,6 @@
1
+ export type MotionView = "desktop" | "tablet" | "phone";
2
+ export declare const MOTION_VIEWS: readonly MotionView[];
3
+ export declare const viewKey: (key: string, view: MotionView) => string;
4
+ export declare const viewStoreKeys: (keys: readonly string[]) => readonly string[];
5
+ export declare const followViews: (desktop: unknown, tablet: unknown, phone: unknown) => Readonly<Record<MotionView, unknown>>;
6
+ export declare function followedIn(props: Readonly<Record<string, unknown>>, key: string, view: MotionView, desktop?: unknown): unknown;
@@ -0,0 +1 @@
1
+ import{FOLLOW_RULES as r,phoneKey as c,resolveViewValue as s,tabletKey as a}from"efficient-easel/screen/lib/content/view-tiers";const i=["desktop","tablet","phone"],n=(e,t)=>t==="phone"?c(e):t==="tablet"?a(e):e,w=e=>e.flatMap(t=>i.map(o=>n(t,o))),l=e=>e===null||e===""?void 0:e,f=(e,t,o)=>s("same",l(e),l(t),l(o),r);function x(e,t,o,p=e[t]){return f(p,e[n(t,"tablet")],e[n(t,"phone")])[o]}export{i as MOTION_VIEWS,f as followViews,x as followedIn,n as viewKey,w as viewStoreKeys};
@@ -14,11 +14,35 @@ export declare const SECTION_PIN_VARS: {
14
14
  readonly position: "--sf-pin-position";
15
15
  readonly on: "--sf-pin-on";
16
16
  readonly length: "--sf-pin-length";
17
+ readonly stick: "--sf-pin-stick";
18
+ readonly trackPosition: "--sf-pin-track-position";
17
19
  readonly header: "--sf-pin-header";
18
20
  };
19
21
  export declare const SECTION_PIN_SCREENS_KEY = "stickTopScreens";
20
22
  export declare const SECTION_PIN_SCREENS_KEYS: readonly string[];
21
23
  export declare const SECTION_PIN_SCREENS_LABEL = "Screens";
24
+ export declare const SECTION_PIN_STOP_KEY = "stickTopStop";
25
+ export declare const SECTION_PIN_STOP_SCREEN = "screen";
26
+ export declare const SECTION_PIN_STOP_LABEL = "Pin stops at";
27
+ export declare const SECTION_PIN_STOP_OPTIONS: readonly [{
28
+ readonly value: "header";
29
+ readonly label: "Under the header";
30
+ }, {
31
+ readonly value: "screen";
32
+ readonly label: "Screen top";
33
+ }];
34
+ export type SectionPinStop = (typeof SECTION_PIN_STOP_OPTIONS)[number]["value"];
35
+ export declare const SECTION_PIN_STOP_DEFAULT: SectionPinStop;
36
+ export declare const SECTION_PIN_STOP_HINT = "Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";
37
+ export declare function sectionPinStopOf(value: unknown): SectionPinStop;
38
+ export declare function sectionPinStopWrite(next: unknown): typeof SECTION_PIN_STOP_SCREEN | undefined;
39
+ export declare const SECTION_PIN_ABOVE_KEY = "stickAbove";
40
+ export declare const SECTION_PIN_ABOVE_LABEL = "Stays above";
41
+ export declare const SECTION_PIN_ABOVE_HINT = "On: the pinned box stays on top, and the sections after it scroll under it.";
42
+ export declare function sectionPinAbove(props: {
43
+ stickAbove?: unknown;
44
+ }): boolean;
45
+ export declare const SECTION_PIN_KEYS: readonly string[];
22
46
  export declare const PIN_AT_SCREEN_TOP: ReadonlySet<string>;
23
47
  export declare const SECTION_STICK_EXCLUDED: ReadonlySet<string>;
24
48
  export type SectionStickProps = {
@@ -31,8 +55,11 @@ export type SectionStickProps = {
31
55
  stickTopScreens?: unknown;
32
56
  stickTopScreensTablet?: unknown;
33
57
  stickTopScreensPhone?: unknown;
58
+ stickTopStop?: unknown;
59
+ stickAbove?: unknown;
34
60
  sticky?: unknown;
35
61
  };
62
+ export declare const SOME_VIEW_PINS: ShowWhenRule;
36
63
  export declare const INTRO_OLD_STICKY_PINS: ShowWhenRule;
37
64
  export declare function hasTabletStick(props: SectionStickProps): boolean;
38
65
  export declare function hasPhoneStick(props: SectionStickProps): boolean;
@@ -54,6 +81,7 @@ export declare function resolveSectionStick(props: SectionStickProps, opts?: {
54
81
  export declare function sectionPinAttrs(props: SectionStickProps, opts?: {
55
82
  atScreenTop?: boolean;
56
83
  track?: boolean;
84
+ above?: boolean;
57
85
  }): {
58
86
  attrs: Record<string, string>;
59
87
  style: CSSProperties;