efficient-web-builder 58.0.0 → 59.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/editor/components/SwitchToBoxFooter.js +1 -1
  3. package/dist/editor/components/useCardContentSwitchPass.d.ts +1 -0
  4. package/dist/editor/components/useCardContentSwitchPass.js +1 -0
  5. package/dist/editor/components/usePinnedChromeSeed.js +1 -1
  6. package/dist/editor/lib/document/ColourControl.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/Countdown/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
  13. package/dist/editor/lib/document/box-footer-rows.d.ts +3 -0
  14. package/dist/editor/lib/document/box-footer-rows.js +1 -0
  15. package/dist/editor/lib/document/card-row-fields.d.ts +2 -1
  16. package/dist/editor/lib/document/card-row-fields.js +1 -1
  17. package/dist/editor/lib/document/choice-pictures.d.ts +2 -1
  18. package/dist/editor/lib/document/choice-pictures.js +1 -1
  19. package/dist/editor/lib/document/controls.d.ts +12 -6
  20. package/dist/editor/lib/document/controls.js +1 -1
  21. package/dist/editor/lib/document/page-root.js +2 -2
  22. package/dist/editor/lib/sections/text-layouts.js +1 -1
  23. package/dist/format/lib/content/block-align.d.ts +1 -0
  24. package/dist/format/lib/content/block-align.js +1 -1
  25. package/dist/format/lib/content/block-sources.d.ts +1 -0
  26. package/dist/format/lib/content/block-sources.js +1 -1
  27. package/dist/format/lib/content/box-background.d.ts +2 -2
  28. package/dist/format/lib/content/box-background.js +1 -1
  29. package/dist/format/lib/content/box-shape.d.ts +1 -1
  30. package/dist/format/lib/content/card-columns.d.ts +1 -0
  31. package/dist/format/lib/content/card-columns.js +1 -0
  32. package/dist/format/lib/content/card-place.js +1 -1
  33. package/dist/format/lib/content/card-state.d.ts +17 -0
  34. package/dist/format/lib/content/card-state.js +1 -1
  35. package/dist/format/lib/content/card-template.js +1 -1
  36. package/dist/format/lib/content/gallery-layout.d.ts +13 -1
  37. package/dist/format/lib/content/gallery-layout.js +1 -1
  38. package/dist/format/lib/content/page-background.js +1 -1
  39. package/dist/format/lib/content/page-width.d.ts +1 -0
  40. package/dist/format/lib/content/page-width.js +1 -1
  41. package/dist/format/lib/content/section-background.js +1 -1
  42. package/dist/format/lib/document/blocks/general/Cards/card-list-seed.d.ts +17 -0
  43. package/dist/format/lib/document/blocks/general/Cards/card-list-seed.js +1 -0
  44. package/dist/format/lib/document/blocks/general/Chart/meta.d.ts +1 -0
  45. package/dist/format/lib/document/blocks/general/Chart/meta.js +1 -1
  46. package/dist/format/lib/document/blocks/general/Countdown/meta.d.ts +1 -0
  47. package/dist/format/lib/document/blocks/general/Countdown/meta.js +1 -1
  48. package/dist/format/lib/document/blocks/general/Mockup/meta.d.ts +1 -0
  49. package/dist/format/lib/document/blocks/general/Mockup/meta.js +1 -1
  50. package/dist/format/lib/document/blocks/general/text-part-shapes.json +10 -0
  51. package/dist/format/lib/document/box-footer.d.ts +13 -2
  52. package/dist/format/lib/document/box-footer.js +1 -1
  53. package/dist/format/lib/document/card-content-switch.d.ts +21 -0
  54. package/dist/format/lib/document/card-content-switch.js +1 -0
  55. package/dist/format/lib/document/card-row-keys.d.ts +14 -0
  56. package/dist/format/lib/document/card-row-keys.js +1 -0
  57. package/dist/format/lib/document/cards-template-on-read.d.ts +1 -1
  58. package/dist/format/lib/document/cards-template-on-read.js +1 -1
  59. package/dist/format/lib/document/container-blocks.js +1 -1
  60. package/dist/format/lib/document/neutralization-contracts.js +1 -1
  61. package/dist/format/lib/document/part-inks.d.ts +5 -2
  62. package/dist/format/lib/document/part-inks.js +1 -1
  63. package/dist/format/lib/document/section-catalog.js +2 -10
  64. package/dist/format/lib/document/seed-parts.d.ts +2 -0
  65. package/dist/format/lib/document/seed-parts.js +1 -1
  66. package/dist/format/lib/document/theme-slots.d.ts +20 -0
  67. package/dist/format/lib/document/theme-slots.js +1 -0
  68. package/dist/format/lib/editor-words-catalogue.d.ts +4 -0
  69. package/dist/format/lib/editor-words-catalogue.js +2 -2
  70. package/dist/format/lib/sections/logo-look.d.ts +1 -1
  71. package/dist/format/lib/sections/logo-look.js +1 -1
  72. package/dist/format/lib/theme.d.ts +1 -0
  73. package/dist/format/lib/theme.js +4 -4
  74. package/dist/render/components/Cards.d.ts +2 -1
  75. package/dist/render/components/Cards.js +1 -1
  76. package/dist/render/components/ChartSection.d.ts +2 -1
  77. package/dist/render/components/ChartSection.js +1 -1
  78. package/dist/render/components/Countdown.d.ts +2 -1
  79. package/dist/render/components/Countdown.js +1 -1
  80. package/dist/render/components/FeaturedCover.d.ts +2 -1
  81. package/dist/render/components/FeaturedCover.js +1 -1
  82. package/dist/render/components/KeyFeatures.js +1 -1
  83. package/dist/render/components/Logos.d.ts +5 -1
  84. package/dist/render/components/Logos.js +1 -1
  85. package/dist/render/components/MockupSection.d.ts +2 -1
  86. package/dist/render/components/MockupSection.js +1 -1
  87. package/dist/render/components/SiteGutterFrame.d.ts +5 -1
  88. package/dist/render/components/SiteGutterFrame.js +1 -1
  89. package/dist/render/components/Text.d.ts +2 -1
  90. package/dist/render/components/Text.js +1 -1
  91. package/dist/render/lib/content/section-edge.d.ts +7 -0
  92. package/dist/render/lib/content/section-edge.js +1 -1
  93. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  94. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  95. package/dist/render/lib/document/blocks/general/Chart/render.js +1 -1
  96. package/dist/render/lib/document/blocks/general/Countdown/render.js +1 -1
  97. package/dist/render/lib/document/blocks/general/FeaturedCover/render.js +1 -1
  98. package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
  99. package/dist/render/lib/document/blocks/general/Logos/wall-rows.d.ts +2 -0
  100. package/dist/render/lib/document/blocks/general/Logos/wall-rows.js +1 -0
  101. package/dist/render/lib/document/blocks/general/Mockup/render.js +2 -2
  102. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  103. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +3 -1
  104. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  105. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +3 -0
  106. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  107. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  108. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
  109. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  110. package/dist/render/lib/document/blocks/general/section-to-box-rows-promo.d.ts +2 -0
  111. package/dist/render/lib/document/blocks/general/section-to-box-rows-promo.js +1 -0
  112. package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.d.ts +2 -0
  113. package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -0
  114. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  115. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  116. package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
  117. package/dist/render/lib/document/head-core-boxes.js +1 -1
  118. package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
  119. package/dist/render/lib/document/page-render.js +1 -1
  120. package/dist/render/lib/document/passes/section-width.js +1 -1
  121. package/dist/render/lib/document/wall-labels.d.ts +3 -0
  122. package/dist/render/lib/document/wall-labels.js +1 -0
  123. package/dist/render/lib/sections/section-to-box.d.ts +1 -0
  124. package/dist/render/lib/sections/section-to-box.js +1 -1
  125. package/package.json +3 -3
  126. package/dist/editor/lib/document/theme-swatches.d.ts +0 -3
  127. package/dist/editor/lib/document/theme-swatches.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 59.1.0 - 2026-11-08
4
+
5
+ From main at `7197efbc`: #612, #616, #614, #617, #618. A minor: no `!` in any title, no declared export is removed, the peers stay `efficient-easel` `^29.0.0` and `efficient-shell` `^12.17.0`. No stored key or value moves.
6
+
7
+ **For hosts:**
8
+ - storefront-blocks: a later blocks bump takes `^59.1.0` for the band fix (#617: `SectionEdge.beyond`), the host-row presses (#616, #618) and the footer payment wall (#612).
9
+ - With no host row for a press type, a press is the ordinary insert as before (#616, #618).
10
+
11
+ ### Added
12
+
13
+ - **The footer payment line is a Logos wall** (#612): a Box of a lead Text and a Logos wall with the Logo style Marks; a Logos Alignment row; a published page drops a nested Box over sourced logos that were served no row. The Payment Logos block leaves the Add menu. Stored nodes still draw.
14
+ - **Five host-row types join the press list** (#616): new export `HOST_PRESS_TYPES`; ContactRouting, ReviewForm, AppointmentBooking, Reviews and CheckoutCTA press as a Box when a host registers the row.
15
+ - **Events joins the host-row press types** (#618): the Add menu's Events presses a Box with a host card row.
16
+ - **The delivery card gets its own time and price parts** (#614): a Cards press switched to Delivery options draws the card as parts on the Box structure; the Box that holds the Card list follows the Card content switch in every website host.
17
+ - **A full-width band stops at the Box edge** (#617): new `SectionEdge.beyond`, `sectionEdgeBeyondAttrs`, `groundBeyond`, `EDGE_BEYOND_VAR` and `FULL_SECTION_WIDTH`, so a band stops at the Box edge when the Box Background is Content (0 at Background: Content and in a Content header or footer group).
18
+
19
+ ## 59.0.0 - 2026-11-08
20
+
21
+ From main at `bb1ff965`: #608, #610, #611, #602, #613. A major: #608 has `!` in its title, narrows a peer and removes a module. The peer `efficient-shell` narrows from `^12.16.0` to `^12.17.0`; `efficient-easel` stays `^29.0.0`. No stored key or value moves (a stored hex paints as before; 0 rewritten).
22
+
23
+ **For hosts:**
24
+ - Bump `efficient-shell` to `^12.17.0` with this release: the fill pickers read `FILL_COLOR_SLOTS` and `fillColorRole` from it (#608).
25
+ - The module `lib/document/theme-swatches` is renamed `lib/document/theme-slots`; `themeSwatches` is deleted. No host imports the old path (efficient-storefront, efficient-storefront-blocks, efficient-admin-portal and efficient-easel searched: 0) (#608).
26
+ - storefront-blocks, on its bump: the `twoThenThreesPhoto` Gallery layout and its `ratio` value are new (#613); a host that lists gallery layouts may offer it.
27
+
28
+ ### Removed (BREAKING)
29
+
30
+ - **`lib/document/theme-swatches`** and its `themeSwatches` list (#608): the one slot table is `lib/document/theme-slots` now. The peer `efficient-shell` narrows to `^12.17.0`.
31
+
32
+ ### Changed
33
+
34
+ - **Every fill and background picker names a theme slot** (#608): Box Fill, the section band Background color, the page Background and the card row colour offer Theme N main, text, background, muted and surface first. A pick stores the slot name, not a hex. Text rows keep their own slots and never offer `surface`.
35
+
36
+ ### Added
37
+
38
+ - **A Cards press lays down a Box of one Card list** (#602): the highlight badge sits on the card's top line.
39
+ - **A Chart or Mockup Card press lays down a Box** (#610): its words are Text parts; the chart or device card stays one block in its own Box. New `surfacePresetIndex`.
40
+ - **A Countdown or Feature Banner press lays down a Box** (#611): the timer stays one block; the Feature Banner keeps its linked post card whole. New `FOLLOW_THE_BOX` export.
41
+ - **A Two, then threes photo Gallery layout with 4:3 tiles** (#613): layout `twoThenThreesPhoto`, an optional `ratio` and `galleryLayoutRatio`; a wall's phone and desktop rules are checked together.
42
+
3
43
  ## 58.0.0 - 2026-11-08
4
44
 
5
45
  From main at `c5488050`: #597, #589, #601, #604, #605, #607, #606, #603. A major: #589 has `!` in its title and removes exports. The peers do not change: `efficient-easel` `^29.0.0` and `efficient-shell` `^12.16.0`. No stored key or value moves (0 stored nodes hold a view-hide key or the two removed phone rows).
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as g,jsxs as y}from"react/jsx-runtime";import{useState as k}from"react";import{createNode as w,newId as x}from"efficient-easel/data";import{useEasel as S}from"efficient-easel/easel";import{Banner as F,Button as s}from"efficient-shell/ui";import{useScreenDocument as T}from"efficient-easel/screen/components/ScreenDocumentContext";import{boxFooterFromFooter as B}from"../../format/lib/document/box-footer.js";import{FOOTER_TYPE as E}from"../lib/document/footer-blocks.js";import{SITE_FOOTER_TYPE as a,withSectionGroup as _}from"../../format/lib/document/section-groups.js";import{say as t}from"../../format/lib/editor-words.js";function O(){const{appState:c,dispatch:m,config:l}=S(o=>o),{readOnly:f}=T(),[u,r]=k(!1),i=c.data.content;if(f||i.some(o=>o.type===a))return null;const p=i.find(o=>o.type===E)??null,d=(o,e)=>w(l,o,e),h=()=>{const o=B(p,d,x(a));m({type:"setData",data:e=>({...e,content:[..._(e.content,o)]}),recordHistory:!0}),r(!1)};return n(F,{tone:"info",title:t("This footer uses the old layout"),action:u?y(g,{children:[n(s,{variant:"primary",size:"sm",onClick:h,children:t("Switch now")}),n(s,{variant:"secondary",size:"sm",onClick:()=>r(!1),children:t("Cancel")})]}):n(s,{variant:"secondary",size:"sm",onClick:()=>r(!0),children:t("Switch to Box footer")}),children:t("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}export{O as default};
1
+ "use client";import{jsx as r,Fragment as g,jsxs as k}from"react/jsx-runtime";import{useState as y}from"react";import{createNode as w,newId as x}from"efficient-easel/data";import{useEasel as F}from"efficient-easel/easel";import{Banner as S,Button as s}from"efficient-shell/ui";import{useScreenDocument as B}from"efficient-easel/screen/components/ScreenDocumentContext";import{boxFooterFromFooter as T}from"../../format/lib/document/box-footer.js";import{convertFooterBlock as E}from"../lib/document/box-footer-rows.js";import{FOOTER_TYPE as _}from"../lib/document/footer-blocks.js";import{SITE_FOOTER_TYPE as a,withSectionGroup as O}from"../../format/lib/document/section-groups.js";import{say as t}from"../../format/lib/editor-words.js";function j(){const{appState:c,dispatch:m,config:l}=F(o=>o),{readOnly:f}=B(),[u,n]=y(!1),i=c.data.content;if(f||i.some(o=>o.type===a))return null;const p=i.find(o=>o.type===_)??null,d=(o,e)=>w(l,o,e),h=()=>{const o=T(p,d,x(a),E);m({type:"setData",data:e=>({...e,content:[...O(e.content,o)]}),recordHistory:!0}),n(!1)};return r(S,{tone:"info",title:t("This footer uses the old layout"),action:u?k(g,{children:[r(s,{variant:"primary",size:"sm",onClick:h,children:t("Switch now")}),r(s,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:t("Cancel")})]}):r(s,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:t("Switch to Box footer")}),children:t("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}export{j as default};
@@ -0,0 +1 @@
1
+ export declare function useCardContentSwitchPass(): void;
@@ -0,0 +1 @@
1
+ "use client";import{useEffect as e}from"react";import{useEaselApi as r}from"efficient-easel/easel";import{followCardContentSwitches as n}from"../../format/lib/document/card-content-switch.js";function c(){const t=o();e(()=>t?n(t):void 0,[t])}function o(){try{return r()}catch{return null}}export{c as useCardContentSwitchPass};
@@ -1 +1 @@
1
- "use client";import{useEffect as j,useRef as q}from"react";import{createNode as T,newId as I}from"efficient-easel/data";import{useEaselApi as J}from"efficient-easel/easel";import{useScreenDocument as K}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as M}from"efficient-easel/screen/lib/session-context";import{SITE_FOOTER_SLUG as L}from"../../format/lib/content/footer.js";import{boxFooterFromFooter as U}from"../../format/lib/document/box-footer.js";import{useSectionToBoxPass as Q}from"./useSectionToBoxPass.js";import{ROOT_ZONE as l,missingPinnedTypes as V,pinnedDuplicateIds as O}from"efficient-easel/draw";import{FOOTER_TYPE as a,HEADER_TYPE as E,buildDefaultFooterBlocks as b,buildDefaultHeaderNode as N}from"../lib/document/footer-blocks.js";import{canSeedPinnedChrome as W}from"../../format/lib/document/pinned-seed-gate.js";import{siteFooterDocChrome as X,SITE_FOOTER_TYPE as f}from"../../format/lib/document/section-groups.js";import{inPlaceSeedPlan as $}from"../lib/document/pinned-in-place-seed.js";import{seedNewSiteHeader as ee}from"../../format/lib/document/new-site-header-seed.js";import{SITE_HEADER_TYPE as R}from"../../format/lib/document/section-groups.js";import{blocksOf as te}from"../lib/website-session.js";function De(t,D){const{adapter:_,capabilities:y,currentSlug:w,docId:S,data:C,saveStatus:H,siteId:v,tokenRef:x}=K(),z=M(),{hasSiteSettings:B,hasPinnedChrome:Y}=y;Q(t);const A=!!y.editsPinnedInPlace&&w!==L,g=w===L,h=J().getState,P=q(null);j(()=>{if(!W({docId:S,saveStatus:H,seededDocId:P.current})||(P.current=S,!Y))return;const p=h().appState.data,n=p.content,d=C?.content??[],r=(e,s)=>e.some(i=>i?.type===s);if(!B){const e=new Set(O(n)),s=e.size?n.filter(c=>!e.has(c.props.id)):n;if(e.size&&t.setDocument({...p,content:s}),g)return;const i=V(s,d);if(i.includes(a)){const c=s.length,o=t.insertSection(a,c);t.replaceComponent(l,c,{type:a,props:{id:o,blocks:b()}})}i.includes(E)&&t.insertNode(l,0,N());return}if(g){const e=X(n);if(e!==n&&t.setDocument({...p,content:[...e]}),!e.find(i=>i.type===a)&&!r(d,a)&&!r(e,f)&&!r(d,f)){const i=(o,m)=>T(D,o,m),c={type:a,props:{blocks:b()}};t.insertNode(l,e.length,U(c,i,I(f)))}return}if(A){const e=!!_?.pinnedChrome?.state().docId,s=$(n,{hasChromeDoc:e}),i=new Set([...s.remove,...O(n.filter(o=>!s.remove.includes(String(o.props.id))))]),c=i.size?n.filter(o=>!i.has(String(o.props.id))):n;if(c.length!==n.length&&t.setDocument({...p,content:c}),s.seedFooter&&!r(d,a)&&!r(d,f)){const o=(u,Z)=>T(D,u,Z),m={type:a,props:{blocks:b()}};t.insertNode(l,c.length,U(m,o,I(f)))}if(s.seedHeader&&!r(d,E)){const o=c[0]?.type===R?1:0;t.insertNode(l,o,N())}if(s.seedSiteHeader&&!r(d,R)&&!r(d,a)&&!r(d,f)){const o=S;ee({blocks:te(z),make:(m,u)=>T(D,m,u),id:I(R),siteId:v??null,token:x.current,latest:()=>h().appState.data.content,stillOpen:()=>P.current===o,write:m=>{const u=h().appState.data;t.setDocument({...u,content:[...m]})}})}return}const k=n.filter(e=>e.type!==a),G=new Set(O(k)),F=G.size?k.filter(e=>!G.has(e.props.id)):k;F.length!==n.length&&t.setDocument({...p,content:F}),!r(F,E)&&!r(d,E)&&t.insertNode(l,0,N())},[S,H,C,h,t,B,Y,g,A,_,z,v,x])}export{De as usePinnedChromeSeed};
1
+ "use client";import{useEffect as q,useRef as J}from"react";import{createNode as T,newId as I}from"efficient-easel/data";import{useEaselApi as K}from"efficient-easel/easel";import{useScreenDocument as M}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as Q}from"efficient-easel/screen/lib/session-context";import{SITE_FOOTER_SLUG as L}from"../../format/lib/content/footer.js";import{boxFooterFromFooter as U}from"../../format/lib/document/box-footer.js";import{convertFooterBlock as Z}from"../lib/document/box-footer-rows.js";import{useSectionToBoxPass as V}from"./useSectionToBoxPass.js";import{ROOT_ZONE as l,missingPinnedTypes as W,pinnedDuplicateIds as O}from"efficient-easel/draw";import{FOOTER_TYPE as a,HEADER_TYPE as E,buildDefaultFooterBlocks as b,buildDefaultHeaderNode as N}from"../lib/document/footer-blocks.js";import{canSeedPinnedChrome as X}from"../../format/lib/document/pinned-seed-gate.js";import{siteFooterDocChrome as $,SITE_FOOTER_TYPE as f}from"../../format/lib/document/section-groups.js";import{inPlaceSeedPlan as ee}from"../lib/document/pinned-in-place-seed.js";import{seedNewSiteHeader as te}from"../../format/lib/document/new-site-header-seed.js";import{SITE_HEADER_TYPE as R}from"../../format/lib/document/section-groups.js";import{blocksOf as oe}from"../lib/website-session.js";function ke(t,D){const{adapter:_,capabilities:y,currentSlug:w,docId:S,data:C,saveStatus:v,siteId:H,tokenRef:x}=M(),B=Q(),{hasSiteSettings:z,hasPinnedChrome:Y}=y;V(t);const A=!!y.editsPinnedInPlace&&w!==L,g=w===L,h=K().getState,k=J(null);q(()=>{if(!X({docId:S,saveStatus:v,seededDocId:k.current})||(k.current=S,!Y))return;const p=h().appState.data,n=p.content,d=C?.content??[],s=(e,r)=>e.some(i=>i?.type===r);if(!z){const e=new Set(O(n)),r=e.size?n.filter(c=>!e.has(c.props.id)):n;if(e.size&&t.setDocument({...p,content:r}),g)return;const i=W(r,d);if(i.includes(a)){const c=r.length,o=t.insertSection(a,c);t.replaceComponent(l,c,{type:a,props:{id:o,blocks:b()}})}i.includes(E)&&t.insertNode(l,0,N());return}if(g){const e=$(n);if(e!==n&&t.setDocument({...p,content:[...e]}),!e.find(i=>i.type===a)&&!s(d,a)&&!s(e,f)&&!s(d,f)){const i=(o,m)=>T(D,o,m),c={type:a,props:{blocks:b()}};t.insertNode(l,e.length,U(c,i,I(f),Z))}return}if(A){const e=!!_?.pinnedChrome?.state().docId,r=ee(n,{hasChromeDoc:e}),i=new Set([...r.remove,...O(n.filter(o=>!r.remove.includes(String(o.props.id))))]),c=i.size?n.filter(o=>!i.has(String(o.props.id))):n;if(c.length!==n.length&&t.setDocument({...p,content:c}),r.seedFooter&&!s(d,a)&&!s(d,f)){const o=(u,j)=>T(D,u,j),m={type:a,props:{blocks:b()}};t.insertNode(l,c.length,U(m,o,I(f),Z))}if(r.seedHeader&&!s(d,E)){const o=c[0]?.type===R?1:0;t.insertNode(l,o,N())}if(r.seedSiteHeader&&!s(d,R)&&!s(d,a)&&!s(d,f)){const o=S;te({blocks:oe(B),make:(m,u)=>T(D,m,u),id:I(R),siteId:H??null,token:x.current,latest:()=>h().appState.data.content,stillOpen:()=>k.current===o,write:m=>{const u=h().appState.data;t.setDocument({...u,content:[...m]})}})}return}const P=n.filter(e=>e.type!==a),G=new Set(O(P)),F=G.size?P.filter(e=>!G.has(e.props.id)):P;F.length!==n.length&&t.setDocument({...p,content:F}),!s(F,E)&&!s(d,E)&&t.insertNode(l,0,N())},[S,v,C,h,t,z,Y,g,A,_,B,H,x])}export{ke as usePinnedChromeSeed};
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as h}from"react/jsx-runtime";import{useRef as C}from"react";import{ColorPicker as w,ColorPickerPanel as x,ColorSwatch as b,HexInput as S,Popover as N,Tooltip as P,colorFill as k,colorSwatchClasses as T,useShellStrings as E}from"efficient-shell/ui";import{SettingsDefaultReset as R,SettingsField as _}from"efficient-easel/panel";import{typedHex as p}from"efficient-easel/pick";import{usePreviewHeader as j}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as v,say as g}from"../../../format/lib/editor-words.js";import{themeSwatches as F}from"./theme-swatches.js";import{SITE_STYLE_UNSET_LABEL as I}from"../../../format/components/SiteStyleUnset.js";function L({value:e,onChange:n,label:o,id:a,caption:s,inherited:c,ariaLabel:t,choices:l}){return r(z,{value:e,onChange:n,label:g(t??o),id:a,caption:s,inherited:c,choices:l})}function y(){const{theme:e}=j();return F(e).map(n=>({value:n.value,label:n.name}))}function z({value:e,onChange:n,label:o,id:a,caption:s,inherited:c,choices:t}){const l=y(),i=e?null:p(c??""),d=s!==void 0&&(!e||p(s)!==p(e))?s:null,f=m=>{m!==e&&n(m)};return h("div",{className:"sf-colour",children:[t?r(B,{id:a,value:e,onChange:n,label:o,presets:l,follows:i,choices:t}):r(w,{id:a,value:e,onChange:f,label:o,presets:l,fallback:i??void 0,size:"md",align:"start"}),d!==null?r("span",{className:"sf-colour-caption",children:d}):r("span",{className:"sf-colour-hexwrap",children:r(S,{value:e||i||"",onChange:f,label:g("{label} hex code",{label:o}),placeholder:e||i?void 0:g(I),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function B({value:e,onChange:n,label:o,id:a,presets:s,follows:c,choices:t}){const l=E().color,i=e||c||"",d=t.findIndex(u=>u.selected),f=d>=0,m=C(d);return f&&(m.current=d),r(N,{id:a,trigger:r("span",{"aria-hidden":"true",className:"absolute inset-0",style:k(i)}),triggerLabel:l.swatch(o,i.toUpperCase()||l.none),triggerClassName:T({size:"md"}),"aria-label":l.panel(o),align:"start",children:h("div",{className:"sf-colour-window",children:[r("div",{role:"group","aria-label":o,className:"sf-colour-choices",children:t.map(u=>r(P,{content:u.label,children:r(b,{color:u.color,"aria-label":u.label,selected:u.selected,onClick:()=>{u.selected||u.onPick()}})},u.label))}),r(x,{value:f?"":e,onChange:n,label:o,presets:s,fallback:(f?i:c)??void 0},m.current)]})})}function H({label:e,icon:n,changed:o,hint:a,onReset:s,resetTo:c,children:t,...l}){return h(_,{label:e,icon:n,htmlFor:l.id,changed:o,hint:a,action:s?r(R,{words:v()?.panel,label:e,changed:!!o,detail:c,onReset:s}):void 0,children:[L({...l,label:e}),t]})}function M({label:e,icon:n,value:o,inherited:a,resetTo:s,onChange:c,onReset:t,hint:l,choices:i}){const d=!!o;return r(H,{label:e,icon:n,value:o,inherited:d?void 0:a,onChange:c,changed:d,onReset:t,resetTo:s,hint:l,choices:i})}export{L as ColourControl,H as ColourRow,M as InheritedColourRow,y as useThemePresets};
1
+ "use client";import{jsx as r,jsxs as m}from"react/jsx-runtime";import{useRef as C}from"react";import{ColorPicker as w,ColorPickerPanel as x,ColorSwatch as b,HexInput as S,Popover as N,Tooltip as P,colorFill as k,colorSwatchClasses as T,useShellStrings as E}from"efficient-shell/ui";import{SettingsDefaultReset as R,SettingsField as _}from"efficient-easel/panel";import{typedHex as p}from"efficient-easel/pick";import{usePreviewHeader as j}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as F,say as g}from"../../../format/lib/editor-words.js";import{themePresets as I}from"../../../format/lib/document/theme-slots.js";import{SITE_STYLE_UNSET_LABEL as L}from"../../../format/components/SiteStyleUnset.js";function y({value:e,onChange:i,label:o,id:a,caption:s,inherited:c,ariaLabel:t,choices:n}){return r(B,{value:e,onChange:i,label:g(t??o),id:a,caption:s,inherited:c,choices:n})}function z(){const{theme:e}=j();return I(e)}function B({value:e,onChange:i,label:o,id:a,caption:s,inherited:c,choices:t}){const n=z(),l=e?null:p(c??""),d=s!==void 0&&(!e||p(s)!==p(e))?s:null,f=h=>{h!==e&&i(h)};return m("div",{className:"sf-colour",children:[t?r(H,{id:a,value:e,onChange:i,label:o,presets:n,follows:l,choices:t}):r(w,{id:a,value:e,onChange:f,label:o,presets:n,fallback:l??void 0,size:"md",align:"start"}),d!==null?r("span",{className:"sf-colour-caption",children:d}):r("span",{className:"sf-colour-hexwrap",children:r(S,{value:e||l||"",onChange:f,label:g("{label} hex code",{label:o}),placeholder:e||l?void 0:g(L),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function H({value:e,onChange:i,label:o,id:a,presets:s,follows:c,choices:t}){const n=E().color,l=e||c||"",d=t.findIndex(u=>u.selected),f=d>=0,h=C(d);return f&&(h.current=d),r(N,{id:a,trigger:r("span",{"aria-hidden":"true",className:"absolute inset-0",style:k(l)}),triggerLabel:n.swatch(o,l.toUpperCase()||n.none),triggerClassName:T({size:"md"}),"aria-label":n.panel(o),align:"start",children:m("div",{className:"sf-colour-window",children:[r("div",{role:"group","aria-label":o,className:"sf-colour-choices",children:t.map(u=>r(P,{content:u.label,children:r(b,{color:u.color,"aria-label":u.label,selected:u.selected,onClick:()=>{u.selected||u.onPick()}})},u.label))}),r(x,{value:f?"":e,onChange:i,label:o,presets:s,fallback:(f?l:c)??void 0},h.current)]})})}function W({label:e,icon:i,changed:o,hint:a,onReset:s,resetTo:c,children:t,...n}){return m(_,{label:e,icon:i,htmlFor:n.id,changed:o,hint:a,action:s?r(R,{words:F()?.panel,label:e,changed:!!o,detail:c,onReset:s}):void 0,children:[y({...n,label:e}),t]})}function M({label:e,icon:i,value:o,inherited:a,resetTo:s,onChange:c,onReset:t,hint:n,choices:l}){const d=!!o;return r(W,{label:e,icon:i,value:o,inherited:d?void 0:a,onChange:c,changed:d,onReset:t,resetTo:s,hint:n,choices:l})}export{y as ColourControl,W as ColourRow,M as InheritedColourRow,z as useThemePresets};
@@ -1 +1 @@
1
- import{jsx as R}from"react/jsx-runtime";import{ListIcon as _}from"efficient-easel/icons";import{isNodeList as y,newId as S}from"efficient-easel/data";import{group as L}from"efficient-easel/screen/lib/document/box-fields";import{COUNT_KEY_PROP as c}from"../../../../../../format/lib/content/block-sources.js";import{CARD_LIST_ROWS as m,CARD_LIST_TYPE as C,cardListFieldsOf as F,cardTemplateOwner as f,namedRowField as I}from"../../../../../../format/lib/content/card-template.js";import{ROW_LIVE_NUMBER_FIELD as O}from"../../../live-number-field.js";import{withShowWhen as T}from"../../../../../../format/lib/document/show-when-attach.js";import{CARD_ROW_FACTS as g,cardRowField as A,cardRowFields as h,cardRowItemField as E}from"../../../card-row-fields.js";import{say as W}from"../../../../../../format/lib/editor-words.js";import{CardListSlots as b}from"../../../../../../format/lib/document/blocks/general/CardList/meta.js";function l(o){return y(o)?o.some(t=>{const e=t.props??{};return t.type==="Text"&&typeof e[c]=="string"&&I(e)?!0:Object.values(e).some(l)}):!1}const D=o=>Object.defineProperty(Object.fromEntries(o.map(t=>[t.key,""])),"key",{get:()=>S("row"),enumerable:!0}),d=new WeakMap;function k(o,t,e){let r=d.get(o);r||d.set(o,r=new Map);const i=JSON.stringify([t,e]);let s=r.get(i);if(!s){const p=Object.fromEntries(t.map(n=>[n.key,E(n)]));e&&(p[c]=O);const a=t[0]?.key;s={...o,arrayFields:p,defaultItemProps:D(t),getItemSummary:n=>a&&typeof n?.[a]=="string"&&n[a]||W("Row")},r.set(i,s)}return s}const w="cardListInCardTemplate",M={not:{context:w,is:!0}},j={...g,[w]:(o,t)=>{const e=f(t.appState,o.props?.id);return e===void 0?void 0:e!==null}},x=T({type:"array",label:"Rows",icon:R(_,{}),arrayFields:{}},M),u=new WeakMap;function N(o,t){let e=u.get(o);e||u.set(o,e=new WeakMap);let r=e.get(t);return r||e.set(t,r={...o,[m]:t}),r}const G={fields:{_gCardList:L("Card list"),rowField:A("Shows","list"),[m]:x,...b},resolveFields:(o,t)=>{const e=h(t.fields,o,t),r=o.props??{},i=!!f(t.appState,r.id),s=e[m];if(i||!s)return e;const p=F(t.appState,{type:C,props:r});return N(e,k(s,p,l(r.template)))},showWhenFacts:j};export{G as CardListFields};
1
+ import{jsx as w}from"react/jsx-runtime";import{AccentIcon as O,ListIcon as F}from"efficient-easel/icons";import{isNodeList as L,newId as b}from"efficient-easel/data";import{group as u}from"efficient-easel/screen/lib/document/box-fields";import{COUNT_KEY_PROP as h}from"../../../../../../format/lib/content/block-sources.js";import{CARD_LIST_ROWS as p,CARD_LIST_TYPE as f,cardListFieldsOf as S,cardTemplateOwner as g,namedRowField as I}from"../../../../../../format/lib/content/card-template.js";import{BLOCK_SOURCE_EDIT_PROP as T,NO_BLOCK_SOURCE as E,blockSourceEditField as A,blockSourceField as M,blockSourceFields as D}from"../../../block-source-fields.js";import{select as P}from"../../../box-fields.js";import{text as W}from"../../../controls.js";import{cardsFieldsFollowContent as x}from"../../../../../../format/lib/document/cards-template-on-read.js";import{cardFollowsContentSwitch as N}from"../../../../../../format/lib/document/card-content-switch.js";import{cardPicks as j,pickRow as v,withOwnCardKeys as B}from"../../../../../../format/lib/document/card-row-keys.js";import{ROW_LIVE_NUMBER_FIELD as U}from"../../../live-number-field.js";import{withShowWhen as d}from"../../../../../../format/lib/document/show-when-attach.js";import{CARD_ROW_FACTS as K,cardRowField as H,cardRowFields as Y,cardRowItemField as J}from"../../../card-row-fields.js";import{say as V}from"../../../../../../format/lib/editor-words.js";import{CardListSlots as q}from"../../../../../../format/lib/document/blocks/general/CardList/meta.js";function y(e){return L(e)?e.some(o=>{const t=o.props??{};return o.type==="Text"&&typeof t[h]=="string"&&I(t)?!0:Object.values(t).some(y)}):!1}const z=e=>Object.defineProperty(Object.fromEntries(e.map(o=>[o.key,""])),"key",{get:()=>b("row"),enumerable:!0}),_=new WeakMap;function G(e,o,t){const r=o.filter(c=>!c.everySource);let s=_.get(e);s||_.set(e,s=new Map);const i=JSON.stringify([r,t]);let n=s.get(i);if(!n){const c=Object.fromEntries(r.map(l=>[l.key,J(l)]));t&&(c[h]=U);const a=r[0]?.key;n={...e,arrayFields:c,defaultItemProps:z(r),getItemSummary:l=>a&&typeof l?.[a]=="string"&&l[a]||V("Row")},s.set(i,n)}return n}const C="cardListInCardTemplate",m={not:{context:C,is:!0}},Q={...K,[C]:(e,o)=>{const t=g(o.appState,e.props?.id);return t===void 0?void 0:t!==null}},X=d({type:"array",label:"Rows",icon:w(F,{}),arrayFields:{}},{all:[m,E]}),Z=e=>e.find(o=>!o.everySource&&(o.kind??"text")==="text")?.key??"title",R=new WeakMap;function $(e,o){let t=R.get(e);t||R.set(e,t=new WeakMap);let r=t.get(o);return r||t.set(o,r={...e,highlightedCard:o}),r}const tt=e=>{const o=new Set(S(null,{type:f,props:e}).map(t=>t.key));return t=>o.has(t)},k=new WeakMap;function et(e,o){let t=k.get(e);t||k.set(e,t=new WeakMap);let r=t.get(o);return r||t.set(o,r={...e,[p]:o}),r}const yt={fields:{_gSource:u("Source"),dataSource:d(M("Card content","Manual"),m),[T]:A(),_gCardList:u("Card list"),rowField:H("Shows","list"),[p]:X,highlightedCard:d(P("Highlighted card",w(O,{}),[{label:"None",value:""}],""),m),highlightBadge:d(W("Highlight badge","Most popular"),m),...q},resolveData:(e,o)=>{const t=e.props,r=o?.lastData?.props,s=B(N(t,r),p),i=x(s,tt(s));return i===t?e:{...e,props:i}},resolveFields:(e,o)=>{const t=e.props??{},r=D(f,Y(o.fields,e,o),t),s=!!g(o.appState,t.id),i=r[p];if(s||!i)return r;const n=S(o.appState,{type:f,props:t}),c=et(r,G(i,n,y(t.template))),a=r.highlightedCard;return a?$(c,v(a,j(t,{rows:p,label:Z(n)}))):c},showWhenFacts:Q};export{yt as CardListFields};
@@ -1 +1 @@
1
- import{jsx as c}from"react/jsx-runtime";import{AccentIcon as R,ColumnsIcon as A,StylesIcon as h}from"efficient-easel/icons";import{copyText as j,plainText as v,text as g,textarea as B,withOffPage as M}from"../../../controls.js";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as x,select as b,slider as D}from"../../../box-fields.js";import{CARD_STYLE_PICTURES as C,LAYOUT_CELL as H}from"../../../choice-pictures.js";import{SPLITTABLE_SECTIONS as N,headFieldsForPlacement as K}from"../../../../../../format/lib/sections/section-head-placement.js";import{SECTION_EYEBROW_LOOK_OPTIONS as U,eyebrowLookFor as w}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{BLOCK_SOURCE_EDIT_PROP as W,blockSourceEditField as Y,blockSourceField as J,blockSourceFields as q}from"../../../block-source-fields.js";import{declaredBlockSource as S,sourceChoices as z}from"../../../../../../format/lib/content/block-sources.js";import{cardKeyOf as G,cardRow as Q,cardTemplateFields as k}from"../../../../../../format/lib/content/card-template.js";import{cardRowItemField as E}from"../../../card-row-fields.js";import{isNodeList as V,newId as O}from"efficient-easel/data";import{say as X}from"../../../../../../format/lib/editor-words.js";import{cardsFieldsFollowContent as Z}from"../../../../../../format/lib/document/cards-template-on-read.js";import{CARDS_PH as F,CardsSlots as $}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const ee=e=>V(e.template)&&e.template.length>0;function te(e){const r=S(e);return r?z(r).map(t=>({label:t.label,value:t.key})):(Array.isArray(e.items)?e.items:[]).map((t,l)=>({label:typeof t?.title=="string"&&t.title.trim()||X("Card {n}",{n:l+1}),value:G(Q(t),l)}))}const re=e=>Object.defineProperty({...e},"key",{get:()=>O("card"),enumerable:!0});function oe(e,r){const o=ee(r)&&r.cardStyle!=="label-only"&&!!e.highlightedCard;return Object.fromEntries(Object.entries(e).flatMap(([t,l])=>t==="highlightedCard"?o?[[t,le(l,te(r))]]:[]:t==="highlightBadge"?o?[[t,l]]:[]:t==="items"&&o&&l?[[t,ie(l)]]:[[t,l]]))}const I=new WeakMap;function le(e,r){let o=I.get(e);o||I.set(e,o=new Map);const t=JSON.stringify(r);let l=o.get(t);return l||o.set(t,l={...e,options:[...e.options,...r]}),l}const se=Object.fromEntries(k("Cards").filter(e=>!e.everySource).map(e=>[e.key,E(e)])),ae=Object.fromEntries(k("Cards").filter(e=>e.key==="title"||e.key==="body").map(e=>[e.key,E(e)])),L=new WeakMap;function ie(e){let r=L.get(e);return r||L.set(e,r={...e,arrayFields:se}),r}const Oe={fields:{_gSource:p("Source"),dataSource:J("Card content","Manual"),[W]:Y(),_gContent:p("Content"),eyebrow:g("Eyebrow",F.eyebrow),eyebrowLook:b("Eyebrow style",c(h,{}),[...U],w("Cards")),title:B("Heading",F.title),items:{type:"array",label:"Cards",arrayFields:ae,defaultItemProps:re({title:"",body:""}),getItemSummary:e=>e?.title||e?.body||"Card"},...$,highlightedCard:b("Highlighted card",c(R,{}),[{label:"None",value:""}],""),highlightBadge:g("Highlight badge","Most popular"),_gStyle:p("Style"),cardStyle:x("Card style",c(h,{}),[{label:"Cards",value:"cards",picture:C.cards},{label:"Label only",value:"label-only",picture:C["label-only"]}],"cards",{columns:2,cell:H}),columns:D("Columns",c(A,{}),2,4,1,3)},resolveData:e=>{const r=Z(e.props),o=r===e.props?e:{...e,props:r},t=o.props;if(!Array.isArray(t.items)||S(t))return o;const l=t.items,a=typeof t.highlightedCard=="string"?t.highlightedCard.trim():"",i=s=>s&&typeof s=="object"&&typeof s.key=="string"?s.key:"",_=!!a&&!l.some(s=>i(s)===a),d=new Set;let y=t.highlightedCard,u=!1;const T=l.map((s,P)=>{if(!s||typeof s!="object")return s;const n=i(s);if(n&&!d.has(n))return d.add(n),s;const f=!n&&_&&a===String(P+1);if(n||f){const m=O("card");return d.add(m),u=!0,f&&(y=m),{...s,key:m}}return s});return u?{...o,props:{...t,items:T,highlightedCard:y}}:o},resolveFields:(e,{fields:r})=>{const o=K(q("Cards",r,e.props,{hides:["items"]}),e.props.headPlacement,N.Cards.headRows),t=e.props,l=oe(o,t);if(t.cardStyle!=="label-only")return l;const a=o.items,i=o.eyebrowLook;return{...l,...a?{items:{...a,arrayFields:{title:j("Feature label"),href:M(v("Link"))}}}:{},...i?{eyebrowLook:{...i,fallback:w("KeyFeatures")}}:{}}}};export{Oe as CardsFields};
1
+ import{jsx as s}from"react/jsx-runtime";import{AccentIcon as C,ColumnsIcon as f,StylesIcon as c}from"efficient-easel/icons";import{copyText as S,plainText as w,text as d,textarea as E,withOffPage as F}from"../../../controls.js";import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as L,select as m,slider as I}from"../../../box-fields.js";import{CARD_STYLE_PICTURES as p,LAYOUT_CELL as _}from"../../../choice-pictures.js";import{SPLITTABLE_SECTIONS as O,headFieldsForPlacement as T}from"../../../../../../format/lib/sections/section-head-placement.js";import{SECTION_EYEBROW_LOOK_OPTIONS as k,eyebrowLookFor as h}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{BLOCK_SOURCE_EDIT_PROP as P,blockSourceEditField as R,blockSourceField as x,blockSourceFields as M}from"../../../block-source-fields.js";import{cardTemplateFields as u}from"../../../../../../format/lib/content/card-template.js";import{cardRowItemField as y}from"../../../card-row-fields.js";import{cardPicks as j,newCard as v,pickRow as A,withOwnCardKeys as B}from"../../../../../../format/lib/document/card-row-keys.js";import{isNodeList as D}from"efficient-easel/data";import{cardsFieldsFollowContent as H}from"../../../../../../format/lib/document/cards-template-on-read.js";import{CARDS_PH as b,CardsSlots as N}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const K=e=>D(e.template)&&e.template.length>0;function U(e,t){const o=K(t)&&t.cardStyle!=="label-only"&&!!e.highlightedCard;return Object.fromEntries(Object.entries(e).flatMap(([r,l])=>r==="highlightedCard"?o?[[r,A(l,j(t))]]:[]:r==="highlightBadge"?o?[[r,l]]:[]:r==="items"&&o&&l?[[r,q(l)]]:[[r,l]]))}const Y=Object.fromEntries(u("Cards").filter(e=>!e.everySource).map(e=>[e.key,y(e)])),W=Object.fromEntries(u("Cards").filter(e=>e.key==="title"||e.key==="body").map(e=>[e.key,y(e)])),g=new WeakMap;function q(e){let t=g.get(e);return t||g.set(e,t={...e,arrayFields:Y}),t}const ae={fields:{_gSource:i("Source"),dataSource:x("Card content","Manual"),[P]:R(),_gContent:i("Content"),eyebrow:d("Eyebrow",b.eyebrow),eyebrowLook:m("Eyebrow style",s(c,{}),[...k],h("Cards")),title:E("Heading",b.title),items:{type:"array",label:"Cards",arrayFields:W,defaultItemProps:v({title:"",body:""}),getItemSummary:e=>e?.title||e?.body||"Card"},...N,highlightedCard:m("Highlighted card",s(C,{}),[{label:"None",value:""}],""),highlightBadge:d("Highlight badge","Most popular"),_gStyle:i("Style"),cardStyle:L("Card style",s(c,{}),[{label:"Cards",value:"cards",picture:p.cards},{label:"Label only",value:"label-only",picture:p["label-only"]}],"cards",{columns:2,cell:_}),columns:I("Columns",s(f,{}),2,4,1,3)},resolveData:e=>{const t=H(e.props),o=t===e.props?e:{...e,props:t},r=o.props,l=B(r);return l===r?o:{...o,props:l}},resolveFields:(e,{fields:t})=>{const o=T(M("Cards",t,e.props,{hides:["items"]}),e.props.headPlacement,O.Cards.headRows),r=e.props,l=U(o,r);if(r.cardStyle!=="label-only")return l;const a=o.items,n=o.eyebrowLook;return{...l,...a?{items:{...a,arrayFields:{title:S("Feature label"),href:F(w("Link"))}}}:{},...n?{eyebrowLook:{...n,fallback:h("KeyFeatures")}}:{}}}};export{ae as CardsFields};
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{StylesIcon as n}from"efficient-easel/icons";import{copyText as u,plainText as p,text as e,textarea as a,withPanelOnly as s}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as m}from"../../../box-fields.js";import{CHART_PICTURES as t,LAYOUT_CELL as f}from"../../../choice-pictures.js";import{CHART_PH as r}from"../../../../../../format/lib/document/blocks/general/Chart/meta.js";const v={fields:{_gContent:o("Content"),eyebrow:e("Chip label",r.eyebrow),title:a("Heading",r.title),body:a("Body",""),items:{type:"array",label:"Data points",arrayFields:{label:u("Label"),value:p("Value")},defaultItemProps:{label:"",value:""},getItemSummary:l=>[l?.label,l?.value].filter(Boolean).join(" · ")||"Point"},caption:e("Caption","Illustrative example"),_gStyle:o("Style"),chartStyle:m("Chart style",i(n,{}),[{label:"Bars",hint:"Bars (comparison / funnel)",value:"bars",picture:t.bars},{label:"Line",hint:"Line (trend)",value:"line",picture:t.line},{label:"Donut",hint:"Donut (split of a whole)",value:"donut",picture:t.donut}],"bars",{columns:3,cell:f}),valueSuffix:s(e("Value suffix","%"))}};export{v as ChartFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{StylesIcon as n}from"efficient-easel/icons";import{copyText as m,plainText as p,text as e,textarea as o,withPanelOnly as s}from"../../../controls.js";import{group as a}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as u}from"../../../box-fields.js";import{CHART_PICTURES as t,LAYOUT_CELL as f}from"../../../choice-pictures.js";import{HEAD_ROWS_SHOW_WHEN as b}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as y}from"../../../../../../format/lib/document/show-when-attach.js";import{CHART_OWN_BOX_WORDS as c,CHART_PH as r}from"../../../../../../format/lib/document/blocks/general/Chart/meta.js";const _=[...c],R={fields:y({_gContent:a("Content"),eyebrow:e("Chip label",r.eyebrow),title:o("Heading",r.title),body:o("Body",""),items:{type:"array",label:"Data points",arrayFields:{label:m("Label"),value:p("Value")},defaultItemProps:{label:"",value:""},getItemSummary:l=>[l?.label,l?.value].filter(Boolean).join(" · ")||"Point"},caption:e("Caption","Illustrative example"),_gStyle:a("Style"),chartStyle:u("Chart style",i(n,{}),[{label:"Bars",hint:"Bars (comparison / funnel)",value:"bars",picture:t.bars},{label:"Line",hint:"Line (trend)",value:"line",picture:t.line},{label:"Donut",hint:"Donut (split of a whole)",value:"donut",picture:t.donut}],"bars",{columns:3,cell:f}),valueSuffix:s(e("Value suffix","%"))},_,b)};export{R as ChartFields};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{ClockIcon as n,TagIcon as i}from"efficient-easel/icons";import{dateTime as r,text as o,toggle as s,withPanelOnly as m}from"../../../controls.js";import{COUNTDOWN_DEFAULTS as e}from"../../../../../../format/lib/document/blocks/general/Countdown/meta.js";const T={fields:{title:o("Heading",e.title),zeroText:m(o("At zero",e.zeroText)),endsAt:r("Ends",t(n,{}),"In your own time zone. Every visitor counts down to the same moment."),showUnits:s("Unit labels",!0,t(i,{}))}};export{T as CountdownFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{ClockIcon as n,TagIcon as r}from"efficient-easel/icons";import{dateTime as i,text as t,toggle as m,withPanelOnly as s}from"../../../controls.js";import{HEAD_ROWS_SHOW_WHEN as O}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as l}from"../../../../../../format/lib/document/show-when-attach.js";import{COUNTDOWN_DEFAULTS as e,COUNTDOWN_OWN_BOX_WORDS as _}from"../../../../../../format/lib/document/blocks/general/Countdown/meta.js";const W=[..._],T={fields:l({title:t("Heading",e.title),zeroText:s(t("At zero",e.zeroText)),endsAt:i("Ends",o(n,{}),"In your own time zone. Every visitor counts down to the same moment."),showUnits:m("Unit labels",!0,o(r,{}))},W,O)};export{T as CountdownFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{BlackAndWhiteIcon as m,ColumnsIcon as O,HeightIcon as g,PaddingYIcon as p,StylesIcon as c}from"efficient-easel/icons";import{plainText as _,textarea as d,toggle as L,upload as S,withPanelOnly as h}from"../../../controls.js";import{group as s}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as u,slider as r}from"../../../box-fields.js";import{LAYOUT_CELL as f,LOGO_LOOK_PICTURES as C}from"../../../choice-pictures.js";import{DEFAULT_LOGO_LOOK as W,LOGO_LOOK_OPTIONS as E}from"../../../../../../format/lib/sections/logo-look.js";import{HEAD_ROWS_SHOW_WHEN as R,OWN_BOX_ROWS_SHOW_WHEN as y}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowRules as H,withShowWhen as n}from"../../../../../../render/lib/document/show-when.js";import{blockSourceField as I,blockSourceFields as P,NO_BLOCK_SOURCE as N}from"../../../block-source-fields.js";import{BLOCK_SOURCE_PROP as i}from"../../../../../../format/lib/content/block-sources.js";import{seedLogosTemplate as w}from"../../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{LOGOS_PH as B,LogosSlots as a}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const b=["items","heading","bandPadding"],k=["look"],x={field:i,set:!0},T=H({_gContent:s("Content"),dataSource:I("Logo content","Manual"),heading:d("Heading",B.heading),items:{type:"array",label:"Logos",arrayFields:{src:S("Image","image/*"),alt:h(_("Name / alt"))},getItemSummary:o=>o.alt||o.src||"logo"},logos:n(a.logos,N),template:n(a.template,x),_gStyle:s("Style"),columns:r("Columns",e(O,{}),3,6,1,5),logoHeight:r("Logo height",e(g,{}),20,72,2,28,"px"),bandPadding:r("Space above and below",e(p,{}),16,120,4,40,"px"),grayscale:L("Black and white logos",!0,e(m,{})),look:u("Logo style",e(c,{}),E.map(o=>({...o,picture:C[o.value]})),W,{columns:2,cell:f})},[[b,R],[k,y]]),Q={fields:T,resolveFields:(o,{fields:t})=>P("Logos",t,o.props,{hides:["logos"]}),resolveData:(o,t)=>{if(!t?.changed?.[i])return o;const l=w(o.props);return l===o.props?o:{...o,props:l}}};export{Q as LogosFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{BlackAndWhiteIcon as m,ColumnsIcon as O,HeightIcon as g,PaddingYIcon as c,StylesIcon as p}from"efficient-easel/icons";import{plainText as _,textarea as d,toggle as S,upload as L,withPanelOnly as h}from"../../../controls.js";import{VIEW_KEY_ACCESS as u,group as s}from"efficient-easel/screen/lib/document/box-fields";import{blockAlignmentFields as f,iconPickerRow as C,slider as r}from"../../../box-fields.js";import{LAYOUT_CELL as E,LOGO_LOOK_PICTURES as W}from"../../../choice-pictures.js";import{DEFAULT_LOGO_LOOK as I,LOGO_LOOK_OPTIONS as R}from"../../../../../../format/lib/sections/logo-look.js";import{HEAD_ROWS_SHOW_WHEN as y,OWN_BOX_ROWS_SHOW_WHEN as H}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowRules as P,withShowWhen as n}from"../../../../../../render/lib/document/show-when.js";import{blockSourceField as N,blockSourceFields as b,NO_BLOCK_SOURCE as k}from"../../../block-source-fields.js";import{BLOCK_SOURCE_PROP as i}from"../../../../../../format/lib/content/block-sources.js";import{seedLogosTemplate as w}from"../../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{LOGOS_PH as B,LogosSlots as a}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const x=["items","heading","bandPadding"],F=["look"],K={field:i,set:!0},T=P({_gContent:s("Content"),dataSource:N("Logo content","Manual"),heading:d("Heading",B.heading),items:{type:"array",label:"Logos",arrayFields:{src:L("Image","image/*"),alt:h(_("Name / alt"))},getItemSummary:o=>o.alt||o.src||"logo"},logos:n(a.logos,k),template:n(a.template,K),_gStyle:s("Style"),columns:r("Columns",e(O,{}),3,6,1,5),logoHeight:r("Logo height",e(g,{}),16,72,2,28,"px"),bandPadding:r("Space above and below",e(c,{}),16,120,4,40,"px"),grayscale:S("Black and white logos",!0,e(m,{})),look:C("Logo style",e(p,{}),R.map(o=>({...o,picture:W[o.value]})),I,{columns:2,cell:E}),...f("align",{access:u})},[[x,y],[F,H]]),Z={fields:T,resolveFields:(o,{fields:t})=>b("Logos",t,o.props,{hides:["logos"]}),resolveData:(o,t)=>{if(!t?.changed?.[i])return o;const l=w(o.props);return l===o.props?o:{...o,props:l}}};export{Z as LogosFields};
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import{BlockColumnIcon as i,PlacementIcon as m,StateIcon as s,TemplateIcon as c,TextLinesIcon as d}from"efficient-easel/icons";import{plainText as l,text as a,textarea as n,textList as o}from"../../../controls.js";import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as b,select as u}from"../../../box-fields.js";import{LAYOUT_CELL as p,MOCKUP_PICTURES as y}from"../../../choice-pictures.js";import{withMockupVariantRules as C,MOCKUP_DEFAULT_VARIANT as f,MOCKUP_VARIANT_OPTIONS as g}from"../../../../../../format/lib/document/mockup-variant-fields.js";const L={fields:C({_gContent:r("Content"),eyebrow:a("Chip label","In the product"),title:n("Heading",`Seen from
2
- *the counter.*`),body:n("Body",""),_gCard:r("Mockup card"),variant:b("Card type",t(c,{}),g.map(e=>({...e,picture:y[e.value]})),f,{columns:3,cell:p}),cardHeader:a("Card header strip","Product record"),badge:a("Header badge","LIVE"),cardTitle:a("Card title",""),cardSubtitle:a("Card subtitle",""),pills:{type:"array",label:"Selector pills",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" ")||"Pill"},tiles:{type:"array",label:"Spec tiles",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" ")||"Tile"},rows:{type:"array",label:"Result / order rows",arrayFields:{lead:l("Lead"),detail:l("Detail"),state:u("State",t(s,{}),[{label:"Match / done (green)",value:"ok"},{label:"In progress (main)",value:"warn"},{label:"No match (gray ✕)",value:"no"}],"ok"),status:l("Status chip")},defaultItemProps:{lead:"",detail:"",state:"ok",status:""},getItemSummary:e=>[e?.lead,e?.detail].filter(Boolean).join(" · ")||"Row"},button:a("Button",""),footnote:a("Footnote",""),_gKanban:r("Kanban columns"),col1Title:a("Column 1 title",""),col1Cards:o("Column 1 cards",t(i,{}),"Job card label","verbatim"),col2Title:a("Column 2 title",""),col2Cards:o("Column 2 cards",t(i,{}),"Job card label","verbatim"),col3Title:a("Column 3 title",""),col3Cards:o("Column 3 cards",t(i,{}),"Job card label","verbatim"),col4Title:a("Column 4 title",""),col4Cards:o("Column 4 cards",t(i,{}),"Job card label","verbatim"),_gClaims:r("Claims bars"),barsHeading:a("Bars heading","Defect rate by product"),bars:{type:"array",label:"Bars",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" · ")||"Bar"},_gTerminal:r("Terminal"),termLines:o("Terminal lines",t(d,{}),"$ efficient …","verbatim"),_gBrowser:r("Browser mock"),urlText:a("URL pill",""),heroTitle:a("Hero line",""),heroButton:a("Hero button",""),products:{type:"array",label:"Product tiles",arrayFields:{name:l("Name"),price:l("Price")},defaultItemProps:{name:"",price:""},getItemSummary:e=>[e?.name,e?.price].filter(Boolean).join(" · ")||"Tile"},_gStyle:r("Style"),align:u("Mockup position",t(m,{}),[{label:"Right of the copy",value:"right"},{label:"Left of the copy",value:"left"}],"right")})};export{L as MockupFields};
1
+ import{jsx as t}from"react/jsx-runtime";import{BlockColumnIcon as i,PlacementIcon as u,StateIcon as s,TemplateIcon as c,TextLinesIcon as d}from"efficient-easel/icons";import{plainText as l,text as a,textarea as n,textList as o}from"../../../controls.js";import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as b,select as m}from"../../../box-fields.js";import{LAYOUT_CELL as p,MOCKUP_PICTURES as f}from"../../../choice-pictures.js";import{withMockupVariantRules as y,MOCKUP_DEFAULT_VARIANT as C,MOCKUP_VARIANT_OPTIONS as g}from"../../../../../../format/lib/document/mockup-variant-fields.js";import{HEAD_ROWS_SHOW_WHEN as I}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as _}from"../../../../../../format/lib/document/show-when-attach.js";import{MOCKUP_OWN_BOX_WORDS as v}from"../../../../../../format/lib/document/blocks/general/Mockup/meta.js";const S=[...v,"align"],x={fields:_(y({_gContent:r("Content"),eyebrow:a("Chip label","In the product"),title:n("Heading",`Seen from
2
+ *the counter.*`),body:n("Body",""),_gCard:r("Mockup card"),variant:b("Card type",t(c,{}),g.map(e=>({...e,picture:f[e.value]})),C,{columns:3,cell:p}),cardHeader:a("Card header strip","Product record"),badge:a("Header badge","LIVE"),cardTitle:a("Card title",""),cardSubtitle:a("Card subtitle",""),pills:{type:"array",label:"Selector pills",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" ")||"Pill"},tiles:{type:"array",label:"Spec tiles",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" ")||"Tile"},rows:{type:"array",label:"Result / order rows",arrayFields:{lead:l("Lead"),detail:l("Detail"),state:m("State",t(s,{}),[{label:"Match / done (green)",value:"ok"},{label:"In progress (main)",value:"warn"},{label:"No match (gray ✕)",value:"no"}],"ok"),status:l("Status chip")},defaultItemProps:{lead:"",detail:"",state:"ok",status:""},getItemSummary:e=>[e?.lead,e?.detail].filter(Boolean).join(" · ")||"Row"},button:a("Button",""),footnote:a("Footnote",""),_gKanban:r("Kanban columns"),col1Title:a("Column 1 title",""),col1Cards:o("Column 1 cards",t(i,{}),"Job card label","verbatim"),col2Title:a("Column 2 title",""),col2Cards:o("Column 2 cards",t(i,{}),"Job card label","verbatim"),col3Title:a("Column 3 title",""),col3Cards:o("Column 3 cards",t(i,{}),"Job card label","verbatim"),col4Title:a("Column 4 title",""),col4Cards:o("Column 4 cards",t(i,{}),"Job card label","verbatim"),_gClaims:r("Claims bars"),barsHeading:a("Bars heading","Defect rate by product"),bars:{type:"array",label:"Bars",arrayFields:{label:l("Label"),value:l("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" · ")||"Bar"},_gTerminal:r("Terminal"),termLines:o("Terminal lines",t(d,{}),"$ efficient …","verbatim"),_gBrowser:r("Browser mock"),urlText:a("URL pill",""),heroTitle:a("Hero line",""),heroButton:a("Hero button",""),products:{type:"array",label:"Product tiles",arrayFields:{name:l("Name"),price:l("Price")},defaultItemProps:{name:"",price:""},getItemSummary:e=>[e?.name,e?.price].filter(Boolean).join(" · ")||"Tile"},_gStyle:r("Style"),align:m("Mockup position",t(u,{}),[{label:"Right of the copy",value:"right"},{label:"Left of the copy",value:"left"}],"right")}),S,I)};export{x as MockupFields};
@@ -0,0 +1,3 @@
1
+ import type { ConvertFooterBlock } from "../../../format/lib/document/box-footer.js";
2
+ export declare const FOOTER_ROW_TYPES: readonly string[];
3
+ export declare const convertFooterBlock: ConvertFooterBlock;
@@ -0,0 +1 @@
1
+ import{isNodeList as c}from"efficient-easel/data";import{registerGeneralSectionRows as f}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{convertSection as m,sectionToBoxRow as u}from"../../../render/lib/sections/section-to-box.js";const l=["FooterPayment"];function n(o,r){const{id:e,...t}=o.props;for(const[i,p]of Object.entries(t))c(p)&&(t[i]=p.map(s=>n(s,r)));return r(o.type,t)}const R=(o,r)=>{if(!l.includes(o.type))return null;f();const e=u(o.type);return e?m({type:o.type,props:{...o.props}},e).nodes.map(t=>n(t,r)):null};export{l as FOOTER_ROW_TYPES,R as convertFooterBlock};
@@ -1,11 +1,12 @@
1
1
  import { type CardRowFieldKind, type CardRowFieldSpec } from "../../../format/lib/content/card-template.js";
2
+ import { type CustomField } from "./controls.js";
2
3
  import { type SelectField } from "efficient-easel/screen/lib/document/box-fields";
3
4
  import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/document/show-when-attach.js";
4
5
  export declare const OUTSIDE_CARD_TEMPLATE = "outsideCardTemplate";
5
6
  export declare const IN_CARD_TEMPLATE: ShowWhenRule;
6
7
  export declare const CARD_ROW_FACTS: BlockShowWhenFacts;
7
8
  export declare function cardRowField(label: string, kind: CardRowFieldKind): SelectField;
8
- export declare function cardRowItemField(f: CardRowFieldSpec): import("./controls.js").CustomField<string> | import("./controls.js").CustomField<import("efficient-easel/draw").HidableValue>;
9
+ export declare function cardRowItemField(f: CardRowFieldSpec): CustomField<string> | CustomField<import("efficient-easel/draw").HidableValue>;
9
10
  export declare function cardRowFields<Fields extends Record<string, unknown>>(fields: Fields, data: {
10
11
  props?: Record<string, unknown>;
11
12
  }, params: {
@@ -1 +1 @@
1
- import{jsx as w}from"react/jsx-runtime";import{GroundIcon as k,ListIcon as M}from"efficient-easel/icons";import{FieldGlyph as P}from"../../components/FieldGlyph.js";import{CARD_LIST_FIELDS as W,CARD_LIST_TYPE as x,cardListFieldsOf as B,cardListShows as G,cardTemplateFieldsOf as N,cardTemplateOwner as b}from"../../../format/lib/content/card-template.js";import{colorInput as $,copyText as J,plainText as U,plainTextarea as Y,withOffPage as q}from"./controls.js";import{recordRowFields as F}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as z}from"../../../format/lib/content/record-types.js";import{editorRecordType as H}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as Q,declaredBlockSource as I}from"../../../format/lib/content/block-sources.js";import{select as V}from"./box-fields.js";import{withShowWhen as X}from"../../../format/lib/document/show-when-attach.js";function L(o){const e=o?.data?.root,t=H(e?.props)??"";return t&&F(t,"text").length?t:""}const O="outsideCardTemplate",Z={not:{context:O,is:!0}},mo={[O]:(o,e)=>{const t=b(e.appState,o.props?.id);if(t!==void 0)return t===null&&!L(e.appState)}};function wo(o,e){const t=e==="link"?w(P,{noun:"link"}):e==="colour"?w(k,{}):w(M,{}),a={...V(o,t,[e==="colour"?{label:"Manual",value:""}:{label:"Typed here",value:""}],""),cardRowKind:e};return X(a,Z)}function fo(o){return o.kind==="link"?q(U(o.label)):o.kind==="colour"?$(o.label,"",w(k,{})):o.multiline?Y(o.label):J(o.label)}function oo(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const A=new WeakMap;function Ro(o,e,t){const a=Object.keys(o).filter(n=>oo(o[n]));if(!a.length)return o;const f=e.props??{},r=b(t.appState,f.id),s=typeof r?.type=="string"?r.type:"",l=a.map(n=>typeof f[n]=="string"?f[n].trim():""),C=I(r?.props),c=s===x?b(t.appState,r?.props?.id):null,E=c?G(r?.props,c.type):"",K=c?I(c.props):"",D=c?`${String(c.type??"")}\0${K}`:"",v=s===x&&!c?JSON.stringify(r?.props?.[W]??null):"",R=r?"":L(t.appState),g=[s,C,E,D,v,Q(),R,z(),...l].join("\0");let d=A.get(o);d||A.set(o,d=new Map);const h=d.get(g);if(h)return h;const m={...o};return a.forEach((n,u)=>{const p=o[n],y=s===x?B(t.appState,r,p.cardRowKind):s?N(r,p.cardRowKind):F(R,p.cardRowKind);if(!y.length&&!l[u]&&(!s&&R||p.cardRowKind==="colour")){delete m[n];return}const T=l[u]&&!y.some(i=>i.key===l[u])?l[u]:"",_=p.cardRowKind==="list",j=(i,S)=>_&&S===0&&i.key!==l[u]?"":i.key;m[n]={...p,options:[..._?[]:p.options,...y.map((i,S)=>({label:i.label,value:j(i,S)})),...T?[{label:T,value:T}]:[]]}}),d.set(g,m),m}export{mo as CARD_ROW_FACTS,Z as IN_CARD_TEMPLATE,O as OUTSIDE_CARD_TEMPLATE,wo as cardRowField,Ro as cardRowFields,fo as cardRowItemField};
1
+ import{jsx as d}from"react/jsx-runtime";import{GroundIcon as _,ListIcon as M}from"efficient-easel/icons";import{FieldGlyph as P}from"../../components/FieldGlyph.js";import{CARD_LIST_FIELDS as W,CARD_LIST_TYPE as h,cardListFieldsOf as B,cardListShows as G,cardTemplateFieldsOf as N,cardTemplateOwner as b}from"../../../format/lib/content/card-template.js";import{copyText as $,plainText as J,plainTextarea as U,ThemeFillRow as Y,withOffPage as q}from"./controls.js";import{recordRowFields as k}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as z}from"../../../format/lib/content/record-types.js";import{editorRecordType as H}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as Q,declaredBlockSource as C}from"../../../format/lib/content/block-sources.js";import{select as V}from"./box-fields.js";import{withShowWhen as X}from"../../../format/lib/document/show-when-attach.js";function I(o){const t=o?.data?.root,e=H(t?.props)??"";return e&&k(e,"text").length?e:""}const L="outsideCardTemplate",Z={not:{context:L,is:!0}},wo={[L]:(o,t)=>{const e=b(t.appState,o.props?.id);if(e!==void 0)return e===null&&!I(t.appState)}};function fo(o,t){const e=t==="link"?d(P,{noun:"link"}):t==="colour"?d(_,{}):d(M,{}),a={...V(o,e,[t==="colour"?{label:"Manual",value:""}:{label:"Typed here",value:""}],""),cardRowKind:t};return X(a,Z)}function yo(o){return o.kind==="link"?q(J(o.label)):o.kind==="colour"?oo(o.label):o.multiline?U(o.label):$(o.label)}function oo(o){return{type:"custom",render:({value:t,onChange:e})=>d(Y,{label:o,icon:d(_,{}),value:t,shown:typeof t=="string"?t:"",onChange:e})}}function to(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const O=new WeakMap;function Ro(o,t,e){const a=Object.keys(o).filter(n=>to(o[n]));if(!a.length)return o;const f=t.props??{},r=b(e.appState,f.id),s=typeof r?.type=="string"?r.type:"",l=a.map(n=>typeof f[n]=="string"?f[n].trim():""),A=C(r?.props),c=s===h?b(e.appState,r?.props?.id):null,E=c?G(r?.props,c.type):"",K=c?C(c.props):"",D=c?`${String(c.type??"")}\0${K}`:"",j=s===h&&!c?JSON.stringify(r?.props?.[W]??null):"",y=r?"":I(e.appState),x=[s,A,E,D,j,Q(),y,z(),...l].join("\0");let m=O.get(o);m||O.set(o,m=new Map);const g=m.get(x);if(g)return g;const w={...o};return a.forEach((n,u)=>{const p=o[n],R=s===h?B(e.appState,r,p.cardRowKind):s?N(r,p.cardRowKind):k(y,p.cardRowKind);if(!R.length&&!l[u]&&(!s&&y||p.cardRowKind==="colour")){delete w[n];return}const T=l[u]&&!R.some(i=>i.key===l[u])?l[u]:"",F=p.cardRowKind==="list",v=(i,S)=>F&&S===0&&i.key!==l[u]?"":i.key;w[n]={...p,options:[...F?[]:p.options,...R.map((i,S)=>({label:i.label,value:v(i,S)})),...T?[{label:T,value:T}]:[]]}}),m.set(x,w),w}export{wo as CARD_ROW_FACTS,Z as IN_CARD_TEMPLATE,L as OUTSIDE_CARD_TEMPLATE,fo as cardRowField,Ro as cardRowFields,yo as cardRowItemField};
@@ -1,13 +1,14 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { DividerStyle } from "../../../format/lib/sections/divider-style.js";
3
3
  import type { SectionHeadStyle } from "../../../format/lib/sections/section-head-style.js";
4
+ import type { LogoLook } from "../../../format/lib/sections/logo-look.js";
4
5
  export declare const CHART_PICTURES: Record<"bars" | "line" | "donut", ReactNode>;
5
6
  export declare function dividerPicture(style: DividerStyle): ReactNode;
6
7
  export declare const TAB_SHAPE_PICTURES: Record<"tabs" | "largeTabs", ReactNode>;
7
8
  export declare const POST_CARD_PICTURES: Record<"card" | "cover", ReactNode>;
8
9
  export declare const CARD_STYLE_PICTURES: Record<"cards" | "label-only", ReactNode>;
9
10
  export declare const CARD_LIST_STYLE_PICTURES: Record<"table" | "list", ReactNode>;
10
- export declare const LOGO_LOOK_PICTURES: Record<"plain" | "cards", ReactNode>;
11
+ export declare const LOGO_LOOK_PICTURES: Record<LogoLook, ReactNode>;
11
12
  export declare const INTRO_BLEED_PICTURES: Record<"overlay" | "stacked", ReactNode>;
12
13
  export declare const TIMELINE_PICTURES: Record<"split" | "spine" | "alternating" | "track", ReactNode>;
13
14
  export declare const SECTION_HEAD_PICTURES: Record<SectionHeadStyle, ReactNode>;
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{NoSymbolIcon as u}from"efficient-easel/icons";import{useId as p}from"react";import{STRIPE_GEOMETRY as E}from"../../../format/lib/sections/divider-style.js";const s=44,f=28;function y({children:n}){return t("svg",{width:s,height:f,viewBox:`0 0 ${s} ${f}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:n})}const x=({x:n,y:w,w:c,t:h=2,faint:l=!1})=>t("rect",{x:n,y:w,width:c,height:h,rx:h/2,stroke:"none",opacity:l?.45:1}),r=({x:n,y:w,w:c,h})=>t("rect",{x:n,y:w,width:c,height:h,rx:2,fill:"none"}),o=({x:n,y:w})=>t("circle",{cx:n,cy:w,r:1.75,stroke:"none"}),i=({x1:n,y1:w,x2:c,y2:h})=>t("line",{x1:n,y1:w,x2:c,y2:h}),I={bars:e(y,{children:[t(x,{x:8,y:14,w:5,t:10}),t(x,{x:16,y:8,w:5,t:16}),t(x,{x:24,y:18,w:5,t:6}),t(x,{x:32,y:11,w:5,t:13})]}),line:e(y,{children:[t("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),t(i,{x1:6,y1:25,x2:38,y2:25})]}),donut:e(y,{children:[t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function P(n){if(n==="none")return t("span",{style:{display:"flex",width:s,height:f,alignItems:"center",justifyContent:"center"},children:t(u,{size:20})});if(n==="line")return t(y,{children:t(i,{x1:4,y1:14,x2:40,y2:14})});const{ink:w,period:c}=E[n],h=.4,l=[];for(let a=-12;a<s;a+=c*h)l.push(t("polygon",{points:`${a},22 ${a+w*h},22 ${a+w*h+10},6 ${a+10},6`,stroke:"none"},a));return t(T,{children:l})}function T({children:n}){const w=`sf-div-${p().replace(/[^\w-]/g,"")}`;return e(y,{children:[t("clipPath",{id:w,children:t("rect",{x:4,y:6,width:36,height:16,rx:2})}),t("g",{clipPath:`url(#${w})`,children:n})]})}const d=({x:n,y:w,w:c,h})=>t("rect",{x:n,y:w,width:c,height:h,rx:2,stroke:"none",opacity:.3}),S={tabs:e(y,{children:[t(x,{x:5,y:10,w:9}),t(x,{x:18,y:10,w:9,faint:!0}),t(x,{x:31,y:10,w:9,faint:!0}),t(i,{x1:4,y1:17,x2:40,y2:17}),t(x,{x:4,y:16,w:11,t:2})]}),largeTabs:e(y,{children:[t(i,{x1:4,y1:5,x2:40,y2:5}),t(o,{x:7,y:10}),t(x,{x:11,y:9,w:16}),t(x,{x:31,y:9,w:9,faint:!0}),t(i,{x1:4,y1:14,x2:40,y2:14}),t(o,{x:7,y:19}),t(x,{x:11,y:18,w:13,faint:!0}),t(x,{x:31,y:18,w:9,faint:!0}),t(i,{x1:4,y1:23,x2:40,y2:23})]})},k={card:e(y,{children:[t(r,{x:10,y:3,w:24,h:22}),t(d,{x:12,y:5,w:20,h:10}),t(x,{x:13,y:18,w:16}),t(x,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:e(y,{children:[t(d,{x:10,y:3,w:24,h:22}),t(r,{x:10,y:3,w:24,h:22}),t(x,{x:13,y:17,w:16}),t(x,{x:13,y:21,w:11,t:1.5})]})},g={cards:e(y,{children:[t(r,{x:3,y:5,w:11,h:18}),t(r,{x:17,y:5,w:11,h:18}),t(r,{x:31,y:5,w:11,h:18}),t(x,{x:5,y:9,w:7}),t(x,{x:19,y:9,w:7}),t(x,{x:33,y:9,w:7}),t(x,{x:5,y:13,w:5,t:1.5,faint:!0}),t(x,{x:19,y:13,w:5,t:1.5,faint:!0}),t(x,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":e(y,{children:[t("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),t(x,{x:5,y:18,w:7}),t(x,{x:19,y:18,w:7}),t(x,{x:33,y:18,w:7})]})},L={table:e(y,{children:[t(r,{x:3,y:5,w:38,h:18}),t(i,{x1:15.7,y1:5,x2:15.7,y2:23}),t(i,{x1:28.3,y1:5,x2:28.3,y2:23}),t("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),t(x,{x:6,y:9,w:6,t:3}),t(x,{x:19,y:9,w:6,t:3}),t(x,{x:31,y:9,w:6,t:3}),t(x,{x:6,y:18,w:7,t:1.5,faint:!0}),t(x,{x:19,y:18,w:7,t:1.5,faint:!0}),t(x,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:e(y,{children:[t(i,{x1:3,y1:7,x2:13,y2:7}),t(i,{x1:17,y1:7,x2:27,y2:7}),t(i,{x1:31,y1:7,x2:41,y2:7}),t(x,{x:3,y:11,w:6,t:3}),t(x,{x:17,y:11,w:6,t:3}),t(x,{x:31,y:11,w:6,t:3}),t(x,{x:3,y:17,w:8,t:1.5,faint:!0}),t(x,{x:17,y:17,w:8,t:1.5,faint:!0}),t(x,{x:31,y:17,w:8,t:1.5,faint:!0})]})},U={plain:e(y,{children:[t(x,{x:5,y:12,w:9,t:4}),t(x,{x:18,y:12,w:9,t:4}),t(x,{x:31,y:12,w:9,t:4})]}),cards:e(y,{children:[t(r,{x:3,y:7,w:11,h:14}),t(r,{x:17,y:7,w:11,h:14}),t(r,{x:31,y:7,w:11,h:14}),t(x,{x:5,y:13,w:7}),t(x,{x:19,y:13,w:7}),t(x,{x:33,y:13,w:7})]})},O={overlay:e(y,{children:[t(d,{x:4,y:3,w:36,h:22}),t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:15,w:18,t:3}),t(x,{x:8,y:20,w:12})]}),stacked:e(y,{children:[t(x,{x:4,y:3,w:18,t:3}),t(x,{x:4,y:8,w:12}),t(d,{x:4,y:13,w:36,h:12}),t(r,{x:4,y:13,w:36,h:12})]})},A={split:e(y,{children:[t(x,{x:4,y:6,w:12,t:3}),t(x,{x:4,y:11,w:9,faint:!0}),t(i,{x1:20,y1:4,x2:20,y2:24}),t(x,{x:24,y:6,w:16}),t(x,{x:24,y:10,w:11,faint:!0}),t(x,{x:24,y:17,w:16}),t(x,{x:24,y:21,w:11,faint:!0})]}),spine:e(y,{children:[t(i,{x1:9,y1:4,x2:9,y2:24}),t(o,{x:9,y:8}),t(x,{x:14,y:7,w:24}),t(o,{x:9,y:14}),t(x,{x:14,y:13,w:20}),t(o,{x:9,y:20}),t(x,{x:14,y:19,w:24})]}),alternating:e(y,{children:[t(i,{x1:22,y1:4,x2:22,y2:24}),t(o,{x:22,y:8}),t(x,{x:4,y:7,w:14}),t(o,{x:22,y:14}),t(x,{x:26,y:13,w:14}),t(o,{x:22,y:20}),t(x,{x:4,y:19,w:14})]}),track:e(y,{children:[t(i,{x1:4,y1:12,x2:40,y2:12}),t(o,{x:8,y:12}),t(o,{x:22,y:12}),t(o,{x:36,y:12}),t(x,{x:4,y:17,w:8}),t(x,{x:18,y:17,w:8}),t(x,{x:32,y:17,w:8}),t(x,{x:4,y:21,w:6,faint:!0}),t(x,{x:18,y:21,w:6,faint:!0}),t(x,{x:32,y:21,w:6,faint:!0})]})},M={standard:e(y,{children:[t(x,{x:4,y:5,w:10,t:1.5,faint:!0}),t(x,{x:4,y:10,w:28,t:4}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:24,faint:!0})]}),editorial:e(y,{children:[t(x,{x:4,y:5,w:5,t:1.5,faint:!0}),t(x,{x:4,y:10,w:20,t:5}),t(x,{x:28,y:11,w:12,faint:!0}),t(x,{x:28,y:15,w:9,faint:!0}),t(i,{x1:4,y1:22,x2:40,y2:22})]}),simple:e(y,{children:[t(x,{x:4,y:8,w:10,t:1.5,faint:!0}),t(x,{x:4,y:13,w:26,t:4})]}),statement:e(y,{children:[t(x,{x:4,y:6,w:36,t:7}),t(x,{x:4,y:16,w:24,t:7})]}),natural:e(y,{children:[t(x,{x:4,y:8,w:22,t:3}),t(x,{x:4,y:15,w:34,faint:!0}),t(x,{x:4,y:19,w:28,faint:!0})]}),essay:e(y,{children:[t(x,{x:4,y:5,w:24,t:4}),t(x,{x:4,y:13,w:36,faint:!0}),t(x,{x:4,y:17,w:36,faint:!0}),t(x,{x:4,y:21,w:30,faint:!0})]})},b={"spec-card":e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:14}),t(r,{x:8,y:12,w:8,h:9}),t(r,{x:18,y:12,w:8,h:9}),t(r,{x:28,y:12,w:8,h:9})]}),fitment:e(y,{children:[t(r,{x:4,y:4,w:10,h:5}),t(r,{x:16,y:4,w:10,h:5}),t(r,{x:28,y:4,w:10,h:5}),t(x,{x:4,y:14,w:34,faint:!0}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:34,faint:!0})]}),portal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:10,t:4}),t(x,{x:8,y:14,w:16,faint:!0}),t(x,{x:26,y:18,w:10,t:4})]}),kanban:e(y,{children:[t(r,{x:4,y:3,w:10,h:22}),t(r,{x:17,y:3,w:10,h:22}),t(r,{x:30,y:3,w:10,h:22}),t(x,{x:6,y:6,w:6,t:4}),t(x,{x:6,y:12,w:6,t:4}),t(x,{x:19,y:6,w:6,t:4}),t(x,{x:32,y:6,w:6,t:4}),t(x,{x:32,y:12,w:6,t:4})]}),claims:e(y,{children:[t(x,{x:4,y:5,w:12,faint:!0}),t(x,{x:20,y:4,w:18,t:4}),t(x,{x:4,y:12,w:12,faint:!0}),t(x,{x:20,y:11,w:10,t:4}),t(x,{x:4,y:19,w:12,faint:!0}),t(x,{x:20,y:18,w:14,t:4})]}),browser:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(i,{x1:4,y1:8,x2:40,y2:8}),t(x,{x:8,y:11,w:28,t:5,faint:!0}),t(r,{x:8,y:18,w:8,h:4}),t(r,{x:18,y:18,w:8,h:4}),t(r,{x:28,y:18,w:8,h:4})]}),terminal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t("polyline",{points:"8,9 11,11 8,13",fill:"none"}),t(x,{x:13,y:10,w:14}),t(x,{x:8,y:16,w:22,faint:!0}),t(x,{x:8,y:20,w:16,faint:!0})]})},v={width:"5.75rem",height:"3.75rem"},D={width:"8.5rem",height:"3.75rem"},$={columns:e(y,{children:[t(r,{x:3,y:4,w:11,h:8}),t(r,{x:17,y:4,w:11,h:8}),t(r,{x:31,y:4,w:11,h:8}),t(x,{x:3,y:16,w:9}),t(x,{x:17,y:16,w:9}),t(x,{x:31,y:16,w:9}),t(x,{x:3,y:20,w:7,t:1.5,faint:!0}),t(x,{x:17,y:20,w:7,t:1.5,faint:!0}),t(x,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":e(y,{children:[t(r,{x:6,y:3,w:14,h:9}),t(x,{x:24,y:5,w:14}),t(x,{x:24,y:9,w:10,t:1.5,faint:!0}),t(r,{x:24,y:16,w:14,h:9}),t(x,{x:6,y:18,w:14}),t(x,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":e(y,{children:[t(r,{x:24,y:3,w:14,h:9}),t(x,{x:6,y:5,w:14}),t(x,{x:6,y:9,w:10,t:1.5,faint:!0}),t(r,{x:6,y:16,w:14,h:9}),t(x,{x:24,y:18,w:14}),t(x,{x:24,y:22,w:10,t:1.5,faint:!0})]})};export{L as CARD_LIST_STYLE_PICTURES,g as CARD_STYLE_PICTURES,I as CHART_PICTURES,$ as IMAGE_TEXT_ARRANGEMENT_PICTURES,O as INTRO_BLEED_PICTURES,v as LAYOUT_CELL,U as LOGO_LOOK_PICTURES,D as LONG_WORD_CELL,b as MOCKUP_PICTURES,k as POST_CARD_PICTURES,M as SECTION_HEAD_PICTURES,S as TAB_SHAPE_PICTURES,A as TIMELINE_PICTURES,P as dividerPicture};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{NoSymbolIcon as u}from"efficient-easel/icons";import{useId as p}from"react";import{STRIPE_GEOMETRY as E}from"../../../format/lib/sections/divider-style.js";const s=44,f=28;function y({children:n}){return t("svg",{width:s,height:f,viewBox:`0 0 ${s} ${f}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:n})}const x=({x:n,y:w,w:c,t:h=2,faint:l=!1})=>t("rect",{x:n,y:w,width:c,height:h,rx:h/2,stroke:"none",opacity:l?.45:1}),r=({x:n,y:w,w:c,h})=>t("rect",{x:n,y:w,width:c,height:h,rx:2,fill:"none"}),o=({x:n,y:w})=>t("circle",{cx:n,cy:w,r:1.75,stroke:"none"}),i=({x1:n,y1:w,x2:c,y2:h})=>t("line",{x1:n,y1:w,x2:c,y2:h}),I={bars:e(y,{children:[t(x,{x:8,y:14,w:5,t:10}),t(x,{x:16,y:8,w:5,t:16}),t(x,{x:24,y:18,w:5,t:6}),t(x,{x:32,y:11,w:5,t:13})]}),line:e(y,{children:[t("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),t(i,{x1:6,y1:25,x2:38,y2:25})]}),donut:e(y,{children:[t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function P(n){if(n==="none")return t("span",{style:{display:"flex",width:s,height:f,alignItems:"center",justifyContent:"center"},children:t(u,{size:20})});if(n==="line")return t(y,{children:t(i,{x1:4,y1:14,x2:40,y2:14})});const{ink:w,period:c}=E[n],h=.4,l=[];for(let a=-12;a<s;a+=c*h)l.push(t("polygon",{points:`${a},22 ${a+w*h},22 ${a+w*h+10},6 ${a+10},6`,stroke:"none"},a));return t(T,{children:l})}function T({children:n}){const w=`sf-div-${p().replace(/[^\w-]/g,"")}`;return e(y,{children:[t("clipPath",{id:w,children:t("rect",{x:4,y:6,width:36,height:16,rx:2})}),t("g",{clipPath:`url(#${w})`,children:n})]})}const d=({x:n,y:w,w:c,h})=>t("rect",{x:n,y:w,width:c,height:h,rx:2,stroke:"none",opacity:.3}),S={tabs:e(y,{children:[t(x,{x:5,y:10,w:9}),t(x,{x:18,y:10,w:9,faint:!0}),t(x,{x:31,y:10,w:9,faint:!0}),t(i,{x1:4,y1:17,x2:40,y2:17}),t(x,{x:4,y:16,w:11,t:2})]}),largeTabs:e(y,{children:[t(i,{x1:4,y1:5,x2:40,y2:5}),t(o,{x:7,y:10}),t(x,{x:11,y:9,w:16}),t(x,{x:31,y:9,w:9,faint:!0}),t(i,{x1:4,y1:14,x2:40,y2:14}),t(o,{x:7,y:19}),t(x,{x:11,y:18,w:13,faint:!0}),t(x,{x:31,y:18,w:9,faint:!0}),t(i,{x1:4,y1:23,x2:40,y2:23})]})},k={card:e(y,{children:[t(r,{x:10,y:3,w:24,h:22}),t(d,{x:12,y:5,w:20,h:10}),t(x,{x:13,y:18,w:16}),t(x,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:e(y,{children:[t(d,{x:10,y:3,w:24,h:22}),t(r,{x:10,y:3,w:24,h:22}),t(x,{x:13,y:17,w:16}),t(x,{x:13,y:21,w:11,t:1.5})]})},g={cards:e(y,{children:[t(r,{x:3,y:5,w:11,h:18}),t(r,{x:17,y:5,w:11,h:18}),t(r,{x:31,y:5,w:11,h:18}),t(x,{x:5,y:9,w:7}),t(x,{x:19,y:9,w:7}),t(x,{x:33,y:9,w:7}),t(x,{x:5,y:13,w:5,t:1.5,faint:!0}),t(x,{x:19,y:13,w:5,t:1.5,faint:!0}),t(x,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":e(y,{children:[t("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),t(x,{x:5,y:18,w:7}),t(x,{x:19,y:18,w:7}),t(x,{x:33,y:18,w:7})]})},L={table:e(y,{children:[t(r,{x:3,y:5,w:38,h:18}),t(i,{x1:15.7,y1:5,x2:15.7,y2:23}),t(i,{x1:28.3,y1:5,x2:28.3,y2:23}),t("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),t(x,{x:6,y:9,w:6,t:3}),t(x,{x:19,y:9,w:6,t:3}),t(x,{x:31,y:9,w:6,t:3}),t(x,{x:6,y:18,w:7,t:1.5,faint:!0}),t(x,{x:19,y:18,w:7,t:1.5,faint:!0}),t(x,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:e(y,{children:[t(i,{x1:3,y1:7,x2:13,y2:7}),t(i,{x1:17,y1:7,x2:27,y2:7}),t(i,{x1:31,y1:7,x2:41,y2:7}),t(x,{x:3,y:11,w:6,t:3}),t(x,{x:17,y:11,w:6,t:3}),t(x,{x:31,y:11,w:6,t:3}),t(x,{x:3,y:17,w:8,t:1.5,faint:!0}),t(x,{x:17,y:17,w:8,t:1.5,faint:!0}),t(x,{x:31,y:17,w:8,t:1.5,faint:!0})]})},U={plain:e(y,{children:[t(x,{x:5,y:12,w:9,t:4}),t(x,{x:18,y:12,w:9,t:4}),t(x,{x:31,y:12,w:9,t:4})]}),cards:e(y,{children:[t(r,{x:3,y:7,w:11,h:14}),t(r,{x:17,y:7,w:11,h:14}),t(r,{x:31,y:7,w:11,h:14}),t(x,{x:5,y:13,w:7}),t(x,{x:19,y:13,w:7}),t(x,{x:33,y:13,w:7})]}),marks:e(y,{children:[t(x,{x:8,y:12,w:6,t:4}),t(x,{x:17,y:12,w:6,t:4}),t(x,{x:26,y:12,w:6,t:4}),t(x,{x:35,y:12,w:3,t:4})]})},O={overlay:e(y,{children:[t(d,{x:4,y:3,w:36,h:22}),t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:15,w:18,t:3}),t(x,{x:8,y:20,w:12})]}),stacked:e(y,{children:[t(x,{x:4,y:3,w:18,t:3}),t(x,{x:4,y:8,w:12}),t(d,{x:4,y:13,w:36,h:12}),t(r,{x:4,y:13,w:36,h:12})]})},A={split:e(y,{children:[t(x,{x:4,y:6,w:12,t:3}),t(x,{x:4,y:11,w:9,faint:!0}),t(i,{x1:20,y1:4,x2:20,y2:24}),t(x,{x:24,y:6,w:16}),t(x,{x:24,y:10,w:11,faint:!0}),t(x,{x:24,y:17,w:16}),t(x,{x:24,y:21,w:11,faint:!0})]}),spine:e(y,{children:[t(i,{x1:9,y1:4,x2:9,y2:24}),t(o,{x:9,y:8}),t(x,{x:14,y:7,w:24}),t(o,{x:9,y:14}),t(x,{x:14,y:13,w:20}),t(o,{x:9,y:20}),t(x,{x:14,y:19,w:24})]}),alternating:e(y,{children:[t(i,{x1:22,y1:4,x2:22,y2:24}),t(o,{x:22,y:8}),t(x,{x:4,y:7,w:14}),t(o,{x:22,y:14}),t(x,{x:26,y:13,w:14}),t(o,{x:22,y:20}),t(x,{x:4,y:19,w:14})]}),track:e(y,{children:[t(i,{x1:4,y1:12,x2:40,y2:12}),t(o,{x:8,y:12}),t(o,{x:22,y:12}),t(o,{x:36,y:12}),t(x,{x:4,y:17,w:8}),t(x,{x:18,y:17,w:8}),t(x,{x:32,y:17,w:8}),t(x,{x:4,y:21,w:6,faint:!0}),t(x,{x:18,y:21,w:6,faint:!0}),t(x,{x:32,y:21,w:6,faint:!0})]})},M={standard:e(y,{children:[t(x,{x:4,y:5,w:10,t:1.5,faint:!0}),t(x,{x:4,y:10,w:28,t:4}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:24,faint:!0})]}),editorial:e(y,{children:[t(x,{x:4,y:5,w:5,t:1.5,faint:!0}),t(x,{x:4,y:10,w:20,t:5}),t(x,{x:28,y:11,w:12,faint:!0}),t(x,{x:28,y:15,w:9,faint:!0}),t(i,{x1:4,y1:22,x2:40,y2:22})]}),simple:e(y,{children:[t(x,{x:4,y:8,w:10,t:1.5,faint:!0}),t(x,{x:4,y:13,w:26,t:4})]}),statement:e(y,{children:[t(x,{x:4,y:6,w:36,t:7}),t(x,{x:4,y:16,w:24,t:7})]}),natural:e(y,{children:[t(x,{x:4,y:8,w:22,t:3}),t(x,{x:4,y:15,w:34,faint:!0}),t(x,{x:4,y:19,w:28,faint:!0})]}),essay:e(y,{children:[t(x,{x:4,y:5,w:24,t:4}),t(x,{x:4,y:13,w:36,faint:!0}),t(x,{x:4,y:17,w:36,faint:!0}),t(x,{x:4,y:21,w:30,faint:!0})]})},b={"spec-card":e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:14}),t(r,{x:8,y:12,w:8,h:9}),t(r,{x:18,y:12,w:8,h:9}),t(r,{x:28,y:12,w:8,h:9})]}),fitment:e(y,{children:[t(r,{x:4,y:4,w:10,h:5}),t(r,{x:16,y:4,w:10,h:5}),t(r,{x:28,y:4,w:10,h:5}),t(x,{x:4,y:14,w:34,faint:!0}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:34,faint:!0})]}),portal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:10,t:4}),t(x,{x:8,y:14,w:16,faint:!0}),t(x,{x:26,y:18,w:10,t:4})]}),kanban:e(y,{children:[t(r,{x:4,y:3,w:10,h:22}),t(r,{x:17,y:3,w:10,h:22}),t(r,{x:30,y:3,w:10,h:22}),t(x,{x:6,y:6,w:6,t:4}),t(x,{x:6,y:12,w:6,t:4}),t(x,{x:19,y:6,w:6,t:4}),t(x,{x:32,y:6,w:6,t:4}),t(x,{x:32,y:12,w:6,t:4})]}),claims:e(y,{children:[t(x,{x:4,y:5,w:12,faint:!0}),t(x,{x:20,y:4,w:18,t:4}),t(x,{x:4,y:12,w:12,faint:!0}),t(x,{x:20,y:11,w:10,t:4}),t(x,{x:4,y:19,w:12,faint:!0}),t(x,{x:20,y:18,w:14,t:4})]}),browser:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(i,{x1:4,y1:8,x2:40,y2:8}),t(x,{x:8,y:11,w:28,t:5,faint:!0}),t(r,{x:8,y:18,w:8,h:4}),t(r,{x:18,y:18,w:8,h:4}),t(r,{x:28,y:18,w:8,h:4})]}),terminal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t("polyline",{points:"8,9 11,11 8,13",fill:"none"}),t(x,{x:13,y:10,w:14}),t(x,{x:8,y:16,w:22,faint:!0}),t(x,{x:8,y:20,w:16,faint:!0})]})},v={width:"5.75rem",height:"3.75rem"},D={width:"8.5rem",height:"3.75rem"},$={columns:e(y,{children:[t(r,{x:3,y:4,w:11,h:8}),t(r,{x:17,y:4,w:11,h:8}),t(r,{x:31,y:4,w:11,h:8}),t(x,{x:3,y:16,w:9}),t(x,{x:17,y:16,w:9}),t(x,{x:31,y:16,w:9}),t(x,{x:3,y:20,w:7,t:1.5,faint:!0}),t(x,{x:17,y:20,w:7,t:1.5,faint:!0}),t(x,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":e(y,{children:[t(r,{x:6,y:3,w:14,h:9}),t(x,{x:24,y:5,w:14}),t(x,{x:24,y:9,w:10,t:1.5,faint:!0}),t(r,{x:24,y:16,w:14,h:9}),t(x,{x:6,y:18,w:14}),t(x,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":e(y,{children:[t(r,{x:24,y:3,w:14,h:9}),t(x,{x:6,y:5,w:14}),t(x,{x:6,y:9,w:10,t:1.5,faint:!0}),t(r,{x:6,y:16,w:14,h:9}),t(x,{x:24,y:18,w:14}),t(x,{x:24,y:22,w:10,t:1.5,faint:!0})]})};export{L as CARD_LIST_STYLE_PICTURES,g as CARD_STYLE_PICTURES,I as CHART_PICTURES,$ as IMAGE_TEXT_ARRANGEMENT_PICTURES,O as INTRO_BLEED_PICTURES,v as LAYOUT_CELL,U as LOGO_LOOK_PICTURES,D as LONG_WORD_CELL,b as MOCKUP_PICTURES,k as POST_CARD_PICTURES,M as SECTION_HEAD_PICTURES,S as TAB_SHAPE_PICTURES,A as TIMELINE_PICTURES,P as dividerPicture};
@@ -5,15 +5,15 @@ import { type KnownVideoFrame, type LoadingShows } from "../../../format/lib/her
5
5
  import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
6
6
  import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "efficient-easel/draw";
7
7
  import { type ShowWhenRule } from "../../../render/lib/document/show-when.js";
8
- import { boxFillSlot } from "../../../format/lib/content/box-background.js";
9
8
  import { type SettingsBorderValue } from "efficient-easel/panel";
10
9
  import { type AlignmentPoint, FOCAL_DEFAULT } from "efficient-shell/ui";
10
+ import { type ColourChoice } from "./ColourControl.js";
11
11
  import type { GeocodeState } from "../../../format/lib/content/contact.js";
12
12
  import { type SectionHeightMode, type SectionHeightUnit } from "../../../format/lib/content/section-min-height.js";
13
13
  import { type DirectionContainer } from "../../../format/lib/content/container-direction.js";
14
14
  import { normalizeThemeColors } from "../../../format/lib/theme.js";
15
15
  import { GAP_FIELD_CONTAINER, type GapContainer } from "../../../format/lib/content/container-gap.js";
16
- import { type SectionBackground } from "../../../format/lib/content/section-background.js";
16
+ import { type SectionBackground, type SectionBandColours } from "../../../format/lib/content/section-background.js";
17
17
  import { type TypeRole, type TypeSizeValue } from "../../../format/lib/content/section-type-size.js";
18
18
  import { type WidthMode } from "../../../format/lib/content/section-width.js";
19
19
  import type { Bucket, DesignGroup } from "./field-groups.js";
@@ -141,6 +141,7 @@ export declare function Swatches({ swatches, current, onPick, names, }: {
141
141
  names?: Readonly<Record<string, string>>;
142
142
  }): import("react").JSX.Element;
143
143
  export declare function backgroundField(label: string, builtIn: SectionBackground, followsBand?: boolean): CustomField<SectionBackground>;
144
+ export declare function sectionBandChoices(stored: SectionBackground, builtIn: SectionBackground, colors: ReturnType<typeof normalizeThemeColors>, n: number, band: SectionBandColours, onChange: (next: SectionBackground) => void): ColourChoice[];
144
145
  export declare function cardImageBackgroundField(label: string, builtIn: string): CustomField<unknown>;
145
146
  export declare function sectionThemeFields(readValue?: (v: unknown) => unknown, followLabel?: string): Record<string, CustomField<unknown>>;
146
147
  export declare function Slider({ min, max, step, value, onChange, suffix, readout, notch, ariaLabel, disabled, placeholder, placeholderWord, onClear, }: {
@@ -271,11 +272,16 @@ export declare function toggle(label: string, fallback: boolean, icon?: ReactNod
271
272
  export declare function pageBackgroundField(): CustomField<string>;
272
273
  export declare function checkbox(label: string, fallback: boolean): CustomField<boolean>;
273
274
  export declare function colorInput(label: string, fallback: string, icon?: ReactElement): CustomField<string>;
275
+ export declare function ThemeFillRow({ label, icon, id, value, shown, onChange, }: {
276
+ label: string;
277
+ icon?: ReactElement;
278
+ id?: string;
279
+ value: unknown;
280
+ shown: string;
281
+ onChange: (next: string) => void;
282
+ }): import("react").JSX.Element;
274
283
  export declare function boxFillField(): CustomField<string>;
275
- export declare function slotFill(slot: NonNullable<ReturnType<typeof boxFillSlot>>, colors: ReturnType<typeof normalizeThemeColors>, n: number): {
276
- hex: string;
277
- words: string;
278
- } | null;
284
+ export declare function fillSlotChoices(value: string, colors: ReturnType<typeof normalizeThemeColors>, n: number, onChange: (next: string) => void): ColourChoice[];
279
285
  export declare function boxThemeIndexOf(data: unknown, id: string, own: unknown): number | null;
280
286
  export declare const FOCAL_POINTS: {
281
287
  value: string;