efficient-web-builder 49.0.0 → 50.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 (107) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/editor/components/EditorPagePathProvider.d.ts +4 -0
  3. package/dist/editor/components/EditorPagePathProvider.js +1 -0
  4. package/dist/editor/components/PagesPanel.js +1 -1
  5. package/dist/editor/components/PartSettingsPanel.js +1 -1
  6. package/dist/editor/components/PreviewPartAnchors.d.ts +2 -2
  7. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  8. package/dist/editor/components/SectionTextPartBridge.d.ts +3 -1
  9. package/dist/editor/components/SectionTextPartBridge.js +1 -1
  10. package/dist/editor/components/SourceStatus.d.ts +3 -3
  11. package/dist/editor/components/SourceStatus.js +1 -1
  12. package/dist/editor/components/StorefrontEditor.js +1 -1
  13. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  14. package/dist/editor/lib/animation/hover-fields.js +1 -1
  15. package/dist/editor/lib/document/add-target.js +1 -1
  16. package/dist/editor/lib/document/block-source-fields.d.ts +6 -0
  17. package/dist/editor/lib/document/block-source-fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/ContactLocations/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/general/PaymentBadges/fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  24. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  25. package/dist/editor/lib/document/card-display-chips.d.ts +9 -3
  26. package/dist/editor/lib/document/card-display-chips.js +1 -1
  27. package/dist/editor/lib/document/card-row-fields.js +1 -1
  28. package/dist/editor/lib/document/field-groups.js +1 -1
  29. package/dist/editor/lib/document/mirror-cards-field.d.ts +20 -0
  30. package/dist/editor/lib/document/mirror-cards-field.js +1 -0
  31. package/dist/editor/lib/document/slot-new-children.d.ts +2 -0
  32. package/dist/editor/lib/document/slot-new-children.js +1 -0
  33. package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -1
  34. package/dist/editor/lib/sections/new-section-node.js +1 -1
  35. package/dist/format/lib/content/block-sources.d.ts +11 -0
  36. package/dist/format/lib/content/block-sources.js +1 -1
  37. package/dist/format/lib/content/box-layout.d.ts +2 -0
  38. package/dist/format/lib/content/box-layout.js +1 -1
  39. package/dist/format/lib/content/card-place.d.ts +8 -0
  40. package/dist/format/lib/content/card-place.js +1 -0
  41. package/dist/format/lib/content/card-template.d.ts +16 -2
  42. package/dist/format/lib/content/card-template.js +1 -1
  43. package/dist/format/lib/content/mirror-cards.d.ts +32 -0
  44. package/dist/format/lib/content/mirror-cards.js +1 -0
  45. package/dist/format/lib/document/blocks/general/Cards/card-seed.d.ts +15 -0
  46. package/dist/format/lib/document/blocks/general/Cards/card-seed.js +1 -0
  47. package/dist/format/lib/document/blocks/general/Cards/meta.d.ts +6 -0
  48. package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
  49. package/dist/format/lib/document/blocks/general/text-part-shapes.json +8 -0
  50. package/dist/format/lib/document/cards-template-on-read.d.ts +4 -0
  51. package/dist/format/lib/document/cards-template-on-read.js +1 -0
  52. package/dist/format/lib/document/editor-page-context.js +1 -1
  53. package/dist/format/lib/document/renamed-props.js +1 -1
  54. package/dist/format/lib/document/section-catalog.js +22 -2
  55. package/dist/format/lib/document/seed-parts.d.ts +18 -0
  56. package/dist/format/lib/document/seed-parts.js +1 -0
  57. package/dist/format/lib/editor-page-rows.d.ts +2 -0
  58. package/dist/format/lib/editor-page-rows.js +1 -1
  59. package/dist/format/lib/editor-words-catalogue.d.ts +20 -4
  60. package/dist/format/lib/editor-words-catalogue.js +4 -4
  61. package/dist/format/lib/hero-ticker.d.ts +4 -0
  62. package/dist/format/lib/hero-ticker.js +1 -1
  63. package/dist/format/lib/page-at-own-slug.d.ts +9 -0
  64. package/dist/format/lib/page-at-own-slug.js +1 -0
  65. package/dist/format/lib/popup/new-popup.js +1 -1
  66. package/dist/format/lib/sections/faq-text-regions.js +1 -1
  67. package/dist/format/lib/sections/section-text-regions.d.ts +1 -0
  68. package/dist/format/lib/sections/section-text-regions.js +1 -1
  69. package/dist/format/lib/sections/text-regions.d.ts +2 -0
  70. package/dist/format/lib/sections/text-regions.js +1 -1
  71. package/dist/render/components/CardRowContext.d.ts +1 -0
  72. package/dist/render/components/CardRowContext.js +1 -1
  73. package/dist/render/components/Cards.d.ts +4 -2
  74. package/dist/render/components/Cards.js +1 -1
  75. package/dist/render/components/FAQ.js +1 -1
  76. package/dist/render/components/Flex.d.ts +6 -1
  77. package/dist/render/components/Flex.js +1 -1
  78. package/dist/render/components/MirrorContext.d.ts +3 -0
  79. package/dist/render/components/MirrorContext.js +1 -0
  80. package/dist/render/components/SiteGutterFrame.d.ts +1 -0
  81. package/dist/render/components/SiteGutterFrame.js +1 -1
  82. package/dist/render/components/Text.d.ts +3 -1
  83. package/dist/render/components/Text.js +1 -1
  84. package/dist/render/components/TextRegionRun.d.ts +7 -0
  85. package/dist/render/components/TextRegionRun.js +1 -0
  86. package/dist/render/lib/content/box-shared-columns.d.ts +31 -0
  87. package/dist/render/lib/content/box-shared-columns.js +1 -0
  88. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  89. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  90. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  91. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -2
  92. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  93. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -5
  94. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  95. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  96. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  97. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  98. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  99. package/dist/render/lib/document/editing-bridges.d.ts +2 -0
  100. package/dist/render/lib/document/part-styles.d.ts +26 -0
  101. package/dist/render/lib/document/part-styles.js +2 -2
  102. package/dist/render/lib/document/passes/section-width.js +1 -1
  103. package/dist/render/lib/sections/section-to-box.d.ts +7 -7
  104. package/dist/render/lib/sections/section-to-box.js +1 -1
  105. package/dist/render/lib/site-runtime.d.ts +2 -0
  106. package/dist/render/lib/site-runtime.js +1 -1
  107. package/package.json +2 -2
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{FieldGlyph as i}from"../../../../../components/FieldGlyph.js";import{COUNT_KEY_PROP as n}from"../../../../../../format/lib/content/block-sources.js";import{CARD_ROW_FACTS as s,cardRowField as m,cardRowFields as p}from"../../../card-row-fields.js";import{textarea as a}from"../../../controls.js";import{group as h}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as f}from"efficient-easel/screen/lib/document/style-fields";import{select as d}from"../../../box-fields.js";import{PH as g}from"../../../../../../format/lib/document/blocks/placeholders.js";import{toneField as u}from"../../shared-fields.js";import{blockAlignmentFields as x}from"../../../box-fields.js";import{consentWordsKept as c,withConsentWordsRow as w}from"../../../consent-words-field.js";import{withLiveNumberRow as b}from"../../../live-number-field.js";function F(e,o){const t=o?.textStyle;if(typeof t!="string"||!t.startsWith("heading-"))return e;const{align:v,alignPhone:H,...r}=e;return r}const K={fields:{text:a("Body",g.body),consentWords:c("text"),[n]:f("text"),...x(),tone:u(),_gText:h("Text"),rowField:m("Shows","text"),tag:d("HTML tag",l(i,{noun:"heading"}),[{label:"Paragraph",value:"p"},{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],"p")},resolveFields:(e,o)=>F(b(w(p(o.fields,e,o),e.props,"text"),e.props),e.props),showWhenFacts:s};export{K as TextFields};
1
+ import{jsx as r}from"react/jsx-runtime";import{BlockBadgeIcon as n,BorderTopIcon as p,MediaLayoutInsetIcon as a}from"efficient-easel/icons";import{FieldGlyph as m}from"../../../../../components/FieldGlyph.js";import{COUNT_KEY_PROP as s}from"../../../../../../format/lib/content/block-sources.js";import{CARD_PLACE_PROP as d,OUTSIDE_FRAMED_CARD as l,framesItsCards as f}from"../../../../../../format/lib/content/card-place.js";import{cardTemplateOwner as h}from"../../../../../../format/lib/content/card-template.js";import{CARD_ROW_FACTS as c,cardRowField as u,cardRowFields as g}from"../../../card-row-fields.js";import{textarea as w}from"../../../controls.js";import{group as x}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as b}from"efficient-easel/screen/lib/document/style-fields";import{segmented as R,select as _}from"../../../box-fields.js";import{withShowWhen as v}from"../../../../../../format/lib/document/show-when-attach.js";import{PH as F}from"../../../../../../format/lib/document/blocks/placeholders.js";import{toneField as P}from"../../shared-fields.js";import{blockAlignmentFields as y}from"../../../box-fields.js";import{consentWordsKept as H,withConsentWordsRow as T}from"../../../consent-words-field.js";import{withLiveNumberRow as A}from"../../../live-number-field.js";function C(e,o){const t=o?.textStyle;if(typeof t!="string"||!t.startsWith("heading-"))return e;const{align:O,alignPhone:I,...i}=e;return i}const Q={fields:{text:w("Body",F.body),consentWords:H("text"),[s]:b("text"),...y(),tone:P(),_gText:x("Text"),rowField:u("Shows","text"),[d]:v(R("Place",r(n,{}),[{label:"In the card",value:"",picture:r(a,{})},{label:"On the top line",value:"top-line",picture:r(p,{})}],""),{not:{context:l,is:!0}}),tag:_("HTML tag",r(m,{noun:"heading"}),[{label:"Paragraph",value:"p"},{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],"p")},resolveFields:(e,o)=>C(A(T(g(o.fields,e,o),e.props,"text"),e.props),e.props),showWhenFacts:{...c,[l]:(e,o)=>{const t=h(o.appState,e.props?.id);return t===void 0?void 0:!f(t?.type)}}};export{Q as TextFields};
@@ -1,2 +1,2 @@
1
- export declare const assembleGeneralBlocks: () => Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
- export declare const generalBlocks: Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
1
+ export declare const assembleGeneralBlocks: () => Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
+ export declare const generalBlocks: Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
@@ -1,5 +1,6 @@
1
- import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
1
+ import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/document/show-when-attach.js";
2
2
  export declare const NOT_CARD_OF_TEMPLATE = "notCardOfTemplate";
3
+ export declare const ON_A_CARD: ShowWhenRule;
3
4
  export declare const CARD_BOX_FACTS: BlockShowWhenFacts;
4
5
  type Child = {
5
6
  type: string;
@@ -16,10 +17,15 @@ export declare function cardDisplayItems(card: Card, label: (child: Child) => st
16
17
  shown: boolean;
17
18
  }[];
18
19
  export declare function withChildShown<C extends Card>(card: C, id: string, shown: boolean): C;
19
- export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string): string;
20
- export declare function CardDisplayChips({ card, ownerType, labelOf, write, readOnly, }: {
20
+ type ChipOwner = {
21
+ type?: unknown;
22
+ props?: Record<string, unknown>;
23
+ } | null | undefined;
24
+ export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner): string;
25
+ export declare function CardDisplayChips({ card, ownerType, owner, labelOf, write, readOnly, }: {
21
26
  card: Card;
22
27
  ownerType: string | undefined;
28
+ owner?: ChipOwner;
23
29
  labelOf: (type: string) => string;
24
30
  write: (next: (latest: Card) => Card) => void;
25
31
  readOnly?: boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as x}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return x(n)?n:[]}const m=e=>!!e.props?._hidden;function R(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?R(t,n):n(t)?[]:[t])}function P(e,n,t){const i=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,R as cardDisplayParts,w as withChildShown};
1
+ "use client";import{jsx as d}from"react/jsx-runtime";import{isNodeList as N}from"efficient-easel/data";import{useEasel as O}from"efficient-easel/easel";import{slotChildName as g,slotChildRowName as h}from"efficient-easel/draw";import{cardTemplateCardOwner as _,cardTemplateField as D,namedRowField as S}from"../../../format/lib/content/card-template.js";import{DisplayRow as C,useSelectedPatch as T}from"./controls.js";import{websiteNodeIsLocked as b}from"./locked-blocks.js";import{stripMarkup as A}from"../../../format/lib/markup.js";import{sourceRowName as E}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as F}from"../../../format/lib/document/show-when-attach.js";import{deviceField as L}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as M}from"efficient-easel/screen/lib/document/panel-no-control-mark";const x="notCardOfTemplate",P={not:{context:x,is:!0}},Z={[x]:(e,n)=>{const t=_(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function m(e){const n=e.props?.content;return N(n)?n:[]}const c=e=>!!e.props?._hidden;function R(e,n=()=>!1){return m(e).flatMap(t=>typeof t?.props?.id!="string"?[]:m(t).length&&!c(t)?R(t,n):n(t)?[]:[t])}function k(e,n,t){const p=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(p.map(r=>r.name)),a=new Set;return p.map(({child:r,name:i})=>{let u=i;if(a.has(i)){let o=2;for(;s.has(`${i} ${o}`);)o+=1;u=`${i} ${o}`,s.add(u)}return a.add(i),{id:r.props.id,label:u,shown:!c(r)}})}function w(e,n){return m(e).flatMap(t=>c(t)?n(t)?[]:[t,...w(t,n)]:w(t,n))}function y(e,n,t){const p=m(e);let s=!1;const a=p.map(r=>{if(s)return r;let i;if(r?.props?.id===n){if(t?!("_hidden"in r.props):c(r))return r;const{_hidden:u,...o}=r.props;i={...r,props:t?o:{...o,_hidden:!0}}}else i=y(r,n,t);return s=i!==r,i});return s?{...e,props:{...e.props,content:a}}:e}function $(e,n,t,p){return g(e).trim()?t(e):D(n,S(e.props),p)?.label??t(e)}const B="This page is read-only.";function I({card:e,ownerType:n,owner:t,labelOf:p,write:s,readOnly:a}){const r=o=>h(o,p,A,void 0,E),i=o=>b(o.type,o),u=k(e,o=>$(o,n,r,t),i);return u.length?d(C,{parts:u,changed:u.some(o=>!o.shown),shown:o=>u.find(f=>f.id===o)?.shown??!0,disabledReason:a?B:void 0,onPress:(o,f)=>s(l=>y(l,o,f)),onReset:()=>s(o=>w(o,i).reduce((f,l)=>y(f,String(l.props.id),!0),o))}):d(M,{})}function j(){try{const e=O(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const p=_(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof p?.type=="string"?p.type:void 0,owner:p}}catch{return null}}function v({readOnly:e}){const n=j(),t=T();return n?d(I,{...n,readOnly:e,write:p=>{e||t(s=>{const a={...n.card,props:s},r=p(a);return r===a?null:{content:r.props.content}})}}):d(C,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function ee(){return F(L("desktop",{type:"custom",render:({readOnly:e})=>d(v,{readOnly:e})}),P)}export{Z as CARD_BOX_FACTS,I as CardDisplayChips,x as NOT_CARD_OF_TEMPLATE,P as ON_A_CARD,$ as cardChipLabel,ee as cardDisplayField,k as cardDisplayItems,R as cardDisplayParts,y as withChildShown};
@@ -1 +1 @@
1
- import{jsx as R}from"react/jsx-runtime";import{ListIcon as _}from"efficient-easel/icons";import{FieldGlyph as k}from"../../components/FieldGlyph.js";import{cardTemplateFields as A,cardTemplateOwner as x}from"../../../format/lib/content/card-template.js";import{select as C}from"./box-fields.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";const b="outsideCardTemplate",S={not:{context:b,is:!0}},I={[b]:(t,e)=>{const n=x(e.appState,t.props?.id);return n===void 0?void 0:n===null}};function K(t,e){const n=e==="link"?R(k,{noun:"link"}):R(_,{}),r={...C(t,n,[{label:"Typed here",value:""}],""),cardRowKind:e};return E(r,S)}function g(t){return!!(t&&typeof t=="object"&&"cardRowKind"in t)}const h=new WeakMap;function L(t,e,n){const r=Object.keys(t).filter(o=>g(t[o]));if(!r.length)return t;const a=e.props??{},w=x(n.appState,a.id),i=typeof w?.type=="string"?w.type:"",p=r.map(o=>typeof a[o]=="string"?a[o].trim():""),f=`${i}\0${p.join("\0")}`;let s=h.get(t);s||h.set(t,s=new Map);const y=s.get(f);if(y)return y;const l={...t};return r.forEach((o,u)=>{const d=t[o],T=i?A(i,d.cardRowKind):[],m=p[u]&&!T.some(c=>c.key===p[u])?p[u]:"";l[o]={...d,options:[...d.options,...T.map(c=>({label:c.label,value:c.key})),...m?[{label:m,value:m}]:[]]}}),s.set(f,l),l}export{I as CARD_ROW_FACTS,S as IN_CARD_TEMPLATE,b as OUTSIDE_CARD_TEMPLATE,K as cardRowField,L as cardRowFields};
1
+ import{jsx as T}from"react/jsx-runtime";import{ListIcon as h}from"efficient-easel/icons";import{FieldGlyph as _}from"../../components/FieldGlyph.js";import{cardTemplateFieldsOf as A,cardTemplateOwner as x}from"../../../format/lib/content/card-template.js";import{blockSourcesRevision as C,declaredBlockSource as E}from"../../../format/lib/content/block-sources.js";import{select as g}from"./box-fields.js";import{withShowWhen as j}from"../../../format/lib/document/show-when-attach.js";const b="outsideCardTemplate",F={not:{context:b,is:!0}},W={[b]:(o,e)=>{const n=x(e.appState,o.props?.id);return n===void 0?void 0:n===null}};function B(o,e){const n=e==="link"?T(_,{noun:"link"}):T(h,{}),r={...g(o,n,[{label:"Typed here",value:""}],""),cardRowKind:e};return j(r,F)}function O(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const k=new WeakMap;function P(o,e,n){const r=Object.keys(o).filter(t=>O(o[t]));if(!r.length)return o;const i=e.props??{},c=x(n.appState,i.id),w=typeof c?.type=="string"?c.type:"",p=r.map(t=>typeof i[t]=="string"?i[t].trim():""),S=E(c?.props),f=`${w}\0${S}\0${C()}\0${p.join("\0")}`;let s=k.get(o);s||k.set(o,s=new Map);const y=s.get(f);if(y)return y;const l={...o};return r.forEach((t,u)=>{const d=o[t],R=w?A(c,d.cardRowKind):[],m=p[u]&&!R.some(a=>a.key===p[u])?p[u]:"";l[t]={...d,options:[...d.options,...R.map(a=>({label:a.label,value:a.key})),...m?[{label:m,value:m}]:[]]}}),s.set(f,l),l}export{W as CARD_ROW_FACTS,F as IN_CARD_TEMPLATE,b as OUTSIDE_CARD_TEMPLATE,B as cardRowField,P as cardRowFields};
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
@@ -0,0 +1,20 @@
1
+ import { MIRROR_CARDS_OPTIONS } from "../../../format/lib/content/mirror-cards.js";
2
+ import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
3
+ export declare const MIRROR_CARDS_IDLE = "mirrorCardsIdle";
4
+ export declare const MIRROR_CARDS_FACTS: BlockShowWhenFacts;
5
+ type Answer = (typeof MIRROR_CARDS_OPTIONS)[number]["value"];
6
+ export declare function mirrorCardsOptions(disabled?: boolean): {
7
+ value: Answer;
8
+ label: string;
9
+ title?: string;
10
+ disabled: boolean;
11
+ }[];
12
+ export declare function mirrorCardsField(): {
13
+ render: ({ value, onChange, readOnly }: {
14
+ value?: unknown;
15
+ onChange: (next: unknown) => void;
16
+ readOnly?: boolean;
17
+ }) => import("react").JSX.Element;
18
+ type: "custom";
19
+ };
20
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as n}from"react/jsx-runtime";import{SettingsDefaultReset as m,SettingsField as R}from"efficient-easel/panel";import{Segmented as u}from"efficient-shell/ui";import{SwapIcon as c}from"efficient-easel/icons";import{describedAs as f}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as C}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as a,MIRROR_CARDS_OFF as s,MIRROR_CARDS_OPTIONS as l,MIRROR_CARDS_TITLES as S,mirrorCardsActs as O,mirrorCardsOf as _,mirrorCardsWrite as I,ownsCard as b}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as A,say as t}from"../../../format/lib/editor-words.js";import{cardCopyPlace as v}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as D}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as h}from"../../../format/lib/document/show-when-attach.js";const d="mirrorCardsIdle",z={[d]:(r,e)=>{const o=v(e.appState,r.props?.id),i=r.props??{};return o===void 0?void 0:!O(i,b(o),D(i).desktop)}};function w(r=!1){return l.map(e=>({value:e.value,label:t(e.label),title:e.value===s?void 0:t(S[e.value]),disabled:r}))}function x({value:r,onChange:e,readOnly:o}){const i=_(r)??s;return n(R,{label:t(a),icon:n(c,{}),action:n(m,{words:A()?.panel,label:t(a),changed:i!==s,detail:t("Off"),onReset:()=>e(void 0)}),children:n(u,{size:"sm",block:!0,label:t(a),value:i,onChange:p=>e(I(p)),options:w(o===!0)})})}function B(){return h(C("desktop",{type:"custom",...f({},{type:"radio",label:a,options:l.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:o})=>n(x,{value:r,onChange:e,readOnly:o})}),{not:{context:d,is:!0}})}export{z as MIRROR_CARDS_FACTS,d as MIRROR_CARDS_IDLE,B as mirrorCardsField,w as mirrorCardsOptions};
@@ -0,0 +1,2 @@
1
+ import type { SlotSectionSpec } from "efficient-easel/screen/lib/document/slot-section-spec";
2
+ export declare const EDITOR_SLOT_EXTRA_SPECS: Record<string, Record<string, SlotSectionSpec>>;
@@ -0,0 +1 @@
1
+ import{SECTION_LABELS as i}from"../../../format/lib/document/section-catalog.js";import{SLOT_SECTION_EXTRA_SPECS as E}from"../../../render/lib/document/slot-specs.js";import{HERO_STRIP_SLOT as S,STRIP_ON_MEDIA as n}from"../../../format/lib/hero-ticker.js";import{SECTION_PRESETS as s}from"../../../format/lib/sections/section-presets.js";function T(o){const e=s.Ticker(o.nodeDefaults,o.newNodeId),{sectionBorder:r,...t}=e.props,c=n.line?{sectionBorder:r}:{};return{...e,props:{...t,...c,sectionAccent:n.sectionAccent}}}const O={Hero:{[S]:{newChild:T,childLabel:i.Ticker}}},f=Object.fromEntries(Object.entries(E).map(([o,e])=>[o,Object.fromEntries(Object.entries(e).map(([r,t])=>[r,{...t,...O[o]?.[r]}]))]));export{f as EDITOR_SLOT_EXTRA_SPECS};
@@ -1 +1 @@
1
- import{readPartMotions as _}from"../../../render/lib/animation/part-motion.js";import{STRIP_SECTION_TO_BOX as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-strip.js";import{SECTION_ACCENT_INHERIT as g}from"../../../format/lib/content/section-surface.js";import{HERO_STRIP_SLOT as m,legacyTickerWords as l,TICKER_MOTION_PART as i}from"../../../format/lib/hero-ticker.js";import{nonEmptyString as u}from"../../../format/lib/non-empty-string.js";import{convertSection as O}from"../../../render/lib/sections/section-to-box.js";function M(t){const{showTicker:n,tickerItems:d,...k}=t.props,y=u(t.props.id)??"Hero",r=[],o=[],e={...k},s=l({tickerItems:d}),p=n!==!1&&s.length>0,c=_(t.props),h=c[i];if(h){const{[i]:a,...w}=c;Object.keys(w).length?e._partMotion=w:delete e._partMotion,r.push({key:"_partMotion",home:p?`${i} → the strip Box's own Entrance`:`${i} → nothing: no strip is drawn`})}if(!p)return e[m]=[],"showTicker"in t.props&&o.push({key:"showTicker",why:n===!1?"switched off: an empty strip draws nothing, the same as today":"no words: the strip drew nothing published, so the strip stays empty"}),"tickerItems"in t.props&&o.push({key:"tickerItems",why:s.length?"switched off: the words were not drawn, and an empty strip draws nothing":"no row has words: an empty row draws nothing published"}),{node:{type:t.type,props:e},carried:r,dropped:o};const T={type:"Ticker",props:{id:`${y}~strip`,items:s.map(a=>({text:a})),tone:"plain",sectionAccent:g,borders:!1,...h??{}}},f=O(T,I.Ticker);return e[m]=[f.node],"showTicker"in t.props&&o.push({key:"showTicker",why:"on: the strip Box is the switch now (delete or hide it like any block)"}),r.push({key:"tickerItems",home:`the strip Box: one Text block per row with words (${s.length}), in order`}),{node:{type:t.type,props:e},carried:r,dropped:o}}export{M as heroTickerToStrip};
1
+ import{readPartMotions as g}from"../../../render/lib/animation/part-motion.js";import{STRIP_SECTION_TO_BOX as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-strip.js";import{HERO_STRIP_SLOT as d,legacyTickerWords as l,STRIP_ON_MEDIA as m,TICKER_MOTION_PART as n}from"../../../format/lib/hero-ticker.js";import{nonEmptyString as u}from"../../../format/lib/non-empty-string.js";import{convertSection as O}from"../../../render/lib/sections/section-to-box.js";function x(e){const{showTicker:i,tickerItems:k,...y}=e.props,T=u(e.props.id)??"Hero",r=[],o=[],t={...y},s=l({tickerItems:k}),p=i!==!1&&s.length>0,c=g(e.props),h=c[n];if(h){const{[n]:w,...a}=c;Object.keys(a).length?t._partMotion=a:delete t._partMotion,r.push({key:"_partMotion",home:p?`${n} → the strip Box's own Entrance`:`${n} → nothing: no strip is drawn`})}if(!p)return t[d]=[],"showTicker"in e.props&&o.push({key:"showTicker",why:i===!1?"switched off: an empty strip draws nothing, the same as today":"no words: the strip drew nothing published, so the strip stays empty"}),"tickerItems"in e.props&&o.push({key:"tickerItems",why:s.length?"switched off: the words were not drawn, and an empty strip draws nothing":"no row has words: an empty row draws nothing published"}),{node:{type:e.type,props:t},carried:r,dropped:o};const f={type:"Ticker",props:{id:`${T}~strip`,items:s.map(w=>({text:w})),tone:"plain",sectionAccent:m.sectionAccent,borders:m.line,...h??{}}},_=O(f,I.Ticker);return t[d]=[_.node],"showTicker"in e.props&&o.push({key:"showTicker",why:"on: the strip Box is the switch now (delete or hide it like any block)"}),r.push({key:"tickerItems",home:`the strip Box: one Text block per row with words (${s.length}), in order`}),{node:{type:e.type,props:t},carried:r,dropped:o}}export{x as heroTickerToStrip};
@@ -1 +1 @@
1
- import{BOX_TYPE as a}from"../../../format/lib/document/container-blocks.js";import{SLOT_SECTION_SPECS as h}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as m}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as n,SPLITTABLE_SECTIONS as r,canSplitHead as s}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as E}from"./text-layouts.js";function _(o,{nodeDefaults:i,newNodeId:S,sectionLabel:e,blockIsOffered:t}){const c=E(o);return c?c(i,S):s(o)&&t(a)&&t(n)?{type:a,props:{...i(a),id:S(a),direction:"column",name:`${e(o)} section`,content:[{type:n,props:{...i(n),id:S(n),...r[o]?.headStyle?{headStyle:r[o].headStyle}:{},...r[o]?.headRowGap?{rowGap:r[o].headRowGap}:{},...r[o]?.headDescriptionSize?{descriptionSize:r[o].headDescriptionSize}:{},...m(o)!==m(n)?{eyebrowLook:m(o)}:{}}},{type:o,props:{...i(o),id:S(o),headPlacement:"own-box"}}]}}:h[o]?.fixed===!0?{type:o,props:{...i(o),id:S(o),layout:"boxes"}}:null}export{_ as newSectionNode};
1
+ import{BOX_TYPE as m}from"../../../format/lib/document/container-blocks.js";import{cardsTemplateNodes as h}from"../../../format/lib/document/blocks/general/Cards/card-seed.js";import{SLOT_SECTION_SPECS as T}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as a}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as t,SPLITTABLE_SECTIONS as S,canSplitHead as E}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as d}from"./text-layouts.js";function L(r,{nodeDefaults:i,newNodeId:o,sectionLabel:l,blockIsOffered:c}){const n=d(r);if(n)return n(i,o);if(E(r)&&c(m)&&c(t))return{type:m,props:{...i(m),id:o(m),direction:"column",name:`${l(r)} section`,content:[{type:t,props:{...i(t),id:o(t),...S[r]?.headStyle?{headStyle:S[r].headStyle}:{},...S[r]?.headRowGap?{rowGap:S[r].headRowGap}:{},...S[r]?.headDescriptionSize?{descriptionSize:S[r].headDescriptionSize}:{},...a(r)!==a(t)?{eyebrowLook:a(r)}:{}}},{type:r,props:{...i(r),id:o(r),headPlacement:"own-box",...e(r,o)}}]}};if(T[r]?.fixed===!0)return{type:r,props:{...i(r),id:o(r),layout:"boxes"}};const s=e(r,o);return Object.keys(s).length?{type:r,props:{...i(r),id:o(r),...s}}:null}function e(r,i){return r==="Cards"?{template:h(o=>i(o))}:{}}export{L as newSectionNode};
@@ -15,6 +15,17 @@ export interface BlockSourceSpec {
15
15
  blocks: readonly string[];
16
16
  sample?: readonly SourceRow[];
17
17
  choices?: readonly SourceChoice[];
18
+ fields?: readonly SourceFieldSpec[];
19
+ edit?: SourceEditLink;
20
+ }
21
+ export interface SourceFieldSpec {
22
+ key: string;
23
+ label: string;
24
+ kind?: "text" | "image" | "link";
25
+ }
26
+ export interface SourceEditLink {
27
+ label: string;
28
+ href: string;
18
29
  }
19
30
  export declare function registerBlockSources(sources: readonly BlockSourceSpec[]): void;
20
31
  export declare function blockSources(block?: string): readonly BlockSourceSpec[];
@@ -1 +1 @@
1
- import{globalRegistry as c}from"../global-registry.js";import{nonEmptyString as i}from"../non-empty-string.js";const a="dataSource",S="dataSourceOptions",u="dataRows",g="countKey",x="counts",f=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function s(){return c("efficient.block-sources",()=>({sources:new Map,revision:0}))}const p=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!=="");function y(e){if(typeof e.key!="string"||!f.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(t=>typeof t!="string"||!t))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(t=>l(t)).filter(t=>t!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(p)}:{}}}function R(e){const t=e.map(y),r=s();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function d(e){const t=[...s().sources.values()];return e===void 0?t:t.filter(r=>r.blocks.includes(e))}function k(e){return s().sources.get(e)??null}function w(e){return s().sources.get(e)?.choices??[]}function C(){return s().revision}function b(e){const t=e?.[a];return typeof t=="string"?t.trim():""}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const n=i(o);n&&(t[r]=n)}return Object.keys(t).length?t:null}function m(e){const t=e?.[u];return Array.isArray(t)?t.map(l).filter(r=>r!==null):null}function _(e,t,r=[]){const o=m(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const n=k(b(e))?.sample;return{rows:n?.length?n:r,sample:!0}}export{S as BLOCK_SOURCE_OPTIONS_PROP,a as BLOCK_SOURCE_PROP,u as BLOCK_SOURCE_ROWS_PROP,x as COUNTS_SOURCE,g as COUNT_KEY_PROP,k as blockSourceSpec,d as blockSources,C as blockSourcesRevision,b as declaredBlockSource,R as registerBlockSources,m as servedRows,w as sourceChoices,_ as sourcedRows};
1
+ import{globalRegistry as i}from"../global-registry.js";import{nonEmptyString as c}from"../non-empty-string.js";const a="dataSource",S="dataSourceOptions",f="dataRows",x="countKey",R="counts",u=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function s(){return i("efficient.block-sources",()=>({sources:new Map,revision:0}))}const y=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),p=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),b=e=>[e?.label,e?.href].every(t=>typeof t=="string"&&t.trim()!=="");function k(e){if(typeof e.key!="string"||!u.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(t=>typeof t!="string"||!t))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(t=>l(t)).filter(t=>t!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(y)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(p).map(t=>({...t}))}:{},...b(e.edit)?{edit:{label:e.edit.label.trim(),href:e.edit.href.trim()}}:{}}}function v(e){const t=e.map(k),r=s();for(const o of t)r.sources.set(o.key,o);t.length&&(r.revision+=1)}function C(e){const t=[...s().sources.values()];return e===void 0?t:t.filter(r=>r.blocks.includes(e))}function m(e){return s().sources.get(e)??null}function E(e){return s().sources.get(e)?.choices??[]}function _(){return s().revision}function h(e){const t=e?.[a];return typeof t=="string"?t.trim():""}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[r,o]of Object.entries(e)){const n=c(o);n&&(t[r]=n)}return Object.keys(t).length?t:null}function d(e){const t=e?.[f];return Array.isArray(t)?t.map(l).filter(r=>r!==null):null}function w(e,t,r=[]){const o=d(e);if(o!==null&&(o.length||!t))return{rows:o,sample:!1};if(!t)return{rows:[],sample:!1};const n=m(h(e))?.sample;return{rows:n?.length?n:r,sample:!0}}export{S as BLOCK_SOURCE_OPTIONS_PROP,a as BLOCK_SOURCE_PROP,f as BLOCK_SOURCE_ROWS_PROP,R as COUNTS_SOURCE,x as COUNT_KEY_PROP,m as blockSourceSpec,C as blockSources,_ as blockSourcesRevision,h as declaredBlockSource,v as registerBlockSources,d as servedRows,E as sourceChoices,w as sourcedRows};
@@ -1,7 +1,9 @@
1
+ import type { BoxAlign } from "efficient-easel/screen/lib/document/box-fields";
1
2
  export declare const NESTED_BOX_PADDING: {
2
3
  readonly sectionPaddingTop: 0;
3
4
  readonly sectionPaddingBottom: 0;
4
5
  };
6
+ export declare const BOX_ALIGN_CLASS: Record<BoxAlign, string>;
5
7
  export declare function boxLayoutClasses(justify: unknown, align: unknown): string;
6
8
  export declare function boxWrapClass(wrap: unknown): string;
7
9
  export declare const BOX_SHARE_LABEL = "Block widths";
@@ -1 +1 @@
1
- import{isStripBox as s}from"./box-separator.js";const k={sectionPaddingTop:0,sectionPaddingBottom:0},o={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function A(e,t){const w=typeof e=="string"&&e in o?o[e]:"",n=typeof t=="string"&&t in r?r[t]:"";return[w,n].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const N="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],i="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",p={equal:i,bigLeft:`${i} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${i} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${i} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${i} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${i} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`};function x(e){return typeof e=="string"?p[e]??"":""}const _="[&>*]:view-wide:basis-[content]";function E(e){return x(e)===""?_:""}const P="Columns",R=1,T=3,v={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},X=c.filter(e=>e.value==="content"||e.value==="equal"),H="equal",I=1,$=6,a="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",d={1:`${a} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function b(e){return typeof e=="number"?d[e]??"":""}const f={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function m(e){return typeof e=="number"?f[e]??"":""}function y(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":m(e.columnsTablet)}function W(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":b(e.columns)}const g="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",h={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},u="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function O(e){return e===!1||e==="nowrap"}function M(e,t,w){const n=v[Number(e)];if(!n)return"max-view-wide:flex-col";const l=O(w);return S(e,t)?l?u:g:l?h[Number(e)]:n}function S(e,t){return Number(e)in v&&t==="content"}const F="Block spacing",U=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],C="sf-box-gap-only";function G(e){return e==="gap"?C:""}export{F as BOX_BLOCK_SPACING_LABEL,U as BOX_BLOCK_SPACING_POINTS,$ as BOX_COLUMNS_MAX,I as BOX_COLUMNS_MIN,C as BOX_GAP_ONLY_CLASS,P as BOX_PHONE_ROW_LABEL,T as BOX_PHONE_ROW_MAX,R as BOX_PHONE_ROW_MIN,N as BOX_SHARE_LABEL,H as BOX_SHARE_PHONE_DEFAULT,X as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,k as NESTED_BOX_PADDING,G as boxBlockSpacingClass,b as boxColumnsClass,E as boxFitContentClass,A as boxLayoutClasses,M as boxPhoneRowClasses,S as boxPhoneRowFits,O as boxPhoneRowOneLine,W as boxRowColumnsClass,y as boxRowTabletColumnsClass,x as boxShareClasses,m as boxTabletColumnsClass,B as boxWrapClass};
1
+ import{isStripBox as s}from"./box-separator.js";const k={sectionPaddingTop:0,sectionPaddingBottom:0},o={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function A(e,t){const w=typeof e=="string"&&e in o?o[e]:"",n=typeof t=="string"&&t in r?r[t]:"";return[w,n].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const N="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],i="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",p={equal:i,bigLeft:`${i} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${i} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${i} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${i} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${i} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`};function x(e){return typeof e=="string"?p[e]??"":""}const _="[&>*]:view-wide:basis-[content]";function E(e){return x(e)===""?_:""}const P="Columns",R=1,T=3,v={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},X=c.filter(e=>e.value==="content"||e.value==="equal"),H="equal",I=1,$=6,a="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",d={1:`${a} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function b(e){return typeof e=="number"?d[e]??"":""}const f={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function m(e){return typeof e=="number"?f[e]??"":""}function y(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":m(e.columnsTablet)}function W(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":b(e.columns)}const g="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",h={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},u="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function O(e){return e===!1||e==="nowrap"}function M(e,t,w){const n=v[Number(e)];if(!n)return"max-view-wide:flex-col";const l=O(w);return S(e,t)?l?u:g:l?h[Number(e)]:n}function S(e,t){return Number(e)in v&&t==="content"}const F="Block spacing",U=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],C="sf-box-gap-only";function G(e){return e==="gap"?C:""}export{r as BOX_ALIGN_CLASS,F as BOX_BLOCK_SPACING_LABEL,U as BOX_BLOCK_SPACING_POINTS,$ as BOX_COLUMNS_MAX,I as BOX_COLUMNS_MIN,C as BOX_GAP_ONLY_CLASS,P as BOX_PHONE_ROW_LABEL,T as BOX_PHONE_ROW_MAX,R as BOX_PHONE_ROW_MIN,N as BOX_SHARE_LABEL,H as BOX_SHARE_PHONE_DEFAULT,X as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,k as NESTED_BOX_PADDING,G as boxBlockSpacingClass,b as boxColumnsClass,E as boxFitContentClass,A as boxLayoutClasses,M as boxPhoneRowClasses,S as boxPhoneRowFits,O as boxPhoneRowOneLine,W as boxRowColumnsClass,y as boxRowTabletColumnsClass,x as boxShareClasses,m as boxTabletColumnsClass,B as boxWrapClass};
@@ -0,0 +1,8 @@
1
+ export declare const CARD_PLACE_PROP = "cardPlace";
2
+ export type CardPlace = "" | "top-line";
3
+ export declare function cardPlaceOf(props: Record<string, unknown>): CardPlace;
4
+ export declare const TOP_LINE_CLASS = "absolute left-5 top-0 z-10 -translate-y-1/2 bg-bg px-2";
5
+ export declare const TOP_LINE_ATTRIBUTE = "data-sf-top-line";
6
+ export declare const FRAMED_CARD_OWNERS: ReadonlySet<string>;
7
+ export declare function framesItsCards(ownerType: unknown): boolean;
8
+ export declare const OUTSIDE_FRAMED_CARD = "outsideFramedCard";
@@ -0,0 +1 @@
1
+ const e="cardPlace";function r(t){return t[e]==="top-line"?"top-line":""}const n="absolute left-5 top-0 z-10 -translate-y-1/2 bg-bg px-2",a="data-sf-top-line",o=new Set(["Cards"]);function s(t){return typeof t=="string"&&o.has(t)}const p="outsideFramedCard";export{e as CARD_PLACE_PROP,o as FRAMED_CARD_OWNERS,p as OUTSIDE_FRAMED_CARD,a as TOP_LINE_ATTRIBUTE,n as TOP_LINE_CLASS,r as cardPlaceOf,s as framesItsCards};
@@ -1,4 +1,5 @@
1
- import type { SourceRow } from "./block-sources.js";
1
+ import { type SourceRow } from "./block-sources.js";
2
+ import type { CardCopyPlace } from "./mirror-cards.js";
2
3
  export declare const CARD_TEMPLATE_SLOT = "template";
3
4
  export declare const CARD_TEMPLATE_LABEL = "Card template";
4
5
  export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
@@ -13,25 +14,37 @@ export interface CardRowFieldSpec {
13
14
  key: string;
14
15
  label: string;
15
16
  kind?: CardRowFieldKind;
17
+ multiline?: boolean;
16
18
  alt?: string;
19
+ everySource?: boolean;
17
20
  }
18
21
  export interface CardTemplateSpec {
19
22
  block: string;
20
23
  fields: readonly CardRowFieldSpec[];
21
24
  blocks?: readonly CardTemplateBlock[];
25
+ seed?: (props: Record<string, unknown>) => Record<string, unknown>;
22
26
  }
23
27
  export interface CardTemplateBlock {
24
28
  type: string;
25
29
  label: string;
26
30
  }
27
31
  export declare function registerCardTemplates(specs: readonly CardTemplateSpec[]): void;
32
+ export declare function templateOnRead(type: string | undefined, props: Record<string, unknown>): Record<string, unknown>;
28
33
  export declare function cardTemplatesNameBlocks(): boolean;
29
34
  export declare function cardTemplateBlocks(type: string): readonly CardTemplateBlock[];
30
35
  export declare function isCardTemplateBlock(type: string): boolean;
31
36
  export declare function hasCardTemplate(type: unknown): boolean;
32
37
  export declare function cardTemplateFields(type: string, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
33
- export declare function cardTemplateField(type: string | undefined, key: string): CardRowFieldSpec | null;
38
+ export declare function cardTemplateFieldsOf(owner: {
39
+ type?: unknown;
40
+ props?: Record<string, unknown>;
41
+ } | null | undefined, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
42
+ export declare function cardTemplateField(type: string | undefined, key: string, owner?: {
43
+ type?: unknown;
44
+ props?: Record<string, unknown>;
45
+ } | null): CardRowFieldSpec | null;
34
46
  export declare function namedRowField(props: Record<string, unknown> | null | undefined, prop?: string): string;
47
+ export declare function cardKeyOf(row: SourceRow, index: number): string;
35
48
  export declare function cardRow(value: unknown): SourceRow;
36
49
  export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
37
50
  export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
@@ -42,4 +55,5 @@ type DocNode = {
42
55
  };
43
56
  export declare function cardTemplateOwner(appState: unknown, id: unknown): DocNode | null | undefined;
44
57
  export declare function cardTemplateCardOwner(appState: unknown, id: unknown): DocNode | null | undefined;
58
+ export declare function cardCopyPlace(appState: unknown, id: unknown): CardCopyPlace | undefined;
45
59
  export {};
@@ -1 +1 @@
1
- import{isNodeList as x}from"efficient-easel/data";import{globalRegistry as y}from"../global-registry.js";const T="template",E="Card template",w=["Text","ImageBlock","ButtonBlock","Flex"],s="rowField",A="rowLinkField";function L(){return{type:"slot",allow:[...w]}}const g=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}];function n(){return y("efficient.card-templates",()=>new Map(g.map(e=>[e.block,e])))}function C(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const o=[];for(const r of t.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${t.block} names an empty block.`);o.some(l=>l.type===r.type)||o.push({type:r.type,label:r.label||r.type})}n().set(t.block,{block:t.block,fields:t.fields.map(r=>({...r})),blocks:o})}}function P(){for(const e of n().values())if(e.blocks?.length)return!0;return!1}function h(e){return n().get(e)?.blocks??[]}function F(e){for(const t of n().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function B(e){return typeof e=="string"&&n().has(e)}function D(e,t){const o=n().get(e)?.fields??[];return t?o.filter(r=>(r.kind??"text")===t):o}function I(e,t){return e?n().get(e)?.fields.find(o=>o.key===t)??null:null}function p(e,t=s){const o=e?.[t];return typeof o=="string"?o.trim():""}function M(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[o,r]of Object.entries(e))typeof r=="string"&&(t[o]=r);return t}const d={Text:{text:s},ImageBlock:{src:s},ButtonBlock:{label:s,href:A}};function S(e,t,o){const r=d[e]?.[o];return!!(r&&p(t,r))}function O(e,t){return!t||!e?null:e[t]??""}function j(e,t,o){if(!o)return t;let r=null;for(const[l,f]of Object.entries(d[e]??{})){const c=O(o,p(t,f));c!==null&&(r??={...t},r[l]=c)}return r??t}function m(e,t){const o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const r=(f,c)=>{for(const i of f){if(i?.props?.id===t)return c;for(const[b,u]of Object.entries(i?.props??{})){if(!x(u))continue;const k=b===T&&B(i.type)?{owner:i,direct:!0}:c&&{owner:c.owner,direct:!1},a=r(u,k);if(a!==void 0)return a}}},l=r(o,null);return l===void 0?null:l}function N(e,t){const o=m(e,t);return o&&o.owner}function W(e,t){const o=m(e,t);return o&&(o.direct?o.owner:null)}export{s as CARD_ROW_FIELD_PROP,A as CARD_ROW_LINK_PROP,w as CARD_TEMPLATE_BLOCKS,E as CARD_TEMPLATE_LABEL,T as CARD_TEMPLATE_SLOT,M as cardRow,h as cardTemplateBlocks,W as cardTemplateCardOwner,I as cardTemplateField,D as cardTemplateFields,N as cardTemplateOwner,L as cardTemplateSlot,P as cardTemplatesNameBlocks,B as hasCardTemplate,F as isCardTemplateBlock,p as namedRowField,C as registerCardTemplates,S as rowBound,O as rowFieldText,j as rowFilledProps};
1
+ import{blockSourceSpec as k,declaredBlockSource as x}from"./block-sources.js";import{isNodeList as T}from"efficient-easel/data";import{BOX_TYPE as g}from"../document/container-blocks.js";import{globalRegistry as B}from"../global-registry.js";import{withCardsTemplate as C}from"../document/cards-template-on-read.js";const w="template",v="Card template",O=["Text","ImageBlock","ButtonBlock","Flex"],u="rowField",A="rowLinkField";function I(){return{type:"slot",allow:[...O]}}const L=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"Cards",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>C("Cards",e)}];function c(){return B("efficient.card-templates",()=>new Map(L.map(e=>[e.block,e])))}function M(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const n of t.blocks??[]){if(typeof n?.type!="string"||!n.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(l=>l.type===n.type)||r.push({type:n.type,label:n.label||n.type})}c().set(t.block,{block:t.block,fields:t.fields.map(n=>({...n})),blocks:r,...t.seed?{seed:t.seed}:{}})}}function N(e,t){const r=e?c().get(e)?.seed:void 0;return r?r(t):t}function j(){for(const e of c().values())if(e.blocks?.length)return!0;return!1}function K(e){return c().get(e)?.blocks??[]}function W(e){for(const t of c().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function R(e){return typeof e=="string"&&c().has(e)}function U(e,t){const r=c().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function _(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=c().get(r)?.fields??[],l=k(x(e?.props))?.fields,s=l?.length?[...l.map(o=>({...o})),...n.filter(o=>o.everySource&&!l.some(i=>i.key===o.key))]:n;return t?s.filter(o=>(o.kind??"text")===t):s}function H(e,t,r){return e?r?_(r).find(n=>n.key===t)??null:c().get(e)?.fields.find(n=>n.key===t)??null:null}function p(e,t=u){const r=e?.[t];return typeof r=="string"?r.trim():""}function V(e,t){return e.key||String(t+1)}function X(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}const y={Text:{text:u},ImageBlock:{src:u},ButtonBlock:{label:u,href:A}};function Y(e,t,r){const n=y[e]?.[r];return!!(n&&p(t,n))}function h(e,t){return!t||!e?null:e[t]??""}function $(e,t,r){if(!r)return t;let n=null;for(const[l,s]of Object.entries(y[e]??{})){const o=h(r,p(t,s));o!==null&&(n??={...t},n[l]=o)}return n??t}function f(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(s,o)=>{for(const i of s){if(i?.props?.id===t)return o;for(const[m,a]of Object.entries(i?.props??{})){if(!T(a))continue;const b=m===w&&R(i.type)?{owner:i,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,direct:!1,nested:o.nested,underBox:o.underBox||i.type===g},d=n(a,b);if(d!==void 0)return d}}},l=n(r,null);return l===void 0?null:l}function q(e,t){const r=f(e,t);return r&&r.owner}function z(e,t){const r=f(e,t);return r&&(r.direct?r.owner:null)}function G(e,t){const r=f(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}export{u as CARD_ROW_FIELD_PROP,A as CARD_ROW_LINK_PROP,O as CARD_TEMPLATE_BLOCKS,v as CARD_TEMPLATE_LABEL,w as CARD_TEMPLATE_SLOT,G as cardCopyPlace,V as cardKeyOf,X as cardRow,K as cardTemplateBlocks,z as cardTemplateCardOwner,H as cardTemplateField,U as cardTemplateFields,_ as cardTemplateFieldsOf,q as cardTemplateOwner,I as cardTemplateSlot,j as cardTemplatesNameBlocks,R as hasCardTemplate,W as isCardTemplateBlock,p as namedRowField,M as registerCardTemplates,Y as rowBound,h as rowFieldText,$ as rowFilledProps,N as templateOnRead};
@@ -0,0 +1,32 @@
1
+ export type MirrorCards = "even" | "odd";
2
+ export declare const MIRROR_CARDS_LABEL = "Mirror cards";
3
+ export declare const MIRROR_CARDS_OFF = "off";
4
+ export declare const MIRROR_CARDS_OPTIONS: readonly {
5
+ value: MirrorCards | typeof MIRROR_CARDS_OFF;
6
+ label: string;
7
+ }[];
8
+ export declare const MIRROR_CARDS_TITLES: Readonly<Record<MirrorCards, string>>;
9
+ export declare function mirrorCardsOf(value: unknown): MirrorCards | null;
10
+ export declare function mirrorCardsWrite(answer: unknown): MirrorCards | undefined;
11
+ export type MirrorCardsBox = {
12
+ direction?: unknown;
13
+ separator?: unknown;
14
+ loop?: unknown;
15
+ line?: unknown;
16
+ bgImage?: unknown;
17
+ columns?: unknown;
18
+ columnsTablet?: unknown;
19
+ share?: unknown;
20
+ wrap?: unknown;
21
+ };
22
+ export type CardCopyPlace = {
23
+ inCopy: boolean;
24
+ nestedCopy: boolean;
25
+ underBox: boolean;
26
+ };
27
+ export declare function ownsCard(place: CardCopyPlace): boolean;
28
+ export declare function mirrorCardsActs(box: MirrorCardsBox, ownsCard: boolean, sharedColumns: boolean): boolean;
29
+ export declare function isMirroredCopy(value: unknown, index: number | undefined): boolean;
30
+ export declare const MIRROR_ROW_CLASS = "view-wide:flex-row-reverse";
31
+ export declare function mirroredTextClasses(mirrored: boolean, align: unknown, partAlign: unknown): string;
32
+ export declare function mirroredBoxClass(mirrored: boolean, direction: unknown, justify: unknown, align: unknown): string;
@@ -0,0 +1 @@
1
+ import{isBackgroundBox as i}from"./box-background.js";import{boxColumnsClass as a,boxShareClasses as d,boxTabletColumnsClass as f,boxWrapClass as u}from"./box-layout.js";import{isStripBox as l}from"./box-separator.js";const v="Mirror cards",w="off",A=[{value:w,label:"Off"},{value:"even",label:"Even cards"},{value:"odd",label:"Odd cards"}],I={even:"Cards 2, 4, 6 draw the other way round",odd:"Cards 1, 3, 5 draw the other way round"};function n(r){return r==="even"||r==="odd"?r:null}function O(r){return n(r)??void 0}function y(r){return r.inCopy&&!r.nestedCopy&&!r.underBox}function g(r,e,t){return!e||r.direction!=="row"||t||l("row",r.separator)||r.loop==="scroll"||r.line===!0||i(typeof r.bgImage=="string"?r.bgImage:void 0)||a(r.columns)!==""||f(r.columnsTablet)!==""?!1:!(d(r.share)===""&&u(r.wrap)!=="")}function x(r,e){const t=n(r);return!t||typeof e!="number"||!Number.isInteger(e)||e<0?!1:t==="even"?e%2===1:e%2===0}const h="view-wide:flex-row-reverse",c={left:"view-wide:ml-auto!",right:"view-wide:ml-0!"},p={left:"view-wide:text-right!",right:"view-wide:text-left!"},m={start:"view-wide:justify-end!",end:"view-wide:justify-start!"},C={start:"view-wide:items-end!",end:"view-wide:items-start!"},o=(r,e)=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(r,e)?r[e]:"";function T(r,e,t){return r?[o(c,e),o(p,t)].filter(Boolean).join(" "):""}function M(r,e,t,s){return r?e==="row"?o(m,t):e==="column"?o(C,s):"":""}export{v as MIRROR_CARDS_LABEL,w as MIRROR_CARDS_OFF,A as MIRROR_CARDS_OPTIONS,I as MIRROR_CARDS_TITLES,h as MIRROR_ROW_CLASS,x as isMirroredCopy,g as mirrorCardsActs,n as mirrorCardsOf,O as mirrorCardsWrite,M as mirroredBoxClass,T as mirroredTextClasses,y as ownsCard};
@@ -0,0 +1,15 @@
1
+ import { type BlockSeed, type SeededNode } from "../../../seed-parts.js";
2
+ type Props = Record<string, unknown>;
3
+ export declare const CARDS_CARD: Props;
4
+ export declare const CARDS_TITLE_LOOK: Props;
5
+ export declare const CARDS_BODY_LOOK: Props;
6
+ export declare const rowFieldTextSeed: (field: string, props: Props, style: Props, eyebrow?: boolean) => BlockSeed;
7
+ export type CardsCardFields = {
8
+ title: string;
9
+ body: string;
10
+ };
11
+ export declare const TYPED_CARD_FIELDS: CardsCardFields;
12
+ export declare const SERVED_CARD_FIELDS: CardsCardFields;
13
+ export declare const cardsCardSeed: (fields?: CardsCardFields) => BlockSeed;
14
+ export declare const cardsTemplateNodes: (idOf: (type: string, at: string) => string, fields?: CardsCardFields) => SeededNode[];
15
+ export {};
@@ -0,0 +1 @@
1
+ import{CARD_ROW_FIELD_PROP as d}from"../../../../content/card-template.js";import{BOX_TYPE as l,CONTAINER_BLOCKS_SLOT as a}from"../../../container-blocks.js";import{DIM as s,INNER_BOX as n,TEXT as _,boxPadding as x,seedNodes as S,token as o}from"../../../seed-parts.js";import{labelTextSeed as D}from"../../../text-seeds.js";const c={...n,gap:12,gapPhone:12,...x(32,32,28,28)},m={textStyle:"heading-3",...o("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02},y={textStyle:"body-1",...o("body",15),lineHeight:1.6},p=(t,e,r,i=!1)=>({type:"Text",props:{...e,text:"",[d]:t,_partStyles:{text:{...i?D()._partStyles?.text??{}:{},...r}}}}),O={title:"title",body:"body"},b={title:"name",body:"note"},R=(t=O)=>({type:l,props:{...c,name:"Card"},slots:{[a]:[p(t.title,{..._,tag:"p",widthFit:"fill"},m),p(t.body,{...s,tag:"p",widthFit:"fill"},y)]}}),h=(t,e)=>S([R(e)],t);export{y as CARDS_BODY_LOOK,c as CARDS_CARD,m as CARDS_TITLE_LOOK,b as SERVED_CARD_FIELDS,O as TYPED_CARD_FIELDS,R as cardsCardSeed,h as cardsTemplateNodes,p as rowFieldTextSeed};
@@ -4,4 +4,10 @@ export declare const CARDS_PH: {
4
4
  title: string;
5
5
  };
6
6
  export type CardStyle = "cards" | "label-only";
7
+ export declare const CardsSlots: {
8
+ template: {
9
+ type: "slot";
10
+ allow: string[];
11
+ };
12
+ };
7
13
  export declare const CardsMeta: BlockMeta;
@@ -1 +1 @@
1
- const e={eyebrow:"Label",title:"Section *heading.*"},t={label:"Cards",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};export{e as CARDS_PH,t as CardsMeta};
1
+ import{cardTemplateSlot as e}from"../../../../content/card-template.js";const l={eyebrow:"Label",title:"Section *heading.*"},t={template:e()},r={label:"Cards",fields:t,defaultProps:{eyebrow:"",title:"",items:[],columns:3}};export{l as CARDS_PH,r as CardsMeta,t as CardsSlots};
@@ -108,6 +108,14 @@
108
108
  }
109
109
  }
110
110
  }
111
+ },
112
+ "highlightBadge": {
113
+ "type": "custom",
114
+ "__text": {
115
+ "control": "text",
116
+ "label": "Highlight badge",
117
+ "placeholder": "Most popular"
118
+ }
111
119
  }
112
120
  },
113
121
  "CategoryBar": {
@@ -0,0 +1,4 @@
1
+ type Props = Record<string, unknown>;
2
+ export declare function withCardsTemplate(type: string | undefined, props: Props): Props;
3
+ export declare function cardsFieldsFollowContent(props: Props): Props;
4
+ export {};
@@ -0,0 +1 @@
1
+ import{declaredBlockSource as u}from"../content/block-sources.js";import{nonEmptyString as C}from"../non-empty-string.js";import{CARD_ROW_FIELD_PROP as s}from"../content/card-template.js";import{CONTAINER_BLOCKS_SLOT as y}from"./container-blocks.js";import{SERVED_CARD_FIELDS as a,TYPED_CARD_FIELDS as c,cardsTemplateNodes as E}from"./blocks/general/Cards/card-seed.js";function O(e,t){if(e!=="Cards")return t;if(t.template!==void 0)return D(t);const r=C(t.id)??"Cards",o=u(t)?a:c;return{...t,template:E((m,n)=>n==="0"?`${r}~card`:`${r}~card.${n.slice(2)}`,o)}}const A=e=>{const[t,r]=e?[c,a]:[a,c];return new Map([[t.title,r.title],[t.body,r.body]])};function _(e,t){let r=null;return e.forEach((o,m)=>{const n=o?.props;if(!n)return;let i=n;const l=n[s];o.type==="Text"&&typeof l=="string"&&t.has(l)&&(i={...i,[s]:t.get(l)});const f=n[y];if(Array.isArray(f)){const d=_(f,t);d!==f&&(i={...i,[y]:d})}i!==n&&(r??=[...e],r[m]={...o,props:i})}),r??e}function D(e){if(!Array.isArray(e.template))return e;const t=_(e.template,A(!!u(e)));return t===e.template?e:{...e,template:t}}export{D as cardsFieldsFollowContent,O as withCardsTemplate};
@@ -1 +1 @@
1
- import{PRODUCT_PAGE_SLUG as n,templateProductKind as i}from"../content/product-page.js";import{declaredRecordType as l}from"../content/record-types.js";let t=null,r=null;function u(e,o){t=e,r=o}function p(e){u(e,null)}function g(){return t}function d(){return r==="dynamic"||t===n}function P(e){return i(t??"",e)??"alloy-wheel"}function f(e){return d()?l(e):null}export{f as editorRecordType,P as editorTemplateProductKind,g as getEditorPageSlug,d as isEditorOnDynamicPage,u as setEditorPage,p as setEditorPageSlug};
1
+ import{PRODUCT_PAGE_SLUG as n,templateProductKind as i}from"../content/product-page.js";import{declaredRecordType as l}from"../content/record-types.js";import{isDynamicPageRow as u}from"../editor-page-rows.js";let t=null,r=null;function d(e,o){t=e,r=o}function P(e){d(e,null)}function m(){return t}function a(){return u({kind:r})||t===n}function f(e){return i(t??"",e)??"alloy-wheel"}function x(e){return a()?l(e):null}export{x as editorRecordType,f as editorTemplateProductKind,m as getEditorPageSlug,a as isEditorOnDynamicPage,d as setEditorPage,P as setEditorPageSlug};
@@ -1 +1 @@
1
- import{isNodeList as a}from"efficient-easel/data";const m={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"};function l(n){let e=n.props,c=!1;if(n.type&&e)for(const[t,o]of Object.entries(m)){const r=t.indexOf("."),i=t.slice(0,r),s=t.slice(r+1);if(i!==n.type||!(s in e))continue;const p=e[s],f={...e};delete f[s],(!(o in f)||f[o]===void 0)&&(f[o]=p),e=f,c=!0}if(e){let t=e;for(const[o,r]of Object.entries(e)){if(!a(r))continue;const i=r.map(l);i.some((s,p)=>s!==r[p])&&(t===e&&(t={...e}),t[o]=i,c=!0)}e=t}return c?{...n,props:e}:n}function d(n){const e=n;if(!e||typeof e!="object")return n;let c=!1;const t={...n};if(Array.isArray(e.content)){const o=e.content.map(l);o.some((r,i)=>r!==e.content[i])&&(t.content=o,c=!0)}if(e.zones&&typeof e.zones=="object"){let o=!1;const r=Object.fromEntries(Object.entries(e.zones).map(([i,s])=>{if(!Array.isArray(s))return[i,s];const p=s.map(l);return p.some((f,u)=>f!==s[u])&&(o=!0),[i,p]}));o&&(t.zones=r,c=!0)}return c?t:n}export{m as RENAMED_PROPS,d as migrateRenamedProps};
1
+ import{isNodeList as m}from"efficient-easel/data";import{templateOnRead as u}from"../content/card-template.js";const y={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"};function l(o){let e=o.props,c=!1;if(o.type&&e)for(const[t,r]of Object.entries(y)){const n=t.indexOf("."),i=t.slice(0,n),s=t.slice(n+1);if(i!==o.type||!(s in e))continue;const p=e[s],f={...e};delete f[s],(!(r in f)||f[r]===void 0)&&(f[r]=p),e=f,c=!0}if(o.type&&e){const t=u(o.type,e);t!==e&&(e=t,c=!0)}if(e){let t=e;for(const[r,n]of Object.entries(e)){if(!m(n))continue;const i=n.map(l);i.some((s,p)=>s!==n[p])&&(t===e&&(t={...e}),t[r]=i,c=!0)}e=t}return c?{...o,props:e}:o}function g(o){const e=o;if(!e||typeof e!="object")return o;let c=!1;const t={...o};if(Array.isArray(e.content)){const r=e.content.map(l);r.some((n,i)=>n!==e.content[i])&&(t.content=r,c=!0)}if(e.zones&&typeof e.zones=="object"){let r=!1;const n=Object.fromEntries(Object.entries(e.zones).map(([i,s])=>{if(!Array.isArray(s))return[i,s];const p=s.map(l);return p.some((f,a)=>f!==s[a])&&(r=!0),[i,p]}));r&&(t.zones=n,c=!0)}return c?t:o}export{y as RENAMED_PROPS,g as migrateRenamedProps};