efficient-web-builder 44.0.0 → 45.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 (368) hide show
  1. package/README.md +8 -0
  2. package/dist/editor/components/BlogPostSource.js +1 -1
  3. package/dist/editor/components/CanvasPartsBridge.js +1 -1
  4. package/dist/editor/components/CardShadowField.js +1 -1
  5. package/dist/editor/components/ChatSettingsPanel.js +1 -1
  6. package/dist/editor/components/FieldGlyph.js +1 -1
  7. package/dist/editor/components/LocationsGroupedField.js +1 -1
  8. package/dist/editor/components/PartInkControl.js +1 -1
  9. package/dist/editor/components/PartSettingsPanel.d.ts +0 -2
  10. package/dist/editor/components/PartSettingsPanel.js +1 -1
  11. package/dist/editor/components/PartTextBox.d.ts +6 -3
  12. package/dist/editor/components/PartTextBox.js +1 -1
  13. package/dist/editor/components/PreviewChatContext.d.ts +1 -2
  14. package/dist/editor/components/PreviewChatContext.js +1 -1
  15. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  16. package/dist/editor/components/SectionIcon.js +1 -1
  17. package/dist/editor/components/SectionThemePicker.js +1 -1
  18. package/dist/editor/components/SectionWidthRows.d.ts +6 -13
  19. package/dist/editor/components/SectionWidthRows.js +1 -1
  20. package/dist/editor/components/SourceStatus.d.ts +2 -1
  21. package/dist/editor/components/SourceStatus.js +1 -1
  22. package/dist/editor/components/ThemeCard.js +1 -1
  23. package/dist/editor/components/ThemeColourField.js +1 -1
  24. package/dist/editor/components/ThemeField.js +1 -1
  25. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  26. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  27. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  28. package/dist/editor/components/storefront-editor.css +90 -359
  29. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  30. package/dist/editor/components/useLocationsTree.js +1 -1
  31. package/dist/editor/lib/animation/AnimationDurationRow.d.ts +3 -0
  32. package/dist/editor/lib/animation/AnimationDurationRow.js +1 -0
  33. package/dist/editor/lib/animation/entrance-fields.d.ts +4 -0
  34. package/dist/editor/lib/animation/entrance-fields.js +1 -0
  35. package/dist/editor/lib/animation/fields.d.ts +2 -0
  36. package/dist/editor/lib/animation/fields.js +1 -0
  37. package/dist/editor/lib/animation/loop-fields.d.ts +2 -0
  38. package/dist/editor/lib/animation/loop-fields.js +1 -0
  39. package/dist/editor/lib/document/ColourControl.js +1 -1
  40. package/dist/editor/lib/document/add-palette.js +1 -1
  41. package/dist/editor/lib/document/block-offer.js +1 -1
  42. package/dist/editor/lib/document/block-source-fields.d.ts +1 -1
  43. package/dist/editor/lib/document/block-source-fields.js +1 -1
  44. package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
  45. package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
  46. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  47. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  48. package/dist/editor/lib/document/blocks/general/CategoryBar/fields.js +1 -1
  49. package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
  50. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  51. package/dist/editor/lib/document/blocks/general/DocBody/fields.js +1 -1
  52. package/dist/editor/lib/document/blocks/general/DocMasthead/fields.js +1 -1
  53. package/dist/editor/lib/document/blocks/general/DocTabs/fields.js +1 -1
  54. package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
  55. package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
  56. package/dist/editor/lib/document/blocks/general/FeaturedCover/fields.js +1 -1
  57. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  58. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  59. package/dist/editor/lib/document/blocks/general/Grid/fields.js +1 -1
  60. package/dist/editor/lib/document/blocks/general/Heading/fields.js +1 -1
  61. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  62. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  63. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  64. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  65. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  66. package/dist/editor/lib/document/blocks/general/Integrations/fields.js +2 -2
  67. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  68. package/dist/editor/lib/document/blocks/general/KeyFeatures/fields.js +1 -1
  69. package/dist/editor/lib/document/blocks/general/LocationMap/fields.d.ts +10 -0
  70. package/dist/editor/lib/document/blocks/general/LocationMap/fields.js +1 -0
  71. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  72. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  73. package/dist/editor/lib/document/blocks/general/LongRead/fields.js +1 -1
  74. package/dist/editor/lib/document/blocks/general/Manifesto/fields.js +2 -2
  75. package/dist/editor/lib/document/blocks/general/Masthead/fields.js +1 -1
  76. package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
  77. package/dist/editor/lib/document/blocks/general/OrderSummary/fields.js +1 -1
  78. package/dist/editor/lib/document/blocks/general/ParagraphsA/fields.js +1 -1
  79. package/dist/editor/lib/document/blocks/general/PaymentBadges/fields.js +1 -1
  80. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  81. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  82. package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
  83. package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
  84. package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
  85. package/dist/editor/lib/document/blocks/general/SpecStrip/fields.js +1 -1
  86. package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
  87. package/dist/editor/lib/document/blocks/general/Stats/fields.js +1 -1
  88. package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
  89. package/dist/editor/lib/document/blocks/general/Testimonials/fields.js +1 -1
  90. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  91. package/dist/editor/lib/document/blocks/general/Ticker/fields.js +1 -1
  92. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  93. package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
  94. package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
  95. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  96. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  97. package/dist/editor/lib/document/blocks/shared-fields.d.ts +3 -4
  98. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  99. package/dist/editor/lib/document/box-fields.d.ts +32 -0
  100. package/dist/editor/lib/document/box-fields.js +1 -0
  101. package/dist/editor/lib/document/box-gutter-field.d.ts +1 -0
  102. package/dist/editor/lib/document/box-gutter-field.js +1 -0
  103. package/dist/editor/lib/document/card-row-fields.d.ts +1 -1
  104. package/dist/editor/lib/document/card-row-fields.js +1 -1
  105. package/dist/editor/lib/document/consent-words-field.d.ts +2 -3
  106. package/dist/editor/lib/document/consent-words-field.js +1 -1
  107. package/dist/editor/lib/document/controls.d.ts +34 -94
  108. package/dist/editor/lib/document/controls.js +1 -1
  109. package/dist/editor/lib/document/enclosing-section.d.ts +5 -1
  110. package/dist/editor/lib/document/enclosing-section.js +1 -1
  111. package/dist/editor/lib/document/field-groups.js +1 -1
  112. package/dist/editor/lib/document/general-registry.js +1 -1
  113. package/dist/editor/lib/document/overrides.js +1 -1
  114. package/dist/editor/lib/document/page-root-fields.d.ts +1 -1
  115. package/dist/editor/lib/document/page-root-fields.js +1 -1
  116. package/dist/editor/lib/document/page-root.d.ts +2 -7
  117. package/dist/editor/lib/document/page-root.js +2 -2
  118. package/dist/editor/lib/document/part-anchors.d.ts +0 -1
  119. package/dist/editor/lib/document/part-anchors.js +1 -1
  120. package/dist/editor/lib/document/part-panel-rows.d.ts +75 -0
  121. package/dist/editor/lib/document/part-panel-rows.js +1 -0
  122. package/dist/editor/lib/document/passes/inspector.js +1 -1
  123. package/dist/editor/lib/document/separator-field.d.ts +10 -0
  124. package/dist/editor/lib/document/separator-field.js +1 -0
  125. package/dist/editor/lib/document/shell-glyph.d.ts +2 -0
  126. package/dist/editor/lib/document/shell-glyph.js +1 -0
  127. package/dist/{format → editor}/lib/host-document-bridge.d.ts +1 -3
  128. package/dist/editor/lib/host-document-bridge.js +1 -0
  129. package/dist/editor/lib/pinned-chrome-doc.js +1 -1
  130. package/dist/editor/lib/sections/new-section-node.js +1 -1
  131. package/dist/editor/lib/sections/section-dry-run.d.ts +13 -2
  132. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  133. package/dist/editor/lib/sections/text-layouts.d.ts +6 -0
  134. package/dist/editor/lib/sections/text-layouts.js +1 -0
  135. package/dist/editor/lib/source-rules/part-slider-fills-row.d.ts +1 -0
  136. package/dist/editor/lib/source-rules/part-slider-fills-row.js +5 -5
  137. package/dist/format/lib/animation/index.d.ts +1 -0
  138. package/dist/format/lib/animation/index.js +1 -0
  139. package/dist/format/lib/animation/loop.d.ts +29 -0
  140. package/dist/format/lib/animation/loop.js +1 -0
  141. package/dist/format/lib/content/block-size.d.ts +59 -0
  142. package/dist/format/lib/content/block-size.js +1 -0
  143. package/dist/format/lib/content/box-background.js +1 -1
  144. package/dist/format/lib/content/box-layout.d.ts +16 -37
  145. package/dist/format/lib/content/box-layout.js +1 -1
  146. package/dist/format/lib/content/box-link.d.ts +13 -0
  147. package/dist/format/lib/content/box-link.js +13 -0
  148. package/dist/format/lib/content/box-separator.d.ts +10 -0
  149. package/dist/format/lib/content/box-separator.js +1 -0
  150. package/dist/format/lib/content/box-shape.d.ts +10 -0
  151. package/dist/format/lib/content/box-shape.js +1 -0
  152. package/dist/format/lib/content/button-icon.d.ts +1 -0
  153. package/dist/format/lib/content/button-icon.js +1 -1
  154. package/dist/format/lib/content/card-corners.d.ts +0 -3
  155. package/dist/format/lib/content/card-corners.js +1 -1
  156. package/dist/format/lib/content/card-template.d.ts +2 -0
  157. package/dist/format/lib/content/card-template.js +1 -1
  158. package/dist/format/lib/content/cart-drawer.d.ts +7 -0
  159. package/dist/format/lib/content/cart-drawer.js +1 -1
  160. package/dist/format/lib/content/chat-launcher.js +1 -1
  161. package/dist/format/lib/content/container-gap.d.ts +9 -1
  162. package/dist/format/lib/content/container-gap.js +1 -1
  163. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  164. package/dist/format/lib/content/gallery-layout.d.ts +1 -0
  165. package/dist/format/lib/content/gallery-layout.js +1 -1
  166. package/dist/format/lib/content/page-background.js +1 -1
  167. package/dist/format/lib/content/post-date.d.ts +1 -0
  168. package/dist/format/lib/content/post-date.js +1 -0
  169. package/dist/format/lib/content/scrim.d.ts +1 -0
  170. package/dist/format/lib/content/scrim.js +1 -0
  171. package/dist/format/lib/content/section-min-height.d.ts +4 -0
  172. package/dist/format/lib/content/section-min-height.js +1 -1
  173. package/dist/format/lib/content/section-width.d.ts +2 -18
  174. package/dist/format/lib/content/section-width.js +1 -1
  175. package/dist/format/lib/content/site-gutter.d.ts +11 -1
  176. package/dist/format/lib/content/site-gutter.js +1 -1
  177. package/dist/format/lib/content/tint.d.ts +1 -0
  178. package/dist/format/lib/content/tint.js +1 -0
  179. package/dist/format/lib/document/blocks/block-types.d.ts +0 -1
  180. package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
  181. package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
  182. package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +1 -1
  183. package/dist/format/lib/document/blocks/general/LocationMap/meta.d.ts +2 -0
  184. package/dist/format/lib/document/blocks/general/LocationMap/meta.js +1 -0
  185. package/dist/format/lib/document/blocks/general/SpecStrip/meta.d.ts +5 -0
  186. package/dist/format/lib/document/blocks/general/SpecStrip/meta.js +1 -1
  187. package/dist/format/lib/document/blocks/general/Ticker/meta.js +1 -1
  188. package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
  189. package/dist/format/lib/document/blocks/general/metas.js +1 -1
  190. package/dist/format/lib/document/blocks/general/text-part-shapes.json +30 -0
  191. package/dist/format/lib/document/box-footer.d.ts +1 -0
  192. package/dist/format/lib/document/box-footer.js +1 -1
  193. package/dist/format/lib/document/cap-hero-groups.js +1 -1
  194. package/dist/format/lib/document/container-blocks.js +1 -1
  195. package/dist/format/lib/document/editor-site-widths.d.ts +2 -0
  196. package/dist/format/lib/document/editor-site-widths.js +1 -0
  197. package/dist/format/lib/document/general-order.d.ts +1 -1
  198. package/dist/format/lib/document/general-order.js +1 -1
  199. package/dist/format/lib/document/media-manifest.json +3 -2
  200. package/dist/format/lib/document/part-inks.js +1 -1
  201. package/dist/format/lib/document/passes/document-position.js +1 -1
  202. package/dist/format/lib/document/passes/settings-groups.js +1 -1
  203. package/dist/format/lib/document/passes/types.d.ts +10 -5
  204. package/dist/format/lib/document/renamed-props.js +1 -1
  205. package/dist/format/lib/document/section-catalog.js +2 -2
  206. package/dist/format/lib/editor-words-catalogue.d.ts +32 -31
  207. package/dist/format/lib/editor-words-catalogue.js +6 -6
  208. package/dist/format/lib/fit-words.js +77 -18
  209. package/dist/format/lib/fonts.d.ts +1 -0
  210. package/dist/format/lib/fonts.js +1 -1
  211. package/dist/format/lib/hero-group-placement.js +1 -1
  212. package/dist/format/lib/hero-texture.d.ts +1 -1
  213. package/dist/format/lib/hero-texture.js +1 -1
  214. package/dist/format/lib/locations-grid.d.ts +1 -0
  215. package/dist/format/lib/locations-grid.js +1 -1
  216. package/dist/format/lib/map-styles.d.ts +0 -1
  217. package/dist/format/lib/map-styles.js +1 -1
  218. package/dist/format/lib/popup/look.js +1 -1
  219. package/dist/format/lib/popup/text-kinds.d.ts +0 -1
  220. package/dist/format/lib/popup/text-kinds.js +1 -1
  221. package/dist/format/lib/sections/hero-overlay.d.ts +1 -1
  222. package/dist/format/lib/sections/hero-overlay.js +1 -1
  223. package/dist/format/lib/sections/section-head-placement.d.ts +0 -4
  224. package/dist/format/lib/sections/section-head-placement.js +1 -1
  225. package/dist/format/lib/sections/section-presets.js +1 -1
  226. package/dist/format/lib/sections/strip-shape.d.ts +16 -0
  227. package/dist/format/lib/sections/strip-shape.js +1 -0
  228. package/dist/format/lib/sections/timeline-year-shape.d.ts +4 -0
  229. package/dist/format/lib/sections/timeline-year-shape.js +1 -0
  230. package/dist/format/lib/source-rules/box-fields-from-easel.d.ts +4 -0
  231. package/dist/format/lib/source-rules/box-fields-from-easel.js +8 -0
  232. package/dist/format/lib/source-rules/editor-chrome-note.js +1 -1
  233. package/dist/format/lib/source-rules/editor-words.js +2 -2
  234. package/dist/format/lib/source-rules/no-glyph-rows.d.ts +0 -4
  235. package/dist/format/lib/source-rules/no-glyph-rows.js +4 -4
  236. package/dist/format/lib/source-rules/one-loop-module.d.ts +7 -0
  237. package/dist/format/lib/source-rules/one-loop-module.js +6 -0
  238. package/dist/format/lib/source-rules/one-node-list.d.ts +2 -0
  239. package/dist/format/lib/source-rules/one-node-list.js +1 -0
  240. package/dist/format/lib/source-rules/one-page-theme-reader.d.ts +6 -0
  241. package/dist/format/lib/source-rules/one-page-theme-reader.js +6 -0
  242. package/dist/format/lib/source-rules/part-style-naming.js +1 -1
  243. package/dist/format/lib/source-rules/shell-width-token-not-colour.d.ts +5 -0
  244. package/dist/format/lib/source-rules/shell-width-token-not-colour.js +2 -0
  245. package/dist/format/lib/source-rules/site-square-by-default.js +3 -3
  246. package/dist/format/lib/source-rules/support/panel-select-cascade.js +2 -2
  247. package/dist/format/lib/theme.d.ts +3 -0
  248. package/dist/format/lib/theme.js +4 -4
  249. package/dist/render/components/Banner.js +1 -1
  250. package/dist/render/components/ButtonBlock.d.ts +1 -0
  251. package/dist/render/components/ButtonBlock.js +1 -1
  252. package/dist/render/components/CardRowContext.d.ts +4 -4
  253. package/dist/render/components/CardRowContext.js +1 -1
  254. package/dist/render/components/Cards.d.ts +1 -0
  255. package/dist/render/components/Cards.js +1 -1
  256. package/dist/render/components/ContactLocations.js +2 -14
  257. package/dist/render/components/FeaturedCover.js +1 -1
  258. package/dist/render/components/Flex.d.ts +19 -1
  259. package/dist/render/components/Flex.js +1 -1
  260. package/dist/render/components/Grid.js +1 -1
  261. package/dist/render/components/Heading.d.ts +1 -0
  262. package/dist/render/components/Heading.js +1 -1
  263. package/dist/render/components/HeroSection.js +1 -1
  264. package/dist/render/components/HeroSingle.js +1 -1
  265. package/dist/render/components/HeroSlide.js +1 -1
  266. package/dist/render/components/HeroVideoPlay.js +1 -1
  267. package/dist/render/components/ImageBlock.d.ts +1 -2
  268. package/dist/render/components/ImageBlock.js +1 -1
  269. package/dist/render/components/InBoxContext.d.ts +2 -0
  270. package/dist/render/components/InBoxContext.js +1 -0
  271. package/dist/render/components/KeyFeatures.js +1 -1
  272. package/dist/render/components/LocationMap.d.ts +23 -0
  273. package/dist/render/components/LocationMap.js +1 -0
  274. package/dist/render/components/Logo.js +1 -1
  275. package/dist/render/components/LongRead.js +1 -1
  276. package/dist/render/components/Manifesto.d.ts +2 -1
  277. package/dist/render/components/Manifesto.js +1 -1
  278. package/dist/render/components/PreviewHeaderContext.d.ts +1 -4
  279. package/dist/render/components/PreviewHeaderContext.js +1 -1
  280. package/dist/render/components/PreviewLocationPartContext.d.ts +1 -1
  281. package/dist/render/components/PreviewLocationPartContext.js +1 -1
  282. package/dist/render/components/ProcessSteps.js +1 -1
  283. package/dist/render/components/SectionAnimation.d.ts +16 -3
  284. package/dist/render/components/SectionAnimation.js +1 -1
  285. package/dist/render/components/SiteGutterFrame.d.ts +7 -1
  286. package/dist/render/components/SiteGutterFrame.js +1 -1
  287. package/dist/render/components/SiteMap.js +1 -1
  288. package/dist/render/components/SpecStrip.d.ts +2 -4
  289. package/dist/render/components/SpecStrip.js +1 -1
  290. package/dist/render/components/Split.d.ts +2 -1
  291. package/dist/render/components/Split.js +1 -1
  292. package/dist/render/components/Text.d.ts +2 -0
  293. package/dist/render/components/Text.js +1 -1
  294. package/dist/render/components/Ticker.d.ts +5 -4
  295. package/dist/render/components/Ticker.js +1 -1
  296. package/dist/render/components/TickerSection.d.ts +5 -4
  297. package/dist/render/components/TickerSection.js +1 -1
  298. package/dist/render/components/Timeline.js +1 -1
  299. package/dist/render/components/TimelineRail.d.ts +55 -0
  300. package/dist/render/components/TimelineRail.js +1 -0
  301. package/dist/render/components/TimelineTrack.js +1 -1
  302. package/dist/render/components/goldPhrases.js +1 -1
  303. package/dist/render/lib/animation/LoopTrack.d.ts +14 -0
  304. package/dist/render/lib/animation/LoopTrack.js +1 -0
  305. package/dist/render/lib/animation/entrance.d.ts +18 -0
  306. package/dist/render/lib/animation/entrance.js +1 -0
  307. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  308. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  309. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  310. package/dist/render/lib/document/blocks/general/LocationMap/render.d.ts +2 -0
  311. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -0
  312. package/dist/render/lib/document/blocks/general/Manifesto/render.js +1 -1
  313. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  314. package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
  315. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  316. package/dist/render/lib/document/blocks/general/Ticker/render.js +1 -1
  317. package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
  318. package/dist/render/lib/document/blocks/general/renders.js +1 -1
  319. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +9 -0
  320. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -0
  321. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +9 -1
  322. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  323. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +2 -0
  324. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -0
  325. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +4 -0
  326. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -0
  327. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +2 -0
  328. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -0
  329. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  330. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  331. package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.d.ts +2 -0
  332. package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -0
  333. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.d.ts +2 -0
  334. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +3 -0
  335. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  336. package/dist/render/lib/document/page-frame.d.ts +3 -21
  337. package/dist/render/lib/document/page-frame.js +1 -1
  338. package/dist/render/lib/document/part-styles.d.ts +14 -13
  339. package/dist/render/lib/document/part-styles.js +2 -2
  340. package/dist/render/lib/document/passes/block-size.d.ts +3 -0
  341. package/dist/render/lib/document/passes/block-size.js +1 -0
  342. package/dist/render/lib/document/passes/cell-width.d.ts +1 -0
  343. package/dist/render/lib/document/passes/cell-width.js +1 -1
  344. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  345. package/dist/render/lib/document/passes/corners.js +1 -1
  346. package/dist/render/lib/document/passes/index.js +1 -1
  347. package/dist/render/lib/document/passes/section-anchor.d.ts +1 -0
  348. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  349. package/dist/render/lib/document/passes/section-animation.d.ts +1 -0
  350. package/dist/render/lib/document/passes/section-animation.js +1 -1
  351. package/dist/render/lib/document/passes/section-padding.js +1 -1
  352. package/dist/render/lib/document/passes/section-width.d.ts +1 -4
  353. package/dist/render/lib/document/passes/section-width.js +1 -1
  354. package/dist/render/lib/sections/section-to-box.d.ts +28 -7
  355. package/dist/render/lib/sections/section-to-box.js +1 -1
  356. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  357. package/package.json +5 -5
  358. package/dist/editor/components/PartResetDot.d.ts +0 -5
  359. package/dist/editor/components/PartResetDot.js +0 -1
  360. package/dist/editor/lib/document/section-width-fields.d.ts +0 -2
  361. package/dist/editor/lib/document/section-width-fields.js +0 -1
  362. package/dist/format/lib/content/image-width.d.ts +0 -9
  363. package/dist/format/lib/content/image-width.js +0 -1
  364. package/dist/format/lib/content/section-animation.d.ts +0 -13
  365. package/dist/format/lib/content/section-animation.js +0 -1
  366. package/dist/format/lib/host-document-bridge.js +0 -1
  367. package/dist/format/lib/sections/ticker-scroll.d.ts +0 -11
  368. package/dist/format/lib/sections/ticker-scroll.js +0 -1
@@ -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 T,stickFields as x,widthField as B}from"./controls.js";import{deviceField as V,deviceMetaOf as P}from"efficient-easel/screen/lib/document/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/document/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",Shadow:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",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),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of G(l))t.includes(p)||t.push(p)}return t}const ge=[...S(T(),B("full"),E(),m(),x()),...Object.keys(T()),...Object.keys(B("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x()),...Y],pe=[...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)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T(),...B("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/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const 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 g=!1,l=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)&&(g=!0),n.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||n.push(l={place:"Content",entries:[]}),l.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/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(o)&&C.add(o),n.push(l={place:s,entries:[]});continue}const u=_(t,o,i.label);if(!u)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);n.push(l={place:u,entries:[[o,i.level===2?r:de(r,i.label)]]})}const p=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=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${o} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const 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(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=R(r));for(const u of i)for(const[s,N]of u.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,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ke as SECTION_ANIM_FIELD_KEYS,ye as SECTION_SHAPE_FIELD_KEYS,pe 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{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as B}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as T}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Entrance:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(B(),D("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(T()),...Object.keys(T())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","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)","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(),...D("full"),...E(),...m(),...O(),...w(),...T()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
@@ -1 +1 @@
1
- import{jsx as f}from"react/jsx-runtime";import{assembleGeneralBlocks as a}from"./blocks/general/index.js";import{drawPublishedRoot as c}from"../../../render/lib/document/page-frame.js";import{EditorThemedBody as l,suppressPreviewNav as E}from"./page-root.js";import{GENERAL_ROOT_FIELDS as R}from"./page-root-fields.js";import{finishRegistry as g}from"./registry.js";import{GENERAL_REGISTRATION_ORDER as u,generalCategories as h}from"../../../format/lib/document/general-order.js";import{GENERAL_REGISTRATION_ORDER as I}from"../../../format/lib/document/general-order.js";function O(e){const t=Object.fromEntries(Object.entries(e.fields??{}).map(([o,r])=>[o,r&&typeof r=="object"&&r.type==="slot"?{...r}:r]));return{...e,...e.fields?{fields:t}:null}}const N=a(),i={root:{fields:{...R},render:e=>{const{children:t,editor:o,widthMode:r,fullWidth:n,pageWidth:p,pageBackground:s,theme:m,fonts:d}=e;return o?.isEditing?f(l,{propsTheme:m,propsFonts:d,widthMode:r,fullWidth:n,pageWidth:p,pageBackground:typeof s=="string"?s:void 0,suppressPreviewNav:E,children:t}):c(e)}},categories:h(),components:Object.fromEntries(u.map(e=>[e,O(N[e])]))};g(i);var y=i;export{I as GENERAL_REGISTRATION_ORDER,y as default,i as generalRegistry};
1
+ import{jsx as m}from"react/jsx-runtime";import{assembleGeneralBlocks as p}from"./blocks/general/index.js";import{drawPublishedRoot as f}from"../../../render/lib/document/page-frame.js";import{EditorThemedBody as a,suppressPreviewNav as c}from"./page-root.js";import{GENERAL_ROOT_FIELDS as d}from"./page-root-fields.js";import{finishRegistry as E}from"./registry.js";import{GENERAL_REGISTRATION_ORDER as R,generalCategories as g}from"../../../format/lib/document/general-order.js";import{GENERAL_REGISTRATION_ORDER as A}from"../../../format/lib/document/general-order.js";function l(e){const o=Object.fromEntries(Object.entries(e.fields??{}).map(([t,r])=>[t,r&&typeof r=="object"&&r.type==="slot"?{...r}:r]));return{...e,...e.fields?{fields:o}:null}}const u=p(),s={root:{fields:{...d},render:e=>{const{children:o,editor:t,pageBackground:r,theme:n,fonts:i}=e;return t?.isEditing?m(a,{propsTheme:n,propsFonts:i,pageBackground:typeof r=="string"?r:void 0,suppressPreviewNav:c,children:o}):f(e)}},categories:g(),components:Object.fromEntries(R.map(e=>[e,l(u[e])]))};E(s);var b=s;export{A as GENERAL_REGISTRATION_ORDER,b as default,s as generalRegistry};
@@ -1 +1 @@
1
- "use client";import{jsx as d,Fragment as v,jsxs as y}from"react/jsx-runtime";import{useMemo as g,useRef as h}from"react";import{EaselCanvas as C,useEaselApi as I}from"efficient-easel/easel";import P from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as T}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as w}from"../../components/SiteRestoreNotice.js";import{usePreviewParts as F}from"efficient-easel/draw/client";import{partElement as D,partTypingTarget as x,setCanvasTypingPart as S}from"./canvas-typing.js";import{partThemeColors as A,readInks as j}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as p}from"../../../render/lib/document/text-parts.js";import{useSectionOps as B}from"efficient-easel/screen/lib/document/use-section-ops";import{useBlockMetadata as E}from"../editor-block-metadata.js";import{usePreviewHeader as M}from"../../../render/components/PreviewHeaderContext.js";import{siteWidthsMetadata as R}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as W}from"../editor-canvas-styles.js";function X(n){const{mirrorHostStyles:s}=W(),i=E(),{sectionBackgroundWidth:m,sectionContentWidth:o,themeFromDocument:c}=M(),u=g(()=>({...n.metadata??i??{},...R(c?null:m,c?null:o)}),[n.metadata,i,m,o,c]),t=h(null),e=_(t),{onDocument:r}=n,a=l=>{t.current=l,r?.(l)};return y(v,{children:[d(w,{}),d(T,{}),d(C,{...n,onDocument:a,typing:e,metadata:u,height:"fill",mirrorStyles:s,frameWrapper:P})]})}function _(n){const s=I(),i=B(),m=F(),o=h({ops:i,parts:m});return o.current={ops:i,parts:m},g(()=>{const c={getItemById:t=>s.getState().getItemById(t),getSelectorForId:t=>s.getState().getSelectorForId(t),get components(){return s.getState().config.components},replace:(t,e,r)=>o.current.ops.replaceComponent(t,e,r)},u=(t,e)=>{const r=x(t,c);if(!r)return null;let a=e;const l=()=>(a=D(a,a?.ownerDocument??n.current,t),a),f=l();return f?{element:l,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?A(j(f)):void 0}}:null};return{at:t=>{const e=t.closest(`[${p}]`),r=e?.getAttribute(p);return e&&r?u(r,e):null},atSelection:()=>{const t=o.current.parts.selectedPartId;return t?u(t,null):null},onChange:t=>{if(!t.typing){S(null);return}const e=t.element.closest(`[${p}]`)?.getAttribute(p)??null;S(e),e&&o.current.parts.selectedPartId!==e&&o.current.parts.select(e)}}},[s,n])}export{X as SiteCanvas};
1
+ "use client";import{jsx as d,Fragment as v,jsxs as y}from"react/jsx-runtime";import{useEffect as I,useMemo as g,useRef as h}from"react";import{EaselCanvas as P,useEaselApi as T}from"efficient-easel/easel";import w from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as F}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as D}from"../../components/SiteRestoreNotice.js";import{usePreviewParts as E}from"efficient-easel/draw/client";import{partElement as x,partTypingTarget as A,setCanvasTypingPart as S}from"./canvas-typing.js";import{partThemeColors as W,readInks as j}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as p}from"../../../render/lib/document/text-parts.js";import{useSectionOps as B}from"efficient-easel/screen/lib/document/use-section-ops";import{useBlockMetadata as M}from"../editor-block-metadata.js";import{usePreviewHeader as R,useSiteContentWidth as _}from"../../../render/components/PreviewHeaderContext.js";import{setEditorSiteContentWidth as C}from"../../../format/lib/document/editor-site-widths.js";import{siteWidthsMetadata as b}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as k}from"../editor-canvas-styles.js";function et(n){const{mirrorHostStyles:s}=k(),m=M(),{sectionBackgroundWidth:c,themeFromDocument:o}=R(),a=_(),u=g(()=>({...n.metadata??m??{},...b(o?null:c,a)}),[n.metadata,m,c,a,o]);I(()=>(C(a),()=>C(null)),[a]);const t=h(null),e=N(t),{onDocument:r}=n,i=l=>{t.current=l,r?.(l)};return y(v,{children:[d(D,{}),d(F,{}),d(P,{...n,onDocument:i,typing:e,metadata:u,height:"fill",mirrorStyles:s,frameWrapper:w})]})}function N(n){const s=T(),m=B(),c=E(),o=h({ops:m,parts:c});return o.current={ops:m,parts:c},g(()=>{const a={getItemById:t=>s.getState().getItemById(t),getSelectorForId:t=>s.getState().getSelectorForId(t),get components(){return s.getState().config.components},replace:(t,e,r)=>o.current.ops.replaceComponent(t,e,r)},u=(t,e)=>{const r=A(t,a);if(!r)return null;let i=e;const l=()=>(i=x(i,i?.ownerDocument??n.current,t),i),f=l();return f?{element:l,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?W(j(f)):void 0}}:null};return{at:t=>{const e=t.closest(`[${p}]`),r=e?.getAttribute(p);return e&&r?u(r,e):null},atSelection:()=>{const t=o.current.parts.selectedPartId;return t?u(t,null):null},onChange:t=>{if(!t.typing){S(null);return}const e=t.element.closest(`[${p}]`)?.getAttribute(p)??null;S(e),e&&o.current.parts.selectedPartId!==e&&o.current.parts.select(e)}}},[s,n])}export{et as SiteCanvas};
@@ -1,4 +1,4 @@
1
- import { type SelectField } from "./controls.js";
1
+ import { type SelectField } from "efficient-easel/screen/lib/document/box-fields";
2
2
  export declare function pageWidthField(): {
3
3
  type: "custom";
4
4
  render: ({ value, onChange }: {
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{ListIcon as w,PaddingTopIcon as T}from"efficient-easel/icons";import h from"../../components/WidthFollowField.js";import{say as a}from"../../../format/lib/editor-words.js";import{PRODUCT_RECORD_TYPE as E,TEMPLATE_RECORD_TYPE_PROP as p,declaredRecordType as R,recordTypes as s,recordTypesRevision as l}from"../../../format/lib/content/record-types.js";import{pageBackgroundField as f,select as u}from"./controls.js";import{isEditorOnDynamicPage as g}from"../../../format/lib/document/editor-page-context.js";import{DEFAULT_TOP_SPACE as P}from"../../../render/lib/document/header-clearance.js";function _(){return{type:"custom",render:({value:e,onChange:n})=>i(h,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:a("Follows the site"),hint:a("Whether this page sits on the site's content column, or runs edge to edge."),onChange:o=>n(o)})}}const y=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],F={pageBackground:f(),topSpace:u("Top space",i(T,{}),y,P),widthChoice:_()},I=["pageBackground","topSpace","widthChoice"],O="Record type",c=new Map;let d=-1;function L(e){d!==l()&&(c.clear(),d=l());const n=s(),o=n.some(r=>r.key===e)?"":e;let t=c.get(o);return t||(t=u(O,i(w,{}),[...n.map(r=>({label:r.label,value:r.key})),...o?[{label:o,value:o}]:[]],E),c.set(o,t)),t}const m=new WeakMap;function B(e,n){if(!g()||s().length<2||p in e)return e;const o=L(R(n)),t=m.get(e);if(t&&t.row===o)return t.fields;const r={[p]:o,...e};return m.set(e,{row:o,fields:r}),r}export{F as GENERAL_ROOT_FIELDS,I as PAGE_STYLE_FIELDS,O as RECORD_TYPE_LABEL,y as TOP_SPACE_OPTIONS,_ as pageWidthField,B as withRecordTypeRow};
1
+ import{jsx as i}from"react/jsx-runtime";import{ListIcon as w,PaddingTopIcon as T}from"efficient-easel/icons";import h from"../../components/WidthFollowField.js";import{say as a}from"../../../format/lib/editor-words.js";import{PRODUCT_RECORD_TYPE as E,TEMPLATE_RECORD_TYPE_PROP as p,declaredRecordType as R,recordTypes as s,recordTypesRevision as l}from"../../../format/lib/content/record-types.js";import{pageBackgroundField as f}from"./controls.js";import{select as u}from"./box-fields.js";import{isEditorOnDynamicPage as g}from"../../../format/lib/document/editor-page-context.js";import{DEFAULT_TOP_SPACE as P}from"../../../render/lib/document/header-clearance.js";function _(){return{type:"custom",render:({value:e,onChange:n})=>i(h,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:a("Follows the site"),hint:a("Whether this page sits on the site's content column, or runs edge to edge."),onChange:o=>n(o)})}}const y=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],I={pageBackground:f(),topSpace:u("Top space",i(T,{}),y,P),widthChoice:_()},B=["pageBackground","topSpace","widthChoice"],O="Record type",c=new Map;let d=-1;function L(e){d!==l()&&(c.clear(),d=l());const n=s(),o=n.some(r=>r.key===e)?"":e;let t=c.get(o);return t||(t=u(O,i(w,{}),[...n.map(r=>({label:r.label,value:r.key})),...o?[{label:o,value:o}]:[]],E),c.set(o,t)),t}const m=new WeakMap;function W(e,n){if(!g()||s().length<2||p in e)return e;const o=L(R(n)),t=m.get(e);if(t&&t.row===o)return t.fields;const r={[p]:o,...e};return m.set(e,{row:o,fields:r}),r}export{I as GENERAL_ROOT_FIELDS,B as PAGE_STYLE_FIELDS,O as RECORD_TYPE_LABEL,y as TOP_SPACE_OPTIONS,_ as pageWidthField,W as withRecordTypeRow};
@@ -1,5 +1,4 @@
1
1
  import type { CSSProperties, ReactNode, MouseEvent } from "react";
2
- import type { WidthMode } from "../../../format/lib/content/section-width.js";
3
2
  import { type ThemeValue, type HeadingTypographyValue } from "../../../format/lib/theme.js";
4
3
  import { type FontsValue } from "../../../format/lib/fonts.js";
5
4
  import { type EditingBridges } from "../../../render/lib/document/editing-bridges.js";
@@ -7,21 +6,17 @@ export declare const EDITING_BRIDGES: EditingBridges;
7
6
  export { PageWidthWrapper, PublishedPageFrame, pageWidthTokens } from "../../../render/lib/document/page-frame.js";
8
7
  export declare const SECTION_PREVIEW_CANVAS = "color-mix(in oklab, var(--bg) 40%, #ffffff)";
9
8
  export declare const SECTION_PREVIEW_CANVAS_TAIL = "12vh";
10
- export declare function EditorPageBody({ style, frameClass, children, }: {
9
+ export declare function EditorPageBody({ style, children, }: {
11
10
  style: CSSProperties;
12
- frameClass?: string;
13
11
  children?: ReactNode;
14
12
  }): import("react").JSX.Element;
15
- export declare function EditorThemedBody({ propsTheme, propsFonts, propsCornerStyle, propsCornerRadiusPx, propsHeadingCompression, propsHeadingTypography, widthMode, fullWidth, pageWidth, pageBackground, chromeInheritsSiteBackground, suppressPreviewNav, footer, overlay, children, }: {
13
+ export declare function EditorThemedBody({ propsTheme, propsFonts, propsCornerStyle, propsCornerRadiusPx, propsHeadingCompression, propsHeadingTypography, pageBackground, chromeInheritsSiteBackground, suppressPreviewNav, footer, overlay, children, }: {
16
14
  propsTheme?: ThemeValue;
17
15
  propsFonts?: FontsValue;
18
16
  propsCornerStyle?: string;
19
17
  propsCornerRadiusPx?: number | null;
20
18
  propsHeadingCompression?: string;
21
19
  propsHeadingTypography?: HeadingTypographyValue;
22
- widthMode?: WidthMode;
23
- fullWidth?: boolean;
24
- pageWidth?: number;
25
20
  suppressPreviewNav?: (e: MouseEvent<HTMLDivElement>) => void;
26
21
  footer?: ReactNode;
27
22
  pageBackground?: string;
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as E}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as X,textStylesCss as Y}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as q,PAGE_WIDTH_ATTR as J,siteWidthTokens as Q,siteGutterTokens as U,heroBackgroundTokens as Z}from"../../../format/lib/content/page-width.js";import{siteBlockGapTokens as ee}from"../../../format/lib/content/container-gap.js";import{siteCardRadiusTokens as te}from"../../../format/lib/content/card-corners.js";import{usePreviewHeader as oe}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as re}from"../../../render/components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as ne,normalizeCornerStyle as ae,normalizeCornerRadius as se,themeColorStyle as ie,typeSizesStyle as de,headingTypographyStyle as ce,normalizeHeadingTypography as le,themeAccentStyle as pe,themeButtonStyle as he,themePresetAccentVars as me,themeSurfaceStyle as fe,siteCornerRadiusTokens as A,shadowColorTokens as ue,headingCompressionAttr as ge,cardShadowAttr as Se,cardGapAttr as ye,hoverEffectAttr as xe}from"../../../format/lib/theme.js";import{fontRoleStyle as Te}from"../../../format/lib/fonts.js";import{wordStyleTokens as ke}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Ce,pageHasHeaderSection as P,pageTakesTopSpace as Ee,topSpaceMarker as Ae,TOP_SPACE_ATTR as Pe,HEADER_CLEARANCE_CLASS as ve}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as _e,HEADER_INK_ATTR as Re}from"../../../render/lib/document/header-ink.js";import{useEasel as we}from"efficient-easel/easel";import{pageBackgroundVars as Ie}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as We}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as Be}from"../../../render/lib/document/editing-bridges.js";import Ge from"../../components/SectionTextPartBridge.js";const He={SectionTextParts:Ge};import{PageWidthWrapper as at,PublishedPageFrame as st,pageWidthTokens as it}from"../../../render/lib/document/page-frame.js";const Ne="color-mix(in oklab, var(--bg) 40%, #ffffff)",be="12vh";function De({style:o,frameClass:n,children:d}){const{appState:a}=we(g=>g),t=a.data.content,s=a.data.root;if(Ce(t))return r("div",{className:`sf-themed-content${n?` ${n}`:""}`,style:{...o,background:Ne,minHeight:"100vh",paddingBottom:be},children:r("div",{style:{background:"var(--bg)"},children:d})});const c=P(t)&&Ee(s,t),l=P(t)?Ae(s,t):null,m=l?{[Pe]:l}:null,p=q(s?.widthChoice),f=p?{[J]:p}:null,h=c?null:_e(t),u=h?{[Re]:h}:null;return r("div",{className:`sf-themed-content${c?` ${ve}`:""}${n?` ${n}`:""}`,style:o,...u,...m,...f,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:d})})}function tt({propsTheme:o,propsFonts:n,propsCornerStyle:d,propsCornerRadiusPx:a,propsHeadingCompression:t,propsHeadingTypography:s,widthMode:c,fullWidth:l,pageWidth:m,pageBackground:p,chromeInheritsSiteBackground:f,suppressPreviewNav:h,footer:u,overlay:g,children:v}){const{theme:_,fonts:R,sizes:w,cornerRadiusPx:I,cardShadow:S,shadowColor:W,cardGap:B,hoverEffect:y,headingCompression:G,siteWidth:H,siteGutter:N,blockGap:b,headingTypography:D,heroBackgroundFollowsWidth:z,photographyGrayscale:V,textStyles:$,wordStyles:j,themeFromDocument:e}=oe(),i=e?o:_,F=e?n:R,L=e?void 0:w,x=e?a===void 0?ne[ae(d)]:se(a):I,O=e?t:G,T=e?s:D,k=[Y(X(e?void 0:$)),K(le(T).italicStrong)].filter(Boolean).join(`
2
- `),C=We({widthMode:c,fullWidth:l,pageWidth:m}),M={...ie(i),...de(L),...ce(T),...C.style,...f?{}:Ie(p)};return E("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...Te(F),...ke(e?null:j),...pe(i),...he(i),...me(i),...fe(i),...A(x),...te(A(x)),...ue(e?void 0:S,e?void 0:W,e?void 0:y),...Q(e?void 0:H),...U(e?void 0:N),...ee(e?void 0:b),...Z(e?void 0:z)},"data-sf-headings":ge(O),"data-sf-card-shadow":e?void 0:Se(S),"data-sf-card-gap":e?void 0:ye(B),"data-sf-card-hover":e?void 0:xe(y),onClickCapture:h,children:[k?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:k}}):null,r(re,{grayscale:e?void 0:V,children:E(Be,{value:He,children:[r(De,{style:M,frameClass:C.frameClass,children:v}),u,g]})})]})}const ot=o=>{o.target?.closest?.("a")&&o.preventDefault()};export{He as EDITING_BRIDGES,De as EditorPageBody,tt as EditorThemedBody,at as PageWidthWrapper,st as PublishedPageFrame,Ne as SECTION_PREVIEW_CANVAS,be as SECTION_PREVIEW_CANVAS_TAIL,it as pageWidthTokens,ot as suppressPreviewNav};
1
+ import{jsx as r,jsxs as T}from"react/jsx-runtime";import{accentItalicCss as L,storedTextStyles as O,textStylesCss as M}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as $,PAGE_WIDTH_ATTR as K,siteWidthTokens as X,siteGutterTokens as Y,heroBackgroundTokens as q}from"../../../format/lib/content/page-width.js";import{siteBlockGapTokens as J}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as Q}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as U}from"../../../render/components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as Z,normalizeCornerStyle as ee,normalizeCornerRadius as te,themeColorStyle as oe,typeSizesStyle as re,headingTypographyStyle as ne,normalizeHeadingTypography as ae,themeAccentStyle as se,themeButtonStyle as ie,themePresetAccentVars as de,themeSurfaceStyle as ce,siteCornerRadiusTokens as le,shadowColorTokens as pe,headingCompressionAttr as he,cardShadowAttr as me,cardGapAttr as fe,hoverEffectAttr as ue}from"../../../format/lib/theme.js";import{fontRoleStyle as ge}from"../../../format/lib/fonts.js";import{wordStyleTokens as Se}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as ye,pageHasHeaderSection as k,pageTakesTopSpace as xe,topSpaceMarker as Te,TOP_SPACE_ATTR as ke,HEADER_CLEARANCE_CLASS as Ce}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as Ee,HEADER_INK_ATTR as Ae}from"../../../render/lib/document/header-ink.js";import{useEasel as Pe}from"efficient-easel/easel";import{pageBackgroundVars as ve}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as _e}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as Re}from"../../../render/lib/document/editing-bridges.js";import we from"../../components/SectionTextPartBridge.js";const Ie={SectionTextParts:we};import{PageWidthWrapper as et,PublishedPageFrame as tt,pageWidthTokens as ot}from"../../../render/lib/document/page-frame.js";const We="color-mix(in oklab, var(--bg) 40%, #ffffff)",Be="12vh";function Ge({style:o,children:s}){const{appState:i}=Pe(u=>u),t=i.data.content,n=i.data.root;if(ye(t))return r("div",{className:"sf-themed-content",style:{...o,background:We,minHeight:"100vh",paddingBottom:Be},children:r("div",{style:{background:"var(--bg)"},children:s})});const d=k(t)&&xe(n,t),c=k(t)?Te(n,t):null,h=c?{[ke]:c}:null,l=$(n?.widthChoice),m=l?{[K]:l}:null,p=d?null:Ee(t),f=p?{[Ae]:p}:null;return r("div",{className:`sf-themed-content${d?` ${Ce}`:""}`,style:o,...f,...h,...m,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:s})})}function Je({propsTheme:o,propsFonts:s,propsCornerStyle:i,propsCornerRadiusPx:t,propsHeadingCompression:n,propsHeadingTypography:d,pageBackground:c,chromeInheritsSiteBackground:h,suppressPreviewNav:l,footer:m,overlay:p,children:f}){const{theme:u,fonts:C,sizes:E,cornerRadiusPx:A,cardShadow:g,shadowColor:P,cardGap:v,hoverEffect:S,headingCompression:_,siteWidth:R,siteGutter:w,blockGap:I,headingTypography:W,heroBackgroundFollowsWidth:B,photographyGrayscale:G,textStyles:H,wordStyles:N,themeFromDocument:e}=Q(),a=e?o:u,b=e?s:C,D=e?void 0:E,z=e?t===void 0?Z[ee(i)]:te(t):A,V=e?n:_,y=e?d:W,x=[M(O(e?void 0:H)),L(ae(y).italicStrong)].filter(Boolean).join(`
2
+ `),j=_e(),F={...oe(a),...re(D),...ne(y),...j.style,...h?{}:ve(c)};return T("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...ge(b),...Se(e?null:N),...se(a),...ie(a),...de(a),...ce(a),...le(z),...pe(e?void 0:g,e?void 0:P,e?void 0:S),...X(e?void 0:R),...Y(e?void 0:w),...J(e?void 0:I),...q(e?void 0:B)},"data-sf-headings":he(V),"data-sf-card-shadow":e?void 0:me(g),"data-sf-card-gap":e?void 0:fe(v),"data-sf-card-hover":e?void 0:ue(S),onClickCapture:l,children:[x?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:x}}):null,r(U,{grayscale:e?void 0:G,children:T(Re,{value:Ie,children:[r(Ge,{style:F,children:f}),m,p]})})]})}const Qe=o=>{o.target?.closest?.("a")&&o.preventDefault()};export{Ie as EDITING_BRIDGES,Ge as EditorPageBody,Je as EditorThemedBody,et as PageWidthWrapper,tt as PublishedPageFrame,We as SECTION_PREVIEW_CANVAS,Be as SECTION_PREVIEW_CANVAS_TAIL,ot as pageWidthTokens,Qe as suppressPreviewNav};
@@ -1,5 +1,4 @@
1
1
  import { type PartNeedle } from "../../../render/lib/document/text-parts.js";
2
- export declare const BLOCK_ATTR = "data-easel-block";
3
2
  export type PartEl = {
4
3
  textContent: string | null;
5
4
  closest(selectors: string): PartEl | null;
@@ -1 +1 @@
1
- import{encodePartKey as L}from"../../../format/lib/document/part-key.js";import{HERO_MEDIA_PART_LABELS as J,HERO_PART_ATTR as C,heroPartId as Q,readHeroPartId as U}from"../../../render/lib/document/hero-media-parts.js";import{TICKER_PART_ATTR as z,TICKER_PART_LABEL as V,readTickerPartId as X,tickerPartId as Y}from"../../../render/components/PreviewTickerContext.js";import{decodeLocationPartId as Z,encodeLocationPartId as tt}from"../../../render/components/PreviewLocationPartContext.js";import{PART_ATTR as R,PART_KIND_ATTR as et,PART_ROW_ATTR as N,REGION_PART_ATTR as _,decodePartId as nt,encodePartId as O,encodePartRow as ot,normalizePartText as rt,partHeadLabel as st}from"../../../render/lib/document/text-parts.js";const y="data-easel-block",E="data-sf-part-label";function M(c,n){return c.closest(`[${y}]`)?.getAttribute(y)===n}function v(c,n,o){const s=c.querySelectorAll("*"),i=[],a=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!M(e,n))continue;const l=e.getAttribute(et);l&&(i.push({element:e,partId:O(n,l)}),a.add(e))}const u=[],f=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!M(e,n)||a.has(e))continue;const l=rt(e.textContent??"");if(!l)continue;const r=e.closest(`[${N}]`)?.getAttribute(N)||null;r&&f.add(r.replace(/\[\d+\]$/u,"")),u.push({element:e,text:l,row:r})}const x=t=>u.filter(e=>e.row===ot(t.key,t.row.index)),P=u.filter(t=>t.row===null),g=t=>t.row&&f.has(t.key)?x(t):f.size?P:u,d=new Map,T=[],w=t=>t.row?`${t.key}.${t.row.rowKey}`:null,I=new Map;for(const t of o){const e=w(t);if(!e||f.has(t.key))continue;const l=I.get(e);l?l.push(t):I.set(e,[t])}const S=new Set;for(const[t,e]of I){if(e.length<2)continue;const l=e.flatMap(m=>m.texts);if(new Set(l).size===l.length)continue;const r=g(e[0]).filter(m=>l.includes(m.text));if(r.length!==e.length)continue;const A=[...e].sort((m,b)=>(m.row?.index??0)-(b.row?.index??0));for(let m=0;m<A.length;m+=1){const b=A[m],p=r[m].element,h={key:b.key,partKey:L(b.key,b.row),exact:!0},k=d.get(p);k?k.push(h):(d.set(p,[h]),T.push(p))}S.add(t)}const K=new Map;for(const t of o){if(S.has(w(t)??""))continue;const e=L(t.key,t.row);for(const l of t.texts)for(const r of g(t)){if(r.text!==l)continue;const A=K.get(r.element);A?A.add(e):K.set(r.element,new Set([e]))}}const F=(t,e)=>[...K].some(([l,r])=>l!==t&&!r.has(e)&&l.contains(t));for(const t of o){if(S.has(w(t)??""))continue;const e=L(t.key,t.row);for(const l of t.texts){const r=[];let A=null;for(const p of g(t))p.text===l?F(p.element,e)||r.push(p.element):!r.length&&p.text.includes(l)&&(!A||p.text.length<=A.length)&&(A={element:p.element,length:p.text.length});const m=r.length?r:A?[A.element]:[],b=m.filter(p=>!m.some(h=>h!==p&&p.contains(h)));for(const p of b){const h={key:t.key,partKey:e,exact:r.length>0},k=d.get(p);k?k.push(h):(d.set(p,[h]),T.push(p))}}}const G=new Map(o.map(t=>[t.key,st(t.label)])),$=[...i];for(const t of T){const e=d.get(t)??[],l=e.some(r=>r.exact)?e.filter(r=>r.exact):e;if(new Set(l.map(r=>r.partKey)).size===1){const r=G.get(l[0].key);$.push({element:t,partId:O(n,l[0].partKey),...r?{label:r}:{}});continue}new Set(l.map(r=>r.key)).size===1&&$.push({element:t,partId:O(n,l[0].key)})}return $}function B(c,n,o){const s=c.querySelectorAll(`[${R}]`);for(let a=0;a<s.length;a+=1){const u=s[a];M(u,n)&&(u.removeAttribute(R),u.removeAttribute(E))}const i=[];for(const{element:a,partId:u,label:f}of o)a.setAttribute(R,u),f&&a.setAttribute(E,f),i.push(a);return i}function pt(c,n,o,s,i,a=()=>null){let u=null,f=null,x=null;const P=()=>{const g=o(),d=g?.getAttribute(y)??null;if(!g||!d)return!1;u=d;let T=v(c,d,n);return i(g,d,B(c,d,T)),x=a(()=>{const w=v(c,d,n);ct(T,w)||(T=w,i(g,d,B(c,d,w)))}),!0};return P()||(f=s(()=>{(u||P())&&(f?.(),f=null)})),()=>{f?.(),f=null,x?.(),x=null,u&&B(c,u,[])}}function ct(c,n){return c.length===n.length&&c.every((o,s)=>o.element===n[s].element&&o.partId===n[s].partId)}function dt(c,n){const o=c?.closest?.(`[${R}],[${_}]`),s=o?.getAttribute(R)??o?.getAttribute(_),i=s?nt(s):null;if(o&&s&&i?.nodeId===n&&i.propKey)return{id:s,element:o,whole:D(o,s),label:H(o,s)};const a=c?.closest?.(q.slice(2).map(x=>`[${x}]`).join(","));if(!a)return null;const f=a.closest?.(`[${y}]`)?.getAttribute(y)===n?j(a,n):null;return f?{id:f,element:a,whole:D(a,f),label:H(a,f)}:null}function H(c,n){const o=Z(n);if(o)return o.part==="map"?"Map":"Image";const s=U(n);return s?J[s.part]:X(n)?V:c.getAttribute(E)??void 0}const W="data-loc-pick",q=[R,_,C,z,W];function j(c,n){const o=c.getAttribute(R)??c.getAttribute(_);if(o)return o;const s=c.getAttribute(C);if(s)return Q(n,s);if(c.getAttribute(z)!==null)return Y(n);const i=c.getAttribute(W)?.split(":");return i&&(i[1]==="image"||i[1]==="map")&&/^\d+$/.test(i[0])?tt(n,Number(i[0]),i[1]):null}function D(c,n){const o=c.closest?.(`[${y}]`),s=o?.getAttribute(y);if(!o||!s)return!1;const i=new Set;for(const a of o.querySelectorAll(q.map(u=>`[${u}]`).join(","))){if(a.closest?.(`[${y}]`)!==o)continue;const u=j(a,s);u&&i.add(u)}return i.size===1&&i.has(n)}export{y as BLOCK_ATTR,W as LOCATION_PICK_ATTR,E as PART_LABEL_ATTR,B as applyPartStamps,pt as engagePartAnchors,D as isOnlyPart,H as partLabelOf,dt as partOfBlockAt,v as resolvePartStamps};
1
+ import{encodePartKey as L}from"../../../format/lib/document/part-key.js";import{HERO_MEDIA_PART_LABELS as U,HERO_PART_ATTR as M,heroPartId as J,readHeroPartId as Q}from"../../../render/lib/document/hero-media-parts.js";import{TICKER_PART_ATTR as z,TICKER_PART_LABEL as V,readTickerPartId as X,tickerPartId as Y}from"../../../render/components/PreviewTickerContext.js";import{BLOCK_ATTRIBUTE as y}from"efficient-easel/canvas";import{decodeLocationPartId as Z,encodeLocationPartId as tt}from"../../../render/components/PreviewLocationPartContext.js";import{PART_ATTR as b,PART_KIND_ATTR as et,PART_ROW_ATTR as N,REGION_PART_ATTR as _,decodePartId as nt,encodePartId as O,encodePartRow as ot,normalizePartText as rt,partHeadLabel as st}from"../../../render/lib/document/text-parts.js";const E="data-sf-part-label";function B(c,n){return c.closest(`[${y}]`)?.getAttribute(y)===n}function v(c,n,o){const s=c.querySelectorAll("*"),l=[],a=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!B(e,n))continue;const i=e.getAttribute(et);i&&(l.push({element:e,partId:O(n,i)}),a.add(e))}const u=[],f=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!B(e,n)||a.has(e))continue;const i=rt(e.textContent??"");if(!i)continue;const r=e.closest(`[${N}]`)?.getAttribute(N)||null;r&&f.add(r.replace(/\[\d+\]$/u,"")),u.push({element:e,text:i,row:r})}const T=t=>u.filter(e=>e.row===ot(t.key,t.row.index)),P=u.filter(t=>t.row===null),g=t=>t.row&&f.has(t.key)?T(t):f.size?P:u,d=new Map,w=[],x=t=>t.row?`${t.key}.${t.row.rowKey}`:null,I=new Map;for(const t of o){const e=x(t);if(!e||f.has(t.key))continue;const i=I.get(e);i?i.push(t):I.set(e,[t])}const S=new Set;for(const[t,e]of I){if(e.length<2)continue;const i=e.flatMap(m=>m.texts);if(new Set(i).size===i.length)continue;const r=g(e[0]).filter(m=>i.includes(m.text));if(r.length!==e.length)continue;const A=[...e].sort((m,R)=>(m.row?.index??0)-(R.row?.index??0));for(let m=0;m<A.length;m+=1){const R=A[m],p=r[m].element,h={key:R.key,partKey:L(R.key,R.row),exact:!0},k=d.get(p);k?k.push(h):(d.set(p,[h]),w.push(p))}S.add(t)}const K=new Map;for(const t of o){if(S.has(x(t)??""))continue;const e=L(t.key,t.row);for(const i of t.texts)for(const r of g(t)){if(r.text!==i)continue;const A=K.get(r.element);A?A.add(e):K.set(r.element,new Set([e]))}}const F=(t,e)=>[...K].some(([i,r])=>i!==t&&!r.has(e)&&i.contains(t));for(const t of o){if(S.has(x(t)??""))continue;const e=L(t.key,t.row);for(const i of t.texts){const r=[];let A=null;for(const p of g(t))p.text===i?F(p.element,e)||r.push(p.element):!r.length&&p.text.includes(i)&&(!A||p.text.length<=A.length)&&(A={element:p.element,length:p.text.length});const m=r.length?r:A?[A.element]:[],R=m.filter(p=>!m.some(h=>h!==p&&p.contains(h)));for(const p of R){const h={key:t.key,partKey:e,exact:r.length>0},k=d.get(p);k?k.push(h):(d.set(p,[h]),w.push(p))}}}const G=new Map(o.map(t=>[t.key,st(t.label)])),$=[...l];for(const t of w){const e=d.get(t)??[],i=e.some(r=>r.exact)?e.filter(r=>r.exact):e;if(new Set(i.map(r=>r.partKey)).size===1){const r=G.get(i[0].key);$.push({element:t,partId:O(n,i[0].partKey),...r?{label:r}:{}});continue}new Set(i.map(r=>r.key)).size===1&&$.push({element:t,partId:O(n,i[0].key)})}return $}function C(c,n,o){const s=c.querySelectorAll(`[${b}]`);for(let a=0;a<s.length;a+=1){const u=s[a];B(u,n)&&(u.removeAttribute(b),u.removeAttribute(E))}const l=[];for(const{element:a,partId:u,label:f}of o)a.setAttribute(b,u),f&&a.setAttribute(E,f),l.push(a);return l}function dt(c,n,o,s,l,a=()=>null){let u=null,f=null,T=null;const P=()=>{const g=o(),d=g?.getAttribute(y)??null;if(!g||!d)return!1;u=d;let w=v(c,d,n);return l(g,d,C(c,d,w)),T=a(()=>{const x=v(c,d,n);ct(w,x)||(w=x,l(g,d,C(c,d,x)))}),!0};return P()||(f=s(()=>{(u||P())&&(f?.(),f=null)})),()=>{f?.(),f=null,T?.(),T=null,u&&C(c,u,[])}}function ct(c,n){return c.length===n.length&&c.every((o,s)=>o.element===n[s].element&&o.partId===n[s].partId)}function mt(c,n){const o=c?.closest?.(`[${b}],[${_}]`),s=o?.getAttribute(b)??o?.getAttribute(_),l=s?nt(s):null;if(o&&s&&l?.nodeId===n&&l.propKey)return{id:s,element:o,whole:D(o,s),label:H(o,s)};const a=c?.closest?.(q.slice(2).map(T=>`[${T}]`).join(","));if(!a)return null;const f=a.closest?.(`[${y}]`)?.getAttribute(y)===n?j(a,n):null;return f?{id:f,element:a,whole:D(a,f),label:H(a,f)}:null}function H(c,n){const o=Z(n);if(o)return o.part==="map"?"Map":o.part==="city"?"City":"Image";const s=Q(n);return s?U[s.part]:X(n)?V:c.getAttribute(E)??void 0}const W="data-loc-pick",q=[b,_,M,z,W];function j(c,n){const o=c.getAttribute(b)??c.getAttribute(_);if(o)return o;const s=c.getAttribute(M);if(s)return J(n,s);if(c.getAttribute(z)!==null)return Y(n);const l=c.getAttribute(W)?.split(":");return l&&(l[1]==="image"||l[1]==="map"||l[1]==="city")&&/^\d+$/.test(l[0])?tt(n,Number(l[0]),l[1]):null}function D(c,n){const o=c.closest?.(`[${y}]`),s=o?.getAttribute(y);if(!o||!s)return!1;const l=new Set;for(const a of o.querySelectorAll(q.map(u=>`[${u}]`).join(","))){if(a.closest?.(`[${y}]`)!==o)continue;const u=j(a,s);u&&l.add(u)}return l.size===1&&l.has(n)}export{W as LOCATION_PICK_ATTR,E as PART_LABEL_ATTR,C as applyPartStamps,dt as engagePartAnchors,D as isOnlyPart,H as partLabelOf,mt as partOfBlockAt,v as resolvePartStamps};
@@ -0,0 +1,75 @@
1
+ export declare const PART_CELL_KEYS: readonly ["fontSize", "lineHeight", "letterSpacing", "paragraphSpacing", "padding"];
2
+ export type PartCellKey = (typeof PART_CELL_KEYS)[number];
3
+ export declare const PART_PANEL_ROWS: {
4
+ words: {
5
+ type: "custom";
6
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
7
+ };
8
+ sourceNote: {
9
+ type: "custom";
10
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
11
+ };
12
+ style: {
13
+ type: "custom";
14
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
15
+ };
16
+ font: {
17
+ type: "custom";
18
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
19
+ };
20
+ italic: {
21
+ type: "custom";
22
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
23
+ };
24
+ fontSize: {
25
+ type: "custom";
26
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
27
+ };
28
+ lineHeight: {
29
+ type: "custom";
30
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
31
+ };
32
+ letterSpacing: {
33
+ type: "custom";
34
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
35
+ };
36
+ paragraphSpacing: {
37
+ type: "custom";
38
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
39
+ };
40
+ padding: {
41
+ type: "custom";
42
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
43
+ };
44
+ align: {
45
+ type: "custom";
46
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
47
+ };
48
+ letterCase: {
49
+ type: "custom";
50
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
51
+ };
52
+ fixedSizeHint: {
53
+ type: "custom";
54
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
55
+ };
56
+ regionNote: {
57
+ type: "custom";
58
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
59
+ };
60
+ regionStyle: {
61
+ type: "custom";
62
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
63
+ };
64
+ };
65
+ export type PartPanelRow = keyof typeof PART_PANEL_ROWS;
66
+ export declare const TICKER_PANEL_ROWS: {
67
+ showTicker: {
68
+ type: "custom";
69
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
70
+ };
71
+ items: {
72
+ type: "custom";
73
+ render: () => import("react").FunctionComponentElement<import("react").FragmentProps>;
74
+ };
75
+ };
@@ -0,0 +1 @@
1
+ import{Fragment as i,createElement as r}from"react";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";const e=()=>({type:"custom",render:()=>r(i)}),a=["fontSize","lineHeight","letterSpacing","paragraphSpacing","padding"],c={words:e(),sourceNote:e(),style:e(),font:e(),italic:e(),fontSize:t("each",e()),lineHeight:e(),letterSpacing:e(),paragraphSpacing:e(),padding:e(),align:e(),letterCase:e(),fixedSizeHint:t("each",e()),regionNote:e(),regionStyle:e()},p={showTicker:e(),items:e()};export{a as PART_CELL_KEYS,c as PART_PANEL_ROWS,p as TICKER_PANEL_ROWS};
@@ -1 +1 @@
1
- import{WidthIcon as i}from"efficient-easel/icons";import o from"../../../components/PreviewPartAnchors.js";import{BLOCK_THEME_FOLLOW_LABEL as e,SECTION_THEME_FOLLOW_LABEL as r}from"../../../components/SectionThemePicker.js";import{anchorFields as s,cardShapeFields as t,cellWidthFields as d,heightFields as m,sectionAnimationFields as n,sectionShapeFields as l,sectionThemeFields as p,slider as F,spacingFields as c,sidesPaddingFields as h,stickFields as a,widthField as E}from"../controls.js";import{assignSectionGroups as L}from"../field-groups.js";import{sectionWidthFields as f}from"../section-width-fields.js";import{dropEmptyHeadings as S}from"../panel-drop-empty-headings.js";import{rowsShownForNode as O}from"../show-when-resolve.js";const C={spacingFields:c,sidesPaddingFields:h,sectionShapeFields:l,cardShapeFields:t,cellWidthFields:d,widthField:E,sectionWidthFields:f,heightFields:m,anchorFields:s,stickFields:a,sectionThemeFields:p,sectionAnimationFields:n,slider:F,WidthIcon:i,assignSectionGroups:L,dropEmptyHeadings:S,rowsShownForNode:O,SECTION_THEME_FOLLOW_LABEL:r,BLOCK_THEME_FOLLOW_LABEL:e,PartAnchors:o};export{C as PASS_INSPECTOR};
1
+ import i from"../../../components/PreviewPartAnchors.js";import{animationTabFields as o}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as r,SECTION_THEME_FOLLOW_LABEL as e}from"../../../components/SectionThemePicker.js";import{anchorFields as s,blockSizeFields as t,cardShapeFields as d,cellWidthFields as m,heightFields as l,sectionShapeFields as p,sectionThemeFields as F,spacingFields as n,stickFields as a,widthField as c}from"../controls.js";import{sidesPaddingFields as h}from"../box-fields.js";import{assignSectionGroups as f}from"../field-groups.js";import{boxGutterFields as E}from"../box-gutter-field.js";import{dropEmptyHeadings as L}from"../panel-drop-empty-headings.js";import{rowsShownForNode as S}from"../show-when-resolve.js";const C={spacingFields:n,sidesPaddingFields:h,sectionShapeFields:p,cardShapeFields:d,cellWidthFields:m,widthField:c,boxGutterFields:E,heightFields:l,anchorFields:s,stickFields:a,sectionThemeFields:F,animationTabFields:o,blockSizeFields:t,assignSectionGroups:f,dropEmptyHeadings:L,rowsShownForNode:S,SECTION_THEME_FOLLOW_LABEL:e,BLOCK_THEME_FOLLOW_LABEL:r,PartAnchors:i};export{C as PASS_INSPECTOR};
@@ -0,0 +1,10 @@
1
+ import type { ReactElement } from "react";
2
+ import type { TickerSeparator } from "../../../format/lib/sections/ticker-style.js";
3
+ export declare function separatorField(icon: ReactElement, fallback: TickerSeparator): {
4
+ render: ({ value, onChange, field }: {
5
+ value?: unknown;
6
+ onChange: (v: TickerSeparator) => void;
7
+ field?: object;
8
+ }) => import("react").FunctionComponentElement<import("efficient-easel/panel").SettingsFieldProps>;
9
+ type: "custom";
10
+ };
@@ -0,0 +1 @@
1
+ import{BOX_SEPARATOR_POINTS as e,boxSeparatorOf as a}from"../../../format/lib/content/box-separator.js";import{iconPickerRow as t}from"./box-fields.js";import{shellGlyphOf as l}from"./shell-glyph.js";const s={none:"no-symbol",dot:"dot",cross:"close",slash:"separator-slash",triangle:"separator-triangle"},n=e.map(o=>({value:o.value,picture:l(s[o.value])}));function c(o,r){return t("Separator",o,n,r,{emptyValue:"none",resolve:a})}export{c as separatorField};
@@ -0,0 +1,2 @@
1
+ import type { ReactElement } from "react";
2
+ export declare function shellGlyphOf(name: string): ReactElement | null;
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import*as e from"efficient-easel/icons";function c(o){const p=o.replace(/(^|-)([a-z])/g,(t,a,l)=>l.toUpperCase()),s=e[`${p}Icon`];return s?r(s,{size:16}):null}export{c as shellGlyphOf};
@@ -1,4 +1,4 @@
1
- import type { EaselBlockType, EaselFieldDescription, EaselSelection, PageEditOp } from "efficient-easel/screen/lib/host";
1
+ import { type EaselBlockType, type EaselSelection, type PageEditOp } from "efficient-easel/screen/lib/host";
2
2
  type AnyDocument = {
3
3
  root?: unknown;
4
4
  content?: unknown[];
@@ -14,8 +14,6 @@ type BlockConfig = {
14
14
  };
15
15
  export declare function blockLabel(config: BlockConfig, type: string): string;
16
16
  export declare function describeSelection(config: BlockConfig, document: AnyDocument, selectedId: string | null | undefined): EaselSelection | null;
17
- export declare const FIELD_DESCRIPTION_MARKER = "sfDescribedAs";
18
- export declare function describedAs<F extends object>(field: F, description: EaselFieldDescription): F;
19
17
  export declare function describeBlocks(config: BlockConfig): Record<string, EaselBlockType>;
20
18
  export type ApplyResult<D> = {
21
19
  ok: true;
@@ -0,0 +1 @@
1
+ import{FIELD_DESCRIPTION_MARKER as m}from"efficient-easel/screen/lib/host";import{isNode as u}from"efficient-easel/data";function p(n,e){const t=n.components[e]?.label;return typeof t=="string"&&t.trim()?t.trim():e}function g(n){return n.length>3&&n.endsWith("s")?n.slice(0,-1):n}function b(n,e,t,o){n.forEach((s,c)=>{if(u(s)){o.push({node:s,list:n,index:c,parent:e,slot:t});for(const[r,l]of Object.entries(s.props))Array.isArray(l)&&l.some(u)&&b(l,s,r,o)}})}function _(n){const e=[];b(Array.isArray(n.content)?n.content:[],null,"",e);for(const t of Object.values(n.zones??{}))Array.isArray(t)&&b(t,null,"",e);return e}function y(n,e){return _(n).find(t=>String(t.node.props.id)===e)}function O(n,e,t){if(!t)return null;const o=y(e,t);if(!o)return null;const s=p(n,o.node.type),c=o.parent?`${p(n,o.parent.type)} · ${g(o.slot)} ${o.index+1}`:s;return{blockId:t,type:o.node.type,label:c,path:""}}const v=n=>n.filter(e=>!!e&&typeof e=="object"&&"value"in e).map(e=>typeof e.label=="string"?{value:e.value,label:e.label}:{value:e.value});function $(n){if(!n||typeof n!="object")return null;const e=n;if(typeof e.type!="string")return null;const t=e.type==="custom"?e[m]:void 0,o={type:t?.type??e.type},s=t?.label??e.label;typeof s=="string"&&(o.label=s);const c=t?.options??e.options;Array.isArray(c)&&(o.options=v(c));for(const r of["arrayFields","objectFields"]){const l=t?.[r]??e[r];l&&typeof l=="object"&&(o[r]=k(l))}return o}function k(n){const e={};for(const[t,o]of Object.entries(n??{})){const s=$(o);s&&(e[t]=s)}return e}function w(n){const e={};for(const[t,o]of Object.entries(n.components))o&&(e[t]={label:p(n,t),fields:k(o.fields)});return e}function j(n,e){let t=n;for(const o of e?e.split("."):[]){const s=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(o);if(!s||!t||typeof t!="object")return null;t=t[s[1]],s[2]!==void 0&&(t=Array.isArray(t)?t[Number(s[2])]:void 0)}return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function d(n,e){return n.findIndex(t=>u(t)&&String(t.props.id)===e)}function h(n,e,t){const o=e||t;if(!o)return n.length;const s=d(n,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return e?s+1:s}function F(n,e,t,o){const s=structuredClone(e),c=Array.isArray(s.content)?s.content:s.content=[];try{t.forEach((r,l)=>{const a=i=>{throw new Error(`change ${l+1}: ${i}`)};switch(r.op){case"set_props":{const i=y(s,r.block_id)??a(`there is no block ${r.block_id}`);"id"in r.props&&a("a block's id is never changed");const f=j(i.node.props,r.path)??a(`there is no ${r.path} in that block`);Object.assign(f,structuredClone(r.props));break}case"insert_block":{const i=n.components[r.type]??a(`there is no block type ${r.type}`),f=i.defaultProps&&typeof i.defaultProps=="object"?i.defaultProps:{},A={type:r.type,props:{...structuredClone(f),...structuredClone(r.props),id:o(r.type)}};c.splice(h(c,r.after,r.before),0,A);break}case"remove_block":{const i=d(c,r.block_id);i<0&&a(`there is no top-level block ${r.block_id}`),c.splice(i,1);break}case"move_block":{const i=d(c,r.block_id);i<0&&a(`there is no top-level block ${r.block_id}`);const[f]=c.splice(i,1);c.splice(h(c,r.after,r.before),0,f);break}default:a(`"${r.op}" is not a change this editor makes`)}})}catch(r){return{ok:!1,reason:r instanceof Error?r.message:String(r)}}return{ok:!0,document:s}}export{F as applyPageEdits,p as blockLabel,w as describeBlocks,O as describeSelection};
@@ -1 +1 @@
1
- import{isSectionGroupType as F,SITE_FOOTER_TYPE as E,SITE_HEADER_TYPE as O,siteFooterDocChrome as k}from"../../format/lib/document/section-groups.js";import{zoneOwner as N}from"../../render/lib/document/selection-parent.js";const A="Footer",x=[O,A,E],y=e=>{const t=e?.content;return Array.isArray(t)?t:[]},l=e=>{const t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},h=e=>{const t=e?.props?.id;return typeof t=="string"?t:void 0},I=e=>N(e)?.ownerId??"";function P(e){const t=k(y(e)),o=t.some(r=>r?.type===E);return t.filter(r=>r?.type===O||r?.type===E||r?.type===A&&!o)}function z(e,t){const o=new Set,r=s=>{if(Array.isArray(s)){for(const f of s)r(f);return}if(!s||typeof s!="object")return;const i=s;if(typeof i.type=="string"&&i.props&&typeof i.props=="object"){const f=h(i);f&&o.add(f)}for(const f of Object.values(s))r(f)};if(r(e),t){let s=!0;const i=new Set;for(;s;){s=!1;for(const[f,p]of Object.entries(t))i.has(f)||!o.has(I(f))||(i.add(f),r(p),s=!0)}}return o}function T(e,t){const o={},r={};for(const[s,i]of Object.entries(e??{}))(t.has(I(s))?o:r)[s]=i;return{owned:o,rest:r}}function Z(e,t){if(!t)return e;const o=P(t);if(!o.length)return e;const r=o.filter(p=>p.type===O),s=o.filter(p=>p.type!==O),i={...e,content:[...r,...y(e),...s]},{owned:f}=T(l(t),z(o,l(t)));return Object.keys(f).length&&(i.zones={...l(e)??{},...f}),i}function v(e,t){if(!t)return{page:e,chrome:null};const o=P(t),r=new Set(o.map(h).filter(n=>!!n)),s=[],i=[];for(const n of y(e)){const c=h(n);c&&r.has(c)||F(n?.type)?i.push(n):s.push(n)}const f=new Map(i.map(n=>[h(n),n])),p=new Set;let d=k(y(t)).flatMap(n=>{const c=h(n);if(!c||!r.has(c))return[n];const u=f.get(c);return u?(p.add(u),[u]):[]});for(const n of i)p.has(n)||d.some(c=>c?.type===n.type)||(d=n.type===O?[n,...d]:[...d,n]);d=k(d);const m=d.length===y(t).length&&d.every((n,c)=>n===y(t)[c]),g=l(e),C=z(d,g),{owned:w,rest:S}=T(g,C),_=T(l(t),z(o,l(t))).owned,b={...t,content:m?t.content:[...d]},a=l(t);if(a||Object.keys(w).length){const n={};for(const[c,u]of Object.entries(a??{}))c in _?c in w&&(n[c]=w[c]):n[c]=u;for(const[c,u]of Object.entries(w))c in n||(n[c]=u);b.zones=n,a&&D(b.zones,a)&&(b.zones=a)}const j={...e,content:s};return g&&(Object.keys(S).length||!Object.keys(_).length?j.zones=S:delete j.zones),{page:j,chrome:b}}function D(e,t){const o=Object.keys(e),r=Object.keys(t);return o.length===r.length&&o.every((s,i)=>s===r[i]&&e[s]===t[s])}function H(e,t){return o=>e(o)||o!==void 0&&x.includes(o)&&t()}export{x as PINNED_CHROME_TYPES,H as lockedWhileHeld,Z as spliceChrome,v as splitChrome};
1
+ import{isSectionGroupType as C,SITE_FOOTER_TYPE as E,SITE_HEADER_TYPE as O,siteFooterDocChrome as k}from"../../format/lib/document/section-groups.js";import{zoneOwner as F}from"../../render/lib/document/selection-parent.js";import{isNode as x}from"efficient-easel/data";const m="Footer",D=[O,m,E],y=e=>{const t=e?.content;return Array.isArray(t)?t:[]},p=e=>{const t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},h=e=>{const t=e?.props?.id;return typeof t=="string"?t:void 0},A=e=>F(e)?.ownerId??"";function I(e){const t=k(y(e)),o=t.some(r=>r?.type===E);return t.filter(r=>r?.type===O||r?.type===E||r?.type===m&&!o)}function z(e,t){const o=new Set,r=s=>{if(Array.isArray(s)){for(const c of s)r(c);return}if(!(!s||typeof s!="object")){if(x(s)){const c=h(s);c&&o.add(c)}for(const c of Object.values(s))r(c)}};if(r(e),t){let s=!0;const c=new Set;for(;s;){s=!1;for(const[d,u]of Object.entries(t))c.has(d)||!o.has(A(d))||(c.add(d),r(u),s=!0)}}return o}function T(e,t){const o={},r={};for(const[s,c]of Object.entries(e??{}))(t.has(A(s))?o:r)[s]=c;return{owned:o,rest:r}}function M(e,t){if(!t)return e;const o=I(t);if(!o.length)return e;const r=o.filter(u=>u.type===O),s=o.filter(u=>u.type!==O),c={...e,content:[...r,...y(e),...s]},{owned:d}=T(p(t),z(o,p(t)));return Object.keys(d).length&&(c.zones={...p(e)??{},...d}),c}function v(e,t){if(!t)return{page:e,chrome:null};const o=I(t),r=new Set(o.map(h).filter(n=>!!n)),s=[],c=[];for(const n of y(e)){const i=h(n);i&&r.has(i)||C(n?.type)?c.push(n):s.push(n)}const d=new Map(c.map(n=>[h(n),n])),u=new Set;let f=k(y(t)).flatMap(n=>{const i=h(n);if(!i||!r.has(i))return[n];const l=d.get(i);return l?(u.add(l),[l]):[]});for(const n of c)u.has(n)||f.some(i=>i?.type===n.type)||(f=n.type===O?[n,...f]:[...f,n]);f=k(f);const N=f.length===y(t).length&&f.every((n,i)=>n===y(t)[i]),g=p(e),P=z(f,g),{owned:w,rest:S}=T(g,P),_=T(p(t),z(o,p(t))).owned,b={...t,content:N?t.content:[...f]},a=p(t);if(a||Object.keys(w).length){const n={};for(const[i,l]of Object.entries(a??{}))i in _?i in w&&(n[i]=w[i]):n[i]=l;for(const[i,l]of Object.entries(w))i in n||(n[i]=l);b.zones=n,a&&R(b.zones,a)&&(b.zones=a)}const j={...e,content:s};return g&&(Object.keys(S).length||!Object.keys(_).length?j.zones=S:delete j.zones),{page:j,chrome:b}}function R(e,t){const o=Object.keys(e),r=Object.keys(t);return o.length===r.length&&o.every((s,c)=>s===r[c]&&e[s]===t[s])}function G(e,t){return o=>e(o)||o!==void 0&&D.includes(o)&&t()}export{D as PINNED_CHROME_TYPES,G as lockedWhileHeld,M as spliceChrome,v as splitChrome};
@@ -1 +1 @@
1
- import{BOX_TYPE as m}from"../../../format/lib/document/container-blocks.js";import{SLOT_SECTION_SPECS as h}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as a}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as n,SPLITTABLE_SECTIONS as r,canSplitHead as p}from"../../../format/lib/sections/section-head-placement.js";import{presetFor as s}from"../../../format/lib/sections/section-presets.js";function f(o,{nodeDefaults:i,newNodeId:S,sectionLabel:e,blockIsOffered:c}){const t=s(o);return t?t(i,S):p(o)&&c(m)&&c(n)?{type:m,props:{...i(m),id:S(m),direction:"column",name:`${e(o)} section`,content:[{type:n,props:{...i(n),id:S(n),...r[o]?.headStyle?{headStyle:r[o].headStyle}:{},...r[o]?.headRowGap?{rowGap:r[o].headRowGap}:{},...r[o]?.headDescriptionSize?{descriptionSize:r[o].headDescriptionSize}:{},...a(o)!==a(n)?{eyebrowLook:a(o)}:{}}},{type:o,props:{...i(o),id:S(o),headPlacement:"own-box"}}]}}:h[o]?.fixed===!0?{type:o,props:{...i(o),id:S(o),layout:"boxes"}}:null}export{f as newSectionNode};
1
+ import{BOX_TYPE as a}from"../../../format/lib/document/container-blocks.js";import{SLOT_SECTION_SPECS as h}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as m}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as n,SPLITTABLE_SECTIONS as r,canSplitHead as s}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as E}from"./text-layouts.js";function _(o,{nodeDefaults:i,newNodeId:S,sectionLabel:e,blockIsOffered:t}){const c=E(o);return c?c(i,S):s(o)&&t(a)&&t(n)?{type:a,props:{...i(a),id:S(a),direction:"column",name:`${e(o)} section`,content:[{type:n,props:{...i(n),id:S(n),...r[o]?.headStyle?{headStyle:r[o].headStyle}:{},...r[o]?.headRowGap?{rowGap:r[o].headRowGap}:{},...r[o]?.headDescriptionSize?{descriptionSize:r[o].headDescriptionSize}:{},...m(o)!==m(n)?{eyebrowLook:m(o)}:{}}},{type:o,props:{...i(o),id:S(o),headPlacement:"own-box"}}]}}:h[o]?.fixed===!0?{type:o,props:{...i(o),id:S(o),layout:"boxes"}}:null}export{_ as newSectionNode};
@@ -1,4 +1,5 @@
1
1
  import { type StoredTextStyle } from "../../../render/lib/text-styles/site-text-styles.js";
2
+ import { type ThemeColors } from "../../../format/lib/theme.js";
2
3
  import { type Carried, type Dropped, type Restyled, type SectionNode, type SiteFacts, type SiteWrite } from "../../../render/lib/sections/section-to-box.js";
3
4
  export type DryRunPage = {
4
5
  label: string;
@@ -17,11 +18,21 @@ export type DryRunNode = {
17
18
  restyled: Restyled[];
18
19
  };
19
20
  export declare const BODY_STYLE_PX_AT_DEFAULTS: Readonly<Record<string, number>>;
20
- export type SiteWriteOut = Extract<SiteWrite, {
21
+ export declare function nearestTextStyle(px: number, kind: "heading" | "body", list?: readonly {
22
+ id: string;
23
+ kind: string;
24
+ }[]): string;
25
+ export type SiteWriteOut = (Extract<SiteWrite, {
21
26
  kind: "heading-case-upper";
22
27
  }> & {
23
28
  listIfNull?: StoredTextStyle[];
24
- };
29
+ }) | (Extract<SiteWrite, {
30
+ kind: "band-preset";
31
+ }> & {
32
+ index: number;
33
+ preset: ThemeColors;
34
+ themePresets: ThemeColors[];
35
+ });
25
36
  export type DryRunSiteWrites = {
26
37
  schema: string;
27
38
  site: string;
@@ -1,3 +1,3 @@
1
- import{defaultTextStyles as P}from"efficient-easel/text-styles/model";import{listToWrite as O,setStyleValues as T}from"../../../render/lib/text-styles/site-text-styles.js";import{convertSection as M,sectionToBoxRow as N,sectionToBoxTypes as R}from"../../../render/lib/sections/section-to-box.js";const z={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function D(t){const[e,d]=t.split("/");return e&&d?{schema:e,site:d}:void 0}function I(t){const e=a=>typeof a=="string"?a:null,d=t.theme_row===void 0?null:t.theme_row==="site";return{schema:String(t.schema),site:String(t.site),headingCase:e(t.heading_case),textStyles:typeof t.text_styles_is_null=="boolean"?!t.text_styles_is_null:null,textStylesList:Array.isArray(t.text_styles)?t.text_styles:null,ownThemeRow:d,deleted:t.site_deleted===!0}}const L=new Set([null,"authored"]);function A(t,e){const d=O(e),a=d.filter(s=>t.includes(s.id)&&s.values.letterCase===void 0).map(s=>s.id);return{list:a.reduce((s,i)=>T(s,i,{letterCase:"upper"}),d),changed:a.length>0}}function C(t,e){if(e?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(e&&e.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(!e||e.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!L.has(e.headingCase))return{notNeeded:`the site chose a heading case (${e.headingCase})`};if(e.textStyles&&!e.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:d,changed:a}=A(t.styles,e.textStyles?e.textStylesList??null:null);return a?{send:{kind:t.kind,styles:[...t.styles],...e.textStyles?{}:{listIfNull:d}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function Y(t,e={}){const d=[...e.types??R()],a=d.filter(l=>!N(l)),o=new Set(d.filter(l=>N(l))),s=[],i=[],n={},c={},f=new Map((e.sites??[]).map(l=>[`${l.schema}/${l.site}`,l])),g=new Map,k=(l,m,r)=>{const S=`${l.schema}/${l.site}`;let w=g.get(S);w||g.set(S,w={...l,facts:!!m,writes:[],undecided:[],notNeeded:[]});const p=C(r,m);if("send"in p){const u=w.writes.find(x=>JSON.stringify(x.write)===JSON.stringify(p.send));u?u.nodes+=1:w.writes.push({write:p.send,reason:"a heading that followed the site's heading case",nodes:1});return}const[$,y]="undecided"in p?[w.undecided,p.undecided]:[w.notNeeded,p.notNeeded],h=$.find(u=>u.kind===r.kind&&u.why===y);h?h.nodes+=1:$.push({kind:r.kind,why:y,nodes:1})};for(const l of t){const m=l.layout?.content;Array.isArray(m)&&m.forEach((r,S)=>{if(!r||typeof r.type!="string"||!o.has(r.type))return;const w=N(r.type),p=D(l.label),$=p?f.get(`${p.schema}/${p.site}`):void 0,y=M(r,w,$?{site:$}:{});if(y.skipped!==void 0){i.push({page:l.label,index:S,type:r.type,id:String(r.props?.id??""),why:y.skipped});return}if(p)for(const b of y.siteWrites)k(p,$,b);const h={page:l.label,index:S,type:r.type,id:String(r.props?.id??""),carried:y.carried,dropped:y.dropped,restyled:y.restyled},u=e.draw;u&&(h.before=u(r),h.after=y.nodes.map(u).join(""),h.sameMarkup=h.before===h.after),s.push(h);const x=n[r.type]??={nodes:0,pages:0,dropped:{}};x.nodes+=1,(c[r.type]??=new Set).add(l.label),x.pages=c[r.type].size;for(const b of y.dropped)x.dropped[b.key]=(x.dropped[b.key]??0)+1})}return{types:d,noRow:a,pages:t.length,nodes:s,skipped:i,byType:n,sites:[...g.values()],siteFacts:[...e.sites??[]]}}function U(t){return t.sites.filter(e=>e.writes.length).map(e=>({schema:e.schema,site:e.site,writes:e.writes.map(d=>d.write)}))}function E(t){const e=new Map;for(const d of t.nodes)for(const a of d.restyled){const o=a.textStyle??"none",s=z[o],i=a.size??s,n=a.sizePhone??a.size??s;if(i===void 0||n===void 0)continue;const c=a.was.size,f=a.was.sizePhone??a.was.size,g=[d.type,a.key,o,c,f,i,n].join("|"),k=e.get(g);k?k.nodes+=1:e.set(g,{type:d.type,key:a.key,textStyle:o,oldPx:c,oldPhonePx:f,newPx:i,newPhonePx:n,diff:i-c,diffPhone:n-f,nodes:1})}return[...e.values()]}const _=t=>t>0?`+${t}`:String(t),j=t=>P().find(e=>e.id===t)?.name??t,v=t=>`Capitalization = Uppercase on ${t.styles.join(", ")}${t.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${t.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function H(t){const e=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${t.pages}. Nodes converted on paper: ${t.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[o,s]of Object.entries(t.byType)){const i=Object.keys(s.dropped).length;e.push(`| ${o} | ${s.nodes} | ${s.pages} | ${i} |`)}if(t.noRow.length&&e.push("",`Asked for, but no row: ${t.noRow.join(", ")}.`),t.skipped.length){e.push("",`Nodes skipped (left as they are): ${t.skipped.length}.`);const o=new Map;for(const s of t.skipped){const i=o.get(s.type)??o.set(s.type,new Map).get(s.type);i.set(s.why,(i.get(s.why)??0)+1)}for(const[s,i]of o){e.push("",`## ${s} — skipped (not converted)`,"");for(const[n,c]of i)e.push(`- ×${c}: ${n}`)}}for(const[o,s]of Object.entries(t.byType)){const i=Object.entries(s.dropped);if(!i.length)continue;e.push("",`## ${o} — dropped`,"");const n=new Map;for(const c of t.nodes)if(c.type===o)for(const f of c.dropped)n.set(f.key,f.why);for(const[c,f]of i)e.push(`- \`${c}\` ×${f}: ${n.get(c)}`)}if(t.siteFacts.length){e.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const o=s=>s==null?"—":String(s);for(const s of t.siteFacts)e.push(`| ${s.schema}/${s.site} | ${o(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${o(s.headingCase)} | ${o(s.textStyles)} |`)}if(t.sites.length){e.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const o of t.sites){const s=`${o.schema}/${o.site}`,i=o.facts?"yes":"NO";for(const n of o.writes)e.push(`| ${s} | ${i} | ${v(n.write)} | send | ${n.nodes} | ${n.reason} |`);for(const n of o.undecided)e.push(`| ${s} | ${i} | ${n.kind} | UNDECIDED | ${n.nodes} | ${n.why} |`);for(const n of o.notNeeded)e.push(`| ${s} | ${i} | ${n.kind} | not needed | ${n.nodes} | ${n.why} |`)}}const d=E(t);if(d.length){const o=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],s=n=>`| ${n.type} | \`${n.key}\` | ${n.oldPx} (${n.oldPhonePx}) | ${j(n.textStyle)} | ${n.newPx} (${n.newPhonePx}) | ${_(n.diff)} (${_(n.diffPhone)}) | ${n.nodes} |`;e.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...o,...d.map(s));const i=d.filter(n=>Math.abs(n.diff)>2||Math.abs(n.diffPhone)>2);e.push("","## Body copy: differences over 2px",""),i.length?e.push(...o,...i.map(s)):e.push("None.")}const a=t.nodes.filter(o=>o.sameMarkup!==void 0);if(a.length){const o=a.filter(s=>s.sameMarkup).length;e.push("",`Markup equal before and after: ${o} of ${a.length} (a hint; the pixels decide).`)}return e.join(`
1
+ import{defaultTextStyles as _}from"efficient-easel/text-styles/model";import{headingDefaultPx as T}from"../../../render/components/Heading.js";import{headingLevelOfStyle as M}from"../../../render/components/Text.js";import{listToWrite as A,setStyleValues as D}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as L,bandPresetIndex as R}from"../../../format/lib/theme.js";import{convertSection as z,sectionToBoxRow as N,sectionToBoxTypes as E}from"../../../render/lib/sections/section-to-box.js";const P={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function X(e,t,i=_()){const d=s=>t==="heading"?T(M(s)):P[s];let n;for(const{id:s,kind:r}of i){const o=r===t?d(s):void 0;if(o===void 0)continue;const l=Math.abs(o-e),c=n?Math.abs(n.px-e):1/0;(l<c||l===c&&n&&o>n.px)&&(n={id:s,px:o})}if(!n)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return n.id}function C(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function K(e){const t=d=>typeof d=="string"?d:null,i=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:i,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{}}}const j=new Set([null,"authored"]);function v(e,t){const i=A(t),d=i.filter(s=>e.includes(s.id)&&s.values.letterCase===void 0).map(s=>s.id);return{list:d.reduce((s,r)=>D(s,r,{letterCase:"upper"}),i),changed:d.length>0}}function B(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return F(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!j.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:i,changed:d}=v(e.styles,t.textStyles?t.textStylesList??null:null);return d?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:i}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function F(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const d=i[e.page];if(!d)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(R(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const n=L(d);return{send:{kind:e.kind,page:e.page,index:i.length,preset:n,themePresets:[...i,n]}}}function Q(e,t={}){const i=[...t.types??E()],d=i.filter(p=>!N(p)),n=new Set(i.filter(p=>N(p))),s=[],r=[],o={},l={},c=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),$=new Map,k=(p,m,a)=>{const b=`${p.schema}/${p.site}`;let g=$.get(b);g||$.set(b,g={...p,facts:!!m,writes:[],undecided:[],notNeeded:[]});const h=B(a,m);if("send"in h){const u=g.writes.find(x=>JSON.stringify(x.write)===JSON.stringify(h.send));u?u.nodes+=1:g.writes.push({write:h.send,reason:a.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[w,f]="undecided"in h?[g.undecided,h.undecided]:[g.notNeeded,h.notNeeded],y=w.find(u=>u.kind===a.kind&&u.why===f);y?y.nodes+=1:w.push({kind:a.kind,why:f,nodes:1})};for(const p of e){const m=p.layout?.content;Array.isArray(m)&&m.forEach((a,b)=>{if(!a||typeof a.type!="string"||!n.has(a.type))return;const g=N(a.type),h=C(p.label),w=h?c.get(`${h.schema}/${h.site}`):void 0,f=z(a,g,w?{site:w}:{});if(f.skipped!==void 0){r.push({page:p.label,index:b,type:a.type,id:String(a.props?.id??""),why:f.skipped});return}if(h)for(const S of f.siteWrites)k(h,w,S);const y={page:p.label,index:b,type:a.type,id:String(a.props?.id??""),carried:f.carried,dropped:f.dropped,restyled:f.restyled},u=t.draw;u&&(y.before=u(a),y.after=f.nodes.map(u).join(""),y.sameMarkup=y.before===y.after),s.push(y);const x=o[a.type]??={nodes:0,pages:0,dropped:{}};x.nodes+=1,(l[a.type]??=new Set).add(p.label),x.pages=l[a.type].size;for(const S of f.dropped)x.dropped[S.key]=(x.dropped[S.key]??0)+1})}return{types:i,noRow:d,pages:e.length,nodes:s,skipped:r,byType:o,sites:[...$.values()],siteFacts:[...t.sites??[]]}}function Z(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}function I(e){const t=new Map;for(const i of e.nodes)for(const d of i.restyled){const n=d.textStyle??"none",s=P[n],r=d.size??s,o=d.sizePhone??d.size??s;if(r===void 0||o===void 0)continue;const l=d.was.size,c=d.was.sizePhone??d.was.size,$=[i.type,d.key,n,l,c,r,o].join("|"),k=t.get($);k?k.nodes+=1:t.set($,{type:i.type,key:d.key,textStyle:n,oldPx:l,oldPhonePx:c,newPx:r,newPhonePx:o,diff:r-l,diffPhone:o-c,nodes:1})}return[...t.values()]}const O=e=>e>0?`+${e}`:String(e),W=e=>_().find(t=>t.id===e)?.name??e,Y=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function ee(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const r=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${r} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const r=n.get(s.type)??n.set(s.type,new Map).get(s.type);r.set(s.why,(r.get(s.why)??0)+1)}for(const[s,r]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[o,l]of r)t.push(`- ×${l}: ${o}`)}}for(const[n,s]of Object.entries(e.byType)){const r=Object.entries(s.dropped);if(!r.length)continue;t.push("",`## ${n} — dropped`,"");const o=new Map;for(const l of e.nodes)if(l.type===n)for(const c of l.dropped)o.set(c.key,c.why);for(const[l,c]of r)t.push(`- \`${l}\` ×${c}: ${o.get(l)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,r=n.facts?"yes":"NO";for(const o of n.writes)t.push(`| ${s} | ${r} | ${Y(o.write)} | send | ${o.nodes} | ${o.reason} |`);for(const o of n.undecided)t.push(`| ${s} | ${r} | ${o.kind} | UNDECIDED | ${o.nodes} | ${o.why} |`);for(const o of n.notNeeded)t.push(`| ${s} | ${r} | ${o.kind} | not needed | ${o.nodes} | ${o.why} |`)}}const i=I(e);if(i.length){const n=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],s=o=>`| ${o.type} | \`${o.key}\` | ${o.oldPx} (${o.oldPhonePx}) | ${W(o.textStyle)} | ${o.newPx} (${o.newPhonePx}) | ${O(o.diff)} (${O(o.diffPhone)}) | ${o.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...n,...i.map(s));const r=i.filter(o=>Math.abs(o.diff)>2||Math.abs(o.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),r.length?t.push(...n,...r.map(s)):t.push("None.")}const d=e.nodes.filter(n=>n.sameMarkup!==void 0);if(d.length){const n=d.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${d.length} (a hint; the pixels decide).`)}return t.join(`
2
2
  `)+`
3
- `}export{z as BODY_STYLE_PX_AT_DEFAULTS,E as bodyStyleRows,H as dryRunMarkdown,Y as dryRunSections,A as headingCaseList,I as siteFactsFromRead,D as siteOfLabel,U as siteWritesFile};
3
+ `}export{P as BODY_STYLE_PX_AT_DEFAULTS,I as bodyStyleRows,ee as dryRunMarkdown,Q as dryRunSections,v as headingCaseList,X as nearestTextStyle,K as siteFactsFromRead,C as siteOfLabel,Z as siteWritesFile};
@@ -0,0 +1,6 @@
1
+ import { type SectionToBoxRow } from "../../../render/lib/sections/section-to-box.js";
2
+ import { type SectionPreset } from "../../../format/lib/sections/section-presets.js";
3
+ export declare const TEXT_LAYOUTS: readonly string[];
4
+ export declare function conversionPreset(type: string, row: SectionToBoxRow): SectionPreset;
5
+ export declare function layoutPresetFor(type: string): SectionPreset | null;
6
+ export declare function layoutTypes(): string[];
@@ -0,0 +1 @@
1
+ import{convertSection as p,convertsToBox as i,sectionToBoxRow as T}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as m,presetFor as O}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as x}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{isNodeList as E}from"efficient-easel/data";const c=Object.keys(x);function u(o,t,e){const r={};for(const n of Object.keys(t(o.type)))r[n]=void 0;for(const[n,s]of Object.entries(o.props))r[n]=E(s)?s.map(f=>u(f,t,e)):s;return r.id=e(o.type),{type:o.type,props:r}}function l(o,t){return(e,r)=>{const{node:n}=p({type:o,props:{...e(o),id:r(o)}},t);return u(n,e,r)}}function y(o){return c.includes(o)}function S(o){if(!y(o)||!i(o))return null;const t=T(o);return t?l(o,t):null}function j(o){return O(o)??S(o)}function v(){return[...Object.keys(m),...c.filter(o=>i(o))]}export{c as TEXT_LAYOUTS,l as conversionPreset,j as layoutPresetFor,v as layoutTypes};
@@ -3,6 +3,7 @@ export type PartSliderFillsRowOptions = {
3
3
  readonly partPanel?: string;
4
4
  readonly sheet?: string;
5
5
  readonly shellSheet?: SourceFile;
6
+ readonly screenSheet?: SourceFile;
6
7
  readonly hosts: readonly string[];
7
8
  readonly renderedHosts?: Readonly<Record<string, string>>;
8
9
  readonly minFiles: number;