efficient-web-builder 67.1.0 → 67.2.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 (55) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/editor/components/StorefrontEditor.js +1 -1
  3. package/dist/editor/components/storefront-editor.css +131 -0
  4. package/dist/editor/lib/animation/fields.js +1 -1
  5. package/dist/editor/lib/animation/hover-fields.d.ts +8 -0
  6. package/dist/editor/lib/animation/hover-fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  8. package/dist/editor/lib/document/box-fields.d.ts +1 -1
  9. package/dist/editor/lib/document/card-display-chips.d.ts +1 -0
  10. package/dist/editor/lib/document/card-display-chips.js +1 -1
  11. package/dist/editor/lib/document/page-root.js +2 -2
  12. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  13. package/dist/format/lib/animation/hover.d.ts +3 -0
  14. package/dist/format/lib/animation/hover.js +1 -1
  15. package/dist/format/lib/content/box-shape.d.ts +1 -1
  16. package/dist/format/lib/content/container-gap.d.ts +2 -2
  17. package/dist/format/lib/content/container-gap.js +1 -1
  18. package/dist/format/lib/content/css-length.d.ts +17 -1
  19. package/dist/format/lib/content/css-length.js +1 -1
  20. package/dist/format/lib/content/hover-media.d.ts +6 -1
  21. package/dist/format/lib/content/hover-media.js +1 -1
  22. package/dist/format/lib/content/image-treatment.d.ts +3 -0
  23. package/dist/format/lib/content/image-treatment.js +1 -1
  24. package/dist/format/lib/content/page-width.d.ts +3 -3
  25. package/dist/format/lib/content/page-width.js +1 -1
  26. package/dist/format/lib/editor-words-catalogue.d.ts +4 -0
  27. package/dist/format/lib/editor-words-catalogue.js +3 -3
  28. package/dist/format/lib/site-theme-row.d.ts +6 -0
  29. package/dist/format/lib/source-rules/no-hard-coded-option-rows.d.ts +1 -1
  30. package/dist/format/lib/source-rules/no-hard-coded-option-rows.js +1 -1
  31. package/dist/format/lib/source-rules/site-square-by-default.js +1 -1
  32. package/dist/format/lib/theme.d.ts +1 -1
  33. package/dist/format/lib/theme.js +4 -4
  34. package/dist/render/components/CardRowContext.d.ts +3 -1
  35. package/dist/render/components/CardRowContext.js +1 -1
  36. package/dist/render/components/Flex.d.ts +2 -1
  37. package/dist/render/components/Flex.js +1 -1
  38. package/dist/render/components/HoverMediaLayer.d.ts +16 -1
  39. package/dist/render/components/HoverMediaLayer.js +1 -1
  40. package/dist/render/components/ImageBlock.d.ts +1 -1
  41. package/dist/render/components/ImageBlock.js +1 -1
  42. package/dist/render/components/PictureHoverMove.d.ts +1 -0
  43. package/dist/render/components/PictureHoverMove.js +1 -1
  44. package/dist/render/components/PreviewHeaderContext.d.ts +4 -1
  45. package/dist/render/components/PreviewHeaderContext.js +1 -1
  46. package/dist/render/lib/content/block-size.d.ts +6 -0
  47. package/dist/render/lib/content/block-size.js +1 -1
  48. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  49. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  50. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +6 -1
  51. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  52. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  53. package/dist/render/lib/document/passes/block-size.js +1 -1
  54. package/dist/render/lib/sections/section-to-box.d.ts +2 -0
  55. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 67.2.0 - 2026-11-11
4
+
5
+ From main at `7d5e50df`: #701, #702, #705, #706, #707, #704. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. Exported functions gain optional arguments and components gain optional props; one exported type widens (`OptionRowShape` adds `"d"` and `"e"`). One stored key is added (`hoverShow` on a Box, and the value `hover: "nextImage"` on a card Box); no stored key or value moves (read-only count 2026-11-11: 0 such nodes on the US and AU sites).
6
+
7
+ **For hosts:**
8
+ - Nothing to change. A theme row with no unit columns, or a px unit, draws the bytes it drew (#702, #707). A Box with no `hoverShow` draws the bytes it drew (#704). The canvas width attributes are written in the editor only; the published page does not change (#706).
9
+ - To draw a site length stored in vw or %, pass the row's units: `siteLengthUnitsOfRow(row)` into the new `siteLengthUnits` prop of `PreviewHeaderProvider`, or each unit as the new second argument of the site emitters (#702).
10
+ - A host that runs the option-row source rule may see new findings (a pressed element of any tag, a native tick box holding the pick); a host that switches on `OptionRowShape` gets two new values (0 such hosts today). storefront-blocks can now import this rule and delete its own copy (#701).
11
+
12
+ ### Added
13
+
14
+ - **Site lengths draw in their stored unit** (#702): `siteWidthTokens`, `siteGutterTokens`, `siteGutterPhoneTokens`, `siteBlockGapTokens`, `siteBlockGapPhoneTokens` and `siteCornerRadiusTokens` take the stored unit as a new optional second argument; % and vw publish the number in that unit, held in easel's grid for the length's kind. New exports `siteLengthHeld`, `siteLengthCss`, `SiteLengthUnits`, `siteLengthUnitsOfRow`, `siteLengthNumber`. The editor canvas reads the six unit columns from the theme row.
15
+ - **A Box shows the next image and shows on card hover** (#704): a card Box on its row's picture takes Show next image; a Box inside a card copy takes Show: Always / On card hover (stored `hoverShow`); a Box with no picture inside a copy takes its own Darken wash. New exports in `lib/animation/hover` (`BOX_SHOW_KEY`, `BOX_SHOW_ON_CARD_HOVER`, `BOX_SHOW_ALWAYS`, `BOX_REVEAL_*`, `BOX_NEXT_PICTURE_ROW`) and `components/HoverMediaLayer` (`HoverArrowsSlot`, `HoverMediaArrows`, opt-in `arrowsAbove`). New optional props: `Flex` `hoverShow`, `CardTemplateRows` `previewHover`.
16
+
17
+ ### Changed
18
+
19
+ - **Option-row source rule: a pressed element of any tag is a row** (#701): `lib/source-rules/no-hard-coded-option-rows` now also reads an element a shopper presses (`onClick`, `onMouseDown`, `onPointerDown`), an element carrying `aria-pressed` or `aria-checked`, and a native checkbox or radio holding the pick. New shapes (d) and (e); `OptionRowShape` is `"a" | "b" | "c" | "d" | "e"`. `aria-expanded` still lets a control pass.
20
+ - **Converted Boxes read the site gutter in its unit** (#707): `siteFactsFromRead` reads `site_gutter_unit` and `site_gutter_phone_unit` (new optional `SiteFacts` fields); `siteGutterOf(ctx, { view?, to?, maxPx? })` takes a new optional options argument. Section Header writes its sides in the Box's own padding unit, so a section with vw or % padding converts its 40px gutter correctly (40 -> 3vw, 2.78%) where before it got 40vw or 40%.
21
+
22
+ ### Fixed
23
+
24
+ - **A Box's block on the canvas takes the page's width** (#706): new exports `BLOCK_WIDTH_MODE_ATTR`, `BLOCK_MIN_WIDTH_ATTR`, `blockCanvasWidthAttrs` (`lib/content/block-size`). On the editor canvas a Fill or Fixed block takes the page's width, a block with a Min width can shrink, and a hidden part's empty item takes no gap. Editor canvas only.
25
+ - **Option-row rule reads each part's root once per set of kinds** (#705): a tree 20 parts deep took about 9 s. No export changes.
26
+
3
27
  ## 67.1.0 - 2026-11-11
4
28
 
5
29
  From main at `df10d50a`: #697, #700. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0` (#697 raises only the easel devDependency, to `^34.2.0`). One stored key is added (`imageOverlay` on Split) and one stored value (`textFit: "ellipsis"`); no stored key or value moves.
@@ -1 +1 @@
1
- "use client";import{jsx as c,jsxs as pt}from"react/jsx-runtime";import{useCallback as n,useEffect as S,useMemo as ce,useRef as f,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as St}from"../lib/document/build-config.js";import{ChromeWrap as ft}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as gt}from"efficient-easel/screen/lib/session";import{refreshSiteLiveState as wt}from"../lib/site-live-state.js";import{holdSiteWrites as Ct}from"../../format/lib/site-writes.js";import{backendOf as k,blocksOf as _t}from"../lib/website-session.js";import{useEaselSession as Tt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as Pt}from"../../format/lib/document/site-gap-fields.js";import{withTemplateMediaPlaceholders as Et}from"../../format/lib/document/templateFields.js";import{setEditorPage as se}from"../../format/lib/document/editor-page-context.js";import{EditorPagePathProvider as yt}from"./EditorPagePathProvider.js";import{resolveSiteName as vt}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as Gt,normalizeSiteGutterPhone as kt,normalizeSiteWidth as Ht}from"../../format/lib/content/page-width.js";import{normalizeSiteBackground as de}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as ue}from"../../format/lib/content/container-gap.js";import Wt,{DocumentScreen as Bt}from"efficient-easel/screen/components/ScreenMount";import Rt from"./WebsiteHintsProvider.js";import{useScreenDocument as Ft}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as It,siteThemeRow as Dt,themeEdited as bt,themeSeeded as Mt}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as xt}from"./PreviewFooterContext.js";import{PreviewChatProvider as Nt,DEFAULT_CHAT_PREVIEW as Ot}from"./PreviewChatContext.js";import{PreviewSocialProvider as At}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as zt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Lt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Yt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Ut}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as jt}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Kt}from"efficient-easel/draw/client";import{CanvasPartsBridge as Vt}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as Xt}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as Zt}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as qt,DEFAULT_HEADING_COMPRESSION as Jt,DEFAULT_HEADING_TYPOGRAPHY as Qt,DEFAULT_SWITCH_SHOWN as H,DEFAULT_SIZES as $t,DEFAULT_THEME_MODE as _,normalizeCornerRadius as er,normalizeCornerStyle as tr,normalizeCardShadow as rr,normalizeCardGap as or,normalizeHoverEffect as nr,IDENTITY_CARD_GAP as he,IDENTITY_CARD_SHADOW as ar,IDENTITY_HOVER_EFFECT as ir,THEME_MODE_KEY as le,THEME_STORAGE_KEY as cr,THEME_SWITCH_HIDE as me,THEME_SWITCH_KEY as W}from"../../format/lib/theme.js";import{pictureShadowColor as sr}from"efficient-easel/screen/lib/document/shadow-values";import{DEFAULT_FONTS as dr}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as ur}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as hr}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as lr}from"../../render/lib/text-styles/site-text-styles.js";import{wordStylesFromRow as mr}from"../../format/lib/word-styles.js";import{chatPreviewFrom as pr}from"./PreviewChatContext.js";const Sr=()=>{if(typeof window>"u")return _;try{const s=window.localStorage.getItem(le);return s==="light"||s==="dark"||s==="auto"?s:_}catch{return _}},pe=s=>{if(!(typeof window>"u"))try{window.localStorage.setItem(le,s)}catch{}},fr=()=>{if(typeof window>"u")return H;try{return window.localStorage.getItem(W)!==me}catch{return H}},gr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(cr)}catch{}},Se=s=>{if(!(typeof window>"u"))try{s?window.localStorage.removeItem(W):window.localStorage.setItem(W,me)}catch{}};function wr(){const{adapter:s,capabilities:d,templateId:B,ready:w,token:h,siteId:i,currentSlug:R,currentKind:F}=Ft();S(()=>(se(R,F),()=>se(null,null)),[R,F]);const T=d.placeholderFrames,[fe,I]=r(null),[ge,D]=r("");S(()=>{const e=s.templateName;if(!w||!B||!e){D("");return}let a=!1;return e().then(l=>!a&&D(l??"")).catch(()=>{}),()=>{a=!0}},[w,h,B,s]);const[we,P]=r(_),[Ce,E]=r(H),[b,M]=r({value:{selected:0,themes:[]},readFor:null}),_e=b.value,[Te,x]=r(dr),[Pe,N]=r($t),[Ee,O]=r(null),[ye,A]=r(Jt),[ve,z]=r(null),[Ge,L]=r(null),[ke,Y]=r(he),[He,U]=r(null),[We,j]=r(null),[Be,K]=r(null),[Re,V]=r(null),[y,X]=r(null),[v,Z]=r(null),u=Tt(),q=ce(()=>St(gt(u),_t(u)),[u]),Fe=ce(()=>Pt(Et(q,T),y,v),[q,T,y,v]),[Ie,J]=r(Qt),[De,Q]=r(null),[be,$]=r(null),[Me,ee]=r(null),[xe,te]=r(null),[Ne,re]=r(null),oe=f(null),o=f(!1);S(()=>{P(Sr()),E(fr())},[]);const Oe=n(e=>{o.current=!0,gr(),pe(e),P(e)},[]),Ae=n(e=>{o.current=!0,Se(e),E(e)},[]),ze=n(e=>{o.current=!0,M(a=>bt(a,e,i??""))},[i]),Le=n(e=>{o.current=!0,x(e)},[]),Ye=n(e=>{o.current=!0,N(e)},[]),Ue=n(e=>{o.current=!0,O(e)},[]),je=n(e=>{o.current=!0,A(e)},[]),Ke=n(e=>{o.current=!0,z(e)},[]),Ve=n(e=>{o.current=!0,L(e)},[]),Xe=n(e=>{o.current=!0,Y(e)},[]),Ze=n(e=>{o.current=!0,U(e)},[]),qe=n(e=>{o.current=!0,J(e)},[]),[Je,ne]=r(null),[Qe,$e]=r(null),et=n(e=>{o.current=!0,ne(e)},[]),tt=n(e=>{o.current=!0,j(e)},[]),rt=n(e=>{o.current=!0,K(e)},[]),ot=n(e=>{o.current=!0,V(e)},[]),nt=n(e=>{o.current=!0,X(e)},[]),at=n(e=>{o.current=!0,Z(e)},[]),it=n(e=>{o.current=!0,Q(e)},[]),ct=n(e=>{o.current=!0,$(e)},[]),st=n(e=>{o.current=!0,ee(e)},[]),dt=n(e=>{o.current=!0,te(e)},[]),ut=n(e=>{o.current=!0,re(e)},[]);S(()=>{const e=k(u).theme;if(!h||!d.hasSiteTheme||!e)return;const a=i??"";oe.current!==a&&(oe.current=a,o.current=!1);let l=!1;return e.get(i?{siteId:i}:void 0).then(t=>{if(l||o.current)return;pe(t.default_mode),Se(t.show_theme_switch),P(t.default_mode),E(t.show_theme_switch),M(Mt({selected:t.selected_preset,themes:t.theme_presets},a));const g=lr(t);x(g.fonts),N(g.sizes),O(t.corner_radius_px===void 0?qt[tr(t.corner_style)]:er(t.corner_radius_px)),A(g.compression),z(t.card_shadow==null?ar:rr(t.card_shadow)),Y(t.card_gap==null?he:or(t.card_gap)),U(t.hover_effect==null?ir:nr(t.hover_effect)),L(sr(t.shadow_color)),j(Ht(t.site_width)),K(Gt(t.site_gutter)),V(kt(t.site_gutter_phone)),X(ue(t.block_gap)),Z(ue(t.block_gap_phone)),J(g.typography),ne(g.textStyles),$e(mr(t)),Q(t.hero_background_follows_width===!0),$(de(t.section_background_width)),ee(de(t.section_content_width)),te(t.photography_grayscale===!0),re(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{l=!0}},[h,i,d.hasSiteTheme,u]);const ht=zt({token:h,siteId:i,enabled:d.hasSiteSettings}),[lt,ae]=r(Ot),ie=f(null),G=f(!1),m=f(null),p=f({}),C=n(async()=>{m.current&&clearTimeout(m.current),m.current=null;const e=p.current;p.current={};try{await k(u).chat?.update(e,i?{siteId:i}:void 0),wt()}catch(a){throw p.current={...e,...p.current},a}},[u,i]);S(()=>Ct(()=>m.current||Object.keys(p.current).length>0?C():void 0),[C]);const mt=n(e=>{G.current=!0,ae(a=>({...a,...e})),!(!d.hasSiteSettings||!h)&&(p.current={...p.current,...e},m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{C().catch(()=>{})},500))},[d.hasSiteSettings,h,C]);return S(()=>{if(!h||!d.hasSiteSettings)return;const e=i??"";ie.current!==e&&(ie.current=e,G.current=!1);let a=!1;const l=k(u).chat;if(l)return l.get(i?{siteId:i}:void 0).then(t=>{a||G.current||ae(pr(t))}).catch(()=>{}),()=>{a=!0}},[h,i,d.hasSiteSettings,u]),S(()=>{const e=s.site;if(!w||!d.hasSiteRecord||!e){I(null);return}let a=!1;return e().then(l=>{a||I(vt(l.name))}).catch(()=>{}),()=>{a=!0}},[w,h,d.hasSiteRecord,i,s]),c(Bt,{config:Fe,parts:ur,wrap:(e,a)=>c(It,{websiteName:fe,templateChrome:T,templateName:ge||null,themeMode:we,onThemeModeChange:Oe,themeSwitchShown:Ce,onThemeSwitchShownChange:Ae,theme:_e,themeRow:Dt(d.hasSiteTheme,b.readFor,i??""),onThemeChange:ze,fonts:Te,onFontsChange:Le,cornerRadiusPx:Ee,onCornerRadiusPxChange:Ue,cardShadow:ve,onCardShadowChange:Ke,shadowColor:Ge,onShadowColorChange:Ve,cardGap:ke,onCardGapChange:Xe,hoverEffect:He,onHoverEffectChange:Ze,headingCompression:ye,onHeadingCompressionChange:je,headingTypography:Ie,onHeadingTypographyChange:qe,textStyles:Je,onTextStylesChange:et,wordStyles:Qe,sizes:Pe,onSizesChange:Ye,siteWidth:We,onSiteWidthChange:tt,siteGutter:Be,onSiteGutterChange:rt,siteGutterPhone:Re,onSiteGutterPhoneChange:ot,blockGap:y,onBlockGapChange:nt,blockGapPhone:v,onBlockGapPhoneChange:at,heroBackgroundFollowsWidth:De,onHeroBackgroundFollowsWidthChange:it,sectionBackgroundWidth:be,onSectionBackgroundWidthChange:ct,sectionContentWidth:Me,onSectionContentWidthChange:st,photographyGrayscale:xe,onPhotographyGrayscaleChange:dt,shareButtonOnPosts:Ne,onShareButtonOnPostsChange:ut,themeFromDocument:!d.hasSiteTheme,children:c(xt,{children:c(ft,{wrap:u.chrome?.wrap,surface:"page",children:c(Ut,{children:c(jt,{children:c(Kt,{children:c(Xt,{children:c(Vt,{children:pt(Zt,{children:[c(Nt,{chat:lt,onChatChange:mt,children:c(At,{value:ht,children:c(Lt,{children:c(yt,{children:c(Rt,{children:e})})})})}),a]})})})})})})})})})})}function Cr({target:s}){return c(Wt,{target:s,addressing:Yt,onHostMessage:hr,children:c(wr,{})})}export{Cr as default};
1
+ "use client";import{jsx as c,jsxs as wt}from"react/jsx-runtime";import{useCallback as n,useEffect as f,useMemo as de,useRef as g,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as Ct}from"../lib/document/build-config.js";import{ChromeWrap as _t}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as Pt}from"efficient-easel/screen/lib/session";import{refreshSiteLiveState as Tt}from"../lib/site-live-state.js";import{holdSiteWrites as Et}from"../../format/lib/site-writes.js";import{backendOf as H,blocksOf as yt}from"../lib/website-session.js";import{useEaselSession as Gt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as vt}from"../../format/lib/document/site-gap-fields.js";import{withTemplateMediaPlaceholders as kt}from"../../format/lib/document/templateFields.js";import{setEditorPage as ue}from"../../format/lib/document/editor-page-context.js";import{EditorPagePathProvider as Wt}from"./EditorPagePathProvider.js";import{resolveSiteName as Ht}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as Rt,normalizeSiteGutterPhone as Bt,normalizeSiteWidth as Ft}from"../../format/lib/content/page-width.js";import{siteLengthNumber as w,siteLengthUnitsOfRow as It}from"../../format/lib/content/css-length.js";import{normalizeSiteBackground as he}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as le}from"../../format/lib/content/container-gap.js";import bt,{DocumentScreen as Dt}from"efficient-easel/screen/components/ScreenMount";import Mt from"./WebsiteHintsProvider.js";import{useScreenDocument as Nt}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as Ot,siteThemeRow as xt,themeEdited as At,themeSeeded as Ut}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as zt}from"./PreviewFooterContext.js";import{PreviewChatProvider as Lt,DEFAULT_CHAT_PREVIEW as Yt}from"./PreviewChatContext.js";import{PreviewSocialProvider as jt}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as Kt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Vt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Xt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Zt}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as qt}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Jt}from"efficient-easel/draw/client";import{CanvasPartsBridge as Qt}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as $t}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as er}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as tr,DEFAULT_HEADING_COMPRESSION as rr,DEFAULT_HEADING_TYPOGRAPHY as or,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as nr,DEFAULT_THEME_MODE as T,normalizeCornerRadius as ir,normalizeCornerStyle as ar,normalizeCardShadow as cr,normalizeCardGap as sr,normalizeHoverEffect as dr,IDENTITY_CARD_GAP as me,IDENTITY_CARD_SHADOW as ur,IDENTITY_HOVER_EFFECT as hr,THEME_MODE_KEY as pe,THEME_STORAGE_KEY as lr,THEME_SWITCH_HIDE as Se,THEME_SWITCH_KEY as B}from"../../format/lib/theme.js";import{pictureShadowColor as mr}from"efficient-easel/screen/lib/document/shadow-values";import{DEFAULT_FONTS as pr}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as Sr}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as fr}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as gr}from"../../render/lib/text-styles/site-text-styles.js";import{wordStylesFromRow as wr}from"../../format/lib/word-styles.js";import{chatPreviewFrom as Cr}from"./PreviewChatContext.js";const _r=()=>{if(typeof window>"u")return T;try{const s=window.localStorage.getItem(pe);return s==="light"||s==="dark"||s==="auto"?s:T}catch{return T}},fe=s=>{if(!(typeof window>"u"))try{window.localStorage.setItem(pe,s)}catch{}},Pr=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(B)!==Se}catch{return R}},Tr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(lr)}catch{}},ge=s=>{if(!(typeof window>"u"))try{s?window.localStorage.removeItem(B):window.localStorage.setItem(B,Se)}catch{}};function Er(){const{adapter:s,capabilities:d,templateId:F,ready:_,token:h,siteId:a,currentSlug:I,currentKind:b}=Nt();f(()=>(ue(I,b),()=>ue(null,null)),[I,b]);const E=d.placeholderFrames,[we,D]=r(null),[Ce,M]=r("");f(()=>{const e=s.templateName;if(!_||!F||!e){M("");return}let i=!1;return e().then(l=>!i&&M(l??"")).catch(()=>{}),()=>{i=!0}},[_,h,F,s]);const[_e,y]=r(T),[Pe,G]=r(R),[N,O]=r({value:{selected:0,themes:[]},readFor:null}),Te=N.value,[Ee,x]=r(pr),[ye,A]=r(nr),[Ge,U]=r(null),[ve,z]=r(rr),[ke,L]=r(null),[We,Y]=r(null),[He,j]=r(me),[Re,K]=r(null),[Be,V]=r(null),[Fe,X]=r(null),[Ie,Z]=r(null),[v,q]=r(null),[k,J]=r(null),[be,De]=r({}),u=Gt(),Q=de(()=>Ct(Pt(u),yt(u)),[u]),Me=de(()=>vt(kt(Q,E),v,k),[Q,E,v,k]),[Ne,$]=r(or),[Oe,ee]=r(null),[xe,te]=r(null),[Ae,re]=r(null),[Ue,oe]=r(null),[ze,ne]=r(null),ie=g(null),o=g(!1);f(()=>{y(_r()),G(Pr())},[]);const Le=n(e=>{o.current=!0,Tr(),fe(e),y(e)},[]),Ye=n(e=>{o.current=!0,ge(e),G(e)},[]),je=n(e=>{o.current=!0,O(i=>At(i,e,a??""))},[a]),Ke=n(e=>{o.current=!0,x(e)},[]),Ve=n(e=>{o.current=!0,A(e)},[]),Xe=n(e=>{o.current=!0,U(e)},[]),Ze=n(e=>{o.current=!0,z(e)},[]),qe=n(e=>{o.current=!0,L(e)},[]),Je=n(e=>{o.current=!0,Y(e)},[]),Qe=n(e=>{o.current=!0,j(e)},[]),$e=n(e=>{o.current=!0,K(e)},[]),et=n(e=>{o.current=!0,$(e)},[]),[tt,ae]=r(null),[rt,ot]=r(null),nt=n(e=>{o.current=!0,ae(e)},[]),it=n(e=>{o.current=!0,V(e)},[]),at=n(e=>{o.current=!0,X(e)},[]),ct=n(e=>{o.current=!0,Z(e)},[]),st=n(e=>{o.current=!0,q(e)},[]),dt=n(e=>{o.current=!0,J(e)},[]),ut=n(e=>{o.current=!0,ee(e)},[]),ht=n(e=>{o.current=!0,te(e)},[]),lt=n(e=>{o.current=!0,re(e)},[]),mt=n(e=>{o.current=!0,oe(e)},[]),pt=n(e=>{o.current=!0,ne(e)},[]);f(()=>{const e=H(u).theme;if(!h||!d.hasSiteTheme||!e)return;const i=a??"";ie.current!==i&&(ie.current=i,o.current=!1);let l=!1;return e.get(a?{siteId:a}:void 0).then(t=>{if(l||o.current)return;fe(t.default_mode),ge(t.show_theme_switch),y(t.default_mode),G(t.show_theme_switch),O(Ut({selected:t.selected_preset,themes:t.theme_presets},i));const C=gr(t);x(C.fonts),A(C.sizes);const S=It(t);De(S),U(t.corner_radius_px===void 0?tr[ar(t.corner_style)]:w(t.corner_radius_px,S.cornerRadiusUnit,ir)),z(C.compression),L(t.card_shadow==null?ur:cr(t.card_shadow)),j(t.card_gap==null?me:sr(t.card_gap)),K(t.hover_effect==null?hr:dr(t.hover_effect)),Y(mr(t.shadow_color)),V(w(t.site_width,S.siteWidthUnit,Ft)),X(w(t.site_gutter,S.siteGutterUnit,Rt)),Z(w(t.site_gutter_phone,S.siteGutterPhoneUnit,Bt)),q(w(t.block_gap,S.blockGapUnit,le)),J(w(t.block_gap_phone,S.blockGapPhoneUnit,le)),$(C.typography),ae(C.textStyles),ot(wr(t)),ee(t.hero_background_follows_width===!0),te(he(t.section_background_width)),re(he(t.section_content_width)),oe(t.photography_grayscale===!0),ne(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{l=!0}},[h,a,d.hasSiteTheme,u]);const St=Kt({token:h,siteId:a,enabled:d.hasSiteSettings}),[ft,ce]=r(Yt),se=g(null),W=g(!1),m=g(null),p=g({}),P=n(async()=>{m.current&&clearTimeout(m.current),m.current=null;const e=p.current;p.current={};try{await H(u).chat?.update(e,a?{siteId:a}:void 0),Tt()}catch(i){throw p.current={...e,...p.current},i}},[u,a]);f(()=>Et(()=>m.current||Object.keys(p.current).length>0?P():void 0),[P]);const gt=n(e=>{W.current=!0,ce(i=>({...i,...e})),!(!d.hasSiteSettings||!h)&&(p.current={...p.current,...e},m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{P().catch(()=>{})},500))},[d.hasSiteSettings,h,P]);return f(()=>{if(!h||!d.hasSiteSettings)return;const e=a??"";se.current!==e&&(se.current=e,W.current=!1);let i=!1;const l=H(u).chat;if(l)return l.get(a?{siteId:a}:void 0).then(t=>{i||W.current||ce(Cr(t))}).catch(()=>{}),()=>{i=!0}},[h,a,d.hasSiteSettings,u]),f(()=>{const e=s.site;if(!_||!d.hasSiteRecord||!e){D(null);return}let i=!1;return e().then(l=>{i||D(Ht(l.name))}).catch(()=>{}),()=>{i=!0}},[_,h,d.hasSiteRecord,a,s]),c(Dt,{config:Me,parts:Sr,wrap:(e,i)=>c(Ot,{websiteName:we,templateChrome:E,templateName:Ce||null,themeMode:_e,onThemeModeChange:Le,themeSwitchShown:Pe,onThemeSwitchShownChange:Ye,theme:Te,themeRow:xt(d.hasSiteTheme,N.readFor,a??""),onThemeChange:je,fonts:Ee,onFontsChange:Ke,cornerRadiusPx:Ge,onCornerRadiusPxChange:Xe,cardShadow:ke,onCardShadowChange:qe,shadowColor:We,onShadowColorChange:Je,cardGap:He,onCardGapChange:Qe,hoverEffect:Re,onHoverEffectChange:$e,headingCompression:ve,onHeadingCompressionChange:Ze,headingTypography:Ne,onHeadingTypographyChange:et,textStyles:tt,onTextStylesChange:nt,wordStyles:rt,sizes:ye,onSizesChange:Ve,siteWidth:Be,onSiteWidthChange:it,siteGutter:Fe,onSiteGutterChange:at,siteGutterPhone:Ie,onSiteGutterPhoneChange:ct,blockGap:v,onBlockGapChange:st,blockGapPhone:k,onBlockGapPhoneChange:dt,siteLengthUnits:be,heroBackgroundFollowsWidth:Oe,onHeroBackgroundFollowsWidthChange:ut,sectionBackgroundWidth:xe,onSectionBackgroundWidthChange:ht,sectionContentWidth:Ae,onSectionContentWidthChange:lt,photographyGrayscale:Ue,onPhotographyGrayscaleChange:mt,shareButtonOnPosts:ze,onShareButtonOnPostsChange:pt,themeFromDocument:!d.hasSiteTheme,children:c(zt,{children:c(_t,{wrap:u.chrome?.wrap,surface:"page",children:c(Zt,{children:c(qt,{children:c(Jt,{children:c($t,{children:c(Qt,{children:wt(er,{children:[c(Lt,{chat:ft,onChatChange:gt,children:c(jt,{value:St,children:c(Vt,{children:c(Wt,{children:c(Mt,{children:e})})})})}),i]})})})})})})})})})})}function yr({target:s}){return c(bt,{target:s,addressing:Xt,onHostMessage:fr,children:c(Er,{})})}export{yr as default};
@@ -766,6 +766,25 @@
766
766
  word `edge`), a stored section's own line (720 and 1100) for a section
767
767
  that is neither (lib/content/view-hide-class, components/ViewHideRoot).
768
768
  The block stays in Layers, where the eye shows it again. */
769
+ /* A block hidden in every view draws nothing (passes/hidden-nodes), on the
770
+ page and on the canvas, so on the page the Box keeps no cell and no gap for
771
+ it. On the canvas the engine's item stays, empty: efficient-easel's item
772
+ holds the block's render and nothing else (its outlines and handles are
773
+ drawn over the canvas, outside the item), so an empty item is a block that
774
+ draws nothing, and it takes no gap either. The block stays in Layers.
775
+ Only the engine's bare item (`:not([class])`): an `inline` block carries the
776
+ attribute on its own root, which the page draws too. `!important` because
777
+ storefront-blocks' sheet gives this same item `display: grid` in a stretch
778
+ row and a Grid zone (`.flex-row:not(.items-start)...> [data-easel-block]
779
+ :not([class])`, `.sf-grid-zone > [data-easel-block]`), unlayered and of a
780
+ higher specificity, and a hidden block must win there too.
781
+ A block with parts draws inside its part host (`data-sf-part-host`,
782
+ display: contents), so when it draws nothing the item holds only that
783
+ empty host and is not `:empty`: the second selector hides it too. */
784
+ [data-easel-block]:not([class]):empty,
785
+ [data-easel-block]:not([class]):has(> [data-sf-part-host]:only-child:empty) {
786
+ display: none !important;
787
+ }
769
788
  @media (width < 720px) {
770
789
  [data-easel-block]:has(> [data-sf-view-hide~="mobile"]:not([data-sf-view-hide~="edge"])),
771
790
  [data-easel-block]:has(> [data-sf-part-host] > [data-sf-view-hide~="mobile"]:not([data-sf-view-hide~="edge"])) {
@@ -844,6 +863,118 @@
844
863
  }
845
864
  }
846
865
 
866
+ /* ── A block's Width (Fill, Fixed) ────────────────────────────────────────
867
+ On the page, a block's Width sits on its Size wrapper (lib/content/
868
+ block-size), the Box's flex item: Fill is `w-full` and grows in a row Box,
869
+ Fixed is `w-[min(var(--sf-bw),100%)]` and neither grows nor shrinks. On the
870
+ canvas the engine's own item (`[data-easel-block]`, with the part host
871
+ between them, display: contents) is the flex item, so it takes the same:
872
+ Fill makes it full width (the wrapper's `w-full` then fills it) and grows
873
+ it in a row Box; Fixed stops it growing and shrinking, and its wrapper takes
874
+ the plain width, so the item's content size is that width (a `min(…, 100%)`
875
+ has nothing to resolve against while the item measures its content, and
876
+ counts as auto). The item stays within the Box (`max-width: 100%`), as the
877
+ page's `min(…, 100%)` does.
878
+ The wrapper names the views each mode acts in (`data-sf-width-fill`,
879
+ `data-sf-width-fixed`, `BLOCK_WIDTH_MODE_ATTR`): `wide` for a block that
880
+ splits at 800 (800 up), `desktop` and `tablet` for one split in three (1100
881
+ up, 800 up to 1100), `mobile` under 800, each reading its own width
882
+ property. No display here: the hidden-in-a-view rules above set the item's
883
+ display, and these must not undo them. A block with no Fill and no Fixed
884
+ wears no attribute and matches nothing.
885
+ A Min width (`data-sf-min-width`, the same words) is the page's flex
886
+ item's own minimum (`min-w-[var(--sf-bmin)]!`), so there the block shrinks
887
+ to it in a full row. The canvas item would keep its automatic minimum (its
888
+ content's narrowest) and push the row past the Box: it takes
889
+ `min-width: 0`, and the wrapper's Min width decides. */
890
+ @media (width >= 1100px) { /* block width */
891
+ [data-easel-block]:has(> [data-sf-width-fill~="wide"]),
892
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fill~="wide"]),
893
+ [data-easel-block]:has(> [data-sf-width-fill~="desktop"]),
894
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fill~="desktop"]) {
895
+ width: 100%;
896
+ }
897
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-width-fill~="wide"]),
898
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-part-host] > [data-sf-width-fill~="wide"]),
899
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-width-fill~="desktop"]),
900
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-part-host] > [data-sf-width-fill~="desktop"]) {
901
+ flex-grow: 1;
902
+ }
903
+ [data-easel-block]:has(> [data-sf-width-fixed~="wide"]),
904
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fixed~="wide"]),
905
+ [data-easel-block]:has(> [data-sf-width-fixed~="desktop"]),
906
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fixed~="desktop"]) {
907
+ flex: 0 0 auto;
908
+ max-width: 100%;
909
+ }
910
+ [data-easel-block] > [data-sf-width-fixed~="wide"],
911
+ [data-easel-block] > [data-sf-part-host] > [data-sf-width-fixed~="wide"],
912
+ [data-easel-block] > [data-sf-width-fixed~="desktop"],
913
+ [data-easel-block] > [data-sf-part-host] > [data-sf-width-fixed~="desktop"] {
914
+ width: var(--sf-bw);
915
+ }
916
+ [data-easel-block]:has(> [data-sf-min-width~="wide"]),
917
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-min-width~="wide"]),
918
+ [data-easel-block]:has(> [data-sf-min-width~="desktop"]),
919
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-min-width~="desktop"]) {
920
+ min-width: 0;
921
+ }
922
+ }
923
+ @media (800px <= width < 1100px) { /* block width */
924
+ [data-easel-block]:has(> [data-sf-width-fill~="wide"]),
925
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fill~="wide"]),
926
+ [data-easel-block]:has(> [data-sf-width-fill~="tablet"]),
927
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fill~="tablet"]) {
928
+ width: 100%;
929
+ }
930
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-width-fill~="wide"]),
931
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-part-host] > [data-sf-width-fill~="wide"]),
932
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-width-fill~="tablet"]),
933
+ [data-easel-block]:is(.flex-row > *):has(> [data-sf-part-host] > [data-sf-width-fill~="tablet"]) {
934
+ flex-grow: 1;
935
+ }
936
+ [data-easel-block]:has(> [data-sf-width-fixed~="wide"]),
937
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fixed~="wide"]),
938
+ [data-easel-block]:has(> [data-sf-width-fixed~="tablet"]),
939
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fixed~="tablet"]) {
940
+ flex: 0 0 auto;
941
+ max-width: 100%;
942
+ }
943
+ [data-easel-block] > [data-sf-width-fixed~="wide"],
944
+ [data-easel-block] > [data-sf-part-host] > [data-sf-width-fixed~="wide"] {
945
+ width: var(--sf-bw);
946
+ }
947
+ [data-easel-block] > [data-sf-width-fixed~="tablet"],
948
+ [data-easel-block] > [data-sf-part-host] > [data-sf-width-fixed~="tablet"] {
949
+ width: var(--sf-bw-t);
950
+ }
951
+ [data-easel-block]:has(> [data-sf-min-width~="wide"]),
952
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-min-width~="wide"]),
953
+ [data-easel-block]:has(> [data-sf-min-width~="tablet"]),
954
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-min-width~="tablet"]) {
955
+ min-width: 0;
956
+ }
957
+ }
958
+ @media (width < 800px) { /* block width */
959
+ [data-easel-block]:has(> [data-sf-width-fill~="mobile"]),
960
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fill~="mobile"]) {
961
+ width: 100%;
962
+ }
963
+ [data-easel-block]:has(> [data-sf-width-fixed~="mobile"]),
964
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-width-fixed~="mobile"]) {
965
+ flex: 0 0 auto;
966
+ max-width: 100%;
967
+ }
968
+ [data-easel-block] > [data-sf-width-fixed~="mobile"],
969
+ [data-easel-block] > [data-sf-part-host] > [data-sf-width-fixed~="mobile"] {
970
+ width: var(--sf-bw-p);
971
+ }
972
+ [data-easel-block]:has(> [data-sf-min-width~="mobile"]),
973
+ [data-easel-block]:has(> [data-sf-part-host] > [data-sf-min-width~="mobile"]) {
974
+ min-width: 0;
975
+ }
976
+ }
977
+
847
978
  /* @tokens canvas-end */
848
979
 
849
980
  /* ── Canvas "Add section" seams (overlay between preview sections) ──────────
@@ -1 +1 @@
1
- import{loopDelayField as l,loopDurationField as m}from"./AnimationDurationRow.js";import{entranceFields as r}from"./entrance-fields.js";import{scrollFields as e}from"./scroll-fields.js";import{HOVER_GROUP_KEY as p,HOVER_KEY as a,cardHoverResting as u,pictureHoverResting as d}from"../../../format/lib/animation/hover.js";import{boxHoverFields as f,cardHoverFields as F,hoverFields as _,pictureHoverFields as O}from"./hover-fields.js";import{ON_A_CARD as R}from"../document/card-display-chips.js";import{customize as H}from"efficient-easel/screen/lib/document/box-fields";import{loopDirectionField as D,loopFields as v,loopHeading as h}from"./loop-fields.js";import{LOOP_GROUP_KEY as E}from"../../../format/lib/animation/loop.js";import{withRowsShownWhen as i}from"../../../format/lib/document/show-when-attach.js";import{BOX_IS_CARD_RULE as s}from"../../../format/lib/content/box-card-rule.js";function b(){const t=f(),o=[p,a],n=i(t,Object.keys(t).filter(c=>!o.includes(c)),s);return i(n,o,{any:[s,R]})}function G(t,o=""){switch(t){case"section":case"block":return{...r(),...e()};case"box":return{...r(),...e(),...v(),...b()};case"picture":return{...r(),...e(),...O(d(o),o)};case"textPart":return{...r(),...e(),..._()};case"cards":return{...r(),...e(),...F(u(o))};case"marquee":return{...r(),...e(),[E]:h(),_cLoop:H(),scrollDirection:D(),loopDuration:m({readsSpeed:!0}),loopDelay:l()}}}export{G as animationTabFields};
1
+ import{loopDelayField as _,loopDurationField as O}from"./AnimationDurationRow.js";import{entranceFields as o}from"./entrance-fields.js";import{scrollFields as r}from"./scroll-fields.js";import{BOX_SHOW_KEY as s,HOVER_GROUP_KEY as c,HOVER_KEY as l,cardHoverResting as f,pictureHoverResting as R}from"../../../format/lib/animation/hover.js";import{boxHoverFields as F,cardHoverFields as H,hoverFields as h,pictureHoverFields as D}from"./hover-fields.js";import{ON_A_PICTURE_OR_CARD as m}from"../document/card-display-chips.js";import{customize as E}from"efficient-easel/screen/lib/document/box-fields";import{loopDirectionField as v,loopFields as w,loopHeading as S}from"./loop-fields.js";import{LOOP_GROUP_KEY as P}from"../../../format/lib/animation/loop.js";import{withRowsShownWhen as i}from"../../../format/lib/document/show-when-attach.js";import{BOX_IS_CARD_RULE as b}from"../../../format/lib/content/box-card-rule.js";const p={field:s,set:!0};function x(){const t=F(),e=[c,l],a=i(t,Object.keys(t).filter(n=>!e.includes(n)&&n!==s),b),u=i(a,[s],p),d=i(u,[l],m);return i(d,[c],{any:[m,p]})}function G(t,e=""){switch(t){case"section":case"block":return{...o(),...r()};case"box":return{...o(),...r(),...w(),...x()};case"picture":return{...o(),...r(),...D(R(e),e)};case"textPart":return{...o(),...r(),...h()};case"cards":return{...o(),...r(),...H(f(e))};case"marquee":return{...o(),...r(),[P]:S(),_cLoop:E(),scrollDirection:v(),loopDuration:O({readsSpeed:!0}),loopDelay:_()}}}export{G as animationTabFields};
@@ -16,3 +16,11 @@ export declare const BOX_HIGHLIGHT_ROW: {
16
16
  showWhen?: ShowWhenRule;
17
17
  };
18
18
  export declare function boxHoverFields(): Record<string, unknown>;
19
+ export declare const BOX_NEXT_PICTURE_ROW: {
20
+ description: string;
21
+ type: "custom";
22
+ render: (props: import("efficient-easel/screen/lib/document/box-fields").BoxFieldRenderProps<PictureHover | undefined>) => ReactElement;
23
+ showWhen?: ShowWhenRule;
24
+ } & {
25
+ sfPictureResting: PictureHover;
26
+ };
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{AccentIcon as G,ContrastIcon as W,ExpandIcon as X,FinishIcon as z,ImagesIcon as Y,NoSymbolIcon as f,HoverLiftIcon as j,HoverNextImageIcon as Z,HoverRotateIcon as q,HoverZoomIcon as O,OpacityIcon as J}from"efficient-easel/icons";import{customize as Q,describedAs as w,group as $}from"efficient-easel/screen/lib/document/box-fields";import{effectTiles as v}from"efficient-easel/screen/lib/document/effect-tiles";import{deviceField as n}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as ee,noControlField as oe}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{BOX_DARKEN as p}from"../../../format/lib/content/box-background.js";import{cardTemplateOwner as te}from"../../../format/lib/content/card-template.js";import{angleRow as re,segmented as V,select as ne,slider as N}from"../document/box-fields.js";import{say as u}from"../../../format/lib/editor-words.js";import{withShowWhen as a}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as T,animationDurationField as D,showsWhatRuns as H}from"./AnimationDurationRow.js";import{BOX_HIGHLIGHT as S,BOX_HOVER_KINDS as A,BOX_HOVER_LABELS as C,CARD_HOVER_KEYS as c,CARD_HOVER_KINDS as se,CARD_HOVER_SECTIONS as ie,CARD_HOVER_TURN as ce,HOVER_KEY as h,HOVER_MEDIA_COVERS as ae,HOVER_MEDIA_COVER_LABELS as pe,HOVER_MEDIA_DEFAULTS as m,HOVER_MEDIA_GROUPS as he,HOVER_MEDIA_GROUP_LABELS as de,HOVER_MEDIA_KINDS as _e,HOVER_MEDIA_KIND_LABELS as le,HOVER_KIND_LABELS as k,NEXT_PICTURE_BLOCKS as x,NEXT_PICTURE_HOVER_KINDS as ue,OLD_SPIN_KEY as Ee,PART_HOVER_KINDS as g,PICTURE_HOVER_KEYS as K,PICTURE_HOVER_KINDS as Re,PICTURE_HOVER_ZOOM as d,cardHoverAngleOf as He,cardHoverKindOf as me,cardRotatesRule as Ie,cardShowsNextRule as P,HOVER_GROUP_KEY as E,pictureHoverKindOf as fe,pictureHoverMoveRule as Oe,pictureHoverRunsRule as b,pictureHoverTimedRule as we}from"../../../format/lib/animation/hover.js";const R=e=>n("desktop",$("Hover",{dot:e})),L=()=>n("desktop",Q()),ve="What this does when a shopper points at it, or taps it on a phone.",Ve="What this picture does when a shopper points at it. Black and white shows it in grey until then. A phone shows its colour.",Ne="What this picture does when a shopper points at the card. Show next image covers the card or the picture with this product's photos, with arrows; a phone shows the picture as it is. Black and white shows it in grey until then.",Te="What each card does when a shopper points at it. Show next image covers the card with this product's photos, with arrows; a phone shows the card as it is. Rotate turns the wheel picture.",De="Which of the product's pictures the card shows.",Se="Same finish shows the photos of the finish the card shows, else the first group.",Ae="Whole card hides the words under the photo. Picture keeps the words and swatches in view.",Ce={none:()=>i(f,{}),nextImage:()=>i(Z,{}),rotate:()=>i(q,{}),zoom:()=>i(O,{}),lift:()=>i(j,{}),mono:()=>i(W,{})};function I(e,o){const s=v({label:u("Hover effect"),options:e.map(r=>({value:r,label:u(k[r]),picture:Ce[r]()})),fallback:o});return w(s,{type:"select",label:"Hover effect",options:e.map(r=>({value:r,label:k[r]}))})}function je(){return{[E]:R({field:h,in:g.filter(e=>e!=="none")}),[h]:n("desktop",{...I(g,"none"),description:ve})}}function Ze(e){const o=Ie(e),s=P(),r=re(ce);return{[E]:R({any:[o,s]}),[c.kind]:n("desktop",{...H(I(se,e),(t,_)=>me(_??{},e)),description:Te}),...U(s),[Ee]:oe({type:"custom",render:()=>i(ee,{})},"always"),_cHover:L(),[c.angle]:n("desktop",a(H(r,t=>He(t)),o)),[c.duration]:n("desktop",a(D("hover"),o)),[c.delay]:n("desktop",a(T("hover"),o))}}function U(e){const o=ne("Type",i(Y,{}),_e.map(t=>({value:t,label:le[t]})),m.kind),s=V("Group",i(z,{}),he.map(t=>({value:t,label:de[t]})),m.group),r=V("Covers",i(X,{}),ae.map(t=>({value:t,label:pe[t]})),m.cover);return{[c.mediaKind]:n("desktop",a({...o,description:De},e)),[c.mediaGroup]:n("desktop",a({...s,description:Se},e)),[c.cover]:n("desktop",a({...r,description:Ae},e))}}function ke(e,o="",s=x.includes(o)){const r=b(e),t=we(e);return{[E]:R(r),[c.kind]:y(Re,e,Ve),...x.includes(o)?U(P()):{},_cHover:L(),...s?xe():{},[c.duration]:n("desktop",a(D("hover"),t)),[c.delay]:n("desktop",a(T("hover"),t))}}function xe(){const e=Oe(),o=N("Zoom",i(O,{}),d.min,d.max,d.step,d.min,d.unit),s=N("Darken on hover",i(J,{}),p.min,p.max,p.step,p.fallback,p.unit);return{[K.zoom]:n("desktop",a(o,e)),[K.darken]:n("desktop",a(s,e))}}function y(e,o,s){const r=n("desktop",{...H(I(e,o),t=>fe({[h]:t},o,e)),description:s});return Object.assign(r,{[B]:o})}const B="sfPictureResting",M=new WeakMap;function qe(e,o,s){const r=e[c.kind],t=r?.[B];if(!r||!t)return e;const _=o.props?.[h]==="nextImage",F=_?null:te(s.appState,o.props?.id);if(!_&&!ie.includes(String(F?.type??"")))return e;let l=M.get(e);return l||(l={...e,[c.kind]:y(ue,t,Ne)},M.set(e,l)),l}const ge="What this card does when a shopper points at it, or taps it on a phone. Highlight fills it with the surface color and turns its text the main color.",Ke={none:()=>i(f,{}),[S]:()=>i(G,{})},Je=n("desktop",{...w(v({label:u("Hover effect"),options:A.map(e=>({value:e,label:u(C[e]),picture:Ke[e]()})),fallback:"none"}),{type:"select",label:"Hover effect",options:A.map(e=>({value:e,label:C[e]}))}),description:ge});function Qe(){const e={any:[b("none"),{field:h,is:S}]};return{...ke("none","",!0),[E]:R(e)}}export{Je as BOX_HIGHLIGHT_ROW,Qe as boxHoverFields,Ze as cardHoverFields,je as hoverFields,qe as offerNextPicture,ke as pictureHoverFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{AccentIcon as j,ContrastIcon as Z,EyeIcon as q,ExpandIcon as J,FinishIcon as Q,ImagesIcon as $,NoSymbolIcon as S,HoverLiftIcon as ee,HoverNextImageIcon as oe,HoverRotateIcon as te,HoverZoomIcon as T,OpacityIcon as ne}from"efficient-easel/icons";import{customize as re,describedAs as N,group as se}from"efficient-easel/screen/lib/document/box-fields";import{effectTiles as V}from"efficient-easel/screen/lib/document/effect-tiles";import{deviceField as r}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as ie,noControlField as ce}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{BOX_DARKEN as p}from"../../../format/lib/content/box-background.js";import{cardTemplateOwner as ae}from"../../../format/lib/content/card-template.js";import{angleRow as pe,segmented as H,select as he,slider as A}from"../document/box-fields.js";import{say as E}from"../../../format/lib/editor-words.js";import{withShowWhen as a}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as D,animationDurationField as k,showsWhatRuns as O}from"./AnimationDurationRow.js";import{BOX_HIGHLIGHT as C,BOX_HOVER_KINDS as g,BOX_HOVER_LABELS as x,CARD_HOVER_KEYS as c,CARD_HOVER_KINDS as de,CARD_HOVER_SECTIONS as _e,CARD_HOVER_TURN as le,HOVER_KEY as h,HOVER_MEDIA_COVERS as ue,HOVER_MEDIA_COVER_LABELS as Ee,HOVER_MEDIA_DEFAULTS as m,HOVER_MEDIA_GROUPS as Re,HOVER_MEDIA_GROUP_LABELS as He,HOVER_MEDIA_KINDS as Oe,HOVER_MEDIA_KIND_LABELS as me,HOVER_KIND_LABELS as B,BOX_SHOW_KEY as P,BOX_SHOW_ALWAYS as W,BOX_SHOW_ON_CARD_HOVER as K,NEXT_PICTURE_BLOCKS as b,NEXT_PICTURE_HOVER_KINDS as y,OLD_SPIN_KEY as Ie,PART_HOVER_KINDS as X,PICTURE_HOVER_KEYS as U,PICTURE_HOVER_KINDS as fe,PICTURE_HOVER_ZOOM as d,cardHoverAngleOf as we,cardHoverKindOf as ve,cardRotatesRule as Se,cardShowsNextRule as I,HOVER_GROUP_KEY as _,pictureHoverKindOf as Te,pictureHoverMoveRule as Ne,pictureHoverRunsRule as L,pictureHoverTimedRule as Ve}from"../../../format/lib/animation/hover.js";const R=e=>r("desktop",se("Hover",{dot:e})),M=()=>r("desktop",re()),Ae="What this does when a shopper points at it, or taps it on a phone.",De="What this picture does when a shopper points at it. Black and white shows it in grey until then. A phone shows its colour.",ke="What this picture does when a shopper points at the card. Show next image covers the card or the picture with this product's photos, with arrows; a phone shows the picture as it is. Black and white shows it in grey until then.",Ce="What this picture does when a shopper points at the card. Show next image covers the picture with the card's photos, with arrows; a phone shows the picture as it is. Black and white shows it in grey until then.",ge="When this shows. On card hover shows it while a shopper points at the card. A phone always shows it.",xe="What each card does when a shopper points at it. Show next image covers the card with this product's photos, with arrows; a phone shows the card as it is. Rotate turns the wheel picture.",Be="Which of the product's pictures the card shows.",Pe="Same finish shows the photos of the finish the card shows, else the first group.",We="Whole card hides the words under the photo. Picture keeps the words and swatches in view.",Ke={none:()=>i(S,{}),nextImage:()=>i(oe,{}),rotate:()=>i(te,{}),zoom:()=>i(T,{}),lift:()=>i(ee,{}),mono:()=>i(Z,{})};function f(e,o){const s=V({label:E("Hover effect"),options:e.map(n=>({value:n,label:E(B[n]),picture:Ke[n]()})),fallback:o});return N(s,{type:"select",label:"Hover effect",options:e.map(n=>({value:n,label:B[n]}))})}function oo(){return{[_]:R({field:h,in:X.filter(e=>e!=="none")}),[h]:r("desktop",{...f(X,"none"),description:Ae})}}function to(e){const o=Se(e),s=I(),n=pe(le);return{[_]:R({any:[o,s]}),[c.kind]:r("desktop",{...O(f(de,e),(t,l)=>ve(l??{},e)),description:xe}),...w(s),[Ie]:ce({type:"custom",render:()=>i(ie,{})},"always"),_cHover:M(),[c.angle]:r("desktop",a(O(n,t=>we(t)),o)),[c.duration]:r("desktop",a(k("hover"),o)),[c.delay]:r("desktop",a(D("hover"),o))}}function w(e){const o=he("Type",i($,{}),Oe.map(t=>({value:t,label:me[t]})),m.kind),s=H("Group",i(Q,{}),Re.map(t=>({value:t,label:He[t]})),m.group),n=H("Covers",i(J,{}),ue.map(t=>({value:t,label:Ee[t]})),m.cover);return{[c.mediaKind]:r("desktop",a({...o,description:Be},e)),[c.mediaGroup]:r("desktop",a({...s,description:Pe},e)),[c.cover]:r("desktop",a({...n,description:We},e))}}function be(e,o="",s=b.includes(o)){const n=L(e),t=Ve(e);return{[_]:R(n),[c.kind]:v(fe,e,De),...b.includes(o)?w(I()):{},_cHover:M(),...s?F():{},[c.duration]:r("desktop",a(k("hover"),t)),[c.delay]:r("desktop",a(D("hover"),t))}}function F(e=!1){const o=t=>e?t:a(t,Ne()),s=A("Zoom",i(T,{}),d.min,d.max,d.step,d.min,d.unit),n=A("Darken on hover",i(ne,{}),p.min,p.max,p.step,p.fallback,p.unit);return{[U.zoom]:r("desktop",o(s)),[U.darken]:r("desktop",o(n))}}function v(e,o,s){const n=r("desktop",{...O(f(e,o),t=>Te({[h]:t},o,e)),description:s});return Object.assign(n,{[G]:o})}const G="sfPictureResting",Y=new WeakMap;function no(e,o,s){const n=e[c.kind],t=n?.[G];if(!n||!t)return e;const l=o.props?.[h]==="nextImage",z=l?null:ae(s.appState,o.props?.id);if(!l&&!_e.includes(String(z?.type??"")))return e;let u=Y.get(e);return u||(u={...e,[c.kind]:v(y,t,ke)},Y.set(e,u)),u}const ye="What this card does when a shopper points at it, or taps it on a phone. Highlight fills it with the surface color and turns its text the main color.",Xe={none:()=>i(S,{}),[C]:()=>i(j,{})},ro=r("desktop",{...N(V({label:E("Hover effect"),options:g.map(e=>({value:e,label:E(x[e]),picture:Xe[e]()})),fallback:"none"}),{type:"select",label:"Hover effect",options:g.map(e=>({value:e,label:x[e]}))}),description:ye}),Ue=r("desktop",{...H("Show",i(q,{}),[{value:W,label:"Always"},{value:K,label:"On card hover"}],W),description:ge});function so(){const e={any:[L("none"),{field:h,is:C},{field:P,is:K}]},{[_]:o,[c.kind]:s,...n}=be("none","",!0);return{[_]:R(e),[c.kind]:s,[P]:Ue,...w(I()),...n,...F(!0)}}const io=v(y,"none",Ce);export{ro as BOX_HIGHLIGHT_ROW,io as BOX_NEXT_PICTURE_ROW,so as boxHoverFields,to as cardHoverFields,oo as hoverFields,no as offerNextPicture,be as pictureHoverFields};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{phoneKey as r,tabletKey as i}from"efficient-easel/draw";import{BOX_CARD_PAD as E,BOX_SWATCH_PROP as bo,boxCardProps as Po,boxIsCard as x}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as ko,BOX_IS_NOT_CARD_RULE as Fo,BOX_ROW_IMAGE_PROP as Ho}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Wo,cardRowField as y,cardRowFields as Bo,cardRowLinkField as xo,typedLinkField as yo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Mo,cardCopyPlace as Uo}from"../../../../../../format/lib/content/card-template.js";import{HOVER_KEY as M}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as Ko}from"../../../../animation/hover-fields.js";import{darkenFields as Xo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as Go,REEL_SHAPE_LABELS as Yo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as U,CARD_LIST_STYLE_PICTURES as vo,TAB_SHAPE_PICTURES as jo}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as C,CARD_STYLE_POINTS as Vo,applyCardStyle as Jo,isCardStyle as zo}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as qo,ClockIcon as Qo,CropIcon as K,GapIcon as Zo,MediaLayoutStackedIcon as X,LineBetweenIcon as $o,LineSolidIcon as oe,ListIcon as ee,NumberedListIcon as G,ShadowIcon as ne,StylesIcon as Y,TableIcon as v,TargetIcon as te,WrapIcon as j}from"efficient-easel/icons";import{boxBlockSpacingField as re,boxFillField as ie,boxColumnsFields as le,boxShareField as ae,boxSharePhoneField as se,boxShareTabletField as de,containerDirectionField as ce,containerGapRows as _e,linkField as pe,plainText as Se,swapPadding as V,toggle as c,upload as J,withPanelOnly as Oe}from"../../../controls.js";import{BOX_STACK_LINE as L,BOX_STACK_RANGE as f,STACK_BELOW_PROP as T}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as z,boxShapeOf as me}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as fe}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as q}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as Q}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as Re,ACCORDION_PHONE_COLUMN_COUNTS as he,BOX_COLUMNS_MAX as D,BOX_COLUMNS_MIN as I,boxPhoneRowOneLine as ue,boxWrapWordOf as Z}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as $}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as oo,VIEW_KEY_ACCESS as s,group as R,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Ae,boxAlignField as Ce,boxJustifyField as we,boxWrapField as N,iconPickerRow as g,placementField as Ee,select as b,sidesPaddingFields as eo,slider as no}from"../../../box-fields.js";import{withRowRules as Te,withShowWhen as to}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Ne}from"../../../separator-field.js";import{LOOP_SCROLLS as Le}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as De,TICKER_JOIN_OPTIONS as Ie}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as ro}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as io}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as ge}from"../../../box-side-space-field.js";import{accordionOnSet as be}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as Pe,ACCORDION_ROW_STYLE_PROP as P}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as lo}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as ke,CONTAINER_BLOCKS_SLOT as Fe}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as He}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as We,ON_A_CARD as ao,cardDisplayField as k}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Be,MIRROR_CARDS_MIRRORS as xe,mirrorCardsField as ye}from"../../../mirror-cards-field.js";import{handedRowOf as so}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Me,showForField as Ue,showForFields as Ke}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as h,SHARED_COLUMNS_LABEL as co,SHARED_COLUMNS_OFF as _o,sharedColumnsDrawn as po,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as Xe,SHARED_COLUMNS_POINTS as Ge,sharedRowsDrawn as Ye}from"../../../../../../render/lib/content/box-shared-columns.js";const Oo=ko,mo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},ve={field:"direction",is:"tabs"},je={field:"line",in:[!0,!1]},Ve={field:"anchor",set:!0},F=["fixed","screen","fill"],Je={not:{any:[{field:"sectionHeightMode",in:F},{field:"sectionHeightModeTablet",in:F},{field:"sectionHeightModePhone",in:F}]}},ze={context:"parent.line",is:!0},_={not:{field:"direction",is:"accordion"}},fo={field:"direction",is:"accordion"},Ro={any:[_,{not:{field:P,is:"numbered"}},{field:"columns",in:[...Re]},{field:"phoneRow",in:[...he]}]},ho="notAccordionRow",qe={not:{context:ho,is:!0}},Qe={[ho]:(o,e)=>e.parent?.props?.direction!=="accordion"},H={field:"direction",is:"row",default:"row"},p={not:Le},S={all:[H,p,{not:{field:"separator",in:$.map(o=>o.value)}},{not:{field:"line",is:!0}}]},Ze={field:"direction",is:"column"},uo={all:[S,...["columns",i("columns")].map(o=>({not:{field:o,in:Array.from({length:D},(e,n)=>n+I)}}))]},$e={all:[p,{not:{all:[H,{field:"separator",in:$.map(o=>o.value)}]}}]},W={not:{all:[S,{field:"columns",in:Array.from({length:D},(o,e)=>e+I)}]}},on="sharedColumnsFits",Ao="sharedColumnsMisfit",Co="sharedColumnsDraws",wo="sharedColumnsPhoneDraws";function O(o,e){return Po(o.props??{},Uo(e.appState,o.props?.id)?.inCopy!==!1)}const en={[on]:(o,e)=>So(O(o,e)),[Ao]:(o,e)=>!So(O(o,e)),[Co]:(o,e)=>po(O(o,e)).desktop,[wo]:(o,e)=>po(O(o,e)).phone};function Eo(o){return{all:[{not:{context:Ao,is:!0}},{any:[ao,{field:o,set:!0}]}]}}const m={not:{context:Co,is:!0}},u={not:{context:wo,is:!0}},To="sharedRowsDraws",nn={[To]:(o,e)=>Ye(O(o,e))&&so(e.appState,o.props?.id)?.row===void 0},w={not:{context:To,is:!0}},tn={any:[m,u]},B=Fo,rn={not:{context:xe,is:!0}},No="rowHanded",ln={not:{context:No,is:!0}},an={[No]:(o,e)=>{const n=so(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Lo={all:[_,B,m,u,rn]},sn={field:"direction",is:"row"},dn={field:"align",in:["start","center","end"]},cn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function _n(){const{darken:o,darkenStyle:e}=Xo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Do={not:{all:[S,{field:i("columns"),in:Array.from({length:D},(o,e)=>e+I)}]}};function pn(){const o=c(oo,!1,t(j,{})),e=n=>{const l=Z(n);return l===void 0?void 0:l==="wrap"};return{...N(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:l=>n.onChange(l===void 0?void 0:l?"wrap":"nowrap")})}}function Sn(){const o=c(oo,!0,t(j,{})),e=n=>{const l=Z(n);return l===void 0?void 0:l==="wrap"};return{...N(),render:n=>{const l=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!ue(void 0,l?n.follows:void 0),followsNoView:!l,onChange:A=>n.onChange(A===void 0?void 0:A?"wrap":"nowrap")})}}}const Io={hint:L},go={all:[B,{any:[Ze,{all:[S,Do,{not:{all:[uo,{field:i("share"),set:!0}]}}]}]}]},On=to(a("desktop",no("Narrows below",t(X,{}),f.min,f.max,f.step,L,{kind:"breakpoint"},{clear:Io,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),go);function mn(o,e){const n=o;return!(T in n)||e.direction!=="column"?o:{...n,[T]:On}}const lt={fields:Te({_gContent:R("Content"),rowTitle:lo.rowTitle,content:lo.content,_gCardDisplay:R("Display"),cardDisplay:k("desktop"),cardDisplayTablet:k("tablet"),cardDisplayPhone:k("mobile"),showFor:Ue(),_gLayout:R("Layout"),direction:ce("Flex"),tabShape:g("Tab shape",t(Y,{}),Go.map(o=>({label:Yo[o],value:o,picture:jo[o]})),"tabs",{columns:2,cell:U}),mirrorCards:ye(),[T]:a("desktop",no("Stacks below",t(X,{}),f.min,f.max,f.step,L,{kind:"breakpoint"},{clear:Io,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[io]:ge(),startsOpen:a("desktop",c("Starts open",!1,t(qo,{}))),[P]:a("desktop",g("Row style",t(G,{}),Pe.map(o=>({...o,picture:o.value==="numbered"?t(G,{}):t(ee,{})})),"plain",{columns:2})),label:Oe(Se("Tab name")),..._e("Flex"),...d("justify",we(),s),...d("align",Ce(),s),...(()=>{const o=d("wrap",N(),s,{phoneRow:Sn()}),e=d("wrap",N(),s,{phoneRow:pn()});return{wrap:e.wrap,[i("wrap")]:e[i("wrap")],[r("wrap")]:o[r("wrap")]}})(),[r("order")]:He(),...d("boxShape",Q("Box shape",t(K,{}),q(z),"shape","auto"),s,{phoneRow:Q("Box shape",t(K,{}),q(z),"shape","auto",{phoneRest:o=>me(o)})}),[fe]:a("desktop",Ae(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:Ne(t($o,{size:18}),"none"),[C]:a("desktop",g("Card style",t(Y,{}),Vo.map(o=>({...o,picture:vo[o.value]})),"table",{columns:2,cell:U})),share:a("desktop",ae()),[i("share")]:de(),[r("share")]:se(),[h]:a("desktop",b(co,t(v,{}),[...Ge],_o)),[r(h)]:a("mobile",b(co,t(v,{}),[...Xe],_o)),...le(),...d("blockSpacing",re(),s),line:c("Line",!1,t(oe,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,t(Qo,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:b("Join",t(Zo,{}),Ie,De),_gShadow:R("Shadow"),...d("shadow",c("Shadow",!1,t(ne,{})),s),...d("fillColor",ie(),s),[bo]:y("Fill content","colour"),_gBackground:R("Background image"),bgImage:a("desktop",J("Image","image/*")),bgImagePhone:a("mobile",J("Image","image/*")),[Ho]:y("Image content","image",{content:!0}),..._n(),placement:Ee("Content position"),_gLink:R("Link"),link:yo(pe("Link to")),[Mo]:xo(),jumpHighlight:c("Highlight when a link jumps here",!1,t(te,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],Oo],[[r("share")],{all:[mo,u]}],[[h],Eo(h)],[[r(h)],Eo(r(h))],[[r("wrap")],{all:[mo,p,u,w]}],[[r("order")],{all:[S,u,m]}],[["phoneRow"],u],[[P],fo],[["tabShape"],ve],[["rowTitle","startsOpen"],qe],[["align","blockSpacing",i("blockSpacing"),r("blockSpacing")],_],[[i("justify"),r("justify")],{all:[p,Lo,w]}],[[i("align"),r("align")],{all:[sn,dn,Lo]}],[[i("wrap")],{all:[p,W,Do,m,_,w]}],[[i("shadow"),r("shadow")],B],[[i("darken"),r("darken"),i("darkenStyle"),r("darkenStyle")],{all:[Oo,cn]}],[["separator"],H],[[C],{field:C,set:!0}],[["columns"],{any:[S,fo]}],[[i("columns")],S],[[T],go],[[i("gap")],{all:[$e,Ro]}],[["gap",r("gap")],Ro],[["justify"],{all:[p,tn,_,w]}],[["wrap"],{all:[p,W,m,_,w]}],[["share"],{all:[W,m,_]}],[[i("share")],{all:[uo,m]}],[["line"],je],[["upcoming"],ze],[["jumpHighlight"],Ve],[["boxShape",i("boxShape"),r("boxShape")],Je],[["direction","share",r("order")],ln],[["join"],ro],[[io],ro]]),resolveData:(o,e)=>{const n=o.props,l=n[C];return e.changed?.[C]===!0&&zo(l)?{...o,props:Jo(n,l,ke,Fe)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:be(n)}:o},resolveFields:(o,e)=>mn(Rn(Ke(hn(o,{...e,fields:Bo(e.fields,o,e)}),o.props),O(o,e)),o.props),showWhenFacts:{...Wo,...We,...Be,...an,...en,...nn,...Me,...Qe}},fn=to(Ko,ao);function Rn(o,e){const n=o;return!(M in n)||x(e)?o:{...n,[M]:fn}}function hn(...[o,e]){const{fields:n}=e;{if(x(O(o,e))){const A=eo({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return V(n,A)}return o.props.padV2!==!0?V(n,eo({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{lt as FlexFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{phoneKey as i,tabletKey as l}from"efficient-easel/draw";import{BOX_CARD_PAD as E,BOX_SWATCH_PROP as ko,boxCardProps as Ho,boxIsCard as I}from"../../../../../../format/lib/content/box-background.js";import{BOX_IS_CARD_RULE as Fo,BOX_IS_NOT_CARD_RULE as Wo,BOX_ROW_IMAGE_PROP as yo}from"../../../../../../format/lib/content/box-card-rule.js";import{CARD_ROW_FACTS as Bo,cardRowField as M,cardRowFields as xo,cardRowLinkField as Uo,typedLinkField as Mo}from"../../../card-row-fields.js";import{CARD_ROW_LINK_PROP as Ko,cardCopyPlace as K,cardTemplateCardOwner as Xo}from"../../../../../../format/lib/content/card-template.js";import{BOX_SHOW_KEY as Go,HOVER_GROUP_KEY as Yo,HOVER_KEY as T}from"../../../../../../format/lib/animation/hover.js";import{BOX_HIGHLIGHT_ROW as vo,BOX_NEXT_PICTURE_ROW as jo}from"../../../../animation/hover-fields.js";import{darkenFields as Vo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as Jo,REEL_SHAPE_LABELS as zo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as X,CARD_LIST_STYLE_PICTURES as qo,TAB_SHAPE_PICTURES as Qo}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as A,CARD_STYLE_POINTS as Zo,applyCardStyle as $o,isCardStyle as oe}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as a}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as ee,ClockIcon as ne,CropIcon as G,GapIcon as te,MediaLayoutStackedIcon as Y,LineBetweenIcon as re,LineSolidIcon as ie,ListIcon as le,NumberedListIcon as v,ShadowIcon as ae,StylesIcon as j,TableIcon as V,TargetIcon as se,WrapIcon as J}from"efficient-easel/icons";import{boxBlockSpacingField as de,boxFillField as ce,boxColumnsFields as _e,boxShareField as pe,boxSharePhoneField as Oe,boxShareTabletField as Se,containerDirectionField as me,containerGapRows as fe,linkField as Re,plainText as ue,swapPadding as z,toggle as c,upload as q,withPanelOnly as he}from"../../../controls.js";import{BOX_STACK_LINE as L,BOX_STACK_RANGE as R,STACK_BELOW_PROP as N}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as Q,boxShapeOf as Ce}from"../../../../../../format/lib/content/box-shape.js";import{BOX_ANGLE_PROP as Ae}from"../../../../../../format/lib/content/box-angle.js";import{shapeLines as Z}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as $}from"../../../shape-picker.js";import{ACCORDION_COLUMN_COUNTS as we,ACCORDION_PHONE_COLUMN_COUNTS as Ee,BOX_COLUMNS_MAX as g,BOX_COLUMNS_MIN as b,boxPhoneRowOneLine as Te,boxWrapWordOf as oo}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as eo}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as no,VIEW_KEY_ACCESS as s,group as u,phoneTwinFields as d}from"efficient-easel/screen/lib/document/box-fields";import{angleRow as Ne,boxAlignField as De,boxJustifyField as Ie,boxWrapField as D,iconPickerRow as P,placementField as Le,select as k,sidesPaddingFields as to,slider as ro}from"../../../box-fields.js";import{withRowRules as ge,withShowWhen as H}from"../../../../../../render/lib/document/show-when.js";import{separatorField as be}from"../../../separator-field.js";import{LOOP_SCROLLS as Pe}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as ke,TICKER_JOIN_OPTIONS as He}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as io}from"../../../../../../format/lib/document/passes/document-position.js";import{BOX_SIDE_SPACE_PROP as lo}from"../../../../../../format/lib/content/box-side-space.js";import{boxSideSpaceField as Fe}from"../../../box-side-space-field.js";import{accordionOnSet as We}from"../../../box-accordion-seed.js";import{ACCORDION_ROW_STYLE_POINTS as ye,ACCORDION_ROW_STYLE_PROP as F}from"../../../../../../format/lib/content/accordion-row-style.js";import{FlexSlots as ao}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as Be,CONTAINER_BLOCKS_SLOT as xe}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as Ue}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as Me,ON_A_CARD as so,ON_A_PICTURE_OR_CARD as Ke,cardDisplayField as W}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as Xe,MIRROR_CARDS_MIRRORS as Ge,mirrorCardsField as Ye}from"../../../mirror-cards-field.js";import{handedRowOf as co}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as ve,showForField as je,showForFields as Ve}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as h,SHARED_COLUMNS_LABEL as _o,SHARED_COLUMNS_OFF as po,sharedColumnsDrawn as Oo,sharedColumnsFits as So,SHARED_COLUMNS_PHONE_POINTS as Je,SHARED_COLUMNS_POINTS as ze,sharedRowsDrawn as qe}from"../../../../../../render/lib/content/box-shared-columns.js";const mo=Fo,fo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},Qe={field:"direction",is:"tabs"},Ze={field:"line",in:[!0,!1]},$e={field:"anchor",set:!0},y=["fixed","screen","fill"],on={not:{any:[{field:"sectionHeightMode",in:y},{field:"sectionHeightModeTablet",in:y},{field:"sectionHeightModePhone",in:y}]}},en={context:"parent.line",is:!0},_={not:{field:"direction",is:"accordion"}},Ro={field:"direction",is:"accordion"},uo={any:[_,{not:{field:F,is:"numbered"}},{field:"columns",in:[...we]},{field:"phoneRow",in:[...Ee]}]},ho="notAccordionRow",nn={not:{context:ho,is:!0}},tn={[ho]:(o,e)=>e.parent?.props?.direction!=="accordion"},B={field:"direction",is:"row",default:"row"},p={not:Pe},O={all:[B,p,{not:{field:"separator",in:eo.map(o=>o.value)}},{not:{field:"line",is:!0}}]},rn={field:"direction",is:"column"},Co={all:[O,...["columns",l("columns")].map(o=>({not:{field:o,in:Array.from({length:g},(e,n)=>n+b)}}))]},ln={all:[p,{not:{all:[B,{field:"separator",in:eo.map(o=>o.value)}]}}]},x={not:{all:[O,{field:"columns",in:Array.from({length:g},(o,e)=>e+b)}]}},an="sharedColumnsFits",Ao="sharedColumnsMisfit",wo="sharedColumnsDraws",Eo="sharedColumnsPhoneDraws";function S(o,e){return Ho(o.props??{},K(e.appState,o.props?.id)?.inCopy!==!1)}const sn={[an]:(o,e)=>So(S(o,e)),[Ao]:(o,e)=>!So(S(o,e)),[wo]:(o,e)=>Oo(S(o,e)).desktop,[Eo]:(o,e)=>Oo(S(o,e)).phone};function To(o){return{all:[{not:{context:Ao,is:!0}},{any:[so,{field:o,set:!0}]}]}}const m={not:{context:wo,is:!0}},C={not:{context:Eo,is:!0}},No="sharedRowsDraws",dn={[No]:(o,e)=>qe(S(o,e))&&co(e.appState,o.props?.id)?.row===void 0},w={not:{context:No,is:!0}},cn={any:[m,C]},U=Wo,_n={not:{context:Ge,is:!0}},Do="rowHanded",pn={not:{context:Do,is:!0}},On={[Do]:(o,e)=>{const n=co(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},Io={all:[_,U,m,C,_n]},Sn={field:"direction",is:"row"},mn={field:"align",in:["start","center","end"]},fn={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function Rn(){const{darken:o,darkenStyle:e}=Vo();return{...d("darken",o,s),...d("darkenStyle",e,s)}}const Lo={not:{all:[O,{field:l("columns"),in:Array.from({length:g},(o,e)=>e+b)}]}};function un(){const o=c(no,!1,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:t=>n.onChange(t===void 0?void 0:t?"wrap":"nowrap")})}}function hn(){const o=c(no,!0,r(J,{})),e=n=>{const t=oo(n);return t===void 0?void 0:t==="wrap"};return{...D(),render:n=>{const t=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!Te(void 0,t?n.follows:void 0),followsNoView:!t,onChange:f=>n.onChange(f===void 0?void 0:f?"wrap":"nowrap")})}}}const go={hint:L},bo={all:[U,{any:[rn,{all:[O,Lo,{not:{all:[Co,{field:l("share"),set:!0}]}}]}]}]},Cn=H(a("desktop",ro("Narrows below",r(Y,{}),R.min,R.max,R.step,L,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the side space narrows and the Phone Padding is used."})),bo);function An(o,e){const n=o;return!(N in n)||e.direction!=="column"?o:{...n,[N]:Cn}}const St={fields:ge({_gContent:u("Content"),rowTitle:ao.rowTitle,content:ao.content,_gCardDisplay:u("Display"),cardDisplay:W("desktop"),cardDisplayTablet:W("tablet"),cardDisplayPhone:W("mobile"),showFor:je(),_gLayout:u("Layout"),direction:me("Flex"),tabShape:P("Tab shape",r(j,{}),Jo.map(o=>({label:zo[o],value:o,picture:Qo[o]})),"tabs",{columns:2,cell:X}),mirrorCards:Ye(),[N]:a("desktop",ro("Stacks below",r(Y,{}),R.min,R.max,R.step,L,{kind:"breakpoint"},{clear:go,hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),[lo]:Fe(),startsOpen:a("desktop",c("Starts open",!1,r(ee,{}))),[F]:a("desktop",P("Row style",r(v,{}),ye.map(o=>({...o,picture:o.value==="numbered"?r(v,{}):r(le,{})})),"plain",{columns:2})),label:he(ue("Tab name")),...fe("Flex"),...d("justify",Ie(),s),...d("align",De(),s),...(()=>{const o=d("wrap",D(),s,{phoneRow:hn()}),e=d("wrap",D(),s,{phoneRow:un()});return{wrap:e.wrap,[l("wrap")]:e[l("wrap")],[i("wrap")]:o[i("wrap")]}})(),[i("order")]:Ue(),...d("boxShape",$("Box shape",r(G,{}),Z(Q),"shape","auto"),s,{phoneRow:$("Box shape",r(G,{}),Z(Q),"shape","auto",{phoneRest:o=>Ce(o)})}),[Ae]:a("desktop",Ne(0,{clear:{hint:0},hint:"Turns the box. 0° is straight."})),separator:be(r(re,{size:18}),"none"),[A]:a("desktop",P("Card style",r(j,{}),Zo.map(o=>({...o,picture:qo[o.value]})),"table",{columns:2,cell:X})),share:a("desktop",pe()),[l("share")]:Se(),[i("share")]:Oe(),[h]:a("desktop",k(_o,r(V,{}),[...ze],po)),[i(h)]:a("mobile",k(_o,r(V,{}),[...Je],po)),..._e(),...d("blockSpacing",de(),s),line:c("Line",!1,r(ie,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,r(ne,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:k("Join",r(te,{}),He,ke),_gShadow:u("Shadow"),...d("shadow",c("Shadow",!1,r(ae,{})),s),...d("fillColor",ce(),s),[ko]:M("Fill content","colour"),_gBackground:u("Background image"),bgImage:a("desktop",q("Image","image/*")),bgImagePhone:a("mobile",q("Image","image/*")),[yo]:M("Image content","image",{content:!0}),...Rn(),placement:Le("Content position"),_gLink:u("Link"),link:Mo(Re("Link to")),[Ko]:Uo(),jumpHighlight:c("Highlight when a link jumps here",!1,r(se,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],mo],[[i("share")],{all:[fo,C]}],[[h],To(h)],[[i(h)],To(i(h))],[[i("wrap")],{all:[fo,p,C,w]}],[[i("order")],{all:[O,C,m]}],[["phoneRow"],C],[[F],Ro],[["tabShape"],Qe],[["rowTitle","startsOpen"],nn],[["align","blockSpacing",l("blockSpacing"),i("blockSpacing")],_],[[l("justify"),i("justify")],{all:[p,Io,w]}],[[l("align"),i("align")],{all:[Sn,mn,Io]}],[[l("wrap")],{all:[p,x,Lo,m,_,w]}],[[l("shadow"),i("shadow")],U],[[l("darken"),i("darken"),l("darkenStyle"),i("darkenStyle")],{all:[mo,fn]}],[["separator"],B],[[A],{field:A,set:!0}],[["columns"],{any:[O,Ro]}],[[l("columns")],O],[[N],bo],[[l("gap")],{all:[ln,uo]}],[["gap",i("gap")],uo],[["justify"],{all:[p,cn,_,w]}],[["wrap"],{all:[p,x,m,_,w]}],[["share"],{all:[x,m,_]}],[[l("share")],{all:[Co,m]}],[["line"],Ze],[["upcoming"],en],[["jumpHighlight"],$e],[["boxShape",l("boxShape"),i("boxShape")],on],[["direction","share",i("order")],pn],[["join"],io],[[lo],io]]),resolveData:(o,e)=>{const n=o.props,t=n[A];return e.changed?.[A]===!0&&oe(t)?{...o,props:$o(n,t,Be,xe)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:We(n)}:o},resolveFields:(o,e)=>{const n=K(e.appState,o.props?.id)?.inCopy===!0,t=n&&Xo(e.appState,o.props?.id)===null;return An(Tn(Nn(Ve(Dn(o,{...e,fields:xo(e.fields,o,e)}),o.props),S(o,e),n),t),o.props)},showWhenFacts:{...Bo,...Me,...Xe,...On,...sn,...dn,...ve,...tn}},wn=H(vo,so),En=["darken","darkenStyle",Yo,Go];function Tn(o,e){if(!e)return o;const n={...o};for(const t of En){if(!(t in n))continue;const{showWhen:f,...Po}=n[t];n[t]=Po}return n}function Nn(o,e,n=!1){const t=o;return T in t&&I(e)&&n?{...t,[T]:H(jo,Ke)}:!(T in t)||I(e)?o:{...t,[T]:wn}}function Dn(...[o,e]){const{fields:n}=e;{if(I(S(o,e))){const f=to({fallback:{top:E.desktop,bottom:E.desktop,left:E.side,right:E.side},tablet:!0,siteSide:!0});return z(n,f)}return o.props.padV2!==!0?z(n,to({fallback:{top:24,bottom:24},tablet:!0,siteSide:!0})):n}}export{St as FlexFields};
@@ -3,7 +3,7 @@ import { boxFieldBuilders, type BoxFieldSay } from "efficient-easel/screen/lib/d
3
3
  import type { ShowWhenRule } from "efficient-shell/format";
4
4
  type Rows = ReturnType<typeof boxFieldBuilders>;
5
5
  export declare const rowSay: BoxFieldSay;
6
- export declare const LENGTH_UNITS_TABLE: Readonly<Record<"size" | "spacing" | "gap" | "letterSpacing" | "fontSize" | "border" | "height" | "position" | "radius" | "breakpoint", readonly ("px" | "%" | "vw")[]>>;
6
+ export declare const LENGTH_UNITS_TABLE: Readonly<Record<"size" | "spacing" | "gap" | "radius" | "fontSize" | "letterSpacing" | "position" | "border" | "height" | "breakpoint", readonly ("px" | "%" | "vw")[]>>;
7
7
  export declare const slider: Rows["slider"];
8
8
  export declare const select: Rows["select"];
9
9
  export declare const Segmented: Rows["Segmented"];
@@ -3,6 +3,7 @@ import { type CardRowFieldSpec } from "../../../format/lib/content/card-template
3
3
  import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/document/show-when-attach.js";
4
4
  export declare const NOT_CARD_OF_TEMPLATE = "notCardOfTemplate";
5
5
  export declare const ON_A_CARD: ShowWhenRule;
6
+ export declare const ON_A_PICTURE_OR_CARD: ShowWhenRule;
6
7
  export declare const CARD_BOX_FACTS: BlockShowWhenFacts;
7
8
  type Child = {
8
9
  type: string;
@@ -1 +1 @@
1
- "use client";import{jsx as l}from"react/jsx-runtime";import{isNodeList as N}from"efficient-easel/data";import{useEasel as D}from"efficient-easel/easel";import{hiddenInView as _,hiddenKeyOf as k,hidePatch as A,slotChildName as T,slotChildRowName as F}from"efficient-easel/draw";import{cardListFieldsOf as P,cardTemplateCardOwner as g,cardTemplateSlotOf as j,namedRowField as E,rowFieldSpec as L}from"../../../format/lib/content/card-template.js";import{DisplayRow as x,useSelectedPatch as M}from"./controls.js";import{websiteNodeIsLocked as I}from"./locked-blocks.js";import{stripMarkup as $}from"../../../format/lib/markup.js";import{sourceRowName as B}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as H}from"../../../format/lib/document/show-when-attach.js";import{deviceField as K}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as V}from"efficient-easel/screen/lib/document/panel-no-control-mark";const R="notCardOfTemplate",W={not:{context:R,is:!0}},de={[R]:(e,n)=>{const t=g(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function m(e){const n=e.props?.content;return N(n)?n:[]}const y=(e,n)=>_(e.props??{},n),X=(e,n)=>e.props?.[k(n)]!==void 0;function S(e,n=()=>!1,t="desktop"){return m(e).flatMap(o=>typeof o?.props?.id!="string"?[]:m(o).length&&!y(o,t)?S(o,n,t):n(o)?[]:[o])}function Y(e,n,t,o="desktop"){const r=S(e,t,o).map(p=>({child:p,name:n(p)})),a=new Set(r.map(p=>p.name)),s=new Set;return r.map(({child:p,name:i})=>{let d=i;if(s.has(i)){let u=2;for(;a.has(`${i} ${u}`);)u+=1;d=`${i} ${u}`,a.add(d)}return s.add(i),{id:p.props.id,label:d,shown:!y(p,o)}})}function O(e,n,t){const o=r=>t==="desktop"?y(r,t):X(r,t);return m(e).flatMap(r=>o(r)?n(r)?[]:[r,...O(r,n,t)]:O(r,n,t))}function q(e,n){const t={...e};for(const[r,a]of Object.entries(n))a===void 0||r===k("desktop")&&a===!1?delete t[r]:t[r]=a;return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>t[r]===e[r])?e:t}function w(e,n,t){const o=m(e);let r=!1;const a=o.map(s=>{if(r)return s;let p=s;if(s?.props?.id===n){const i=q(s.props,t(s.props));i!==s.props&&(p={...s,props:i})}else p=w(s,n,t);return r=p!==s,p});return r?{...e,props:{...e.props,content:a}}:e}function b(e,n,t,o="desktop"){return w(e,n,r=>o==="desktop"&&y({props:r},o)===!t?{}:A(r,o,!t))}function z(e,n,t){return t==="desktop"?b(e,n,!0,t):w(e,n,()=>({[k(t)]:void 0}))}function G(e,n,t,o,r,a){return T(e).trim()?t(e):L({ownerType:n,owner:o,fields:r,slot:a},E(e.props))?.label??t(e)}const J="This page is read-only.";function Q({card:e,ownerType:n,owner:t,fields:o,slot:r,labelOf:a,write:s,readOnly:p,view:i="desktop"}){const d=f=>F(f,a,$,void 0,B),u=f=>I(f.type,f),C=Y(e,f=>G(f,n,d,t,o,r),u,i);return C.length?l(x,{parts:C,changed:O(e,u,i).length>0,shown:f=>C.find(c=>c.id===f)?.shown??!0,disabledReason:p?J:void 0,onPress:(f,c)=>s(h=>b(h,f,c,i)),onReset:()=>s(f=>O(f,u,i).reduce((c,h)=>z(c,String(h.props.id),i),f))}):l(V,{})}function U(){try{const e=D(r=>r),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const o=g(e.appState,t.props?.id);return{labelOf:r=>n[r]?.label??r,card:t,ownerType:typeof o?.type=="string"?o.type:void 0,owner:o,fields:P(e.appState,o),slot:j(e.appState,t.props?.id)??void 0}}catch{return null}}function Z({readOnly:e,view:n}){const t=U(),o=M();return t?l(Q,{...t,view:n,readOnly:e,write:r=>{e||o(a=>{const s={...t.card,props:a},p=r(s);return p===s?null:{content:p.props.content}})}}):l(x,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function ce(e){return H(K(e,{type:"custom",render:({readOnly:n})=>l(Z,{readOnly:n,view:e})}),W)}export{de as CARD_BOX_FACTS,Q as CardDisplayChips,R as NOT_CARD_OF_TEMPLATE,W as ON_A_CARD,G as cardChipLabel,ce as cardDisplayField,Y as cardDisplayItems,S as cardDisplayParts,b as withChildShown};
1
+ "use client";import{jsx as m}from"react/jsx-runtime";import{isNodeList as A}from"efficient-easel/data";import{useEasel as D}from"efficient-easel/easel";import{hiddenInView as N,hiddenKeyOf as _,hidePatch as T,slotChildName as E,slotChildRowName as P}from"efficient-easel/draw";import{cardListFieldsOf as F,cardTemplateCardOwner as k,cardTemplateSlotOf as L,namedRowField as j,rowFieldSpec as I}from"../../../format/lib/content/card-template.js";import{DisplayRow as w,useSelectedPatch as M}from"./controls.js";import{websiteNodeIsLocked as $}from"./locked-blocks.js";import{stripMarkup as B}from"../../../format/lib/markup.js";import{sourceRowName as U}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as X}from"../../../format/lib/document/show-when-attach.js";import{deviceField as H}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as K}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{BOX_IS_CARD_RULE as V}from"../../../format/lib/content/box-card-rule.js";const x="notCardOfTemplate",S={not:{context:x,is:!0}},me={any:[V,S]},le={[x]:(e,n)=>{const t=k(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function l(e){const n=e.props?.content;return A(n)?n:[]}const y=(e,n)=>N(e.props??{},n),W=(e,n)=>e.props?.[_(n)]!==void 0;function g(e,n=()=>!1,t="desktop"){return l(e).flatMap(o=>typeof o?.props?.id!="string"?[]:l(o).length&&!y(o,t)?g(o,n,t):n(o)?[]:[o])}function Y(e,n,t,o="desktop"){const r=g(e,t,o).map(p=>({child:p,name:n(p)})),a=new Set(r.map(p=>p.name)),s=new Set;return r.map(({child:p,name:i})=>{let d=i;if(s.has(i)){let u=2;for(;a.has(`${i} ${u}`);)u+=1;d=`${i} ${u}`,a.add(d)}return s.add(i),{id:p.props.id,label:d,shown:!y(p,o)}})}function O(e,n,t){const o=r=>t==="desktop"?y(r,t):W(r,t);return l(e).flatMap(r=>o(r)?n(r)?[]:[r,...O(r,n,t)]:O(r,n,t))}function q(e,n){const t={...e};for(const[r,a]of Object.entries(n))a===void 0||r===_("desktop")&&a===!1?delete t[r]:t[r]=a;return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>t[r]===e[r])?e:t}function h(e,n,t){const o=l(e);let r=!1;const a=o.map(s=>{if(r)return s;let p=s;if(s?.props?.id===n){const i=q(s.props,t(s.props));i!==s.props&&(p={...s,props:i})}else p=h(s,n,t);return r=p!==s,p});return r?{...e,props:{...e.props,content:a}}:e}function b(e,n,t,o="desktop"){return h(e,n,r=>o==="desktop"&&y({props:r},o)===!t?{}:T(r,o,!t))}function z(e,n,t){return t==="desktop"?b(e,n,!0,t):h(e,n,()=>({[_(t)]:void 0}))}function G(e,n,t,o,r,a){return E(e).trim()?t(e):I({ownerType:n,owner:o,fields:r,slot:a},j(e.props))?.label??t(e)}const J="This page is read-only.";function Q({card:e,ownerType:n,owner:t,fields:o,slot:r,labelOf:a,write:s,readOnly:p,view:i="desktop"}){const d=f=>P(f,a,B,void 0,U),u=f=>$(f.type,f),C=Y(e,f=>G(f,n,d,t,o,r),u,i);return C.length?m(w,{parts:C,changed:O(e,u,i).length>0,shown:f=>C.find(c=>c.id===f)?.shown??!0,disabledReason:p?J:void 0,onPress:(f,c)=>s(R=>b(R,f,c,i)),onReset:()=>s(f=>O(f,u,i).reduce((c,R)=>z(c,String(R.props.id),i),f))}):m(K,{})}function Z(){try{const e=D(r=>r),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const o=k(e.appState,t.props?.id);return{labelOf:r=>n[r]?.label??r,card:t,ownerType:typeof o?.type=="string"?o.type:void 0,owner:o,fields:F(e.appState,o),slot:L(e.appState,t.props?.id)??void 0}}catch{return null}}function v({readOnly:e,view:n}){const t=Z(),o=M();return t?m(Q,{...t,view:n,readOnly:e,write:r=>{e||o(a=>{const s={...t.card,props:a},p=r(s);return p===s?null:{content:p.props.content}})}}):m(w,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function ye(e){return X(H(e,{type:"custom",render:({readOnly:n})=>m(v,{readOnly:n,view:e})}),S)}export{le as CARD_BOX_FACTS,Q as CardDisplayChips,x as NOT_CARD_OF_TEMPLATE,S as ON_A_CARD,me as ON_A_PICTURE_OR_CARD,G as cardChipLabel,ye as cardDisplayField,Y as cardDisplayItems,g as cardDisplayParts,b as withChildShown};
@@ -1,2 +1,2 @@
1
- import{jsx as o,jsxs as P}from"react/jsx-runtime";import{accentItalicCss as $,storedTextStyles as K,textStylesCss as X}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as Y,PAGE_WIDTH_ATTR as q,siteWidthTokens as J,siteGutterTokens as Q,siteGutterPhoneClass as U,siteGutterPhoneTokens as Z,heroBackgroundTokens as ee}from"../../../format/lib/content/page-width.js";import{siteBlockGapPhoneClass as te,siteBlockGapPhoneTokens as oe,siteBlockGapTokens as ne}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as re}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as se}from"../../../render/components/SitePhotographyContext.js";import{ThemeLightInkProvider as ae}from"../../../render/components/ThemeLightInkContext.js";import{CORNER_STYLE_TO_PX as ie,normalizeCornerStyle as de,normalizeCornerRadius as ce,themeColorStyle as le,themeLightInk as he,typeSizesStyle as pe,headingTypographyStyle as me,normalizeHeadingTypography as fe,themeAccentStyle as ue,themeButtonStyle as ge,themePresetAccentVars as Se,themeSurfaceStyle as ye,siteCornerRadiusTokens as xe,shadowColorTokens as Te,headingCompressionAttr as ke,cardShadowAttr as Pe,cardGapAttr as Ce,hoverEffectAttr as Ee}from"../../../format/lib/theme.js";import{fontRoleStyle as Ae}from"../../../format/lib/fonts.js";import{wordStyleTokens as ve}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Ge,pageHasHeaderSection as C,pageTakesTopSpace as _e,topSpaceMarker as Be,TOP_SPACE_ATTR as we,HEADER_CLEARANCE_CLASS as Ie}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as Re,HEADER_INK_ATTR as We}from"../../../render/lib/document/header-ink.js";import{useEasel as He}from"efficient-easel/easel";import{useCardContentSwitchPass as Ne}from"../../components/useCardContentSwitchPass.js";import{pageBackgroundVars as be}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as De}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as ze}from"../../../render/lib/document/editing-bridges.js";import Le from"../../components/SectionTextPartBridge.js";import{PageContentsFromDocument as E}from"../../../render/components/PageContentsContext.js";const je={SectionTextParts:Le};import{PageWidthWrapper as mt,PublishedPageFrame as ft,pageWidthTokens as ut}from"../../../render/lib/document/page-frame.js";const Fe="color-mix(in oklab, var(--bg) 40%, #ffffff)",Ve="12vh";function Oe({style:n,children:a}){const{appState:i}=He(u=>u),t=i.data.content,s=i.data.root;if(Ge(t))return o("div",{className:"sf-themed-content",style:{...n,background:Fe,minHeight:"100vh",paddingBottom:Ve},children:o("div",{style:{background:"var(--bg)"},children:o(E,{content:t,children:a})})});const d=C(t)&&_e(s,t),c=C(t)?Be(s,t):null,p=c?{[we]:c}:null,l=Y(s?.widthChoice),m=l?{[q]:l}:null,h=d?null:Re(t),f=h?{[We]:h}:null;return o("div",{className:`sf-themed-content${d?` ${Ie}`:""}`,style:n,...f,...p,...m,children:o("div",{style:{background:"var(--bg)",minHeight:"100%"},children:o(E,{content:t,children:a})})})}function ct({propsTheme:n,propsFonts:a,propsCornerStyle:i,propsCornerRadiusPx:t,propsHeadingCompression:s,propsHeadingTypography:d,pageBackground:c,chromeInheritsSiteBackground:p,suppressPreviewNav:l,footer:m,overlay:h,children:f}){const{theme:u,fonts:A,sizes:v,cornerRadiusPx:G,cardShadow:g,shadowColor:_,cardGap:B,hoverEffect:S,headingCompression:w,siteWidth:I,siteGutter:R,siteGutterPhone:y,blockGap:W,blockGapPhone:x,headingTypography:H,heroBackgroundFollowsWidth:N,photographyGrayscale:b,textStyles:D,wordStyles:z,themeFromDocument:e}=re();Ne();const r=e?n:u,L=e?a:A,j=e?void 0:v,F=e?t===void 0?ie[de(i)]:ce(t):G,V=e?s:w,T=e?d:H,k=[X(K(e?void 0:D)),$(fe(T).italicStrong)].filter(Boolean).join(`
2
- `),O=De(),M={...le(r),...pe(j),...me(T),...O.style,...p?{}:be(c)};return P("div",{className:`sf-theme-surfaces sf-theme-accent ${[U(e?void 0:y),te(e?void 0:x)].filter(Boolean).join(" ")}`.trim(),style:{...Ae(L),...ve(e?null:z),...ue(r),...ge(r),...Se(r),...ye(r),...xe(F),...Te(e?void 0:g,e?void 0:_,e?void 0:S),...J(e?void 0:I),...Q(e?void 0:R),...Z(e?void 0:y),...ne(e?void 0:W),...oe(e?void 0:x),...ee(e?void 0:N)},"data-sf-headings":ke(V),"data-sf-card-shadow":e?void 0:Pe(g),"data-sf-card-gap":e?void 0:Ce(B),"data-sf-card-hover":e?void 0:Ee(S),onClickCapture:l,children:[k?o("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:k}}):null,o(se,{grayscale:e?void 0:b,children:o(ze,{value:je,children:P(ae,{ink:he(r),children:[o(Oe,{style:M,children:f}),m,h]})})})]})}const lt=n=>{n.target?.closest?.("a")&&n.preventDefault()};export{je as EDITING_BRIDGES,Oe as EditorPageBody,ct as EditorThemedBody,mt as PageWidthWrapper,ft as PublishedPageFrame,Fe as SECTION_PREVIEW_CANVAS,Ve as SECTION_PREVIEW_CANVAS_TAIL,ut as pageWidthTokens,lt as suppressPreviewNav};
1
+ import{jsx as o,jsxs as C}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as X,textStylesCss as Y}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as q,PAGE_WIDTH_ATTR as J,siteWidthTokens as Q,siteGutterTokens as Z,siteGutterPhoneClass as ee,siteGutterPhoneTokens as te,heroBackgroundTokens as oe}from"../../../format/lib/content/page-width.js";import{siteBlockGapPhoneClass as ne,siteBlockGapPhoneTokens as re,siteBlockGapTokens as ie}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as se}from"../../../render/components/PreviewHeaderContext.js";import{SitePhotographyProvider as ae}from"../../../render/components/SitePhotographyContext.js";import{ThemeLightInkProvider as de}from"../../../render/components/ThemeLightInkContext.js";import{CORNER_STYLE_TO_PX as ce,normalizeCornerStyle as le,normalizeCornerRadius as he,themeColorStyle as pe,themeLightInk as me,typeSizesStyle as fe,headingTypographyStyle as ue,normalizeHeadingTypography as ge,themeAccentStyle as Se,themeButtonStyle as ye,themePresetAccentVars as xe,themeSurfaceStyle as Te,siteCornerRadiusTokens as ke,shadowColorTokens as Pe,headingCompressionAttr as Ce,cardShadowAttr as Ge,cardGapAttr as Ee,hoverEffectAttr as Ae}from"../../../format/lib/theme.js";import{fontRoleStyle as ve}from"../../../format/lib/fonts.js";import{wordStyleTokens as _e}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Be,pageHasHeaderSection as G,pageTakesTopSpace as Re,topSpaceMarker as we,TOP_SPACE_ATTR as Ie,HEADER_CLEARANCE_CLASS as We}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as He,HEADER_INK_ATTR as be}from"../../../render/lib/document/header-ink.js";import{useEasel as Ne}from"efficient-easel/easel";import{useCardContentSwitchPass as De}from"../../components/useCardContentSwitchPass.js";import{pageBackgroundVars as Le}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as Ue}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as ze}from"../../../render/lib/document/editing-bridges.js";import je from"../../components/SectionTextPartBridge.js";import{PageContentsFromDocument as E}from"../../../render/components/PageContentsContext.js";const Fe={SectionTextParts:je};import{PageWidthWrapper as ut,PublishedPageFrame as gt,pageWidthTokens as St}from"../../../render/lib/document/page-frame.js";const Ve="color-mix(in oklab, var(--bg) 40%, #ffffff)",Oe="12vh";function Me({style:n,children:a}){const{appState:d}=Ne(g=>g),t=d.data.content,s=d.data.root;if(Be(t))return o("div",{className:"sf-themed-content",style:{...n,background:Ve,minHeight:"100vh",paddingBottom:Oe},children:o("div",{style:{background:"var(--bg)"},children:o(E,{content:t,children:a})})});const c=G(t)&&Re(s,t),l=G(t)?we(s,t):null,m=l?{[Ie]:l}:null,h=q(s?.widthChoice),f=h?{[J]:h}:null,p=c?null:He(t),u=p?{[be]:p}:null;return o("div",{className:`sf-themed-content${c?` ${We}`:""}`,style:n,...u,...m,...f,children:o("div",{style:{background:"var(--bg)",minHeight:"100%"},children:o(E,{content:t,children:a})})})}function ht({propsTheme:n,propsFonts:a,propsCornerStyle:d,propsCornerRadiusPx:t,propsHeadingCompression:s,propsHeadingTypography:c,pageBackground:l,chromeInheritsSiteBackground:m,suppressPreviewNav:h,footer:f,overlay:p,children:u}){const{theme:g,fonts:A,sizes:v,cornerRadiusPx:_,cardShadow:S,shadowColor:B,cardGap:R,hoverEffect:y,headingCompression:w,siteWidth:I,siteGutter:W,siteGutterPhone:x,blockGap:H,blockGapPhone:T,siteLengthUnits:b,headingTypography:N,heroBackgroundFollowsWidth:D,photographyGrayscale:L,textStyles:U,wordStyles:z,themeFromDocument:e}=se();De();const r=e?n:g,j=e?a:A,F=e?void 0:v,V=e?t===void 0?ce[le(d)]:he(t):_,i=e?{}:b,O=e?s:w,k=e?c:N,P=[Y(X(e?void 0:U)),K(ge(k).italicStrong)].filter(Boolean).join(`
2
+ `),M=Ue(),$={...pe(r),...fe(F),...ue(k),...M.style,...m?{}:Le(l)};return C("div",{className:`sf-theme-surfaces sf-theme-accent ${[ee(e?void 0:x),ne(e?void 0:T)].filter(Boolean).join(" ")}`.trim(),style:{...ve(j),..._e(e?null:z),...Se(r),...ye(r),...xe(r),...Te(r),...ke(V,i.cornerRadiusUnit),...Pe(e?void 0:S,e?void 0:B,e?void 0:y),...Q(e?void 0:I,i.siteWidthUnit),...Z(e?void 0:W,i.siteGutterUnit),...te(e?void 0:x,i.siteGutterPhoneUnit),...ie(e?void 0:H,i.blockGapUnit),...re(e?void 0:T,i.blockGapPhoneUnit),...oe(e?void 0:D)},"data-sf-headings":Ce(O),"data-sf-card-shadow":e?void 0:Ge(S),"data-sf-card-gap":e?void 0:Ee(R),"data-sf-card-hover":e?void 0:Ae(y),onClickCapture:h,children:[P?o("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:P}}):null,o(ae,{grayscale:e?void 0:L,children:o(ze,{value:Fe,children:C(de,{ink:me(r),children:[o(Me,{style:$,children:u}),f,p]})})})]})}const pt=n=>{n.target?.closest?.("a")&&n.preventDefault()};export{Fe as EDITING_BRIDGES,Me as EditorPageBody,ht as EditorThemedBody,ut as PageWidthWrapper,gt as PublishedPageFrame,Ve as SECTION_PREVIEW_CANVAS,Oe as SECTION_PREVIEW_CANVAS_TAIL,St as pageWidthTokens,pt as suppressPreviewNav};
@@ -1,3 +1,3 @@
1
- import{migrateLegacyPageData as R}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as E}from"../../../format/lib/document/renamed-props.js";import{listToWrite as C,setStyleValues as D}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as L,bandPresetIndex as j}from"../../../format/lib/theme.js";import{convertSection as F,convertSectionsInPage as I,sectionToBoxRow as N,sectionToBoxTypes as H}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as W}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as M}from"./hero-ticker-to-strip.js";function J(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function se(e){const t=n=>typeof n=="string"?n:null,i=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:i,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const z=new Set([null,"authored"]);function B(e,t){const i=C(t),n=i.filter(o=>e.includes(o.id)&&o.values.letterCase===void 0).map(o=>o.id);return{list:n.reduce((o,d)=>D(o,d,{letterCase:"upper"}),i),changed:n.length>0}}function G(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return U(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!z.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:i,changed:n}=B(e.styles,t.textStyles?t.textStylesList??null:null);return n?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:i}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function U(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const n=i[e.page];if(!n)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(j(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=L(n);return{send:{kind:e.kind,page:e.page,index:i.length,preset:s,themePresets:[...i,s]}}}const O={Hero:M,HeroSingle:e=>{const t=W(e),i=M(t.node),n=s=>s in e.props;return{node:i.node,carried:[...t.carried,...i.carried.filter(s=>n(s.key))],dropped:[...t.dropped,...i.dropped.filter(s=>n(s.key))]}}};function Y(e,t){if(!t.length||!Array.isArray(e.content))return e;let i=!1;const n=e.content.map(s=>!s||!t.includes(s.type)?s:(i=!0,O[s.type](s).node));return i?{...e,content:n}:e}function P(e){const t=e?.content;return Array.isArray(t)?E(R(e)):e}function ne(e,t={}){const i=[...t.types??H()],n=i.filter(a=>!N(a)&&!(a in O)),s=new Set(i.filter(a=>a in O)),o=new Set(i.filter(a=>N(a))),d=[],l=[],p={},m={},T=new Map((t.sites??[]).map(a=>[`${a.schema}/${a.site}`,a])),x=new Map,c=(a,$,r)=>{const b=`${a.schema}/${a.site}`;let k=x.get(b);k||x.set(b,k={...a,facts:!!$,writes:[],undecided:[],notNeeded:[]});const u=G(r,$);if("send"in u){const y=k.writes.find(w=>JSON.stringify(w.write)===JSON.stringify(u.send));y?y.nodes+=1:k.writes.push({write:u.send,reason:r.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[S,f]="undecided"in u?[k.undecided,u.undecided]:[k.notNeeded,u.notNeeded],h=S.find(y=>y.kind===r.kind&&y.why===f);h?h.nodes+=1:S.push({kind:r.kind,why:f,nodes:1})};for(const a of e){const $=P(a.layout)?.content;Array.isArray($)&&$.forEach((r,b)=>{if(r&&typeof r.type=="string"&&s.has(r.type)){const g=O[r.type](r),_={page:a.label,index:b,type:r.type,id:String(r.props?.id??""),carried:g.carried,dropped:g.dropped};t.draw&&(_.before=t.draw(r),_.after=t.draw(g.node),_.sameMarkup=_.before===_.after),d.push(_);const A=p[r.type]??={nodes:0,pages:0,dropped:{}};A.nodes+=1,(m[r.type]??=new Set).add(a.label),A.pages=m[r.type].size;for(const v of g.dropped)A.dropped[v.key]=(A.dropped[v.key]??0)+1;return}if(!r||typeof r.type!="string"||!o.has(r.type))return;const k=N(r.type),u=J(a.label),S=u?T.get(`${u.schema}/${u.site}`):void 0,f=F(r,k,S?{site:S}:{});if(f.skipped!==void 0){l.push({page:a.label,index:b,type:r.type,id:String(r.props?.id??""),why:f.skipped});return}if(u)for(const g of f.siteWrites)c(u,S,g);const h={page:a.label,index:b,type:r.type,id:String(r.props?.id??""),carried:f.carried,dropped:f.dropped},y=t.draw;y&&(h.before=y(r),h.after=f.nodes.map(y).join(""),h.sameMarkup=h.before===h.after),d.push(h);const w=p[r.type]??={nodes:0,pages:0,dropped:{}};w.nodes+=1,(m[r.type]??=new Set).add(a.label),w.pages=m[r.type].size;for(const g of f.dropped)w.dropped[g.key]=(w.dropped[g.key]??0)+1})}return{types:i,noRow:n,pages:e.length,nodes:d,skipped:l,byType:p,sites:[...x.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(i=>{const n=`${t.schema}/${t.siteName(i.site)}/${i.slug}`;return[{label:`${n} (draft)`,layout:i.layout},{label:`${n} (published)`,layout:i.published_layout}]})}function re(e,t){const i=t.types.filter(s=>N(s)),n=t.types.filter(s=>s in O);return e.map(s=>{const o={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...o,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=P(s.layout),l=Array.isArray(d?.content)?d.content:[],p=[],m=[];for(const c of l){if(c&&n.includes(c.type)){p.push({type:c.type,id:String(c.props?.id??"")});continue}if(!c||!i.includes(c.type))continue;const a=String(c.props?.id??""),$=N(c.type).skip?.(c.props);$===void 0?p.push({type:c.type,id:a}):m.push({type:c.type,id:a,why:$})}if(!p.length)return{...o,converted:p,skipped:m};const T=I(d,i,t.site?{site:t.site}:{}),x=Y(T,n);return{...o,patch:{layout:x,expected_updated_at:s.layout_updated_at},converted:p,skipped:m}})}function oe(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}const V=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function de(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const o=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${o} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const o=n.get(s.type)??n.set(s.type,new Map).get(s.type);o.set(s.why,(o.get(s.why)??0)+1)}for(const[s,o]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[d,l]of o)t.push(`- ×${l}: ${d}`)}}for(const[n,s]of Object.entries(e.byType)){const o=Object.entries(s.dropped);if(!o.length)continue;t.push("",`## ${n} — dropped`,"");const d=new Map;for(const l of e.nodes)if(l.type===n)for(const p of l.dropped)d.set(p.key,p.why);for(const[l,p]of o)t.push(`- \`${l}\` ×${p}: ${d.get(l)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,o=n.facts?"yes":"NO";for(const d of n.writes)t.push(`| ${s} | ${o} | ${V(d.write)} | send | ${d.nodes} | ${d.reason} |`);for(const d of n.undecided)t.push(`| ${s} | ${o} | ${d.kind} | UNDECIDED | ${d.nodes} | ${d.why} |`);for(const d of n.notNeeded)t.push(`| ${s} | ${o} | ${d.kind} | not needed | ${d.nodes} | ${d.why} |`)}}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
1
+ import{migrateLegacyPageData as R}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as E}from"../../../format/lib/document/renamed-props.js";import{listToWrite as C,setStyleValues as D}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as L,bandPresetIndex as j}from"../../../format/lib/theme.js";import{convertSection as F,convertSectionsInPage as I,sectionToBoxRow as N,sectionToBoxTypes as H}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as W}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as v}from"./hero-ticker-to-strip.js";function G(e){const[t,i]=e.split("/");return t&&i?{schema:t,site:i}:void 0}function se(e){const t=n=>typeof n=="string"?n:null,i=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:i,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{},..."site_gutter_unit"in e?{siteGutterUnit:t(e.site_gutter_unit)}:{},..."site_gutter_phone_unit"in e?{siteGutterPhoneUnit:t(e.site_gutter_phone_unit)}:{}}}const U=new Set([null,"authored"]);function J(e,t){const i=C(t),n=i.filter(o=>e.includes(o.id)&&o.values.letterCase===void 0).map(o=>o.id);return{list:n.reduce((o,d)=>D(o,d,{letterCase:"upper"}),i),changed:n.length>0}}function z(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 B(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!U.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:i,changed:n}=J(e.styles,t.textStyles?t.textStylesList??null:null);return n?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:i}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function B(e,t){const i=t?.themePresets;if(!t||!i)return{undecided:"the site's theme presets were not read"};const n=i[e.page];if(!n)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(j(i,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=L(n);return{send:{kind:e.kind,page:e.page,index:i.length,preset:s,themePresets:[...i,s]}}}const O={Hero:v,HeroSingle:e=>{const t=W(e),i=v(t.node),n=s=>s in e.props;return{node:i.node,carried:[...t.carried,...i.carried.filter(s=>n(s.key))],dropped:[...t.dropped,...i.dropped.filter(s=>n(s.key))]}}};function Y(e,t){if(!t.length||!Array.isArray(e.content))return e;let i=!1;const n=e.content.map(s=>!s||!t.includes(s.type)?s:(i=!0,O[s.type](s).node));return i?{...e,content:n}:e}function M(e){const t=e?.content;return Array.isArray(t)?E(R(e)):e}function ne(e,t={}){const i=[...t.types??H()],n=i.filter(a=>!N(a)&&!(a in O)),s=new Set(i.filter(a=>a in O)),o=new Set(i.filter(a=>N(a))),d=[],l=[],p={},m={},P=new Map((t.sites??[]).map(a=>[`${a.schema}/${a.site}`,a])),w=new Map,c=(a,$,r)=>{const _=`${a.schema}/${a.site}`;let k=w.get(_);k||w.set(_,k={...a,facts:!!$,writes:[],undecided:[],notNeeded:[]});const u=z(r,$);if("send"in u){const y=k.writes.find(S=>JSON.stringify(S.write)===JSON.stringify(u.send));y?y.nodes+=1:k.writes.push({write:u.send,reason:r.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[b,f]="undecided"in u?[k.undecided,u.undecided]:[k.notNeeded,u.notNeeded],h=b.find(y=>y.kind===r.kind&&y.why===f);h?h.nodes+=1:b.push({kind:r.kind,why:f,nodes:1})};for(const a of e){const $=M(a.layout)?.content;Array.isArray($)&&$.forEach((r,_)=>{if(r&&typeof r.type=="string"&&s.has(r.type)){const g=O[r.type](r),x={page:a.label,index:_,type:r.type,id:String(r.props?.id??""),carried:g.carried,dropped:g.dropped};t.draw&&(x.before=t.draw(r),x.after=t.draw(g.node),x.sameMarkup=x.before===x.after),d.push(x);const A=p[r.type]??={nodes:0,pages:0,dropped:{}};A.nodes+=1,(m[r.type]??=new Set).add(a.label),A.pages=m[r.type].size;for(const T of g.dropped)A.dropped[T.key]=(A.dropped[T.key]??0)+1;return}if(!r||typeof r.type!="string"||!o.has(r.type))return;const k=N(r.type),u=G(a.label),b=u?P.get(`${u.schema}/${u.site}`):void 0,f=F(r,k,b?{site:b}:{});if(f.skipped!==void 0){l.push({page:a.label,index:_,type:r.type,id:String(r.props?.id??""),why:f.skipped});return}if(u)for(const g of f.siteWrites)c(u,b,g);const h={page:a.label,index:_,type:r.type,id:String(r.props?.id??""),carried:f.carried,dropped:f.dropped},y=t.draw;y&&(h.before=y(r),h.after=f.nodes.map(y).join(""),h.sameMarkup=h.before===h.after),d.push(h);const S=p[r.type]??={nodes:0,pages:0,dropped:{}};S.nodes+=1,(m[r.type]??=new Set).add(a.label),S.pages=m[r.type].size;for(const g of f.dropped)S.dropped[g.key]=(S.dropped[g.key]??0)+1})}return{types:i,noRow:n,pages:e.length,nodes:d,skipped:l,byType:p,sites:[...w.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(i=>{const n=`${t.schema}/${t.siteName(i.site)}/${i.slug}`;return[{label:`${n} (draft)`,layout:i.layout},{label:`${n} (published)`,layout:i.published_layout}]})}function re(e,t){const i=t.types.filter(s=>N(s)),n=t.types.filter(s=>s in O);return e.map(s=>{const o={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...o,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=M(s.layout),l=Array.isArray(d?.content)?d.content:[],p=[],m=[];for(const c of l){if(c&&n.includes(c.type)){p.push({type:c.type,id:String(c.props?.id??"")});continue}if(!c||!i.includes(c.type))continue;const a=String(c.props?.id??""),$=N(c.type).skip?.(c.props);$===void 0?p.push({type:c.type,id:a}):m.push({type:c.type,id:a,why:$})}if(!p.length)return{...o,converted:p,skipped:m};const P=I(d,i,t.site?{site:t.site}:{}),w=Y(P,n);return{...o,patch:{layout:w,expected_updated_at:s.layout_updated_at},converted:p,skipped:m}})}function oe(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(i=>i.write)}))}const V=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function de(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const o=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${o} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const o=n.get(s.type)??n.set(s.type,new Map).get(s.type);o.set(s.why,(o.get(s.why)??0)+1)}for(const[s,o]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[d,l]of o)t.push(`- ×${l}: ${d}`)}}for(const[n,s]of Object.entries(e.byType)){const o=Object.entries(s.dropped);if(!o.length)continue;t.push("",`## ${n} — dropped`,"");const d=new Map;for(const l of e.nodes)if(l.type===n)for(const p of l.dropped)d.set(p.key,p.why);for(const[l,p]of o)t.push(`- \`${l}\` ×${p}: ${d.get(l)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,o=n.facts?"yes":"NO";for(const d of n.writes)t.push(`| ${s} | ${o} | ${V(d.write)} | send | ${d.nodes} | ${d.reason} |`);for(const d of n.undecided)t.push(`| ${s} | ${o} | ${d.kind} | UNDECIDED | ${d.nodes} | ${d.why} |`);for(const d of n.notNeeded)t.push(`| ${s} | ${o} | ${d.kind} | not needed | ${d.nodes} | ${d.why} |`)}}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
2
2
  `)+`
3
- `}export{O as HERO_MOVES,de as dryRunMarkdown,ne as dryRunSections,B as headingCaseList,re as pageEdits,ie as pagesFromCliExport,se as siteFactsFromRead,J as siteOfLabel,oe as siteWritesFile};
3
+ `}export{O as HERO_MOVES,de as dryRunMarkdown,ne as dryRunSections,J as headingCaseList,re as pageEdits,ie as pagesFromCliExport,se as siteFactsFromRead,G as siteOfLabel,oe as siteWritesFile};
@@ -90,6 +90,9 @@ export declare const PICTURE_HOVER_ZOOM: {
90
90
  };
91
91
  export declare function pictureHoverZoomOf(record: Readonly<Record<string, unknown>>): string | null;
92
92
  export declare function pictureHoverDarkenOf(record: Readonly<Record<string, unknown>>): number | null;
93
+ export declare const BOX_SHOW_KEY = "hoverShow";
94
+ export declare const BOX_SHOW_ON_CARD_HOVER = "cardHover";
95
+ export declare const BOX_SHOW_ALWAYS = "always";
93
96
  export declare const NEXT_PICTURE_BLOCKS: readonly string[];
94
97
  export declare function pictureHoverKindOf(record: Readonly<Record<string, unknown>>, resting: PictureHover, kinds?: readonly PictureHover[]): PictureHover;
95
98
  export declare function pictureHoverOf(record: Readonly<Record<string, unknown>>, blockKey?: string): PictureHoverDrawn;
@@ -1 +1 @@
1
- import{MEDIA_ZONES as g,MEDIA_ZONE_LABELS as I}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as S,hoverKindsOf as a,motionSeconds as s}from"efficient-shell/format";import{ANGLE_RANGE as A}from"../content/box-angle.js";import{finiteNumber as u}from"../finite-number.js";const i="hover",q="_gHover",D={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},c="highlight",L="Highlight",J=["none",c],Q={none:D.none,[c]:L};function V(e){return e[i]===c?c:"none"}const $="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",ee="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function ne(e,n){return V(e)!==c?null:{"--sf-hl-bg":n("surface"),"--sf-hl-ink":n("main")}}const k=a(["none","lift"]);function oe(e){const n=e[i];return k.includes(n)?n:"none"}const E=a(["none","nextImage","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},f="spinOnHover",O=A,x={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},te=Object.keys(x);function N(e){return x[e]??"none"}const C=S.rotateFallbackDeg,K=e=>e==="rendering"?"renderings":e,T=e=>e==="renderings"?"rendering":e,m=Object.freeze(g.filter(e=>e!=="videos").map(K)),re=Object.freeze(Object.fromEntries(m.map(e=>[e,I[T(e)]]))),G=["finish","first"],ie={finish:"Same finish",first:"First group"},M=["card","picture"],ce={card:"Whole card",picture:"Picture"},d={kind:"photos",group:"finish",cover:"card"},l=(e,n,o)=>e.includes(n)?n:o;function R(e){return{kind:l(m,e[r.mediaKind],d.kind),group:l(G,e[r.mediaGroup],d.group),cover:l(M,e[r.cover],d.cover)}}function ae(){return{field:r.kind,is:"nextImage"}}function B(e,n){const o=e[r.kind];if(E.includes(o))return o;const t=e[f];return typeof t=="boolean"?t?"rotate":"none":n}function P(e){const n=u(e);return n===void 0?C:Math.min(O.max,Math.max(O.min,n))}function se(e,n){const o=N(n),t=B(e,o);return{kind:t,angle:t==="rotate"?P(e[r.angle]):null,duration:s("hover","duration",t==="rotate"?e[r.duration]:void 0),delay:s("hover","delay",t==="rotate"?e[r.delay]:void 0),...t==="nextImage"?{media:R(e)}:{}}}function ue(e){const n={field:r.kind,in:[...E]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:n},e==="rotate"?{not:{field:f,is:!1}}:{field:f,is:!0}]}]}}const v=a(["none","mono"]),b=a(["none","nextImage","mono"]),h={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},fe=Object.keys(h);function y(e){return h[e]??"none"}const H={zoom:"hoverZoom",darken:"hoverDarken"},p={min:100,max:150,step:1,unit:"%"};function U(e){const n=u(e[H.zoom]);if(n===void 0)return null;const o=Math.min(p.max,Math.max(p.min,n));return o===p.min?null:String(o/100)}function X(e){const n=u(e[H.darken]);return n!==void 0&&n>0?n:null}const Z=["ImageBlock"];function z(e,n,o=v){const t=e[i];return o.includes(t)?t:n}function de(e,n=""){const o=Z.includes(n)?b:v,t=z(e,y(n),o),_=t==="mono";return{kind:t,duration:s("hover","duration",_?e[r.duration]:void 0),delay:s("hover","delay",_?e[r.delay]:void 0),...t==="nextImage"?{media:R(e)}:j(e)}}function j(e){const n=U(e),o=X(e);return{...n?{zoom:n}:{},...o?{darken:o}:{}}}function le(){return{not:{field:i,is:"nextImage"}}}function pe(e){return e==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}function _e(e){return e==="none"?{field:i,is:"mono"}:{not:{field:i,in:["none","nextImage"]}}}export{c as BOX_HIGHLIGHT,$ as BOX_HIGHLIGHT_CLASS,ee as BOX_HIGHLIGHT_OVER_ROW_INK_CLASS,J as BOX_HOVER_KINDS,Q as BOX_HOVER_LABELS,O as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,E as CARD_HOVER_KINDS,te as CARD_HOVER_SECTIONS,C as CARD_HOVER_TURN,L as HIGHLIGHT_LABEL,q as HOVER_GROUP_KEY,i as HOVER_KEY,D as HOVER_KIND_LABELS,M as HOVER_MEDIA_COVERS,ce as HOVER_MEDIA_COVER_LABELS,d as HOVER_MEDIA_DEFAULTS,G as HOVER_MEDIA_GROUPS,ie as HOVER_MEDIA_GROUP_LABELS,m as HOVER_MEDIA_KINDS,re as HOVER_MEDIA_KIND_LABELS,Z as NEXT_PICTURE_BLOCKS,b as NEXT_PICTURE_HOVER_KINDS,f as OLD_SPIN_KEY,k as PART_HOVER_KINDS,fe as PICTURE_HOVER_BLOCKS,H as PICTURE_HOVER_KEYS,v as PICTURE_HOVER_KINDS,p as PICTURE_HOVER_ZOOM,ne as boxHighlightStyle,V as boxHoverOf,P as cardHoverAngleOf,B as cardHoverKindOf,R as cardHoverMediaOf,se as cardHoverOf,N as cardHoverResting,ue as cardRotatesRule,ae as cardShowsNextRule,oe as hoverOf,X as pictureHoverDarkenOf,z as pictureHoverKindOf,le as pictureHoverMoveRule,de as pictureHoverOf,y as pictureHoverResting,pe as pictureHoverRunsRule,_e as pictureHoverTimedRule,U as pictureHoverZoomOf};
1
+ import{MEDIA_ZONES as I,MEDIA_ZONE_LABELS as S}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as A,hoverKindsOf as a,motionSeconds as s}from"efficient-shell/format";import{ANGLE_RANGE as D}from"../content/box-angle.js";import{finiteNumber as u}from"../finite-number.js";const i="hover",q="_gHover",L={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},c="highlight",V="Highlight",J=["none",c],Q={none:L.none,[c]:V};function N(e){return e[i]===c?c:"none"}const $="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",ee="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function ne(e,n){return N(e)!==c?null:{"--sf-hl-bg":n("surface"),"--sf-hl-ink":n("main")}}const k=a(["none","lift"]);function oe(e){const n=e[i];return k.includes(n)?n:"none"}const O=a(["none","nextImage","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},f="spinOnHover",E=D,x={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},te=Object.keys(x);function C(e){return x[e]??"none"}const K=A.rotateFallbackDeg,T=e=>e==="rendering"?"renderings":e,B=e=>e==="renderings"?"rendering":e,R=Object.freeze(I.filter(e=>e!=="videos").map(T)),re=Object.freeze(Object.fromEntries(R.map(e=>[e,S[B(e)]]))),G=["finish","first"],ie={finish:"Same finish",first:"First group"},M=["card","picture"],ce={card:"Whole card",picture:"Picture"},d={kind:"photos",group:"finish",cover:"card"},l=(e,n,o)=>e.includes(n)?n:o;function m(e){return{kind:l(R,e[r.mediaKind],d.kind),group:l(G,e[r.mediaGroup],d.group),cover:l(M,e[r.cover],d.cover)}}function ae(){return{field:r.kind,is:"nextImage"}}function P(e,n){const o=e[r.kind];if(O.includes(o))return o;const t=e[f];return typeof t=="boolean"?t?"rotate":"none":n}function b(e){const n=u(e);return n===void 0?K:Math.min(E.max,Math.max(E.min,n))}function se(e,n){const o=C(n),t=P(e,o);return{kind:t,angle:t==="rotate"?b(e[r.angle]):null,duration:s("hover","duration",t==="rotate"?e[r.duration]:void 0),delay:s("hover","delay",t==="rotate"?e[r.delay]:void 0),...t==="nextImage"?{media:m(e)}:{}}}function ue(e){const n={field:r.kind,in:[...O]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:n},e==="rotate"?{not:{field:f,is:!1}}:{field:f,is:!0}]}]}}const v=a(["none","mono"]),y=a(["none","nextImage","mono"]),H={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},fe=Object.keys(H);function U(e){return H[e]??"none"}const h={zoom:"hoverZoom",darken:"hoverDarken"},p={min:100,max:150,step:1,unit:"%"};function X(e){const n=u(e[h.zoom]);if(n===void 0)return null;const o=Math.min(p.max,Math.max(p.min,n));return o===p.min?null:String(o/100)}function W(e){const n=u(e[h.darken]);return n!==void 0&&n>0?n:null}const de="hoverShow",le="cardHover",pe="always",Y=["ImageBlock","Flex"];function Z(e,n,o=v){const t=e[i];return o.includes(t)?t:n}function _e(e,n=""){const o=Y.includes(n)?y:v,t=Z(e,U(n),o),_=t==="mono";return{kind:t,duration:s("hover","duration",_?e[r.duration]:void 0),delay:s("hover","delay",_?e[r.delay]:void 0),...t==="nextImage"?{media:m(e),...n==="Flex"?g(e):{}}:g(e)}}function g(e){const n=X(e),o=W(e);return{...n?{zoom:n}:{},...o?{darken:o}:{}}}function Oe(){return{not:{field:i,is:"nextImage"}}}function Ee(e){return e==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}function xe(e){return e==="none"?{field:i,is:"mono"}:{not:{field:i,in:["none","nextImage"]}}}export{c as BOX_HIGHLIGHT,$ as BOX_HIGHLIGHT_CLASS,ee as BOX_HIGHLIGHT_OVER_ROW_INK_CLASS,J as BOX_HOVER_KINDS,Q as BOX_HOVER_LABELS,pe as BOX_SHOW_ALWAYS,de as BOX_SHOW_KEY,le as BOX_SHOW_ON_CARD_HOVER,E as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,O as CARD_HOVER_KINDS,te as CARD_HOVER_SECTIONS,K as CARD_HOVER_TURN,V as HIGHLIGHT_LABEL,q as HOVER_GROUP_KEY,i as HOVER_KEY,L as HOVER_KIND_LABELS,M as HOVER_MEDIA_COVERS,ce as HOVER_MEDIA_COVER_LABELS,d as HOVER_MEDIA_DEFAULTS,G as HOVER_MEDIA_GROUPS,ie as HOVER_MEDIA_GROUP_LABELS,R as HOVER_MEDIA_KINDS,re as HOVER_MEDIA_KIND_LABELS,Y as NEXT_PICTURE_BLOCKS,y as NEXT_PICTURE_HOVER_KINDS,f as OLD_SPIN_KEY,k as PART_HOVER_KINDS,fe as PICTURE_HOVER_BLOCKS,h as PICTURE_HOVER_KEYS,v as PICTURE_HOVER_KINDS,p as PICTURE_HOVER_ZOOM,ne as boxHighlightStyle,N as boxHoverOf,b as cardHoverAngleOf,P as cardHoverKindOf,m as cardHoverMediaOf,se as cardHoverOf,C as cardHoverResting,ue as cardRotatesRule,ae as cardShowsNextRule,oe as hoverOf,W as pictureHoverDarkenOf,Z as pictureHoverKindOf,Oe as pictureHoverMoveRule,_e as pictureHoverOf,U as pictureHoverResting,Ee as pictureHoverRunsRule,xe as pictureHoverTimedRule,X as pictureHoverZoomOf};
@@ -1,4 +1,4 @@
1
- export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
1
+ export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "wide" | "tall" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
2
2
  export type BoxShape = (typeof BOX_SHAPES)[number];
3
3
  export declare function boxShapeOf(value: unknown): BoxShape;
4
4
  export declare function boxShapeClass(value: unknown): string;
@@ -21,12 +21,12 @@ export declare const SITE_BLOCK_GAP: {
21
21
  readonly step: 2;
22
22
  };
23
23
  export declare function normalizeSiteBlockGap(v?: number | null): number | null;
24
- export declare function siteBlockGapTokens(v?: number | null): Record<string, string>;
24
+ export declare function siteBlockGapTokens(v?: number | null, unit?: unknown): Record<string, string>;
25
25
  export declare const SITE_BLOCK_GAP_PHONE_VAR = "--sf-block-gap-phone";
26
26
  export declare const SITE_BLOCK_GAP_PHONE_REM_VAR = "--sf-block-gap-phone-rem";
27
27
  export declare const SITE_BLOCK_GAP_ON_PHONE_VAR = "--sf-block-gap-on-phone";
28
28
  export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
29
- export declare function siteBlockGapPhoneTokens(v?: number | null): Record<string, string>;
29
+ export declare function siteBlockGapPhoneTokens(v?: number | null, unit?: unknown): Record<string, string>;
30
30
  export declare function siteBlockGapPhoneClass(v?: number | null): string;
31
31
  export declare const GAP_ZONE_CLASS = "sf-gap-zone";
32
32
  export declare const GAP_LENGTH_VAR = "--sf-gap-len";