efficient-web-builder 65.0.0 → 67.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 (241) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/editor/components/AnchorField.js +1 -1
  3. package/dist/editor/components/CardShadowField.js +1 -1
  4. package/dist/editor/components/MediaUploadField.js +1 -1
  5. package/dist/editor/components/PagesPanel.js +1 -1
  6. package/dist/editor/components/PartSettingsPanel.js +1 -1
  7. package/dist/editor/components/PartTextBox.js +1 -1
  8. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  9. package/dist/editor/components/SectionEditor.js +1 -1
  10. package/dist/editor/components/SectionWidthRows.d.ts +3 -1
  11. package/dist/editor/components/SectionWidthRows.js +1 -1
  12. package/dist/editor/components/SiteTextStylesField.js +1 -1
  13. package/dist/editor/components/WebsitePreviewButton.js +1 -1
  14. package/dist/editor/components/storefront-editor.css +16 -24
  15. package/dist/editor/components/usePreviewHref.js +1 -1
  16. package/dist/editor/lib/animation/hover-fields.d.ts +1 -1
  17. package/dist/editor/lib/animation/hover-fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/general/Footprint/fields.d.ts +0 -1
  23. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  24. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  25. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  26. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  27. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  28. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  29. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  30. package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
  31. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  32. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  33. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  34. package/dist/editor/lib/document/box-fields.d.ts +2 -1
  35. package/dist/editor/lib/document/box-fields.js +1 -1
  36. package/dist/editor/lib/document/card-row-fields.d.ts +3 -0
  37. package/dist/editor/lib/document/card-row-fields.js +1 -1
  38. package/dist/editor/lib/document/controls.d.ts +31 -12
  39. package/dist/editor/lib/document/controls.js +1 -1
  40. package/dist/editor/lib/document/field-groups.d.ts +0 -3
  41. package/dist/editor/lib/document/field-groups.js +1 -1
  42. package/dist/editor/lib/document/passes/inspector.js +1 -1
  43. package/dist/editor/lib/document/section-own-width-fields.js +1 -1
  44. package/dist/editor/lib/sections/section-dry-run.d.ts +1 -20
  45. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  46. package/dist/editor/lib/sections/text-layouts.js +1 -1
  47. package/dist/format/lib/animation/views.js +1 -1
  48. package/dist/format/lib/content/block-sources.d.ts +3 -0
  49. package/dist/format/lib/content/block-sources.js +1 -1
  50. package/dist/format/lib/content/borders.d.ts +12 -2
  51. package/dist/format/lib/content/borders.js +1 -1
  52. package/dist/format/lib/content/box-background.d.ts +1 -0
  53. package/dist/format/lib/content/box-background.js +1 -1
  54. package/dist/format/lib/content/box-link.d.ts +11 -0
  55. package/dist/format/lib/content/box-link.js +8 -8
  56. package/dist/format/lib/content/box-phone-place.d.ts +0 -2
  57. package/dist/format/lib/content/box-phone-place.js +1 -1
  58. package/dist/format/lib/content/box-side-space.js +1 -1
  59. package/dist/format/lib/content/card-corners.d.ts +3 -1
  60. package/dist/format/lib/content/card-corners.js +1 -1
  61. package/dist/format/lib/content/card-image-shape.d.ts +5 -1
  62. package/dist/format/lib/content/card-image-shape.js +1 -1
  63. package/dist/format/lib/content/card-template.d.ts +1 -0
  64. package/dist/format/lib/content/card-template.js +1 -1
  65. package/dist/format/lib/content/contact.d.ts +0 -1
  66. package/dist/format/lib/content/contact.js +2 -2
  67. package/dist/format/lib/content/css-length.d.ts +7 -0
  68. package/dist/format/lib/content/css-length.js +1 -0
  69. package/dist/format/lib/content/image-corners.d.ts +3 -1
  70. package/dist/format/lib/content/image-corners.js +1 -1
  71. package/dist/format/lib/content/page-width.d.ts +17 -1
  72. package/dist/format/lib/content/page-width.js +1 -1
  73. package/dist/format/lib/content/section-corners.d.ts +3 -1
  74. package/dist/format/lib/content/section-corners.js +1 -1
  75. package/dist/format/lib/content/section-sticky.d.ts +5 -0
  76. package/dist/format/lib/content/section-sticky.js +1 -1
  77. package/dist/format/lib/content/section-type-size.d.ts +12 -1
  78. package/dist/format/lib/content/section-type-size.js +1 -1
  79. package/dist/format/lib/content/section-width.d.ts +8 -0
  80. package/dist/format/lib/content/section-width.js +1 -1
  81. package/dist/format/lib/content/view-tier.d.ts +10 -0
  82. package/dist/format/lib/content/view-tier.js +1 -0
  83. package/dist/format/lib/document/blocks/general/Banner/meta.d.ts +5 -0
  84. package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
  85. package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +2 -0
  86. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  87. package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
  88. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +5 -0
  89. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -0
  90. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  91. package/dist/format/lib/document/blocks/general/SectionHeader/meta.d.ts +6 -0
  92. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  93. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.d.ts +2 -0
  94. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.js +2 -2
  95. package/dist/format/lib/document/media-drop.js +1 -1
  96. package/dist/format/lib/document/one-h1.d.ts +2 -0
  97. package/dist/format/lib/document/one-h1.js +1 -1
  98. package/dist/format/lib/document/passes/types.d.ts +1 -0
  99. package/dist/format/lib/document/renamed-props.d.ts +1 -0
  100. package/dist/format/lib/document/renamed-props.js +1 -1
  101. package/dist/format/lib/document/section-catalog.js +10 -2
  102. package/dist/format/lib/document/section-descriptions.js +1 -1
  103. package/dist/format/lib/editor-words-catalogue.d.ts +10 -0
  104. package/dist/format/lib/editor-words-catalogue.js +3 -3
  105. package/dist/format/lib/editor-words-kept.js +1 -1
  106. package/dist/format/lib/fit-words.js +4 -1
  107. package/dist/format/lib/links/page-link-rules.d.ts +0 -1
  108. package/dist/format/lib/links/page-link-rules.js +1 -1
  109. package/dist/format/lib/markup.d.ts +1 -0
  110. package/dist/format/lib/markup.js +2 -2
  111. package/dist/format/lib/post-card-layout.d.ts +3 -0
  112. package/dist/format/lib/post-card-layout.js +1 -1
  113. package/dist/format/lib/sections/divider-style.d.ts +9 -0
  114. package/dist/format/lib/sections/divider-style.js +1 -1
  115. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  116. package/dist/format/lib/sections/section-presets.js +1 -1
  117. package/dist/format/lib/sections/timeline-year-shape.js +1 -1
  118. package/dist/format/lib/source-rules/editor-words.js +1 -1
  119. package/dist/format/lib/source-rules/one-length-control.d.ts +18 -0
  120. package/dist/format/lib/source-rules/one-length-control.js +16 -0
  121. package/dist/format/lib/source-rules/support/label-extraction.js +3 -3
  122. package/dist/format/lib/theme.d.ts +1 -2
  123. package/dist/format/lib/theme.js +4 -4
  124. package/dist/format/lib/web-runtime.d.ts +2 -0
  125. package/dist/format/lib/web-runtime.js +1 -1
  126. package/dist/render/components/BlockFrame.d.ts +3 -3
  127. package/dist/render/components/BlockFrame.js +1 -1
  128. package/dist/render/components/Breadcrumb.js +1 -1
  129. package/dist/render/components/Btn.js +1 -1
  130. package/dist/render/components/CardRowContext.d.ts +7 -1
  131. package/dist/render/components/CardRowContext.js +1 -1
  132. package/dist/render/components/CategoryBar.js +1 -1
  133. package/dist/render/components/ContactLocations.js +2 -2
  134. package/dist/render/components/DealerFinder.d.ts +4 -1
  135. package/dist/render/components/DealerFinder.js +1 -1
  136. package/dist/render/components/Divider.d.ts +3 -1
  137. package/dist/render/components/Divider.js +1 -1
  138. package/dist/render/components/DocMasthead.js +1 -1
  139. package/dist/render/components/DocTabs.js +1 -1
  140. package/dist/render/components/FeaturedCover.js +1 -1
  141. package/dist/render/components/Flex.d.ts +3 -1
  142. package/dist/render/components/Flex.js +1 -1
  143. package/dist/render/components/Footprint.d.ts +5 -3
  144. package/dist/render/components/Footprint.js +1 -1
  145. package/dist/render/components/Heading.d.ts +0 -1
  146. package/dist/render/components/Heading.js +1 -1
  147. package/dist/render/components/HeroGroup.d.ts +3 -1
  148. package/dist/render/components/HeroGroup.js +1 -1
  149. package/dist/render/components/ImageBlock.d.ts +2 -1
  150. package/dist/render/components/ImageBlock.js +1 -1
  151. package/dist/render/components/IntroBleed.d.ts +3 -2
  152. package/dist/render/components/IntroBleed.js +1 -1
  153. package/dist/render/components/KeyFeatures.js +1 -1
  154. package/dist/render/components/LocationMap.js +1 -1
  155. package/dist/render/components/LogoBlock.js +1 -1
  156. package/dist/render/components/Logos.d.ts +1 -2
  157. package/dist/render/components/Logos.js +1 -1
  158. package/dist/render/components/LongRead.js +1 -1
  159. package/dist/render/components/PictureHoverMove.d.ts +18 -0
  160. package/dist/render/components/PictureHoverMove.js +1 -0
  161. package/dist/render/components/PictureWash.d.ts +2 -1
  162. package/dist/render/components/PictureWash.js +1 -1
  163. package/dist/render/components/PostCard.js +1 -1
  164. package/dist/render/components/ProcessSteps.d.ts +2 -1
  165. package/dist/render/components/ProcessSteps.js +1 -1
  166. package/dist/render/components/SectionHeader.js +1 -1
  167. package/dist/render/components/SideListLayout.d.ts +4 -1
  168. package/dist/render/components/SideListLayout.js +1 -1
  169. package/dist/render/components/Split.js +1 -1
  170. package/dist/render/components/Text.d.ts +2 -1
  171. package/dist/render/components/Text.js +1 -1
  172. package/dist/render/components/Timeline.js +1 -1
  173. package/dist/render/components/TimelineRail.d.ts +11 -3
  174. package/dist/render/components/TimelineRail.js +1 -1
  175. package/dist/render/components/TimelineTrack.js +1 -1
  176. package/dist/render/components/TitleWithButtons.js +1 -1
  177. package/dist/render/components/goldPhrases.js +3 -3
  178. package/dist/render/lib/content/block-size.d.ts +5 -1
  179. package/dist/render/lib/content/block-size.js +1 -1
  180. package/dist/render/lib/content/box-stack-line.d.ts +1 -1
  181. package/dist/render/lib/content/box-stack-line.js +1 -1
  182. package/dist/render/lib/content/button-look.d.ts +2 -0
  183. package/dist/render/lib/content/button-look.js +1 -1
  184. package/dist/render/lib/content/section-edge.js +1 -1
  185. package/dist/render/lib/content/section-padding.d.ts +5 -2
  186. package/dist/render/lib/content/section-padding.js +1 -1
  187. package/dist/render/lib/dealer-source.d.ts +6 -2
  188. package/dist/render/lib/dealer-source.js +1 -1
  189. package/dist/render/lib/document/blocks/general/Banner/render.js +1 -1
  190. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  191. package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
  192. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  193. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  194. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  195. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  196. package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
  197. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  198. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  199. package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
  200. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +2 -0
  201. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  202. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  203. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  204. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  205. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +2 -2
  206. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  207. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  208. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  209. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  210. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.d.ts +3 -0
  211. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.js +1 -0
  212. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  213. package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +3 -0
  214. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  215. package/dist/render/lib/document/card-press-titles.d.ts +10 -0
  216. package/dist/render/lib/document/card-press-titles.js +1 -0
  217. package/dist/render/lib/document/part-styles.d.ts +13 -0
  218. package/dist/render/lib/document/part-styles.js +2 -2
  219. package/dist/render/lib/document/passes/borders.js +1 -1
  220. package/dist/render/lib/document/passes/corners.js +1 -1
  221. package/dist/render/lib/document/passes/section-height.js +1 -1
  222. package/dist/render/lib/document/passes/section-padding.js +1 -1
  223. package/dist/render/lib/document/passes/section-width.js +1 -1
  224. package/dist/render/lib/document/published-passes.js +1 -1
  225. package/dist/render/lib/document/slot-specs.js +1 -1
  226. package/dist/render/lib/sections/section-to-box.d.ts +0 -15
  227. package/dist/render/lib/sections/section-to-box.js +1 -1
  228. package/dist/render/lib/site-runtime.d.ts +4 -1
  229. package/dist/render/lib/site-runtime.js +1 -1
  230. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  231. package/package.json +5 -5
  232. package/dist/editor/components/TemplateFieldRow.d.ts +0 -11
  233. package/dist/editor/components/TemplateFieldRow.js +0 -1
  234. package/dist/editor/lib/document/panel-heading-scope.d.ts +0 -8
  235. package/dist/editor/lib/document/panel-heading-scope.js +0 -1
  236. package/dist/editor/lib/document/template-field.d.ts +0 -13
  237. package/dist/editor/lib/document/template-field.js +0 -1
  238. package/dist/format/lib/canvas-accent.d.ts +0 -1
  239. package/dist/format/lib/canvas-accent.js +0 -1
  240. package/dist/format/lib/source-rules/padding-units-declared.d.ts +0 -2
  241. package/dist/format/lib/source-rules/padding-units-declared.js +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,87 @@
1
1
  # Changelog
2
2
 
3
+ ## 67.0.0 - 2026-11-10
4
+
5
+ From main at `25036624`: #689, #691, #675, #692, #690. A MAJOR: #690 has `!` (narrowed peers). Peers move: `efficient-easel` `^33.0.0` -> `^34.1.0`, `efficient-shell` `^12.30.0` -> `^12.33.0` (#690). No export is removed. No stored key changes; no stored page needs a data move.
6
+
7
+ **BREAKING (#690):** the peers `efficient-easel` `^34.1.0` (was `^33.0.0`) and `efficient-shell` `^12.33.0` (was `^12.30.0`). A setting's key in one view is now spelled by easel's `viewKeyAt(key, tier)` everywhere in web-builder (28 lines that chose the key by hand or called the deprecated `unitKeyAt`). The `ALIGN_KEY_OF_TIER` table in `PartSettingsPanel` is gone (it was not exported). Stored key strings do not change.
8
+
9
+ - **#689:** Collections is a host-row press type. It leaves `HEAD_ONLY_TYPES` and joins `HOST_ROW_HEAD_TYPES` and `HOST_PRESS_TYPES`; the builder registers no row for it, the host does. With no host row, a press is today's insert, node for node.
10
+ - **#691:** a Box that draws a picture takes the picture hover that an Image part has: Zoom and Darken on hover. New module `components/PictureHoverMove` (`PictureHoverMoveDrawn`, `pictureHoverMoveOf`, `PictureHoverMoveSheet`, `PictureHoverZoom`), now the one drawing of the hover for `ImageBlock` and the Box. `pictureHoverFields` gets an optional third parameter `moves`; `PictureWash` gets an optional `restClassName`. A Box with no hover key draws the same bytes as before.
11
+ - **#675:** more web-builder length rows take their kind from easel's one unit table: a unit menu inside the number box where the kind has more than one unit (Divider Thickness and Length, HeroGroup Width and Nudge, Corners, Section Border, Stick to top distance, Section Content width, Scroll-Over Text font sizes, Part text box Font size, Paragraph spacing and Padding). Each stores `<key>Unit` per view; a number with no unit key draws the same CSS as before. New exports and optional parameters only.
12
+ - **#692:** the Gallery (`GalleryB`) is a host-row press type, the same move as #689. Stored Gallery nodes keep today's tile.
13
+
14
+ ### For hosts
15
+
16
+ 1. Raise `efficient-easel` to `^34.1.0` and `efficient-shell` to `^12.33.0` (#690). Nothing else changes in web-builder imports.
17
+ 2. storefront-blocks: register the Collections row (#689) and the GalleryB row (#692) when it takes the host-row presses; until then a press inserts as today.
18
+
19
+ ## 66.0.0 - 2026-11-10
20
+
21
+ From main at `a7a035c9`: #668, #673, #674, #676, #669, #678, #677, #679, #680, #681, #682, #432, #683, #685, #684, #687, #686. A MAJOR: #668, #674, #677, #679, #682, #684, #685 and #686 have `!` (removed exports, removed props, narrowed peers). Peers move: `efficient-easel` `^30.1.0` -> `^33.0.0` (#668 to `^31.3.0`, then #682), `efficient-shell` `^12.22.0` -> `^12.30.0` (#682). One stored key is moved on read: the Locations Map's `source` (#679). No stored page needs a data move.
22
+
23
+ **BREAKING (#668):** the peer `efficient-easel` moves to `^31.3.0` (was `^30.1.0`): the length unit table (`LENGTH_KIND_UNITS`) is new in easel 31.3.0. Removed: `PADDING_UNITS` (`editor/lib/document/box-fields`; the table is now `LENGTH_UNITS_TABLE`, read from easel) and the module `format/lib/source-rules/padding-units-declared` (replaced by `format/lib/source-rules/one-length-control`).
24
+
25
+ **BREAKING (#674):** removed `normalizeShadowColor` (`format/lib/theme`; use `pictureShadowColor` from `efficient-easel/screen/lib/document/shadow-values`) and the whole module `format/lib/canvas-accent` (`CANVAS_ACCENT`; write `var(--es-accent)`). `DEFAULT_SHADOW_COLOR` stays.
26
+
27
+ **BREAKING (#677):** removed `bodyStyleRows`, `BodyStyleRow`, `nearestTextStyle`, `BODY_STYLE_PX_AT_DEFAULTS` and the `restyled` field of `DryRunNode` (`editor/lib/sections/section-dry-run`); `Restyled`, the `restyled` field of `SectionConversion` and `was` on a text `PartRow` (`lib/sections/section-to-box`); `headingDefaultPx` (`components/Heading`).
28
+
29
+ **BREAKING (#679):** removed `footprintBlockSource` (editor `lib/document/blocks/general/Footprint/fields`), `FootprintSource` and `parseFootprintSource` (render `lib/dealer-source`). The `Footprint` component no longer takes `source`; it takes `dealers?: boolean`. A stored `source` moves to `dataSource` on read (`SOURCE_PROPS_MOVED`): `"dealers"` or a source key fills an empty `dataSource`; `"typed"` and any other value read as Manual; `source` is dropped.
30
+
31
+ **BREAKING (#682):** the peers narrow: `efficient-easel` `^31.3.0` -> `^33.0.0`, `efficient-shell` `^12.22.0` -> `^12.30.0` (easel 33.0.0 holds `SITE_SIDE` and needs shell 12.30.0). Removed `SITE_COLUMN_EDGE_NARROW` (`format/lib/content/page-width`). `WEBSITE_MEDIA_DROP` answers easel's `pictureOf` + `kinds`, not `takes` + `replace` (easel 32 removed them). Behaviour: a file dropped on an empty Box, Hero or Hero slide with no picture now lands between its blocks, not on the node.
32
+
33
+ **BREAKING (#685):** removed from `editor/lib/document/controls`: `checkbox`, `sectionBorderField`, `templateField`. Removed modules `editor/components/TemplateFieldRow` and `editor/lib/document/template-field` (`planTemplateRow`, `templateWrite`, types `TemplateRender`, `TemplateSelector`, `TemplatePlan`). Removed `slugifyAnchor` (`editor/lib/links/page-link-rules`; use `slugify` from `efficient-shell/format`). The `.sf-checkbox` style is gone.
34
+
35
+ **BREAKING (#684):** removed `BOX_PHONE_PAD_LINE` (`lib/content/box-stack-line`; read `BOX_PHONE_PAD_AT_EDGE`), `BOX_PHONE_PLACE_CANVAS_TABLET_CLASS` and the `tabletKeepsRow` option of `boxPhoneCell` (`lib/content/box-phone-place`; use `BOX_PHONE_PLACE_CANVAS_CLASS`), `BOUND_CARD_MEDIA_FIELD_KEYS` and `CARD_STYLE_FIELD_KEYS` (`lib/document/field-groups`; use `CARD_MEDIA_FIELD_KEYS` / the keys of `cardStyleFields()`), and the `mark` prop of `LogoWallMark` (`components/Logos`; pass `kind`).
36
+
37
+ **BREAKING (#686):** removed `slugifyGroupId` (`format/lib/content/contact`; use `slugify` from `efficient-shell/format`), `GroupLabel` (`editor/lib/document/controls`; use `PanelBand`), the whole module `editor/lib/document/panel-heading-scope` (`useFoldHeadingLevel`, `FoldHeadingScope`, `PANEL_NAME_LEVEL`, `FOLD_TOP_LEVEL`) and `foldTopTier` (`editor/lib/document/field-groups`). Every `@deprecated` note now gives a delete day.
38
+
39
+ **For hosts:**
40
+ - Install efficient-easel 33.0.0 or later and efficient-shell 12.30.0 or later with this release (#668, #682).
41
+ - efficient-storefront: merge eff-erp/efficient-storefront#1943 (merged as `1acc1656`) before it takes this release. Its `scripts/test-editor-heading-levels.tsx` imported `panel-heading-scope` (#686).
42
+ - efficient-storefront: `scripts/test-section-presets.tsx:456-462` pins the Manifesto words Box sides at 40; it must expect `"site"` (#682).
43
+ - The Tab Bar's tabs look needs efficient-storefront-blocks 0.95.0 or later in the host (#673).
44
+ - A host with a block allow list must also allow Box, Text, ButtonBlock and ImageBlock to keep the Section Header, Call-to-Action Heading, Editorial Text, Lead Text and Banner presses (#677).
45
+ - storefront-blocks, in its bump to this release:
46
+ - `scripts/test-block-sets.tsx` §4 and §5 name the blocks the five text presses lay down and their new Layouts group (#677).
47
+ - Delete `Footprint.source` from `scripts/test-segmented-controls.tsx`, `scripts/section-style-baseline.tsx` and `scripts/test-animation-tab.tsx:490`. Run `scripts/test-editor-offerings.ts`: `blockSources()` now also holds the builder's own `dealers` source (#679).
48
+ - Re-record, on purpose, the stored-bytes fixtures that hold a markup web link: such a link now draws through the site link (`href` after `class`, `target`/`rel` added) (#678).
49
+ - `scripts/test-listing-section-to-box.tsx` test 9 must assert that a fresh "List" press reaches the Box row. Keep the listing's inline head branch: 2 stored listings still draw through it. Import `pageTitleTag` / `pageTitleDemoted` from `format/lib/document/one-h1` in place of its two private copies (#676).
50
+ - `globals.css:3300-3304`: rewrite the stale comment about side padding (no CSS change) (#682).
51
+ - A block that calls `CardTemplateRows` with `actions` hands `pressTitles`, or it keeps the whole-copy name (#687).
52
+ - efficient-admin-portal: nothing on main. Its paused media drag branch must port `EMAIL_MEDIA_DROP` to `pictureOf` + `kinds` when it resumes (#682).
53
+
54
+ ### Added
55
+
56
+ - **Every length row takes its kind** (#668): Fixed width, Min width, Content width (px, % or vw, per view), Min font size (px or vw), Button Border and Corners (px or vw), and Card image get the unit menu inside their number box, from easel's one unit table. Section height is one row (the separate Unit row is gone). New: `lengthUnitFields`, `LENGTH_UNITS_TABLE`, `heightLayersAt`, `cardImageFields`, `CARD_IMAGE_UNIT_KEY`, `BLOCK_LENGTH_KEYS`, `blockLengthUnitKey`, `cssLengthOf` (`format/lib/content/css-length`), `Slider` `units?`. A number with no unit key is px, so stored pages draw the same.
57
+ - **Tab Bar** (#673): "Document Tabs" becomes the Layouts row Tab Bar, pressed as a pinned Box (Stays above on) that holds one Menu block in Tabs style. Category Bar is retired into it: set the Menu's content to Blog categories. New `BLOG_CATEGORIES_SOURCE`.
58
+ - **The product listing presses through its host Box row** (#676): `AlloyWheelsListing` joins `HOST_PRESS_TYPES`. New `pageTitleTag(level)` and `pageTitleDemoted(props)` (`lib/document/one-h1`), the one title level rule.
59
+ - **Dealer rows draw through the card list action** (#669): the Locations Map in dealers mode draws each dealer as a card template copy, with the site-wide picked look. Text and Image get "Link from"; Text gets an `href` prop. New `footprintDealerCardSeed`, `withFootprintListTemplate`, `dealerCardRow`, `dealerPressLabel`, `cardRowLinkField`, `linkOpensElsewhere`, `linkTargetAttrs`.
60
+ - **The five text sections press as Boxes** (#677): Section Header, Call-to-Action Heading, Editorial Text, Lead Text and Banner. The last four move to the Layouts group. Stored nodes still draw through their old components.
61
+ - **Office content on the Locations Map** (#679): the map reads its rows from `dataSource` (Manual, Group offices, Dealers), and "Shows" offers only the fields of that source. The builder declares `dealers` itself (`DEALERS_BLOCK_SOURCE`). New `DEALERS_SOURCE`, `DEALER_FIELDS`, `SOURCE_PROPS_MOVED`, `isBlockSourceKey`.
62
+ - **Image & Text Columns press lays down a Box** (#680): the head as Text parts over three column Boxes (Image, heading, body) in the `boxes` slot. New `ProcessSteps/column-seed` (`processColumnSeed`, `processColumnSeeds`, `PROCESS_STEPS_SEED_COUNT`, `PROCESS_COLUMNS_SLOT`) and `withAccentItalic`.
63
+ - **Logo "Link from" in card templates** (#681). New `rowLinkText`, the one reading of a row link.
64
+ - **A padding side can follow the site Side space** (#682): a Left or Right side may store `"site"` (easel `SITE_SIDE`). Fresh presses and the Manifesto preset write it. New `siteSideRoom` (`page-width`) and `padSideValue` (`section-padding`); `padSideAttrs` takes an optional `sideSpace`.
65
+ - **A dropped file is refused where it would not show** (#432): a video, and a picture drawn from row data (a card Box or a card-template Image), refuse a drop from the Media Library. New `boxNamesRowPicture` (`format/lib/content/box-background`).
66
+ - New source guards: `scripts/test-deprecated-has-date.ts` refuses a `@deprecated` note with no delete day (#686); the shell ui-check `colour` kind now reads `.css` too (#674).
67
+
68
+ ### Changed
69
+
70
+ - **One new-tab rule for every link** (#678): `SiteLink` takes `newTab?: "auto" | true`. A link to another website now opens in a new tab on Button, Image, Box, Logo, Text inline links and the sections that draw a typed link; a link to the shop's own host stays in the same tab after hydration. New `useSiteHost`, `SiteLinkNewTab`, `NEW_TAB_ATTRS`, `siteLinkDraws`, `isWebAddress`, `shopOrigin`, `shopHost`.
71
+ - The Card shadow row takes its miniatures from easel's `SHADOW_PREVIEW` (#674).
72
+ - A "Link from" row with nothing to choose is not drawn (#681).
73
+ - Every remaining `@deprecated` note gives a delete day (#684, #686).
74
+
75
+ ### Removed
76
+
77
+ - The exports, props and modules named under BREAKING above (#668, #674, #677, #679, #682, #684, #685, #686).
78
+ - The Section height Unit row (#668) and the Locations Map's own Source row (#679).
79
+
80
+ ### Fixed
81
+
82
+ - **A press button is named by its row title part** (#687): a screen reader no longer reads a link inside the copy twice. A Card list item or a Locations Map office button gets `aria-labelledby` its title Text. New module `lib/document/card-press-titles` (`markCardPressTitles`, `cardPressTitlesOf`, `CARD_PRESS_TITLES_PROP`, `CARD_PRESS_TITLE_PROP`, `CardPressTitle`), `CardPressTitled`, optional `pressTitles` on `CardTemplateRows` and `Footprint`.
83
+ - **Fresh editorial presses change at 1100** like the old sections (#683): the press stores `stackBelow` at 1100 on its outer Box and head rows; the Milestone Timeline's years stack with a left rail below 1100. New `BOX_DESKTOP_LINE`, `EDITORIAL_LINE`, `BoxRail` `desktopLine?`.
84
+
3
85
  ## 65.0.0 - 2026-11-09
4
86
 
5
87
  From main at `8a7ac743`: #667, #666, #671, #670. A MAJOR: #667 removes exports and #671 narrows the `efficient-shell` peer (#670 also has `!`; its own change is additive). `efficient-easel` `^30.1.0` does not change. No stored key or value moves.
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as d,jsxs as m}from"react/jsx-runtime";import{useContext as p,useEffect as u,useId as g,useState as h}from"react";import{SettingsField as x,SettingsSwitch as S}from"efficient-easel/panel";import{AnchorIcon as k}from"efficient-easel/icons";import{ScreenDocumentContext as b}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as I}from"efficient-shell/ui";import{say as f}from"../../format/lib/editor-words.js";import{slugify as j}from"efficient-shell/format";import{anchorPath as w}from"../../format/lib/links/page-link-rules.js";import{shopRouteBase as A}from"../../format/lib/web-runtime.js";import{readHidable as F}from"efficient-easel/draw";function N({value:i,onChange:o,nameBox:a}){const s=F(i).text,[l,c]=h(!1),e=l||s.trim()!=="",t=g();return m(d,{children:[n(x,{label:f("Add an anchor"),labelId:t,icon:n(k,{}),action:n(S,{checked:e,ariaLabelledBy:t,onChange:r=>{c(r),!r&&s!==""&&o("")}})}),e&&a(i,o),e&&n(y,{name:s})]})}function y({name:i}){const o=p(b),a=o?.templateId?"":o?.currentSlug??"",[s,l]=h("");u(()=>l(A()||window.location.origin),[]);const c=j(i);if(!c||!a)return null;const e=`${s}${w(a,c)}`,t=e.replace(/^https?:\/\//,""),r=t.lastIndexOf("#");return n("div",{className:"sf-anchor-link",children:n(I,{value:e,label:f("link"),size:"sm",children:m("span",{className:"sf-anchor-link-text",children:[n("span",{className:"sf-anchor-link-path",children:t.slice(0,r)}),n("span",{className:"sf-anchor-link-hash",children:t.slice(r)})]})})})}export{N as default};
1
+ "use client";import{jsx as n,Fragment as p,jsxs as m}from"react/jsx-runtime";import{useContext as d,useEffect as u,useId as g,useState as h}from"react";import{SettingsField as x,SettingsSwitch as S}from"efficient-easel/panel";import{AnchorIcon as k}from"efficient-easel/icons";import{ScreenDocumentContext as b}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as I}from"efficient-shell/ui";import{say as f}from"../../format/lib/editor-words.js";import{slugify as j}from"efficient-shell/format";import{anchorPath as A}from"../../format/lib/links/page-link-rules.js";import{shopOrigin as F}from"../../format/lib/web-runtime.js";import{readHidable as N}from"efficient-easel/draw";function O({value:i,onChange:o,nameBox:c}){const r=N(i).text,[l,a]=h(!1),e=l||r.trim()!=="",t=g();return m(p,{children:[n(x,{label:f("Add an anchor"),labelId:t,icon:n(k,{}),action:n(S,{checked:e,ariaLabelledBy:t,onChange:s=>{a(s),!s&&r!==""&&o("")}})}),e&&c(i,o),e&&n(y,{name:r})]})}function y({name:i}){const o=d(b),c=o?.templateId?"":o?.currentSlug??"",[r,l]=h("");u(()=>l(F()),[]);const a=j(i);if(!a||!c)return null;const e=`${r}${A(c,a)}`,t=e.replace(/^https?:\/\//,""),s=t.lastIndexOf("#");return n("div",{className:"sf-anchor-link",children:n(I,{value:e,label:f("link"),size:"sm",children:m("span",{className:"sf-anchor-link-text",children:[n("span",{className:"sf-anchor-link-path",children:t.slice(0,s)}),n("span",{className:"sf-anchor-link-hash",children:t.slice(s)})]})})})}export{O as default};
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{SettingsDefaultReset as i,SettingsField as p}from"efficient-easel/panel";import{IconPicker as c}from"efficient-shell/ui";import{ShadowIcon as f}from"efficient-easel/icons";import{say as e,editorEaselWords as h}from"../../format/lib/editor-words.js";import{CARD_SHADOWS as u,DEFAULT_CARD_SHADOW as l}from"../../format/lib/theme.js";const a={none:"None",soft:"Soft",lifted:"Lifted"},m="Applies to cards — products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",x={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"};function b({value:n,onChange:s}){const r=n===null,d=n??l;return o(p,{label:e("Card shadow"),icon:o(f,{}),value:e(a[d]),changed:!r,action:o(i,{words:h()?.panel,label:e("Card shadow"),changed:!r,detail:e(a[l]),onReset:()=>s(null)}),hint:e(m),children:o(c,{label:e("Card shadow"),value:d,options:u.map(t=>({value:t,label:e(a[t]),icon:o("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:x[t]}})})),onChange:s})})}export{b as default};
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import{SettingsDefaultReset as i,SettingsField as c}from"efficient-easel/panel";import{IconPicker as f}from"efficient-shell/ui";import{ShadowIcon as m}from"efficient-easel/icons";import{SHADOW_PREVIEW as p}from"efficient-easel/screen/lib/document/shadow-values";import{say as e,editorEaselWords as h}from"../../format/lib/editor-words.js";import{CARD_SHADOWS as u,DEFAULT_CARD_SHADOW as l}from"../../format/lib/theme.js";const a={none:"None",soft:"Soft",lifted:"Lifted"},S="Applies to cards — products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function w({value:s,onChange:r}){const n=s===null,d=s??l;return o(c,{label:e("Card shadow"),icon:o(m,{}),value:e(a[d]),changed:!n,action:o(i,{words:h()?.panel,label:e("Card shadow"),changed:!n,detail:e(a[l]),onReset:()=>r(null)}),hint:e(S),children:o(f,{label:e("Card shadow"),value:d,options:u.map(t=>({value:t,label:e(a[t]),icon:o("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:p[t]}})})),onChange:r})})}export{w as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as B,SettingsField as b}from"efficient-easel/panel";import{useSelectedHost as H}from"efficient-easel/easel";import{FOCAL_DEFAULT as M}from"efficient-shell/format";import{ImageIcon as v,PlayIcon as C}from"efficient-easel/icons";import{ImageFocusPoint as T,MediaUploadField as A}from"efficient-shell/ui";import{useContext as L}from"react";import{ScreenDocumentContext as R}from"efficient-easel/screen/components/ScreenDocumentContext";import{editorEaselWords as _,say as m}from"../../format/lib/editor-words.js";import{phoneKey as j,tabletKey as P}from"efficient-easel/draw";import{PHONE_CLEAR as N}from"../../format/lib/document/phone-override.js";import{usePreviewDevice as W}from"efficient-easel/draw/client";import{focusPoint as D}from"../../format/lib/content/phone-focus.js";import{shownTier as S}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as q}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as z}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as G}from"efficient-easel/screen/lib/host";import{mediaValueSrc as J}from"../../format/lib/media-value.js";import{useSelectedPatch as Q}from"../lib/document/controls.js";import{backendOf as X}from"../lib/website-session.js";import{useEaselSession as Y}from"efficient-easel/screen/lib/session-context";function Z(i,o,r,l=!0){const n=S(r),s=typeof i[o]=="string"&&i[o]?String(i[o]):M;if(n==="desktop")return{ownView:!1,followed:s,followsView:"desktop",own:void 0,focus:s,key:o};const a=n==="tablet"?P(o):j(o),d=D(i[a])??void 0,p=n==="mobile"&&l?D(i[P(o)])??void 0:void 0,w=p??s;return{ownView:!0,followed:w,followsView:p?"tablet":"desktop",own:d,focus:d??w,key:a}}function $(i,o,r){const l=H();if(!o||!l)return null;const n=l.values??{};if(r&&!r(n,S(i)))return null;const s=Z(n,o,i,r?r(n,"tablet"):!0),a=l.onChange;return{...s,set:d=>a(s.key,d),clear:()=>a(s.key,N)}}function K({value:i,onChange:o,label:r,accept:l,placeholder:n,focusKey:s,focusWhen:a,frameKey:d,fieldKey:p}){const w=G(),I=Y(),h=m(r),E=W(),f=l.startsWith("video"),t=$(E,f?void 0:s,a),F=!!s&&S(E)!=="desktop",x=L(R),V=Q(),u=d&&p?{video:p,frame:d}:null,U=c=>z(w,{accept:l,title:h,...c?{file:c}:{}}).then(k=>!k||!u?k?.url??null:(V({[u.video]:k.url,[u.frame]:k.posterUrl??""}),null)),y=u?c=>c?o(c):V({[u.video]:"",[u.frame]:""}):o,g=J(i);if(F&&(!t||!g))return null;if(x&&!x.capabilities.mediaEditing)return e(b,{label:h,icon:f?e(C,{}):e(v,{}),children:e("div",{className:"sf-image-slot-inert",children:f?m("Templates don’t store videos — this slot stays a placeholder. Each website picks its own after it’s created."):m("Templates don’t store images — this slot stays a placeholder. Each website picks its own after it’s created.")})});const O=t?.ownView&&g?e(B,{words:_()?.panel,label:m("Image focus"),changed:!!t.own,detail:q(c=>m(c),t.followed,t.followsView),onReset:t.clear}):void 0;return F&&t?e(b,{label:h,icon:e(v,{}),action:O,children:e("div",{style:{flex:"1 1 auto",minWidth:0},children:e(T,{value:t.focus,onChange:t.set,label:m("Image focus"),image:g,hint:null})})}):e(b,{label:h,icon:f?e(C,{}):e(v,{}),children:e("div",{style:{flex:"1 1 auto",minWidth:0},children:e(A,{value:g,onChange:y,onPick:U,accept:f?"video/*":"image/*",kind:f?"video":"image",placeholder:n===void 0?void 0:m(n),maxSizeBytes:X(I).media.maxUploadBytes,...t?{focus:t.focus,onFocusChange:t.set}:{}})})})}export{K as default,Z as viewFocusOf};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as O,SettingsField as v}from"efficient-easel/panel";import{useSelectedHost as A}from"efficient-easel/easel";import{FOCAL_DEFAULT as B}from"efficient-shell/format";import{ImageIcon as b,PlayIcon as C}from"efficient-easel/icons";import{ImageFocusPoint as H,MediaUploadField as M}from"efficient-shell/ui";import{useContext as T}from"react";import{ScreenDocumentContext as L}from"efficient-easel/screen/components/ScreenDocumentContext";import{editorEaselWords as R,say as m}from"../../format/lib/editor-words.js";import{tabletKey as _,viewKeyAt as j}from"efficient-easel/draw";import{PHONE_CLEAR as N}from"../../format/lib/document/phone-override.js";import{usePreviewDevice as W}from"efficient-easel/draw/client";import{focusPoint as P}from"../../format/lib/content/phone-focus.js";import{shownTier as S}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as q}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as z}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as G}from"efficient-easel/screen/lib/host";import{mediaValueSrc as J}from"../../format/lib/media-value.js";import{useSelectedPatch as Q}from"../lib/document/controls.js";import{backendOf as X}from"../lib/website-session.js";import{useEaselSession as Y}from"efficient-easel/screen/lib/session-context";function Z(i,o,r,l=!0){const n=S(r),s=typeof i[o]=="string"&&i[o]?String(i[o]):B;if(n==="desktop")return{ownView:!1,followed:s,followsView:"desktop",own:void 0,focus:s,key:o};const a=j(o,n),d=P(i[a])??void 0,p=n==="mobile"&&l?P(i[_(o)])??void 0:void 0,w=p??s;return{ownView:!0,followed:w,followsView:p?"tablet":"desktop",own:d,focus:d??w,key:a}}function $(i,o,r){const l=A();if(!o||!l)return null;const n=l.values??{};if(r&&!r(n,S(i)))return null;const s=Z(n,o,i,r?r(n,"tablet"):!0),a=l.onChange;return{...s,set:d=>a(s.key,d),clear:()=>a(s.key,N)}}function K({value:i,onChange:o,label:r,accept:l,placeholder:n,focusKey:s,focusWhen:a,frameKey:d,fieldKey:p}){const w=G(),y=Y(),h=m(r),E=W(),f=l.startsWith("video"),t=$(E,f?void 0:s,a),F=!!s&&S(E)!=="desktop",x=T(L),V=Q(),u=d&&p?{video:p,frame:d}:null,D=c=>z(w,{accept:l,title:h,...c?{file:c}:{}}).then(k=>!k||!u?k?.url??null:(V({[u.video]:k.url,[u.frame]:k.posterUrl??""}),null)),I=u?c=>c?o(c):V({[u.video]:"",[u.frame]:""}):o,g=J(i);if(F&&(!t||!g))return null;if(x&&!x.capabilities.mediaEditing)return e(v,{label:h,icon:f?e(C,{}):e(b,{}),children:e("div",{className:"sf-image-slot-inert",children:f?m("Templates don’t store videos — this slot stays a placeholder. Each website picks its own after it’s created."):m("Templates don’t store images — this slot stays a placeholder. Each website picks its own after it’s created.")})});const U=t?.ownView&&g?e(O,{words:R()?.panel,label:m("Image focus"),changed:!!t.own,detail:q(c=>m(c),t.followed,t.followsView),onReset:t.clear}):void 0;return F&&t?e(v,{label:h,icon:e(b,{}),action:U,children:e("div",{style:{flex:"1 1 auto",minWidth:0},children:e(H,{value:t.focus,onChange:t.set,label:m("Image focus"),image:g,hint:null})})}):e(v,{label:h,icon:f?e(C,{}):e(b,{}),children:e("div",{style:{flex:"1 1 auto",minWidth:0},children:e(M,{value:g,onChange:I,onPick:D,accept:f?"video/*":"image/*",kind:f?"video":"image",placeholder:n===void 0?void 0:m(n),maxSizeBytes:X(y).media.maxUploadBytes,...t?{focus:t.focus,onFocusChange:t.set}:{}})})})}export{K as default,Z as viewFocusOf};
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as te,jsxs as S}from"react/jsx-runtime";import{Fragment as Re,useEffect as De,useId as xe,useMemo as oe,useRef as Ne,useState as c}from"react";import{useScreenDocument as ae}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as j}from"efficient-easel/draw/client";import ve from"efficient-easel/screen/components/SidePanelHead";import{useWebsiteName as Ee}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as Le}from"efficient-easel/chrome";import{Button as se,Dialog as Oe,FormField as Be,Input as le,PopupMenu as Fe,PopupMenuItem as ie,toast as re}from"efficient-shell/ui";import{LayersTree as Me,TreeGroupLabel as _e,TreeRow as de,TreeRowAction as L}from"efficient-easel/tree";import{AddIcon as ze,DuplicateIcon as Ge,PageIcon as He,SettingsIcon as Ue}from"efficient-easel/icons";import{PagesIcon as Te}from"efficient-easel/rail";import{useEaselHost as We}from"efficient-easel/screen/lib/host";import{bucketEditorPageRows as je,DYNAMIC_PAGES_GROUP_KEY as qe,isDynamicPageRow as Ke,isPopupPageRow as Ye,MAIN_PAGES_GROUP as Je}from"../../format/lib/editor-page-rows.js";import{useEaselSession as ce}from"efficient-easel/screen/lib/session-context";import{holdPageRow as q,usePageRows as Qe}from"../lib/page-rows.js";import{say as n,sayCount as Ve}from"../../format/lib/editor-words.js";import{canDuplicatePage as Xe,DuplicatePageDialog as Ze,uniqueSlug as ue}from"efficient-easel/page-copy";import{backendOf as $e}from"../lib/website-session.js";import{shopRouteBase as en}from"../../format/lib/web-runtime.js";import{newPopupPage as nn}from"../../format/lib/popup/new-popup.js";const pe="sf-editor-pages-collapsed-groups";function tn(){const s=ce(),{siteId:O,templateId:k}=ae(),I=$e(s).pages;if(!(!I.duplicate||k))return(p,A)=>I.duplicate(p.id,{...A,...O?{siteId:O}:{}})}function on(){try{const s=en()||(typeof window>"u"?"":window.location.origin);return s?new URL(s).host:""}catch{return""}}function an({onNavigate:s,onClose:O,activeSurface:k,onPreviewSurface:I}){const p=ce().chrome?.pageRows,A=We(),{adapter:m,capabilities:g,ready:B,currentSlug:K}=ae(),me=Ee(),{rows:u,reload:F,setRows:Y,getRows:ge}=Qe(),[M,fe]=c(""),[r,R]=c(!1),[D,f]=c(null),[J,x]=c(!1),[h,_]=c(""),Q=xe(),z=tn(),[b,G]=c(null),[H,he]=c(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(pe);return new Set(e?JSON.parse(e):[])}catch{return new Set}});De(()=>{try{window.localStorage.setItem(pe,JSON.stringify([...H]))}catch{}},[H]);const be=e=>he(a=>{const o=new Set(a);return o.has(e)?o.delete(e):o.add(e),o}),Pe=oe(()=>je(u??[]),[u]),U=M.trim().toLowerCase(),V=e=>!U||e.toLowerCase().includes(U),ye=e=>U?!0:!H.has(e),N=oe(()=>new Set((u??[]).map(e=>e.slug)),[u]),X=()=>{if(g.pageCreationInAdminForm){A.send("storefront-editor:new-page");return}_(""),f(null),x(!0)},Z=async()=>{const e=h.trim();if(!(!e||!B||r||!m.createPage)){R(!0),f(null);try{const a=await m.createPage({slug:ue(e,N),title:e,layout:{}});await F(),x(!1),_(""),s(a.slug)}catch{f(n("Couldn’t add the page — please retry."))}finally{R(!1)}}},v=g.hasSiteSettings&&!!m.createPage,we=async()=>{if(!(!B||r||!m.createPage)){R(!0),f(null);try{const e=await m.createPage(nn(n("New popup"),N));await F(),s(e.slug)}catch{f(n("Couldn’t add the popup — please retry."))}finally{R(!1)}}},$=Ne(null),[P,y]=c(null),Ce=()=>{if(!v)return X();if(P)return y(null);const e=$.current?.getBoundingClientRect();e&&y({top:e.bottom+6,right:Math.max(8,window.innerWidth-e.right)})},Se=e=>{const a=u??[],o=m.deletePage;if(!B||r||!o||a.length<=1)return;const i=a.findIndex(l=>l.id===e.id),d=a.filter(l=>l.id!==e.id),w=e.slug===K;q(e.id,!0),Y(d),f(null),w&&d[0]&&s(d[0].slug);const E=()=>{q(e.id,!1);const l=ge()??[];if(l.some(Ae=>Ae.id===e.id))return;const C=[...l];C.splice(Math.max(0,Math.min(i,C.length)),0,e),Y(C)};re.undoable(n("Deleted “{name}”",{name:e.label}),{actionLabel:n("Undo"),commit:async l=>{await o(e.id,l),q(e.id,!1)},undo:()=>{E(),w&&s(e.slug)},onFail:()=>{E(),re.error(n("Couldn’t delete the page — please retry."))}})},ke=e=>A.send("storefront-editor:open-page",{slug:e}),Ie=e=>{if(!V(e.label))return null;const a=!k&&e.slug===K,o=g.canDeletePagesInline&&(u??[]).length>1,i=Ke(e),d=Ye(e),w=[...i?[{label:n("Dynamic"),tone:"info"}]:[],...d?[{label:n("Lightbox"),tone:"success"}]:[],...e.draft?[{label:n("draft"),tone:"draft"}]:[]],E=w.length>0?w:void 0,l=!!z&&Xe(e),C=l||g.pageCreationInAdminForm||o?S(te,{children:[l&&t(L,{kind:"plain",label:n("Duplicate “{name}”",{name:e.label}),disabled:r,onClick:()=>G(e),children:t(Ge,{size:13})}),g.pageCreationInAdminForm&&t(L,{kind:"plain",label:n("Page settings for “{name}”",{name:e.label}),onClick:()=>ke(e.slug),children:t(Ue,{size:13})}),o&&t(L,{kind:"delete",label:n("Delete “{name}”",{name:e.label}),disabled:r,onClick:()=>Se(e),children:t(j,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return t(de,{icon:t(He,{size:14}),name:e.label,selected:a,onSelect:()=>s(e.slug),badge:E,actions:C,rowProps:{"data-page-slug":e.slug}},e.id)},T=(e,a,o)=>{const i=o.filter(Boolean);if(i.length===0)return null;const d=ye(e);return S(Re,{children:[t(_e,{count:i.length,countLabel:Ve("{n} page","{n} pages",i.length),expanded:d,onToggle:()=>be(e),children:a}),d&&i]},e)},ee=(p?.rows??[]).filter(e=>V(e.label)).map(e=>{const a=k===e.key;return t(de,{icon:e.icon,name:e.label,selected:a,onSelect:()=>I(e.key),badge:{label:n("Preview"),tone:"warning"},actions:t(L,{kind:"plain",label:n("Open the {name} in a new tab",{name:e.label}),onClick:()=>window.open(e.href,"_blank","noopener,noreferrer"),children:t(j,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":e.key}},e.key)}),ne=g.hasSiteSettings&&!!p,W=(()=>{if(u===null)return null;const e=[];let a=!1;for(const o of Pe){ne&&!a&&o.key.startsWith("system:")&&(e.push(T("shop",p.title,ee)),a=!0);const i=o.key===qe||o.label===Je?n(o.label):o.label;e.push(T(o.key,i,o.rows.map(Ie)))}return ne&&!a&&e.push(T("shop",p.title,ee)),e})();return S("div",{className:"sf-pages",children:[t(ve,{icon:t(Te,{}),title:n("Pages"),context:me,actions:t(Le,{buttonRef:$,label:v?n("Add"):n("New page"),hasPopup:v?"menu":void 0,expanded:v?P!==null:void 0,onClick:Ce,children:t(ze,{size:15})})}),P&&t(Fe,{portal:!0,style:{top:P.top,right:P.right},onClose:()=>y(null),children:S("div",{role:"menu","aria-label":n("Add"),children:[t(ie,{role:"menuitem",onClick:()=>{y(null),X()},children:n("Page")}),t(ie,{role:"menuitem",disabled:r,onClick:()=>{y(null),we()},children:n("Popup")})]})}),t("div",{className:"sf-pages-find",children:t(le,{type:"search",leftIcon:t(j,{name:"search",size:14,rounded:!0}),placeholder:n("Search all pages…"),value:M,onChange:e=>fe(e.target.value),"aria-label":n("Search all pages")})}),D&&!J&&t("div",{className:"sf-note sf-note--error",role:"alert",children:D}),W===null?t("div",{className:"sf-note",children:n("Loading…")}):W.some(Boolean)?t(Me,{ariaLabel:n("Pages"),className:"sf-scroll",children:W}):t("div",{className:"sf-note",children:M.trim()?n("No pages match your search"):n("No pages yet. Add one with + above.")}),z&&b&&t(Ze,{source:{title:b.label,slug:b.slug},taken:N,host:on(),duplicate:e=>z(b,e),onClose:()=>G(null),onDuplicated:e=>{G(null),F(),s(e.slug)}},b.id),t(Oe,{open:J,onClose:()=>x(!1),size:"sm",title:n("Add a page"),description:n("Give the new template page a name. It starts blank — add sections once it opens."),footer:S(te,{children:[t(se,{variant:"secondary",onClick:()=>x(!1),children:n("Cancel")}),t(se,{onClick:()=>{Z()},disabled:r||!h.trim(),loading:r,children:n("Add page")})]}),children:t(Be,{label:n("Page name"),htmlFor:Q,hint:h.trim()?n("URL: /{slug}",{slug:ue(h,N)}):void 0,error:D??void 0,children:t(le,{id:Q,value:h,invalid:!!D,onChange:e=>_(e.target.value),onKeyDown:e=>{e.key==="Enter"&&Z()},placeholder:n("e.g. About")})})})]})}export{an as default};
1
+ "use client";import{jsx as n,Fragment as ne,jsxs as S}from"react/jsx-runtime";import{Fragment as Re,useEffect as De,useId as xe,useMemo as oe,useRef as Ne,useState as c}from"react";import{useScreenDocument as ae}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as j}from"efficient-easel/draw/client";import ve from"efficient-easel/screen/components/SidePanelHead";import{useWebsiteName as Ee}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as Oe}from"efficient-easel/chrome";import{Button as se,Dialog as Le,FormField as Be,Input as le,PopupMenu as Fe,PopupMenuItem as ie,toast as re}from"efficient-shell/ui";import{LayersTree as Me,TreeGroupLabel as _e,TreeRow as de,TreeRowAction as O}from"efficient-easel/tree";import{AddIcon as ze,DuplicateIcon as Ge,PageIcon as He,SettingsIcon as Te}from"efficient-easel/icons";import{PagesIcon as Ue}from"efficient-easel/rail";import{useEaselHost as We}from"efficient-easel/screen/lib/host";import{bucketEditorPageRows as je,DYNAMIC_PAGES_GROUP_KEY as qe,isDynamicPageRow as Ke,isPopupPageRow as Ye,MAIN_PAGES_GROUP as Je}from"../../format/lib/editor-page-rows.js";import{useEaselSession as ce}from"efficient-easel/screen/lib/session-context";import{holdPageRow as q,usePageRows as Qe}from"../lib/page-rows.js";import{say as t,sayCount as Ve}from"../../format/lib/editor-words.js";import{canDuplicatePage as Xe,DuplicatePageDialog as Ze,uniqueSlug as ue}from"efficient-easel/page-copy";import{backendOf as $e}from"../lib/website-session.js";import{shopHost as et}from"../../format/lib/web-runtime.js";import{newPopupPage as tt}from"../../format/lib/popup/new-popup.js";const pe="sf-editor-pages-collapsed-groups";function nt(){const i=ce(),{siteId:L,templateId:k}=ae(),I=$e(i).pages;if(!(!I.duplicate||k))return(p,A)=>I.duplicate(p.id,{...A,...L?{siteId:L}:{}})}function ot({onNavigate:i,onClose:L,activeSurface:k,onPreviewSurface:I}){const p=ce().chrome?.pageRows,A=We(),{adapter:m,capabilities:g,ready:B,currentSlug:K}=ae(),me=Ee(),{rows:u,reload:F,setRows:Y,getRows:ge}=Qe(),[M,fe]=c(""),[r,R]=c(!1),[D,f]=c(null),[J,x]=c(!1),[h,_]=c(""),Q=xe(),z=nt(),[b,G]=c(null),[H,he]=c(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(pe);return new Set(e?JSON.parse(e):[])}catch{return new Set}});De(()=>{try{window.localStorage.setItem(pe,JSON.stringify([...H]))}catch{}},[H]);const be=e=>he(a=>{const o=new Set(a);return o.has(e)?o.delete(e):o.add(e),o}),Pe=oe(()=>je(u??[]),[u]),T=M.trim().toLowerCase(),V=e=>!T||e.toLowerCase().includes(T),ye=e=>T?!0:!H.has(e),N=oe(()=>new Set((u??[]).map(e=>e.slug)),[u]),X=()=>{if(g.pageCreationInAdminForm){A.send("storefront-editor:new-page");return}_(""),f(null),x(!0)},Z=async()=>{const e=h.trim();if(!(!e||!B||r||!m.createPage)){R(!0),f(null);try{const a=await m.createPage({slug:ue(e,N),title:e,layout:{}});await F(),x(!1),_(""),i(a.slug)}catch{f(t("Couldn’t add the page — please retry."))}finally{R(!1)}}},v=g.hasSiteSettings&&!!m.createPage,we=async()=>{if(!(!B||r||!m.createPage)){R(!0),f(null);try{const e=await m.createPage(tt(t("New popup"),N));await F(),i(e.slug)}catch{f(t("Couldn’t add the popup — please retry."))}finally{R(!1)}}},$=Ne(null),[P,y]=c(null),Ce=()=>{if(!v)return X();if(P)return y(null);const e=$.current?.getBoundingClientRect();e&&y({top:e.bottom+6,right:Math.max(8,window.innerWidth-e.right)})},Se=e=>{const a=u??[],o=m.deletePage;if(!B||r||!o||a.length<=1)return;const l=a.findIndex(s=>s.id===e.id),d=a.filter(s=>s.id!==e.id),w=e.slug===K;q(e.id,!0),Y(d),f(null),w&&d[0]&&i(d[0].slug);const E=()=>{q(e.id,!1);const s=ge()??[];if(s.some(Ae=>Ae.id===e.id))return;const C=[...s];C.splice(Math.max(0,Math.min(l,C.length)),0,e),Y(C)};re.undoable(t("Deleted “{name}”",{name:e.label}),{actionLabel:t("Undo"),commit:async s=>{await o(e.id,s),q(e.id,!1)},undo:()=>{E(),w&&i(e.slug)},onFail:()=>{E(),re.error(t("Couldn’t delete the page — please retry."))}})},ke=e=>A.send("storefront-editor:open-page",{slug:e}),Ie=e=>{if(!V(e.label))return null;const a=!k&&e.slug===K,o=g.canDeletePagesInline&&(u??[]).length>1,l=Ke(e),d=Ye(e),w=[...l?[{label:t("Dynamic"),tone:"info"}]:[],...d?[{label:t("Lightbox"),tone:"success"}]:[],...e.draft?[{label:t("draft"),tone:"draft"}]:[]],E=w.length>0?w:void 0,s=!!z&&Xe(e),C=s||g.pageCreationInAdminForm||o?S(ne,{children:[s&&n(O,{kind:"plain",label:t("Duplicate “{name}”",{name:e.label}),disabled:r,onClick:()=>G(e),children:n(Ge,{size:13})}),g.pageCreationInAdminForm&&n(O,{kind:"plain",label:t("Page settings for “{name}”",{name:e.label}),onClick:()=>ke(e.slug),children:n(Te,{size:13})}),o&&n(O,{kind:"delete",label:t("Delete “{name}”",{name:e.label}),disabled:r,onClick:()=>Se(e),children:n(j,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return n(de,{icon:n(He,{size:14}),name:e.label,selected:a,onSelect:()=>i(e.slug),badge:E,actions:C,rowProps:{"data-page-slug":e.slug}},e.id)},U=(e,a,o)=>{const l=o.filter(Boolean);if(l.length===0)return null;const d=ye(e);return S(Re,{children:[n(_e,{count:l.length,countLabel:Ve("{n} page","{n} pages",l.length),expanded:d,onToggle:()=>be(e),children:a}),d&&l]},e)},ee=(p?.rows??[]).filter(e=>V(e.label)).map(e=>{const a=k===e.key;return n(de,{icon:e.icon,name:e.label,selected:a,onSelect:()=>I(e.key),badge:{label:t("Preview"),tone:"warning"},actions:n(O,{kind:"plain",label:t("Open the {name} in a new tab",{name:e.label}),onClick:()=>window.open(e.href,"_blank","noopener,noreferrer"),children:n(j,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":e.key}},e.key)}),te=g.hasSiteSettings&&!!p,W=(()=>{if(u===null)return null;const e=[];let a=!1;for(const o of Pe){te&&!a&&o.key.startsWith("system:")&&(e.push(U("shop",p.title,ee)),a=!0);const l=o.key===qe||o.label===Je?t(o.label):o.label;e.push(U(o.key,l,o.rows.map(Ie)))}return te&&!a&&e.push(U("shop",p.title,ee)),e})();return S("div",{className:"sf-pages",children:[n(ve,{icon:n(Ue,{}),title:t("Pages"),context:me,actions:n(Oe,{buttonRef:$,label:v?t("Add"):t("New page"),hasPopup:v?"menu":void 0,expanded:v?P!==null:void 0,onClick:Ce,children:n(ze,{size:15})})}),P&&n(Fe,{portal:!0,style:{top:P.top,right:P.right},onClose:()=>y(null),children:S("div",{role:"menu","aria-label":t("Add"),children:[n(ie,{role:"menuitem",onClick:()=>{y(null),X()},children:t("Page")}),n(ie,{role:"menuitem",disabled:r,onClick:()=>{y(null),we()},children:t("Popup")})]})}),n("div",{className:"sf-pages-find",children:n(le,{type:"search",leftIcon:n(j,{name:"search",size:14,rounded:!0}),placeholder:t("Search all pages…"),value:M,onChange:e=>fe(e.target.value),"aria-label":t("Search all pages")})}),D&&!J&&n("div",{className:"sf-note sf-note--error",role:"alert",children:D}),W===null?n("div",{className:"sf-note",children:t("Loading…")}):W.some(Boolean)?n(Me,{ariaLabel:t("Pages"),className:"sf-scroll",children:W}):n("div",{className:"sf-note",children:M.trim()?t("No pages match your search"):t("No pages yet. Add one with + above.")}),z&&b&&n(Ze,{source:{title:b.label,slug:b.slug},taken:N,host:et(),duplicate:e=>z(b,e),onClose:()=>G(null),onDuplicated:e=>{G(null),F(),i(e.slug)}},b.id),n(Le,{open:J,onClose:()=>x(!1),size:"sm",title:t("Add a page"),description:t("Give the new template page a name. It starts blank — add sections once it opens."),footer:S(ne,{children:[n(se,{variant:"secondary",onClick:()=>x(!1),children:t("Cancel")}),n(se,{onClick:()=>{Z()},disabled:r||!h.trim(),loading:r,children:t("Add page")})]}),children:n(Be,{label:t("Page name"),htmlFor:Q,hint:h.trim()?t("URL: /{slug}",{slug:ue(h,N)}):void 0,error:D??void 0,children:n(le,{id:Q,value:h,invalid:!!D,onChange:e=>_(e.target.value),onKeyDown:e=>{e.key==="Enter"&&Z()},placeholder:t("e.g. About")})})})]})}export{ot as default};
@@ -1 +1 @@
1
- "use client";import{jsx as o,Fragment as W,jsxs as h}from"react/jsx-runtime";import{useContext as wt,useEffect as pe,useRef as Pt,useState as Ve}from"react";import{FieldSelect as vt,InspectorField as Tt,fieldShownInView as Nt}from"efficient-easel/fields";import{InertHint as Be,SettingsField as Ot}from"efficient-easel/panel";import{InspectorUpLevel as X}from"efficient-easel/chrome";import{StylesIcon as Rt,TypeIcon as kt}from"efficient-easel/icons";import{useEasel as Ct}from"efficient-easel/easel";import{TextPartPanel as He}from"efficient-easel/copy";import{Button as Et,IconButton as It,Tooltip as Ft}from"efficient-shell/ui";import{PartTextBox as zt,partTextCells as Ue}from"./PartTextBox.js";import{SiteFields as me}from"./SiteFields.js";import{usePartMotion as _t}from"./usePartMotion.js";import{UiIcon as We}from"efficient-easel/draw/client";import{usePreviewHeader as At}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as Lt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as Vt}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as Bt,partStyleToTextStyleValues as Ht,pushIntoStyle as Ut,resolveTextStyles as je,styleIdOfRole as Wt}from"../../render/lib/text-styles/site-text-styles.js";import{useSiteTextStylesWriter as jt}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as Dt}from"../lib/theme-row-persist.js";import{usePreviewDevice as Gt}from"efficient-easel/draw/client";import{shownTier as q}from"efficient-easel/screen/lib/document/device-fields";import{PART_PANEL_ROWS as De,partRowHasTabletValue as Kt}from"../lib/document/part-panel-rows.js";import{usePartStyle as Mt}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as J,textFieldOffPage as $t,textFieldPanelOnly as Yt}from"../lib/document/controls.js";import{TEXT_FIELD_MARKER as Xt}from"efficient-easel/draw";import{useSectionOps as qt}from"efficient-easel/screen/lib/document/use-section-ops";import{FONT_OPTIONS as Jt,FONT_ROLES as Qt,FONT_ROLE_LABELS as Ge,fontOption as ye,fontRoleOf as Zt}from"../../format/lib/fonts.js";import{isMultilineKind as en,partPlaceholder as tn,typeInPlaceKind as nn}from"../../render/lib/document/part-text.js";import{partRowField as on}from"../lib/document/part-row-field.js";import{decodePartKey as ln,partPropsWithRowValue as sn,partRowValue as rn}from"../../render/lib/document/part-rows.js";import{followedStyleOf as Ke,partAlignFollowed as an,propsWithPartStyleValue as B,propsWithoutPartStyle as cn,readPartStyle as he,regionHasOwnLook as dn}from"../../render/lib/document/part-styles.js";import{partThemeColors as un}from"../../format/lib/document/part-inks.js";import{styleKeyForPart as Me}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as fn}from"../lib/document/part-typing.js";import{keysOnCanvas as pn,useCanvasTypingPart as mn}from"../lib/document/canvas-typing.js";import{useEaselHost as yn}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as hn,SOURCE_ACTIONS as Sn,SOURCE_ACTION_LABEL as gn,partSourceNoteFor as xn,partSourceOf as bn,sourceMenuIdOf as wn,sourceSlugOf as Se}from"../../format/lib/document/source-bound-parts.js";import{encodePartId as Pn,holdsAuthoredText as vn}from"../../render/lib/document/text-parts.js";import{regionsForSection as Tn}from"../../format/lib/sections/section-text-regions.js";import{regionTakesSize as Nn,textRegionOfPartKey as On}from"../../format/lib/sections/text-regions.js";import{SameInEveryViewNote as $e}from"./SameInEveryViewNote.js";function ge(t){return t?l(t):null}function Ye(t){return t.kind==="role"?Ge[t.role]:t.kind==="custom"?"Custom":null}function Rn(t){const n=Zt(t.role);return n?{kind:"role",role:n}:null}function kn(t,n){if(!t)return{kind:"unread"};const{faceRole:r,base:i}=t;if(n[r]===i.fontKey)return{kind:"role",role:r};const a=Object.keys(n).filter(s=>n[s]===i.fontKey);return a.length===1?{kind:"role",role:a[0]}:{kind:"custom"}}function Q(t,n,r,i){return Rn(he(t,n))??kn(r,i)}function Cn(t,n){if(!t.length)return null;const r=n(t[0]);return t.every(i=>n(i)===r)?r:null}function Xe(t){return[{value:j,label:l("No style"),description:l("Section’s own")},...t.map(n=>({value:n.id,label:n.name,description:n.values.font?ye(n.values.font)?.label:void 0}))]}const j="";function En({face:t,base:n,onPick:r}){const i=t.kind==="role"?t.role:j,a=[{label:l("No style"),value:j},...Qt.map(s=>({label:l(Ge[s]),value:s}))];return o(vt,{ariaLabel:l("Style"),value:i,options:a,inline:!0,onChange:s=>r(s===j?null:s),renderOption:s=>s.value===j?h(W,{children:[o("span",{className:"es-fsel-label sf-part-style-keep",children:s.label}),o("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section’s own")})]}):o("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${s.value})`},children:s.label}),renderValue:()=>o("span",{style:{fontFamily:n?.fontKey?`var(${ye(n.fontKey)?.cssVar})`:void 0,fontWeight:n?.weight},children:ge(Ye(t))}),valueText:s=>ge(Ye(t))??s?.label??""})}const qe=["regionNote","regionStyle"],In=Object.keys(De).filter(t=>!qe.includes(t));function Je(t,n){return!t.some(n)}function Fn({sectionName:t,onBack:n,textEditor:r,styleRow:i,children:a,tabs:s}){const g=h(W,{children:[r,i,a]});return h("div",{className:"sf-part-panel",children:[o(X,{inline:!0,name:l(t),onSelect:n}),s?s(g):g]})}function Qe({source:t,slug:n,menuId:r}){const i=yn(),a=Sn[t],s=!a.needsSlug||!!n;return o("div",{className:"sf-note sf-note--source",children:h(Be,{children:[l(hn[t]),s?h(W,{children:[" ",o(Et,{type:"button",variant:"link",size:"sm",onClick:()=>{a.type==="storefront-editor:open-menus"?i.send(a.type,{menuId:r??null}):n&&i.send(a.type,{slug:n})},children:l(gn)})]}):null]})})}const Ze=4,zn=120;function et(t){return l("Every {part} in this section follows it. The face and the size change; the letter case is the section’s own and stays as it is.",{part:l(t.label).toLowerCase()})}function tt({region:t,sizePx:n,face:r,base:i,onFollowStyle:a,source:s,slug:g,onBack:N,shows:x,sizedStyle:b,ownLook:I}){const D=t.follows;return h("div",{className:"sf-note",children:[o("p",{children:o("strong",{children:l(t.label)})}),x("regionNote")&&!I&&o("p",{children:n?l("Its size follows Styles ▸ {follows} — {px}px right now.",{follows:l(D),px:Math.round(n)}):l("Its size follows Styles ▸ {follows}.",{follows:l(D)})}),b?h(W,{children:[b,x("regionStyle")&&o("p",{className:"es-field-hint",children:et(t)})]}):a?x("regionStyle")?o(W,{children:o(Ot,{label:l("Style"),icon:o(Rt,{}),hint:et(t),children:o(En,{face:r,base:i,onPick:a})})}):null:x("regionNote")&&o("p",{className:"es-field-hint",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),s&&x("sourceNote")?o(Qe,{source:s,slug:g}):null,Je([...qe,"sourceNote",...b?["fontSize"]:[]],F=>x(F)&&(F!=="sourceNote"||!!s))&&o($e,{}),o(X,{inline:!0,name:l("Page"),onSelect:N})]})}function _n({onBack:t}){return h("div",{className:"sf-note",children:[o("p",{children:o("strong",{children:l("This part is no longer here.")})}),o("p",{children:l("The section it belonged to has been changed or removed.")}),o(X,{inline:!0,name:l("Page"),onSelect:t})]})}function An({onBack:t,partId:n,why:r}){return h("div",{className:"sf-note",children:[o("p",{children:o("strong",{children:l("This part's settings did not open.")})}),o("p",{children:l("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),o("p",{className:"sf-note-detail",children:h("code",{children:[n," — ",r]})}),o(X,{inline:!0,name:l("Page"),onSelect:t})]})}function Ln({nodeId:t,propKey:n,onBack:r,onEditStyle:i}){const{getItemById:a,getSelectorForId:s,config:g}=Ct(e=>e),N=qt(),x=mn(),{partStyle:b}=Mt(),{fonts:I,textStyles:D}=At(),F=wt(Vt),xe=!F?.capabilities?.hasSiteTheme,{persist:ot}=Dt({themeFromDocument:xe,tokenRef:F?.tokenRef,siteId:F?.siteId??null}),O=jt({themeFromDocument:xe,persist:ot}),[lt,Z]=Ve(!1),H=Gt(),f=e=>(q(H)!=="tablet"||Kt(e))&&Nt(De[e],H),be=Pt(null),d=a(t),p=s(t),we=d?g.components[d.type]:void 0,{key:w,row:P}=ln(n),Pe=we?.fields?.[w],S=P?on(Pe,P):Pe,z=Pn(t,n),u=d?.props??{},v=nn(S),ve=$t(S),Te=vn(S),Ne=d?bn(d.type):null,ee=d?xn(d.type,w):null,te=P?rn(u[w],P):u[w],Oe=!!P&&!(Array.isArray(u[w])&&P.index<u[w].length);pe(()=>{if(pn(document))return;be.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[z]);const[ne,Re]=Ve(0);pe(()=>Re(0),[z]);const oe=!!d&&!Oe&&(!p||!S);pe(()=>{if(!oe||ne>=Ze)return;const e=setTimeout(()=>Re(c=>c+1),zn);return()=>clearTimeout(e)},[oe,ne]);const st=oe&&ne<Ze,le=_t(t,Me(d?.type,n),"textPart");if(!d||Oe)return o(_n,{onBack:r});const G=Tn(d.type),ke=G?On(G,n):null;if(G&&ke){const e=b?.partId===z?b:null,c=G[ke],m=c.writable===!0&&!!p,T=C=>{p&&N.replaceComponent(p.zone,p.index,{...d,props:B(u,n,"role",C)})};if(m&&Nn(c)){const C=he(u,n),Le=E=>{if(!p)return;let fe=u;for(const[xt,bt]of Object.entries(E))fe=B(fe,n,xt,bt??null);N.replaceComponent(p.zone,p.index,{...d,props:fe})},ht=je(O.saved,O.old),St=Ke(C)??"",gt=Ue(C,e?.base??nt,Le,q(H)).filter(E=>E.key==="fontSize"&&f(E.key));return o(me,{motion:le,body:o(tt,{region:c,sizePx:e?.base.sizePx??null,face:Q(u,n,e,I),base:e?.base??null,source:Ne,slug:Se(u),onBack:r,shows:f,ownLook:dn(C),sizedStyle:o(He,{style:f("style")?{value:St,options:Xe(ht),onChange:E=>Le(E?{textStyle:E}:{textStyle:null,role:null}),onEditStyles:i}:void 0,cells:gt})})})}return o(me,{motion:le,body:o(tt,{region:c,sizePx:e?.base.sizePx??null,face:Q(u,n,e,I),base:e?.base??null,onFollowStyle:m?T:void 0,source:Ne,slug:Se(u),onBack:r,shows:f})})}if(!p||!S)return st?o("div",{className:"sf-note","aria-busy":"true"}):o(An,{onBack:r,partId:z,why:p?"no field":"no selector"});const Ce=e=>{N.replaceComponent(p.zone,p.index,{...d,props:e})},se=e=>{if(J(e).hidden!==J(te).hidden||!v){const m=P?sn(u,w,P,e):{...u,[w]:e};m&&Ce(m);return}fn({node:d,propKey:n,kind:v,zone:p.zone,index:p.index},J(e).text,N.replaceComponent)},rt=te,_=b?.partId===z?b:null,A=_?.styleOwner,K=A?a(A.owner):null,re=A&&K?s(A.owner):null,ie=!!(A&&K&&re),L=ie?K.props??{}:u,ae=ie?e=>N.replaceComponent(re.zone,re.index,{...K,props:e}):Ce,M=ie?A.kind:Me(d?.type,n),R=he(L,M),y=[{partKey:M,face:Q(L,M,_,I),sizeGroup:_?.sizeGroup??null,base:_?.base??nt,style:R}],Ee=Cn(y,e=>e.sizeGroup),it=un(_?.inks),U=(e,c)=>{let m=L;for(const T of y)m=B(m,T.partKey,e,c);ae(m)},at=e=>e?U("textStyle",e):ce({textStyle:null,role:null}),ce=e=>{let c=L;for(const m of y)for(const[T,C]of Object.entries(e))c=B(c,m.partKey,T,C??null);ae(c)},de=v==="text"||v==="textarea",{text:Ie,hidden:V}=J(te),$=S?.[Xt]?.label??n,Fe=V?l("Show {label} on the slide",{label:l($)}):l("Hide {label} on the slide",{label:l($)}),ze=h("div",{className:"sf-field-head",children:[o(kt,{}),o("span",{className:"sf-field-label sf-field-label--inline",children:l($)}),de&&o(Ft,{content:Fe,children:o(It,{"aria-pressed":V,"aria-label":Fe,onClick:()=>se({text:Ie,hidden:!V}),children:V?o(We,{name:"eye-off",size:14}):o(We,{name:"eye",size:14})})})]}),Y=!ve&&Te,ct=!!v&&(Yt(S)||ve||V||!Te),_e=Q(L,M,_,I),dt=_e.kind==="role"?_e.role:null,ue=Ke(R)??Wt(dt),Ae=je(O.saved,O.old),ut=Object.entries(R).filter(([e,c])=>e!=="role"&&e!=="textStyle"&&c!==void 0).length,ft=()=>{let e=L;for(const c of y){const{role:m,textStyle:T}=c.style;e=cn(e,c.partKey),m&&(e=B(e,c.partKey,"role",m)),T&&(e=B(e,c.partKey,"textStyle",T))}ae(e)},k=ue,pt=Bt(y[0].style),mt=k?Ae.find(e=>e.id===k)?.name??k:"",yt=()=>{Z(!1),k&&(O.write(Ut({saved:O.saved,old:O.old,styleId:k,values:Ht(y[0].style)}),!0),ft())};return h(Fn,{sectionName:we?.label??d.type,onBack:r,tabs:e=>o(me,{motion:le,body:e}),textEditor:f("words")?o("div",{ref:be,className:"sf-part-text",children:ct?o(zt,{text:Ie,onTextChange:e=>se(de?{text:e,hidden:V}:e),multiline:en(v),markup:v!=="plainText",styled:!1,style:y[0].style,base:y[0].base,setValue:ce,colors:it,placeholder:ge(tn(S))??void 0,ariaLabel:l($),head:ze,typedOnCanvas:x===z}):v?de?ze:null:o(Tt,{field:S,name:n,value:rt,onChange:se,id:`sf-part-${t}-${n}`})}):void 0,children:[ee&&f("sourceNote")&&o(Qe,{source:ee,slug:Se(u),menuId:wn(u)}),Y&&o(He,{style:f("style")?{value:ue??"",options:Xe(Ae),onChange:e=>at(e||null),changed:ut>0,onEditStyles:i,onUpdateStyle:k&&pt?()=>Z(!0):void 0}:void 0,font:f("font")?{value:R.font??"",styleValue:ye(y[0].base.fontKey)?.label,options:Jt.map(e=>({label:e.label,value:e.key})),onChange:e=>U("font",e||null)}:void 0,italic:f("italic")?{value:R.italic,styleValue:Hn(D,ue),onChange:e=>U("italic",e??null)}:void 0,cells:Ue(y[0].style,y[0].base,ce,q(H)).filter(e=>f(e.key)),align:f("align")?Bn(R,y[0].base.align,q(H),U):void 0,letterCase:f("letterCase")?{value:R.case??"",styleValue:y[0].base.case,onChange:e=>U("case",e||null)}:void 0}),lt&&k&&o(Lt,{styleName:mt,onCancel:()=>Z(!1),onConfirm:yt}),Y&&Ee===null&&f("fixedSizeHint")&&o(Be,{children:l("Fixed size — the site’s Text setting doesn’t resize this.")}),Je(In,e=>f(e)&&(e==="words"||(e==="sourceNote"?!!ee:e==="fixedSizeHint"?Y&&Ee===null:Y)))&&o($e,{})]})}const Vn={desktop:"align",tablet:"alignTablet",mobile:"alignPhone"};function Bn(t,n,r,i){const a=Vn[r],s=an(t,r);return{value:t[a]??"",styleValue:s??n,onChange:g=>i(a,g||null)}}function Hn(t,n){return!n||!Array.isArray(t)?!1:t.find(i=>i?.id===n)?.values?.italic===!0}const nt={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};export{Fn as PartPanelBody,Qe as PartSourceNote,En as PartStyleSelect,Ln as default,Q as partFace};
1
+ "use client";import{jsx as o,Fragment as W,jsxs as h}from"react/jsx-runtime";import{useContext as wt,useEffect as pe,useRef as Pt,useState as Le}from"react";import{FieldSelect as vt,InspectorField as Tt,fieldShownInView as Nt}from"efficient-easel/fields";import{InertHint as Be,SettingsField as Ot}from"efficient-easel/panel";import{InspectorUpLevel as Y}from"efficient-easel/chrome";import{StylesIcon as Rt,TypeIcon as kt}from"efficient-easel/icons";import{useEasel as Ct}from"efficient-easel/easel";import{TextPartPanel as He}from"efficient-easel/copy";import{Button as Et,IconButton as It,Tooltip as zt}from"efficient-shell/ui";import{PartTextBox as Ft,partTextCells as Ue}from"./PartTextBox.js";import{SiteFields as me}from"./SiteFields.js";import{usePartMotion as _t}from"./usePartMotion.js";import{UiIcon as We}from"efficient-easel/draw/client";import{usePreviewHeader as At}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as Vt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as Lt}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as Bt,partStyleToTextStyleValues as Ht,pushIntoStyle as Ut,resolveTextStyles as je,styleIdOfRole as Wt}from"../../render/lib/text-styles/site-text-styles.js";import{useSiteTextStylesWriter as jt}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as Dt}from"../lib/theme-row-persist.js";import{usePreviewDevice as Kt}from"efficient-easel/draw/client";import{shownTier as q}from"efficient-easel/screen/lib/document/device-fields";import{PART_PANEL_ROWS as De,partRowHasTabletValue as Gt}from"../lib/document/part-panel-rows.js";import{usePartStyle as Mt}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as J,textFieldOffPage as $t,textFieldPanelOnly as Xt}from"../lib/document/controls.js";import{TEXT_FIELD_MARKER as Yt,viewKeyAt as qt}from"efficient-easel/draw";import{useSectionOps as Jt}from"efficient-easel/screen/lib/document/use-section-ops";import{FONT_OPTIONS as Qt,FONT_ROLES as Zt,FONT_ROLE_LABELS as Ke,fontOption as ye,fontRoleOf as en}from"../../format/lib/fonts.js";import{isMultilineKind as tn,partPlaceholder as nn,typeInPlaceKind as on}from"../../render/lib/document/part-text.js";import{partRowField as ln}from"../lib/document/part-row-field.js";import{decodePartKey as sn,partPropsWithRowValue as rn,partRowValue as an}from"../../render/lib/document/part-rows.js";import{followedStyleOf as Ge,partAlignFollowed as cn,propsWithPartStyleValue as B,propsWithoutPartStyle as dn,readPartStyle as he,regionHasOwnLook as un}from"../../render/lib/document/part-styles.js";import{partThemeColors as fn}from"../../format/lib/document/part-inks.js";import{styleKeyForPart as Me}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as pn}from"../lib/document/part-typing.js";import{keysOnCanvas as mn,useCanvasTypingPart as yn}from"../lib/document/canvas-typing.js";import{useEaselHost as hn}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as Sn,SOURCE_ACTIONS as gn,SOURCE_ACTION_LABEL as xn,partSourceNoteFor as bn,partSourceOf as wn,sourceMenuIdOf as Pn,sourceSlugOf as Se}from"../../format/lib/document/source-bound-parts.js";import{encodePartId as vn,holdsAuthoredText as Tn}from"../../render/lib/document/text-parts.js";import{regionsForSection as Nn}from"../../format/lib/sections/section-text-regions.js";import{regionTakesSize as On,textRegionOfPartKey as Rn}from"../../format/lib/sections/text-regions.js";import{SameInEveryViewNote as $e}from"./SameInEveryViewNote.js";function ge(t){return t?l(t):null}function Xe(t){return t.kind==="role"?Ke[t.role]:t.kind==="custom"?"Custom":null}function kn(t){const n=en(t.role);return n?{kind:"role",role:n}:null}function Cn(t,n){if(!t)return{kind:"unread"};const{faceRole:r,base:i}=t;if(n[r]===i.fontKey)return{kind:"role",role:r};const a=Object.keys(n).filter(s=>n[s]===i.fontKey);return a.length===1?{kind:"role",role:a[0]}:{kind:"custom"}}function Q(t,n,r,i){return kn(he(t,n))??Cn(r,i)}function En(t,n){if(!t.length)return null;const r=n(t[0]);return t.every(i=>n(i)===r)?r:null}function Ye(t){return[{value:j,label:l("No style"),description:l("Section’s own")},...t.map(n=>({value:n.id,label:n.name,description:n.values.font?ye(n.values.font)?.label:void 0}))]}const j="";function In({face:t,base:n,onPick:r}){const i=t.kind==="role"?t.role:j,a=[{label:l("No style"),value:j},...Zt.map(s=>({label:l(Ke[s]),value:s}))];return o(vt,{ariaLabel:l("Style"),value:i,options:a,inline:!0,onChange:s=>r(s===j?null:s),renderOption:s=>s.value===j?h(W,{children:[o("span",{className:"es-fsel-label sf-part-style-keep",children:s.label}),o("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section’s own")})]}):o("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${s.value})`},children:s.label}),renderValue:()=>o("span",{style:{fontFamily:n?.fontKey?`var(${ye(n.fontKey)?.cssVar})`:void 0,fontWeight:n?.weight},children:ge(Xe(t))}),valueText:s=>ge(Xe(t))??s?.label??""})}const qe=["regionNote","regionStyle"],zn=Object.keys(De).filter(t=>!qe.includes(t));function Je(t,n){return!t.some(n)}function Fn({sectionName:t,onBack:n,textEditor:r,styleRow:i,children:a,tabs:s}){const g=h(W,{children:[r,i,a]});return h("div",{className:"sf-part-panel",children:[o(Y,{inline:!0,name:l(t),onSelect:n}),s?s(g):g]})}function Qe({source:t,slug:n,menuId:r}){const i=hn(),a=gn[t],s=!a.needsSlug||!!n;return o("div",{className:"sf-note sf-note--source",children:h(Be,{children:[l(Sn[t]),s?h(W,{children:[" ",o(Et,{type:"button",variant:"link",size:"sm",onClick:()=>{a.type==="storefront-editor:open-menus"?i.send(a.type,{menuId:r??null}):n&&i.send(a.type,{slug:n})},children:l(xn)})]}):null]})})}const Ze=4,_n=120;function et(t){return l("Every {part} in this section follows it. The face and the size change; the letter case is the section’s own and stays as it is.",{part:l(t.label).toLowerCase()})}function tt({region:t,sizePx:n,face:r,base:i,onFollowStyle:a,source:s,slug:g,onBack:N,shows:x,sizedStyle:b,ownLook:I}){const D=t.follows;return h("div",{className:"sf-note",children:[o("p",{children:o("strong",{children:l(t.label)})}),x("regionNote")&&!I&&o("p",{children:n?l("Its size follows Styles ▸ {follows} — {px}px right now.",{follows:l(D),px:Math.round(n)}):l("Its size follows Styles ▸ {follows}.",{follows:l(D)})}),b?h(W,{children:[b,x("regionStyle")&&o("p",{className:"es-field-hint",children:et(t)})]}):a?x("regionStyle")?o(W,{children:o(Ot,{label:l("Style"),icon:o(Rt,{}),hint:et(t),children:o(In,{face:r,base:i,onPick:a})})}):null:x("regionNote")&&o("p",{className:"es-field-hint",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),s&&x("sourceNote")?o(Qe,{source:s,slug:g}):null,Je([...qe,"sourceNote",...b?["fontSize"]:[]],z=>x(z)&&(z!=="sourceNote"||!!s))&&o($e,{}),o(Y,{inline:!0,name:l("Page"),onSelect:N})]})}function An({onBack:t}){return h("div",{className:"sf-note",children:[o("p",{children:o("strong",{children:l("This part is no longer here.")})}),o("p",{children:l("The section it belonged to has been changed or removed.")}),o(Y,{inline:!0,name:l("Page"),onSelect:t})]})}function Vn({onBack:t,partId:n,why:r}){return h("div",{className:"sf-note",children:[o("p",{children:o("strong",{children:l("This part's settings did not open.")})}),o("p",{children:l("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),o("p",{className:"sf-note-detail",children:h("code",{children:[n," — ",r]})}),o(Y,{inline:!0,name:l("Page"),onSelect:t})]})}function Ln({nodeId:t,propKey:n,onBack:r,onEditStyle:i}){const{getItemById:a,getSelectorForId:s,config:g}=Ct(e=>e),N=Jt(),x=yn(),{partStyle:b}=Mt(),{fonts:I,textStyles:D}=At(),z=wt(Lt),xe=!z?.capabilities?.hasSiteTheme,{persist:ot}=Dt({themeFromDocument:xe,tokenRef:z?.tokenRef,siteId:z?.siteId??null}),O=jt({themeFromDocument:xe,persist:ot}),[lt,Z]=Le(!1),H=Kt(),f=e=>(q(H)!=="tablet"||Gt(e))&&Nt(De[e],H),be=Pt(null),d=a(t),p=s(t),we=d?g.components[d.type]:void 0,{key:w,row:P}=sn(n),Pe=we?.fields?.[w],S=P?ln(Pe,P):Pe,F=vn(t,n),u=d?.props??{},v=on(S),ve=$t(S),Te=Tn(S),Ne=d?wn(d.type):null,ee=d?bn(d.type,w):null,te=P?an(u[w],P):u[w],Oe=!!P&&!(Array.isArray(u[w])&&P.index<u[w].length);pe(()=>{if(mn(document))return;be.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[F]);const[ne,Re]=Le(0);pe(()=>Re(0),[F]);const oe=!!d&&!Oe&&(!p||!S);pe(()=>{if(!oe||ne>=Ze)return;const e=setTimeout(()=>Re(c=>c+1),_n);return()=>clearTimeout(e)},[oe,ne]);const st=oe&&ne<Ze,le=_t(t,Me(d?.type,n),"textPart");if(!d||Oe)return o(An,{onBack:r});const K=Nn(d.type),ke=K?Rn(K,n):null;if(K&&ke){const e=b?.partId===F?b:null,c=K[ke],m=c.writable===!0&&!!p,T=C=>{p&&N.replaceComponent(p.zone,p.index,{...d,props:B(u,n,"role",C)})};if(m&&On(c)){const C=he(u,n),Ve=E=>{if(!p)return;let fe=u;for(const[xt,bt]of Object.entries(E))fe=B(fe,n,xt,bt??null);N.replaceComponent(p.zone,p.index,{...d,props:fe})},ht=je(O.saved,O.old),St=Ge(C)??"",gt=Ue(C,e?.base??nt,Ve,q(H)).filter(E=>E.key==="fontSize"&&f(E.key));return o(me,{motion:le,body:o(tt,{region:c,sizePx:e?.base.sizePx??null,face:Q(u,n,e,I),base:e?.base??null,source:Ne,slug:Se(u),onBack:r,shows:f,ownLook:un(C),sizedStyle:o(He,{style:f("style")?{value:St,options:Ye(ht),onChange:E=>Ve(E?{textStyle:E}:{textStyle:null,role:null}),onEditStyles:i}:void 0,cells:gt})})})}return o(me,{motion:le,body:o(tt,{region:c,sizePx:e?.base.sizePx??null,face:Q(u,n,e,I),base:e?.base??null,onFollowStyle:m?T:void 0,source:Ne,slug:Se(u),onBack:r,shows:f})})}if(!p||!S)return st?o("div",{className:"sf-note","aria-busy":"true"}):o(Vn,{onBack:r,partId:F,why:p?"no field":"no selector"});const Ce=e=>{N.replaceComponent(p.zone,p.index,{...d,props:e})},se=e=>{if(J(e).hidden!==J(te).hidden||!v){const m=P?rn(u,w,P,e):{...u,[w]:e};m&&Ce(m);return}pn({node:d,propKey:n,kind:v,zone:p.zone,index:p.index},J(e).text,N.replaceComponent)},rt=te,_=b?.partId===F?b:null,A=_?.styleOwner,G=A?a(A.owner):null,re=A&&G?s(A.owner):null,ie=!!(A&&G&&re),V=ie?G.props??{}:u,ae=ie?e=>N.replaceComponent(re.zone,re.index,{...G,props:e}):Ce,M=ie?A.kind:Me(d?.type,n),R=he(V,M),y=[{partKey:M,face:Q(V,M,_,I),sizeGroup:_?.sizeGroup??null,base:_?.base??nt,style:R}],Ee=En(y,e=>e.sizeGroup),it=fn(_?.inks),U=(e,c)=>{let m=V;for(const T of y)m=B(m,T.partKey,e,c);ae(m)},at=e=>e?U("textStyle",e):ce({textStyle:null,role:null}),ce=e=>{let c=V;for(const m of y)for(const[T,C]of Object.entries(e))c=B(c,m.partKey,T,C??null);ae(c)},de=v==="text"||v==="textarea",{text:Ie,hidden:L}=J(te),$=S?.[Yt]?.label??n,ze=L?l("Show {label} on the slide",{label:l($)}):l("Hide {label} on the slide",{label:l($)}),Fe=h("div",{className:"sf-field-head",children:[o(kt,{}),o("span",{className:"sf-field-label sf-field-label--inline",children:l($)}),de&&o(zt,{content:ze,children:o(It,{"aria-pressed":L,"aria-label":ze,onClick:()=>se({text:Ie,hidden:!L}),children:L?o(We,{name:"eye-off",size:14}):o(We,{name:"eye",size:14})})})]}),X=!ve&&Te,ct=!!v&&(Xt(S)||ve||L||!Te),_e=Q(V,M,_,I),dt=_e.kind==="role"?_e.role:null,ue=Ge(R)??Wt(dt),Ae=je(O.saved,O.old),ut=Object.entries(R).filter(([e,c])=>e!=="role"&&e!=="textStyle"&&c!==void 0).length,ft=()=>{let e=V;for(const c of y){const{role:m,textStyle:T}=c.style;e=dn(e,c.partKey),m&&(e=B(e,c.partKey,"role",m)),T&&(e=B(e,c.partKey,"textStyle",T))}ae(e)},k=ue,pt=Bt(y[0].style),mt=k?Ae.find(e=>e.id===k)?.name??k:"",yt=()=>{Z(!1),k&&(O.write(Ut({saved:O.saved,old:O.old,styleId:k,values:Ht(y[0].style)}),!0),ft())};return h(Fn,{sectionName:we?.label??d.type,onBack:r,tabs:e=>o(me,{motion:le,body:e}),textEditor:f("words")?o("div",{ref:be,className:"sf-part-text",children:ct?o(Ft,{text:Ie,onTextChange:e=>se(de?{text:e,hidden:L}:e),multiline:tn(v),markup:v!=="plainText",styled:!1,style:y[0].style,base:y[0].base,setValue:ce,colors:it,placeholder:ge(nn(S))??void 0,ariaLabel:l($),head:Fe,typedOnCanvas:x===F}):v?de?Fe:null:o(Tt,{field:S,name:n,value:rt,onChange:se,id:`sf-part-${t}-${n}`})}):void 0,children:[ee&&f("sourceNote")&&o(Qe,{source:ee,slug:Se(u),menuId:Pn(u)}),X&&o(He,{style:f("style")?{value:ue??"",options:Ye(Ae),onChange:e=>at(e||null),changed:ut>0,onEditStyles:i,onUpdateStyle:k&&pt?()=>Z(!0):void 0}:void 0,font:f("font")?{value:R.font??"",styleValue:ye(y[0].base.fontKey)?.label,options:Qt.map(e=>({label:e.label,value:e.key})),onChange:e=>U("font",e||null)}:void 0,italic:f("italic")?{value:R.italic,styleValue:Hn(D,ue),onChange:e=>U("italic",e??null)}:void 0,cells:Ue(y[0].style,y[0].base,ce,q(H)).filter(e=>f(e.key)),align:f("align")?Bn(R,y[0].base.align,q(H),U):void 0,letterCase:f("letterCase")?{value:R.case??"",styleValue:y[0].base.case,onChange:e=>U("case",e||null)}:void 0}),lt&&k&&o(Vt,{styleName:mt,onCancel:()=>Z(!1),onConfirm:yt}),X&&Ee===null&&f("fixedSizeHint")&&o(Be,{children:l("Fixed size — the site’s Text setting doesn’t resize this.")}),Je(zn,e=>f(e)&&(e==="words"||(e==="sourceNote"?!!ee:e==="fixedSizeHint"?X&&Ee===null:X)))&&o($e,{})]})}function Bn(t,n,r,i){const a=qt("align",r),s=cn(t,r);return{value:t[a]??"",styleValue:s??n,onChange:g=>i(a,g||null)}}function Hn(t,n){return!n||!Array.isArray(t)?!1:t.find(i=>i?.id===n)?.values?.italic===!0}const nt={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};export{Fn as PartPanelBody,Qe as PartSourceNote,In as PartStyleSelect,Ln as default,Q as partFace};
@@ -1 +1 @@
1
- "use client";import{jsx as s,jsxs as P}from"react/jsx-runtime";import{COPY_CELLS as c,CopyBox as C}from"efficient-easel/copy";import{partColourName as _}from"../../format/lib/document/part-inks.js";import{PaddingYIcon as z}from"efficient-easel/icons";import{say as u}from"../../format/lib/editor-words.js";import{SHOP_MARKUP as A}from"../../format/lib/markup.js";import{partTextTools as T}from"../lib/document/canvas-typing.js";import{PART_PADDING_MAX as v,PART_PADDING_MIN as N,PART_PADDING_STEP as D,partSizeBoxOf as O,partSizeFollowed as R,partSpacingOf as k}from"../../render/lib/document/part-styles.js";import{onDesktopWords as w}from"efficient-easel/screen/lib/document/box-fields";const H=["left","center","right","justify"];function I(n,o,i,r="desktop"){const t=k(n),a=O(r),p=n[a]??n.size??o.sizePx,l=R(n,r);return[{...c.fontSize,key:"fontSize",value:n[a],styleValue:Math.round(o.sizePx),onChange:e=>i({[a]:e??null}),...a==="size"?{}:{reset:{detail:l?w(e=>u(e),`${l.px}px`,l.view):void 0}}},{...c.lineHeight,key:"lineHeight",value:t.lineHeight,styleValue:o.lineRatio,onChange:e=>i(e===void 0?{lineHeight:null,line:null}:{lineHeight:e})},{...c.letterSpacing,key:"letterSpacing",scale:p,value:t.letterSpacingEm,styleValue:o.letterEm,onChange:e=>i(e===void 0?{letterSpacing:null,letter:null}:{letterSpacing:e})},{...c.paragraphSpacing,key:"paragraphSpacing",value:n.paragraphSpacing,styleValue:0,onChange:e=>i({paragraphSpacing:e??null})},{key:"padding",name:u("Padding"),icon:s(z,{}),unit:"px",step:D,shiftStep:10,min:N,max:v,value:n.padding,styleValue:o.paddingPx,onChange:e=>i({padding:e??null})}]}function F({text:n,onTextChange:o,multiline:i,markup:r=!0,styled:t=!0,style:a,base:p,setValue:l,colors:e,placeholder:d,ariaLabel:f,head:m,typedOnCanvas:h=!1}){const x=I(a,p,l),S=T(r,i);return P("div",{className:"sf-part-textbox",children:[m,s(C,{value:n,onChange:o,multiline:i,placeholder:d,ariaLabel:f,rules:A,tools:S,barShows:h?"focus":"always",colors:r?e:[],colorNameOf:_,align:t?{value:a.align??p.align,allow:H,onChange:g=>l({align:g})}:void 0,letterCase:t?{value:a.case==="capitalize"?"":a.case??"",onChange:g=>l({case:g||null})}:void 0,cells:t?x:void 0})]})}export{F as PartTextBox,I as partTextCells};
1
+ "use client";import{jsx as x,jsxs as A}from"react/jsx-runtime";import{DEFAULT_EASEL_STRINGS as z}from"efficient-easel/strings";import{COPY_CELLS as c,COPY_CELL_LENGTHS as T,CopyBox as L,lengthCellUnits as N}from"efficient-easel/copy";import{LENGTH_UNITS_TABLE as E}from"../lib/document/box-fields.js";import{partColourName as D}from"../../format/lib/document/part-inks.js";import{PaddingYIcon as O}from"efficient-easel/icons";import{say as _}from"../../format/lib/editor-words.js";import{SHOP_MARKUP as R}from"../../format/lib/markup.js";import{partTextTools as I}from"../lib/document/canvas-typing.js";import{PART_PADDING_MAX as v,PART_PADDING_MIN as G,PART_PADDING_STEP as H,PART_UNIT_KEY_OF as w,partSizeBoxOf as j,partSizeFollowed as k,partSpacingOf as B}from"../../render/lib/document/part-styles.js";import{onDesktopWords as M}from"efficient-easel/screen/lib/document/box-fields";const C=z.copy.cells,U={kind:"spacing"},K=["left","center","right","justify"];function Y(a,o,e,r="desktop"){const p=B(a),i=j(r),u=a[i]??a.size??o.sizePx,t=k(a,r),d=(n,S,g,h,m)=>{const l=w[g];return N({preset:n,row:S,table:E,unit:a[l],value:a[g],tier:r,styleValue:h,label:_(m),onPick:(P,f)=>e({[l]:P??null,[g]:f??null}),onChange:(P,f)=>e({...f?{[l]:f.unit??null}:{},[g]:P??null})})},s={key:"padding",name:_("Padding"),icon:x(O,{}),unit:"px",step:H,shiftStep:10,min:G,max:v};return[{...c.fontSize,key:"fontSize",value:a[i],styleValue:Math.round(o.sizePx),onChange:n=>e({[i]:n??null}),...d(c.fontSize,T.fontSize,i,Math.round(o.sizePx),C.fontSize),...i==="size"?{}:{reset:{detail:t?M(n=>_(n),`${t.px}px`,t.view):void 0}}},{...c.lineHeight,key:"lineHeight",value:p.lineHeight,styleValue:o.lineRatio,onChange:n=>e(n===void 0?{lineHeight:null,line:null}:{lineHeight:n})},{...c.letterSpacing,key:"letterSpacing",scale:u,value:p.letterSpacingEm,styleValue:o.letterEm,onChange:n=>e(n===void 0?{letterSpacing:null,letter:null}:{letterSpacing:n})},{...c.paragraphSpacing,key:"paragraphSpacing",value:a.paragraphSpacing,styleValue:0,onChange:n=>e({paragraphSpacing:n??null}),...d(c.paragraphSpacing,T.paragraphSpacing,"paragraphSpacing",0,C.paragraphSpacing)},{...s,value:a.padding,styleValue:o.paddingPx,onChange:n=>e({padding:n??null}),...d(s,U,"padding",o.paddingPx,"Padding")}]}function nn({text:a,onTextChange:o,multiline:e,markup:r=!0,styled:p=!0,style:i,base:u,setValue:t,colors:d,placeholder:s,ariaLabel:n,head:S,typedOnCanvas:g=!1}){const h=Y(i,u,t),m=I(r,e);return A("div",{className:"sf-part-textbox",children:[S,x(L,{value:a,onChange:o,multiline:e,placeholder:s,ariaLabel:n,rules:R,tools:m,barShows:g?"focus":"always",colors:r?d:[],colorNameOf:D,align:p?{value:i.align??u.align,allow:K,onChange:l=>t({align:l})}:void 0,letterCase:p?{value:i.case==="capitalize"?"":i.case??"",onChange:l=>t({case:l||null})}:void 0,cells:p?h:void 0})]})}export{nn as PartTextBox,Y as partTextCells};
@@ -1 +1 @@
1
- "use client";import{jsx as Y}from"react/jsx-runtime";import{readInks as $}from"../../format/lib/document/part-inks.js";import{useEffect as j,useRef as x}from"react";import{markOverlayPortal as G}from"../../format/lib/document/overlay-portal.js";import{usePreviewParts as q}from"efficient-easel/draw/client";import{usePartStyle as U}from"./PreviewPartStyleContext.js";import{usePreviewDevice as V}from"efficient-easel/draw/client";import{shownTier as Q}from"efficient-easel/screen/lib/document/device-fields";import{decodePartId as I,encodePartId as X}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as Z}from"efficient-easel/canvas";import{engagePartAnchors as tt}from"../lib/document/part-anchors.js";import{PART_ATTR as P,PART_STYLE_KIND_ATTR as b,PART_STYLE_OWNER_ATTR as et,partStyleOwnerOf as g}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as D,applyPartStyles as C,blockDrawsTextStyle as F,partFontKeyOf as rt,partShownDeclarations as ot,partStyleBase as nt,partStyleSource as st,storedPartStyle as it}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as lt,styleRoleOfClassName as at}from"../../format/lib/fonts.js";import{typeScaleGroupOfClassName as k}from"../../format/lib/theme.js";import{styleKeyForPart as h}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as pt,PART_HOST_ATTR as ct}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as ft}from"../lib/document/part-motion-canvas.js";function ut(c){let s=null,o=null;for(let e=c;e&&(s===null||o===null);e=e.parentElement){const r=e.getAttribute("class");s??=at(r),o??=k(r)}return{faceRole:s??"body",sizeGroup:o}}function z(c,s={}){const o=c.style,e={};for(const n of D)e[n]=o[n]??"",o[n]="";s.fontFamily&&(o.fontFamily=s.fontFamily),s.fontSize&&(o.fontSize=s.fontSize);const r=getComputedStyle(c),S=getComputedStyle(c.ownerDocument.documentElement),a=nt({fontSize:r.fontSize,fontWeight:r.fontWeight,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,textAlign:r.textAlign,textTransform:r.textTransform,paddingTop:r.paddingTop},rt(r.fontFamily,n=>S.getPropertyValue(n)));for(const n of D)o[n]=e[n];return a}function mt({needles:c,styles:s,motions:o=pt,type:e,children:r}){const S=x(null),{selectedPartId:a}=q(),{setPartStyle:n}=U(),f=Q(V()),A=JSON.stringify(c),R=JSON.stringify(s),w=JSON.stringify(o),J=x(new Map);return j(()=>{const d=S.current;if(!d)return;const E=[],_=()=>d.parentElement,M=p=>{const i=_();if(!i)return null;const m=new MutationObserver(p);return m.observe(i,{attributes:!0,attributeFilter:[Z]}),()=>m.disconnect()},L=p=>{const i=new MutationObserver(p);return i.observe(d,{childList:!0,subtree:!0,characterData:!0}),()=>i.disconnect()};let u=[];E.push(()=>{for(const p of u)p();u=[]});const W=JSON.parse(A),T=JSON.parse(R),B=JSON.parse(w),H=tt(d,W,_,M,(p,i,m)=>{for(const t of u)t();u=[];const v=[];for(const t of m){const l=t,y=G(l);y&&u.push(y),l.getAttribute(P)===a&&v.push(l)}const K=st(i,a,v,t=>lt(t)!==null||k(t)!==null);if(K&&a){const t=K,l=I(a)?.propKey??"",y=g(t)?{}:ot(it(T,h(e,l)),f,{blockDrawsStyle:F(e,l)});n({partId:a,...ut(t),base:z(t,y),inks:$(t),...(()=>{const N=g(t);return N?{styleOwner:N}:{}})()})}C(m.filter(t=>!g(t)).map(t=>({element:t,partId:t.getAttribute(P)??""})),T,t=>z(t),t=>h(e,t),void 0,f,t=>F(e,t));const O=[...d.querySelectorAll(`[${et}="${CSS.escape(i)}"][${b}]`)];O.length&&C(O.map(t=>({element:t,partId:X(i,t.getAttribute(b)??"")})),T,void 0,t=>t,void 0,f),u.push(ft([...m.filter(t=>!g(t)).map(t=>{const l=t,y=I(l.getAttribute(P)??"")?.propKey??"";return{element:l,partKey:h(e,y)}}),...O.map(t=>({element:t,partKey:t.getAttribute(b)??""}))],t=>B[t],f==="mobile"?"phone":f,J.current))},L);return()=>{H();for(const p of E)p()}},[A,R,w,a,n,f,e]),Y("div",{ref:S,[ct]:"",style:{display:"contents"},children:r})}export{mt as default,z as measureStyleBase,ut as styleTagsOf};
1
+ "use client";import{jsx as Y}from"react/jsx-runtime";import{readInks as $}from"../../format/lib/document/part-inks.js";import{useEffect as j,useRef as x}from"react";import{markOverlayPortal as G}from"../../format/lib/document/overlay-portal.js";import{usePreviewParts as q}from"efficient-easel/draw/client";import{usePartStyle as U}from"./PreviewPartStyleContext.js";import{usePreviewDevice as V}from"efficient-easel/draw/client";import{shownTier as Q}from"efficient-easel/screen/lib/document/device-fields";import{decodePartId as I,encodePartId as X}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as Z}from"efficient-easel/canvas";import{engagePartAnchors as tt}from"../lib/document/part-anchors.js";import{PART_ATTR as P,PART_STYLE_KIND_ATTR as b,PART_STYLE_OWNER_ATTR as et,partStyleOwnerOf as g}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as D,applyPartStyles as C,blockDrawsTextStyle as F,partFontKeyOf as rt,partShownDeclarations as ot,partStyleBase as nt,partStyleSource as st,storedPartStyle as it}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as lt,styleRoleOfClassName as at}from"../../format/lib/fonts.js";import{typeScaleGroupOfClassName as k}from"../../format/lib/theme.js";import{styleKeyForPart as A}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as pt,PART_HOST_ATTR as ct}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as ft}from"../lib/document/part-motion-canvas.js";import{viewOfTier as ut}from"../../format/lib/content/view-tier.js";function mt(c){let s=null,o=null;for(let e=c;e&&(s===null||o===null);e=e.parentElement){const r=e.getAttribute("class");s??=at(r),o??=k(r)}return{faceRole:s??"body",sizeGroup:o}}function z(c,s={}){const o=c.style,e={};for(const n of D)e[n]=o[n]??"",o[n]="";s.fontFamily&&(o.fontFamily=s.fontFamily),s.fontSize&&(o.fontSize=s.fontSize);const r=getComputedStyle(c),S=getComputedStyle(c.ownerDocument.documentElement),a=nt({fontSize:r.fontSize,fontWeight:r.fontWeight,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,textAlign:r.textAlign,textTransform:r.textTransform,paddingTop:r.paddingTop},rt(r.fontFamily,n=>S.getPropertyValue(n)));for(const n of D)o[n]=e[n];return a}function yt({needles:c,styles:s,motions:o=pt,type:e,children:r}){const S=x(null),{selectedPartId:a}=q(),{setPartStyle:n}=U(),y=Q(V()),h=JSON.stringify(c),R=JSON.stringify(s),w=JSON.stringify(o),J=x(new Map);return j(()=>{const d=S.current;if(!d)return;const E=[],v=()=>d.parentElement,M=p=>{const i=v();if(!i)return null;const u=new MutationObserver(p);return u.observe(i,{attributes:!0,attributeFilter:[Z]}),()=>u.disconnect()},L=p=>{const i=new MutationObserver(p);return i.observe(d,{childList:!0,subtree:!0,characterData:!0}),()=>i.disconnect()};let f=[];E.push(()=>{for(const p of f)p();f=[]});const W=JSON.parse(h),T=JSON.parse(R),B=JSON.parse(w),H=tt(d,W,v,M,(p,i,u)=>{for(const t of f)t();f=[];const _=[];for(const t of u){const l=t,m=G(l);m&&f.push(m),l.getAttribute(P)===a&&_.push(l)}const K=st(i,a,_,t=>lt(t)!==null||k(t)!==null);if(K&&a){const t=K,l=I(a)?.propKey??"",m=g(t)?{}:ot(it(T,A(e,l)),y,{blockDrawsStyle:F(e,l)});n({partId:a,...mt(t),base:z(t,m),inks:$(t),...(()=>{const N=g(t);return N?{styleOwner:N}:{}})()})}C(u.filter(t=>!g(t)).map(t=>({element:t,partId:t.getAttribute(P)??""})),T,t=>z(t),t=>A(e,t),void 0,y,t=>F(e,t));const O=[...d.querySelectorAll(`[${et}="${CSS.escape(i)}"][${b}]`)];O.length&&C(O.map(t=>({element:t,partId:X(i,t.getAttribute(b)??"")})),T,void 0,t=>t,void 0,y),f.push(ft([...u.filter(t=>!g(t)).map(t=>{const l=t,m=I(l.getAttribute(P)??"")?.propKey??"";return{element:l,partKey:A(e,m)}}),...O.map(t=>({element:t,partKey:t.getAttribute(b)??""}))],t=>B[t],ut(y),J.current))},L);return()=>{H();for(const p of E)p()}},[h,R,w,a,n,y,e]),Y("div",{ref:S,[ct]:"",style:{display:"contents"},children:r})}export{yt as default,z as measureStyleBase,mt as styleTagsOf};
@@ -1 +1 @@
1
- "use client";import{jsx as o,jsxs as m,Fragment as W}from"react/jsx-runtime";import{useEasel as we,useRootFields as ge}from"efficient-easel/easel";import{Button as Ee,EmptyState as ke}from"efficient-shell/ui";import{PAGE_STYLE_FIELDS as z}from"../lib/document/page-root-fields.js";import{rootPanelHead as Pe}from"../../format/lib/document/root-panel.js";import{headWords as j,InspectorHead as ve,InspectorIconButton as G}from"efficient-easel/chrome";import{DuplicateIcon as Ie,TrashIcon as Le}from"efficient-easel/icons";import{panelFieldsOf as ye}from"efficient-easel/screen/lib/document/panel-fields";import{TICKER_PART_LABEL as Y}from"../../render/components/PreviewTickerContext.js";import Te from"./SectionIcon.js";import{PanelHideButton as U}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as Oe}from"efficient-easel/screen/lib/session-context";import{say as n}from"../../format/lib/editor-words.js";import Ne,{SITE_STYLES_BASICS_TAB as _e}from"./WebsiteSettingsPanel.js";import He from"./ChatSettingsPanel.js";import Re from"./SocialLinksPanel.js";import Ae from"./TickerSettingsPanel.js";import De,{PartSourceNote as Ce}from"./PartSettingsPanel.js";import{regionsForSection as Be}from"../../format/lib/sections/section-text-regions.js";import{TEXT_KIND_LABELS as Fe}from"../../format/lib/sections/section-text-kinds.js";import{textRegionOfPartKey as xe}from"../../format/lib/sections/text-regions.js";import Me from"./DuplicateToPageMenu.js";import{usePageRows as Ke}from"../lib/page-rows.js";import{useScreenDocument as We}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewHeader as ze}from"../../render/components/PreviewHeaderContext.js";import{useSectionOps as je}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as Ge,isSelectionMode as I}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as Ye}from"efficient-easel/draw/client";import{entryPartsOf as Ue,SectionTextEntries as Xe}from"./SectionTextEntries.js";import{SectionTextSuppressProvider as Ze}from"../lib/document/section-text-suppress.js";import{HEADER_TYPE as $e,ROOT_ZONE as X}from"efficient-easel/draw";import{websiteDuplicateBlocked as qe}from"../lib/document/every-page.js";import{FOOTER_TYPE as L}from"../lib/document/footer-blocks.js";import Je from"./SwitchToBoxFooter.js";import{SiteFields as Z}from"./SiteFields.js";import Qe from"./HeroPartPanel.js";import{HERO_MEDIA_PART_LABELS as Ve,HERO_PART_MODE as et,heroPartLabel as tt}from"../../render/lib/document/hero-media-parts.js";import{HintsToggle as nt,SettingsSwitch as ot,hintsFoldClass as rt}from"efficient-easel/panel";import{useHints as it}from"efficient-easel/screen/lib/hints";import{foldTopTier as st}from"../lib/document/field-groups.js";import{FoldHeadingScope as at}from"../lib/document/panel-heading-scope.js";import{partRowField as lt}from"../lib/document/part-row-field.js";import{decodePartKey as ct,partRowHeadLabel as dt}from"../../render/lib/document/part-rows.js";import{encodePartId as pt,partHeadLabel as mt,partLabel as ft,sectionTextParts as ut}from"../../render/lib/document/text-parts.js";import{partSourceOf as ht,sourceMenuIdOf as St,sourceSlugOf as bt}from"../../format/lib/document/source-bound-parts.js";const wn=Ge,gn={kind:"header"},En={kind:"website"},kn={kind:"website",tab:_e,revealPageGroup:!0},Pn={kind:"chat"},vn={kind:"social"},w="Part";function wt(e){return n("Part of {name}",{name:n(e)})}function gt(e,r,i){const s=e.describeNode(r);return{name:i,kindLabel:s?wt(s.label):n(w)}}function Et(e){switch(e){case"Header":return{title:n("Header settings belong to a website."),own:n("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:n("Appearance settings belong to a website."),own:n("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:n("Live chat settings belong to a website."),own:n("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:n("Social link settings belong to a website."),own:n("Each website created from this template sets its own social link afterwards.")};default:return{title:n("{what} settings belong to a website.",{what:e}),own:n("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function $({what:e}){const r=Et(e);return m("div",{className:"sf-note",children:[o("p",{children:o("strong",{children:r.title})}),m("p",{children:[n("A template is a blueprint — it has no website of its own, so there is nothing here to change.")," ",r.own]})]})}function y(e){const r=et[e];return{name:Ve[e],kindLabel:w,icon:r,head:(i,s)=>{if(i.kind!==r)return null;const d=s.describeNode(i.nodeId);if(!d)return null;const S=j({name:n(tt(e,d.props)),tier:"part",of:n(d.label)},{partOf:({name:p})=>n("Part of {name}",{name:p})});return{name:S.name,kindLabel:S.kind}},render:(i,s)=>i.kind===r?o(Qe,{nodeId:i.nodeId,part:e,sectionName:s.describeNode(i.nodeId)?.label??"Hero",onUpToSection:()=>s.onSelectNode(i.nodeId)}):null}}const kt={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,r)=>{const i=r.hostPanels?.header;return i?o(i,{placeholderMode:r.capabilities.placeholderFrames,tokenRef:r.tokenRef,siteId:r.siteId,websiteName:r.websiteName,onOpenWebsiteSettings:r.onOpenWebsiteSettings,onAuthExpired:()=>r.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,r)=>o(Ne,{initialTab:e.tab,revealPageGroup:e.revealPageGroup,themeFromDocument:!r.capabilities.hasSiteTheme,tokenRef:r.tokenRef,siteId:r.siteId,onNotify:r.onNotify},e.tab??"")},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>o(He,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>o(Re,{unavailable:o($,{what:"Social link"})})},ticker:{name:Y,kindLabel:w,icon:"ticker",head:(e,r)=>e.kind==="ticker"?gt(r,e.heroId,n(Y)):null,render:e=>o(Ae,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:y("media"),heroImage:y("image"),heroImage2:y("image2"),part:{name:w,kindLabel:w,icon:"Text",head:(e,r)=>{if(e.kind!=="part")return null;const i=r.describeNode(e.nodeId);if(!i)return null;const{key:s,row:d}=ct(e.propKey),S=d?lt(i.fields[s],d):i.fields[s],p=Be(i.type),f=p?xe(p,e.propKey):null,u=p&&f?p[f].label:Fe[e.propKey],g=u?n(u):dt(n(mt(ft(S??{},s))),d),E=j({name:g,tier:"part",of:n(i.label)},{partOf:({name:k})=>n("Part of {name}",{name:k})});return{name:E.name,kindLabel:E.kind}},render:(e,r)=>e.kind==="part"?o(De,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>r.onSelectNode(e.nodeId),onEditStyle:r.onOpenSiteStyles}):null}},Pt=new Set(["header","website","chat"]);function vt(e,r){if(e==="selection")return null;const i=kt[e];return Pt.has(e)&&!r.hasSiteSettings?{...i,kindLabel:"Not part of a template",render:()=>o($,{what:i.name})}:i}function It({mode:e,onOpenWebsiteSettings:r,onOpenSiteStyles:i,onOpenPageStyles:s,onSelectNode:d,hideNodeActions:S=!1,onNotify:p,onHidePanel:f}){const{capabilities:u,tokenRef:g,notifyParent:E,currentSlug:k,siteId:T,runAuthed:q,readOnly:J,navigate:Lt}=We(),{rows:Q}=Ke(),O=Q?.find(l=>l.slug===k)??null,V=ge(),N=Object.keys(V.fields).some(l=>!l.startsWith("_")&&!z.includes(l)),{websiteName:ee}=ze(),P=je({readOnly:J}),{select:te}=Ye(),{selectedItem:t,getItemById:ne,getSelectorForId:oe,config:h,appState:re}=we(l=>l),ie=ye(h,t?{type:t.type,props:t.props}:null),_=t?ut(ie??h.components[t.type]?.fields,t.props):[],se=l=>h.components[l]?.label??l,a=t?oe(t.props.id):void 0,c=vt(e.kind,u),ae=Oe(),H={capabilities:u,tokenRef:g,hostPanels:ae.chrome?.panels,describeNode:l=>{const b=ne(l);if(!b)return null;const K=h.components[b.type];return{type:b.type,label:K?.label??b.type,fields:K?.fields??{},props:b.props??{}}},siteId:T,websiteName:ee??null,notifyParent:E,onNotify:p,onOpenWebsiteSettings:r,onOpenSiteStyles:i,onSelectNode:d},R=c?.head?.(e,H)??null,A=Pe({kind:O?.kind,pageName:O?.label}),D=R?.name??(c?n(c.name):t?n(se(t.type)):A.name),le=R?.kindLabel??(c?n(c.kindLabel):t?a&&a.zone!==X?n("Block"):n("Section"):A.kindLabel),ce=c?c.icon:t?t.type:"page",C=c?null:t?h.components[t.type]?.fields??null:h.root?.fields??null,de=C?st(C):2,B=I(e)&&t?ht(t.type):null,pe=!!t&&!!a&&a.zone===X&&t.type!==L&&t.type!==$e,v=qe(re?.data,t),me=()=>{v||a&&P.duplicateComponent(a.zone,a.index)},fe=()=>{a&&(P.removeComponent(a.zone,a.index),P.select(null))},ue=t?h.components[t.type]?.defaultProps?.previewHover:void 0,F=I(e)&&!!t&&!!a&&ue!==void 0,x=F&&t.props.previewHover===!0,he=()=>{!t||!a||P.replaceComponent(a.zone,a.index,{...t,props:{...t.props,previewHover:!x}})},{shown:M,setShown:Se}=it(),be=!!(c||t||N);return m("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right ${rt(M)}`.trim(),children:[o(ve,{icon:o(Te,{type:ce,size:15}),name:D,kind:le,actions:!S&&I(e)&&t&&t.type!==L?m(W,{children:[o(G,{label:n("Duplicate section"),title:v??void 0,disabled:v!==null,onClick:me,children:o(Ie,{size:15})}),pe&&u.hasSiteSettings&&o(Me,{node:t,currentSlug:k,siteId:T??void 0,tokenRef:g,runAuthed:q,onNotify:p}),o(G,{label:n("Remove section"),danger:!0,onClick:fe,children:o(Le,{size:15})}),f?o(U,{side:"right",onHide:f,divider:!0}):null]}):f?o(U,{side:"right",onHide:f}):void 0}),F&&m("div",{className:"sf-preview-pin",children:[m("div",{className:"sf-preview-pin-text",children:[o("span",{className:"sf-preview-pin-label",children:n("Preview hover state")}),o("span",{className:"sf-preview-pin-hint",children:n("not shown live")})]}),o(ot,{checked:x,onChange:he,ariaLabel:n("Preview hover state")})]}),o(at,{tier:de,children:m("div",{className:"sf-insp-body es-insp-body sf-scroll",children:[c?c.render(e,H):t?m(W,{children:[t.type===L&&u.hasSiteSettings&&o(Je,{}),o(Ze,{children:o(Z,{entries:o(Xe,{parts:_,heading:!1,onOpen:l=>te(pt(t.props.id,l))}),entryCount:Ue(_).length,itemWord:D})}),B&&o(Ce,{source:B,slug:bt(t?.props),menuId:St(t?.props)})]}):N?o(Z,{omit:z}):o(ke,{variant:"none",icon:!1,message:n("Select a section or block to edit it."),children:s&&o(Ee,{variant:"secondary",onClick:s,children:n("This page")})}),be&&o(nt,{shown:M,onChange:Se,label:n("Show hints")})]})})]})}export{Pn as CHAT_MODE,gn as HEADER_MODE,wn as SELECTION_MODE,vn as SOCIAL_MODE,En as WEBSITE_MODE,kn as WEBSITE_PAGE_MODE,It as default,vt as resolvePanel};
1
+ "use client";import{jsx as r,jsxs as m,Fragment as K}from"react/jsx-runtime";import{useEasel as Se,useRootFields as be}from"efficient-easel/easel";import{Button as we,EmptyState as ge}from"efficient-shell/ui";import{PAGE_STYLE_FIELDS as W}from"../lib/document/page-root-fields.js";import{rootPanelHead as Ee}from"../../format/lib/document/root-panel.js";import{headWords as z,InspectorHead as ke,InspectorIconButton as j}from"efficient-easel/chrome";import{DuplicateIcon as Pe,TrashIcon as ve}from"efficient-easel/icons";import{panelFieldsOf as Ie}from"efficient-easel/screen/lib/document/panel-fields";import{TICKER_PART_LABEL as G}from"../../render/components/PreviewTickerContext.js";import Le from"./SectionIcon.js";import{PanelHideButton as Y}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as ye}from"efficient-easel/screen/lib/session-context";import{say as n}from"../../format/lib/editor-words.js";import Oe,{SITE_STYLES_BASICS_TAB as Te}from"./WebsiteSettingsPanel.js";import Ne from"./ChatSettingsPanel.js";import _e from"./SocialLinksPanel.js";import He from"./TickerSettingsPanel.js";import Re,{PartSourceNote as Ae}from"./PartSettingsPanel.js";import{regionsForSection as De}from"../../format/lib/sections/section-text-regions.js";import{TEXT_KIND_LABELS as Ce}from"../../format/lib/sections/section-text-kinds.js";import{textRegionOfPartKey as Be}from"../../format/lib/sections/text-regions.js";import Fe from"./DuplicateToPageMenu.js";import{usePageRows as xe}from"../lib/page-rows.js";import{useScreenDocument as Me}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewHeader as Ke}from"../../render/components/PreviewHeaderContext.js";import{useSectionOps as We}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as ze,isSelectionMode as I}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as je}from"efficient-easel/draw/client";import{entryPartsOf as Ge,SectionTextEntries as Ye}from"./SectionTextEntries.js";import{SectionTextSuppressProvider as Ue}from"../lib/document/section-text-suppress.js";import{HEADER_TYPE as Xe,ROOT_ZONE as U}from"efficient-easel/draw";import{websiteDuplicateBlocked as Ze}from"../lib/document/every-page.js";import{FOOTER_TYPE as L}from"../lib/document/footer-blocks.js";import $e from"./SwitchToBoxFooter.js";import{SiteFields as X}from"./SiteFields.js";import qe from"./HeroPartPanel.js";import{HERO_MEDIA_PART_LABELS as Je,HERO_PART_MODE as Qe,heroPartLabel as Ve}from"../../render/lib/document/hero-media-parts.js";import{HintsToggle as et,SettingsSwitch as tt,hintsFoldClass as nt}from"efficient-easel/panel";import{useHints as ot}from"efficient-easel/screen/lib/hints";import{partRowField as rt}from"../lib/document/part-row-field.js";import{decodePartKey as it,partRowHeadLabel as st}from"../../render/lib/document/part-rows.js";import{encodePartId as at,partHeadLabel as lt,partLabel as ct,sectionTextParts as dt}from"../../render/lib/document/text-parts.js";import{partSourceOf as pt,sourceMenuIdOf as mt,sourceSlugOf as ft}from"../../format/lib/document/source-bound-parts.js";const mn=ze,fn={kind:"header"},un={kind:"website"},hn={kind:"website",tab:Te,revealPageGroup:!0},Sn={kind:"chat"},bn={kind:"social"},w="Part";function ut(e){return n("Part of {name}",{name:n(e)})}function ht(e,o,i){const s=e.describeNode(o);return{name:i,kindLabel:s?ut(s.label):n(w)}}function St(e){switch(e){case"Header":return{title:n("Header settings belong to a website."),own:n("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:n("Appearance settings belong to a website."),own:n("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:n("Live chat settings belong to a website."),own:n("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:n("Social link settings belong to a website."),own:n("Each website created from this template sets its own social link afterwards.")};default:return{title:n("{what} settings belong to a website.",{what:e}),own:n("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function Z({what:e}){const o=St(e);return m("div",{className:"sf-note",children:[r("p",{children:r("strong",{children:o.title})}),m("p",{children:[n("A template is a blueprint — it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function y(e){const o=Qe[e];return{name:Je[e],kindLabel:w,icon:o,head:(i,s)=>{if(i.kind!==o)return null;const d=s.describeNode(i.nodeId);if(!d)return null;const h=z({name:n(Ve(e,d.props)),tier:"part",of:n(d.label)},{partOf:({name:p})=>n("Part of {name}",{name:p})});return{name:h.name,kindLabel:h.kind}},render:(i,s)=>i.kind===o?r(qe,{nodeId:i.nodeId,part:e,sectionName:s.describeNode(i.nodeId)?.label??"Hero",onUpToSection:()=>s.onSelectNode(i.nodeId)}):null}}const bt={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{const i=o.hostPanels?.header;return i?r(i,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>r(Oe,{initialTab:e.tab,revealPageGroup:e.revealPageGroup,themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify},e.tab??"")},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>r(Ne,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>r(_e,{unavailable:r(Z,{what:"Social link"})})},ticker:{name:G,kindLabel:w,icon:"ticker",head:(e,o)=>e.kind==="ticker"?ht(o,e.heroId,n(G)):null,render:e=>r(He,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:y("media"),heroImage:y("image"),heroImage2:y("image2"),part:{name:w,kindLabel:w,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;const i=o.describeNode(e.nodeId);if(!i)return null;const{key:s,row:d}=it(e.propKey),h=d?rt(i.fields[s],d):i.fields[s],p=De(i.type),f=p?Be(p,e.propKey):null,u=p&&f?p[f].label:Ce[e.propKey],g=u?n(u):st(n(lt(ct(h??{},s))),d),E=z({name:g,tier:"part",of:n(i.label)},{partOf:({name:k})=>n("Part of {name}",{name:k})});return{name:E.name,kindLabel:E.kind}},render:(e,o)=>e.kind==="part"?r(Re,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},wt=new Set(["header","website","chat"]);function gt(e,o){if(e==="selection")return null;const i=bt[e];return wt.has(e)&&!o.hasSiteSettings?{...i,kindLabel:"Not part of a template",render:()=>r(Z,{what:i.name})}:i}function Et({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onOpenPageStyles:s,onSelectNode:d,hideNodeActions:h=!1,onNotify:p,onHidePanel:f}){const{capabilities:u,tokenRef:g,notifyParent:E,currentSlug:k,siteId:O,runAuthed:$,readOnly:q,navigate:kt}=Me(),{rows:J}=xe(),T=J?.find(l=>l.slug===k)??null,Q=be(),N=Object.keys(Q.fields).some(l=>!l.startsWith("_")&&!W.includes(l)),{websiteName:V}=Ke(),P=We({readOnly:q}),{select:ee}=je(),{selectedItem:t,getItemById:te,getSelectorForId:ne,config:S,appState:oe}=Se(l=>l),re=Ie(S,t?{type:t.type,props:t.props}:null),_=t?dt(re??S.components[t.type]?.fields,t.props):[],ie=l=>S.components[l]?.label??l,a=t?ne(t.props.id):void 0,c=gt(e.kind,u),se=ye(),H={capabilities:u,tokenRef:g,hostPanels:se.chrome?.panels,describeNode:l=>{const b=te(l);if(!b)return null;const M=S.components[b.type];return{type:b.type,label:M?.label??b.type,fields:M?.fields??{},props:b.props??{}}},siteId:O,websiteName:V??null,notifyParent:E,onNotify:p,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onSelectNode:d},R=c?.head?.(e,H)??null,A=Ee({kind:T?.kind,pageName:T?.label}),D=R?.name??(c?n(c.name):t?n(ie(t.type)):A.name),ae=R?.kindLabel??(c?n(c.kindLabel):t?a&&a.zone!==U?n("Block"):n("Section"):A.kindLabel),le=c?c.icon:t?t.type:"page",C=I(e)&&t?pt(t.type):null,ce=!!t&&!!a&&a.zone===U&&t.type!==L&&t.type!==Xe,v=Ze(oe?.data,t),de=()=>{v||a&&P.duplicateComponent(a.zone,a.index)},pe=()=>{a&&(P.removeComponent(a.zone,a.index),P.select(null))},me=t?S.components[t.type]?.defaultProps?.previewHover:void 0,B=I(e)&&!!t&&!!a&&me!==void 0,F=B&&t.props.previewHover===!0,fe=()=>{!t||!a||P.replaceComponent(a.zone,a.index,{...t,props:{...t.props,previewHover:!F}})},{shown:x,setShown:ue}=ot(),he=!!(c||t||N);return m("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right ${nt(x)}`.trim(),children:[r(ke,{icon:r(Le,{type:le,size:15}),name:D,kind:ae,actions:!h&&I(e)&&t&&t.type!==L?m(K,{children:[r(j,{label:n("Duplicate section"),title:v??void 0,disabled:v!==null,onClick:de,children:r(Pe,{size:15})}),ce&&u.hasSiteSettings&&r(Fe,{node:t,currentSlug:k,siteId:O??void 0,tokenRef:g,runAuthed:$,onNotify:p}),r(j,{label:n("Remove section"),danger:!0,onClick:pe,children:r(ve,{size:15})}),f?r(Y,{side:"right",onHide:f,divider:!0}):null]}):f?r(Y,{side:"right",onHide:f}):void 0}),B&&m("div",{className:"sf-preview-pin",children:[m("div",{className:"sf-preview-pin-text",children:[r("span",{className:"sf-preview-pin-label",children:n("Preview hover state")}),r("span",{className:"sf-preview-pin-hint",children:n("not shown live")})]}),r(tt,{checked:F,onChange:fe,ariaLabel:n("Preview hover state")})]}),m("div",{className:"sf-insp-body es-insp-body sf-scroll",children:[c?c.render(e,H):t?m(K,{children:[t.type===L&&u.hasSiteSettings&&r($e,{}),r(Ue,{children:r(X,{entries:r(Ye,{parts:_,heading:!1,onOpen:l=>ee(at(t.props.id,l))}),entryCount:Ge(_).length,itemWord:D})}),C&&r(Ae,{source:C,slug:ft(t?.props),menuId:mt(t?.props)})]}):N?r(X,{omit:W}):r(ge,{variant:"none",icon:!1,message:n("Select a section or block to edit it."),children:s&&r(we,{variant:"secondary",onClick:s,children:n("This page")})}),he&&r(et,{shown:x,onChange:ue,label:n("Show hints")})]})]})}export{Sn as CHAT_MODE,fn as HEADER_MODE,mn as SELECTION_MODE,bn as SOCIAL_MODE,un as WEBSITE_MODE,hn as WEBSITE_PAGE_MODE,Et as default,gt as resolvePanel};
@@ -1,4 +1,5 @@
1
1
  import { type WidthAnswer } from "../../format/lib/content/section-width.js";
2
+ import type { LengthUnitState } from "efficient-easel/screen/lib/document/box-fields";
2
3
  export declare const BACKGROUND_LABEL = "Background width";
3
4
  export declare const CONTENT_LABEL = "Content width";
4
5
  export declare const WIDTH_CHOICES: readonly WidthAnswer[];
@@ -13,7 +14,7 @@ export declare function BackgroundWidthRow({ value, changed, detail, onChange, o
13
14
  hint?: string;
14
15
  labelId?: string;
15
16
  }): import("react").JSX.Element;
16
- export declare function ContentWidthRow({ mode, px, max, min, changed, detail, fullClosed, onMode, onPx, onReset, hint, labelId, }: {
17
+ export declare function ContentWidthRow({ mode, px, max, min, changed, detail, fullClosed, onMode, onPx, onReset, hint, labelId, length, }: {
17
18
  mode: WidthAnswer;
18
19
  px: number;
19
20
  max?: number;
@@ -26,4 +27,5 @@ export declare function ContentWidthRow({ mode, px, max, min, changed, detail, f
26
27
  onReset: () => void;
27
28
  hint?: string;
28
29
  labelId?: string;
30
+ length?: Pick<LengthUnitState, "grid" | "unit" | "units">;
29
31
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as d}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as I,SettingsBackgroundWidth as _,SettingsContentWidth as g}from"efficient-easel/panel";import{PAGE_WIDTH as c}from"../../format/lib/content/page-width.js";import{WIDTH_CHOICE_LABEL as E}from"../../format/lib/content/section-width.js";import{say as t,editorEaselWords as m}from"../../format/lib/editor-words.js";import{Slider as W}from"../lib/document/controls.js";const b="Background width",B="Content width",O=I,l=e=>t(E[e==="content"?"page":"full"]),R="The width of every section's background.",S="The width of every section's content.";function k({value:e,changed:s,detail:n,onChange:o,onReset:i,hint:r,labelId:a}){return d(_,{value:e,changed:s,detail:n,onChange:o,onReset:i,hint:r?t(r):void 0,labelId:a,words:{label:t(b),full:l("full"),content:l("content")},resetWords:m()?.panel})}function v({mode:e,px:s,max:n=c.max,min:o=c.min,changed:i,detail:r,fullClosed:a,onMode:p,onPx:h,onReset:C,hint:u,labelId:T}){const f=t(B),x=e!=="full"?d(W,{min:o,max:n,step:c.step,value:Math.min(Math.max(s,o),n),onChange:h,suffix:"px",ariaLabel:f}):null;return d(g,{mode:e,onMode:p,number:x,changed:i,detail:r,fullClosed:a,onReset:C,hint:u?t(u):void 0,labelId:T,words:{label:f,full:l("full"),content:l("content")},resetWords:m()?.panel})}export{b as BACKGROUND_LABEL,k as BackgroundWidthRow,B as CONTENT_LABEL,v as ContentWidthRow,R as SITE_BACKGROUND_HINT,S as SITE_CONTENT_HINT,O as WIDTH_CHOICES};
1
+ "use client";import{jsx as c}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as W,SettingsBackgroundWidth as b,SettingsContentWidth as g}from"efficient-easel/panel";import{PAGE_WIDTH as u}from"../../format/lib/content/page-width.js";import{WIDTH_CHOICE_LABEL as B}from"../../format/lib/content/section-width.js";import{say as o,editorEaselWords as C}from"../../format/lib/editor-words.js";import{Slider as N}from"../lib/document/controls.js";const w="Background width",H="Content width",k=W,r=t=>o(B[t==="content"?"page":"full"]),v="The width of every section's background.",G="The width of every section's content.";function y({value:t,changed:i,detail:s,onChange:d,onReset:a,hint:n,labelId:l}){return c(b,{value:t,changed:i,detail:s,onChange:d,onReset:a,hint:n?o(n):void 0,labelId:l,words:{label:o(w),full:r("full"),content:r("content")},resetWords:C()?.panel})}function K({mode:t,px:i,max:s=u.max,min:d=u.min,changed:a,detail:n,fullClosed:l,onMode:T,onPx:h,onReset:I,hint:f,labelId:_,length:e}){const m=o(H),p=e?.grid.min??d,x=e?.grid.max??s,E=t!=="full"?c(N,{min:p,max:x,step:e?.grid.step??u.step,value:Math.min(Math.max(i,p),x),onChange:h,...e?{suffix:e.unit,units:e.units}:{suffix:"px"},ariaLabel:m}):null;return c(g,{mode:t,onMode:T,number:E,changed:a,detail:n,fullClosed:l,onReset:I,hint:f?o(f):void 0,labelId:_,words:{label:m,full:r("full"),content:r("content")},resetWords:C()?.panel})}export{w as BACKGROUND_LABEL,y as BackgroundWidthRow,H as CONTENT_LABEL,K as ContentWidthRow,v as SITE_BACKGROUND_HINT,G as SITE_CONTENT_HINT,k as WIDTH_CHOICES};
@@ -1 +1 @@
1
- "use client";import{jsx as v}from"react/jsx-runtime";import{useState as y}from"react";import{TextStylesList as _}from"efficient-easel/text-styles";import{FONT_OPTIONS as I}from"../../format/lib/fonts.js";import{usePreviewDevice as b}from"efficient-easel/draw/client";import{applyListChange as w,resolveTextStyles as x,toPanelStyles as C}from"../../render/lib/text-styles/site-text-styles.js";const k={desktop:"desktop",tablet:"tablet",mobile:"phone"},p=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],L=["size","lineSpacing","letterSpacing","letterCase"],N=500,A=I.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function F({saved:e,old:s,colours:f,colourNameOf:S,sizeOf:a,onChange:d,openId:l,onOpenChange:m,readOnly:u=!1,withoutSize:g=!1}){const T=b(),[h,E]=y(null),r=x(e,s),n=k[T],c=C(r,a,n);return v(_,{styles:c,onChange:t=>d(w({saved:e,old:s,cur:c,next:t,sizeOf:a,panelView:n})),fonts:A,colours:f,colourNameOf:S,settings:g?p.filter(t=>t!=="size"):p,auto:L,openId:l===void 0?h:l,onOpenChange:m??E,readOnly:u,device:n,fallback:t=>{const i=r.find(O=>O.id===(t.kind==="heading"?"heading-1":"body-1")),o={};return i?.values.font&&t.id!==i.id&&(o.font=i.values.font),t.kind==="heading"&&(o.weight=N),o}})}export{A as SITE_FONTS,F as default};
1
+ "use client";import{jsx as y}from"react/jsx-runtime";import{useState as w}from"react";import{TextStylesList as x}from"efficient-easel/text-styles";import{FONT_OPTIONS as I}from"../../format/lib/fonts.js";import{viewOfTier as _}from"../../format/lib/content/view-tier.js";import{usePreviewDevice as C}from"efficient-easel/draw/client";import{applyListChange as E,resolveTextStyles as N,toPanelStyles as L}from"../../render/lib/text-styles/site-text-styles.js";const f=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],b=["size","lineSpacing","letterSpacing","letterCase"],k=500,A=I.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function F({saved:e,old:s,colours:p,colourNameOf:S,sizeOf:a,onChange:m,openId:l,onOpenChange:d,readOnly:u=!1,withoutSize:g=!1}){const T=C(),[O,h]=w(null),r=N(e,s),i=_(T),c=L(r,a,i);return y(x,{styles:c,onChange:t=>m(E({saved:e,old:s,cur:c,next:t,sizeOf:a,panelView:i})),fonts:A,colours:p,colourNameOf:S,settings:g?f.filter(t=>t!=="size"):f,auto:b,openId:l===void 0?O:l,onOpenChange:d??h,readOnly:u,device:i,fallback:t=>{const n=r.find(v=>v.id===(t.kind==="heading"?"heading-1":"body-1")),o={};return n?.values.font&&t.id!==n.id&&(o.font=n.values.font),t.kind==="heading"&&(o.weight=k),o}})}export{A as SITE_FONTS,F as default};
@@ -1 +1 @@
1
- "use client";import{jsx as s}from"react/jsx-runtime";import{useEffect as h,useRef as p,useState as v}from"react";import{ExternalIcon as m}from"efficient-easel/icons";import{EaselIconButton as y}from"efficient-easel/chrome";import{Tooltip as P,iconButtonClasses as g}from"efficient-shell/ui";import{useSettledPress as x}from"efficient-easel/easel";import{useScreenDocument as S}from"efficient-easel/screen/components/ScreenDocumentContext";import{say as l}from"../../format/lib/editor-words.js";async function _({pageId:i,liveHref:n,draftLink:a,ready:c=async()=>!0,win:r=window}){const e=r.open("","_blank");if(e)try{e.opener=null}catch{}const o=t=>{e&&!e.closed?e.location.href=t:r.open(t,"_blank","noopener,noreferrer")};try{await c()}catch{}return a(i).then(t=>o(t.url??n),()=>o(n))}function I({liveHref:i,pageId:n,draftLink:a}){const{flushSave:c}=S(),r=p(c);r.current=c;const e=x(),[o,t]=v(!1),u=p(null);if(h(()=>()=>u.current?.(),[]),a&&n){const d=()=>new Promise((f,w)=>{u.current=()=>f(!1),e.run(()=>{u.current=null,r.current().then(f,w)})}),b=()=>{o||e.waiting||(t(!0),_({pageId:n,liveHref:i,draftLink:a,ready:d}).finally(()=>t(!1)))};return s(y,{label:l("Preview your saved draft in a new tab"),tip:l("Open your saved draft in a new tab. Visitors don't see it."),disabled:o||e.waiting,onClick:b,children:s(m,{})})}return s(P,{content:l("Preview the live site (opens in a new tab)"),side:"bottom",children:s("a",{className:g({className:"es-iconbtn"}),href:i,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:s(m,{})})})}export{I as WebsitePreviewButton,_ as openDraftPreview};
1
+ "use client";import{jsx as i}from"react/jsx-runtime";import{NEW_TAB_ATTRS as h}from"../../format/lib/content/box-link.js";import{useEffect as v,useRef as p,useState as y}from"react";import{ExternalIcon as m}from"efficient-easel/icons";import{EaselIconButton as P}from"efficient-easel/chrome";import{Tooltip as S,iconButtonClasses as x}from"efficient-shell/ui";import{useSettledPress as _}from"efficient-easel/easel";import{useScreenDocument as g}from"efficient-easel/screen/components/ScreenDocumentContext";import{say as l}from"../../format/lib/editor-words.js";async function B({pageId:s,liveHref:n,draftLink:a,ready:c=async()=>!0,win:r=window}){const e=r.open("","_blank");if(e)try{e.opener=null}catch{}const o=t=>{e&&!e.closed?e.location.href=t:r.open(t,"_blank","noopener,noreferrer")};try{await c()}catch{}return a(s).then(t=>o(t.url??n),()=>o(n))}function R({liveHref:s,pageId:n,draftLink:a}){const{flushSave:c}=g(),r=p(c);r.current=c;const e=_(),[o,t]=y(!1),u=p(null);if(v(()=>()=>u.current?.(),[]),a&&n){const d=()=>new Promise((f,b)=>{u.current=()=>f(!1),e.run(()=>{u.current=null,r.current().then(f,b)})}),w=()=>{o||e.waiting||(t(!0),B({pageId:n,liveHref:s,draftLink:a,ready:d}).finally(()=>t(!1)))};return i(P,{label:l("Preview your saved draft in a new tab"),tip:l("Open your saved draft in a new tab. Visitors don't see it."),disabled:o||e.waiting,onClick:w,children:i(m,{})})}return i(S,{content:l("Preview the live site (opens in a new tab)"),side:"bottom",children:i("a",{className:x({className:"es-iconbtn"}),href:s,...h,"aria-label":l("Preview the live site in a new tab"),children:i(m,{})})})}export{R as WebsitePreviewButton,B as openDraftPreview};
@@ -716,21 +716,21 @@
716
716
  outline: none;
717
717
  }
718
718
 
719
- /* ⚠️ EVERY COLOUR BELOW CARRIES ITS OWN FALLBACK, AND THAT IS NOT DECORATION.
720
- These rules paint inside the canvas FRAME, whose document has no `.es-editor`
721
- root, so no `--es-*` token is defined there (efficient-easel/easel.css
722
- falls back the same way). Until blueprint 5.5 they leaned on the old editor library's stylesheet, which declared its `--old-azure-*` ramp on the frame's
723
- `:root` and drew the pointed-at block's colour and offset itself. 5.5 took
724
- that sheet off the canvas: a bare `var(--old-azure-08)` then resolved
725
- to nothing, and an `outline` with an unresolvable colour is no outline at all
726
- — the empty slot stopped answering when pointed at, silently. The colours are
727
- the old editor library's ramp as the shell re-tints it (`--es-accent-line` = azure-08,
728
- `--es-accent-tint-strong` = azure-09). */
719
+ /* THE COLOUR BELOW IS A TOKEN WITH NO FALLBACK, AND THAT IS ON PURPOSE.
720
+ This rule paints inside the canvas FRAME, a document with no `.es-editor`
721
+ root. efficient-easel copies the chrome's accent tokens, `--es-accent-line`
722
+ among them, onto the frame's `:root` (`canvas/host-tokens`), so the token
723
+ resolves there; easel's own empty-cell outline reads `--es-accent` the same
724
+ way. A literal fallback would be a second copy of the shell's accent
725
+ (owner ruling 2026-10-23: a colour value is written once). Until blueprint
726
+ 5.5 these rules leaned on the old editor library's `--old-azure-*` ramp,
727
+ and a bare `var()` of a token the frame did not carry drew no outline at
728
+ all: the empty slot stopped answering when pointed at, silently. */
729
729
 
730
730
  /* B · …except an EMPTY one, which has no block to carry the line for it. */
731
731
  [data-easel-entry]
732
732
  .es-zone:empty:is(.is-area-selected, .is-hovering-area:not(.is-root)) {
733
- outline: 1px solid var(--es-accent-line, #bfdbfe);
733
+ outline: 1px solid var(--es-accent-line);
734
734
  }
735
735
 
736
736
  /* C, D, E · RETIRED 2026-10-26: no line on the words, ever, and the engine's
@@ -900,7 +900,7 @@
900
900
  }
901
901
 
902
902
  /* 2026-10-20: THE INSET IS EASEL'S, 16 AND 12 UNDER 260 (efficient-easel
903
- 14.1.0, GG option A). The 8px under a 284px panel that the notes below
903
+ 14.1.0, option A). The 8px under a 284px panel that the notes below
904
904
  measured is gone: one side inset for every head and body, one home.
905
905
  The history stays, because the overflow sweep is still how a width is
906
906
  judged.
@@ -1536,7 +1536,7 @@
1536
1536
  filled pill) and `SettingsGroupSub` (the quiet tier, added in 0.25.0 for this).
1537
1537
  Nothing in this repo renders either class any more — the four panels that
1538
1538
  inlined `.sf-field-group` as a bare div (HeroText, Ticker, HeroMedia, Chat)
1539
- call `GroupLabel` in the same card, because leaving them behind would have put
1539
+ call easel's quiet tier in the same card, because leaving them behind would have put
1540
1540
  the hairline back in four panels and given the editor two answers to "what does
1541
1541
  a group heading look like" — which is the fault the conversion is fixing.
1542
1542
  Deleted rather than left dead: a rule nobody renders is a rule the next person
@@ -1580,8 +1580,8 @@
1580
1580
 
1581
1581
  the nearest scrolling ancestor is `.sf-insp-body` (`overflow-y: auto`
1582
1582
  above); the Inspector's own `.es-insp` / `.es-insp-rows` carry NO
1583
- overflow, and `SectionTextSuppressProvider` / `FoldHeadingScope` are
1584
- context only and draw no element — so nothing between the wrapper and the
1583
+ overflow, and `SectionTextSuppressProvider` is
1584
+ context only and draws no element — so nothing between the wrapper and the
1585
1585
  scroll box clips it. Checked, not assumed: a sticky that does not stick
1586
1586
  reports nothing at all.
1587
1587
 
@@ -2849,14 +2849,6 @@
2849
2849
  color: var(--sf-text);
2850
2850
  }
2851
2851
 
2852
- /* Checkbox — a literal tick box. The row is easel's SettingsField with the box
2853
- in its `action` slot (label left, box right); the label points at the box, so
2854
- the text is clickable. The box is efficient-shell's `Checkbox` (harness
2855
- UI-24), drawn and focus-ringed by the shell, so no rule here reaches it. */
2856
- .sf-checkbox {
2857
- cursor: pointer;
2858
- }
2859
-
2860
2852
  /* A field group greyed out because a higher-level setting overrides it — e.g. the
2861
2853
  manual ProductPicker (Category + Product) when the Product Grid's Products
2862
2854
  source is set to All wheels / a collection. */
@@ -3841,7 +3833,7 @@ input.sf-list-marking {
3841
3833
  z-index: 1;
3842
3834
  }
3843
3835
 
3844
- /* Site styles › Text: the Accent group (SiteAccentField, GG ruling (b)
3836
+ /* Site styles › Text: the Accent group (SiteAccentField, ruling (b)
3845
3837
  2026-10-16) is easel's `TextStylesGroup`, drawn AFTER the list rather than
3846
3838
  inside it, so easel's own `.es-ts-section + .es-ts-section` gap cannot
3847
3839
  reach it. The same gap, on the panel's rhythm token, so Accent sits under Body
@@ -1 +1 @@
1
- "use client";import{useEffect as u,useState as l}from"react";import{loadEditorSiteSlug as S}from"../lib/editor-site-slug.js";import{editorPreviewHref as d,originIsSiteAmbiguous as g}from"../../format/lib/editor/preview-href.js";import{shopRouteBase as h}from"../../format/lib/web-runtime.js";function E(a){const{pageSlug:m,siteId:t,token:o}=a,[f,i]=l(null),[n,c]=l(null),e=h();u(()=>c(e?new URL(e).hostname:window.location.hostname),[e]),u(()=>{if(!g(n)||!t||!o){i(null);return}let s=!1;return S(o,t).then(p=>{s||i(p)}),()=>{s=!0}},[n,t,o]);const r=d({pageSlug:m,siteSlug:f,hostname:n});return e?`${e}${r}`:r}export{E as usePreviewHref};
1
+ "use client";import{useEffect as l,useState as a}from"react";import{loadEditorSiteSlug as g}from"../lib/editor-site-slug.js";import{editorPreviewHref as S,originIsSiteAmbiguous as h}from"../../format/lib/editor/preview-href.js";import{shopOrigin as d,shopRouteBase as v}from"../../format/lib/web-runtime.js";function I(c){const{pageSlug:f,siteId:e,token:t}=c,[m,n]=a(null),[o,i]=a(null),r=v();l(()=>{try{i(new URL(d()).hostname)}catch{i(null)}},[r]),l(()=>{if(!h(o)||!e||!t){n(null);return}let u=!1;return g(t,e).then(p=>{u||n(p)}),()=>{u=!0}},[o,e,t]);const s=S({pageSlug:f,siteSlug:m,hostname:o});return r?`${r}${s}`:s}export{I as usePreviewHref};
@@ -3,7 +3,7 @@ import type { ShowWhenRule } from "../../../render/lib/document/show-when.js";
3
3
  import { type BoxHover, type CardHover, type PictureHover } from "../../../format/lib/animation/hover.js";
4
4
  export declare function hoverFields(): Record<string, unknown>;
5
5
  export declare function cardHoverFields(resting: CardHover): Record<string, unknown>;
6
- export declare function pictureHoverFields(resting: PictureHover, blockKey?: string): Record<string, unknown>;
6
+ export declare function pictureHoverFields(resting: PictureHover, blockKey?: string, moves?: boolean): Record<string, unknown>;
7
7
  export declare function offerNextPicture<Fields extends Record<string, unknown>>(fields: Fields, data: {
8
8
  props?: Record<string, unknown>;
9
9
  }, params: {