efficient-web-builder 30.1.1 → 31.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/editor/components/ApplyCornersToSiblings.js +1 -1
  3. package/dist/editor/components/BlogPostSource.js +1 -1
  4. package/dist/editor/components/DuplicateToPageMenu.js +1 -1
  5. package/dist/editor/components/LocationsGroupedField.js +1 -1
  6. package/dist/editor/components/MediaUploadField.js +1 -1
  7. package/dist/editor/components/PagesPanel.js +1 -1
  8. package/dist/editor/components/PartSettingsPanel.js +1 -1
  9. package/dist/editor/components/SectionEditor.d.ts +3 -3
  10. package/dist/editor/components/SectionEditor.js +1 -1
  11. package/dist/editor/components/SectionThemePicker.js +1 -1
  12. package/dist/editor/components/SiteEditorProvider.d.ts +1 -1
  13. package/dist/editor/components/SiteEditorProvider.js +1 -1
  14. package/dist/editor/components/SlotChildRows.d.ts +1 -1
  15. package/dist/editor/components/SlotChildRows.js +1 -1
  16. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  17. package/dist/editor/components/StorefrontEditor.d.ts +1 -1
  18. package/dist/editor/components/StorefrontEditor.js +1 -1
  19. package/dist/editor/components/StorefrontLinkField.js +1 -1
  20. package/dist/editor/components/StylesPanel.js +1 -1
  21. package/dist/editor/components/SwitchToBoxFooter.js +1 -1
  22. package/dist/editor/components/TemplateFieldRow.js +1 -1
  23. package/dist/editor/components/WebsiteScreenParts.d.ts +1 -1
  24. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  25. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  26. package/dist/editor/components/useLocationsTree.d.ts +1 -1
  27. package/dist/editor/components/usePinnedChromeSeed.d.ts +1 -1
  28. package/dist/editor/components/usePinnedChromeSeed.js +1 -1
  29. package/dist/editor/components/usePinnedChromeState.js +1 -1
  30. package/dist/editor/components/useSocialSettings.js +1 -1
  31. package/dist/editor/components/useWebsiteMainAction.d.ts +1 -1
  32. package/dist/editor/components/useWebsiteMainAction.js +1 -1
  33. package/dist/editor/lib/editor-blocks.d.ts +1 -1
  34. package/dist/editor/lib/editor-blocks.js +1 -1
  35. package/dist/editor/lib/editor-document-adapter.d.ts +1 -1
  36. package/dist/editor/lib/editor-document-adapter.js +1 -1
  37. package/dist/editor/lib/geocode.js +1 -1
  38. package/dist/editor/lib/page-live-state.d.ts +1 -1
  39. package/dist/editor/lib/page-rows.js +1 -1
  40. package/dist/editor/lib/puck/add-palette.d.ts +2 -2
  41. package/dist/editor/lib/puck/add-palette.js +1 -1
  42. package/dist/editor/lib/puck/add-target.d.ts +2 -2
  43. package/dist/editor/lib/puck/block-offer.d.ts +1 -1
  44. package/dist/editor/lib/puck/block-offer.js +1 -1
  45. package/dist/editor/lib/puck/blocks/general/ButtonBlock/fields.js +1 -1
  46. package/dist/editor/lib/puck/blocks/general/Flex/fields.js +1 -1
  47. package/dist/editor/lib/puck/blocks/general/Hero/fields.js +1 -1
  48. package/dist/editor/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
  49. package/dist/editor/lib/puck/blocks/general/IntroBleed/fields.js +1 -1
  50. package/dist/editor/lib/puck/blocks/shared-fields.js +1 -1
  51. package/dist/editor/lib/puck/controls.js +1 -1
  52. package/dist/editor/lib/puck/field-groups.d.ts +1 -1
  53. package/dist/editor/lib/puck/field-groups.js +1 -1
  54. package/dist/editor/lib/puck/footer-blocks.d.ts +2 -2
  55. package/dist/editor/lib/puck/footer-blocks.js +1 -1
  56. package/dist/editor/lib/puck/overrides.js +1 -1
  57. package/dist/editor/lib/puck/panel-drop-empty-headings.js +1 -1
  58. package/dist/editor/lib/puck/pinned-seed-gate.d.ts +2 -2
  59. package/dist/editor/lib/puck/pinned-seed-gate.js +1 -1
  60. package/dist/editor/lib/puck/section-text-suppress.js +1 -1
  61. package/dist/editor/lib/puck/section-width-fields.js +1 -1
  62. package/dist/editor/lib/sections/new-section-node.d.ts +1 -1
  63. package/dist/editor/lib/source-rules/part-slider-fills-row.js +1 -1
  64. package/dist/editor/lib/theme-row-persist.d.ts +1 -1
  65. package/dist/editor/lib/theme-row-persist.js +1 -1
  66. package/dist/editor/lib/use-host-products.d.ts +1 -1
  67. package/dist/editor/lib/use-host-products.js +1 -1
  68. package/dist/editor/lib/web-backend.d.ts +5 -5
  69. package/dist/editor/lib/web-backend.js +1 -1
  70. package/dist/editor/lib/website-document-addressing.d.ts +1 -1
  71. package/dist/editor/lib/website-session.d.ts +1 -1
  72. package/dist/editor/lib/website-session.js +1 -1
  73. package/dist/format/lib/content/section-width.js +1 -1
  74. package/dist/format/lib/editor-form-window.d.ts +1 -1
  75. package/dist/format/lib/links/link-picker-setup.d.ts +1 -1
  76. package/dist/render/lib/editor-auth.js +1 -1
  77. package/dist/render/lib/editor-session-loader.js +1 -1
  78. package/dist/render/lib/editor-site.js +1 -1
  79. package/dist/render/lib/logo/analyze-logo-client.js +1 -1
  80. package/dist/render/lib/media.js +1 -1
  81. package/dist/render/lib/puck/passes/section-width.js +1 -1
  82. package/dist/render/lib/puck/slot-specs.d.ts +2 -2
  83. package/package.json +1 -1
  84. package/dist/editor/components/AddBlockRow.d.ts +0 -1
  85. package/dist/editor/components/AddBlockRow.js +0 -1
  86. package/dist/editor/components/AddChildRow.d.ts +0 -1
  87. package/dist/editor/components/AddChildRow.js +0 -1
  88. package/dist/editor/components/AddSidePanel.d.ts +0 -2
  89. package/dist/editor/components/AddSidePanel.js +0 -1
  90. package/dist/editor/components/EditorScreenMount.d.ts +0 -1
  91. package/dist/editor/components/EditorScreenMount.js +0 -1
  92. package/dist/editor/components/EditorStoreProvider.d.ts +0 -1
  93. package/dist/editor/components/EditorStoreProvider.js +0 -1
  94. package/dist/editor/components/MediaSidePanel.d.ts +0 -1
  95. package/dist/editor/components/MediaSidePanel.js +0 -1
  96. package/dist/editor/components/NodeContextMenu.d.ts +0 -2
  97. package/dist/editor/components/NodeContextMenu.js +0 -1
  98. package/dist/editor/components/PageEditGuardNotices.d.ts +0 -1
  99. package/dist/editor/components/PageEditGuardNotices.js +0 -1
  100. package/dist/editor/components/PanelToggleIcon.d.ts +0 -1
  101. package/dist/editor/components/PanelToggleIcon.js +0 -1
  102. package/dist/editor/components/PreviewPartsContext.d.ts +0 -1
  103. package/dist/editor/components/PreviewPartsContext.js +0 -1
  104. package/dist/editor/components/SectionEditorShell.d.ts +0 -1
  105. package/dist/editor/components/SectionEditorShell.js +0 -1
  106. package/dist/editor/components/SidePanelHead.d.ts +0 -1
  107. package/dist/editor/components/SidePanelHead.js +0 -1
  108. package/dist/editor/components/SlotChildActionsContext.d.ts +0 -2
  109. package/dist/editor/components/SlotChildActionsContext.js +0 -1
  110. package/dist/editor/components/StorefrontDocumentContext.d.ts +0 -2
  111. package/dist/editor/components/StorefrontDocumentContext.js +0 -1
  112. package/dist/editor/components/StorefrontEditorChrome.d.ts +0 -1
  113. package/dist/editor/components/StorefrontEditorChrome.js +0 -1
  114. package/dist/editor/components/panel-widths.d.ts +0 -2
  115. package/dist/editor/components/panel-widths.js +0 -1
  116. package/dist/editor/components/usePartBridge.d.ts +0 -1
  117. package/dist/editor/components/usePartBridge.js +0 -1
  118. package/dist/editor/lib/client-only.d.ts +0 -1
  119. package/dist/editor/lib/client-only.js +0 -1
  120. package/dist/editor/lib/editor-admin-bridge.d.ts +0 -2
  121. package/dist/editor/lib/editor-admin-bridge.js +0 -1
  122. package/dist/editor/lib/editor-backend-error.d.ts +0 -2
  123. package/dist/editor/lib/editor-backend-error.js +0 -1
  124. package/dist/editor/lib/editor-chrome.d.ts +0 -2
  125. package/dist/editor/lib/editor-chrome.js +0 -1
  126. package/dist/editor/lib/editor-document-addressing.d.ts +0 -2
  127. package/dist/editor/lib/editor-document-addressing.js +0 -1
  128. package/dist/editor/lib/editor-document-switch.d.ts +0 -2
  129. package/dist/editor/lib/editor-document-switch.js +0 -1
  130. package/dist/editor/lib/editor-failure.d.ts +0 -1
  131. package/dist/editor/lib/editor-failure.js +0 -1
  132. package/dist/editor/lib/editor-host-inbound.d.ts +0 -1
  133. package/dist/editor/lib/editor-host-inbound.js +0 -1
  134. package/dist/editor/lib/editor-host.d.ts +0 -2
  135. package/dist/editor/lib/editor-host.js +0 -1
  136. package/dist/editor/lib/editor-key-scope.d.ts +0 -1
  137. package/dist/editor/lib/editor-key-scope.js +0 -1
  138. package/dist/editor/lib/editor-load-error.d.ts +0 -1
  139. package/dist/editor/lib/editor-load-error.js +0 -1
  140. package/dist/editor/lib/editor-media-panel.d.ts +0 -2
  141. package/dist/editor/lib/editor-media-panel.js +0 -1
  142. package/dist/editor/lib/editor-media-picker.d.ts +0 -2
  143. package/dist/editor/lib/editor-media-picker.js +0 -1
  144. package/dist/editor/lib/editor-page-lock.d.ts +0 -1
  145. package/dist/editor/lib/editor-page-lock.js +0 -1
  146. package/dist/editor/lib/editor-screen.d.ts +0 -2
  147. package/dist/editor/lib/editor-screen.js +0 -1
  148. package/dist/editor/lib/editor-section-templates.d.ts +0 -1
  149. package/dist/editor/lib/editor-section-templates.js +0 -1
  150. package/dist/editor/lib/editor-session-context.d.ts +0 -1
  151. package/dist/editor/lib/editor-session-context.js +0 -1
  152. package/dist/editor/lib/editor-theme.d.ts +0 -1
  153. package/dist/editor/lib/editor-theme.js +0 -1
  154. package/dist/editor/lib/puck/block-choice.d.ts +0 -2
  155. package/dist/editor/lib/puck/block-choice.js +0 -1
  156. package/dist/editor/lib/puck/block-types-in.d.ts +0 -1
  157. package/dist/editor/lib/puck/block-types-in.js +0 -1
  158. package/dist/editor/lib/puck/device-fields.d.ts +0 -2
  159. package/dist/editor/lib/puck/device-fields.js +0 -1
  160. package/dist/editor/lib/puck/field-buckets.d.ts +0 -2
  161. package/dist/editor/lib/puck/field-buckets.js +0 -1
  162. package/dist/editor/lib/puck/field-markers.d.ts +0 -2
  163. package/dist/editor/lib/puck/field-markers.js +0 -1
  164. package/dist/editor/lib/puck/palette-sections.d.ts +0 -2
  165. package/dist/editor/lib/puck/palette-sections.js +0 -1
  166. package/dist/editor/lib/puck/panel-fields.d.ts +0 -2
  167. package/dist/editor/lib/puck/panel-fields.js +0 -1
  168. package/dist/editor/lib/puck/panel-no-control-mark.d.ts +0 -2
  169. package/dist/editor/lib/puck/panel-no-control-mark.js +0 -1
  170. package/dist/editor/lib/puck/preview-click.d.ts +0 -1
  171. package/dist/editor/lib/puck/preview-click.js +0 -1
  172. package/dist/editor/lib/puck/preview-dom.d.ts +0 -1
  173. package/dist/editor/lib/puck/preview-dom.js +0 -1
  174. package/dist/editor/lib/puck/section-doc.d.ts +0 -1
  175. package/dist/editor/lib/puck/section-doc.js +0 -1
  176. package/dist/editor/lib/puck/slot-heal.d.ts +0 -1
  177. package/dist/editor/lib/puck/slot-heal.js +0 -1
  178. package/dist/editor/lib/puck/style-clipboard.d.ts +0 -1
  179. package/dist/editor/lib/puck/style-clipboard.js +0 -1
  180. package/dist/editor/lib/puck/tree-reveal.d.ts +0 -1
  181. package/dist/editor/lib/puck/tree-reveal.js +0 -1
  182. package/dist/editor/lib/puck/use-section-ops.d.ts +0 -2
  183. package/dist/editor/lib/puck/use-section-ops.js +0 -1
  184. package/dist/format/lib/editor-document-contract.d.ts +0 -1
  185. package/dist/format/lib/editor-document-contract.js +0 -0
  186. package/dist/format/lib/editor-document-hooks.d.ts +0 -1
  187. package/dist/format/lib/editor-document-hooks.js +0 -0
  188. package/dist/format/lib/links/link-filters.d.ts +0 -1
  189. package/dist/format/lib/links/link-filters.js +0 -0
  190. package/dist/format/lib/puck/add-target-types.d.ts +0 -1
  191. package/dist/format/lib/puck/add-target-types.js +0 -0
  192. package/dist/format/lib/puck/slot-section-spec.d.ts +0 -1
  193. package/dist/format/lib/puck/slot-section-spec.js +0 -0
  194. package/dist/format/lib/section-template-types.d.ts +0 -1
  195. package/dist/format/lib/section-template-types.js +0 -0
  196. package/dist/render/components/PreviewDeviceContext.d.ts +0 -2
  197. package/dist/render/components/PreviewDeviceContext.js +0 -1
  198. package/dist/render/components/UiIcon.d.ts +0 -2
  199. package/dist/render/components/UiIcon.js +0 -1
  200. package/dist/render/lib/content/view-tiers.d.ts +0 -2
  201. package/dist/render/lib/content/view-tiers.js +0 -1
  202. package/dist/render/lib/editor-session.d.ts +0 -2
  203. package/dist/render/lib/editor-session.js +0 -1
  204. package/dist/render/lib/puck/content-tree.d.ts +0 -2
  205. package/dist/render/lib/puck/content-tree.js +0 -1
  206. package/dist/render/lib/puck/hidable.d.ts +0 -2
  207. package/dist/render/lib/puck/hidable.js +0 -1
  208. package/dist/render/lib/puck/slot-child-name.d.ts +0 -2
  209. package/dist/render/lib/puck/slot-child-name.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as k,Fragment as T}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as W,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ht}from"efficient-easel/draw";import mt from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as ye}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Tt,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import Rt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as wt,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as Nt,BlockSectionIcon as At,CartIcon as vt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Te,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Le}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Ne,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ae}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as h,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as hn,SettingsSidesEach as Fe,sidesStartEach as mn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Tn,withPhonePart as Rn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as On,Checkbox as wn,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Ln,PictureTiles as Be,Slider as Nn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as An}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as vn,NoControlMark as re,noControlField as q}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as Fn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Dn,phoneKey as F,resolvePhoneValue as ie}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Bn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Hn,CARD_OUTLINE_OPTIONS as Gn,DEFAULT_CARD_INDEX_FORMAT as Mn,DEFAULT_CARD_OUTLINE as Kn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Wn,DEFAULT_COVER_INDEX as Un}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Xn}from"efficient-easel/draw";import $n from"../../components/MediaUploadField.js";import jn from"../../components/MultiSelectField.js";import zn from"../../components/SectionThemePicker.js";import Vn from"../../components/SearchSelectField.js";import Yn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as qn,resolveSectionMinHeight as Jn}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Zn,resolveSectionStick as Qn}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as eo,SECTION_MIN_HEIGHT_GROUP_LABEL as X,SECTION_SCREEN_PCT as to}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as no,containerDirectionPoints as oo,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as ro,BOX_BLOCK_SPACING_LABEL as io,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as lo,BOX_PHONE_ROW_MAX as ao,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as so,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as co}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as uo,normalizeTheme as po,siteButtonPaint as fo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as ho,GAP_FIELD_CONTAINER as mo,hasOwnContainerGap as go,resolveContainerGap as bo}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as xo,CARD_IMAGE_BG_OFF as So,CARD_IMAGE_BG_SWATCH_NAMES as yo,CARD_IMAGE_BG_SWATCHES as Co,isCardImageBackgroundInheriting as _o,cardImageBackgroundChoice as Io,THEME_CARD_IMAGE_BG as Eo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as To,SECTION_BG_SWATCHES as Ro,SECTION_BG_SWATCH_NAMES as Oo,THEME_SECTION_BG as wo,isSectionBackgroundInheriting as Po}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as ko}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Lo,TYPE_SIZE_INHERIT as No,isTypeSizeInheriting as Ao}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as vo,WIDTH_CHOICE_LABEL as Fo,WIDTH_INHERIT as Do,resolveWidth as Bo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Ho}from"efficient-easel/style-clipboard";function B(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Ho(n,`section:${t}`);return e}function Yi({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Go(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Mo(e){return e.type===qe}function w(e){return Mo(e)?void 0:e}function L(e,t){return l("{value} from {from}",{value:e,from:t})}function Ko(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Bo(t,"full");return n==="page"?L(`${o}px`,l("the page")):n==="contained"?L(l("Contained"),l("the page")):L(l("Full"),l("the page"))}function Wo(){const{blockGap:e}=D();return e===null?l("this container's own spacing"):L(`${e}px`,l("Site styles"))}function Uo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Wo(),onReset:t})}function Xo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ko(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=he(e),f=ne(null),p=ne(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ft(),_=i?qo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Rt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(tn,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function qi(e,t){return{...e,[xe]:t}}function Ji(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Zi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function Qi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function el(e){return!!e&&typeof e=="object"&&e[Je]===!0}function tl(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 xa,SCALAR_TEXT_CONTROLS as Sa}from"efficient-easel/draw";function nl(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[vn]:o,...i}=e;return{...i,[Fn]:!0,render:t}}const $o=new Set(Xn),G=(e,t)=>{const n={...t,[I]:e};if(!$o.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Bn,{name:i.name,children:o(i)})}},ol="Everything else on this block comes from the linked post. Unlink it to edit by hand.",jo={field:"source.slug",set:!0},rl={not:jo},zo="Select a word, then press the highlighter.",Vo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",Yo=new Set([zo]),qo=e=>Yo.has(e);function il(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ll(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Jo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function al(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function sl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Yn,{value:me(t),onChange:n,label:e})}}function cl(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const dl={Design:Ot,Animation:_e};function ul(e,t){return e.includes("Design")?t!=="Design":null}function Zo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function Qo({level:e,label:t}){return e===1?r(Zo,{label:t}):r(nr,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Qo,{level:t,label:e})}}function y(e){return Ze(e,2)}function pl(e){return{type:"custom",render:()=>r(er,{text:e})}}function er({text:e}){return r("p",{className:"sf-note",children:l(e)})}function fl(e){return Ze(e,1)}function hl(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function ml(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function gl(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function bl(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function tr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function xl(e,t){return tr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function Sl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function nr({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function yl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Po(n,t);return r(h,{label:l(e),icon:r(Lt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(To)}),children:tt({swatches:Ro,current:i?wo:n??t??"",onPick:o,names:Oo})})}}}function or(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=_o(i,t);return r(h,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(xo)}),children:tt({swatches:Co,current:a?Eo:Io(i,t),onPick:o,names:yo})})}}}function Cl(e=n=>n,t){return B({_gSectionTheme:y(ko),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(zn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Nn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:w(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?w(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function _l(e){const t=K("Gap",r(Ee,{}),se.min,se.max,se.step,ho[e],"px",(n,o)=>r(Uo,{inherited:!go(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[mo]:e,render:n=>t.render({...n,value:bo(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function ce(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(rr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function rr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ae(a)??[...Ne];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ae(d)??[];c(u.length===Ne.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return q({type:"custom",render:()=>r(re,{})},"always")}function ir({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):L(i,l("Site styles")),onReset:n})}function lr(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:v}function ar(){return ce({sidesKey:"sectionCornerSides",useFollowed:lr,useClosedReason:()=>lt()?l(it):null,mark:r(ir,{label:Z}),hint:r(sr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(N())}function sr(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Il(){return B({_gShape:y("Shape"),sectionCorners:ar(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const cr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function dr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ur(){let e;try{const t=po(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||uo.line}function pr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=ur(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=cr();return r(h,{label:l("Border"),icon:r(Nt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(dr(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:co})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(pr,{value:t,onChange:n,tier:e})})}function El(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?ve(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=D(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?ve(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return an(a)?a:o}function fr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(v),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:L(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function hr(){return r(T,{children:de()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function mr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(v),mark:r(fr,{label:Z}),hint:r(hr,{})})}function gr(){return{type:"custom",render:()=>r(mt,{})}}function Tl(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Rl(){return{_gShape:y("Shape"),cardCorners:mr(),cardCornerSides:rt(),cardCornersApplyAll:gr()}}function Ol(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function wl(){return P("Item alignment",r(wt,{}),ro,"stretch")}function Pl(){return P(so,r(on,{}),ze,ze[0].value)}function kl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(h,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:ae.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:br(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function br(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 Ll(){return P(io,r(Ee,{}),Ue,Ue[0].value)}function Nl(){return K(lo,r(Yt,{}),$e,ao,1,$e)}function Al(e){const t=ue(no,Go("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),oo(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function vl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Le,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Ao(c),detail:l("the Text style in Site styles"),onReset:()=>s(No),defaultAction:{onPress:()=>s(Lo),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Fl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null;try{e=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function xr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=N()[c],u=ie(void 0,d,s);return r(T,{children:M({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function Sr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=N()[t],c=ie(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function yr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Sr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(xr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Dl(e){return{type:"custom",render:({value:t,onChange:n})=>r(_r,{...e,value:t,onChange:n})}}function Cr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:w(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function _r({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=N()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Cr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Ir={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Er={Top:Pe,Bottom:Re,Left:Oe,Right:we},Tr=e=>{const t=Er[e];return r(t,{})};function Bl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Ir[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,te=E)=>g("mobile",yr({label:i(_),icon:Tr(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,R=_=>C?g("desktop",_):_;return B({...o?{_gSpacing:y("Padding")}:{},[t]:R(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:R(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Rr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Or(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function wr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>mn(a,c));return r(h,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Or(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Hl(e={}){const t={...Rr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,F(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(wr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return B({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Pr={contained:"Contained",page:"Page",full:"Full"},Q="Width";function Gl(e,t=vo,n=!0){const o=t.map(i=>({label:Fo[i]??Pr[i],value:i}));return B({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Q),icon:r(nn,{}),action:n?r(Xo,{inherited:a?.inherited??!1,onReset:()=>i(Do),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Ml(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:X,icon:w(r($t,{})),action:o?o(a):void 0,children:ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:X})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?to:eo;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:X,onChange:i})})}}),n=()=>ue("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return B({_gHeight:y(X),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(kr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function kr({onClear:e}){const t=N(),n=qn(t),o=Jn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(X),changed:n,detail:i,onReset:e})}function Kl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Lr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(le),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Lr({value:e,onChange:t,labelId:n,phone:o}){const i=N(),a=Qn(i),c=o?a.phone:e===!0;return r(h,{label:l(le),labelId:n,icon:w(r(Zt,{})),action:k(T,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Zn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Wl(){return{_gAnchor:y("Anchor"),anchor:Jo("Anchor name","e.g. about",Vo)}}function Ul(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function A(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Xl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function $l(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(wn,{id:c,checked:a,onChange:o})})}}}const jl={follows:"fill"},zl={follows:"ink"};function Vl(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Nr,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Nr({label:e,part:t,icon:n,value:o,onChange:i}){const a=fo(D().theme),c=t==="fill"?a.fill:a.ink;return r(An,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:L(c.toUpperCase(),l("Site styles")),onChange:i,onReset:()=>i("")})}const Ar=[{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 dt({label:e,value:t,onChange:n,points:o=Ar}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function Yl(){return q({type:"custom",render:()=>r(re,{})},"always")}const vr=Ce([]);function ql(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Fr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:vr})}}}function Fr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Tt(t),onChange:n,points:o})})}const Jl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function Zl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:dt({label:e,value:m,onChange:p,points:u})})}}}const Dr="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:w(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Dr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Ql(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(jn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ea(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Vn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ta(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ee({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const na=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:w(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function oa(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r($n,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const ra={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ia({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(h,{label:l(n),icon:r(oe,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(h,{label:l("Longitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function Br(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Hr(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function la(e,t){return e===null?null:t>e?e:null}function Gr(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 aa={label:"Ticker items",icon:r(zt,{})};function sa(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Mr,{label:e,icon:w(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Mr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ne(null),[s,d]=z(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Gr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Br(n,s),onChange:p=>i(Hr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function ca(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:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function da(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Wn,String(Un),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:or("Image background",So),cardImage:Wr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function ua(){return{outline:P("Card outline",r(en,{}),Gn,Kn),indexBadge:P("Card number",r(Te,{}),Hn,Mn),showBadge:A("Product badge",!0,r(Le,{noun:"tag"}))}}function pa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:A("Price",!0,r(Kt,{})),showCardFinishes:A("Finish swatches",!0,r(Wt,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Jt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(vt,{})),showCardPage:A("Page button",n.showCardPage,r(ke,{}))}}function fa(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Kr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Kr({parts:e,desktopKey:t,value:n,onChange:o}){const i=N()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Rn(n,a,c)),onReset:()=>o(Dn),detail:l("the same as Desktop")})}function Wr(){return nt("Card image",{min:v,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function ha(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>v,mark:r(Ur,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Ur({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ma(){return{type:"custom",render:({value:e,onChange:t})=>r(Xr,{value:typeof e=="string"?e:"",onChange:t})}}function Xr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return k(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Ft,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Vo as ANCHOR_HINT,jo as BOUND_TO_POST,ol as BOUND_TO_POST_NOTE,dl as BUCKET_ICONS,ra as CUSTOM_FIELD_MEDIA,ia as CoordsField,Jl as EDGE_ARROWS,Ln as FOCAL_DEFAULT,Ar as FOCAL_POINTS,V as FOLD_FIELD_MARKER,jl as FOLLOWS_SITE_BUTTON,zl as FOLLOWS_SITE_BUTTON_INK,dt as FocalPicker,nr as GroupLabel,zo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,Yi as Label,be as MEDIA_FIELD_MARKER,na as MEDIA_TYPE_OPTIONS,rl as NOT_BOUND_TO_POST,er as PanelNoteLine,_r as PhoneChoiceRow,Cr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Sa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Rr as SIDE_PAD_KEYS,Zo as SectionHeading,ee as Segmented,Uo as SiteGapDefaultReset,M as Slider,tt as Swatches,xa as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,aa as TICKER_ITEMS_ROW,Mr as TextListField,Xo as WidthDefaultReset,Gr as aimAfterListChange,Wl as anchorFields,L as backTo,yl as backgroundField,wl as boxAlignField,Ll as boxBlockSpacingField,Ol as boxJustifyField,Nl as boxPhoneRowField,kl as boxShareField,Pl as boxWrapField,ml as bucketHeader,mr as cardCornersField,or as cardImageBackgroundField,Wr as cardImageField,da as cardMediaFields,Rl as cardShapeFields,pa as cardShowFields,ua as cardStyleFields,Fl as cellWidthFields,$l as checkbox,Vl as colorInput,al as copyText,rt as cornerSidesField,ce as cornersRowField,Ul as dateTime,bl as designGroupHeader,Al as directionField,fa as displayFields,Zl as edgePad,ul as entriesHiddenForTab,la as focusAfterRemove,Yl as focusKeptField,xl as foldMarker,Y as foldMetaOf,tr as foldTitleOf,ma as galleryLayoutField,_l as gapField,y as group,Ml as heightFields,me as hidableText,qo as hintIsWhileTyping,w as iconOf,ha as imageCornersField,nl as inOwnBox,hl as isBucketHeader,gl as isDesignGroupHeader,Mo as isNoGlyph,sl as linkField,Ql as multiSelect,Go as noGlyph,Xl as pageBackgroundField,pl as panelNote,Dl as phoneChoiceField,yr as phoneOverrideField,ql as placementField,Jo as plainText,cl as plainTextarea,nt as pxField,Sl as quietMarker,he as readHidable,Br as rowText,ea as searchSelect,fl as section,El as sectionAnimationFields,at as sectionBorderField,ar as sectionCornersField,Il as sectionShapeFields,Cl as sectionThemeFields,ue as segmented,P as select,Hr as setRowText,B as sharedStyleKinds,Hl as sidesPaddingFields,Or as sidesPaddingPatch,vl as sizeField,K as slider,ta as sourceField,Bl as spacingFields,Kl as stickFields,Tl as templateField,il as text,ht as textFieldIdentifier,Zi as textFieldOffPage,el as textFieldPanelOnly,sa as textList,ca as textListRowField,ll as textarea,A as toggle,oa as upload,Ko as usePageWidthDetail,N as useSelectedProps,ot as useSelectedSibling,Wo as useSiteGapDetail,Gl as widthField,tl as withIdentifier,Ji as withOffPage,Qi as withPanelOnly,qi as withScaffold};
1
+ "use client";import{jsx as r,jsxs as k,Fragment as T}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as W,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ht}from"efficient-easel/draw";import mt from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as ye}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Tt,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import Rt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as wt,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as Nt,BlockSectionIcon as At,CartIcon as vt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Te,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Le}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Ne,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ae}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as h,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as hn,SettingsSidesEach as Fe,sidesStartEach as mn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Tn,withPhonePart as Rn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as On,Checkbox as wn,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Ln,PictureTiles as Be,Slider as Nn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as An}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as vn,NoControlMark as re,noControlField as q}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{OWN_BOX_FIELD as Fn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Dn,phoneKey as F,resolvePhoneValue as ie}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Bn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Hn,CARD_OUTLINE_OPTIONS as Gn,DEFAULT_CARD_INDEX_FORMAT as Mn,DEFAULT_CARD_OUTLINE as Kn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Wn,DEFAULT_COVER_INDEX as Un}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Xn}from"efficient-easel/draw";import $n from"../../components/MediaUploadField.js";import jn from"../../components/MultiSelectField.js";import zn from"../../components/SectionThemePicker.js";import Vn from"../../components/SearchSelectField.js";import Yn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as qn,resolveSectionMinHeight as Jn}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Zn,resolveSectionStick as Qn}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as eo,SECTION_MIN_HEIGHT_GROUP_LABEL as X,SECTION_SCREEN_PCT as to}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as no,containerDirectionPoints as oo,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as ro,BOX_BLOCK_SPACING_LABEL as io,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as lo,BOX_PHONE_ROW_MAX as ao,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as so,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as co}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as uo,normalizeTheme as po,siteButtonPaint as fo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as ho,GAP_FIELD_CONTAINER as mo,hasOwnContainerGap as go,resolveContainerGap as bo}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as xo,CARD_IMAGE_BG_OFF as So,CARD_IMAGE_BG_SWATCH_NAMES as yo,CARD_IMAGE_BG_SWATCHES as Co,isCardImageBackgroundInheriting as _o,cardImageBackgroundChoice as Io,THEME_CARD_IMAGE_BG as Eo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as To,SECTION_BG_SWATCHES as Ro,SECTION_BG_SWATCH_NAMES as Oo,THEME_SECTION_BG as wo,isSectionBackgroundInheriting as Po}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as ko}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Lo,TYPE_SIZE_INHERIT as No,isTypeSizeInheriting as Ao}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as vo,WIDTH_CHOICE_LABEL as Fo,WIDTH_INHERIT as Do,resolveWidth as Bo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Ho}from"efficient-easel/style-clipboard";function B(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Ho(n,`section:${t}`);return e}function Yi({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Go(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Mo(e){return e.type===qe}function w(e){return Mo(e)?void 0:e}function L(e,t){return l("{value} from {from}",{value:e,from:t})}function Ko(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Bo(t,"full");return n==="page"?L(`${o}px`,l("the page")):n==="contained"?L(l("Contained"),l("the page")):L(l("Full"),l("the page"))}function Wo(){const{blockGap:e}=D();return e===null?l("this container's own spacing"):L(`${e}px`,l("Site styles"))}function Uo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Wo(),onReset:t})}function Xo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ko(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=he(e),f=ne(null),p=ne(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ft(),_=i?qo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Rt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(tn,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function qi(e,t){return{...e,[xe]:t}}function Ji(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Zi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function Qi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function el(e){return!!e&&typeof e=="object"&&e[Je]===!0}function tl(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 xa,SCALAR_TEXT_CONTROLS as Sa}from"efficient-easel/draw";function nl(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[vn]:o,...i}=e;return{...i,[Fn]:!0,render:t}}const $o=new Set(Xn),G=(e,t)=>{const n={...t,[I]:e};if(!$o.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Bn,{name:i.name,children:o(i)})}},ol="Everything else on this block comes from the linked post. Unlink it to edit by hand.",jo={field:"source.slug",set:!0},rl={not:jo},zo="Select a word, then press the highlighter.",Vo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",Yo=new Set([zo]),qo=e=>Yo.has(e);function il(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ll(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Jo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function al(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function sl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Yn,{value:me(t),onChange:n,label:e})}}function cl(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const dl={Design:Ot,Animation:_e};function ul(e,t){return e.includes("Design")?t!=="Design":null}function Zo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function Qo({level:e,label:t}){return e===1?r(Zo,{label:t}):r(nr,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Qo,{level:t,label:e})}}function y(e){return Ze(e,2)}function pl(e){return{type:"custom",render:()=>r(er,{text:e})}}function er({text:e}){return r("p",{className:"sf-note",children:l(e)})}function fl(e){return Ze(e,1)}function hl(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function ml(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function gl(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function bl(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function tr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function xl(e,t){return tr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function Sl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function nr({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function yl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Po(n,t);return r(h,{label:l(e),icon:r(Lt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(To)}),children:tt({swatches:Ro,current:i?wo:n??t??"",onPick:o,names:Oo})})}}}function or(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=_o(i,t);return r(h,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(xo)}),children:tt({swatches:Co,current:a?Eo:Io(i,t),onPick:o,names:yo})})}}}function Cl(e=n=>n,t){return B({_gSectionTheme:y(ko),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(zn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Nn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:w(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?w(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function _l(e){const t=K("Gap",r(Ee,{}),se.min,se.max,se.step,ho[e],"px",(n,o)=>r(Uo,{inherited:!go(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[mo]:e,render:n=>t.render({...n,value:bo(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function ce(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(rr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function rr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ae(a)??[...Ne];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ae(d)??[];c(u.length===Ne.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return q({type:"custom",render:()=>r(re,{})},"always")}function ir({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):L(i,l("Site styles")),onReset:n})}function lr(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:v}function ar(){return ce({sidesKey:"sectionCornerSides",useFollowed:lr,useClosedReason:()=>lt()?l(it):null,mark:r(ir,{label:Z}),hint:r(sr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(N())}function sr(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Il(){return B({_gShape:y("Shape"),sectionCorners:ar(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const cr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function dr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ur(){let e;try{const t=po(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||uo.line}function pr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=ur(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=cr();return r(h,{label:l("Border"),icon:r(Nt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(dr(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:co})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(pr,{value:t,onChange:n,tier:e})})}function El(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?ve(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=D(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?ve(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return an(a)?a:o}function fr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(v),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:L(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function hr(){return r(T,{children:de()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function mr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(v),mark:r(fr,{label:Z}),hint:r(hr,{})})}function gr(){return{type:"custom",render:()=>r(mt,{})}}function Tl(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Rl(){return{_gShape:y("Shape"),cardCorners:mr(),cardCornerSides:rt(),cardCornersApplyAll:gr()}}function Ol(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function wl(){return P("Item alignment",r(wt,{}),ro,"stretch")}function Pl(){return P(so,r(on,{}),ze,ze[0].value)}function kl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(h,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:ae.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:br(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function br(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 Ll(){return P(io,r(Ee,{}),Ue,Ue[0].value)}function Nl(){return K(lo,r(Yt,{}),$e,ao,1,$e)}function Al(e){const t=ue(no,Go("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),oo(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function vl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Le,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Ao(c),detail:l("the Text style in Site styles"),onReset:()=>s(No),defaultAction:{onPress:()=>s(Lo),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Fl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null;try{e=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function xr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=N()[c],u=ie(void 0,d,s);return r(T,{children:M({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function Sr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=N()[t],c=ie(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function yr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Sr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(xr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Dl(e){return{type:"custom",render:({value:t,onChange:n})=>r(_r,{...e,value:t,onChange:n})}}function Cr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:w(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function _r({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=N()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Cr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Ir={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Er={Top:Pe,Bottom:Re,Left:Oe,Right:we},Tr=e=>{const t=Er[e];return r(t,{})};function Bl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Ir[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,te=E)=>g("mobile",yr({label:i(_),icon:Tr(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,R=_=>C?g("desktop",_):_;return B({...o?{_gSpacing:y("Padding")}:{},[t]:R(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:R(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Rr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Or(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function wr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>mn(a,c));return r(h,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Or(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Hl(e={}){const t={...Rr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,F(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(wr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return B({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Pr={contained:"Contained",page:"Page",full:"Full"},Q="Width";function Gl(e,t=vo,n=!0){const o=t.map(i=>({label:Fo[i]??Pr[i],value:i}));return B({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Q),icon:r(nn,{}),action:n?r(Xo,{inherited:a?.inherited??!1,onReset:()=>i(Do),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Ml(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:X,icon:w(r($t,{})),action:o?o(a):void 0,children:ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:X})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?to:eo;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:X,onChange:i})})}}),n=()=>ue("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return B({_gHeight:y(X),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(kr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function kr({onClear:e}){const t=N(),n=qn(t),o=Jn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(X),changed:n,detail:i,onReset:e})}function Kl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Lr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(le),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Lr({value:e,onChange:t,labelId:n,phone:o}){const i=N(),a=Qn(i),c=o?a.phone:e===!0;return r(h,{label:l(le),labelId:n,icon:w(r(Zt,{})),action:k(T,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Zn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Wl(){return{_gAnchor:y("Anchor"),anchor:Jo("Anchor name","e.g. about",Vo)}}function Ul(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function A(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Xl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function $l(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(wn,{id:c,checked:a,onChange:o})})}}}const jl={follows:"fill"},zl={follows:"ink"};function Vl(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Nr,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Nr({label:e,part:t,icon:n,value:o,onChange:i}){const a=fo(D().theme),c=t==="fill"?a.fill:a.ink;return r(An,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:L(c.toUpperCase(),l("Site styles")),onChange:i,onReset:()=>i("")})}const Ar=[{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 dt({label:e,value:t,onChange:n,points:o=Ar}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function Yl(){return q({type:"custom",render:()=>r(re,{})},"always")}const vr=Ce([]);function ql(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Fr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:vr})}}}function Fr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Tt(t),onChange:n,points:o})})}const Jl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function Zl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:dt({label:e,value:m,onChange:p,points:u})})}}}const Dr="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:w(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Dr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Ql(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(jn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ea(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Vn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ta(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ee({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const na=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:w(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function oa(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r($n,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const ra={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ia({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(h,{label:l(n),icon:r(oe,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(h,{label:l("Longitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function Br(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Hr(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function la(e,t){return e===null?null:t>e?e:null}function Gr(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 aa={label:"Ticker items",icon:r(zt,{})};function sa(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Mr,{label:e,icon:w(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Mr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ne(null),[s,d]=z(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Gr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Br(n,s),onChange:p=>i(Hr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function ca(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:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function da(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Wn,String(Un),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:or("Image background",So),cardImage:Wr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function ua(){return{outline:P("Card outline",r(en,{}),Gn,Kn),indexBadge:P("Card number",r(Te,{}),Hn,Mn),showBadge:A("Product badge",!0,r(Le,{noun:"tag"}))}}function pa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:A("Price",!0,r(Kt,{})),showCardFinishes:A("Finish swatches",!0,r(Wt,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Jt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(vt,{})),showCardPage:A("Page button",n.showCardPage,r(ke,{}))}}function fa(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Kr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Kr({parts:e,desktopKey:t,value:n,onChange:o}){const i=N()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Rn(n,a,c)),onReset:()=>o(Dn),detail:l("the same as Desktop")})}function Wr(){return nt("Card image",{min:v,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function ha(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>v,mark:r(Ur,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Ur({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ma(){return{type:"custom",render:({value:e,onChange:t})=>r(Xr,{value:typeof e=="string"?e:"",onChange:t})}}function Xr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return k(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Ft,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Vo as ANCHOR_HINT,jo as BOUND_TO_POST,ol as BOUND_TO_POST_NOTE,dl as BUCKET_ICONS,ra as CUSTOM_FIELD_MEDIA,ia as CoordsField,Jl as EDGE_ARROWS,Ln as FOCAL_DEFAULT,Ar as FOCAL_POINTS,V as FOLD_FIELD_MARKER,jl as FOLLOWS_SITE_BUTTON,zl as FOLLOWS_SITE_BUTTON_INK,dt as FocalPicker,nr as GroupLabel,zo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,Yi as Label,be as MEDIA_FIELD_MARKER,na as MEDIA_TYPE_OPTIONS,rl as NOT_BOUND_TO_POST,er as PanelNoteLine,_r as PhoneChoiceRow,Cr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Sa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Rr as SIDE_PAD_KEYS,Zo as SectionHeading,ee as Segmented,Uo as SiteGapDefaultReset,M as Slider,tt as Swatches,xa as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,aa as TICKER_ITEMS_ROW,Mr as TextListField,Xo as WidthDefaultReset,Gr as aimAfterListChange,Wl as anchorFields,L as backTo,yl as backgroundField,wl as boxAlignField,Ll as boxBlockSpacingField,Ol as boxJustifyField,Nl as boxPhoneRowField,kl as boxShareField,Pl as boxWrapField,ml as bucketHeader,mr as cardCornersField,or as cardImageBackgroundField,Wr as cardImageField,da as cardMediaFields,Rl as cardShapeFields,pa as cardShowFields,ua as cardStyleFields,Fl as cellWidthFields,$l as checkbox,Vl as colorInput,al as copyText,rt as cornerSidesField,ce as cornersRowField,Ul as dateTime,bl as designGroupHeader,Al as directionField,fa as displayFields,Zl as edgePad,ul as entriesHiddenForTab,la as focusAfterRemove,Yl as focusKeptField,xl as foldMarker,Y as foldMetaOf,tr as foldTitleOf,ma as galleryLayoutField,_l as gapField,y as group,Ml as heightFields,me as hidableText,qo as hintIsWhileTyping,w as iconOf,ha as imageCornersField,nl as inOwnBox,hl as isBucketHeader,gl as isDesignGroupHeader,Mo as isNoGlyph,sl as linkField,Ql as multiSelect,Go as noGlyph,Xl as pageBackgroundField,pl as panelNote,Dl as phoneChoiceField,yr as phoneOverrideField,ql as placementField,Jo as plainText,cl as plainTextarea,nt as pxField,Sl as quietMarker,he as readHidable,Br as rowText,ea as searchSelect,fl as section,El as sectionAnimationFields,at as sectionBorderField,ar as sectionCornersField,Il as sectionShapeFields,Cl as sectionThemeFields,ue as segmented,P as select,Hr as setRowText,B as sharedStyleKinds,Hl as sidesPaddingFields,Or as sidesPaddingPatch,vl as sizeField,K as slider,ta as sourceField,Bl as spacingFields,Kl as stickFields,Tl as templateField,il as text,ht as textFieldIdentifier,Zi as textFieldOffPage,el as textFieldPanelOnly,sa as textList,ca as textListRowField,ll as textarea,A as toggle,oa as upload,Ko as usePageWidthDetail,N as useSelectedProps,ot as useSelectedSibling,Wo as useSiteGapDetail,Gl as widthField,tl as withIdentifier,Ji as withOffPage,Qi as withPanelOnly,qi as withScaffold};
@@ -1,5 +1,5 @@
1
1
  import { DESIGN_GROUPS, type DesignGroup } from "efficient-easel/panel";
2
- import { BUCKET_KEY, DESIGN_GROUP_KEY, type Bucket } from "./field-buckets.js";
2
+ import { BUCKET_KEY, DESIGN_GROUP_KEY, type Bucket } from "efficient-easel/screen/lib/puck/field-buckets";
3
3
  export declare const BUCKETS: readonly ["Design", "Animation"];
4
4
  export type { Bucket };
5
5
  export { DESIGN_GROUPS };
@@ -1 +1 @@
1
- import{SECTION_WIDTH_FIELD_KEYS as Y}from"./section-width-fields.js";import{anchorFields as m,bucketHeader as L,cardMediaFields as U,cardShowFields as W,cardStyleFields as z,designGroupHeader as R,foldMarker as q,foldMetaOf as h,group as J,quietMarker as Q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as V,deviceMetaOf as P}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=X;function Z(e){return e==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",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",Height:"Size"},H={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return $[a]??H[a]??I[n]}function Ce(e,t,n){const a=_(e,t,n);return a?Z(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of G(u))t.includes(g)||t.push(g)}return t}const pe=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x()),...Y],ge=[...S(D()),...Object.keys(D())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],te=Object.keys(U()),oe=new Set(["cardImage","imageBackground"]),_e=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...te.filter(e=>e.startsWith("_g")||oe.has(e))],Se=Object.keys(z()),ve=Object.keys(W({bottomDefault:!0})),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)","EmailFormBlock._gContent":"duplicated the Content 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)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","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={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/puck/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 ae=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ie=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function fe(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function re(e){const t=`${e}.`;return Object.keys(ne).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function de(e,t){const n=P(e),a=J(t);return n?V(n.tier,a):a}function ce(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?q(t,n.label):Q(t):t}function j(e){return e==="Design"?k:["Animation"]}function me(e,t){const n=[],a=new Set(re(t)),C=new Set;let p=!1,u=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ae.has(o))throw new Error(`${t}.${o}: 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=ie.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: 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.`);(o===d.Design||o===d.Animation)&&(p=!0),n.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||n.push(u={place:"Content",entries:[]}),u.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/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(o)&&C.add(o),n.push(u={place:s,entries:[]});continue}const l=_(t,o,i.label);if(!l)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/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.`);n.push(u={place:l,entries:[[o,i.level===2?r:de(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",H]]){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}: ${o} (lib/puck/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(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/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 F=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>F.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!F.has(r))continue;const i=n.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=R(r));for(const l of i)for(const[s,N]of l.entries)y[s]=ce(r,N)}}return y}function Le(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:R("Content"),...e}}function Ee(e){return A.some(t=>d[t]in e)}function we(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{$ as BLOCK_KEY_GROUP,_e as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,te as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,Se as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ke as SECTION_ANIM_FIELD_KEYS,ye as SECTION_SHAPE_FIELD_KEYS,ge as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,Ce as bucketOf,Z as bucketOfPlace,fe as foldTopTier,Ee as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,we as reseatBucketTabs,re as retiredHeadings,Le as seatDesignBucket};
1
+ import{SECTION_WIDTH_FIELD_KEYS as Y}from"./section-width-fields.js";import{anchorFields as m,bucketHeader as L,cardMediaFields as U,cardShowFields as W,cardStyleFields as z,designGroupHeader as R,foldMarker as q,foldMetaOf as h,group as J,quietMarker as Q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as V,deviceMetaOf as P}from"efficient-easel/screen/lib/puck/device-fields";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/puck/field-buckets";const A=X;function Z(e){return e==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",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",Height:"Size"},H={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return $[a]??H[a]??I[n]}function Ce(e,t,n){const a=_(e,t,n);return a?Z(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of G(u))t.includes(g)||t.push(g)}return t}const pe=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x()),...Y],ge=[...S(D()),...Object.keys(D())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],te=Object.keys(U()),oe=new Set(["cardImage","imageBackground"]),_e=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...te.filter(e=>e.startsWith("_g")||oe.has(e))],Se=Object.keys(z()),ve=Object.keys(W({bottomDefault:!0})),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)","EmailFormBlock._gContent":"duplicated the Content 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)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","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={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/puck/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 ae=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ie=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function fe(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function re(e){const t=`${e}.`;return Object.keys(ne).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function de(e,t){const n=P(e),a=J(t);return n?V(n.tier,a):a}function ce(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?q(t,n.label):Q(t):t}function j(e){return e==="Design"?k:["Animation"]}function me(e,t){const n=[],a=new Set(re(t)),C=new Set;let p=!1,u=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ae.has(o))throw new Error(`${t}.${o}: 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=ie.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: 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.`);(o===d.Design||o===d.Animation)&&(p=!0),n.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||n.push(u={place:"Content",entries:[]}),u.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/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(o)&&C.add(o),n.push(u={place:s,entries:[]});continue}const l=_(t,o,i.label);if(!l)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/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.`);n.push(u={place:l,entries:[[o,i.level===2?r:de(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",H]]){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}: ${o} (lib/puck/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(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/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 F=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>F.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!F.has(r))continue;const i=n.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=R(r));for(const l of i)for(const[s,N]of l.entries)y[s]=ce(r,N)}}return y}function Le(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:R("Content"),...e}}function Ee(e){return A.some(t=>d[t]in e)}function we(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{$ as BLOCK_KEY_GROUP,_e as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,te as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,Se as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ke as SECTION_ANIM_FIELD_KEYS,ye as SECTION_SHAPE_FIELD_KEYS,ge as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,Ce as bucketOf,Z as bucketOfPlace,fe as foldTopTier,Ee as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,we as reseatBucketTabs,re as retiredHeadings,Le as seatDesignBucket};
@@ -1,8 +1,8 @@
1
- import type { BlockChoice } from "./block-choice.js";
1
+ import type { BlockChoice } from "efficient-easel/screen/lib/puck/block-choice";
2
2
  import { HEADER_TYPE, FOOTER_TYPE, type TreeItem } from "efficient-easel/draw";
3
3
  export { HEADER_TYPE, FOOTER_TYPE };
4
4
  export declare function buildDefaultHeaderNode(): TreeItem;
5
- export { blockRuns, type BlockChoice, type BlockChoiceRun } from "./block-choice.js";
5
+ export { blockRuns, type BlockChoice, type BlockChoiceRun } from "efficient-easel/screen/lib/puck/block-choice";
6
6
  export declare const FOOTER_BLOCK_CHOICES: BlockChoice[];
7
7
  export declare const GROUP_BLOCK_CHOICES: BlockChoice[];
8
8
  export declare const FOOTER_GROUP_TYPE = "FooterGroup";
@@ -1 +1 @@
1
- import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as n}from"efficient-easel/draw";function c(){return{type:e,props:{id:n(e)}}}import{blockRuns as E}from"./block-choice.js";const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],p=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),a="FooterGroup",F="blocks";function d(o){return o===r?l:o===a?p:null}function s(){const o=(t,i)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...i}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterGroup",{direction:"vertical",align:"start",blocks:[o("FooterText",{text:"Join our email list",size:"md",tone:"default"}),o("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}export{F as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,a as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,p as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,d as blockChoicesFor,E as blockRuns,s as buildDefaultFooterBlocks,c as buildDefaultHeaderNode};
1
+ import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as n}from"efficient-easel/draw";function c(){return{type:e,props:{id:n(e)}}}import{blockRuns as E}from"efficient-easel/screen/lib/puck/block-choice";const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],p=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),a="FooterGroup",F="blocks";function d(o){return o===r?l:o===a?p:null}function s(){const o=(t,i)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...i}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterGroup",{direction:"vertical",align:"start",blocks:[o("FooterText",{text:"Join our email list",size:"md",tone:"default"}),o("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}export{F as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,a as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,p as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,d as blockChoicesFor,E as blockRuns,s as buildDefaultFooterBlocks,c as buildDefaultHeaderNode};
@@ -1 +1 @@
1
- "use client";import{Fragment as f,jsx as p,jsxs as I}from"react/jsx-runtime";import{useMemo as h,useRef as v}from"react";import{EaselCanvas as S,useEaselApi as P}from"efficient-easel/easel";import T from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as w}from"../../components/PinnedChromeLoadNotice.js";import{usePreviewParts as y}from"efficient-easel/draw/client";import{partElement as F,partTypingTarget as A,setCanvasTypingPart as C}from"./canvas-typing.js";import{partThemeColors as D,readInks as x}from"../../../format/lib/puck/part-inks.js";import{partOpenOn as O,PART_ATTR as d}from"../../../render/lib/puck/text-parts.js";import{useSectionOps as j}from"./use-section-ops.js";import{useBlockMetadata as B}from"../editor-block-metadata.js";import{usePreviewHeader as E}from"../../../render/components/PreviewHeaderContext.js";import{siteWidthsMetadata as M}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as W}from"../editor-canvas-styles.js";function _({children:n,componentId:o}){const{selectedPartId:s}=y();return O(s,o)?p(f,{}):p(f,{children:n})}function X(n){const{mirrorHostStyles:o}=W(),s=B(),{sectionBackgroundWidth:l,sectionContentWidth:a,themeFromDocument:m}=E(),u=h(()=>({...n.metadata??s??{},...M(m?null:l,m?null:a)}),[n.metadata,s,l,a,m]),t=v(null),e=b(t),{onDocument:r}=n,i=c=>{t.current=c,r?.(c)};return I(f,{children:[p(w,{}),p(S,{...n,onDocument:i,typing:e,metadata:u,height:"fill",mirrorStyles:o,frameWrapper:T,overlay:_})]})}function b(n){const o=P(),s=j(),l=y(),a=v({ops:s,parts:l});return a.current={ops:s,parts:l},h(()=>{const m={getItemById:t=>o.getState().getItemById(t),getSelectorForId:t=>o.getState().getSelectorForId(t),get components(){return o.getState().config.components},replace:(t,e,r)=>a.current.ops.replaceComponent(t,e,r)},u=(t,e)=>{const r=A(t,m);if(!r)return null;let i=e;const c=()=>(i=F(i,i?.ownerDocument??n.current,t),i),g=c();return g?{element:c,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?D(x(g)):void 0}}:null};return{at:t=>{const e=t.closest(`[${d}]`),r=e?.getAttribute(d);return e&&r?u(r,e):null},atSelection:()=>{const t=a.current.parts.selectedPartId;return t?u(t,null):null},onChange:t=>{if(!t.typing){C(null);return}const e=t.element.closest(`[${d}]`)?.getAttribute(d)??null;C(e),e&&a.current.parts.selectedPartId!==e&&a.current.parts.select(e)}}},[o,n])}export{X as SiteCanvas};
1
+ "use client";import{Fragment as f,jsx as p,jsxs as I}from"react/jsx-runtime";import{useMemo as h,useRef as v}from"react";import{EaselCanvas as S,useEaselApi as P}from"efficient-easel/easel";import T from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as w}from"../../components/PinnedChromeLoadNotice.js";import{usePreviewParts as y}from"efficient-easel/draw/client";import{partElement as F,partTypingTarget as A,setCanvasTypingPart as C}from"./canvas-typing.js";import{partThemeColors as D,readInks as x}from"../../../format/lib/puck/part-inks.js";import{partOpenOn as O,PART_ATTR as d}from"../../../render/lib/puck/text-parts.js";import{useSectionOps as j}from"efficient-easel/screen/lib/puck/use-section-ops";import{useBlockMetadata as B}from"../editor-block-metadata.js";import{usePreviewHeader as E}from"../../../render/components/PreviewHeaderContext.js";import{siteWidthsMetadata as M}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as W}from"../editor-canvas-styles.js";function _({children:n,componentId:o}){const{selectedPartId:s}=y();return O(s,o)?p(f,{}):p(f,{children:n})}function X(n){const{mirrorHostStyles:o}=W(),s=B(),{sectionBackgroundWidth:l,sectionContentWidth:a,themeFromDocument:m}=E(),u=h(()=>({...n.metadata??s??{},...M(m?null:l,m?null:a)}),[n.metadata,s,l,a,m]),t=v(null),e=b(t),{onDocument:r}=n,i=c=>{t.current=c,r?.(c)};return I(f,{children:[p(w,{}),p(S,{...n,onDocument:i,typing:e,metadata:u,height:"fill",mirrorStyles:o,frameWrapper:T,overlay:_})]})}function b(n){const o=P(),s=j(),l=y(),a=v({ops:s,parts:l});return a.current={ops:s,parts:l},h(()=>{const m={getItemById:t=>o.getState().getItemById(t),getSelectorForId:t=>o.getState().getSelectorForId(t),get components(){return o.getState().config.components},replace:(t,e,r)=>a.current.ops.replaceComponent(t,e,r)},u=(t,e)=>{const r=A(t,m);if(!r)return null;let i=e;const c=()=>(i=F(i,i?.ownerDocument??n.current,t),i),g=c();return g?{element:c,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?D(x(g)):void 0}}:null};return{at:t=>{const e=t.closest(`[${d}]`),r=e?.getAttribute(d);return e&&r?u(r,e):null},atSelection:()=>{const t=a.current.parts.selectedPartId;return t?u(t,null):null},onChange:t=>{if(!t.typing){C(null);return}const e=t.element.closest(`[${d}]`)?.getAttribute(d)??null;C(e),e&&a.current.parts.selectedPartId!==e&&a.current.parts.select(e)}}},[o,n])}export{X as SiteCanvas};
@@ -1 +1 @@
1
- import{foldMetaOf as w,isBucketHeader as E}from"./controls.js";import{deviceMetaOf as k}from"./device-fields.js";import{BUCKET_KEY as h,DESIGN_GROUP_KEY as M,hasBucketTabs as O,reseatBucketTabs as x,seatDesignBucket as B}from"./field-groups.js";import{isStructuralTextProp as C}from"../../../format/lib/puck/neutralization-contracts.js";import{noControlMetaOf as D}from"./panel-no-control-mark.js";import{fieldDrawsEntryRow as y}from"../../../render/lib/puck/text-parts.js";function S(e,n){const r=k(n),s=r?r.inner:n;if(w(s))return!1;if(s?.type==="slot")return!0;const o=D(s);return o==="always"?!1:o==="authored-copy"?C(e):!0}function d(e){const n=k(e),r=n?n.inner:e,s=w(r);return s?E(r)?0:s.level:null}function T(e,n,r){return r?n===0&&e===h.Design||n===1&&e===M.Content:!1}const b=new WeakMap,R=new WeakMap;function U(e,n="section"){const r=n==="page"?R:b,s=r.get(e);if(s)return s;const o=Object.entries(e).map(([t,a])=>({key:t,field:a,level:d(a),draws:S(t,a)||n==="page"&&d(a)===null&&y(t,a)})),f=n==="section"&&o.some(t=>y(t.key,t.field)),i=new Set;for(let t=0;t<o.length;t++){const a=o[t].level;if(a===null)continue;let m=0;for(let c=t+1;c<o.length;c++){const g=o[c].level;if(g!==null&&g<=a)break;o[c].draws&&(m+=1)}m===0&&!T(o[t].key,a,f)&&i.add(o[t].key)}const l=f&&O(e),v=l&&!(h.Design in e);if(!i.size&&!v)return r.set(e,e),e;const u={};for(const t of o)i.has(t.key)||(u[t.key]=t.field);const p=x(l?B(u):u);return r.set(e,p),p}export{S as drawsControlOnSectionScreen,U as dropEmptyHeadings};
1
+ import{foldMetaOf as w,isBucketHeader as E}from"./controls.js";import{deviceMetaOf as k}from"efficient-easel/screen/lib/puck/device-fields";import{BUCKET_KEY as h,DESIGN_GROUP_KEY as M,hasBucketTabs as O,reseatBucketTabs as x,seatDesignBucket as B}from"./field-groups.js";import{isStructuralTextProp as C}from"../../../format/lib/puck/neutralization-contracts.js";import{noControlMetaOf as D}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{fieldDrawsEntryRow as y}from"../../../render/lib/puck/text-parts.js";function S(e,n){const r=k(n),s=r?r.inner:n;if(w(s))return!1;if(s?.type==="slot")return!0;const o=D(s);return o==="always"?!1:o==="authored-copy"?C(e):!0}function d(e){const n=k(e),r=n?n.inner:e,s=w(r);return s?E(r)?0:s.level:null}function T(e,n,r){return r?n===0&&e===h.Design||n===1&&e===M.Content:!1}const b=new WeakMap,R=new WeakMap;function U(e,n="section"){const r=n==="page"?R:b,s=r.get(e);if(s)return s;const o=Object.entries(e).map(([t,a])=>({key:t,field:a,level:d(a),draws:S(t,a)||n==="page"&&d(a)===null&&y(t,a)})),f=n==="section"&&o.some(t=>y(t.key,t.field)),i=new Set;for(let t=0;t<o.length;t++){const a=o[t].level;if(a===null)continue;let m=0;for(let c=t+1;c<o.length;c++){const g=o[c].level;if(g!==null&&g<=a)break;o[c].draws&&(m+=1)}m===0&&!T(o[t].key,a,f)&&i.add(o[t].key)}const l=f&&O(e),v=l&&!(h.Design in e);if(!i.size&&!v)return r.set(e,e),e;const u={};for(const t of o)i.has(t.key)||(u[t.key]=t.field);const p=x(l?B(u):u);return r.set(e,p),p}export{S as drawsControlOnSectionScreen,U as dropEmptyHeadings};
@@ -1,5 +1,5 @@
1
- import type { SaveStatus } from "../editor-document-switch.js";
2
- export { resetForDocumentSwitch, saveStatusForNewDocument, saveStatusOf, type DocumentSwitchSetters, type SaveStatus, } from "../editor-document-switch.js";
1
+ import type { SaveStatus } from "efficient-easel/screen/lib/document-switch";
2
+ export { resetForDocumentSwitch, saveStatusForNewDocument, saveStatusOf, type DocumentSwitchSetters, type SaveStatus, } from "efficient-easel/screen/lib/document-switch";
3
3
  export declare function canSeedPinnedChrome(state: {
4
4
  docId: string | null;
5
5
  saveStatus: SaveStatus;
@@ -1 +1 @@
1
- import{resetForDocumentSwitch as d,saveStatusForNewDocument as t,saveStatusOf as c}from"../editor-document-switch.js";function o(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}export{o as canSeedPinnedChrome,d as resetForDocumentSwitch,t as saveStatusForNewDocument,c as saveStatusOf};
1
+ import{resetForDocumentSwitch as d,saveStatusForNewDocument as t,saveStatusOf as c}from"efficient-easel/screen/lib/document-switch";function o(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}export{o as canSeedPinnedChrome,d as resetForDocumentSwitch,t as saveStatusForNewDocument,c as saveStatusOf};
@@ -1 +1 @@
1
- "use client";import{jsx as r,Fragment as s}from"react/jsx-runtime";import{createContext as n,useContext as p}from"react";import{isStructuralTextProp as u}from"../../../format/lib/puck/neutralization-contracts.js";import{NoControlMark as i}from"./panel-no-control-mark.js";const t=n(!1);function l({children:e}){return r(t.Provider,{value:!0,children:e})}function c(){return p(t)}function S({name:e,children:o}){return!c()||!e||u(e)?r(s,{children:o}):r(i,{})}export{l as SectionTextSuppressProvider,S as SuppressibleText,c as useSectionTextSuppressed};
1
+ "use client";import{jsx as r,Fragment as s}from"react/jsx-runtime";import{createContext as n,useContext as p}from"react";import{isStructuralTextProp as u}from"../../../format/lib/puck/neutralization-contracts.js";import{NoControlMark as i}from"efficient-easel/screen/lib/puck/panel-no-control-mark";const t=n(!1);function l({children:e}){return r(t.Provider,{value:!0,children:e})}function c(){return p(t)}function S({name:e,children:o}){return!c()||!e||u(e)?r(s,{children:o}):r(i,{})}export{l as SectionTextSuppressProvider,S as SuppressibleText,c as useSectionTextSuppressed};
@@ -1 +1 @@
1
- "use client";import{jsx as c}from"react/jsx-runtime";import{usePreviewDevice as y}from"efficient-easel/draw/client";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as S,CONTENT_INSIDE_BACKGROUND_HINT as I,ContentWidthRow as C,WIDTH_GROUP_LABEL as E,WIDTH_PHONE_HINT as T}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as p}from"../../../format/lib/content/page-width.js";import{FOLLOW_SITE as m,WIDTH_CHOICE_LABEL as H,resolveSectionWidth as f}from"../../../format/lib/content/section-width.js";import{say as h}from"../../../format/lib/editor-words.js";import{group as D,sharedStyleKinds as N,useSelectedProps as W,useSelectedSibling as O}from"./controls.js";import{NoControlMark as g,noControlField as b}from"./panel-no-control-mark.js";const l=t=>h(H[t==="content"?"page":"full"]),x=t=>`${t} ${h("from Site styles")}`;function _(){const{siteWidth:t,sectionBackgroundWidth:n,sectionContentWidth:i}=w();return{px:typeof t=="number"?t:p.default,background:n??"full",content:i??"content"}}function k(){try{return y()==="mobile"}catch{return!1}}function B({type:t,onChange:n}){const i=W(),o=_(),e=k(),d=f(t,i).background;return c(S,{value:d??o.background,changed:d!==null,detail:x(l(o.background)),onChange:r=>n(r),onReset:()=>n(m),disabled:e})}function P({type:t,onChange:n}){const i=W(),[,o]=O("contentMax"),e=_(),d=k(),r=f(t,i),u=(r.background??e.background)==="content",a=r.content??e.content;return c(C,{mode:u&&a==="full"?"content":a,px:r.contentMax??e.px,max:u?e.px:p.max,changed:r.content!==null,detail:x(e.content==="full"?l("full"):`${l("content")} ${e.px}px`),fullClosed:u,disabled:d,hint:d?T:u?I:void 0,onMode:s=>{n(s),s==="full"&&o(null)},onPx:s=>{n("content"),o(s===e.px?null:s)},onReset:()=>{n(m),o(null)}})}function R(t){return N({_gWidth:D(E),backgroundWidth:{type:"custom",render:({onChange:n})=>c(B,{type:t,onChange:n})},contentWidth:{type:"custom",render:({onChange:n})=>c(P,{type:t,onChange:n})},contentMax:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"contentWidth"},widthMode:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"backgroundWidth"}})}const V=Object.keys(R(""));export{V as SECTION_WIDTH_FIELD_KEYS,R as sectionWidthFields};
1
+ "use client";import{jsx as c}from"react/jsx-runtime";import{usePreviewDevice as y}from"efficient-easel/draw/client";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as S,CONTENT_INSIDE_BACKGROUND_HINT as I,ContentWidthRow as C,WIDTH_GROUP_LABEL as E,WIDTH_PHONE_HINT as T}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as p}from"../../../format/lib/content/page-width.js";import{FOLLOW_SITE as m,WIDTH_CHOICE_LABEL as H,resolveSectionWidth as f}from"../../../format/lib/content/section-width.js";import{say as h}from"../../../format/lib/editor-words.js";import{group as D,sharedStyleKinds as N,useSelectedProps as W,useSelectedSibling as O}from"./controls.js";import{NoControlMark as g,noControlField as b}from"efficient-easel/screen/lib/puck/panel-no-control-mark";const l=t=>h(H[t==="content"?"page":"full"]),x=t=>`${t} ${h("from Site styles")}`;function _(){const{siteWidth:t,sectionBackgroundWidth:n,sectionContentWidth:i}=w();return{px:typeof t=="number"?t:p.default,background:n??"full",content:i??"content"}}function k(){try{return y()==="mobile"}catch{return!1}}function B({type:t,onChange:n}){const i=W(),o=_(),e=k(),d=f(t,i).background;return c(S,{value:d??o.background,changed:d!==null,detail:x(l(o.background)),onChange:r=>n(r),onReset:()=>n(m),disabled:e})}function P({type:t,onChange:n}){const i=W(),[,o]=O("contentMax"),e=_(),d=k(),r=f(t,i),u=(r.background??e.background)==="content",a=r.content??e.content;return c(C,{mode:u&&a==="full"?"content":a,px:r.contentMax??e.px,max:u?e.px:p.max,changed:r.content!==null,detail:x(e.content==="full"?l("full"):`${l("content")} ${e.px}px`),fullClosed:u,disabled:d,hint:d?T:u?I:void 0,onMode:s=>{n(s),s==="full"&&o(null)},onPx:s=>{n("content"),o(s===e.px?null:s)},onReset:()=>{n(m),o(null)}})}function R(t){return N({_gWidth:D(E),backgroundWidth:{type:"custom",render:({onChange:n})=>c(B,{type:t,onChange:n})},contentWidth:{type:"custom",render:({onChange:n})=>c(P,{type:t,onChange:n})},contentMax:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"contentWidth"},widthMode:{...b({type:"custom",render:()=>c(g,{})},"always"),reachedBy:"backgroundWidth"}})}const V=Object.keys(R(""));export{V as SECTION_WIDTH_FIELD_KEYS,R as sectionWidthFields};
@@ -1,2 +1,2 @@
1
- import type { ScreenNewNode, ScreenNodeMaker } from "../editor-screen.js";
1
+ import type { ScreenNewNode, ScreenNodeMaker } from "efficient-easel/screen/lib/screen-parts";
2
2
  export declare function newSectionNode(type: string, { nodeDefaults, newNodeId, sectionLabel, blockIsOffered }: ScreenNodeMaker): ScreenNewNode | null;
@@ -1,4 +1,4 @@
1
- import{DEFAULT_PANEL_W as k,MAX_PANEL_W as N,MIN_PANEL_W as y}from"../../components/panel-widths.js";import{isRuleSource as A,ruleChecks as F}from"../../../format/lib/source-rules/rule.js";import{parseRules as w}from"../../../format/lib/source-rules/support/css-box-model.js";import{readSliderCallSites as E,sliderFields as v}from"../../../format/lib/source-rules/support/part-slider-call-sites.js";const m=[["sf-editor","es-editor"],["sf-panel","sf-panel--right"],["sf-insp-body","sf-scroll"],["sf-part-panel"],["es-group"],["es-group-body"],["es-field","sf-part-field"],["es-field-ctl"]],_=["sf-slider","has-notch"],S=129;function $(r){const e=r.trim();if(!e.startsWith("."))return null;const s=e.split(".").filter(Boolean);return s.every(o=>/^[a-zA-Z0-9_-]+$/.test(o))?s:null}function c(r){if(/[+~:]/.test(r))return!1;const e=r.trim().split(/\s*(>)\s*|\s+/).filter(Boolean);if(!e.length)return!1;const s=$(e[e.length-1]);if(!s||!s.every(a=>_.includes(a)))return!1;let o=e.length-2,d=m.length-1,i=!1;for(;o>=0;){const a=e[o];if(a===">"){i=!0,o-=1;continue}const f=$(a);if(!f)return!1;let t=-1;for(let n=d;n>=0;n-=1){if(f.every(l=>m[n].includes(l))){t=n;break}if(i)break}if(t===-1)return!1;d=t-1,i=!1,o-=1}return!0}function W(r){const e=r.trim();if(e==="none")return 0;if(e==="auto"||e==="initial")return e==="auto"?1:0;const s=Number.parseFloat(e);return Number.isFinite(s)?s:0}function P(r){const e={grow:0,width:"auto",from:[]};for(const s of r)for(const o of w(s.css)){if(!o.selector.split(",").some(i=>c(i)))continue;let d=!1;for(const[i,a]of o.declarations)i==="flex"?(e.grow=W(a),d=!0):i==="flex-grow"?(e.grow=Number.parseFloat(a)||0,d=!0):i==="width"&&(e.width=a.trim(),d=!0);d&&e.from.push(`${s.name} ${o.selector}`)}return e}function x(r,e){return r.grow>=1||/^100%$/.test(r.width)?e:S}function j(r){return r.filter(e=>{const s=e.text.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\n]*/g,"");return/SettingsField/.test(s)&&/<Slider[\s/>]/.test(s)}).map(e=>e.path).sort()}function I(r,e){const{check:s,report:o}=F("part slider fills row"),d=new Map(r.map(t=>[t.path,t]));if(s("the walk reaches the slot's own slider, and not the notch, a hover or another panel's row",c(".es-field-ctl > .sf-slider")&&c(".sf-insp-body .sf-slider")&&!c(".sf-slider.has-notch::before")&&!c(".es-field-ctl > .sf-slider:hover")&&!c(".sf-field .sf-slider")&&!c(".es-field-ctl > div > .sf-slider")),e.partPanel!==void 0){const t=d.get(e.partPanel);let n=null,l="";try{n=t?E(t.text):null}catch(u){l=u instanceof Error?u.message:String(u)}s(`read the part panel ${e.partPanel}`,!!t&&n!==null,l||"the file is not among those handed in"),s("§1 the part panel draws no slider since plan S2",n!==null&&n.length===0,`${e.partPanel} draws ${n?.length??"?"} slider(s) again — fields ${v(n??[]).join(", ")}. Since plan S2 its numbers are the text box's cells; if a slider is meant to come back, it comes back into the hosts and this section moves with it.`)}if(e.shellSheet!==void 0){const t=w(e.shellSheet.text).filter(n=>n.selector.trim()===".es-field-ctl");s(`§2 ${e.shellSheet.path} declares the control slot \`.es-field-ctl\``,t.length>0,"that is the slot `SettingsField` stacks a control into, and this rule is about how an item sizes inside it"),s("§2 the shell's control slot is still a flex row",t.length>0&&t[t.length-1].declarations.get("display")==="flex","`.es-field-ctl` is no longer `display: flex` in the installed shell. How a flex ITEM sizes is then not the question, and this rule would be answering the old one. Re-read the shell before trusting a verdict from here.")}if(e.sheet!==void 0){const t=d.get(e.sheet);s(`read the stylesheet ${e.sheet}`,!!t),s("§3 the installed shell stylesheet was handed in beside it",e.shellSheet!==void 0);const n=[...t?[{name:t.path,css:t.text}]:[],...e.shellSheet?[{name:e.shellSheet.path,css:e.shellSheet.text}]:[]],l=P(n),u=[{panel:y,content:192,what:"MIN_PANEL_W"},{panel:k.right,content:280,what:"the default"},{panel:N,content:520,what:"MAX_PANEL_W"}],b=u.map(h=>{const p=x(l,h.content),g=h.content-p;return` panel ${String(h.panel).padStart(3)} (${h.what.padEnd(11)}) field content ${String(h.content).padStart(3)} track ${String(p).padStart(3)} `+(g>0?`SHORT BY ${g} — ${Math.round(p/h.content*100)}% of the row`:"fills")}).join(`
1
+ import{DEFAULT_PANEL_W as k,MAX_PANEL_W as N,MIN_PANEL_W as y}from"efficient-easel/screen/components/panel-widths";import{isRuleSource as A,ruleChecks as F}from"../../../format/lib/source-rules/rule.js";import{parseRules as w}from"../../../format/lib/source-rules/support/css-box-model.js";import{readSliderCallSites as E,sliderFields as v}from"../../../format/lib/source-rules/support/part-slider-call-sites.js";const m=[["sf-editor","es-editor"],["sf-panel","sf-panel--right"],["sf-insp-body","sf-scroll"],["sf-part-panel"],["es-group"],["es-group-body"],["es-field","sf-part-field"],["es-field-ctl"]],_=["sf-slider","has-notch"],S=129;function $(r){const e=r.trim();if(!e.startsWith("."))return null;const s=e.split(".").filter(Boolean);return s.every(o=>/^[a-zA-Z0-9_-]+$/.test(o))?s:null}function c(r){if(/[+~:]/.test(r))return!1;const e=r.trim().split(/\s*(>)\s*|\s+/).filter(Boolean);if(!e.length)return!1;const s=$(e[e.length-1]);if(!s||!s.every(a=>_.includes(a)))return!1;let o=e.length-2,d=m.length-1,i=!1;for(;o>=0;){const a=e[o];if(a===">"){i=!0,o-=1;continue}const f=$(a);if(!f)return!1;let t=-1;for(let n=d;n>=0;n-=1){if(f.every(l=>m[n].includes(l))){t=n;break}if(i)break}if(t===-1)return!1;d=t-1,i=!1,o-=1}return!0}function W(r){const e=r.trim();if(e==="none")return 0;if(e==="auto"||e==="initial")return e==="auto"?1:0;const s=Number.parseFloat(e);return Number.isFinite(s)?s:0}function P(r){const e={grow:0,width:"auto",from:[]};for(const s of r)for(const o of w(s.css)){if(!o.selector.split(",").some(i=>c(i)))continue;let d=!1;for(const[i,a]of o.declarations)i==="flex"?(e.grow=W(a),d=!0):i==="flex-grow"?(e.grow=Number.parseFloat(a)||0,d=!0):i==="width"&&(e.width=a.trim(),d=!0);d&&e.from.push(`${s.name} ${o.selector}`)}return e}function x(r,e){return r.grow>=1||/^100%$/.test(r.width)?e:S}function j(r){return r.filter(e=>{const s=e.text.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\n]*/g,"");return/SettingsField/.test(s)&&/<Slider[\s/>]/.test(s)}).map(e=>e.path).sort()}function I(r,e){const{check:s,report:o}=F("part slider fills row"),d=new Map(r.map(t=>[t.path,t]));if(s("the walk reaches the slot's own slider, and not the notch, a hover or another panel's row",c(".es-field-ctl > .sf-slider")&&c(".sf-insp-body .sf-slider")&&!c(".sf-slider.has-notch::before")&&!c(".es-field-ctl > .sf-slider:hover")&&!c(".sf-field .sf-slider")&&!c(".es-field-ctl > div > .sf-slider")),e.partPanel!==void 0){const t=d.get(e.partPanel);let n=null,l="";try{n=t?E(t.text):null}catch(u){l=u instanceof Error?u.message:String(u)}s(`read the part panel ${e.partPanel}`,!!t&&n!==null,l||"the file is not among those handed in"),s("§1 the part panel draws no slider since plan S2",n!==null&&n.length===0,`${e.partPanel} draws ${n?.length??"?"} slider(s) again — fields ${v(n??[]).join(", ")}. Since plan S2 its numbers are the text box's cells; if a slider is meant to come back, it comes back into the hosts and this section moves with it.`)}if(e.shellSheet!==void 0){const t=w(e.shellSheet.text).filter(n=>n.selector.trim()===".es-field-ctl");s(`§2 ${e.shellSheet.path} declares the control slot \`.es-field-ctl\``,t.length>0,"that is the slot `SettingsField` stacks a control into, and this rule is about how an item sizes inside it"),s("§2 the shell's control slot is still a flex row",t.length>0&&t[t.length-1].declarations.get("display")==="flex","`.es-field-ctl` is no longer `display: flex` in the installed shell. How a flex ITEM sizes is then not the question, and this rule would be answering the old one. Re-read the shell before trusting a verdict from here.")}if(e.sheet!==void 0){const t=d.get(e.sheet);s(`read the stylesheet ${e.sheet}`,!!t),s("§3 the installed shell stylesheet was handed in beside it",e.shellSheet!==void 0);const n=[...t?[{name:t.path,css:t.text}]:[],...e.shellSheet?[{name:e.shellSheet.path,css:e.shellSheet.text}]:[]],l=P(n),u=[{panel:y,content:192,what:"MIN_PANEL_W"},{panel:k.right,content:280,what:"the default"},{panel:N,content:520,what:"MAX_PANEL_W"}],b=u.map(h=>{const p=x(l,h.content),g=h.content-p;return` panel ${String(h.panel).padStart(3)} (${h.what.padEnd(11)}) field content ${String(h.content).padStart(3)} track ${String(p).padStart(3)} `+(g>0?`SHORT BY ${g} — ${Math.round(p/h.content*100)}% of the row`:"fills")}).join(`
2
2
  `);for(const h of u)s(`§3 the stacked slider fills its row at ${h.what} (field content ${h.content}px)`,!!t&&x(l,h.content)===h.content,`the shell's stacked sliders do not fill their row.
3
3
 
4
4
  ${e.hosts.length} host(s) — ${e.hosts.join(", ")} — draw the shared \`Slider\` inside
@@ -1,5 +1,5 @@
1
1
  import type { RefObject } from "react";
2
- import { type EditorSession } from "../../render/lib/editor-session.js";
2
+ import { type EaselSession as EditorSession } from "efficient-easel/screen/lib/session";
3
3
  import type { SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
4
4
  export type ThemeRowSaveResult = {
5
5
  status: "saved";
@@ -1 +1 @@
1
- import{useCallback as m,useEffect as h,useRef as p}from"react";import{currentEditorSession as S}from"../../render/lib/editor-session.js";import{backendOf as T}from"./website-session.js";import{useEditorSession as b}from"./editor-session-context.js";import{refreshSiteLiveState as g}from"./site-live-state.js";import{holdSiteWrites as x}from"../../format/lib/site-writes.js";import{WebsiteBackendError as E}from"./web-backend.js";function w(r=S()){return(u,c,o)=>{const e=T(r).theme;return e?e.update(u,o?{siteId:o}:void 0):Promise.reject(new E("invalid","This backend stores no site theme."))}}function y(r){return r.themeFromDocument?{status:"skipped",reason:"template"}:r.token?null:{status:"skipped",reason:"no-token"}}async function j(r,u=w()){const{themeFromDocument:c,token:o,siteId:e,patch:n}=r,a=y({themeFromDocument:c,token:o});if(a)return a;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await u(n,o,e??void 0),{status:"saved"}}catch(f){return{status:"failed",error:f}}}function Q({themeFromDocument:r,tokenRef:u,siteId:c,onResult:o}){const e=p(null),n=p({}),a=b(),f=p(o);f.current=o;const d=p(null),l=m(t=>{if(t.status==="skipped"){const s=`skipped:${t.reason}`;if(d.current===s)return;d.current=s}else d.current=null;f.current?.(t)},[]),i=m(async()=>{e.current&&(clearTimeout(e.current),e.current=null);const t=n.current;n.current={};const s=await j({themeFromDocument:r,token:u?.current,siteId:c,patch:t},w(a));return l(s),s.status==="saved"&&g(),s.status==="failed"&&(n.current={...t,...n.current}),s},[r,u,c,l,a]),v=m((t,s=!1)=>{const k=y({themeFromDocument:r,token:u?.current});if(k){l(k);return}n.current={...n.current,...t},e.current&&clearTimeout(e.current),s?i():e.current=setTimeout(()=>{i()},500)},[r,u,i,l]);return h(()=>()=>{i()},[i]),h(()=>x(async()=>{if(!e.current&&Object.keys(n.current).length===0)return;const t=await i();if(t.status==="failed")throw t.error}),[i]),{persist:v,flush:i}}export{y as refusalToQueue,w as themeRowSender,Q as useThemeRowPersist,j as writeThemeRow};
1
+ import{useCallback as m,useEffect as h,useRef as p}from"react";import{currentEaselSession as v}from"efficient-easel/screen/lib/session";import{backendOf as T}from"./website-session.js";import{useEaselSession as b}from"efficient-easel/screen/lib/session-context";import{refreshSiteLiveState as E}from"./site-live-state.js";import{holdSiteWrites as g}from"../../format/lib/site-writes.js";import{WebsiteBackendError as x}from"./web-backend.js";function w(r=v()){return(u,c,o)=>{const e=T(r).theme;return e?e.update(u,o?{siteId:o}:void 0):Promise.reject(new x("invalid","This backend stores no site theme."))}}function S(r){return r.themeFromDocument?{status:"skipped",reason:"template"}:r.token?null:{status:"skipped",reason:"no-token"}}async function j(r,u=w()){const{themeFromDocument:c,token:o,siteId:e,patch:n}=r,a=S({themeFromDocument:c,token:o});if(a)return a;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await u(n,o,e??void 0),{status:"saved"}}catch(f){return{status:"failed",error:f}}}function Q({themeFromDocument:r,tokenRef:u,siteId:c,onResult:o}){const e=p(null),n=p({}),a=b(),f=p(o);f.current=o;const d=p(null),l=m(t=>{if(t.status==="skipped"){const s=`skipped:${t.reason}`;if(d.current===s)return;d.current=s}else d.current=null;f.current?.(t)},[]),i=m(async()=>{e.current&&(clearTimeout(e.current),e.current=null);const t=n.current;n.current={};const s=await j({themeFromDocument:r,token:u?.current,siteId:c,patch:t},w(a));return l(s),s.status==="saved"&&E(),s.status==="failed"&&(n.current={...t,...n.current}),s},[r,u,c,l,a]),y=m((t,s=!1)=>{const k=S({themeFromDocument:r,token:u?.current});if(k){l(k);return}n.current={...n.current,...t},e.current&&clearTimeout(e.current),s?i():e.current=setTimeout(()=>{i()},500)},[r,u,i,l]);return h(()=>()=>{i()},[i]),h(()=>g(async()=>{if(!e.current&&Object.keys(n.current).length===0)return;const t=await i();if(t.status==="failed")throw t.error}),[i]),{persist:y,flush:i}}export{S as refusalToQueue,w as themeRowSender,Q as useThemeRowPersist,j as writeThemeRow};
@@ -1,2 +1,2 @@
1
- import type { HostProduct } from "./editor-chrome.js";
1
+ import type { HostProduct } from "efficient-easel/screen/lib/host-chrome";
2
2
  export declare function useHostProducts(): readonly HostProduct[] | null;
@@ -1 +1 @@
1
- "use client";import{useEffect as u,useState as n}from"react";import{useEditorSession as i}from"./editor-session-context.js";function f(){const t=i().chrome?.products?.list,[s,o]=n(null);return u(()=>{if(!t)return;let e=!1;return t().then(r=>{e||o(r)}),()=>{e=!0}},[t]),s}export{f as useHostProducts};
1
+ "use client";import{useEffect as u,useState as n}from"react";import{useEaselSession as i}from"efficient-easel/screen/lib/session-context";function f(){const e=i().chrome?.products?.list,[t,o]=n(null);return u(()=>{if(!e)return;let s=!1;return e().then(r=>{s||o(r)}),()=>{s=!0}},[e]),t}export{f as useHostProducts};
@@ -1,7 +1,7 @@
1
- import type { EditorPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from "../../format/lib/editor-document-contract.js";
2
- import type { HostPickedMedia } from "./editor-host.js";
1
+ import type { EaselPageRow as EditorPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from "efficient-easel/screen/lib/document-contract";
2
+ import type { HostPickedMedia } from "efficient-easel/screen/lib/host";
3
3
  import type { SiteThemeRow, SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
4
- import type { SectionTemplate, SectionTemplateRecord } from "../../format/lib/section-template-types.js";
4
+ import type { SectionTemplate, SectionTemplateRecord } from "efficient-easel/screen/lib/section-template-types";
5
5
  export type PageLayout = Record<string, unknown>;
6
6
  export type { EditorPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock };
7
7
  export type PageBundle = {
@@ -164,5 +164,5 @@ export interface WebsiteBackend {
164
164
  social?: WebsiteSocial;
165
165
  theme?: WebsiteTheme;
166
166
  }
167
- export { WebsiteBackendError, isBackendError, STATUS_UNREACHABLE, provideHostFailures, readHostFailure, hostLoadRefusalOf, hostUnreachableMessage } from "./editor-backend-error.js";
168
- export type { WebsiteBackendErrorKind, HostFailure } from "./editor-backend-error.js";
167
+ export { WebsiteBackendError, isBackendError, STATUS_UNREACHABLE, provideHostFailures, readHostFailure, hostLoadRefusalOf, hostUnreachableMessage } from "efficient-easel/screen/lib/backend-error";
168
+ export type { WebsiteBackendErrorKind, HostFailure } from "efficient-easel/screen/lib/backend-error";
@@ -1 +1 @@
1
- import{WebsiteBackendError as a,isBackendError as o,STATUS_UNREACHABLE as s,provideHostFailures as t,readHostFailure as d,hostLoadRefusalOf as i,hostUnreachableMessage as l}from"./editor-backend-error.js";export{s as STATUS_UNREACHABLE,a as WebsiteBackendError,i as hostLoadRefusalOf,l as hostUnreachableMessage,o as isBackendError,t as provideHostFailures,d as readHostFailure};
1
+ import{WebsiteBackendError as a,isBackendError as o,STATUS_UNREACHABLE as s,provideHostFailures as t,readHostFailure as d,hostLoadRefusalOf as i,hostUnreachableMessage as l}from"efficient-easel/screen/lib/backend-error";export{s as STATUS_UNREACHABLE,a as WebsiteBackendError,i as hostLoadRefusalOf,l as hostUnreachableMessage,o as isBackendError,t as provideHostFailures,d as readHostFailure};
@@ -1,2 +1,2 @@
1
- import type { DocumentAddressing } from "./editor-document-addressing.js";
1
+ import type { DocumentAddressing } from "efficient-easel/screen/lib/document-addressing";
2
2
  export declare const WEBSITE_ADDRESSING: DocumentAddressing;
@@ -1,4 +1,4 @@
1
- import { type EditorSession } from "../../render/lib/editor-session.js";
1
+ import { type EaselSession as EditorSession } from "efficient-easel/screen/lib/session";
2
2
  import type { EditorBlocks } from "./editor-blocks.js";
3
3
  import type { WebsiteBackend } from "./web-backend.js";
4
4
  export declare const backendOf: (session?: EditorSession) => WebsiteBackend;
@@ -1 +1 @@
1
- import{backendOf as s}from"../../render/lib/editor-session.js";const e=s,n=o=>o.blocks;export{e as backendOf,n as blocksOf};
1
+ import{backendOf as s}from"efficient-easel/screen/lib/session";const e=s,n=o=>o.blocks;export{e as backendOf,n as blocksOf};
@@ -1 +1 @@
1
- import{PAGE_WIDTH as p}from"./page-width.js";const b=["contained","page","full"],T=["full","page"],M={full:"Full width",page:"Content width"},h="inherit",k=t=>typeof t=="string"&&b.includes(t),i=t=>t===h;function c(t,n){const e=typeof t.pageWidth=="number"?t.pageWidth:p.default;return i(t.widthMode)?{mode:"full",pageWidth:e,inherited:!0}:t.widthMode==="contained"?{mode:"page",pageWidth:e,inherited:!1}:k(t.widthMode)?{mode:t.widthMode,pageWidth:e,inherited:!1}:t.contained===!0?{mode:"page",pageWidth:e,inherited:!1}:typeof t.fullWidth=="boolean"?{mode:t.fullWidth?"full":"page",pageWidth:e,inherited:!1}:t.contained===!1?{mode:"full",pageWidth:e,inherited:!1}:{mode:n,pageWidth:e,inherited:n==="full"}}function C(t){return c(t,"page").mode==="full"}const l="site",s={Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Split:"both",Breadcrumb:"both",Collections:"both",Events:"both",BrandStrip:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function m(t){return Object.prototype.hasOwnProperty.call(s,t)}const u=t=>t==="full"||t==="content",W=t=>typeof t=="number"&&Number.isFinite(t)&&t>0,g=({widthMode:t,fullWidth:n,pageWidth:e})=>({widthMode:t,fullWidth:n,pageWidth:e});function x(t,n){const e={background:null,content:null,contentMax:null};switch(t){case"hero":return i(n.widthMode)||n.widthMode!=="full"?e:{...e,background:"full"};case"scrollOver":return n.fullWidth===!1?e:{...e,content:"full"};case"background":return c(n,"full").mode==="full"?e:{...e,background:"content"};case"both":return c(n,"full").mode==="full"?{...e,content:"full"}:{...e,background:"content"};case"contained":return c(n,"page").mode==="full"?{...e,content:"full"}:{...e,background:"content"};case"contentColumn":return c(g(n),"page").mode==="full"?{...e,content:"full"}:e;case"contentFull":return c(g(n),"full").mode==="full"?{...e,content:"full"}:e;case"productGrid":{const o=c(n,"full");return o.mode==="full"?{...e,content:"full"}:{background:"content",content:"content",contentMax:o.pageWidth}}case"capped":return{...e,background:"content"}}}function y(t,n){if(!m(t))return{background:null,content:null,contentMax:null};const e=s[t],o=n,r=x(e,o),d=o.backgroundWidth===l?null:u(o.backgroundWidth)?o.backgroundWidth:r.background;return o.contentWidth===l?{background:d,content:null,contentMax:null}:u(o.contentWidth)?{background:d,content:o.contentWidth,contentMax:o.contentWidth==="content"&&W(o.contentMax)?o.contentMax:null}:{background:d,content:r.content,contentMax:r.contentMax}}const f="siteWidths";function a(t){return u(t)?t:null}function F(t,n){return{[f]:{background:a(t),content:a(n)}}}function w(t){const e=t.puck?.metadata?.[f];return{background:a(e?.background),content:a(e?.content)}}export{l as FOLLOW_SITE,T as SECTION_WIDTH_CHOICES,s as SECTION_WIDTH_FAMILY,f as SITE_WIDTHS_KEY,M as WIDTH_CHOICE_LABEL,h as WIDTH_INHERIT,b as WIDTH_MODES,i as isInheritValue,a as normalizeSiteBackground,y as resolveSectionWidth,c as resolveWidth,m as sectionHasWidthRows,C as sectionRunsFullWidth,F as siteWidthsMetadata,w as siteWidthsOf};
1
+ import{PAGE_WIDTH as p}from"./page-width.js";const b=["contained","page","full"],T=["full","page"],M={full:"Full width",page:"Content width"},h="inherit",k=t=>typeof t=="string"&&b.includes(t),i=t=>t===h;function c(t,n){const e=typeof t.pageWidth=="number"?t.pageWidth:p.default;return i(t.widthMode)?{mode:"full",pageWidth:e,inherited:!0}:t.widthMode==="contained"?{mode:"page",pageWidth:e,inherited:!1}:k(t.widthMode)?{mode:t.widthMode,pageWidth:e,inherited:!1}:t.contained===!0?{mode:"page",pageWidth:e,inherited:!1}:typeof t.fullWidth=="boolean"?{mode:t.fullWidth?"full":"page",pageWidth:e,inherited:!1}:t.contained===!1?{mode:"full",pageWidth:e,inherited:!1}:{mode:n,pageWidth:e,inherited:n==="full"}}function C(t){return c(t,"page").mode==="full"}const l="site",s={Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",BrandStrip:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function m(t){return Object.prototype.hasOwnProperty.call(s,t)}const u=t=>t==="full"||t==="content",W=t=>typeof t=="number"&&Number.isFinite(t)&&t>0,g=({widthMode:t,fullWidth:n,pageWidth:e})=>({widthMode:t,fullWidth:n,pageWidth:e});function x(t,n){const e={background:null,content:null,contentMax:null};switch(t){case"hero":return i(n.widthMode)||n.widthMode!=="full"?e:{...e,background:"full"};case"scrollOver":return n.fullWidth===!1?e:{...e,content:"full"};case"background":return c(n,"full").mode==="full"?e:{...e,background:"content"};case"both":return c(n,"full").mode==="full"?{...e,content:"full"}:{...e,background:"content"};case"contained":return c(n,"page").mode==="full"?{...e,content:"full"}:{...e,background:"content"};case"contentColumn":return c(g(n),"page").mode==="full"?{...e,content:"full"}:e;case"contentFull":return c(g(n),"full").mode==="full"?{...e,content:"full"}:e;case"productGrid":{const o=c(n,"full");return o.mode==="full"?{...e,content:"full"}:{background:"content",content:"content",contentMax:o.pageWidth}}case"capped":return{...e,background:"content"}}}function y(t,n){if(!m(t))return{background:null,content:null,contentMax:null};const e=s[t],o=n,r=x(e,o),d=o.backgroundWidth===l?null:u(o.backgroundWidth)?o.backgroundWidth:r.background;return o.contentWidth===l?{background:d,content:null,contentMax:null}:u(o.contentWidth)?{background:d,content:o.contentWidth,contentMax:o.contentWidth==="content"&&W(o.contentMax)?o.contentMax:null}:{background:d,content:r.content,contentMax:r.contentMax}}const f="siteWidths";function a(t){return u(t)?t:null}function F(t,n){return{[f]:{background:a(t),content:a(n)}}}function w(t){const e=t.puck?.metadata?.[f];return{background:a(e?.background),content:a(e?.content)}}export{l as FOLLOW_SITE,T as SECTION_WIDTH_CHOICES,s as SECTION_WIDTH_FAMILY,f as SITE_WIDTHS_KEY,M as WIDTH_CHOICE_LABEL,h as WIDTH_INHERIT,b as WIDTH_MODES,i as isInheritValue,a as normalizeSiteBackground,y as resolveSectionWidth,c as resolveWidth,m as sectionHasWidthRows,C as sectionRunsFullWidth,F as siteWidthsMetadata,w as siteWidthsOf};