efficient-web-builder 51.0.0 → 53.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/dist/editor/components/ChatSettingsPanel.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +7 -7
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PartTextBox.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/PreviewPartStyleContext.d.ts +2 -2
- package/dist/editor/components/SectionTextPartBridge.js +1 -1
- package/dist/editor/components/SiteAccentField.js +1 -1
- package/dist/editor/components/SiteTextStylesField.d.ts +3 -2
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +82 -64
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/ColourControl.d.ts +11 -8
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/shared-fields.d.ts +5 -0
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +23 -2
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/choice-pictures.d.ts +21 -0
- package/dist/editor/lib/document/choice-pictures.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +33 -9
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/hidable-rows-drawn.d.ts +1 -0
- package/dist/editor/lib/document/hidable-rows-drawn.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/part-panel-rows.d.ts +1 -0
- package/dist/editor/lib/document/part-panel-rows.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/document/separator-field.d.ts +9 -1
- package/dist/editor/lib/document/separator-field.js +1 -1
- package/dist/editor/lib/document/shape-picker.d.ts +37 -0
- package/dist/editor/lib/document/shape-picker.js +1 -0
- package/dist/editor/lib/document/show-for-field.d.ts +6 -0
- package/dist/editor/lib/document/show-for-field.js +1 -0
- package/dist/format/lib/animation/hover.d.ts +0 -2
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/borders.d.ts +4 -2
- package/dist/format/lib/content/borders.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +21 -6
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -5
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/box-show-for-choices.d.ts +9 -0
- package/dist/format/lib/content/box-show-for-choices.js +1 -0
- package/dist/format/lib/content/button-icon.d.ts +1 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-state.d.ts +8 -0
- package/dist/format/lib/content/card-state.js +1 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +45 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +47 -0
- package/dist/format/lib/content/image-aspect.js +1 -0
- package/dist/format/lib/content/list-number.d.ts +11 -0
- package/dist/format/lib/content/list-number.js +1 -1
- package/dist/format/lib/content/phone-focus.d.ts +4 -1
- package/dist/format/lib/content/phone-focus.js +1 -1
- package/dist/format/lib/content/record-row.d.ts +14 -0
- package/dist/format/lib/content/record-row.js +1 -0
- package/dist/format/lib/content/record-types.d.ts +1 -1
- package/dist/format/lib/content/record-types.js +1 -1
- package/dist/format/lib/content/section-background.d.ts +10 -3
- package/dist/format/lib/content/section-background.js +1 -1
- package/dist/format/lib/content/section-height.d.ts +8 -0
- package/dist/format/lib/content/section-height.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +17 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +9 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +2 -2
- package/dist/format/lib/document/card-template-layers.d.ts +1 -1
- package/dist/format/lib/document/card-template-layers.js +1 -1
- package/dist/format/lib/document/media-manifest.json +5 -2
- package/dist/format/lib/document/mockup-variant-fields.d.ts +1 -0
- package/dist/format/lib/document/mockup-variant-fields.js +1 -1
- package/dist/format/lib/document/part-inks.d.ts +5 -10
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +1 -0
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/document/section-descriptions.js +1 -1
- package/dist/format/lib/document/show-when-attach.d.ts +2 -1
- package/dist/format/lib/document/show-when-attach.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +25 -14
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/fonts.js +1 -1
- package/dist/format/lib/sections/divider-style.d.ts +4 -0
- package/dist/format/lib/sections/divider-style.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +2 -2
- package/dist/format/lib/source-rules/mirrored-rows-agree.js +4 -4
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.d.ts +4 -0
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.js +37 -20
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.d.ts +7 -0
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.js +2 -0
- package/dist/format/lib/source-rules/support/part-slider-call-sites.d.ts +0 -1
- package/dist/format/lib/source-rules/support/part-slider-call-sites.js +6 -6
- package/dist/format/lib/text-styles/site-text-colours.d.ts +4 -0
- package/dist/format/lib/text-styles/site-text-colours.js +1 -0
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +3 -3
- package/dist/format/lib/word-styles.d.ts +0 -1
- package/dist/format/lib/word-styles.js +1 -1
- package/dist/render/components/Breadcrumb.d.ts +2 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +6 -3
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/ContentsList.d.ts +4 -1
- package/dist/render/components/ContentsList.js +1 -1
- package/dist/render/components/CurrentRecord.d.ts +23 -0
- package/dist/render/components/CurrentRecord.js +1 -0
- package/dist/render/components/Flex.d.ts +3 -2
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +2 -0
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroPoster.d.ts +2 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +3 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +3 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +5 -3
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +3 -0
- package/dist/render/components/SiteGutterFrame.d.ts +1 -0
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/goldPhrases.js +2 -2
- package/dist/render/lib/content/block-size.d.ts +3 -0
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/box-shared-columns.js +1 -1
- package/dist/render/lib/content/box-show-for.d.ts +14 -0
- package/dist/render/lib/content/box-show-for.js +1 -0
- package/dist/render/lib/content/page-contents.d.ts +1 -0
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/content/picture-focus-rows.d.ts +13 -0
- package/dist/render/lib/content/picture-focus-rows.js +1 -0
- package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +21 -7
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/borders.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/show-for.d.ts +2 -0
- package/dist/render/lib/document/passes/show-for.js +1 -0
- package/dist/render/lib/document/show-when.d.ts +1 -1
- package/dist/render/lib/document/show-when.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
- package/dist/editor/components/PartInkControl.d.ts +0 -7
- package/dist/editor/components/PartInkControl.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { boxFieldBuilders, type BoxFieldSay } from "efficient-easel/screen/lib/document/box-fields";
|
|
3
|
+
import type { ShowWhenRule } from "efficient-shell/format";
|
|
3
4
|
type Rows = ReturnType<typeof boxFieldBuilders>;
|
|
4
5
|
export declare const rowSay: BoxFieldSay;
|
|
5
6
|
export declare const slider: Rows["slider"];
|
|
@@ -19,18 +20,38 @@ export declare const placementField: Rows["placementField"];
|
|
|
19
20
|
export declare const PlacementGridView: Rows["PlacementGridView"];
|
|
20
21
|
export declare const positionFields: Rows["positionFields"];
|
|
21
22
|
export declare const sidesPaddingFields: Rows["sidesPaddingFields"];
|
|
23
|
+
export declare function ShellIconWord({ value }: {
|
|
24
|
+
value: string;
|
|
25
|
+
}): string;
|
|
26
|
+
export declare function pickerCellIcon(picture: ReactNode, word: ReactNode, tooltip: ReactNode): ReactElement;
|
|
27
|
+
export declare function pickerNoneIcon(glyph: ReactNode, word: ReactNode): ReactElement;
|
|
22
28
|
export declare function iconPickerRow<V extends string>(label: string, icon: ReactElement, options: readonly {
|
|
23
29
|
label?: string;
|
|
30
|
+
hint?: string;
|
|
24
31
|
value: V;
|
|
25
32
|
picture: ReactNode;
|
|
33
|
+
showWhen?: ShowWhenRule;
|
|
26
34
|
}[], fallback: V, extra?: {
|
|
27
|
-
emptyValue?: V;
|
|
28
35
|
resolve?: (stored: unknown) => V | undefined;
|
|
36
|
+
phoneRest?: (follows: unknown) => V | undefined;
|
|
37
|
+
columns?: number;
|
|
38
|
+
cell?: {
|
|
39
|
+
width: string;
|
|
40
|
+
height: string;
|
|
41
|
+
};
|
|
29
42
|
}): {
|
|
30
|
-
|
|
43
|
+
options: {
|
|
44
|
+
showWhen?: ShowWhenRule | undefined;
|
|
45
|
+
label?: string | undefined;
|
|
46
|
+
value: V;
|
|
47
|
+
}[];
|
|
48
|
+
render: (props: {
|
|
31
49
|
value?: unknown;
|
|
32
50
|
onChange: (v: V) => void;
|
|
33
51
|
field?: object;
|
|
52
|
+
readOnly?: boolean;
|
|
53
|
+
follows?: unknown;
|
|
54
|
+
followsView?: "desktop" | "tablet";
|
|
34
55
|
}) => import("react").FunctionComponentElement<import("efficient-easel/panel").SettingsFieldProps>;
|
|
35
56
|
type: "custom";
|
|
36
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as t}from"react";import{SettingsDefaultReset as A,SettingsField as P}from"efficient-easel/panel";import{boxFieldBuilders as O,describedAs as R,iconOf as I,onDesktopWords as V}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as C,Tooltip as E,useShellStrings as G}from"efficient-shell/ui";import{editorEaselWords as L,say as i}from"../../../format/lib/editor-words.js";const h=o=>i(o),l=O(h),z=l.slider,K=l.select,M=l.Segmented,Q=l.segmented,U=l.alignmentField,X=l.alignmentFields,Z=l.blockAlignmentField,$=l.blockAlignmentFields,ee=l.boxJustifyField,ne=l.boxAlignField,le=l.boxWrapField,oe=l.directionField,te=l.gapField,ie=l.placementField,se=l.PlacementGridView,ce=l.positionFields,de=l.sidesPaddingFields,D={width:"3.5rem",height:"2.75rem"};function J({value:o}){return G().iconNames[o]??o}function B(o,s,c){return t(E,{content:c,className:"sf-pick-tip",children:t("span",{className:"sf-pick"},t("span",{className:"sf-pick-pic"},o),t("span",{className:"sf-pick-cap"},s))})}function ae(o,s){return t("span",{className:"sf-pick"},t("span",{className:"sf-pick-pic"},o),t("span",{className:"sf-pick-cap sf-pick-cap-closed"},s))}function re(o,s,c,f,d={}){const k=e=>c.some(a=>a.value===e),r=e=>d.resolve?d.resolve(e):k(e)?e:void 0,u=c.map(e=>({value:e.value,...e.label===void 0?{}:{label:e.label},...e.showWhen?{showWhen:e.showWhen}:{}}));return{type:"custom",...R({},{type:"radio",label:o,options:u}),options:u,render:e=>{const{value:a,onChange:m,field:F}=e,g=n=>n.label===void 0?t(J,{value:n.value}):i(n.label),x=F?.options,v=c.filter(n=>!x||x.some(W=>W.value===n.value)).map(n=>({value:n.value,...n.label===void 0?{}:{label:i(n.hint??n.label)},icon:B(n.picture,g(n),n.hint===void 0?g(n):i(n.hint))})),b="follows"in e,p=b?r(d.phoneRest?d.phoneRest(e.follows):e.follows)??f:void 0,N=F?.currentValue,y=r(a)??p??r(N)??f,S=a!=null&&a!=="",w=p===void 0?void 0:c.find(n=>n.value===p);return t(P,{label:i(o),icon:I(s),action:b?t(A,{words:L()?.panel,label:i(o),changed:S,detail:w?.label!==void 0?V(h,i(w.label),e.followsView):void 0,disabled:e.readOnly===!0,onReset:()=>m(void 0)}):void 0},t(C,{label:i(o),value:y,options:v,onChange:m,columns:d.columns,cell:d.cell??D,tooltips:!1,disabled:e.readOnly===!0}))}}}export{se as PlacementGridView,M as Segmented,J as ShellIconWord,U as alignmentField,X as alignmentFields,Z as blockAlignmentField,$ as blockAlignmentFields,ne as boxAlignField,ee as boxJustifyField,le as boxWrapField,oe as directionField,te as gapField,re as iconPickerRow,B as pickerCellIcon,ae as pickerNoneIcon,ie as placementField,ce as positionFields,h as rowSay,Q as segmented,K as select,de as sidesPaddingFields,z as slider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as x}from"react/jsx-runtime";import{ListIcon as A}from"efficient-easel/icons";import{FieldGlyph as C}from"../../components/FieldGlyph.js";import{cardTemplateFieldsOf as E,cardTemplateOwner as S}from"../../../format/lib/content/card-template.js";import{recordRowFields as h}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as F}from"../../../format/lib/content/record-types.js";import{editorRecordType as O}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as $,declaredBlockSource as j}from"../../../format/lib/content/block-sources.js";import{select as v}from"./box-fields.js";import{withShowWhen as D}from"../../../format/lib/document/show-when-attach.js";function b(o){const e=o?.data?.root,t=O(e?.props)??"";return t&&h(t,"text").length?t:""}const g="outsideCardTemplate",K={not:{context:g,is:!0}},H={[g]:(o,e)=>{const t=S(e.appState,o.props?.id);if(t!==void 0)return t===null&&!b(e.appState)}};function J(o,e){const t=e==="link"?x(C,{noun:"link"}):x(A,{}),n={...v(o,t,[{label:"Typed here",value:""}],""),cardRowKind:e};return D(n,K)}function M(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const k=new WeakMap;function Q(o,e,t){const n=Object.keys(o).filter(r=>M(o[r]));if(!n.length)return o;const l=e.props??{},p=S(t.appState,l.id),m=typeof p?.type=="string"?p.type:"",c=n.map(r=>typeof l[r]=="string"?l[r].trim():""),_=j(p?.props),f=p?"":b(t.appState),y=`${m}\0${_}\0${$()}\0${f}\0${F()}\0${c.join("\0")}`;let s=k.get(o);s||k.set(o,s=new Map);const T=s.get(y);if(T)return T;const i={...o};return n.forEach((r,a)=>{const d=o[r],w=m?E(p,d.cardRowKind):h(f,d.cardRowKind);if(!m&&f&&!w.length&&!c[a]){delete i[r];return}const R=c[a]&&!w.some(u=>u.key===c[a])?c[a]:"";i[r]={...d,options:[...d.options,...w.map(u=>({label:u.label,value:u.key})),...R?[{label:R,value:R}]:[]]}}),s.set(y,i),i}export{H as CARD_ROW_FACTS,K as IN_CARD_TEMPLATE,g as OUTSIDE_CARD_TEMPLATE,J as cardRowField,Q as cardRowFields};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DividerStyle } from "../../../format/lib/sections/divider-style.js";
|
|
3
|
+
import type { SectionHeadStyle } from "../../../format/lib/sections/section-head-style.js";
|
|
4
|
+
export declare const CHART_PICTURES: Record<"bars" | "line" | "donut", ReactNode>;
|
|
5
|
+
export declare function dividerPicture(style: DividerStyle): ReactNode;
|
|
6
|
+
export declare const TAB_SHAPE_PICTURES: Record<"tabs" | "largeTabs", ReactNode>;
|
|
7
|
+
export declare const POST_CARD_PICTURES: Record<"card" | "cover", ReactNode>;
|
|
8
|
+
export declare const CARD_STYLE_PICTURES: Record<"cards" | "label-only", ReactNode>;
|
|
9
|
+
export declare const LOGO_LOOK_PICTURES: Record<"plain" | "cards", ReactNode>;
|
|
10
|
+
export declare const INTRO_BLEED_PICTURES: Record<"overlay" | "stacked", ReactNode>;
|
|
11
|
+
export declare const TIMELINE_PICTURES: Record<"split" | "spine" | "alternating" | "track", ReactNode>;
|
|
12
|
+
export declare const SECTION_HEAD_PICTURES: Record<SectionHeadStyle, ReactNode>;
|
|
13
|
+
export declare const MOCKUP_PICTURES: Record<"spec-card" | "fitment" | "portal" | "kanban" | "claims" | "browser" | "terminal", ReactNode>;
|
|
14
|
+
export declare const LAYOUT_CELL: {
|
|
15
|
+
readonly width: "5.75rem";
|
|
16
|
+
readonly height: "3.75rem";
|
|
17
|
+
};
|
|
18
|
+
export declare const LONG_WORD_CELL: {
|
|
19
|
+
readonly width: "8.5rem";
|
|
20
|
+
readonly height: "3.75rem";
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,jsxs as y}from"react/jsx-runtime";import{NoSymbolIcon as u}from"efficient-easel/icons";import{useId as p}from"react";import{STRIPE_GEOMETRY as E}from"../../../format/lib/sections/divider-style.js";const s=44,f=28;function e({children:n}){return t("svg",{width:s,height:f,viewBox:`0 0 ${s} ${f}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:n})}const x=({x:n,y:i,w:c,t:w=2,faint:a=!1})=>t("rect",{x:n,y:i,width:c,height:w,rx:w/2,stroke:"none",opacity:a?.45:1}),r=({x:n,y:i,w:c,h:w})=>t("rect",{x:n,y:i,width:c,height:w,rx:2,fill:"none"}),h=({x:n,y:i})=>t("circle",{cx:n,cy:i,r:1.75,stroke:"none"}),o=({x1:n,y1:i,x2:c,y2:w})=>t("line",{x1:n,y1:i,x2:c,y2:w}),k={bars:y(e,{children:[t(x,{x:8,y:14,w:5,t:10}),t(x,{x:16,y:8,w:5,t:16}),t(x,{x:24,y:18,w:5,t:6}),t(x,{x:32,y:11,w:5,t:13})]}),line:y(e,{children:[t("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),t(o,{x1:6,y1:25,x2:38,y2:25})]}),donut:y(e,{children:[t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function I(n){if(n==="none")return t("span",{style:{display:"flex",width:s,height:f,alignItems:"center",justifyContent:"center"},children:t(u,{size:20})});if(n==="line")return t(e,{children:t(o,{x1:4,y1:14,x2:40,y2:14})});const{ink:i,period:c}=E[n],w=.4,a=[];for(let l=-12;l<s;l+=c*w)a.push(t("polygon",{points:`${l},22 ${l+i*w},22 ${l+i*w+10},6 ${l+10},6`,stroke:"none"},l));return t(m,{children:a})}function m({children:n}){const i=`sf-div-${p().replace(/[^\w-]/g,"")}`;return y(e,{children:[t("clipPath",{id:i,children:t("rect",{x:4,y:6,width:36,height:16,rx:2})}),t("g",{clipPath:`url(#${i})`,children:n})]})}const d=({x:n,y:i,w:c,h:w})=>t("rect",{x:n,y:i,width:c,height:w,rx:2,stroke:"none",opacity:.3}),R={tabs:y(e,{children:[t(x,{x:5,y:10,w:9}),t(x,{x:18,y:10,w:9,faint:!0}),t(x,{x:31,y:10,w:9,faint:!0}),t(o,{x1:4,y1:17,x2:40,y2:17}),t(x,{x:4,y:16,w:11,t:2})]}),largeTabs:y(e,{children:[t(o,{x1:4,y1:5,x2:40,y2:5}),t(h,{x:7,y:10}),t(x,{x:11,y:9,w:16}),t(x,{x:31,y:9,w:9,faint:!0}),t(o,{x1:4,y1:14,x2:40,y2:14}),t(h,{x:7,y:19}),t(x,{x:11,y:18,w:13,faint:!0}),t(x,{x:31,y:18,w:9,faint:!0}),t(o,{x1:4,y1:23,x2:40,y2:23})]})},S={card:y(e,{children:[t(r,{x:10,y:3,w:24,h:22}),t(d,{x:12,y:5,w:20,h:10}),t(x,{x:13,y:18,w:16}),t(x,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:y(e,{children:[t(d,{x:10,y:3,w:24,h:22}),t(r,{x:10,y:3,w:24,h:22}),t(x,{x:13,y:17,w:16}),t(x,{x:13,y:21,w:11,t:1.5})]})},g={cards:y(e,{children:[t(r,{x:3,y:5,w:11,h:18}),t(r,{x:17,y:5,w:11,h:18}),t(r,{x:31,y:5,w:11,h:18}),t(x,{x:5,y:9,w:7}),t(x,{x:19,y:9,w:7}),t(x,{x:33,y:9,w:7}),t(x,{x:5,y:13,w:5,t:1.5,faint:!0}),t(x,{x:19,y:13,w:5,t:1.5,faint:!0}),t(x,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":y(e,{children:[t("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),t(x,{x:5,y:18,w:7}),t(x,{x:19,y:18,w:7}),t(x,{x:33,y:18,w:7})]})},L={plain:y(e,{children:[t(x,{x:5,y:12,w:9,t:4}),t(x,{x:18,y:12,w:9,t:4}),t(x,{x:31,y:12,w:9,t:4})]}),cards:y(e,{children:[t(r,{x:3,y:7,w:11,h:14}),t(r,{x:17,y:7,w:11,h:14}),t(r,{x:31,y:7,w:11,h:14}),t(x,{x:5,y:13,w:7}),t(x,{x:19,y:13,w:7}),t(x,{x:33,y:13,w:7})]})},O={overlay:y(e,{children:[t(d,{x:4,y:3,w:36,h:22}),t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:15,w:18,t:3}),t(x,{x:8,y:20,w:12})]}),stacked:y(e,{children:[t(x,{x:4,y:3,w:18,t:3}),t(x,{x:4,y:8,w:12}),t(d,{x:4,y:13,w:36,h:12}),t(r,{x:4,y:13,w:36,h:12})]})},U={split:y(e,{children:[t(x,{x:4,y:6,w:12,t:3}),t(x,{x:4,y:11,w:9,faint:!0}),t(o,{x1:20,y1:4,x2:20,y2:24}),t(x,{x:24,y:6,w:16}),t(x,{x:24,y:10,w:11,faint:!0}),t(x,{x:24,y:17,w:16}),t(x,{x:24,y:21,w:11,faint:!0})]}),spine:y(e,{children:[t(o,{x1:9,y1:4,x2:9,y2:24}),t(h,{x:9,y:8}),t(x,{x:14,y:7,w:24}),t(h,{x:9,y:14}),t(x,{x:14,y:13,w:20}),t(h,{x:9,y:20}),t(x,{x:14,y:19,w:24})]}),alternating:y(e,{children:[t(o,{x1:22,y1:4,x2:22,y2:24}),t(h,{x:22,y:8}),t(x,{x:4,y:7,w:14}),t(h,{x:22,y:14}),t(x,{x:26,y:13,w:14}),t(h,{x:22,y:20}),t(x,{x:4,y:19,w:14})]}),track:y(e,{children:[t(o,{x1:4,y1:12,x2:40,y2:12}),t(h,{x:8,y:12}),t(h,{x:22,y:12}),t(h,{x:36,y:12}),t(x,{x:4,y:17,w:8}),t(x,{x:18,y:17,w:8}),t(x,{x:32,y:17,w:8}),t(x,{x:4,y:21,w:6,faint:!0}),t(x,{x:18,y:21,w:6,faint:!0}),t(x,{x:32,y:21,w:6,faint:!0})]})},$={standard:y(e,{children:[t(x,{x:4,y:5,w:10,t:1.5,faint:!0}),t(x,{x:4,y:10,w:28,t:4}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:24,faint:!0})]}),editorial:y(e,{children:[t(x,{x:4,y:5,w:5,t:1.5,faint:!0}),t(x,{x:4,y:10,w:20,t:5}),t(x,{x:28,y:11,w:12,faint:!0}),t(x,{x:28,y:15,w:9,faint:!0}),t(o,{x1:4,y1:22,x2:40,y2:22})]}),simple:y(e,{children:[t(x,{x:4,y:8,w:10,t:1.5,faint:!0}),t(x,{x:4,y:13,w:26,t:4})]}),statement:y(e,{children:[t(x,{x:4,y:6,w:36,t:7}),t(x,{x:4,y:16,w:24,t:7})]}),natural:y(e,{children:[t(x,{x:4,y:8,w:22,t:3}),t(x,{x:4,y:15,w:34,faint:!0}),t(x,{x:4,y:19,w:28,faint:!0})]}),essay:y(e,{children:[t(x,{x:4,y:5,w:24,t:4}),t(x,{x:4,y:13,w:36,faint:!0}),t(x,{x:4,y:17,w:36,faint:!0}),t(x,{x:4,y:21,w:30,faint:!0})]})},b={"spec-card":y(e,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:14}),t(r,{x:8,y:12,w:8,h:9}),t(r,{x:18,y:12,w:8,h:9}),t(r,{x:28,y:12,w:8,h:9})]}),fitment:y(e,{children:[t(r,{x:4,y:4,w:10,h:5}),t(r,{x:16,y:4,w:10,h:5}),t(r,{x:28,y:4,w:10,h:5}),t(x,{x:4,y:14,w:34,faint:!0}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:34,faint:!0})]}),portal:y(e,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:10,t:4}),t(x,{x:8,y:14,w:16,faint:!0}),t(x,{x:26,y:18,w:10,t:4})]}),kanban:y(e,{children:[t(r,{x:4,y:3,w:10,h:22}),t(r,{x:17,y:3,w:10,h:22}),t(r,{x:30,y:3,w:10,h:22}),t(x,{x:6,y:6,w:6,t:4}),t(x,{x:6,y:12,w:6,t:4}),t(x,{x:19,y:6,w:6,t:4}),t(x,{x:32,y:6,w:6,t:4}),t(x,{x:32,y:12,w:6,t:4})]}),claims:y(e,{children:[t(x,{x:4,y:5,w:12,faint:!0}),t(x,{x:20,y:4,w:18,t:4}),t(x,{x:4,y:12,w:12,faint:!0}),t(x,{x:20,y:11,w:10,t:4}),t(x,{x:4,y:19,w:12,faint:!0}),t(x,{x:20,y:18,w:14,t:4})]}),browser:y(e,{children:[t(r,{x:4,y:3,w:36,h:22}),t(o,{x1:4,y1:8,x2:40,y2:8}),t(x,{x:8,y:11,w:28,t:5,faint:!0}),t(r,{x:8,y:18,w:8,h:4}),t(r,{x:18,y:18,w:8,h:4}),t(r,{x:28,y:18,w:8,h:4})]}),terminal:y(e,{children:[t(r,{x:4,y:3,w:36,h:22}),t("polyline",{points:"8,9 11,11 8,13",fill:"none"}),t(x,{x:13,y:10,w:14}),t(x,{x:8,y:16,w:22,faint:!0}),t(x,{x:8,y:20,w:16,faint:!0})]})},A={width:"5.75rem",height:"3.75rem"},D={width:"8.5rem",height:"3.75rem"};export{g as CARD_STYLE_PICTURES,k as CHART_PICTURES,O as INTRO_BLEED_PICTURES,A as LAYOUT_CELL,L as LOGO_LOOK_PICTURES,D as LONG_WORD_CELL,b as MOCKUP_PICTURES,S as POST_CARD_PICTURES,$ as SECTION_HEAD_PICTURES,R as TAB_SHAPE_PICTURES,U as TIMELINE_PICTURES,I as dividerPicture};
|
|
@@ -8,8 +8,8 @@ import { type ShowWhenRule } from "../../../render/lib/document/show-when.js";
|
|
|
8
8
|
import { type SettingsBorderValue } from "efficient-easel/panel";
|
|
9
9
|
import { type AlignmentPoint, FOCAL_DEFAULT } from "efficient-shell/ui";
|
|
10
10
|
import type { GeocodeState } from "../../../format/lib/content/contact.js";
|
|
11
|
+
import { type SectionHeightMode, type SectionHeightUnit } from "../../../format/lib/content/section-min-height.js";
|
|
11
12
|
import { type DirectionContainer } from "../../../format/lib/content/container-direction.js";
|
|
12
|
-
import { BOX_SHARE_POINTS } from "../../../format/lib/content/box-layout.js";
|
|
13
13
|
import { GAP_FIELD_CONTAINER, type GapContainer } from "../../../format/lib/content/container-gap.js";
|
|
14
14
|
import { type SectionBackground } from "../../../format/lib/content/section-background.js";
|
|
15
15
|
import { type TypeRole, type TypeSizeValue } from "../../../format/lib/content/section-type-size.js";
|
|
@@ -138,20 +138,21 @@ export declare function Swatches({ swatches, current, onPick, names, }: {
|
|
|
138
138
|
onPick: (next: string) => void;
|
|
139
139
|
names?: Readonly<Record<string, string>>;
|
|
140
140
|
}): import("react").JSX.Element;
|
|
141
|
-
export declare function backgroundField(label: string, builtIn: SectionBackground): CustomField<SectionBackground>;
|
|
141
|
+
export declare function backgroundField(label: string, builtIn: SectionBackground, followsBand?: boolean): CustomField<SectionBackground>;
|
|
142
142
|
export declare function cardImageBackgroundField(label: string, builtIn: string): CustomField<unknown>;
|
|
143
143
|
export declare function sectionThemeFields(readValue?: (v: unknown) => unknown, followLabel?: string): Record<string, CustomField<unknown>>;
|
|
144
|
-
export declare function Slider({ min, max, step, value, onChange, suffix, readout, notch, ariaLabel, disabled, }: {
|
|
144
|
+
export declare function Slider({ min, max, step, value, onChange, suffix, readout, notch, ariaLabel, disabled, placeholder, }: {
|
|
145
145
|
min: number;
|
|
146
146
|
max: number;
|
|
147
147
|
step: number;
|
|
148
|
-
value: number;
|
|
148
|
+
value: number | null;
|
|
149
149
|
onChange: (next: number) => void;
|
|
150
150
|
suffix?: string;
|
|
151
151
|
readout?: boolean;
|
|
152
152
|
notch?: number;
|
|
153
153
|
ariaLabel?: string;
|
|
154
154
|
disabled?: boolean;
|
|
155
|
+
placeholder?: number;
|
|
155
156
|
}): import("react").JSX.Element;
|
|
156
157
|
export declare function pxField(label: string, opts: {
|
|
157
158
|
min: number;
|
|
@@ -185,15 +186,31 @@ export declare function useSelectedPatch(): (patch: FieldsPatch) => void;
|
|
|
185
186
|
export declare function cornerSidesField(): CustomField<string[] | null>;
|
|
186
187
|
export declare function sectionCornersField(): CustomField<number | null>;
|
|
187
188
|
export declare function sectionShapeFields(): Record<string, unknown>;
|
|
188
|
-
export declare function sectionBorderField(tier: "desktop" | "mobile"): CustomField<SettingsBorderValue | undefined>;
|
|
189
|
+
export declare function sectionBorderField(tier: "desktop" | "tablet" | "mobile"): CustomField<SettingsBorderValue | undefined>;
|
|
190
|
+
type PanelView = "desktop" | "tablet" | "phone";
|
|
189
191
|
export declare function buttonWordsEntryField(partKey: string): CustomField<undefined>;
|
|
190
192
|
export declare function cardCornersField(): CustomField<number | null>;
|
|
191
193
|
export declare function templateField<V>(inner: CustomField<V>): CustomField<V>;
|
|
192
194
|
export declare function cardShapeFields(): Record<string, unknown>;
|
|
193
|
-
export declare function boxShareField(
|
|
195
|
+
export declare function boxShareField(): CustomField<unknown>;
|
|
194
196
|
export declare function boxBlockSpacingField(): SelectField;
|
|
195
|
-
export declare function boxSharePhoneField():
|
|
196
|
-
|
|
197
|
+
export declare function boxSharePhoneField(): {
|
|
198
|
+
options: {
|
|
199
|
+
showWhen?: ShowWhenRule | undefined;
|
|
200
|
+
label?: string | undefined;
|
|
201
|
+
value: "content" | "equal";
|
|
202
|
+
}[];
|
|
203
|
+
render: (props: {
|
|
204
|
+
value?: unknown;
|
|
205
|
+
onChange: (v: "content" | "equal") => void;
|
|
206
|
+
field?: object;
|
|
207
|
+
readOnly?: boolean;
|
|
208
|
+
follows?: unknown;
|
|
209
|
+
followsView?: "desktop" | "tablet";
|
|
210
|
+
}) => import("react").FunctionComponentElement<import("efficient-easel/panel").SettingsFieldProps>;
|
|
211
|
+
type: "custom";
|
|
212
|
+
};
|
|
213
|
+
export declare function boxShareTabletField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<unknown>;
|
|
197
214
|
export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
198
215
|
export declare function boxColumnsFields(): {
|
|
199
216
|
phoneRow: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
@@ -235,7 +252,14 @@ export declare function swapPadding(fields: Record<string, unknown>, padding: Re
|
|
|
235
252
|
export declare const WIDTH_LABEL = "Width";
|
|
236
253
|
export declare function widthField(defaultMode: WidthMode, modes?: readonly WidthMode[], inheritable?: boolean): Record<string, CustomField<undefined> | CustomField<string> | CustomField<number>>;
|
|
237
254
|
export declare function heightFields(): Record<string, CustomField<undefined> | CustomField<string> | CustomField<number>>;
|
|
255
|
+
export declare function heightFollowedBy(view: PanelView, props: Record<string, unknown>): {
|
|
256
|
+
mode: SectionHeightMode;
|
|
257
|
+
value: number;
|
|
258
|
+
unit: SectionHeightUnit;
|
|
259
|
+
} | null;
|
|
260
|
+
export declare function followedHeightPatch(view: PanelView, props: Record<string, unknown>, base: "sectionHeightValue" | "sectionHeightUnit", next: unknown): Record<string, unknown> | null;
|
|
238
261
|
export declare function stickFields(): Record<string, CustomField<undefined> | CustomField<boolean> | CustomField<number>>;
|
|
262
|
+
export declare function followedStickPatch(view: PanelView, props: Record<string, unknown>, next: unknown): Record<string, unknown> | null;
|
|
239
263
|
export declare function anchorFields(): Record<string, CustomField<undefined> | CustomField<HidableValue>>;
|
|
240
264
|
export declare function dateTime(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
241
265
|
export declare function date(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
@@ -280,7 +304,7 @@ export declare const MEDIA_TYPE_OPTIONS: {
|
|
|
280
304
|
export declare function loadingShowsField(label: string, icon: ReactElement, pictures: Readonly<Record<LoadingShows, ReactElement>>): CustomField<LoadingShows>;
|
|
281
305
|
export declare function upload(label: string, accept: string, placeholder?: string, opts?: {
|
|
282
306
|
focus?: string;
|
|
283
|
-
focusWhen?: (props: Record<string, unknown
|
|
307
|
+
focusWhen?: (props: Record<string, unknown>, view: "desktop" | "tablet" | "mobile") => boolean;
|
|
284
308
|
frame?: string;
|
|
285
309
|
}): CustomField<MediaValue>;
|
|
286
310
|
export declare const CUSTOM_FIELD_MEDIA: Record<string, string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as N,Fragment as T}from"react/jsx-runtime";import{cloneElement as _e,createContext as It,useContext as Rt,useEffect as Et,useId as we,useRef as Y,useState as H}from"react";import{useEasel as ie,useSelectedHost as V}from"efficient-easel/easel";import{toDateKey as Ot,fromDateKey as Tt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Ie}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Re,loadingShowsOf as Pt}from"../../../format/lib/hero-video.js";import{readHidable as Ee,hidableText as Oe}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as le,LINK_FIELD_MARKER as Te,MEDIA_FIELD_MARKER as Pe,SCAFFOLD_FIELD_MARKER as Ae,TEXT_FIELD_MARKER as w,foldMetaOf as ae,textFieldIdentifier as At}from"efficient-easel/draw";import Ft from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Fe}from"../../../render/lib/document/show-when.js";import Lt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Nt,CORNER_RADIUS_MAX as Le,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as kt,IMAGE_CORNERS_LABEL as vt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Bt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Dt,GALLERY_LAYOUTS as q,GALLERY_LAYOUT_KEYS as Gt,galleryChoices as Ne,galleryPictureCells as Ht}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mt}from"./shell-glyph.js";import{anchorSiblingsOf as Kt,placementPoints as Wt}from"../../../format/lib/hero-group-placement.js";import Ut,{KEEP_HINT_CLASS as $t}from"../../components/KeepHint.js";import Xt from"../../components/AnchorField.js";import{AdjustIcon as jt,EyeIcon as zt,AnimationIcon as Yt,BackgroundIcon as Vt,BorderAllIcon as qt,BlockSectionIcon as Zt,ColumnWidthsIcon as ke,ColumnsIcon as ve,CornerIcon as Jt,DirectionDownIcon as Qt,DirectionLeftIcon as en,DirectionRightIcon as tn,DirectionUpIcon as nn,EditIcon as on,GapIcon as rn,GridIcon as ln,GroundIcon as Be,HashIcon as De,HeightIcon as an,ImageIcon as sn,ListIcon as cn,LocationIcon as Ge,PaddingBottomIcon as He,PaddingLeftIcon as Me,PaddingRightIcon as Ke,PaddingTopIcon as We,PageIcon as dn,StickyIcon as un,SearchIcon as pn,SquareIcon as fn,TypeIcon as mn,WidthIcon as hn}from"efficient-easel/icons";import{FieldGlyph as Ue}from"../../components/FieldGlyph.js";import{resolvePageBackground as gn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as $e,CORNER_SIDE_POINTS as bn,hasOwnSectionCorners as xn,normalizeCornerSides as Xe}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Sn,enclosingSection as yn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as Cn,SettingsField as b,SettingsGroup as _n,SettingsGroupSub as wn,SettingsSegmented as In,SettingsBorder as Rn,SettingsSidesEach as En,SettingsSwitch as se,borderSides as On,borderStartEach as Tn}from"efficient-easel/panel";import{ListField as Pn}from"efficient-easel/fields";import{DisplayChips as An}from"efficient-shell/ui";import{desktopDisplayChanged as Fn,partShownOnDesktop as Ln,partShownOnPhone as Nn,phoneDisplayChanged as kn,withDesktopPart as vn,withPhonePart as Bn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Dn,Checkbox as Gn,ColorSwatch as Hn,CornersInput as Mn,DatePicker as Kn,DateTimePicker as Wn,FOCAL_DEFAULT as Un,PictureTiles as $n,IconPicker as Xn,IconButton as je,InputNumber as ze,Slider as jn,Tooltip as Z}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as zn}from"./geocode-resolve.js";import{ColourRow as Ye,InheritedColourRow as Yn}from"./ColourControl.js";import{keptByRow as Vn}from"efficient-easel/screen/lib/document/style-fields";import Ve from"./MarkupToolbar.js";import{deviceField as x}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as qn,NoControlMark as Zn,noControlField as qe}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Jn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Qn,resolvePhoneValue as ce}from"../../../format/lib/document/phone-override.js";import{phoneKey as v,tabletKey as Ze}from"efficient-easel/draw";import{SuppressibleText as eo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as to,CARD_OUTLINE_OPTIONS as no,DEFAULT_CARD_INDEX_FORMAT as oo,DEFAULT_CARD_OUTLINE as ro}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as io,DEFAULT_COVER_INDEX as lo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ao}from"efficient-easel/draw";import so from"../../components/MediaUploadField.js";import co from"../../components/MultiSelectField.js";import uo from"../../components/SectionThemePicker.js";import po from"../../components/SearchSelectField.js";import fo from"../../components/StorefrontLinkField.js";import{UiIcon as Je}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as mo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as ho}from"efficient-easel/draw/client";import{encodePartId as go}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as bo,useEaselStrings as xo}from"efficient-easel/strings";import{hasPhoneHeight as So,resolveSectionMinHeight as yo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as de,hasPhoneStick as Co,resolveSectionStick as _o}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as wo,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as Io}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Ro,resolveContainerDirection as Qe}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Eo,BOX_BLOCK_SPACING_POINTS as et,BOX_PHONE_ROW_LABEL as tt,BOX_COLUMNS_MAX as Oo,BOX_COLUMNS_MIN as nt,BOX_PHONE_ROW_MAX as To,BOX_PHONE_ROW_MIN as ue,BOX_SHARE_LABEL as Q,BOX_SHARE_PHONE_DEFAULT as Po,BOX_SHARE_PHONE_POINTS as Ao,BOX_SHARE_POINTS as Fo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Lo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ot,normalizeTheme as rt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as it,CONTAINER_GAP_BUILT_IN as No,CONTAINER_GAP_PHONE as pe,GAP_FIELD_CONTAINER as fe,followsSitePhoneGap as ko,hasOwnContainerGap as vo,hasOwnPhoneGap as me,resolveContainerGap as lt,resolvePhoneContainerGap as at}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Bo,CARD_IMAGE_BG_OFF as Do,CARD_IMAGE_BG_SWATCH_NAMES as Go,CARD_IMAGE_BG_SWATCHES as Ho,isCardImageBackgroundInheriting as Mo,cardImageBackgroundChoice as Ko,THEME_CARD_IMAGE_BG as Wo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Uo,SECTION_BG_SWATCHES as $o,SECTION_BG_SWATCH_NAMES as Xo,THEME_SECTION_BG as jo,isSectionBackgroundInheriting as zo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Yo,nestedAccentValue as st,resolveSectionAccent as ee}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Vo,TYPE_SIZE_INHERIT as qo,isTypeSizeInheriting as Zo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Jo,WIDTH_CHOICE_LABEL as Qo,WIDTH_INHERIT as er}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as tr}from"./panel-heading-scope.js";import{useEaselSession as nr}from"efficient-easel/screen/lib/session-context";import{backendOf as or}from"../website-session.js";import{BOX_GAP as rr,describedAs as R,group as _,iconOf as K,sharedStyleKinds as W}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ct,onDesktopWords as U,phoneTwinFields as he}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ir,gapField as ge,Segmented as be,segmented as lr,select as $,slider as B}from"./box-fields.js";function Bl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function ar(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function sr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:ar(),onReset:t})}function cr(e){return ge({...rr,builtIn:No[e],resolve:(t,n)=>lt(e,t,n?.siteGap),action:(t,n)=>i(sr,{inherited:!vo(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[fe]:e}})}function dr(e){return Fe(x("mobile",{[fe]:e,type:"custom",render:t=>i(fr,{container:e,...t})}),dt)}function ur(e){return Fe(x("tablet",{[fe]:e,type:"custom",render:t=>i(pr,{container:e,...t})}),dt)}const dt={not:{field:"gap",in:Array.from({length:-it.min},(e,t)=>it.min+t)}};function Dl(e){return{gap:x("desktop",cr(e)),[Ze("gap")]:ur(e),[v("gap")]:dr(e)}}function pr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(pe.min,lt(e,n,o));return ge({...pe,builtIn:r,resolve:s=>me(s)?s:r,action:(s,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:me(s),detail:U(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function fr({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=at(e,void 0,n,o,r);return ge({...pe,builtIn:a,resolve:c=>at(e,c,n,o,r),action:(c,d)=>i(y,{words:S()?.panel,label:l("Gap"),changed:me(c),detail:D(`${a}px`,ko(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Gl(e){return ir({offered:Ro(e),fallback:Qe(e,void 0),resolve:t=>Qe(e,t)})}function Hl(e,t){return Wt(t?Kt(e,t):[],t)}function mr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function A({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:d,hidden:f}=Ee(e),h=Y(null),p=Y(null),u=O=>t(s?{text:O,hidden:f}:O),m=()=>t({text:d,hidden:!f}),g=s&&f,E=we(),C=r?Sr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(Ut,{children:l(r)}):void 0,z=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(b,{label:l(n),icon:i(mn,{}),htmlFor:E,className:g?"is-hidden":void 0,hint:C,action:s?i(Z,{content:z,children:i(je,{"aria-pressed":f,"aria-label":z,onClick:m,children:f?i(Je,{name:"eye-off",size:14}):i(Je,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(Ve,{target:a?p:h,value:d,onChange:u}),a?i("textarea",{id:E,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>u(O.target.value)}):i("input",{id:E,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>u(O.target.value)})]})})}function Ml(e,t){return{...e,[Ae]:t}}function Kl(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Wl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const ut="sfPanelOnly";function Ul(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ut]:!0}}function $l(e){return!!e&&typeof e=="object"&&e[ut]===!0}function Xl(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as os,SCALAR_TEXT_CONTROLS as rs}from"efficient-easel/draw";function jl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[qn]:o,...r}=e;return{...r,[Jn]:!0,render:t}}const hr=new Set(ao),X={type:"radio",options:[{value:!0},{value:!1}]},pt={text:{type:"object",objectFields:{text:{type:"text"},hidden:X}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:X}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},F=(e,t)=>{const n=R({...t,[w]:e},{...pt[e.control],label:e.label});if(!hr.has(e.control))return n;const o=t.render;return{...qe(n,"authored-copy"),render:r=>i(eo,{name:r.name,children:o(r)})}},zl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",gr={field:"source.slug",set:!0},Yl={not:gr},br="Select a word, then press the highlighter.",xr=new Set([br]),Sr=e=>xr.has(e);function Vl(e,t,n){return F({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ql(e,t,n){return F({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Zl(e,t,n){return F({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Jl(e,t,n){return F({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ql(e){return{type:"custom",[Te]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(fo,{value:Oe(t),onChange:n,label:e})}}function ea(e,t,n){return F({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ta={Design:jt,Animation:Yt};function na(e){return{type:"custom",render:()=>i(yr,{text:e})}}function yr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function oa(e){return ae(e)!==null&&e?.tabs!==void 0}const ft=new Map;function ra(e,t){const n=`${e}\0${t?t.join(""):""}`,o=ft.get(n)??{type:"custom",tabs:t,[le]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(T,{})};return ft.set(n,o),o}const mt=new Map;function ia(e){const t=mt.get(e)??{type:"custom",[le]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(T,{})};return mt.set(e,t),t}function Cr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function la(e,t){return Cr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(T,{})}}function aa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(T,{})}}function sa({title:e,children:t}){const[n,o]=H(()=>!xe.has(e));return i(_n,{title:e,open:n,onToggle:r=>{o(r),r?xe.delete(e):xe.add(e)},children:t})}const xe=new Set;function ca({label:e}){return i(wn,{title:l(e),level:tr(2)})}function ht({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(Z,{content:d,children:i(Hn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function da(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=zo(n,t);return i(b,{label:l(e),icon:i(Vt,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(Uo)}),children:ht({swatches:$o,current:r?jo:n??t??"",onPick:o,names:Xo})})}}}function _r(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=Mo(r,t);return i(b,{label:l(e),icon:i(Be,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Bo)}),children:ht({swatches:Ho,current:a?Wo:Ko(r,t),onPick:o,names:Go})})}}}function ua(e=n=>n,t){return W({_gSectionTheme:_(Yo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(uo,{value:e(n),onChange:o,followLabel:t})}})}function j({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:d,disabled:f=!1}){const h=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:h?"sf-slider has-notch":"sf-slider",style:h?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(jn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function gt(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:d,icon:f,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const m=typeof p=="number"?p:null,g=m===null;return i(b,{label:l(e),icon:f?K(f):void 0,value:g?d||a===void 0?void 0:l(a):`${m}${h}`,changed:!g,action:d?_e(d,{changed:!g,onReset:()=>u(null)}):i(y,{words:S()?.panel,label:l(e),changed:!g,onReset:()=>u(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:u}):j({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:u})})}}}const te="Corners";function Se(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(b,{label:l(te),icon:i(Jt,{}),changed:r,action:_e(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ir,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=V();return[t?.values?.[e],n=>t?.onChange(e,n)]}function bt(){return qe({type:"custom",render:()=>i(Zn,{})},"always")}function wr(){const e=V();return t=>e?.onChangeMany(t)}function Ir({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=L(e.sidesKey),s=Xe(r)??[...$e];return i(Mn,{label:l(te),value:s,corners:bn,onChange:c=>{const d=Xe(c)??[];a(d.length===$e.length?null:d)},radius:t,onRadiusChange:n,radiusMin:k,radiusMax:Le,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function xt(){return bt()}function Rr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function Er(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:k}function Or(){return Se({sidesKey:"sectionCornerSides",useFollowed:Er,mark:i(Rr,{label:te}),hint:Tr})}const Tr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function pa(){return W({_gShape:_("Shape"),sectionCorners:Or(),sectionCornerSides:xt(),sectionBorder:St("desktop"),sectionBorderPhone:St("mobile")})}const Pr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function Ar(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Fr(){let e;try{const t=rt(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ot.line}function Lr({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[d,f]=H(()=>r?Tn(c,s):!1),h=Pr(),p=u=>Ar(r&&a?u:{width:u.width,color:u.color,...a?{style:u.style}:{}});return i(b,{label:l("Border"),icon:i(qt,{}),action:r?i(En,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(Rn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:h,styles:a,max:Lo})})}function Nr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Fr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(Lr,{value:e,onChange:t,placeholder:{sides:On(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function St(e){return x(e,{type:"custom",render:({value:t,onChange:n})=>i(Nr,{value:t,onChange:n,tier:e})})}function fa(e){return{type:"custom",render:()=>i(kr,{partKey:e})}}function kr({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=P(),r=xo();let a=null;try{a=ho().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Cn,{name:l("Text"),preview:mo(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??bo.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(go(t,e))}})}function yt(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=ie(d=>d),c=s?.props?.id?String(s.props.id):void 0;o=c?yn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return xn(r)?r:n}function vr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=yt(k);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function Br(){return i(T,{children:l("Follows the section's Corners until you set a number here.")})}function Dr(){return Se({sidesKey:"cardCornerSides",useFollowed:()=>yt(k),mark:i(vr,{label:te}),hint:i(Br,{})})}function Gr(){return{type:"custom",render:()=>i(Ft,{})}}function ma(e){return{...e,render:t=>i(Lt,{render:e.render,props:t})}}function ha(){return{_gShape:_("Shape"),cardCorners:Dr(),cardCornerSides:xt(),cardCornersApplyAll:Gr()}}function Ct(e=Fo,t=e[0].value){return R({type:"custom",render:n=>{const{value:o,onChange:r}=n,a="follows"in n,s=n.follows,c=o!=null,d=c?o:a?s??t:o,f=e.find(p=>p.value===d)??e.find(p=>p.value===t)??e[0],h=e.find(p=>p.value===(s??t))??e[0];return i(b,{label:l(Q),icon:i(ke,{}),value:l(f.label),action:a?i(y,{words:S()?.panel,label:l(Q),changed:c,detail:U(p=>l(p),l(h.label),n.followsView),onReset:()=>r(void 0)}):void 0,children:i($n,{className:"sf-gallery-layouts",label:l(Q),value:f.value,onChange:r,options:e.map(p=>({value:p.value,label:l(p.label),picture:i("span",{className:"sf-gallery-pic",children:Hr(p.weights).map((u,m)=>i("i",{style:{gridColumn:`span ${u}`}},m))})}))})})}},{type:"select",label:Q,options:e.map(n=>({value:n.value,label:n.label}))})}function Hr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function ga(){return $(Eo,i(rn,{}),et,et[0].value)}function ba(){return x("mobile",Ct(Ao,Po))}function xa(){return he("share",Ct(),ct)[Ze("share")]}function Mr(){return x("mobile",B(tt,i(ve,{}),ue,To,1,ue,"",{clear:{phoneFollows:!1,hint:ue}}))}const _t={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Sa(){const e=B(tt,i(ve,{}),nt,Oo,1,nt,"",{clear:{emptyLabel:"Auto"}}),t=he("columns",e,{..._t,tablet:ct.tablet}),n=he("columns",e,_t,{phoneRow:Mr()});return{...t,phoneRow:n.phoneRow}}function ya(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(b,{label:l(e),icon:i(Ue,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!Zo(s),detail:l("the Text style in Styles"),onReset:()=>c(qo),defaultAction:{onPress:()=>c(Vo),title:l("Keep this section's own built-in size"),icon:i(Zt,{})}}),children:j({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Ca(){return{_gCellWidth:_("Cell width"),gridSpan:$("Positions",i(ke,{}),[{label:"Auto",value:""},...Array.from({length:Bt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function G(){let e=null,t=null;try{e=Rt(Kr),t=ie(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Kr=It(null);function Wr({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const d=G()[s],f=ce(void 0,d,c);return i(T,{children:j({min:e,max:t,step:n,value:ce(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function Ur({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=G()[t],c=ce(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:U(d=>l(d),`${c}${o}`),onReset:a})}function $r(e){return gt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ur,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Wr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Xr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},jr={Top:We,Bottom:He,Left:Me,Right:Ke},zr=e=>{const t=jr[e];return i(t,{})};function _a(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=C=>Xr[C],a=C=>B(r("Top"),i(We,{}),I.min,I.max,I.step,C,"px"),s=(C,z,O,re=I)=>x("mobile",$r({label:r(C),icon:zr(C),desktopKey:z,min:re.min,max:re.max,step:re.step,fallback:O})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,m=e.sidePhone??u,g=e.phone===!0,E=C=>g?x("desktop",C):C;return W({...o?{_gSpacing:_("Padding")}:{},[t]:E(a(c)),...g?{[v(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:E(B(r("Bottom"),i(He,{}),I.min,I.max,I.step,d,"px")),...g?{[v(n)]:s("Bottom",n,d)}:{}},...e.sides?{[f]:E(B(r("Left"),i(Me,{}),p.min,p.max,p.step,u,"px")),...g?{[v(f)]:s("Left",f,m,p)}:{},[h]:E(B(r("Right"),i(Ke,{}),p.min,p.max,p.step,u,"px")),...g?{[v(h)]:s("Right",h,m,p)}:{}}:{}})}function wa(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&ae(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const ne="Width";function Ia(e,t=Jo,n=!0){const o=t.map(r=>({label:Qo[r],value:r}));return W({...n?{_gWidth:_(ne)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(b,{label:l(ne),icon:i(hn,{}),action:n?i(mr,{inherited:a?.inherited??!1,onReset:()=>r(er),label:ne}):void 0,children:be({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:ne})})}})}function Ra(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(b,{label:M,icon:K(i(an,{})),action:o?o(a):void 0,children:be({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:M})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?Io:wo;return i("div",{className:"sf-field",children:j({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:M,onChange:r})})}}),n=()=>lr("Unit",i(De,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return W({_gHeight:_(M),sectionHeightMode:x("desktop",e()),sectionHeightValue:x("desktop",t()),sectionHeightUnit:x("desktop",n()),sectionHeightModePhone:x("mobile",e(o=>i(Yr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:x("mobile",t()),sectionHeightUnitPhone:x("mobile",n())})}function Yr({onClear:e}){const t=G(),n=So(t),o=yo(t),r=U(a=>l(a),o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`);return i(y,{words:S()?.panel,label:l(M),changed:n,detail:r,onReset:e})}function Ea(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(Vr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:j({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:_(de),stickTop:x("desktop",e(!1)),stickTopDistance:x("desktop",t()),stickTopPhone:x("mobile",e(!0)),stickTopDistancePhone:x("mobile",t())}}function Vr({value:e,onChange:t,labelId:n,phone:o}){const r=G(),a=_o(r),s=o?a.phone:e===!0;return i(b,{label:l(de),labelId:n,icon:K(i(un,{})),action:N(T,{children:[o?i(y,{words:S()?.panel,label:l(de),changed:Co(r),detail:U(c=>l(c),a.desktop?`${a.desktopDistance}px`:l("Off")),onReset:()=>t(void 0)}):null,i(se,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const wt="e.g. about";function Oa(){return{_gAnchor:_("Anchor"),anchor:F({control:"plainText",label:"Name",placeholder:wt},{type:"custom",render:({value:e,onChange:t})=>i(Xt,{value:e,onChange:t,nameBox:(n,o)=>i(A,{value:n,onChange:o,label:"Name",placeholder:wt,hideable:!1,markup:!1})})})}}function Ta(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Wn,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Pa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Kn,{id:c,value:Tt(typeof o=="string"?o:null),onChange:d=>r(d?Ot(d):"")})})}}}function qr(e,t,n,o){return{type:"custom",...R({},{...X,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const d=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(b,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(se,{checked:d,onChange:a,ariaLabelledBy:f})})}}}function Aa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ye,{label:l("Background"),icon:i(dn,{}),id:r,value:gn(e),onChange:t})}}}function Fa(e,t){return{type:"custom",...R({},{...X,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(b,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Gn,{id:s,checked:a,onChange:o})})}}}function La(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(Ye,{label:l(e),icon:n,value:o||t,onChange:r})}}function Na(){return{type:"custom",render:({value:e,onChange:t})=>i(Zr,{value:typeof e=="string"?e:"",onChange:t})}}function Zr({value:e,onChange:t}){const{hex:n,n:o}=Qr();return i(Yn,{label:l("Fill"),icon:i(Be,{}),value:e,inherited:n,resetTo:D(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Jr(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return ee(n);const r=Sn(e,t);if(r.length===0)return null;const a=ee(st(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=ee(st(r[s].sectionAccent));if(c!==null)return c}return ee(r[0].sectionAccent)}function Qr(){const e=rt(P().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=ie(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Jr(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??ot.background,n:o+1}}const ei=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function ti({label:e,value:t,onChange:n,points:o=ei}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(Dn,{label:l(e),value:t,points:r,onChange:n})}function ka(){return bt()}const va={top:i(nn,{}),right:i(tn,{}),bottom:i(Qt,{}),left:i(en,{})};function Ba(e,t,n,o,r,a,s){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(g=>g.cell===p);if(!u)return d(`missing-${p}`);const m=a?.[p];return m?{value:u.value,label:u.label,icon:m}:{value:u.value,label:u.label}},h=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const m=t.some(g=>g.value===p)?p:n;return i(b,{label:l(e),icon:r,value:c(m)?.label?l(c(m).label):s?l(s):"",children:ti({label:e,value:m,onChange:u,points:h})})}}}function Da(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(co,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Ga(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(po,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Ha(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ma=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ka(e,t,n){const o=Object.keys(Re).map(r=>({label:Re[r],value:r,picture:n[r]}));return{type:"custom",...R({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ni,{label:e,icon:t,options:o,onChange:r})}}function ni({label:e,icon:t,options:n,onChange:o}){const r=V()?.values??{},a=Pt(r),s=a==="frame"&&!!Ie(r.mediaVideo)&&!Ie(r.videoFrame);return i(b,{label:l(e),icon:K(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:be({options:n,value:a,onChange:o,ariaLabel:e})})}function Wa(e,t,n,o={}){return{type:"custom",[Pe]:!0,render:({value:r,onChange:a,name:s})=>i(so,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const Ua={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function oi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function $a({value:e,onChange:t,label:n}){const o=e||{},r=V(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,d=s?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!or(nr()).geocode,h=we(),p=(u,m)=>t({...o,[u]:m??void 0});return N(T,{children:[i(b,{label:l(n),icon:i(Ge,{}),action:f?i(Z,{content:l("Find from the address (OpenStreetMap)"),children:i(je,{"aria-label":l("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(pn,{})})}):void 0,children:f&&o.status?i(Z,{content:oi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${$t}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:d},children:s?l("Finding…"):c?l(zn):l(o.status)})}):null}),i(b,{label:l("Enter by hand"),labelId:h,icon:i(on,{}),action:i(se,{checked:!!o.manual,onChange:u=>t({...o,manual:u}),ariaLabelledBy:h})}),o.manual&&i(b,{label:l("Latitude, longitude"),icon:i(Ge,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(ze,{value:typeof o.lat=="number"?o.lat:null,onChange:u=>p("lat",u),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(ze,{value:typeof o.lng=="number"?o.lng:null,onChange:u=>p("lng",u),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function ri(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ii(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function Xa(e,t){return e===null?null:t>e?e:null}function li(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const ja={label:"Ticker items",icon:i(cn,{})};function za(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...pt.textList,label:e}),render:({value:r,onChange:a})=>i(ai,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function ai({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=Y(null),[c,d]=H(null),f=p=>p.map(u=>({text:u?.text??""})),h=p=>{const u=li(n,p,c);u===null&&(s.current=null),d(u),r(f(p))};return i(Pn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(Ve,{target:s,value:ri(n,c),onChange:p=>r(ii(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,m)=>i("input",{type:"text",className:a&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,d(u)}})})}function Ya(e,t){const n=`${e.label} — row ${t+1}`;return F({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Va(e){return{_gCards:_("Cards"),coverIndex:$("Cover image",i(sn,{}),io,String(lo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:_r("Image background",Do),cardImage:di()}}function qa(){return{outline:$("Card outline",i(fn,{}),no,ro),indexBadge:$("Card number",i(De,{}),to,oo),showBadge:qr("Product badge",!0,i(Ue,{noun:"tag"}))}}function Za(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...X,label:oe.find(a=>a.id===r).label}),o=r=>R(Vn(ye),n(r));return{_gShowOnCard:_("Show on a card"),[ye]:R({type:"custom",render:()=>i(si,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(ye)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const ye="showCardPrice",oe=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function si({rest:e}){const t=G(),n=wr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=oe.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(Ce,{parts:oe,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(oe.map(({id:s})=>[s,void 0])))})}function Ja(e,t="display"){const n=v(t);return{[t]:x("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ce,{parts:e,changed:Fn(o),shown:a=>Ln(o,a),onPress:(a,s)=>r(vn(o,a,s)),onReset:()=>r(void 0)})}),[n]:x("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ci,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ce({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(b,{label:c,icon:i(zt,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(An,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function ci({parts:e,desktopKey:t,value:n,onChange:o}){const r=G()[t];return i(Ce,{parts:e,changed:kn(n),shown:a=>Nn(r,n,a),onPress:(a,s)=>o(Bn(n,a,s)),onReset:()=>o(Qn),detail:l("the same as Desktop")})}function di(){return gt("Card image",{min:k,max:Le,step:Nt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Qa(){return Se({sidesKey:"cornerSides",step:kt,useFollowed:()=>k,mark:i(ui,{label:vt}),hint:l("Rounds the picture. Left alone it stays square.")})}function ui({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function es(){return{type:"custom",render:({value:e,onChange:t})=>i(hi,{value:typeof e=="string"?e:"",onChange:t})}}function pi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Ht(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const fi={width:"3.5rem",height:"2.5rem"},mi=200;function hi({value:e,onChange:t}){const[n,o]=H(null),[r,a]=H(4),s=Y(null);Et(()=>{const u=s.current;if(!u||typeof ResizeObserver!="function")return;const m=()=>a(u.getBoundingClientRect().width>=mi?4:3);m();const g=new ResizeObserver(m);return g.observe(u),()=>g.disconnect()},[]);const c=e&&e in q?e:"",d=Ne(n,c),f=Ne(n,"").length,h=Mt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:h},...d.map(u=>({value:u,label:l(q[u].label),icon:i(pi,{layout:q[u],width:40})}))];return i(b,{label:l("Layout"),icon:i(ln,{}),value:c?l(q[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Xn,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:fi,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(In,{options:[{id:"all",label:l("All")},...Dt.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:Gt.length})})]})})})})}export{gr as BOUND_TO_POST,zl as BOUND_TO_POST_NOTE,ta as BUCKET_ICONS,Ua as CUSTOM_FIELD_MEDIA,$a as CoordsField,dt as DESKTOP_GAP_NOT_OVERLAP,Ce as DisplayRow,va as EDGE_ARROWS,Un as FOCAL_DEFAULT,ei as FOCAL_POINTS,le as FOLD_FIELD_MARKER,ti as FocalPicker,ca as GroupLabel,br as HIGHLIGHT_HINT,A as HidableTextField,Te as LINK_FIELD_MARKER,Bl as Label,Pe as MEDIA_FIELD_MARKER,Ma as MEDIA_TYPE_OPTIONS,Yl as NOT_BOUND_TO_POST,sa as PanelBand,yr as PanelNoteLine,Kr as RowPropsContext,Ae as SCAFFOLD_FIELD_MARKER,rs as SCALAR_TEXT_CONTROLS,sr as SiteGapDefaultReset,j as Slider,ht as Swatches,os as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,ja as TICKER_ITEMS_ROW,ai as TextListField,ne as WIDTH_LABEL,mr as WidthDefaultReset,li as aimAfterListChange,Oa as anchorFields,D as backTo,da as backgroundField,ga as boxBlockSpacingField,Sa as boxColumnsFields,Na as boxFillField,Mr as boxPhoneRowField,Ct as boxShareField,ba as boxSharePhoneField,xa as boxShareTabletField,Jr as boxThemeIndexOf,ra as bucketHeader,fa as buttonWordsEntryField,Dr as cardCornersField,_r as cardImageBackgroundField,di as cardImageField,Va as cardMediaFields,ha as cardShapeFields,Za as cardShowFields,qa as cardStyleFields,Ca as cellWidthFields,Fa as checkbox,La as colorInput,Gl as containerDirectionField,cr as containerGapField,dr as containerGapPhoneField,Dl as containerGapRows,ur as containerGapTabletField,oi as coordsResultTip,Jl as copyText,xt as cornerSidesField,Se as cornersRowField,Pa as date,Ta as dateTime,ia as designGroupHeader,Ja as displayFields,Ba as edgePad,Xa as focusAfterRemove,ka as focusKeptField,la as foldMarker,ae as foldMetaOf,Cr as foldTitleOf,es as galleryLayoutField,Ra as heightFields,Hl as heroGroupPlacementPoints,Oe as hidableText,Sr as hintIsWhileTyping,Qa as imageCornersField,jl as inOwnBox,oa as isBucketHeader,bt as keptBy,Ql as linkField,Ka as loadingShowsField,Da as multiSelect,Aa as pageBackgroundField,na as panelNote,$r as phoneOverrideField,Zl as plainText,ea as plainTextarea,gt as pxField,aa as quietMarker,Ee as readHidable,ri as rowText,Ga as searchSelect,St as sectionBorderField,Or as sectionCornersField,pa as sectionShapeFields,ua as sectionThemeFields,ii as setRowText,ya as sizeField,Ha as sourceField,_a as spacingFields,Ea as stickFields,wa as swapPadding,ma as templateField,Vl as text,At as textFieldIdentifier,Wl as textFieldOffPage,$l as textFieldPanelOnly,za as textList,Ya as textListRowField,ql as textarea,qr as toggle,Wa as upload,wr as useSelectedPatch,G as useSelectedProps,L as useSelectedSibling,ar as useSiteGapDetail,Ia as widthField,Xl as withIdentifier,Kl as withOffPage,Ul as withPanelOnly,Ml as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as P,Fragment as L}from"react/jsx-runtime";import{cloneElement as Le,createContext as Ut,useContext as $t,useEffect as Xt,useId as Ne,useRef as j,useState as V}from"react";import{useEasel as ue,useSelectedHost as G}from"efficient-easel/easel";import{toDateKey as jt,fromDateKey as Vt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Pe}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Be,loadingShowsOf as zt}from"../../../format/lib/hero-video.js";import{readHidable as De,hidableText as ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as de,LINK_FIELD_MARKER as He,MEDIA_FIELD_MARKER as Ge,SCAFFOLD_FIELD_MARKER as Me,TEXT_FIELD_MARKER as E,foldMetaOf as pe,textFieldIdentifier as Yt}from"efficient-easel/draw";import qt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as We}from"../../../render/lib/document/show-when.js";import Jt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Zt,CORNER_RADIUS_MAX as Ke,CORNER_RADIUS_MIN as M}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Qt,IMAGE_CORNERS_LABEL as en}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as tn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as nn,GALLERY_LAYOUTS as te,GALLERY_LAYOUT_KEYS as on,galleryChoices as Ue,galleryPictureCells as rn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as ln}from"./shell-glyph.js";import{anchorSiblingsOf as sn,placementPoints as an}from"../../../format/lib/hero-group-placement.js";import cn,{KEEP_HINT_CLASS as un}from"../../components/KeepHint.js";import dn from"../../components/AnchorField.js";import{AdjustIcon as pn,EyeIcon as fn,AnimationIcon as hn,BackgroundIcon as mn,BorderAllIcon as gn,BlockSectionIcon as bn,ColumnWidthsIcon as fe,ColumnsIcon as $e,CornerIcon as xn,DirectionDownIcon as Sn,DirectionLeftIcon as Cn,DirectionRightIcon as yn,DirectionUpIcon as wn,EditIcon as _n,GapIcon as Rn,GridIcon as On,GroundIcon as Xe,HashIcon as je,HeightIcon as En,ImageIcon as In,ListIcon as Tn,LocationIcon as Ve,PaddingBottomIcon as ze,PaddingLeftIcon as Ye,PaddingRightIcon as qe,PaddingTopIcon as Je,PageIcon as kn,StickyIcon as Fn,SearchIcon as An,SquareIcon as Ln,TypeIcon as Nn,WidthIcon as Pn}from"efficient-easel/icons";import{FieldGlyph as Ze}from"../../components/FieldGlyph.js";import{resolvePageBackground as Bn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Qe,CORNER_SIDE_POINTS as Dn,hasOwnSectionCorners as vn,normalizeCornerSides as et}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Hn,enclosingSection as Gn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as Mn,SettingsField as x,SettingsGroup as Wn,SettingsGroupSub as Kn,SettingsSegmented as Un,SettingsBorder as $n,SettingsSidesEach as Xn,SettingsSwitch as he,borderSides as jn,borderStartEach as Vn}from"efficient-easel/panel";import{ListField as zn}from"efficient-easel/fields";import{DisplayChips as Yn}from"efficient-shell/ui";import{desktopDisplayChanged as qn,partShownOnDesktop as Jn,partShownOnPhone as Zn,phoneDisplayChanged as Qn,withDesktopPart as eo,withPhonePart as to}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as no,Checkbox as oo,ColorSwatch as ro,CornersInput as io,DatePicker as lo,DateTimePicker as so,FOCAL_DEFAULT as ao,IconPicker as tt,COLUMN_COUNT_MAX as nt,COLUMN_SHARE_MIN as co,COLUMN_SHARES_EQUAL as uo,resolveColumnShares as ot,WidthsBar as po,useShellStrings as fo,IconButton as rt,InputNumber as it,Slider as ho,Tooltip as ne}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as mo}from"./geocode-resolve.js";import{ColourRow as lt,InheritedColourRow as st}from"./ColourControl.js";import{keptByRow as go}from"efficient-easel/screen/lib/document/style-fields";import at from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as bo,NoControlMark as xo,noControlField as ct}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as So}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Co,resolvePhoneValue as me}from"../../../format/lib/document/phone-override.js";import{phoneKey as k,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as yo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as wo,CARD_OUTLINE_OPTIONS as _o,DEFAULT_CARD_INDEX_FORMAT as Ro,DEFAULT_CARD_OUTLINE as Oo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Eo,DEFAULT_COVER_INDEX as Io}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as To}from"efficient-easel/draw";import ko from"../../components/MediaUploadField.js";import Fo from"../../components/MultiSelectField.js";import Ao from"../../components/SectionThemePicker.js";import Lo from"../../components/SearchSelectField.js";import No from"../../components/StorefrontLinkField.js";import{UiIcon as ut}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Po}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Bo}from"efficient-easel/draw/client";import{encodePartId as Do}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as vo,useEaselStrings as Ho}from"efficient-easel/strings";import{hasPhoneHeight as Go,hasTabletHeight as ge,resolveSectionMinHeight as Mo,resolveTabletHeight as Wo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as oe,SECTION_STICK_LABEL as be,hasPhoneStick as Ko,hasTabletStick as Uo,resolveSectionStick as dt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as $o,SECTION_MIN_HEIGHT_GROUP_LABEL as z,SECTION_SCREEN_PCT as Xo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as jo,resolveContainerDirection as pt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Vo,BOX_BLOCK_SPACING_POINTS as ft,BOX_PHONE_ROW_LABEL as ht,BOX_COLUMNS_MAX as zo,BOX_COLUMNS_MIN as mt,BOX_PHONE_ROW_MAX as Yo,BOX_PHONE_ROW_MIN as xe,BOX_SHARE_CHOICES as gt,BOX_SHARE_LABEL as K,boxShareChoiceOf as bt,boxShareWidthsOf as Se,BOX_SHARE_PHONE_DEFAULT as qo,BOX_SHARE_PHONE_POINTS as Jo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as B}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Zo,borderBySide as xt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Qo,normalizeTheme as St,normalizeThemeColors as er,sectionBandTone as tr,surfaceTwoTone as nr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Ct,CONTAINER_GAP_BUILT_IN as or,CONTAINER_GAP_PHONE as Ce,GAP_FIELD_CONTAINER as ye,followsSitePhoneGap as rr,hasOwnContainerGap as ir,hasOwnPhoneGap as we,resolveContainerGap as yt,resolvePhoneContainerGap as wt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as lr,CARD_IMAGE_BG_OFF as sr,CARD_IMAGE_BG_SWATCH_NAMES as ar,CARD_IMAGE_BG_SWATCHES as cr,isCardImageBackgroundInheriting as ur,cardImageBackgroundChoice as dr,THEME_CARD_IMAGE_BG as pr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as fr,SECTION_BG_NO_FILL as hr,sectionBackgroundChoice as mr,THEME_SECTION_BG as _e,isSectionBackgroundEmpty as gr,sectionBackgroundHex as _t}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as br,nestedAccentValue as Rt,resolveSectionAccent as re}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xr,TYPE_SIZE_INHERIT as Sr,isTypeSizeInheriting as Cr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as yr,WIDTH_CHOICE_LABEL as wr,WIDTH_INHERIT as _r}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Rr}from"./panel-heading-scope.js";import{useEaselSession as Or}from"efficient-easel/screen/lib/session-context";import{backendOf as Er}from"../website-session.js";import{BOX_GAP as Ir,describedAs as T,group as O,iconOf as Y,sharedStyleKinds as q}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Re,onDesktopWords as J,phoneTwinFields as ie}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Tr,gapField as Oe,iconPickerRow as kr,pickerCellIcon as Fr,pickerNoneIcon as Ar,Segmented as Ee,segmented as Lr,select as Z,slider as U}from"./box-fields.js";function xs({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Nr(){const{blockGap:e}=B();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function Pr({inherited:e,onReset:t,label:n}){return i(C,{words:S()?.panel,label:l(n),changed:!e,detail:Nr(),onReset:t})}function Br(e){return Oe({...Ir,builtIn:or[e],resolve:(t,n)=>yt(e,t,n?.siteGap),action:(t,n)=>i(Pr,{inherited:!ir(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ye]:e}})}function Dr(e){return We(R("mobile",{[ye]:e,type:"custom",render:t=>i(Gr,{container:e,...t})}),Ot)}function vr(e){return We(R("tablet",{[ye]:e,type:"custom",render:t=>i(Hr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-Ct.min},(e,t)=>Ct.min+t)}};function Ss(e){return{gap:R("desktop",Br(e)),[W("gap")]:vr(e),[k("gap")]:Dr(e)}}function Hr({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(Ce.min,yt(e,n,o));return Oe({...Ce,builtIn:r,resolve:a=>we(a)?a:r,action:(a,c)=>i(C,{words:S()?.panel,label:l("Gap"),changed:we(a),detail:J(u=>l(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Gr({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=wt(e,void 0,n,o,r);return Oe({...Ce,builtIn:s,resolve:c=>wt(e,c,n,o,r),action:(c,u)=>i(C,{words:S()?.panel,label:l("Gap"),changed:we(c),detail:D(`${s}px`,rr(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Cs(e){return Tr({offered:jo(e),fallback:pt(e,void 0),resolve:t=>pt(e,t)})}function ys(e,t){return an(t?sn(e,t):[],t)}function Mr({inherited:e,onReset:t,label:n}){return i(C,{words:S()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function v({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:u,hidden:p}=De(e),m=j(null),f=j(null),d=y=>t(a?{text:y,hidden:p}:y),g=()=>t({text:u,hidden:!p}),h=a&&p,_=Ne(),w=r?Xr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(cn,{children:l(r)}):void 0,b=p?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(x,{label:l(n),icon:i(Nn,{}),htmlFor:_,className:h?"is-hidden":void 0,hint:w,action:a?i(ne,{content:b,children:i(rt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(ut,{name:"eye-off",size:14}):i(ut,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[c&&i(at,{target:s?f:m,value:u,onChange:d}),s?i("textarea",{id:_,ref:f,value:u,placeholder:o===void 0?void 0:l(o),onChange:y=>d(y.target.value)}):i("input",{id:_,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:y=>d(y.target.value)})]})})}function ws(e,t){return{...e,[Me]:t}}function _s(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Rs(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Et="sfPanelOnly";function Os(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Et]:!0}}function Es(e){return!!e&&typeof e=="object"&&e[Et]===!0}function Is(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ma,SCALAR_TEXT_CONTROLS as Wa}from"efficient-easel/draw";function Ts(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[bo]:o,...r}=e;return{...r,[So]:!0,render:t}}const Wr=new Set(To),Q={type:"radio",options:[{value:!0},{value:!1}]},It={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},H=(e,t)=>{const n=T({...t,[E]:e},{...It[e.control],label:e.label});if(!Wr.has(e.control))return n;const o=t.render;return{...ct(n,"authored-copy"),render:r=>i(yo,{name:r.name,children:o(r)})}},ks="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Kr={field:"source.slug",set:!0},Fs={not:Kr},Ur="Select a word, then press the highlighter.",$r=new Set([Ur]),Xr=e=>$r.has(e);function As(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ls(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ns(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Ps(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Bs(e){return{type:"custom",[He]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(No,{value:ve(t),onChange:n,label:e})}}function Ds(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const vs={Design:pn,Animation:hn};function Hs(e){return{type:"custom",render:()=>i(jr,{text:e})}}function jr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function Gs(e){return pe(e)!==null&&e?.tabs!==void 0}const Tt=new Map;function Ms(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Tt.get(n)??{type:"custom",tabs:t,[de]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return Tt.set(n,o),o}const kt=new Map;function Ws(e){const t=kt.get(e)??{type:"custom",[de]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return kt.set(e,t),t}function Vr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ks(e,t){return Vr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Us(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function $s({title:e,children:t}){const[n,o]=V(()=>!Ie.has(e));return i(Wn,{title:e,open:n,onToggle:r=>{o(r),r?Ie.delete(e):Ie.add(e)},children:t})}const Ie=new Set;function Xs({label:e}){return i(Kn,{title:l(e),level:Rr(2)})}function zr({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,a=s?l(s):t;return P("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?l(o[c]):c;return i(ne,{content:u,children:i(ro,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function js(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Yr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Yr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Kt(),u={background:a.background,surface:a.surface,surface2:nr(a),band:tr(a)},p=n?_e:t,m=gr(s,t,p),f=_t(void 0,p,u),d=n?fr:void 0,g=mr(s,t),h=p===_e?l("the theme's section background"):l("Theme {n} background",{n:c});return i(st,{label:l(e),icon:i(mn,{}),value:m?"":_t(s,t,u),inherited:f,resetTo:D(f.toUpperCase(),h),onChange:r,onReset:()=>r(d),choices:[{label:l("No fill"),color:"",selected:g==="none",onPick:()=>r(hr)},{label:`${l("Section band")} · ${u.band.toUpperCase()}`,color:u.band,selected:g==="band",onPick:()=>r(_e)}]})}function qr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ur(r,t);return i(x,{label:l(e),icon:i(Xe,{}),changed:!s,action:i(C,{words:S()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(lr)}),children:zr({swatches:cr,current:s?pr:dr(r,t),onPick:o,names:ar})})}}}function Vs(e=n=>n,t){return q({_gSectionTheme:O(br),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Ao,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:a=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:m}){const f=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(ho,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},suffix:s||void 0,showInput:a,label:u===void 0?void 0:l(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:d=>{d!==null&&d!==o&&r(d)}})})}function Ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:u,icon:p,unit:m="px"}=t;return{type:"custom",render:({value:f,onChange:d})=>{const g=typeof f=="number"?f:null,h=g===null;return i(x,{label:l(e),icon:p?Y(p):void 0,value:h?u||s===void 0?void 0:l(s):`${g}${m}`,changed:!h,action:u?Le(u,{changed:!h,onReset:()=>d(null)}):i(C,{words:S()?.panel,label:l(e),changed:!h,onReset:()=>d(null)}),hint:typeof a=="string"?l(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const le="Corners";function Te(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(x,{label:l(le),icon:i(xn,{}),changed:r,action:Le(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Zr,{tier:e,px:o,onRadius:n})})}}}function F(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function At(){return ct({type:"custom",render:()=>i(xo,{})},"always")}function Jr(){const e=G();return t=>e?.onChangeMany(t)}function Zr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=F(e.sidesKey),a=et(r)??[...Qe];return i(io,{label:l(le),value:a,corners:Dn,onChange:c=>{const u=et(c)??[];s(u.length===Qe.length?null:u)},radius:t,onRadiusChange:n,radiusMin:M,radiusMax:Ke,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Lt(){return At()}function Qr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=B(),r=typeof o=="number"?`${o}px`:l("not set");return i(C,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function ei(){const{cornerRadiusPx:e}=B();return typeof e=="number"?e:M}function ti(){return Te({sidesKey:"sectionCornerSides",useFollowed:ei,mark:i(Qr,{label:le}),hint:ni})}const ni="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function zs(){return q({_gShape:O("Shape"),sectionCorners:ti(),sectionCornerSides:Lt(),...$("sectionBorder",Nt)})}const oi=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function ri(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ii(){let e;try{const t=St(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Qo.line}function li({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[u,p]=V(()=>r?Vn(c,a):!1),m=oi(),f=d=>ri(r&&s?d:{width:d.width,color:d.color,...s?{style:d.style}:{}});return i(x,{label:l("Border"),icon:i(gn,{}),action:r?i(Xn,{each:u,label:l("Each side"),onChange:p}):void 0,children:i($n,{label:l("Border"),value:c,each:u,onChange:d=>t(f(d)),placeholder:n,presets:o,words:m,styles:s,max:Zo})})}function si({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(W("sectionBorder")),s=ii(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...xt(a(o)),...xt(a(r))}:n==="tablet"?a(o):{};return i(li,{value:e,onChange:t,placeholder:{sides:jn(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function Ys(e){return R(e,Nt(e==="mobile"?"phone":e))}function Nt(e){return{type:"custom",render:({value:t,onChange:n})=>i(si,{value:t,onChange:n,view:e})}}function $(e,t){const n=(o,r)=>ie(e,t(o),Re)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[k(e)]:n("phone",k(e))}}function qs(e){return{type:"custom",render:()=>i(ai,{partKey:e})}}function ai({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=B(),r=Ho();let s=null;try{s=Bo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Mn,{name:l("Text"),preview:Po(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??vo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Do(t,e))}})}function Pt(e){const{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=ue(u=>u),c=a?.props?.id?String(a.props.id):void 0;o=c?Gn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return vn(r)?r:n}function ci({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Pt(M);return i(C,{words:S()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function ui(){return i(L,{children:l("Follows the section's Corners until you set a number here.")})}function di(){return Te({sidesKey:"cardCornerSides",useFollowed:()=>Pt(M),mark:i(ci,{label:le}),hint:i(ui,{})})}function pi(){return{type:"custom",render:()=>i(qt,{})}}function Js(e){return{...e,render:t=>i(Jt,{render:e.render,props:t})}}function Zs(){return{_gShape:O("Shape"),cardCorners:di(),cardCornerSides:Lt(),cardCornersApplyAll:pi()}}function fi(){return T({type:"custom",render:e=>i(mi,{...e})},{type:"select",label:K,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function hi(e,t){const n=bt(e);if(n!=="custom")return l(gt.find(r=>r.value===n)?.label??"");const o=ot(Se(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function mi(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,u=bt(c),p=r>=2&&r<=nt,m=()=>[...uo[r]??[]],f=j(null),d=b=>{const y=f.current;y&&JSON.stringify(b)===JSON.stringify(y.shares)?n(y.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!p||n(b==="custom"?m():b)},h=l("The width bar works for 2 to {count} blocks.",{count:nt}),_=a&&(s||t!=="content"),w=fo().widths.hint(r,co);return i(x,{label:l(K),icon:i(fe,{}),changed:_,hint:u!=="custom"?void 0:p?w:h,action:i(C,{words:S()?.panel,label:l(K),changed:_,disabled:e.readOnly===!0,detail:s?J(b=>l(b),hi(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:P("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(tt,{label:l(K),value:u,options:gt.map(b=>({value:b.value,label:b.value==="custom"&&!p?h:l(b.label),icon:Fr(i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(b.weights).map((y,X)=>i("i",{style:{gridColumn:`span ${y}`}},X))}),l(b.label),b.value==="custom"&&!p?h:l(b.label))})),onChange:g,columns:3,cell:Dt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:ot(Se(c,r),r)}},onBlur:()=>{f.current=null},children:i(po,{label:l(K),count:r,value:Se(c,r),onChange:d,readOnly:e.readOnly===!0})}):null]})})}function Bt(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Qs(){return Z(Vo,i(Rn,{}),ft,ft[0].value)}function ea(){return R("mobile",kr(K,i(fe,{}),Jo.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),qo,{columns:2,cell:Dt}))}const Dt={width:"5.75rem",height:"3.25rem"};function ta(){return ie("share",fi(),Re)[W("share")]}function gi(){return R("mobile",U(ht,i($e,{}),xe,Yo,1,xe,"",{clear:{phoneFollows:!1,hint:xe}}))}const vt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function na(){const e=U(ht,i($e,{}),mt,zo,1,mt,"",{clear:{emptyLabel:"Auto"}}),t=ie("columns",e,{...vt,tablet:Re.tablet}),n=ie("columns",e,vt,{phoneRow:gi()});return{...t,phoneRow:n.phoneRow}}function oa(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(x,{label:l(e),icon:i(Ze,{noun:s}),action:i(C,{words:S()?.panel,label:l(e),changed:!Cr(a),detail:l("the Text style in Styles"),onReset:()=>c(Sr),defaultAction:{onPress:()=>c(xr),title:l("Keep this section's own built-in size"),icon:i(bn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ra(){return{_gCellWidth:O("Cell width"),gridSpan:Z("Positions",i(fe,{}),[{label:"Auto",value:""},...Array.from({length:tn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function A(){let e=null,t=null;try{e=$t(bi),t=ue(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const bi=Ut(null);function xi({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const u=A()[a],p=me(void 0,u,c);return i(L,{children:ee({min:e,max:t,step:n,value:me(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function Si({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=A()[t],c=me(void 0,a,n);return i(C,{words:S()?.panel,label:l(e),changed:r,detail:J(u=>l(u),`${c}${o}`),onReset:s})}function Ci(e){return Ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Si,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(xi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const yi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},wi={Top:Je,Bottom:ze,Left:Ye,Right:qe},_i=e=>{const t=wi[e];return i(t,{})};function ia(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=w=>yi[w],s=w=>U(r("Top"),i(Je,{}),I.min,I.max,I.step,w,"px"),a=(w,b,y,X=I)=>R("mobile",Ci({label:r(w),icon:_i(w),desktopKey:b,min:X.min,max:X.max,step:X.step,fallback:y})),c=e.top??I.min,u=e.bottom??I.min,p="sectionPaddingLeft",m="sectionPaddingRight",f=e.sideBounds??I,d=e.side??f.min,g=e.sidePhone??d,h=e.phone===!0,_=w=>h?R("desktop",w):w;return q({...o?{_gSpacing:O("Padding")}:{},[t]:_(s(c)),...h?{[k(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:_(U(r("Bottom"),i(ze,{}),I.min,I.max,I.step,u,"px")),...h?{[k(n)]:a("Bottom",n,u)}:{}},...e.sides?{[p]:_(U(r("Left"),i(Ye,{}),f.min,f.max,f.step,d,"px")),...h?{[k(p)]:a("Left",p,g,f)}:{},[m]:_(U(r("Right"),i(qe,{}),f.min,f.max,f.step,d,"px")),...h?{[k(m)]:a("Right",m,g,f)}:{}}:{}})}function la(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&pe(a)?e[s]:a])),o={};let r=!1;for(const[s,a]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=a}return r||Object.assign(o,n),o}const se="Width";function sa(e,t=yr,n=!0){const o=t.map(r=>({label:wr[r],value:r}));return q({...n?{_gWidth:O(se)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(x,{label:l(se),icon:i(Pn,{}),action:n?i(Mr,{inherited:s?.inherited??!1,onReset:()=>r(_r),label:se}):void 0,children:Ee({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:se})})}})}function aa(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(Ri,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Ei,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Lr("Unit",i(je,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(Ii,{props:a,draw:s,view:o})}};return q({_gHeight:O(z),...$("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Ti,{view:o,onClear:()=>r(void 0)}))),...$("sectionHeightValue",t),...$("sectionHeightUnit",n)})}function Ri({value:e,onChange:t,view:n,badge:o}){const r=A(),s=c=>["auto","fixed","screen"].includes(c),a=ae(n,r)?.mode??"auto";return i(x,{label:z,icon:Y(i(En,{})),action:o?o(t):void 0,children:Ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:z})})}function Ht(e,t){return e==="phone"&&ge(t)?Wo(t):Mo(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?ge(t):Go(t))?null:Ht(e,t)}const N=(e,t)=>e==="tablet"?W(t):k(t);function Oi(e,t,n,o){const r=ae(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[N(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[N(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[N(e,"sectionHeightValue")]:r.value}:{},[N(e,n)]:o}}function Gt(e,t,n){const o=G(),r=ae(e,A());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=Oi(e,c,t,a);return u===null?{[e==="desktop"?t:N(e,t)]:a}:Object.keys(u).length?u:null})}}function Ei({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Gt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Xo:$o;return i("div",{className:"sf-field",children:ee({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:z,onChange:s})})}function Ii({props:e,draw:t,view:n}){const{followed:o,write:r}=Gt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Ti({view:e,onClear:t}){const n=A(),o=ae(e,n)===null,r=e==="phone"&&ge(n),s=Ht(e,n),a=J(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(C,{words:S()?.panel,label:l(z),changed:o,detail:a,onReset:t})}function ca(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(Ai,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(ki,{value:o,onChange:r,view:n})});return{_gStick:O(be),...$("stickTop",e),...$("stickTopDistance",t)}}function ki({value:e,onChange:t,view:n}){const o=G(),r=A(),s=n==="desktop"||ke(n,r)?null:Mt(n,dt(r)),a=s&&o?c=>o.onChangeMany(u=>{const p=Fi(n,u,c);return p===null?{[N(n,"stickTopDistance")]:c}:Object.keys(p).length?p:null}):t;return i("div",{className:"sf-field",children:ee({min:oe.min,max:oe.max,step:oe.step,value:s?null:typeof e=="number"?e:oe.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})}function ke(e,t){return e==="tablet"?Uo(t):Ko(t)}function Mt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Fi(e,t,n){return e==="desktop"||ke(e,t)?null:n===void 0?{}:{[N(e,"stickTop")]:!0,[N(e,"stickTopDistance")]:n}}function Ai({value:e,onChange:t,labelId:n,view:o}){const r=A(),s=dt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,u=o==="desktop"?null:Mt(o,s),p=u?.on?`${u.distance}px`:l("Off");return i(x,{label:l(be),labelId:n,icon:Y(i(Fn,{})),action:P(L,{children:[o!=="desktop"?i(C,{words:S()?.panel,label:l(be),changed:ke(o,r),detail:J(m=>l(m),p,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(he,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Wt="e.g. about";function ua(){return{_gAnchor:O("Anchor"),anchor:H({control:"plainText",label:"Name",placeholder:Wt},{type:"custom",render:({value:e,onChange:t})=>i(dn,{value:e,onChange:t,nameBox:(n,o)=>i(v,{value:n,onChange:o,label:"Name",placeholder:Wt,hideable:!1,markup:!1})})})}}function da(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(x,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(so,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function pa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(x,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(lo,{id:c,value:Vt(typeof o=="string"?o:null),onChange:u=>r(u?jt(u):"")})})}}}function Li(e,t,n,o){return{type:"custom",...T({},{...Q,label:e}),render:({value:r,onChange:s,id:a,name:c})=>{const u=typeof r=="boolean"?r:t,p=`${a??c??e}-label`;return i(x,{label:l(e),labelId:p,icon:n,hint:o===void 0?void 0:l(o),action:i(he,{checked:u,onChange:s,ariaLabelledBy:p})})}}}function fa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(lt,{label:l("Background"),icon:i(kn,{}),id:r,value:Bn(e),onChange:t})}}}function ha(e,t){return{type:"custom",...T({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(x,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(oo,{id:a,checked:s,onChange:o})})}}}function ma(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(lt,{label:l(e),icon:n,value:o||t,onChange:r})}}function ga(){return{type:"custom",render:({value:e,onChange:t})=>i(Ni,{value:typeof e=="string"?e:"",onChange:t})}}function Ni({value:e,onChange:t}){const{hex:n,n:o}=Bi();return i(st,{label:l("Fill"),icon:i(Xe,{}),value:e,inherited:n,resetTo:D(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Pi(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return re(n);const r=Hn(e,t);if(r.length===0)return null;const s=re(Rt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=re(Rt(r[a].sectionAccent));if(c!==null)return c}return re(r[0].sectionAccent)}function Bi(){const{colors:e,n:t}=Kt();return{hex:e.background,n:t}}function Kt(){const e=St(B().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=ue(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Pi(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:er(e.themes[o]),n:o+1}}const Di=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function vi({label:e,value:t,onChange:n,points:o=Di}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(no,{label:l(e),value:t,points:r,onChange:n})}function ba(){return At()}const xa={top:i(wn,{}),right:i(yn,{}),bottom:i(Sn,{}),left:i(Cn,{})};function Sa(e,t,n,o,r,s,a){const c=f=>t.find(d=>d.value===f),u=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const d=t.find(h=>h.cell===f);if(!d)return u(`missing-${f}`);const g=s?.[f];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},m=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:d})=>{const g=t.some(h=>h.value===f)?f:n;return i(x,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:vi({label:e,value:g,onChange:d,points:m})})}}}function Ca(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Fo,{label:e,options:(s.options??t).map(a=>({...a,label:l(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function ya(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Lo,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:l(o)})}}function wa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const _a=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ra(e,t,n){const o=Object.keys(Be).map(r=>({label:Be[r],value:r,picture:n[r]}));return{type:"custom",...T({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Hi,{label:e,icon:t,options:o,onChange:r})}}function Hi({label:e,icon:t,options:n,onChange:o}){const r=G()?.values??{},s=zt(r),a=s==="frame"&&!!Pe(r.mediaVideo)&&!Pe(r.videoFrame);return i(x,{label:l(e),icon:Y(t),hint:a?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Ee({options:n,value:s,onChange:o,ariaLabel:e})})}function Oa(e,t,n,o={}){const r={type:"custom",[Ge]:!0,render:({value:s,onChange:a,name:c})=>i(ko,{value:s||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?R("each",r):r}const Ea={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Gi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ia({value:e,onChange:t,label:n}){const o=e||{},r=G(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,u=a?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",p=!!Er(Or()).geocode,m=Ne(),f=(d,g)=>t({...o,[d]:g??void 0});return P(L,{children:[i(x,{label:l(n),icon:i(Ve,{}),action:p?i(ne,{content:l("Find from the address (OpenStreetMap)"),children:i(rt,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(An,{})})}):void 0,children:p&&o.status?i(ne,{content:Gi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${un}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:a?l("Finding…"):c?l(mo):l(o.status)})}):null}),i(x,{label:l("Enter by hand"),labelId:m,icon:i(_n,{}),action:i(he,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&i(x,{label:l("Latitude, longitude"),icon:i(Ve,{}),children:P("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(it,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>f("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(it,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>f("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Mi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Wi(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Ta(e,t){return e===null?null:t>e?e:null}function Ki(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const ka={label:"Ticker items",icon:i(Tn,{})};function Fa(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...T({},{...It.textList,label:e}),render:({value:r,onChange:s})=>i(Ui,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Ui({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=j(null),[c,u]=V(null),p=f=>f.map(d=>({text:d?.text??""})),m=f=>{const d=Ki(n,f,c);d===null&&(a.current=null),u(d),r(p(f))};return i(zn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(at,{target:a,value:Mi(n,c),onChange:f=>r(Wi(n,c??-1,f)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,d,g)=>i("input",{type:"text",className:s&&c===d?"sf-list-marking":void 0,value:f?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:d+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,u(d)}})})}function Aa(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function La(e){return{_gCards:O("Cards"),coverIndex:Z("Cover image",i(In,{}),Eo,String(Io),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:qr("Image background",sr),cardImage:ji()}}function Na(){return{outline:Z("Card outline",i(Ln,{}),_o,Oo),indexBadge:Z("Card number",i(je,{}),wo,Ro),showBadge:Li("Product badge",!0,i(Ze,{noun:"tag"}))}}function Pa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ce.find(s=>s.id===r).label}),o=r=>T(go(Fe),n(r));return{_gShowOnCard:O("Show on a card"),[Fe]:T({type:"custom",render:()=>i($i,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Fe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Fe="showCardPrice",ce=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function $i({rest:e}){const t=A(),n=Jr(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ce.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ae,{parts:ce,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ce.map(({id:a})=>[a,void 0])))})}function Ba(e,t="display"){const n=k(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ae,{parts:e,changed:qn(o),shown:s=>Jn(o,s),onPress:(s,a)=>r(eo(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Xi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ae({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(x,{label:c,icon:i(fn,{}),changed:t,action:i(C,{words:S()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Yn,{label:c,items:e.map(u=>({id:u.id,label:l(u.label),shown:n(u.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function Xi({parts:e,desktopKey:t,value:n,onChange:o}){const r=A()[t];return i(Ae,{parts:e,changed:Qn(n),shown:s=>Zn(r,n,s),onPress:(s,a)=>o(to(n,s,a)),onReset:()=>o(Co),detail:l("the same as Desktop")})}function ji(){return Ft("Card image",{min:M,max:Ke,step:Zt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Da(){return Te({sidesKey:"cornerSides",step:Qt,useFollowed:()=>M,mark:i(Vi,{label:en}),hint:l("Rounds the picture. Left alone it stays square.")})}function Vi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function va(){return{type:"custom",render:({value:e,onChange:t})=>i(Ji,{value:typeof e=="string"?e:"",onChange:t})}}function zi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:rn(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const Yi={width:"3.5rem",height:"2.5rem"},qi=200;function Ji({value:e,onChange:t}){const[n,o]=V(null),[r,s]=V(4),a=j(null);Xt(()=>{const d=a.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>s(d.getBoundingClientRect().width>=qi?4:3);g();const h=new ResizeObserver(g);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in te?e:"",u=Ue(n,c),p=Ue(n,"").length,m=ln("no-symbol"),f=[{value:"",label:l("Not chosen"),icon:Ar(m,l("Not chosen"))},...u.map(d=>({value:d,label:l(te[d].label),icon:i(zi,{layout:te[d],width:40})}))];return i(x,{label:l("Layout"),icon:i(On,{}),value:c?l(te[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(tt,{label:l("Layout"),value:c,options:f,onChange:t,columns:r,cell:Yi,header:P("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Un,{options:[{id:"all",label:l("All")},...nn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:p,total:on.length})})]})})})})}export{Kr as BOUND_TO_POST,ks as BOUND_TO_POST_NOTE,vs as BUCKET_ICONS,Ea as CUSTOM_FIELD_MEDIA,Ia as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Ae as DisplayRow,xa as EDGE_ARROWS,ao as FOCAL_DEFAULT,Di as FOCAL_POINTS,de as FOLD_FIELD_MARKER,vi as FocalPicker,Xs as GroupLabel,Ur as HIGHLIGHT_HINT,v as HidableTextField,He as LINK_FIELD_MARKER,xs as Label,Ge as MEDIA_FIELD_MARKER,_a as MEDIA_TYPE_OPTIONS,Fs as NOT_BOUND_TO_POST,$s as PanelBand,jr as PanelNoteLine,bi as RowPropsContext,Me as SCAFFOLD_FIELD_MARKER,Wa as SCALAR_TEXT_CONTROLS,Pr as SiteGapDefaultReset,ee as Slider,zr as Swatches,Ma as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,ka as TICKER_ITEMS_ROW,Ui as TextListField,se as WIDTH_LABEL,Mr as WidthDefaultReset,Ki as aimAfterListChange,ua as anchorFields,D as backTo,js as backgroundField,Qs as boxBlockSpacingField,na as boxColumnsFields,ga as boxFillField,gi as boxPhoneRowField,fi as boxShareField,ea as boxSharePhoneField,ta as boxShareTabletField,Pi as boxThemeIndexOf,Ms as bucketHeader,qs as buttonWordsEntryField,di as cardCornersField,qr as cardImageBackgroundField,ji as cardImageField,La as cardMediaFields,Zs as cardShapeFields,Pa as cardShowFields,Na as cardStyleFields,ra as cellWidthFields,ha as checkbox,ma as colorInput,Cs as containerDirectionField,Br as containerGapField,Dr as containerGapPhoneField,Ss as containerGapRows,vr as containerGapTabletField,Gi as coordsResultTip,Ps as copyText,Lt as cornerSidesField,Te as cornersRowField,pa as date,da as dateTime,Ws as designGroupHeader,Ba as displayFields,Sa as edgePad,Ta as focusAfterRemove,ba as focusKeptField,Ks as foldMarker,pe as foldMetaOf,Vr as foldTitleOf,Oi as followedHeightPatch,Fi as followedStickPatch,va as galleryLayoutField,aa as heightFields,ae as heightFollowedBy,ys as heroGroupPlacementPoints,ve as hidableText,Xr as hintIsWhileTyping,Da as imageCornersField,Ts as inOwnBox,Gs as isBucketHeader,At as keptBy,Bs as linkField,Ra as loadingShowsField,Ca as multiSelect,fa as pageBackgroundField,Hs as panelNote,Ci as phoneOverrideField,Ns as plainText,Ds as plainTextarea,Ft as pxField,Us as quietMarker,De as readHidable,Mi as rowText,ya as searchSelect,Ys as sectionBorderField,ti as sectionCornersField,zs as sectionShapeFields,Vs as sectionThemeFields,Wi as setRowText,oa as sizeField,wa as sourceField,ia as spacingFields,ca as stickFields,la as swapPadding,Js as templateField,As as text,Yt as textFieldIdentifier,Rs as textFieldOffPage,Es as textFieldPanelOnly,Fa as textList,Aa as textListRowField,Ls as textarea,Li as toggle,Oa as upload,Jr as useSelectedPatch,A as useSelectedProps,F as useSelectedSibling,Nr as useSiteGapDetail,sa as widthField,Is as withIdentifier,_s as withOffPage,Os as withPanelOnly,ws as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{textControlKind as
|
|
1
|
+
import{FIELD_DESCRIPTION_MARKER as A}from"efficient-easel/screen/lib/host";import{textControlKind as v}from"../../../render/lib/document/part-text.js";const E=new Set(["text","textarea"]),j=r=>E.has(v(r)??""),h=r=>`Zq${r.replace(/[^A-Za-z0-9]/g,"")}Zq`,x=(r,i)=>i==="bare"?h(r):{text:h(r),hidden:i==="shut"};function b(r,i){const t={...r.defaultProps??{},id:"t-1",editor:{isEditing:!1}},o=[];for(const[e,n]of Object.entries(r.fields??{}))if(n){if(n.type==="slot")t[e]=()=>null;else if(j(n))t[e]=x(e,i),o.push(h(e));else if(n.type==="array"&&n.arrayFields){const l=Object.entries(n.arrayFields).filter(([,c])=>j(c));if(!l.length)continue;const s=Array.isArray(t[e])&&t[e].length?t[e]:[{},{}];t[e]=s.map((c,a)=>{const p={...c??{}};for(const[d]of l)p[d]=x(`${e}${a}${d}`,i),o.push(h(`${e}${a}${d}`));return p})}}return{props:t,needles:o}}function O(r,i){const t=[{label:"",props:{}}];for(const[o,e]of Object.entries(r.fields??{})){const l=e?.[A]?.options??e?.options;if(!(!Array.isArray(l)||l.length>16))for(const s of l)s&&typeof s.value!="object"&&t.push({label:` (${o}=${String(s.value)})`,row:`${i}.${o}`,props:{[o]:s.value}})}return t}function I(r,i,t){const o=[],e=new Set;let n=0,l=0;for(const s of i){const c=r[s];if(!c)continue;const a=b(c,"open");if(n+=a.needles.length,!a.needles.length)continue;const p=b(c,"shut"),d=b(c,"bare");for(const f of O(c,s)){l+=1,f.row&&e.add(f.row);const u=`${s}${f.label}`,w=t(s,{...a.props,...f.props});w.error?o.push(`${u}: a typed row ({ text, hidden: false }) throws — ${w.error}`):w.html?.includes("[object Object]")&&o.push(`${u}: a typed row reaches the page as [object Object]`);const $=t(s,{...p.props,...f.props});if($.error)o.push(`${u}: a hidden row ({ text, hidden: true }) throws — ${$.error}`);else{const g=p.needles.filter(m=>$.html?.includes(m));g.length&&o.push(`${u}: a hidden row still draws its words (${g.join(", ")})`)}const y=t(s,{...d.props,...f.props});y.error&&o.push(`${u}: a row stored as a bare string throws — ${y.error}`)}}return{list:o,rows:n,drawings:l,rowsDrawn:e}}export{I as hidableRowProblems,j as isHideableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as y,Fragment as $,jsxs as k}from"react/jsx-runtime";import{useEffect as x,useMemo as w,useRef as E}from"react";import{EaselCanvas as D,repeatCopyAt as _}from"efficient-easel/easel";import
|
|
1
|
+
"use client";import{jsx as y,Fragment as $,jsxs as k}from"react/jsx-runtime";import{useEffect as x,useMemo as w,useRef as E}from"react";import{EaselCanvas as D,repeatCopyAt as _}from"efficient-easel/easel";import N from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as W}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as b}from"../../components/SiteRestoreNotice.js";import{decodePartId as F,REPEAT_ATTRIBUTE as g,REPEAT_INDEX_ATTRIBUTE as T}from"efficient-easel/draw";import{usePreviewParts as j}from"efficient-easel/draw/client";import{cssString as v,partElement as A,partTypingTarget as B,setCanvasTypingPart as S}from"./canvas-typing.js";import{usePartTypingDeps as M}from"../../components/usePartTypingDeps.js";import{copyRowTarget as K,copyRowValue as H,writeCopyText as L}from"./card-copy-rows.js";import{partColourName as O,partThemeColors as U,readInks as V}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as f}from"../../../render/lib/document/text-parts.js";import{useBlockMetadata as q}from"../editor-block-metadata.js";import{usePreviewHeader as X,useSiteContentWidth as z}from"../../../render/components/PreviewHeaderContext.js";import{setEditorSiteContentWidth as R}from"../../../format/lib/document/editor-site-widths.js";import{siteWidthsMetadata as G}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as J}from"../editor-canvas-styles.js";function gt(o){const{mirrorHostStyles:s}=J(),l=q(),{sectionBackgroundWidth:i,themeFromDocument:u}=X(),t=z(),r=w(()=>({...o.metadata??l??{},...G(u?null:i,t)}),[o.metadata,l,i,t,u]);x(()=>(R(t),()=>R(null)),[t]);const e=E(null),c=Q(e),{onDocument:m}=o,n=a=>{e.current=a,m?.(a)};return k($,{children:[y(b,{}),y(W,{}),y(D,{...o,onDocument:n,typing:c,metadata:r,height:"fill",mirrorStyles:s,frameWrapper:N})]})}function Q(o){const s=M(),l=j(),i=E({parts:l});return i.current={parts:l},w(()=>{const u=(t,r)=>{let e=B(t,s),c,m=null;const n=r??(e?null:A(null,o.current,t)),a=!e&&n?_(n):null,p=a?F(t):null;if(a&&n&&p?.propKey){e=K({...a,nodeId:p.nodeId,key:p.propKey},s),c=p.propKey;const P=n.closest(`[${g}][${T}]`),I=`[${g}="${v(P?.getAttribute(g)??"")}"][${T}="${v(P?.getAttribute(T)??"")}"]`;m=()=>(n.ownerDocument??o.current)?.querySelector(I)??null}if(!e)return null;let d=n;const C=()=>(d=A(d,m?m():d?.ownerDocument??o.current,t),d),h=C();return h?{element:C,value:e.value,rules:e.rules,multiline:e.multiline,skip:e.skip,write:e.write,key:c,toolbar:{offered:e.offered,colors:e.offered.length>0?U(V(h)):void 0,colorNameOf:O}}:null};return{at:t=>{const r=t.closest(`[${f}]`),e=r?.getAttribute(f);return r&&e?u(e,r):null},atSelection:()=>{const t=i.current.parts.selectedPartId;return t?u(t,null):null},onCopyText:t=>L(t,s),copyValue:t=>H(t,s),onChange:t=>{if(!t.typing){S(null);return}const r=t.element.closest(`[${f}]`)?.getAttribute(f)??null;S(r),r&&i.current.parts.selectedPartId!==r&&i.current.parts.select(r)}}},[s,o])}export{gt as SiteCanvas};
|
|
@@ -63,6 +63,7 @@ export declare const PART_PANEL_ROWS: {
|
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
export type PartPanelRow = keyof typeof PART_PANEL_ROWS;
|
|
66
|
+
export declare function partRowHasTabletValue(row: PartPanelRow): boolean;
|
|
66
67
|
export declare const TICKER_PANEL_ROWS: {
|
|
67
68
|
showTicker: {
|
|
68
69
|
type: "custom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as n,createElement as o}from"react";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";const e=()=>({type:"custom",render:()=>o(n)}),p=["fontSize","lineHeight","letterSpacing","paragraphSpacing","padding"],g={words:e(),sourceNote:e(),style:e(),font:e(),italic:e(),fontSize:t("each",e()),lineHeight:e(),letterSpacing:e(),paragraphSpacing:e(),padding:e(),align:t("each",e()),letterCase:e(),fixedSizeHint:t("each",e()),regionNote:e(),regionStyle:e()},r=["fontSize"];function l(i){return r.includes(i)}const s={showTicker:e(),items:e()};export{p as PART_CELL_KEYS,g as PART_PANEL_ROWS,s as TICKER_PANEL_ROWS,l as partRowHasTabletValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as s,SECTION_THEME_FOLLOW_LABEL as t}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as p,heightFields as l,sectionShapeFields as F,sectionThemeFields as a,spacingFields as n,stickFields as S,widthField as c}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as E}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as f,sidesPaddingFields as L}from"../box-fields.js";import{assignSectionGroups as _}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{dropEmptyHeadings as A}from"../panel-drop-empty-headings.js";import{rowsShownForNode as P}from"../show-when-resolve.js";const N={spacingFields:n,sidesPaddingFields:L,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:p,widthField:c,boxGutterFields:O,heightFields:l,anchorFields:m,stickFields:S,sectionThemeFields:a,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:f,...i?{phone:E}:{}}),assignSectionGroups:_,dropEmptyHeadings:A,rowsShownForNode:P,SECTION_THEME_FOLLOW_LABEL:t,BLOCK_THEME_FOLLOW_LABEL:s,PartAnchors:r};export{N as PASS_INSPECTOR};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import type { TickerSeparator } from "../../../format/lib/sections/ticker-style.js";
|
|
3
3
|
export declare function separatorField(icon: ReactElement, fallback: TickerSeparator): {
|
|
4
|
-
|
|
4
|
+
options: {
|
|
5
|
+
showWhen?: import("efficient-shell/ui").ShowWhenRule | undefined;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
value: TickerSeparator;
|
|
8
|
+
}[];
|
|
9
|
+
render: (props: {
|
|
5
10
|
value?: unknown;
|
|
6
11
|
onChange: (v: TickerSeparator) => void;
|
|
7
12
|
field?: object;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
follows?: unknown;
|
|
15
|
+
followsView?: "desktop" | "tablet";
|
|
8
16
|
}) => import("react").FunctionComponentElement<import("efficient-easel/panel").SettingsFieldProps>;
|
|
9
17
|
type: "custom";
|
|
10
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_SEPARATOR_POINTS as e,boxSeparatorOf as a}from"../../../format/lib/content/box-separator.js";import{iconPickerRow as t}from"./box-fields.js";import{shellGlyphOf as
|
|
1
|
+
import{BOX_SEPARATOR_POINTS as e,boxSeparatorOf as a}from"../../../format/lib/content/box-separator.js";import{iconPickerRow as t}from"./box-fields.js";import{shellGlyphOf as s}from"./shell-glyph.js";const l={none:"no-symbol",dot:"dot",cross:"close",slash:"separator-slash",triangle:"separator-triangle"},n=e.map(o=>({value:o.value,picture:s(l[o.value])}));function m(o,r){return t("Separator",o,n,r,{resolve:a})}export{m as separatorField};
|