efficient-web-builder 46.0.0 → 47.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 (64) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +6 -0
  3. package/dist/editor/components/PagesPanel.js +1 -1
  4. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  5. package/dist/editor/lib/document/ColourControl.d.ts +4 -7
  6. package/dist/editor/lib/document/ColourControl.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/Grid/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  13. package/dist/editor/lib/document/box-fields.d.ts +2 -1
  14. package/dist/editor/lib/document/box-fields.js +1 -1
  15. package/dist/editor/lib/document/consent-words-field.d.ts +1 -2
  16. package/dist/editor/lib/document/consent-words-field.js +1 -1
  17. package/dist/editor/lib/document/controls.d.ts +7 -60
  18. package/dist/editor/lib/document/controls.js +1 -1
  19. package/dist/editor/lib/document/passes/inspector.js +1 -1
  20. package/dist/format/lib/content/section-corners.d.ts +2 -4
  21. package/dist/format/lib/content/section-corners.js +1 -1
  22. package/dist/format/lib/document/box-footer.js +1 -1
  23. package/dist/format/lib/document/easel-row-words.d.ts +6 -0
  24. package/dist/format/lib/document/easel-row-words.js +1 -0
  25. package/dist/format/lib/document/passes/types.d.ts +2 -1
  26. package/dist/format/lib/editor-words-catalogue.d.ts +0 -5
  27. package/dist/format/lib/editor-words-catalogue.js +2 -2
  28. package/dist/format/lib/source-rules/one-alignment-row.js +2 -2
  29. package/dist/format/lib/theme.d.ts +1 -0
  30. package/dist/format/lib/theme.js +4 -4
  31. package/dist/render/components/ButtonBlock.d.ts +2 -0
  32. package/dist/render/components/ButtonBlock.js +1 -1
  33. package/dist/render/components/Flex.js +1 -1
  34. package/dist/render/components/Grid.d.ts +2 -1
  35. package/dist/render/components/Grid.js +1 -1
  36. package/dist/render/components/HeroGroup.d.ts +2 -1
  37. package/dist/render/components/HeroGroup.js +1 -1
  38. package/dist/render/components/InBoxContext.d.ts +23 -1
  39. package/dist/render/components/InBoxContext.js +1 -1
  40. package/dist/render/components/SectionAnimation.js +1 -1
  41. package/dist/render/lib/content/block-size.d.ts +19 -0
  42. package/dist/render/lib/content/block-size.js +1 -0
  43. package/dist/render/lib/content/button-look.d.ts +6 -6
  44. package/dist/render/lib/content/button-look.js +1 -1
  45. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  46. package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
  47. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  48. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  49. package/dist/render/lib/document/passes/block-size.js +1 -1
  50. package/dist/render/lib/document/passes/index.js +1 -1
  51. package/dist/render/lib/document/passes/section-height.js +1 -1
  52. package/dist/render/lib/document/passes/section-sticky.js +1 -1
  53. package/dist/render/lib/document/passes/section-theme.js +1 -1
  54. package/dist/render/lib/document/passes/slots-start-afresh.d.ts +2 -0
  55. package/dist/render/lib/document/passes/slots-start-afresh.js +1 -0
  56. package/dist/render/lib/media.d.ts +0 -1
  57. package/dist/render/lib/media.js +1 -1
  58. package/package.json +3 -3
  59. package/dist/editor/components/DuplicatePageDialog.d.ts +0 -10
  60. package/dist/editor/components/DuplicatePageDialog.js +0 -1
  61. package/dist/editor/lib/page-copy.d.ts +0 -6
  62. package/dist/editor/lib/page-copy.js +0 -1
  63. package/dist/format/lib/content/block-size.d.ts +0 -59
  64. package/dist/format/lib/content/block-size.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # Changelog
2
2
 
3
+ ## 47.0.0 - 2026-10-31
4
+
5
+ **MAJOR for hosts.** Published names and one path go (harness CI-3); no stored value moves (0 data moves: every row keeps the key it stored). Peers: `efficient-easel` `^26.7.0` (was `^26.1.0`; `^26.7.0` from #417: the Button set, the block Size set, and a phone strip that rests on the host's own rule, from 26.2; the Duplicate page dialog, `efficient-easel/page-copy`, with its IME Enter fix, from 26.4; the handle it sends and shows finished, "summer" not "summer-", from 26.5; the one button-look and corner reader, from 26.7), `efficient-shell` `^11.8.0` (unchanged).
6
+
7
+ ### Changed (one settings set per block kind, from easel; plan [PLAN] Fill Editor Gaps Both Ways, step W-B; after panels approved by Lewis 2026-10-31)
8
+
9
+ - **The Button's style rows are easel's `buttonFieldSet`**, the rows the email designer's Button draws too: Size (Padding), Design (Fill color with its opacity, Border, Text color, Corners), Layout (Block alignment and its phone value). The website hands it what each empty row follows (the site's Button colours, the line an old Filled or Outline button draws, the site's button radius, Btn's built-in padding read from `BUTTON_PAD_CLASSES`) and keeps its own content rows (the Button box, Text, Icon, the card rows). Same stored keys.
10
+ - **New on the Button: Corners** (`buttonCorners`, px; `buttonCornerSides`, which corners are round). The canvas draws them: an inline radius that beats the site's `--sf-button-radius`, only when one is stored (`buttonCornersStyle`, `render/lib/content/button-look`); corner sides with no radius round the chosen corners at the site's radius. An untouched button draws the bytes it drew. `alignPhone` was already drawn.
11
+ - **The Size group of a block in a Box is easel's `blockSizeFieldSet`** (`PassInspector.blockSizeFields` hands it the website's words). Same labels, keys and order; the phone rows are easel's phone twins.
12
+ - **Every phone strip is easel's `phoneTwinFields(key, segmented(...))`**: Box shape (`boxShapePhone`, rests on `boxShapeOf(desktop)`), the Hero's media Layout (`mediaLayoutPhone`, rests on `resolvePhoneLayout(undefined, desktop)`: Side by side stacks), Entrance From (`entranceFromPhone`, rests on the desktop side) and the Size and Text strips. An empty phone row lights what the phone uses; Reset clears it and stores nothing.
13
+ - **BREAKING: removed from `editor/lib/document/controls`:** `phoneChoiceField`, `PhoneChoiceStrip`, `PhoneChoiceRow` (use easel `phoneTwinFields(key, segmented(...))`, `screen/lib/document/box-fields`); `blockSizeFields` (easel `blockSizeFieldSet`, `screen/lib/document/block-size-fields`); `buttonBorderField`, `FOLLOWS_SITE_BUTTON`, `FOLLOWS_SITE_BUTTON_INK`, the types `FollowsSiteButton` and `ColourOpacity` (easel `buttonFieldSet`). `colorInput(label, fallback, icon?)` takes a hex fallback only. Host search (origin/main, 2026-10-31): efficient-storefront-blocks `scripts/test-segmented-controls.tsx` imports `PhoneChoiceRow` and `PhoneChoiceStrip` and must move with this release; efficient-storefront uses none.
14
+ - **BREAKING: `lib/content/block-size` moves from `format/` to `render/`** and keeps only what the values draw (`BLOCK_SIZE_CLASS`, `TEXT_FIT_ATTR`, `blockSizeOf` and its types). Removed from it: `BLOCK_WIDTH_FIT_POINTS`, `BLOCK_WIDTH_FIT_DEFAULT`, `parseBlockWidthFit`, `BLOCK_FIXED_WIDTH`, `BLOCK_WIDTH_LIMIT`, `TEXT_FIT_POINTS`, `parseTextFit`, `TEXT_FIT_MIN_FONT`, `BLOCK_SIZE_KEYS` and the types `BlockWidthFit`, `TextFit`, `BlockSizeKey`: import them from `efficient-easel/draw`. No host imports the old path.
15
+ - New: `siteButtonRadiusPx` (`lib/theme`), `buttonCornersStyle` (`render/lib/content/button-look`), `rowSay` (`editor/lib/document/box-fields`, the website's words as easel's rows take them).
16
+ - The Button's Fill color and Text color windows offer the site's Theme colours first (`usePresets: useThemePresets`, now exported from `editor/lib/document/ColourControl`), as every colour row on the website does.
17
+ - The editor-words catalogue keeps the words easel's rows say through `rowSay` that no website file says itself (`Fill color`, `When the text does not fit`, `Wrap`, `Shrink to fit`): they are listed in `lib/document/easel-row-words` (`EASEL_ROW_WORDS`), a data file the catalogue reads.
18
+ - **BREAKING:** the colour row's opacity is gone from `editor/lib/document/ColourControl` (`ColourControl` and `InheritedColourRow` take no `opacity` / `onOpacityChange`, `InheritedColourRow` no `changed`): its one caller was the Button's old Fill color row. **BREAKING:** `keptBy(reachedBy)` is removed (`editor/lib/document/controls`): a kept key a visible row writes is easel's `keptByRow(reachedBy)` (`screen/lib/document/style-fields`); `keptBy()` stays for a key whose row is elsewhere by rule. Host search (origin/main, 2026-10-31): efficient-storefront-blocks and efficient-storefront use none of them.
19
+ - `PassInspector.blockSizeFields` takes easel/draw's `TextFit`.
20
+ - Guards: new `scripts/test-editor-sets-from-easel.tsx` (red first): no own copy, the Button rows and their order, the phone twins' rest and keys, Corners and `alignPhone` on the canvas, the Corners radius step is 1 and its Reset clears the radius and the corner sides in one write; the colour windows offer the Theme colours; Reset on a phone strip stores nothing; the render side's `BUTTON_PAD_KEYS` and corner order equal easel's; Corners reach the published button through the block's render; the Phone view is the approved picture (Width, Fixed width, Min width, Content width, Padding, Block alignment); the catalogue lists the words easel's rows say. `test-button-block-colours`, `test-one-alignment-row` (`buttonFieldSet` declares the Block alignment row), `test-no-glyph-rows` (3 to 1), `test-panel-rows-use-the-shared-row` (slider floor 37 to 36) and `test-two-ways-to-add` (easel `^26.2.0`) follow.
21
+
22
+ ### Changed (C38: the Grid and the Hero box have their own phone Gap; #416)
23
+
24
+ - **The Grid and the Hero box have their own phone Gap** (the Box's row, #390): `gap` is the Desktop view, `gapPhone` the Phone view. An unset phone Gap shows half the desktop Gap in grey and stores nothing; Reset writes `undefined`. `containerGapProps` writes `--sf-gap-len-phone` only when one is stored.
25
+ - New in `editor/lib/document/controls`: `containerGapRows(container)` and `DESKTOP_GAP_NOT_OVERLAP`. The phone row's show-when rule is on `containerGapPhoneField` itself.
26
+ - The Grid and Hero box desktop Gap row is a Desktop-view row only.
27
+
28
+ ### Changed (one reader for the button look and the corners, from easel; #417)
29
+
30
+ - **BREAKING: the `efficient-easel` peer is `^26.7.0`** (was `^26.5.0`). The button look (Fill opacity, Border, Padding) and the corner set are read by easel's one reader (`efficient-easel/draw`), the email designer's too. A negative border width or padding side is not set.
31
+ - Switch to Box footer keeps a footer box's Stretch alignment.
32
+
33
+ ### Fixed (C36: the cards in one row keep one height; Lewis 2026-10-31)
34
+
35
+ - **In a Box row that stretches, every block is as tall as the row.** The cell keeps its own classes (the row's stretch sizes it); every layer inside it (Size, Theme, Height, Entrance wrappers, and a Box or Grid in them) takes `h-full`. A Sticky pin does not fill, and what it holds starts afresh. A Box or Grid that IS the cell draws what it drew. A row that does not stretch, a column and the top of a page draw what they drew.
36
+ - **The blocks of every other container start afresh** (new pass `slotsStartAfresh`, `lib/document/passes/slots-start-afresh`): ProcessSteps, Hero, Logos and a card template do not hand a cell's height to their blocks.
37
+ - **A Map in a column that fills a row's cell takes the room that is left**, from its square below 1100px (never smaller). On the phone (below 800px) it may also shrink; alone in its row it measured the same heights as before (390px: 329 / 339 px).
38
+ - A tabbed Box that only fills a cell gives its pane no `h-full`.
39
+ - **BREAKING (type):** `render/components/InBoxContext`: `InBoxContext` is `Context<BoxCell | null>` (was `Context<boolean>`); `useInBox()` still answers a boolean. New: `BoxCell`, `useBoxCell`, `CellFillContext`, `useFillsCell`, `useCellOfStretchedRow`, `useCellLayer`, `CellWrap`, `SlotsStartAfresh`. Host search (origin/main, 2026-10-31): no host imports `InBoxContext`.
40
+ - Guards: new `scripts/test-box-row-cells-fill.tsx` (9 tests, each red first). `scripts/fixtures/nested-box-main-bytes.json`: 15 "Grid in Flex" cases drawn again (` h-full` the only change).
41
+
42
+ ### Changed (Duplicate page is easel's one dialog, B9 2026-10-28)
43
+
44
+ - **"Duplicate page" in the Pages panel is easel's `DuplicatePageDialog`** (`efficient-easel/page-copy`), the one dialog the admin console draws too, as approved on 2026-10-21: ONE primary button (the cross, Escape and a click outside close it; the builder's Cancel button is gone), "Discard changes?" before a typed dialog closes, the draft sentence under Title, the URL hint as the site's domain and handle (`inovit.com/summer-copy`: the editor's own origin, or the `shopOrigin` an off-site embedder configures), easel's words (`PageCopyWords`; the failure now reads "Couldn’t duplicate the page. Try again."). Enter while an IME composes no longer submits; a title stops at 255 characters (`DUPLICATE_TITLE_MAX`); the handle keeps its "-" while typing, and the copy is sent with the finished handle ("summer " sends `summer`).
45
+ - **Host requirement:** a host mounts efficient-shell's `ConfirmProvider` at its root (the admin does); without it, closing a typed Duplicate dialog cannot ask "Discard changes?". The panel mounts none: the provider sets the page-wide `confirm` with no cleanup, so one in the panel would take every later `confirm` of the host (README, "What a host adds").
46
+ - The copy is still the backend's (`pages.duplicate`, with the site id; none for a template's pages): `usePageDuplicate` moves into `components/PagesPanel`. Which rows may be copied is easel's `canDuplicatePage` (Normal and Dynamic; no system-page list, as before), and the add dialog's "first free handle" is easel's `uniqueSlug`.
47
+ - **BREAKING: removed `editor/components/DuplicatePageDialog` and `editor/lib/page-copy`** (`canDuplicatePage`, `uniqueSlug`, `urlHandleTaken`, `copySuggestion`, `usePageDuplicate`): import the first four from `efficient-easel/page-copy`. Host search (origin/main, 2026-10-31): efficient-storefront, efficient-admin-portal and efficient-storefront-blocks use none of them.
48
+ - The editor-words catalogue drops the dialog's five own phrases (1328 to 1323). Guards: new `scripts/test-page-copy-typing.tsx` (red first on the builder's own dialog: Enter while composing submitted, no 255 limit), driven through the Pages panel with the host's provider at the root, and checking the panel mounts no `ConfirmProvider`; `test-page-duplicate` reads easel's dialog; `test-two-ways-to-add` (easel `^26.5.0`).
49
+
50
+ ### Removed (an unused export; twins plan, step B4)
51
+
52
+ - **BREAKING: `mediaThumb` is removed from `render/lib/media`.** No file of the builder called it. A host that wants a sized picture asks its `WebsiteBackend.media.resolve(ref, { width })` (unchanged). The private `hostMedia` no longer passes a width. Host search (origin/main, 2026-10-31): efficient-storefront-blocks `scripts/test-web-host-contract.tsx:509`, `:524`, `:531` (a test only) checks it; efficient-storefront, efficient-easel and efficient-admin-portal use none (the admin portal's `mediaThumb` is its own prop). **Host step:** efficient-storefront-blocks removes the 3 `mediaThumb` checks at its bump to 47.
53
+ - Guards: `scripts/test-dead-exports-stay-gone.ts` lists `mediaThumb` (red first).
54
+
55
+ **REMOVALS (47.0.0):** `dist/format/lib/content/block-size.js`, `.d.ts` (moves to `render/`); `dist/editor/components/DuplicatePageDialog.js`, `dist/editor/lib/page-copy.js` and their `.d.ts`.
56
+
3
57
  ## 46.0.0 - 2026-10-30
4
58
 
5
59
  **MAJOR for hosts.** Peers: `efficient-easel` `^26.1.0` (was `^24.1.0`; easel 25 and 26 are majors: easel 26 removes `ColourPicker`, `ColourWindow` and the pick words, which web-builder does not use), `efficient-shell` `^11.8.0` (unchanged). The 45.0.0 notes are on the GitHub Release v45.0.0.
package/README.md CHANGED
@@ -32,6 +32,12 @@ What a host adds, it hands over on the editor's session
32
32
 
33
33
  The storefront's are assembled in its `lib/storefront-editor.ts`.
34
34
 
35
+ A host mounts efficient-shell's `ConfirmProvider` at its root (the admin
36
+ does); without it, closing a typed Duplicate dialog cannot ask "Discard
37
+ changes?". The editor mounts none of its own: the provider sets the page-wide
38
+ `confirm` and never gives it back, so one inside the editor would take every
39
+ later `confirm` of the host.
40
+
35
41
  ## The editor's words in a host's language
36
42
 
37
43
  The editor speaks English, and a host that runs in another language lays its
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as $,jsxs as w}from"react/jsx-runtime";import{Fragment as ke,useEffect as Ae,useId as Ie,useMemo as ee,useRef as Re,useState as d}from"react";import{useScreenDocument as De}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as G}from"efficient-easel/draw/client";import xe from"efficient-easel/screen/components/SidePanelHead";import{useWebsiteName as Ne}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as ve}from"efficient-easel/chrome";import{Button as ne,Dialog as Ee,FormField as Le,Input as te,PopupMenu as Oe,PopupMenuItem as oe,toast as ae}from"efficient-shell/ui";import{LayersTree as Be,TreeGroupLabel as Fe,TreeRow as le,TreeRowAction as x}from"efficient-easel/tree";import{AddIcon as Me,DuplicateIcon as _e,PageIcon as ze,SettingsIcon as Ge}from"efficient-easel/icons";import{PagesIcon as He}from"efficient-easel/rail";import{useEaselHost as Te}from"efficient-easel/screen/lib/host";import{bucketEditorPageRows as Ue,DYNAMIC_PAGES_GROUP_KEY as We,isDynamicPageRow as je,MAIN_PAGES_GROUP as qe}from"../../format/lib/editor-page-rows.js";import{useEaselSession as Ke}from"efficient-easel/screen/lib/session-context";import{holdPageRow as H,usePageRows as Ye}from"../lib/page-rows.js";import{say as n,sayCount as Je}from"../../format/lib/editor-words.js";import{canDuplicatePage as Qe,uniqueSlug as se,usePageDuplicate as Ve}from"../lib/page-copy.js";import Xe from"./DuplicatePageDialog.js";import{newPopupPage as Ze}from"../../format/lib/popup/new-popup.js";const ie="sf-editor-pages-collapsed-groups";function $e({onNavigate:u,onClose:en,activeSurface:T,onPreviewSurface:re}){const C=Ke().chrome?.pageRows,U=Te(),{adapter:p,capabilities:m,ready:N,currentSlug:W}=De(),de=Ne(),{rows:c,reload:v,setRows:j,getRows:ce}=Ye(),[E,ue]=d(""),[i,S]=d(!1),[k,g]=d(null),[q,A]=d(!1),[f,L]=d(""),K=Ie(),O=Ve(),[pe,B]=d(null),[F,me]=d(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(ie);return new Set(e?JSON.parse(e):[])}catch{return new Set}});Ae(()=>{try{window.localStorage.setItem(ie,JSON.stringify([...F]))}catch{}},[F]);const ge=e=>me(a=>{const o=new Set(a);return o.has(e)?o.delete(e):o.add(e),o}),fe=ee(()=>Ue(c??[]),[c]),M=E.trim().toLowerCase(),Y=e=>!M||e.toLowerCase().includes(M),he=e=>M?!0:!F.has(e),I=ee(()=>new Set((c??[]).map(e=>e.slug)),[c]),J=()=>{if(m.pageCreationInAdminForm){U.send("storefront-editor:new-page");return}L(""),g(null),A(!0)},Q=async()=>{const e=f.trim();if(!(!e||!N||i||!p.createPage)){S(!0),g(null);try{const a=await p.createPage({slug:se(e,I),title:e,layout:{}});await v(),A(!1),L(""),u(a.slug)}catch{g(n("Couldn’t add the page — please retry."))}finally{S(!1)}}},R=m.hasSiteSettings&&!!p.createPage,be=async()=>{if(!(!N||i||!p.createPage)){S(!0),g(null);try{const e=await p.createPage(Ze(n("New popup"),I));await v(),u(e.slug)}catch{g(n("Couldn’t add the popup — please retry."))}finally{S(!1)}}},V=Re(null),[h,b]=d(null),Pe=()=>{if(!R)return J();if(h)return b(null);const e=V.current?.getBoundingClientRect();e&&b({top:e.bottom+6,right:Math.max(8,window.innerWidth-e.right)})},ye=e=>{const a=c??[],o=p.deletePage;if(!N||i||!o||a.length<=1)return;const s=a.findIndex(l=>l.id===e.id),r=a.filter(l=>l.id!==e.id),P=e.slug===W;H(e.id,!0),j(r),g(null),P&&r[0]&&u(r[0].slug);const D=()=>{H(e.id,!1);const l=ce()??[];if(l.some(Se=>Se.id===e.id))return;const y=[...l];y.splice(Math.max(0,Math.min(s,y.length)),0,e),j(y)};ae.undoable(n("Deleted “{name}”",{name:e.label}),{actionLabel:n("Undo"),commit:async l=>{await o(e.id,l),H(e.id,!1)},undo:()=>{D(),P&&u(e.slug)},onFail:()=>{D(),ae.error(n("Couldn’t delete the page — please retry."))}})},we=e=>U.send("storefront-editor:open-page",{slug:e}),Ce=e=>{if(!Y(e.label))return null;const a=!T&&e.slug===W,o=m.canDeletePagesInline&&(c??[]).length>1,s=je(e),r=e.kind==="lightbox",P=[...s?[{label:n("Dynamic"),tone:"info"}]:[],...r?[{label:n("Lightbox"),tone:"success"}]:[],...e.draft?[{label:n("draft"),tone:"draft"}]:[]],D=P.length>0?P:void 0,l=!!O&&Qe(e),y=l||m.pageCreationInAdminForm||o?w($,{children:[l&&t(x,{kind:"plain",label:n("Duplicate “{name}”",{name:e.label}),disabled:i,onClick:()=>B(e),children:t(_e,{size:13})}),m.pageCreationInAdminForm&&t(x,{kind:"plain",label:n("Page settings for “{name}”",{name:e.label}),onClick:()=>we(e.slug),children:t(Ge,{size:13})}),o&&t(x,{kind:"delete",label:n("Delete “{name}”",{name:e.label}),disabled:i,onClick:()=>ye(e),children:t(G,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return t(le,{icon:t(ze,{size:14}),name:e.label,selected:a,onSelect:()=>u(e.slug),badge:D,actions:y,rowProps:{"data-page-slug":e.slug}},e.id)},_=(e,a,o)=>{const s=o.filter(Boolean);if(s.length===0)return null;const r=he(e);return w(ke,{children:[t(Fe,{count:s.length,countLabel:Je("{n} page","{n} pages",s.length),expanded:r,onToggle:()=>ge(e),children:a}),r&&s]},e)},X=(C?.rows??[]).filter(e=>Y(e.label)).map(e=>{const a=T===e.key;return t(le,{icon:e.icon,name:e.label,selected:a,onSelect:()=>re(e.key),badge:{label:n("Preview"),tone:"warning"},actions:t(x,{kind:"plain",label:n("Open the {name} in a new tab",{name:e.label}),onClick:()=>window.open(e.href,"_blank","noopener,noreferrer"),children:t(G,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":e.key}},e.key)}),Z=m.hasSiteSettings&&!!C,z=(()=>{if(c===null)return null;const e=[];let a=!1;for(const o of fe){Z&&!a&&o.key.startsWith("system:")&&(e.push(_("shop",C.title,X)),a=!0);const s=o.key===We||o.label===qe?n(o.label):o.label;e.push(_(o.key,s,o.rows.map(Ce)))}return Z&&!a&&e.push(_("shop",C.title,X)),e})();return w("div",{className:"sf-pages",children:[t(xe,{icon:t(He,{}),title:n("Pages"),context:de,actions:t(ve,{buttonRef:V,label:R?n("Add"):n("New page"),hasPopup:R?"menu":void 0,expanded:R?h!==null:void 0,onClick:Pe,children:t(Me,{size:15})})}),h&&t(Oe,{portal:!0,style:{top:h.top,right:h.right},onClose:()=>b(null),children:w("div",{role:"menu","aria-label":n("Add"),children:[t(oe,{role:"menuitem",onClick:()=>{b(null),J()},children:n("Page")}),t(oe,{role:"menuitem",disabled:i,onClick:()=>{b(null),be()},children:n("Popup")})]})}),t("div",{className:"sf-pages-find",children:t(te,{type:"search",leftIcon:t(G,{name:"search",size:14,rounded:!0}),placeholder:n("Search all pages…"),value:E,onChange:e=>ue(e.target.value),"aria-label":n("Search all pages")})}),k&&!q&&t("div",{className:"sf-note sf-note--error",role:"alert",children:k}),z===null?t("div",{className:"sf-note",children:n("Loading…")}):z.some(Boolean)?t(Be,{ariaLabel:n("Pages"),className:"sf-scroll",children:z}):t("div",{className:"sf-note",children:E.trim()?n("No pages match your search"):n("No pages yet. Add one with + above.")}),O&&t(Xe,{source:pe,taken:I,duplicate:O,onClose:()=>B(null),onDuplicated:e=>{B(null),v(),u(e.slug)}}),t(Ee,{open:q,onClose:()=>A(!1),size:"sm",title:n("Add a page"),description:n("Give the new template page a name. It starts blank — add sections once it opens."),footer:w($,{children:[t(ne,{variant:"secondary",onClick:()=>A(!1),children:n("Cancel")}),t(ne,{onClick:()=>{Q()},disabled:i||!f.trim(),loading:i,children:n("Add page")})]}),children:t(Le,{label:n("Page name"),htmlFor:K,hint:f.trim()?n("URL: /{slug}",{slug:se(f,I)}):void 0,error:k??void 0,children:t(te,{id:K,value:f,invalid:!!k,onChange:e=>L(e.target.value),onKeyDown:e=>{e.key==="Enter"&&Q()},placeholder:n("e.g. About")})})})]})}export{$e as default};
1
+ "use client";import{jsx as t,Fragment as te,jsxs as C}from"react/jsx-runtime";import{Fragment as Re,useEffect as De,useId as xe,useMemo as oe,useRef as Ne,useState as c}from"react";import{useScreenDocument as ae}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as j}from"efficient-easel/draw/client";import ve from"efficient-easel/screen/components/SidePanelHead";import{useWebsiteName as Ee}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as Le}from"efficient-easel/chrome";import{Button as se,Dialog as Oe,FormField as Be,Input as le,PopupMenu as Fe,PopupMenuItem as ie,toast as re}from"efficient-shell/ui";import{LayersTree as Me,TreeGroupLabel as _e,TreeRow as de,TreeRowAction as L}from"efficient-easel/tree";import{AddIcon as ze,DuplicateIcon as Ge,PageIcon as He,SettingsIcon as Ue}from"efficient-easel/icons";import{PagesIcon as Te}from"efficient-easel/rail";import{useEaselHost as We}from"efficient-easel/screen/lib/host";import{bucketEditorPageRows as je,DYNAMIC_PAGES_GROUP_KEY as qe,isDynamicPageRow as Ke,MAIN_PAGES_GROUP as Ye}from"../../format/lib/editor-page-rows.js";import{useEaselSession as ce}from"efficient-easel/screen/lib/session-context";import{holdPageRow as q,usePageRows as Je}from"../lib/page-rows.js";import{say as n,sayCount as Qe}from"../../format/lib/editor-words.js";import{canDuplicatePage as Ve,DuplicatePageDialog as Xe,uniqueSlug as ue}from"efficient-easel/page-copy";import{backendOf as Ze}from"../lib/website-session.js";import{shopRouteBase as $e}from"../../format/lib/web-runtime.js";import{newPopupPage as en}from"../../format/lib/popup/new-popup.js";const pe="sf-editor-pages-collapsed-groups";function nn(){const s=ce(),{siteId:O,templateId:S}=ae(),I=Ze(s).pages;if(!(!I.duplicate||S))return(p,A)=>I.duplicate(p.id,{...A,...O?{siteId:O}:{}})}function tn(){try{const s=$e()||(typeof window>"u"?"":window.location.origin);return s?new URL(s).host:""}catch{return""}}function on({onNavigate:s,onClose:O,activeSurface:S,onPreviewSurface:I}){const p=ce().chrome?.pageRows,A=We(),{adapter:m,capabilities:g,ready:B,currentSlug:K}=ae(),me=Ee(),{rows:u,reload:F,setRows:Y,getRows:ge}=Je(),[M,fe]=c(""),[r,R]=c(!1),[D,f]=c(null),[J,x]=c(!1),[h,_]=c(""),Q=xe(),z=nn(),[b,G]=c(null),[H,he]=c(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(pe);return new Set(e?JSON.parse(e):[])}catch{return new Set}});De(()=>{try{window.localStorage.setItem(pe,JSON.stringify([...H]))}catch{}},[H]);const be=e=>he(a=>{const o=new Set(a);return o.has(e)?o.delete(e):o.add(e),o}),Pe=oe(()=>je(u??[]),[u]),U=M.trim().toLowerCase(),V=e=>!U||e.toLowerCase().includes(U),ye=e=>U?!0:!H.has(e),N=oe(()=>new Set((u??[]).map(e=>e.slug)),[u]),X=()=>{if(g.pageCreationInAdminForm){A.send("storefront-editor:new-page");return}_(""),f(null),x(!0)},Z=async()=>{const e=h.trim();if(!(!e||!B||r||!m.createPage)){R(!0),f(null);try{const a=await m.createPage({slug:ue(e,N),title:e,layout:{}});await F(),x(!1),_(""),s(a.slug)}catch{f(n("Couldn’t add the page — please retry."))}finally{R(!1)}}},v=g.hasSiteSettings&&!!m.createPage,we=async()=>{if(!(!B||r||!m.createPage)){R(!0),f(null);try{const e=await m.createPage(en(n("New popup"),N));await F(),s(e.slug)}catch{f(n("Couldn’t add the popup — please retry."))}finally{R(!1)}}},$=Ne(null),[P,y]=c(null),ke=()=>{if(!v)return X();if(P)return y(null);const e=$.current?.getBoundingClientRect();e&&y({top:e.bottom+6,right:Math.max(8,window.innerWidth-e.right)})},Ce=e=>{const a=u??[],o=m.deletePage;if(!B||r||!o||a.length<=1)return;const i=a.findIndex(l=>l.id===e.id),d=a.filter(l=>l.id!==e.id),w=e.slug===K;q(e.id,!0),Y(d),f(null),w&&d[0]&&s(d[0].slug);const E=()=>{q(e.id,!1);const l=ge()??[];if(l.some(Ae=>Ae.id===e.id))return;const k=[...l];k.splice(Math.max(0,Math.min(i,k.length)),0,e),Y(k)};re.undoable(n("Deleted “{name}”",{name:e.label}),{actionLabel:n("Undo"),commit:async l=>{await o(e.id,l),q(e.id,!1)},undo:()=>{E(),w&&s(e.slug)},onFail:()=>{E(),re.error(n("Couldn’t delete the page — please retry."))}})},Se=e=>A.send("storefront-editor:open-page",{slug:e}),Ie=e=>{if(!V(e.label))return null;const a=!S&&e.slug===K,o=g.canDeletePagesInline&&(u??[]).length>1,i=Ke(e),d=e.kind==="lightbox",w=[...i?[{label:n("Dynamic"),tone:"info"}]:[],...d?[{label:n("Lightbox"),tone:"success"}]:[],...e.draft?[{label:n("draft"),tone:"draft"}]:[]],E=w.length>0?w:void 0,l=!!z&&Ve(e),k=l||g.pageCreationInAdminForm||o?C(te,{children:[l&&t(L,{kind:"plain",label:n("Duplicate “{name}”",{name:e.label}),disabled:r,onClick:()=>G(e),children:t(Ge,{size:13})}),g.pageCreationInAdminForm&&t(L,{kind:"plain",label:n("Page settings for “{name}”",{name:e.label}),onClick:()=>Se(e.slug),children:t(Ue,{size:13})}),o&&t(L,{kind:"delete",label:n("Delete “{name}”",{name:e.label}),disabled:r,onClick:()=>Ce(e),children:t(j,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return t(de,{icon:t(He,{size:14}),name:e.label,selected:a,onSelect:()=>s(e.slug),badge:E,actions:k,rowProps:{"data-page-slug":e.slug}},e.id)},T=(e,a,o)=>{const i=o.filter(Boolean);if(i.length===0)return null;const d=ye(e);return C(Re,{children:[t(_e,{count:i.length,countLabel:Qe("{n} page","{n} pages",i.length),expanded:d,onToggle:()=>be(e),children:a}),d&&i]},e)},ee=(p?.rows??[]).filter(e=>V(e.label)).map(e=>{const a=S===e.key;return t(de,{icon:e.icon,name:e.label,selected:a,onSelect:()=>I(e.key),badge:{label:n("Preview"),tone:"warning"},actions:t(L,{kind:"plain",label:n("Open the {name} in a new tab",{name:e.label}),onClick:()=>window.open(e.href,"_blank","noopener,noreferrer"),children:t(j,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":e.key}},e.key)}),ne=g.hasSiteSettings&&!!p,W=(()=>{if(u===null)return null;const e=[];let a=!1;for(const o of Pe){ne&&!a&&o.key.startsWith("system:")&&(e.push(T("shop",p.title,ee)),a=!0);const i=o.key===qe||o.label===Ye?n(o.label):o.label;e.push(T(o.key,i,o.rows.map(Ie)))}return ne&&!a&&e.push(T("shop",p.title,ee)),e})();return C("div",{className:"sf-pages",children:[t(ve,{icon:t(Te,{}),title:n("Pages"),context:me,actions:t(Le,{buttonRef:$,label:v?n("Add"):n("New page"),hasPopup:v?"menu":void 0,expanded:v?P!==null:void 0,onClick:ke,children:t(ze,{size:15})})}),P&&t(Fe,{portal:!0,style:{top:P.top,right:P.right},onClose:()=>y(null),children:C("div",{role:"menu","aria-label":n("Add"),children:[t(ie,{role:"menuitem",onClick:()=>{y(null),X()},children:n("Page")}),t(ie,{role:"menuitem",disabled:r,onClick:()=>{y(null),we()},children:n("Popup")})]})}),t("div",{className:"sf-pages-find",children:t(le,{type:"search",leftIcon:t(j,{name:"search",size:14,rounded:!0}),placeholder:n("Search all pages…"),value:M,onChange:e=>fe(e.target.value),"aria-label":n("Search all pages")})}),D&&!J&&t("div",{className:"sf-note sf-note--error",role:"alert",children:D}),W===null?t("div",{className:"sf-note",children:n("Loading…")}):W.some(Boolean)?t(Me,{ariaLabel:n("Pages"),className:"sf-scroll",children:W}):t("div",{className:"sf-note",children:M.trim()?n("No pages match your search"):n("No pages yet. Add one with + above.")}),z&&b&&t(Xe,{source:{title:b.label,slug:b.slug},taken:N,host:tn(),duplicate:e=>z(b,e),onClose:()=>G(null),onDuplicated:e=>{G(null),F(),s(e.slug)}},b.id),t(Oe,{open:J,onClose:()=>x(!1),size:"sm",title:n("Add a page"),description:n("Give the new template page a name. It starts blank — add sections once it opens."),footer:C(te,{children:[t(se,{variant:"secondary",onClick:()=>x(!1),children:n("Cancel")}),t(se,{onClick:()=>{Z()},disabled:r||!h.trim(),loading:r,children:n("Add page")})]}),children:t(Be,{label:n("Page name"),htmlFor:Q,hint:h.trim()?n("URL: /{slug}",{slug:ue(h,N)}):void 0,error:D??void 0,children:t(le,{id:Q,value:h,invalid:!!D,onChange:e=>_(e.target.value),onKeyDown:e=>{e.key==="Enter"&&Z()},placeholder:n("e.g. About")})})})]})}export{on as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as c}from"react/jsx-runtime";import{phoneKey as s}from"efficient-easel/draw";import{SettingsDefaultReset as L,SettingsField as N}from"efficient-easel/panel";import{AnimationIcon as R,ClockIcon as T,DirectionDownIcon as S,DirectionIcon as g,DirectionLeftIcon as P,DirectionRightIcon as B,DirectionUpIcon as j,DurationIcon as G}from"efficient-easel/icons";import{deviceField as p}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as U,noControlField as W}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{describedAs as I,group as H}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as v,ENTRANCE_FROM_DEFAULT as u,ENTRANCE_KINDS as f,ENTRANCE_KINDS_WITH_FROM as _,MOTION_TIMING as Y,entranceAttrs as z,playEntrance as V,readEntrance as q}from"efficient-shell/format";import{IconPicker as J}from"efficient-shell/ui";import{segmented as Q}from"../document/box-fields.js";import{phoneChoiceField as X,phoneOverrideField as D,useSelectedProps as b}from"../document/controls.js";import{withRowRules as Z}from"../../../format/lib/document/show-when-attach.js";import{editorEaselWords as $,say as a}from"../../../format/lib/editor-words.js";import{animationDelayField as ee,animationDurationField as ne}from"./AnimationDurationRow.js";import{ENTRANCE_KEYS as o,LEGACY_ENTRANCE_KEY as C,entranceOf as x}from"../../../render/lib/animation/entrance.js";const m={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},oe={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},te={top:()=>e(S,{}),bottom:()=>e(j,{}),left:()=>e(B,{}),right:()=>e(P,{})},y="Entrance",F=f.filter(n=>n!=="none"),k=n=>({any:[{field:o.kind,in:n},{all:[{field:o.kind,set:!1},{field:C,in:n}]}]}),M=n=>({any:[{field:s(o.kind),in:n},{all:[{field:s(o.kind),set:!1},k(n)]}]}),ie=[[[o.from],k(_)],[[s(o.from)],M(_)],[[o.duration,o.delay],k(F)],[[s(o.duration),s(o.delay)],M(F)]],d=({children:n})=>e("svg",{viewBox:"0 0 40 40",width:"40",height:"40",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n}),r=({x:n=12,y:t=12,o:i=1})=>e("rect",{x:n,y:t,width:"16",height:"16",rx:"2",opacity:i}),re={none:e(d,{children:e(r,{})}),fade:c(d,{children:[e(r,{x:6,o:.3}),e(r,{x:18})]}),rise:c(d,{children:[e(r,{y:20,o:.3}),e(r,{y:8}),e("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),scale:c(d,{children:[e("rect",{x:"16",y:"16",width:"8",height:"8",rx:"1",opacity:".35"}),e(r,{}),e("path",{d:"M6 6l4 4M34 34l-4-4"})]}),glide:c(d,{children:[e(r,{x:2,o:.3}),e(r,{x:20}),e("path",{d:"M4 33h12m-2-2 2 2-2 2"})]}),bounce:c(d,{children:[e(r,{y:6}),e("path",{d:"M8 34c3-6 5-6 8 0s5 6 8 0 5-6 8 0"})]}),flip:c(d,{children:[e("path",{d:"M12 12l16 4v8l-16 4z",opacity:".35"}),e(r,{}),e("path",{d:"M20 4v32",strokeDasharray:"2 2"})]}),reveal:c(d,{children:[e("rect",{x:"12",y:"12",width:"16",height:"16",rx:"2",strokeDasharray:"2 2",opacity:".5"}),e("path",{d:"M12 22h16v4a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2z",fill:"currentColor",opacity:".35"}),e("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),spin:c(d,{children:[e(r,{}),e("path",{d:"M33 14a14 14 0 0 1 0 12m0 0-3-1m3 1 1-3"})]})};function ae({kind:n}){const{attrs:t}=z(q(n,u));return c("span",{className:"sf-entrance-pic",children:[e("span",{className:"sf-entrance-stage",children:e("i",{...t,children:re[n]})}),e("span",{className:"sf-entrance-cap",children:a(m[n])})]})}const le=(n,t)=>{const i=t.querySelector(".sf-entrance-stage > i");i&&V(i)},ce={width:"3.5rem",height:"4.25rem"};function K({value:n,onChange:t}){return e(J,{label:a(y),value:n,emptyValue:"none",columns:3,cell:ce,onChange:t,onPreview:le,tooltips:!1,options:f.map(i=>({value:i,label:a(m[i]),icon:e(ae,{kind:i})}))})}const E="Effect";function se({value:n,onChange:t}){const i=b(),l=x({...i,[o.kind]:n},"desktop").kind;return e(N,{label:a(E),icon:e(R,{}),value:a(m[l]),children:e(K,{value:l,onChange:t})})}function de({value:n,onChange:t}){const i=b(),l=typeof n=="string"&&f.includes(n),h=x(i,"desktop").kind;return e(N,{label:a(E),icon:e(R,{}),value:a(m[l?n:h]),changed:l,action:e(L,{words:$()?.panel,label:a(E),changed:l,detail:a("{value} on desktop",{value:a(m[h])}),onReset:()=>t(void 0)}),children:e(K,{value:l?n:h,onChange:t})})}const O={type:"select",label:y,options:f.map(n=>({value:n,label:m[n]}))},pe=()=>I({type:"custom",render:({value:n,onChange:t})=>e(se,{value:n,onChange:t})},O),me=()=>I({type:"custom",render:({value:n,onChange:t})=>e(de,{value:n,onChange:t})},O),w=v.map(n=>({label:oe[n],value:n,picture:te[n]()})),A=n=>v.includes(n)?n:void 0;function xe(){const{duration:n,delay:t}=Y.entrance,i={_gEntrance:H(y),[o.kind]:p("desktop",pe()),[C]:W({type:"custom",render:()=>e(U,{})},"always"),[s(o.kind)]:p("mobile",me()),[o.from]:p("desktop",Q("From",e(g,{}),w,u)),[s(o.from)]:p("mobile",X({label:"From",icon:e(g,{}),options:w,desktopKey:o.from,resolve:(l,h)=>A(l)??A(h)??u})),[o.duration]:p("desktop",ne("entrance")),[s(o.duration)]:p("mobile",D({label:"Duration",desktopKey:o.duration,icon:e(G,{}),min:n.min,max:n.max,step:n.step,fallback:n.default,unit:"s"})),[o.delay]:p("desktop",ee("entrance")),[s(o.delay)]:p("mobile",D({label:"Delay",desktopKey:o.delay,icon:e(T,{}),min:t.min,max:t.max,step:t.step,fallback:t.default,unit:"s"}))};return Z(i,ie)}export{re as ENTRANCE_PICTURE,xe as entranceFields};
1
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{phoneKey as s}from"efficient-easel/draw";import{SettingsDefaultReset as K,SettingsField as N}from"efficient-easel/panel";import{AnimationIcon as R,ClockIcon as O,DirectionDownIcon as w,DirectionIcon as A,DirectionLeftIcon as T,DirectionRightIcon as L,DirectionUpIcon as S,DurationIcon as P}from"efficient-easel/icons";import{deviceField as p}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as B,noControlField as j}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{describedAs as k,group as G,phoneTwinFields as U}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as W,ENTRANCE_FROM_DEFAULT as g,ENTRANCE_KINDS as h,ENTRANCE_KINDS_WITH_FROM as I,MOTION_TIMING as H,entranceAttrs as Y,playEntrance as z,readEntrance as V}from"efficient-shell/format";import{IconPicker as q}from"efficient-shell/ui";import{segmented as J}from"../document/box-fields.js";import{phoneOverrideField as _,useSelectedProps as v}from"../document/controls.js";import{withRowRules as Q}from"../../../format/lib/document/show-when-attach.js";import{editorEaselWords as X,say as a}from"../../../format/lib/editor-words.js";import{animationDelayField as Z,animationDurationField as $}from"./AnimationDurationRow.js";import{ENTRANCE_KEYS as o,LEGACY_ENTRANCE_KEY as D,entranceOf as x}from"../../../render/lib/animation/entrance.js";const m={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},ee={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},ne={top:()=>e(w,{}),bottom:()=>e(S,{}),left:()=>e(L,{}),right:()=>e(T,{})},u="Entrance",C=h.filter(n=>n!=="none"),y=n=>({any:[{field:o.kind,in:n},{all:[{field:o.kind,set:!1},{field:D,in:n}]}]}),b=n=>({any:[{field:s(o.kind),in:n},{all:[{field:s(o.kind),set:!1},y(n)]}]}),te=[[[o.from],y(I)],[[s(o.from)],b(I)],[[o.duration,o.delay],y(C)],[[s(o.duration),s(o.delay)],b(C)]],c=({children:n})=>e("svg",{viewBox:"0 0 40 40",width:"40",height:"40",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n}),r=({x:n=12,y:t=12,o:i=1})=>e("rect",{x:n,y:t,width:"16",height:"16",rx:"2",opacity:i}),oe={none:e(c,{children:e(r,{})}),fade:l(c,{children:[e(r,{x:6,o:.3}),e(r,{x:18})]}),rise:l(c,{children:[e(r,{y:20,o:.3}),e(r,{y:8}),e("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),scale:l(c,{children:[e("rect",{x:"16",y:"16",width:"8",height:"8",rx:"1",opacity:".35"}),e(r,{}),e("path",{d:"M6 6l4 4M34 34l-4-4"})]}),glide:l(c,{children:[e(r,{x:2,o:.3}),e(r,{x:20}),e("path",{d:"M4 33h12m-2-2 2 2-2 2"})]}),bounce:l(c,{children:[e(r,{y:6}),e("path",{d:"M8 34c3-6 5-6 8 0s5 6 8 0 5-6 8 0"})]}),flip:l(c,{children:[e("path",{d:"M12 12l16 4v8l-16 4z",opacity:".35"}),e(r,{}),e("path",{d:"M20 4v32",strokeDasharray:"2 2"})]}),reveal:l(c,{children:[e("rect",{x:"12",y:"12",width:"16",height:"16",rx:"2",strokeDasharray:"2 2",opacity:".5"}),e("path",{d:"M12 22h16v4a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2z",fill:"currentColor",opacity:".35"}),e("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),spin:l(c,{children:[e(r,{}),e("path",{d:"M33 14a14 14 0 0 1 0 12m0 0-3-1m3 1 1-3"})]})};function ie({kind:n}){const{attrs:t}=Y(V(n,g));return l("span",{className:"sf-entrance-pic",children:[e("span",{className:"sf-entrance-stage",children:e("i",{...t,children:oe[n]})}),e("span",{className:"sf-entrance-cap",children:a(m[n])})]})}const re=(n,t)=>{const i=t.querySelector(".sf-entrance-stage > i");i&&z(i)},ae={width:"3.5rem",height:"4.25rem"};function F({value:n,onChange:t}){return e(q,{label:a(u),value:n,emptyValue:"none",columns:3,cell:ae,onChange:t,onPreview:re,tooltips:!1,options:h.map(i=>({value:i,label:a(m[i]),icon:e(ie,{kind:i})}))})}const E="Effect";function le({value:n,onChange:t}){const i=v(),d=x({...i,[o.kind]:n},"desktop").kind;return e(N,{label:a(E),icon:e(R,{}),value:a(m[d]),children:e(F,{value:d,onChange:t})})}function ce({value:n,onChange:t}){const i=v(),d=typeof n=="string"&&h.includes(n),f=x(i,"desktop").kind;return e(N,{label:a(E),icon:e(R,{}),value:a(m[d?n:f]),changed:d,action:e(K,{words:X()?.panel,label:a(E),changed:d,detail:a("{value} on desktop",{value:a(m[f])}),onReset:()=>t(void 0)}),children:e(F,{value:d?n:f,onChange:t})})}const M={type:"select",label:u,options:h.map(n=>({value:n,label:m[n]}))},se=()=>k({type:"custom",render:({value:n,onChange:t})=>e(le,{value:n,onChange:t})},M),de=()=>k({type:"custom",render:({value:n,onChange:t})=>e(ce,{value:n,onChange:t})},M),pe=W.map(n=>({label:ee[n],value:n,picture:ne[n]()}));function Ce(){const{duration:n,delay:t}=H.entrance,i={_gEntrance:G(u),[o.kind]:p("desktop",se()),[D]:j({type:"custom",render:()=>e(B,{})},"always"),[s(o.kind)]:p("mobile",de()),...U(o.from,J("From",e(A,{}),pe,g)),[o.duration]:p("desktop",$("entrance")),[s(o.duration)]:p("mobile",_({label:"Duration",desktopKey:o.duration,icon:e(P,{}),min:n.min,max:n.max,step:n.step,fallback:n.default,unit:"s"})),[o.delay]:p("desktop",Z("entrance")),[s(o.delay)]:p("mobile",_({label:"Delay",desktopKey:o.delay,icon:e(O,{}),min:t.min,max:t.max,step:t.step,fallback:t.default,unit:"s"}))};return Q(i,te)}export{oe as ENTRANCE_PICTURE,Ce as entranceFields};
@@ -1,5 +1,6 @@
1
1
  import type { ReactElement, ReactNode } from "react";
2
- export declare function ColourControl({ value, onChange, label, id, caption, inherited, ariaLabel, opacity, onOpacityChange, }: {
2
+ import { type ColorPreset } from "efficient-shell/ui";
3
+ export declare function ColourControl({ value, onChange, label, id, caption, inherited, ariaLabel, }: {
3
4
  value: string;
4
5
  onChange: (next: string) => void;
5
6
  label: string;
@@ -7,9 +8,8 @@ export declare function ColourControl({ value, onChange, label, id, caption, inh
7
8
  caption?: string;
8
9
  inherited?: string;
9
10
  ariaLabel?: string;
10
- opacity?: number;
11
- onOpacityChange?: (opacity: number) => void;
12
11
  }): import("react").JSX.Element;
12
+ export declare function useThemePresets(): ColorPreset[];
13
13
  export declare function AnyColourSwatch({ value, onChange, label, }: {
14
14
  value: string;
15
15
  onChange: (next: string) => void;
@@ -23,7 +23,7 @@ export declare function ColourRow({ label, icon, changed, hint, onReset, resetTo
23
23
  resetTo?: string;
24
24
  children?: ReactNode;
25
25
  }): import("react").JSX.Element;
26
- export declare function InheritedColourRow({ label, icon, value, inherited, resetTo, onChange, onReset, hint, opacity, onOpacityChange, changed, }: {
26
+ export declare function InheritedColourRow({ label, icon, value, inherited, resetTo, onChange, onReset, hint, }: {
27
27
  label: string;
28
28
  icon?: ReactElement;
29
29
  value: string;
@@ -32,7 +32,4 @@ export declare function InheritedColourRow({ label, icon, value, inherited, rese
32
32
  onChange: (hex: string) => void;
33
33
  onReset: () => void;
34
34
  hint?: ReactNode;
35
- opacity?: number;
36
- onOpacityChange?: (opacity: number) => void;
37
- changed?: boolean;
38
35
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as s,jsxs as g}from"react/jsx-runtime";import{ColorPicker as h,HexInput as w}from"efficient-shell/ui";import{SettingsDefaultReset as C,SettingsField as b}from"efficient-easel/panel";import{typedHex as p}from"efficient-easel/pick";import{usePreviewHeader as S}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as N,say as m}from"../../../format/lib/editor-words.js";import{themeSwatches as E}from"./theme-swatches.js";import{SITE_STYLE_UNSET_LABEL as T}from"../../../format/components/SiteStyleUnset.js";function _({value:e,onChange:n,label:o,id:r,caption:t,inherited:a,ariaLabel:d,opacity:i,onOpacityChange:c}){return s(k,{value:e,onChange:n,label:m(d??o),id:r,caption:t,inherited:a,...c?{opacity:i,onOpacityChange:c}:{}})}function j(){const{theme:e}=S();return E(e).map(n=>({value:n.value,label:n.name}))}function k({value:e,onChange:n,label:o,id:r,caption:t,inherited:a,opacity:d,onOpacityChange:i}){const c=j(),l=e?null:p(a??""),f=t!==void 0&&(!e||p(t)!==p(e))?t:null,u=x=>{x!==e&&n(x)};return i?s("div",{className:"sf-colour",children:s(h,{id:r,value:e,onChange:u,label:o,presets:c,fallback:l??void 0,size:"md",align:"start",showHexInput:!0,opacity:d,onOpacityChange:i})}):g("div",{className:"sf-colour",children:[s(h,{id:r,value:e,onChange:u,label:o,presets:c,fallback:l??void 0,size:"md",align:"start"}),f!==null?s("span",{className:"sf-colour-caption",children:f}):s("span",{className:"sf-colour-hexwrap",children:s(w,{value:e||l||"",onChange:u,label:m("{label} hex code",{label:o}),placeholder:e||l?void 0:m(T),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function A({value:e,onChange:n,label:o}){return s(h,{value:e,onChange:r=>{r&&r!==e&&n(r)},label:m(o),size:"sm",align:"end"})}function z({label:e,icon:n,changed:o,hint:r,onReset:t,resetTo:a,children:d,...i}){return g(b,{label:e,icon:n,htmlFor:i.id,changed:o,hint:r,action:t?s(C,{words:N()?.panel,label:e,changed:!!o,detail:a,onReset:t}):void 0,children:[_({...i,label:e}),d]})}function F({label:e,icon:n,value:o,inherited:r,resetTo:t,onChange:a,onReset:d,hint:i,opacity:c,onOpacityChange:l,changed:f}){const u=!!o;return s(z,{label:e,icon:n,value:o,inherited:u?void 0:r,onChange:a,changed:f??u,onReset:d,resetTo:t,hint:i,...l?{opacity:c,onOpacityChange:l}:{}})}export{A as AnyColourSwatch,_ as ColourControl,z as ColourRow,F as InheritedColourRow};
1
+ "use client";import{jsx as s,jsxs as h}from"react/jsx-runtime";import{ColorPicker as p,HexInput as x}from"efficient-shell/ui";import{SettingsDefaultReset as C,SettingsField as g}from"efficient-easel/panel";import{typedHex as u}from"efficient-easel/pick";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as S,say as c}from"../../../format/lib/editor-words.js";import{themeSwatches as b}from"./theme-swatches.js";import{SITE_STYLE_UNSET_LABEL as E}from"../../../format/components/SiteStyleUnset.js";function N({value:e,onChange:o,label:n,id:r,caption:t,inherited:l,ariaLabel:a}){return s(_,{value:e,onChange:o,label:c(a??n),id:r,caption:t,inherited:l})}function T(){const{theme:e}=w();return b(e).map(o=>({value:o.value,label:o.name}))}function _({value:e,onChange:o,label:n,id:r,caption:t,inherited:l}){const a=T(),i=e?null:u(l??""),d=t!==void 0&&(!e||u(t)!==u(e))?t:null,f=m=>{m!==e&&o(m)};return h("div",{className:"sf-colour",children:[s(p,{id:r,value:e,onChange:f,label:n,presets:a,fallback:i??void 0,size:"md",align:"start"}),d!==null?s("span",{className:"sf-colour-caption",children:d}):s("span",{className:"sf-colour-hexwrap",children:s(x,{value:e||i||"",onChange:f,label:c("{label} hex code",{label:n}),placeholder:e||i?void 0:c(E),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function L({value:e,onChange:o,label:n}){return s(p,{value:e,onChange:r=>{r&&r!==e&&o(r)},label:c(n),size:"sm",align:"end"})}function j({label:e,icon:o,changed:n,hint:r,onReset:t,resetTo:l,children:a,...i}){return h(g,{label:e,icon:o,htmlFor:i.id,changed:n,hint:r,action:t?s(C,{words:S()?.panel,label:e,changed:!!n,detail:l,onReset:t}):void 0,children:[N({...i,label:e}),a]})}function A({label:e,icon:o,value:n,inherited:r,resetTo:t,onChange:l,onReset:a,hint:i}){const d=!!n;return s(j,{label:e,icon:o,value:n,inherited:d?void 0:r,onChange:l,changed:d,onReset:a,resetTo:t,hint:i})}export{L as AnyColourSwatch,N as ColourControl,j as ColourRow,A as InheritedColourRow,T as useThemePresets};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as I}from"react/jsx-runtime";import{ButtonIcon as x,ButtonIconIcon as T,GroundIcon as F,IconAfterTextIcon as y,IconBeforeTextIcon as g,TextColorIcon as B}from"efficient-easel/icons";import{SettingsField as C}from"efficient-easel/panel";import{useSelectedFields as a}from"efficient-easel/easel";import{IconPicker as O,Segmented as _}from"efficient-shell/ui";import{shellGlyphOf as S}from"../../../shell-glyph.js";import{StorefrontTextLinkField as k}from"../../../../../components/StorefrontLinkField.js";import{BUTTON_ICONS as L,buttonIconChoice as N,buttonIconSide as w,buttonWidth as v}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as P,BUTTON_PAD_KEYS as W,buttonLook as A}from"../../../../../../render/lib/content/button-look.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{FOLLOWS_SITE_BUTTON as z,FOLLOWS_SITE_BUTTON_INK as R,buttonBorderField as U,buttonWordsEntryField as j,colorInput as d,inOwnBox as E,keptBy as r,linkField as D,plainText as K}from"../../../controls.js";import{group as f,section as u}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as G}from"../../../box-fields.js";import{blockAlignmentFields as Y}from"../../../box-fields.js";import{CARD_ROW_FACTS as V,cardRowField as m,cardRowFields as q}from"../../../card-row-fields.js";import{consentWordsKept as H,withConsentWordsRow as J}from"../../../consent-words-field.js";const p=o=>S(o==="none"?"no-symbol":o),M=L.map(o=>({value:o,icon:p(o)}));function Q({value:o,onChange:i}){const n=a(),l=n.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return t(k,{label:"Button",icon:t(x,{size:18}),text:s,onTextChange:i,link:typeof l=="string"?l:"",onLinkChange:c=>n.onChange("href",c)})}function X({value:o,onChange:i}){const n=a(),l=N(o,n.values.arrow),s=w(n.values.iconPosition),c=v(n.values.widthFit)==="fill",b=p("icon-at-end");return t(C,{label:e("Icon"),icon:t(T,{size:18}),children:I("div",{className:"flex items-center gap-2",children:[t(O,{label:e("Icon"),value:l,emptyValue:"none",options:M,onChange:i}),l!=="none"&&t(_,{size:"sm",block:!0,label:e("Icon position"),value:s==="end"&&!c?"after":s,onChange:h=>n.onChange("iconPosition",h),options:[{value:"before",icon:t(g,{size:16}),label:t("span",{className:"sr-only",children:e("Icon before text")}),title:e("Icon before text")},{value:"after",icon:t(y,{size:16}),label:t("span",{className:"sr-only",children:e("Icon after text")}),title:e("Icon after text")},...c?[{value:"end",icon:b,label:t("span",{className:"sr-only",children:e("Icon at the far end")}),title:e("Icon at the far end")}]:[]]})]})})}const Z={key:"buttonFillOpacity",unsetFrom:"variant",unset:o=>A({variant:o}).fillOpacity},ho={fields:{label:E(K("Button"),o=>t(Q,{value:o.value,onChange:o.onChange})),labelText:j("label"),href:{...D("Button link"),...r("label")},consentWords:H("label"),_gButton:f("Button"),rowField:m("Shows","text"),rowLinkField:m("Link from","link"),_dSize:u("Size"),...G({keys:W,fallback:P,group:!1}),_gStyle:f("Style"),variant:r("buttonColor"),icon:{type:"custom",render:o=>t(X,{value:o.value,onChange:o.onChange})},iconPosition:r("icon"),arrow:r("icon"),buttonColor:d("Fill color",z,t(F,{}),Z),buttonFillOpacity:r("buttonColor"),buttonBorder:U(),buttonTextColor:d("Text color",R,t(B,{})),_dLayout:u("Layout"),...Y()},resolveFields:(o,i)=>J(q(i.fields,o,i),o.props,"label",["href"]),showWhenFacts:V};export{ho as ButtonBlockFields};
1
+ import{jsx as e,jsxs as B}from"react/jsx-runtime";import{ButtonIcon as C,ButtonIconIcon as S,IconAfterTextIcon as T,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as k}from"efficient-easel/panel";import{useSelectedFields as m}from"efficient-easel/easel";import{buttonFieldSet as F}from"efficient-easel/screen/lib/document/button-fields";import{IconPicker as v,Segmented as O}from"efficient-shell/ui";import{shellGlyphOf as P}from"../../../shell-glyph.js";import{StorefrontTextLinkField as _}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as N,buttonIconChoice as R,buttonIconSide as j,buttonWidth as L}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as W,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as z}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as A,siteButtonPaint as d,siteButtonRadiusPx as E}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as D,buttonWordsEntryField as U,inOwnBox as G,linkField as H,plainText as K,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as V}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as q}from"../../../box-fields.js";import{CARD_ROW_FACTS as J,cardRowField as h,cardRowFields as M}from"../../../card-row-fields.js";import{consentWordsKept as Q,withConsentWordsRow as X}from"../../../consent-words-field.js";const b=o=>P(o==="none"?"no-symbol":o),Y=N.map(o=>({value:o,icon:b(o)}));function Z({value:o,onChange:n}){const t=m(),i=t.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(_,{label:"Button",icon:e(C,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>t.onChange("href",l)})}function $({value:o,onChange:n}){const t=m(),i=R(o,t.values.arrow),s=j(t.values.iconPosition),l=L(t.values.widthFit)==="fill",I=b("icon-at-end");return e(k,{label:r("Icon"),icon:e(S,{size:18}),children:B("div",{className:"flex items-center gap-2",children:[e(v,{label:r("Icon"),value:i,emptyValue:"none",options:Y,onChange:n}),i!=="none"&&e(O,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:g=>t.onChange("iconPosition",g),options:[{value:"before",icon:e(w,{size:16}),label:e("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:e(T,{size:16}),label:e("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:I,label:e("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>d(a().theme),y=F({follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[n]=f("buttonColor"),{theme:t}=a(),i=u({variant:o,buttonColor:n}).border.width,s=z(n)??(o==="ghost"?A(t).text:d(t).fill);return{width:i,color:s}},useCorners:()=>E(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:V,resetTo:o=>D(o,r("Styles")),padding:{fallback:W},say:q});function oo(o,n){const t=Object.keys(o);return Object.fromEntries(t.slice(0,t.indexOf(n)+1).map(i=>[i,o[i]]))}const So={fields:{label:G(K("Button"),o=>e(Z,{value:o.value,onChange:o.onChange})),labelText:U("label"),href:{...H("Button link"),...c("label")},consentWords:Q("label"),_gButton:p("Button"),rowField:h("Shows","text"),rowLinkField:h("Link from","link"),...oo(y,"_dDesign"),_gStyle:p("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>e($,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...y},resolveFields:(o,n)=>X(M(n.fields,o,n),o.props,"label",["href"]),showWhenFacts:J};export{So as ButtonBlockFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{EyeOffIcon as d,StylesIcon as r,WeightIcon as c,WidthIcon as p}from"efficient-easel/icons";import{deviceField as f}from"efficient-easel/screen/lib/document/device-fields";import{keptBy as m,swapPadding as a,toggle as g}from"../../../controls.js";import{select as I,sidesPaddingFields as D,slider as s}from"../../../box-fields.js";import{DEFAULT_DIVIDER_STYLE as t,DIVIDER_SPACE_PX as E,DIVIDER_STYLE_OPTIONS as _,parseDividerSpacing as h}from"../../../../../../format/lib/sections/divider-style.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";const S={any:[{field:"style",set:!1},{field:"style",is:t}]},P={not:{field:"style",is:"none"}},b={fields:y({style:I("Style",e(r,{}),_,t),spacing:m("sectionPaddingTop"),thickness:s("Thickness",e(c,{}),1,8,1,1,"px"),lengthPct:s("Length",e(p,{}),10,100,1,100,"%"),hideOnMobile:f("mobile",g("Hide",!1,e(d,{})))},[[["thickness"],S],[["lengthPct"],P]]),resolveFields:(o,{fields:n})=>{const i=E[h(o.props.spacing)],l=D({fallback:{top:i,bottom:i}});return a(n,l)}};export{b as DividerFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{EyeOffIcon as r,StylesIcon as d,WeightIcon as p,WidthIcon as c}from"efficient-easel/icons";import{deviceField as m}from"efficient-easel/screen/lib/document/device-fields";import{swapPadding as f,toggle as a}from"../../../controls.js";import{keptByRow as g}from"efficient-easel/screen/lib/document/style-fields";import{select as I,sidesPaddingFields as D,slider as o}from"../../../box-fields.js";import{DEFAULT_DIVIDER_STYLE as s,DIVIDER_SPACE_PX as E,DIVIDER_STYLE_OPTIONS as _,parseDividerSpacing as h}from"../../../../../../format/lib/sections/divider-style.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";const S={any:[{field:"style",set:!1},{field:"style",is:s}]},P={not:{field:"style",is:"none"}},v={fields:y({style:I("Style",e(d,{}),_,s),spacing:g("sectionPaddingTop"),thickness:o("Thickness",e(p,{}),1,8,1,1,"px"),lengthPct:o("Length",e(c,{}),10,100,1,100,"%"),hideOnMobile:m("mobile",a("Hide",!1,e(r,{})))},[[["thickness"],S],[["lengthPct"],P]]),resolveFields:(t,{fields:n})=>{const i=E[h(t.props.spacing)],l=D({fallback:{top:i,bottom:i}});return f(n,l)}};export{v as DividerFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{phoneKey as i}from"efficient-easel/draw";import{BOX_CARD_PAD as r,BOX_DARKEN as a,BOX_DARKEN_STYLES as d,isBackgroundBox as u}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as O}from"../../../../../../format/lib/content/container-direction.js";import{CONTAINER_GAP as c}from"../../../../../../format/lib/content/container-gap.js";import{BOX_TAB_SHAPES as A,REEL_SHAPE_LABELS as F}from"../../../../../../format/lib/reel.js";import{deviceField as n}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as I,CropIcon as m,LineBetweenIcon as E,LineSolidIcon as P,OpacityIcon as w,ShadowIcon as L,StylesIcon as h,TargetIcon as B}from"efficient-easel/icons";import{boxBlockSpacingField as y,boxFillField as T,boxPhoneRowField as H,boxShareField as R,boxSharePhoneField as N,containerGapField as C,containerGapPhoneField as D,linkField as j,phoneChoiceField as G,plainText as K,swapPadding as g,toggle as s,upload as f,withPanelOnly as X}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as S,boxShapeOf as W}from"../../../../../../format/lib/content/box-shape.js";import{group as l}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as v,boxJustifyField as M,boxWrapField as U,placementField as V,select as p,sidesPaddingFields as b,slider as z}from"../../../box-fields.js";import{withRowRules as J}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Y}from"../../../separator-field.js";import{LOOP_SCROLLS as q}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as Q}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const Z={field:"bgImage",set:!0},$={field:"phoneRow",in:[2,3]},ee={not:{field:"gap",in:Array.from({length:-c.min},(o,t)=>c.min+t)}},oe={field:"direction",is:"tabs"},te={field:"line",in:[!0,!1]},ie={field:"anchor",set:!0},_=["fixed","screen"],ne={not:{any:[{field:"sectionHeightMode",in:_},{field:"sectionHeightModePhone",in:_}]}},ae={context:"parent.line",is:!0},le={field:"direction",is:"row",default:"row"},re={not:q},Ie={fields:J({_gContent:l("Content"),content:Q.content,_gLayout:l("Layout"),direction:{type:"radio",options:O("Flex")},tabShape:p("Tab shape",e(h,{}),A.map(o=>({label:F[o],value:o})),"tabs"),label:X(K("Tab name")),gap:n("desktop",C("Flex")),[i("gap")]:D("Flex"),justify:M(),align:v(),wrap:U(),boxShape:n("desktop",p("Box shape",e(m,{}),[...S],"auto")),[i("boxShape")]:n("mobile",G({label:"Box shape",icon:e(m,{}),options:[...S],desktopKey:"boxShape",resolve:(o,t)=>W(t)})),separator:Y(e(E,{size:18}),"none"),share:n("desktop",R()),[i("share")]:N(),phoneRow:H(),blockSpacing:y(),line:s("Line",!1,e(P,{}),"A line across the blocks, with a dot on each."),upcoming:s("Upcoming",!1,e(I,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:l("Shadow"),shadow:s("Shadow",!1,e(L,{})),fillColor:T(),_gBackground:l("Background image"),bgImage:n("desktop",f("Image","image/*")),bgImagePhone:n("mobile",f("Image","image/*")),darken:z("Darken",e(w,{}),a.min,a.max,a.step,a.fallback,a.unit),darkenStyle:p("Darken style",e(h,{}),d,d[0].value),placement:V("Content position"),_gLink:l("Link"),link:j("Link to"),jumpHighlight:s("Highlight when a link jumps here",!1,e(B,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],Z],[[i("share")],$],[[i("gap")],ee],[["tabShape"],oe],[["separator"],le],[["justify","wrap"],re],[["line"],te],[["upcoming"],ae],[["jumpHighlight"],ie],[["boxShape",i("boxShape")],ne]]),resolveFields:(o,{fields:t})=>{const k=o.props;if(u(k.bgImage)){const x=b({fallback:{top:r.desktop,bottom:r.desktop,left:r.side,right:r.side}});return g(t,x)}return o.props.padV2!==!0?g(t,b({fallback:{top:24,bottom:24}})):t}};export{Ie as FlexFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{phoneKey as t}from"efficient-easel/draw";import{BOX_CARD_PAD as a,BOX_DARKEN as i,BOX_DARKEN_STYLES as d,isBackgroundBox as k}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as u}from"../../../../../../format/lib/content/container-direction.js";import{BOX_TAB_SHAPES as I,REEL_SHAPE_LABELS as w}from"../../../../../../format/lib/reel.js";import{deviceField as l}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as F,CropIcon as c,LineBetweenIcon as O,LineSolidIcon as A,OpacityIcon as B,ShadowIcon as E,StylesIcon as m,TargetIcon as L}from"efficient-easel/icons";import{boxBlockSpacingField as H,boxFillField as R,boxPhoneRowField as y,boxShareField as P,boxSharePhoneField as T,containerGapRows as N,linkField as C,plainText as D,swapPadding as h,toggle as r,upload as g,withPanelOnly as j}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as S,boxShapeOf as K}from"../../../../../../format/lib/content/box-shape.js";import{group as n,phoneTwinFields as X}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as G,boxJustifyField as W,boxWrapField as M,placementField as v,segmented as U,select as p,sidesPaddingFields as f,slider as z}from"../../../box-fields.js";import{withRowRules as J}from"../../../../../../render/lib/document/show-when.js";import{separatorField as V}from"../../../separator-field.js";import{LOOP_SCROLLS as Y}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as q}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const Q={field:"bgImage",set:!0},Z={field:"phoneRow",in:[2,3]},$={field:"direction",is:"tabs"},ee={field:"line",in:[!0,!1]},oe={field:"anchor",set:!0},b=["fixed","screen"],te={not:{any:[{field:"sectionHeightMode",in:b},{field:"sectionHeightModePhone",in:b}]}},ie={context:"parent.line",is:!0},ne={field:"direction",is:"row",default:"row"},ae={not:Y},Ie={fields:J({_gContent:n("Content"),content:q.content,_gLayout:n("Layout"),direction:{type:"radio",options:u("Flex")},tabShape:p("Tab shape",e(m,{}),I.map(o=>({label:w[o],value:o})),"tabs"),label:j(D("Tab name")),...N("Flex"),justify:W(),align:G(),wrap:M(),boxShape:l("desktop",p("Box shape",e(c,{}),[...S],"auto")),[t("boxShape")]:X("boxShape",U("Box shape",e(c,{}),[...S],"auto",{phoneRest:o=>K(o)}))[t("boxShape")],separator:V(e(O,{size:18}),"none"),share:l("desktop",P()),[t("share")]:T(),phoneRow:y(),blockSpacing:H(),line:r("Line",!1,e(A,{}),"A line across the blocks, with a dot on each."),upcoming:r("Upcoming",!1,e(F,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:n("Shadow"),shadow:r("Shadow",!1,e(E,{})),fillColor:R(),_gBackground:n("Background image"),bgImage:l("desktop",g("Image","image/*")),bgImagePhone:l("mobile",g("Image","image/*")),darken:z("Darken",e(B,{}),i.min,i.max,i.step,i.fallback,i.unit),darkenStyle:p("Darken style",e(m,{}),d,d[0].value),placement:v("Content position"),_gLink:n("Link"),link:C("Link to"),jumpHighlight:r("Highlight when a link jumps here",!1,e(L,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],Q],[[t("share")],Z],[["tabShape"],$],[["separator"],ne],[["justify","wrap"],ae],[["line"],ee],[["upcoming"],ie],[["jumpHighlight"],oe],[["boxShape",t("boxShape")],te]]),resolveFields:(o,{fields:s})=>{const x=o.props;if(k(x.bgImage)){const _=f({fallback:{top:a.desktop,bottom:a.desktop,left:a.side,right:a.side}});return h(s,_)}return o.props.padV2!==!0?h(s,f({fallback:{top:24,bottom:24}})):s}};export{Ie as FlexFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{GRID_COLUMNS_FALLBACK as e,GRID_MAX_COLUMNS as s,GRID_MOBILE_MAX_COLUMNS as l,GRID_MOBILE_MIN_COLUMNS as m}from"../../../../../../format/lib/content/grid-span.js";import{ColumnsIcon as r}from"efficient-easel/icons";import{deviceField as i}from"efficient-easel/screen/lib/document/device-fields";import{slider as t}from"../../../box-fields.js";import{containerGapField as n}from"../../../controls.js";import{GridSlots as p}from"../../../../../../format/lib/document/blocks/general/Grid/meta.js";const L={fields:{columns:i("desktop",t("Columns",o(r,{}),1,s,1,e)),mobileColumns:i("mobile",t("Columns",o(r,{}),m,l,1,m)),gap:n("Grid"),content:p.content}};export{L as GridFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{GRID_COLUMNS_FALLBACK as s,GRID_MAX_COLUMNS as e,GRID_MOBILE_MAX_COLUMNS as n,GRID_MOBILE_MIN_COLUMNS as m}from"../../../../../../format/lib/content/grid-span.js";import{ColumnsIcon as r}from"efficient-easel/icons";import{deviceField as i}from"efficient-easel/screen/lib/document/device-fields";import{slider as t}from"../../../box-fields.js";import{containerGapRows as l}from"../../../controls.js";import{GridSlots as _}from"../../../../../../format/lib/document/blocks/general/Grid/meta.js";const L={fields:{columns:i("desktop",t("Columns",o(r,{}),1,e,1,s)),mobileColumns:i("mobile",t("Columns",o(r,{}),m,n,1,m)),...l("Grid"),content:_.content}};export{L as GridFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as d,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as l}from"efficient-easel/icons";import{containerDirectionField as c,containerGapField as g,heroGroupPlacementPoints as h,plainText as G,withIdentifier as H,withOffPage as F,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as O,boxJustifyField as P,boxWrapField as R,placementField as D,positionFields as E,sidesPaddingFields as I,slider as m}from"../../../box-fields.js";import{PH as T}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as w}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:w({_gContent:o("Content"),name:x(H(F(G("Box name",T.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:h}),width:m("Width",r(l,{}),d,p,5,u,"%"),direction:c("HeroGroup"),gap:g("HeroGroup"),justify:P(),align:O(),wrap:R(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...I()},[[["placement"],{context:"heroGroupDepth",is:0}]]),resolveFields:(e,{fields:t,appState:s})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(s?.data,a)===0)return t;const i={...t};return i.width=m("Width",r(l,{}),d,p,5,_,"%"),i}};export{S as HeroGroupFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as m,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as s}from"efficient-easel/icons";import{containerDirectionField as c,containerGapRows as h,heroGroupPlacementPoints as G,plainText as H,withIdentifier as g,withOffPage as R,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as F,boxJustifyField as O,boxWrapField as P,placementField as D,positionFields as E,sidesPaddingFields as w,slider as d}from"../../../box-fields.js";import{PH as I}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as T}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:T({_gContent:o("Content"),name:x(g(R(H("Box name",I.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:G}),width:d("Width",r(s,{}),m,p,5,u,"%"),direction:c("HeroGroup"),...h("HeroGroup"),justify:O(),align:F(),wrap:P(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...w()},[[["placement"],{context:"heroGroupDepth",is:0}]]),resolveFields:(e,{fields:t,appState:l})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(l?.data,a)===0)return t;const i={...t};return i.width=d("Width",r(s,{}),m,p,5,_,"%"),i}};export{S as HeroGroupFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{ImageIcon as _,ImagesIcon as g,MediaIcon as E,MediaLayoutSideBySideIcon as T,MediaLayoutStackedIcon as P,OpacityIcon as m,PlacementIcon as S,PlayIcon as F,UploadIcon as A}from"efficient-easel/icons";import{colorInput as d,edgePad as b,focusKeptField as i,MEDIA_TYPE_OPTIONS as f,phoneChoiceField as h,plainText as D,upload as a}from"../../../controls.js";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{segmented as l,slider as r}from"../../../box-fields.js";import{MEDIA_LAYOUT_DEFAULT as U,MEDIA_LAYOUT_LABELS as p,MEDIA_LAYOUTS as y,resolvePhoneLayout as v}from"../../../../../../format/lib/hero-media-layout.js";import{deviceNote as k}from"efficient-easel/screen/lib/document/device-fields";import{DEFAULT_OVERLAY_POSITION as C,OVERLAY_POSITION_OPTIONS as V}from"../../../../../../format/lib/sections/hero-overlay.js";import{heightField as s,slotNoticeField as M}from"../../shared-fields.js";import{forMediaType as u,heroMediaFields as Y,VIDEO_FILE_LABEL as B,VIDEO_FILE_PROMPT as N}from"../../../../../../render/lib/document/hero-media-parts.js";import{VIDEO_PLAYBACK_DEFAULT as x,VIDEO_PLAYBACK_LABELS as R,VIDEO_PLAYBACKS as K,VIDEO_SOURCE_DEFAULT as c,VIDEO_SOURCE_LABELS as w,VIDEO_SOURCES as H}from"../../../../../../format/lib/hero-video.js";const I=u("video","image"),L=u("image","image"),O={one:e(_,{}),side:e(T,{}),stacked:e(P,{})};import{HeroSingleSlots as j}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{DEFAULT_TINT as n}from"../../../../../../format/lib/content/tint.js";const to={fields:Y({_dDevice:k(),boxNotice:M("HeroSingle"),boxes:j.boxes,_gStyle:t("Style"),overlay:r("Overlay",e(m,{}),0,100,5,100,"%"),overlayColor:d("Overlay color",n),overlayPosition:b("Overlay position",V,C,"A corner would need a diagonal ramp, which this overlay does not draw.",e(S,{})),_gLayout:t("Layout"),heightDesktop:s("desktop"),heightMobile:s("mobile"),_gMedia:t("Media"),mediaType:l("Type",e(E,{}),f,"image"),mediaLayout:l("Layout",e(g,{}),y.map(o=>({label:p[o],value:o,picture:O[o]})),U),mediaLayoutPhone:h({label:"Layout",icon:e(g,{}),options:y.map(o=>({label:p[o],value:o,picture:O[o]})),desktopKey:"mediaLayout",resolve:v}),mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:i(),imageFocalPhone:i(),videoSource:l("Source",e(A,{}),H.map(o=>({label:w[o],value:o})),c),mediaVideo:a(B,"video/*",N),youtubeUrl:D("YouTube link","https://youtu.be/…"),videoPlayback:l("Playback",e(F,{}),K.map(o=>({label:R[o],value:o})),x),poster:a("Video poster","image/*","Upload a poster still"),_gTint:t("Image tint"),tintColor:d("Tint color",n),tintOpacity:r("Tint opacity",e(m,{}),0,100,5,0,"%"),mediaImage2:a("Background image","image/*","Upload a background image",{focus:"imageFocal2"}),imageFocal2:i(),imageFocal2Phone:i(),tintColor2:d("Tint color",n),tintOpacity2:r("Tint opacity",e(m,{}),0,100,5,0,"%")},{parts:{media:["mediaType","mediaLayout","mediaLayoutPhone","videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:["mediaImage","imageFocal","imageFocalPhone","tintColor","tintOpacity"],image2:["mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"]},onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","tintOpacity","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[I,{field:"videoSource",is:"upload",default:c}]},youtubeUrl:{all:[I,{field:"videoSource",is:"youtube",default:c}]},mediaLayout:{all:[L,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[L,{context:"device",is:"mobile"}]}},fallback:"image"})};export{to as HeroSingleFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{ImageIcon as E,ImagesIcon as g,MediaIcon as T,MediaLayoutSideBySideIcon as P,MediaLayoutStackedIcon as S,OpacityIcon as l,PlacementIcon as F,PlayIcon as A,UploadIcon as b}from"efficient-easel/icons";import{colorInput as d,edgePad as f,focusKeptField as a,MEDIA_TYPE_OPTIONS as h,plainText as D,upload as t}from"../../../controls.js";import{group as m,phoneTwinFields as U}from"efficient-easel/screen/lib/document/box-fields";import{segmented as i,slider as r}from"../../../box-fields.js";import{MEDIA_LAYOUT_DEFAULT as p,MEDIA_LAYOUT_LABELS as y,MEDIA_LAYOUTS as u,resolvePhoneLayout as v}from"../../../../../../format/lib/hero-media-layout.js";import{deviceNote as V}from"efficient-easel/screen/lib/document/device-fields";import{DEFAULT_OVERLAY_POSITION as k,OVERLAY_POSITION_OPTIONS as C}from"../../../../../../format/lib/sections/hero-overlay.js";import{heightField as s,slotNoticeField as M}from"../../shared-fields.js";import{forMediaType as I,heroMediaFields as Y,VIDEO_FILE_LABEL as B,VIDEO_FILE_PROMPT as N}from"../../../../../../render/lib/document/hero-media-parts.js";import{VIDEO_PLAYBACK_DEFAULT as x,VIDEO_PLAYBACK_LABELS as R,VIDEO_PLAYBACKS as w,VIDEO_SOURCE_DEFAULT as c,VIDEO_SOURCE_LABELS as K,VIDEO_SOURCES as H}from"../../../../../../format/lib/hero-video.js";const L=I("video","image"),O=I("image","image"),_={one:o(E,{}),side:o(P,{}),stacked:o(S,{})};import{HeroSingleSlots as j}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{DEFAULT_TINT as n}from"../../../../../../format/lib/content/tint.js";const te={fields:Y({_dDevice:V(),boxNotice:M("HeroSingle"),boxes:j.boxes,_gStyle:m("Style"),overlay:r("Overlay",o(l,{}),0,100,5,100,"%"),overlayColor:d("Overlay color",n),overlayPosition:f("Overlay position",C,k,"A corner would need a diagonal ramp, which this overlay does not draw.",o(F,{})),_gLayout:m("Layout"),heightDesktop:s("desktop"),heightMobile:s("mobile"),_gMedia:m("Media"),mediaType:i("Type",o(T,{}),h,"image"),mediaLayout:i("Layout",o(g,{}),u.map(e=>({label:y[e],value:e,picture:_[e]})),p),mediaLayoutPhone:U("mediaLayout",i("Layout",o(g,{}),u.map(e=>({label:y[e],value:e,picture:_[e]})),p,{phoneRest:e=>v(void 0,e)})).mediaLayoutPhone,mediaImage:t("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:a(),imageFocalPhone:a(),videoSource:i("Source",o(b,{}),H.map(e=>({label:K[e],value:e})),c),mediaVideo:t(B,"video/*",N),youtubeUrl:D("YouTube link","https://youtu.be/…"),videoPlayback:i("Playback",o(A,{}),w.map(e=>({label:R[e],value:e})),x),poster:t("Video poster","image/*","Upload a poster still"),_gTint:m("Image tint"),tintColor:d("Tint color",n),tintOpacity:r("Tint opacity",o(l,{}),0,100,5,0,"%"),mediaImage2:t("Background image","image/*","Upload a background image",{focus:"imageFocal2"}),imageFocal2:a(),imageFocal2Phone:a(),tintColor2:d("Tint color",n),tintOpacity2:r("Tint opacity",o(l,{}),0,100,5,0,"%")},{parts:{media:["mediaType","mediaLayout","mediaLayoutPhone","videoSource","mediaVideo","youtubeUrl","videoPlayback","poster"],image:["mediaImage","imageFocal","imageFocalPhone","tintColor","tintOpacity"],image2:["mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"]},onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","tintOpacity","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2"],video:["videoSource","videoPlayback","poster"]},rules:{mediaVideo:{all:[L,{field:"videoSource",is:"upload",default:c}]},youtubeUrl:{all:[L,{field:"videoSource",is:"youtube",default:c}]},mediaLayout:{all:[O,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[O,{context:"device",is:"mobile"}]}},fallback:"image"})};export{te as HeroSingleFields};
@@ -1,6 +1,7 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
- import { boxFieldBuilders } from "efficient-easel/screen/lib/document/box-fields";
2
+ import { boxFieldBuilders, type BoxFieldSay } from "efficient-easel/screen/lib/document/box-fields";
3
3
  type Rows = ReturnType<typeof boxFieldBuilders>;
4
+ export declare const rowSay: BoxFieldSay;
4
5
  export declare const slider: Rows["slider"];
5
6
  export declare const select: Rows["select"];
6
7
  export declare const Segmented: Rows["Segmented"];
@@ -1 +1 @@
1
- import{createElement as m}from"react";import{SettingsField as g}from"efficient-easel/panel";import{boxFieldBuilders as b,describedAs as f,iconOf as v}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as y}from"efficient-shell/ui";import{say as n}from"../../../format/lib/editor-words.js";const e=b(o=>n(o)),S=e.slider,G=e.select,J=e.Segmented,W=e.segmented,h=e.alignmentField,B=e.alignmentFields,E=e.blockAlignmentField,I=e.blockAlignmentFields,O=e.boxJustifyField,R=e.boxAlignField,j=e.boxWrapField,q=e.directionField,z=e.gapField,C=e.placementField,D=e.PlacementGridView,H=e.positionFields,K=e.sidesPaddingFields;function L(o,a,l,d,s={}){const c=t=>l.some(r=>r.value===t);return{type:"custom",...f({},{type:"radio",label:o,options:l.map(t=>t.label===void 0?{value:t.value}:{value:t.value,label:t.label})}),render:({value:t,onChange:r,field:F})=>{const x=l.map(i=>({value:i.value,...i.label===void 0?{}:{label:n(i.label)},icon:i.picture})),p=F?.currentValue,u=s.resolve?s.resolve(t)??d:c(t)?t:c(p)?p:d;return m(g,{label:n(o),icon:v(a)},m(y,{label:n(o),value:u,options:x,onChange:r,emptyValue:s.emptyValue}))}}}export{D as PlacementGridView,J as Segmented,h as alignmentField,B as alignmentFields,E as blockAlignmentField,I as blockAlignmentFields,R as boxAlignField,O as boxJustifyField,j as boxWrapField,q as directionField,z as gapField,L as iconPickerRow,C as placementField,H as positionFields,W as segmented,G as select,K as sidesPaddingFields,S as slider};
1
+ import{createElement as m}from"react";import{SettingsField as g}from"efficient-easel/panel";import{boxFieldBuilders as b,describedAs as f,iconOf as v}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as y}from"efficient-shell/ui";import{say as i}from"../../../format/lib/editor-words.js";const w=o=>i(o),e=b(w),G=e.slider,J=e.select,W=e.Segmented,h=e.segmented,B=e.alignmentField,E=e.alignmentFields,I=e.blockAlignmentField,O=e.blockAlignmentFields,R=e.boxJustifyField,j=e.boxAlignField,q=e.boxWrapField,z=e.directionField,C=e.gapField,D=e.placementField,H=e.PlacementGridView,K=e.positionFields,L=e.sidesPaddingFields;function M(o,a,l,d,s={}){const c=t=>l.some(r=>r.value===t);return{type:"custom",...f({},{type:"radio",label:o,options:l.map(t=>t.label===void 0?{value:t.value}:{value:t.value,label:t.label})}),render:({value:t,onChange:r,field:F})=>{const x=l.map(n=>({value:n.value,...n.label===void 0?{}:{label:i(n.label)},icon:n.picture})),p=F?.currentValue,u=s.resolve?s.resolve(t)??d:c(t)?t:c(p)?p:d;return m(g,{label:i(o),icon:v(a)},m(y,{label:i(o),value:u,options:x,onChange:r,emptyValue:s.emptyValue}))}}}export{H as PlacementGridView,W as Segmented,B as alignmentField,E as alignmentFields,I as blockAlignmentField,O as blockAlignmentFields,j as boxAlignField,R as boxJustifyField,q as boxWrapField,z as directionField,C as gapField,M as iconPickerRow,D as placementField,K as positionFields,w as rowSay,h as segmented,J as select,L as sidesPaddingFields,G as slider};
@@ -1,5 +1,4 @@
1
- import { type CustomField } from "./controls.js";
2
- export declare function consentWordsKept(wordsRow: string): CustomField<unknown> & {
1
+ export declare function consentWordsKept(wordsRow: string): import("efficient-easel/screen/lib/document/box-fields").BoxField<unknown> & {
3
2
  reachedBy: string;
4
3
  };
5
4
  export declare function withConsentWordsRow<F extends Record<string, unknown>>(fields: F, props: Record<string, unknown> | undefined, wordsRow: string, dropped?: readonly string[]): F;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{LockIcon as u}from"efficient-easel/icons";import{FieldText as c}from"efficient-easel/fields";import{SettingsField as p}from"efficient-easel/panel";import{CONSENT_WORDS_PROP as d,consentWordsOf as f}from"../../../format/lib/content/consent-banner.js";import{say as i}from"../../../format/lib/editor-words.js";import{keptBy as l}from"./controls.js";function a(){return{type:"custom",render:({id:r,name:n})=>{const t=`${r??n??d}-words`;return e(p,{label:i("Words"),icon:e(u,{}),htmlFor:t,children:e(c,{id:t,value:i("Set by country"),onChange:()=>{},readOnly:!0})})}}}function j(r){return l(r)}function w(r,n,t,m=[]){return f(n)===null?r:Object.fromEntries(Object.entries(r).filter(([o])=>!m.includes(o)).map(([o,s])=>[o,o===t?a():s]))}export{j as consentWordsKept,w as withConsentWordsRow};
1
+ import{jsx as e}from"react/jsx-runtime";import{LockIcon as u}from"efficient-easel/icons";import{FieldText as c}from"efficient-easel/fields";import{SettingsField as p}from"efficient-easel/panel";import{CONSENT_WORDS_PROP as d,consentWordsOf as f}from"../../../format/lib/content/consent-banner.js";import{say as i}from"../../../format/lib/editor-words.js";import{keptByRow as l}from"efficient-easel/screen/lib/document/style-fields";function a(){return{type:"custom",render:({id:r,name:n})=>{const t=`${r??n??d}-words`;return e(p,{label:i("Words"),icon:e(u,{}),htmlFor:t,children:e(c,{id:t,value:i("Set by country"),onChange:()=>{},readOnly:!0})})}}}function h(r){return l(r)}function j(r,n,t,m=[]){return f(n)===null?r:Object.fromEntries(Object.entries(r).filter(([o])=>!m.includes(o)).map(([o,s])=>[o,o===t?a():s]))}export{h as consentWordsKept,j as withConsentWordsRow};
@@ -3,11 +3,10 @@ import { type MediaValue } from "../../../format/lib/media-value.js";
3
3
  import { type LoadingShows } from "../../../format/lib/hero-video.js";
4
4
  import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
5
5
  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";
6
- import type { ShowWhenRule } from "../../../render/lib/document/show-when.js";
6
+ import { type ShowWhenRule } from "../../../render/lib/document/show-when.js";
7
7
  import { type SettingsBorderValue } from "efficient-easel/panel";
8
8
  import { type AlignmentPoint, FOCAL_DEFAULT } from "efficient-shell/ui";
9
9
  import type { GeocodeState } from "../../../format/lib/content/contact.js";
10
- import { type TextFit } from "../../../format/lib/content/block-size.js";
11
10
  import { type DirectionContainer } from "../../../format/lib/content/container-direction.js";
12
11
  import { BOX_SHARE_POINTS } from "../../../format/lib/content/box-layout.js";
13
12
  import { GAP_FIELD_CONTAINER, type GapContainer } from "../../../format/lib/content/container-gap.js";
@@ -57,6 +56,11 @@ export declare function SiteGapDefaultReset({ inherited, onReset, label, }: {
57
56
  }): import("react").JSX.Element;
58
57
  export declare function containerGapField(container: GapContainer): import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number>;
59
58
  export declare function containerGapPhoneField(container: GapContainer): CustomField<string | number>;
59
+ export declare const DESKTOP_GAP_NOT_OVERLAP: ShowWhenRule;
60
+ export declare function containerGapRows(container: GapContainer): {
61
+ [x: string]: import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number> | CustomField<string | number>;
62
+ gap: import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number>;
63
+ };
60
64
  export declare function containerDirectionField(container: DirectionContainer): import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
61
65
  export declare function heroGroupPlacementPoints(data: unknown, id: string | undefined): {
62
66
  value: string;
@@ -175,9 +179,6 @@ interface CornersRowTier {
175
179
  }
176
180
  export declare function cornersRowField(tier: CornersRowTier): CustomField<number | null>;
177
181
  export declare function useSelectedSibling(key: string): [unknown, (next: unknown) => void];
178
- export declare function keptBy<T = unknown>(reachedBy: string): CustomField<T> & {
179
- reachedBy: string;
180
- };
181
182
  export declare function keptBy<T = unknown>(): CustomField<T>;
182
183
  export declare function useSelectedPatch(): (patch: Record<string, unknown>) => void;
183
184
  export declare function cornerSidesField(): CustomField<string[] | null>;
@@ -185,7 +186,6 @@ export declare function sectionCornersField(): CustomField<number | null>;
185
186
  export declare function sectionShapeFields(): Record<string, unknown>;
186
187
  export declare function sectionBorderField(tier: "desktop" | "mobile"): CustomField<SettingsBorderValue | undefined>;
187
188
  export declare function buttonWordsEntryField(partKey: string): CustomField<undefined>;
188
- export declare function buttonBorderField(): CustomField<SettingsBorderValue | undefined>;
189
189
  export declare function cardCornersField(): CustomField<number | null>;
190
190
  export declare function templateField<V>(inner: CustomField<V>): CustomField<V>;
191
191
  export declare function cardShapeFields(): Record<string, unknown>;
@@ -195,12 +195,6 @@ export declare function boxSharePhoneField(): CustomField<string>;
195
195
  export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
196
196
  export declare function sizeField(label: string, min: number, max: number, step: number, fallback: number, role: TypeRole): CustomField<TypeSizeValue>;
197
197
  export declare function cellWidthFields(): Record<string, unknown>;
198
- export declare function blockSizeFields(opts?: {
199
- textFit?: TextFit;
200
- }): {
201
- size: Record<string, unknown>;
202
- text: Record<string, unknown>;
203
- };
204
198
  export declare function useSelectedProps(): Record<string, unknown>;
205
199
  export declare function phoneOverrideField(opts: {
206
200
  label: string;
@@ -212,43 +206,6 @@ export declare function phoneOverrideField(opts: {
212
206
  fallback: number;
213
207
  unit?: string;
214
208
  }): CustomField<number | null>;
215
- export declare function phoneChoiceField<V extends string>(opts: {
216
- label: string;
217
- icon: ReactElement;
218
- options: {
219
- label: string;
220
- value: V;
221
- picture?: ReactElement;
222
- }[];
223
- desktopKey: string;
224
- resolve: (stored: unknown, desktop: unknown) => V;
225
- }): CustomField<V | undefined>;
226
- export declare function PhoneChoiceStrip<V extends string>({ label, icon, options, value, resolved, restWord, onChange, }: {
227
- label: string;
228
- icon: ReactElement;
229
- options: {
230
- label: string;
231
- value: V;
232
- picture?: ReactElement;
233
- }[];
234
- value: V | undefined;
235
- resolved: V;
236
- restWord: string;
237
- onChange: (next: V | undefined) => void;
238
- }): import("react").JSX.Element;
239
- export declare function PhoneChoiceRow<V extends string>({ label, icon, options, desktopKey, resolve, value, onChange, }: {
240
- label: string;
241
- icon: ReactElement;
242
- options: {
243
- label: string;
244
- value: V;
245
- picture?: ReactElement;
246
- }[];
247
- desktopKey: string;
248
- resolve: (stored: unknown, desktop: unknown) => V;
249
- value: V | undefined;
250
- onChange: (next: V | undefined) => void;
251
- }): import("react").JSX.Element;
252
209
  export declare function spacingFields(opts?: {
253
210
  top?: number;
254
211
  bottom?: number;
@@ -279,17 +236,7 @@ export declare function date(label: string, icon?: ReactNode, hint?: string): Cu
279
236
  export declare function toggle(label: string, fallback: boolean, icon?: ReactNode, hint?: string): CustomField<boolean>;
280
237
  export declare function pageBackgroundField(): CustomField<string>;
281
238
  export declare function checkbox(label: string, fallback: boolean): CustomField<boolean>;
282
- export type FollowsSiteButton = {
283
- follows: "fill" | "ink";
284
- };
285
- export declare const FOLLOWS_SITE_BUTTON: FollowsSiteButton;
286
- export declare const FOLLOWS_SITE_BUTTON_INK: FollowsSiteButton;
287
- export type ColourOpacity = {
288
- key: string;
289
- unsetFrom: string;
290
- unset: (from: unknown) => number;
291
- };
292
- export declare function colorInput(label: string, fallback: string | FollowsSiteButton, icon?: ReactElement, opacity?: ColourOpacity): CustomField<string>;
239
+ export declare function colorInput(label: string, fallback: string, icon?: ReactElement): CustomField<string>;
293
240
  export declare function boxFillField(): CustomField<string>;
294
241
  export declare function boxThemeIndexOf(data: unknown, id: string, own: unknown): number | null;
295
242
  export declare const FOCAL_POINTS: {