efficient-web-builder 67.8.1 → 68.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 (71) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/editor/components/BlockGapField.d.ts +4 -1
  3. package/dist/editor/components/BlockGapField.js +1 -1
  4. package/dist/editor/components/CornersField.d.ts +3 -1
  5. package/dist/editor/components/CornersField.js +1 -1
  6. package/dist/editor/components/SideSpaceField.d.ts +5 -1
  7. package/dist/editor/components/SideSpaceField.js +1 -1
  8. package/dist/editor/components/StorefrontEditor.js +1 -1
  9. package/dist/editor/components/WebsiteSettingsPanel.d.ts +0 -5
  10. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  11. package/dist/editor/components/storefront-editor.css +6 -1
  12. package/dist/editor/components/useSiteLengthRow.d.ts +15 -0
  13. package/dist/editor/components/useSiteLengthRow.js +1 -0
  14. package/dist/editor/lib/content/site-length-rows.d.ts +15 -0
  15. package/dist/editor/lib/content/site-length-rows.js +1 -0
  16. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  18. package/dist/editor/lib/document/box-fields.d.ts +2 -0
  19. package/dist/editor/lib/document/box-fields.js +1 -1
  20. package/dist/editor/lib/document/choice-pictures.d.ts +2 -0
  21. package/dist/editor/lib/document/choice-pictures.js +1 -1
  22. package/dist/editor/lib/document/controls.js +1 -1
  23. package/dist/editor/lib/document/shape-picker.js +1 -1
  24. package/dist/format/lib/content/block-align.d.ts +2 -0
  25. package/dist/format/lib/content/block-align.js +1 -1
  26. package/dist/format/lib/content/container-gap.d.ts +1 -0
  27. package/dist/format/lib/content/container-gap.js +1 -1
  28. package/dist/format/lib/content/css-length.d.ts +5 -6
  29. package/dist/format/lib/content/css-length.js +1 -1
  30. package/dist/format/lib/content/gallery-layout.d.ts +25 -11
  31. package/dist/format/lib/content/gallery-layout.js +1 -1
  32. package/dist/format/lib/content/grid-span.js +1 -1
  33. package/dist/format/lib/content/image-text-rows.d.ts +1 -0
  34. package/dist/format/lib/content/image-text-rows.js +1 -1
  35. package/dist/format/lib/content/page-width.d.ts +2 -1
  36. package/dist/format/lib/content/page-width.js +1 -1
  37. package/dist/format/lib/content/section-min-height.d.ts +3 -1
  38. package/dist/format/lib/content/section-min-height.js +1 -1
  39. package/dist/format/lib/content/view-lines.d.ts +7 -0
  40. package/dist/format/lib/content/view-lines.js +1 -1
  41. package/dist/format/lib/editor-words-kept.js +1 -1
  42. package/dist/format/lib/sections/section-head-placement.js +1 -1
  43. package/dist/format/lib/source-rules/site-length-writes.d.ts +18 -0
  44. package/dist/format/lib/source-rules/site-length-writes.js +2 -0
  45. package/dist/format/lib/theme.d.ts +5 -0
  46. package/dist/format/lib/theme.js +1 -1
  47. package/dist/render/components/ButtonBlock.js +1 -1
  48. package/dist/render/components/CardRowContext.d.ts +2 -1
  49. package/dist/render/components/CardRowContext.js +1 -1
  50. package/dist/render/components/Eyebrow.js +1 -1
  51. package/dist/render/components/Flex.js +1 -1
  52. package/dist/render/components/InBoxContext.d.ts +6 -0
  53. package/dist/render/components/InBoxContext.js +1 -1
  54. package/dist/render/components/Logo.js +1 -1
  55. package/dist/render/components/LogoBlock.js +1 -1
  56. package/dist/render/components/PreviewHeaderContext.d.ts +3 -1
  57. package/dist/render/components/PreviewHeaderContext.js +1 -1
  58. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  59. package/dist/render/components/SectionAnimation.js +1 -1
  60. package/dist/render/components/Split.js +1 -1
  61. package/dist/render/components/Text.js +1 -1
  62. package/dist/render/components/ViewHideRoot.d.ts +2 -1
  63. package/dist/render/components/ViewHideRoot.js +1 -1
  64. package/dist/render/lib/content/section-edge.js +1 -1
  65. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  66. package/dist/render/lib/document/passes/block-size.js +1 -1
  67. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  68. package/dist/render/lib/document/passes/section-height.js +1 -1
  69. package/dist/render/lib/document/passes/section-padding.js +1 -1
  70. package/dist/render/lib/document/passes/section-width.js +1 -1
  71. package/package.json +10 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 68.0.0 - 2026-11-13
4
+
5
+ From main at `12f6f423`: #737, #738, #739, #741, #743, #744, #745, #746, #747. A major: six PRs carry `!` (#737, #738, #741, #744, #746, #747). The peers move: `efficient-shell` `^12.33.0` -> `^13.0.0` and `efficient-easel` `^34.1.0` -> `^34.3.0` (#737). No stored key or value moves.
6
+
7
+ ### BREAKING
8
+
9
+ - **Peers** (#737): install efficient-shell 13.0.0 or later and efficient-easel 34.3.0 or later (the first easel whose peer range takes shell 13). `iconPickerRow({ cell })` now needs `words` on its cell (0 callers outside this repository).
10
+ - **A gallery wall is read from one node's stored props** (#738): `resolveGalleryLayout(props)`, `galleryLayoutCss(props)` and `galleryLayoutClass(props)` take the Gallery node's props (`GalleryLayoutProps`: `layout`, `layoutPhone`), not a layout key or value. A host with no phone value (product pictures) passes `{ layout }`. `GALLERY_LAYOUTS` rows no longer carry `phone`, `acrossPhone` or `leadPhone`; `galleryTailSpan` takes a full layout (`resolveGalleryLayout({ layout })`). A cast of a row to `GalleryLayout` still compiles and reads `undefined` phone fields: change each one.
11
+ - **One padding control per section** (#741): a section that declares its own `padTop` / `padBottom` rows and no `innerPadding` meta now throws when the registry is built. storefront-blocks 0.99.1 and older (DetailRows) throw; take storefront-blocks main 2cf491e1 or later (0.100.0). The own-pair compat fold is deleted.
12
+ - **A Box's section passes turn at the one phone edge (800)** (#744): a host sheet must scope its `.sf-gap-zone` and `.sf-section-minh-tablet` / `-phone` 720 rules with `:where(:not([data-sf-line~="edge"], [data-sf-line~="edge"] *))` and add edge copies at `(max-width: 799.98px)` / `(min-width: 800px) and (max-width: 1099.98px)`, in the same PR that takes this version. Without it, a Box gap with a tablet value draws wrong from 720 to 799 px.
13
+ - **Site length patches** (#746): `components/WebsiteSettingsPanel` no longer exports `siteWidthPatch`, `siteGutterPatch`, `siteGutterPhonePatch`, `blockGapPatch` or `blockGapPhonePatch`. Use `siteLengthPatch(row, value, unit)` from `lib/content/site-length-rows` (it also writes the unit column). 0 consumers.
14
+ - **Site length floor** (#747): `siteLengthHeld` and `siteLengthCss` no longer take the `{ floor }` option; the floor follows from the px grid passed. 0 hosts pass it.
15
+
16
+ **For hosts:**
17
+ - storefront-blocks (the 68 bump PR): peer `efficient-web-builder ^68.0.0`, shell 13, easel 34.3; the #738 gallery reader calls (GalleryGrid, gallery-toolbar `wallSpanAt`, DynamicGalleryGrid, product-pictures and the gallery scripts); DetailRows with `innerPadding` (blocks main 2cf491e1 or later); the #744 sheet rules beside storefront-blocks #524's `.sf-pad-*` rules; import `LINE_ATTR` / `LINE_EDGE` from `format/lib/content/view-lines` and delete the blocks copies.
18
+ - storefront: takes 68.0.0 with the blocks release; `scripts/probe-gallery-wall.tsx` follows #738.
19
+ - efficient-admin-portal: moves to shell 13 (`pictureChoiceField` `words: true`) and to storefront-blocks 0.100.0 in the same PR that takes this major, or DetailRows throws in its editor.
20
+
21
+ ### Added
22
+
23
+ - **A host names each card template row** (#739): `CardTemplateRows` takes optional `rowKey(row, index)`, so each copy keeps its state when rows go away or move. A key two rows share is made unique.
24
+ - **Subscribe can split its head into a Box** (#743): a `Subscribe` row in `SPLITTABLE_SECTIONS` (`headNum`, `headTitle`, `headDesc`, editorial head). Subscribe can also go into a Box (`BOX_MAY_HOLD`). A host draws no head of its own for a stored `headPlacement: "own-box"` Subscribe (storefront-blocks follow-up); nothing stores it today.
25
+ - **One home for the desktop place and text maps** (#745): `BLOCK_ALIGN_PLACE` and `BLOCK_ALIGN_TEXT` in `lib/content/block-align`; Text and Split use them (same class strings).
26
+ - **The site length rows take units** (#746): Corners, Content width, Side space, Block gap and the phone Side space and Block gap pick px, % or vw in the number box and save the number and its unit together. New: `lib/content/site-length-rows` (`siteLengthPatch`, `siteLengthConvert`, `siteLengthUnitPick`, `siteLengthGrid`, `siteLengthUnits`, `siteLengthRowAt`), `components/useSiteLengthRow`, `PreviewHeaderContext` `setSiteLengthUnits`, the `length` prop on `SideSpaceField`, `BlockGapField` and `CornersField`, `CORNER_RADIUS_GRID`, `SITE_LENGTH_UNIT_COLUMNS`.
27
+ - **Edge line exports** (#744): `LINE_ATTR`, `LINE_EDGE`, `EDGE_LINE_ATTRS`, `DrawLine`, `drawsAtEdge` (`format/lib/content/view-lines`), `useDrawsAtEdge`, `LineChoice`, `SITE_GUTTER_PHONE_EDGE_CLASS`, `SITE_BLOCK_GAP_PHONE_EDGE_CLASS`; `sectionFillPassClass(props, { atSectionLine? })`.
28
+ - **Gallery types** (#738): `GalleryLayoutProps`, `GalleryLayoutEntry`, `GalleryPhoneTrack`, `GalleryPhoneFieldsMissing`.
29
+
30
+ ### Changed
31
+
32
+ - **A picture cell's word wraps inside its cell** (#737): picture and word start at the top of every cell; every cell of one picker is one height. ProcessSteps Arrangement says "Columns", "Left" and "Right".
33
+ - **Logos** (#741): the "Space above and below" row shows only on a band that stored a value.
34
+
35
+ ### Fixed
36
+
37
+ - **Content width in % or vw starts at 1, not 0** (#747): the server refuses 0 there. One floor rule, `siteLengthTrack` (`lib/content/css-length`), for the editor track and the drawn number.
38
+
39
+ ### Deprecated
40
+
41
+ - (#741) `ownPairDefault`, `innerSpacingFields`, `spacingFields`, `PassInspector.spacingFields`, `phoneOverrideField`, `resolveSectionPadding`, `SectionPaddingProps`, `resolvePhoneValue`, `hasPhoneOverride`. Use `sidesPaddingFields`, the block's `innerPadding` meta, or `bandTopBottom` / `bandPadAttrs`. Delete by 2027-01-15. The `BREAKING CHANGE:` footer of commit f4259558 ("no longer exported") is superseded: these nine names stay exported in 68.0.0.
42
+
3
43
  ## 67.8.1 - 2026-11-12
4
44
 
5
45
  A patch: no `!`, no export moves, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. Only `src/lib/document/media-manifest.json` changes. No stored key or value moves.
@@ -1,3 +1,4 @@
1
+ import type { SiteRowLength } from "./useSiteLengthRow.js";
1
2
  import { type SiteRowView } from "../../format/lib/site-twin-row.js";
2
3
  export declare function blockGapRow(device: SiteRowView, site: {
3
4
  gap: number | null;
@@ -11,8 +12,10 @@ export declare function blockGapRow(device: SiteRowView, site: {
11
12
  value: number | null;
12
13
  followsPx: number | null;
13
14
  } | null;
14
- export default function BlockGapField({ value, onChange, followsPx, }: {
15
+ export default function BlockGapField({ value, onChange, followsPx, length, followsUnit, }: {
15
16
  value: number | null;
16
17
  onChange: (v: number | null) => void;
17
18
  followsPx?: number | null;
19
+ length?: SiteRowLength;
20
+ followsUnit?: string;
18
21
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as a}from"react/jsx-runtime";import{SettingsDefaultReset as u,SettingsField as d}from"efficient-easel/panel";import{AlignSeparateIcon as h}from"efficient-easel/icons";import{CONTAINER_GAP_BUILT_IN as m,SITE_BLOCK_GAP as t,halfDesktopGap as _,normalizeSiteBlockGap as g}from"../../format/lib/content/container-gap.js";import{say as l,editorEaselWords as k}from"../../format/lib/editor-words.js";import{Slider as b}from"../lib/document/controls.js";import{siteTwinRow as f}from"../../format/lib/site-twin-row.js";const A="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",B="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",r="Block gap",c=m.Grid;function E(o,e){return f(o,{desktop:{key:"block_gap",value:e.gap,followsPx:null},phone:{key:"block_gap_phone",value:e.phone,followsPx:e.gap===null?null:_(e.gap)}})}function G({value:o,onChange:e,followsPx:n=null}){const p=o===null,i=n===null?null:`${n}px`,s=n===null?c:g(n)??c;return a(d,{label:l(r),labelId:"sf-block-gap",icon:a(h,{}),changed:!p,action:a(u,{words:k()?.panel,label:l(r),changed:!p,detail:i??l("each block's own spacing"),onReset:()=>e(null)}),hint:l(i===null?A:B),children:a(b,{min:t.min,max:t.max,step:t.step,value:o,...o===null&&n===null?{}:{suffix:"px"},placeholder:s,...n===null?{placeholderWord:"Auto"}:n===s?{}:{placeholderWord:String(n)},onClear:()=>e(null),ariaLabel:l(r),onChange:e})})}export{E as blockGapRow,G as default};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{SettingsDefaultReset as _,SettingsField as h}from"efficient-easel/panel";import{AlignSeparateIcon as k}from"efficient-easel/icons";import{CONTAINER_GAP_BUILT_IN as b,SITE_BLOCK_GAP as i,halfDesktopGap as g,normalizeSiteBlockGap as f}from"../../format/lib/content/container-gap.js";import{say as l,editorEaselWords as A}from"../../format/lib/editor-words.js";import{Slider as B}from"../lib/document/controls.js";import{siteTwinRow as G}from"../../format/lib/site-twin-row.js";const x="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",T="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",r="Block gap",m=b.Grid;function K(a,n){return G(a,{desktop:{key:"block_gap",value:n.gap,followsPx:null},phone:{key:"block_gap_phone",value:n.phone,followsPx:n.gap===null?null:g(n.gap)}})}function I({value:a,onChange:n,followsPx:e=null,length:o,followsUnit:p="px"}){const s=a===null,c=e===null?null:`${e}${p}`,u=p==="px"&&(o?.unit??"px")==="px",d=e===null?m:u?f(e)??m:e;return t(h,{label:l(r),labelId:"sf-block-gap",icon:t(k,{}),changed:!s,action:t(_,{words:A()?.panel,label:l(r),changed:!s,detail:c??l("each block's own spacing"),onReset:()=>n(null)}),hint:l(c===null?x:T),children:t(B,{min:(o?.grid??i).min,max:(o?.grid??i).max,step:(o?.grid??i).step,value:a,...a===null&&e===null?{}:{suffix:o?.unit??"px",...o?{units:o.units}:{}},placeholder:d,...e===null?{placeholderWord:"Auto"}:u&&e===d?{}:{placeholderWord:String(e)},onClear:()=>n(null),ariaLabel:l(r),onChange:n})})}export{K as blockGapRow,I as default};
@@ -1,5 +1,7 @@
1
+ import type { SiteRowLength } from "./useSiteLengthRow.js";
1
2
  export declare const CORNERS_LABEL = "Corners";
2
- export default function CornersField({ value, onChange, }: {
3
+ export default function CornersField({ value, onChange, length, }: {
3
4
  value: number | null;
4
5
  onChange: (v: number | null) => void;
6
+ length?: SiteRowLength;
5
7
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as i,SettingsField as a}from"efficient-easel/panel";import{SquareIcon as d}from"efficient-easel/icons";import{CORNER_RADIUS_MAX as c,CORNER_RADIUS_MIN as l}from"../../format/lib/theme.js";import{say as t,editorEaselWords as u}from"../../format/lib/editor-words.js";import{Slider as p}from"../lib/document/controls.js";const m="Applies to panels, cards, inputs and buttons. Round things — color swatches, switches, status dots — stay round.",s="Corners";function R({value:o,onChange:r}){const n=o===null;return e(a,{label:t(s),icon:e(d,{}),changed:!n,action:e(i,{words:u()?.panel,label:t(s),changed:!n,detail:t("the built-in corners"),onReset:()=>r(null)}),hint:t(m),children:e(p,{min:l,max:c,step:1,value:o,...o===null?{}:{suffix:"px"},placeholder:l,placeholderWord:"Auto",onClear:()=>r(null),ariaLabel:t(s),onChange:r})})}export{s as CORNERS_LABEL,R as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{SettingsDefaultReset as a,SettingsField as d}from"efficient-easel/panel";import{SquareIcon as u}from"efficient-easel/icons";import{CORNER_RADIUS_MAX as c,CORNER_RADIUS_MIN as l}from"../../format/lib/theme.js";import{say as o,editorEaselWords as p}from"../../format/lib/editor-words.js";import{Slider as m}from"../lib/document/controls.js";const R="Applies to panels, cards, inputs and buttons. Round things — color swatches, switches, status dots — stay round.",i="Corners";function f({value:s,onChange:e,length:t}){const n=s===null;return r(d,{label:o(i),icon:r(u,{}),changed:!n,action:r(a,{words:p()?.panel,label:o(i),changed:!n,detail:o("the built-in corners"),onReset:()=>e(null)}),hint:o(R),children:r(m,{min:t?.grid.min??l,max:t?.grid.max??c,step:t?.grid.step??1,value:s,...s===null?{}:{suffix:t?.unit??"px",...t?{units:t.units}:{}},placeholder:l,placeholderWord:"Auto",onClear:()=>e(null),ariaLabel:o(i),onChange:e})})}export{i as CORNERS_LABEL,f as default};
@@ -1,9 +1,11 @@
1
1
  import { type SiteRowView } from "../../format/lib/site-twin-row.js";
2
+ import type { SiteRowLength } from "./useSiteLengthRow.js";
2
3
  export declare const SIDE_SPACE_LABEL = "Side space";
3
4
  export declare const SIDE_SPACE_HINT = "The room left at the left and right edge of every page.";
4
5
  export declare function sideSpaceRow(device: SiteRowView, site: {
5
6
  gutter: number | null;
6
7
  phone: number | null;
8
+ gutterUnit?: unknown;
7
9
  }): {
8
10
  key: "site_gutter";
9
11
  value: number | null;
@@ -24,7 +26,7 @@ export declare function sideSpaceRow(device: SiteRowView, site: {
24
26
  readonly step: 4;
25
27
  };
26
28
  } | null;
27
- export default function SideSpaceField({ value, onChange, unsetPx, bounds, }: {
29
+ export default function SideSpaceField({ value, onChange, unsetPx, bounds, length, restsOn, }: {
28
30
  value: number | null;
29
31
  onChange: (v: number | null) => void;
30
32
  unsetPx?: number;
@@ -33,4 +35,6 @@ export default function SideSpaceField({ value, onChange, unsetPx, bounds, }: {
33
35
  readonly max: number;
34
36
  readonly step: number;
35
37
  };
38
+ length?: SiteRowLength;
39
+ restsOn?: number;
36
40
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{SettingsDefaultReset as d,SettingsField as u}from"efficient-easel/panel";import{PaddingXIcon as m}from"efficient-easel/icons";import{SITE_GUTTER as i,SITE_GUTTER_PHONE as c,siteGutterPhoneFollows as f}from"../../format/lib/content/page-width.js";import{say as r,editorEaselWords as S}from"../../format/lib/editor-words.js";import{Slider as _}from"../lib/document/controls.js";import{siteTwinRow as x}from"../../format/lib/site-twin-row.js";const l="Side space",p=i.default,E="The room left at the left and right edge of every page.";function y(t,e){return x(t,{desktop:{key:"site_gutter",value:e.gutter,unsetPx:p,bounds:i},phone:{key:"site_gutter_phone",value:e.phone,unsetPx:f(e.gutter),bounds:c}})}function g({value:t,onChange:e,unsetPx:a=p,bounds:n=i}){const s=t===null;return o(u,{label:r(l),labelId:"sf-side-space",icon:o(m,{}),changed:!s,action:o(d,{words:S()?.panel,label:r(l),changed:!s,detail:`${a}px`,onReset:()=>e(null)}),hint:r(E),children:o(_,{min:n.min,max:n.max,step:n.step,value:t,suffix:"px",placeholder:a,onClear:()=>e(null),ariaLabel:r(l),onChange:e})})}export{E as SIDE_SPACE_HINT,l as SIDE_SPACE_LABEL,g as default,y as sideSpaceRow};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{SettingsDefaultReset as m,SettingsField as c}from"efficient-easel/panel";import{PaddingXIcon as f}from"efficient-easel/icons";import{SITE_GUTTER as s,SITE_GUTTER_PHONE as S,siteGutterPhoneFollows as _}from"../../format/lib/content/page-width.js";import{say as i,editorEaselWords as x}from"../../format/lib/editor-words.js";import{Slider as E}from"../lib/document/controls.js";import{siteTwinRow as g}from"../../format/lib/site-twin-row.js";const a="Side space",p=s.default,T="The room left at the left and right edge of every page.";function U(o,e){return g(o,{desktop:{key:"site_gutter",value:e.gutter,unsetPx:p,bounds:s},phone:{key:"site_gutter_phone",value:e.phone,unsetPx:_(e.gutter,e.gutterUnit),bounds:S}})}function I({value:o,onChange:e,unsetPx:l=p,bounds:n=s,length:t,restsOn:u=l}){const d=o===null;return r(c,{label:i(a),labelId:"sf-side-space",icon:r(f,{}),changed:!d,action:r(m,{words:x()?.panel,label:i(a),changed:!d,detail:`${l}px`,onReset:()=>e(null)}),hint:i(T),children:r(E,{min:(t?.grid??n).min,max:(t?.grid??n).max,step:(t?.grid??n).step,value:o,suffix:t?.unit??"px",...t?{units:t.units}:{},placeholder:u,onClear:()=>e(null),ariaLabel:i(a),onChange:e})})}export{T as SIDE_SPACE_HINT,a as SIDE_SPACE_LABEL,I as default,U as sideSpaceRow};
@@ -1 +1 @@
1
- "use client";import{jsx as c,jsxs as wt}from"react/jsx-runtime";import{useCallback as n,useEffect as f,useMemo as de,useRef as g,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as Ct}from"../lib/document/build-config.js";import{ChromeWrap as _t}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as Pt}from"efficient-easel/screen/lib/session";import{refreshSiteLiveState as Tt}from"../lib/site-live-state.js";import{holdSiteWrites as Et}from"../../format/lib/site-writes.js";import{backendOf as H,blocksOf as yt}from"../lib/website-session.js";import{useEaselSession as Gt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as vt}from"../../format/lib/document/site-gap-fields.js";import{withTemplateMediaPlaceholders as kt}from"../../format/lib/document/templateFields.js";import{setEditorPage as ue}from"../../format/lib/document/editor-page-context.js";import{EditorPagePathProvider as Wt}from"./EditorPagePathProvider.js";import{resolveSiteName as Ht}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as Rt,normalizeSiteGutterPhone as Bt,normalizeSiteWidth as Ft}from"../../format/lib/content/page-width.js";import{siteLengthNumber as w,siteLengthUnitsOfRow as It}from"../../format/lib/content/css-length.js";import{normalizeSiteBackground as he}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as le}from"../../format/lib/content/container-gap.js";import bt,{DocumentScreen as Dt}from"efficient-easel/screen/components/ScreenMount";import Mt from"./WebsiteHintsProvider.js";import{useScreenDocument as Nt}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as Ot,siteThemeRow as xt,themeEdited as At,themeSeeded as Ut}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as zt}from"./PreviewFooterContext.js";import{PreviewChatProvider as Lt,DEFAULT_CHAT_PREVIEW as Yt}from"./PreviewChatContext.js";import{PreviewSocialProvider as jt}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as Kt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Vt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Xt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Zt}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as qt}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Jt}from"efficient-easel/draw/client";import{CanvasPartsBridge as Qt}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as $t}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as er}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as tr,DEFAULT_HEADING_COMPRESSION as rr,DEFAULT_HEADING_TYPOGRAPHY as or,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as nr,DEFAULT_THEME_MODE as T,normalizeCornerRadius as ir,normalizeCornerStyle as ar,normalizeCardShadow as cr,normalizeCardGap as sr,normalizeHoverEffect as dr,IDENTITY_CARD_GAP as me,IDENTITY_CARD_SHADOW as ur,IDENTITY_HOVER_EFFECT as hr,THEME_MODE_KEY as pe,THEME_STORAGE_KEY as lr,THEME_SWITCH_HIDE as Se,THEME_SWITCH_KEY as B}from"../../format/lib/theme.js";import{pictureShadowColor as mr}from"efficient-easel/screen/lib/document/shadow-values";import{DEFAULT_FONTS as pr}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as Sr}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as fr}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as gr}from"../../render/lib/text-styles/site-text-styles.js";import{wordStylesFromRow as wr}from"../../format/lib/word-styles.js";import{chatPreviewFrom as Cr}from"./PreviewChatContext.js";const _r=()=>{if(typeof window>"u")return T;try{const s=window.localStorage.getItem(pe);return s==="light"||s==="dark"||s==="auto"?s:T}catch{return T}},fe=s=>{if(!(typeof window>"u"))try{window.localStorage.setItem(pe,s)}catch{}},Pr=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(B)!==Se}catch{return R}},Tr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(lr)}catch{}},ge=s=>{if(!(typeof window>"u"))try{s?window.localStorage.removeItem(B):window.localStorage.setItem(B,Se)}catch{}};function Er(){const{adapter:s,capabilities:d,templateId:F,ready:_,token:h,siteId:a,currentSlug:I,currentKind:b}=Nt();f(()=>(ue(I,b),()=>ue(null,null)),[I,b]);const E=d.placeholderFrames,[we,D]=r(null),[Ce,M]=r("");f(()=>{const e=s.templateName;if(!_||!F||!e){M("");return}let i=!1;return e().then(l=>!i&&M(l??"")).catch(()=>{}),()=>{i=!0}},[_,h,F,s]);const[_e,y]=r(T),[Pe,G]=r(R),[N,O]=r({value:{selected:0,themes:[]},readFor:null}),Te=N.value,[Ee,x]=r(pr),[ye,A]=r(nr),[Ge,U]=r(null),[ve,z]=r(rr),[ke,L]=r(null),[We,Y]=r(null),[He,j]=r(me),[Re,K]=r(null),[Be,V]=r(null),[Fe,X]=r(null),[Ie,Z]=r(null),[v,q]=r(null),[k,J]=r(null),[be,De]=r({}),u=Gt(),Q=de(()=>Ct(Pt(u),yt(u)),[u]),Me=de(()=>vt(kt(Q,E),v,k),[Q,E,v,k]),[Ne,$]=r(or),[Oe,ee]=r(null),[xe,te]=r(null),[Ae,re]=r(null),[Ue,oe]=r(null),[ze,ne]=r(null),ie=g(null),o=g(!1);f(()=>{y(_r()),G(Pr())},[]);const Le=n(e=>{o.current=!0,Tr(),fe(e),y(e)},[]),Ye=n(e=>{o.current=!0,ge(e),G(e)},[]),je=n(e=>{o.current=!0,O(i=>At(i,e,a??""))},[a]),Ke=n(e=>{o.current=!0,x(e)},[]),Ve=n(e=>{o.current=!0,A(e)},[]),Xe=n(e=>{o.current=!0,U(e)},[]),Ze=n(e=>{o.current=!0,z(e)},[]),qe=n(e=>{o.current=!0,L(e)},[]),Je=n(e=>{o.current=!0,Y(e)},[]),Qe=n(e=>{o.current=!0,j(e)},[]),$e=n(e=>{o.current=!0,K(e)},[]),et=n(e=>{o.current=!0,$(e)},[]),[tt,ae]=r(null),[rt,ot]=r(null),nt=n(e=>{o.current=!0,ae(e)},[]),it=n(e=>{o.current=!0,V(e)},[]),at=n(e=>{o.current=!0,X(e)},[]),ct=n(e=>{o.current=!0,Z(e)},[]),st=n(e=>{o.current=!0,q(e)},[]),dt=n(e=>{o.current=!0,J(e)},[]),ut=n(e=>{o.current=!0,ee(e)},[]),ht=n(e=>{o.current=!0,te(e)},[]),lt=n(e=>{o.current=!0,re(e)},[]),mt=n(e=>{o.current=!0,oe(e)},[]),pt=n(e=>{o.current=!0,ne(e)},[]);f(()=>{const e=H(u).theme;if(!h||!d.hasSiteTheme||!e)return;const i=a??"";ie.current!==i&&(ie.current=i,o.current=!1);let l=!1;return e.get(a?{siteId:a}:void 0).then(t=>{if(l||o.current)return;fe(t.default_mode),ge(t.show_theme_switch),y(t.default_mode),G(t.show_theme_switch),O(Ut({selected:t.selected_preset,themes:t.theme_presets},i));const C=gr(t);x(C.fonts),A(C.sizes);const S=It(t);De(S),U(t.corner_radius_px===void 0?tr[ar(t.corner_style)]:w(t.corner_radius_px,S.cornerRadiusUnit,ir)),z(C.compression),L(t.card_shadow==null?ur:cr(t.card_shadow)),j(t.card_gap==null?me:sr(t.card_gap)),K(t.hover_effect==null?hr:dr(t.hover_effect)),Y(mr(t.shadow_color)),V(w(t.site_width,S.siteWidthUnit,Ft)),X(w(t.site_gutter,S.siteGutterUnit,Rt)),Z(w(t.site_gutter_phone,S.siteGutterPhoneUnit,Bt)),q(w(t.block_gap,S.blockGapUnit,le)),J(w(t.block_gap_phone,S.blockGapPhoneUnit,le)),$(C.typography),ae(C.textStyles),ot(wr(t)),ee(t.hero_background_follows_width===!0),te(he(t.section_background_width)),re(he(t.section_content_width)),oe(t.photography_grayscale===!0),ne(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{l=!0}},[h,a,d.hasSiteTheme,u]);const St=Kt({token:h,siteId:a,enabled:d.hasSiteSettings}),[ft,ce]=r(Yt),se=g(null),W=g(!1),m=g(null),p=g({}),P=n(async()=>{m.current&&clearTimeout(m.current),m.current=null;const e=p.current;p.current={};try{await H(u).chat?.update(e,a?{siteId:a}:void 0),Tt()}catch(i){throw p.current={...e,...p.current},i}},[u,a]);f(()=>Et(()=>m.current||Object.keys(p.current).length>0?P():void 0),[P]);const gt=n(e=>{W.current=!0,ce(i=>({...i,...e})),!(!d.hasSiteSettings||!h)&&(p.current={...p.current,...e},m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{P().catch(()=>{})},500))},[d.hasSiteSettings,h,P]);return f(()=>{if(!h||!d.hasSiteSettings)return;const e=a??"";se.current!==e&&(se.current=e,W.current=!1);let i=!1;const l=H(u).chat;if(l)return l.get(a?{siteId:a}:void 0).then(t=>{i||W.current||ce(Cr(t))}).catch(()=>{}),()=>{i=!0}},[h,a,d.hasSiteSettings,u]),f(()=>{const e=s.site;if(!_||!d.hasSiteRecord||!e){D(null);return}let i=!1;return e().then(l=>{i||D(Ht(l.name))}).catch(()=>{}),()=>{i=!0}},[_,h,d.hasSiteRecord,a,s]),c(Dt,{config:Me,parts:Sr,wrap:(e,i)=>c(Ot,{websiteName:we,templateChrome:E,templateName:Ce||null,themeMode:_e,onThemeModeChange:Le,themeSwitchShown:Pe,onThemeSwitchShownChange:Ye,theme:Te,themeRow:xt(d.hasSiteTheme,N.readFor,a??""),onThemeChange:je,fonts:Ee,onFontsChange:Ke,cornerRadiusPx:Ge,onCornerRadiusPxChange:Xe,cardShadow:ke,onCardShadowChange:qe,shadowColor:We,onShadowColorChange:Je,cardGap:He,onCardGapChange:Qe,hoverEffect:Re,onHoverEffectChange:$e,headingCompression:ve,onHeadingCompressionChange:Ze,headingTypography:Ne,onHeadingTypographyChange:et,textStyles:tt,onTextStylesChange:nt,wordStyles:rt,sizes:ye,onSizesChange:Ve,siteWidth:Be,onSiteWidthChange:it,siteGutter:Fe,onSiteGutterChange:at,siteGutterPhone:Ie,onSiteGutterPhoneChange:ct,blockGap:v,onBlockGapChange:st,blockGapPhone:k,onBlockGapPhoneChange:dt,siteLengthUnits:be,heroBackgroundFollowsWidth:Oe,onHeroBackgroundFollowsWidthChange:ut,sectionBackgroundWidth:xe,onSectionBackgroundWidthChange:ht,sectionContentWidth:Ae,onSectionContentWidthChange:lt,photographyGrayscale:Ue,onPhotographyGrayscaleChange:mt,shareButtonOnPosts:ze,onShareButtonOnPostsChange:pt,themeFromDocument:!d.hasSiteTheme,children:c(zt,{children:c(_t,{wrap:u.chrome?.wrap,surface:"page",children:c(Zt,{children:c(qt,{children:c(Jt,{children:c($t,{children:c(Qt,{children:wt(er,{children:[c(Lt,{chat:ft,onChatChange:gt,children:c(jt,{value:St,children:c(Vt,{children:c(Wt,{children:c(Mt,{children:e})})})})}),i]})})})})})})})})})})}function yr({target:s}){return c(bt,{target:s,addressing:Xt,onHostMessage:fr,children:c(Er,{})})}export{yr as default};
1
+ "use client";import{jsx as c,jsxs as Ct}from"react/jsx-runtime";import{useCallback as o,useEffect as f,useMemo as he,useRef as g,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as _t}from"../lib/document/build-config.js";import{ChromeWrap as Pt}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as Tt}from"efficient-easel/screen/lib/session";import{refreshSiteLiveState as Et}from"../lib/site-live-state.js";import{holdSiteWrites as yt}from"../../format/lib/site-writes.js";import{backendOf as H,blocksOf as Gt}from"../lib/website-session.js";import{useEaselSession as vt}from"efficient-easel/screen/lib/session-context";import{withSiteBlockGapFields as kt}from"../../format/lib/document/site-gap-fields.js";import{withTemplateMediaPlaceholders as Wt}from"../../format/lib/document/templateFields.js";import{setEditorPage as ue}from"../../format/lib/document/editor-page-context.js";import{EditorPagePathProvider as Ht}from"./EditorPagePathProvider.js";import{resolveSiteName as Rt}from"../../format/lib/content/site-name.js";import{normalizeSiteGutter as Bt,normalizeSiteGutterPhone as Ft,normalizeSiteWidth as It}from"../../format/lib/content/page-width.js";import{siteLengthNumber as w,siteLengthUnitsOfRow as bt}from"../../format/lib/content/css-length.js";import{normalizeSiteBackground as le}from"../../format/lib/content/section-width.js";import{normalizeSiteBlockGap as me}from"../../format/lib/content/container-gap.js";import Dt,{DocumentScreen as Mt}from"efficient-easel/screen/components/ScreenMount";import Nt from"./WebsiteHintsProvider.js";import{useScreenDocument as Ot}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewHeaderProvider as xt,siteThemeRow as Ut,themeEdited as At,themeSeeded as Lt}from"../../render/components/PreviewHeaderContext.js";import{PreviewFooterProvider as zt}from"./PreviewFooterContext.js";import{PreviewChatProvider as Yt,DEFAULT_CHAT_PREVIEW as jt}from"./PreviewChatContext.js";import{PreviewSocialProvider as Kt}from"../../render/components/PreviewSocialContext.js";import{useSocialSettings as Vt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Xt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Zt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as qt}from"../../render/components/PreviewTickerContext.js";import{PreviewHeroPartProvider as Jt}from"../../render/components/PreviewHeroPartContext.js";import{PreviewPartsProvider as Qt}from"efficient-easel/draw/client";import{CanvasPartsBridge as $t}from"./CanvasPartsBridge.js";import{PreviewLocationPartProvider as er}from"../../render/components/PreviewLocationPartContext.js";import{PreviewPartStyleProvider as tr}from"./PreviewPartStyleContext.js";import{CORNER_STYLE_TO_PX as rr,DEFAULT_HEADING_COMPRESSION as or,DEFAULT_HEADING_TYPOGRAPHY as nr,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as ir,DEFAULT_THEME_MODE as T,normalizeCornerRadius as ar,normalizeCornerStyle as cr,normalizeCardShadow as sr,normalizeCardGap as dr,normalizeHoverEffect as hr,IDENTITY_CARD_GAP as pe,IDENTITY_CARD_SHADOW as ur,IDENTITY_HOVER_EFFECT as lr,THEME_MODE_KEY as Se,THEME_STORAGE_KEY as mr,THEME_SWITCH_HIDE as fe,THEME_SWITCH_KEY as B}from"../../format/lib/theme.js";import{pictureShadowColor as pr}from"efficient-easel/screen/lib/document/shadow-values";import{DEFAULT_FONTS as Sr}from"../../format/lib/fonts.js";import{WEBSITE_SCREEN as fr}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as gr}from"../../format/lib/website-host-inbound.js";import{siteTextFromRow as wr}from"../../render/lib/text-styles/site-text-styles.js";import{wordStylesFromRow as Cr}from"../../format/lib/word-styles.js";import{chatPreviewFrom as _r}from"./PreviewChatContext.js";const Pr=()=>{if(typeof window>"u")return T;try{const s=window.localStorage.getItem(Se);return s==="light"||s==="dark"||s==="auto"?s:T}catch{return T}},ge=s=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Se,s)}catch{}},Tr=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(B)!==fe}catch{return R}},Er=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(mr)}catch{}},we=s=>{if(!(typeof window>"u"))try{s?window.localStorage.removeItem(B):window.localStorage.setItem(B,fe)}catch{}};function yr(){const{adapter:s,capabilities:d,templateId:F,ready:_,token:u,siteId:a,currentSlug:I,currentKind:b}=Ot();f(()=>(ue(I,b),()=>ue(null,null)),[I,b]);const E=d.placeholderFrames,[Ce,D]=r(null),[_e,M]=r("");f(()=>{const e=s.templateName;if(!_||!F||!e){M("");return}let i=!1;return e().then(l=>!i&&M(l??"")).catch(()=>{}),()=>{i=!0}},[_,u,F,s]);const[Pe,y]=r(T),[Te,G]=r(R),[N,O]=r({value:{selected:0,themes:[]},readFor:null}),Ee=N.value,[ye,x]=r(Sr),[Ge,U]=r(ir),[ve,A]=r(null),[ke,L]=r(or),[We,z]=r(null),[He,Y]=r(null),[Re,j]=r(pe),[Be,K]=r(null),[Fe,V]=r(null),[Ie,X]=r(null),[be,Z]=r(null),[v,q]=r(null),[k,J]=r(null),[De,Q]=r({}),Me=o(e=>Q(i=>({...i,...e})),[]),h=vt(),$=he(()=>_t(Tt(h),Gt(h)),[h]),Ne=he(()=>kt(Wt($,E),v,k),[$,E,v,k]),[Oe,ee]=r(nr),[xe,te]=r(null),[Ue,re]=r(null),[Ae,oe]=r(null),[Le,ne]=r(null),[ze,ie]=r(null),ae=g(null),n=g(!1);f(()=>{y(Pr()),G(Tr())},[]);const Ye=o(e=>{n.current=!0,Er(),ge(e),y(e)},[]),je=o(e=>{n.current=!0,we(e),G(e)},[]),Ke=o(e=>{n.current=!0,O(i=>At(i,e,a??""))},[a]),Ve=o(e=>{n.current=!0,x(e)},[]),Xe=o(e=>{n.current=!0,U(e)},[]),Ze=o(e=>{n.current=!0,A(e)},[]),qe=o(e=>{n.current=!0,L(e)},[]),Je=o(e=>{n.current=!0,z(e)},[]),Qe=o(e=>{n.current=!0,Y(e)},[]),$e=o(e=>{n.current=!0,j(e)},[]),et=o(e=>{n.current=!0,K(e)},[]),tt=o(e=>{n.current=!0,ee(e)},[]),[rt,ce]=r(null),[ot,nt]=r(null),it=o(e=>{n.current=!0,ce(e)},[]),at=o(e=>{n.current=!0,V(e)},[]),ct=o(e=>{n.current=!0,X(e)},[]),st=o(e=>{n.current=!0,Z(e)},[]),dt=o(e=>{n.current=!0,q(e)},[]),ht=o(e=>{n.current=!0,J(e)},[]),ut=o(e=>{n.current=!0,te(e)},[]),lt=o(e=>{n.current=!0,re(e)},[]),mt=o(e=>{n.current=!0,oe(e)},[]),pt=o(e=>{n.current=!0,ne(e)},[]),St=o(e=>{n.current=!0,ie(e)},[]);f(()=>{const e=H(h).theme;if(!u||!d.hasSiteTheme||!e)return;const i=a??"";ae.current!==i&&(ae.current=i,n.current=!1);let l=!1;return e.get(a?{siteId:a}:void 0).then(t=>{if(l||n.current)return;ge(t.default_mode),we(t.show_theme_switch),y(t.default_mode),G(t.show_theme_switch),O(Lt({selected:t.selected_preset,themes:t.theme_presets},i));const C=wr(t);x(C.fonts),U(C.sizes);const S=bt(t);Q(S),A(t.corner_radius_px===void 0?rr[cr(t.corner_style)]:w(t.corner_radius_px,S.cornerRadiusUnit,ar)),L(C.compression),z(t.card_shadow==null?ur:sr(t.card_shadow)),j(t.card_gap==null?pe:dr(t.card_gap)),K(t.hover_effect==null?lr:hr(t.hover_effect)),Y(pr(t.shadow_color)),V(w(t.site_width,S.siteWidthUnit,It)),X(w(t.site_gutter,S.siteGutterUnit,Bt)),Z(w(t.site_gutter_phone,S.siteGutterPhoneUnit,Ft)),q(w(t.block_gap,S.blockGapUnit,me)),J(w(t.block_gap_phone,S.blockGapPhoneUnit,me)),ee(C.typography),ce(C.textStyles),nt(Cr(t)),te(t.hero_background_follows_width===!0),re(le(t.section_background_width)),oe(le(t.section_content_width)),ne(t.photography_grayscale===!0),ie(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{l=!0}},[u,a,d.hasSiteTheme,h]);const ft=Vt({token:u,siteId:a,enabled:d.hasSiteSettings}),[gt,se]=r(jt),de=g(null),W=g(!1),m=g(null),p=g({}),P=o(async()=>{m.current&&clearTimeout(m.current),m.current=null;const e=p.current;p.current={};try{await H(h).chat?.update(e,a?{siteId:a}:void 0),Et()}catch(i){throw p.current={...e,...p.current},i}},[h,a]);f(()=>yt(()=>m.current||Object.keys(p.current).length>0?P():void 0),[P]);const wt=o(e=>{W.current=!0,se(i=>({...i,...e})),!(!d.hasSiteSettings||!u)&&(p.current={...p.current,...e},m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{P().catch(()=>{})},500))},[d.hasSiteSettings,u,P]);return f(()=>{if(!u||!d.hasSiteSettings)return;const e=a??"";de.current!==e&&(de.current=e,W.current=!1);let i=!1;const l=H(h).chat;if(l)return l.get(a?{siteId:a}:void 0).then(t=>{i||W.current||se(_r(t))}).catch(()=>{}),()=>{i=!0}},[u,a,d.hasSiteSettings,h]),f(()=>{const e=s.site;if(!_||!d.hasSiteRecord||!e){D(null);return}let i=!1;return e().then(l=>{i||D(Rt(l.name))}).catch(()=>{}),()=>{i=!0}},[_,u,d.hasSiteRecord,a,s]),c(Mt,{config:Ne,parts:fr,wrap:(e,i)=>c(xt,{websiteName:Ce,templateChrome:E,templateName:_e||null,themeMode:Pe,onThemeModeChange:Ye,themeSwitchShown:Te,onThemeSwitchShownChange:je,theme:Ee,themeRow:Ut(d.hasSiteTheme,N.readFor,a??""),onThemeChange:Ke,fonts:ye,onFontsChange:Ve,cornerRadiusPx:ve,onCornerRadiusPxChange:Ze,cardShadow:We,onCardShadowChange:Je,shadowColor:He,onShadowColorChange:Qe,cardGap:Re,onCardGapChange:$e,hoverEffect:Be,onHoverEffectChange:et,headingCompression:ke,onHeadingCompressionChange:qe,headingTypography:Oe,onHeadingTypographyChange:tt,textStyles:rt,onTextStylesChange:it,wordStyles:ot,sizes:Ge,onSizesChange:Xe,siteWidth:Fe,onSiteWidthChange:at,siteGutter:Ie,onSiteGutterChange:ct,siteGutterPhone:be,onSiteGutterPhoneChange:st,blockGap:v,onBlockGapChange:dt,blockGapPhone:k,onBlockGapPhoneChange:ht,siteLengthUnits:De,onSiteLengthUnitsChange:Me,heroBackgroundFollowsWidth:xe,onHeroBackgroundFollowsWidthChange:ut,sectionBackgroundWidth:Ue,onSectionBackgroundWidthChange:lt,sectionContentWidth:Ae,onSectionContentWidthChange:mt,photographyGrayscale:Le,onPhotographyGrayscaleChange:pt,shareButtonOnPosts:ze,onShareButtonOnPostsChange:St,themeFromDocument:!d.hasSiteTheme,children:c(zt,{children:c(Pt,{wrap:h.chrome?.wrap,surface:"page",children:c(qt,{children:c(Jt,{children:c(Qt,{children:c(er,{children:c($t,{children:Ct(tr,{children:[c(Yt,{chat:gt,onChatChange:wt,children:c(Kt,{value:ft,children:c(Xt,{children:c(Ht,{children:c(Nt,{children:e})})})})}),i]})})})})})})})})})})}function Gr({target:s}){return c(Dt,{target:s,addressing:Zt,onHostMessage:gr,children:c(yr,{})})}export{Gr as default};
@@ -12,11 +12,6 @@ export type SiteStylesTabItem = {
12
12
  icon?: ReactNode;
13
13
  };
14
14
  export declare const SITE_STYLES_TABS: SiteStylesTabItem[];
15
- export declare function siteWidthPatch(v: number | null): SiteThemeRowPatch;
16
- export declare function blockGapPatch(v: number | null): SiteThemeRowPatch;
17
- export declare function blockGapPhonePatch(v: number | null): SiteThemeRowPatch;
18
- export declare function siteGutterPatch(v: number | null): SiteThemeRowPatch;
19
- export declare function siteGutterPhonePatch(v: number | null): SiteThemeRowPatch;
20
15
  export declare function SideSpaceRootField({ persist, }: {
21
16
  persist: (p: SiteThemeRowPatch, immediate?: boolean) => void;
22
17
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as T,jsxs as C}from"react/jsx-runtime";import{useEasel as I,useRootFields as H}from"efficient-easel/easel";import{Inspector as Y}from"efficient-easel/fields";import{SettingsGroup as j}from"efficient-easel/panel";import{useEffect as X,useRef as U,useState as E}from"react";import q from"./ThemeField.js";import K from"./CornersField.js";import M from"./CardShadowField.js";import $ from"./ShadowColourField.js";import V,{blockGapRow as J}from"./BlockGapField.js";import Q from"./HoverEffectField.js";import Z from"./PhotographyField.js";import D from"./ShareButtonField.js";import{usePreviewDevice as G}from"efficient-easel/draw/client";import ee,{sideSpaceRow as te}from"./SideSpaceField.js";import{BackgroundWidthRow as oe,ContentWidthRow as ne,SITE_BACKGROUND_HINT as re,SITE_CONTENT_HINT as ie}from"./SectionWidthRows.js";import se from"./SiteAccentField.js";import ae from"./SiteTextStylesField.js";import{usePreviewHeader as f}from"../../render/components/PreviewHeaderContext.js";import{EmptyState as ce,SliderGroup as le,Tabs as ue,Tooltip as de,tabButtonId as pe,tabPanelId as he}from"efficient-shell/ui";import{ContrastIcon as fe,SettingsIcon as ge,TypeIcon as me}from"efficient-easel/icons";import{useThemeRowPersist as Se}from"../lib/theme-row-persist.js";import{themeSaveNotice as _e}from"../../format/lib/theme-save-message.js";import{say as m}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as xe}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as w}from"../../format/lib/content/page-width.js";import{PAGE_STYLE_FIELDS as Ce}from"../lib/document/page-root-fields.js";import{previewFrame as Te}from"efficient-easel/screen/lib/document/preview-dom";import{siteTextColourNameOf as be,siteTextColours as Pe}from"../../format/lib/text-styles/site-text-colours.js";import{useSiteTextStylesWriter as ye}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as we,normalizeCornerRadius as Re,normalizeCornerStyle as Ee}from"../../format/lib/theme.js";import{pictureShadowColor as Ge}from"efficient-easel/screen/lib/document/shadow-values";const k="sf-site-styles",ke="sf-site-styles-tabpanel",Wt="text",O="basics",B="this-page-group",R=[{id:O,label:"Basics",icon:t(ge,{})},{id:"theme",label:"Theme",icon:t(fe,{})},{id:"text",label:"Text",icon:t(me,{})}];function Fe({themeFromDocument:e,persist:o}){const{appState:n,dispatch:r}=I(u=>u),{theme:s,setTheme:i}=f(),d=n.data,a=d.root?.props??{},p=u=>{if(e){const h={...a,theme:u};r({type:"replaceRoot",root:{...d.root,props:h},recordHistory:!0})}else i(u);o({selected_preset:u.selected,theme_presets:u.themes})};return t(q,{value:e?a.theme:s,onChange:p})}function Ie({themeFromDocument:e,persist:o}){const[n,r]=E(null),{theme:s,setFonts:i,setSizes:d,setHeadingTypography:a}=f(),p=ye({themeFromDocument:e,persist:o}),{old:u,saved:h,writeRoot:g}=p,l=p.fonts,_=p.sizes,x=p.typography,b=c=>c.values.size??Ae(Oe[c.id]??"body")??Be[c.kind],P=c=>p.write(c),y=Pe(s),A=be(s),N=c=>{const S={...l,accent:c};e?g({fonts:S}):i(S),o({accent_font:c})},L=c=>{d({..._,accent:c}),o({accent_size_px:c})},W=c=>{const S={...x,weightStrong:c};e?g({headingTypography:S}):a(S),o({heading_weight_strong:c})},z=c=>{const S={...x,italicStrong:c};e?g({headingTypography:S}):a(S),o({accent_italic:c})};return C(T,{children:[t(ae,{saved:h,old:u,colours:y,colourNameOf:A,sizeOf:b,onChange:P,openId:n===F?null:n,onOpenChange:r,withoutSize:e}),t(se,{font:l.accent,size:_.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:n===F,onOpenChange:c=>r(c?F:null),onChange:c=>{c.key==="font"?N(c.value):c.key==="size"?L(c.value):c.key==="weight"?W(c.value):z(c.value)},withoutSize:e})]})}const F="accent",Oe={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Be={heading:32,body:14},ve={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function Ae(e){if(typeof document>"u")return null;const n=(Te()?.contentDocument??document).querySelector(ve[e]);if(!n)return null;const r=parseFloat(getComputedStyle(n).fontSize);return Number.isFinite(r)?r:null}function Ne({themeFromDocument:e,persist:o}){const{appState:n,dispatch:r}=I(l=>l),{cornerRadiusPx:s,setCornerRadiusPx:i}=f(),d=n.data,a=d.root?.props??{},p=a.cornerRadiusPx===void 0?we[Ee(a.cornerStyle)]:Re(a.cornerRadiusPx),u=e?p:s,h=l=>r({type:"replaceRoot",root:{...d.root,props:{...a,...l}},recordHistory:!0});return t(K,{value:u,onChange:l=>{e?h({cornerRadiusPx:l}):i(l),o({corner_radius_px:l})}})}function Le(e){return{site_width:e}}function We({persist:e}){const{siteWidth:o,setSiteWidth:n,sectionBackgroundWidth:r,setSectionBackgroundWidth:s,sectionContentWidth:i,setSectionContentWidth:d}=f();if(G()!=="desktop")return null;const p=typeof o=="number"?o:w.default,u=l=>{n(l),e(Le(l),l===null)},h=l=>{s(l),e({section_background_width:l},!0)},g=l=>{d(l),e({section_content_width:l},!0)};return C(T,{children:[t(oe,{value:r??"full",changed:r!==null,detail:m("Full width"),onChange:h,onReset:()=>h(null),hint:re}),t(ne,{mode:i??"content",px:p,min:w.min,max:w.max,changed:typeof o=="number"||i!==null,detail:`${m("Content width")} ${w.default}px`,onMode:g,onPx:l=>u(l),onReset:()=>{g(null),u(null)},hint:ie})]})}function ze(e){return{block_gap:e}}function He(e){return{block_gap_phone:e}}function Ye(e){return{site_gutter:e}}function je(e){return{site_gutter_phone:e}}function v(e,[o,n],r){o(e),r(n(e),e===null)}function Xe({persist:e}){const{siteGutter:o,siteGutterPhone:n,setSiteGutter:r,setSiteGutterPhone:s}=f(),i=te(G(),{gutter:o,phone:n});if(!i)return null;const d=i.key==="site_gutter_phone"?[s,je]:[r,Ye];return t(ee,{value:i.value,onChange:a=>v(a,d,e),unsetPx:i.unsetPx,bounds:i.bounds})}function Ue({persist:e}){const{blockGap:o,blockGapPhone:n,setBlockGap:r,setBlockGapPhone:s}=f(),i=J(G(),{gap:o,phone:n});if(!i)return null;const d=i.key==="block_gap_phone"?[s,He]:[r,ze];return t(V,{value:i.value,onChange:a=>v(a,d,e),followsPx:i.followsPx})}function qe({persist:e}){return C(T,{children:[t(We,{persist:e}),t(Xe,{persist:e}),t(Ue,{persist:e})]})}function Ke(e){return{card_shadow:e}}function Me(e){return e===null?{shadow_color:null}:{shadow_color:Ge(e)}}function $e(e){return{hover_effect:e}}function Ve({persist:e}){const{cardShadow:o,setCardShadow:n,shadowColor:r,setShadowColor:s,hoverEffect:i,setHoverEffect:d}=f();return C(T,{children:[t(M,{value:o,onChange:a=>{n(a),e(Ke(a),!0)}}),t($,{value:r,onChange:a=>{s(a),e(Me(a),a===null)}}),t(Q,{value:i,onChange:a=>{d(a),e($e(a),!0)}})]})}function Je(e){return{photography_grayscale:e}}function Qe({persist:e}){const{photographyGrayscale:o,setPhotographyGrayscale:n}=f();return t(Z,{value:o,onChange:s=>{n(s),e(Je(s),!0)}})}function Ze({persist:e}){return t(T,{children:t(Qe,{persist:e})})}function De(e){return{share_button_on_posts:e}}function et({persist:e}){const{shareButtonOnPosts:o,setShareButtonOnPosts:n}=f();return t(D,{value:o,onChange:s=>{n(s),e(De(s),!0)}})}function tt(){const{websiteName:e}=f();return e?.trim()||xe}function zt(){const e=tt();return t(de,{content:m("{name} — renamed in the Console: {place}.",{name:e,place:m("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:t("span",{className:"sf-panel-site",children:e})})}function ot({themeFromDocument:e=!1,tokenRef:o,siteId:n,onNotify:r,tab:s,onTabChange:i,initialTab:d,revealPageGroup:a=!1,onPageGroupRevealed:p}){const{persist:u}=Se({themeFromDocument:e,tokenRef:o,siteId:n,onResult:P=>{const y=_e(P);y&&r?.(y.msg,y.tone)}}),[h,g]=E(d??R[0].id),l=s!==void 0,_=l?s:h,x=l?i??(()=>{}):g,b=R.find(P=>P.id===_)??R[0];return C(le,{children:[t(it,{activeId:b.id,onSelect:x}),C("div",{id:he(k,b.id),className:ke,role:"tabpanel","aria-labelledby":pe(k,b.id),children:[_===O&&C(T,{children:[t(Ne,{themeFromDocument:e,persist:u}),!e&&t(Ve,{persist:u}),!e&&t(qe,{persist:u}),!e&&t(Ze,{persist:u}),!e&&t(et,{persist:u}),t(nt,{reveal:a,onRevealed:p})]}),_==="theme"&&t(Fe,{themeFromDocument:e,persist:u}),_==="text"&&t(Ie,{themeFromDocument:e,persist:u})]})]})}function nt({reveal:e,onRevealed:o}){const[n,r]=E(!0),s=U(o);return s.current=o,X(()=>{if(!e)return;r(!0);const i=requestAnimationFrame(()=>{document.getElementById(B)?.scrollIntoView({block:"start"}),s.current?.()});return()=>cancelAnimationFrame(i)},[e]),t(j,{title:m("This page"),open:n,onToggle:r,id:B,children:t(rt,{})})}function rt(){const{fields:e,values:o,readOnly:n,onChange:r}=H(),s=Object.fromEntries(Ce.filter(i=>i in e).map(i=>[i,e[i]]));return Object.keys(s).length===0?t(ce,{variant:"none",icon:!1,message:m("This page has no look of its own to set.")}):t(Y,{fields:s,values:o,onChange:r,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:m("This page")})}function it({activeId:e,onSelect:o}){return t("div",{className:"es-insp-tabs",children:t(ue,{variant:"underline",block:!0,labelsFit:!0,"aria-label":m("Styles"),idPrefix:k,value:e,onChange:o,items:R.map(n=>{const r=m(n.label);return{id:n.id,icon:n.icon,label:r}})})})}export{Ue as BlockGapRootField,Ve as CardLookFields,qe as PageGroupFields,Ze as PhotographyGroupFields,O as SITE_STYLES_BASICS_TAB,k as SITE_STYLES_ID_PREFIX,R as SITE_STYLES_TABS,Wt as SITE_STYLES_TEXT_TAB,et as ShareButtonRootField,Xe as SideSpaceRootField,it as SiteStylesTabStrip,ke as TABPANEL_CLASS,B as THIS_PAGE_GROUP_ID,zt as WebsiteNameReadonly,ze as blockGapPatch,He as blockGapPhonePatch,Ke as cardShadowPatch,ot as default,$e as hoverEffectPatch,Je as photographyPatch,Me as shadowColourPatch,De as shareButtonPatch,Ye as siteGutterPatch,je as siteGutterPhonePatch,Le as siteWidthPatch,tt as useWebsiteName};
1
+ "use client";import{jsx as t,Fragment as x,jsxs as w}from"react/jsx-runtime";import{useEasel as O,useRootFields as H}from"efficient-easel/easel";import{Inspector as Y}from"efficient-easel/fields";import{SettingsGroup as j}from"efficient-easel/panel";import{useEffect as X,useRef as q,useState as G}from"react";import K from"./ThemeField.js";import M from"./CornersField.js";import $ from"./CardShadowField.js";import V from"./ShadowColourField.js";import J,{blockGapRow as Q}from"./BlockGapField.js";import Z from"./HoverEffectField.js";import D from"./PhotographyField.js";import ee from"./ShareButtonField.js";import{usePreviewDevice as k}from"efficient-easel/draw/client";import te,{sideSpaceRow as oe}from"./SideSpaceField.js";import{BackgroundWidthRow as ne,ContentWidthRow as re,SITE_BACKGROUND_HINT as ie,SITE_CONTENT_HINT as se}from"./SectionWidthRows.js";import ae from"./SiteAccentField.js";import le from"./SiteTextStylesField.js";import{usePreviewHeader as g}from"../../render/components/PreviewHeaderContext.js";import{useSiteLengthRow as P}from"./useSiteLengthRow.js";import{siteLengthRowAt as F}from"../lib/content/site-length-rows.js";import{EmptyState as ce,SliderGroup as ue,Tabs as de,Tooltip as pe,tabButtonId as he,tabPanelId as fe}from"efficient-shell/ui";import{ContrastIcon as ge,SettingsIcon as me,TypeIcon as Se}from"efficient-easel/icons";import{useThemeRowPersist as _e}from"../lib/theme-row-persist.js";import{themeSaveNotice as Ce}from"../../format/lib/theme-save-message.js";import{say as S}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as we}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as R}from"../../format/lib/content/page-width.js";import{storedUnit as xe}from"../../format/lib/content/css-length.js";import{PAGE_STYLE_FIELDS as Te}from"../lib/document/page-root-fields.js";import{previewFrame as be}from"efficient-easel/screen/lib/document/preview-dom";import{siteTextColourNameOf as ye,siteTextColours as Pe}from"../../format/lib/text-styles/site-text-colours.js";import{useSiteTextStylesWriter as Re}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as Ee,normalizeCornerRadius as Ge,normalizeCornerStyle as ke}from"../../format/lib/theme.js";import{pictureShadowColor as ve}from"efficient-easel/screen/lib/document/shadow-values";const v="sf-site-styles",Ie="sf-site-styles-tabpanel",Wt="text",A="basics",B="this-page-group",E=[{id:A,label:"Basics",icon:t(me,{})},{id:"theme",label:"Theme",icon:t(ge,{})},{id:"text",label:"Text",icon:t(Se,{})}];function Oe({themeFromDocument:e,persist:o}){const{appState:n,dispatch:s}=O(c=>c),{theme:r,setTheme:u}=g(),a=n.data,i=a.root?.props??{},p=c=>{if(e){const h={...i,theme:c};s({type:"replaceRoot",root:{...a.root,props:h},recordHistory:!0})}else u(c);o({selected_preset:c.selected,theme_presets:c.themes})};return t(K,{value:e?i.theme:r,onChange:p})}function Fe({themeFromDocument:e,persist:o}){const[n,s]=G(null),{theme:r,setFonts:u,setSizes:a,setHeadingTypography:i}=g(),p=Re({themeFromDocument:e,persist:o}),{old:c,saved:h,writeRoot:f}=p,m=p.fonts,d=p.sizes,C=p.typography,T=l=>l.values.size??Ne(Ae[l.id]??"body")??Be[l.kind],b=l=>p.write(l),y=Pe(r),L=ye(r),N=l=>{const _={...m,accent:l};e?f({fonts:_}):u(_),o({accent_font:l})},W=l=>{a({...d,accent:l}),o({accent_size_px:l})},z=l=>{const _={...C,weightStrong:l};e?f({headingTypography:_}):i(_),o({heading_weight_strong:l})},U=l=>{const _={...C,italicStrong:l};e?f({headingTypography:_}):i(_),o({accent_italic:l})};return w(x,{children:[t(le,{saved:h,old:c,colours:y,colourNameOf:L,sizeOf:T,onChange:b,openId:n===I?null:n,onOpenChange:s,withoutSize:e}),t(ae,{font:m.accent,size:d.accent,weight:C.weightStrong,italic:C.italicStrong,headingWeight:C.weight,open:n===I,onOpenChange:l=>s(l?I:null),onChange:l=>{l.key==="font"?N(l.value):l.key==="size"?W(l.value):l.key==="weight"?z(l.value):U(l.value)},withoutSize:e})]})}const I="accent",Ae={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Be={heading:32,body:14},Le={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function Ne(e){if(typeof document>"u")return null;const n=(be()?.contentDocument??document).querySelector(Le[e]);if(!n)return null;const s=parseFloat(getComputedStyle(n).fontSize);return Number.isFinite(s)?s:null}function We({themeFromDocument:e,persist:o}){const{appState:n,dispatch:s}=O(d=>d),{cornerRadiusPx:r,setCornerRadiusPx:u}=g(),a=n.data,i=a.root?.props??{},p=i.cornerRadiusPx===void 0?Ee[ke(i.cornerStyle)]:Ge(i.cornerRadiusPx),c=e?p:r,h=P("cornerRadius",r,u,o),f=d=>s({type:"replaceRoot",root:{...a.root,props:{...i,...d}},recordHistory:!0});return t(M,{value:c,onChange:d=>{e?(f({cornerRadiusPx:d}),o({corner_radius_px:d})):h.write(d)},...e?{}:{length:h.length}})}function ze({persist:e}){const{siteWidth:o,setSiteWidth:n,sectionBackgroundWidth:s,setSectionBackgroundWidth:r,sectionContentWidth:u,setSectionContentWidth:a}=g(),i=k(),p=P("siteWidth",o??null,n,e);if(i!=="desktop")return null;const c=typeof o=="number"?o:p.shown(R.default),h=p.write,f=d=>{r(d),e({section_background_width:d},!0)},m=d=>{a(d),e({section_content_width:d},!0)};return w(x,{children:[t(ne,{value:s??"full",changed:s!==null,detail:S("Full width"),onChange:f,onReset:()=>f(null),hint:ie}),t(re,{mode:u??"content",px:c,min:R.min,max:R.max,changed:typeof o=="number"||u!==null,detail:`${S("Content width")} ${R.default}px`,onMode:m,onPx:d=>h(d),onReset:()=>{m(null),h(null)},hint:se,length:p.length})]})}function Ue({persist:e}){const{siteGutter:o,siteGutterPhone:n,setSiteGutter:s,setSiteGutterPhone:r,siteLengthUnits:u}=g(),a=oe(k(),{gutter:o,phone:n,gutterUnit:u.siteGutterUnit}),i=a?.key==="site_gutter_phone",p=P(F("siteGutter",i?"mobile":"desktop"),a?.value??null,i?r:s,e);return a?t(te,{value:a.value,onChange:p.write,unsetPx:a.unsetPx,restsOn:p.shown(a.unsetPx),bounds:a.bounds,length:p.length}):null}function He({persist:e}){const{blockGap:o,blockGapPhone:n,setBlockGap:s,setBlockGapPhone:r,siteLengthUnits:u}=g(),a=Q(k(),{gap:o,phone:n}),i=a?.key==="block_gap_phone",p=a?.followsPx==null?null:{figure:a.followsPx,unit:xe(u.blockGapUnit)},c=P(F("blockGap",i?"mobile":"desktop"),a?.value??null,i?r:s,e,p);return a?t(J,{value:a.value,onChange:c.write,followsPx:c.rest,followsUnit:c.length.unit,length:c.length}):null}function Ye({persist:e}){return w(x,{children:[t(ze,{persist:e}),t(Ue,{persist:e}),t(He,{persist:e})]})}function je(e){return{card_shadow:e}}function Xe(e){return e===null?{shadow_color:null}:{shadow_color:ve(e)}}function qe(e){return{hover_effect:e}}function Ke({persist:e}){const{cardShadow:o,setCardShadow:n,shadowColor:s,setShadowColor:r,hoverEffect:u,setHoverEffect:a}=g();return w(x,{children:[t($,{value:o,onChange:i=>{n(i),e(je(i),!0)}}),t(V,{value:s,onChange:i=>{r(i),e(Xe(i),i===null)}}),t(Z,{value:u,onChange:i=>{a(i),e(qe(i),!0)}})]})}function Me(e){return{photography_grayscale:e}}function $e({persist:e}){const{photographyGrayscale:o,setPhotographyGrayscale:n}=g();return t(D,{value:o,onChange:r=>{n(r),e(Me(r),!0)}})}function Ve({persist:e}){return t(x,{children:t($e,{persist:e})})}function Je(e){return{share_button_on_posts:e}}function Qe({persist:e}){const{shareButtonOnPosts:o,setShareButtonOnPosts:n}=g();return t(ee,{value:o,onChange:r=>{n(r),e(Je(r),!0)}})}function Ze(){const{websiteName:e}=g();return e?.trim()||we}function zt(){const e=Ze();return t(pe,{content:S("{name} — renamed in the Console: {place}.",{name:e,place:S("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:t("span",{className:"sf-panel-site",children:e})})}function De({themeFromDocument:e=!1,tokenRef:o,siteId:n,onNotify:s,tab:r,onTabChange:u,initialTab:a,revealPageGroup:i=!1,onPageGroupRevealed:p}){const{persist:c}=_e({themeFromDocument:e,tokenRef:o,siteId:n,onResult:b=>{const y=Ce(b);y&&s?.(y.msg,y.tone)}}),[h,f]=G(a??E[0].id),m=r!==void 0,d=m?r:h,C=m?u??(()=>{}):f,T=E.find(b=>b.id===d)??E[0];return w(ue,{children:[t(ot,{activeId:T.id,onSelect:C}),w("div",{id:fe(v,T.id),className:Ie,role:"tabpanel","aria-labelledby":he(v,T.id),children:[d===A&&w(x,{children:[t(We,{themeFromDocument:e,persist:c}),!e&&t(Ke,{persist:c}),!e&&t(Ye,{persist:c}),!e&&t(Ve,{persist:c}),!e&&t(Qe,{persist:c}),t(et,{reveal:i,onRevealed:p})]}),d==="theme"&&t(Oe,{themeFromDocument:e,persist:c}),d==="text"&&t(Fe,{themeFromDocument:e,persist:c})]})]})}function et({reveal:e,onRevealed:o}){const[n,s]=G(!0),r=q(o);return r.current=o,X(()=>{if(!e)return;s(!0);const u=requestAnimationFrame(()=>{document.getElementById(B)?.scrollIntoView({block:"start"}),r.current?.()});return()=>cancelAnimationFrame(u)},[e]),t(j,{title:S("This page"),open:n,onToggle:s,id:B,children:t(tt,{})})}function tt(){const{fields:e,values:o,readOnly:n,onChange:s}=H(),r=Object.fromEntries(Te.filter(u=>u in e).map(u=>[u,e[u]]));return Object.keys(r).length===0?t(ce,{variant:"none",icon:!1,message:S("This page has no look of its own to set.")}):t(Y,{fields:r,values:o,onChange:s,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:S("This page")})}function ot({activeId:e,onSelect:o}){return t("div",{className:"es-insp-tabs",children:t(de,{variant:"underline",block:!0,labelsFit:!0,"aria-label":S("Styles"),idPrefix:v,value:e,onChange:o,items:E.map(n=>{const s=S(n.label);return{id:n.id,icon:n.icon,label:s}})})})}export{He as BlockGapRootField,Ke as CardLookFields,Ye as PageGroupFields,Ve as PhotographyGroupFields,A as SITE_STYLES_BASICS_TAB,v as SITE_STYLES_ID_PREFIX,E as SITE_STYLES_TABS,Wt as SITE_STYLES_TEXT_TAB,Qe as ShareButtonRootField,Ue as SideSpaceRootField,ot as SiteStylesTabStrip,Ie as TABPANEL_CLASS,B as THIS_PAGE_GROUP_ID,zt as WebsiteNameReadonly,je as cardShadowPatch,De as default,qe as hoverEffectPatch,Me as photographyPatch,Xe as shadowColourPatch,Je as shareButtonPatch,Ze as useWebsiteName};
@@ -3895,10 +3895,15 @@ input.sf-list-marking {
3895
3895
  justify-content: center;
3896
3896
  line-height: 0;
3897
3897
  }
3898
+ /* A word longer than its cell wraps inside the cell, centred, and is never cut or
3899
+ runs into the next cell (tests/browser/pickerCellWords). */
3898
3900
  .sf-pick-cap {
3899
3901
  font-size: var(--text-2xs);
3900
3902
  line-height: 1.2;
3901
- white-space: nowrap;
3903
+ white-space: normal;
3904
+ max-width: 100%;
3905
+ text-align: center;
3906
+ overflow-wrap: anywhere;
3902
3907
  }
3903
3908
  .sf-pick-cap-closed {
3904
3909
  display: none;
@@ -0,0 +1,15 @@
1
+ import { type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
2
+ import type { LengthUnitState } from "efficient-easel/screen/lib/document/box-fields";
3
+ import { type SiteLengthRow } from "../lib/content/site-length-rows.js";
4
+ import type { SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
5
+ export type SiteRowLength = Pick<LengthUnitState, "grid" | "unit" | "units">;
6
+ export type SiteRowFollows = {
7
+ figure: number;
8
+ unit: LengthUnit;
9
+ };
10
+ export declare function useSiteLengthRow(row: SiteLengthRow, value: number | null, setPreview: (v: number | null) => void, persist: (p: SiteThemeRowPatch, immediate?: boolean) => void, follows?: SiteRowFollows | null): {
11
+ length: SiteRowLength;
12
+ write: (v: number | null) => void;
13
+ rest: number | null;
14
+ shown: (px: number) => number;
15
+ };
@@ -0,0 +1 @@
1
+ "use client";import{viewKeyAt as g}from"efficient-easel/draw";import{shownUnitAt as a,unitKeyOnWrite as x}from"efficient-easel/screen/lib/content/length-units";import{usePreviewHeader as k}from"../../render/components/PreviewHeaderContext.js";import{storedUnit as p}from"../../format/lib/content/css-length.js";import{siteLengthColumns as C,siteLengthConvert as L,siteLengthGrid as K,siteLengthPatch as A,siteLengthUnitPick as P,siteLengthUnits as S}from"../lib/content/site-length-rows.js";import{say as G}from"../../format/lib/editor-words.js";function q(i,s,o,c,e){const{siteLengthUnits:U,setSiteLengthUnits:f}=k(),r=`${i}Unit`,h=U[r],n=a({n:e?.figure??null,u:e?.unit??null,[g("n","mobile")]:s,[g("u","mobile")]:h??null},{n:"n"},"u","mobile"),m=t=>f({[r]:t==="px"?null:t}),d=t=>{o(t);const u=x(r,h,n,"px",t===null);r in u&&m(u[r]==null?null:p(u[r])),c(A(i,t,n),t===null)},b=t=>{const u=p(t);if(u===n||(m(u),s===null))return;const l=P(i,s,n,u);o(l[C(i).number]),c(l,!0)},y=e?e.unit===n?e.figure:L(i,e.figure,e.unit,n):null;return{length:{unit:n,grid:K(i,n),units:{options:S(i),onChange:b,label:G("Unit")}},write:d,rest:y,shown:t=>L(i,t,"px",n)}}export{q as useSiteLengthRow};
@@ -0,0 +1,15 @@
1
+ import { type LengthGrid, type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
2
+ import { type ViewTier } from "efficient-easel/draw";
3
+ import type { SiteThemeRow, SiteThemeRowPatch } from "../../../format/lib/site-theme-row.js";
4
+ export declare const SITE_LENGTH_ROWS: readonly ["cornerRadius", "siteWidth", "siteGutter", "siteGutterPhone", "blockGap", "blockGapPhone"];
5
+ export type SiteLengthRow = (typeof SITE_LENGTH_ROWS)[number];
6
+ export declare function siteLengthColumns(row: SiteLengthRow): {
7
+ number: keyof SiteThemeRow;
8
+ unit: keyof SiteThemeRow;
9
+ };
10
+ export declare function siteLengthPatch(row: SiteLengthRow, value: number | null, unit: unknown): SiteThemeRowPatch;
11
+ export declare function siteLengthConvert(row: SiteLengthRow, value: number, from: unknown, to: unknown): number;
12
+ export declare function siteLengthUnitPick(row: SiteLengthRow, value: number, from: unknown, to: unknown): SiteThemeRowPatch;
13
+ export declare function siteLengthGrid(row: SiteLengthRow, unit: unknown): LengthGrid;
14
+ export declare function siteLengthUnits(row: SiteLengthRow): readonly LengthUnit[];
15
+ export declare function siteLengthRowAt(desktop: "cornerRadius" | "siteWidth" | "siteGutter" | "blockGap", tier: ViewTier): SiteLengthRow;
@@ -0,0 +1 @@
1
+ import{convertRowLength as _,rowUnits as k,unitPickPatch as h}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as b}from"efficient-easel/draw";import{SITE_LENGTH_UNIT_COLUMNS as G,siteLengthTrack as T,storedUnit as s}from"../../../format/lib/content/css-length.js";import{SITE_BLOCK_GAP as m}from"../../../format/lib/content/container-gap.js";import{PAGE_WIDTH as a,SITE_GUTTER as l,SITE_GUTTER_PHONE as E}from"../../../format/lib/content/page-width.js";import{LENGTH_UNITS_TABLE as f}from"../document/box-fields.js";import{CORNER_RADIUS_GRID as L}from"../../../format/lib/theme.js";const P=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],p={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:L,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:a,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:l,tier:"desktop"},siteGutterPhone:{number:"site_gutter_phone",kind:"spacing",grid:E,tier:"mobile"},blockGap:{number:"block_gap",kind:"gap",grid:m,tier:"desktop"},blockGapPhone:{number:"block_gap_phone",kind:"gap",grid:m,tier:"mobile"}};function g(t){return{number:p[t].number,unit:G[`${t}Unit`]}}function C(t,n,e){const i=s(e),{number:r,unit:o}=g(t);return{[r]:n,[o]:n===null||i==="px"?null:i}}function R(t,n,e,i){const{kind:r,grid:o,tier:u}=p[t],c=s(e),d=s(i);return c===d?n:_(n,c,d,u,{kind:r},o)}function O(t,n,e,i){const{number:r,unit:o}=g(t),u=h({[r]:n},c=>R(t,c,e,i),o,s(i),"px");return{[r]:u[r],[o]:u[o]??null}}function H(t,n){const{kind:e,grid:i}=p[t];return T(e,s(n),i)}function W(t){return k({kind:p[t].kind},f)}function D(t,n){const e=b(t,n);if(!P.includes(e))throw new Error(`no site length row ${e}`);return e}export{P as SITE_LENGTH_ROWS,g as siteLengthColumns,R as siteLengthConvert,H as siteLengthGrid,C as siteLengthPatch,D as siteLengthRowAt,O as siteLengthUnitPick,W as siteLengthUnits};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{BlackAndWhiteIcon as m,ColumnsIcon as O,HeightIcon as g,PaddingYIcon as c,StylesIcon as p}from"efficient-easel/icons";import{plainText as _,textarea as d,toggle as S,upload as L,withPanelOnly as h}from"../../../controls.js";import{VIEW_KEY_ACCESS as u,group as s}from"efficient-easel/screen/lib/document/box-fields";import{blockAlignmentFields as f,iconPickerRow as C,slider as r}from"../../../box-fields.js";import{LAYOUT_CELL as E,LOGO_LOOK_PICTURES as W}from"../../../choice-pictures.js";import{DEFAULT_LOGO_LOOK as I,LOGO_LOOK_OPTIONS as R}from"../../../../../../format/lib/sections/logo-look.js";import{HEAD_ROWS_SHOW_WHEN as y,OWN_BOX_ROWS_SHOW_WHEN as H}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowRules as P,withShowWhen as n}from"../../../../../../render/lib/document/show-when.js";import{blockSourceField as N,blockSourceFields as b,NO_BLOCK_SOURCE as k}from"../../../block-source-fields.js";import{BLOCK_SOURCE_PROP as i}from"../../../../../../format/lib/content/block-sources.js";import{seedLogosTemplate as w}from"../../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{LOGOS_PH as B,LogosSlots as a}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const x=["items","heading","bandPadding"],F=["look"],K={field:i,set:!0},T=P({_gContent:s("Content"),dataSource:N("Logo content","Manual"),heading:d("Heading",B.heading),items:{type:"array",label:"Logos",arrayFields:{src:L("Image","image/*"),alt:h(_("Name / alt"))},getItemSummary:o=>o.alt||o.src||"logo"},logos:n(a.logos,k),template:n(a.template,K),_gStyle:s("Style"),columns:r("Columns",e(O,{}),3,6,1,5),logoHeight:r("Logo height",e(g,{}),16,72,2,28,"px"),bandPadding:r("Space above and below",e(c,{}),16,120,4,40,"px"),grayscale:S("Black and white logos",!0,e(m,{})),look:C("Logo style",e(p,{}),R.map(o=>({...o,picture:W[o.value]})),I,{columns:2,cell:E}),...f("align",{access:u})},[[x,y],[F,H]]),Z={fields:T,resolveFields:(o,{fields:t})=>b("Logos",t,o.props,{hides:["logos"]}),resolveData:(o,t)=>{if(!t?.changed?.[i])return o;const l=w(o.props);return l===o.props?o:{...o,props:l}}};export{Z as LogosFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{BlackAndWhiteIcon as m,ColumnsIcon as O,HeightIcon as g,PaddingYIcon as c,StylesIcon as p}from"efficient-easel/icons";import{plainText as _,textarea as d,toggle as S,upload as L,withPanelOnly as u}from"../../../controls.js";import{VIEW_KEY_ACCESS as h,group as n}from"efficient-easel/screen/lib/document/box-fields";import{blockAlignmentFields as f,iconPickerRow as E,slider as r}from"../../../box-fields.js";import{LAYOUT_CELL as C,LOGO_LOOK_PICTURES as W}from"../../../choice-pictures.js";import{DEFAULT_LOGO_LOOK as P,LOGO_LOOK_OPTIONS as R}from"../../../../../../format/lib/sections/logo-look.js";import{HEAD_ROWS_SHOW_WHEN as I,OWN_BOX_ROWS_SHOW_WHEN as y}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowRules as H,withShowWhen as l}from"../../../../../../render/lib/document/show-when.js";import{blockSourceField as N,blockSourceFields as b,NO_BLOCK_SOURCE as B}from"../../../block-source-fields.js";import{BLOCK_SOURCE_PROP as i}from"../../../../../../format/lib/content/block-sources.js";import{seedLogosTemplate as k}from"../../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{LOGOS_PH as w,LogosSlots as a}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const A=["items","heading","bandPadding"],T=["look"],x={field:"bandPadding",set:!0},D={field:i,set:!0},F=H({_gContent:n("Content"),dataSource:N("Logo content","Manual"),heading:d("Heading",w.heading),items:{type:"array",label:"Logos",arrayFields:{src:L("Image","image/*"),alt:u(_("Name / alt"))},getItemSummary:o=>o.alt||o.src||"logo"},logos:l(a.logos,B),template:l(a.template,D),_gStyle:n("Style"),columns:r("Columns",e(O,{}),3,6,1,5),logoHeight:r("Logo height",e(g,{}),16,72,2,28,"px"),bandPadding:l(r("Space above and below",e(c,{}),16,120,4,40,"px"),x),grayscale:S("Black and white logos",!0,e(m,{})),look:E("Logo style",e(p,{}),R.map(o=>({...o,picture:W[o.value]})),P,{columns:2,cell:C}),...f("align",{access:h})},[[A,I],[T,y]]),$={fields:F,resolveFields:(o,{fields:t})=>b("Logos",t,o.props,{hides:["logos"]}),resolveData:(o,t)=>{if(!t?.changed?.[i])return o;const s=k(o.props);return s===o.props?o:{...o,props:s}}};export{$ as LogosFields};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{ColumnWidthsIcon as f,ColumnsIcon as _,LayoutIcon as P,MediaLayoutStackedIcon as T,PlacementIcon as E}from"efficient-easel/icons";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{cardImageFields as O,text as s,textarea as b}from"../../../controls.js";import{group as i,section as n}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as I,segmented as l,slider as R}from"../../../box-fields.js";import{IMAGE_TEXT_ARRANGEMENT_PICTURES as h,LAYOUT_CELL as C}from"../../../choice-pictures.js";import{BLOCK_SOURCE_EDIT_PROP as x,blockSourceEditField as A,blockSourceField as w,blockSourceFields as L}from"../../../block-source-fields.js";import{declaredBlockSource as m}from"../../../../../../format/lib/content/block-sources.js";import{ARRANGEMENT_OPTIONS as N,IMAGE_WIDTH_OPTIONS as v,PHONE_ORDER_OPTIONS as F}from"../../../../../../format/lib/content/image-text-rows.js";import{imageTextRowTemplate as D}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/row-seed.js";import{SPLITTABLE_SECTIONS as G,headFieldsForPlacement as H}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as W}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as k}from"../../../../../../render/lib/document/show-when.js";import{isNodeList as a}from"efficient-easel/data";import{PROCESS_PH as p,ProcessStepsSlots as c}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const u={field:"arrangement",in:["rows-left","rows-right"]},d="drawsLegacySteps",S={not:{context:d,is:!0}},M={[d]:e=>{const o=e.props??{};return!m(o)&&!a(o.boxes)}},y=e=>e?.data?.root?.props??null,te={fields:k({_gSource:i("Source"),dataSource:w("Item content","Manual"),[x]:A(),_sHeader:n("Header"),_gContent:i("Content"),num:s("Number",p.num),title:s("Heading",p.title),description:b("Body",W.body),boxes:c.boxes,template:c.template,_dDesign:n("Design"),arrangement:I("Arrangement",r(P,{}),N.map(e=>({label:e.label,value:e.value,picture:h[e.value]})),"columns",{columns:3,cell:C}),imageWidth:l("Image width",r(f,{}),v.map(e=>({label:e.label,value:e.value})),"half"),phoneOrder:g("mobile",l("Order",r(T,{}),F.map(e=>({label:e.label,value:e.value})),"picture")),columns:R("Columns",r(_,{}),2,4,1,3),...O(),cardText:l("Text position",r(E,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below")},[[["cardText"],{not:{field:"boxes",set:!0}}],[["arrangement"],S],[["imageWidth","phoneOrder"],{all:[u,S]}],[["columns"],{not:u}]]),showWhenFacts:M,resolveFields:(e,o)=>L("ProcessSteps",H(o.fields,e.props.headPlacement,G.ProcessSteps.headRows),e.props,{root:y(o.appState)}),resolveData:(e,o)=>{const t=e.props;return o?.changed?.dataSource!==!0||!m(t)||a(t.template)?e:{...e,props:{...t,template:D(String(t.id??"ProcessSteps"))}}}};export{te as ProcessStepsFields};
1
+ import{jsx as t}from"react/jsx-runtime";import{ColumnWidthsIcon as f,ColumnsIcon as _,LayoutIcon as P,MediaLayoutStackedIcon as T,PlacementIcon as E}from"efficient-easel/icons";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{cardImageFields as O,text as s,textarea as b}from"../../../controls.js";import{group as i,section as n}from"efficient-easel/screen/lib/document/box-fields";import{iconPickerRow as I,segmented as l,slider as h}from"../../../box-fields.js";import{IMAGE_TEXT_ARRANGEMENT_PICTURES as R,LAYOUT_CELL as C}from"../../../choice-pictures.js";import{BLOCK_SOURCE_EDIT_PROP as x,blockSourceEditField as A,blockSourceField as w,blockSourceFields as L}from"../../../block-source-fields.js";import{declaredBlockSource as m}from"../../../../../../format/lib/content/block-sources.js";import{ARRANGEMENT_OPTIONS as N,IMAGE_WIDTH_OPTIONS as v,PHONE_ORDER_OPTIONS as F}from"../../../../../../format/lib/content/image-text-rows.js";import{imageTextRowTemplate as D}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/row-seed.js";import{SPLITTABLE_SECTIONS as G,headFieldsForPlacement as H}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as W}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as k}from"../../../../../../render/lib/document/show-when.js";import{isNodeList as a}from"efficient-easel/data";import{PROCESS_PH as p,ProcessStepsSlots as c}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const u={field:"arrangement",in:["rows-left","rows-right"]},d="drawsLegacySteps",S={not:{context:d,is:!0}},M={[d]:e=>{const o=e.props??{};return!m(o)&&!a(o.boxes)}},y=e=>e?.data?.root?.props??null,re={fields:k({_gSource:i("Source"),dataSource:w("Item content","Manual"),[x]:A(),_sHeader:n("Header"),_gContent:i("Content"),num:s("Number",p.num),title:s("Heading",p.title),description:b("Body",W.body),boxes:c.boxes,template:c.template,_dDesign:n("Design"),arrangement:I("Arrangement",t(P,{}),N.map(e=>({label:e.label,hint:e.hint,value:e.value,picture:R[e.value]})),"columns",{columns:3,cell:C}),imageWidth:l("Image width",t(f,{}),v.map(e=>({label:e.label,value:e.value})),"half"),phoneOrder:g("mobile",l("Order",t(T,{}),F.map(e=>({label:e.label,value:e.value})),"picture")),columns:h("Columns",t(_,{}),2,4,1,3),...O(),cardText:l("Text position",t(E,{}),[{label:"Below picture",value:"below"},{label:"On picture",value:"on-image"}],"below")},[[["cardText"],{not:{field:"boxes",set:!0}}],[["arrangement"],S],[["imageWidth","phoneOrder"],{all:[u,S]}],[["columns"],{not:u}]]),showWhenFacts:M,resolveFields:(e,o)=>L("ProcessSteps",H(o.fields,e.props.headPlacement,G.ProcessSteps.headRows),e.props,{root:y(o.appState)}),resolveData:(e,o)=>{const r=e.props;return o?.changed?.dataSource!==!0||!m(r)||a(r.template)?e:{...e,props:{...r,template:D(String(r.id??"ProcessSteps"))}}}};export{re as ProcessStepsFields};
@@ -23,6 +23,7 @@ export declare const positionFields: Rows["positionFields"];
23
23
  export declare const sidesPaddingFields: Rows["sidesPaddingFields"];
24
24
  export declare const lengthUnitFields: Rows["lengthUnitFields"];
25
25
  export declare function angleRow(fallback: number, options?: Parameters<Rows["slider"]>[7]): ReturnType<Rows["slider"]>;
26
+ export declare const PICTURE_PICKER_ROW: symbol;
26
27
  export declare function ShellIconWord({ value }: {
27
28
  value: string;
28
29
  }): string;
@@ -51,6 +52,7 @@ export declare function iconPickerRow<V extends string>(label: string, icon: Rea
51
52
  cell?: {
52
53
  width: string;
53
54
  height: string;
55
+ words: boolean;
54
56
  };
55
57
  }): {
56
58
  options: {
@@ -1 +1 @@
1
- import{createElement as l}from"react";import{SettingsDefaultReset as E,SettingsField as I}from"efficient-easel/panel";import{boxFieldBuilders as R,describedAs as W,iconOf as G,onDesktopWords as L}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as P}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as O,Tooltip as T,useShellStrings as _}from"efficient-shell/ui";import{RotateIcon as U}from"efficient-easel/icons";import{ANGLE_RANGE as f}from"../../../format/lib/content/box-angle.js";import{editorEaselWords as C,say as s}from"../../../format/lib/editor-words.js";const h=o=>s(o),V=P,t=R(h,{lengthUnits:V}),D=t.slider,ee=t.select,ne=t.Segmented,te=t.segmented,oe=t.alignmentField,le=t.alignmentFields,ie=t.blockAlignmentField,se=t.blockAlignmentFields,ce=t.boxJustifyField,de=t.boxAlignField,re=t.boxWrapField,ae=t.directionField,pe=t.gapField,fe=t.placementField,me=t.PlacementGridView,ue=t.positionFields,ge=t.sidesPaddingFields,xe=t.lengthUnitFields;function Fe(o,i){return D("Angle",l(U),f.min,f.max,f.step,o,"°",i)}const H={width:"3.5rem",height:"2.75rem"};function B({value:o}){return _().iconNames[o]??o}function J(o,i,e){return l(T,{content:e,className:"sf-pick-tip",children:l("span",{className:"sf-pick"},l("span",{className:"sf-pick-pic"},o),l("span",{className:"sf-pick-cap"},i))})}function K(o){const i=e=>e.label===void 0?l(B,{value:e.value}):s(e.label);return o.map(e=>({value:e.value,...e.label===void 0?{}:{label:s(e.hint??e.label)},icon:J(e.picture,i(e),e.hint===void 0?i(e):s(e.hint))}))}function we(o,i){return l("span",{className:"sf-pick"},l("span",{className:"sf-pick-pic"},o),l("span",{className:"sf-pick-cap sf-pick-cap-closed"},i))}function be(o,i,e,m,c={}){const k=n=>e.some(d=>d.value===n),r=n=>c.resolve?c.resolve(n):k(n)?n:void 0,u=e.map(n=>({value:n.value,...n.label===void 0?{}:{label:n.label},...n.showWhen?{showWhen:n.showWhen}:{}}));return{type:"custom",...W({},{type:"radio",label:o,options:u}),options:u,render:n=>{const{value:d,onChange:g,field:x}=n,F=x?.options,N=K(e.filter(p=>!F||F.some(y=>y.value===p.value))),w="follows"in n,a=w?r(c.phoneRest?c.phoneRest(n.follows):n.follows)??m:void 0,v=x?.currentValue,A=r(d)??a??r(v)??m,S=d!=null&&d!=="",b=a===void 0?void 0:e.find(p=>p.value===a);return l(I,{label:s(o),icon:G(i),action:w?l(E,{words:C()?.panel,label:s(o),changed:S,detail:b?.label!==void 0?L(h,s(b.label),n.followsView):void 0,disabled:n.readOnly===!0,onReset:()=>g(void 0)}):void 0},l(O,{label:s(o),value:A,options:N,onChange:g,columns:c.columns,cell:c.cell??H,tooltips:!1,disabled:n.readOnly===!0}))}}}export{V as LENGTH_UNITS_TABLE,me as PlacementGridView,ne as Segmented,B as ShellIconWord,oe as alignmentField,le as alignmentFields,Fe as angleRow,ie as blockAlignmentField,se as blockAlignmentFields,de as boxAlignField,ce as boxJustifyField,re as boxWrapField,ae as directionField,pe as gapField,be as iconPickerRow,xe as lengthUnitFields,J as pickerCellIcon,K as pickerCellsOf,we as pickerNoneIcon,fe as placementField,ue as positionFields,h as rowSay,te as segmented,ee as select,ge as sidesPaddingFields,D as slider};
1
+ import{createElement as i}from"react";import{SettingsDefaultReset as E,SettingsField as I}from"efficient-easel/panel";import{boxFieldBuilders as y,describedAs as P,iconOf as W,onDesktopWords as _}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as G}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as L,Tooltip as O,useShellStrings as T}from"efficient-shell/ui";import{RotateIcon as C}from"efficient-easel/icons";import{ANGLE_RANGE as f}from"../../../format/lib/content/box-angle.js";import{editorEaselWords as U,say as s}from"../../../format/lib/editor-words.js";const h=o=>s(o),V=G,t=y(h,{lengthUnits:V}),D=t.slider,ne=t.select,te=t.Segmented,oe=t.segmented,ie=t.alignmentField,le=t.alignmentFields,se=t.blockAlignmentField,ce=t.blockAlignmentFields,de=t.boxJustifyField,re=t.boxAlignField,ae=t.boxWrapField,pe=t.directionField,fe=t.gapField,ue=t.placementField,me=t.PlacementGridView,xe=t.positionFields,ge=t.sidesPaddingFields,Fe=t.lengthUnitFields;function we(o,l){return D("Angle",i(C),f.min,f.max,f.step,o,"°",l)}const H=Symbol("efficient-web-builder.picture-picker-row"),B={width:"3.5rem",height:"2.75rem",words:!0};function J({value:o}){return T().iconNames[o]??o}function K(o,l,e){return i(O,{content:e,className:"sf-pick-tip",children:i("span",{className:"sf-pick"},i("span",{className:"sf-pick-pic"},o),i("span",{className:"sf-pick-cap"},l))})}function Y(o){const l=e=>e.label===void 0?i(J,{value:e.value}):s(e.label);return o.map(e=>({value:e.value,...e.label===void 0?{}:{label:s(e.hint??e.label)},icon:K(e.picture,l(e),e.hint===void 0?l(e):s(e.hint))}))}function be(o,l){return i("span",{className:"sf-pick"},i("span",{className:"sf-pick-pic"},o),i("span",{className:"sf-pick-cap sf-pick-cap-closed"},l))}function he(o,l,e,u,c={}){const k=n=>e.some(d=>d.value===n),r=n=>c.resolve?c.resolve(n):k(n)?n:void 0,m=e.map(n=>({value:n.value,...n.label===void 0?{}:{label:n.label},...n.showWhen?{showWhen:n.showWhen}:{}}));return{type:"custom",[H]:!0,...P({},{type:"radio",label:o,options:m}),options:m,render:n=>{const{value:d,onChange:x,field:g}=n,F=g?.options,N=Y(e.filter(p=>!F||F.some(S=>S.value===p.value))),w="follows"in n,a=w?r(c.phoneRest?c.phoneRest(n.follows):n.follows)??u:void 0,v=g?.currentValue,A=r(d)??a??r(v)??u,R=d!=null&&d!=="",b=a===void 0?void 0:e.find(p=>p.value===a);return i(I,{label:s(o),icon:W(l),action:w?i(E,{words:U()?.panel,label:s(o),changed:R,detail:b?.label!==void 0?_(h,s(b.label),n.followsView):void 0,disabled:n.readOnly===!0,onReset:()=>x(void 0)}):void 0},i(L,{label:s(o),value:A,options:N,onChange:x,columns:c.columns,cell:c.cell??B,tooltips:!1,disabled:n.readOnly===!0}))}}}export{V as LENGTH_UNITS_TABLE,H as PICTURE_PICKER_ROW,me as PlacementGridView,te as Segmented,J as ShellIconWord,ie as alignmentField,le as alignmentFields,we as angleRow,se as blockAlignmentField,ce as blockAlignmentFields,re as boxAlignField,de as boxJustifyField,ae as boxWrapField,pe as directionField,fe as gapField,he as iconPickerRow,Fe as lengthUnitFields,K as pickerCellIcon,Y as pickerCellsOf,be as pickerNoneIcon,ue as placementField,xe as positionFields,h as rowSay,oe as segmented,ne as select,ge as sidesPaddingFields,D as slider};
@@ -18,9 +18,11 @@ export declare const MOCKUP_PICTURES: Record<"spec-card" | "fitment" | "portal"
18
18
  export declare const LAYOUT_CELL: {
19
19
  readonly width: "5.75rem";
20
20
  readonly height: "3.75rem";
21
+ readonly words: true;
21
22
  };
22
23
  export declare const LONG_WORD_CELL: {
23
24
  readonly width: "8.5rem";
24
25
  readonly height: "3.75rem";
26
+ readonly words: true;
25
27
  };
26
28
  export declare const IMAGE_TEXT_ARRANGEMENT_PICTURES: Record<"columns" | "rows-left" | "rows-right", ReactNode>;
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{NoSymbolIcon as k}from"efficient-easel/icons";import{useId as I}from"react";import{STRIPE_GEOMETRY as S}from"../../../format/lib/sections/divider-style.js";import{GALLERY_COLUMNS_PHONE as C}from"../../../format/lib/content/gallery-layout.js";const p=44,E=28;function y({children:n}){return t("svg",{width:p,height:E,viewBox:`0 0 ${p} ${E}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:n})}const x=({x:n,y:w,w:l,t:o=2,faint:a=!1})=>t("rect",{x:n,y:w,width:l,height:o,rx:o/2,stroke:"none",opacity:a?.45:1}),r=({x:n,y:w,w:l,h:o})=>t("rect",{x:n,y:w,width:l,height:o,rx:2,fill:"none"}),c=({x:n,y:w})=>t("circle",{cx:n,cy:w,r:1.75,stroke:"none"}),i=({x1:n,y1:w,x2:l,y2:o})=>t("line",{x1:n,y1:w,x2:l,y2:o});function N(n){const o=20/C,a=5,h=1,T=[];let u=0,m=0,d=0;for(const[s,f]of n)u+s>C&&(m+=d*(a+h),u=0,d=0),T.push({x:12+u*o,y:m,w:s*o-h,h:f*a+(f-1)*h}),u+=s,d=Math.max(d,f);const P=m+d*(a+h)-h,R=(E-P)/2;return t(y,{children:T.map((s,f)=>t("rect",{x:s.x,y:R+s.y,width:s.w,height:s.h,rx:1,stroke:"none",opacity:.6},f))})}const b={bars:e(y,{children:[t(x,{x:8,y:14,w:5,t:10}),t(x,{x:16,y:8,w:5,t:16}),t(x,{x:24,y:18,w:5,t:6}),t(x,{x:32,y:11,w:5,t:13})]}),line:e(y,{children:[t("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),t(i,{x1:6,y1:25,x2:38,y2:25})]}),donut:e(y,{children:[t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function v(n){if(n==="none")return t("span",{style:{display:"flex",width:p,height:E,alignItems:"center",justifyContent:"center"},children:t(k,{size:20})});if(n==="line")return t(y,{children:t(i,{x1:4,y1:14,x2:40,y2:14})});const{ink:w,period:l}=S[n],o=.4,a=[];for(let h=-12;h<p;h+=l*o)a.push(t("polygon",{points:`${h},22 ${h+w*o},22 ${h+w*o+10},6 ${h+10},6`,stroke:"none"},h));return t(g,{children:a})}function g({children:n}){const w=`sf-div-${I().replace(/[^\w-]/g,"")}`;return e(y,{children:[t("clipPath",{id:w,children:t("rect",{x:4,y:6,width:36,height:16,rx:2})}),t("g",{clipPath:`url(#${w})`,children:n})]})}const _=({x:n,y:w,w:l,h:o})=>t("rect",{x:n,y:w,width:l,height:o,rx:2,stroke:"none",opacity:.3}),D={tabs:e(y,{children:[t(x,{x:5,y:10,w:9}),t(x,{x:18,y:10,w:9,faint:!0}),t(x,{x:31,y:10,w:9,faint:!0}),t(i,{x1:4,y1:17,x2:40,y2:17}),t(x,{x:4,y:16,w:11,t:2})]}),largeTabs:e(y,{children:[t(i,{x1:4,y1:5,x2:40,y2:5}),t(c,{x:7,y:10}),t(x,{x:11,y:9,w:16}),t(x,{x:31,y:9,w:9,faint:!0}),t(i,{x1:4,y1:14,x2:40,y2:14}),t(c,{x:7,y:19}),t(x,{x:11,y:18,w:13,faint:!0}),t(x,{x:31,y:18,w:9,faint:!0}),t(i,{x1:4,y1:23,x2:40,y2:23})]})},$={card:e(y,{children:[t(r,{x:10,y:3,w:24,h:22}),t(_,{x:12,y:5,w:20,h:10}),t(x,{x:13,y:18,w:16}),t(x,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:e(y,{children:[t(_,{x:10,y:3,w:24,h:22}),t(r,{x:10,y:3,w:24,h:22}),t(x,{x:13,y:17,w:16}),t(x,{x:13,y:21,w:11,t:1.5})]})},W={cards:e(y,{children:[t(r,{x:3,y:5,w:11,h:18}),t(r,{x:17,y:5,w:11,h:18}),t(r,{x:31,y:5,w:11,h:18}),t(x,{x:5,y:9,w:7}),t(x,{x:19,y:9,w:7}),t(x,{x:33,y:9,w:7}),t(x,{x:5,y:13,w:5,t:1.5,faint:!0}),t(x,{x:19,y:13,w:5,t:1.5,faint:!0}),t(x,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":e(y,{children:[t("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),t(x,{x:5,y:18,w:7}),t(x,{x:19,y:18,w:7}),t(x,{x:33,y:18,w:7})]})},j={table:e(y,{children:[t(r,{x:3,y:5,w:38,h:18}),t(i,{x1:15.7,y1:5,x2:15.7,y2:23}),t(i,{x1:28.3,y1:5,x2:28.3,y2:23}),t("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),t(x,{x:6,y:9,w:6,t:3}),t(x,{x:19,y:9,w:6,t:3}),t(x,{x:31,y:9,w:6,t:3}),t(x,{x:6,y:18,w:7,t:1.5,faint:!0}),t(x,{x:19,y:18,w:7,t:1.5,faint:!0}),t(x,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:e(y,{children:[t(i,{x1:3,y1:7,x2:13,y2:7}),t(i,{x1:17,y1:7,x2:27,y2:7}),t(i,{x1:31,y1:7,x2:41,y2:7}),t(x,{x:3,y:11,w:6,t:3}),t(x,{x:17,y:11,w:6,t:3}),t(x,{x:31,y:11,w:6,t:3}),t(x,{x:3,y:17,w:8,t:1.5,faint:!0}),t(x,{x:17,y:17,w:8,t:1.5,faint:!0}),t(x,{x:31,y:17,w:8,t:1.5,faint:!0})]})},G={plain:e(y,{children:[t(x,{x:5,y:12,w:9,t:4}),t(x,{x:18,y:12,w:9,t:4}),t(x,{x:31,y:12,w:9,t:4})]}),cards:e(y,{children:[t(r,{x:3,y:7,w:11,h:14}),t(r,{x:17,y:7,w:11,h:14}),t(r,{x:31,y:7,w:11,h:14}),t(x,{x:5,y:13,w:7}),t(x,{x:19,y:13,w:7}),t(x,{x:33,y:13,w:7})]}),marks:e(y,{children:[t(x,{x:8,y:12,w:6,t:4}),t(x,{x:17,y:12,w:6,t:4}),t(x,{x:26,y:12,w:6,t:4}),t(x,{x:35,y:12,w:3,t:4})]})},H={overlay:e(y,{children:[t(_,{x:4,y:3,w:36,h:22}),t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:15,w:18,t:3}),t(x,{x:8,y:20,w:12})]}),stacked:e(y,{children:[t(x,{x:4,y:3,w:18,t:3}),t(x,{x:4,y:8,w:12}),t(_,{x:4,y:13,w:36,h:12}),t(r,{x:4,y:13,w:36,h:12})]})},Y={split:e(y,{children:[t(x,{x:4,y:6,w:12,t:3}),t(x,{x:4,y:11,w:9,faint:!0}),t(i,{x1:20,y1:4,x2:20,y2:24}),t(x,{x:24,y:6,w:16}),t(x,{x:24,y:10,w:11,faint:!0}),t(x,{x:24,y:17,w:16}),t(x,{x:24,y:21,w:11,faint:!0})]}),spine:e(y,{children:[t(i,{x1:9,y1:4,x2:9,y2:24}),t(c,{x:9,y:8}),t(x,{x:14,y:7,w:24}),t(c,{x:9,y:14}),t(x,{x:14,y:13,w:20}),t(c,{x:9,y:20}),t(x,{x:14,y:19,w:24})]}),alternating:e(y,{children:[t(i,{x1:22,y1:4,x2:22,y2:24}),t(c,{x:22,y:8}),t(x,{x:4,y:7,w:14}),t(c,{x:22,y:14}),t(x,{x:26,y:13,w:14}),t(c,{x:22,y:20}),t(x,{x:4,y:19,w:14})]}),track:e(y,{children:[t(i,{x1:4,y1:12,x2:40,y2:12}),t(c,{x:8,y:12}),t(c,{x:22,y:12}),t(c,{x:36,y:12}),t(x,{x:4,y:17,w:8}),t(x,{x:18,y:17,w:8}),t(x,{x:32,y:17,w:8}),t(x,{x:4,y:21,w:6,faint:!0}),t(x,{x:18,y:21,w:6,faint:!0}),t(x,{x:32,y:21,w:6,faint:!0})]})},z={standard:e(y,{children:[t(x,{x:4,y:5,w:10,t:1.5,faint:!0}),t(x,{x:4,y:10,w:28,t:4}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:24,faint:!0})]}),editorial:e(y,{children:[t(x,{x:4,y:5,w:5,t:1.5,faint:!0}),t(x,{x:4,y:10,w:20,t:5}),t(x,{x:28,y:11,w:12,faint:!0}),t(x,{x:28,y:15,w:9,faint:!0}),t(i,{x1:4,y1:22,x2:40,y2:22})]}),simple:e(y,{children:[t(x,{x:4,y:8,w:10,t:1.5,faint:!0}),t(x,{x:4,y:13,w:26,t:4})]}),statement:e(y,{children:[t(x,{x:4,y:6,w:36,t:7}),t(x,{x:4,y:16,w:24,t:7})]}),natural:e(y,{children:[t(x,{x:4,y:8,w:22,t:3}),t(x,{x:4,y:15,w:34,faint:!0}),t(x,{x:4,y:19,w:28,faint:!0})]}),essay:e(y,{children:[t(x,{x:4,y:5,w:24,t:4}),t(x,{x:4,y:13,w:36,faint:!0}),t(x,{x:4,y:17,w:36,faint:!0}),t(x,{x:4,y:21,w:30,faint:!0})]})},B={"spec-card":e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:14}),t(r,{x:8,y:12,w:8,h:9}),t(r,{x:18,y:12,w:8,h:9}),t(r,{x:28,y:12,w:8,h:9})]}),fitment:e(y,{children:[t(r,{x:4,y:4,w:10,h:5}),t(r,{x:16,y:4,w:10,h:5}),t(r,{x:28,y:4,w:10,h:5}),t(x,{x:4,y:14,w:34,faint:!0}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:34,faint:!0})]}),portal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:10,t:4}),t(x,{x:8,y:14,w:16,faint:!0}),t(x,{x:26,y:18,w:10,t:4})]}),kanban:e(y,{children:[t(r,{x:4,y:3,w:10,h:22}),t(r,{x:17,y:3,w:10,h:22}),t(r,{x:30,y:3,w:10,h:22}),t(x,{x:6,y:6,w:6,t:4}),t(x,{x:6,y:12,w:6,t:4}),t(x,{x:19,y:6,w:6,t:4}),t(x,{x:32,y:6,w:6,t:4}),t(x,{x:32,y:12,w:6,t:4})]}),claims:e(y,{children:[t(x,{x:4,y:5,w:12,faint:!0}),t(x,{x:20,y:4,w:18,t:4}),t(x,{x:4,y:12,w:12,faint:!0}),t(x,{x:20,y:11,w:10,t:4}),t(x,{x:4,y:19,w:12,faint:!0}),t(x,{x:20,y:18,w:14,t:4})]}),browser:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(i,{x1:4,y1:8,x2:40,y2:8}),t(x,{x:8,y:11,w:28,t:5,faint:!0}),t(r,{x:8,y:18,w:8,h:4}),t(r,{x:18,y:18,w:8,h:4}),t(r,{x:28,y:18,w:8,h:4})]}),terminal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t("polyline",{points:"8,9 11,11 8,13",fill:"none"}),t(x,{x:13,y:10,w:14}),t(x,{x:8,y:16,w:22,faint:!0}),t(x,{x:8,y:20,w:16,faint:!0})]})},K={width:"5.75rem",height:"3.75rem"},F={width:"8.5rem",height:"3.75rem"},X={columns:e(y,{children:[t(r,{x:3,y:4,w:11,h:8}),t(r,{x:17,y:4,w:11,h:8}),t(r,{x:31,y:4,w:11,h:8}),t(x,{x:3,y:16,w:9}),t(x,{x:17,y:16,w:9}),t(x,{x:31,y:16,w:9}),t(x,{x:3,y:20,w:7,t:1.5,faint:!0}),t(x,{x:17,y:20,w:7,t:1.5,faint:!0}),t(x,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":e(y,{children:[t(r,{x:6,y:3,w:14,h:9}),t(x,{x:24,y:5,w:14}),t(x,{x:24,y:9,w:10,t:1.5,faint:!0}),t(r,{x:24,y:16,w:14,h:9}),t(x,{x:6,y:18,w:14}),t(x,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":e(y,{children:[t(r,{x:24,y:3,w:14,h:9}),t(x,{x:6,y:5,w:14}),t(x,{x:6,y:9,w:10,t:1.5,faint:!0}),t(r,{x:6,y:16,w:14,h:9}),t(x,{x:24,y:18,w:14}),t(x,{x:24,y:22,w:10,t:1.5,faint:!0})]})};export{j as CARD_LIST_STYLE_PICTURES,W as CARD_STYLE_PICTURES,b as CHART_PICTURES,X as IMAGE_TEXT_ARRANGEMENT_PICTURES,H as INTRO_BLEED_PICTURES,K as LAYOUT_CELL,G as LOGO_LOOK_PICTURES,F as LONG_WORD_CELL,B as MOCKUP_PICTURES,$ as POST_CARD_PICTURES,z as SECTION_HEAD_PICTURES,D as TAB_SHAPE_PICTURES,Y as TIMELINE_PICTURES,v as dividerPicture,N as galleryPhonePicture};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{NoSymbolIcon as k}from"efficient-easel/icons";import{useId as I}from"react";import{STRIPE_GEOMETRY as S}from"../../../format/lib/sections/divider-style.js";import{GALLERY_COLUMNS_PHONE as C}from"../../../format/lib/content/gallery-layout.js";const p=44,E=28;function y({children:n}){return t("svg",{width:p,height:E,viewBox:`0 0 ${p} ${E}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:n})}const x=({x:n,y:w,w:l,t:o=2,faint:a=!1})=>t("rect",{x:n,y:w,width:l,height:o,rx:o/2,stroke:"none",opacity:a?.45:1}),r=({x:n,y:w,w:l,h:o})=>t("rect",{x:n,y:w,width:l,height:o,rx:2,fill:"none"}),c=({x:n,y:w})=>t("circle",{cx:n,cy:w,r:1.75,stroke:"none"}),i=({x1:n,y1:w,x2:l,y2:o})=>t("line",{x1:n,y1:w,x2:l,y2:o});function N(n){const o=20/C,a=5,h=1,T=[];let u=0,m=0,d=0;for(const[s,f]of n)u+s>C&&(m+=d*(a+h),u=0,d=0),T.push({x:12+u*o,y:m,w:s*o-h,h:f*a+(f-1)*h}),u+=s,d=Math.max(d,f);const P=m+d*(a+h)-h,R=(E-P)/2;return t(y,{children:T.map((s,f)=>t("rect",{x:s.x,y:R+s.y,width:s.w,height:s.h,rx:1,stroke:"none",opacity:.6},f))})}const b={bars:e(y,{children:[t(x,{x:8,y:14,w:5,t:10}),t(x,{x:16,y:8,w:5,t:16}),t(x,{x:24,y:18,w:5,t:6}),t(x,{x:32,y:11,w:5,t:13})]}),line:e(y,{children:[t("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),t(i,{x1:6,y1:25,x2:38,y2:25})]}),donut:e(y,{children:[t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function v(n){if(n==="none")return t("span",{style:{display:"flex",width:p,height:E,alignItems:"center",justifyContent:"center"},children:t(k,{size:20})});if(n==="line")return t(y,{children:t(i,{x1:4,y1:14,x2:40,y2:14})});const{ink:w,period:l}=S[n],o=.4,a=[];for(let h=-12;h<p;h+=l*o)a.push(t("polygon",{points:`${h},22 ${h+w*o},22 ${h+w*o+10},6 ${h+10},6`,stroke:"none"},h));return t(g,{children:a})}function g({children:n}){const w=`sf-div-${I().replace(/[^\w-]/g,"")}`;return e(y,{children:[t("clipPath",{id:w,children:t("rect",{x:4,y:6,width:36,height:16,rx:2})}),t("g",{clipPath:`url(#${w})`,children:n})]})}const _=({x:n,y:w,w:l,h:o})=>t("rect",{x:n,y:w,width:l,height:o,rx:2,stroke:"none",opacity:.3}),D={tabs:e(y,{children:[t(x,{x:5,y:10,w:9}),t(x,{x:18,y:10,w:9,faint:!0}),t(x,{x:31,y:10,w:9,faint:!0}),t(i,{x1:4,y1:17,x2:40,y2:17}),t(x,{x:4,y:16,w:11,t:2})]}),largeTabs:e(y,{children:[t(i,{x1:4,y1:5,x2:40,y2:5}),t(c,{x:7,y:10}),t(x,{x:11,y:9,w:16}),t(x,{x:31,y:9,w:9,faint:!0}),t(i,{x1:4,y1:14,x2:40,y2:14}),t(c,{x:7,y:19}),t(x,{x:11,y:18,w:13,faint:!0}),t(x,{x:31,y:18,w:9,faint:!0}),t(i,{x1:4,y1:23,x2:40,y2:23})]})},$={card:e(y,{children:[t(r,{x:10,y:3,w:24,h:22}),t(_,{x:12,y:5,w:20,h:10}),t(x,{x:13,y:18,w:16}),t(x,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:e(y,{children:[t(_,{x:10,y:3,w:24,h:22}),t(r,{x:10,y:3,w:24,h:22}),t(x,{x:13,y:17,w:16}),t(x,{x:13,y:21,w:11,t:1.5})]})},W={cards:e(y,{children:[t(r,{x:3,y:5,w:11,h:18}),t(r,{x:17,y:5,w:11,h:18}),t(r,{x:31,y:5,w:11,h:18}),t(x,{x:5,y:9,w:7}),t(x,{x:19,y:9,w:7}),t(x,{x:33,y:9,w:7}),t(x,{x:5,y:13,w:5,t:1.5,faint:!0}),t(x,{x:19,y:13,w:5,t:1.5,faint:!0}),t(x,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":e(y,{children:[t("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),t(x,{x:5,y:18,w:7}),t(x,{x:19,y:18,w:7}),t(x,{x:33,y:18,w:7})]})},j={table:e(y,{children:[t(r,{x:3,y:5,w:38,h:18}),t(i,{x1:15.7,y1:5,x2:15.7,y2:23}),t(i,{x1:28.3,y1:5,x2:28.3,y2:23}),t("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),t(x,{x:6,y:9,w:6,t:3}),t(x,{x:19,y:9,w:6,t:3}),t(x,{x:31,y:9,w:6,t:3}),t(x,{x:6,y:18,w:7,t:1.5,faint:!0}),t(x,{x:19,y:18,w:7,t:1.5,faint:!0}),t(x,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:e(y,{children:[t(i,{x1:3,y1:7,x2:13,y2:7}),t(i,{x1:17,y1:7,x2:27,y2:7}),t(i,{x1:31,y1:7,x2:41,y2:7}),t(x,{x:3,y:11,w:6,t:3}),t(x,{x:17,y:11,w:6,t:3}),t(x,{x:31,y:11,w:6,t:3}),t(x,{x:3,y:17,w:8,t:1.5,faint:!0}),t(x,{x:17,y:17,w:8,t:1.5,faint:!0}),t(x,{x:31,y:17,w:8,t:1.5,faint:!0})]})},G={plain:e(y,{children:[t(x,{x:5,y:12,w:9,t:4}),t(x,{x:18,y:12,w:9,t:4}),t(x,{x:31,y:12,w:9,t:4})]}),cards:e(y,{children:[t(r,{x:3,y:7,w:11,h:14}),t(r,{x:17,y:7,w:11,h:14}),t(r,{x:31,y:7,w:11,h:14}),t(x,{x:5,y:13,w:7}),t(x,{x:19,y:13,w:7}),t(x,{x:33,y:13,w:7})]}),marks:e(y,{children:[t(x,{x:8,y:12,w:6,t:4}),t(x,{x:17,y:12,w:6,t:4}),t(x,{x:26,y:12,w:6,t:4}),t(x,{x:35,y:12,w:3,t:4})]})},H={overlay:e(y,{children:[t(_,{x:4,y:3,w:36,h:22}),t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:15,w:18,t:3}),t(x,{x:8,y:20,w:12})]}),stacked:e(y,{children:[t(x,{x:4,y:3,w:18,t:3}),t(x,{x:4,y:8,w:12}),t(_,{x:4,y:13,w:36,h:12}),t(r,{x:4,y:13,w:36,h:12})]})},Y={split:e(y,{children:[t(x,{x:4,y:6,w:12,t:3}),t(x,{x:4,y:11,w:9,faint:!0}),t(i,{x1:20,y1:4,x2:20,y2:24}),t(x,{x:24,y:6,w:16}),t(x,{x:24,y:10,w:11,faint:!0}),t(x,{x:24,y:17,w:16}),t(x,{x:24,y:21,w:11,faint:!0})]}),spine:e(y,{children:[t(i,{x1:9,y1:4,x2:9,y2:24}),t(c,{x:9,y:8}),t(x,{x:14,y:7,w:24}),t(c,{x:9,y:14}),t(x,{x:14,y:13,w:20}),t(c,{x:9,y:20}),t(x,{x:14,y:19,w:24})]}),alternating:e(y,{children:[t(i,{x1:22,y1:4,x2:22,y2:24}),t(c,{x:22,y:8}),t(x,{x:4,y:7,w:14}),t(c,{x:22,y:14}),t(x,{x:26,y:13,w:14}),t(c,{x:22,y:20}),t(x,{x:4,y:19,w:14})]}),track:e(y,{children:[t(i,{x1:4,y1:12,x2:40,y2:12}),t(c,{x:8,y:12}),t(c,{x:22,y:12}),t(c,{x:36,y:12}),t(x,{x:4,y:17,w:8}),t(x,{x:18,y:17,w:8}),t(x,{x:32,y:17,w:8}),t(x,{x:4,y:21,w:6,faint:!0}),t(x,{x:18,y:21,w:6,faint:!0}),t(x,{x:32,y:21,w:6,faint:!0})]})},z={standard:e(y,{children:[t(x,{x:4,y:5,w:10,t:1.5,faint:!0}),t(x,{x:4,y:10,w:28,t:4}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:24,faint:!0})]}),editorial:e(y,{children:[t(x,{x:4,y:5,w:5,t:1.5,faint:!0}),t(x,{x:4,y:10,w:20,t:5}),t(x,{x:28,y:11,w:12,faint:!0}),t(x,{x:28,y:15,w:9,faint:!0}),t(i,{x1:4,y1:22,x2:40,y2:22})]}),simple:e(y,{children:[t(x,{x:4,y:8,w:10,t:1.5,faint:!0}),t(x,{x:4,y:13,w:26,t:4})]}),statement:e(y,{children:[t(x,{x:4,y:6,w:36,t:7}),t(x,{x:4,y:16,w:24,t:7})]}),natural:e(y,{children:[t(x,{x:4,y:8,w:22,t:3}),t(x,{x:4,y:15,w:34,faint:!0}),t(x,{x:4,y:19,w:28,faint:!0})]}),essay:e(y,{children:[t(x,{x:4,y:5,w:24,t:4}),t(x,{x:4,y:13,w:36,faint:!0}),t(x,{x:4,y:17,w:36,faint:!0}),t(x,{x:4,y:21,w:30,faint:!0})]})},B={"spec-card":e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:14}),t(r,{x:8,y:12,w:8,h:9}),t(r,{x:18,y:12,w:8,h:9}),t(r,{x:28,y:12,w:8,h:9})]}),fitment:e(y,{children:[t(r,{x:4,y:4,w:10,h:5}),t(r,{x:16,y:4,w:10,h:5}),t(r,{x:28,y:4,w:10,h:5}),t(x,{x:4,y:14,w:34,faint:!0}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:34,faint:!0})]}),portal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:10,t:4}),t(x,{x:8,y:14,w:16,faint:!0}),t(x,{x:26,y:18,w:10,t:4})]}),kanban:e(y,{children:[t(r,{x:4,y:3,w:10,h:22}),t(r,{x:17,y:3,w:10,h:22}),t(r,{x:30,y:3,w:10,h:22}),t(x,{x:6,y:6,w:6,t:4}),t(x,{x:6,y:12,w:6,t:4}),t(x,{x:19,y:6,w:6,t:4}),t(x,{x:32,y:6,w:6,t:4}),t(x,{x:32,y:12,w:6,t:4})]}),claims:e(y,{children:[t(x,{x:4,y:5,w:12,faint:!0}),t(x,{x:20,y:4,w:18,t:4}),t(x,{x:4,y:12,w:12,faint:!0}),t(x,{x:20,y:11,w:10,t:4}),t(x,{x:4,y:19,w:12,faint:!0}),t(x,{x:20,y:18,w:14,t:4})]}),browser:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(i,{x1:4,y1:8,x2:40,y2:8}),t(x,{x:8,y:11,w:28,t:5,faint:!0}),t(r,{x:8,y:18,w:8,h:4}),t(r,{x:18,y:18,w:8,h:4}),t(r,{x:28,y:18,w:8,h:4})]}),terminal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t("polyline",{points:"8,9 11,11 8,13",fill:"none"}),t(x,{x:13,y:10,w:14}),t(x,{x:8,y:16,w:22,faint:!0}),t(x,{x:8,y:20,w:16,faint:!0})]})},K={width:"5.75rem",height:"3.75rem",words:!0},F={width:"8.5rem",height:"3.75rem",words:!0},X={columns:e(y,{children:[t(r,{x:3,y:4,w:11,h:8}),t(r,{x:17,y:4,w:11,h:8}),t(r,{x:31,y:4,w:11,h:8}),t(x,{x:3,y:16,w:9}),t(x,{x:17,y:16,w:9}),t(x,{x:31,y:16,w:9}),t(x,{x:3,y:20,w:7,t:1.5,faint:!0}),t(x,{x:17,y:20,w:7,t:1.5,faint:!0}),t(x,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":e(y,{children:[t(r,{x:6,y:3,w:14,h:9}),t(x,{x:24,y:5,w:14}),t(x,{x:24,y:9,w:10,t:1.5,faint:!0}),t(r,{x:24,y:16,w:14,h:9}),t(x,{x:6,y:18,w:14}),t(x,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":e(y,{children:[t(r,{x:24,y:3,w:14,h:9}),t(x,{x:6,y:5,w:14}),t(x,{x:6,y:9,w:10,t:1.5,faint:!0}),t(r,{x:6,y:16,w:14,h:9}),t(x,{x:24,y:18,w:14}),t(x,{x:24,y:22,w:10,t:1.5,faint:!0})]})};export{j as CARD_LIST_STYLE_PICTURES,W as CARD_STYLE_PICTURES,b as CHART_PICTURES,X as IMAGE_TEXT_ARRANGEMENT_PICTURES,H as INTRO_BLEED_PICTURES,K as LAYOUT_CELL,G as LOGO_LOOK_PICTURES,F as LONG_WORD_CELL,B as MOCKUP_PICTURES,$ as POST_CARD_PICTURES,z as SECTION_HEAD_PICTURES,D as TAB_SHAPE_PICTURES,Y as TIMELINE_PICTURES,v as dividerPicture,N as galleryPhonePicture};