efficient-web-builder 59.2.0 → 60.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.
- package/CHANGELOG.md +55 -0
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/storefront-editor.css +21 -7
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -1
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +4 -2
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/card-row-fields.d.ts +3 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/mirror-cards-field.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +23 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +3 -1
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +7 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-card-rule.d.ts +7 -0
- package/dist/format/lib/content/box-card-rule.js +1 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-phone-place.d.ts +4 -4
- package/dist/format/lib/content/box-phone-place.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/box-side-space.d.ts +2 -1
- package/dist/format/lib/content/box-side-space.js +1 -1
- package/dist/format/lib/content/button-icon.d.ts +3 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +9 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/cell-picture-sizes.js +1 -1
- package/dist/format/lib/content/footprint.d.ts +2 -0
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +6 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/hover-media.d.ts +30 -0
- package/dist/format/lib/content/hover-media.js +1 -0
- package/dist/format/lib/content/image-aspect.d.ts +3 -3
- package/dist/format/lib/content/image-aspect.js +1 -1
- package/dist/format/lib/content/ink.d.ts +3 -0
- package/dist/format/lib/content/ink.js +1 -1
- package/dist/format/lib/content/list-position.d.ts +3 -0
- package/dist/format/lib/content/list-position.js +1 -0
- package/dist/format/lib/content/list-query.d.ts +2 -0
- package/dist/format/lib/content/list-query.js +1 -1
- package/dist/format/lib/content/mirror-cards.d.ts +3 -0
- package/dist/format/lib/content/mirror-cards.js +1 -1
- package/dist/format/lib/content/part-display.d.ts +2 -1
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/site-gutter.d.ts +2 -0
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/content/view-hide-class.d.ts +5 -2
- package/dist/format/lib/content/view-hide-class.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +2 -1
- package/dist/format/lib/content/view-lines.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +3 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +7 -0
- package/dist/format/lib/document/card-content-switch.js +1 -1
- package/dist/format/lib/document/panel-only.d.ts +2 -0
- package/dist/format/lib/document/panel-only.js +1 -0
- package/dist/format/lib/document/row-hand.js +1 -1
- package/dist/format/lib/document/section-catalog.d.ts +2 -1
- package/dist/format/lib/document/section-catalog.js +10 -10
- package/dist/format/lib/document/section-descriptions.js +1 -1
- package/dist/format/lib/document/seed-shape.d.ts +2 -0
- package/dist/format/lib/document/seed-shape.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +21 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/fit-words.d.ts +1 -0
- package/dist/format/lib/fit-words.js +9 -8
- package/dist/format/lib/sized-image.js +1 -1
- package/dist/format/lib/source-rules/one-phone-edge.d.ts +13 -0
- package/dist/format/lib/source-rules/one-phone-edge.js +8 -0
- package/dist/format/lib/source-rules/published-mounts.d.ts +22 -0
- package/dist/format/lib/source-rules/published-mounts.js +58 -0
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -2
- package/dist/format/lib/source-rules/support/ts-program.d.ts +4 -0
- package/dist/format/lib/source-rules/support/ts-program.js +2 -0
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +3 -3
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +5 -2
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/Flex.d.ts +2 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroArrows.d.ts +6 -3
- package/dist/render/components/HeroArrows.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HoverMediaLayer.d.ts +9 -0
- package/dist/render/components/HoverMediaLayer.js +1 -0
- package/dist/render/components/InBoxContext.d.ts +3 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/ListSearchBox.d.ts +2 -1
- package/dist/render/components/ListSearchBox.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.d.ts +2 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +4 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SideListLayout.d.ts +14 -0
- package/dist/render/components/SideListLayout.js +1 -0
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +7 -1
- package/dist/render/components/ViewHideRoot.js +1 -1
- package/dist/render/lib/content/block-size.d.ts +4 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/box-cell-bound.js +1 -1
- package/dist/render/lib/content/box-shared-columns.js +1 -1
- package/dist/render/lib/content/box-stack-line.d.ts +1 -0
- package/dist/render/lib/content/box-stack-line.js +1 -1
- package/dist/render/lib/content/view-values.d.ts +2 -0
- package/dist/render/lib/content/view-values.js +1 -1
- package/dist/render/lib/dealer-source.d.ts +3 -2
- package/dist/render/lib/dealer-source.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +3 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/hidden-nodes.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/published-passes.d.ts +13 -0
- package/dist/render/lib/document/published-passes.js +1 -0
- package/dist/render/lib/document/text-parts.d.ts +1 -0
- package/dist/render/lib/document/text-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +4 -0
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{VIEW_DESKTOP_MIN as f
|
|
1
|
+
import{VIEW_DESKTOP_MIN as f}from"efficient-easel/draw";import{PHONE_EDGE as p}from"../../../format/lib/content/view-lines.js";import{boxPhoneRowFits as h,boxRowColumnsClass as w,boxRowTabletColumnsClass as C,boxRowTabletShareClass as O,boxShareClasses as R,boxShareTabletOf as S}from"../../../format/lib/content/box-layout.js";import{isStripBox as k}from"../../../format/lib/content/box-separator.js";import{BOX_STACK_LINE as l,storedStackLine as E}from"./box-stack-line.js";const T={phone:1,tablet:1,desktop:1},N=e=>typeof e=="number"&&Number.isInteger(e)&&e>=1?e:void 0;function M(e){if(e.direction==="column")return T;if(e.direction!=="row"||k(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||e.shared)return;const o=N(e.count),a=d=>d==="equal"&&o?1/o:1,s=w(e)!==""?1/e.columns:a(e.share),n=Number(e.phoneRow);let t=1;(n===2||n===3)&&!h(e.phoneRow,e.sharePhone)&&(t=R(e.share)!==""?o?1/(o%n||n):1:1/n);const u=C(e)!==""?e.columnsTablet:void 0,i=O(e)!==""?S(e.shareTablet):null,c=u!==void 0?1/u:i!==null?a(i):void 0,r=c===void 0?E(e.stackBelow):void 0;if(r!==void 0&&r>l)return{phone:t,tablet:1,desktop:r>f?1:s};const m=c??Math.max(t,l<f?s:0);return{phone:p<=l?t:Math.max(t,s),tablet:m,desktop:s}}export{M as boxCellFractions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REPEAT_ATTRIBUTE as l,phoneKey as
|
|
1
|
+
import{REPEAT_ATTRIBUTE as l,phoneKey as A,tabletKey as E}from"efficient-easel/draw";import{parseLoop as c}from"../../../format/lib/animation/loop.js";import{finiteNumber as O}from"../../../format/lib/finite-number.js";import{boxIsCard as $}from"../../../format/lib/content/box-background.js";import{isStripBox as g}from"../../../format/lib/content/box-separator.js";import{CARD_STATE_ATTR as N}from"../../../format/lib/content/card-state.js";import{BOX_ALIGN_CLASS as u,boxRowColumnsClass as y,boxRowTabletColumnsClass as T}from"../../../format/lib/content/box-layout.js";const d="sharedColumns",h="shared",m="own",p="scroll",X="Row columns",q=[{value:m,label:"Each row"},{value:h,label:"Shared"}],z=[{value:m,label:"Each row"},{value:p,label:"Shared, scroll"}],w="(width >= 800px)",D="(width < 800px)";function L(t){const o={direction:t.direction,separator:t.separator,loop:c(t.loop),line:t.line};return o.direction==="row"&&!g(o.direction,o.separator)&&o.loop!=="scroll"&&o.line!==!0&&!$(t)&&y({...o,columns:t.columns})===""&&T({...o,columnsTablet:t[E("columns")]})===""}function f(t){return Array.isArray(t)?t.filter(o=>typeof o?.type=="string").length:O(t?.blockCount)??0}function J(t){return L(t)&&r(f(t.content))>0?H(t[d],t[A(d)]):{desktop:!1,phone:!1}}const r=t=>Number.isInteger(t)&&t>0?t:0,S=(t,o)=>`sf-shared-cols-${t}${o===void 0?"":`-from-${o}`}`,R=t=>`sf-shared-cols-phone-${t}`;function H(t,o){return{desktop:t===h,phone:o===p}}function Q(t,o,e){const n=r(o);return n?`${t.desktop?` ${S(n,e)}`:""}${t.phone?` ${R(n)}`:""}`:""}function C(t){const o=`[${l}]`;return`:has(> ${o} ${t}):not(:has(> ${o} ${o} ${t}))`}function _(t,o,e=""){const n=C(t);return`${n}{display:grid;grid-template-columns:${o};column-gap:0${e}}${n}>:not(:has(${t})):not(${t}){grid-column:1/-1}${n} :has(${t}),${n} ${t}{display:grid;grid-template-columns:subgrid;grid-column:1/-1;min-width:0}`}const P="data-sf-shared-plain";function v(t){const o=`[${l}]`,e=`[${P}]`,n=C(t)+`:not(:has(> :not(${o}) > :not(${e}) ${t})):not(:has(> ${o} > * > :not(${e}) ${t})):not(:has(:not(${e}) > :not(${e}) > ${t})):not(:has(> ${o}[${N}]))`,s=`${n}>:not(style):not(:has(${t})):not(${t})`;return`${n}{display:table;width:100%;border-collapse:collapse}${n}>:has(${t}),${n}>${o}>:has(${t}),${n} ${e}:has(${t}),${n} ${e}>:has(${t}){display:contents}${n} ${t}{display:table-row}${n} ${t}>*{display:table-cell;width:auto;vertical-align:top}${n} ${t}.${u.center}>*{vertical-align:middle}${n} ${t}.${u.end}>*{vertical-align:bottom}${s}{display:table-caption;caption-side:bottom}${s}:has(~ ${o}){caption-side:top}`}function V(t,o,e){const n=r(o);if(!n)return"";let s="";if(t.desktop){const a=`.${S(n,e)}`;s+=`@media ${e===void 0?w:`(width >= ${e}px)`}{${_(a,`repeat(${n},auto)`)}${v(a)}}`}return t.phone&&(s+=`@media ${D}{${_(`.${R(n)}`,`repeat(${n},minmax(max-content,auto))`,";overflow-x:auto")}}`),s}const I="sharedRows",U="shared",k="sf-shared-rows-list";function M(t){const o=t.direction;return(o===void 0||o==="column")&&c(t.loop)!=="scroll"&&t.line!==!0&&!$(t)}function Z(t){return t[I]===U&&M(t)&&r(f(t.content))>0}const x=t=>`sf-shared-rows-${t}`;function tt(t,o){const e=r(o);return t&&e?` ${x(e)}`:""}function ot(t,o){const e=r(o);if(!t||!e)return"";const n=`.${x(e)}`,s=`.${k}`,a=`display:grid;grid-template-rows:subgrid;grid-row:span ${e};min-height:0;grid-template-columns:minmax(0,1fr)`,b=["start","center","end"].map(i=>`${s} ${n}.items-${i}{justify-items:${i}}`).join("");return`${s} :has(${n}){${a};row-gap:0}${s} ${n}{${a};justify-content:normal;align-items:stretch}${b}`}export{d as SHARED_COLUMNS_KEY,X as SHARED_COLUMNS_LABEL,m as SHARED_COLUMNS_OFF,z as SHARED_COLUMNS_PHONE_POINTS,q as SHARED_COLUMNS_POINTS,P as SHARED_PLAIN_ATTR,I as SHARED_ROWS_KEY,k as SHARED_ROWS_LIST_CLASS,Q as sharedColumnsClasses,V as sharedColumnsCss,J as sharedColumnsDrawn,L as sharedColumnsFits,tt as sharedRowsClasses,ot as sharedRowsCss,Z as sharedRowsDrawn,M as sharedRowsFits};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as
|
|
1
|
+
import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as u}from"efficient-easel/draw";import{PHONE_EDGE as f}from"../../../format/lib/content/view-lines.js";const p=f,d=960,$=f,O=u,m={min:p,max:1600,step:10},b="stackBelow";function g(t){if(!(typeof t!="number"||!Number.isFinite(t))&&!(t<m.min||t>m.max))return Math.round(t)}function N(t){return g(t)??p}const _=t=>`sf-stack-${t}`,w=t=>`sf-stack-${t}-gutter`,E=t=>`sf-stack-${t}-outer`,n=t=>`${t-.02}px`;function T(t,x={}){const i=x.gutter!==!1,a=`.${_(t)}`,e=`.${w(t)}`,c=`.${E(t)}`,o=[];if(t>p){const s=`${a}>.sf-block-size,${a}>[data-easel-block]>[data-sf-part-host]>.sf-block-size`,h=Math.min(t,r);o.push(`@media (min-width:${p}px) and (max-width:${n(t)}){${a}${a}{flex-direction:column}.sf-gap-overlap${a}{--sf-gap-overlap-eff:calc(var(--sf-gap-overlap) / 2)}${s}{width:min(var(--sf-bw-p,100%),100%);flex-grow:0}}`,`@media (min-width:${p}px) and (max-width:${n(h)}){.sf-gap-zone${a}{gap:var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2)))}}`),t>r&&o.push(`@media (min-width:${r}px) and (max-width:${n(t)}){.sf-gap-zone${a}{gap:var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2))}}`)}return i&&o.push(`@media (max-width:${n(t)}){${e}${e}{padding-inline:min(24px,var(--sf-site-gutter,40px))}}`),i&&t<d&&o.push(`@media (min-width:${t}px) and (max-width:${n(d)}){${e}${e}{padding-inline:var(--sf-site-gutter,40px)}}`),t>$&&o.push(`@media (min-width:${$}px) and (max-width:${n(t)}){`+["top","bottom","left","right"].map(s=>`.sf-pad-${s}-phone:has(>${c}),.sf-pad-${s}-phone${c}{padding-${s}:var(--sf-pad-${s[0]}-phone)!important}`).join("")+"}"),o.join("")}export{d as BOX_GUTTER_LINE,$ as BOX_PHONE_PAD_AT_EDGE,O as BOX_PHONE_PAD_LINE,p as BOX_STACK_LINE,m as BOX_STACK_RANGE,b as STACK_BELOW_PROP,N as boxStackLine,w as stackGutterClass,T as stackLineCss,E as stackOuterClass,_ as stackRowClass,g as storedStackLine};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { RESPONSIVE_RULES } from "../../../format/lib/content/view-lines.js";
|
|
2
2
|
export { RESPONSIVE_RULES };
|
|
3
3
|
export { type ViewOverrides, viewOverrides, viewRules } from "../../../format/lib/content/view-overrides.js";
|
|
4
|
+
export declare const EDGE_TABLET_MEDIA = "(min-width: 800px) and (max-width: 1099.98px)";
|
|
5
|
+
export declare const EDGE_PHONE_MEDIA = "(max-width: 799.98px)";
|
|
4
6
|
export declare const TABLET_MEDIA = "(min-width: 720px) and (max-width: 1099.98px)";
|
|
5
7
|
export declare const PHONE_MEDIA = "(max-width: 719.98px)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{VIEW_DESKTOP_MIN as t,VIEW_TABLET_MIN as
|
|
1
|
+
import{VIEW_DESKTOP_MIN as t,VIEW_TABLET_MIN as o}from"efficient-easel/draw";import{PHONE_EDGE as x,RESPONSIVE_RULES as p}from"../../../format/lib/content/view-lines.js";import{viewOverrides as I,viewRules as w}from"../../../format/lib/content/view-overrides.js";const E=.02,_=`(min-width: ${x}px) and (max-width: ${t-E}px)`,e=`(max-width: ${x-E}px)`,m=`(min-width: ${o}px) and (max-width: ${t-E}px)`,d=`(max-width: ${o-E}px)`;export{e as EDGE_PHONE_MEDIA,_ as EDGE_TABLET_MEDIA,d as PHONE_MEDIA,p as RESPONSIVE_RULES,m as TABLET_MEDIA,I as viewOverrides,w as viewRules};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MapPin } from "efficient-shell/map";
|
|
2
|
+
import { type ListPosition } from "../../format/lib/content/list-position.js";
|
|
2
3
|
export type FootprintSource = "typed" | "dealers";
|
|
3
|
-
export type DealerListPosition =
|
|
4
|
+
export type DealerListPosition = ListPosition;
|
|
4
5
|
export type DealerPlacement = "located" | "approximate" | "pending" | "not_found" | "failed" | "no_address";
|
|
5
6
|
export interface SiteDealer {
|
|
6
7
|
id: string;
|
|
@@ -29,6 +30,6 @@ export type DealerSource = (query: {
|
|
|
29
30
|
export declare const DealerSourceProvider: import("react").Provider<DealerSource | null>;
|
|
30
31
|
export declare const useDealerSource: () => DealerSource | null;
|
|
31
32
|
export declare function parseFootprintSource(value: unknown): FootprintSource;
|
|
32
|
-
export declare
|
|
33
|
+
export declare const parseDealerListPosition: (value: unknown) => DealerListPosition;
|
|
33
34
|
export declare function dealerPins(dealers: SiteDealer[]): MapPin[];
|
|
34
35
|
export declare function dealerDistanceLabel(km: number | null): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createContext as r,useContext as
|
|
1
|
+
"use client";import{createContext as r,useContext as i}from"react";import{parseListPosition as l}from"../../format/lib/content/list-position.js";const n=r(null),c=n.Provider,u=()=>i(n),a=["typed","dealers"];function d(e){return a.includes(e)?e:"typed"}const x=l;function m(e){const o=[];for(const t of e)t.placement!=="located"&&t.placement!=="approximate"||t.lat===null||t.lng===null||o.push({key:t.id,label:t.name,lat:t.lat,lng:t.lng,glyph:"",tone:"",approximate:t.placement==="approximate"});return o}function f(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}export{c as DealerSourceProvider,f as dealerDistanceLabel,m as dealerPins,x as parseDealerListPosition,d as parseFootprintSource,u as useDealerSource};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as p}from"react/jsx-runtime";import{HideTaker as T}from"../../../../../components/ViewHideRoot.js";import{CardTemplateRows as S,useCardRow as k}from"../../../../../components/CardRowContext.js";import{BOX_ITEMS_ATTR as A}from"../../../../../../format/lib/content/box-layout.js";import{cardItemAction as C,highlightOf as g,keyedRows as L,markedRows as _,rowHoldsContent as j}from"../../../../../../format/lib/content/card-state.js";import{CARD_LIST_ROWS as I,CARD_LIST_TYPE as R,cardListFieldsOf as b,cardListShows as E,cardRow as w,rowFieldSpec as O}from"../../../../../../format/lib/content/card-template.js";import{declaredBlockSource as B,sourceChoices as M,sourcedRows as x}from"../../../../../../format/lib/content/block-sources.js";import{CardListMeta as D}from"../../../../../../format/lib/document/blocks/general/CardList/meta.js";function h(t){const s=t&&typeof t=="object"?t.state:void 0;return s&&typeof s=="object"?s:void 0}const y=[{}];function v(t,s){const l=B(t);let n,f=[];if(l){const e=x(t,s);n=[...e.rows],e.sample&&(f=M(l))}else{const e=t[I];n=Array.isArray(e)?e:[]}const a=L(n.map(w),f),o=n.map((e,i)=>({item:e,row:a[i]})).filter(({item:e})=>s||j(e)),d=_(o.map(e=>e.row),g(t));return{items:o.map(e=>e.item),rows:d.rows,states:o.map(({item:e},i)=>{const c={...h(e),...d.states[i]};return Object.keys(c).length?c:void 0})}}function F({id:t,own:s,Template:l,editing:n,dragRef:f}){const a=k();let o,d,e,i;if(a){const r=E(s,a.ownerType);i=O(a,r)?.fields;const m=r&&a.item&&typeof a.item=="object"?a.item[r]:void 0,u=Array.isArray(m)?m:[];o=u.length?u:n?y:u,d=o.map(w),e=o.map(h)}else{const r=v(s,n);i=b(null,{type:R,props:s});const m=!r.items.length&&n;o=m?y:r.items,d=m?y.map(w):r.rows,e=m?[]:r.states}if(!o.length)return null;const c=n?[]:o.map(C);return p(S,{ownerId:t,ownerType:R,Template:l,rows:d,items:o,fields:i?.length?i:void 0,states:e.some(Boolean)?e:void 0,actions:c.some(Boolean)?c:void 0,fallback:null,children:r=>p(T,{ref:f,className:"contents",[A]:"",children:r})})}const G={...D,render:t=>p(F,{id:String(t.id??""),own:t,Template:t.template,editing:t.editor?.isEditing===!0,dragRef:t.editor?.dragRef??void 0})};export{G as CardListRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s,Fragment as
|
|
1
|
+
import{jsx as s,Fragment as m}from"react/jsx-runtime";import{SECTION_GRID_COLUMN_CLASS as E}from"../../../../../../format/lib/content/section-min-height.js";import _,{cardGridCornerClasses as x}from"../../../../../components/Cards.js";import{CardTemplateRows as A}from"../../../../../components/CardRowContext.js";import{cardRow as D}from"../../../../../../format/lib/content/card-template.js";import{highlightOf as H,keyedRows as u,markedRows as f,rowHoldsContent as h}from"../../../../../../format/lib/content/card-state.js";import{declaredBlockSource as b,sourceChoices as I,sourcedRows as w}from"../../../../../../format/lib/content/block-sources.js";import{parseSectionHeadPlacement as L}from"../../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as F}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as T,phHide as y}from"../../scaffold.js";import{say as n}from"../../../../../../format/lib/editor-words.js";import{SERVED_CARD_FIELDS as a}from"../../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{CardsMeta as v,CARDS_PH as C}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const g=()=>[{title:n("Card title one"),body:n("A short line about this card.")},{title:n("Card title two"),body:n("A short line about this card.")},{title:n("Card title three"),body:n("A short line about this card.")}],S=()=>g().map(t=>({[a.title]:t.title??"",[a.body]:t.body??""}));function N(t){return b(t)?w(t,t.editor?.isEditing===!0,S()).rows.filter(e=>e[a.title]||e[a.body]).map(e=>({title:e[a.title]??"",body:e[a.body]??""})):null}function O(t){const e=t.editor?.isEditing===!0,o=b(t),d=H(t);if(o){const r=w(t,e,S());return f(u(r.rows,r.sample?I(o):[]).filter(h),d)}const l=T(t.items,g(),t.editor).map(D);return f(u(l).filter(r=>e||h(r)),d)}function P(t,e){const o=`relative grid ${E} bg-bg`;return s("div",{className:e?`${o} ${e}`:o,children:t})}const X={...v,render:t=>{const e=L(t.headPlacement)==="own-box",o=i=>e?void 0:i,d=(t.template?.blockCount??0)>0,l=N(t);if(!d&&l&&!l.length)return s(m,{});const r=i=>s(_,{look:F(t.eyebrowLook,t.cardStyle==="label-only"?"KeyFeatures":"Cards"),eyebrow:o(y(t.eyebrow,C.eyebrow,t.editor)),title:o(y(t.title,C.title,t.editor)),columns:t.columns,omitHead:e,editing:t.editor?.isEditing,cards:i}),{rows:c,states:R}=d?O(t):{rows:[],states:[]};return d&&l&&!c.length?s(m,{}):s(A,{ownerId:String(t.id??""),ownerType:"Cards",Template:t.template,rows:c,states:R,fallback:r(),wrapCopy:(i,k)=>P(i,x(k.index,c.length,t.columns)),children:i=>c.length?r(i):r()})}};export{X as CardsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{BOX_ANGLE_PROP as g}from"../../../../../../format/lib/content/box-angle.js";import{BOX_SIDE_SPACE_PROP as b}from"../../../../../../format/lib/content/box-side-space.js";import{phoneKey as a,tabletKey as t}from"efficient-easel/draw";import{BOX_SWATCH_PROP as f,boxCardProps as d,boxPaintOf as S}from"../../../../../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as u}from"../../../../../../format/lib/content/box-card-rule.js";import{sharedColumnsDrawn as w,sharedRowsDrawn as P}from"../../../../content/box-shared-columns.js";import{CountRowsContext as O,NO_COUNTS as k}from"../../../../../components/CountRowsContext.js";import{RowEmptyGate as y}from"../../../../../components/CardRowContext.js";import{BOX_HIDE_WHEN_ROW_EMPTY as C,CARD_ROW_LINK_PROP as T,namedRowField as r}from"../../../../../../format/lib/content/card-template.js";import _ from"../../../../../components/Flex.js";import{loopDelayOf as R,loopSecondsOf as x,parseLoop as D,parseLoopDirection as B}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as j,declaredBlockSource as E,servedRows as H}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as I}from"../../../../content/section-padding.js";import{sectionFillsHeight as N}from"../../../../../../format/lib/content/section-min-height.js";import{boxHighlightStyle as v,pictureHoverOf as A}from"../../../../../../format/lib/animation/hover.js";import{slotCountOf as F}from"../../../slot-counts.js";import{FlexMeta as L}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const te={...L,render:e=>{const n=!!e.editor?.isEditing,h=l(_,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[a("gap")],gapTablet:e[t("gap")],justify:e.justify,justifyTablet:e[t("justify")],justifyPhone:e[a("justify")],align:e.align,alignTablet:e[t("align")],alignPhone:e[a("align")],wrap:e.wrap,wrapTablet:e[t("wrap")],share:e.share,sharePhone:e[a("share")],shareTablet:e[t("share")],wrapPhone:e[a("wrap")],orderPhone:e[a("order")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[t("columns")],separator:e.separator,stackBelow:e.stackBelow,blockSpacing:e.blockSpacing,blockSpacingTablet:e[t("blockSpacing")],blockSpacingPhone:e[a("blockSpacing")],bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,rowImage:r(e,u),pictureHover:A(e),darken:e.darken,darkenStyle:e.darkenStyle,darkenTablet:e[t("darken")],darkenPhone:e[a("darken")],darkenStyleTablet:e[t("darkenStyle")],darkenStylePhone:e[a("darkenStyle")],placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderTablet:e.sectionBorderTablet,borderPhone:e.sectionBorderPhone,pad:I(e),contained:e.contained,fillHeight:N(e),shadow:e.shadow,shadowTablet:e[t("shadow")],shadowPhone:e[a("shadow")],loop:D(e.loop),scrollDirection:B(e.scrollDirection),loopSeconds:x({loopDuration:e.loopDuration}),loopDelay:R({loopDelay:e.loopDelay}),editing:n,fillColor:e.fillColor,fillColorTablet:e[t("fillColor")],fillColorPhone:e[a("fillColor")],swatch:e[f],line:e.line,upcoming:e.upcoming,link:e.link,rowLink:r(e,T),highlight:v(e,m=>S(m)??""),boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[t("boxShape")],angle:e[g],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:w(d(e,!1)),sharedRows:P(d(e,!1)),boxId:typeof e.id=="string"?e.id:void 0,slotCount:F(e),mirrorCards:e.mirrorCards,content:e.content,rowTitle:e.rowTitle,startsOpen:e.startsOpen,rowStyle:e.rowStyle,sideSpace:e[b]}),o=E(e),c=o?o===j?H(e):k:null,i=l(O.Provider,{value:c,children:h});return e[C]===void 0?i:l(y,{props:e,editing:n,children:i})}};export{te as FlexRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import{phoneKey as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{phoneKey as h}from"efficient-easel/draw";import{CardRowDrawn as p}from"../../../../../components/CardRowContext.js";import w from"../../../../../components/ImageBlock.js";import{recordPictureAlt as S}from"../../../../../../format/lib/content/record-row.js";import{namedRowField as x,rowFieldSpec as B,rowFieldText as I,rowNextPicture as b}from"../../../../../../format/lib/content/card-template.js";import{blockSizeOf as F,blockSizeValuesOf as O}from"../../../../content/block-size.js";import{padValuesOf as P}from"../../../../content/section-padding.js";import{pictureHoverOf as v}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as z}from"../../../../../../format/lib/content/picture-focus-rows.js";import{ImageBlockMeta as R}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const _={...R,render:e=>{const t=x(e);return t?l(p,{type:"ImageBlock",props:e,children:(o,r,a)=>{const c=B(r,t),i=r?c?.alt:S(t);return m(e,o.src,(i&&I(a,i))??e.alt,b(r?.item,c?.next,typeof o.src=="string"?o.src:""))}}):m(e,e.src,e.alt)}};function m(e,t,o,r=""){const{aspect:a,contained:c,grayscale:i,darken:f,darkenStyle:d,href:s,fit:u,corners:k,cornerSides:g,editor:y}=e,n=z(e,"focal");return l(w,{src:t,alt:o,aspect:a,aspectPhone:e[h("aspect")],contained:c,grayscale:i,darken:f,darkenStyle:d,pictureHover:v(e,"ImageBlock"),...r?{nextSrc:r}:{},href:s,fit:u,focal:n.desktop,focalPhone:n.phone,focalTablet:n.tablet,corners:k,cornerSides:g,pad:P(e),ownSize:F(O(e))!==null,editing:y?.isEditing===!0})}export{_ as ImageBlockRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import o from"../../../../../components/ListSearchBox.js";import{readHidable as n}from"efficient-easel/draw";import{LIST_KEY_PROP as r}from"../../../../../../format/lib/document/list-search-scopes.js";import{ListSearchMeta as a}from"../../../../../../format/lib/document/blocks/general/ListSearch/meta.js";const x={...a,render:t=>{const e=n(t.hint),i=n(t.noMatchText);return d(o,{hint:e.hidden?void 0:e.text,noMatchText:i.hidden?void 0:i.text,listKey:typeof t[r]=="string"?t[r]:void 0,editing:!!t.editor?.isEditing,takesViewHide:!0})}};export{x as ListSearchRender};
|
|
@@ -41,6 +41,7 @@ export declare const ownFill: (painted: string | undefined, p: Props, ctx: Conve
|
|
|
41
41
|
export declare const fillNoBoxHolds: (painted: string | undefined) => string | undefined;
|
|
42
42
|
export declare const bandIndex: (p: Props, ctx: ConvertContext) => number;
|
|
43
43
|
export declare const bandAccent: (stored: unknown, p: Props, ctx: ConvertContext) => unknown;
|
|
44
|
+
export declare const surfaceAccent: (stored: unknown, ctx: ConvertContext) => unknown;
|
|
44
45
|
export declare const bandProps: (p: Props, ctx: ConvertContext) => Props;
|
|
45
46
|
export declare const bandWrites: (node: {
|
|
46
47
|
props: Props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_WIDTH_KEYS as L}from"../../../../../format/lib/content/section-width.js";import{phoneKey as v}from"efficient-easel/draw";import{BOX as w,INNER_BOX as
|
|
1
|
+
import{SECTION_WIDTH_KEYS as L}from"../../../../../format/lib/content/section-width.js";import{phoneKey as v}from"efficient-easel/draw";import{BOX as w,INNER_BOX as U,LABEL_FACE as N,TEXT as k,boxPadding as M,fillSlot as _,token as y}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_KEYS as F}from"../../../animation/entrance.js";import{CARD_HOVER_KEYS as B}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as K}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as X}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as G}from"../../../content/section-padding.js";import{ButtonBlockMeta as Y}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as V}from"../../passes/section-padding.js";import{finiteNumber as p}from"../../../../../format/lib/finite-number.js";import{convertTheme as P,hasWords as j}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as $}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as A}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as J}from"efficient-shell/format";import{convertLength as z,isLengthUnit as q}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as Q,surfacePresetIndex as Z,surfaceTwoTone as tt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as ot}from"../../../../../format/lib/content/view-hide-class.js";const E=t=>q(t)?t:"px",r=(t,o,e,n)=>o===e?t:z(t,o,e,n,{min:0,max:200,step:4});import{BOX as eo,DIM as no,INNER_BOX as io,TEXT as so}from"../../../../../format/lib/document/seed-parts.js";const kt={textFit:"line",textFitPhone:"wrap"},et={...k,[K]:""},{label:At,href:Ct,...nt}=Y.defaultProps,Ht=nt,Rt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},Dt={...w,sectionAccent:0},Wt={sectionAccent:-1},Lt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation",...ot,...Object.values(F).flatMap(t=>[t,v(t)]),"widthFit","widthFitTablet","widthFitPhone","width","widthTablet","widthPhone","minWidth","minWidthTablet","minWidthPhone","maxWidth","maxWidthTablet","maxWidthPhone",...Object.values(L)],c="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",vt={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:c,fullWidth:c,pageWidth:c,backgroundWidth:c,contentWidth:c,contentMax:c},wt=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function it(t,o){const e=p(t.sectionPaddingTop)??0,n=p(t.sectionPaddingBottom)??0,i=p(t.sectionPaddingTopTablet),s=p(t.sectionPaddingBottomTablet),l=E(t.sectionPaddingUnit),g=E(t.sectionPaddingUnitTablet),T=E(t.sectionPaddingUnitPhone),O=(h,a,x,m)=>{const d=p(h);if(d!==void 0)return d+r(m,"px",T,"mobile");const I=a===void 0?{n:x,unit:l}:{n:a,unit:g};return r(I.n,I.unit,T,"mobile")+r(m,"px",T,"mobile")},S=(h,a,x,m,d)=>a!==void 0?{[h]:a+r(d??m,"px",g,"tablet")}:d===void 0?{}:{[h]:r(x,l,g,"tablet")+r(d,"px",g,"tablet")};return{sectionPaddingTop:e+r(o.top,"px",l,"desktop"),sectionPaddingBottom:n+r(o.bottom,"px",l,"desktop"),...S("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...S("sectionPaddingBottomTablet",s,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:O(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:O(t.sectionPaddingBottomPhone,s,n,o.bottomPhone)}}const Mt=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>it(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function f(t,o){const e=G(t,V[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const yt=t=>[["padTop","sectionPaddingTop",(o,e)=>f(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>f(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>f(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>f(e,t).sectionPaddingBottom]],st={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},Ft=t=>o=>j(o.props[t])?[st]:[],rt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:k,...o?{style:o}:{}}),Kt=t=>({kind:"group",name:"Chip",props:{...U,..._("main"),...M(6,14)},parts:[rt(t,{color:"background",...y("label",12),weight:600,letterSpacing:.16})]}),C=t=>t.background!=="transparent",dt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},H={align:"right",alignPhone:"left"},ct=(t,o,e)=>{const n=i=>dt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,s)=>s!==void 0&&n(s)!=="",box:[[t,"text",(i,s)=>n(s)],[o,"text",(i,s)=>n(s)]],props:e}},Xt=(t,o,e,n={})=>ct(t,o,{...et,...H,...n,_partStyles:{text:{...N,color:"labels",...e,case:N.case,...H}}}),u=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:P(o)?.selected??0,R="var(--site-surface-2)",D=(t,o)=>P(o)?.themes[u(t.sectionAccent??0,o)],at=(t,o)=>(e,n)=>{if(!o?.(e,n))return _(t);const i=D(e,n)?.[t];return i?{fillColor:i}:{}},Gt=(t,o)=>b(t,o)>=0,W=t=>t.startsWith("#")&&J(t)!==null,Yt=(t,o,e)=>{const n=t?.trim();if(n&&W(n))return{fillColor:n};const i=A(n);if(i)return _(i);const s=n===R?D(o,e):void 0;return s?{fillColor:tt(s)}:{}},Vt=t=>{const o=t?.trim();return!o||o==="transparent"||o===$||A(o)||o===R||W(o)?void 0:"it paints a colour that no Box Fill can hold"},b=(t,o)=>{const e=P(o)?.themes;return e&&C(t)?Q(e,u(t.sectionAccent,o)):-1},jt=(t,o,e)=>{const n=b(o,e);return n>=0?n:t},$t=(t,o)=>{const e=P(o)?.themes,n=e?Z(e,u(t,o)):-1;return n>=0?n:t},Jt=(t,o)=>{const e=b(t,o);return e>=0?{sectionAccent:e}:{}},zt=(t,o)=>C(t.props)&&b(t.props,o)<0?[{kind:"band-preset",page:u(t.props.sectionAccent,o)}]:[],qt=t=>X(t.site?.siteGutter),pt=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),Qt=t=>({top:0,right:0,bottom:0,left:0,...t}),Zt=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,s)=>({...U,...pt,...at("surface")(i,s),...typeof e=="function"?e(i,s):e}),box:[[o,"bgImage"],B.kind,B.duration,B.delay],parts:n});export{kt as AUTO_COLUMN,eo as BOX,Ht as BUTTON,no as DIM,vt as DROP_COMMON,wt as DROP_SIDE_PADDING,Wt as FOLLOW_THE_BOX,st as HEADING_CASE_UPPER,io as INNER_BOX,pt as NO_PAD,et as NUMBER_TEXT,H as RIGHT_WORDS,Lt as SAME_KEYS,Dt as SECTION_BOX,Rt as SH_LINK,so as TEXT,jt as bandAccent,b as bandIndex,u as bandPage,Jt as bandProps,zt as bandWrites,at as fillFrom,Vt as fillNoBoxHolds,Kt as filledChip,Ft as headingCaseOf,f as innerPad,yt as innerPadKeys,Xt as leadLine,ct as leadText,Qt as lineSides,dt as numberAndUnit,Gt as onBandPreset,Yt as ownFill,Zt as pictureCell,D as sectionPage,qt as siteGutterOf,rt as smallText,$t as surfaceAccent,it as wrapperPad,Mt as wrapperPadKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as k,readHidable as E}from"efficient-easel/draw";import{isNodeList as de,newId as ce}from"efficient-easel/data";import{say as u}from"../../../../../format/lib/editor-words.js";import{cardColumns as pe}from"../../../../../format/lib/content/card-columns.js";import{resolveSectionBackground as me,THEME_SECTION_BG as he}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as be}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as ue}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as I}from"../../../../../format/lib/finite-number.js";import{nonEmptyString as x}from"../../../../../format/lib/non-empty-string.js";import{parseSectionHeadPlacement as ye}from"../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as ge}from"../../../../../format/lib/sections/section-eyebrow-look.js";import{hasWords as fe}from"../../../sections/section-to-box.js";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{labelTextSeed as Se}from"../../../../../format/lib/document/text-seeds.js";import{LABEL_ONLY_CARD_FIELDS as B,rowFieldTextSeed as d}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{CARDS_CELL as Ce,cardListCardSeed as Pe,cardsGridLook as N,labelOnlyListCardSeed as F}from"../../../../../format/lib/document/blocks/general/Cards/card-list-seed.js";import{BOX_HIDE_WHEN_ROW_EMPTY as we,CARD_LIST_TYPE as _e,CARD_TEMPLATE_SLOT as Oe,cardKeyOf as H,cardListProps as Le,cardRow as W}from"../../../../../format/lib/content/card-template.js";import{bandAccent as ke,bandProps as Ee,onBandPreset as xe,bandWrites as Te,DIM as T,DROP_COMMON as y,DROP_SIDE_PADDING as g,INNER_BOX as r,SAME_KEYS as f,SECTION_BOX as S,fillFrom as m,filledChip as Re,fillNoBoxHolds as Ae,ownFill as De,TEXT as c,smallText as Ie,wrapperPad as C,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{headTree as M,SIMPLE_HEADING_LOOK as Be,token as p}from"./section-head-looks.js";import{boxPadding as Ne,labelStyle as Fe}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_BG_BUILT_IN as He}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const h=(e,t,o,n)=>({sectionBorder:{top:e,right:t,bottom:o,left:n}}),v=e=>t=>pe(I(t.columns)??I(e.columns)),We="its head sits in a Box of its own above it (own-box): the row draws the head inline",K=e=>ye(e.headPlacement)==="own-box",Me="inline is the head the row draws; an own-box node is skipped (`skip`)",ve={kind:"text",key:"title",role:"heading",props:c,style:{textStyle:"heading-3",...Be}},G={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},w=e=>{const t=me(typeof e.background=="string"?e.background:void 0,He.Series);return t&&t!=="transparent"?t:void 0},_=e=>w(e)===he,Ke={...r,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},X={...r,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[k("share")]:"content"},Ge=e=>{const t=w(e)?1:2;return{...r,direction:"row",columns:4,columnsTablet:2,gap:t,gapPhone:t}},R={...Fe(12),letterSpacing:.22,lineHeight:1.5},j=e=>fe(e.viewLabel)&&!E(e.viewLabel).hidden,s=e=>E(e).text?.trim?.()??"",O=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>x(t)!==void 0)),A=e=>e.map(([t,o,n])=>({key:t,label:o,...n?{multiline:!0}:{}})),Xe=A([["num","Number"],["since","Corner note"],["title","Card title"],["body","Card body",!0],["count","Count"],["countLabel","Count word"]]),je=A([["label","Label"],["value","Value"],["body","Card body",!0]]),b=(e,t,o,n,i,{reads:ae=["cards"],keep:ie=[]}={})=>({kind:"group",name:e,props:t,parts:[{kind:"core",as:_e,headless:!0,keep:ie,derive:{reads:ae,props:L=>Le(n(L),o)},slots:(L,le)=>({[Oe]:[i(L,le)]})}]}),Y=e=>Array.isArray(e.cards)?e.cards:[],V={top:76,bottom:76,topPhone:76,bottomPhone:76},U=e=>(Array.isArray(e.items)?e.items:[]).map(t=>O({title:s(t?.label),href:typeof t?.href=="string"?t.href.trim():""})).filter(t=>t.title!==void 0).map((t,o)=>({key:H(W(t),o),...t})),Ye=e=>U(e).some(t=>x(t.href)!==void 0),q=[{key:B.label,label:"Feature label"},{key:B.href,label:"Link",kind:"link"}],z=e=>ge(e.eyebrowLook,"KeyFeatures")==="filled",Ve={name:"Key Features",boxProps:(e,t)=>({...S,direction:"column",gap:44,gapPhone:32,...m("surface")(e,t),...h(1,0,1,0),...C(e,V)}),box:[...f,...P(V)],parts:[{kind:"group",name:"Heading",props:{...r,direction:"row",align:"end",gap:20,wrap:!0,share:"content",phoneRow:2,[k("share")]:"content"},parts:[{...Re("eyebrow"),when:z},{...Ie("eyebrow"),when:e=>!z(e)},ve]},b("Cards",e=>({...r,...N(v(ue.defaultProps)(e))}),q,U,e=>F(Ye(e)),{reads:["items"]})],drop:{...y,...g,columns:'Box "Cards": its Columns and tablet Columns',eyebrowLook:"the Filled look is a Box in the main colour round the eyebrow Text; the plain look is the eyebrow Text"}},J={top:72,bottom:72,topPhone:72,bottomPhone:72},Q=(e,t)=>({...Ce,...m("background")(e,t)}),Z=e=>{const t=v(be.defaultProps)(e);return{...r,...N(t)}},Ue=A([["title","Card title"],["body","Card body",!0]]),$=e=>(Array.isArray(e.items)?e.items:[]).map((t,o)=>({key:typeof t?.key=="string"&&t.key?t.key:H(W(t),o),title:s(t?.title),body:s(t?.body)})),ee=e=>{const t={},o={};for(const[n,i]of Object.entries(e.props??{}))n!=="id"&&(de(i)?o[n]=i.map(ee):t[n]=i);return{type:String(e.type),props:t,...Object.keys(o).length?{slots:o}:{}}},te=(e,t)=>{const o=D(e)?F(qe(e)):Pe(),n=Array.isArray(e.template)?e.template.map(ee):[o],[i]=n;return n.length===1&&i.type===a?{...i,props:{...Q(e,t),...i.props}}:{type:a,props:{...r,...Q(e,t),name:"Card"},slots:{[l]:n}}},D=e=>e.cardStyle==="label-only",oe=e=>$(e).map((t,o)=>{const n=e.items[o]?.href;return O({key:t.key,title:t.title,href:typeof n=="string"?n.trim():""})}),qe=e=>oe(e).some(t=>x(t.href)!==void 0),ne=e=>Array.isArray(e.template)&&e.template.length===0,re=["dataSource","dataSourceOptions","highlightedCard","highlightBadge"];function Pt(){const e=o=>({key:ce("card"),title:u(o),body:u("A short line about this card.")}),t=[e("Card title one"),e("Card title two"),e("Card title three")];return{eyebrow:u("Label"),title:u("Section *heading.*"),items:t}}const ze={name:"Cards",boxProps:(e,t)=>({...S,direction:"column",gap:36,gapPhone:28,...m("surface")(e,t),...C(e,J)}),box:[...f,...P(J)],parts:[{...M("Cards"),when:e=>!K(e)},{...b("Cards",Z,Ue,$,te,{reads:["items"],keep:re}),when:e=>!ne(e)&&!D(e)},{...b("Cards",Z,q,oe,te,{reads:["items"],keep:re}),when:e=>!ne(e)&&D(e)}],drop:{...y,...g,columns:'Box "Cards": its Columns and tablet Columns',cardStyle:"the Card list's template: the Cards card, or under Label only the Label only card (a cell Box, a Mark Box, the label Text)",template:"the Card list's template (the card Box takes the old cell's ground and lines)",headPlacement:"an own-box node lands without its head; inline is the head the row draws",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (the stored-node export, 2026-10-24)"}},Je={name:"Recurring Columns",boxProps:(e,t)=>({...S,direction:"column",gap:60,gapPhone:60,...h(0,0,1,0),..._(e)?Ee(e,t):{},...De(w(e),e,t),...C(e,G)}),box:[...f.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>_(t)?ke(e,t,o):e],...P(G)],skip:e=>Ae(w(e))??(K(e)?We:void 0),site:(e,t)=>_(e.props)?Te(e,t):[],parts:[M("Series"),b("Cards",Ge,Xe,e=>Y(e).map(t=>O({num:s(t.num),since:s(t.since),title:s(t.title),body:s(t.desc),count:s(t.entries),countLabel:s(t.entriesLabel)})),(e,t)=>({type:a,props:{...Ke,...m("background",(o,n)=>_(o)&&xe(o,n))(e,t),name:"Card"},slots:{[l]:[{type:a,props:{...r,name:"Words",gap:16,gapPhone:16},slots:{[l]:[{type:a,props:{...X,name:"Top"},slots:{[l]:[d("num",c,p("label",13),!0),d("since",c,p("label",13),!0)]}},d("title",{...c,tag:"h3"},{textStyle:"heading-3",...p("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),d("body",T,{textStyle:"body-5",fontRole:"heading",...p("body",14),lineHeight:1.6})]}},{type:a,props:{...X,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...h(1,0,0,0),...j(e)?{}:{[we]:["count","countLabel"]}},slots:{[l]:[{type:a,props:{...r,name:"Count",direction:"row",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2,[k("share")]:"content"},slots:{[l]:[d("count",c,R),d("countLabel",T,R)]}},...j(e)?[{type:a,props:{...r,name:"View",maxWidthPhone:266},slots:{[l]:[{type:"Text",props:{...c,text:E(e.viewLabel).text,_partStyles:{text:{...Se()._partStyles.text,...R}}}}]}}]:[]]}}]}}))],reads:{viewLabel:"a Text typed once in the card template: the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill"},drop:{...y,...g,headPlacement:Me}},se={top:60,bottom:60,topPhone:40,bottomPhone:40},Qe={...r,direction:"row",columns:3,gap:40,gapPhone:16},Ze={...r,gap:8,gapPhone:8,...Ne(24),...h(1,1,1,1)},$e={name:"Document Detail Cards",boxProps:e=>({...S,direction:"column",gap:40,gapPhone:16,...h(0,0,1,0),...C(e,se)}),box:[...f,...P(se)],parts:[b("Cards",Qe,je,e=>Y(e).map(t=>O({label:s(t.label),value:s(t.value),body:s(t.desc)})),(e,t)=>({type:a,props:{...Ze,...m("surface")(e,t),name:"Card"},slots:{[l]:[d("label",c,{...p("label",12),lineHeight:1.5},!0),{type:a,props:{...r,name:"Words",gap:14,gapPhone:14},slots:{[l]:[d("value",c,{textStyle:"heading-3",...p("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),d("body",T,{textStyle:"body-5",fontRole:"accent",...p("body",14),italic:!0,lineHeight:1.5})]}}]}}))],drop:{...y,...g}},wt={Cards:ze,KeyFeatures:Ve,Series:Je,DocMetaCards:$e};export{wt as CARDS_SECTION_TO_BOX,Pt as cardsPressStarter};
|
|
1
|
+
import{phoneKey as k,readHidable as E}from"efficient-easel/draw";import{isNodeList as le,newId as de}from"efficient-easel/data";import{say as u}from"../../../../../format/lib/editor-words.js";import{cardColumns as ce}from"../../../../../format/lib/content/card-columns.js";import{resolveSectionBackground as pe,THEME_SECTION_BG as me}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as he}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as be}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as I}from"../../../../../format/lib/finite-number.js";import{nonEmptyString as x}from"../../../../../format/lib/non-empty-string.js";import{parseSectionEyebrowLook as ue}from"../../../../../format/lib/sections/section-eyebrow-look.js";import{hasWords as ye,headInOwnBox as ge}from"../../../sections/section-to-box.js";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{labelTextSeed as fe}from"../../../../../format/lib/document/text-seeds.js";import{LABEL_ONLY_CARD_FIELDS as B,rowFieldTextSeed as d}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{CARDS_CELL as Ce,cardListCardSeed as Se,cardsGridLook as N,labelOnlyListCardSeed as F}from"../../../../../format/lib/document/blocks/general/Cards/card-list-seed.js";import{BOX_HIDE_WHEN_ROW_EMPTY as Pe,CARD_LIST_TYPE as we,CARD_TEMPLATE_SLOT as _e,cardKeyOf as H,cardListProps as Oe,cardRow as W}from"../../../../../format/lib/content/card-template.js";import{bandAccent as Le,bandProps as ke,onBandPreset as Ee,bandWrites as xe,DIM as T,DROP_COMMON as y,DROP_SIDE_PADDING as g,INNER_BOX as r,SAME_KEYS as f,SECTION_BOX as C,fillFrom as m,filledChip as Te,fillNoBoxHolds as Re,ownFill as Ae,TEXT as c,smallText as De,wrapperPad as S,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{headTree as M,SIMPLE_HEADING_LOOK as Ie,token as p}from"./section-head-looks.js";import{boxPadding as Be,labelStyle as Ne}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_BG_BUILT_IN as Fe}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const h=(e,t,o,n)=>({sectionBorder:{top:e,right:t,bottom:o,left:n}}),v=e=>t=>ce(I(t.columns)??I(e.columns)),He="inline is the head the row draws; an own-box node is skipped (`skip`)",We={kind:"text",key:"title",role:"heading",props:c,style:{textStyle:"heading-3",...Ie}},K={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},w=e=>{const t=pe(typeof e.background=="string"?e.background:void 0,Fe.Series);return t&&t!=="transparent"?t:void 0},_=e=>w(e)===me,Me={...r,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},G={...r,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[k("share")]:"content"},ve=e=>{const t=w(e)?1:2;return{...r,direction:"row",columns:4,columnsTablet:2,gap:t,gapPhone:t}},R={...Ne(12),letterSpacing:.22,lineHeight:1.5},j=e=>ye(e.viewLabel)&&!E(e.viewLabel).hidden,s=e=>E(e).text?.trim?.()??"",O=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>x(t)!==void 0)),A=e=>e.map(([t,o,n])=>({key:t,label:o,...n?{multiline:!0}:{}})),Ke=A([["num","Number"],["since","Corner note"],["title","Card title"],["body","Card body",!0],["count","Count"],["countLabel","Count word"]]),Ge=A([["label","Label"],["value","Value"],["body","Card body",!0]]),b=(e,t,o,n,i,{reads:se=["cards"],keep:ae=[]}={})=>({kind:"group",name:e,props:t,parts:[{kind:"core",as:we,headless:!0,keep:ae,derive:{reads:se,props:L=>Oe(n(L),o)},slots:(L,ie)=>({[_e]:[i(L,ie)]})}]}),X=e=>Array.isArray(e.cards)?e.cards:[],Y={top:76,bottom:76,topPhone:76,bottomPhone:76},V=e=>(Array.isArray(e.items)?e.items:[]).map(t=>O({title:s(t?.label),href:typeof t?.href=="string"?t.href.trim():""})).filter(t=>t.title!==void 0).map((t,o)=>({key:H(W(t),o),...t})),je=e=>V(e).some(t=>x(t.href)!==void 0),U=[{key:B.label,label:"Feature label"},{key:B.href,label:"Link",kind:"link"}],q=e=>ue(e.eyebrowLook,"KeyFeatures")==="filled",Xe={name:"Key Features",boxProps:(e,t)=>({...C,direction:"column",gap:44,gapPhone:32,...m("surface")(e,t),...h(1,0,1,0),...S(e,Y)}),box:[...f,...P(Y)],parts:[{kind:"group",name:"Heading",props:{...r,direction:"row",align:"end",gap:20,wrap:!0,share:"content",phoneRow:2,[k("share")]:"content"},parts:[{...Te("eyebrow"),when:q},{...De("eyebrow"),when:e=>!q(e)},We]},b("Cards",e=>({...r,...N(v(be.defaultProps)(e))}),U,V,e=>F(je(e)),{reads:["items"]})],drop:{...y,...g,columns:'Box "Cards": its Columns and tablet Columns',eyebrowLook:"the Filled look is a Box in the main colour round the eyebrow Text; the plain look is the eyebrow Text"}},z={top:72,bottom:72,topPhone:72,bottomPhone:72},J=(e,t)=>({...Ce,...m("background")(e,t)}),Q=e=>{const t=v(he.defaultProps)(e);return{...r,...N(t)}},Ye=A([["title","Card title"],["body","Card body",!0]]),Z=e=>(Array.isArray(e.items)?e.items:[]).map((t,o)=>({key:typeof t?.key=="string"&&t.key?t.key:H(W(t),o),title:s(t?.title),body:s(t?.body)})),$=e=>{const t={},o={};for(const[n,i]of Object.entries(e.props??{}))n!=="id"&&(le(i)?o[n]=i.map($):t[n]=i);return{type:String(e.type),props:t,...Object.keys(o).length?{slots:o}:{}}},ee=(e,t)=>{const o=D(e)?F(Ve(e)):Se(),n=Array.isArray(e.template)?e.template.map($):[o],[i]=n;return n.length===1&&i.type===a?{...i,props:{...J(e,t),...i.props}}:{type:a,props:{...r,...J(e,t),name:"Card"},slots:{[l]:n}}},D=e=>e.cardStyle==="label-only",te=e=>Z(e).map((t,o)=>{const n=e.items[o]?.href;return O({key:t.key,title:t.title,href:typeof n=="string"?n.trim():""})}),Ve=e=>te(e).some(t=>x(t.href)!==void 0),oe=e=>Array.isArray(e.template)&&e.template.length===0,ne=["dataSource","dataSourceOptions","highlightedCard","highlightBadge"];function ft(){const e=o=>({key:de("card"),title:u(o),body:u("A short line about this card.")}),t=[e("Card title one"),e("Card title two"),e("Card title three")];return{eyebrow:u("Label"),title:u("Section *heading.*"),items:t}}const Ue={name:"Cards",ownBoxConverts:!0,boxProps:(e,t)=>({...C,direction:"column",gap:36,gapPhone:28,...m("surface")(e,t),...S(e,z)}),box:[...f,...P(z)],parts:[{...M("Cards"),when:e=>!ge(e)},{...b("Cards",Q,Ye,Z,ee,{reads:["items"],keep:ne}),when:e=>!oe(e)&&!D(e)},{...b("Cards",Q,U,te,ee,{reads:["items"],keep:ne}),when:e=>!oe(e)&&D(e)}],drop:{...y,...g,columns:'Box "Cards": its Columns and tablet Columns',cardStyle:"the Card list's template: the Cards card, or under Label only the Label only card (a cell Box, a Mark Box, the label Text)",template:"the Card list's template (the card Box takes the old cell's ground and lines)",headPlacement:"an own-box node lands without its head; inline is the head the row draws",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (the stored-node export, 2026-10-24)"}},qe={name:"Recurring Columns",boxProps:(e,t)=>({...C,direction:"column",gap:60,gapPhone:60,...h(0,0,1,0),..._(e)?ke(e,t):{},...Ae(w(e),e,t),...S(e,K)}),box:[...f.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>_(t)?Le(e,t,o):e],...P(K)],skip:e=>Re(w(e)),site:(e,t)=>_(e.props)?xe(e,t):[],parts:[M("Series"),b("Cards",ve,Ke,e=>X(e).map(t=>O({num:s(t.num),since:s(t.since),title:s(t.title),body:s(t.desc),count:s(t.entries),countLabel:s(t.entriesLabel)})),(e,t)=>({type:a,props:{...Me,...m("background",(o,n)=>_(o)&&Ee(o,n))(e,t),name:"Card"},slots:{[l]:[{type:a,props:{...r,name:"Words",gap:16,gapPhone:16},slots:{[l]:[{type:a,props:{...G,name:"Top"},slots:{[l]:[d("num",c,p("label",13),!0),d("since",c,p("label",13),!0)]}},d("title",{...c,tag:"h3"},{textStyle:"heading-3",...p("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),d("body",T,{textStyle:"body-5",fontRole:"heading",...p("body",14),lineHeight:1.6})]}},{type:a,props:{...G,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...h(1,0,0,0),...j(e)?{}:{[Pe]:["count","countLabel"]}},slots:{[l]:[{type:a,props:{...r,name:"Count",direction:"row",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2,[k("share")]:"content"},slots:{[l]:[d("count",c,R),d("countLabel",T,R)]}},...j(e)?[{type:a,props:{...r,name:"View",maxWidthPhone:266},slots:{[l]:[{type:"Text",props:{...c,text:E(e.viewLabel).text,_partStyles:{text:{...fe()._partStyles.text,...R}}}}]}}]:[]]}}]}}))],reads:{viewLabel:"a Text typed once in the card template: the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill"},drop:{...y,...g,headPlacement:He}},re={top:60,bottom:60,topPhone:40,bottomPhone:40},ze={...r,direction:"row",columns:3,gap:40,gapPhone:16},Je={...r,gap:8,gapPhone:8,...Be(24),...h(1,1,1,1)},Qe={name:"Document Detail Cards",boxProps:e=>({...C,direction:"column",gap:40,gapPhone:16,...h(0,0,1,0),...S(e,re)}),box:[...f,...P(re)],parts:[b("Cards",ze,Ge,e=>X(e).map(t=>O({label:s(t.label),value:s(t.value),body:s(t.desc)})),(e,t)=>({type:a,props:{...Je,...m("surface")(e,t),name:"Card"},slots:{[l]:[d("label",c,{...p("label",12),lineHeight:1.5},!0),{type:a,props:{...r,name:"Words",gap:14,gapPhone:14},slots:{[l]:[d("value",c,{textStyle:"heading-3",...p("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),d("body",T,{textStyle:"body-5",fontRole:"accent",...p("body",14),italic:!0,lineHeight:1.5})]}}]}}))],drop:{...y,...g}},Ct={Cards:Ue,KeyFeatures:Xe,Series:qe,DocMetaCards:Qe};export{Ct as CARDS_SECTION_TO_BOX,ft as cardsPressStarter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DIM as m,DROP_COMMON as t,DROP_SIDE_PADDING as e,SAME_KEYS as r,SECTION_BOX as n,TEXT as b,smallText as h,wrapperPad as s,wrapperPadKeys as i}from"./section-to-box-row-parts.js";const a={headPlacement:void 0},p={top:0,bottom:0,topPhone:0,bottomPhone:0},
|
|
1
|
+
import{DIM as m,DROP_COMMON as t,DROP_SIDE_PADDING as e,SAME_KEYS as r,SECTION_BOX as n,TEXT as b,smallText as h,wrapperPad as s,wrapperPadKeys as i}from"./section-to-box-row-parts.js";const a={headPlacement:void 0},p={top:0,bottom:0,topPhone:0,bottomPhone:0},u=()=>({name:"Form",ownBoxConverts:!0,boxProps:o=>({...n,direction:"column",...s(o,p)}),box:[...r,...i(p)],parts:[{kind:"core",keep:"rest",props:a}],drop:{...t,...e}}),d={top:120,bottom:120,topPhone:60,bottomPhone:60},l=()=>({name:"Photo Submission Form",boxProps:o=>({...n,direction:"column",gap:24,...s(o,d)}),box:[...r,...i(d)],parts:[h("eyebrow"),{kind:"text",key:"title",role:"heading",props:b,style:{textStyle:"heading-2"},mark:"accentItalic"},{kind:"text",key:"body",role:"body",props:m},{kind:"core",as:"Form",keep:["formSlug"],rename:{buttonText:"submitText",consent:"finePrint"},props:a}],skip:o=>o.layout==="boxes"?`its words are in its two SubmitBox regions (layout "boxes"); this row reads only the section's own words`:void 0,drop:{...t,...e,layout:'the marker of the two-region drawing; a node that has it is skipped (above), so here it is never "boxes"',boxes:'the SubmitBox regions, drawn only under layout "boxes", which this row skips (above); without that marker they draw nothing'}}),x={Form:u(),SubmitBuild:l()};export{x as FORMS_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SPLITTABLE_SECTIONS as
|
|
1
|
+
import{SPLITTABLE_SECTIONS as h}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as f}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as O,SECTION_BOX as T,innerPad as u}from"./section-to-box-row-parts.js";import{HEAD_BELOW as b,headLookOf as B,headReads as A,headTree as g}from"./section-head-looks.js";import{finiteNumber as w}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as m}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as R}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as k,faqRunStyleKeys as C}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{BOX_SIDE_SPACE_PROP as H,BOX_SIDE_SPACE_SITE as L}from"../../../../../format/lib/content/box-side-space.js";import{INNER_BOX as N}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_ACCENT_INHERIT as I}from"../../../../../format/lib/content/section-surface.js";const D=["Collections","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","RelatedProducts"],J=["Events","FitmentTable","ProductGrid","SpecTable"],n=(e,o)=>()=>({top:e,topPhone:o}),l=e=>o=>{const t=u(o,e).sectionPaddingTop;return{top:t,topPhone:t}},F={Collections:n(120,70),Events:n(120,70),FAQ:n(120,70),GalleryB:n(120,70),FitmentTable:n(120,80),SpecTable:n(120,80),LongRead:n(120,80),RelatedProducts:n(0,0),Footprint:l("Footprint"),ProcessSteps:l("ProcessSteps"),ProductGrid:e=>({top:w(e.padTop)??120,topPhone:0})};function y(e,o={}){const t=h[e],s=F[e];if(!t||!s)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const p=t.padKey,E=g(e),c=A(e),P=t.headRows.filter(r=>![t.num,t.title,t.description,"linkText","linkHref"].includes(r)),d={...Object.fromEntries(P.filter(r=>!(r in c)).map(r=>[r,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:f[e]??e,boxProps:(r,i)=>{const a=s(r),_=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},S=typeof o.boxProps=="function"?o.boxProps(r,i):o.boxProps??{};return{...T,direction:"column",gap:b[B(e)],sectionPaddingTop:a.top,sectionPaddingTopPhone:a.topPhone,..._,...S}},box:[...O,...p?[[p,"sectionPaddingTop",(r,i)=>s(i).top]]:[]],parts:[E,...(()=>{const r={...p?{[p]:0}:{},...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(r).length?{props:r}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[i]}:i]})(),...o.partsAfter??[]],...Object.keys(c).length?{reads:c}:{},...Object.keys(d).length?{drop:d}:{},...o.pressHeading?{pressKeepsEmpty:[t.title]}:{},...o.skip?{skip:o.skip}:{}}}const j={...N,direction:"accordion",rowStyle:"numbered"},X={Footprint:{slots:{[m]:[R()]},pressHeading:!0},FAQ:{slots:{[m]:[k()]},pressHeading:!0,coreBox:{name:"Questions",props:j},coreProps:{sectionAccent:I},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[H]:L},skip:e=>{const o=e._partStyles??{},t=C().filter(s=>o[s]!==void 0);return t.length?`held: its rows carry their own run style (_partStyles ${t.map(s=>`"${s}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},U=Object.fromEntries(D.map(e=>[e,y(e,X[e])]));export{j as FAQ_ROWS_BOX,X as HEAD_ONLY_CARD_SEEDS,U as HEAD_ONLY_SECTION_TO_BOX,D as HEAD_ONLY_TYPES,J as HOST_ROW_HEAD_TYPES,y as headOnlyRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DIM as
|
|
1
|
+
import{DIM as g,DROP_COMMON as n,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as a,INNER_BOX as o,SAME_KEYS as _,SECTION_BOX as k,TEXT as y,filledChip as u,smallText as P,surfaceAccent as c,wrapperPad as C,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{token as r}from"../../../../../format/lib/document/seed-parts.js";import{phoneKey as E}from"efficient-easel/draw";import{CHART_OWN_BOX_WORDS as x}from"../../../../../format/lib/document/blocks/general/Chart/meta.js";import{MOCKUP_OWN_BOX_WORDS as S}from"../../../../../format/lib/document/blocks/general/Mockup/meta.js";const i={top:76,bottom:76,topPhone:76,bottomPhone:76},d=()=>({kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[{kind:"group",name:"Chip row",props:{...o,direction:"row",phoneRow:2,[E("share")]:"content"},parts:[u("eyebrow")]},{kind:"text",key:"title",role:"heading",props:y,style:{textStyle:"heading-2",...r("headingMedium",44,32),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"body",props:{...g,maxWidth:435},style:{textStyle:"body-1",...r("body",15),lineHeight:1.625}}]}),m=e=>(t,p)=>({...k,sectionAccent:c(t.sectionAccent??0,p),direction:"row",align:"center",gap:56,gapPhone:56,share:e,sectionBorder:{top:1,bottom:1},...C(t,i)}),O=[..._.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,p)=>c(e,p)],...b(i)],f=()=>({name:"Chart",boxProps:m([42]),box:O,parts:[d(),{kind:"group",name:"Chart",props:{...o,gap:16,gapPhone:16},keepEmpty:!0,parts:[{kind:"core",keep:"rest",props:a},P("caption",{color:"muted",...r("label",10),letterSpacing:.14})]}],pressKeepsEmpty:[...x],drop:{...n,...s}}),h=e=>e.align==="left",l={kind:"group",name:"Card",keepEmpty:!0,props:o,parts:[{kind:"core",keep:"rest",props:a}]},w=()=>({name:"Mockup Card",boxProps:m("equal"),box:O,parts:[{...l,when:h},d(),{...l,when:e=>!h(e)}],pressKeepsEmpty:[...S],drop:{...n,...s}}),M={Chart:f(),Mockup:w()};export{M as PROOF_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import{Render as c}from"efficient-easel/render";import{BelowFirstScreen as d,LATER_SLIDES_KEY as l,firstScreenLead as f,laterSlideIdsOf as m,useLeadDrawsFirst as p}from"../first-screen.js";import{publishedPageData as u}from"./published-passes.js";import{withSlotCounts as S}from"./slot-counts.js";function g({config:o,data:s,metadata:t}){const e=u(s,t),i=p(o,f(e.content)),r=m(e.content),a=r.length>0?{...t,[l]:r}:t;return n(d,{children:n(c,{config:i,metadata:S(a,e.content),data:e})})}export{g as default};
|
|
@@ -200,6 +200,8 @@ export type PublishedPartSheet = {
|
|
|
200
200
|
export declare function publishedPartStyles(needles: readonly PartNeedle[], styles: PartStyles, scope: string, styleKeyOf?: (partKey: string) => string, drawsStyle?: (partKey: string) => boolean, motionOf?: (styleKey: string) => PublishedPartMotion | null, motionKeys?: readonly string[]): PublishedPartSheet | null;
|
|
201
201
|
export declare function isPartKindKey(key: string): boolean;
|
|
202
202
|
export declare function partRuleForKind(sheet: PublishedPartSheet | null, kind: string): PublishedPartRule | null;
|
|
203
|
-
export declare function partStyleCss(sheet: PublishedPartSheet
|
|
203
|
+
export declare function partStyleCss(sheet: PublishedPartSheet, { inBox }?: {
|
|
204
|
+
inBox?: boolean;
|
|
205
|
+
}): string;
|
|
204
206
|
export declare function paragraphRules(scope: string, paragraph: string): string[];
|
|
205
207
|
export declare function partRuleForText(sheet: PublishedPartSheet | null, value: string): PublishedPartRule | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{textStyleCaseCss as tt,textStyleCaseOfCss as et}from"efficient-easel/draw";import{FONT_OPTIONS as nt,fontOption as ot,fontRoleOf as A,SIZE_STEP_OF_ROLE as w}from"../../../format/lib/fonts.js";import{encodePartKey as v}from"../../../format/lib/document/part-key.js";import{decodePartId as C,normalizePartText as O}from"./text-parts.js";import{partInkCss as rt}from"../../../format/lib/document/part-inks.js";import{regionStyle as it}from"../../../format/lib/sections/text-regions.js";import{PHONE_MEDIA as at,TABLET_MEDIA as st,viewOverrides as ft}from"../content/view-values.js";import{plainRecord as N,propsWithPartRecord as lt,readPartRecord as ct,readPartRecords as ut}from"../../../format/lib/document/part-records.js";const k="_partStyles",pt="data-sf-part-styled",W="data-sf-text-style",dt=/^(heading|body)-[1-7]$/;function h(t){return typeof t=="string"&&dt.test(t)}const G={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function xt(t){if(!t)return null;for(const[e,n]of Object.entries(G))if(n===t)return e;return null}function Pe(t){if(h(t.textStyle))return t.textStyle;const e=A(t.role);return e?G[e]:void 0}const gt=[400,500,600,700],R=["left","center","right","justify"],y=5,F=1e3,ht=-5,St=10,mt=0,bt=64,Pt=2,B={size:{min:y,max:F,step:1},sizeTablet:{min:y,max:F,step:1},sizePhone:{min:y,max:F,step:1},padding:{min:mt,max:bt,step:Pt}},Tt=.05,Rt=.01,zt=["line","letter"],At=.5,_t=2.5,Et=-1,$t=1,wt=0,Ot=400,Nt=[...new Set(Object.values(w))];function Te(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function Re(t){return ut(t,k)}function K(t,e){return ct(t,k,e)}function ze(t,e){return Object.values(K(t,e)).filter(n=>n!==void 0).length}function X(t,e,n){return lt(t,k,e,kt(n).length?n:null)}function kt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function yt(t){return zt.includes(t)}const z=(t,e,n)=>Math.min(n,Math.max(e,t));function Ft(t,e){if(yt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:z(n,ht,St)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?b(z(n,At,_t),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?b(z(n,Et,$t),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:z(n,wt,Ot)}if(Object.hasOwn(B,t)){const{min:n,max:o}=B[t],r=Math.round(Number(e));return Number.isFinite(r)?z(r,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?A(e)?e:null:t==="sizeToken"?I(e)?e:null:t==="textStyle"?h(e)?e:null:t==="alignPhone"||t==="alignTablet"?R.includes(e)?e:null:e}const It=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function m(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of It){const r=t[o];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&n(o)}return t.align!==void 0&&!R.includes(t.align)&&n("align"),t.alignTablet!==void 0&&!R.includes(t.alignTablet)&&n("alignTablet"),t.alignPhone!==void 0&&!R.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!h(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!I(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!A(t.fontRole)&&n("fontRole"),e??t}function I(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:r,fluid:i}=t,f=l=>typeof l=="number"&&Number.isFinite(l)&&l>0,a=l=>typeof l=="string"&&Nt.includes(l);return a(e)&&f(n)&&(o===void 0||a(o))&&(r===void 0||f(r))&&(i===void 0||Mt(i,n))}function Mt(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...r}=t;return Object.keys(r).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function M(t){return t?.pxPhone&&I(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function U({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,r=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${r}, var(--sf-heading-max,9999px))`:r}const Lt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function jt(t){const e=[];for(const[n,o]of Lt)n===t?e.push(o):o===t&&e.push(n);return e}function Ae(t,e,n,o){const r={...K(t,e)},i=o==null?null:Ft(n,o);if(i===null)delete r[n];else{r[n]=i;for(const f of jt(n))delete r[f]}return X(t,e,r)}function _e(t,e){return X(t,e,{})}function Ht(t){return et(t)??"none"}function Dt(t){return tt(t)??""}const V={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function vt(t,e){const n=A(t.role);return n||(e?.blockDrawsStyle?null:xt(t.textStyle))}function Ee(t,e){return t==="Text"&&e==="text"}const Ct={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Wt(t){const e=w[t],n=Ct[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Gt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=b(Bt+t.line*Tt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=b(t.letter*Rt,4)),e}const Bt=1,S="--sf-part-para";function Kt(t){t=m(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const o=M(t.sizeToken);if(o)e.fontSize=U(o);else{const r=E(t);r!==void 0&&(e.fontSize=`${r}px`)}}const n=t.alignPhone??_(t);return n&&(e.textAlign=n),e}function _(t){return t.alignTablet&&t.alignTablet!==t.align?t.alignTablet:void 0}function E(t){const e=ft("textSize",t.size,t.sizeTablet,void 0).tablet;return e&&e>0?e:void 0}function Xt(t){const e=m(t),n={},o=E(e);o!==void 0&&(n.fontSize=`${o}px`);const r=_(e);return r&&(n.textAlign=r),n}function $e(t,e){if(e==="desktop")return;const n=m(t);return(e==="mobile"?_(n):void 0)??n.align}function Ut(t,e){if(e==="desktop")return t;const n=m(t),o=E(n),r=_(n);if(e==="tablet"){let a=t;return o!==void 0&&(a={...a,size:o}),r&&(a={...a,align:r}),a}let i=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)i={...i,size:n.sizePhone};else{const a=M(n.sizeToken);a?i={...i,size:void 0,sizeToken:a}:o!==void 0&&(i={...i,size:o})}const f=n.alignPhone??r;return f&&(i={...i,align:f}),i}function L(t,e,n){return j(Ut(t,e),$,n)}function Vt(t){return t==="mobile"?"sizePhone":t==="tablet"?"sizeTablet":"size"}function we(t,e){if(e==="desktop")return null;const n=m(t);if(e==="mobile"){if(M(n.sizeToken))return null;const o=E(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function Y(t,e){const n=Vt(e);if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function Oe(t,e,n){const o=L(Y(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function j(t,e,n){t=m(t);const o=vt(t,n),r=Gt(t),i=t.size?`${t.size}px`:t.sizeToken?U(t.sizeToken):o?Wt(o):"";return{fontFamily:t.font?Jt(t.font):t.fontRole?`var(${V[t.fontRole]})`:o?`var(${V[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[S]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Dt(t.case),textAlign:t.align??"",paddingTop:Z(t.padding),paddingBottom:Z(t.padding),color:Yt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Yt=t=>rt(t),Z=t=>t===void 0?"":`${t}px`,b=(t,e)=>Number(t.toFixed(e));function Ne(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),r=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:Zt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?b(o/n,3):1.2,letterEm:Number.isFinite(r)?b(r/n,4):0,align:qt(t.textAlign),case:Ht(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0}}function Zt(t){return Number.isFinite(t)?gt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function qt(t){for(const e of R)if(e===t)return e;return t==="end"?"right":"left"}function ke(t,e){const n=q(t);if(!n)return"";for(const o of nt)if(q(e(o.cssVar))===n)return o.key;return""}const q=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Jt(t){const e=ot(t);return e?`var(${e.cssVar})`:""}function ye(t,e,n,o){return!e||C(e)?.nodeId!==t?null:n.find(i=>o(i.getAttribute("class")))??n[0]??null}function Qt(t,e){return Object.hasOwn(t,e)?N(t[e])??{}:{}}function Fe(t,e,n=()=>$,o=a=>a,r=ne,i="desktop",f=()=>!1){let a=0;for(const{element:l,partId:p}of t){const x=C(p)?.propKey;if(!x)continue;const s=Qt(e,o(x)),u=L(s,i,{blockDrawsStyle:f(x)});h(s.textStyle)?l.setAttribute?.(W,s.textStyle):l.removeAttribute?.(W);const d=D.some(g=>l.style[g]);let c=!1;for(const[g,T]of Object.entries(u))ie(l,g,T),T&&(c=!0);if(d||D.some(g=>u[g]))for(const g of te(l,r))for(const T of D)g.style[T]=u[T]??"";c&&(a+=1)}return a}function te(t,e){const n=O(t.textContent??""),o=[];let r=t;for(let i=0;i<ee&&e(r);i+=1){const f=r.parentElement;if(!f||O(f.textContent??"")!==n)break;o.push(f),r=f}return o}const ee=8;function ne(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const $={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function oe(t){if(!t||typeof t!="object")return null;const e={};return h(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizeTablet=="number"&&t.sizeTablet>0&&(e.sizeTablet=t.sizeTablet),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function re(t,e){const n=oe(t);if(!n)return{};const o=L(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function Ie(t){return h(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function Me(t,e,n){if(!t||typeof t!="object")return{};const o=it(t.role,e,w)??{},r=e.sized?re(Y(t,n),n):{};return{...o,...r}}function Le(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function ie(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const r=t;e===S&&(n?r.setAttribute?.(J,""):r.removeAttribute?.(J))}const J="data-sf-part-para",ae=Object.keys(j({},$)),H=new Set(["color","overflowWrap",S,"fontStyle"]),D=ae.filter(t=>!H.has(t));function je(t,e,n,o=a=>a,r=()=>!1,i=()=>null,f=[]){const a=new Map;for(const s of t){const u=v(s.key,s.row);for(const d of s.texts){const c=a.get(d);c?(c.keys.add(s.key),c.partKeys.add(u)):a.set(d,{keys:new Set([s.key]),partKeys:new Set([u])})}}const l=new Map;for(const s of new Set([...Object.keys(e),...f])){if(!se(s))continue;const u=Q(n,s,N(e[s])??{},!1,i(s));u&&l.set(s,u)}const p=s=>{const u=o(s),d=i(u);if(!Object.hasOwn(e,u)&&!d)return null;const c=N(e[u])??{};return Q(n,s,c,r(s),d)},x=new Map;for(const[s,{keys:u,partKeys:d}]of a){const c=d.size===1?[...d][0]:u.size===1?[...u][0]:null;if(!c)continue;const P=p(c);P&&x.set(s,P)}for(const s of t){if(!s.keyed)continue;const u=p(v(s.key,s.row));u&&l.set(s.key,u)}return x.size||l.size?{rules:x,kindRules:l,drawn:new Set(a.keys())}:null}function Q(t,e,n,o,r){const i=j(n,$,{blockDrawsStyle:o}),f=Xt(n),a=Kt(n),l=h(n.textStyle)?n.textStyle:void 0;return!Object.values(i).some(Boolean)&&!Object.keys(f).length&&!Object.keys(a).length&&!l&&!r?null:{stamp:fe(t,e),declarations:i,...Object.keys(f).length?{tablet:f}:{},...Object.keys(a).length?{phone:a}:{},...l?{textStyle:l}:{},...r?{motion:r}:{}}}function se(t){return t.startsWith("@")}function He(t,e){return t?.kindRules.get(e)??null}function fe(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function De(t){const e=[],n=new Set,o=r=>{const{stamp:i,declarations:f}=r;if(n.has(i))return;n.add(i);const a=Object.entries(f).filter(([,c])=>c!==""),l=c=>c.map(([P,g])=>`${ce(P)}: ${g}`).join("; "),p=`[${pt}="${i}"]`,x=a.filter(([c])=>!H.has(c)),s=a.filter(([c])=>H.has(c));x.length&&e.push(`${p}, *:has(> ${p}) { ${l(x)} }`),s.length&&e.push(`${p} { ${l(s)} }`),f[S]&&(e.push(`*:has(> ${p}) { ${S}: ${f[S]} }`),e.push(...le(p,`*:has(> ${p})`)));const u=Object.entries(r.tablet??{}).filter(([,c])=>c!=="");u.length&&e.push(`@media ${st} { ${p}, *:has(> ${p}) { ${l(u)} } }`);const d=Object.entries(r.phone??{}).filter(([,c])=>c!=="");d.length&&e.push(`@media ${at} { ${p}, *:has(> ${p}) { ${l(d)} } }`)};for(const r of t.rules.values())o(r);for(const r of t.kindRules.values())o(r);return e.join(`
|
|
2
|
-
`)}function
|
|
1
|
+
import{textStyleCaseCss as nt,textStyleCaseOfCss as ot}from"efficient-easel/draw";import{FONT_OPTIONS as it,fontOption as rt,fontRoleOf as _,SIZE_STEP_OF_ROLE as w}from"../../../format/lib/fonts.js";import{encodePartKey as v}from"../../../format/lib/document/part-key.js";import{decodePartId as C,normalizePartText as O}from"./text-parts.js";import{partInkCss as at}from"../../../format/lib/document/part-inks.js";import{regionStyle as st}from"../../../format/lib/sections/text-regions.js";import{EDGE_PHONE_MEDIA as ft,EDGE_TABLET_MEDIA as lt,PHONE_MEDIA as ct,TABLET_MEDIA as ut,viewOverrides as pt}from"../content/view-values.js";import{plainRecord as N,propsWithPartRecord as dt,readPartRecord as xt,readPartRecords as gt}from"../../../format/lib/document/part-records.js";const k="_partStyles",ht="data-sf-part-styled",W="data-sf-text-style",St=/^(heading|body)-[1-7]$/;function S(t){return typeof t=="string"&&St.test(t)}const G={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function mt(t){if(!t)return null;for(const[e,n]of Object.entries(G))if(n===t)return e;return null}function _e(t){if(S(t.textStyle))return t.textStyle;const e=_(t.role);return e?G[e]:void 0}const bt=[400,500,600,700],A=["left","center","right","justify"],I=5,y=1e3,Tt=-5,Pt=10,At=0,Rt=64,_t=2,B={size:{min:I,max:y,step:1},sizeTablet:{min:I,max:y,step:1},sizePhone:{min:I,max:y,step:1},padding:{min:At,max:Rt,step:_t}},zt=.05,Et=.01,$t=["line","letter"],wt=.5,Ot=2.5,Nt=-1,kt=1,It=0,yt=400,Ft=[...new Set(Object.values(w))];function ze(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function Ee(t){return gt(t,k)}function K(t,e){return xt(t,k,e)}function $e(t,e){return Object.values(K(t,e)).filter(n=>n!==void 0).length}function X(t,e,n){return dt(t,k,e,Mt(n).length?n:null)}function Mt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function Lt(t){return $t.includes(t)}const R=(t,e,n)=>Math.min(n,Math.max(e,t));function Dt(t,e){if(Lt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:R(n,Tt,Pt)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?P(R(n,wt,Ot),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?P(R(n,Nt,kt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:R(n,It,yt)}if(Object.hasOwn(B,t)){const{min:n,max:o}=B[t],i=Math.round(Number(e));return Number.isFinite(i)?R(i,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?_(e)?e:null:t==="sizeToken"?F(e)?e:null:t==="textStyle"?S(e)?e:null:t==="alignPhone"||t==="alignTablet"?A.includes(e)?e:null:e}const Ht=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function T(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of Ht){const i=t[o];i!==void 0&&!(typeof i=="number"&&Number.isFinite(i))&&n(o)}return t.align!==void 0&&!A.includes(t.align)&&n("align"),t.alignTablet!==void 0&&!A.includes(t.alignTablet)&&n("alignTablet"),t.alignPhone!==void 0&&!A.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!S(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!F(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!_(t.fontRole)&&n("fontRole"),e??t}function F(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:i,fluid:r}=t,l=c=>typeof c=="number"&&Number.isFinite(c)&&c>0,a=c=>typeof c=="string"&&Ft.includes(c);return a(e)&&l(n)&&(o===void 0||a(o))&&(i===void 0||l(i))&&(r===void 0||jt(r,n))}function jt(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...i}=t;return Object.keys(i).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function M(t){return t?.pxPhone&&F(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function U({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,i=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${i}, var(--sf-heading-max,9999px))`:i}const vt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Ct(t){const e=[];for(const[n,o]of vt)n===t?e.push(o):o===t&&e.push(n);return e}function we(t,e,n,o){const i={...K(t,e)},r=o==null?null:Dt(n,o);if(r===null)delete i[n];else{i[n]=r;for(const l of Ct(n))delete i[l]}return X(t,e,i)}function Oe(t,e){return X(t,e,{})}function Wt(t){return ot(t)??"none"}function Gt(t){return nt(t)??""}const V={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Bt(t,e){const n=_(t.role);return n||(e?.blockDrawsStyle?null:mt(t.textStyle))}function Ne(t,e){return t==="Text"&&e==="text"}const Kt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Xt(t){const e=w[t],n=Kt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Ut(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=P(Vt+t.line*zt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=P(t.letter*Et,4)),e}const Vt=1,m="--sf-part-para";function Yt(t){t=T(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const o=M(t.sizeToken);if(o)e.fontSize=U(o);else{const i=E(t);i!==void 0&&(e.fontSize=`${i}px`)}}const n=t.alignPhone??z(t);return n&&(e.textAlign=n),e}function z(t){return t.alignTablet&&t.alignTablet!==t.align?t.alignTablet:void 0}function E(t){const e=pt("textSize",t.size,t.sizeTablet,void 0).tablet;return e&&e>0?e:void 0}function Zt(t){const e=T(t),n={},o=E(e);o!==void 0&&(n.fontSize=`${o}px`);const i=z(e);return i&&(n.textAlign=i),n}function ke(t,e){if(e==="desktop")return;const n=T(t);return(e==="mobile"?z(n):void 0)??n.align}function qt(t,e){if(e==="desktop")return t;const n=T(t),o=E(n),i=z(n);if(e==="tablet"){let a=t;return o!==void 0&&(a={...a,size:o}),i&&(a={...a,align:i}),a}let r=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone};else{const a=M(n.sizeToken);a?r={...r,size:void 0,sizeToken:a}:o!==void 0&&(r={...r,size:o})}const l=n.alignPhone??i;return l&&(r={...r,align:l}),r}function L(t,e,n){return D(qt(t,e),$,n)}function Jt(t){return t==="mobile"?"sizePhone":t==="tablet"?"sizeTablet":"size"}function Ie(t,e){if(e==="desktop")return null;const n=T(t);if(e==="mobile"){if(M(n.sizeToken))return null;const o=E(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function Y(t,e){const n=Jt(e);if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function ye(t,e,n){const o=L(Y(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function D(t,e,n){t=T(t);const o=Bt(t,n),i=Ut(t),r=t.size?`${t.size}px`:t.sizeToken?U(t.sizeToken):o?Xt(o):"";return{fontFamily:t.font?ne(t.font):t.fontRole?`var(${V[t.fontRole]})`:o?`var(${V[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:r,minWidth:r?"0":"",overflowWrap:r?"break-word":"",lineHeight:i.lineHeight!==void 0?String(i.lineHeight):"",letterSpacing:i.letterSpacingEm!==void 0?`${i.letterSpacingEm}em`:"",[m]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Gt(t.case),textAlign:t.align??"",paddingTop:Z(t.padding),paddingBottom:Z(t.padding),color:Qt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Qt=t=>at(t),Z=t=>t===void 0?"":`${t}px`,P=(t,e)=>Number(t.toFixed(e));function Fe(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),i=Number.parseFloat(t.letterSpacing),r=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:te(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?P(o/n,3):1.2,letterEm:Number.isFinite(i)?P(i/n,4):0,align:ee(t.textAlign),case:Wt(t.textTransform),paddingPx:Number.isFinite(r)?Math.round(r):0}}function te(t){return Number.isFinite(t)?bt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function ee(t){for(const e of A)if(e===t)return e;return t==="end"?"right":"left"}function Me(t,e){const n=q(t);if(!n)return"";for(const o of it)if(q(e(o.cssVar))===n)return o.key;return""}const q=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function ne(t){const e=rt(t);return e?`var(${e.cssVar})`:""}function Le(t,e,n,o){return!e||C(e)?.nodeId!==t?null:n.find(r=>o(r.getAttribute("class")))??n[0]??null}function oe(t,e){return Object.hasOwn(t,e)?N(t[e])??{}:{}}function De(t,e,n=()=>$,o=a=>a,i=ae,r="desktop",l=()=>!1){let a=0;for(const{element:c,partId:h}of t){const x=C(h)?.propKey;if(!x)continue;const s=oe(e,o(x)),f=L(s,r,{blockDrawsStyle:l(x)});S(s.textStyle)?c.setAttribute?.(W,s.textStyle):c.removeAttribute?.(W);const d=j.some(g=>c.style[g]);let p=!1;for(const[g,u]of Object.entries(f))le(c,g,u),u&&(p=!0);if(d||j.some(g=>f[g]))for(const g of ie(c,i))for(const u of j)g.style[u]=f[u]??"";p&&(a+=1)}return a}function ie(t,e){const n=O(t.textContent??""),o=[];let i=t;for(let r=0;r<re&&e(i);r+=1){const l=i.parentElement;if(!l||O(l.textContent??"")!==n)break;o.push(l),i=l}return o}const re=8;function ae(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const $={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function se(t){if(!t||typeof t!="object")return null;const e={};return S(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizeTablet=="number"&&t.sizeTablet>0&&(e.sizeTablet=t.sizeTablet),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function fe(t,e){const n=se(t);if(!n)return{};const o=L(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function He(t){return S(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function je(t,e,n){if(!t||typeof t!="object")return{};const o=st(t.role,e,w)??{},i=e.sized?fe(Y(t,n),n):{};return{...o,...i}}function ve(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function le(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const i=t;e===m&&(n?i.setAttribute?.(J,""):i.removeAttribute?.(J))}const J="data-sf-part-para",ce=Object.keys(D({},$)),H=new Set(["color","overflowWrap",m,"fontStyle"]),j=ce.filter(t=>!H.has(t));function Ce(t,e,n,o=a=>a,i=()=>!1,r=()=>null,l=[]){const a=new Map;for(const s of t){const f=v(s.key,s.row);for(const d of s.texts){const p=a.get(d);p?(p.keys.add(s.key),p.partKeys.add(f)):a.set(d,{keys:new Set([s.key]),partKeys:new Set([f])})}}const c=new Map;for(const s of new Set([...Object.keys(e),...l])){if(!ue(s))continue;const f=Q(n,s,N(e[s])??{},!1,r(s));f&&c.set(s,f)}const h=s=>{const f=o(s),d=r(f);if(!Object.hasOwn(e,f)&&!d)return null;const p=N(e[f])??{};return Q(n,s,p,i(s),d)},x=new Map;for(const[s,{keys:f,partKeys:d}]of a){const p=d.size===1?[...d][0]:f.size===1?[...f][0]:null;if(!p)continue;const b=h(p);b&&x.set(s,b)}for(const s of t){if(!s.keyed)continue;const f=h(v(s.key,s.row));f&&c.set(s.key,f)}return x.size||c.size?{rules:x,kindRules:c,drawn:new Set(a.keys())}:null}function Q(t,e,n,o,i){const r=D(n,$,{blockDrawsStyle:o}),l=Zt(n),a=Yt(n),c=S(n.textStyle)?n.textStyle:void 0;return!Object.values(r).some(Boolean)&&!Object.keys(l).length&&!Object.keys(a).length&&!c&&!i?null:{stamp:pe(t,e),declarations:r,...Object.keys(l).length?{tablet:l}:{},...Object.keys(a).length?{phone:a}:{},...c?{textStyle:c}:{},...i?{motion:i}:{}}}function ue(t){return t.startsWith("@")}function We(t,e){return t?.kindRules.get(e)??null}function pe(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function Ge(t,{inBox:e=!1}={}){const n=e?lt:ut,o=e?ft:ct,i=[],r=new Set,l=a=>{const{stamp:c,declarations:h}=a;if(r.has(c))return;r.add(c);const x=Object.entries(h).filter(([,u])=>u!==""),s=u=>u.map(([tt,et])=>`${xe(tt)}: ${et}`).join("; "),f=`[${ht}="${c}"]`,d=x.filter(([u])=>!H.has(u)),p=x.filter(([u])=>H.has(u));d.length&&i.push(`${f}, *:has(> ${f}) { ${s(d)} }`),p.length&&i.push(`${f} { ${s(p)} }`),h[m]&&(i.push(`*:has(> ${f}) { ${m}: ${h[m]} }`),i.push(...de(f,`*:has(> ${f})`)));const b=Object.entries(a.tablet??{}).filter(([,u])=>u!=="");b.length&&i.push(`@media ${n} { ${f}, *:has(> ${f}) { ${s(b)} } }`);const g=Object.entries(a.phone??{}).filter(([,u])=>u!=="");g.length&&i.push(`@media ${o} { ${f}, *:has(> ${f}) { ${s(g)} } }`)};for(const a of t.rules.values())l(a);for(const a of t.kindRules.values())l(a);return i.join(`
|
|
2
|
+
`)}function de(t,e){const n=`var(${m})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${t} ${o}:not(:first-child) { margin-top: ${n} }`,`${t} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${e}) + :is(${e}) { margin-top: ${n} }`]}const xe=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function Be(t,e){if(!t)return null;const n=O(e),o=t.rules.get(n);if(o)return o;if(n.length<ge||t.drawn.has(n))return null;let i=null;for(const[r,l]of t.rules)if(r.includes(n)){if(i&&i.stamp!==l.stamp)return null;i=l}return i}const ge=8;export{A as PART_ALIGNS,kt as PART_LETTER_EM_MAX,Nt as PART_LETTER_EM_MIN,Et as PART_LETTER_STEP,Ot as PART_LINE_HEIGHT_MAX,wt as PART_LINE_HEIGHT_MIN,zt as PART_LINE_STEP,B as PART_MEASURED_TRACKS,Pt as PART_NUDGE_MAX,Tt as PART_NUDGE_MIN,Rt as PART_PADDING_MAX,At as PART_PADDING_MIN,_t as PART_PADDING_STEP,J as PART_PARAGRAPH_ATTR,yt as PART_PARAGRAPH_MAX,It as PART_PARAGRAPH_MIN,m as PART_PARAGRAPH_VAR,$t as PART_RELATIVE_PROPS,y as PART_SIZE_MAX,I as PART_SIZE_MIN,Ft as PART_SIZE_STEPS,ht as PART_STYLED_ATTR,k as PART_STYLES_PROP,ce as PART_STYLE_PROPERTIES,bt as PART_WEIGHTS,j as SHARED_PART_PROPERTIES,G as STYLE_ID_OF_ROLE,W as TEXT_STYLE_ATTR,De as applyPartStyles,Ne as blockDrawsTextStyle,_e as followedStyleOf,ue as isPartKindKey,S as isTextStyleId,de as paragraphRules,ke as partAlignFollowed,L as partCanvasDeclarations,Wt as partCaseOfTransform,Gt as partCaseTransform,Me as partFontKeyOf,ze as partLiftRules,Yt as partPhoneDeclarations,We as partRuleForKind,Be as partRuleForText,ye as partShownDeclarations,Jt as partSizeBoxOf,Ie as partSizeFollowed,Ut as partSpacingOf,Fe as partStyleBase,$e as partStyleCount,Ge as partStyleCss,D as partStyleDeclarations,qt as partStyleForScreen,Le as partStyleSource,Y as partStyleWithoutSizeBox,Zt as partTabletDeclarations,we as propsWithPartStyleValue,Oe as propsWithoutPartStyle,Ce as publishedPartStyles,K as readPartStyle,Ee as readPartStyles,fe as regionCanvasDeclarations,ve as regionCanvasRestore,He as regionHasOwnLook,se as regionSheetStyle,je as regionShownDeclarations,oe as storedPartStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as w}from"react/jsx-runtime";import{parseBlockWidthFit as K,phoneKey as c,tabletKey as o}from"efficient-easel/draw";import{blockCanWidenPastCell as A,blockFillInCellClass as L,blockSizeOf as O,blockSizeValuesOf as X}from"../../content/block-size.js";import{NoCellBound as G}from"../../../components/BoxCellContext.js";import{CellWrap as Z,useBoxCell as v}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as U,boxRowColumnsClass as B,boxShareClasses as k,boxShareTabletOf as Y,boxTabletColumnsClass as $}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as M}from"../../../../format/lib/content/container-direction.js";import{BOX_TYPE as V,containerBlocksFor as q}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as J}from"../part-styles.js";import{addShowWhenFacts as Q,withRowRules as F}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as tt}from"./cell-width.js";import{findParentNode as et}from"../../../../format/lib/document/passes/document-position.js";const it=new Set(["Text","Heading"]),nt=new Set(["h1","h2","h3","h4","h5","h6"]);function z(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&nt.has(e.tag)?!0:J(e,"text").textStyle?.startsWith("heading-")===!0}const u={not:{context:"blockOutsideBox",is:!0}},C={all:[u,{not:{context:"boxSharesWidth",is:!0}}]},I={all:[u,{not:{context:"boxSharesWidthPhone",is:!0}}]},N={all:[u,{not:{context:"boxSharesWidthTablet",is:!0}}]};function y(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}function E(t,e,i){return{any:[{field:c(t),is:e},{all:[{field:c(t),set:!1},i??{field:t,is:e}]}]}}const H={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},st=[[["_gBlockSize","minWidth",o("minWidth"),c("minWidth"),"maxWidth",o("maxWidth"),c("maxWidth")],u],[["widthFit"],C],[[o("widthFit")],N],[[c("widthFit")],I],[["width"],{all:[C,{field:"widthFit",is:"fixed"}]}],[[o("width")],{all:[N,y("widthFit","fixed")]}],[[c("width")],{all:[I,E("widthFit","fixed")]}]],R=y("textFit","shrink",H),D=[[["_gText","textFit",o("textFit"),c("textFit")],u],[["minFont"],{all:[u,H]}],[[o("minFont")],{all:[u,R]}],[[c("minFont")],{all:[u,E("textFit","shrink",R)]}]],f=(t,e)=>et(e.appState,t.props?.id),p=t=>!!t&&typeof t.type=="string"&&q(t.type)!==null,m=t=>(t.type==="Flex"||t.type==="HeroGroup")&&M(t.type,t.props?.direction)==="row",_=t=>{const e=K(t);return e!==void 0&&e!=="fit"},rt={blockOutsideBox:(t,e)=>!p(f(t,e)),boxSharesWidth:(t,e)=>{const i=f(t,e);return!p(i)||!m(i)?!1:B({...i.props,direction:"row"})!==""?!0:k(i.props?.share)!==""&&!_(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=f(t,e);if(!p(i)||!m(i))return!1;if($(i.props?.[o("columns")])!==""||B({...i.props,direction:"row"})!=="")return!0;const n=Y(i.props?.[o("share")])??i.props?.share;return k(n)!==""&&!_(t.props?.[o("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=f(t,e);if(!p(i)||!m(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!U(n,i.props?.[c("share")])&&!_(t.props?.[c("widthFit")]??t.props?.widthFit)}},ot=t=>/^_[gds][A-Z]/.test(t);function lt(t,e,i){const n=Object.entries(t),r=n.findIndex(([l])=>l===e);if(r===-1)return null;let s=r+1;for(;s<n.length&&!ot(n[s][0]);)s++;return Object.fromEntries([...n.slice(0,s),...Object.entries(i),...n.slice(s)])}function j(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function ct(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:r,...s}=i;return j(e,n.indexOf("_dSize")+1,s)}return at.has(t)&&n.includes("_gSpacing")?j(e,n.indexOf("_gSpacing"),i):{...e,...i}}const at=new Set(["Text","Heading"]);function ut(t,e){const{_gText:i,...n}=e;return lt(t,"_gText",n)??{...t,...e}}function ht(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const r of["textFit",o("textFit"),c("textFit")])r in n&&(n[r]=t[r]);e.set(i,n)}return n}}const Bt={name:"blockSize",applies:(t,e,i)=>tt.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=it.has(e),{text:r}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:s}=i.blockSizeFields({tablet:!0});let l=ct(e,t.fields??{},F(s,st));if(n){const a=F(r,D);if(l=ut(l,a),e==="Text"){const h=F(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,D),x=ht(h),d=t.resolveFields,P=(T,S)=>{const b=d?d(T,S):S.fields,W=g=>z(e,T?.props??{})?x(g??S.fields):g;return b instanceof Promise?b.then(W):W(b)};t.resolveFields=P}}t.fields=l,Q(t,{...rt,textWrapsByDefault:a=>!z(e,a.props??{})})},draw(t,e){dt(t,e)}};function dt(t,e){const i=t.render;t.render=n=>{const r=X(n),s=O(r),l=i(n),a=s&&O(r,{atSectionLine:!0});return s===null?l:w(ft,{size:s,sectionSize:a??s,atEdge:e===V,inCell:L(r),widens:A(r),children:l})}}function ft({size:t,sectionSize:e,atEdge:i,inCell:n,widens:r,children:s}){const l=v(),a=l||i?t:e,h=a.className,x=l?.phoneCells===!0,d=r?w(G,{children:s}):s;return w(Z,{className:x&&n?`${h} ${n}`:h,...Object.keys(a.style).length?{style:a.style}:{},attrs:a.attrs,children:d})}export{Bt as blockSize,z as textShrinksByDefault};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s}from"react/jsx-runtime";import{CardRowDrawn as f}from"../../../components/CardRowContext.js";import{PublishedPartStyles as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{CardRowDrawn as f}from"../../../components/CardRowContext.js";import{PublishedPartStyles as h}from"../../../components/PublishedPartStylesContext.js";import{readPartStyles as y}from"../part-styles.js";import{readPartMotions as x}from"../../animation/part-motion.js";import{partNeedles as b}from"../text-parts.js";import{CARD_LIST_TYPE as p,rowPartByKey as u}from"../../../../format/lib/content/card-template.js";import{BOX_TYPE as _}from"../../../../format/lib/document/container-blocks.js";const B={name:"clickableParts",applies:(i,e,c)=>typeof c?.render=="function"&&i!==p,draw(i,e,c){const o=i,P=()=>o.textParts??o.fields,l=o.render,d=c.inspector?.PartAnchors,m=(t,r)=>b(P(),r,n=>u(e,t,n));o.render=t=>{const r=y(t),n=x(t);return t.editor?.isEditing&&d?s(f,{type:e,props:t,children:a=>s(d,{needles:m(t,a),styles:r,motions:n,type:e,children:l(t)})}):!Object.keys(r).length&&!Object.keys(n).length?l(t):s(f,{type:e,props:t,children:a=>s(h,{needles:m(t,a),styles:r,motions:n,type:e,atEdge:e===_,children:l(t)})})}}};export{B as clickableParts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as c}from"react";import{ViewHideContext as m,viewHideClaim as l}from"../../../components/ViewHideRoot.js";import{nodeHiddenEverywhere as f,nodeViewHideClass as o,nodeViewHideWords as u}from"../../../../format/lib/content/view-hide-class.js";import{BOX_TYPE as w}from"../../../../format/lib/document/container-blocks.js";const N={name:"hiddenNodes",applies:(n,i,t)=>typeof t?.render=="function",draw(n,i,t){const r=i===w?"edge":t.isSection(i)?"section":"by-box",d=n.render;n.render=e=>{if(f(e))return null;const s=o(e),a=l(s,u(e),{sectionClassName:o(e,{atSectionLine:!0}),line:r});return c(m.Provider,{value:a},d(e))}}};export{N as hiddenNodes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as E}from"react/jsx-runtime";import{SectionAnimation as f}from"../../../components/SectionAnimation.js";import{ENTRANCE_EXCLUDED as l,entranceDrawn as p}from"../../animation/entrance.js";import{CARD_HOVER_SECTIONS as w,PICTURE_HOVER_BLOCKS as T}from"../../../../format/lib/animation/hover.js";import{BOX_TYPE as a}from"../../../../format/lib/document/container-blocks.js";import{drawsCopiesInTheBox as _}from"../../../../format/lib/content/copies-in-box.js";const c=Object.fromEntries(T.map(n=>[n,"picture"])),b={[a]:"box",Ticker:"marquee",...Object.fromEntries(w.map(n=>[n,"cards"])),...c},s=(n,e)=>!l.has(n)&&!!e&&typeof e.render=="function";function d(n,e,o,i){n.fields={...n.fields,...o.animationTabFields(e,i)}}function m(n,e){const o=n,i=o.render;o.render=t=>{const r=p(t);return!r||_(e,t)?i(t):E(f,{desktop:r.desktop,phone:r.phone,editing:!!t.editor?.isEditing,takesViewHide:!0,atEdge:e===a,children:i(t)})}}const R={name:"sectionAnimation",applies:(n,e,o)=>e.isSection(n)&&s(n,o),panel:(n,e,o)=>d(n,b[e]??"section",o,e),draw:(n,e)=>m(n,e)},x={name:"blockEntrance",applies:(n,e,o)=>!e.isSection(n)&&s(n,o),panel:(n,e,o)=>d(n,c[e]??"block",o,e),draw:(n,e)=>m(n,e)};export{x as blockEntrance,R as sectionAnimation};
|