efficient-web-builder 48.3.0 → 49.1.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 (142) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/editor/components/PartSettingsPanel.js +1 -1
  3. package/dist/editor/components/PreviewPartAnchors.d.ts +2 -2
  4. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  5. package/dist/editor/components/SectionTextPartBridge.d.ts +3 -1
  6. package/dist/editor/components/SectionTextPartBridge.js +1 -1
  7. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  8. package/dist/editor/lib/animation/hover-fields.js +1 -1
  9. package/dist/editor/lib/document/add-target.d.ts +1 -1
  10. package/dist/editor/lib/document/add-target.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  14. package/dist/editor/lib/document/card-display-chips.d.ts +2 -1
  15. package/dist/editor/lib/document/card-display-chips.js +1 -1
  16. package/dist/editor/lib/document/mirror-cards-field.d.ts +20 -0
  17. package/dist/editor/lib/document/mirror-cards-field.js +1 -0
  18. package/dist/editor/lib/sections/hero-ticker-to-strip.d.ts +7 -0
  19. package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -0
  20. package/dist/editor/lib/sections/section-dry-run.d.ts +5 -0
  21. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  22. package/dist/format/lib/content/block-align.js +1 -1
  23. package/dist/format/lib/content/box-layout.d.ts +2 -0
  24. package/dist/format/lib/content/box-layout.js +1 -1
  25. package/dist/format/lib/content/box-separator.js +1 -1
  26. package/dist/format/lib/content/box-shape.js +1 -1
  27. package/dist/format/lib/content/button-icon.js +1 -1
  28. package/dist/format/lib/content/card-template.d.ts +2 -0
  29. package/dist/format/lib/content/card-template.js +1 -1
  30. package/dist/format/lib/content/container-gap.d.ts +1 -1
  31. package/dist/format/lib/content/container-gap.js +1 -1
  32. package/dist/format/lib/content/mirror-cards.d.ts +32 -0
  33. package/dist/format/lib/content/mirror-cards.js +1 -0
  34. package/dist/format/lib/content/page-width.d.ts +3 -3
  35. package/dist/format/lib/content/page-width.js +1 -1
  36. package/dist/format/lib/content/part-display.js +1 -1
  37. package/dist/format/lib/content/section-min-height.d.ts +1 -1
  38. package/dist/format/lib/content/section-min-height.js +1 -1
  39. package/dist/format/lib/content/view-lines.d.ts +11 -0
  40. package/dist/format/lib/content/view-lines.js +1 -0
  41. package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +4 -0
  42. package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
  43. package/dist/format/lib/editor-words-catalogue.d.ts +8 -0
  44. package/dist/format/lib/editor-words-catalogue.js +4 -4
  45. package/dist/format/lib/hero-ticker.d.ts +6 -0
  46. package/dist/format/lib/hero-ticker.js +1 -1
  47. package/dist/format/lib/sections/collection-card-text-regions.d.ts +1 -1
  48. package/dist/format/lib/sections/collection-card-text-regions.js +1 -1
  49. package/dist/format/lib/sections/faq-text-regions.js +1 -1
  50. package/dist/format/lib/sections/hero-single-to-hero.d.ts +1 -0
  51. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  52. package/dist/format/lib/sections/section-text-regions.d.ts +1 -0
  53. package/dist/format/lib/sections/section-text-regions.js +1 -1
  54. package/dist/format/lib/sections/text-regions.d.ts +2 -0
  55. package/dist/format/lib/sections/text-regions.js +1 -1
  56. package/dist/format/lib/sections/ticker-style.js +1 -1
  57. package/dist/format/lib/source-rules/heading-ceiling-sweep.js +7 -7
  58. package/dist/format/lib/source-rules/view-breakpoint-names.d.ts +6 -0
  59. package/dist/format/lib/source-rules/view-breakpoint-names.js +4 -0
  60. package/dist/render/components/Banner.js +1 -1
  61. package/dist/render/components/Breadcrumb.js +1 -1
  62. package/dist/render/components/CardRowContext.d.ts +1 -0
  63. package/dist/render/components/CardRowContext.js +1 -1
  64. package/dist/render/components/Cards.js +1 -1
  65. package/dist/render/components/CategoryBar.js +1 -1
  66. package/dist/render/components/ChartSection.js +1 -1
  67. package/dist/render/components/ContactLocations.js +1 -1
  68. package/dist/render/components/DealerFinder.js +1 -1
  69. package/dist/render/components/Divider.js +1 -1
  70. package/dist/render/components/FAQ.js +1 -1
  71. package/dist/render/components/FeaturedCover.js +1 -1
  72. package/dist/render/components/Flex.d.ts +6 -1
  73. package/dist/render/components/Flex.js +1 -1
  74. package/dist/render/components/Footprint.js +1 -1
  75. package/dist/render/components/Heading.js +1 -1
  76. package/dist/render/components/HeroPictures.js +1 -1
  77. package/dist/render/components/HeroSection.d.ts +2 -1
  78. package/dist/render/components/HeroSection.js +1 -1
  79. package/dist/render/components/HeroSingle.js +1 -1
  80. package/dist/render/components/HeroSlide.d.ts +1 -0
  81. package/dist/render/components/HeroSlide.js +1 -1
  82. package/dist/render/components/IntegrationsSection.js +1 -1
  83. package/dist/render/components/IntroBleed.js +1 -1
  84. package/dist/render/components/KeyFeatures.js +1 -1
  85. package/dist/render/components/LocationMap.d.ts +1 -1
  86. package/dist/render/components/LocationMap.js +1 -1
  87. package/dist/render/components/LongRead.js +1 -1
  88. package/dist/render/components/Manifesto.js +1 -1
  89. package/dist/render/components/Masthead.js +1 -1
  90. package/dist/render/components/MirrorContext.d.ts +3 -0
  91. package/dist/render/components/MirrorContext.js +1 -0
  92. package/dist/render/components/MockupSection.js +1 -1
  93. package/dist/render/components/OrderSummary.js +1 -1
  94. package/dist/render/components/ParagraphsA.js +1 -1
  95. package/dist/render/components/PostCard.js +1 -1
  96. package/dist/render/components/ProcessSteps.js +1 -1
  97. package/dist/render/components/Prose.js +1 -1
  98. package/dist/render/components/Reel.js +1 -1
  99. package/dist/render/components/SectionEyebrow.js +1 -1
  100. package/dist/render/components/SectionHeader.d.ts +4 -4
  101. package/dist/render/components/SectionHeader.js +1 -1
  102. package/dist/render/components/Series.js +1 -1
  103. package/dist/render/components/SiteGutterFrame.d.ts +1 -0
  104. package/dist/render/components/SiteGutterFrame.js +1 -1
  105. package/dist/render/components/SpecStrip.js +1 -1
  106. package/dist/render/components/Split.js +1 -1
  107. package/dist/render/components/Stats.js +1 -1
  108. package/dist/render/components/StatsParagraph.js +1 -1
  109. package/dist/render/components/Testimonials.js +1 -1
  110. package/dist/render/components/Text.d.ts +2 -1
  111. package/dist/render/components/Text.js +1 -1
  112. package/dist/render/components/TextRegionRun.d.ts +7 -0
  113. package/dist/render/components/TextRegionRun.js +1 -0
  114. package/dist/render/components/Ticker.js +1 -1
  115. package/dist/render/components/TickerSection.js +1 -1
  116. package/dist/render/components/Timeline.js +1 -1
  117. package/dist/render/components/TimelineRail.d.ts +4 -4
  118. package/dist/render/components/TimelineRail.js +1 -1
  119. package/dist/render/components/TimelineTrack.js +1 -1
  120. package/dist/render/components/TitleWithButtons.js +1 -1
  121. package/dist/render/lib/animation/LoopTrack.d.ts +2 -2
  122. package/dist/render/lib/animation/LoopTrack.js +1 -1
  123. package/dist/render/lib/content/block-size.js +1 -1
  124. package/dist/render/lib/content/box-shared-columns.d.ts +31 -0
  125. package/dist/render/lib/content/box-shared-columns.js +1 -0
  126. package/dist/render/lib/content/section-edge.js +1 -1
  127. package/dist/render/lib/content/view-values.d.ts +2 -1
  128. package/dist/render/lib/content/view-values.js +1 -1
  129. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  130. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  131. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  132. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  133. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  134. package/dist/render/lib/document/editing-bridges.d.ts +2 -0
  135. package/dist/render/lib/document/part-styles.d.ts +26 -0
  136. package/dist/render/lib/document/part-styles.js +2 -2
  137. package/dist/render/lib/document/passes/section-width.d.ts +2 -2
  138. package/dist/render/lib/document/passes/section-width.js +1 -1
  139. package/dist/render/lib/document/slot-specs.d.ts +3 -0
  140. package/dist/render/lib/document/slot-specs.js +1 -1
  141. package/dist/render/lib/sections/section-to-box.js +1 -1
  142. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # Changelog
2
2
 
3
+ ## 49.1.0 - 2026-11-04
4
+
5
+ From main at `83fe5162`: #471, #476, #477, #486, #488. A minor: exports are added, no export is removed, and the peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: Row columns (`sharedColumns`) and Mirror cards (`mirrorCards`) are new settings, and nothing seeds them; a sized text region stores under the existing `_partStyles` keys.
6
+
7
+ ### Added
8
+
9
+ - **A host's data-drawn text takes a style and a size** (#471): a host registers its own text regions with `registerSectionTextRegions(tables)`, and a region with the new `sized` flag gets the Style list and the Font size cell (desktop and phone) in its part panel. Values are stored in `_partStyles["@<kind>"]` (`textStyle`, `size`, `sizePhone`); an old stored `role` draws as before. Exports: `registerSectionTextRegions`, `regionTakesSize`, `regionHasOwnLook`, `regionSheetStyle`, `regionShownDeclarations`, `regionCanvasDeclarations`, `regionCanvasRestore`, `partShownDeclarations`, `partCanvasDeclarations`, `partStyleWithoutSizeBox`, `storedPartStyle`, `ShownDeclarations`.
10
+ - **Mirror cards** (#476): on the card Box of a card template, every second card draws the other way round. Stored key `mirrorCards`: `"even"` mirrors cards 2, 4, 6; `"odd"` mirrors cards 1, 3, 5; absent draws the same bytes as before; Off removes the key. Exports: `MirrorCards`, `MirrorCardsBox`, `MirrorContext`, `MIRROR_CARDS_FACTS`, `MIRROR_CARDS_IDLE`, `MIRROR_CARDS_LABEL`, `MIRROR_CARDS_OFF`, `MIRROR_CARDS_OPTIONS`, `MIRROR_CARDS_TITLES`, `MIRROR_ROW_CLASS`, `mirrorCardsActs`, `mirrorCardsField`, `mirrorCardsOf`, `mirrorCardsOptions`, `mirrorCardsWrite`, `mirroredBoxClass`, `mirroredTextClasses`, `isMirroredCopy`, `useMirroredCopy`, `useUnderCardBox`, `ownsCard`, `CardCopyPlace`, `cardCopyPlace`.
11
+ - **A card template's row copies can share content-sized columns** (#477, decision D1 option B): Box setting **Row columns** (`sharedColumns`: `own` "Each row", the default, or `shared`) and its own phone key `sharedColumnsPhone` (`own` or `scroll` "Shared, scroll"). It shows only on a one-row Box that is the card of a card template. Exports: `SHARED_COLUMNS_KEY`, `SHARED_COLUMNS_LABEL`, `SHARED_COLUMNS_OFF`, `SHARED_COLUMNS_POINTS`, `SHARED_COLUMNS_PHONE_POINTS`, `SHARED_PLAIN_ATTR`, `sharedColumnsClasses`, `sharedColumnsCss`, `sharedColumnsDrawn`, `sharedColumnsFits`, `BOX_ALIGN_CLASS`, `useInsideSiteGutter`; `ON_A_CARD` is now exported. Known: the editor canvas draws shared columns with other widths than the published page (follow-up).
12
+
13
+ ### Fixed
14
+
15
+ - **The Row columns row is drawn in the Box panel** (#488). Before, the panel dropped it, so a merchant never saw #477's setting. The same fix draws a nested Box's **Gutter** on a Full width site and a top-level Hero group's **Placement**. A guard keeps a row with a block-fact show-when rule in the panel.
16
+ - **The Hover heading hides with its rows in the Phone view** (#486): one `hoverHeading()` makes it a desktop heading on every card section and text part.
17
+
18
+ ## 49.0.0 - 2026-11-04
19
+
20
+ From main at `7b0b29e8`: #479, #482, #484. A major because of #479: every class at a view line now uses the line's name from the host's site sheet. No export is removed, and the peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: the Hero strip converter (`heroTickerToStrip`) is not run by this package.
21
+
22
+ **BREAKING for hosts (#479):** the classes need a host sheet that defines `--breakpoint-view-wide`, `--breakpoint-view-tablet` and `--breakpoint-view-desktop`. That is storefront-blocks 0.80.0 or later (#343). A host whose sheet lacks them compiles these classes to nothing. Install this release in the same change as the host's own rename (storefront-blocks step 4), so no element mixes a named line and a numbered line.
23
+
24
+ | class before | class now | compiles to |
25
+ |---|---|---|
26
+ | `max-[800px]:` | `max-view-wide:` | `width < 800px` |
27
+ | `min-[800px]:` | `view-wide:` | `width >= 800px` |
28
+ | `max-[1100px]:` | `max-view-desktop:` | `width < 1100px` |
29
+ | `min-[720px]:` | `view-tablet:` | `width >= 720px` |
30
+ | `max-[720px]:` | `max-view-tablet:` | `width < 720px` |
31
+
32
+ ### Changed
33
+
34
+ - **BREAKING: view-line classes are written by name** (#479). About 440 class prefixes in 73 files. The near lines `max-[719px]:`, `min-[801px]:` and `min-[1101px]:` stay as they are. The one reader of a view line (`heading-ceiling-sweep` `widestViewport()`) reads the names.
35
+ - **The Hero's Scrolling Bar is a real Box in a new `strip` slot** (#482), at most one. Stored Heroes draw as today until the CLI moves them. A new Hero has an empty strip. The strip words use the one on-media ink (76%, was 70%).
36
+ - **A clicked slide video stops when the shopper leaves the slide** (#484).
37
+
38
+ ### Added
39
+
40
+ - `lib/content/view-lines`: the one table of view-line widths for code that reads a class (`VIEW_LINE_PX`, `breakpointOf`, `ViewLine`). `RESPONSIVE_RULES` moves here; `lib/content/view-values` still re-exports it (#479).
41
+ - `lib/source-rules/view-breakpoint-names` (`viewBreakpointNames`, `ViewBreakpointNamesOptions`): no class writes 720, 800 or 1100 as a `min-` / `max-` view line (#479).
42
+ - Hero strip: `HERO_STRIP_SLOT`, `HERO_STRIP_CAP`, `HERO_STRIP_SPEC`, `SLOT_SECTION_EXTRA_SPECS`, `heroTickerToStrip`, `HeroTickerConversion`, `heroStoresLegacyTicker`, `legacyTickerDrawn`, `legacyTickerWords`, `HERO_MOVES`, `HERO_SECTION_PASS_KEYS` (#482).
43
+
3
44
  ## 48.3.0 - 2026-11-04
4
45
 
5
46
  From main at `ee1edea1`: #469, #475, #478, #480. A minor: exports are added, no export is removed, peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: nothing is seeded, and the single Hero converter (`heroSingleToHero`) is not run by this package.
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as A,jsxs as m}from"react/jsx-runtime";import{useContext as lt,useEffect as ie,useRef as st,useState as Ce}from"react";import{FieldSelect as rt,InspectorField as it,fieldShownInView as at}from"efficient-easel/fields";import{SettingsField as ct}from"efficient-easel/panel";import{InspectorUpLevel as G}from"efficient-easel/chrome";import{StylesIcon as dt,TypeIcon as ut}from"efficient-easel/icons";import{useEasel as ft}from"efficient-easel/easel";import{TextPartPanel as pt}from"efficient-easel/copy";import{Button as mt,IconButton as ht,Tooltip as yt}from"efficient-shell/ui";import{PartTextBox as St,partTextCells as gt}from"./PartTextBox.js";import{SiteFields as Ee}from"./SiteFields.js";import{usePartMotion as xt}from"./usePartMotion.js";import{UiIcon as Ie}from"efficient-easel/draw/client";import{usePreviewHeader as bt}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as Pt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as vt}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as wt,partStyleToTextStyleValues as Tt,pushIntoStyle as Nt,resolveTextStyles as Ot,styleIdOfRole as Rt}from"../../render/lib/text-styles/site-text-styles.js";import{useSiteTextStylesWriter as kt}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as Ct}from"../lib/theme-row-persist.js";import{usePreviewDevice as Et}from"efficient-easel/draw/client";import{shownTier as ae}from"efficient-easel/screen/lib/document/device-fields";import{PART_PANEL_ROWS as Fe}from"../lib/document/part-panel-rows.js";import{usePartStyle as It}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as H,textFieldOffPage as Ft,textFieldPanelOnly as _t}from"../lib/document/controls.js";import{TEXT_FIELD_MARKER as zt}from"efficient-easel/draw";import{useSectionOps as Vt}from"efficient-easel/screen/lib/document/use-section-ops";import{FONT_OPTIONS as At,FONT_ROLES as Lt,FONT_ROLE_LABELS as _e,fontOption as ce,fontRoleOf as Bt}from"../../format/lib/fonts.js";import{isMultilineKind as Kt,partPlaceholder as Ut,typeInPlaceKind as Wt}from"../../render/lib/document/part-text.js";import{partRowField as Dt}from"../lib/document/part-row-field.js";import{decodePartKey as jt,partPropsWithRowValue as Gt,partRowValue as Ht}from"../../render/lib/document/part-rows.js";import{followedStyleOf as Mt,propsWithPartStyleValue as L,propsWithoutPartStyle as $t,readPartStyle as ze}from"../../render/lib/document/part-styles.js";import{partThemeColors as Xt}from"../../format/lib/document/part-inks.js";import{styleKeyForPart as Ve}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as Yt}from"../lib/document/part-typing.js";import{keysOnCanvas as qt,useCanvasTypingPart as Jt}from"../lib/document/canvas-typing.js";import{useEaselHost as Qt}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as Zt,SOURCE_ACTIONS as en,SOURCE_ACTION_LABEL as tn,partSourceNoteFor as nn,partSourceOf as on,sourceMenuIdOf as ln,sourceSlugOf as Ae}from"../../format/lib/document/source-bound-parts.js";import{encodePartId as sn,holdsAuthoredText as rn}from"../../render/lib/document/text-parts.js";import{regionsForSection as an}from"../../format/lib/sections/section-text-regions.js";import{textRegionOfPartKey as cn}from"../../format/lib/sections/text-regions.js";import{SameInEveryViewNote as Le}from"./SameInEveryViewNote.js";function de(t){return t?l(t):null}function Be(t){return t.kind==="role"?_e[t.role]:t.kind==="custom"?"Custom":null}function dn(t){const o=Bt(t.role);return o?{kind:"role",role:o}:null}function un(t,o){if(!t)return{kind:"unread"};const{faceRole:r,base:i}=t;if(o[r]===i.fontKey)return{kind:"role",role:r};const c=Object.keys(o).filter(s=>o[s]===i.fontKey);return c.length===1?{kind:"role",role:c[0]}:{kind:"custom"}}function ue(t,o,r,i){return dn(ze(t,o))??un(r,i)}function fn(t,o){if(!t.length)return null;const r=o(t[0]);return t.every(i=>o(i)===r)?r:null}const M="";function pn({face:t,base:o,onPick:r}){const i=t.kind==="role"?t.role:M,c=[{label:l("No style"),value:M},...Lt.map(s=>({label:l(_e[s]),value:s}))];return n(rt,{ariaLabel:l("Style"),value:i,options:c,inline:!0,onChange:s=>r(s===M?null:s),renderOption:s=>s.value===M?m(A,{children:[n("span",{className:"es-fsel-label sf-part-style-keep",children:s.label}),n("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section’s own")})]}):n("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${s.value})`},children:s.label}),renderValue:()=>n("span",{style:{fontFamily:o?.fontKey?`var(${ce(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:de(Be(t))}),valueText:s=>de(Be(t))??s?.label??""})}const Ke=["regionNote","regionStyle"],mn=Object.keys(Fe).filter(t=>!Ke.includes(t));function Ue(t,o){return!t.some(o)}function hn({sectionName:t,onBack:o,textEditor:r,styleRow:i,children:c,tabs:s}){const O=m(A,{children:[r,i,c]});return m("div",{className:"sf-part-panel",children:[n(G,{inline:!0,name:l(t),onSelect:o}),s?s(O):O]})}function We({source:t,slug:o,menuId:r}){const i=Qt(),c=en[t],s=!c.needsSlug||!!o;return n("div",{className:"sf-note sf-note--source",children:m("p",{className:"es-field-hint sf-hint-keep",children:[l(Zt[t]),s?m(A,{children:[" ",n(mt,{type:"button",variant:"link",size:"sm",onClick:()=>{c.type==="storefront-editor:open-menus"?i.send(c.type,{menuId:r??null}):o&&i.send(c.type,{slug:o})},children:l(tn)})]}):null]})})}const De=4,yn=120;function Sn({region:t,sizePx:o,face:r,base:i,onFollowStyle:c,source:s,slug:O,onBack:R,shows:w}){const T=t.follows;return m("div",{className:"sf-note",children:[w("regionNote")&&m(A,{children:[n("p",{children:n("strong",{children:l(t.label)})}),n("p",{children:o?l("Its size follows Styles ▸ {follows} — {px}px right now.",{follows:l(T),px:Math.round(o)}):l("Its size follows Styles ▸ {follows}.",{follows:l(T)})})]}),c?w("regionStyle")?n(A,{children:n(ct,{label:l("Style"),icon:n(dt,{}),hint: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()}),children:n(pn,{face:r,base:i,onPick:c})})}):null:w("regionNote")&&n("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),s&&w("sourceNote")?n(We,{source:s,slug:O}):null,Ue([...Ke,"sourceNote"],k=>w(k)&&(k!=="sourceNote"||!!s))&&n(Le,{}),n(G,{inline:!0,name:l("Page"),onSelect:R})]})}function gn({onBack:t}){return m("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part is no longer here.")})}),n("p",{children:l("The section it belonged to has been changed or removed.")}),n(G,{inline:!0,name:l("Page"),onSelect:t})]})}function xn({onBack:t,partId:o,why:r}){return m("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part's settings did not open.")})}),n("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.")}),n("p",{className:"sf-note-detail",children:m("code",{children:[o," — ",r]})}),n(G,{inline:!0,name:l("Page"),onSelect:t})]})}function bn({nodeId:t,propKey:o,onBack:r,onEditStyle:i}){const{getItemById:c,getSelectorForId:s,config:O}=ft(e=>e),R=Vt(),w=Jt(),{partStyle:T}=It(),{fonts:k,textStyles:je}=bt(),$=lt(vt),fe=!$?.capabilities?.hasSiteTheme,{persist:Ge}=Ct({themeFromDocument:fe,tokenRef:$?.tokenRef,siteId:$?.siteId??null}),V=kt({themeFromDocument:fe,persist:Ge}),[He,X]=Ce(!1),B=Et(),h=e=>ae(B)!=="tablet"&&at(Fe[e],B),pe=st(null),d=c(t),y=s(t),me=d?O.components[d.type]:void 0,{key:x,row:b}=jt(o),he=me?.fields?.[x],S=b?Dt(he,b):he,C=sn(t,o),p=d?.props??{},P=Wt(S),ye=Ft(S),Se=rn(S),Me=d?on(d.type):null,Y=d?nn(d.type,x):null,q=b?Ht(p[x],b):p[x],ge=!!b&&!(Array.isArray(p[x])&&b.index<p[x].length);ie(()=>{if(qt(document))return;pe.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[C]);const[J,xe]=Ce(0);ie(()=>xe(0),[C]);const Q=!!d&&!ge&&(!y||!S);ie(()=>{if(!Q||J>=De)return;const e=setTimeout(()=>xe(a=>a+1),yn);return()=>clearTimeout(e)},[Q,J]);const $e=Q&&J<De,be=xt(t,Ve(d?.type,o),"textPart");if(!d||ge)return n(gn,{onBack:r});const K=an(d.type),Pe=K?cn(K,o):null;if(K&&Pe){const e=T?.partId===C?T:null,a=K[Pe],f=a.writable===!0&&!!y,v=re=>{y&&R.replaceComponent(y.zone,y.index,{...d,props:L(p,o,"role",re)})};return n(Ee,{motion:be,body:n(Sn,{region:a,sizePx:e?.base.sizePx??null,face:ue(p,o,e,k),base:e?.base??null,onFollowStyle:f?v:void 0,source:Me,slug:Ae(p),onBack:r,shows:h})})}if(!y||!S)return $e?n("div",{className:"sf-note","aria-busy":"true"}):n(xn,{onBack:r,partId:C,why:y?"no field":"no selector"});const ve=e=>{R.replaceComponent(y.zone,y.index,{...d,props:e})},Z=e=>{if(H(e).hidden!==H(q).hidden||!P){const f=b?Gt(p,x,b,e):{...p,[x]:e};f&&ve(f);return}Yt({node:d,propKey:o,kind:P,zone:y.zone,index:y.index},H(e).text,R.replaceComponent)},Xe=q,E=T?.partId===C?T:null,I=E?.styleOwner,U=I?c(I.owner):null,ee=I&&U?s(I.owner):null,te=!!(I&&U&&ee),F=te?U.props??{}:p,ne=te?e=>R.replaceComponent(ee.zone,ee.index,{...U,props:e}):ve,W=te?I.kind:Ve(d?.type,o),g=ze(F,W),u=[{partKey:W,face:ue(F,W,E,k),sizeGroup:E?.sizeGroup??null,base:E?.base??vn,style:g}],we=fn(u,e=>e.sizeGroup),Ye=Xt(E?.inks),_=(e,a)=>{let f=F;for(const v of u)f=L(f,v.partKey,e,a);ne(f)},qe=e=>e?_("textStyle",e):oe({textStyle:null,role:null}),oe=e=>{let a=F;for(const f of u)for(const[v,re]of Object.entries(e))a=L(a,f.partKey,v,re??null);ne(a)},le=P==="text"||P==="textarea",{text:Te,hidden:z}=H(q),D=S?.[zt]?.label??o,Ne=z?l("Show {label} on the slide",{label:l(D)}):l("Hide {label} on the slide",{label:l(D)}),Oe=m("div",{className:"sf-field-head",children:[n(ut,{}),n("span",{className:"sf-field-label sf-field-label--inline",children:l(D)}),le&&n(yt,{content:Ne,children:n(ht,{"aria-pressed":z,"aria-label":Ne,onClick:()=>Z({text:Te,hidden:!z}),children:z?n(Ie,{name:"eye-off",size:14}):n(Ie,{name:"eye",size:14})})})]}),j=!ye&&Se,Je=!!P&&(_t(S)||ye||z||!Se),Re=ue(F,W,E,k),Qe=Re.kind==="role"?Re.role:null,se=Mt(g)??Rt(Qe),ke=Ot(V.saved,V.old),Ze=Object.entries(g).filter(([e,a])=>e!=="role"&&e!=="textStyle"&&a!==void 0).length,et=()=>{let e=F;for(const a of u){const{role:f,textStyle:v}=a.style;e=$t(e,a.partKey),f&&(e=L(e,a.partKey,"role",f)),v&&(e=L(e,a.partKey,"textStyle",v))}ne(e)},N=se,tt=wt(u[0].style),nt=N?ke.find(e=>e.id===N)?.name??N:"",ot=()=>{X(!1),N&&(V.write(Nt({saved:V.saved,old:V.old,styleId:N,values:Tt(u[0].style)}),!0),et())};return m(hn,{sectionName:me?.label??d.type,onBack:r,tabs:e=>n(Ee,{motion:be,body:e}),textEditor:h("words")?n("div",{ref:pe,className:"sf-part-text",children:Je?n(St,{text:Te,onTextChange:e=>Z(le?{text:e,hidden:z}:e),multiline:Kt(P),markup:P!=="plainText",styled:!1,style:u[0].style,base:u[0].base,setValue:oe,colors:Ye,placeholder:de(Ut(S))??void 0,ariaLabel:l(D),head:Oe,typedOnCanvas:w===C}):P?le?Oe:null:n(it,{field:S,name:o,value:Xe,onChange:Z,id:`sf-part-${t}-${o}`})}):void 0,children:[Y&&h("sourceNote")&&n(We,{source:Y,slug:Ae(p),menuId:ln(p)}),j&&n(pt,{style:h("style")?{value:se??"",options:[{value:"",label:l("No style"),description:l("Section’s own")},...ke.map(e=>({value:e.id,label:e.name,description:e.values.font?ce(e.values.font)?.label:void 0}))],onChange:e=>qe(e||null),changed:Ze>0,onEditStyles:i,onUpdateStyle:N&&tt?()=>X(!0):void 0}:void 0,font:h("font")?{value:g.font??"",styleValue:ce(u[0].base.fontKey)?.label,options:At.map(e=>({label:e.label,value:e.key})),onChange:e=>_("font",e||null)}:void 0,italic:h("italic")?{value:g.italic,styleValue:Pn(je,se),onChange:e=>_("italic",e??null)}:void 0,cells:gt(u[0].style,u[0].base,oe,ae(B)).filter(e=>h(e.key)),align:h("align")?ae(B)==="mobile"?{value:g.alignPhone??"",styleValue:g.align??u[0].base.align,onChange:e=>_("alignPhone",e||null)}:{value:g.align??"",styleValue:u[0].base.align,onChange:e=>_("align",e||null)}:void 0,letterCase:h("letterCase")?{value:g.case??"",styleValue:u[0].base.case,onChange:e=>_("case",e||null)}:void 0}),He&&N&&n(Pt,{styleName:nt,onCancel:()=>X(!1),onConfirm:ot}),j&&we===null&&h("fixedSizeHint")&&n("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size — the site’s Text setting doesn’t resize this.")}),Ue(mn,e=>h(e)&&(e==="words"||(e==="sourceNote"?!!Y:e==="fixedSizeHint"?j&&we===null:j)))&&n(Le,{})]})}function Pn(t,o){return!o||!Array.isArray(t)?!1:t.find(i=>i?.id===o)?.values?.italic===!0}const vn={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};export{hn as PartPanelBody,We as PartSourceNote,pn as PartStyleSelect,bn as default,ue as partFace};
1
+ "use client";import{jsx as n,Fragment as H,jsxs as y}from"react/jsx-runtime";import{useContext as bt,useEffect as pe,useRef as Pt,useState as Le}from"react";import{FieldSelect as wt,InspectorField as vt,fieldShownInView as Tt}from"efficient-easel/fields";import{SettingsField as Nt}from"efficient-easel/panel";import{InspectorUpLevel as Y}from"efficient-easel/chrome";import{StylesIcon as kt,TypeIcon as Ot}from"efficient-easel/icons";import{useEasel as Ct}from"efficient-easel/easel";import{TextPartPanel as Be}from"efficient-easel/copy";import{Button as Rt,IconButton as Et,Tooltip as It}from"efficient-shell/ui";import{PartTextBox as zt,partTextCells as Ue}from"./PartTextBox.js";import{SiteFields as me}from"./SiteFields.js";import{usePartMotion as Ft}from"./usePartMotion.js";import{UiIcon as We}from"efficient-easel/draw/client";import{usePreviewHeader as _t}from"../../render/components/PreviewHeaderContext.js";import{UpdateStyleDialog as Vt}from"./UpdateStyleDialog.js";import{ScreenDocumentContext as At}from"efficient-easel/screen/components/ScreenDocumentContext";import{hasStyleChange as Lt,partStyleToTextStyleValues as Bt,pushIntoStyle as Ut,resolveTextStyles as He,styleIdOfRole as Wt}from"../../render/lib/text-styles/site-text-styles.js";import{useSiteTextStylesWriter as Ht}from"../lib/site-text-styles-writer.js";import{useThemeRowPersist as jt}from"../lib/theme-row-persist.js";import{usePreviewDevice as Dt}from"efficient-easel/draw/client";import{shownTier as q}from"efficient-easel/screen/lib/document/device-fields";import{PART_PANEL_ROWS as je}from"../lib/document/part-panel-rows.js";import{usePartStyle as Gt}from"./PreviewPartStyleContext.js";import{say as l}from"../../format/lib/editor-words.js";import{readHidable as J,textFieldOffPage as Kt,textFieldPanelOnly as Mt}from"../lib/document/controls.js";import{TEXT_FIELD_MARKER as $t}from"efficient-easel/draw";import{useSectionOps as Xt}from"efficient-easel/screen/lib/document/use-section-ops";import{FONT_OPTIONS as Yt,FONT_ROLES as qt,FONT_ROLE_LABELS as De,fontOption as he,fontRoleOf as Jt}from"../../format/lib/fonts.js";import{isMultilineKind as Qt,partPlaceholder as Zt,typeInPlaceKind as en}from"../../render/lib/document/part-text.js";import{partRowField as tn}from"../lib/document/part-row-field.js";import{decodePartKey as nn,partPropsWithRowValue as on,partRowValue as ln}from"../../render/lib/document/part-rows.js";import{followedStyleOf as Ge,propsWithPartStyleValue as U,propsWithoutPartStyle as sn,readPartStyle as ye,regionHasOwnLook as rn}from"../../render/lib/document/part-styles.js";import{partThemeColors as an}from"../../format/lib/document/part-inks.js";import{styleKeyForPart as Ke}from"../../format/lib/sections/section-text-kinds.js";import{commitPartText as cn}from"../lib/document/part-typing.js";import{keysOnCanvas as dn,useCanvasTypingPart as un}from"../lib/document/canvas-typing.js";import{useEaselHost as fn}from"efficient-easel/screen/lib/host";import{SOURCE_LINES as pn,SOURCE_ACTIONS as mn,SOURCE_ACTION_LABEL as hn,partSourceNoteFor as yn,partSourceOf as gn,sourceMenuIdOf as Sn,sourceSlugOf as ge}from"../../format/lib/document/source-bound-parts.js";import{encodePartId as xn,holdsAuthoredText as bn}from"../../render/lib/document/text-parts.js";import{regionsForSection as Pn}from"../../format/lib/sections/section-text-regions.js";import{regionTakesSize as wn,textRegionOfPartKey as vn}from"../../format/lib/sections/text-regions.js";import{SameInEveryViewNote as Me}from"./SameInEveryViewNote.js";function Se(t){return t?l(t):null}function $e(t){return t.kind==="role"?De[t.role]:t.kind==="custom"?"Custom":null}function Tn(t){const o=Jt(t.role);return o?{kind:"role",role:o}:null}function Nn(t,o){if(!t)return{kind:"unread"};const{faceRole:r,base:i}=t;if(o[r]===i.fontKey)return{kind:"role",role:r};const c=Object.keys(o).filter(s=>o[s]===i.fontKey);return c.length===1?{kind:"role",role:c[0]}:{kind:"custom"}}function Q(t,o,r,i){return Tn(ye(t,o))??Nn(r,i)}function kn(t,o){if(!t.length)return null;const r=o(t[0]);return t.every(i=>o(i)===r)?r:null}function Xe(t){return[{value:j,label:l("No style"),description:l("Section’s own")},...t.map(o=>({value:o.id,label:o.name,description:o.values.font?he(o.values.font)?.label:void 0}))]}const j="";function On({face:t,base:o,onPick:r}){const i=t.kind==="role"?t.role:j,c=[{label:l("No style"),value:j},...qt.map(s=>({label:l(De[s]),value:s}))];return n(wt,{ariaLabel:l("Style"),value:i,options:c,inline:!0,onChange:s=>r(s===j?null:s),renderOption:s=>s.value===j?y(H,{children:[n("span",{className:"es-fsel-label sf-part-style-keep",children:s.label}),n("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section’s own")})]}):n("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${s.value})`},children:s.label}),renderValue:()=>n("span",{style:{fontFamily:o?.fontKey?`var(${he(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Se($e(t))}),valueText:s=>Se($e(t))??s?.label??""})}const Ye=["regionNote","regionStyle"],Cn=Object.keys(je).filter(t=>!Ye.includes(t));function qe(t,o){return!t.some(o)}function Rn({sectionName:t,onBack:o,textEditor:r,styleRow:i,children:c,tabs:s}){const E=y(H,{children:[r,i,c]});return y("div",{className:"sf-part-panel",children:[n(Y,{inline:!0,name:l(t),onSelect:o}),s?s(E):E]})}function Je({source:t,slug:o,menuId:r}){const i=fn(),c=mn[t],s=!c.needsSlug||!!o;return n("div",{className:"sf-note sf-note--source",children:y("p",{className:"es-field-hint sf-hint-keep",children:[l(pn[t]),s?y(H,{children:[" ",n(Rt,{type:"button",variant:"link",size:"sm",onClick:()=>{c.type==="storefront-editor:open-menus"?i.send(c.type,{menuId:r??null}):o&&i.send(c.type,{slug:o})},children:l(hn)})]}):null]})})}const Qe=4,En=120;function Ze(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 et({region:t,sizePx:o,face:r,base:i,onFollowStyle:c,source:s,slug:E,onBack:N,shows:x,sizedStyle:b,ownLook:I}){const D=t.follows;return y("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l(t.label)})}),x("regionNote")&&!I&&n("p",{children:o?l("Its size follows Styles ▸ {follows} — {px}px right now.",{follows:l(D),px:Math.round(o)}):l("Its size follows Styles ▸ {follows}.",{follows:l(D)})}),b?y(H,{children:[b,x("regionStyle")&&n("p",{className:"es-field-hint sf-hint-keep",children:Ze(t)})]}):c?x("regionStyle")?n(H,{children:n(Nt,{label:l("Style"),icon:n(kt,{}),hint:Ze(t),children:n(On,{face:r,base:i,onPick:c})})}):null:x("regionNote")&&n("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),s&&x("sourceNote")?n(Je,{source:s,slug:E}):null,qe([...Ye,"sourceNote",...b?["fontSize"]:[]],z=>x(z)&&(z!=="sourceNote"||!!s))&&n(Me,{}),n(Y,{inline:!0,name:l("Page"),onSelect:N})]})}function In({onBack:t}){return y("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part is no longer here.")})}),n("p",{children:l("The section it belonged to has been changed or removed.")}),n(Y,{inline:!0,name:l("Page"),onSelect:t})]})}function zn({onBack:t,partId:o,why:r}){return y("div",{className:"sf-note",children:[n("p",{children:n("strong",{children:l("This part's settings did not open.")})}),n("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.")}),n("p",{className:"sf-note-detail",children:y("code",{children:[o," — ",r]})}),n(Y,{inline:!0,name:l("Page"),onSelect:t})]})}function Fn({nodeId:t,propKey:o,onBack:r,onEditStyle:i}){const{getItemById:c,getSelectorForId:s,config:E}=Ct(e=>e),N=Xt(),x=un(),{partStyle:b}=Gt(),{fonts:I,textStyles:D}=_t(),z=bt(At),xe=!z?.capabilities?.hasSiteTheme,{persist:nt}=jt({themeFromDocument:xe,tokenRef:z?.tokenRef,siteId:z?.siteId??null}),k=Ht({themeFromDocument:xe,persist:nt}),[ot,Z]=Le(!1),W=Dt(),f=e=>q(W)!=="tablet"&&Tt(je[e],W),be=Pt(null),d=c(t),p=s(t),Pe=d?E.components[d.type]:void 0,{key:P,row:w}=nn(o),we=Pe?.fields?.[P],g=w?tn(we,w):we,F=xn(t,o),u=d?.props??{},v=en(g),ve=Kt(g),Te=bn(g),Ne=d?gn(d.type):null,ee=d?yn(d.type,P):null,te=w?ln(u[P],w):u[P],ke=!!w&&!(Array.isArray(u[P])&&w.index<u[P].length);pe(()=>{if(dn(document))return;be.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[F]);const[ne,Oe]=Le(0);pe(()=>Oe(0),[F]);const oe=!!d&&!ke&&(!p||!g);pe(()=>{if(!oe||ne>=Qe)return;const e=setTimeout(()=>Oe(a=>a+1),En);return()=>clearTimeout(e)},[oe,ne]);const lt=oe&&ne<Qe,le=Ft(t,Ke(d?.type,o),"textPart");if(!d||ke)return n(In,{onBack:r});const G=Pn(d.type),Ce=G?vn(G,o):null;if(G&&Ce){const e=b?.partId===F?b:null,a=G[Ce],h=a.writable===!0&&!!p,T=C=>{p&&N.replaceComponent(p.zone,p.index,{...d,props:U(u,o,"role",C)})};if(h&&wn(a)){const C=ye(u,o),Ae=R=>{if(!p)return;let fe=u;for(const[St,xt]of Object.entries(R))fe=U(fe,o,St,xt??null);N.replaceComponent(p.zone,p.index,{...d,props:fe})},ht=He(k.saved,k.old),yt=Ge(C)??"",gt=Ue(C,e?.base??tt,Ae,q(W)).filter(R=>R.key==="fontSize"&&f(R.key));return n(me,{motion:le,body:n(et,{region:a,sizePx:e?.base.sizePx??null,face:Q(u,o,e,I),base:e?.base??null,source:Ne,slug:ge(u),onBack:r,shows:f,ownLook:rn(C),sizedStyle:n(Be,{style:f("style")?{value:yt,options:Xe(ht),onChange:R=>Ae(R?{textStyle:R}:{textStyle:null,role:null}),onEditStyles:i}:void 0,cells:gt})})})}return n(me,{motion:le,body:n(et,{region:a,sizePx:e?.base.sizePx??null,face:Q(u,o,e,I),base:e?.base??null,onFollowStyle:h?T:void 0,source:Ne,slug:ge(u),onBack:r,shows:f})})}if(!p||!g)return lt?n("div",{className:"sf-note","aria-busy":"true"}):n(zn,{onBack:r,partId:F,why:p?"no field":"no selector"});const Re=e=>{N.replaceComponent(p.zone,p.index,{...d,props:e})},se=e=>{if(J(e).hidden!==J(te).hidden||!v){const h=w?on(u,P,w,e):{...u,[P]:e};h&&Re(h);return}cn({node:d,propKey:o,kind:v,zone:p.zone,index:p.index},J(e).text,N.replaceComponent)},st=te,_=b?.partId===F?b:null,V=_?.styleOwner,K=V?c(V.owner):null,re=V&&K?s(V.owner):null,ie=!!(V&&K&&re),A=ie?K.props??{}:u,ae=ie?e=>N.replaceComponent(re.zone,re.index,{...K,props:e}):Re,M=ie?V.kind:Ke(d?.type,o),S=ye(A,M),m=[{partKey:M,face:Q(A,M,_,I),sizeGroup:_?.sizeGroup??null,base:_?.base??tt,style:S}],Ee=kn(m,e=>e.sizeGroup),rt=an(_?.inks),L=(e,a)=>{let h=A;for(const T of m)h=U(h,T.partKey,e,a);ae(h)},it=e=>e?L("textStyle",e):ce({textStyle:null,role:null}),ce=e=>{let a=A;for(const h of m)for(const[T,C]of Object.entries(e))a=U(a,h.partKey,T,C??null);ae(a)},de=v==="text"||v==="textarea",{text:Ie,hidden:B}=J(te),$=g?.[$t]?.label??o,ze=B?l("Show {label} on the slide",{label:l($)}):l("Hide {label} on the slide",{label:l($)}),Fe=y("div",{className:"sf-field-head",children:[n(Ot,{}),n("span",{className:"sf-field-label sf-field-label--inline",children:l($)}),de&&n(It,{content:ze,children:n(Et,{"aria-pressed":B,"aria-label":ze,onClick:()=>se({text:Ie,hidden:!B}),children:B?n(We,{name:"eye-off",size:14}):n(We,{name:"eye",size:14})})})]}),X=!ve&&Te,at=!!v&&(Mt(g)||ve||B||!Te),_e=Q(A,M,_,I),ct=_e.kind==="role"?_e.role:null,ue=Ge(S)??Wt(ct),Ve=He(k.saved,k.old),dt=Object.entries(S).filter(([e,a])=>e!=="role"&&e!=="textStyle"&&a!==void 0).length,ut=()=>{let e=A;for(const a of m){const{role:h,textStyle:T}=a.style;e=sn(e,a.partKey),h&&(e=U(e,a.partKey,"role",h)),T&&(e=U(e,a.partKey,"textStyle",T))}ae(e)},O=ue,ft=Lt(m[0].style),pt=O?Ve.find(e=>e.id===O)?.name??O:"",mt=()=>{Z(!1),O&&(k.write(Ut({saved:k.saved,old:k.old,styleId:O,values:Bt(m[0].style)}),!0),ut())};return y(Rn,{sectionName:Pe?.label??d.type,onBack:r,tabs:e=>n(me,{motion:le,body:e}),textEditor:f("words")?n("div",{ref:be,className:"sf-part-text",children:at?n(zt,{text:Ie,onTextChange:e=>se(de?{text:e,hidden:B}:e),multiline:Qt(v),markup:v!=="plainText",styled:!1,style:m[0].style,base:m[0].base,setValue:ce,colors:rt,placeholder:Se(Zt(g))??void 0,ariaLabel:l($),head:Fe,typedOnCanvas:x===F}):v?de?Fe:null:n(vt,{field:g,name:o,value:st,onChange:se,id:`sf-part-${t}-${o}`})}):void 0,children:[ee&&f("sourceNote")&&n(Je,{source:ee,slug:ge(u),menuId:Sn(u)}),X&&n(Be,{style:f("style")?{value:ue??"",options:Xe(Ve),onChange:e=>it(e||null),changed:dt>0,onEditStyles:i,onUpdateStyle:O&&ft?()=>Z(!0):void 0}:void 0,font:f("font")?{value:S.font??"",styleValue:he(m[0].base.fontKey)?.label,options:Yt.map(e=>({label:e.label,value:e.key})),onChange:e=>L("font",e||null)}:void 0,italic:f("italic")?{value:S.italic,styleValue:_n(D,ue),onChange:e=>L("italic",e??null)}:void 0,cells:Ue(m[0].style,m[0].base,ce,q(W)).filter(e=>f(e.key)),align:f("align")?q(W)==="mobile"?{value:S.alignPhone??"",styleValue:S.align??m[0].base.align,onChange:e=>L("alignPhone",e||null)}:{value:S.align??"",styleValue:m[0].base.align,onChange:e=>L("align",e||null)}:void 0,letterCase:f("letterCase")?{value:S.case??"",styleValue:m[0].base.case,onChange:e=>L("case",e||null)}:void 0}),ot&&O&&n(Vt,{styleName:pt,onCancel:()=>Z(!1),onConfirm:mt}),X&&Ee===null&&f("fixedSizeHint")&&n("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size — the site’s Text setting doesn’t resize this.")}),qe(Cn,e=>f(e)&&(e==="words"||(e==="sourceNote"?!!ee:e==="fixedSizeHint"?X&&Ee===null:X)))&&n(Me,{})]})}function _n(t,o){return!o||!Array.isArray(t)?!1:t.find(i=>i?.id===o)?.values?.italic===!0}const tt={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};export{Rn as PartPanelBody,Je as PartSourceNote,On as PartStyleSelect,Fn as default,Q as partFace};
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type PartNeedle } from "../../render/lib/document/text-parts.js";
3
- import { type PartStyleBase, type PartStyles } from "../../render/lib/document/part-styles.js";
3
+ import { type ShownDeclarations, type PartStyleBase, type PartStyles } from "../../render/lib/document/part-styles.js";
4
4
  import { type FontRole } from "../../format/lib/fonts.js";
5
5
  import { type TypeGroup } from "../../format/lib/theme.js";
6
6
  import { type PartMotion } from "../../render/lib/animation/part-motion.js";
@@ -8,7 +8,7 @@ export declare function styleTagsOf(element: HTMLElement): {
8
8
  faceRole: FontRole;
9
9
  sizeGroup: TypeGroup | null;
10
10
  };
11
- export declare function measureStyleBase(element: HTMLElement): PartStyleBase;
11
+ export declare function measureStyleBase(element: HTMLElement, shown?: ShownDeclarations): PartStyleBase;
12
12
  export default function PreviewPartAnchors({ needles, styles, motions, type, children, }: {
13
13
  needles: PartNeedle[];
14
14
  styles: PartStyles;
@@ -1 +1 @@
1
- "use client";import{jsx as F}from"react/jsx-runtime";import{readInks as z}from"../../format/lib/document/part-inks.js";import{useEffect as H,useRef as v}from"react";import{markOverlayPortal as Y}from"../../format/lib/document/overlay-portal.js";import{usePreviewParts as $}from"efficient-easel/draw/client";import{usePartStyle as j}from"./PreviewPartStyleContext.js";import{usePreviewDevice as G}from"efficient-easel/draw/client";import{decodePartId as q,encodePartId as U}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as V}from"efficient-easel/canvas";import{engagePartAnchors as Q}from"../lib/document/part-anchors.js";import{PART_ATTR as g,PART_STYLE_KIND_ATTR as T,PART_STYLE_OWNER_ATTR as X,partStyleOwnerOf as O}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as K,applyPartStyles as x,blockDrawsTextStyle as Z,partFontKeyOf as ee,partStyleBase as te,partStyleSource as re}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as oe,styleRoleOfClassName as ne}from"../../format/lib/fonts.js";import{typeScaleGroupOfClassName as I}from"../../format/lib/theme.js";import{styleKeyForPart as C}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as se,PART_HOST_ATTR as ie}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as le}from"../lib/document/part-motion-canvas.js";function ae(a){let o=null,i=null;for(let t=a;t&&(o===null||i===null);t=t.parentElement){const p=t.getAttribute("class");o??=ne(p),i??=I(p)}return{faceRole:o??"body",sizeGroup:i}}function D(a){const o=a.style,i={};for(const r of K)i[r]=o[r]??"",o[r]="";const t=getComputedStyle(a),p=getComputedStyle(a.ownerDocument.documentElement),m=te({fontSize:t.fontSize,fontWeight:t.fontWeight,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,textAlign:t.textAlign,textTransform:t.textTransform,paddingTop:t.paddingTop},ee(t.fontFamily,r=>p.getPropertyValue(r)));for(const r of K)o[r]=i[r];return m}function pe({needles:a,styles:o,motions:i=se,type:t,children:p}){const m=v(null),{selectedPartId:r}=$(),{setPartStyle:P}=j(),d=G()==="mobile",b=JSON.stringify(a),h=JSON.stringify(o),A=JSON.stringify(i),J=v(new Map);return H(()=>{const u=m.current;if(!u)return;const R=[],w=()=>u.parentElement,M=l=>{const n=w();if(!n)return null;const f=new MutationObserver(l);return f.observe(n,{attributes:!0,attributeFilter:[V]}),()=>f.disconnect()},k=l=>{const n=new MutationObserver(l);return n.observe(u,{childList:!0,subtree:!0,characterData:!0}),()=>n.disconnect()};let c=[];R.push(()=>{for(const l of c)l();c=[]});const L=JSON.parse(b),E=JSON.parse(h),W=JSON.parse(A),B=Q(u,L,w,M,(l,n,f)=>{for(const e of c)e();c=[];const _=[];for(const e of f){const s=e,y=Y(s);y&&c.push(y),s.getAttribute(g)===r&&_.push(s)}const N=re(n,r,_,e=>oe(e)!==null||I(e)!==null);if(N&&r){const e=N;P({partId:r,...ae(e),base:D(e),inks:z(e),...(()=>{const s=O(e);return s?{styleOwner:s}:{}})()})}x(f.filter(e=>!O(e)).map(e=>({element:e,partId:e.getAttribute(g)??""})),E,e=>D(e),e=>C(t,e),void 0,d,e=>Z(t,e));const S=[...u.querySelectorAll(`[${X}="${CSS.escape(n)}"][${T}]`)];S.length&&x(S.map(e=>({element:e,partId:U(n,e.getAttribute(T)??"")})),E,void 0,e=>e,void 0,d),c.push(le([...f.filter(e=>!O(e)).map(e=>{const s=e,y=q(s.getAttribute(g)??"")?.propKey??"";return{element:s,partKey:C(t,y)}}),...S.map(e=>({element:e,partKey:e.getAttribute(T)??""}))],e=>W[e],d,J.current))},k);return()=>{B();for(const l of R)l()}},[b,h,A,r,P,d,t]),F("div",{ref:m,[ie]:"",style:{display:"contents"},children:p})}export{pe as default,D as measureStyleBase,ae 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{decodePartId as I,encodePartId as Q}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as X}from"efficient-easel/canvas";import{engagePartAnchors as Z}from"../lib/document/part-anchors.js";import{PART_ATTR as P,PART_STYLE_KIND_ATTR as b,PART_STYLE_OWNER_ATTR as tt,partStyleOwnerOf as g}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as D,applyPartStyles as C,blockDrawsTextStyle as F,partFontKeyOf as et,partShownDeclarations as rt,partStyleBase as ot,partStyleSource as nt,storedPartStyle as st}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as it,styleRoleOfClassName as lt}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 at,PART_HOST_ATTR as ct}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as pt}from"../lib/document/part-motion-canvas.js";function ft(p){let s=null,o=null;for(let e=p;e&&(s===null||o===null);e=e.parentElement){const r=e.getAttribute("class");s??=lt(r),o??=k(r)}return{faceRole:s??"body",sizeGroup:o}}function z(p,s={}){const o=p.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(p),S=getComputedStyle(p.ownerDocument.documentElement),a=ot({fontSize:r.fontSize,fontWeight:r.fontWeight,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,textAlign:r.textAlign,textTransform:r.textTransform,paddingTop:r.paddingTop},et(r.fontFamily,n=>S.getPropertyValue(n)));for(const n of D)o[n]=e[n];return a}function ut({needles:p,styles:s,motions:o=at,type:e,children:r}){const S=x(null),{selectedPartId:a}=q(),{setPartStyle:n}=U(),y=V()==="mobile",h=JSON.stringify(p),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=c=>{const i=_();if(!i)return null;const u=new MutationObserver(c);return u.observe(i,{attributes:!0,attributeFilter:[X]}),()=>u.disconnect()},L=c=>{const i=new MutationObserver(c);return i.observe(d,{childList:!0,subtree:!0,characterData:!0}),()=>i.disconnect()};let f=[];E.push(()=>{for(const c of f)c();f=[]});const W=JSON.parse(h),T=JSON.parse(R),B=JSON.parse(w),H=Z(d,W,_,M,(c,i,u)=>{for(const t of f)t();f=[];const K=[];for(const t of u){const l=t,m=G(l);m&&f.push(m),l.getAttribute(P)===a&&K.push(l)}const N=nt(i,a,K,t=>it(t)!==null||k(t)!==null);if(N&&a){const t=N,l=I(a)?.propKey??"",m=g(t)?{}:rt(st(T,A(e,l)),y,{blockDrawsStyle:F(e,l)});n({partId:a,...ft(t),base:z(t,m),inks:$(t),...(()=>{const v=g(t);return v?{styleOwner:v}:{}})()})}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(`[${tt}="${CSS.escape(i)}"][${b}]`)];O.length&&C(O.map(t=>({element:t,partId:Q(i,t.getAttribute(b)??"")})),T,void 0,t=>t,void 0,y),f.push(pt([...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],y,J.current))},L);return()=>{H();for(const c of E)c()}},[h,R,w,a,n,y,e]),Y("div",{ref:S,[ct]:"",style:{display:"contents"},children:r})}export{ut as default,z as measureStyleBase,ft as styleTagsOf};
@@ -1,6 +1,8 @@
1
1
  import { type ReactNode } from "react";
2
- export default function SectionTextPartBridge({ nodeId, sectionType, children, }: {
2
+ import { type PartStyles } from "../../render/lib/document/part-styles.js";
3
+ export default function SectionTextPartBridge({ nodeId, sectionType, partStyles, children, }: {
3
4
  nodeId: string;
4
5
  sectionType: string;
6
+ partStyles?: PartStyles;
5
7
  children: ReactNode;
6
8
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as g}from"react/jsx-runtime";import{useEffect as y,useRef as A}from"react";import{markOverlayPortal as R}from"../../format/lib/document/overlay-portal.js";import{measureStyleBase as T,styleTagsOf as x}from"./PreviewPartAnchors.js";import{usePreviewParts as S}from"efficient-easel/draw/client";import{usePartStyle as E}from"./PreviewPartStyleContext.js";import{REGION_PART_ATTR as p,encodePartId as O}from"../../render/lib/document/text-parts.js";import{TEXT_REGION_ATTR as P,textRegionOfAttr as _,textRegionPartKey as b}from"../../format/lib/sections/text-regions.js";import{regionsForSection as h}from"../../format/lib/sections/section-text-regions.js";function v({nodeId:e,sectionType:o,children:d}){const s=A(null),{selectedPartId:i}=S(),{setPartStyle:n}=E();return y(()=>{const f=s.current,c=h(o);if(!f||!e||!c)return;const m=[],l=Array.from(f.querySelectorAll(`[${P}]`));for(const t of l){const a=_(c,t.getAttribute(P));if(!a)continue;const u=R(t);u&&m.push(u);const r=O(e,b(a));t.setAttribute(p,r),r===i&&n({partId:r,...x(t),base:T(t)})}return()=>{for(const t of m)t();for(const t of l)t.removeAttribute(p)}},[e,o,i,n]),g("div",{ref:s,style:{display:"contents"},children:d})}export{v as default};
1
+ "use client";import{jsx as x}from"react/jsx-runtime";import{useEffect as E,useRef as _}from"react";import{markOverlayPortal as I}from"../../format/lib/document/overlay-portal.js";import{measureStyleBase as O,styleTagsOf as w}from"./PreviewPartAnchors.js";import{usePreviewDevice as D,usePreviewParts as K}from"efficient-easel/draw/client";import{usePartStyle as N}from"./PreviewPartStyleContext.js";import{REGION_PART_ATTR as R,encodePartId as j}from"../../render/lib/document/text-parts.js";import{TEXT_REGION_ATTR as b,textRegionOfAttr as B,textRegionPartKey as C}from"../../format/lib/sections/text-regions.js";import{regionsForSection as G}from"../../format/lib/sections/section-text-regions.js";import{TEXT_STYLE_ATTR as n,isTextStyleId as X,regionCanvasDeclarations as k,regionCanvasRestore as q,regionSheetStyle as J,regionShownDeclarations as L}from"../../render/lib/document/part-styles.js";function Y({nodeId:s,sectionType:c,partStyles:m,children:v}){const y=_(null),{selectedPartId:u}=K(),{setPartStyle:p}=N(),f=D()==="mobile",z=JSON.stringify(m??null);return E(()=>{const S=y.current,o=G(c);if(!S||!s||!o)return;const l=[],d=Array.from(S.querySelectorAll(`[${b}]`));for(const t of d){const r=B(o,t.getAttribute(b));if(!r)continue;const g=I(t);g&&l.push(g);const A=C(r),a=j(s,A);t.setAttribute(R,a);const i=m?.[A];if(o[r].sized&&J(i)){const e=k(i,f),F={fontFamily:t.style.fontFamily,fontSize:t.style.fontSize},T=t.getAttribute(n);e.fontFamily&&(t.style.fontFamily=e.fontFamily),e.fontSize&&(t.style.fontSize=e.fontSize);const h={fontFamily:e.fontFamily?t.style.fontFamily:void 0,fontSize:e.fontSize?t.style.fontSize:void 0},P=i?.textStyle;X(P)&&t.setAttribute(n,P),l.push(()=>{q(t.style,F,h),T===null?t.removeAttribute(n):t.setAttribute(n,T)})}if(a===u){const e=O(t,L(i,o[r],f));p({partId:a,...w(t),base:e})}}return()=>{for(const t of l)t();for(const t of d)t.removeAttribute(R)}},[s,c,u,p,f,z]),x("div",{ref:y,style:{display:"contents"},children:v})}export{Y as default};
@@ -1 +1 @@
1
- "use client";import{jsx as a,Fragment as B,jsxs as k}from"react/jsx-runtime";import{useCallback as R,useEffect as g,useRef as $,useState as D}from"react";import{SettingsSwitch as ee}from"efficient-easel/panel";import{PagesIcon as te,StylesIcon as oe}from"efficient-easel/rail";import{PaletteIcon as re}from"efficient-shell/icons/efficient";import{Subtree as ne,TreeRow as y}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ie}from"./LocationsTreeContext.js";import se from"./PagesPanel.js";import{usePreviewChat as ae}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as ce}from"./preview-devices.js";import{PreviewDeviceContext as de}from"efficient-easel/draw/client";import{usePreviewSocial as le}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as pe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as me,usePreviewTicker as ue}from"../../render/components/PreviewTickerContext.js";import{usePreviewHeroPart as fe}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Se,HERO_PART_MODE as W,heroMediaRows as Ee,heroPartId as M,readHeroPartId as Pe}from"../../render/lib/document/hero-media-parts.js";import Te,{CHAT_MODE as we,HEADER_MODE as he,SOCIAL_MODE as ge,WEBSITE_MODE as V,WEBSITE_PAGE_MODE as Ie}from"./SectionEditor.js";import C from"./SectionIcon.js";import be from"./SectionThumbnail.js";import{useScreenDocument as O}from"efficient-easel/screen/components/ScreenDocumentContext";import ve from"./StylesPanel.js";import{LOCATIONS_TYPE as _e,useLocationsTree as ke}from"./useLocationsTree.js";import{usePinnedChromeSeed as Re}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Ce}from"./useHostDocumentBridge.js";import{usePreviewHref as Oe}from"./usePreviewHref.js";import{WebsitePreviewButton as Le}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as Ae,SITE_STYLES_TABS as Be,SITE_STYLES_TEXT_TAB as De,useWebsiteName as ye}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Ne}from"./useWebsiteMainAction.js";import{VersionHistory as He}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as We}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Me,heroGroupNestDepth as Ve}from"../../format/lib/hero-group-placement.js";import{stripMarkup as xe}from"../../format/lib/markup.js";import{categoryShortLabel as Ge,PINNED_SECTION_TYPE as Ye}from"../lib/document/add-palette.js";import{canAddTo as Fe}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as Ke}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as je}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as ze,setBookingPreview as Ue}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as Ze}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as qe}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as Xe,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as Je,readLeftView as Qe,resolveLeftView as $e,writeLeftView as et}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as tt}from"../lib/document/locked-blocks.js";import{everyPageNotice as ot,noOwnTab as rt,pinnedReach as Y,websiteDuplicateBlocked as nt}from"../lib/document/every-page.js";import{sharedSectionReach as it,WEBSITE_SHARED_SECTIONS as st}from"../lib/shared-sections-layer.js";import{activeSharedSections as L,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as at}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as v}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ct,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as dt}from"../lib/document/overrides.js";import{labelAtLevel as lt}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as pt}from"../../format/lib/document/media-drop.js";import{editorWords as mt,say as S}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as ut}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as ft,isSectionGroupType as St,sectionGroupZone as Et,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as Pt}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as Tt}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as wt,SAVE_AS_TEMPLATE_EVENT as ht}from"../../format/lib/save-as-template-action.js";import{cityPalettePresets as gt}from"../lib/sections/city-presets.js";import{newSectionNode as It}from"../lib/sections/new-section-node.js";import{useHostProducts as bt}from"../lib/use-host-products.js";import{backendOf as vt}from"../lib/website-session.js";function z({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=ue(),c=H().tree,l=e,n=l.kind==="ticker"?l.heroId:null,s=R(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ct(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const u=String(i.props.id);return i.type==="Hero"&&a(y,{icon:a(C,{type:"ticker",size:13}),name:S(me),onSelect:()=>s(u),selected:n===u,rowProps:{onClick:m(()=>s(u))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=fe(),c=H().tree,{appState:l}=N(p=>p),n=l.data.content??[],s=$(n);s.current=n;const i=e,m=Se.find(p=>W[p]===i.kind),u=m&&"nodeId"in i?M(String(i.nodeId),m):null,E=R(p=>{const d=Pe(p);if(!d)return;const P=s.current.findIndex(w=>String(w.props.id)===d.nodeId);if(P<0)return;const T={kind:W[d.part],nodeId:d.nodeId};t({index:P},T)},[t]);return g(()=>{o(u)},[u,o]),g(()=>{r(E)},[r,E]),{partRows:(p,{rowClick:d})=>{const P=String(p.props.id),T=Ee(p);if(T.length===0)return null;const w=f=>{const h=M(P,f.part);return a(y,{icon:a(C,{type:f.part==="media"?"heroMedia":"heroImage",size:13}),name:S(f.label),onSelect:()=>E(h),selected:u===h,rowProps:{onClick:d(()=>E(h))},words:c},h)},[b,...I]=T;return k(B,{children:[w(b),I.length>0&&a(ne,{children:I.map(w)})]})}}}function Z(e,t){return{partRows:(o,r)=>k(B,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function _t(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:l,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=O(),{hasPreviewLink:u}=o,E=vt(x()).preview?.draftLink,p=Ne(e.data),d=wt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),P=R(()=>{!c||!r||i(ht,{siteId:c,slug:r})},[i,c,r]),T=Oe({pageSlug:r,siteId:c,token:m}),w=t.previewHref?.(r)??T;return{barLead:()=>d.visible&&a(Tt,{enabled:d.enabled,reason:d.enabled?"":d.disabledReason,onSaved:P}),barView:()=>u&&r&&a(Le,{liveHref:w,pageId:l??null,draftLink:E}),mainAction:p}}function kt(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:l,navigate:n}=O(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=f=>t.setView(f),[u,E]=D(Be[0].id),[p,d]=D(!1),{surface:P,setSurface:T}=pe(),w=()=>{if(s){m("styles"),t.reveal(),K();return}e.show(V),e.reveal(),K()},b={id:"pages",label:S("Pages"),icon:a(te,{}),panel:({onHide:f})=>a(se,{activeSurface:P,onPreviewSurface:T,onNavigate:h=>{T(null),n(r?{kind:"template",id:r,pageSlug:h}:{kind:"page",slug:h,siteId:c??void 0})},onClose:f})},I=[];return!s&&i&&I.push({id:"appearance",label:S("Appearance"),icon:a(re,{}),active:e.kind==="website",onSelect:w}),s&&I.push({id:"styles",label:S("Styles"),icon:a(oe,{}),panel:({onHide:f,notify:h})=>a(ve,{tokenRef:l,siteId:c??void 0,onClose:f,onNotify:h,tab:u,onTabChange:E,revealPageGroup:p,onPageGroupRevealed:()=>d(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:f=>$e(f,s),openSettings:w,openStyles:()=>{E(De),m("styles")},openPageStyles:s?()=>{E(Ae),d(!0),m("styles"),t.reveal()}:i?()=>{e.show(Ie),e.reveal()}:void 0}}function Rt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=O(),c=N(n=>n.config),l=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=L();if(!n||!r)return;let s=!1;return at(l).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,l])}function Ct(e,t,o,r){const{kind:c,open:l}=e,{selected:n,zoneOf:s}=t;g(()=>{Ue(n?.type==="BookingBox"&&n.props.region==="confirm"?ze(s(String(n.props.id))):null)},[n?.props.id]);const i=ke(e,t),{capabilities:{hasSiteSettings:m}}=O();Rt();const{chat:u,setChat:E,setSelected:p,setSelectHandler:d}=ae(),P=R(()=>l(we),[l]),T=c==="chat";g(()=>{p(T)},[T,p]),g(()=>{d(P)},[d,P]);const{setOpenHandler:w}=le(),b=R(()=>l(ge),[l]);g(()=>{w(b)},[w,b]);const I=Z(z(e),U(e)),f=_t(t),h=kt(e,r),J=o.device;return{...I,...f,...h,hasOwnRows:_=>_.type===_e,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:_=>a(ie.Provider,{value:!0,children:k(de.Provider,{value:J,children:[_,a(He,{})]})}),addPanelRow:_=>m?k("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(C,{type:"chat",size:16})}),k("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{_(),P()},children:[S("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:S("A chat bubble on every page")})]}),a(ee,{checked:u.enabled,onChange:Q=>E({enabled:Q}),ariaLabel:S("Show the chat bubble on the whole site")})]}):void 0}}let q=null,A=new WeakMap;function Ot(e){const t=mt();if(!e||!t)return e;q!==t&&(q=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:S(r.label)})):null,spec:e.spec?{...e.spec,addLabel:S(e.spec.addLabel)}:null},A.set(e,o)),o}const Lt={isLockedBlock:(e,t)=>tt(e,t)||!!(t&&L()?.heldElsewhere(t.props.id)),duplicateBlocked:nt,nestDepth:(e,t,o)=>t===Me?Ve(e,o):0,newSectionNode:It,canAddTo:(e,t,o,r)=>Ot(Fe(e,t,r)),blockIsOffered:je,slotsOf:Ke},At=new Proxy(ut,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?S(o):o}}),Bt={labelAtLevel:(e,t,o)=>S(lt(e,t,o)),descriptions:At,categoryLabel:e=>{const t=Ge(e);return t===void 0?void 0:S(t)},firstSection:Ye,blockRowName:Ze,rowName:qe,plainText:xe,Icon:C,Thumbnail:be,useProducts:bt,presets:gt()},Dt={desktop:2e3,tablet:800,mobile:390},X="desktop",yt={options:ce,initial:X,fluid:X,widths:Dt},Nt={read:Qe,write:e=>et(e),forSelection:(e,t)=>Je(e,t)},Ht={first:G,last:Xe,firstGroup:Pt,lastGroup:j,isSectionGroup:St,sectionGroupZone:Et,panelOf:e=>e===G?he:null,get sharedReach(){return v()?Mt:void 0},get shared(){return L()?st:void 0},get groupTab(){return v()?rt:void 0},get groupBadge(){return v()?Y({type:j})??void 0:void 0},get changeNotice(){return v()?ot():void 0},get band(){return v()?Wt:void 0},get groupAccepts(){return v()?ft:void 0}},Wt={foldable:!0},Mt=e=>Y(e)??it(e);function Vt(e){return{...Z(z(e),U(e)),openSettings:()=>e.show(V)}}function xt(e,t){Re(e,t),Ce()}const Jo={useOwnerName:ye,useDocumentLabel:We,useBridges:Ct,useStandaloneBridges:Vt,useDocumentPass:xt,blockRules:Lt,blockLook:Bt,devices:yt,leftView:Nt,pinned:Ht,Canvas:dt,canvasDrag:{media:pt},Inspector:Te};export{Jo as WEBSITE_SCREEN};
1
+ "use client";import{jsx as a,Fragment as B,jsxs as k}from"react/jsx-runtime";import{useCallback as R,useEffect as g,useRef as $,useState as y}from"react";import{SettingsSwitch as ee}from"efficient-easel/panel";import{PagesIcon as te,StylesIcon as oe}from"efficient-easel/rail";import{PaletteIcon as re}from"efficient-shell/icons/efficient";import{Subtree as ne,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ie}from"./LocationsTreeContext.js";import se from"./PagesPanel.js";import{usePreviewChat as ae}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as ce}from"./preview-devices.js";import{PreviewDeviceContext as de}from"efficient-easel/draw/client";import{usePreviewSocial as le}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as pe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as me,usePreviewTicker as fe}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as ue}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as Se}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Ee,HERO_PART_MODE as W,heroMediaRows as Pe,heroPartId as M,readHeroPartId as Te}from"../../render/lib/document/hero-media-parts.js";import he,{CHAT_MODE as we,HEADER_MODE as ge,SOCIAL_MODE as Ie,WEBSITE_MODE as V,WEBSITE_PAGE_MODE as be}from"./SectionEditor.js";import C from"./SectionIcon.js";import ve from"./SectionThumbnail.js";import{useScreenDocument as O}from"efficient-easel/screen/components/ScreenDocumentContext";import _e from"./StylesPanel.js";import{LOCATIONS_TYPE as ke,useLocationsTree as Re}from"./useLocationsTree.js";import{usePinnedChromeSeed as Ce}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Oe}from"./useHostDocumentBridge.js";import{usePreviewHref as Le}from"./usePreviewHref.js";import{WebsitePreviewButton as Ae}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as Be,SITE_STYLES_TABS as ye,SITE_STYLES_TEXT_TAB as De,useWebsiteName as Ne}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as He}from"./useWebsiteMainAction.js";import{VersionHistory as We}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Me}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Ve,heroGroupNestDepth as xe}from"../../format/lib/hero-group-placement.js";import{stripMarkup as Ge}from"../../format/lib/markup.js";import{categoryShortLabel as Ye,PINNED_SECTION_TYPE as Fe}from"../lib/document/add-palette.js";import{canAddTo as Ke}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as je}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as ze}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as Ue,setBookingPreview as Ze}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as qe}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as Xe}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as Je,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as Qe,readLeftView as $e,resolveLeftView as et,writeLeftView as tt}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as ot}from"../lib/document/locked-blocks.js";import{everyPageNotice as rt,noOwnTab as nt,pinnedReach as Y,websiteDuplicateBlocked as it}from"../lib/document/every-page.js";import{sharedSectionReach as st,WEBSITE_SHARED_SECTIONS as at}from"../lib/shared-sections-layer.js";import{activeSharedSections as L,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as ct}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as v}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as dt,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as lt}from"../lib/document/overrides.js";import{labelAtLevel as pt}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as mt}from"../../format/lib/document/media-drop.js";import{editorWords as ft,say as S}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as ut}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as St,isSectionGroupType as Et,sectionGroupZone as Pt,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as Tt}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as ht}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as wt,SAVE_AS_TEMPLATE_EVENT as gt}from"../../format/lib/save-as-template-action.js";import{cityPalettePresets as It}from"../lib/sections/city-presets.js";import{newSectionNode as bt}from"../lib/sections/new-section-node.js";import{useHostProducts as vt}from"../lib/use-host-products.js";import{backendOf as _t}from"../lib/website-session.js";function z({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=fe(),c=H().tree,l=e,n=l.kind==="ticker"?l.heroId:null,s=R(i=>{if(!i)return;t({kind:"ticker",heroId:i}),dt(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const f=String(i.props.id);return i.type==="Hero"&&ue(i.props)&&a(D,{icon:a(C,{type:"ticker",size:13}),name:S(me),onSelect:()=>s(f),selected:n===f,rowProps:{onClick:m(()=>s(f))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Se(),c=H().tree,{appState:l}=N(p=>p),n=l.data.content??[],s=$(n);s.current=n;const i=e,m=Ee.find(p=>W[p]===i.kind),f=m&&"nodeId"in i?M(String(i.nodeId),m):null,E=R(p=>{const d=Te(p);if(!d)return;const P=s.current.findIndex(h=>String(h.props.id)===d.nodeId);if(P<0)return;const T={kind:W[d.part],nodeId:d.nodeId};t({index:P},T)},[t]);return g(()=>{o(f)},[f,o]),g(()=>{r(E)},[r,E]),{partRows:(p,{rowClick:d})=>{const P=String(p.props.id),T=Pe(p);if(T.length===0)return null;const h=u=>{const w=M(P,u.part);return a(D,{icon:a(C,{type:u.part==="media"?"heroMedia":"heroImage",size:13}),name:S(u.label),onSelect:()=>E(w),selected:f===w,rowProps:{onClick:d(()=>E(w))},words:c},w)},[b,...I]=T;return k(B,{children:[h(b),I.length>0&&a(ne,{children:I.map(h)})]})}}}function Z(e,t){return{partRows:(o,r)=>k(B,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function kt(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:l,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=O(),{hasPreviewLink:f}=o,E=_t(x()).preview?.draftLink,p=He(e.data),d=wt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),P=R(()=>{!c||!r||i(gt,{siteId:c,slug:r})},[i,c,r]),T=Le({pageSlug:r,siteId:c,token:m}),h=t.previewHref?.(r)??T;return{barLead:()=>d.visible&&a(ht,{enabled:d.enabled,reason:d.enabled?"":d.disabledReason,onSaved:P}),barView:()=>f&&r&&a(Ae,{liveHref:h,pageId:l??null,draftLink:E}),mainAction:p}}function Rt(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:l,navigate:n}=O(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=u=>t.setView(u),[f,E]=y(ye[0].id),[p,d]=y(!1),{surface:P,setSurface:T}=pe(),h=()=>{if(s){m("styles"),t.reveal(),K();return}e.show(V),e.reveal(),K()},b={id:"pages",label:S("Pages"),icon:a(te,{}),panel:({onHide:u})=>a(se,{activeSurface:P,onPreviewSurface:T,onNavigate:w=>{T(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:u})},I=[];return!s&&i&&I.push({id:"appearance",label:S("Appearance"),icon:a(re,{}),active:e.kind==="website",onSelect:h}),s&&I.push({id:"styles",label:S("Styles"),icon:a(oe,{}),panel:({onHide:u,notify:w})=>a(_e,{tokenRef:l,siteId:c??void 0,onClose:u,onNotify:w,tab:f,onTabChange:E,revealPageGroup:p,onPageGroupRevealed:()=>d(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:u=>et(u,s),openSettings:h,openStyles:()=>{E(De),m("styles")},openPageStyles:s?()=>{E(Be),d(!0),m("styles"),t.reveal()}:i?()=>{e.show(be),e.reveal()}:void 0}}function Ct(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=O(),c=N(n=>n.config),l=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=L();if(!n||!r)return;let s=!1;return ct(l).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,l])}function Ot(e,t,o,r){const{kind:c,open:l}=e,{selected:n,zoneOf:s}=t;g(()=>{Ze(n?.type==="BookingBox"&&n.props.region==="confirm"?Ue(s(String(n.props.id))):null)},[n?.props.id]);const i=Re(e,t),{capabilities:{hasSiteSettings:m}}=O();Ct();const{chat:f,setChat:E,setSelected:p,setSelectHandler:d}=ae(),P=R(()=>l(we),[l]),T=c==="chat";g(()=>{p(T)},[T,p]),g(()=>{d(P)},[d,P]);const{setOpenHandler:h}=le(),b=R(()=>l(Ie),[l]);g(()=>{h(b)},[h,b]);const I=Z(z(e),U(e)),u=kt(t),w=Rt(e,r),J=o.device;return{...I,...u,...w,hasOwnRows:_=>_.type===ke,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:_=>a(ie.Provider,{value:!0,children:k(de.Provider,{value:J,children:[_,a(We,{})]})}),addPanelRow:_=>m?k("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(C,{type:"chat",size:16})}),k("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{_(),P()},children:[S("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:S("A chat bubble on every page")})]}),a(ee,{checked:f.enabled,onChange:Q=>E({enabled:Q}),ariaLabel:S("Show the chat bubble on the whole site")})]}):void 0}}let q=null,A=new WeakMap;function Lt(e){const t=ft();if(!e||!t)return e;q!==t&&(q=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:S(r.label)})):null,spec:e.spec?{...e.spec,addLabel:S(e.spec.addLabel)}:null},A.set(e,o)),o}const At={isLockedBlock:(e,t)=>ot(e,t)||!!(t&&L()?.heldElsewhere(t.props.id)),duplicateBlocked:it,nestDepth:(e,t,o)=>t===Ve?xe(e,o):0,newSectionNode:bt,canAddTo:(e,t,o,r)=>Lt(Ke(e,t,r,o)),blockIsOffered:ze,slotsOf:je},Bt=new Proxy(ut,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?S(o):o}}),yt={labelAtLevel:(e,t,o)=>S(pt(e,t,o)),descriptions:Bt,categoryLabel:e=>{const t=Ye(e);return t===void 0?void 0:S(t)},firstSection:Fe,blockRowName:qe,rowName:Xe,plainText:Ge,Icon:C,Thumbnail:ve,useProducts:vt,presets:It()},Dt={desktop:2e3,tablet:800,mobile:390},X="desktop",Nt={options:ce,initial:X,fluid:X,widths:Dt},Ht={read:$e,write:e=>tt(e),forSelection:(e,t)=>Qe(e,t)},Wt={first:G,last:Je,firstGroup:Tt,lastGroup:j,isSectionGroup:Et,sectionGroupZone:Pt,panelOf:e=>e===G?ge:null,get sharedReach(){return v()?Vt:void 0},get shared(){return L()?at:void 0},get groupTab(){return v()?nt:void 0},get groupBadge(){return v()?Y({type:j})??void 0:void 0},get changeNotice(){return v()?rt():void 0},get band(){return v()?Mt:void 0},get groupAccepts(){return v()?St:void 0}},Mt={foldable:!0},Vt=e=>Y(e)??st(e);function xt(e){return{...Z(z(e),U(e)),openSettings:()=>e.show(V)}}function Gt(e,t){Ce(e,t),Oe()}const $o={useOwnerName:Ne,useDocumentLabel:Me,useBridges:Ot,useStandaloneBridges:xt,useDocumentPass:Gt,blockRules:At,blockLook:yt,devices:Nt,leftView:Ht,pinned:Wt,Canvas:lt,canvasDrag:{media:mt},Inspector:he};export{$o as WEBSITE_SCREEN};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{HoverIcon as h,RotateIcon as l}from"efficient-easel/icons";import{group as d}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as H,noControlField as f}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{segmented as E,slider as u}from"../document/box-fields.js";import{withShowWhen as i}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as v,animationDurationField as O,showsWhatRuns as m}from"./AnimationDurationRow.js";import{CARD_HOVER_ANGLE as s,CARD_HOVER_KEYS as n,CARD_HOVER_KINDS as D,CARD_HOVER_TURN as A,HOVER_KEY as V,HOVER_KIND_LABELS as N,OLD_SPIN_KEY as w,PART_HOVER_KINDS as I,cardHoverAngleOf as K,cardHoverKindOf as C,cardRotatesRule as k}from"../../../format/lib/animation/hover.js";const R="_gHover",F="What this does when a shopper points at it, or taps it on a phone.",S="What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.";function c(o,e){return E("Hover effect",a(h,{}),o.map(r=>({label:N[r],value:r})),e)}function G(){return{[R]:d("Hover"),[V]:t("desktop",{...c(I,"none"),description:F})}}function U(o){const e=k(o),r=u("Angle",a(l,{}),s.min,s.max,s.step,A,"°");return{[R]:d("Hover"),[n.kind]:t("desktop",{...m(c(D,o),(p,_)=>C(_??{},o)),description:S}),[w]:f({type:"custom",render:()=>a(H,{})},"always"),[n.angle]:t("desktop",i(m(r,p=>K(p)),e)),[n.duration]:t("desktop",i(O("hover"),e)),[n.delay]:t("desktop",i(v("hover"),e))}}export{U as cardHoverFields,G as hoverFields};
1
+ import{jsx as a}from"react/jsx-runtime";import{HoverIcon as h,RotateIcon as l}from"efficient-easel/icons";import{group as H}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as o}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as f,noControlField as E}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{segmented as u,slider as v}from"../document/box-fields.js";import{withShowWhen as i}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as O,animationDurationField as D,showsWhatRuns as d}from"./AnimationDurationRow.js";import{CARD_HOVER_ANGLE as s,CARD_HOVER_KEYS as n,CARD_HOVER_KINDS as A,CARD_HOVER_TURN as V,HOVER_KEY as N,HOVER_KIND_LABELS as w,OLD_SPIN_KEY as I,PART_HOVER_KINDS as K,cardHoverAngleOf as k,cardHoverKindOf as C,cardRotatesRule as g}from"../../../format/lib/animation/hover.js";const m="_gHover",c=()=>o("desktop",H("Hover")),F="What this does when a shopper points at it, or taps it on a phone.",S="What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.";function R(e,t){return u("Hover effect",a(h,{}),e.map(r=>({label:w[r],value:r})),t)}function U(){return{[m]:c(),[N]:o("desktop",{...R(K,"none"),description:F})}}function b(e){const t=g(e),r=v("Angle",a(l,{}),s.min,s.max,s.step,V,"°");return{[m]:c(),[n.kind]:o("desktop",{...d(R(A,e),(p,_)=>C(_??{},e)),description:S}),[I]:E({type:"custom",render:()=>a(f,{})},"always"),[n.angle]:o("desktop",i(d(r,p=>k(p)),t)),[n.duration]:o("desktop",i(D("hover"),t)),[n.delay]:o("desktop",i(O("hover"),t))}}export{b as cardHoverFields,U as hoverFields};
@@ -1,3 +1,3 @@
1
1
  import type { AddTarget } from "efficient-easel/screen/lib/document/add-target-types";
2
2
  import type { ScreenNodeAt } from "efficient-easel/screen/lib/screen-parts";
3
- export declare function canAddTo(nodeType: string, nestDepth?: number, at?: ScreenNodeAt): AddTarget | null;
3
+ export declare function canAddTo(nodeType: string, nestDepth?: number, at?: ScreenNodeAt, slot?: string): AddTarget | null;
@@ -1 +1 @@
1
- import{cardTemplateBlocks as i,cardTemplateOwner as f,cardTemplatesNameBlocks as u}from"../../../format/lib/content/card-template.js";import{blockOfferOf as p}from"./block-offer.js";import{containerBlocksFor as h}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as m,FOOTER_BLOCKS_SLOT as a}from"./footer-blocks.js";import{SLOT_SECTION_SPECS as d}from"../../../render/lib/document/slot-specs.js";function _(o,n=0,c){const e=T(y(o,n),c),r=e?p():null;return e&&r?O(e,r):e}function O(o,n){if(o.spec)return n.offers(o.spec.childType)?o:null;const c=o.choices??[],e=c.filter(r=>n.offers(r.type));return e.length===c.length?o:e.length>0?{...o,choices:e}:null}function T(o,n){if(!o||o.source!=="container"||!n||!u())return o;const c=f({data:n.data},n.id),e=typeof c?.type=="string"?i(c.type):[],r=o.choices??[],s=e.filter(t=>!r.some(l=>l.type===t.type));return s.length?{...o,choices:[...r,...s.map(t=>({type:t.type,label:t.label}))]}:o}function y(o,n){const c=d[o];if(c)return{source:"section",slot:c.slot,choices:null,spec:c};const e=h(o,n);if(e)return{source:"container",slot:e.slot,choices:e.choices,spec:null};const r=m(o);return r?{source:"footer",slot:a,choices:r,spec:null}:null}export{_ as canAddTo};
1
+ import{cardTemplateBlocks as i,cardTemplateOwner as f,cardTemplatesNameBlocks as u}from"../../../format/lib/content/card-template.js";import{blockOfferOf as p}from"./block-offer.js";import{containerBlocksFor as h}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as m,FOOTER_BLOCKS_SLOT as a}from"./footer-blocks.js";import{SLOT_SECTION_EXTRA_SPECS as d,SLOT_SECTION_SPECS as O}from"../../../render/lib/document/slot-specs.js";function w(o,n=0,r,c){const e=S(C(o,n,c),r),t=e?p():null;return e&&t?T(e,t):e}function T(o,n){if(o.spec)return n.offers(o.spec.childType)?o:null;const r=o.choices??[],c=r.filter(e=>n.offers(e.type));return c.length===r.length?o:c.length>0?{...o,choices:c}:null}function S(o,n){if(!o||o.source!=="container"||!n||!u())return o;const r=f({data:n.data},n.id),c=typeof r?.type=="string"?i(r.type):[],e=o.choices??[],t=c.filter(s=>!e.some(l=>l.type===s.type));return t.length?{...o,choices:[...e,...t.map(s=>({type:s.type,label:s.label}))]}:o}function C(o,n,r){const c=r?d[o]?.[r]:void 0;if(c)return{source:"section",slot:c.slot,choices:null,spec:c};const e=O[o];if(e)return{source:"section",slot:e.slot,choices:null,spec:e};const t=h(o,n);if(t)return{source:"container",slot:t.slot,choices:t.choices,spec:null};const s=m(o);return s?{source:"footer",slot:a,choices:s,spec:null}:null}export{w as canAddTo};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{phoneKey as n,tabletKey as m}from"efficient-easel/draw";import{BOX_CARD_PAD as r,BOX_DARKEN as a,BOX_DARKEN_STYLES as h,isBackgroundBox as R}from"../../../../../../format/lib/content/box-background.js";import{BOX_TAB_SHAPES as y,REEL_SHAPE_LABELS as E}from"../../../../../../format/lib/reel.js";import{deviceField as s}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as T,CropIcon as g,LineBetweenIcon as N,LineSolidIcon as C,OpacityIcon as P,ShadowIcon as H,StylesIcon as f,TargetIcon as D}from"efficient-easel/icons";import{boxBlockSpacingField as X,boxFillField as M,boxColumnsFields as W,boxShareField as j,boxSharePhoneField as v,containerDirectionField as K,containerGapRows as U,linkField as G,plainText as z,swapPadding as S,toggle as p,upload as _,withPanelOnly as J}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as u,boxShapeOf as V}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as Y,BOX_COLUMNS_MIN as q,boxPhoneRowOneLine as Q}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as b}from"../../../../../../format/lib/content/box-separator.js";import{group as i,phoneTwinFields as O}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Z,boxJustifyField as $,boxWrapField as x,placementField as ee,select as d,sidesPaddingFields as k,slider as oe}from"../../../box-fields.js";import{withRowRules as te}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ne}from"../../../separator-field.js";import{LOOP_SCROLLS as ie}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as ae}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as le,cardDisplayField as re}from"../../../card-display-chips.js";const se={field:"bgImage",set:!0},A={field:"phoneRow",in:[2,3]},pe={field:"direction",is:"tabs"},de={field:"line",in:[!0,!1]},ce={field:"anchor",set:!0},w=["fixed","screen"],me={not:{any:[{field:"sectionHeightMode",in:w},{field:"sectionHeightModePhone",in:w}]}},he={context:"parent.line",is:!0},c={field:"direction",is:"row",default:"row"},l={not:ie},F={all:[c,l,{not:{field:"separator",in:b.map(e=>e.value)}},{not:{field:"line",is:!0}}]},ge={all:[l,{not:{all:[c,{field:"separator",in:b.map(e=>e.value)}]}}]},I={not:{all:[F,{field:"columns",in:Array.from({length:Y},(e,t)=>t+q)}]}};function fe(e){return{...e,render:t=>e.render({...t,value:Q(t.value)?"nowrap":"wrap"})}}const Ce={fields:te({_gContent:i("Content"),content:ae.content,_gCardDisplay:i("Display"),cardDisplay:re(),_gLayout:i("Layout"),direction:K("Flex"),tabShape:d("Tab shape",o(f,{}),y.map(e=>({label:E[e],value:e})),"tabs"),label:J(z("Tab name")),...U("Flex"),justify:$(),align:Z(),...O("wrap",x(),void 0,{phoneRow:fe(x())}),boxShape:s("desktop",d("Box shape",o(g,{}),[...u],"auto")),[n("boxShape")]:O("boxShape",d("Box shape",o(g,{}),[...u],"auto",{phoneRest:e=>V(e)}))[n("boxShape")],separator:ne(o(N,{size:18}),"none"),share:s("desktop",j()),[n("share")]:v(),...W(),blockSpacing:X(),line:p("Line",!1,o(C,{}),"A line across the blocks, with a dot on each."),upcoming:p("Upcoming",!1,o(T,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:p("Shadow",!1,o(H,{})),fillColor:M(),_gBackground:i("Background image"),bgImage:s("desktop",_("Image","image/*")),bgImagePhone:s("mobile",_("Image","image/*")),darken:oe("Darken",o(P,{}),a.min,a.max,a.step,a.fallback,a.unit),darkenStyle:d("Darken style",o(f,{}),h,h[0].value),placement:ee("Content position"),_gLink:i("Link"),link:G("Link to"),jumpHighlight:p("Highlight when a link jumps here",!1,o(D,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],se],[[n("share")],A],[[n("wrap")],{all:[A,l]}],[["tabShape"],pe],[["separator"],c],[["columns",m("columns")],F],[[m("gap")],ge],[["justify"],l],[["wrap"],{all:[l,I]}],[["share"],I],[["line"],de],[["upcoming"],he],[["jumpHighlight"],ce],[["boxShape",n("boxShape")],me]]),resolveFields:(e,{fields:t})=>{const L=e.props;if(R(L.bgImage)){const B=k({fallback:{top:r.desktop,bottom:r.desktop,left:r.side,right:r.side},tablet:!0});return S(t,B)}return e.props.padV2!==!0?S(t,k({fallback:{top:24,bottom:24},tablet:!0})):t},showWhenFacts:le};export{Ce as FlexFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{phoneKey as t,tabletKey as h}from"efficient-easel/draw";import{BOX_CARD_PAD as d,BOX_DARKEN as s,BOX_DARKEN_STYLES as u,isBackgroundBox as X}from"../../../../../../format/lib/content/box-background.js";import{BOX_TAB_SHAPES as K,REEL_SHAPE_LABELS as j}from"../../../../../../format/lib/reel.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as v,CropIcon as f,LineBetweenIcon as G,LineSolidIcon as Y,OpacityIcon as J,ShadowIcon as z,StylesIcon as O,TableIcon as g,TargetIcon as V}from"efficient-easel/icons";import{boxBlockSpacingField as q,boxFillField as Q,boxColumnsFields as Z,boxShareField as $,boxSharePhoneField as ee,containerDirectionField as oe,containerGapRows as te,linkField as ne,plainText as ae,swapPadding as A,toggle as c,upload as R,withPanelOnly as ie}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as b,boxShapeOf as le}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as re,BOX_COLUMNS_MIN as se,boxPhoneRowOneLine as pe}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as E}from"../../../../../../format/lib/content/box-separator.js";import{group as i,phoneTwinFields as C}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as de,boxJustifyField as ce,boxWrapField as N,placementField as Se,select as l,sidesPaddingFields as D,slider as me}from"../../../box-fields.js";import{withRowRules as _e}from"../../../../../../render/lib/document/show-when.js";import{separatorField as he}from"../../../separator-field.js";import{LOOP_SCROLLS as ue}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as fe}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as Oe,ON_A_CARD as ge,cardDisplayField as Ae}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Re,mirrorCardsField as be}from"../../../mirror-cards-field.js";import{SHARED_COLUMNS_KEY as r,SHARED_COLUMNS_LABEL as L,SHARED_COLUMNS_OFF as x,sharedColumnsDrawn as F,sharedColumnsFits as H,SHARED_COLUMNS_PHONE_POINTS as Ee,SHARED_COLUMNS_POINTS as Ce}from"../../../../../../render/lib/content/box-shared-columns.js";const Ne={field:"bgImage",set:!0},I={field:"phoneRow",in:[2,3]},De={field:"direction",is:"tabs"},Le={field:"line",in:[!0,!1]},xe={field:"anchor",set:!0},T=["fixed","screen"],Fe={not:{any:[{field:"sectionHeightMode",in:T},{field:"sectionHeightModePhone",in:T}]}},He={context:"parent.line",is:!0},m={field:"direction",is:"row",default:"row"},p={not:ue},k={all:[m,p,{not:{field:"separator",in:E.map(e=>e.value)}},{not:{field:"line",is:!0}}]},Ie={all:[p,{not:{all:[m,{field:"separator",in:E.map(e=>e.value)}]}}]},w={not:{all:[k,{field:"columns",in:Array.from({length:re},(e,n)=>n+se)}]}},Te="sharedColumnsFits",B="sharedColumnsMisfit",P="sharedColumnsDraws",y="sharedColumnsPhoneDraws",ke={[Te]:e=>H(e.props??{}),[B]:e=>!H(e.props??{}),[P]:e=>F(e.props??{}).desktop,[y]:e=>F(e.props??{}).phone};function M(e){return{all:[{not:{context:B,is:!0}},{any:[ge,{field:e,set:!0}]}]}}const _={not:{context:P,is:!0}},S={not:{context:y,is:!0}},we={any:[_,S]};function Be(e){return{...e,render:n=>e.render({...n,value:pe(n.value)?"nowrap":"wrap"})}}const to={fields:_e({_gContent:i("Content"),content:fe.content,_gCardDisplay:i("Display"),cardDisplay:Ae(),_gLayout:i("Layout"),direction:oe("Flex"),tabShape:l("Tab shape",o(O,{}),K.map(e=>({label:j[e],value:e})),"tabs"),mirrorCards:be(),label:ie(ae("Tab name")),...te("Flex"),justify:ce(),align:de(),...C("wrap",N(),void 0,{phoneRow:Be(N())}),boxShape:a("desktop",l("Box shape",o(f,{}),[...b],"auto")),[t("boxShape")]:C("boxShape",l("Box shape",o(f,{}),[...b],"auto",{phoneRest:e=>le(e)}))[t("boxShape")],separator:he(o(G,{size:18}),"none"),share:a("desktop",$()),[t("share")]:ee(),[r]:a("desktop",l(L,o(g,{}),[...Ce],x)),[t(r)]:a("mobile",l(L,o(g,{}),[...Ee],x)),...Z(),blockSpacing:q(),line:c("Line",!1,o(Y,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,o(v,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:c("Shadow",!1,o(z,{})),fillColor:Q(),_gBackground:i("Background image"),bgImage:a("desktop",R("Image","image/*")),bgImagePhone:a("mobile",R("Image","image/*")),darken:me("Darken",o(J,{}),s.min,s.max,s.step,s.fallback,s.unit),darkenStyle:l("Darken style",o(O,{}),u,u[0].value),placement:Se("Content position"),_gLink:i("Link"),link:ne("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,o(V,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],Ne],[[t("share")],{all:[I,S]}],[[r],M(r)],[[t(r)],M(t(r))],[[t("wrap")],{all:[I,p,S]}],[["phoneRow"],S],[["tabShape"],De],[["separator"],m],[["columns",h("columns")],k],[[h("gap")],Ie],[["justify"],{all:[p,we]}],[["wrap"],{all:[p,w,_]}],[["share"],{all:[w,_]}],[["line"],Le],[["upcoming"],He],[["jumpHighlight"],xe],[["boxShape",t("boxShape")],Fe]]),resolveFields:(e,{fields:n})=>{const U=e.props;if(X(U.bgImage)){const W=D({fallback:{top:d.desktop,bottom:d.desktop,left:d.side,right:d.side},tablet:!0});return A(n,W)}return e.props.padV2!==!0?A(n,D({fallback:{top:24,bottom:24},tablet:!0})):n},showWhenFacts:{...Oe,...Re,...ke}};export{to as FlexFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as a,REEL_SHAPE_DEFAULT as m,HERO_REEL_SHAPES as d,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as R}from"../../../../../../format/lib/reel.js";import{DEFAULT_TINT as P}from"../../../../../../format/lib/content/tint.js";import{HERO_TEXTURE_SHOWN_DEFAULT as O}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as L,HERO_ARROW_SHAPE_LABELS as u,HERO_ARROW_SHAPES as H,HERO_ARROWS_PLACEMENT_DEFAULT as h,HERO_ARROWS_SHOWN_DEFAULT as w}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as I,EyeIcon as t,OpacityIcon as T,PhoneIcon as s,PlayIcon as k,SlideArrowsBareIcon as D,SlideArrowsRoundIcon as f,SlideArrowsSquareIcon as g,SlidePickerBarIcon as U,SlidePickerCardsIcon as F,SlidePickerDotsIcon as y,SlidePickerNumbersIcon as N,SlidePickerSquaresIcon as b,SquareIcon as E}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as W}from"efficient-shell/icons/efficient-looks";const x=W,C={cards:e(F,{}),dots:e(y,{}),numbers:e(N,{}),bar:e(U,{}),squares:e(b,{})},B={outline:e(f,{}),solid:e(x,{}),square:e(g,{}),bare:e(D,{})};import{colorInput as q,toggle as i}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as M,iconPickerRow as c,placementField as n,segmented as _,slider as p}from"../../../box-fields.js";import{deviceField as l,deviceNote as j}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as Y,HERO_PHONE_SIDEWAYS_LABEL as v,HERO_PHONE_UPDOWN_DEFAULT as K,HERO_PHONE_UPDOWN_LABEL as X,phoneSidewaysPoints as z,phoneUpDownPoints as G}from"../../../../../../format/lib/hero-phone-stack.js";import{heightField as S}from"../../shared-fields.js";import{HeroSlots as J}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const _e={fields:{_dDevice:j(),_gContent:o("Content"),slides:J.slides,_gStyle:o("Style"),alignment:M(),_gTexture:o("Texture"),showTexture:i("Show texture",O,e(t,{})),textureColor:q("Texture color",P),textureOpacity:p("Texture opacity",e(T,{}),0,100,1,40,"%"),_gLayout:o("Layout"),heightDesktop:S("desktop"),heightMobile:S("mobile"),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(k,{})),autoplayInterval:p("Still time per slide",e(I,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",R,e(t,{})),pickerShape:c("Slide picker shape",e(E,{}),d.map(r=>({label:A[r],value:r,picture:C[r]})),m),pickerPlacement:n("Slide picker placement",{fallback:a}),_gArrows:o("Arrows"),showArrows:i("Show arrows",w,e(t,{})),arrowsShape:c("Arrows shape",e(E,{}),H.map(r=>({label:u[r],value:r,picture:B[r]})),L),arrowsPlacement:n("Arrows placement",{fallback:h}),_gPhone:l("mobile",o("On a phone")),phoneUpDown:l("mobile",_(X,e(s,{}),G(),K)),phoneSideways:l("mobile",_(v,e(s,{}),z(),Y))}};export{_e as HeroFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as m,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as A,REEL_SHAPE_LABELS as R,REEL_SHOWN_DEFAULT as P}from"../../../../../../format/lib/reel.js";import{DEFAULT_TINT as O}from"../../../../../../format/lib/content/tint.js";import{HERO_TEXTURE_SHOWN_DEFAULT as L}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as u,HERO_ARROW_SHAPE_LABELS as H,HERO_ARROW_SHAPES as h,HERO_ARROWS_PLACEMENT_DEFAULT as w,HERO_ARROWS_SHOWN_DEFAULT as I}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as t,OpacityIcon as k,PhoneIcon as s,PlayIcon as D,SlideArrowsBareIcon as f,SlideArrowsRoundIcon as g,SlideArrowsSquareIcon as U,SlidePickerBarIcon as F,SlidePickerCardsIcon as y,SlidePickerDotsIcon as N,SlidePickerNumbersIcon as b,SlidePickerSquaresIcon as W,SquareIcon as E}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as x}from"efficient-shell/icons/efficient-looks";const C=x,B={cards:e(y,{}),dots:e(N,{}),numbers:e(b,{}),bar:e(F,{}),squares:e(W,{})},q={outline:e(g,{}),solid:e(C,{}),square:e(U,{}),bare:e(f,{})};import{colorInput as M,toggle as i}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as j,iconPickerRow as c,placementField as n,segmented as p,slider as _}from"../../../box-fields.js";import{deviceField as l,deviceNote as Y}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as v,HERO_PHONE_SIDEWAYS_LABEL as K,HERO_PHONE_UPDOWN_DEFAULT as X,HERO_PHONE_UPDOWN_LABEL as z,phoneSidewaysPoints as G,phoneUpDownPoints as J}from"../../../../../../format/lib/hero-phone-stack.js";import{heightField as S}from"../../shared-fields.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const pe={fields:{_dDevice:Y(),_gContent:o("Content"),slides:a.slides,strip:a.strip,_gStyle:o("Style"),alignment:j(),_gTexture:o("Texture"),showTexture:i("Show texture",L,e(t,{})),textureColor:M("Texture color",O),textureOpacity:_("Texture opacity",e(k,{}),0,100,1,40,"%"),_gLayout:o("Layout"),heightDesktop:S("desktop"),heightMobile:S("mobile"),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(D,{})),autoplayInterval:_("Still time per slide",e(T,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",P,e(t,{})),pickerShape:c("Slide picker shape",e(E,{}),A.map(r=>({label:R[r],value:r,picture:B[r]})),d),pickerPlacement:n("Slide picker placement",{fallback:m}),_gArrows:o("Arrows"),showArrows:i("Show arrows",I,e(t,{})),arrowsShape:c("Arrows shape",e(E,{}),h.map(r=>({label:H[r],value:r,picture:q[r]})),u),arrowsPlacement:n("Arrows placement",{fallback:w}),_gPhone:l("mobile",o("On a phone")),phoneUpDown:l("mobile",p(z,e(s,{}),J(),X)),phoneSideways:l("mobile",p(K,e(s,{}),G(),v))}};export{pe as HeroFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as l,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as m}from"efficient-easel/icons";import{containerDirectionField as c,containerGapRows as h,heroGroupPlacementPoints as G,plainText as H,withIdentifier as g,withOffPage as R,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as F,boxJustifyField as O,boxWrapField as P,placementField as D,positionFields as E,sidesPaddingFields as w,slider as s}from"../../../box-fields.js";import{PH as I}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as T}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:T({_gContent:o("Content"),name:x(g(R(H("Box name",I.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:G}),width:s("Width",r(m,{}),l,p,5,u,"%"),direction:c("HeroGroup"),...h("HeroGroup"),justify:O(),align:F(),wrap:P(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...w({tablet:!0})},[[["placement"],{context:"heroGroupDepth",is:0}]]),resolveFields:(e,{fields:t,appState:d})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(d?.data,a)===0)return t;const i={...t};return i.width=s("Width",r(m,{}),l,p,5,_,"%"),i}};export{S as HeroGroupFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as l,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as d}from"efficient-easel/icons";import{containerDirectionField as c,containerGapRows as h,heroGroupPlacementPoints as G,plainText as H,withIdentifier as g,withOffPage as R,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as F,boxJustifyField as O,boxWrapField as P,placementField as D,positionFields as E,sidesPaddingFields as w,slider as m}from"../../../box-fields.js";import{PH as I}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as T}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:T({_gContent:o("Content"),name:x(g(R(H("Box name",I.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:G}),width:m("Width",r(d,{}),l,p,5,u,"%"),direction:c("HeroGroup"),...h("HeroGroup"),justify:O(),align:F(),wrap:P(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...w({tablet:!0})},[[["placement"],{context:"heroGroupDepth",is:0,default:0}]]),resolveFields:(e,{fields:t,appState:s})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(s?.data,a)===0)return t;const i={...t};return i.width=m("Width",r(d,{}),l,p,5,_,"%"),i}};export{S as HeroGroupFields};
@@ -1,5 +1,6 @@
1
- import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
1
+ import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/document/show-when-attach.js";
2
2
  export declare const NOT_CARD_OF_TEMPLATE = "notCardOfTemplate";
3
+ export declare const ON_A_CARD: ShowWhenRule;
3
4
  export declare const CARD_BOX_FACTS: BlockShowWhenFacts;
4
5
  type Child = {
5
6
  type: string;
@@ -1 +1 @@
1
- "use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as x}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return x(n)?n:[]}const m=e=>!!e.props?._hidden;function R(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?R(t,n):n(t)?[]:[t])}function P(e,n,t){const i=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,R as cardDisplayParts,w as withChildShown};
1
+ "use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as R}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return R(n)?n:[]}const m=e=>!!e.props?._hidden;function x(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?x(t,n):n(t)?[]:[t])}function P(e,n,t){const i=x(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,M as ON_A_CARD,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,x as cardDisplayParts,w as withChildShown};
@@ -0,0 +1,20 @@
1
+ import { MIRROR_CARDS_OPTIONS } from "../../../format/lib/content/mirror-cards.js";
2
+ import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
3
+ export declare const MIRROR_CARDS_IDLE = "mirrorCardsIdle";
4
+ export declare const MIRROR_CARDS_FACTS: BlockShowWhenFacts;
5
+ type Answer = (typeof MIRROR_CARDS_OPTIONS)[number]["value"];
6
+ export declare function mirrorCardsOptions(disabled?: boolean): {
7
+ value: Answer;
8
+ label: string;
9
+ title?: string;
10
+ disabled: boolean;
11
+ }[];
12
+ export declare function mirrorCardsField(): {
13
+ render: ({ value, onChange, readOnly }: {
14
+ value?: unknown;
15
+ onChange: (next: unknown) => void;
16
+ readOnly?: boolean;
17
+ }) => import("react").JSX.Element;
18
+ type: "custom";
19
+ };
20
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as n}from"react/jsx-runtime";import{SettingsDefaultReset as m,SettingsField as R}from"efficient-easel/panel";import{Segmented as u}from"efficient-shell/ui";import{SwapIcon as c}from"efficient-easel/icons";import{describedAs as f}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as C}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as a,MIRROR_CARDS_OFF as s,MIRROR_CARDS_OPTIONS as l,MIRROR_CARDS_TITLES as S,mirrorCardsActs as O,mirrorCardsOf as _,mirrorCardsWrite as I,ownsCard as b}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as A,say as t}from"../../../format/lib/editor-words.js";import{cardCopyPlace as v}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as D}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as h}from"../../../format/lib/document/show-when-attach.js";const d="mirrorCardsIdle",z={[d]:(r,e)=>{const o=v(e.appState,r.props?.id),i=r.props??{};return o===void 0?void 0:!O(i,b(o),D(i).desktop)}};function w(r=!1){return l.map(e=>({value:e.value,label:t(e.label),title:e.value===s?void 0:t(S[e.value]),disabled:r}))}function x({value:r,onChange:e,readOnly:o}){const i=_(r)??s;return n(R,{label:t(a),icon:n(c,{}),action:n(m,{words:A()?.panel,label:t(a),changed:i!==s,detail:t("Off"),onReset:()=>e(void 0)}),children:n(u,{size:"sm",block:!0,label:t(a),value:i,onChange:p=>e(I(p)),options:w(o===!0)})})}function B(){return h(C("desktop",{type:"custom",...f({},{type:"radio",label:a,options:l.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:o})=>n(x,{value:r,onChange:e,readOnly:o})}),{not:{context:d,is:!0}})}export{z as MIRROR_CARDS_FACTS,d as MIRROR_CARDS_IDLE,B as mirrorCardsField,w as mirrorCardsOptions};
@@ -0,0 +1,7 @@
1
+ import { type Carried, type Dropped, type SectionNode } from "../../../render/lib/sections/section-to-box.js";
2
+ export type HeroTickerConversion = {
3
+ node: SectionNode;
4
+ carried: Carried[];
5
+ dropped: Dropped[];
6
+ };
7
+ export declare function heroTickerToStrip(old: SectionNode): HeroTickerConversion;
@@ -0,0 +1 @@
1
+ import{readPartMotions as _}from"../../../render/lib/animation/part-motion.js";import{STRIP_SECTION_TO_BOX as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-strip.js";import{SECTION_ACCENT_INHERIT as g}from"../../../format/lib/content/section-surface.js";import{HERO_STRIP_SLOT as m,legacyTickerWords as l,TICKER_MOTION_PART as i}from"../../../format/lib/hero-ticker.js";import{nonEmptyString as u}from"../../../format/lib/non-empty-string.js";import{convertSection as O}from"../../../render/lib/sections/section-to-box.js";function M(t){const{showTicker:n,tickerItems:d,...k}=t.props,y=u(t.props.id)??"Hero",r=[],o=[],e={...k},s=l({tickerItems:d}),p=n!==!1&&s.length>0,c=_(t.props),h=c[i];if(h){const{[i]:a,...w}=c;Object.keys(w).length?e._partMotion=w:delete e._partMotion,r.push({key:"_partMotion",home:p?`${i} → the strip Box's own Entrance`:`${i} → nothing: no strip is drawn`})}if(!p)return e[m]=[],"showTicker"in t.props&&o.push({key:"showTicker",why:n===!1?"switched off: an empty strip draws nothing, the same as today":"no words: the strip drew nothing published, so the strip stays empty"}),"tickerItems"in t.props&&o.push({key:"tickerItems",why:s.length?"switched off: the words were not drawn, and an empty strip draws nothing":"no row has words: an empty row draws nothing published"}),{node:{type:t.type,props:e},carried:r,dropped:o};const T={type:"Ticker",props:{id:`${y}~strip`,items:s.map(a=>({text:a})),tone:"plain",sectionAccent:g,borders:!1,...h??{}}},f=O(T,I.Ticker);return e[m]=[f.node],"showTicker"in t.props&&o.push({key:"showTicker",why:"on: the strip Box is the switch now (delete or hide it like any block)"}),r.push({key:"tickerItems",home:`the strip Box: one Text block per row with words (${s.length}), in order`}),{node:{type:t.type,props:e},carried:r,dropped:o}}export{M as heroTickerToStrip};
@@ -84,6 +84,11 @@ export declare function headingCaseList(styles: readonly string[], saved: readon
84
84
  list: StoredTextStyle[];
85
85
  changed: boolean;
86
86
  };
87
+ export declare const HERO_MOVES: Readonly<Record<string, (node: SectionNode) => {
88
+ node: SectionNode;
89
+ carried: Carried[];
90
+ dropped: Dropped[];
91
+ }>>;
87
92
  export declare function dryRunSections(pages: readonly DryRunPage[], opts?: {
88
93
  types?: readonly string[];
89
94
  draw?: (node: SectionNode) => string;
@@ -1,3 +1,3 @@
1
- import{defaultTextStyles as N}from"efficient-easel/text-styles/model";import{headingDefaultPx as A}from"../../../render/components/Heading.js";import{headingLevelOfStyle as M}from"../../../render/components/Text.js";import{migrateLegacyPageData as D}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as v}from"../../../format/lib/document/renamed-props.js";import{listToWrite as E,setStyleValues as L}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as R,bandPresetIndex as z}from"../../../format/lib/theme.js";import{convertSection as C,convertSectionsInPage as j,sectionToBoxRow as S,sectionToBoxTypes as F}from"../../../render/lib/sections/section-to-box.js";const P={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function se(e,t,d=N()){const i=s=>t==="heading"?A(M(s)):P[s];let n;for(const{id:s,kind:r}of d){const o=r===t?i(s):void 0;if(o===void 0)continue;const a=Math.abs(o-e),c=n?Math.abs(n.px-e):1/0;(a<c||a===c&&n&&o>n.px)&&(n={id:s,px:o})}if(!n)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return n.id}function B(e){const[t,d]=e.split("/");return t&&d?{schema:t,site:d}:void 0}function ne(e){const t=i=>typeof i=="string"?i:null,d=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:d,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const I=new Set([null,"authored"]);function W(e,t){const d=E(t),i=d.filter(s=>e.includes(s.id)&&s.values.letterCase===void 0).map(s=>s.id);return{list:i.reduce((s,r)=>L(s,r,{letterCase:"upper"}),d),changed:i.length>0}}function Y(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return J(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!I.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:d,changed:i}=W(e.styles,t.textStyles?t.textStylesList??null:null);return i?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:d}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function J(e,t){const d=t?.themePresets;if(!t||!d)return{undecided:"the site's theme presets were not read"};const i=d[e.page];if(!i)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(z(d,e.page)>=0)return{notNeeded:"the site already has the band preset"};const n=R(i);return{send:{kind:e.kind,page:e.page,index:d.length,preset:n,themePresets:[...d,n]}}}function O(e){const t=e?.content;return Array.isArray(t)?v(D(e)):e}function oe(e,t={}){const d=[...t.types??F()],i=d.filter(p=>!S(p)),n=new Set(d.filter(p=>S(p))),s=[],r=[],o={},a={},c=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),f=new Map,m=(p,w,l)=>{const k=`${p.schema}/${p.site}`;let $=f.get(k);$||f.set(k,$={...p,facts:!!w,writes:[],undecided:[],notNeeded:[]});const h=Y(l,w);if("send"in h){const g=$.writes.find(b=>JSON.stringify(b.write)===JSON.stringify(h.send));g?g.nodes+=1:$.writes.push({write:h.send,reason:l.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[x,y]="undecided"in h?[$.undecided,h.undecided]:[$.notNeeded,h.notNeeded],u=x.find(g=>g.kind===l.kind&&g.why===y);u?u.nodes+=1:x.push({kind:l.kind,why:y,nodes:1})};for(const p of e){const w=O(p.layout)?.content;Array.isArray(w)&&w.forEach((l,k)=>{if(!l||typeof l.type!="string"||!n.has(l.type))return;const $=S(l.type),h=B(p.label),x=h?c.get(`${h.schema}/${h.site}`):void 0,y=C(l,$,x?{site:x}:{});if(y.skipped!==void 0){r.push({page:p.label,index:k,type:l.type,id:String(l.props?.id??""),why:y.skipped});return}if(h)for(const _ of y.siteWrites)m(h,x,_);const u={page:p.label,index:k,type:l.type,id:String(l.props?.id??""),carried:y.carried,dropped:y.dropped,restyled:y.restyled},g=t.draw;g&&(u.before=g(l),u.after=y.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),s.push(u);const b=o[l.type]??={nodes:0,pages:0,dropped:{}};b.nodes+=1,(a[l.type]??=new Set).add(p.label),b.pages=a[l.type].size;for(const _ of y.dropped)b.dropped[_.key]=(b.dropped[_.key]??0)+1})}return{types:d,noRow:i,pages:e.length,nodes:s,skipped:r,byType:o,sites:[...f.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(d=>{const i=`${t.schema}/${t.siteName(d.site)}/${d.slug}`;return[{label:`${i} (draft)`,layout:d.layout},{label:`${i} (published)`,layout:d.published_layout}]})}function de(e,t){const d=t.types.filter(i=>S(i));return e.map(i=>{const n={id:i.id,slug:i.slug};if(JSON.stringify(i.layout)!==JSON.stringify(i.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const s=O(i.layout),r=Array.isArray(s?.content)?s.content:[],o=[],a=[];for(const f of r){if(!f||!d.includes(f.type))continue;const m=String(f.props?.id??""),p=S(f.type).skip?.(f.props);p===void 0?o.push({type:f.type,id:m}):a.push({type:f.type,id:m,why:p})}if(!o.length)return{...n,converted:o,skipped:a};const c=j(s,d,t.site?{site:t.site}:{});return{...n,patch:{layout:c,expected_updated_at:i.layout_updated_at},converted:o,skipped:a}})}function re(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(d=>d.write)}))}function U(e){const t=new Map;for(const d of e.nodes)for(const i of d.restyled){const n=i.textStyle??"none",s=P[n],r=i.size??s,o=i.sizePhone??i.size??s;if(r===void 0||o===void 0)continue;const a=i.was.size,c=i.was.sizePhone??i.was.size,f=[d.type,i.key,n,a,c,r,o].join("|"),m=t.get(f);m?m.nodes+=1:t.set(f,{type:d.type,key:i.key,textStyle:n,oldPx:a,oldPhonePx:c,newPx:r,newPhonePx:o,diff:r-a,diffPhone:o-c,nodes:1})}return[...t.values()]}const T=e=>e>0?`+${e}`:String(e),G=e=>N().find(t=>t.id===e)?.name??e,H=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function ae(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const r=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${r} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const r=n.get(s.type)??n.set(s.type,new Map).get(s.type);r.set(s.why,(r.get(s.why)??0)+1)}for(const[s,r]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[o,a]of r)t.push(`- ×${a}: ${o}`)}}for(const[n,s]of Object.entries(e.byType)){const r=Object.entries(s.dropped);if(!r.length)continue;t.push("",`## ${n} — dropped`,"");const o=new Map;for(const a of e.nodes)if(a.type===n)for(const c of a.dropped)o.set(c.key,c.why);for(const[a,c]of r)t.push(`- \`${a}\` ×${c}: ${o.get(a)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,r=n.facts?"yes":"NO";for(const o of n.writes)t.push(`| ${s} | ${r} | ${H(o.write)} | send | ${o.nodes} | ${o.reason} |`);for(const o of n.undecided)t.push(`| ${s} | ${r} | ${o.kind} | UNDECIDED | ${o.nodes} | ${o.why} |`);for(const o of n.notNeeded)t.push(`| ${s} | ${r} | ${o.kind} | not needed | ${o.nodes} | ${o.why} |`)}}const d=U(e);if(d.length){const n=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],s=o=>`| ${o.type} | \`${o.key}\` | ${o.oldPx} (${o.oldPhonePx}) | ${G(o.textStyle)} | ${o.newPx} (${o.newPhonePx}) | ${T(o.diff)} (${T(o.diffPhone)}) | ${o.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...n,...d.map(s));const r=d.filter(o=>Math.abs(o.diff)>2||Math.abs(o.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),r.length?t.push(...n,...r.map(s)):t.push("None.")}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
1
+ import{defaultTextStyles as M}from"efficient-easel/text-styles/model";import{headingDefaultPx as L}from"../../../render/components/Heading.js";import{headingLevelOfStyle as z}from"../../../render/components/Text.js";import{migrateLegacyPageData as C}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as j}from"../../../format/lib/document/renamed-props.js";import{listToWrite as F,setStyleValues as I}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as B,bandPresetIndex as W}from"../../../format/lib/theme.js";import{convertSection as H,convertSectionsInPage as Y,sectionToBoxRow as P,sectionToBoxTypes as J}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as U}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as v}from"./hero-ticker-to-strip.js";const E={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function fe(e,t,o=M()){const r=n=>t==="heading"?L(z(n)):E[n];let s;for(const{id:n,kind:d}of o){const i=d===t?r(n):void 0;if(i===void 0)continue;const c=Math.abs(i-e),l=s?Math.abs(s.px-e):1/0;(c<l||c===l&&s&&i>s.px)&&(s={id:n,px:i})}if(!s)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return s.id}function G(e){const[t,o]=e.split("/");return t&&o?{schema:t,site:o}:void 0}function ye(e){const t=r=>typeof r=="string"?r:null,o=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:o,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const V=new Set([null,"authored"]);function q(e,t){const o=F(t),r=o.filter(n=>e.includes(n.id)&&n.values.letterCase===void 0).map(n=>n.id);return{list:r.reduce((n,d)=>I(n,d,{letterCase:"upper"}),o),changed:r.length>0}}function X(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return K(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!V.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:o,changed:r}=q(e.styles,t.textStyles?t.textStylesList??null:null);return r?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:o}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function K(e,t){const o=t?.themePresets;if(!t||!o)return{undecided:"the site's theme presets were not read"};const r=o[e.page];if(!r)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(W(o,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=B(r);return{send:{kind:e.kind,page:e.page,index:o.length,preset:s,themePresets:[...o,s]}}}const O={Hero:v,HeroSingle:e=>{const t=U(e),o=v(t.node),r=s=>s in e.props;return{node:o.node,carried:[...t.carried,...o.carried.filter(s=>r(s.key))],dropped:[...t.dropped,...o.dropped.filter(s=>r(s.key))]}}};function Q(e,t){if(!t.length||!Array.isArray(e.content))return e;let o=!1;const r=e.content.map(s=>!s||!t.includes(s.type)?s:(o=!0,O[s.type](s).node));return o?{...e,content:r}:e}function D(e){const t=e?.content;return Array.isArray(t)?j(C(e)):e}function he(e,t={}){const o=[...t.types??J()],r=o.filter(p=>!P(p)&&!(p in O)),s=new Set(o.filter(p=>p in O)),n=new Set(o.filter(p=>P(p))),d=[],i=[],c={},l={},w=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),$=new Map,f=(p,x,a)=>{const k=`${p.schema}/${p.site}`;let b=$.get(k);b||$.set(k,b={...p,facts:!!x,writes:[],undecided:[],notNeeded:[]});const y=X(a,x);if("send"in y){const g=b.writes.find(_=>JSON.stringify(_.write)===JSON.stringify(y.send));g?g.nodes+=1:b.writes.push({write:y.send,reason:a.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[S,h]="undecided"in y?[b.undecided,y.undecided]:[b.notNeeded,y.notNeeded],u=S.find(g=>g.kind===a.kind&&g.why===h);u?u.nodes+=1:S.push({kind:a.kind,why:h,nodes:1})};for(const p of e){const x=D(p.layout)?.content;Array.isArray(x)&&x.forEach((a,k)=>{if(a&&typeof a.type=="string"&&s.has(a.type)){const m=O[a.type](a),N={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:m.carried,dropped:m.dropped,restyled:[]};t.draw&&(N.before=t.draw(a),N.after=t.draw(m.node),N.sameMarkup=N.before===N.after),d.push(N);const T=c[a.type]??={nodes:0,pages:0,dropped:{}};T.nodes+=1,(l[a.type]??=new Set).add(p.label),T.pages=l[a.type].size;for(const A of m.dropped)T.dropped[A.key]=(T.dropped[A.key]??0)+1;return}if(!a||typeof a.type!="string"||!n.has(a.type))return;const b=P(a.type),y=G(p.label),S=y?w.get(`${y.schema}/${y.site}`):void 0,h=H(a,b,S?{site:S}:{});if(h.skipped!==void 0){i.push({page:p.label,index:k,type:a.type,id:String(a.props?.id??""),why:h.skipped});return}if(y)for(const m of h.siteWrites)f(y,S,m);const u={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:h.carried,dropped:h.dropped,restyled:h.restyled},g=t.draw;g&&(u.before=g(a),u.after=h.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),d.push(u);const _=c[a.type]??={nodes:0,pages:0,dropped:{}};_.nodes+=1,(l[a.type]??=new Set).add(p.label),_.pages=l[a.type].size;for(const m of h.dropped)_.dropped[m.key]=(_.dropped[m.key]??0)+1})}return{types:o,noRow:r,pages:e.length,nodes:d,skipped:i,byType:c,sites:[...$.values()],siteFacts:[...t.sites??[]]}}function ue(e,t){return e.flatMap(o=>{const r=`${t.schema}/${t.siteName(o.site)}/${o.slug}`;return[{label:`${r} (draft)`,layout:o.layout},{label:`${r} (published)`,layout:o.published_layout}]})}function ge(e,t){const o=t.types.filter(s=>P(s)),r=t.types.filter(s=>s in O);return e.map(s=>{const n={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=D(s.layout),i=Array.isArray(d?.content)?d.content:[],c=[],l=[];for(const f of i){if(f&&r.includes(f.type)){c.push({type:f.type,id:String(f.props?.id??"")});continue}if(!f||!o.includes(f.type))continue;const p=String(f.props?.id??""),x=P(f.type).skip?.(f.props);x===void 0?c.push({type:f.type,id:p}):l.push({type:f.type,id:p,why:x})}if(!c.length)return{...n,converted:c,skipped:l};const w=Y(d,o,t.site?{site:t.site}:{}),$=Q(w,r);return{...n,patch:{layout:$,expected_updated_at:s.layout_updated_at},converted:c,skipped:l}})}function me(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(o=>o.write)}))}function Z(e){const t=new Map;for(const o of e.nodes)for(const r of o.restyled){const s=r.textStyle??"none",n=E[s],d=r.size??n,i=r.sizePhone??r.size??n;if(d===void 0||i===void 0)continue;const c=r.was.size,l=r.was.sizePhone??r.was.size,w=[o.type,r.key,s,c,l,d,i].join("|"),$=t.get(w);$?$.nodes+=1:t.set(w,{type:o.type,key:r.key,textStyle:s,oldPx:c,oldPhonePx:l,newPx:d,newPhonePx:i,diff:d-c,diffPhone:i-l,nodes:1})}return[...t.values()]}const R=e=>e>0?`+${e}`:String(e),ee=e=>M().find(t=>t.id===e)?.name??e,te=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function $e(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[s,n]of Object.entries(e.byType)){const d=Object.keys(n.dropped).length;t.push(`| ${s} | ${n.nodes} | ${n.pages} | ${d} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const s=new Map;for(const n of e.skipped){const d=s.get(n.type)??s.set(n.type,new Map).get(n.type);d.set(n.why,(d.get(n.why)??0)+1)}for(const[n,d]of s){t.push("",`## ${n} — skipped (not converted)`,"");for(const[i,c]of d)t.push(`- ×${c}: ${i}`)}}for(const[s,n]of Object.entries(e.byType)){const d=Object.entries(n.dropped);if(!d.length)continue;t.push("",`## ${s} — dropped`,"");const i=new Map;for(const c of e.nodes)if(c.type===s)for(const l of c.dropped)i.set(l.key,l.why);for(const[c,l]of d)t.push(`- \`${c}\` ×${l}: ${i.get(c)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const s=n=>n==null?"—":String(n);for(const n of e.siteFacts)t.push(`| ${n.schema}/${n.site} | ${s(n.ownThemeRow)} | ${n.deleted?"YES":"no"} | ${s(n.headingCase)} | ${s(n.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const s of e.sites){const n=`${s.schema}/${s.site}`,d=s.facts?"yes":"NO";for(const i of s.writes)t.push(`| ${n} | ${d} | ${te(i.write)} | send | ${i.nodes} | ${i.reason} |`);for(const i of s.undecided)t.push(`| ${n} | ${d} | ${i.kind} | UNDECIDED | ${i.nodes} | ${i.why} |`);for(const i of s.notNeeded)t.push(`| ${n} | ${d} | ${i.kind} | not needed | ${i.nodes} | ${i.why} |`)}}const o=Z(e);if(o.length){const s=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],n=i=>`| ${i.type} | \`${i.key}\` | ${i.oldPx} (${i.oldPhonePx}) | ${ee(i.textStyle)} | ${i.newPx} (${i.newPhonePx}) | ${R(i.diff)} (${R(i.diffPhone)}) | ${i.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...s,...o.map(n));const d=o.filter(i=>Math.abs(i.diff)>2||Math.abs(i.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),d.length?t.push(...s,...d.map(n)):t.push("None.")}const r=e.nodes.filter(s=>s.sameMarkup!==void 0);if(r.length){const s=r.filter(n=>n.sameMarkup).length;t.push("",`Markup equal before and after: ${s} of ${r.length} (a hint; the pixels decide).`)}return t.join(`
2
2
  `)+`
3
- `}export{P as BODY_STYLE_PX_AT_DEFAULTS,U as bodyStyleRows,ae as dryRunMarkdown,oe as dryRunSections,W as headingCaseList,se as nearestTextStyle,de as pageEdits,ie as pagesFromCliExport,ne as siteFactsFromRead,B as siteOfLabel,re as siteWritesFile};
3
+ `}export{E as BODY_STYLE_PX_AT_DEFAULTS,O as HERO_MOVES,Z as bodyStyleRows,$e as dryRunMarkdown,he as dryRunSections,q as headingCaseList,fe as nearestTextStyle,ge as pageEdits,ue as pagesFromCliExport,ye as siteFactsFromRead,G as siteOfLabel,me as siteWritesFile};
@@ -1 +1 @@
1
- const s={left:"justify-start",center:"justify-center",right:"justify-end"},i={text:{left:"max-[720px]:text-left",center:"max-[720px]:text-center",right:"max-[720px]:text-right"},place:{left:"max-[720px]:mx-0",center:"max-[720px]:mx-auto",right:"max-[720px]:ml-auto max-[720px]:mr-0"},items:{left:"max-[720px]:grid-cols-1 max-[720px]:justify-items-start",center:"max-[720px]:grid-cols-1 max-[720px]:justify-items-center",right:"max-[720px]:justify-items-end"},justify:{left:"max-[720px]:justify-start",center:"max-[720px]:justify-center",right:"max-[720px]:justify-end"}};function x(t){return t==="left"||t==="center"||t==="right"?t:void 0}function f(t,r,n){const e=x(n);return!e||e===(x(r)??"left")?"":i[t][e]}export{s as BLOCK_ALIGN_JUSTIFY,f as alignPhoneClass,x as blockAlignOf};
1
+ const l={left:"justify-start",center:"justify-center",right:"justify-end"},n={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function i(t){return t==="left"||t==="center"||t==="right"?t:void 0}function s(t,a,r){const e=i(r);return!e||e===(i(a)??"left")?"":n[t][e]}export{l as BLOCK_ALIGN_JUSTIFY,s as alignPhoneClass,i as blockAlignOf};
@@ -1,7 +1,9 @@
1
+ import type { BoxAlign } from "efficient-easel/screen/lib/document/box-fields";
1
2
  export declare const NESTED_BOX_PADDING: {
2
3
  readonly sectionPaddingTop: 0;
3
4
  readonly sectionPaddingBottom: 0;
4
5
  };
6
+ export declare const BOX_ALIGN_CLASS: Record<BoxAlign, string>;
5
7
  export declare function boxLayoutClasses(justify: unknown, align: unknown): string;
6
8
  export declare function boxWrapClass(wrap: unknown): string;
7
9
  export declare const BOX_SHARE_LABEL = "Block widths";