efficient-web-builder 63.0.0 → 65.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  3. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  4. package/dist/editor/lib/animation/fields.js +1 -1
  5. package/dist/editor/lib/animation/loop-fields.js +1 -1
  6. package/dist/editor/lib/animation/scroll-fields.d.ts +3 -0
  7. package/dist/editor/lib/animation/scroll-fields.js +1 -0
  8. package/dist/editor/lib/animation/view-rows.d.ts +20 -0
  9. package/dist/editor/lib/animation/view-rows.js +1 -0
  10. package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  12. package/dist/editor/lib/document/card-display-chips.d.ts +3 -2
  13. package/dist/editor/lib/document/card-display-chips.js +1 -1
  14. package/dist/editor/lib/document/card-row-fields.js +1 -1
  15. package/dist/editor/lib/document/controls.d.ts +8 -2
  16. package/dist/editor/lib/document/controls.js +1 -1
  17. package/dist/editor/lib/document/field-groups.js +1 -1
  18. package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -1
  19. package/dist/editor/lib/document/part-motion-canvas.js +1 -1
  20. package/dist/format/lib/animation/entrance-keys.d.ts +8 -0
  21. package/dist/format/lib/animation/entrance-keys.js +1 -0
  22. package/dist/format/lib/animation/loop.d.ts +1 -0
  23. package/dist/format/lib/animation/loop.js +1 -1
  24. package/dist/format/lib/animation/mark-zoom.d.ts +11 -0
  25. package/dist/format/lib/animation/mark-zoom.js +1 -0
  26. package/dist/format/lib/animation/scroll.d.ts +19 -0
  27. package/dist/format/lib/animation/scroll.js +1 -0
  28. package/dist/format/lib/animation/views.d.ts +6 -0
  29. package/dist/format/lib/animation/views.js +1 -0
  30. package/dist/format/lib/content/block-sources.js +1 -1
  31. package/dist/format/lib/content/box-shape.d.ts +1 -1
  32. package/dist/format/lib/content/card-template.d.ts +8 -5
  33. package/dist/format/lib/content/card-template.js +1 -1
  34. package/dist/format/lib/content/image-aspect.d.ts +6 -0
  35. package/dist/format/lib/content/image-aspect.js +1 -1
  36. package/dist/format/lib/content/section-sticky.d.ts +57 -13
  37. package/dist/format/lib/content/section-sticky.js +1 -1
  38. package/dist/format/lib/content/slot-field-blocks.d.ts +1 -0
  39. package/dist/format/lib/content/slot-field-blocks.js +1 -0
  40. package/dist/format/lib/document/blocks/block-types.d.ts +2 -0
  41. package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
  42. package/dist/format/lib/document/blocks/general/ContactLocations/meta.js +1 -1
  43. package/dist/format/lib/document/blocks/general/FeaturedCover/meta.js +1 -1
  44. package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +1 -0
  45. package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
  46. package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
  47. package/dist/format/lib/document/blocks/general/ImageBlock/meta.js +1 -1
  48. package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +2 -2
  49. package/dist/format/lib/document/blocks/general/LogoBlock/meta.js +1 -1
  50. package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
  51. package/dist/format/lib/document/blocks/general/LongRead/meta.js +1 -1
  52. package/dist/format/lib/document/blocks/general/Manifesto/meta.js +1 -1
  53. package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
  54. package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
  55. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  56. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  57. package/dist/format/lib/document/blocks/general/Split/meta.js +1 -1
  58. package/dist/format/lib/document/blocks/general/Timeline/meta.js +1 -1
  59. package/dist/format/lib/document/passes/types.d.ts +6 -1
  60. package/dist/format/lib/editor-words-catalogue.d.ts +16 -0
  61. package/dist/format/lib/editor-words-catalogue.js +5 -5
  62. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  63. package/dist/format/lib/source-rules/motion-vars-from-the-shell.d.ts +6 -0
  64. package/dist/format/lib/source-rules/motion-vars-from-the-shell.js +4 -0
  65. package/dist/render/components/Banner.js +1 -1
  66. package/dist/render/components/CardRowContext.d.ts +1 -0
  67. package/dist/render/components/CardRowContext.js +1 -1
  68. package/dist/render/components/ContactLocations.js +2 -2
  69. package/dist/render/components/HeroPictures.d.ts +23 -6
  70. package/dist/render/components/HeroPictures.js +1 -1
  71. package/dist/render/components/HeroSection.js +1 -1
  72. package/dist/render/components/HeroSingle.js +1 -1
  73. package/dist/render/components/HeroSlide.js +1 -1
  74. package/dist/render/components/ImageBlock.js +1 -1
  75. package/dist/render/components/InBoxContext.d.ts +2 -1
  76. package/dist/render/components/InBoxContext.js +1 -1
  77. package/dist/render/components/IntroBleed.d.ts +1 -2
  78. package/dist/render/components/IntroBleed.js +1 -1
  79. package/dist/render/components/LogoBlock.js +1 -1
  80. package/dist/render/components/Logos.js +1 -1
  81. package/dist/render/components/PictureZoom.d.ts +24 -0
  82. package/dist/render/components/PictureZoom.js +1 -0
  83. package/dist/render/components/Placeholder.js +1 -1
  84. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  85. package/dist/render/components/ScrollEffect.d.ts +14 -0
  86. package/dist/render/components/ScrollEffect.js +1 -0
  87. package/dist/render/components/ScrollProgressArm.d.ts +5 -0
  88. package/dist/render/components/ScrollProgressArm.js +1 -0
  89. package/dist/render/components/SectionAnimation.d.ts +9 -13
  90. package/dist/render/components/SectionAnimation.js +1 -1
  91. package/dist/render/components/SectionHeader.js +1 -1
  92. package/dist/render/lib/animation/entrance.d.ts +6 -14
  93. package/dist/render/lib/animation/entrance.js +1 -1
  94. package/dist/render/lib/animation/part-motion.d.ts +4 -1
  95. package/dist/render/lib/animation/part-motion.js +2 -2
  96. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  97. package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
  98. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  99. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  100. package/dist/render/lib/document/page-frame.d.ts +2 -1
  101. package/dist/render/lib/document/page-frame.js +1 -1
  102. package/dist/render/lib/document/part-styles.d.ts +10 -0
  103. package/dist/render/lib/document/part-styles.js +2 -2
  104. package/dist/render/lib/document/passes/index.js +1 -1
  105. package/dist/render/lib/document/passes/scroll-effect.d.ts +3 -0
  106. package/dist/render/lib/document/passes/scroll-effect.js +1 -0
  107. package/dist/render/lib/document/passes/section-animation.js +1 -1
  108. package/dist/render/lib/document/passes/section-sticky.js +1 -1
  109. package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
  110. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  111. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## 65.0.0 - 2026-11-09
4
+
5
+ From main at `8a7ac743`: #667, #666, #671, #670. A MAJOR: #667 removes exports and #671 narrows the `efficient-shell` peer (#670 also has `!`; its own change is additive). `efficient-easel` `^30.1.0` does not change. No stored key or value moves.
6
+
7
+ **BREAKING (#671):** the peer `efficient-shell` moves to `^12.22.0` (was `^12.18.0`): the per-view stick form (`pinStickVars`, `PIN_STICK_VAR`, `PIN_TRACK_POSITION_VAR`) is new in 12.22.0.
8
+
9
+ **BREAKING (#667):** removed exports (vs 64.0.0): `usePhoneWidth` (`render/components/SectionAnimation`), `EntranceView` (`render/lib/animation/entrance`), `scrollViewKey` and `ScrollView` (`format/lib/animation/scroll`; use `viewKey` and `MotionView` from `lib/animation/views`). Changed signatures: `SectionAnimation` props `desktop`/`phone` -> `views: EntranceViews`; `entranceReplay.seed(views)` and `.next(seen, views, view)`; `SeenEntrance` gains `tablet`; `entranceDrawn` returns `EntranceViews | null` with `tablet`; `entranceOf(props, MotionView)`; `PublishedPartMotion.entrance` gains `tablet`; `useViewWidth` returns `MotionView`; `paintPartMotion` takes `MotionView | boolean`; `heroPartEntrance` returns `Readonly<Record<MotionView, EntranceValue>> | null` (was `{ desktop; phone }`).
10
+
11
+ **For hosts:**
12
+ - Install efficient-shell 12.22.0 or later with this release (#671).
13
+ - The Entrance has tablet keys: `entranceTablet`, `entranceFromTablet`, `entranceDurationTablet`, `entranceDelayTablet` (#667). 0 stored pages need a move; an empty tablet follows the desktop.
14
+ - storefront-blocks: map `--sf-pin-stick` and `--sf-pin-track-position` in the `[data-motion-pin]` rule (base, tablet, phone; phone falls back to desktop; no default), as `--sf-pin-on` / `--sf-pin-length` are mapped (#671). Until then a page draws as on 64.
15
+ - storefront-blocks: its bump to this release updates `scripts/test-mockup-variant-fields.ts:107` to spread `ENTRANCE_STORE_KEYS` (#667).
16
+ - storefront-blocks: `scripts/section-style-baseline.tsx` reads `Object.keys(stickFields())`, which now also holds `stickAbove`: re-run that baseline in the bump PR (#670).
17
+ - The storefront keeps the #651 hold (the `ThemeLightInkProvider` mount).
18
+
19
+ ### Added
20
+
21
+ - **Pin stops at** (#666): a pinned section or card can stop at the screen top (`stickTopStop: "screen"`) or under the header (unset, default). One key for every view. New `SECTION_PIN_KEYS`, the one list of pin keys a conversion carries.
22
+ - **The Entrance has a tablet value** (#667), on the same view machinery as Scroll: new modules `lib/animation/views` (`MOTION_VIEWS`, `MotionView`, `viewKey`, `viewStoreKeys`, `followViews`, `followedIn`), `lib/animation/view-rows` (`viewTileRows`, `followedViewRows`, `viewRows`) and `lib/animation/entrance-keys` (`ENTRANCE_STORE_KEYS`); `entranceViews`, `EntranceViews`.
23
+ - **A view with Screens 0 draws the stick look in a track** (#671): `SECTION_PIN_VARS` gets `stick` and `trackPosition`. New source rule `format/lib/source-rules/motion-vars-from-the-shell` fails any `--motion-` name typed in web-builder code.
24
+
25
+ - **Stays above** (#670): a pinned Box or section (not a card) can stay painted above the sections after it. New key `stickAbove` (`SECTION_PIN_ABOVE_KEY`; only `true` is stored; one value for every view), in `SECTION_PIN_KEYS`. On, the pin draws the shell's stick form with `pinAttrs(value, "stick", { above: true })` (efficient-shell 12.22.0 holds the mark and its z rule) and the Screens rows hide. 0 stored nodes move.
26
+
27
+ ### Changed
28
+
29
+ - The Entrance and Scroll rows share one builder (#667, #671); `PictureZoom` reads `SCROLL_ZOOM_VAR` from the shell (#671).
30
+
31
+ ## 64.0.0 - 2026-11-09
32
+
33
+ From main at `283356c0`: #598, #661, #663. A MAJOR: #598 has `!` (8 exports removed, one prop removed). Peers do not move: `efficient-easel` `^30.1.0`, `efficient-shell` `^12.18.0` (every shell name these PRs import is in 12.18.0). No stored key or value moves.
34
+
35
+ **BREAKING (#598):** `lib/content/section-sticky` no longer exports `SECTION_STICK_CLASS`, `SCROLL_OVER_CLASS`, `SECTION_STICK_TABLET_ON_CLASS`, `SECTION_STICK_TABLET_OFF_CLASS`, `SECTION_STICK_PHONE_ON_CLASS`, `SECTION_STICK_PHONE_OFF_CLASS`, `SECTION_STICK_VARS` or `sectionStickAttrs` (use `sectionPinAttrs`). `components/IntroBleed` no longer takes `sticky`. Every pin draws through efficient-shell's one pin (`data-motion-pin`); each view's answer is written as `--sf-pin-distance` / `--sf-pin-position` for the host's sheet.
36
+
37
+ **For hosts:**
38
+ - Take efficient-storefront-blocks 0.94.0 (or later) first. Its page sheet maps `--sf-pin-on` / `--sf-pin-length` per view to the shell's track (blocks #449). Without it, every Screens track plays at 2 screens and stays on in every view.
39
+ - The storefront takes this release only together with the web-builder 63 hold: the PR that mounts `ThemeLightInkProvider` (#651).
40
+ - A host that registers card templates: `registerCardTemplates` throws for a block that declares slot fields and has an `everySource` field or a source that names it; `registerBlockSources` throws for a source that names a block with slot fields (#661).
41
+ - Stored `sticky` on a Scroll-Over intro is still read (as `stickTop` on, distance 0) while no `stickTop` is stored (#598). The old blocks class rules (`.sf-section-stick*`, `.sf-scroll-over`) stay until the clean-up after the stored pages move.
42
+
43
+ ### Added
44
+
45
+ - **Scroll effects on the Animation tab** (#663): every block, section, Box and part (text, picture, button) plays one of efficient-shell's `SCROLL_EFFECTS` (Zoom in/out, Fade in/out, Move up/down, Reveal, Parallax) with Zoom, Start and End, per view. Keys `scroll`, `scrollZoom`, `scrollStart`, `scrollEnd` (+ Tablet / Phone), and the same keys in a part's `_partMotion`. One reader: `scrollOf` (`lib/animation/scroll`).
46
+ - **Screens under "Pin while scrolling"** (#663): 0-4 (shell `PIN_LENGTH`) for a top-level section or Box; above 0 the pin draws the shell's track form. Keys `stickTopScreens` + view twins (`SECTION_PIN_SCREENS_KEYS`).
47
+ - **`ScrollProgressArm`** (#663): arms the shell's scroll-progress fallback once per published page.
48
+ - **Fields per named slot** (#661): `CardTemplateSlotSpec.fields?`; new `cardTemplateSlotOf(appState, id)`; `cardTemplateFieldsOf`, `cardTemplateField`, `rowFilledProps`, `defaultListField`, `cardListShows` and `cardChipLabel` take an optional slot. New module `lib/content/slot-field-blocks`.
49
+
50
+ ### Changed
51
+
52
+ - **Stick to top is "Pin while scrolling" on the Animation tab's Scroll kind** (#598), with the tab's dot while some view pins. Category bar and Contents keep their own "Stick to top" in Design.
53
+ - **The Scroll-Over intro's pin is the same pin** (#598): IntroBleed leaves `SECTION_STICK_EXCLUDED`.
54
+ - `usePhoneWidth`, `stickFields`, `followedStickPatch` and `paintPartMotion` take wider or optional arguments only (#663).
55
+
3
56
  ## 63.0.0 - 2026-11-09
4
57
 
5
58
  From main at `beb99f54`: #656, #658, #659, #660. A MAJOR: #656 and #659 have `!`. No export is removed. No stored key or value moves.
@@ -1 +1 @@
1
- "use client";import{jsx as Y}from"react/jsx-runtime";import{readInks as $}from"../../format/lib/document/part-inks.js";import{useEffect as j,useRef as x}from"react";import{markOverlayPortal as G}from"../../format/lib/document/overlay-portal.js";import{usePreviewParts as q}from"efficient-easel/draw/client";import{usePartStyle as U}from"./PreviewPartStyleContext.js";import{usePreviewDevice as V}from"efficient-easel/draw/client";import{shownTier as Q}from"efficient-easel/screen/lib/document/device-fields";import{decodePartId as I,encodePartId as X}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as Z}from"efficient-easel/canvas";import{engagePartAnchors as tt}from"../lib/document/part-anchors.js";import{PART_ATTR as P,PART_STYLE_KIND_ATTR as b,PART_STYLE_OWNER_ATTR as et,partStyleOwnerOf as g}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as D,applyPartStyles as C,blockDrawsTextStyle as F,partFontKeyOf as rt,partShownDeclarations as ot,partStyleBase as nt,partStyleSource as st,storedPartStyle as it}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as lt,styleRoleOfClassName as at}from"../../format/lib/fonts.js";import{typeScaleGroupOfClassName as k}from"../../format/lib/theme.js";import{styleKeyForPart as A}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as ct,PART_HOST_ATTR as pt}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as ft}from"../lib/document/part-motion-canvas.js";function ut(p){let s=null,o=null;for(let e=p;e&&(s===null||o===null);e=e.parentElement){const r=e.getAttribute("class");s??=at(r),o??=k(r)}return{faceRole:s??"body",sizeGroup:o}}function z(p,s={}){const o=p.style,e={};for(const n of D)e[n]=o[n]??"",o[n]="";s.fontFamily&&(o.fontFamily=s.fontFamily),s.fontSize&&(o.fontSize=s.fontSize);const r=getComputedStyle(p),S=getComputedStyle(p.ownerDocument.documentElement),a=nt({fontSize:r.fontSize,fontWeight:r.fontWeight,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,textAlign:r.textAlign,textTransform:r.textTransform,paddingTop:r.paddingTop},rt(r.fontFamily,n=>S.getPropertyValue(n)));for(const n of D)o[n]=e[n];return a}function mt({needles:p,styles:s,motions:o=ct,type:e,children:r}){const S=x(null),{selectedPartId:a}=q(),{setPartStyle:n}=U(),y=Q(V()),h=JSON.stringify(p),R=JSON.stringify(s),w=JSON.stringify(o),J=x(new Map);return j(()=>{const d=S.current;if(!d)return;const E=[],_=()=>d.parentElement,M=c=>{const i=_();if(!i)return null;const u=new MutationObserver(c);return u.observe(i,{attributes:!0,attributeFilter:[Z]}),()=>u.disconnect()},L=c=>{const i=new MutationObserver(c);return i.observe(d,{childList:!0,subtree:!0,characterData:!0}),()=>i.disconnect()};let f=[];E.push(()=>{for(const c of f)c();f=[]});const W=JSON.parse(h),T=JSON.parse(R),B=JSON.parse(w),H=tt(d,W,_,M,(c,i,u)=>{for(const t of f)t();f=[];const v=[];for(const t of u){const l=t,m=G(l);m&&f.push(m),l.getAttribute(P)===a&&v.push(l)}const K=st(i,a,v,t=>lt(t)!==null||k(t)!==null);if(K&&a){const t=K,l=I(a)?.propKey??"",m=g(t)?{}:ot(it(T,A(e,l)),y,{blockDrawsStyle:F(e,l)});n({partId:a,...ut(t),base:z(t,m),inks:$(t),...(()=>{const N=g(t);return N?{styleOwner:N}:{}})()})}C(u.filter(t=>!g(t)).map(t=>({element:t,partId:t.getAttribute(P)??""})),T,t=>z(t),t=>A(e,t),void 0,y,t=>F(e,t));const O=[...d.querySelectorAll(`[${et}="${CSS.escape(i)}"][${b}]`)];O.length&&C(O.map(t=>({element:t,partId:X(i,t.getAttribute(b)??"")})),T,void 0,t=>t,void 0,y),f.push(ft([...u.filter(t=>!g(t)).map(t=>{const l=t,m=I(l.getAttribute(P)??"")?.propKey??"";return{element:l,partKey:A(e,m)}}),...O.map(t=>({element:t,partKey:t.getAttribute(b)??""}))],t=>B[t],y==="mobile",J.current))},L);return()=>{H();for(const c of E)c()}},[h,R,w,a,n,y,e]),Y("div",{ref:S,[pt]:"",style:{display:"contents"},children:r})}export{mt as default,z as measureStyleBase,ut as styleTagsOf};
1
+ "use client";import{jsx as Y}from"react/jsx-runtime";import{readInks as $}from"../../format/lib/document/part-inks.js";import{useEffect as j,useRef as x}from"react";import{markOverlayPortal as G}from"../../format/lib/document/overlay-portal.js";import{usePreviewParts as q}from"efficient-easel/draw/client";import{usePartStyle as U}from"./PreviewPartStyleContext.js";import{usePreviewDevice as V}from"efficient-easel/draw/client";import{shownTier as Q}from"efficient-easel/screen/lib/document/device-fields";import{decodePartId as I,encodePartId as X}from"efficient-easel/draw";import{BLOCK_ATTRIBUTE as Z}from"efficient-easel/canvas";import{engagePartAnchors as tt}from"../lib/document/part-anchors.js";import{PART_ATTR as P,PART_STYLE_KIND_ATTR as b,PART_STYLE_OWNER_ATTR as et,partStyleOwnerOf as g}from"../../render/lib/document/text-parts.js";import{PART_STYLE_PROPERTIES as D,applyPartStyles as C,blockDrawsTextStyle as F,partFontKeyOf as rt,partShownDeclarations as ot,partStyleBase as nt,partStyleSource as st,storedPartStyle as it}from"../../render/lib/document/part-styles.js";import{fontRoleOfClassName as lt,styleRoleOfClassName as at}from"../../format/lib/fonts.js";import{typeScaleGroupOfClassName as k}from"../../format/lib/theme.js";import{styleKeyForPart as h}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as pt,PART_HOST_ATTR as ct}from"../../render/lib/animation/part-motion.js";import{paintPartMotion as ft}from"../lib/document/part-motion-canvas.js";function ut(c){let s=null,o=null;for(let e=c;e&&(s===null||o===null);e=e.parentElement){const r=e.getAttribute("class");s??=at(r),o??=k(r)}return{faceRole:s??"body",sizeGroup:o}}function z(c,s={}){const o=c.style,e={};for(const n of D)e[n]=o[n]??"",o[n]="";s.fontFamily&&(o.fontFamily=s.fontFamily),s.fontSize&&(o.fontSize=s.fontSize);const r=getComputedStyle(c),S=getComputedStyle(c.ownerDocument.documentElement),a=nt({fontSize:r.fontSize,fontWeight:r.fontWeight,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,textAlign:r.textAlign,textTransform:r.textTransform,paddingTop:r.paddingTop},rt(r.fontFamily,n=>S.getPropertyValue(n)));for(const n of D)o[n]=e[n];return a}function mt({needles:c,styles:s,motions:o=pt,type:e,children:r}){const S=x(null),{selectedPartId:a}=q(),{setPartStyle:n}=U(),f=Q(V()),A=JSON.stringify(c),R=JSON.stringify(s),w=JSON.stringify(o),J=x(new Map);return j(()=>{const d=S.current;if(!d)return;const E=[],_=()=>d.parentElement,M=p=>{const i=_();if(!i)return null;const m=new MutationObserver(p);return m.observe(i,{attributes:!0,attributeFilter:[Z]}),()=>m.disconnect()},L=p=>{const i=new MutationObserver(p);return i.observe(d,{childList:!0,subtree:!0,characterData:!0}),()=>i.disconnect()};let u=[];E.push(()=>{for(const p of u)p();u=[]});const W=JSON.parse(A),T=JSON.parse(R),B=JSON.parse(w),H=tt(d,W,_,M,(p,i,m)=>{for(const t of u)t();u=[];const v=[];for(const t of m){const l=t,y=G(l);y&&u.push(y),l.getAttribute(P)===a&&v.push(l)}const K=st(i,a,v,t=>lt(t)!==null||k(t)!==null);if(K&&a){const t=K,l=I(a)?.propKey??"",y=g(t)?{}:ot(it(T,h(e,l)),f,{blockDrawsStyle:F(e,l)});n({partId:a,...ut(t),base:z(t,y),inks:$(t),...(()=>{const N=g(t);return N?{styleOwner:N}:{}})()})}C(m.filter(t=>!g(t)).map(t=>({element:t,partId:t.getAttribute(P)??""})),T,t=>z(t),t=>h(e,t),void 0,f,t=>F(e,t));const O=[...d.querySelectorAll(`[${et}="${CSS.escape(i)}"][${b}]`)];O.length&&C(O.map(t=>({element:t,partId:X(i,t.getAttribute(b)??"")})),T,void 0,t=>t,void 0,f),u.push(ft([...m.filter(t=>!g(t)).map(t=>{const l=t,y=I(l.getAttribute(P)??"")?.propKey??"";return{element:l,partKey:h(e,y)}}),...O.map(t=>({element:t,partKey:t.getAttribute(b)??""}))],t=>B[t],f==="mobile"?"phone":f,J.current))},L);return()=>{H();for(const p of E)p()}},[A,R,w,a,n,f,e]),Y("div",{ref:S,[ct]:"",style:{display:"contents"},children:r})}export{mt as default,z as measureStyleBase,ut as styleTagsOf};
@@ -1 +1 @@
1
- import{jsx as n,Fragment as g,jsxs as S}from"react/jsx-runtime";import{useRef as I}from"react";import{phoneKey as i}from"efficient-easel/draw";import{SettingsDefaultReset as C}from"efficient-easel/panel";import{ClockIcon as v,DirectionDownIcon as w,DirectionIcon as L,DirectionLeftIcon as M,DirectionRightIcon as x,DirectionUpIcon as G,DurationIcon as P,EntranceBounceIcon as B,EntranceFadeIcon as U,EntranceFlipIcon as W,EntranceGlideIcon as Y,EntranceRevealIcon as j,EntranceRiseIcon as H,EntranceScaleIcon as $,EntranceSpinIcon as q,NoSymbolIcon as z}from"efficient-easel/icons";import{effectTiles as V}from"efficient-easel/screen/lib/document/effect-tiles";import{deviceField as c}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as J,noControlField as Q}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{customize as X,describedAs as R,group as Z,onDesktopWords as ee,phoneTwinFields as ne}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as oe,ENTRANCE_FROM_DEFAULT as N,ENTRANCE_KINDS as p,ENTRANCE_KINDS_WITH_FROM as y,MOTION_TIMING as te,entranceAttrs as ie,playEntrance as re,readEntrance as ce}from"efficient-shell/format";import{segmented as ae}from"../document/box-fields.js";import{phoneOverrideField as _,useSelectedProps as k}from"../document/controls.js";import{withRowRules as le}from"../../../format/lib/document/show-when-attach.js";import{editorEaselWords as se,say as s}from"../../../format/lib/editor-words.js";import{animationDelayField as de,animationDurationField as pe}from"./AnimationDurationRow.js";import{ENTRANCE_KEYS as t,LEGACY_ENTRANCE_KEY as D,entranceOf as F}from"../../../render/lib/animation/entrance.js";import{ENTRANCE_GROUP_KEY as me}from"../../../format/lib/animation/index.js";const u={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},fe={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},ue={top:()=>n(w,{}),bottom:()=>n(G,{}),left:()=>n(x,{}),right:()=>n(M,{})},E="Entrance",m=p.filter(e=>e!=="none"),f=e=>({any:[{field:t.kind,in:e},{all:[{field:t.kind,set:!1},{field:D,in:e}]}]}),T=e=>({any:[{field:i(t.kind),in:e},{all:[{field:i(t.kind),set:!1},f(e)]}]}),Ee={any:[f(m),{field:i(t.kind),in:m}]},Ie=[[[t.from],f(y)],[[i(t.from)],T(y)],[[t.duration,t.delay],f(m)],[[i(t.duration),i(t.delay)],T(m)]],Re={none:()=>n(z,{}),fade:()=>n(U,{}),rise:()=>n(H,{}),scale:()=>n($,{}),glide:()=>n(Y,{}),bounce:()=>n(B,{}),flip:()=>n(W,{}),reveal:()=>n(j,{}),spin:()=>n(q,{})},b="data-entrance-tile";function Ne({kind:e}){const{attrs:o}=ie(ce(e,N));return n("span",{className:"sf-entrance-stage",[b]:e,children:n("i",{...o,children:Re[e]()})})}const ye=e=>o=>{const r=e.current?.querySelector(`[${b}="${o}"] > i`);r&&re(r)},h=e=>V({label:s(E),options:p.map(o=>({value:o,label:s(u[o]),picture:n(Ne,{kind:o})})),fallback:"none",onPreview:e?ye(e):void 0});function O({row:e,children:o}){return n("div",{ref:e,style:{display:"contents"},children:o})}function _e({value:e,onChange:o}){const r=k(),a=F({...r,[t.kind]:e},"desktop").kind,l=I(null);return n(O,{row:l,children:h(l).render({value:a,onChange:d=>o(d??"none")})})}function ke({value:e,onChange:o}){const r=k(),a=typeof e=="string"&&p.includes(e),l=F(r,"desktop").kind,d=I(null);return S(g,{children:[n(O,{row:d,children:h(d).render({value:a?e:l,onChange:o})}),a&&n(C,{words:se()?.panel,label:s(De),changed:a,detail:ee(A=>s(A),s(u[l])),onReset:()=>o(void 0)})]})}const De="Effect",K={type:"select",label:E,options:p.map(e=>({value:e,label:u[e]}))},Fe=()=>R({type:"custom",render:({value:e,onChange:o})=>n(_e,{value:e,onChange:o})},K),Te=()=>R({type:"custom",render:({value:e,onChange:o})=>n(ke,{value:e,onChange:o})},K),be=oe.map(e=>({label:fe[e],value:e,picture:ue[e]()}));function Ye(){const{duration:e,delay:o}=te.entrance,r={[me]:Z(E,{dot:Ee}),[t.kind]:c("desktop",Fe()),[D]:Q({type:"custom",render:()=>n(J,{})},"always"),[i(t.kind)]:c("mobile",Te()),_cEntrance:X(),...ne(t.from,ae("From",n(L,{}),be,N)),[t.duration]:c("desktop",pe("entrance")),[i(t.duration)]:c("mobile",_({label:"Duration",desktopKey:t.duration,icon:n(P,{}),min:e.min,max:e.max,step:e.step,fallback:e.default,unit:"s"})),[t.delay]:c("desktop",de("entrance")),[i(t.delay)]:c("mobile",_({label:"Delay",desktopKey:t.delay,icon:n(v,{}),min:o.min,max:o.max,step:o.step,fallback:o.default,unit:"s"}))};return le(r,Ie)}export{Ye as entranceFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{DirectionDownIcon as u,DirectionIcon as _,DirectionLeftIcon as O,DirectionRightIcon as A,DirectionUpIcon as F,EntranceBounceIcon as T,EntranceFadeIcon as D,EntranceFlipIcon as S,EntranceGlideIcon as y,EntranceRevealIcon as K,EntranceRiseIcon as L,EntranceScaleIcon as w,EntranceSpinIcon as C,NoSymbolIcon as M}from"efficient-easel/icons";import{NoControlMark as g,noControlField as b}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{customize as h,group as k}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as G,ENTRANCE_FROM_DEFAULT as s,ENTRANCE_KINDS as d,ENTRANCE_KINDS_WITH_FROM as v,entranceAttrs as B,playEntrance as U,readEntrance as P}from"efficient-shell/format";import{segmented as W}from"../document/box-fields.js";import{shownByUsedValue as Y,withRowRules as x}from"../../../format/lib/document/show-when-attach.js";import{animationDelayField as H,animationDurationField as V}from"./AnimationDurationRow.js";import{ENTRANCE_KEYS as r,LEGACY_ENTRANCE_KEY as f,entranceOf as m}from"../../../render/lib/animation/entrance.js";import{ENTRANCE_GROUP_KEY as j}from"../../../format/lib/animation/index.js";import{followedViewRows as $,viewTileRows as q}from"./view-rows.js";import{MOTION_VIEWS as c,viewKey as i}from"../../../format/lib/animation/views.js";const z={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},J={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},Q={top:()=>e(u,{}),bottom:()=>e(F,{}),left:()=>e(A,{}),right:()=>e(O,{})},p="Entrance",a=d.filter(n=>n!=="none"),E=n=>({any:[{field:r.kind,in:n},{all:[{field:r.kind,set:!1},{field:f,in:n}]}]}),R=(n,t)=>Y(c.slice(0,c.indexOf(n)+1).reverse().map(o=>i(r.kind,o)),o=>({field:o,set:!0}),o=>o===r.kind?E(t):{field:o,in:t}),X={any:[E(a),...c.slice(1).map(n=>({field:i(r.kind,n),in:a}))]},Z=c.flatMap(n=>[[[i(r.from,n)],R(n,v)],[[i(r.duration,n),i(r.delay,n)],R(n,a)]]),nn={none:()=>e(M,{}),fade:()=>e(D,{}),rise:()=>e(L,{}),scale:()=>e(w,{}),glide:()=>e(y,{}),bounce:()=>e(T,{}),flip:()=>e(S,{}),reveal:()=>e(K,{}),spin:()=>e(C,{})},N="data-entrance-tile";function en({kind:n}){const{attrs:t}=B(P(n,s));return e("span",{className:"sf-entrance-stage",[N]:n,children:e("i",{...t,children:nn[n]()})})}const on=(n,t)=>{const o=n.querySelector(`[${N}="${t}"] > i`);o&&U(o)},tn="Effect",rn=()=>q(r.kind,{label:p,tileWord:tn,values:d,fallback:"none",word:n=>z[n],picture:n=>e(en,{kind:n}),read:(n,t)=>m(n,t).kind,preview:on}),l=(n,t)=>$(r[n],t,(o,I)=>m(o,I)[n]),cn=G.map(n=>({label:J[n],value:n,picture:Q[n]()}));function _n(){const n={[j]:k(p,{dot:X}),...rn(),[f]:b({type:"custom",render:()=>e(g,{})},"always"),_cEntrance:h(),...l("from",W("From",e(_,{}),cn,s)),...l("duration",V("entrance")),...l("delay",H("entrance"))};return x(n,Z)}export{_n as entranceFields};
@@ -1 +1 @@
1
- import{loopDelayField as c,loopDurationField as l}from"./AnimationDurationRow.js";import{entranceFields as r}from"./entrance-fields.js";import{HOVER_GROUP_KEY as p,HOVER_KEY as a,cardHoverResting as m,pictureHoverResting as u}from"../../../format/lib/animation/hover.js";import{boxHoverFields as d,cardHoverFields as f,hoverFields as F,pictureHoverFields as _}from"./hover-fields.js";import{ON_A_CARD as H}from"../document/card-display-chips.js";import{customize as R}from"efficient-easel/screen/lib/document/box-fields";import{loopDirectionField as D,loopFields as v,loopHeading as O}from"./loop-fields.js";import{withRowsShownWhen as t}from"../../../format/lib/document/show-when-attach.js";import{BOX_IS_CARD_RULE as i}from"../../../format/lib/content/box-card-rule.js";function h(){const e=d(),o=[p,a],n=t(e,Object.keys(e).filter(s=>!o.includes(s)),i);return t(n,o,{any:[i,H]})}function S(e,o=""){switch(e){case"section":case"block":return r();case"box":return{...r(),...v(),...h()};case"picture":return{...r(),..._(u(o),o)};case"textPart":return{...r(),...F()};case"cards":return{...r(),...f(m(o))};case"marquee":return{...r(),_gLoop:O(),_cLoop:R(),scrollDirection:D(),loopDuration:l({readsSpeed:!0}),loopDelay:c()}}}export{S as animationTabFields};
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 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{DirectionIcon as s,LoopMarqueeIcon as c,NoSymbolIcon as a}from"efficient-easel/icons";import{customize as m,describedAs as O,group as f}from"efficient-easel/screen/lib/document/box-fields";import{effectTiles as L}from"efficient-easel/screen/lib/document/effect-tiles";import{EDGE_ARROWS as u,edgePad as d}from"../document/controls.js";import{withShowWhen as n}from"../../../format/lib/document/show-when-attach.js";import{loopDelayField as _,loopDurationField as D}from"./AnimationDurationRow.js";import{say as p}from"../../../format/lib/editor-words.js";import{DEFAULT_LOOP_DIRECTION as I,LOOP_DIRECTION_OPTIONS as P,LOOP_NONE as S,LOOP_OPTIONS as l,LOOP_SCROLLS as r}from"../../../format/lib/animation/loop.js";function T(){return d("Direction",P,I,"A marquee cannot run diagonally, so the corners are not answers.",t(s,{}),u)}const E=o=>f("Loop",o?{dot:o}:void 0),N={none:()=>t(a,{}),scroll:()=>t(c,{})};function b(){const o=L({label:p("Loop"),options:l.map(({value:e,label:i})=>({value:e,label:p(i),picture:N[e]()})),fallback:S});return O(o,{type:"select",label:"Loop",options:l.map(({value:e,label:i})=>({value:e,label:i}))})}function j(){return{_gLoop:E(r),loop:b(),_cLoop:m(),scrollDirection:n(T(),r),loopDuration:n(D({readsSpeed:!1}),r),loopDelay:n(_(),r)}}export{T as loopDirectionField,j as loopFields,E as loopHeading};
1
+ import{jsx as t}from"react/jsx-runtime";import{DirectionIcon as s,LoopMarqueeIcon as c,NoSymbolIcon as O}from"efficient-easel/icons";import{customize as a,describedAs as m,group as f}from"efficient-easel/screen/lib/document/box-fields";import{effectTiles as L}from"efficient-easel/screen/lib/document/effect-tiles";import{EDGE_ARROWS as u,edgePad as _}from"../document/controls.js";import{withShowWhen as n}from"../../../format/lib/document/show-when-attach.js";import{loopDelayField as d,loopDurationField as D}from"./AnimationDurationRow.js";import{say as l}from"../../../format/lib/editor-words.js";import{DEFAULT_LOOP_DIRECTION as P,LOOP_DIRECTION_OPTIONS as I,LOOP_GROUP_KEY as E,LOOP_NONE as S,LOOP_OPTIONS as p,LOOP_SCROLLS as r}from"../../../format/lib/animation/loop.js";function T(){return _("Direction",I,P,"A marquee cannot run diagonally, so the corners are not answers.",t(s,{}),u)}const N=o=>f("Loop",o?{dot:o}:void 0),b={none:()=>t(O,{}),scroll:()=>t(c,{})};function y(){const o=L({label:l("Loop"),options:p.map(({value:e,label:i})=>({value:e,label:l(i),picture:b[e]()})),fallback:S});return m(o,{type:"select",label:"Loop",options:p.map(({value:e,label:i})=>({value:e,label:i}))})}function j(){return{[E]:N(r),loop:y(),_cLoop:a(),scrollDirection:n(T(),r),loopDuration:n(D({readsSpeed:!1}),r),loopDelay:n(d(),r)}}export{T as loopDirectionField,j as loopFields,N as loopHeading};
@@ -0,0 +1,3 @@
1
+ import type { ShowWhenRule } from "../../../render/lib/document/show-when.js";
2
+ export declare const SCROLL_CHOSEN: ShowWhenRule;
3
+ export declare function scrollFields(): Record<string, unknown>;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{EntranceRevealIcon as R,NoSymbolIcon as u,PercentIcon as f,ScrollFadeInIcon as I,ScrollFadeOutIcon as _,ScrollMoveDownIcon as C,ScrollMoveUpIcon as F,ScrollParallaxIcon as w,ScrollZoomInIcon as v,ScrollZoomOutIcon as T,ZoomInIcon as x}from"efficient-easel/icons";import{customize as M,group as Z}from"efficient-easel/screen/lib/document/box-fields";import{SCROLL_EFFECTS as s,SCROLL_EFFECTS_WITH_ZOOM as z,SCROLL_END as N,SCROLL_START as P,SCROLL_ZOOM as U}from"efficient-shell/format";import{slider as y}from"../document/box-fields.js";import{shownByUsedValue as G,withRowRules as K}from"../../../format/lib/document/show-when-attach.js";import{SCROLL_CUSTOMIZE_KEY as V,SCROLL_GROUP_KEY as W,SCROLL_KEYS as t,scrollOf as i}from"../../../format/lib/animation/scroll.js";import{followedViewRows as Y,viewTileRows as b}from"./view-rows.js";import{MOTION_VIEWS as m,viewKey as r}from"../../../format/lib/animation/views.js";const d="Scroll",A={none:"None","zoom-in":"Zoom in","zoom-out":"Zoom out","fade-in":"Fade in","fade-out":"Fade out","move-up":"Move up","move-down":"Move down",reveal:"Reveal",parallax:"Parallax"},B={none:()=>e(u,{}),"zoom-in":()=>e(v,{}),"zoom-out":()=>e(T,{}),"fade-in":()=>e(I,{}),"fade-out":()=>e(_,{}),"move-up":()=>e(F,{}),"move-down":()=>e(C,{}),reveal:()=>e(R,{}),parallax:()=>e(w,{})},H="Effect",S=s.filter(o=>o!=="none"),O=(o,l)=>G(m.slice(0,m.indexOf(o)+1).reverse().map(n=>r(t.effect,n)),n=>({field:n,set:!0}),n=>({field:n,in:l})),h={any:m.map(o=>({field:r(t.effect,o),in:S}))},j=m.flatMap(o=>[[[r(t.zoom,o)],O(o,z)],[[r(t.start,o),r(t.end,o)],O(o,S)]]),D=()=>b(t.effect,{label:d,tileWord:H,values:s,fallback:"none",word:o=>A[o],picture:o=>B[o](),read:(o,l)=>i(o,l).effect}),a=(o,l,n,p,c)=>Y(o,y(n,p,c.min,c.max,c.step,c.default,"%"),(L,E)=>i(L,E)[l]);function to(){const o={[W]:Z(d,{dot:h}),...D(),[V]:M(),...a(t.zoom,"zoom","Zoom",e(x,{}),U),...a(t.start,"start","Start",e(f,{}),P),...a(t.end,"end","End",e(f,{}),N)};return K(o,j)}export{h as SCROLL_CHOSEN,to as scrollFields};
@@ -0,0 +1,20 @@
1
+ import { type ReactElement } from "react";
2
+ import { type MotionView } from "../../../format/lib/animation/views.js";
3
+ export type ReadView<V = unknown> = (record: Readonly<Record<string, unknown>>, view: MotionView) => V;
4
+ type Row = {
5
+ render?: unknown;
6
+ };
7
+ export declare function viewRows<F>(key: string, rowFor: (view: MotionView) => F): Record<string, F>;
8
+ export declare function followedViewRows<F extends Row>(key: string, row: F, read: ReadView): Record<string, F>;
9
+ export type TileSpec<V extends string> = {
10
+ label: string;
11
+ tileWord: string;
12
+ values: readonly V[];
13
+ fallback: V;
14
+ word: (value: V) => string;
15
+ picture: (value: V) => ReactElement;
16
+ read: ReadView<V>;
17
+ preview?: (row: HTMLElement, value: V) => void;
18
+ };
19
+ export declare function viewTileRows<V extends string>(key: string, spec: TileSpec<V>): Record<string, unknown>;
20
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as a,Fragment as h,jsxs as v}from"react/jsx-runtime";import{useRef as x}from"react";import{SettingsDefaultReset as g}from"efficient-easel/panel";import{effectTiles as R}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as u,describedAs as k,onDesktopWords as E,phoneTwinFields as c}from"efficient-easel/screen/lib/document/box-fields";import{useSelectedProps as m}from"../document/controls.js";import{editorEaselWords as V,say as i}from"../../../format/lib/editor-words.js";import{MOTION_VIEWS as _,viewKey as j}from"../../../format/lib/animation/views.js";function y({row:e,read:o,...n}){const t=o(m(),n.followsView??"desktop");return e({...n,follows:t})}function C(e,o){return Object.fromEntries(_.map(n=>{const t=j(e,n);return[t,c(e,o(n),u)[t]]}))}function P(e,o,n){const t=o.render,s={...o,render:l=>a(y,{...l,row:t,read:n})};return C(e,l=>l==="desktop"?o:s)}function S({spec:e,...o}){const n=e.values.includes(o.value),t="follows"in o,s=e.read(m(),o.followsView??"desktop"),l=n?o.value:s,d=x(null),{preview:w}=e,b=R({label:i(e.label),options:e.values.map(r=>({value:r,label:i(e.word(r)),picture:e.picture(r)})),fallback:e.fallback,onPreview:w?r=>d.current&&w(d.current,r):void 0}).render,f=b({value:l,onChange:r=>o.onChange(r??e.fallback)});return v(h,{children:[w?a("div",{ref:d,style:{display:"contents"},children:f}):f,t&&n&&a(g,{words:V()?.panel,label:i(e.tileWord),changed:!0,detail:E(r=>i(r),i(e.word(s)),o.followsView),onReset:()=>o.onChange(void 0)})]})}function M(e,o){const n=k({type:"custom",render:t=>a(S,{...t,spec:o})},{type:"select",label:o.label,options:o.values.map(t=>({value:t,label:o.word(t)}))});return c(e,n,u)}export{P as followedViewRows,C as viewRows,M as viewTileRows};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{ChevronIcon as l}from"efficient-easel/icons";import{copyText as m,linkField as p,plainTextarea as u,text as s,textarea as c,toggle as f}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as T,headFieldsForPlacement as d}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as h}from"../../../../../../format/lib/document/show-when-attach.js";import{ENTRANCE_KEYS as A,LEGACY_ENTRANCE_KEY as E}from"../../../../../../render/lib/animation/entrance.js";import{drawsCopiesInTheBox as F}from"../../../../../../format/lib/content/copies-in-box.js";import{phoneKey as _}from"efficient-easel/draw";import{FAQ_PH as n,FAQSlots as w}from"../../../../../../format/lib/document/blocks/general/FAQ/meta.js";const i="faqOnTemplate",x={not:{context:i,is:!0}},N={[i]:t=>F("FAQ",t.props??{})},Q=new Set([E,...Object.values(A).flatMap(t=>[t,_(t)])]);function g(t){return Object.keys(t).filter(e=>["num","title","linkText","linkHref","anchor"].includes(e)||e.startsWith("sectionPadding")||e.startsWith("sectionHeight")||Q.has(e))}const b={fields:{_gContent:o("Content"),num:s("Number",n.num),title:c("Heading",n.title),linkText:s("Button",n.link),linkHref:p("Link"),_gQuestions:o("Questions"),items:{type:"array",label:"Questions",arrayFields:{question:m("Question"),answer:u("Answer")},getItemSummary:t=>t.question||"Question"},_gLayout:o("Layout"),defaultOpen:f("Open first answer",!0,a(l,{})),...w},resolveFields:(t,{fields:e})=>{const r=d(e,t.props.headPlacement,T.FAQ.headRows);return h(r,g(r),x)},showWhenFacts:N};export{b as FAQFields};
1
+ import{jsx as a}from"react/jsx-runtime";import{ChevronIcon as l}from"efficient-easel/icons";import{copyText as m,linkField as p,plainTextarea as u,text as r,textarea as c,toggle as T}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{SPLITTABLE_SECTIONS as f,headFieldsForPlacement as d}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowsShownWhen as h}from"../../../../../../format/lib/document/show-when-attach.js";import{ENTRANCE_STORE_KEYS as E,LEGACY_ENTRANCE_KEY as A}from"../../../../../../render/lib/animation/entrance.js";import{drawsCopiesInTheBox as _}from"../../../../../../format/lib/content/copies-in-box.js";import{FAQ_PH as n,FAQSlots as F}from"../../../../../../format/lib/document/blocks/general/FAQ/meta.js";const i="faqOnTemplate",w={not:{context:i,is:!0}},x={[i]:t=>_("FAQ",t.props??{})},N=new Set([A,...E]);function Q(t){return Object.keys(t).filter(e=>["num","title","linkText","linkHref","anchor"].includes(e)||e.startsWith("sectionPadding")||e.startsWith("sectionHeight")||N.has(e))}const H={fields:{_gContent:o("Content"),num:r("Number",n.num),title:c("Heading",n.title),linkText:r("Button",n.link),linkHref:p("Link"),_gQuestions:o("Questions"),items:{type:"array",label:"Questions",arrayFields:{question:m("Question"),answer:u("Answer")},getItemSummary:t=>t.question||"Question"},_gLayout:o("Layout"),defaultOpen:T("Open first answer",!0,a(l,{})),...F},resolveFields:(t,{fields:e})=>{const s=d(e,t.props.headPlacement,f.FAQ.headRows);return h(s,Q(s),w)},showWhenFacts:x};export{H as FAQFields};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{CaseIcon as b,OpacityIcon as u,PlacementIcon as _,StickyIcon as y,TextLinesIcon as n}from"efficient-easel/icons";import{colorInput as p,sizeField as r,text as k,textarea as s,toggle as d,upload as c}from"../../../controls.js";import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as T,slider as l}from"../../../box-fields.js";import{INTRO_BLEED_PICTURES as x,LONG_WORD_CELL as f}from"../../../choice-pictures.js";import{deviceField as e,deviceNote as S}from"efficient-easel/screen/lib/document/device-fields";import{DEFAULT_INTRO_BLEED_LAYOUT as h,INTRO_BLEED_COPY_SHARE as o,INTRO_BLEED_LAYOUT_OPTIONS as I}from"../../../../../../format/lib/sections/intro-bleed-layout.js";import{heightField as g,ctaField as O}from"../../shared-fields.js";import{INTRO_PH as m}from"../../../../../../format/lib/document/blocks/general/IntroBleed/meta.js";const M={fields:{_dDevice:S(),_gContent:i("Content"),eyebrow:k("Eyebrow",m.eyebrow),title:s("Heading",m.title),body:s("Subtitle",m.body),uppercase:d("Uppercase heading",!1,t(b,{})),_gBackground:i("Background images"),imageSrc:e("desktop",c("Background image","image/*")),imageSrcMobile:e("mobile",c("Background image","image/*")),_gLayout:i("Layout"),layout:T("Text position",t(_,{}),I.map(a=>({...a,picture:x[a.value]})),h,{columns:2,cell:f}),heightDesktop:g("desktop"),heightMobile:g("mobile"),copyShareDesktop:e("desktop",l("Text height",t(n,{}),o.min,o.max,o.step,o.desktop,"%")),copyShareMobile:e("mobile",l("Text height",t(n,{}),o.min,o.max,o.step,o.mobile,"%")),sticky:d("Stick to top",!0,t(y,{})),overlay:l("Overlay",t(u,{}),0,100,5,60,"%"),_gTextDesktop:e("desktop",i("Text style")),titleSizeDesktop:e("desktop",r("Heading font size",32,120,1,96,"heading")),bodySizeDesktop:e("desktop",r("Subtitle font size",12,28,1,17,"body")),_gTextMobile:e("mobile",i("Text style")),titleSizeMobile:e("mobile",r("Heading font size",24,72,1,44,"heading")),bodySizeMobile:e("mobile",r("Subtitle font size",12,22,1,16,"body")),_gButton:i("Button"),...O,buttonColor:p("Button color","#C9A461"),buttonTextColor:p("Button text color","#000000")}};export{M as IntroBleedFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{keptByRow as g}from"efficient-easel/screen/lib/document/style-fields";import{CaseIcon as b,OpacityIcon as u,PlacementIcon as _,TextLinesIcon as a}from"efficient-easel/icons";import{colorInput as n,sizeField as r,text as y,textarea as s,toggle as k,upload as d}from"../../../controls.js";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as T,slider as l}from"../../../box-fields.js";import{INTRO_BLEED_PICTURES as f,LONG_WORD_CELL as x}from"../../../choice-pictures.js";import{deviceField as e,deviceNote as h}from"efficient-easel/screen/lib/document/device-fields";import{DEFAULT_INTRO_BLEED_LAYOUT as B,INTRO_BLEED_COPY_SHARE as o,INTRO_BLEED_LAYOUT_OPTIONS as O}from"../../../../../../format/lib/sections/intro-bleed-layout.js";import{heightField as c,ctaField as S}from"../../shared-fields.js";import{INTRO_PH as m}from"../../../../../../format/lib/document/blocks/general/IntroBleed/meta.js";const P={fields:{_dDevice:h(),_gContent:t("Content"),eyebrow:y("Eyebrow",m.eyebrow),title:s("Heading",m.title),body:s("Subtitle",m.body),uppercase:k("Uppercase heading",!1,i(b,{})),_gBackground:t("Background images"),imageSrc:e("desktop",d("Background image","image/*")),imageSrcMobile:e("mobile",d("Background image","image/*")),_gLayout:t("Layout"),layout:T("Text position",i(_,{}),O.map(p=>({...p,picture:f[p.value]})),B,{columns:2,cell:x}),heightDesktop:c("desktop"),heightMobile:c("mobile"),copyShareDesktop:e("desktop",l("Text height",i(a,{}),o.min,o.max,o.step,o.desktop,"%")),copyShareMobile:e("mobile",l("Text height",i(a,{}),o.min,o.max,o.step,o.mobile,"%")),sticky:g("stickTop"),overlay:l("Overlay",i(u,{}),0,100,5,60,"%"),_gTextDesktop:e("desktop",t("Text style")),titleSizeDesktop:e("desktop",r("Heading font size",32,120,1,96,"heading")),bodySizeDesktop:e("desktop",r("Subtitle font size",12,28,1,17,"body")),_gTextMobile:e("mobile",t("Text style")),titleSizeMobile:e("mobile",r("Heading font size",24,72,1,44,"heading")),bodySizeMobile:e("mobile",r("Subtitle font size",12,22,1,16,"body")),_gButton:t("Button"),...S,buttonColor:n("Button color","#C9A461"),buttonTextColor:n("Button text color","#000000")}};export{P as IntroBleedFields};
@@ -23,11 +23,12 @@ type ChipOwner = {
23
23
  type?: unknown;
24
24
  props?: Record<string, unknown>;
25
25
  } | null | undefined;
26
- export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner, fields?: readonly CardRowFieldSpec[]): string;
27
- export declare function CardDisplayChips({ card, ownerType, owner, fields, labelOf, write, readOnly, view, }: {
26
+ export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner, fields?: readonly CardRowFieldSpec[], slot?: string): string;
27
+ export declare function CardDisplayChips({ card, ownerType, owner, fields, slot, labelOf, write, readOnly, view, }: {
28
28
  card: Card;
29
29
  ownerType: string | undefined;
30
30
  owner?: ChipOwner;
31
+ slot?: string;
31
32
  fields?: readonly CardRowFieldSpec[];
32
33
  labelOf: (type: string) => string;
33
34
  write: (next: (latest: Card) => Card) => void;
@@ -1 +1 @@
1
- "use client";import{jsx as m}from"react/jsx-runtime";import{isNodeList as S}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{hiddenInView as D,hiddenKeyOf as h,hidePatch as _,slotChildName as A,slotChildRowName as T}from"efficient-easel/draw";import{cardListFieldsOf as F,cardTemplateCardOwner as w,namedRowField as P,rowFieldSpec as j}from"../../../format/lib/content/card-template.js";import{DisplayRow as g,useSelectedPatch as E}from"./controls.js";import{websiteNodeIsLocked as L}from"./locked-blocks.js";import{stripMarkup as M}from"../../../format/lib/markup.js";import{sourceRowName as I}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as $}from"../../../format/lib/document/show-when-attach.js";import{deviceField as B}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as H}from"efficient-easel/screen/lib/document/panel-no-control-mark";const x="notCardOfTemplate",K={not:{context:x,is:!0}},ue={[x]:(e,n)=>{const t=w(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function l(e){const n=e.props?.content;return S(n)?n:[]}const y=(e,n)=>D(e.props??{},n),V=(e,n)=>e.props?.[h(n)]!==void 0;function R(e,n=()=>!1,t="desktop"){return l(e).flatMap(o=>typeof o?.props?.id!="string"?[]:l(o).length&&!y(o,t)?R(o,n,t):n(o)?[]:[o])}function W(e,n,t,o="desktop"){const r=R(e,t,o).map(s=>({child:s,name:n(s)})),a=new Set(r.map(s=>s.name)),p=new Set;return r.map(({child:s,name:u})=>{let f=u;if(p.has(u)){let d=2;for(;a.has(`${u} ${d}`);)d+=1;f=`${u} ${d}`,a.add(f)}return p.add(u),{id:s.props.id,label:f,shown:!y(s,o)}})}function C(e,n,t){const o=r=>t==="desktop"?y(r,t):V(r,t);return l(e).flatMap(r=>o(r)?n(r)?[]:[r,...C(r,n,t)]:C(r,n,t))}function X(e,n){const t={...e};for(const[r,a]of Object.entries(n))a===void 0||r===h("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 k(e,n,t){const o=l(e);let r=!1;const a=o.map(p=>{if(r)return p;let s=p;if(p?.props?.id===n){const u=X(p.props,t(p.props));u!==p.props&&(s={...p,props:u})}else s=k(p,n,t);return r=s!==p,s});return r?{...e,props:{...e.props,content:a}}:e}function b(e,n,t,o="desktop"){return k(e,n,r=>o==="desktop"&&y({props:r},o)===!t?{}:_(r,o,!t))}function Y(e,n,t){return t==="desktop"?b(e,n,!0,t):k(e,n,()=>({[h(t)]:void 0}))}function q(e,n,t,o,r){return A(e).trim()?t(e):j({ownerType:n,owner:o,fields:r},P(e.props))?.label??t(e)}const z="This page is read-only.";function G({card:e,ownerType:n,owner:t,fields:o,labelOf:r,write:a,readOnly:p,view:s="desktop"}){const u=i=>T(i,r,M,void 0,I),f=i=>L(i.type,i),d=W(e,i=>q(i,n,u,t,o),f,s);return d.length?m(g,{parts:d,changed:C(e,f,s).length>0,shown:i=>d.find(c=>c.id===i)?.shown??!0,disabledReason:p?z:void 0,onPress:(i,c)=>a(O=>b(O,i,c,s)),onReset:()=>a(i=>C(i,f,s).reduce((c,O)=>Y(c,String(O.props.id),s),i))}):m(H,{})}function J(){try{const e=N(r=>r),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const o=w(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)}}catch{return null}}function Q({readOnly:e,view:n}){const t=J(),o=E();return t?m(G,{...t,view:n,readOnly:e,write:r=>{e||o(a=>{const p={...t.card,props:a},s=r(p);return s===p?null:{content:s.props.content}})}}):m(g,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function fe(e){return $(B(e,{type:"custom",render:({readOnly:n})=>m(Q,{readOnly:n,view:e})}),K)}export{ue as CARD_BOX_FACTS,G as CardDisplayChips,x as NOT_CARD_OF_TEMPLATE,K as ON_A_CARD,q as cardChipLabel,fe as cardDisplayField,W as cardDisplayItems,R as cardDisplayParts,b as withChildShown};
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 +1 @@
1
- import{jsx as m}from"react/jsx-runtime";import{GroundIcon as x,ListIcon as M}from"efficient-easel/icons";import{FieldGlyph as B}from"../../components/FieldGlyph.js";import{BOX_IN_COPY as N,BOX_OUTSIDE_COPY as W}from"../../../format/lib/content/box-card-rule.js";import{CARD_LIST_FIELDS as Y,CARD_LIST_TYPE as h,cardCopyPlace as O,cardListFieldsOf as G,cardListShows as U,cardTemplateFieldsOf as X,cardTemplateOwner as C}from"../../../format/lib/content/card-template.js";import{copyText as $,plainText as J,plainTextarea as q,ThemeFillRow as z,withOffPage as H}from"./controls.js";import{recordRowFields as F}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as Q}from"../../../format/lib/content/record-types.js";import{editorRecordType as V}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as Z,declaredBlockSource as I}from"../../../format/lib/content/block-sources.js";import{select as tt}from"./box-fields.js";import{withShowWhen as ot}from"../../../format/lib/document/show-when-attach.js";function k(t){const o=t?.data?.root,e=V(o?.props)??"";return e&&F(e,"text").length?e:""}const E="outsideCardTemplate",et={not:{context:E,is:!0}},Rt={[E]:(t,o)=>{const e=C(o.appState,t.props?.id);if(e!==void 0)return e===null&&!k(o.appState)},[W]:(t,o)=>{const e=O(o.appState,t.props?.id);return e===void 0?void 0:!e.inCopy},[N]:(t,o)=>O(o.appState,t.props?.id)?.inCopy};function Tt(t,o,e){const l=o==="colour"||e?.content===!0,d=o==="link"?m(B,{noun:"link"}):o==="colour"?m(x,{}):m(M,{}),n={...tt(t,d,[l?{label:"Manual",value:""}:{label:"Typed here",value:""}],""),cardRowKind:o,...l?{cardRowContent:!0}:null};return ot(n,et)}function St(t){return t.kind==="link"?H(J(t.label)):t.kind==="colour"?nt(t.label):t.multiline?q(t.label):$(t.label)}function nt(t){return{type:"custom",render:({value:o,onChange:e})=>m(z,{label:t,icon:m(x,{}),value:o,shown:typeof o=="string"?o:"",onChange:e})}}function rt(t){return!!(t&&typeof t=="object"&&"cardRowKind"in t)}const L=new WeakMap;function ht(t,o,e){const l=Object.keys(t).filter(r=>rt(t[r]));if(!l.length)return t;const d=o.props??{},n=C(e.appState,d.id),p=typeof n?.type=="string"?n.type:"",a=l.map(r=>typeof d[r]=="string"?d[r].trim():""),A=I(n?.props),c=p===h?C(e.appState,n?.props?.id):null,D=c?U(n?.props,c.type):"",K=c?I(c.props):"",P=c?`${String(c.type??"")}\0${K}`:"",j=p===h&&!c?JSON.stringify(n?.props?.[Y]??null):"",R=n?"":k(e.appState),_=[p,A,D,P,j,Z(),R,Q(),...a].join("\0");let f=L.get(t);f||L.set(t,f=new Map);const b=f.get(_);if(b)return b;const w={...t};return l.forEach((r,u)=>{const i=t[r],y=p===h?G(e.appState,n,i.cardRowKind):p?X(n,i.cardRowKind):F(R,i.cardRowKind);if(!a[u]&&(i.cardRowContent?!p||!y.length:!y.length&&!p&&R)){delete w[r];return}const T=a[u]&&!y.some(s=>s.key===a[u])?a[u]:"",g=i.cardRowKind==="list",v=(s,S)=>g&&S===0&&s.key!==a[u]?"":s.key;w[r]={...i,options:[...g?[]:i.options,...y.map((s,S)=>({label:s.label,value:v(s,S)})),...T?[{label:T,value:T}]:[]]}}),f.set(_,w),w}export{Rt as CARD_ROW_FACTS,et as IN_CARD_TEMPLATE,E as OUTSIDE_CARD_TEMPLATE,Tt as cardRowField,ht as cardRowFields,St as cardRowItemField};
1
+ import{jsx as f}from"react/jsx-runtime";import{GroundIcon as F,ListIcon as W}from"efficient-easel/icons";import{FieldGlyph as Y}from"../../components/FieldGlyph.js";import{BOX_IN_COPY as $,BOX_OUTSIDE_COPY as G}from"../../../format/lib/content/box-card-rule.js";import{CARD_LIST_FIELDS as U,CARD_LIST_TYPE as h,cardCopyPlace as I,cardListFieldsOf as X,cardListShows as J,cardTemplateFieldsOf as q,cardTemplateOwner as C,cardTemplateSlotOf as k}from"../../../format/lib/content/card-template.js";import{copyText as z,plainText as H,plainTextarea as Q,ThemeFillRow as V,withOffPage as Z}from"./controls.js";import{recordRowFields as E}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as tt}from"../../../format/lib/content/record-types.js";import{editorRecordType as ot}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as et,declaredBlockSource as L}from"../../../format/lib/content/block-sources.js";import{select as nt}from"./box-fields.js";import{withShowWhen as rt}from"../../../format/lib/document/show-when-attach.js";function A(t){const e=t?.data?.root,o=ot(e?.props)??"";return o&&E(o,"text").length?o:""}const D="outsideCardTemplate",pt={not:{context:D,is:!0}},ht={[D]:(t,e)=>{const o=C(e.appState,t.props?.id);if(o!==void 0)return o===null&&!A(e.appState)},[G]:(t,e)=>{const o=I(e.appState,t.props?.id);return o===void 0?void 0:!o.inCopy},[$]:(t,e)=>I(e.appState,t.props?.id)?.inCopy};function Ct(t,e,o){const l=e==="colour"||o?.content===!0,a=e==="link"?f(Y,{noun:"link"}):e==="colour"?f(F,{}):f(W,{}),n={...nt(t,a,[l?{label:"Manual",value:""}:{label:"Typed here",value:""}],""),cardRowKind:e,...l?{cardRowContent:!0}:null};return rt(n,pt)}function Ot(t){return t.kind==="link"?Z(H(t.label)):t.kind==="colour"?ct(t.label):t.multiline?Q(t.label):z(t.label)}function ct(t){return{type:"custom",render:({value:e,onChange:o})=>f(V,{label:t,icon:f(F,{}),value:e,shown:typeof e=="string"?e:"",onChange:o})}}function it(t){return!!(t&&typeof t=="object"&&"cardRowKind"in t)}const K=new WeakMap;function _t(t,e,o){const l=Object.keys(t).filter(p=>it(t[p]));if(!l.length)return t;const a=e.props??{},n=C(o.appState,a.id),c=typeof n?.type=="string"?n.type:"",O=n?k(o.appState,a.id)??"":"",d=l.map(p=>typeof a[p]=="string"?a[p].trim():""),P=L(n?.props),r=c===h?C(o.appState,n?.props?.id):null,_=r?k(o.appState,n?.props?.id)??void 0:void 0,j=r?J(n?.props,r.type,_):"",v=r?L(r.props):"",M=r?`${String(r.type??"")}\0${v}\0${_??""}`:"",B=c===h&&!r?JSON.stringify(n?.props?.[U]??null):"",S=n?"":A(o.appState),b=[c,O,P,j,M,B,et(),S,tt(),...d].join("\0");let m=K.get(t);m||K.set(t,m=new Map);const g=m.get(b);if(g)return g;const w={...t};return l.forEach((p,u)=>{const i=t[p],y=c===h?X(o.appState,n,i.cardRowKind):c?q(n,i.cardRowKind,O||void 0):E(S,i.cardRowKind);if(!d[u]&&(i.cardRowContent?!c||!y.length:!y.length&&!c&&S)){delete w[p];return}const R=d[u]&&!y.some(s=>s.key===d[u])?d[u]:"",x=i.cardRowKind==="list",N=(s,T)=>x&&T===0&&s.key!==d[u]?"":s.key;w[p]={...i,options:[...x?[]:i.options,...y.map((s,T)=>({label:s.label,value:N(s,T)})),...R?[{label:R,value:R}]:[]]}}),m.set(b,w),w}export{ht as CARD_ROW_FACTS,pt as IN_CARD_TEMPLATE,D as OUTSIDE_CARD_TEMPLATE,Ct as cardRowField,_t as cardRowFields,Ot as cardRowItemField};
@@ -9,6 +9,7 @@ import { type SettingsBorderValue } from "efficient-easel/panel";
9
9
  import { type AlignmentPoint, FOCAL_DEFAULT } from "efficient-shell/ui";
10
10
  import { type ColourChoice } from "./ColourControl.js";
11
11
  import type { GeocodeState } from "../../../format/lib/content/contact.js";
12
+ import { SECTION_PIN_SCREENS_KEY } from "../../../format/lib/content/section-sticky.js";
12
13
  import { type SectionHeightMode, type SectionHeightUnit } from "../../../format/lib/content/section-min-height.js";
13
14
  import { type DirectionContainer } from "../../../format/lib/content/container-direction.js";
14
15
  import { normalizeThemeColors } from "../../../format/lib/theme.js";
@@ -263,8 +264,13 @@ export declare function heightFollowedBy(view: PanelView, props: Record<string,
263
264
  unit: SectionHeightUnit;
264
265
  } | null;
265
266
  export declare function followedHeightPatch(view: PanelView, props: Record<string, unknown>, base: "sectionHeightValue" | "sectionHeightUnit", next: unknown): Record<string, unknown> | null;
266
- export declare function stickFields(): Record<string, CustomField<undefined> | CustomField<boolean> | CustomField<number>>;
267
- export declare function followedStickPatch(view: PanelView, props: Record<string, unknown>, next: unknown): Record<string, unknown> | null;
267
+ export declare function stickFields(opts?: {
268
+ intro?: boolean;
269
+ screens?: boolean;
270
+ above?: boolean;
271
+ }): Record<string, CustomField<undefined> | CustomField<boolean> | CustomField<number>>;
272
+ type StickNumberKey = "stickTopDistance" | typeof SECTION_PIN_SCREENS_KEY;
273
+ export declare function followedStickPatch(view: PanelView, props: Record<string, unknown>, next: unknown, base?: StickNumberKey, intro?: boolean): Record<string, unknown> | null;
268
274
  export declare function anchorFields(): Record<string, CustomField<undefined> | CustomField<HidableValue>>;
269
275
  export declare function dateTime(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
270
276
  export declare function date(label: string, icon?: ReactNode, hint?: string): CustomField<string>;