efficient-web-builder 64.0.0 → 66.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 +94 -0
- package/dist/editor/components/AnchorField.js +1 -1
- package/dist/editor/components/CardShadowField.js +1 -1
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/SectionEditor.js +1 -1
- package/dist/editor/components/WebsitePreviewButton.js +1 -1
- package/dist/editor/components/storefront-editor.css +16 -24
- package/dist/editor/components/usePreviewHref.js +1 -1
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/scroll-fields.js +1 -1
- package/dist/editor/lib/animation/view-rows.d.ts +20 -0
- package/dist/editor/lib/animation/view-rows.js +1 -0
- package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.d.ts +0 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/box-fields.d.ts +2 -1
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/card-row-fields.d.ts +3 -0
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +12 -10
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.d.ts +0 -3
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -2
- package/dist/editor/lib/document/part-motion-canvas.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/sections/section-dry-run.d.ts +1 -20
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/entrance-keys.d.ts +8 -0
- package/dist/format/lib/animation/entrance-keys.js +1 -0
- package/dist/format/lib/animation/scroll.d.ts +5 -6
- package/dist/format/lib/animation/scroll.js +1 -1
- package/dist/format/lib/animation/views.d.ts +6 -0
- package/dist/format/lib/animation/views.js +1 -0
- package/dist/format/lib/content/block-sources.d.ts +3 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +1 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-link.d.ts +11 -0
- package/dist/format/lib/content/box-link.js +8 -8
- package/dist/format/lib/content/box-phone-place.d.ts +0 -2
- package/dist/format/lib/content/box-phone-place.js +1 -1
- package/dist/format/lib/content/box-side-space.js +1 -1
- package/dist/format/lib/content/card-image-shape.d.ts +5 -1
- package/dist/format/lib/content/card-image-shape.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +1 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/contact.d.ts +0 -1
- package/dist/format/lib/content/contact.js +2 -2
- package/dist/format/lib/content/css-length.d.ts +1 -0
- package/dist/format/lib/content/css-length.js +1 -0
- package/dist/format/lib/content/page-width.d.ts +17 -1
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +28 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/document/blocks/general/Banner/meta.d.ts +5 -0
- package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +5 -0
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/SectionHeader/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.js +2 -2
- package/dist/format/lib/document/media-drop.js +1 -1
- package/dist/format/lib/document/one-h1.d.ts +2 -0
- package/dist/format/lib/document/one-h1.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +2 -0
- package/dist/format/lib/document/renamed-props.d.ts +1 -0
- package/dist/format/lib/document/renamed-props.js +1 -1
- package/dist/format/lib/document/section-catalog.js +10 -2
- package/dist/format/lib/document/section-descriptions.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +16 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/fit-words.js +4 -1
- package/dist/format/lib/links/page-link-rules.d.ts +0 -1
- package/dist/format/lib/links/page-link-rules.js +1 -1
- package/dist/format/lib/markup.d.ts +1 -0
- package/dist/format/lib/markup.js +2 -2
- 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/sections/timeline-year-shape.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +1 -1
- package/dist/format/lib/source-rules/motion-vars-from-the-shell.d.ts +6 -0
- package/dist/format/lib/source-rules/motion-vars-from-the-shell.js +4 -0
- package/dist/format/lib/source-rules/one-length-control.d.ts +18 -0
- package/dist/format/lib/source-rules/one-length-control.js +16 -0
- package/dist/format/lib/source-rules/support/label-extraction.js +3 -3
- package/dist/format/lib/theme.d.ts +0 -1
- package/dist/format/lib/theme.js +3 -3
- package/dist/format/lib/web-runtime.d.ts +2 -0
- package/dist/format/lib/web-runtime.js +1 -1
- package/dist/render/components/BlockFrame.d.ts +3 -3
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +7 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/CategoryBar.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/DealerFinder.d.ts +4 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/DocMasthead.js +1 -1
- package/dist/render/components/DocTabs.js +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.d.ts +5 -3
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/Heading.d.ts +0 -1
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +2 -5
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/Logos.d.ts +1 -2
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/PictureZoom.js +1 -1
- package/dist/render/components/PostCard.js +1 -1
- package/dist/render/components/ProcessSteps.d.ts +2 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +8 -16
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SectionHeader.js +1 -1
- package/dist/render/components/SideListLayout.d.ts +4 -1
- package/dist/render/components/SideListLayout.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.d.ts +2 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineRail.d.ts +11 -3
- package/dist/render/components/TimelineRail.js +1 -1
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/components/goldPhrases.js +3 -3
- package/dist/render/lib/animation/entrance.d.ts +6 -14
- package/dist/render/lib/animation/entrance.js +1 -1
- package/dist/render/lib/animation/part-motion.js +2 -2
- package/dist/render/lib/content/block-size.d.ts +5 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/box-stack-line.d.ts +1 -1
- package/dist/render/lib/content/box-stack-line.js +1 -1
- package/dist/render/lib/content/button-look.d.ts +2 -0
- package/dist/render/lib/content/button-look.js +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/content/section-padding.d.ts +5 -2
- package/dist/render/lib/content/section-padding.js +1 -1
- package/dist/render/lib/dealer-source.d.ts +6 -2
- package/dist/render/lib/dealer-source.js +1 -1
- package/dist/render/lib/document/blocks/general/Banner/render.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
- 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-editorial.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.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-tabbar.d.ts +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.js +1 -0
- 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.d.ts +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/card-press-titles.d.ts +10 -0
- package/dist/render/lib/document/card-press-titles.js +1 -0
- package/dist/render/lib/document/part-styles.d.ts +1 -0
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/published-passes.js +1 -1
- package/dist/render/lib/document/slot-specs.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +0 -15
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/site-runtime.d.ts +4 -1
- package/dist/render/lib/site-runtime.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +5 -5
- package/dist/editor/components/TemplateFieldRow.d.ts +0 -11
- package/dist/editor/components/TemplateFieldRow.js +0 -1
- package/dist/editor/lib/document/panel-heading-scope.d.ts +0 -8
- package/dist/editor/lib/document/panel-heading-scope.js +0 -1
- package/dist/editor/lib/document/template-field.d.ts +0 -13
- package/dist/editor/lib/document/template-field.js +0 -1
- package/dist/format/lib/canvas-accent.d.ts +0 -1
- package/dist/format/lib/canvas-accent.js +0 -1
- package/dist/format/lib/source-rules/padding-units-declared.d.ts +0 -2
- package/dist/format/lib/source-rules/padding-units-declared.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as A,Fragment as N}from"react/jsx-runtime";import{cloneElement as Ue,createContext as en,useContext as Ke,useEffect as tn,useId as $e,useRef as Y,useState as q}from"react";import{useEasel as te,useSelectedHost as W}from"efficient-easel/easel";import{PIN_LENGTH as ne,toDateKey as nn,fromDateKey as on}from"efficient-shell/format";import{say as s,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as rn}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as Xe,firstFrameHint as ln,loadingShowsOf as sn,loadingStillHint as an}from"../../../format/lib/hero-video.js";import{pageFramesFor as cn,usePageVideoFrames as dn}from"../page-video-frames.js";import{ScreenDocumentContext as un}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as je,hidableText as Ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as he,LINK_FIELD_MARKER as ze,MEDIA_FIELD_MARKER as Ye,SCAFFOLD_FIELD_MARKER as qe,TEXT_FIELD_MARKER as I,foldMetaOf as me,textFieldIdentifier as pn}from"efficient-easel/draw";import fn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Je}from"../../../render/lib/document/show-when.js";import hn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as mn,CORNER_RADIUS_MAX as Ze,CORNER_RADIUS_MIN as U}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as gn,IMAGE_CORNERS_LABEL as bn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as wn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Sn,GALLERY_LAYOUTS as oe,GALLERY_LAYOUT_KEYS as xn,galleryChoices as Qe,galleryLayoutRatio as yn,galleryPictureCells as Cn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as _n}from"./shell-glyph.js";import{anchorSiblingsOf as Tn,placementPoints as Rn}from"../../../format/lib/hero-group-placement.js";import In from"../../components/AnchorField.js";import On from"../../components/SourceStatus.js";import{AdjustIcon as En,EyeIcon as kn,AnimationIcon as Nn,BackgroundIcon as et,BorderAllIcon as Fn,BlockSectionIcon as Ln,ColumnWidthsIcon as ge,ColumnsIcon as tt,CornerIcon as nt,DirectionDownIcon as Pn,DirectionLeftIcon as An,DirectionRightIcon as vn,DirectionUpIcon as Bn,EditIcon as Dn,GapIcon as Hn,GridIcon as Gn,GroundIcon as be,HashIcon as ot,HeightIcon as rt,ImageIcon as Mn,ListIcon as Wn,LocationIcon as it,PaddingBottomIcon as lt,PaddingLeftIcon as st,PaddingRightIcon as at,PaddingTopIcon as ct,PageIcon as Un,StickyIcon as Kn,SearchIcon as $n,SquareIcon as Xn,TypeIcon as jn,WidthIcon as Vn}from"efficient-easel/icons";import{FieldGlyph as dt}from"../../components/FieldGlyph.js";import{resolvePageBackground as zn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Yn,boxFillSlot as we}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as ut,CORNER_SIDE_POINTS as qn,hasOwnSectionCorners as Jn,normalizeCornerSides as pt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Zn,enclosingSection as Qn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as eo,SettingsField as w,SettingsGroup as to,SettingsGroupSub as no,SettingsSegmented as oo,SettingsBorder as ro,SettingsSidesEach as io,SettingsSwitch as Se,borderSides as lo,borderStartEach as so}from"efficient-easel/panel";import{ListField as ao}from"efficient-easel/fields";import{DisplayChips as co}from"efficient-shell/ui";import{desktopDisplayChanged as uo,partShownOnDesktop as po,partShownOnPhone as fo,phoneDisplayChanged as ho,withDesktopPart as mo,withPhonePart as go}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as bo,Checkbox as wo,ColorSwatch as So,CornersInput as xo,DatePicker as yo,DateTimePicker as Co,FOCAL_DEFAULT as _o,IconPicker as ft,COLUMN_COUNT_MAX as ht,COLUMN_SHARE_MIN as To,COLUMN_SHARES_EQUAL as Ro,resolveColumnShares as mt,WidthsBar as Io,useShellStrings as Oo,IconButton as gt,InputNumber as bt,Slider as Eo,Tooltip as xe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as ko}from"./geocode-resolve.js";import{ColourRow as re,InheritedColourRow as wt}from"./ColourControl.js";import{fillThemeColors as No,slotFill as ie}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ye}from"../../../format/lib/document/part-inks.js";import{keptByRow as Fo}from"efficient-easel/screen/lib/document/style-fields";import St from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Lo,NoControlMark as Po,noControlField as xt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Ao}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as vo,PANEL_ONLY_FIELD as Bo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Do,resolvePhoneValue as Ce}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as K}from"efficient-easel/draw";import{SuppressibleText as Ho}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Go,CARD_OUTLINE_OPTIONS as Mo,DEFAULT_CARD_INDEX_FORMAT as Wo,DEFAULT_CARD_OUTLINE as Uo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Ko,DEFAULT_COVER_INDEX as $o}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Xo}from"efficient-easel/draw";import jo from"../../components/MediaUploadField.js";import Vo from"../../components/MultiSelectField.js";import zo from"../../components/SectionThemePicker.js";import Yo from"../../components/SearchSelectField.js";import qo from"../../components/StorefrontLinkField.js";import{UiIcon as yt}from"efficient-easel/draw/client";import{SECTION_PADDING as O}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Jo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Zo}from"efficient-easel/draw/client";import{encodePartId as Qo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as er,useEaselStrings as tr}from"efficient-easel/strings";import{hasPhoneHeight as nr,hasTabletHeight as _e,resolveSectionMinHeight as or,resolveTabletHeight as rr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as ir,SECTION_PIN_GROUP as lr,SECTION_PIN_LABEL as Ct,SECTION_PIN_SCREENS_KEY as Te,SECTION_PIN_SCREENS_LABEL as _t,SECTION_STICK_DISTANCE as le,hasPhoneStick as sr,hasTabletStick as ar,resolveSectionStick as Re}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as cr,SECTION_MIN_HEIGHT_GROUP_LABEL as J,SECTION_SCREEN_PCT as dr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as ur,resolveContainerDirection as Tt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as pr,BOX_BLOCK_SPACING_POINTS as Rt,BOX_PHONE_ROW_LABEL as It,BOX_COLUMNS_MAX as fr,BOX_COLUMNS_MIN as Ot,BOX_PHONE_ROW_MAX as hr,BOX_PHONE_ROW_MIN as Ie,BOX_SHARE_CHOICES as Et,BOX_SHARE_LABEL as $,boxShareChoiceOf as kt,boxShareWidthsOf as Oe,BOX_SHARE_PHONE_DEFAULT as mr,BOX_SHARE_PHONE_POINTS as gr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as br,borderBySide as Nt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as wr,normalizeTheme as Ft,normalizeThemeColors as Sr,sectionBandTone as xr,surfaceTwoTone as yr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Lt,CONTAINER_GAP_BUILT_IN as Cr,CONTAINER_GAP_PHONE as Ee,GAP_FIELD_CONTAINER as ke,followsSitePhoneGap as _r,hasOwnContainerGap as Tr,hasOwnPhoneGap as Ne,resolveContainerGap as Pt,resolvePhoneContainerGap as At}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Rr,CARD_IMAGE_BG_OFF as Ir,CARD_IMAGE_BG_SWATCH_NAMES as Or,CARD_IMAGE_BG_SWATCHES as Er,isCardImageBackgroundInheriting as kr,cardImageBackgroundChoice as Nr,THEME_CARD_IMAGE_BG as Fr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Lr,SECTION_BG_NO_FILL as Pr,sectionBackgroundChoice as Ar,THEME_SECTION_BG as Fe,isSectionBackgroundEmpty as vr,sectionBackgroundHex as vt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Br,nestedAccentValue as Bt,resolveSectionAccent as se}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Dr,TYPE_SIZE_INHERIT as Hr,isTypeSizeInheriting as Gr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Mr,WIDTH_CHOICE_LABEL as Wr,WIDTH_INHERIT as Ur}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Kr}from"./panel-heading-scope.js";import{useEaselSession as $r}from"efficient-easel/screen/lib/session-context";import{backendOf as Xr}from"../website-session.js";import{BOX_GAP as jr,describedAs as E,group as R,iconOf as X,sharedStyleKinds as Z}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Le,onDesktopWords as B,phoneTwinFields as ae}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Vr,gapField as Pe,iconPickerRow as zr,pickerCellIcon as Yr,pickerNoneIcon as qr,Segmented as Ae,segmented as Jr,select as Q,slider as j}from"./box-fields.js";function Vs({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function D(e,t){return s("{value} from {from}",{value:e,from:t})}function Zr(){const{blockGap:e}=v();return e===null?s("this container's own spacing"):D(`${e}px`,s("Styles"))}function Qr({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:Zr(),onReset:t})}function ei(e){return Pe({...jr,builtIn:Cr[e],resolve:(t,n)=>Pt(e,t,n?.siteGap),action:(t,n)=>i(Qr,{inherited:!Tr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ke]:e}})}function ti(e){return Je(T("mobile",{[ke]:e,type:"custom",render:t=>i(ri,{container:e,...t})}),Dt)}function ni(e){return Je(T("tablet",{[ke]:e,type:"custom",render:t=>i(oi,{container:e,...t})}),Dt)}const Dt={not:{field:"gap",in:Array.from({length:-Lt.min},(e,t)=>Lt.min+t)}};function zs(e){return{gap:T("desktop",ei(e)),[K("gap")]:ni(e),[F("gap")]:ti(e)}}function oi({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(Ee.min,Pt(e,n,o));return Pe({...Ee,builtIn:r,resolve:a=>Ne(a)?a:r,action:(a,c)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ne(a),detail:B(d=>s(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function ri({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=At(e,void 0,n,o,r);return Pe({...Ee,builtIn:l,resolve:c=>At(e,c,n,o,r),action:(c,d)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ne(c),detail:D(`${l}px`,_r(e,n,r)?s("Styles"):s("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Ys(e){return Vr({offered:ur(e),fallback:Tt(e,void 0),resolve:t=>Tt(e,t)})}function qs(e,t){return Rn(t?Tn(e,t):[],t)}function ii({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:D(s("Full"),s("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:d,hidden:p}=je(e),h=Y(null),f=Y(null),u=_=>t(a?{text:_,hidden:p}:_),g=()=>t({text:d,hidden:!p}),m=a&&p,S=$e(),x=r?di(r)?i("span",{className:"sf-hint-while-typing",children:s(r)}):s(r):void 0,b=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(w,{label:s(n),icon:i(jn,{}),htmlFor:S,className:m?"is-hidden":void 0,hint:x,action:a?i(xe,{content:b,children:i(gt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(yt,{name:"eye-off",size:14}):i(yt,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(St,{target:l?f:h,value:d,onChange:u}),l?i("textarea",{id:S,ref:f,value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)}):i("input",{id:S,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)})]})})}function Js(e,t){return{...e,[qe]:t}}function Zs(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Qs(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}function ea(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Bo]:!0}}function ta(e){return vo(e)}function na(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as mc,SCALAR_TEXT_CONTROLS as gc}from"efficient-easel/draw";function oa(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Lo]:o,...r}=e;return{...r,[Ao]:!0,render:t}}const li=new Set(Xo),ee={type:"radio",options:[{value:!0},{value:!1}]},Ht={text:{type:"object",objectFields:{text:{type:"text"},hidden:ee}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ee}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=E({...t,[I]:e},{...Ht[e.control],label:e.label});if(!li.has(e.control))return n;const o=t.render;return{...xt(n,"authored-copy"),render:r=>i(Ho,{name:r.name,children:o(r)})}},ra="Everything else on this block comes from the linked post. Unlink it to edit by hand.",si={field:"source.slug",set:!0},ia={not:si},ai="Select a word, then press the highlighter.",ci=new Set([ai]),di=e=>ci.has(e);function la(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function sa(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function aa(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ca(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function da(e){return{type:"custom",[ze]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(qo,{value:Ve(t),onChange:n,label:e})}}function ua(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const pa={Design:En,Animation:Nn};function fa(e){return{type:"custom",render:()=>i(ui,{text:e})}}function ui({text:e}){return i("p",{className:"sf-note",children:s(e)})}function ha(e){return me(e)!==null&&e?.tabs!==void 0}const Gt=new Map;function ma(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Gt.get(n)??{type:"custom",tabs:t,[he]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(N,{})};return Gt.set(n,o),o}const Mt=new Map;function ga(e){const t=Mt.get(e)??{type:"custom",[he]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(N,{})};return Mt.set(e,t),t}function pi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ba(e,t){return pi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(N,{})}}function wa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(N,{})}}function Sa({title:e,children:t}){const[n,o]=q(()=>!ve.has(e));return i(to,{title:e,open:n,onToggle:r=>{o(r),r?ve.delete(e):ve.add(e)},children:t})}const ve=new Set;function xa({label:e}){return i(no,{title:s(e),level:Kr(2)})}function fi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?s(o[c]):c;return i(xe,{content:d,children:i(So,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function ya(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(hi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function hi({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:a,n:c}=Ge(),d={background:a.background,surface:a.surface,surface2:yr(a),band:xr(a)},p=n?Fe:t,h=vr(l,t,p),f=vt(void 0,p,d),u=n?Lr:void 0,g=p===Fe?s("the theme's section background"):s("Theme {n} background",{n:c}),m=mi(l,t,a,c,d,r),S=D(f.toUpperCase(),g),x=ye(l),b=x?ie(x,a,c):null;return b?i(re,{label:s(e),icon:i(et,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:S,choices:m}):i(wt,{label:s(e),icon:i(et,{}),value:h?"":vt(l,t,d),inherited:f,resetTo:S,onChange:r,onReset:()=>r(u),choices:m})}function mi(e,t,n,o,r,l){const a=Ar(e,t);return[{label:s("No fill"),color:"",selected:a==="none",onPick:()=>l(Pr)},{label:`${s("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>l(Fe)},...He(ye(e)??"",n,o,l)]}function gi(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=kr(r,t);return i(w,{label:s(e),icon:i(be,{}),changed:!l,action:i(C,{words:y()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Rr)}),children:fi({swatches:Er,current:l?Fr:Nr(r,t),onPick:o,names:Or})})}}}function Ca(e=n=>n,t){return Z({_gSectionTheme:R(Br),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(zo,{value:e(n),onChange:o,followLabel:t})}})}function V({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:d,disabled:p=!1,placeholder:h,placeholderWord:f,onClear:u}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Eo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...f?{emptyLabel:s(f)}:{},suffix:l||void 0,showInput:a,label:d===void 0?void 0:s(d),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m===null?u?.():m!==o&&r(m)}})})}function Wt(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:d,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:u})=>{const g=typeof f=="number"?f:null,m=g===null;return i(w,{label:s(e),icon:p?X(p):void 0,value:m?d||l===void 0?void 0:s(l):`${g}${h}`,changed:!m,action:d?Ue(d,{changed:!m,onReset:()=>u(null)}):i(C,{words:y()?.panel,label:s(e),changed:!m,onReset:()=>u(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):V({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const ce="Corners";function Be(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(w,{label:s(ce),icon:i(nt,{}),changed:r,action:Ue(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(wi,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=W();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Ut(){return xt({type:"custom",render:()=>i(Po,{})},"always")}function bi(){const e=W();return t=>e?.onChangeMany(t)}function wi({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=L(e.sidesKey),a=pt(r)??[...ut];return i(xo,{label:s(ce),value:a,corners:qn,onChange:c=>{const d=pt(c)??[];l(d.length===ut.length?null:d)},radius:t,onRadiusChange:n,radiusMin:U,radiusMax:Ze,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Kt(){return Ut()}function Si({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:s("not set");return i(C,{words:y()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):D(r,s("Styles")),onReset:n})}function xi(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:U}function yi(){return Be({sidesKey:"sectionCornerSides",useFollowed:xi,mark:i(Si,{label:ce}),hint:Ci})}const Ci="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function _a(){return Z({_gShape:R("Shape"),sectionCorners:yi(),sectionCornerSides:Kt(),...M("sectionBorder",$t)})}const _i=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function Ti(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Ri(){let e;try{const t=Ft(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||wr.line}function Ii({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,p]=q(()=>r?so(c,a):!1),h=_i(),f=u=>Ti(r&&l?u:{width:u.width,color:u.color,...l?{style:u.style}:{}});return i(w,{label:s("Border"),icon:i(Fn,{}),action:r?i(io,{each:d,label:s("Each side"),onChange:p}):void 0,children:i(ro,{label:s("Border"),value:c,each:d,onChange:u=>t(f(u)),placeholder:n,presets:o,words:h,styles:l,max:br})})}function Oi({value:e,onChange:t,view:n}){const[o]=L("sectionBorder"),[r]=L(K("sectionBorder")),l=Ri(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Nt(a(o)),...Nt(a(r))}:n==="tablet"?a(o):{};return i(Ii,{value:e,onChange:t,placeholder:{sides:lo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}function Ta(e){return T(e,$t(e==="mobile"?"phone":e))}function $t(e){return{type:"custom",render:({value:t,onChange:n})=>i(Oi,{value:t,onChange:n,view:e})}}function M(e,t){const n=(o,r)=>ae(e,t(o),Le)[r];return{[e]:n("desktop",e),[K(e)]:n("tablet",K(e)),[F(e)]:n("phone",F(e))}}function Ra(e){return{type:"custom",render:()=>i(Ei,{partKey:e})}}function Ei({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=v(),r=tr();let l=null;try{l=Zo().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(eo,{name:s("Text"),preview:Jo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??er.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Qo(t,e))}})}function Xt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=te(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?Qn(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Jn(r)?r:n}function ki({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Xt(U);return i(C,{words:y()?.panel,label:s(e),changed:t,detail:D(`${o}px`,s("the section")),onReset:n})}function Ni(){return i(N,{children:s("Follows the section's Corners until you set a number here.")})}function Fi(){return Be({sidesKey:"cardCornerSides",useFollowed:()=>Xt(U),mark:i(ki,{label:ce}),hint:i(Ni,{})})}function Li(){return{type:"custom",render:()=>i(fn,{})}}function Ia(e){return{...e,render:t=>i(hn,{render:e.render,props:t})}}function Oa(){return{_gShape:R("Shape"),cardCorners:Fi(),cardCornerSides:Kt(),cardCornersApplyAll:Li()}}function Pi(){return E({type:"custom",render:e=>i(vi,{...e})},{type:"select",label:$,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Ai(e,t){const n=kt(e);if(n!=="custom")return s(Et.find(r=>r.value===n)?.label??"");const o=mt(Oe(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):s("Custom")}function vi(e){const{value:t,onChange:n}=e,[o]=L("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,a=t!=null,c=a?t:l?e.follows:void 0,d=kt(c),p=r>=2&&r<=ht,h=()=>[...Ro[r]??[]],f=Y(null),u=b=>{const _=f.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!p||n(b==="custom"?h():b)},m=s("The width bar works for 2 to {count} blocks.",{count:ht}),S=a&&(l||t!=="content"),x=Oo().widths.hint(r,To);return i(w,{label:s($),icon:i(ge,{}),changed:S,hint:d!=="custom"?void 0:p?x:m,action:i(C,{words:y()?.panel,label:s($),changed:S,disabled:e.readOnly===!0,detail:l?B(b=>s(b),Ai(e.follows,r),e.followsView):s("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ft,{label:s($),value:d,options:Et.map(b=>({value:b.value,label:b.value==="custom"&&!p?m:s(b.label),icon:Yr(i("span",{className:"sf-gallery-pic sf-share-pic",children:jt(b.weights).map((_,z)=>i("i",{style:{gridColumn:`span ${_}`}},z))}),s(b.label),b.value==="custom"&&!p?m:s(b.label))})),onChange:g,columns:3,cell:Vt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:mt(Oe(c,r),r)}},onBlur:()=>{f.current=null},children:i(Io,{label:s($),count:r,value:Oe(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function jt(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Ea(){return Q(pr,i(Hn,{}),Rt,Rt[0].value)}function ka(){return T("mobile",zr($,i(ge,{}),gr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:jt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),mr,{columns:2,cell:Vt}))}const Vt={width:"5.75rem",height:"3.25rem"};function Na(){return ae("share",Pi(),Le)[K("share")]}function Bi(){return T("mobile",j(It,i(tt,{}),Ie,hr,1,Ie,"",{clear:{phoneFollows:!1,hint:Ie}}))}const zt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Fa(){const e=j(It,i(tt,{}),Ot,fr,1,Ot,"",{clear:{emptyLabel:"Auto"}}),t=ae("columns",e,{...zt,tablet:Le.tablet}),n=ae("columns",e,zt,{phoneRow:Bi()});return{...t,phoneRow:n.phoneRow}}function La(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(w,{label:s(e),icon:i(dt,{noun:l}),action:i(C,{words:y()?.panel,label:s(e),changed:!Gr(a),detail:s("the Text style in Styles"),onReset:()=>c(Hr),defaultAction:{onPress:()=>c(Dr),title:s("Keep this section's own built-in size"),icon:i(Ln,{})}}),children:V({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Pa(){return{_gCellWidth:R("Cell width"),gridSpan:Q("Positions",i(ge,{}),[{label:"Auto",value:""},...Array.from({length:wn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function P(){let e=null,t=null;try{e=Ke(Di),t=te(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Di=en(null);function Hi({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const d=P()[a],p=Ce(void 0,d,c);return i(N,{children:V({min:e,max:t,step:n,value:Ce(o,d,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function Gi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=P()[t],c=Ce(void 0,a,n);return i(C,{words:y()?.panel,label:s(e),changed:r,detail:B(d=>s(d),`${c}${o}`),onReset:l})}function Mi(e){return Wt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Gi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Hi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Wi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ui={Top:ct,Bottom:lt,Left:st,Right:at},Ki=e=>{const t=Ui[e];return i(t,{})};function Aa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Wi[x],l=x=>j(r("Top"),i(ct,{}),O.min,O.max,O.step,x,"px"),a=(x,b,_,z=O)=>T("mobile",Mi({label:r(x),icon:Ki(x),desktopKey:b,min:z.min,max:z.max,step:z.step,fallback:_})),c=e.top??O.min,d=e.bottom??O.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??O,u=e.side??f.min,g=e.sidePhone??u,m=e.phone===!0,S=x=>m?T("desktop",x):x;return Z({...o?{_gSpacing:R("Padding")}:{},[t]:S(l(c)),...m?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:S(j(r("Bottom"),i(lt,{}),O.min,O.max,O.step,d,"px")),...m?{[F(n)]:a("Bottom",n,d)}:{}},...e.sides?{[p]:S(j(r("Left"),i(st,{}),f.min,f.max,f.step,u,"px")),...m?{[F(p)]:a("Left",p,g,f)}:{},[h]:S(j(r("Right"),i(at,{}),f.min,f.max,f.step,u,"px")),...m?{[F(h)]:a("Right",h,g,f)}:{}}:{}})}function va(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&me(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const de="Width";function Ba(e,t=Mr,n=!0){const o=t.map(r=>({label:Wr[r],value:r}));return Z({...n?{_gWidth:R(de)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(w,{label:s(de),icon:i(Vn,{}),action:n?i(ii,{inherited:l?.inherited??!1,onReset:()=>r(Ur),label:de}):void 0,children:Ae({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:de})})}})}function Da(){const e=(o,r)=>({type:"custom",render:({value:l,onChange:a})=>i($i,{value:l,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:l,field:a})=>i(ji,{value:r,onChange:l,unit:a?.unit,view:o})}),n=o=>{const r=Jr("Unit",i(ot,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const l=r.render;return{...r,render:a=>i(Vi,{props:a,draw:l,view:o})}};return Z({_gHeight:R(J),...M("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(zi,{view:o,onClear:()=>r(void 0)}))),...M("sectionHeightValue",t),...M("sectionHeightUnit",n)})}function $i({value:e,onChange:t,view:n,badge:o}){const r=P(),l=c=>["auto","fixed","screen"].includes(c),a=ue(n,r)?.mode??"auto";return i(w,{label:J,icon:X(i(rt,{})),action:o?o(t):void 0,children:Ae({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:l(e)?e:a,onChange:t,ariaLabel:J})})}function Yt(e,t){return e==="phone"&&_e(t)?rr(t):or(t)}function ue(e,t){return e==="desktop"||(e==="tablet"?_e(t):nr(t))?null:Yt(e,t)}const k=(e,t)=>e==="tablet"?K(t):F(t);function Xi(e,t,n,o){const r=ue(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[k(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[k(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[k(e,"sectionHeightValue")]:r.value}:{},[k(e,n)]:o}}function qt(e,t,n){const o=W(),r=ue(e,P());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=Xi(e,c,t,a);return d===null?{[e==="desktop"?t:k(e,t)]:a}:Object.keys(d).length?d:null})}}function ji({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:l}=qt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?dr:cr;return i("div",{className:"sf-field",children:V({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:J,onChange:l})})}function Vi({props:e,draw:t,view:n}){const{followed:o,write:r}=qt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function zi({view:e,onClear:t}){const n=P(),o=ue(e,n)===null,r=e==="phone"&&_e(n),l=Yt(e,n),a=B(c=>s(c),l.mode==="auto"?s("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(C,{words:y()?.panel,label:s(J),changed:o,detail:a,onReset:t})}function Ha(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:a,onChange:c,id:d,name:p})=>i(Qi,{value:a,onChange:c,labelId:`${d??p??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:a,onChange:c})=>i(qi,{value:a,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:a,onChange:c})=>i(Ji,{value:a,onChange:c,view:l,intro:t})});return{_gStick:R(lr,{dot:t?Yi:Jt}),...M("stickTop",n),...M("stickTopDistance",o),...e.screens?M(Te,r):{}}}const Jt={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},Yi={any:[Jt,ir]};function Zt(e,t,n,o){const r=W(),l=P(),a=e==="desktop"||pe(e,l)?null:De(e,Re(l,{intro:o}));return{followed:a,write:a&&r?d=>r.onChangeMany(p=>{const h=Zi(e,p,d,t,o);return h===null?{[k(e,t)]:d}:Object.keys(h).length?h:null}):n}}function qi({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,"stickTopDistance",t,o);return i("div",{className:"sf-field",children:V({min:le.min,max:le.max,step:le.step,value:r?null:typeof e=="number"?e:le.fallback,...r?{placeholder:r.distance}:{},suffix:"px",ariaLabel:s("Distance from top"),onChange:l})})}function Ji({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,Te,t,o);return i(w,{label:s(_t),icon:X(i(rt,{})),children:V({min:ne.min,max:ne.max,step:ne.step,value:r?null:rn(e)??ne.default,...r?{placeholder:r.screens}:{},ariaLabel:s(_t),onChange:l})})}function pe(e,t){return e==="tablet"?ar(t):sr(t)}function De(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,screens:t.desktopScreens}}function Zi(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||pe(e,t))return null;if(n===void 0)return{};const l=De(e,Re(t,{intro:r})),a=e==="phone"&&pe("tablet",t)?d=>k("tablet",d):d=>d,c=(d,p)=>t[a(d)]==null?{}:{[k(e,d)]:p};return{[k(e,"stickTop")]:!0,...c("stickTopDistance",l.distance),...c(Te,l.screens),[k(e,o)]:n}}function Qi({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=P(),a=Re(l,{intro:r}),c=o==="phone"?a.phone:o==="tablet"?a.tablet:r?a.desktop:e===!0,d=o==="phone"&&a.ownTablet,p=o==="desktop"?null:De(o,a),h=p?.on?`${p.distance}px`:s("Off");return i(w,{label:s(Ct),labelId:n,icon:X(i(Kn,{})),action:A(N,{children:[o!=="desktop"?i(C,{words:y()?.panel,label:s(Ct),changed:pe(o,l),detail:B(f=>s(f),h,d?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Se,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Qt="e.g. about";function Ga(){return{_gAnchor:R("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Qt},{type:"custom",render:({value:e,onChange:t})=>i(In,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:Qt,hideable:!1,markup:!1})})})}}function Ma(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(w,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(Co,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Wa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(w,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(yo,{id:c,value:on(typeof o=="string"?o:null),onChange:d=>r(d?nn(d):"")})})}}}function el(e,t,n,o){return{type:"custom",...E({},{...ee,label:e}),render:r=>{const{value:l,onChange:a,id:c,name:d}=r,p="follows"in r,h=r,f=typeof l=="boolean",u=typeof h.follows=="boolean"?h.follows:t,g=f?l:p?u:t,m=`${c??d??e}-label`,S=h.readOnly===!0,x=i(Se,{checked:g,onChange:a,disabled:S,ariaLabelledBy:m});return i(w,{label:s(e),labelId:m,icon:n,hint:o===void 0?void 0:s(o),action:p?A(N,{children:[i(C,{words:y()?.panel,label:s(e),changed:f,detail:h.followsNoView?s(u?"On":"Off"):B(b=>s(b),s(u?"On":"Off"),h.followsView),disabled:S,onReset:()=>a(void 0)}),x]}):x})}}}function Ua(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(tl,{label:"Background",icon:i(Un,{}),id:r,value:e,shown:zn(e),onChange:t})}}}function Ka(e,t){return{type:"custom",...E({},{...ee,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(w,{label:s(e),htmlFor:a,className:"sf-checkbox",action:i(wo,{id:a,checked:l,onChange:o})})}}}function $a(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(re,{label:s(e),icon:n,value:o||t,onChange:r})}}function tl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:a,n:c}=Ge(),d=ye(o),p=d?ie(d,a,c):null;return i(re,{label:s(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:l,choices:He(d??"",a,c,l)})}function Xa(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(nl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function He(e,t,n,o){const r=we(e);return No(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function nl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Ge(),l=o.background,a=D(l.toUpperCase(),s("Theme {n} background",{n:r})),c=we(e),d=c?ie(c,o,r):null,p=He(e,o,r,t),h=n?()=>t(void 0):()=>t("");let f=l,u=a;if(n){const g=we(n.follows),m=Yn(n.follows),S=g?ie(g,o,r):m?{hex:m,words:m.toUpperCase()}:null;f=S?.hex??l,u=B(x=>s(x),S?S.words:a,n.view)}return d?i(re,{label:s("Fill"),icon:i(be,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:h,resetTo:u,choices:p}):i(wt,{label:s("Fill"),icon:i(be,{}),value:e,inherited:f,resetTo:u,onChange:t,onReset:h,choices:p})}function ol(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return se(n);const r=Zn(e,t);if(r.length===0)return null;const l=se(Bt(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=se(Bt(r[a].sectionAccent));if(c!==null)return c}return se(r[0].sectionAccent)}function Ge(){const e=Ft(v().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=te(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?ol(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:Sr(e.themes[o]),n:o+1}}const rl=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function il({label:e,value:t,onChange:n,points:o=rl}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(bo,{label:s(e),value:t,points:r,onChange:n})}function ja(){return Ut()}const Va={top:i(Bn,{}),right:i(vn,{}),bottom:i(Pn,{}),left:i(An,{})};function za(e,t,n,o,r,l,a){const c=f=>t.find(u=>u.value===f),d=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const u=t.find(m=>m.cell===f);if(!u)return d(`missing-${f}`);const g=l?.[f];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},h=[d("corner-top-left"),p("top"),d("corner-top-right"),p("left"),d("centre"),p("right"),d("corner-bottom-left"),p("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const g=t.some(m=>m.value===f)?f:n;return i(w,{label:s(e),icon:r,value:c(g)?.label?s(c(g).label):a?s(a):"",children:il({label:e,value:g,onChange:u,points:h})})}}}function Ya(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Vo,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function qa(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(Yo,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function Ja(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Za=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Qa(e,t,n){const o=Object.keys(Xe).map(r=>({label:Xe[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(sl,{label:e,icon:t,options:o,onChange:r})}}function ll(e,t,n){const o=ln(e,t,n);if(o!==void 0)return o==="save-makes-frame"?s("A frame is made from this video when you save the page."):o==="starts-dark"?s("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?s("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?s("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?s("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?s("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=an(e);return r==="frame-missing-image"?s("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?s("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?s("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?s("No image yet. The slide shows its background colour until you choose one."):void 0}function sl({label:e,icon:t,options:n,onChange:o}){const r=W(),l=r?.values??{},a=sn(l),c=Ke(un),d=dn(c?.docId??null);let p=null;try{p=te(f=>f.appState.data)}catch{p=null}const h=cn(r?.id,p,d);return i(w,{label:s(e),icon:X(t),hint:ll(l,h,c?.hasUnsavedEdits??!1),children:Ae({options:n,value:a,onChange:o,ariaLabel:e})})}function ec(e,t,n,o={}){const r={type:"custom",[Ye]:!0,render:({value:l,onChange:a,name:c})=>i(jo,{value:l||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?T("each",r):r}const tc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function al(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function nc({value:e,onChange:t,label:n}){const o=e||{},r=W(),l=r?r.values!==r.node.props:!0,a=!!o.pending&&l,c=!!o.pending&&!l,d=!!Xr($r()).geocode,p=$e(),h=(f,u)=>t({...o,[f]:u??void 0});return A(N,{children:[i(w,{label:s(n),icon:i(it,{}),action:d?i(xe,{content:s("Find from the address (OpenStreetMap)"),children:i(gt,{"aria-label":s("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i($n,{})})}):void 0,children:d&&o.status?i(On,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?s("Finding…"):c?s(ko):s(o.status),hint:al(o)}):null}),i(w,{label:s("Enter by hand"),labelId:p,icon:i(Dn,{}),action:i(Se,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:p})}),o.manual&&i(w,{label:s("Latitude, longitude"),icon:i(it,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(bt,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>h("lat",f),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(bt,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>h("lng",f),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function cl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function dl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function oc(e,t){return e===null?null:t>e?e:null}function ul(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const rc={label:"Ticker items",icon:i(Wn,{})};function ic(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...Ht.textList,label:e}),render:({value:r,onChange:l})=>i(pl,{label:e,icon:X(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function pl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=Y(null),[c,d]=q(null),p=f=>f.map(u=>({text:u?.text??""})),h=f=>{const u=ul(n,f,c);u===null&&(a.current=null),d(u),r(p(f))};return i(ao,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(St,{target:a,value:cl(n,c),onChange:f=>r(dl(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,u,g)=>i("input",{type:"text",className:l&&c===u?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:u+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,d(u)}})})}function lc(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function sc(e){return{_gCards:R("Cards"),coverIndex:Q("Cover image",i(Mn,{}),Ko,String($o),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:gi("Image background",Ir),cardImage:ml()}}function ac(){return{outline:Q("Card outline",i(Xn,{}),Mo,Uo),indexBadge:Q("Card number",i(ot,{}),Go,Wo),showBadge:el("Product badge",!0,i(dt,{noun:"tag"}))}}function cc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...ee,label:fe.find(l=>l.id===r).label}),o=r=>E(Fo(Me),n(r));return{_gShowOnCard:R("Show on a card"),[Me]:E({type:"custom",render:()=>i(fl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Me)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Me="showCardPrice",fe=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function fl({rest:e}){const t=P(),n=bi(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=fe.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(We,{parts:fe,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(fe.map(({id:a})=>[a,void 0])))})}function dc(e,t="display"){const n=F(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(We,{parts:e,changed:uo(o),shown:l=>po(o,l),onPress:(l,a)=>r(mo(o,l,a)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(hl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function We({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:a}){const c=s("Display");return i(w,{label:c,icon:i(kn,{}),changed:t,action:i(C,{words:y()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(co,{label:c,items:e.map(d=>({id:d.id,label:s(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:s(a)}:{}})),onChange:o})})}function hl({parts:e,desktopKey:t,value:n,onChange:o}){const r=P()[t];return i(We,{parts:e,changed:ho(n),shown:l=>fo(r,n,l),onPress:(l,a)=>o(go(n,l,a)),onReset:()=>o(Do),detail:s("the same as Desktop")})}function ml(){return Wt("Card image",{min:U,max:Ze,step:mn,icon:i(nt,{}),hint:"Rounds the picture. The card's own corner is in Styles."})}function uc(){return Be({sidesKey:"cornerSides",step:gn,useFollowed:()=>U,mark:i(gl,{label:bn}),hint:s("Rounds the picture. Left alone it stays square.")})}function gl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:y()?.panel,label:s(e),changed:t,onReset:n})}function pc(){return{type:"custom",render:({value:e,onChange:t})=>i(xl,{value:typeof e=="string"?e:"",onChange:t})}}function bl({layout:e,width:t}){const n=yn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Cn(e).map(([r,l],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},a))})}const wl={width:"3.5rem",height:"2.5rem"},Sl=200;function xl({value:e,onChange:t}){const[n,o]=q(null),[r,l]=q(4),a=Y(null);tn(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>l(u.getBoundingClientRect().width>=Sl?4:3);g();const m=new ResizeObserver(g);return m.observe(u),()=>m.disconnect()},[]);const c=e&&e in oe?e:"",d=Qe(n,c),p=Qe(n,"").length,h=_n("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:qr(h,s("Not chosen"))},...d.map(u=>({value:u,label:s(oe[u].label),icon:i(bl,{layout:oe[u],width:40})}))];return i(w,{label:s("Layout"),icon:i(Gn,{}),value:c?s(oe[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ft,{label:s("Layout"),value:c,options:f,onChange:t,columns:r,cell:wl,header:A("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(oo,{options:[{id:"all",label:s("All")},...Sn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:xn.length})})]})})})})}export{si as BOUND_TO_POST,ra as BOUND_TO_POST_NOTE,pa as BUCKET_ICONS,tc as CUSTOM_FIELD_MEDIA,nc as CoordsField,Dt as DESKTOP_GAP_NOT_OVERLAP,We as DisplayRow,Va as EDGE_ARROWS,_o as FOCAL_DEFAULT,rl as FOCAL_POINTS,he as FOLD_FIELD_MARKER,il as FocalPicker,xa as GroupLabel,ai as HIGHLIGHT_HINT,H as HidableTextField,ze as LINK_FIELD_MARKER,Vs as Label,Ye as MEDIA_FIELD_MARKER,Za as MEDIA_TYPE_OPTIONS,ia as NOT_BOUND_TO_POST,Sa as PanelBand,ui as PanelNoteLine,Di as RowPropsContext,qe as SCAFFOLD_FIELD_MARKER,gc as SCALAR_TEXT_CONTROLS,Qr as SiteGapDefaultReset,V as Slider,fi as Swatches,mc as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,rc as TICKER_ITEMS_ROW,pl as TextListField,tl as ThemeFillRow,de as WIDTH_LABEL,ii as WidthDefaultReset,ul as aimAfterListChange,Ga as anchorFields,D as backTo,ya as backgroundField,Ea as boxBlockSpacingField,Fa as boxColumnsFields,Xa as boxFillField,Bi as boxPhoneRowField,Pi as boxShareField,ka as boxSharePhoneField,Na as boxShareTabletField,ol as boxThemeIndexOf,ma as bucketHeader,Ra as buttonWordsEntryField,Fi as cardCornersField,gi as cardImageBackgroundField,ml as cardImageField,sc as cardMediaFields,Oa as cardShapeFields,cc as cardShowFields,ac as cardStyleFields,Pa as cellWidthFields,Ka as checkbox,$a as colorInput,Ys as containerDirectionField,ei as containerGapField,ti as containerGapPhoneField,zs as containerGapRows,ni as containerGapTabletField,al as coordsResultTip,ca as copyText,Kt as cornerSidesField,Be as cornersRowField,Wa as date,Ma as dateTime,ga as designGroupHeader,dc as displayFields,za as edgePad,He as fillSlotChoices,oc as focusAfterRemove,ja as focusKeptField,ba as foldMarker,me as foldMetaOf,pi as foldTitleOf,Xi as followedHeightPatch,Zi as followedStickPatch,pc as galleryLayoutField,Da as heightFields,ue as heightFollowedBy,qs as heroGroupPlacementPoints,Ve as hidableText,di as hintIsWhileTyping,uc as imageCornersField,oa as inOwnBox,ha as isBucketHeader,Ut as keptBy,da as linkField,ll as loadingRowHint,Qa as loadingShowsField,Ya as multiSelect,Ua as pageBackgroundField,fa as panelNote,Mi as phoneOverrideField,aa as plainText,ua as plainTextarea,Wt as pxField,wa as quietMarker,je as readHidable,cl as rowText,qa as searchSelect,mi as sectionBandChoices,Ta as sectionBorderField,yi as sectionCornersField,_a as sectionShapeFields,Ca as sectionThemeFields,dl as setRowText,La as sizeField,Ja as sourceField,Aa as spacingFields,Ha as stickFields,va as swapPadding,Ia as templateField,la as text,pn as textFieldIdentifier,Qs as textFieldOffPage,ta as textFieldPanelOnly,ic as textList,lc as textListRowField,sa as textarea,el as toggle,ec as upload,bi as useSelectedPatch,P as useSelectedProps,L as useSelectedSibling,Zr as useSiteGapDetail,Ba as widthField,na as withIdentifier,Zs as withOffPage,ea as withPanelOnly,Js as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as P,Fragment as k}from"react/jsx-runtime";import{cloneElement as pe,createContext as nn,useContext as $e,useEffect as on,useId as Xe,useRef as z,useState as q}from"react";import{useEasel as Q,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ee,toDateKey as rn,fromDateKey as ln}from"efficient-shell/format";import{say as s,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as sn}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as je,firstFrameHint as an,loadingShowsOf as cn,loadingStillHint as un}from"../../../format/lib/hero-video.js";import{pageFramesFor as dn,usePageVideoFrames as pn}from"../page-video-frames.js";import{ScreenDocumentContext as fn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as Ve,hidableText as Ye}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as fe,LINK_FIELD_MARKER as ze,MEDIA_FIELD_MARKER as qe,SCAFFOLD_FIELD_MARKER as Je,TEXT_FIELD_MARKER as E,foldMetaOf as he,textFieldIdentifier as hn}from"efficient-easel/draw";import mn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Ze}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as gn,CARD_IMAGE_RADIUS_ROW as Qe,CARD_IMAGE_RADIUS_STEP as bn,CORNER_RADIUS_MAX as et,CORNER_RADIUS_MIN as L}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Sn,IMAGE_CORNERS_LABEL as wn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as yn,GALLERY_LAYOUTS as te,GALLERY_LAYOUT_KEYS as Cn,galleryChoices as tt,galleryLayoutRatio as _n,galleryPictureCells as In}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as On}from"./shell-glyph.js";import{anchorSiblingsOf as Tn,placementPoints as En}from"../../../format/lib/hero-group-placement.js";import Rn from"../../components/AnchorField.js";import Nn from"../../components/SourceStatus.js";import{AdjustIcon as Pn,EyeIcon as kn,AnimationIcon as An,BackgroundIcon as nt,BorderAllIcon as Fn,BlockSectionIcon as Ln,ColumnWidthsIcon as me,ColumnsIcon as ot,CornerIcon as rt,DirectionDownIcon as Bn,DirectionLeftIcon as vn,DirectionRightIcon as Dn,DirectionUpIcon as Hn,EditIcon as Gn,GapIcon as Mn,GridIcon as Un,GroundIcon as ge,HashIcon as Wn,HeightIcon as it,ImageIcon as Kn,ListIcon as $n,LocationIcon as lt,PaddingBottomIcon as st,PaddingLeftIcon as at,PaddingRightIcon as ct,PaddingTopIcon as be,PageIcon as Xn,StickyIcon as ut,SearchIcon as jn,SquareIcon as Vn,TypeIcon as Yn,WidthIcon as zn}from"efficient-easel/icons";import{FieldGlyph as dt}from"../../components/FieldGlyph.js";import{resolvePageBackground as qn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Jn,boxFillSlot as Se}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as pt,CORNER_SIDE_POINTS as Zn,hasOwnSectionCorners as Qn,normalizeCornerSides as ft}from"../../../format/lib/content/section-corners.js";import{enclosingPath as eo,enclosingSection as to}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as no,SettingsField as x,SettingsGroup as oo,SettingsSegmented as ro,SettingsBorder as io,SettingsSidesEach as lo,SettingsSwitch as we,borderSides as so,borderStartEach as ao}from"efficient-easel/panel";import{ListField as co}from"efficient-easel/fields";import{DisplayChips as uo}from"efficient-shell/ui";import{desktopDisplayChanged as po,partShownOnDesktop as fo,partShownOnPhone as ho,phoneDisplayChanged as mo,withDesktopPart as go,withPhonePart as bo}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as So,ColorSwatch as wo,CornersInput as xo,DatePicker as yo,DateTimePicker as Co,FOCAL_DEFAULT as _o,IconPicker as ht,COLUMN_COUNT_MAX as mt,COLUMN_SHARE_MIN as Io,COLUMN_SHARES_EQUAL as Oo,resolveColumnShares as gt,WidthsBar as To,useShellStrings as Eo,IconButton as bt,InputNumber as St,Slider as Ro,Tooltip as xe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as No}from"./geocode-resolve.js";import{ColourRow as ne,InheritedColourRow as wt}from"./ColourControl.js";import{fillThemeColors as Po,slotFill as oe}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ye}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ce}from"efficient-easel/screen/lib/document/style-fields";import xt from"./MarkupToolbar.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as ko,NoControlMark as Ao,noControlField as yt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Fo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Lo,PANEL_ONLY_FIELD as Bo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as vo,resolvePhoneValue as _e}from"../../../format/lib/document/phone-override.js";import{phoneKey as K,tabletKey as Ie}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as v}from"../animation/view-rows.js";import{SuppressibleText as Do}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Ho,CARD_OUTLINE_OPTIONS as Go,DEFAULT_CARD_INDEX_FORMAT as Mo,DEFAULT_CARD_OUTLINE as Uo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Wo,DEFAULT_COVER_INDEX as Ko}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as $o}from"efficient-easel/draw";import Xo from"../../components/MediaUploadField.js";import jo from"../../components/MultiSelectField.js";import Vo from"../../components/SectionThemePicker.js";import Yo from"../../components/SearchSelectField.js";import zo from"../../components/StorefrontLinkField.js";import{UiIcon as Ct}from"efficient-easel/draw/client";import{SECTION_PADDING as R}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as qo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Jo}from"efficient-easel/draw/client";import{encodePartId as Zo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Qo,useEaselStrings as er}from"efficient-easel/strings";import{hasPhoneHeight as tr,hasTabletHeight as Oe,resolveSectionMinHeight as nr,resolveTabletHeight as or}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as rr,SECTION_PIN_ABOVE_HINT as ir,SECTION_PIN_ABOVE_KEY as lr,SECTION_PIN_ABOVE_LABEL as sr,SECTION_PIN_GROUP as ar,SECTION_PIN_LABEL as _t,SECTION_PIN_SCREENS_KEY as Te,SECTION_PIN_SCREENS_LABEL as It,SECTION_PIN_STOP_DEFAULT as cr,SECTION_PIN_STOP_HINT as ur,SECTION_PIN_STOP_KEY as dr,SECTION_PIN_STOP_LABEL as pr,SECTION_PIN_STOP_OPTIONS as fr,SECTION_STICK_DISTANCE as re,SOME_VIEW_PINS as Ot,hasPhoneStick as hr,hasTabletStick as mr,resolveSectionStick as Ee,sectionPinStopOf as gr,sectionPinStopWrite as br}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Sr,SECTION_MIN_HEIGHT_GROUP_LABEL as J,SECTION_SCREEN_PCT as wr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as xr,resolveContainerDirection as Tt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as yr,BOX_BLOCK_SPACING_POINTS as Et,BOX_PHONE_ROW_LABEL as Rt,BOX_COLUMNS_MAX as Cr,BOX_COLUMNS_MIN as Nt,BOX_PHONE_ROW_MAX as _r,BOX_PHONE_ROW_MIN as Re,BOX_SHARE_CHOICES as Pt,BOX_SHARE_LABEL as $,boxShareChoiceOf as kt,boxShareWidthsOf as Ne,BOX_SHARE_PHONE_DEFAULT as Ir,BOX_SHARE_PHONE_POINTS as Or}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Tr,borderBySide as At}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Er,normalizeTheme as Ft,normalizeThemeColors as Rr,sectionBandTone as Nr,surfaceTwoTone as Pr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Lt,CONTAINER_GAP_BUILT_IN as kr,CONTAINER_GAP_PHONE as Pe,GAP_FIELD_CONTAINER as ke,followsSitePhoneGap as Ar,hasOwnContainerGap as Fr,hasOwnPhoneGap as Ae,resolveContainerGap as Bt,resolvePhoneContainerGap as vt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Lr,CARD_IMAGE_BG_OFF as Br,CARD_IMAGE_BG_SWATCH_NAMES as vr,CARD_IMAGE_BG_SWATCHES as Dr,isCardImageBackgroundInheriting as Hr,cardImageBackgroundChoice as Gr,THEME_CARD_IMAGE_BG as Mr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Ur,SECTION_BG_NO_FILL as Wr,sectionBackgroundChoice as Kr,THEME_SECTION_BG as Fe,isSectionBackgroundEmpty as $r,sectionBackgroundHex as Dt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Xr,nestedAccentValue as Ht,resolveSectionAccent as ie}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as jr,TYPE_SIZE_INHERIT as Vr,isTypeSizeInheriting as Yr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as zr,WIDTH_CHOICE_LABEL as qr,WIDTH_INHERIT as Jr}from"../../../format/lib/content/section-width.js";import{useEaselSession as Zr}from"efficient-easel/screen/lib/session-context";import{backendOf as Qr}from"../website-session.js";import{BOX_GAP as ei,describedAs as A,group as T,iconOf as X,sharedStyleKinds as Z}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Gt,onDesktopWords as H,phoneTwinFields as Le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ti,gapField as Be,iconPickerRow as ni,lengthUnitFields as oi,pickerCellIcon as ri,pickerNoneIcon as ii,Segmented as ve,select as j,slider as G}from"./box-fields.js";function ra({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function M(e,t){return s("{value} from {from}",{value:e,from:t})}function li(){const{blockGap:e}=D();return e===null?s("this container's own spacing"):M(`${e}px`,s("Styles"))}function si({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:li(),onReset:t})}function ai(e){return Be({...ei,builtIn:kr[e],resolve:(t,n)=>Bt(e,t,n?.siteGap),action:(t,n)=>i(si,{inherited:!Fr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ke]:e}})}function ci(e){return Ze(I("mobile",{[ke]:e,type:"custom",render:t=>i(pi,{container:e,...t})}),Mt)}function ui(e){return Ze(I("tablet",{[ke]:e,type:"custom",render:t=>i(di,{container:e,...t})}),Mt)}const Mt={not:{field:"gap",in:Array.from({length:-Lt.min},(e,t)=>Lt.min+t)}};function ia(e){return{gap:I("desktop",ai(e)),[Ie("gap")]:ui(e),[K("gap")]:ci(e)}}function di({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(Pe.min,Bt(e,n,o));return Be({...Pe,builtIn:r,resolve:a=>Ae(a)?a:r,action:(a,c)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ae(a),detail:H(u=>s(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function pi({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=vt(e,void 0,n,o,r);return Be({...Pe,builtIn:l,resolve:c=>vt(e,c,n,o,r),action:(c,u)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ae(c),detail:M(`${l}px`,Ar(e,n,r)?s("Styles"):s("Desktop")),onReset:()=>u(void 0)})}).render(t)}function la(e){return ti({offered:xr(e),fallback:Tt(e,void 0),resolve:t=>Tt(e,t)})}function sa(e,t){return En(t?Tn(e,t):[],t)}function fi({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:M(s("Full"),s("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:u,hidden:p}=Ve(e),h=z(null),f=z(null),d=_=>t(a?{text:_,hidden:p}:_),g=()=>t({text:u,hidden:!p}),m=a&&p,S=Xe(),w=r?Si(r)?i("span",{className:"sf-hint-while-typing",children:s(r)}):s(r):void 0,b=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(x,{label:s(n),icon:i(Yn,{}),htmlFor:S,className:m?"is-hidden":void 0,hint:w,action:a?i(xe,{content:b,children:i(bt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(Ct,{name:"eye-off",size:14}):i(Ct,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[c&&i(xt,{target:l?f:h,value:u,onChange:d}),l?i("textarea",{id:S,ref:f,value:u,placeholder:o===void 0?void 0:s(o),onChange:_=>d(_.target.value)}):i("input",{id:S,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:s(o),onChange:_=>d(_.target.value)})]})})}function aa(e,t){return{...e,[Je]:t}}function ca(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function ua(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}function da(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Bo]:!0}}function pa(e){return Lo(e)}function fa(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 _c,SCALAR_TEXT_CONTROLS as Ic}from"efficient-easel/draw";function ha(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[ko]:o,...r}=e;return{...r,[Fo]:!0,render:t}}const hi=new Set($o),le={type:"radio",options:[{value:!0},{value:!1}]},Ut={text:{type:"object",objectFields:{text:{type:"text"},hidden:le}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:le}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},W=(e,t)=>{const n=A({...t,[E]:e},{...Ut[e.control],label:e.label});if(!hi.has(e.control))return n;const o=t.render;return{...yt(n,"authored-copy"),render:r=>i(Do,{name:r.name,children:o(r)})}},ma="Everything else on this block comes from the linked post. Unlink it to edit by hand.",mi={field:"source.slug",set:!0},ga={not:mi},gi="Select a word, then press the highlighter.",bi=new Set([gi]),Si=e=>bi.has(e);function ba(e,t,n){return W({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Sa(e,t,n){return W({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function wa(e,t,n){return W({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function xa(e,t,n){return W({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ya(e){return{type:"custom",[ze]:{label:e},...A({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(zo,{value:Ye(t),onChange:n,label:e})}}function Ca(e,t,n){return W({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const _a={Design:Pn,Animation:An};function Ia(e){return{type:"custom",render:()=>i(wi,{text:e})}}function wi({text:e}){return i("p",{className:"sf-note",children:s(e)})}function Oa(e){return he(e)!==null&&e?.tabs!==void 0}const Wt=new Map;function Ta(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Wt.get(n)??{type:"custom",tabs:t,[fe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Wt.set(n,o),o}const Kt=new Map;function Ea(e){const t=Kt.get(e)??{type:"custom",[fe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return Kt.set(e,t),t}function xi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ra(e,t){return xi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function Na(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(k,{})}}function Pa({title:e,children:t}){const[n,o]=q(()=>!De.has(e));return i(oo,{title:e,open:n,onToggle:r=>{o(r),r?De.delete(e):De.add(e)},children:t})}const De=new Set;function yi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return P("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?s(o[c]):c;return i(xe,{content:u,children:i(wo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function ka(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ci,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ci({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:a,n:c}=Ue(),u={background:a.background,surface:a.surface,surface2:Pr(a),band:Nr(a)},p=n?Fe:t,h=$r(l,t,p),f=Dt(void 0,p,u),d=n?Ur:void 0,g=p===Fe?s("the theme's section background"):s("Theme {n} background",{n:c}),m=_i(l,t,a,c,u,r),S=M(f.toUpperCase(),g),w=ye(l),b=w?oe(w,a,c):null;return b?i(ne,{label:s(e),icon:i(nt,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(d),resetTo:S,choices:m}):i(wt,{label:s(e),icon:i(nt,{}),value:h?"":Dt(l,t,u),inherited:f,resetTo:S,onChange:r,onReset:()=>r(d),choices:m})}function _i(e,t,n,o,r,l){const a=Kr(e,t);return[{label:s("No fill"),color:"",selected:a==="none",onPick:()=>l(Wr)},{label:`${s("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>l(Fe)},...Me(ye(e)??"",n,o,l)]}function Ii(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Hr(r,t);return i(x,{label:s(e),icon:i(ge,{}),changed:!l,action:i(C,{words:y()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Lr)}),children:yi({swatches:Dr,current:l?Mr:Gr(r,t),onPick:o,names:vr})})}}}function Aa(e=n=>n,t){return Z({_gSectionTheme:T(Xr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Vo,{value:e(n),onChange:o,followLabel:t})}})}function V({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:f,onClear:d,units:g}){const m=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Ro,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...f?{emptyLabel:s(f)}:{},suffix:l||void 0,...g?{units:g}:{},showInput:a,label:u===void 0?void 0:s(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:S=>{S===null?d?.():S!==o&&r(S)}})})}function Oi(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:d})=>{const g=typeof f=="number"?f:null,m=g===null;return i(x,{label:s(e),icon:p?X(p):void 0,value:m?u||l===void 0?void 0:s(l):`${g}${h}`,changed:!m,action:u?pe(u,{changed:!m,onReset:()=>d(null)}):i(C,{words:y()?.panel,label:s(e),changed:!m,onReset:()=>d(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):V({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const se="Corners";function He(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:s(se),icon:i(rt,{}),changed:r,action:pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ei,{tier:e,px:o,onRadius:n})})}}}function F(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function $t(){return yt({type:"custom",render:()=>i(Ao,{})},"always")}function Ti(){const e=B();return t=>e?.onChangeMany(t)}function Ei({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=F(e.sidesKey),a=ft(r)??[...pt];return i(xo,{label:s(se),value:a,corners:Zn,onChange:c=>{const u=ft(c)??[];l(u.length===pt.length?null:u)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:et,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Xt(){return $t()}function Ri({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),r=typeof o=="number"?`${o}px`:s("not set");return i(C,{words:y()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):M(r,s("Styles")),onReset:n})}function Ni(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:L}function Pi(){return He({sidesKey:"sectionCornerSides",useFollowed:Ni,mark:i(Ri,{label:se}),hint:ki})}const ki="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Fa(){return Z({_gShape:T("Shape"),sectionCorners:Pi(),sectionCornerSides:Xt(),...v("sectionBorder",Di)})}const Ai=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function Fi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Li(){let e;try{const t=Ft(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Er.line}function Bi({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[u,p]=q(()=>r?ao(c,a):!1),h=Ai(),f=d=>Fi(r&&l?d:{width:d.width,color:d.color,...l?{style:d.style}:{}});return i(x,{label:s("Border"),icon:i(Fn,{}),action:r?i(lo,{each:u,label:s("Each side"),onChange:p}):void 0,children:i(io,{label:s("Border"),value:c,each:u,onChange:d=>t(f(d)),placeholder:n,presets:o,words:h,styles:l,max:Tr})})}function vi({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(Ie("sectionBorder")),l=Li(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...At(a(o)),...At(a(r))}:n==="tablet"?a(o):{};return i(Bi,{value:e,onChange:t,placeholder:{sides:so(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}function Di(e){return{type:"custom",render:({value:t,onChange:n})=>i(vi,{value:t,onChange:n,view:e})}}function La(e){return{type:"custom",render:()=>i(Hi,{partKey:e})}}function Hi({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=D(),r=er();let l=null;try{l=Jo().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(no,{name:s("Text"),preview:qo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Qo.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Zo(t,e))}})}function jt(e){const{cornerRadiusPx:t}=D(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=Q(u=>u),c=a?.props?.id?String(a.props.id):void 0;o=c?to(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Qn(r)?r:n}function Gi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=jt(L);return i(C,{words:y()?.panel,label:s(e),changed:t,detail:M(`${o}px`,s("the section")),onReset:n})}function Mi(){return i(k,{children:s("Follows the section's Corners until you set a number here.")})}function Ui(){return He({sidesKey:"cardCornerSides",useFollowed:()=>jt(L),mark:i(Gi,{label:se}),hint:i(Mi,{})})}function Wi(){return{type:"custom",render:()=>i(mn,{})}}function Ba(){return{_gShape:T("Shape"),cardCorners:Ui(),cardCornerSides:Xt(),cardCornersApplyAll:Wi()}}function Ki(){return A({type:"custom",render:e=>i(Xi,{...e})},{type:"select",label:$,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function $i(e,t){const n=kt(e);if(n!=="custom")return s(Pt.find(r=>r.value===n)?.label??"");const o=gt(Ne(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):s("Custom")}function Xi(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,a=t!=null,c=a?t:l?e.follows:void 0,u=kt(c),p=r>=2&&r<=mt,h=()=>[...Oo[r]??[]],f=z(null),d=b=>{const _=f.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!p||n(b==="custom"?h():b)},m=s("The width bar works for 2 to {count} blocks.",{count:mt}),S=a&&(l||t!=="content"),w=Eo().widths.hint(r,Io);return i(x,{label:s($),icon:i(me,{}),changed:S,hint:u!=="custom"?void 0:p?w:m,action:i(C,{words:y()?.panel,label:s($),changed:S,disabled:e.readOnly===!0,detail:l?H(b=>s(b),$i(e.follows,r),e.followsView):s("Fit content"),onReset:()=>n(void 0)}),children:P("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ht,{label:s($),value:u,options:Pt.map(b=>({value:b.value,label:b.value==="custom"&&!p?m:s(b.label),icon:ri(i("span",{className:"sf-gallery-pic sf-share-pic",children:Vt(b.weights).map((_,Y)=>i("i",{style:{gridColumn:`span ${_}`}},Y))}),s(b.label),b.value==="custom"&&!p?m:s(b.label))})),onChange:g,columns:3,cell:Yt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:gt(Ne(c,r),r)}},onBlur:()=>{f.current=null},children:i(To,{label:s($),count:r,value:Ne(c,r),onChange:d,readOnly:e.readOnly===!0})}):null]})})}function Vt(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 va(){return j(yr,i(Mn,{}),Et,Et[0].value)}function Da(){return I("mobile",ni($,i(me,{}),Or.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Vt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Ir,{columns:2,cell:Yt}))}const Yt={width:"5.75rem",height:"3.25rem"};function Ha(){return Le("share",Ki(),Gt)[Ie("share")]}function ji(){return I("mobile",G(Rt,i(ot,{}),Re,_r,1,Re,"",{clear:{phoneFollows:!1,hint:Re}}))}const zt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ga(){const e=G(Rt,i(ot,{}),Nt,Cr,1,Nt,"",{clear:{emptyLabel:"Auto"}}),t=Le("columns",e,{...zt,tablet:Gt.tablet}),n=Le("columns",e,zt,{phoneRow:ji()});return{...t,phoneRow:n.phoneRow}}function Ma(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(x,{label:s(e),icon:i(dt,{noun:l}),action:i(C,{words:y()?.panel,label:s(e),changed:!Yr(a),detail:s("the Text style in Styles"),onReset:()=>c(Vr),defaultAction:{onPress:()=>c(jr),title:s("Keep this section's own built-in size"),icon:i(Ln,{})}}),children:V({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Ua(){return{_gCellWidth:T("Cell width"),gridSpan:j("Positions",i(me,{}),[{label:"Auto",value:""},...Array.from({length:xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null,t=null;try{e=$e(Vi),t=Q(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Vi=nn(null);function Yi({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const u=N()[a],p=_e(void 0,u,c);return i(k,{children:V({min:e,max:t,step:n,value:_e(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function zi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=N()[t],c=_e(void 0,a,n);return i(C,{words:y()?.panel,label:s(e),changed:r,detail:H(u=>s(u),`${c}${o}`),onReset:l})}function qi(e){return Oi(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(zi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Yi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ji={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Zi={Top:be,Bottom:st,Left:at,Right:ct},Qi=e=>{const t=Zi[e];return i(t,{})};function Wa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=w=>Ji[w],l=w=>G(r("Top"),i(be,{}),R.min,R.max,R.step,w,"px"),a=(w,b,_,Y=R)=>I("mobile",qi({label:r(w),icon:Qi(w),desktopKey:b,min:Y.min,max:Y.max,step:Y.step,fallback:_})),c=e.top??R.min,u=e.bottom??R.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??R,d=e.side??f.min,g=e.sidePhone??d,m=e.phone===!0,S=w=>m?I("desktop",w):w;return Z({...o?{_gSpacing:T("Padding")}:{},[t]:S(l(c)),...m?{[K(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:S(G(r("Bottom"),i(st,{}),R.min,R.max,R.step,u,"px")),...m?{[K(n)]:a("Bottom",n,u)}:{}},...e.sides?{[p]:S(G(r("Left"),i(at,{}),f.min,f.max,f.step,d,"px")),...m?{[K(p)]:a("Left",p,g,f)}:{},[h]:S(G(r("Right"),i(ct,{}),f.min,f.max,f.step,d,"px")),...m?{[K(h)]:a("Right",h,g,f)}:{}}:{}})}function Ka(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&he(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const ae="Width";function $a(e,t=zr,n=!0){const o=t.map(r=>({label:qr[r],value:r}));return Z({...n?{_gWidth:T(ae)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(x,{label:s(ae),icon:i(zn,{}),action:n?i(fi,{inherited:l?.inherited??!1,onReset:()=>r(Jr),label:ae}):void 0,children:ve({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ae})})}})}function Xa(){const e=(o,r)=>({type:"custom",render:({value:l,onChange:a})=>i(el,{value:l,onChange:a,view:o,badge:r})}),t=()=>Ce("sectionHeightMode"),n=()=>Ce("sectionHeightMode");return Z({_gHeight:T(J),...v("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(rl,{view:o,onClear:()=>r(void 0)}))),...v("sectionHeightValue",t),...v("sectionHeightUnit",n)})}function el({value:e,onChange:t,view:n,badge:o}){const r=N(),{mode:l,number:a,unit:c}=tl(n,r,e);return i(x,{label:J,icon:X(i(it,{})),action:o?o(t):void 0,children:P("div",{className:"es-width-stack",children:[ve({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:l,onChange:t,ariaLabel:J}),a?i(ol,{view:n,mode:l,menu:c}):null]})})}function qt(e,t){return e==="phone"&&Oe(t)?or(t):nr(t)}function ce(e,t){return e==="desktop"||(e==="tablet"?Oe(t):tr(t))?null:qt(e,t)}function tl(e,t,n){const r=(l=>["auto","fixed","screen"].includes(l))(n)?n:ce(e,t)?.mode??"auto";return{mode:r,number:r!=="auto",unit:r==="fixed"}}function nl(e,t,n,o){const r=ce(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function Jt(e,t,n){const o=B(),r=ce(e,N());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=nl(e,c,t,a);return u===null?{[O(t,e)]:a}:Object.keys(u).length?u:null})}}function ol({view:e,mode:t,menu:n}){const o=B(),r=N(),l=O("sectionHeightValue",e),a=O("sectionHeightUnit",e),c=w=>b=>o?.onChangeMany(()=>({[w]:b})),{followed:u,write:p}=Jt(e,"sectionHeightValue",c(l)),{write:h}=Jt(e,"sectionHeightUnit",c(a)),f=t==="screen"?"%":r[a],d=(u?u.unit:f)==="%"?"%":"px",g=d==="%"?wr:Sr,m=r[l],S=n?{options:["px","%"],label:s("Unit"),onChange:w=>h(w)}:void 0;return V({min:g.min,max:g.max,step:g.step,value:u?null:typeof m=="number"?m:g.fallback,...u?{placeholder:u.value}:{},suffix:d,...S?{units:S}:{},ariaLabel:J,onChange:p})}function rl({view:e,onClear:t}){const n=N(),o=ce(e,n)===null,r=e==="phone"&&Oe(n),l=qt(e,n),a=H(c=>s(c),l.mode==="auto"?s("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(C,{words:y()?.panel,label:s(J),changed:o,detail:a,onReset:t})}function ja(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:a,onChange:c,id:u,name:p})=>i(dl,{value:a,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:a,onChange:c})=>i(al,{value:a,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:a,onChange:c})=>i(cl,{value:a,onChange:c,view:l,intro:t})});return{_gStick:T(ar,{dot:t?sl:Ot}),...v("stickTop",n),...v("stickTopDistance",o),...e.screens?v(Te,r):{},...t?{}:{[dr]:il()},...t||e.above===!1?{}:{[lr]:ll()}}}function il(){const e=j(pr,i(be,{}),fr,cr);return I("desktop",{...e,render:t=>{const n=e.render({...t,value:gr(t.value),onChange:o=>t.onChange(br(o))});return pe(n,{hint:s(ur)})}})}function ll(){const e=en(sr,!1,i(ut,{}),ir);return I("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const sl={any:[Ot,rr]};function Zt(e,t,n,o){const r=B(),l=N(),a=e==="desktop"||ue(e,l)?null:Ge(e,Ee(l,{intro:o}));return{followed:a,write:a&&r?u=>r.onChangeMany(p=>{const h=ul(e,p,u,t,o);return h===null?{[O(t,e)]:u}:Object.keys(h).length?h:null}):n}}function al({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,"stickTopDistance",t,o);return i("div",{className:"sf-field",children:V({min:re.min,max:re.max,step:re.step,value:r?null:typeof e=="number"?e:re.fallback,...r?{placeholder:r.distance}:{},suffix:"px",ariaLabel:s("Distance from top"),onChange:l})})}function cl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,Te,t,o);return i(x,{label:s(It),icon:X(i(it,{})),children:V({min:ee.min,max:ee.max,step:ee.step,value:r?null:sn(e)??ee.default,...r?{placeholder:r.screens}:{},ariaLabel:s(It),onChange:l})})}function ue(e,t){return e==="tablet"?mr(t):hr(t)}function Ge(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,screens:t.desktopScreens}}function ul(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ue(e,t))return null;if(n===void 0)return{};const l=Ge(e,Ee(t,{intro:r})),a=e==="phone"&&ue("tablet",t)?u=>O(u,"tablet"):u=>u,c=(u,p)=>t[a(u)]==null?{}:{[O(u,e)]:p};return{[O("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...c(Te,l.screens),[O(o,e)]:n}}function dl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=N(),a=Ee(l,{intro:r}),c=o==="phone"?a.phone:o==="tablet"?a.tablet:r?a.desktop:e===!0,u=o==="phone"&&a.ownTablet,p=o==="desktop"?null:Ge(o,a),h=p?.on?`${p.distance}px`:s("Off");return i(x,{label:s(_t),labelId:n,icon:X(i(ut,{})),action:P(k,{children:[o!=="desktop"?i(C,{words:y()?.panel,label:s(_t),changed:ue(o,l),detail:H(f=>s(f),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(we,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Qt="e.g. about";function Va(){return{_gAnchor:T("Anchor"),anchor:W({control:"plainText",label:"Name",placeholder:Qt},{type:"custom",render:({value:e,onChange:t})=>i(Rn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:Qt,hideable:!1,markup:!1})})})}}function Ya(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(x,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(Co,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function za(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(x,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(yo,{id:c,value:ln(typeof o=="string"?o:null),onChange:u=>r(u?rn(u):"")})})}}}function en(e,t,n,o){return{type:"custom",...A({},{...le,label:e}),render:r=>{const{value:l,onChange:a,id:c,name:u}=r,p="follows"in r,h=r,f=typeof l=="boolean",d=typeof h.follows=="boolean"?h.follows:t,g=f?l:p?d:t,m=`${c??u??e}-label`,S=h.readOnly===!0,w=i(we,{checked:g,onChange:a,disabled:S,ariaLabelledBy:m});return i(x,{label:s(e),labelId:m,icon:n,hint:o===void 0?void 0:s(o),action:p?P(k,{children:[i(C,{words:y()?.panel,label:s(e),changed:f,detail:h.followsNoView?s(d?"On":"Off"):H(b=>s(b),s(d?"On":"Off"),h.followsView),disabled:S,onReset:()=>a(void 0)}),w]}):w})}}}function qa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(pl,{label:"Background",icon:i(Xn,{}),id:r,value:e,shown:qn(e),onChange:t})}}}function Ja(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ne,{label:s(e),icon:n,value:o||t,onChange:r})}}function pl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:a,n:c}=Ue(),u=ye(o),p=u?oe(u,a,c):null;return i(ne,{label:s(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:l,choices:Me(u??"",a,c,l)})}function Za(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(fl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Me(e,t,n,o){const r=Se(e);return Po(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function fl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Ue(),l=o.background,a=M(l.toUpperCase(),s("Theme {n} background",{n:r})),c=Se(e),u=c?oe(c,o,r):null,p=Me(e,o,r,t),h=n?()=>t(void 0):()=>t("");let f=l,d=a;if(n){const g=Se(n.follows),m=Jn(n.follows),S=g?oe(g,o,r):m?{hex:m,words:m.toUpperCase()}:null;f=S?.hex??l,d=H(w=>s(w),S?S.words:a,n.view)}return u?i(ne,{label:s("Fill"),icon:i(ge,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:d,choices:p}):i(wt,{label:s("Fill"),icon:i(ge,{}),value:e,inherited:f,resetTo:d,onChange:t,onReset:h,choices:p})}function hl(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return ie(n);const r=eo(e,t);if(r.length===0)return null;const l=ie(Ht(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=ie(Ht(r[a].sectionAccent));if(c!==null)return c}return ie(r[0].sectionAccent)}function Ue(){const e=Ft(D().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=Q(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?hl(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:Rr(e.themes[o]),n:o+1}}const ml=[{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 gl({label:e,value:t,onChange:n,points:o=ml}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(So,{label:s(e),value:t,points:r,onChange:n})}function Qa(){return $t()}const ec={top:i(Hn,{}),right:i(Dn,{}),bottom:i(Bn,{}),left:i(vn,{})};function tc(e,t,n,o,r,l,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(m=>m.cell===f);if(!d)return u(`missing-${f}`);const g=l?.[f];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:d})=>{const g=t.some(m=>m.value===f)?f:n;return i(x,{label:s(e),icon:r,value:c(g)?.label?s(c(g).label):a?s(a):"",children:gl({label:e,value:g,onChange:d,points:h})})}}}function nc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(jo,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function oc(e,t,n,o){return{type:"custom",options:t,fallback:n,...A({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(Yo,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function rc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ic=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function lc(e,t,n){const o=Object.keys(je).map(r=>({label:je[r],value:r,picture:n[r]}));return{type:"custom",...A({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Sl,{label:e,icon:t,options:o,onChange:r})}}function bl(e,t,n){const o=an(e,t,n);if(o!==void 0)return o==="save-makes-frame"?s("A frame is made from this video when you save the page."):o==="starts-dark"?s("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?s("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?s("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?s("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?s("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=un(e);return r==="frame-missing-image"?s("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?s("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?s("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?s("No image yet. The slide shows its background colour until you choose one."):void 0}function Sl({label:e,icon:t,options:n,onChange:o}){const r=B(),l=r?.values??{},a=cn(l),c=$e(fn),u=pn(c?.docId??null);let p=null;try{p=Q(f=>f.appState.data)}catch{p=null}const h=dn(r?.id,p,u);return i(x,{label:s(e),icon:X(t),hint:bl(l,h,c?.hasUnsavedEdits??!1),children:ve({options:n,value:a,onChange:o,ariaLabel:e})})}function sc(e,t,n,o={}){const r={type:"custom",[qe]:!0,render:({value:l,onChange:a,name:c})=>i(Xo,{value:l||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?I("each",r):r}const ac={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function wl(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function cc({value:e,onChange:t,label:n}){const o=e||{},r=B(),l=r?r.values!==r.node.props:!0,a=!!o.pending&&l,c=!!o.pending&&!l,u=!!Qr(Zr()).geocode,p=Xe(),h=(f,d)=>t({...o,[f]:d??void 0});return P(k,{children:[i(x,{label:s(n),icon:i(lt,{}),action:u?i(xe,{content:s("Find from the address (OpenStreetMap)"),children:i(bt,{"aria-label":s("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(jn,{})})}):void 0,children:u&&o.status?i(Nn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?s("Finding…"):c?s(No):s(o.status),hint:wl(o)}):null}),i(x,{label:s("Enter by hand"),labelId:p,icon:i(Gn,{}),action:i(we,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:p})}),o.manual&&i(x,{label:s("Latitude, longitude"),icon:i(lt,{}),children:P("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(St,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>h("lat",f),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(St,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>h("lng",f),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function xl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function yl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function uc(e,t){return e===null?null:t>e?e:null}function Cl(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 dc={label:"Ticker items",icon:i($n,{})};function pc(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...A({},{...Ut.textList,label:e}),render:({value:r,onChange:l})=>i(_l,{label:e,icon:X(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function _l({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=z(null),[c,u]=q(null),p=f=>f.map(d=>({text:d?.text??""})),h=f=>{const d=Cl(n,f,c);d===null&&(a.current=null),u(d),r(p(f))};return i(co,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(xt,{target:a,value:xl(n,c),onChange:f=>r(yl(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,d,g)=>i("input",{type:"text",className:l&&c===d?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:d+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,u(d)}})})}function fc(e,t){const n=`${e.label} — row ${t+1}`;return W({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function hc(e){return{_gCards:T("Cards"),coverIndex:j("Cover image",i(Kn,{}),Wo,String(Ko),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ii("Image background",Br),cardImage:tn()}}function mc(){return{outline:j("Card outline",i(Vn,{}),Go,Uo),indexBadge:j("Card number",i(Wn,{}),Ho,Mo),showBadge:en("Product badge",!0,i(dt,{noun:"tag"}))}}function gc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...le,label:de.find(l=>l.id===r).label}),o=r=>A(Ce(We),n(r));return{_gShowOnCard:T("Show on a card"),[We]:A({type:"custom",render:()=>i(Il,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(We)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const We="showCardPrice",de=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Il({rest:e}){const t=N(),n=Ti(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=de.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ke,{parts:de,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(de.map(({id:a})=>[a,void 0])))})}function bc(e,t="display"){const n=K(t);return{[t]:I("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ke,{parts:e,changed:po(o),shown:l=>fo(o,l),onPress:(l,a)=>r(go(o,l,a)),onReset:()=>r(void 0)})}),[n]:I("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Ol,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ke({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:a}){const c=s("Display");return i(x,{label:c,icon:i(kn,{}),changed:t,action:i(C,{words:y()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(uo,{label:c,items:e.map(u=>({id:u.id,label:s(u.label),shown:n(u.id),...a?{disabled:!0,disabledReason:s(a)}:{}})),onChange:o})})}function Ol({parts:e,desktopKey:t,value:n,onChange:o}){const r=N()[t];return i(Ke,{parts:e,changed:mo(n),shown:l=>ho(r,n,l),onPress:(l,a)=>o(bo(n,l,a)),onReset:()=>o(vo),detail:s("the same as Desktop")})}function tn(e=gn){return G("Card image",i(rt,{}),L,et,bn,L,e,{clear:{hint:L},hint:"Rounds the picture. The card's own corner is in Styles."})}function Tl(){return oi(Qe,"cardImage")}function Sc(){return{cardImage:tn(Qe),...Tl()}}function wc(){return He({sidesKey:"cornerSides",step:Sn,useFollowed:()=>L,mark:i(El,{label:wn}),hint:s("Rounds the picture. Left alone it stays square.")})}function El({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:y()?.panel,label:s(e),changed:t,onReset:n})}function xc(){return{type:"custom",render:({value:e,onChange:t})=>i(kl,{value:typeof e=="string"?e:"",onChange:t})}}function Rl({layout:e,width:t}){const n=_n(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:In(e).map(([r,l],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},a))})}const Nl={width:"3.5rem",height:"2.5rem"},Pl=200;function kl({value:e,onChange:t}){const[n,o]=q(null),[r,l]=q(4),a=z(null);on(()=>{const d=a.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>l(d.getBoundingClientRect().width>=Pl?4:3);g();const m=new ResizeObserver(g);return m.observe(d),()=>m.disconnect()},[]);const c=e&&e in te?e:"",u=tt(n,c),p=tt(n,"").length,h=On("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:ii(h,s("Not chosen"))},...u.map(d=>({value:d,label:s(te[d].label),icon:i(Rl,{layout:te[d],width:40})}))];return i(x,{label:s("Layout"),icon:i(Un,{}),value:c?s(te[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ht,{label:s("Layout"),value:c,options:f,onChange:t,columns:r,cell:Nl,header:P("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(ro,{options:[{id:"all",label:s("All")},...yn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:Cn.length})})]})})})})}export{mi as BOUND_TO_POST,ma as BOUND_TO_POST_NOTE,_a as BUCKET_ICONS,ac as CUSTOM_FIELD_MEDIA,cc as CoordsField,Mt as DESKTOP_GAP_NOT_OVERLAP,Ke as DisplayRow,ec as EDGE_ARROWS,_o as FOCAL_DEFAULT,ml as FOCAL_POINTS,fe as FOLD_FIELD_MARKER,gl as FocalPicker,gi as HIGHLIGHT_HINT,U as HidableTextField,ze as LINK_FIELD_MARKER,ra as Label,qe as MEDIA_FIELD_MARKER,ic as MEDIA_TYPE_OPTIONS,ga as NOT_BOUND_TO_POST,Pa as PanelBand,wi as PanelNoteLine,Vi as RowPropsContext,Je as SCAFFOLD_FIELD_MARKER,Ic as SCALAR_TEXT_CONTROLS,si as SiteGapDefaultReset,V as Slider,yi as Swatches,_c as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,dc as TICKER_ITEMS_ROW,_l as TextListField,pl as ThemeFillRow,ae as WIDTH_LABEL,fi as WidthDefaultReset,Cl as aimAfterListChange,Va as anchorFields,M as backTo,ka as backgroundField,va as boxBlockSpacingField,Ga as boxColumnsFields,Za as boxFillField,ji as boxPhoneRowField,Ki as boxShareField,Da as boxSharePhoneField,Ha as boxShareTabletField,hl as boxThemeIndexOf,Ta as bucketHeader,La as buttonWordsEntryField,Ui as cardCornersField,Ii as cardImageBackgroundField,tn as cardImageField,Sc as cardImageFields,hc as cardMediaFields,Ba as cardShapeFields,gc as cardShowFields,mc as cardStyleFields,Ua as cellWidthFields,Ja as colorInput,la as containerDirectionField,ai as containerGapField,ci as containerGapPhoneField,ia as containerGapRows,ui as containerGapTabletField,wl as coordsResultTip,xa as copyText,Xt as cornerSidesField,He as cornersRowField,za as date,Ya as dateTime,Ea as designGroupHeader,bc as displayFields,tc as edgePad,Me as fillSlotChoices,uc as focusAfterRemove,Qa as focusKeptField,Ra as foldMarker,he as foldMetaOf,xi as foldTitleOf,nl as followedHeightPatch,ul as followedStickPatch,xc as galleryLayoutField,Xa as heightFields,ce as heightFollowedBy,tl as heightLayersAt,sa as heroGroupPlacementPoints,Ye as hidableText,Si as hintIsWhileTyping,wc as imageCornersField,ha as inOwnBox,Oa as isBucketHeader,$t as keptBy,ya as linkField,bl as loadingRowHint,lc as loadingShowsField,nc as multiSelect,qa as pageBackgroundField,Ia as panelNote,qi as phoneOverrideField,wa as plainText,Ca as plainTextarea,Oi as pxField,Na as quietMarker,Ve as readHidable,xl as rowText,oc as searchSelect,_i as sectionBandChoices,Pi as sectionCornersField,Fa as sectionShapeFields,Aa as sectionThemeFields,yl as setRowText,Ma as sizeField,rc as sourceField,Wa as spacingFields,ja as stickFields,Ka as swapPadding,ba as text,hn as textFieldIdentifier,ua as textFieldOffPage,pa as textFieldPanelOnly,pc as textList,fc as textListRowField,Sa as textarea,en as toggle,sc as upload,Ti as useSelectedPatch,N as useSelectedProps,F as useSelectedSibling,li as useSiteGapDetail,$a as widthField,fa as withIdentifier,ca as withOffPage,da as withPanelOnly,aa as withScaffold};
|
|
@@ -20,13 +20,10 @@ export declare const SECTION_THEME_FIELD_KEYS: readonly string[];
|
|
|
20
20
|
export declare const SECTION_SHAPE_FIELD_KEYS: readonly string[];
|
|
21
21
|
export declare const SECTION_ANIM_FIELD_KEYS: readonly string[];
|
|
22
22
|
export declare const CARD_MEDIA_FIELD_KEYS: readonly string[];
|
|
23
|
-
export declare const BOUND_CARD_MEDIA_FIELD_KEYS: readonly string[];
|
|
24
|
-
export declare const CARD_STYLE_FIELD_KEYS: readonly string[];
|
|
25
23
|
export declare const CARD_SHOW_FIELD_KEYS: readonly string[];
|
|
26
24
|
export declare const RETIRED: Readonly<Record<string, string>>;
|
|
27
25
|
export declare const PLACE_WORDS: Readonly<Record<Place, readonly string[]>>;
|
|
28
26
|
export declare const INJECTED_RETIRED: Readonly<Record<string, string>>;
|
|
29
|
-
export declare function foldTopTier(fields: Record<string, unknown>): 1 | 2;
|
|
30
27
|
export declare function retiredHeadings(where: string): string[];
|
|
31
28
|
export declare function assignSectionGroups<T extends Record<string, unknown>>(fields: T, where: string): T;
|
|
32
29
|
export declare function seatDesignBucket<T extends Record<string, unknown>>(fields: T): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as A}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const B=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(A()),...Object.keys(A())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...A()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=B.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return B.some(t=>d[t]in e)}function Oe(e){const t=B.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,B as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
1
|
+
import{anchorFields as f,bucketHeader as m,cardMediaFields as N,cardShowFields as Y,designGroupHeader as I,foldMarker as U,foldMetaOf as C,quietMarker as W,heightFields as L,sectionShapeFields as w,sectionThemeFields as E,stickFields as x,widthField as O}from"./controls.js";import{group as z}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as D}from"./box-fields.js";import{deviceField as q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as T}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as J}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";const B=J;function Q(t){return t==="Animation"?"Animation":"Design"}const V="Editor only — not shown live",A={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[V]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function R(t,e,o){const a=`${t}.${e}`;return H[a]??$[a]??A[o]}function he(t,e,o){const a=R(t,e,o);return a?Q(a):void 0}function X(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function S(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=P(a),b=C(h?h.inner:a),l=b?A[b.label]:void 0;if(l)for(const g of X(l))e.includes(g)||e.push(g)}return e}const be=[...S(D({tablet:!0,siteSide:!0}),O("full"),L(),f(),x()),...Object.keys(D({tablet:!0,siteSide:!0})),...Object.keys(O("full")),...Object.keys(L()),...Object.keys(f()),...Object.keys(x())],Ce=[...S(E()),...Object.keys(E())],pe=[...S(w()),...Object.keys(w())],ge=[...S(T()),...Object.keys(T())],ye=Object.keys(N()),ke=Object.keys(Y()),Z={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},G={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},K={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const t={...D({tablet:!0,siteSide:!0}),...O("full"),...L(),...f(),...E(),...w(),...T()};for(const e of Object.keys(K)){const o=C(t[e]),a=o?A[o.label]:void 0;if(!o||o.level!==2||!a||!G[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ee=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),te=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(t=>[p[t],t])]);function ne(t){const e=`${t}.`;return Object.keys(Z).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function oe(t,e){const o=P(t),a=z(e);return o?q(o.tier,a):a}function ae(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?U(e,o.label):W(e):e}function M(t){return t==="Design"?k:["Animation"]}function Se(t,e){const o=[],a=new Set(ne(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ee.has(n))throw new Error(`${e}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=te.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(b=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in K){const s=R(e,n,i.label);if(i.level!==2||!s||!G[s].includes(i.label))throw new Error(`${e}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=R(e,n,i.label);if(!u)throw new Error(`${e}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:oe(r,i.label)]]})}const g=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!g.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const _=b?[]:[...a].filter(n=>!h.has(n));if(_.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(_)}, but this section has no such fold header${_.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const F=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),v=B.filter(n=>M(n).some(r=>F.has(r))),y={};for(const n of v){y[d[n]]=m(n,n===v[0]?v:null);for(const r of M(n)){if(!F.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[p[r]]=I(r));for(const u of i)for(const[s,j]of u.entries)y[s]=ae(r,j)}}return y}function _e(t){return d.Design in t?t:{[d.Design]:m("Design",null),[p.Content]:I("Content"),...t}}function ve(t){return B.some(e=>d[e]in t)}function fe(t){const e=B.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=m(a,a===e[0]?e:null);return o}export{H as BLOCK_KEY_GROUP,B as BUCKETS,d as BUCKET_KEY,ye as CARD_MEDIA_FIELD_KEYS,ke as CARD_SHOW_FIELD_KEYS,k as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,V as EDITOR_ONLY_GROUP,K as INJECTED_RETIRED,$ as KEY_GROUP,A as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,G as PLACE_WORDS,Z as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,Se as assignSectionGroups,he as bucketOf,Q as bucketOfPlace,ve as hasBucketTabs,S as headerKeysOf,X as headerKeysOfPlace,R as placeOf,fe as reseatBucketTabs,ne as retiredHeadings,_e as seatDesignBucket};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SeenEntrance } from "../../../render/components/SectionAnimation.js";
|
|
2
|
-
import {
|
|
2
|
+
import type { MotionView } from "../../../format/lib/animation/views.js";
|
|
3
3
|
import { PART_LIFT_ATTR, type PartMotion } from "../../../render/lib/animation/part-motion.js";
|
|
4
4
|
export { PART_LIFT_ATTR };
|
|
5
5
|
export type SeenPartEntrances = Map<string, SeenEntrance>;
|
|
@@ -7,4 +7,4 @@ type StampedPart = {
|
|
|
7
7
|
element: HTMLElement;
|
|
8
8
|
partKey: string;
|
|
9
9
|
};
|
|
10
|
-
export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, viewOrPhone:
|
|
10
|
+
export declare function paintPartMotion(stamped: readonly StampedPart[], motionOf: (partKey: string) => PartMotion | undefined, viewOrPhone: MotionView | boolean, seen: SeenPartEntrances): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ENTRANCE_ATTR as
|
|
1
|
+
import{ENTRANCE_ATTR as K,playEntrance as g}from"efficient-shell/format";import{entranceReplay as b}from"../../../render/components/SectionAnimation.js";import{entranceOf as h,entranceViews as E}from"../../../render/lib/animation/entrance.js";import{scrollOf as A}from"../../../format/lib/animation/scroll.js";import{PART_LIFT_ATTR as y,drawPartEntrance as M,drawPartScroll as R,ensurePartLiftSheet as P,firstOnPage as x,partBoxOf as _,partMotionDrawn as k}from"../../../render/lib/animation/part-motion.js";const d=new WeakMap;function C(f,s,i,w){const c=typeof i=="boolean"?i?"phone":"desktop":i,p=[],l=new Map;for(const{partKey:e}of f){if(l.has(e))continue;const t=s(e)??{},a=E(t),n=w.get(e),o=n?b.next(n,a,c):null;w.set(e,o?o.seen:b.seed(a)),l.set(e,o?.play??!1)}const u=new Map,T=f.filter(e=>!f.some(t=>t!==e&&t.partKey===e.partKey&&t.element.contains(e.element)));for(const e of T){const t=_(e.element);t&&u.set(t,[...u.get(t)??[],e])}for(const[e,t]of u){const a=r=>k(s(r.partKey)??{}),n=x(t.filter(r=>a(r).entrance));if(n){const r=s(n.partKey)??{};p.push(M(e,h(r,c)));const m=d.get(e);d.set(e,n.partKey),(l.get(n.partKey)||m!==void 0&&m!==n.partKey)&&e.hasAttribute(K)&&g(e)}else d.delete(e);const o=e.hasAttribute(K)?void 0:x(t.filter(r=>A(s(r.partKey)??{},c).effect!=="none"));o&&p.push(R(e,A(s(o.partKey)??{},c))),t.some(r=>a(r).hover==="lift")&&(P(e.ownerDocument),e.setAttribute(y,""),p.push(()=>e.removeAttribute(y)))}return()=>p.forEach(e=>e())}export{y as PART_LIFT_ATTR,C as paintPartMotion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as
|
|
1
|
+
import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as l,heightFields as p,sectionShapeFields as n,sectionThemeFields as F,spacingFields as a,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{LENGTH_UNITS_TABLE as f,rowSay as L,sidesPaddingFields as _}from"../box-fields.js";import{assignSectionGroups as T}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as A}from"../section-own-width-fields.js";import{dropEmptyHeadings as g}from"../panel-drop-empty-headings.js";import{rowsShownForNode as w}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:_,sectionShapeFields:n,cardShapeFields:d,cellWidthFields:l,widthField:c,boxGutterFields:O,sectionOwnWidthFields:A,heightFields:p,anchorFields:m,stickFields:S,sectionThemeFields:F,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:L,lengthUnits:f,...i?{phone:E}:{}}),assignSectionGroups:T,dropEmptyHeadings:g,rowsShownForNode:w,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StoredTextStyle } from "../../../render/lib/text-styles/site-text-styles.js";
|
|
2
2
|
import { type ThemeColors } from "../../../format/lib/theme.js";
|
|
3
|
-
import { type Carried, type Dropped, type
|
|
3
|
+
import { type Carried, type Dropped, type SectionNode, type SiteFacts, type SiteWrite } from "../../../render/lib/sections/section-to-box.js";
|
|
4
4
|
export type DryRunPage = {
|
|
5
5
|
label: string;
|
|
6
6
|
layout: unknown;
|
|
@@ -15,13 +15,7 @@ export type DryRunNode = {
|
|
|
15
15
|
before?: string;
|
|
16
16
|
after?: string;
|
|
17
17
|
sameMarkup?: boolean;
|
|
18
|
-
restyled: Restyled[];
|
|
19
18
|
};
|
|
20
|
-
export declare const BODY_STYLE_PX_AT_DEFAULTS: Readonly<Record<string, number>>;
|
|
21
|
-
export declare function nearestTextStyle(px: number, kind: "heading" | "body", list?: readonly {
|
|
22
|
-
id: string;
|
|
23
|
-
kind: string;
|
|
24
|
-
}[]): string;
|
|
25
19
|
export type SiteWriteOut = (Extract<SiteWrite, {
|
|
26
20
|
kind: "heading-case-upper";
|
|
27
21
|
}> & {
|
|
@@ -133,17 +127,4 @@ export declare function siteWritesFile(report: DryRunReport): {
|
|
|
133
127
|
site: string;
|
|
134
128
|
writes: SiteWriteOut[];
|
|
135
129
|
}[];
|
|
136
|
-
export type BodyStyleRow = {
|
|
137
|
-
type: string;
|
|
138
|
-
key: string;
|
|
139
|
-
textStyle: string;
|
|
140
|
-
oldPx: number;
|
|
141
|
-
oldPhonePx: number;
|
|
142
|
-
newPx: number;
|
|
143
|
-
newPhonePx: number;
|
|
144
|
-
diff: number;
|
|
145
|
-
diffPhone: number;
|
|
146
|
-
nodes: number;
|
|
147
|
-
};
|
|
148
|
-
export declare function bodyStyleRows(report: DryRunReport): BodyStyleRow[];
|
|
149
130
|
export declare function dryRunMarkdown(report: DryRunReport): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{defaultTextStyles as M}from"efficient-easel/text-styles/model";import{headingDefaultPx as L}from"../../../render/components/Heading.js";import{headingLevelOfStyle as z}from"../../../render/components/Text.js";import{migrateLegacyPageData as C}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as j}from"../../../format/lib/document/renamed-props.js";import{listToWrite as F,setStyleValues as I}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as B,bandPresetIndex as W}from"../../../format/lib/theme.js";import{convertSection as H,convertSectionsInPage as Y,sectionToBoxRow as P,sectionToBoxTypes as J}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as U}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as v}from"./hero-ticker-to-strip.js";const E={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function fe(e,t,o=M()){const r=n=>t==="heading"?L(z(n)):E[n];let s;for(const{id:n,kind:d}of o){const i=d===t?r(n):void 0;if(i===void 0)continue;const c=Math.abs(i-e),l=s?Math.abs(s.px-e):1/0;(c<l||c===l&&s&&i>s.px)&&(s={id:n,px:i})}if(!s)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return s.id}function G(e){const[t,o]=e.split("/");return t&&o?{schema:t,site:o}:void 0}function ye(e){const t=r=>typeof r=="string"?r:null,o=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:o,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const V=new Set([null,"authored"]);function q(e,t){const o=F(t),r=o.filter(n=>e.includes(n.id)&&n.values.letterCase===void 0).map(n=>n.id);return{list:r.reduce((n,d)=>I(n,d,{letterCase:"upper"}),o),changed:r.length>0}}function X(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return K(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!V.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:o,changed:r}=q(e.styles,t.textStyles?t.textStylesList??null:null);return r?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:o}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function K(e,t){const o=t?.themePresets;if(!t||!o)return{undecided:"the site's theme presets were not read"};const r=o[e.page];if(!r)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(W(o,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=B(r);return{send:{kind:e.kind,page:e.page,index:o.length,preset:s,themePresets:[...o,s]}}}const O={Hero:v,HeroSingle:e=>{const t=U(e),o=v(t.node),r=s=>s in e.props;return{node:o.node,carried:[...t.carried,...o.carried.filter(s=>r(s.key))],dropped:[...t.dropped,...o.dropped.filter(s=>r(s.key))]}}};function Q(e,t){if(!t.length||!Array.isArray(e.content))return e;let o=!1;const r=e.content.map(s=>!s||!t.includes(s.type)?s:(o=!0,O[s.type](s).node));return o?{...e,content:r}:e}function D(e){const t=e?.content;return Array.isArray(t)?j(C(e)):e}function he(e,t={}){const o=[...t.types??J()],r=o.filter(p=>!P(p)&&!(p in O)),s=new Set(o.filter(p=>p in O)),n=new Set(o.filter(p=>P(p))),d=[],i=[],c={},l={},w=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),$=new Map,f=(p,x,a)=>{const k=`${p.schema}/${p.site}`;let b=$.get(k);b||$.set(k,b={...p,facts:!!x,writes:[],undecided:[],notNeeded:[]});const y=X(a,x);if("send"in y){const g=b.writes.find(_=>JSON.stringify(_.write)===JSON.stringify(y.send));g?g.nodes+=1:b.writes.push({write:y.send,reason:a.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[S,h]="undecided"in y?[b.undecided,y.undecided]:[b.notNeeded,y.notNeeded],u=S.find(g=>g.kind===a.kind&&g.why===h);u?u.nodes+=1:S.push({kind:a.kind,why:h,nodes:1})};for(const p of e){const x=D(p.layout)?.content;Array.isArray(x)&&x.forEach((a,k)=>{if(a&&typeof a.type=="string"&&s.has(a.type)){const m=O[a.type](a),N={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:m.carried,dropped:m.dropped,restyled:[]};t.draw&&(N.before=t.draw(a),N.after=t.draw(m.node),N.sameMarkup=N.before===N.after),d.push(N);const T=c[a.type]??={nodes:0,pages:0,dropped:{}};T.nodes+=1,(l[a.type]??=new Set).add(p.label),T.pages=l[a.type].size;for(const A of m.dropped)T.dropped[A.key]=(T.dropped[A.key]??0)+1;return}if(!a||typeof a.type!="string"||!n.has(a.type))return;const b=P(a.type),y=G(p.label),S=y?w.get(`${y.schema}/${y.site}`):void 0,h=H(a,b,S?{site:S}:{});if(h.skipped!==void 0){i.push({page:p.label,index:k,type:a.type,id:String(a.props?.id??""),why:h.skipped});return}if(y)for(const m of h.siteWrites)f(y,S,m);const u={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:h.carried,dropped:h.dropped,restyled:h.restyled},g=t.draw;g&&(u.before=g(a),u.after=h.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),d.push(u);const _=c[a.type]??={nodes:0,pages:0,dropped:{}};_.nodes+=1,(l[a.type]??=new Set).add(p.label),_.pages=l[a.type].size;for(const m of h.dropped)_.dropped[m.key]=(_.dropped[m.key]??0)+1})}return{types:o,noRow:r,pages:e.length,nodes:d,skipped:i,byType:c,sites:[...$.values()],siteFacts:[...t.sites??[]]}}function ue(e,t){return e.flatMap(o=>{const r=`${t.schema}/${t.siteName(o.site)}/${o.slug}`;return[{label:`${r} (draft)`,layout:o.layout},{label:`${r} (published)`,layout:o.published_layout}]})}function ge(e,t){const o=t.types.filter(s=>P(s)),r=t.types.filter(s=>s in O);return e.map(s=>{const n={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=D(s.layout),i=Array.isArray(d?.content)?d.content:[],c=[],l=[];for(const f of i){if(f&&r.includes(f.type)){c.push({type:f.type,id:String(f.props?.id??"")});continue}if(!f||!o.includes(f.type))continue;const p=String(f.props?.id??""),x=P(f.type).skip?.(f.props);x===void 0?c.push({type:f.type,id:p}):l.push({type:f.type,id:p,why:x})}if(!c.length)return{...n,converted:c,skipped:l};const w=Y(d,o,t.site?{site:t.site}:{}),$=Q(w,r);return{...n,patch:{layout:$,expected_updated_at:s.layout_updated_at},converted:c,skipped:l}})}function me(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(o=>o.write)}))}function Z(e){const t=new Map;for(const o of e.nodes)for(const r of o.restyled){const s=r.textStyle??"none",n=E[s],d=r.size??n,i=r.sizePhone??r.size??n;if(d===void 0||i===void 0)continue;const c=r.was.size,l=r.was.sizePhone??r.was.size,w=[o.type,r.key,s,c,l,d,i].join("|"),$=t.get(w);$?$.nodes+=1:t.set(w,{type:o.type,key:r.key,textStyle:s,oldPx:c,oldPhonePx:l,newPx:d,newPhonePx:i,diff:d-c,diffPhone:i-l,nodes:1})}return[...t.values()]}const R=e=>e>0?`+${e}`:String(e),ee=e=>M().find(t=>t.id===e)?.name??e,te=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function $e(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[s,n]of Object.entries(e.byType)){const d=Object.keys(n.dropped).length;t.push(`| ${s} | ${n.nodes} | ${n.pages} | ${d} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const s=new Map;for(const n of e.skipped){const d=s.get(n.type)??s.set(n.type,new Map).get(n.type);d.set(n.why,(d.get(n.why)??0)+1)}for(const[n,d]of s){t.push("",`## ${n} — skipped (not converted)`,"");for(const[i,c]of d)t.push(`- ×${c}: ${i}`)}}for(const[s,n]of Object.entries(e.byType)){const d=Object.entries(n.dropped);if(!d.length)continue;t.push("",`## ${s} — dropped`,"");const i=new Map;for(const c of e.nodes)if(c.type===s)for(const l of c.dropped)i.set(l.key,l.why);for(const[c,l]of d)t.push(`- \`${c}\` ×${l}: ${i.get(c)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const s=n=>n==null?"—":String(n);for(const n of e.siteFacts)t.push(`| ${n.schema}/${n.site} | ${s(n.ownThemeRow)} | ${n.deleted?"YES":"no"} | ${s(n.headingCase)} | ${s(n.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const s of e.sites){const n=`${s.schema}/${s.site}`,d=s.facts?"yes":"NO";for(const i of s.writes)t.push(`| ${n} | ${d} | ${te(i.write)} | send | ${i.nodes} | ${i.reason} |`);for(const i of s.undecided)t.push(`| ${n} | ${d} | ${i.kind} | UNDECIDED | ${i.nodes} | ${i.why} |`);for(const i of s.notNeeded)t.push(`| ${n} | ${d} | ${i.kind} | not needed | ${i.nodes} | ${i.why} |`)}}const o=Z(e);if(o.length){const s=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],n=i=>`| ${i.type} | \`${i.key}\` | ${i.oldPx} (${i.oldPhonePx}) | ${ee(i.textStyle)} | ${i.newPx} (${i.newPhonePx}) | ${R(i.diff)} (${R(i.diffPhone)}) | ${i.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...s,...o.map(n));const d=o.filter(i=>Math.abs(i.diff)>2||Math.abs(i.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),d.length?t.push(...s,...d.map(n)):t.push("None.")}const r=e.nodes.filter(s=>s.sameMarkup!==void 0);if(r.length){const s=r.filter(n=>n.sameMarkup).length;t.push("",`Markup equal before and after: ${s} of ${r.length} (a hint; the pixels decide).`)}return t.join(`
|
|
1
|
+
import{migrateLegacyPageData as R}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as E}from"../../../format/lib/document/renamed-props.js";import{listToWrite as C,setStyleValues as D}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as L,bandPresetIndex as j}from"../../../format/lib/theme.js";import{convertSection as F,convertSectionsInPage as I,sectionToBoxRow as N,sectionToBoxTypes as H}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as W}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as M}from"./hero-ticker-to-strip.js";function J(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function se(e){const t=n=>typeof n=="string"?n:null,i=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:i,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const z=new Set([null,"authored"]);function B(e,t){const i=C(t),n=i.filter(o=>e.includes(o.id)&&o.values.letterCase===void 0).map(o=>o.id);return{list:n.reduce((o,d)=>D(o,d,{letterCase:"upper"}),i),changed:n.length>0}}function G(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return U(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!z.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:i,changed:n}=B(e.styles,t.textStyles?t.textStylesList??null:null);return n?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:i}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function U(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const n=i[e.page];if(!n)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(j(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=L(n);return{send:{kind:e.kind,page:e.page,index:i.length,preset:s,themePresets:[...i,s]}}}const O={Hero:M,HeroSingle:e=>{const t=W(e),i=M(t.node),n=s=>s in e.props;return{node:i.node,carried:[...t.carried,...i.carried.filter(s=>n(s.key))],dropped:[...t.dropped,...i.dropped.filter(s=>n(s.key))]}}};function Y(e,t){if(!t.length||!Array.isArray(e.content))return e;let i=!1;const n=e.content.map(s=>!s||!t.includes(s.type)?s:(i=!0,O[s.type](s).node));return i?{...e,content:n}:e}function P(e){const t=e?.content;return Array.isArray(t)?E(R(e)):e}function ne(e,t={}){const i=[...t.types??H()],n=i.filter(a=>!N(a)&&!(a in O)),s=new Set(i.filter(a=>a in O)),o=new Set(i.filter(a=>N(a))),d=[],l=[],p={},m={},T=new Map((t.sites??[]).map(a=>[`${a.schema}/${a.site}`,a])),x=new Map,c=(a,$,r)=>{const b=`${a.schema}/${a.site}`;let k=x.get(b);k||x.set(b,k={...a,facts:!!$,writes:[],undecided:[],notNeeded:[]});const u=G(r,$);if("send"in u){const y=k.writes.find(w=>JSON.stringify(w.write)===JSON.stringify(u.send));y?y.nodes+=1:k.writes.push({write:u.send,reason:r.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[S,f]="undecided"in u?[k.undecided,u.undecided]:[k.notNeeded,u.notNeeded],h=S.find(y=>y.kind===r.kind&&y.why===f);h?h.nodes+=1:S.push({kind:r.kind,why:f,nodes:1})};for(const a of e){const $=P(a.layout)?.content;Array.isArray($)&&$.forEach((r,b)=>{if(r&&typeof r.type=="string"&&s.has(r.type)){const g=O[r.type](r),_={page:a.label,index:b,type:r.type,id:String(r.props?.id??""),carried:g.carried,dropped:g.dropped};t.draw&&(_.before=t.draw(r),_.after=t.draw(g.node),_.sameMarkup=_.before===_.after),d.push(_);const A=p[r.type]??={nodes:0,pages:0,dropped:{}};A.nodes+=1,(m[r.type]??=new Set).add(a.label),A.pages=m[r.type].size;for(const v of g.dropped)A.dropped[v.key]=(A.dropped[v.key]??0)+1;return}if(!r||typeof r.type!="string"||!o.has(r.type))return;const k=N(r.type),u=J(a.label),S=u?T.get(`${u.schema}/${u.site}`):void 0,f=F(r,k,S?{site:S}:{});if(f.skipped!==void 0){l.push({page:a.label,index:b,type:r.type,id:String(r.props?.id??""),why:f.skipped});return}if(u)for(const g of f.siteWrites)c(u,S,g);const h={page:a.label,index:b,type:r.type,id:String(r.props?.id??""),carried:f.carried,dropped:f.dropped},y=t.draw;y&&(h.before=y(r),h.after=f.nodes.map(y).join(""),h.sameMarkup=h.before===h.after),d.push(h);const w=p[r.type]??={nodes:0,pages:0,dropped:{}};w.nodes+=1,(m[r.type]??=new Set).add(a.label),w.pages=m[r.type].size;for(const g of f.dropped)w.dropped[g.key]=(w.dropped[g.key]??0)+1})}return{types:i,noRow:n,pages:e.length,nodes:d,skipped:l,byType:p,sites:[...x.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(i=>{const n=`${t.schema}/${t.siteName(i.site)}/${i.slug}`;return[{label:`${n} (draft)`,layout:i.layout},{label:`${n} (published)`,layout:i.published_layout}]})}function re(e,t){const i=t.types.filter(s=>N(s)),n=t.types.filter(s=>s in O);return e.map(s=>{const o={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...o,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=P(s.layout),l=Array.isArray(d?.content)?d.content:[],p=[],m=[];for(const c of l){if(c&&n.includes(c.type)){p.push({type:c.type,id:String(c.props?.id??"")});continue}if(!c||!i.includes(c.type))continue;const a=String(c.props?.id??""),$=N(c.type).skip?.(c.props);$===void 0?p.push({type:c.type,id:a}):m.push({type:c.type,id:a,why:$})}if(!p.length)return{...o,converted:p,skipped:m};const T=I(d,i,t.site?{site:t.site}:{}),x=Y(T,n);return{...o,patch:{layout:x,expected_updated_at:s.layout_updated_at},converted:p,skipped:m}})}function oe(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}const V=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function de(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const o=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${o} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const o=n.get(s.type)??n.set(s.type,new Map).get(s.type);o.set(s.why,(o.get(s.why)??0)+1)}for(const[s,o]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[d,l]of o)t.push(`- ×${l}: ${d}`)}}for(const[n,s]of Object.entries(e.byType)){const o=Object.entries(s.dropped);if(!o.length)continue;t.push("",`## ${n} — dropped`,"");const d=new Map;for(const l of e.nodes)if(l.type===n)for(const p of l.dropped)d.set(p.key,p.why);for(const[l,p]of o)t.push(`- \`${l}\` ×${p}: ${d.get(l)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,o=n.facts?"yes":"NO";for(const d of n.writes)t.push(`| ${s} | ${o} | ${V(d.write)} | send | ${d.nodes} | ${d.reason} |`);for(const d of n.undecided)t.push(`| ${s} | ${o} | ${d.kind} | UNDECIDED | ${d.nodes} | ${d.why} |`);for(const d of n.notNeeded)t.push(`| ${s} | ${o} | ${d.kind} | not needed | ${d.nodes} | ${d.why} |`)}}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
|
|
2
2
|
`)+`
|
|
3
|
-
`}export{
|
|
3
|
+
`}export{O as HERO_MOVES,de as dryRunMarkdown,ne as dryRunSections,B as headingCaseList,re as pageEdits,ie as pagesFromCliExport,se as siteFactsFromRead,J as siteOfLabel,oe as siteWritesFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{convertSection as
|
|
1
|
+
import{convertSection as T,pressesAsBox as f,SECTION_TO_BOX_PRESS as _,sectionToBoxRow as P}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as x,presetFor as k}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as B,TEXT_PRESS_STARTERS as C}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{SECTION_CATALOG as g}from"../../../format/lib/document/section-catalog.js";import{statsBoxSeed as l,statsPressSeed as L,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as w,logosPressStarter as A,paymentPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as X}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{tabBarPressStarter as D}from"../../../render/lib/document/blocks/general/section-to-box-rows-tabbar.js";import{milestoneTimelinePressStarter as G,storyTimelinePressStarter as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as U}from"../../../format/lib/document/seed-parts.js";import{isNodeList as u}from"efficient-easel/data";const M=Object.keys(B),E={Logos:A,DocMasthead:X,DocTabs:D,Timeline:I,TimelineTrack:G},W={PaymentBadges:j,PaymentLogosBlock:w};function S(t,s,r){const o={};for(const n of Object.keys(s(t.type)))o[n]=void 0;for(const[n,e]of Object.entries(t.props))o[n]=u(e)?e.map(p=>S(p,s,r)):e;return o.id=r(t.type),{type:t.type,props:o}}const O=t=>({...t?.theme?{theme:t.theme}:{},press:!0});function b(t,s,r=0,o=()=>({})){return(n,e,p)=>{const{nodes:c}=T({type:t,props:{...n(t),...o(),id:e(t)}},s,O(p));return S(c[r],n,e)}}const Y={Stats:H,Cards:$};function $(){const t=P("Cards");if(!t)return null;const s=b("Cards",t,0,v);return(r,o,n)=>{const e=s(r,o,n);return{...e,props:{...e.props,name:"Cards section"}}}}function H(){const t=P("StatsParagraph");return t?(s,r,o)=>{const{nodes:n}=T({type:"StatsParagraph",props:{...s("StatsParagraph"),...L(),id:r("StatsParagraph")}},t,O(o)),e=n[0],p=u(e.props.content)?e.props.content.filter(m=>m.props?.cardStyle===void 0):[],c=y(l(N(),"table")),i=p.map(h),a=S({...e,props:{...e.props,content:[...i,c]}},s,r);return{...a,props:{...a.props,name:"Stats section"}}}:null}function h(t){return t.props?.name==="Words"?{...t,props:{...t.props,widthFitPhone:"fill"}}:u(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(h)}}:t}const y=t=>U([t],(s,r)=>`${s}-seed-${r}`)[0];function q(t,s){if(!f(t,s))return null;const r=Y[t];if(r)return r();const o=P(t);return o?b(t,o,0,E[t]??C[t]??W[t]):null}function z(t){return(s,r,o)=>{const n=e=>{if(e.type==="Stats"){const i=S(y(l([],"list")),s,r);return{...i,props:{...i.props,name:"Numbers"}}}let p=!1;const c={};for(const[i,a]of Object.entries(e.props))if(u(a)){const m=a.map(n);p||=m.some((d,R)=>d!==a[R]),c[i]=m}else c[i]=a;return p?{type:e.type,props:c}:e};return n(t(s,r,o))}}function ct(t,s=_){const r=k(t);return r?z(r):q(t,s)}const J=t=>g.some(s=>s.key==="structure"&&s.sections.some(r=>r.type===t));function it(){return[...Object.keys(x),...M.filter(t=>f(t)&&!J(t)),...Object.keys(E).filter(t=>f(t))]}export{E as MERGE_LAYOUTS,M as TEXT_LAYOUTS,b as conversionPreset,ct as layoutPresetFor,it as layoutTypes};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ENTRANCE_KEYS: {
|
|
2
|
+
readonly kind: "entrance";
|
|
3
|
+
readonly from: "entranceFrom";
|
|
4
|
+
readonly duration: "entranceDuration";
|
|
5
|
+
readonly delay: "entranceDelay";
|
|
6
|
+
};
|
|
7
|
+
export declare const LEGACY_ENTRANCE_KEY = "sectionAnimation";
|
|
8
|
+
export declare const ENTRANCE_STORE_KEYS: readonly string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{viewStoreKeys as e}from"./views.js";const n={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},o="sectionAnimation",r=e(Object.values(n));export{n as ENTRANCE_KEYS,r as ENTRANCE_STORE_KEYS,o as LEGACY_ENTRANCE_KEY};
|