efficient-web-builder 48.3.0 → 49.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 +26 -0
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/lib/document/add-target.d.ts +1 -1
- package/dist/editor/lib/document/add-target.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/sections/hero-ticker-to-strip.d.ts +7 -0
- package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -0
- package/dist/editor/lib/sections/section-dry-run.d.ts +5 -0
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +1 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +3 -3
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +1 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +11 -0
- package/dist/format/lib/content/view-lines.js +1 -0
- package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +4 -0
- package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
- package/dist/format/lib/hero-ticker.d.ts +6 -0
- package/dist/format/lib/hero-ticker.js +1 -1
- package/dist/format/lib/sections/collection-card-text-regions.d.ts +1 -1
- package/dist/format/lib/sections/collection-card-text-regions.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.d.ts +1 -0
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/sections/ticker-style.js +1 -1
- package/dist/format/lib/source-rules/heading-ceiling-sweep.js +7 -7
- package/dist/format/lib/source-rules/view-breakpoint-names.d.ts +6 -0
- package/dist/format/lib/source-rules/view-breakpoint-names.js +4 -0
- package/dist/render/components/Banner.js +1 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/CategoryBar.js +1 -1
- package/dist/render/components/ChartSection.js +1 -1
- package/dist/render/components/ContactLocations.js +1 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +1 -0
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/IntegrationsSection.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/LocationMap.d.ts +1 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/Masthead.js +1 -1
- package/dist/render/components/MockupSection.js +1 -1
- package/dist/render/components/OrderSummary.js +1 -1
- package/dist/render/components/ParagraphsA.js +1 -1
- package/dist/render/components/PostCard.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/Prose.js +1 -1
- package/dist/render/components/Reel.js +1 -1
- package/dist/render/components/SectionEyebrow.js +1 -1
- package/dist/render/components/SectionHeader.d.ts +4 -4
- package/dist/render/components/SectionHeader.js +1 -1
- package/dist/render/components/Series.js +1 -1
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Stats.js +1 -1
- package/dist/render/components/StatsParagraph.js +1 -1
- package/dist/render/components/Testimonials.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/Ticker.js +1 -1
- package/dist/render/components/TickerSection.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineRail.d.ts +4 -4
- package/dist/render/components/TimelineRail.js +1 -1
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/lib/animation/LoopTrack.d.ts +2 -2
- package/dist/render/lib/animation/LoopTrack.js +1 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/content/view-values.d.ts +2 -1
- package/dist/render/lib/content/view-values.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/passes/section-width.d.ts +2 -2
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/slot-specs.d.ts +3 -0
- package/dist/render/lib/document/slot-specs.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 49.0.0 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
From main at `7b0b29e8`: #479, #482, #484. A major because of #479: every class at a view line now uses the line's name from the host's site sheet. No export is removed, and the peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: the Hero strip converter (`heroTickerToStrip`) is not run by this package.
|
|
6
|
+
|
|
7
|
+
**BREAKING for hosts (#479):** the classes need a host sheet that defines `--breakpoint-view-wide`, `--breakpoint-view-tablet` and `--breakpoint-view-desktop`. That is storefront-blocks 0.80.0 or later (#343). A host whose sheet lacks them compiles these classes to nothing. Install this release in the same change as the host's own rename (storefront-blocks step 4), so no element mixes a named line and a numbered line.
|
|
8
|
+
|
|
9
|
+
| class before | class now | compiles to |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `max-[800px]:` | `max-view-wide:` | `width < 800px` |
|
|
12
|
+
| `min-[800px]:` | `view-wide:` | `width >= 800px` |
|
|
13
|
+
| `max-[1100px]:` | `max-view-desktop:` | `width < 1100px` |
|
|
14
|
+
| `min-[720px]:` | `view-tablet:` | `width >= 720px` |
|
|
15
|
+
| `max-[720px]:` | `max-view-tablet:` | `width < 720px` |
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **BREAKING: view-line classes are written by name** (#479). About 440 class prefixes in 73 files. The near lines `max-[719px]:`, `min-[801px]:` and `min-[1101px]:` stay as they are. The one reader of a view line (`heading-ceiling-sweep` `widestViewport()`) reads the names.
|
|
20
|
+
- **The Hero's Scrolling Bar is a real Box in a new `strip` slot** (#482), at most one. Stored Heroes draw as today until the CLI moves them. A new Hero has an empty strip. The strip words use the one on-media ink (76%, was 70%).
|
|
21
|
+
- **A clicked slide video stops when the shopper leaves the slide** (#484).
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- `lib/content/view-lines`: the one table of view-line widths for code that reads a class (`VIEW_LINE_PX`, `breakpointOf`, `ViewLine`). `RESPONSIVE_RULES` moves here; `lib/content/view-values` still re-exports it (#479).
|
|
26
|
+
- `lib/source-rules/view-breakpoint-names` (`viewBreakpointNames`, `ViewBreakpointNamesOptions`): no class writes 720, 800 or 1100 as a `min-` / `max-` view line (#479).
|
|
27
|
+
- Hero strip: `HERO_STRIP_SLOT`, `HERO_STRIP_CAP`, `HERO_STRIP_SPEC`, `SLOT_SECTION_EXTRA_SPECS`, `heroTickerToStrip`, `HeroTickerConversion`, `heroStoresLegacyTicker`, `legacyTickerDrawn`, `legacyTickerWords`, `HERO_MOVES`, `HERO_SECTION_PASS_KEYS` (#482).
|
|
28
|
+
|
|
3
29
|
## 48.3.0 - 2026-11-04
|
|
4
30
|
|
|
5
31
|
From main at `ee1edea1`: #469, #475, #478, #480. A minor: exports are added, no export is removed, peers are unchanged (`efficient-easel` `^27.0.0`, `efficient-shell` `^11.8.0`). No stored page changes: nothing is seeded, and the single Hero converter (`heroSingleToHero`) is not run by this package.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,Fragment as B,jsxs as k}from"react/jsx-runtime";import{useCallback as R,useEffect as g,useRef as $,useState as D}from"react";import{SettingsSwitch as ee}from"efficient-easel/panel";import{PagesIcon as te,StylesIcon as oe}from"efficient-easel/rail";import{PaletteIcon as re}from"efficient-shell/icons/efficient";import{Subtree as ne,TreeRow as y}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ie}from"./LocationsTreeContext.js";import se from"./PagesPanel.js";import{usePreviewChat as ae}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as ce}from"./preview-devices.js";import{PreviewDeviceContext as de}from"efficient-easel/draw/client";import{usePreviewSocial as le}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as pe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as me,usePreviewTicker as ue}from"../../render/components/PreviewTickerContext.js";import{usePreviewHeroPart as fe}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Se,HERO_PART_MODE as W,heroMediaRows as Ee,heroPartId as M,readHeroPartId as Pe}from"../../render/lib/document/hero-media-parts.js";import Te,{CHAT_MODE as we,HEADER_MODE as he,SOCIAL_MODE as ge,WEBSITE_MODE as V,WEBSITE_PAGE_MODE as Ie}from"./SectionEditor.js";import C from"./SectionIcon.js";import be from"./SectionThumbnail.js";import{useScreenDocument as O}from"efficient-easel/screen/components/ScreenDocumentContext";import ve from"./StylesPanel.js";import{LOCATIONS_TYPE as _e,useLocationsTree as ke}from"./useLocationsTree.js";import{usePinnedChromeSeed as Re}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Ce}from"./useHostDocumentBridge.js";import{usePreviewHref as Oe}from"./usePreviewHref.js";import{WebsitePreviewButton as Le}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as Ae,SITE_STYLES_TABS as Be,SITE_STYLES_TEXT_TAB as De,useWebsiteName as ye}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Ne}from"./useWebsiteMainAction.js";import{VersionHistory as He}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as We}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Me,heroGroupNestDepth as Ve}from"../../format/lib/hero-group-placement.js";import{stripMarkup as xe}from"../../format/lib/markup.js";import{categoryShortLabel as Ge,PINNED_SECTION_TYPE as Ye}from"../lib/document/add-palette.js";import{canAddTo as Fe}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as Ke}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as je}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as ze,setBookingPreview as Ue}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as Ze}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as qe}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as Xe,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as Je,readLeftView as Qe,resolveLeftView as $e,writeLeftView as et}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as tt}from"../lib/document/locked-blocks.js";import{everyPageNotice as ot,noOwnTab as rt,pinnedReach as Y,websiteDuplicateBlocked as nt}from"../lib/document/every-page.js";import{sharedSectionReach as it,WEBSITE_SHARED_SECTIONS as st}from"../lib/shared-sections-layer.js";import{activeSharedSections as L,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as at}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as v}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ct,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as dt}from"../lib/document/overrides.js";import{labelAtLevel as lt}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as pt}from"../../format/lib/document/media-drop.js";import{editorWords as mt,say as S}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as ut}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as ft,isSectionGroupType as St,sectionGroupZone as Et,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as Pt}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as Tt}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as wt,SAVE_AS_TEMPLATE_EVENT as ht}from"../../format/lib/save-as-template-action.js";import{cityPalettePresets as gt}from"../lib/sections/city-presets.js";import{newSectionNode as It}from"../lib/sections/new-section-node.js";import{useHostProducts as bt}from"../lib/use-host-products.js";import{backendOf as vt}from"../lib/website-session.js";function z({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=ue(),c=H().tree,l=e,n=l.kind==="ticker"?l.heroId:null,s=R(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ct(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const u=String(i.props.id);return i.type==="Hero"&&a(y,{icon:a(C,{type:"ticker",size:13}),name:S(me),onSelect:()=>s(u),selected:n===u,rowProps:{onClick:m(()=>s(u))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=fe(),c=H().tree,{appState:l}=N(p=>p),n=l.data.content??[],s=$(n);s.current=n;const i=e,m=Se.find(p=>W[p]===i.kind),u=m&&"nodeId"in i?M(String(i.nodeId),m):null,E=R(p=>{const d=Pe(p);if(!d)return;const P=s.current.findIndex(w=>String(w.props.id)===d.nodeId);if(P<0)return;const T={kind:W[d.part],nodeId:d.nodeId};t({index:P},T)},[t]);return g(()=>{o(u)},[u,o]),g(()=>{r(E)},[r,E]),{partRows:(p,{rowClick:d})=>{const P=String(p.props.id),T=Ee(p);if(T.length===0)return null;const w=f=>{const h=M(P,f.part);return a(y,{icon:a(C,{type:f.part==="media"?"heroMedia":"heroImage",size:13}),name:S(f.label),onSelect:()=>E(h),selected:u===h,rowProps:{onClick:d(()=>E(h))},words:c},h)},[b,...I]=T;return k(B,{children:[w(b),I.length>0&&a(ne,{children:I.map(w)})]})}}}function Z(e,t){return{partRows:(o,r)=>k(B,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function _t(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:l,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=O(),{hasPreviewLink:u}=o,E=vt(x()).preview?.draftLink,p=Ne(e.data),d=wt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),P=R(()=>{!c||!r||i(ht,{siteId:c,slug:r})},[i,c,r]),T=Oe({pageSlug:r,siteId:c,token:m}),w=t.previewHref?.(r)??T;return{barLead:()=>d.visible&&a(Tt,{enabled:d.enabled,reason:d.enabled?"":d.disabledReason,onSaved:P}),barView:()=>u&&r&&a(Le,{liveHref:w,pageId:l??null,draftLink:E}),mainAction:p}}function kt(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:l,navigate:n}=O(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=f=>t.setView(f),[u,E]=D(Be[0].id),[p,d]=D(!1),{surface:P,setSurface:T}=pe(),w=()=>{if(s){m("styles"),t.reveal(),K();return}e.show(V),e.reveal(),K()},b={id:"pages",label:S("Pages"),icon:a(te,{}),panel:({onHide:f})=>a(se,{activeSurface:P,onPreviewSurface:T,onNavigate:h=>{T(null),n(r?{kind:"template",id:r,pageSlug:h}:{kind:"page",slug:h,siteId:c??void 0})},onClose:f})},I=[];return!s&&i&&I.push({id:"appearance",label:S("Appearance"),icon:a(re,{}),active:e.kind==="website",onSelect:w}),s&&I.push({id:"styles",label:S("Styles"),icon:a(oe,{}),panel:({onHide:f,notify:h})=>a(ve,{tokenRef:l,siteId:c??void 0,onClose:f,onNotify:h,tab:u,onTabChange:E,revealPageGroup:p,onPageGroupRevealed:()=>d(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:f=>$e(f,s),openSettings:w,openStyles:()=>{E(De),m("styles")},openPageStyles:s?()=>{E(Ae),d(!0),m("styles"),t.reveal()}:i?()=>{e.show(Ie),e.reveal()}:void 0}}function Rt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=O(),c=N(n=>n.config),l=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=L();if(!n||!r)return;let s=!1;return at(l).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,l])}function Ct(e,t,o,r){const{kind:c,open:l}=e,{selected:n,zoneOf:s}=t;g(()=>{Ue(n?.type==="BookingBox"&&n.props.region==="confirm"?ze(s(String(n.props.id))):null)},[n?.props.id]);const i=ke(e,t),{capabilities:{hasSiteSettings:m}}=O();Rt();const{chat:u,setChat:E,setSelected:p,setSelectHandler:d}=ae(),P=R(()=>l(we),[l]),T=c==="chat";g(()=>{p(T)},[T,p]),g(()=>{d(P)},[d,P]);const{setOpenHandler:w}=le(),b=R(()=>l(ge),[l]);g(()=>{w(b)},[w,b]);const I=Z(z(e),U(e)),f=_t(t),h=kt(e,r),J=o.device;return{...I,...f,...h,hasOwnRows:_=>_.type===_e,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:_=>a(ie.Provider,{value:!0,children:k(de.Provider,{value:J,children:[_,a(He,{})]})}),addPanelRow:_=>m?k("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(C,{type:"chat",size:16})}),k("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{_(),P()},children:[S("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:S("A chat bubble on every page")})]}),a(ee,{checked:u.enabled,onChange:Q=>E({enabled:Q}),ariaLabel:S("Show the chat bubble on the whole site")})]}):void 0}}let q=null,A=new WeakMap;function Ot(e){const t=mt();if(!e||!t)return e;q!==t&&(q=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:S(r.label)})):null,spec:e.spec?{...e.spec,addLabel:S(e.spec.addLabel)}:null},A.set(e,o)),o}const Lt={isLockedBlock:(e,t)=>tt(e,t)||!!(t&&L()?.heldElsewhere(t.props.id)),duplicateBlocked:nt,nestDepth:(e,t,o)=>t===Me?Ve(e,o):0,newSectionNode:It,canAddTo:(e,t,o,r)=>Ot(Fe(e,t,r)),blockIsOffered:je,slotsOf:Ke},At=new Proxy(ut,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?S(o):o}}),Bt={labelAtLevel:(e,t,o)=>S(lt(e,t,o)),descriptions:At,categoryLabel:e=>{const t=Ge(e);return t===void 0?void 0:S(t)},firstSection:Ye,blockRowName:Ze,rowName:qe,plainText:xe,Icon:C,Thumbnail:be,useProducts:bt,presets:gt()},Dt={desktop:2e3,tablet:800,mobile:390},X="desktop",yt={options:ce,initial:X,fluid:X,widths:Dt},Nt={read:Qe,write:e=>et(e),forSelection:(e,t)=>Je(e,t)},Ht={first:G,last:Xe,firstGroup:Pt,lastGroup:j,isSectionGroup:St,sectionGroupZone:Et,panelOf:e=>e===G?he:null,get sharedReach(){return v()?Mt:void 0},get shared(){return L()?st:void 0},get groupTab(){return v()?rt:void 0},get groupBadge(){return v()?Y({type:j})??void 0:void 0},get changeNotice(){return v()?ot():void 0},get band(){return v()?Wt:void 0},get groupAccepts(){return v()?ft:void 0}},Wt={foldable:!0},Mt=e=>Y(e)??it(e);function Vt(e){return{...Z(z(e),U(e)),openSettings:()=>e.show(V)}}function xt(e,t){Re(e,t),Ce()}const Jo={useOwnerName:ye,useDocumentLabel:We,useBridges:Ct,useStandaloneBridges:Vt,useDocumentPass:xt,blockRules:Lt,blockLook:Bt,devices:yt,leftView:Nt,pinned:Ht,Canvas:dt,canvasDrag:{media:pt},Inspector:Te};export{Jo as WEBSITE_SCREEN};
|
|
1
|
+
"use client";import{jsx as a,Fragment as B,jsxs as k}from"react/jsx-runtime";import{useCallback as R,useEffect as g,useRef as $,useState as y}from"react";import{SettingsSwitch as ee}from"efficient-easel/panel";import{PagesIcon as te,StylesIcon as oe}from"efficient-easel/rail";import{PaletteIcon as re}from"efficient-shell/icons/efficient";import{Subtree as ne,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as ie}from"./LocationsTreeContext.js";import se from"./PagesPanel.js";import{usePreviewChat as ae}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as ce}from"./preview-devices.js";import{PreviewDeviceContext as de}from"efficient-easel/draw/client";import{usePreviewSocial as le}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as pe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as me,usePreviewTicker as fe}from"../../render/components/PreviewTickerContext.js";import{heroStoresLegacyTicker as ue}from"../../format/lib/hero-ticker.js";import{usePreviewHeroPart as Se}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Ee,HERO_PART_MODE as W,heroMediaRows as Pe,heroPartId as M,readHeroPartId as Te}from"../../render/lib/document/hero-media-parts.js";import he,{CHAT_MODE as we,HEADER_MODE as ge,SOCIAL_MODE as Ie,WEBSITE_MODE as V,WEBSITE_PAGE_MODE as be}from"./SectionEditor.js";import C from"./SectionIcon.js";import ve from"./SectionThumbnail.js";import{useScreenDocument as O}from"efficient-easel/screen/components/ScreenDocumentContext";import _e from"./StylesPanel.js";import{LOCATIONS_TYPE as ke,useLocationsTree as Re}from"./useLocationsTree.js";import{usePinnedChromeSeed as Ce}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Oe}from"./useHostDocumentBridge.js";import{usePreviewHref as Le}from"./usePreviewHref.js";import{WebsitePreviewButton as Ae}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as Be,SITE_STYLES_TABS as ye,SITE_STYLES_TEXT_TAB as De,useWebsiteName as Ne}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as He}from"./useWebsiteMainAction.js";import{VersionHistory as We}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Me}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Ve,heroGroupNestDepth as xe}from"../../format/lib/hero-group-placement.js";import{stripMarkup as Ge}from"../../format/lib/markup.js";import{categoryShortLabel as Ye,PINNED_SECTION_TYPE as Fe}from"../lib/document/add-palette.js";import{canAddTo as Ke}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as je}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as ze}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as Ue,setBookingPreview as Ze}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as qe}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as Xe}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as Je,HEADER_TYPE as G}from"../lib/document/footer-blocks.js";import{leftViewForSelection as Qe,readLeftView as $e,resolveLeftView as et,writeLeftView as tt}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as ot}from"../lib/document/locked-blocks.js";import{everyPageNotice as rt,noOwnTab as nt,pinnedReach as Y,websiteDuplicateBlocked as it}from"../lib/document/every-page.js";import{sharedSectionReach as st,WEBSITE_SHARED_SECTIONS as at}from"../lib/shared-sections-layer.js";import{activeSharedSections as L,setSharedEditor as F}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as ct}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as v}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as dt,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as lt}from"../lib/document/overrides.js";import{labelAtLevel as pt}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as mt}from"../../format/lib/document/media-drop.js";import{editorWords as ft,say as S}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as ut}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as St,isSectionGroupType as Et,sectionGroupZone as Pt,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as Tt}from"../../format/lib/document/section-groups.js";import{SaveAsTemplateButton as ht}from"./SaveAsTemplateButton.js";import{resolveSaveAsTemplateAction as wt,SAVE_AS_TEMPLATE_EVENT as gt}from"../../format/lib/save-as-template-action.js";import{cityPalettePresets as It}from"../lib/sections/city-presets.js";import{newSectionNode as bt}from"../lib/sections/new-section-node.js";import{useHostProducts as vt}from"../lib/use-host-products.js";import{backendOf as _t}from"../lib/website-session.js";function z({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=fe(),c=H().tree,l=e,n=l.kind==="ticker"?l.heroId:null,s=R(i=>{if(!i)return;t({kind:"ticker",heroId:i}),dt(i)},[t]);return g(()=>{o(n)},[n,o]),g(()=>{r(s)},[r,s]),{partRows:(i,{rowClick:m})=>{const f=String(i.props.id);return i.type==="Hero"&&ue(i.props)&&a(D,{icon:a(C,{type:"ticker",size:13}),name:S(me),onSelect:()=>s(f),selected:n===f,rowProps:{onClick:m(()=>s(f))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Se(),c=H().tree,{appState:l}=N(p=>p),n=l.data.content??[],s=$(n);s.current=n;const i=e,m=Ee.find(p=>W[p]===i.kind),f=m&&"nodeId"in i?M(String(i.nodeId),m):null,E=R(p=>{const d=Te(p);if(!d)return;const P=s.current.findIndex(h=>String(h.props.id)===d.nodeId);if(P<0)return;const T={kind:W[d.part],nodeId:d.nodeId};t({index:P},T)},[t]);return g(()=>{o(f)},[f,o]),g(()=>{r(E)},[r,E]),{partRows:(p,{rowClick:d})=>{const P=String(p.props.id),T=Pe(p);if(T.length===0)return null;const h=u=>{const w=M(P,u.part);return a(D,{icon:a(C,{type:u.part==="media"?"heroMedia":"heroImage",size:13}),name:S(u.label),onSelect:()=>E(w),selected:f===w,rowProps:{onClick:d(()=>E(w))},words:c},w)},[b,...I]=T;return k(B,{children:[h(b),I.length>0&&a(ne,{children:I.map(h)})]})}}}function Z(e,t){return{partRows:(o,r)=>k(B,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function kt(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:l,hasUnsavedEdits:n,bridgeCapabilities:s,notifyParent:i,token:m}=O(),{hasPreviewLink:f}=o,E=_t(x()).preview?.draftLink,p=He(e.data),d=wt({hasTrustedConsole:!!m,canCreatePlatformTemplate:s.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),P=R(()=>{!c||!r||i(gt,{siteId:c,slug:r})},[i,c,r]),T=Le({pageSlug:r,siteId:c,token:m}),h=t.previewHref?.(r)??T;return{barLead:()=>d.visible&&a(ht,{enabled:d.enabled,reason:d.enabled?"":d.disabledReason,onSaved:P}),barView:()=>f&&r&&a(Ae,{liveHref:h,pageId:l??null,draftLink:E}),mainAction:p}}function Rt(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:l,navigate:n}=O(),{hasSiteTheme:s,explainsSiteSettings:i}=o,m=u=>t.setView(u),[f,E]=y(ye[0].id),[p,d]=y(!1),{surface:P,setSurface:T}=pe(),h=()=>{if(s){m("styles"),t.reveal(),K();return}e.show(V),e.reveal(),K()},b={id:"pages",label:S("Pages"),icon:a(te,{}),panel:({onHide:u})=>a(se,{activeSurface:P,onPreviewSurface:T,onNavigate:w=>{T(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:u})},I=[];return!s&&i&&I.push({id:"appearance",label:S("Appearance"),icon:a(re,{}),active:e.kind==="website",onSelect:h}),s&&I.push({id:"styles",label:S("Styles"),icon:a(oe,{}),panel:({onHide:u,notify:w})=>a(_e,{tokenRef:l,siteId:c??void 0,onClose:u,onNotify:w,tab:f,onTabChange:E,revealPageGroup:p,onPageGroupRevealed:()=>d(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:u=>et(u,s),openSettings:h,openStyles:()=>{E(De),m("styles")},openPageStyles:s?()=>{E(Be),d(!0),m("styles"),t.reveal()}:i?()=>{e.show(be),e.reveal()}:void 0}}function Ct(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=O(),c=N(n=>n.config),l=x();g(()=>(F({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>F(null)),[e,t,o,c]),g(()=>{const n=L();if(!n||!r)return;let s=!1;return ct(l).list().then(i=>{s||n.learn(i)}).catch(()=>{}),()=>{s=!0}},[r,l])}function Ot(e,t,o,r){const{kind:c,open:l}=e,{selected:n,zoneOf:s}=t;g(()=>{Ze(n?.type==="BookingBox"&&n.props.region==="confirm"?Ue(s(String(n.props.id))):null)},[n?.props.id]);const i=Re(e,t),{capabilities:{hasSiteSettings:m}}=O();Ct();const{chat:f,setChat:E,setSelected:p,setSelectHandler:d}=ae(),P=R(()=>l(we),[l]),T=c==="chat";g(()=>{p(T)},[T,p]),g(()=>{d(P)},[d,P]);const{setOpenHandler:h}=le(),b=R(()=>l(Ie),[l]);g(()=>{h(b)},[h,b]);const I=Z(z(e),U(e)),u=kt(t),w=Rt(e,r),J=o.device;return{...I,...u,...w,hasOwnRows:_=>_.type===ke,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:_=>a(ie.Provider,{value:!0,children:k(de.Provider,{value:J,children:[_,a(We,{})]})}),addPanelRow:_=>m?k("div",{className:"sf-addside-sitewide",children:[a("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:a(C,{type:"chat",size:16})}),k("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{_(),P()},children:[S("Live chat"),a("span",{className:"sf-addside-sitewide-desc",children:S("A chat bubble on every page")})]}),a(ee,{checked:f.enabled,onChange:Q=>E({enabled:Q}),ariaLabel:S("Show the chat bubble on the whole site")})]}):void 0}}let q=null,A=new WeakMap;function Lt(e){const t=ft();if(!e||!t)return e;q!==t&&(q=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:S(r.label)})):null,spec:e.spec?{...e.spec,addLabel:S(e.spec.addLabel)}:null},A.set(e,o)),o}const At={isLockedBlock:(e,t)=>ot(e,t)||!!(t&&L()?.heldElsewhere(t.props.id)),duplicateBlocked:it,nestDepth:(e,t,o)=>t===Ve?xe(e,o):0,newSectionNode:bt,canAddTo:(e,t,o,r)=>Lt(Ke(e,t,r,o)),blockIsOffered:ze,slotsOf:je},Bt=new Proxy(ut,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?S(o):o}}),yt={labelAtLevel:(e,t,o)=>S(pt(e,t,o)),descriptions:Bt,categoryLabel:e=>{const t=Ye(e);return t===void 0?void 0:S(t)},firstSection:Fe,blockRowName:qe,rowName:Xe,plainText:Ge,Icon:C,Thumbnail:ve,useProducts:vt,presets:It()},Dt={desktop:2e3,tablet:800,mobile:390},X="desktop",Nt={options:ce,initial:X,fluid:X,widths:Dt},Ht={read:$e,write:e=>tt(e),forSelection:(e,t)=>Qe(e,t)},Wt={first:G,last:Je,firstGroup:Tt,lastGroup:j,isSectionGroup:Et,sectionGroupZone:Pt,panelOf:e=>e===G?ge:null,get sharedReach(){return v()?Vt:void 0},get shared(){return L()?at:void 0},get groupTab(){return v()?nt:void 0},get groupBadge(){return v()?Y({type:j})??void 0:void 0},get changeNotice(){return v()?rt():void 0},get band(){return v()?Mt:void 0},get groupAccepts(){return v()?St:void 0}},Mt={foldable:!0},Vt=e=>Y(e)??st(e);function xt(e){return{...Z(z(e),U(e)),openSettings:()=>e.show(V)}}function Gt(e,t){Ce(e,t),Oe()}const $o={useOwnerName:Ne,useDocumentLabel:Me,useBridges:Ot,useStandaloneBridges:xt,useDocumentPass:Gt,blockRules:At,blockLook:yt,devices:Nt,leftView:Ht,pinned:Wt,Canvas:lt,canvasDrag:{media:mt},Inspector:he};export{$o as WEBSITE_SCREEN};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AddTarget } from "efficient-easel/screen/lib/document/add-target-types";
|
|
2
2
|
import type { ScreenNodeAt } from "efficient-easel/screen/lib/screen-parts";
|
|
3
|
-
export declare function canAddTo(nodeType: string, nestDepth?: number, at?: ScreenNodeAt): AddTarget | null;
|
|
3
|
+
export declare function canAddTo(nodeType: string, nestDepth?: number, at?: ScreenNodeAt, slot?: string): AddTarget | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cardTemplateBlocks as i,cardTemplateOwner as f,cardTemplatesNameBlocks as u}from"../../../format/lib/content/card-template.js";import{blockOfferOf as p}from"./block-offer.js";import{containerBlocksFor as h}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as m,FOOTER_BLOCKS_SLOT as a}from"./footer-blocks.js";import{SLOT_SECTION_SPECS as
|
|
1
|
+
import{cardTemplateBlocks as i,cardTemplateOwner as f,cardTemplatesNameBlocks as u}from"../../../format/lib/content/card-template.js";import{blockOfferOf as p}from"./block-offer.js";import{containerBlocksFor as h}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as m,FOOTER_BLOCKS_SLOT as a}from"./footer-blocks.js";import{SLOT_SECTION_EXTRA_SPECS as d,SLOT_SECTION_SPECS as O}from"../../../render/lib/document/slot-specs.js";function w(o,n=0,r,c){const e=S(C(o,n,c),r),t=e?p():null;return e&&t?T(e,t):e}function T(o,n){if(o.spec)return n.offers(o.spec.childType)?o:null;const r=o.choices??[],c=r.filter(e=>n.offers(e.type));return c.length===r.length?o:c.length>0?{...o,choices:c}:null}function S(o,n){if(!o||o.source!=="container"||!n||!u())return o;const r=f({data:n.data},n.id),c=typeof r?.type=="string"?i(r.type):[],e=o.choices??[],t=c.filter(s=>!e.some(l=>l.type===s.type));return t.length?{...o,choices:[...e,...t.map(s=>({type:s.type,label:s.label}))]}:o}function C(o,n,r){const c=r?d[o]?.[r]:void 0;if(c)return{source:"section",slot:c.slot,choices:null,spec:c};const e=O[o];if(e)return{source:"section",slot:e.slot,choices:null,spec:e};const t=h(o,n);if(t)return{source:"container",slot:t.slot,choices:t.choices,spec:null};const s=m(o);return s?{source:"footer",slot:a,choices:s,spec:null}:null}export{w as canAddTo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as m,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as A,REEL_SHAPE_LABELS as R,REEL_SHOWN_DEFAULT as P}from"../../../../../../format/lib/reel.js";import{DEFAULT_TINT as O}from"../../../../../../format/lib/content/tint.js";import{HERO_TEXTURE_SHOWN_DEFAULT as L}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as u,HERO_ARROW_SHAPE_LABELS as H,HERO_ARROW_SHAPES as h,HERO_ARROWS_PLACEMENT_DEFAULT as w,HERO_ARROWS_SHOWN_DEFAULT as I}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as t,OpacityIcon as k,PhoneIcon as s,PlayIcon as D,SlideArrowsBareIcon as f,SlideArrowsRoundIcon as g,SlideArrowsSquareIcon as U,SlidePickerBarIcon as F,SlidePickerCardsIcon as y,SlidePickerDotsIcon as N,SlidePickerNumbersIcon as b,SlidePickerSquaresIcon as W,SquareIcon as E}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as x}from"efficient-shell/icons/efficient-looks";const C=x,B={cards:e(y,{}),dots:e(N,{}),numbers:e(b,{}),bar:e(F,{}),squares:e(W,{})},q={outline:e(g,{}),solid:e(C,{}),square:e(U,{}),bare:e(f,{})};import{colorInput as M,toggle as i}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as j,iconPickerRow as c,placementField as n,segmented as p,slider as _}from"../../../box-fields.js";import{deviceField as l,deviceNote as Y}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as v,HERO_PHONE_SIDEWAYS_LABEL as K,HERO_PHONE_UPDOWN_DEFAULT as X,HERO_PHONE_UPDOWN_LABEL as z,phoneSidewaysPoints as G,phoneUpDownPoints as J}from"../../../../../../format/lib/hero-phone-stack.js";import{heightField as S}from"../../shared-fields.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const pe={fields:{_dDevice:Y(),_gContent:o("Content"),slides:a.slides,strip:a.strip,_gStyle:o("Style"),alignment:j(),_gTexture:o("Texture"),showTexture:i("Show texture",L,e(t,{})),textureColor:M("Texture color",O),textureOpacity:_("Texture opacity",e(k,{}),0,100,1,40,"%"),_gLayout:o("Layout"),heightDesktop:S("desktop"),heightMobile:S("mobile"),_gAutoplay:o("Auto-slide"),autoplay:i("Auto-advance slides",!1,e(D,{})),autoplayInterval:_("Still time per slide",e(T,{}),2,15,1,6,"s"),_gPicker:o("Slide picker"),showPicker:i("Show slide picker",P,e(t,{})),pickerShape:c("Slide picker shape",e(E,{}),A.map(r=>({label:R[r],value:r,picture:B[r]})),d),pickerPlacement:n("Slide picker placement",{fallback:m}),_gArrows:o("Arrows"),showArrows:i("Show arrows",I,e(t,{})),arrowsShape:c("Arrows shape",e(E,{}),h.map(r=>({label:H[r],value:r,picture:q[r]})),u),arrowsPlacement:n("Arrows placement",{fallback:w}),_gPhone:l("mobile",o("On a phone")),phoneUpDown:l("mobile",p(z,e(s,{}),J(),X)),phoneSideways:l("mobile",p(K,e(s,{}),G(),v))}};export{pe as HeroFields};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Carried, type Dropped, type SectionNode } from "../../../render/lib/sections/section-to-box.js";
|
|
2
|
+
export type HeroTickerConversion = {
|
|
3
|
+
node: SectionNode;
|
|
4
|
+
carried: Carried[];
|
|
5
|
+
dropped: Dropped[];
|
|
6
|
+
};
|
|
7
|
+
export declare function heroTickerToStrip(old: SectionNode): HeroTickerConversion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readPartMotions as _}from"../../../render/lib/animation/part-motion.js";import{STRIP_SECTION_TO_BOX as I}from"../../../render/lib/document/blocks/general/section-to-box-rows-strip.js";import{SECTION_ACCENT_INHERIT as g}from"../../../format/lib/content/section-surface.js";import{HERO_STRIP_SLOT as m,legacyTickerWords as l,TICKER_MOTION_PART as i}from"../../../format/lib/hero-ticker.js";import{nonEmptyString as u}from"../../../format/lib/non-empty-string.js";import{convertSection as O}from"../../../render/lib/sections/section-to-box.js";function M(t){const{showTicker:n,tickerItems:d,...k}=t.props,y=u(t.props.id)??"Hero",r=[],o=[],e={...k},s=l({tickerItems:d}),p=n!==!1&&s.length>0,c=_(t.props),h=c[i];if(h){const{[i]:a,...w}=c;Object.keys(w).length?e._partMotion=w:delete e._partMotion,r.push({key:"_partMotion",home:p?`${i} → the strip Box's own Entrance`:`${i} → nothing: no strip is drawn`})}if(!p)return e[m]=[],"showTicker"in t.props&&o.push({key:"showTicker",why:n===!1?"switched off: an empty strip draws nothing, the same as today":"no words: the strip drew nothing published, so the strip stays empty"}),"tickerItems"in t.props&&o.push({key:"tickerItems",why:s.length?"switched off: the words were not drawn, and an empty strip draws nothing":"no row has words: an empty row draws nothing published"}),{node:{type:t.type,props:e},carried:r,dropped:o};const T={type:"Ticker",props:{id:`${y}~strip`,items:s.map(a=>({text:a})),tone:"plain",sectionAccent:g,borders:!1,...h??{}}},f=O(T,I.Ticker);return e[m]=[f.node],"showTicker"in t.props&&o.push({key:"showTicker",why:"on: the strip Box is the switch now (delete or hide it like any block)"}),r.push({key:"tickerItems",home:`the strip Box: one Text block per row with words (${s.length}), in order`}),{node:{type:t.type,props:e},carried:r,dropped:o}}export{M as heroTickerToStrip};
|
|
@@ -84,6 +84,11 @@ export declare function headingCaseList(styles: readonly string[], saved: readon
|
|
|
84
84
|
list: StoredTextStyle[];
|
|
85
85
|
changed: boolean;
|
|
86
86
|
};
|
|
87
|
+
export declare const HERO_MOVES: Readonly<Record<string, (node: SectionNode) => {
|
|
88
|
+
node: SectionNode;
|
|
89
|
+
carried: Carried[];
|
|
90
|
+
dropped: Dropped[];
|
|
91
|
+
}>>;
|
|
87
92
|
export declare function dryRunSections(pages: readonly DryRunPage[], opts?: {
|
|
88
93
|
types?: readonly string[];
|
|
89
94
|
draw?: (node: SectionNode) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{defaultTextStyles as N}from"efficient-easel/text-styles/model";import{headingDefaultPx as A}from"../../../render/components/Heading.js";import{headingLevelOfStyle as M}from"../../../render/components/Text.js";import{migrateLegacyPageData as D}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as v}from"../../../format/lib/document/renamed-props.js";import{listToWrite as E,setStyleValues as L}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as R,bandPresetIndex as z}from"../../../format/lib/theme.js";import{convertSection as C,convertSectionsInPage as j,sectionToBoxRow as S,sectionToBoxTypes as F}from"../../../render/lib/sections/section-to-box.js";const P={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function se(e,t,d=N()){const i=s=>t==="heading"?A(M(s)):P[s];let n;for(const{id:s,kind:r}of d){const o=r===t?i(s):void 0;if(o===void 0)continue;const a=Math.abs(o-e),c=n?Math.abs(n.px-e):1/0;(a<c||a===c&&n&&o>n.px)&&(n={id:s,px:o})}if(!n)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return n.id}function B(e){const[t,d]=e.split("/");return t&&d?{schema:t,site:d}:void 0}function ne(e){const t=i=>typeof i=="string"?i:null,d=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:d,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const I=new Set([null,"authored"]);function W(e,t){const d=E(t),i=d.filter(s=>e.includes(s.id)&&s.values.letterCase===void 0).map(s=>s.id);return{list:i.reduce((s,r)=>L(s,r,{letterCase:"upper"}),d),changed:i.length>0}}function Y(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return J(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!I.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:d,changed:i}=W(e.styles,t.textStyles?t.textStylesList??null:null);return i?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:d}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function J(e,t){const d=t?.themePresets;if(!t||!d)return{undecided:"the site's theme presets were not read"};const i=d[e.page];if(!i)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(z(d,e.page)>=0)return{notNeeded:"the site already has the band preset"};const n=R(i);return{send:{kind:e.kind,page:e.page,index:d.length,preset:n,themePresets:[...d,n]}}}function O(e){const t=e?.content;return Array.isArray(t)?v(D(e)):e}function oe(e,t={}){const d=[...t.types??F()],i=d.filter(p=>!S(p)),n=new Set(d.filter(p=>S(p))),s=[],r=[],o={},a={},c=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),f=new Map,m=(p,w,l)=>{const k=`${p.schema}/${p.site}`;let $=f.get(k);$||f.set(k,$={...p,facts:!!w,writes:[],undecided:[],notNeeded:[]});const h=Y(l,w);if("send"in h){const g=$.writes.find(b=>JSON.stringify(b.write)===JSON.stringify(h.send));g?g.nodes+=1:$.writes.push({write:h.send,reason:l.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[x,y]="undecided"in h?[$.undecided,h.undecided]:[$.notNeeded,h.notNeeded],u=x.find(g=>g.kind===l.kind&&g.why===y);u?u.nodes+=1:x.push({kind:l.kind,why:y,nodes:1})};for(const p of e){const w=O(p.layout)?.content;Array.isArray(w)&&w.forEach((l,k)=>{if(!l||typeof l.type!="string"||!n.has(l.type))return;const $=S(l.type),h=B(p.label),x=h?c.get(`${h.schema}/${h.site}`):void 0,y=C(l,$,x?{site:x}:{});if(y.skipped!==void 0){r.push({page:p.label,index:k,type:l.type,id:String(l.props?.id??""),why:y.skipped});return}if(h)for(const _ of y.siteWrites)m(h,x,_);const u={page:p.label,index:k,type:l.type,id:String(l.props?.id??""),carried:y.carried,dropped:y.dropped,restyled:y.restyled},g=t.draw;g&&(u.before=g(l),u.after=y.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),s.push(u);const b=o[l.type]??={nodes:0,pages:0,dropped:{}};b.nodes+=1,(a[l.type]??=new Set).add(p.label),b.pages=a[l.type].size;for(const _ of y.dropped)b.dropped[_.key]=(b.dropped[_.key]??0)+1})}return{types:d,noRow:i,pages:e.length,nodes:s,skipped:r,byType:o,sites:[...f.values()],siteFacts:[...t.sites??[]]}}function ie(e,t){return e.flatMap(d=>{const i=`${t.schema}/${t.siteName(d.site)}/${d.slug}`;return[{label:`${i} (draft)`,layout:d.layout},{label:`${i} (published)`,layout:d.published_layout}]})}function de(e,t){const d=t.types.filter(i=>S(i));return e.map(i=>{const n={id:i.id,slug:i.slug};if(JSON.stringify(i.layout)!==JSON.stringify(i.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const s=O(i.layout),r=Array.isArray(s?.content)?s.content:[],o=[],a=[];for(const f of r){if(!f||!d.includes(f.type))continue;const m=String(f.props?.id??""),p=S(f.type).skip?.(f.props);p===void 0?o.push({type:f.type,id:m}):a.push({type:f.type,id:m,why:p})}if(!o.length)return{...n,converted:o,skipped:a};const c=j(s,d,t.site?{site:t.site}:{});return{...n,patch:{layout:c,expected_updated_at:i.layout_updated_at},converted:o,skipped:a}})}function re(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(d=>d.write)}))}function U(e){const t=new Map;for(const d of e.nodes)for(const i of d.restyled){const n=i.textStyle??"none",s=P[n],r=i.size??s,o=i.sizePhone??i.size??s;if(r===void 0||o===void 0)continue;const a=i.was.size,c=i.was.sizePhone??i.was.size,f=[d.type,i.key,n,a,c,r,o].join("|"),m=t.get(f);m?m.nodes+=1:t.set(f,{type:d.type,key:i.key,textStyle:n,oldPx:a,oldPhonePx:c,newPx:r,newPhonePx:o,diff:r-a,diffPhone:o-c,nodes:1})}return[...t.values()]}const T=e=>e>0?`+${e}`:String(e),G=e=>N().find(t=>t.id===e)?.name??e,H=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function ae(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[n,s]of Object.entries(e.byType)){const r=Object.keys(s.dropped).length;t.push(`| ${n} | ${s.nodes} | ${s.pages} | ${r} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const n=new Map;for(const s of e.skipped){const r=n.get(s.type)??n.set(s.type,new Map).get(s.type);r.set(s.why,(r.get(s.why)??0)+1)}for(const[s,r]of n){t.push("",`## ${s} — skipped (not converted)`,"");for(const[o,a]of r)t.push(`- ×${a}: ${o}`)}}for(const[n,s]of Object.entries(e.byType)){const r=Object.entries(s.dropped);if(!r.length)continue;t.push("",`## ${n} — dropped`,"");const o=new Map;for(const a of e.nodes)if(a.type===n)for(const c of a.dropped)o.set(c.key,c.why);for(const[a,c]of r)t.push(`- \`${a}\` ×${c}: ${o.get(a)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const n=s=>s==null?"—":String(s);for(const s of e.siteFacts)t.push(`| ${s.schema}/${s.site} | ${n(s.ownThemeRow)} | ${s.deleted?"YES":"no"} | ${n(s.headingCase)} | ${n(s.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const n of e.sites){const s=`${n.schema}/${n.site}`,r=n.facts?"yes":"NO";for(const o of n.writes)t.push(`| ${s} | ${r} | ${H(o.write)} | send | ${o.nodes} | ${o.reason} |`);for(const o of n.undecided)t.push(`| ${s} | ${r} | ${o.kind} | UNDECIDED | ${o.nodes} | ${o.why} |`);for(const o of n.notNeeded)t.push(`| ${s} | ${r} | ${o.kind} | not needed | ${o.nodes} | ${o.why} |`)}}const d=U(e);if(d.length){const n=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],s=o=>`| ${o.type} | \`${o.key}\` | ${o.oldPx} (${o.oldPhonePx}) | ${G(o.textStyle)} | ${o.newPx} (${o.newPhonePx}) | ${T(o.diff)} (${T(o.diffPhone)}) | ${o.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...n,...d.map(s));const r=d.filter(o=>Math.abs(o.diff)>2||Math.abs(o.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),r.length?t.push(...n,...r.map(s)):t.push("None.")}const i=e.nodes.filter(n=>n.sameMarkup!==void 0);if(i.length){const n=i.filter(s=>s.sameMarkup).length;t.push("",`Markup equal before and after: ${n} of ${i.length} (a hint; the pixels decide).`)}return t.join(`
|
|
1
|
+
import{defaultTextStyles as M}from"efficient-easel/text-styles/model";import{headingDefaultPx as L}from"../../../render/components/Heading.js";import{headingLevelOfStyle as z}from"../../../render/components/Text.js";import{migrateLegacyPageData as C}from"../../../render/lib/document/migrate-legacy.js";import{migrateRenamedProps as j}from"../../../format/lib/document/renamed-props.js";import{listToWrite as F,setStyleValues as I}from"../../../render/lib/text-styles/site-text-styles.js";import{bandPresetFor as B,bandPresetIndex as W}from"../../../format/lib/theme.js";import{convertSection as H,convertSectionsInPage as Y,sectionToBoxRow as P,sectionToBoxTypes as J}from"../../../render/lib/sections/section-to-box.js";import{heroSingleToHero as U}from"../../../format/lib/sections/hero-single-to-hero.js";import{heroTickerToStrip as v}from"./hero-ticker-to-strip.js";const E={"body-1":17,"body-2":17,"body-3":17,"body-4":17,"body-5":13,"body-6":17,"body-7":17};function fe(e,t,o=M()){const r=n=>t==="heading"?L(z(n)):E[n];let s;for(const{id:n,kind:d}of o){const i=d===t?r(n):void 0;if(i===void 0)continue;const c=Math.abs(i-e),l=s?Math.abs(s.px-e):1/0;(c<l||c===l&&s&&i>s.px)&&(s={id:n,px:i})}if(!s)throw new Error(`lib/sections/section-dry-run: the text-style list has no ${t} style`);return s.id}function G(e){const[t,o]=e.split("/");return t&&o?{schema:t,site:o}:void 0}function ye(e){const t=r=>typeof r=="string"?r:null,o=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:t(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:o,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{}}}const V=new Set([null,"authored"]);function q(e,t){const o=F(t),r=o.filter(n=>e.includes(n.id)&&n.values.letterCase===void 0).map(n=>n.id);return{list:r.reduce((n,d)=>I(n,d,{letterCase:"upper"}),o),changed:r.length>0}}function X(e,t){if(t?.deleted)return{notNeeded:"the site is soft-deleted: no write"};if(t&&t.ownThemeRow===!1)return{notNeeded:"no own theme row: write refused (the command changes a site's own row, it never creates one)"};if(e.kind==="band-preset")return K(e,t);if(!t||t.textStyles===null)return{undecided:"the site's heading case and text_styles were not read"};if(!V.has(t.headingCase))return{notNeeded:`the site chose a heading case (${t.headingCase})`};if(t.textStyles&&!t.textStylesList)return{undecided:"the site has a saved text_styles list, and the list was not read"};const{list:o,changed:r}=q(e.styles,t.textStyles?t.textStylesList??null:null);return r?{send:{kind:e.kind,styles:[...e.styles],...t.textStyles?{}:{listIfNull:o}}}:{notNeeded:"the saved text_styles list's Heading 1–3 already say their own case"}}function K(e,t){const o=t?.themePresets;if(!t||!o)return{undecided:"the site's theme presets were not read"};const r=o[e.page];if(!r)return{undecided:`the site has no preset ${e.page+1} to take the band from`};if(W(o,e.page)>=0)return{notNeeded:"the site already has the band preset"};const s=B(r);return{send:{kind:e.kind,page:e.page,index:o.length,preset:s,themePresets:[...o,s]}}}const O={Hero:v,HeroSingle:e=>{const t=U(e),o=v(t.node),r=s=>s in e.props;return{node:o.node,carried:[...t.carried,...o.carried.filter(s=>r(s.key))],dropped:[...t.dropped,...o.dropped.filter(s=>r(s.key))]}}};function Q(e,t){if(!t.length||!Array.isArray(e.content))return e;let o=!1;const r=e.content.map(s=>!s||!t.includes(s.type)?s:(o=!0,O[s.type](s).node));return o?{...e,content:r}:e}function D(e){const t=e?.content;return Array.isArray(t)?j(C(e)):e}function he(e,t={}){const o=[...t.types??J()],r=o.filter(p=>!P(p)&&!(p in O)),s=new Set(o.filter(p=>p in O)),n=new Set(o.filter(p=>P(p))),d=[],i=[],c={},l={},w=new Map((t.sites??[]).map(p=>[`${p.schema}/${p.site}`,p])),$=new Map,f=(p,x,a)=>{const k=`${p.schema}/${p.site}`;let b=$.get(k);b||$.set(k,b={...p,facts:!!x,writes:[],undecided:[],notNeeded:[]});const y=X(a,x);if("send"in y){const g=b.writes.find(_=>JSON.stringify(_.write)===JSON.stringify(y.send));g?g.nodes+=1:b.writes.push({write:y.send,reason:a.kind==="band-preset"?"a section that painted the grey band (`--section-bg`)":"a heading that followed the site's heading case",nodes:1});return}const[S,h]="undecided"in y?[b.undecided,y.undecided]:[b.notNeeded,y.notNeeded],u=S.find(g=>g.kind===a.kind&&g.why===h);u?u.nodes+=1:S.push({kind:a.kind,why:h,nodes:1})};for(const p of e){const x=D(p.layout)?.content;Array.isArray(x)&&x.forEach((a,k)=>{if(a&&typeof a.type=="string"&&s.has(a.type)){const m=O[a.type](a),N={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:m.carried,dropped:m.dropped,restyled:[]};t.draw&&(N.before=t.draw(a),N.after=t.draw(m.node),N.sameMarkup=N.before===N.after),d.push(N);const T=c[a.type]??={nodes:0,pages:0,dropped:{}};T.nodes+=1,(l[a.type]??=new Set).add(p.label),T.pages=l[a.type].size;for(const A of m.dropped)T.dropped[A.key]=(T.dropped[A.key]??0)+1;return}if(!a||typeof a.type!="string"||!n.has(a.type))return;const b=P(a.type),y=G(p.label),S=y?w.get(`${y.schema}/${y.site}`):void 0,h=H(a,b,S?{site:S}:{});if(h.skipped!==void 0){i.push({page:p.label,index:k,type:a.type,id:String(a.props?.id??""),why:h.skipped});return}if(y)for(const m of h.siteWrites)f(y,S,m);const u={page:p.label,index:k,type:a.type,id:String(a.props?.id??""),carried:h.carried,dropped:h.dropped,restyled:h.restyled},g=t.draw;g&&(u.before=g(a),u.after=h.nodes.map(g).join(""),u.sameMarkup=u.before===u.after),d.push(u);const _=c[a.type]??={nodes:0,pages:0,dropped:{}};_.nodes+=1,(l[a.type]??=new Set).add(p.label),_.pages=l[a.type].size;for(const m of h.dropped)_.dropped[m.key]=(_.dropped[m.key]??0)+1})}return{types:o,noRow:r,pages:e.length,nodes:d,skipped:i,byType:c,sites:[...$.values()],siteFacts:[...t.sites??[]]}}function ue(e,t){return e.flatMap(o=>{const r=`${t.schema}/${t.siteName(o.site)}/${o.slug}`;return[{label:`${r} (draft)`,layout:o.layout},{label:`${r} (published)`,layout:o.published_layout}]})}function ge(e,t){const o=t.types.filter(s=>P(s)),r=t.types.filter(s=>s in O);return e.map(s=>{const n={id:s.id,slug:s.slug};if(JSON.stringify(s.layout)!==JSON.stringify(s.published_layout))return{...n,converted:[],skipped:[],held:"draft and published differ: a person decides which one moves"};const d=D(s.layout),i=Array.isArray(d?.content)?d.content:[],c=[],l=[];for(const f of i){if(f&&r.includes(f.type)){c.push({type:f.type,id:String(f.props?.id??"")});continue}if(!f||!o.includes(f.type))continue;const p=String(f.props?.id??""),x=P(f.type).skip?.(f.props);x===void 0?c.push({type:f.type,id:p}):l.push({type:f.type,id:p,why:x})}if(!c.length)return{...n,converted:c,skipped:l};const w=Y(d,o,t.site?{site:t.site}:{}),$=Q(w,r);return{...n,patch:{layout:$,expected_updated_at:s.layout_updated_at},converted:c,skipped:l}})}function me(e){return e.sites.filter(t=>t.writes.length).map(t=>({schema:t.schema,site:t.site,writes:t.writes.map(o=>o.write)}))}function Z(e){const t=new Map;for(const o of e.nodes)for(const r of o.restyled){const s=r.textStyle??"none",n=E[s],d=r.size??n,i=r.sizePhone??r.size??n;if(d===void 0||i===void 0)continue;const c=r.was.size,l=r.was.sizePhone??r.was.size,w=[o.type,r.key,s,c,l,d,i].join("|"),$=t.get(w);$?$.nodes+=1:t.set(w,{type:o.type,key:r.key,textStyle:s,oldPx:c,oldPhonePx:l,newPx:d,newPhonePx:i,diff:d-c,diffPhone:i-l,nodes:1})}return[...t.values()]}const R=e=>e>0?`+${e}`:String(e),ee=e=>M().find(t=>t.id===e)?.name??e,te=e=>e.kind==="band-preset"?`theme_presets + preset ${e.index+1} (background ${e.preset.background}: the band of preset ${e.page+1}); presets 1–${e.index} unchanged`:`Capitalization = Uppercase on ${e.styles.join(", ")}${e.listIfNull?` (text_styles is NULL: listIfNull = the easel default list, ${e.listIfNull.length} styles)`:" (on the saved text_styles list)"}`;function $e(e){const t=["# Section conversion — dry run (READ ONLY: nothing was written)","",`Pages read: ${e.pages}. Nodes converted on paper: ${e.nodes.length}.`,"","| Type | Nodes | Pages | Dropped keys |","|---|---|---|---|"];for(const[s,n]of Object.entries(e.byType)){const d=Object.keys(n.dropped).length;t.push(`| ${s} | ${n.nodes} | ${n.pages} | ${d} |`)}if(e.noRow.length&&t.push("",`Asked for, but no row: ${e.noRow.join(", ")}.`),e.skipped.length){t.push("",`Nodes skipped (left as they are): ${e.skipped.length}.`);const s=new Map;for(const n of e.skipped){const d=s.get(n.type)??s.set(n.type,new Map).get(n.type);d.set(n.why,(d.get(n.why)??0)+1)}for(const[n,d]of s){t.push("",`## ${n} — skipped (not converted)`,"");for(const[i,c]of d)t.push(`- ×${c}: ${i}`)}}for(const[s,n]of Object.entries(e.byType)){const d=Object.entries(n.dropped);if(!d.length)continue;t.push("",`## ${s} — dropped`,"");const i=new Map;for(const c of e.nodes)if(c.type===s)for(const l of c.dropped)i.set(l.key,l.why);for(const[c,l]of d)t.push(`- \`${c}\` ×${l}: ${i.get(c)}`)}if(e.siteFacts.length){t.push("","## Site facts (the read-only read handed in)","","| Site | Own theme row | Deleted | Heading case | text_styles saved |","|---|---|---|---|---|");const s=n=>n==null?"—":String(n);for(const n of e.siteFacts)t.push(`| ${n.schema}/${n.site} | ${s(n.ownThemeRow)} | ${n.deleted?"YES":"no"} | ${s(n.headingCase)} | ${s(n.textStyles)} |`)}if(e.sites.length){t.push("","## Site writes (DECLARED ONLY: nothing was written)","","One line per write per site. Only the `send` lines are in `site-writes.json`.","","| Site | Facts read | Write | Status | Nodes | Why |","|---|---|---|---|---|---|");for(const s of e.sites){const n=`${s.schema}/${s.site}`,d=s.facts?"yes":"NO";for(const i of s.writes)t.push(`| ${n} | ${d} | ${te(i.write)} | send | ${i.nodes} | ${i.reason} |`);for(const i of s.undecided)t.push(`| ${n} | ${d} | ${i.kind} | UNDECIDED | ${i.nodes} | ${i.why} |`);for(const i of s.notNeeded)t.push(`| ${n} | ${d} | ${i.kind} | not needed | ${i.nodes} | ${i.why} |`)}}const o=Z(e);if(o.length){const s=["| Type | Text | Old px (phone) | Style | New px (phone) | Difference (phone) | Nodes |","|---|---|---|---|---|---|---|"],n=i=>`| ${i.type} | \`${i.key}\` | ${i.oldPx} (${i.oldPhonePx}) | ${ee(i.textStyle)} | ${i.newPx} (${i.newPhonePx}) | ${R(i.diff)} (${R(i.diffPhone)}) | ${i.nodes} |`;t.push("","## Body copy: each text follows a Body style (sizes at the site defaults)","","New px = what a Text block draws for the style with no size saved (Body 5 13px, other Body styles 17px, the same on a phone); a part with its own stored size draws that size.","",...s,...o.map(n));const d=o.filter(i=>Math.abs(i.diff)>2||Math.abs(i.diffPhone)>2);t.push("","## Body copy: differences over 2px",""),d.length?t.push(...s,...d.map(n)):t.push("None.")}const r=e.nodes.filter(s=>s.sameMarkup!==void 0);if(r.length){const s=r.filter(n=>n.sameMarkup).length;t.push("",`Markup equal before and after: ${s} of ${r.length} (a hint; the pixels decide).`)}return t.join(`
|
|
2
2
|
`)+`
|
|
3
|
-
`}export{
|
|
3
|
+
`}export{E as BODY_STYLE_PX_AT_DEFAULTS,O as HERO_MOVES,Z as bodyStyleRows,$e as dryRunMarkdown,he as dryRunSections,q as headingCaseList,fe as nearestTextStyle,ge as pageEdits,ue as pagesFromCliExport,ye as siteFactsFromRead,G as siteOfLabel,me as siteWritesFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l={left:"justify-start",center:"justify-center",right:"justify-end"},n={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function i(t){return t==="left"||t==="center"||t==="right"?t:void 0}function s(t,a,r){const e=i(r);return!e||e===(i(a)??"left")?"":n[t][e]}export{l as BLOCK_ALIGN_JUSTIFY,s as alignPhoneClass,i as blockAlignOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isStripBox as
|
|
1
|
+
import{isStripBox as s}from"./box-separator.js";const k={sectionPaddingTop:0,sectionPaddingBottom:0},o={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function A(e,t){const w=typeof e=="string"&&e in o?o[e]:"",n=typeof t=="string"&&t in r?r[t]:"";return[w,n].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const N="Block widths",c=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],i="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",p={equal:i,bigLeft:`${i} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${i} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${i} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${i} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${i} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`};function x(e){return typeof e=="string"?p[e]??"":""}const _="[&>*]:view-wide:basis-[content]";function E(e){return x(e)===""?_:""}const P="Columns",R=1,T=3,v={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},X=c.filter(e=>e.value==="content"||e.value==="equal"),H="equal",I=1,$=6,a="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",d={1:`${a} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${a} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function b(e){return typeof e=="number"?d[e]??"":""}const f={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function m(e){return typeof e=="number"?f[e]??"":""}function y(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":m(e.columnsTablet)}function W(e){return e.direction!=="row"||s(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":b(e.columns)}const g="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",h={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},u="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function O(e){return e===!1||e==="nowrap"}function M(e,t,w){const n=v[Number(e)];if(!n)return"max-view-wide:flex-col";const l=O(w);return S(e,t)?l?u:g:l?h[Number(e)]:n}function S(e,t){return Number(e)in v&&t==="content"}const F="Block spacing",U=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],C="sf-box-gap-only";function G(e){return e==="gap"?C:""}export{F as BOX_BLOCK_SPACING_LABEL,U as BOX_BLOCK_SPACING_POINTS,$ as BOX_COLUMNS_MAX,I as BOX_COLUMNS_MIN,C as BOX_GAP_ONLY_CLASS,P as BOX_PHONE_ROW_LABEL,T as BOX_PHONE_ROW_MAX,R as BOX_PHONE_ROW_MIN,N as BOX_SHARE_LABEL,H as BOX_SHARE_PHONE_DEFAULT,X as BOX_SHARE_PHONE_POINTS,c as BOX_SHARE_POINTS,k as NESTED_BOX_PADDING,G as boxBlockSpacingClass,b as boxColumnsClass,E as boxFitContentClass,A as boxLayoutClasses,M as boxPhoneRowClasses,S as boxPhoneRowFits,O as boxPhoneRowOneLine,W as boxRowColumnsClass,y as boxRowTabletColumnsClass,x as boxShareClasses,m as boxTabletColumnsClass,B as boxWrapClass};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseTickerSeparator as r,SEPARATOR_GLYPH as c,separatorScaleClass as f,TICKER_SEPARATOR_OPTIONS as n}from"../sections/ticker-style.js";const d=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function o(h){return n.some(t=>t.value===h)?r(h):void 0}const a="overflow-x-clip [&>*]:shrink-0 [&>*]:max-
|
|
1
|
+
import{parseTickerSeparator as r,SEPARATOR_GLYPH as c,separatorScaleClass as f,TICKER_SEPARATOR_OPTIONS as n}from"../sections/ticker-style.js";const d=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function o(h){return n.some(t=>t.value===h)?r(h):void 0}const a="overflow-x-clip [&>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function i(h,t){return h==="row"&&o(t)!==void 0}function v(h,t){return i(h,t)?a:""}const p="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)]";function u(h,t){return i(h,t)?p:""}function k(h,t){if(!i(h,t))return{};const s=o(t),e=/^text-\[([\d.]+)em\]$/.exec(f("small",s))?.[1],l=c[s];return{"--sf-sep-mark":l===""?"none":JSON.stringify(l),...e?{"--sf-sep-k":e}:{}}}export{d as BOX_SEPARATOR_POINTS,v as boxSeparatorClasses,o as boxSeparatorOf,u as boxSeparatorSeamClass,k as boxSeparatorStyle,i as isStripBox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{galleryCardRatioClass as o}from"./gallery-card-layout.js";const u=["auto","tall","square","landscape","wide"],
|
|
1
|
+
import{galleryCardRatioClass as o}from"./gallery-card-layout.js";const u=["auto","tall","square","landscape","wide"],d=[{label:"Auto",value:"auto"},{label:"Tall (3:4)",value:"tall"},{label:"Square (1:1)",value:"square"},{label:"Landscape (4:3)",value:"landscape"},{label:"Wide (2:1)",value:"wide"}];function t(e){return u.includes(String(e??""))?e:"auto"}function n(e){const a=t(e);return a==="auto"?"":o(a)}const s={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",wide:"view-wide:aspect-[2/1]"},r={auto:"max-view-wide:aspect-auto",tall:"max-view-wide:h-auto max-view-wide:aspect-[3/4]",square:"max-view-wide:h-auto max-view-wide:aspect-square",landscape:"max-view-wide:h-auto max-view-wide:aspect-[4/3]",wide:"max-view-wide:h-auto max-view-wide:aspect-[2/1]"};function w(e,a){return u.includes(String(a??""))?a===t(e)?null:a:null}function p(e,a){const i=w(e,a);if(i===null)return n(e);const l=t(e);return[l==="auto"?"":s[l],r[i]].filter(Boolean).join(" ")}export{u as BOX_SHAPES,d as BOX_SHAPE_OPTIONS,n as boxShapeClass,p as boxShapeClasses,t as boxShapeOf,w as boxShapePhoneOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buttonArrowShown as f}from"./button-arrow.js";import{nonEmptyString as u}from"../non-empty-string.js";const c=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function l(t){return typeof t=="string"&&c.includes(t)?t:void 0}function
|
|
1
|
+
import{buttonArrowShown as f}from"./button-arrow.js";import{nonEmptyString as u}from"../non-empty-string.js";const c=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function l(t){return typeof t=="string"&&c.includes(t)?t:void 0}function w(t,o){return l(t)??(f(o)?"arrow-right":"none")}function d(t){return t==="before"?"before":t==="end"?"end":"after"}function h(t,o){return d(t)==="end"&&n(o)==="fill"}function n(t){return t==="fill"||t==="fixed"?"fill":"fit"}function s(t,o){const r=n(t),e=r==="fill"?["w-full"]:[];if(u(o)){const i=n(o);i!==r&&e.push(i==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return e.join(" ")}export{c as BUTTON_ICONS,h as buttonIconAtEnd,w as buttonIconChoice,d as buttonIconSide,n as buttonWidth,s as buttonWidthClass,l as storedButtonIcon};
|
|
@@ -25,7 +25,7 @@ export declare function siteBlockGapTokens(v?: number | null): Record<string, st
|
|
|
25
25
|
export declare const SITE_BLOCK_GAP_PHONE_VAR = "--sf-block-gap-phone";
|
|
26
26
|
export declare const SITE_BLOCK_GAP_PHONE_REM_VAR = "--sf-block-gap-phone-rem";
|
|
27
27
|
export declare const SITE_BLOCK_GAP_ON_PHONE_VAR = "--sf-block-gap-on-phone";
|
|
28
|
-
export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-
|
|
28
|
+
export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
|
|
29
29
|
export declare function siteBlockGapPhoneTokens(v?: number | null): Record<string, string>;
|
|
30
30
|
export declare function siteBlockGapPhoneClass(v?: number | null): string;
|
|
31
31
|
export declare const GAP_ZONE_CLASS = "sf-gap-zone";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const y="sf.gapContainer",r={min:-32,max:64,step:2},f={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},u={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},g=new Set(["Events","GalleryB"]);function x(t,
|
|
1
|
+
const y="sf.gapContainer",r={min:-32,max:64,step:2},f={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},u={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},g=new Set(["Events","GalleryB"]);function x(n,t,o){if(typeof t=="number"&&Number.isFinite(t)&&t>=r.min)return t;if(typeof t=="string"){const e=f[n]?.[t];if(typeof e=="number")return e}return typeof o=="number"&&Number.isFinite(o)?o:u[n]}const b="sf-gap-overlap",O="--sf-gap-overlap",A="--sf-block-gap",C="--sf-block-gap-rem",l={min:0,max:r.max,step:r.step};function a(n){if(typeof n!="number"||!Number.isFinite(n))return null;const t=Math.min(Math.max(Math.round(n),l.min),l.max);return t-t%l.step}function V(n){const t=a(n);return t===null?{}:{[A]:`${t}px`,[C]:`${t/16}rem`}}const L="--sf-block-gap-phone",R="--sf-block-gap-phone-rem",T="--sf-block-gap-on-phone",S="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function H(n){const t=a(n);return t===null?{}:{[L]:`${t}px`,[R]:`${t/16}rem`}}function d(n){return a(n)===null?"":S}const G="sf-gap-zone",m="--sf-gap-len";function E(n,t){return typeof t=="number"&&Number.isFinite(t)&&t>=r.min?!0:typeof t=="string"&&typeof f[n]?.[t]=="number"}const P="--sf-gap-len-phone",I="--sf-gap-len-tablet",h={min:0,max:r.max,step:r.step};function s(n){return typeof n=="number"&&Number.isFinite(n)&&n>=h.min}function $(n){return n/2}function B(n,t,o){return s(o)&&!E(n,t)}function F(n,t,o,e,p){return s(t)?t:B(n,o,p)?p:$(x(n,o,e))}const k={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function w(n,t,o,e,p){const _={...s(e)?{[P]:`${e}px`}:null,...s(p)?{[I]:`${p}px`}:null};if(!E(n,t)){const c=`${u[n]}px`,N=g.has(n)?`var(--sf-card-gap, ${c})`:c;return{className:` ${G}`,style:{[m]:`var(${A}, ${N})`,[P]:`var(${T})`,..._}}}const i=x(n,t);return i>=0?{className:` ${G}`,style:{[m]:`${i}px`,..._}}:{className:` ${b} ${k[o]}`,style:{gap:"0px",[O]:`${-i/2}px`}}}export{g as CARD_GRID_CONTAINERS,r as CONTAINER_GAP,u as CONTAINER_GAP_BUILT_IN,f as CONTAINER_GAP_LEGACY,h as CONTAINER_GAP_PHONE,y as GAP_FIELD_CONTAINER,m as GAP_LENGTH_VAR,b as GAP_OVERLAP_CLASS,O as GAP_OVERLAP_VAR,P as GAP_PHONE_LENGTH_VAR,I as GAP_TABLET_LENGTH_VAR,G as GAP_ZONE_CLASS,l as SITE_BLOCK_GAP,T as SITE_BLOCK_GAP_ON_PHONE_VAR,S as SITE_BLOCK_GAP_PHONE_CLASS,R as SITE_BLOCK_GAP_PHONE_REM_VAR,L as SITE_BLOCK_GAP_PHONE_VAR,C as SITE_BLOCK_GAP_REM_VAR,A as SITE_BLOCK_GAP_VAR,w as containerGapProps,B as followsSitePhoneGap,$ as halfDesktopGap,E as hasOwnContainerGap,s as hasOwnPhoneGap,a as normalizeSiteBlockGap,x as resolveContainerGap,F as resolvePhoneContainerGap,d as siteBlockGapPhoneClass,H as siteBlockGapPhoneTokens,V as siteBlockGapTokens};
|
|
@@ -26,7 +26,7 @@ export declare const SITE_GUTTER_PHONE: {
|
|
|
26
26
|
readonly step: 4;
|
|
27
27
|
};
|
|
28
28
|
export declare const SITE_GUTTER_PHONE_VAR = "--sf-site-gutter-phone";
|
|
29
|
-
export declare const SITE_GUTTER_PHONE_CLASS = "max-
|
|
29
|
+
export declare const SITE_GUTTER_PHONE_CLASS = "max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!";
|
|
30
30
|
export declare const SITE_GUTTER_CAP: string;
|
|
31
31
|
export declare const SITE_GUTTER_CLASS: string;
|
|
32
32
|
export declare const PRE_SITE_GUTTER_CLASSES: readonly ["px-10", "px-[60px]"];
|
|
@@ -38,8 +38,8 @@ export declare const SITE_GUTTER_NARROW: {
|
|
|
38
38
|
};
|
|
39
39
|
export declare const SITE_GUTTER_SUBSTITUTIONS: ReadonlyArray<readonly [string, string]>;
|
|
40
40
|
export declare function asMainGutters(html: string): string;
|
|
41
|
-
export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-
|
|
42
|
-
export declare const EDITORIAL_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-
|
|
41
|
+
export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
|
|
42
|
+
export declare const EDITORIAL_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";
|
|
43
43
|
export declare function normalizeSiteGutter(v?: number | null): number;
|
|
44
44
|
export declare function siteGutterTokens(v?: number | null): Record<string, string>;
|
|
45
45
|
export declare function normalizeSiteGutterPhone(v?: number | null): number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r={min:1e3,max:2e3,step:50,default:1600};function a(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function M(t,e){if(t!==!1)return null;const i=typeof e=="number"?e:r.default;return a(i)}const m="--sf-site-width",p=`var(${m},${r.default}px)`,R=`max-w-[${p}]`,b=`max-w-[${r.default}px]`;function w(t){return typeof t!="number"||!Number.isFinite(t)?r.default:Math.round(Math.min(Math.max(t,r.min),r.max))}function g(t){const e=w(t);return e===r.default?{}:{[m]:`${e}px`}}const o={min:0,max:80,step:4,default:40},_="--sf-site-gutter",u={min:0,max:24,step:4},C="--sf-site-gutter-phone",S="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",n=`var(${_},${o.default}px)`,A=`px-[${n}]`,D=["px-10","px-[60px]"],x={md:`min(24px,${n})`,sm:`min(20px,${n})`,frame:`min(24px,${n})`,tabs:`min(16px,${n})`},h=[[`max-view-desktop:px-[${x.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${x.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${x.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${x.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${x.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${x.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${x.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${x.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${n}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${n})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${n})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${n})]`,"max-view-tablet:-mx-5"],[`-mx-[${n}]`,"-mx-10"],[A,"px-10"]];function U(t){return h.reduce((e,[i,d])=>e.split(i).join(d),t)}const W="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",L="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function c(t){return typeof t!="number"||!Number.isFinite(t)?o.default:Math.round(Math.min(Math.max(t,o.min),o.max))}function N(t){const e=c(t);return e===o.default?{}:{[_]:`${e}px`}}function f(t){return typeof t!="number"||!Number.isFinite(t)?null:Math.round(Math.min(Math.max(t,u.min),u.max))}function k(t){const e=f(t);return e===null?{}:{[C]:`${e}px`}}function V(t){return f(t)===null?"":S}function y(t){return Math.min(u.max,c(t))}function $(t=0){return`calc(${p}/2 - ${n}*2 - ${t}px)`}function B(t=0){return`max-w-[${$(t).replace(/ /g,"_")}]`}const l=p,F=`max-w-[${l}]`,z=`max-w-[min(var(--sf-page-cap,${r.default}px),${r.default}px)]`,E="--sf-hero-cap",H=`var(${E},none)`,K=`max-w-[${H}]`,I="--sf-hero-bleed-m",v="--sf-hero-bleed-w",O="--sf-hero-chrome-x",P="--sf-hero-chrome-cap";function j(t){return t===!0?{[E]:l,[I]:"auto",[v]:"100%",[O]:"24px",[P]:"none"}:{}}const s=`calc(${p} - ${n}*2)`,q=`max-w-[${s.replace(/ /g,"_")}]`,J=R;function Q(t){return t!==!1?null:a(T)}const G="--sf-chrome-cap",T=`var(${G},${s})`,X="data-page-width";function Y(t){return t==="full"?"full":null}function Z(t){return t==="full"?null:a(t==="content"?s:T)}function tt(t){if(t==="full")return"full";if(t==="content")return"content"}export{T as CHROME_CAP_READ,G as CHROME_CAP_VAR,s as CHROME_WIDTH_CAP,q as CHROME_WIDTH_CAP_CLASS,L as EDITORIAL_COLUMN,H as HERO_BACKGROUND_CAP,K as HERO_BACKGROUND_CAP_CLASS,E as HERO_BACKGROUND_VAR,I as HERO_BLEED_MARGIN_VAR,v as HERO_BLEED_WIDTH_VAR,l as HERO_CAP,F as HERO_CAP_CLASS,P as HERO_CHROME_CAP_VAR,O as HERO_CHROME_INSET_VAR,r as PAGE_WIDTH,X as PAGE_WIDTH_ATTR,J as PRE_CHROME_WIDTH_CAP_CLASS,z as PRE_HERO_CAP_CLASS,D as PRE_SITE_GUTTER_CLASSES,b as PRE_SITE_WIDTH_CAP_CLASS,W as SITE_COLUMN,o as SITE_GUTTER,n as SITE_GUTTER_CAP,A as SITE_GUTTER_CLASS,x as SITE_GUTTER_NARROW,u as SITE_GUTTER_PHONE,S as SITE_GUTTER_PHONE_CLASS,C as SITE_GUTTER_PHONE_VAR,h as SITE_GUTTER_SUBSTITUTIONS,_ as SITE_GUTTER_VAR,p as SITE_WIDTH_CAP,R as SITE_WIDTH_CAP_CLASS,m as SITE_WIDTH_VAR,U as asMainGutters,a as centredCap,Z as chromeWidthStyle,j as heroBackgroundTokens,c as normalizeSiteGutter,f as normalizeSiteGutterPhone,w as normalizeSiteWidth,Y as pageWidthMarker,M as pageWidthStyle,tt as resolveChromeWidth,V as siteGutterPhoneClass,y as siteGutterPhoneFollows,k as siteGutterPhoneTokens,N as siteGutterTokens,$ as siteHalfColumnCap,B as siteHalfColumnCapClass,Q as siteWidthCapStyle,g as siteWidthTokens};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function r(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const
|
|
1
|
+
function r(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[o,n]of Object.entries(e))typeof n=="boolean"&&(t[o]=n);return t}function s(e,t){return r(e)[t]!==!1}function f(e,t,o){const n=r(t)[o];return typeof n=="boolean"?n:s(e,o)}function c(e){return Object.values(r(e)).some(t=>t===!1)}function p(e){return Object.keys(r(e)).length>0}function u(e,t,o){const n={...r(e)};return o?delete n[t]:n[t]=!1,Object.keys(n).length?n:void 0}function a(e,t,o){return{...r(e),[t]:o}}function h(e,t,o){const n=s(e,o),i=f(e,t,o);return n&&i?"":!n&&!i?"hidden":n?"max-view-tablet:hidden":"view-tablet:hidden"}export{c as desktopDisplayChanged,h as partDisplayClass,s as partShownOnDesktop,f as partShownOnPhone,p as phoneDisplayChanged,r as readPartDisplay,u as withDesktopPart,a as withPhonePart};
|
|
@@ -61,5 +61,5 @@ export declare function sectionMinHeightAttrs(props: SectionMinHeightProps & Sec
|
|
|
61
61
|
export declare function sectionFillsHeight(props: Record<string, unknown>): boolean;
|
|
62
62
|
export declare const SECTION_FILL_PASS_CLASS = "grid grid-cols-[minmax(0,1fr)]";
|
|
63
63
|
export declare const SECTION_FILL_CLASS = "h-full";
|
|
64
|
-
export declare const SECTION_FILL_PASS_PHONE_CLASS = "max-
|
|
64
|
+
export declare const SECTION_FILL_PASS_PHONE_CLASS = "max-view-tablet:grid grid-cols-[minmax(0,1fr)]";
|
|
65
65
|
export declare function sectionFillPassClass(props: Record<string, unknown>): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const I=["auto","fixed","screen"],f=["px","%"],M="svh",P="vh",E="var(--sf-header-h, 88px)",S={min:40,max:2e3,step:10,fallback:600},g={min:10,max:200,step:5,fallback:100},x="sf-section-minh",s="grid-cols-[minmax(0,1fr)]",l={base:"--sf-section-minh",small:"--sf-section-minh-s"},h=e=>typeof e=="string"&&I.includes(e),T=e=>typeof e=="string"&&f.includes(e);function H(e){const t=h(e.sectionHeightMode)?e.sectionHeightMode:"auto",n=t==="screen"?"%":T(e.sectionHeightUnit)?e.sectionHeightUnit:"px",o=t==="screen"?g.fallback:S.fallback,i=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:o;return{mode:t,value:i,unit:n}}function a(e){const{mode:t,value:n,unit:o}=H(e);if(t==="auto")return;if(t==="fixed"&&o==="px")return[`${n}px`,null];const i=n/100,c=r=>t==="screen"?`(100${r} - ${E})`:`100${r}`;return[`calc(${c("vh")} * ${i})`,`calc(${c("svh")} * ${i})`]}function _(e){const t=a(e);if(!t)return;const[n,o]=t;return{display:"grid",[l.base]:n,...o?{[l.small]:o}:{}}}const p=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),A="Height",N="sf-section-minh-phone",u={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function d(e){return h(e.sectionHeightModePhone)}function U(e){return H({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function C(e){const t=_(e),n=d(e)?a({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})??(t?["auto",null]:void 0):void 0;if(!t&&!n)return null;const o=[x,s],i={...t??{}};return n&&(o.push(N),i[u.base]=n[0],n[1]&&(i[u.small]=n[1])),{className:o.join(" "),style:i}}function O(e){return C(e)!==null}const m=`grid ${s}`,
|
|
1
|
+
const I=["auto","fixed","screen"],f=["px","%"],M="svh",P="vh",E="var(--sf-header-h, 88px)",S={min:40,max:2e3,step:10,fallback:600},g={min:10,max:200,step:5,fallback:100},x="sf-section-minh",s="grid-cols-[minmax(0,1fr)]",l={base:"--sf-section-minh",small:"--sf-section-minh-s"},h=e=>typeof e=="string"&&I.includes(e),T=e=>typeof e=="string"&&f.includes(e);function H(e){const t=h(e.sectionHeightMode)?e.sectionHeightMode:"auto",n=t==="screen"?"%":T(e.sectionHeightUnit)?e.sectionHeightUnit:"px",o=t==="screen"?g.fallback:S.fallback,i=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:o;return{mode:t,value:i,unit:n}}function a(e){const{mode:t,value:n,unit:o}=H(e);if(t==="auto")return;if(t==="fixed"&&o==="px")return[`${n}px`,null];const i=n/100,c=r=>t==="screen"?`(100${r} - ${E})`:`100${r}`;return[`calc(${c("vh")} * ${i})`,`calc(${c("svh")} * ${i})`]}function _(e){const t=a(e);if(!t)return;const[n,o]=t;return{display:"grid",[l.base]:n,...o?{[l.small]:o}:{}}}const p=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),A="Height",N="sf-section-minh-phone",u={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function d(e){return h(e.sectionHeightModePhone)}function U(e){return H({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function C(e){const t=_(e),n=d(e)?a({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})??(t?["auto",null]:void 0):void 0;if(!t&&!n)return null;const o=[x,s],i={...t??{}};return n&&(o.push(N),i[u.base]=n[0],n[1]&&(i[u.small]=n[1])),{className:o.join(" "),style:i}}function O(e){return C(e)!==null}const m=`grid ${s}`,b="h-full",L=`max-view-tablet:grid ${s}`;function V(e){return O(e)?_(e)?m:L:""}export{E as HEADER_HEIGHT_VAR,b as SECTION_FILL_CLASS,m as SECTION_FILL_PASS_CLASS,L as SECTION_FILL_PASS_PHONE_CLASS,s as SECTION_GRID_COLUMN_CLASS,I as SECTION_HEIGHT_MODES,f as SECTION_HEIGHT_UNITS,S as SECTION_MIN_HEIGHT,x as SECTION_MIN_HEIGHT_CLASS,p as SECTION_MIN_HEIGHT_EXCLUDED,A as SECTION_MIN_HEIGHT_GROUP_LABEL,N as SECTION_MIN_HEIGHT_PHONE_CLASS,u as SECTION_MIN_HEIGHT_PHONE_VARS,l as SECTION_MIN_HEIGHT_VARS,g as SECTION_SCREEN_PCT,M as VIEWPORT_UNIT,P as VIEWPORT_UNIT_FALLBACK,d as hasPhoneHeight,U as resolvePhoneHeight,H as resolveSectionMinHeight,V as sectionFillPassClass,O as sectionFillsHeight,C as sectionMinHeightAttrs,a as sectionMinHeightLengths,_ as sectionMinHeightStyle};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const RESPONSIVE_RULES: "v1" | "v2";
|
|
2
|
+
export declare const VIEW_LINE_PX: {
|
|
3
|
+
readonly "view-tablet": 720;
|
|
4
|
+
readonly "view-desktop": 1100;
|
|
5
|
+
readonly "view-wide": 800 | 720;
|
|
6
|
+
};
|
|
7
|
+
export type ViewLine = keyof typeof VIEW_LINE_PX;
|
|
8
|
+
export declare function breakpointOf(variant: string): {
|
|
9
|
+
px: number;
|
|
10
|
+
max: boolean;
|
|
11
|
+
} | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as i}from"efficient-easel/screen/lib/content/view-tiers";const s="v1",c=e=>e==="v2"?i:800,x={"view-tablet":i,"view-desktop":r,"view-wide":c(s)};function p(e){const n=e.startsWith("max-"),o=n?e.slice(4):e;if(o in x)return{px:x[o],max:n};const t=/^(max|min)-\[(\d+)px\]$/.exec(e);return t?{px:Number(t[2]),max:t[1]==="max"}:void 0}export{s as RESPONSIVE_RULES,x as VIEW_LINE_PX,p as breakpointOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={slides:{type:"slot"},strip:{type:"slot",allow:["Flex"]}},t={label:"Hero Slideshow",fields:e,defaultProps:{alignment:"left",textureOpacity:40,autoplay:!1,autoplayInterval:6}};export{t as HeroMeta,e as HeroSlots};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export declare const DEFAULT_TICKER_ITEMS: string[];
|
|
2
2
|
export declare const TICKER_MOTION_PART = "#ticker";
|
|
3
|
+
export declare const HERO_STRIP_SLOT = "strip";
|
|
4
|
+
type HeroTickerProps = Readonly<Record<string, unknown>>;
|
|
5
|
+
export declare function legacyTickerWords(props: HeroTickerProps): string[];
|
|
6
|
+
export declare function heroStoresLegacyTicker(props: HeroTickerProps): boolean;
|
|
7
|
+
export declare function legacyTickerDrawn(props: HeroTickerProps): boolean;
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n=["","","","","",""],o="#ticker",s="strip";function r(t){return(Array.isArray(t.tickerItems)?t.tickerItems:[]).map(e=>typeof e?.text=="string"?e.text:"").filter(e=>e.trim()!=="")}function c(t){return r(t).length>0}function T(t){return t.showTicker!==!1&&c(t)}export{n as DEFAULT_TICKER_ITEMS,s as HERO_STRIP_SLOT,o as TICKER_MOTION_PART,c as heroStoresLegacyTicker,T as legacyTickerDrawn,r as legacyTickerWords};
|
|
@@ -3,7 +3,7 @@ export type CollectionCardRegionKey = "tag" | "name" | "body" | "price" | "link"
|
|
|
3
3
|
export declare const COLLECTION_CARD_TEXT_SIZE: {
|
|
4
4
|
readonly tag: "text-[length:var(--size-label,13px)]";
|
|
5
5
|
readonly name: "text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]";
|
|
6
|
-
readonly namePhone: "max-
|
|
6
|
+
readonly namePhone: "max-view-wide:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]";
|
|
7
7
|
readonly body: "text-[length:var(--size-body,14px)]";
|
|
8
8
|
readonly price: "text-[length:var(--size-label,15px)]";
|
|
9
9
|
readonly link: "text-[length:var(--size-label,14px)]";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{builtInOf as e}from"./text-regions.js";const l={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-
|
|
1
|
+
import{builtInOf as e}from"./text-regions.js";const l={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-view-wide:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,14px)]",price:"text-[length:var(--size-label,15px)]",link:"text-[length:var(--size-label,14px)]"},t={tag:{label:"Tag",follows:"Labels",builtIn:e(l.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:e(l.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:e(l.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:e(l.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:e(l.link),writable:!0}},i=t;export{t as COLLECTION_CARD_REGIONS,i as COLLECTION_CARD_TEXT_REGIONS,l as COLLECTION_CARD_TEXT_SIZE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_TINT as
|
|
1
|
+
import{DEFAULT_TINT as y}from"../content/tint.js";import{finiteNumber as m}from"../finite-number.js";import{nonEmptyString as s}from"../non-empty-string.js";import{DEFAULT_OVERLAY_POSITION as u}from"./hero-overlay.js";import{normaliseVideoSource as v}from"../hero-video.js";const S=50,c=["mediaImage","mediaVideo","poster","imageFocal","imageFocalPhone","tintColor","mediaLayout","mediaLayoutPhone","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2","videoSource","youtubeUrl","videoPlayback","_partMotion"],f=["heightDesktop","heightMobile","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","entrance","entrancePhone","entranceFrom","entranceFromPhone","entranceDuration","entranceDurationPhone","entranceDelay","entranceDelayPhone","sectionAnimation","_hidden"],g=new Set(f),w="the Hero does not read this key as a section setting (only the section pass rows both heroes share carry), so it is not copied",l={eyebrow:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleTop:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleLevel:"it set the level of the copy the single Hero stopped drawing on 2026-09-09; a Text block in a box sets its own level",alignment:"its row was deleted on 2026-09-09 with the copy it placed; a box places itself on nine anchors, and the value was drawn by nothing"};function x(p){const e=p.props,a=s(e.id)??"HeroSingle",i=[],r=[],t={id:`${a}~slide`},n={id:`${a}~hero`};t.mediaType=e.mediaType==="video"?"video":"image","mediaType"in e&&i.push({key:"mediaType",home:"HeroSlide.mediaType"}),t.mediaType==="video"&&v(e.videoSource)==="upload"&&(t.videoSpeed=S);for(const o of c)o in e&&(t[o]=e[o],i.push({key:o,home:`HeroSlide.${o}`}));"tintOpacity"in e&&(t.overlay=e.tintOpacity,i.push({key:"tintOpacity",home:"HeroSlide.overlay (Image tint)"})),t.overlayColor=s(e.overlayColor)??y,t.overlayPosition=s(e.overlayPosition)??u,"overlayColor"in e&&i.push({key:"overlayColor",home:"HeroSlide.overlayColor"}),"overlayPosition"in e&&i.push({key:"overlayPosition",home:"HeroSlide.overlayPosition"}),Array.isArray(e.boxes)?(t.groups=e.boxes,i.push({key:"boxes",home:"HeroSlide.groups (the same HeroGroup boxes)"})):"boxes"in e&&i.push({key:"boxes",home:"HeroSlide.groups (none stored)"}),n.textureOpacity=m(e.overlay)??100,"overlay"in e&&i.push({key:"overlay",home:"Hero.textureOpacity (the ramp's opacity)"}),n.showTicker=!1;const d=new Set(["id","mediaType","tintOpacity","overlay","overlayColor","overlayPosition","boxes",...c]);for(const[o,h]of Object.entries(e))if(!d.has(o)){if(o in l){r.push({key:o,why:l[o]});continue}if(!g.has(o)){r.push({key:o,why:w});continue}n[o]=h,i.push({key:o,home:`Hero.${o} (section pass)`})}return n.slides=[{type:"HeroSlide",props:t}],{node:{type:"Hero",props:n},carried:i,dropped:r}}export{f as HERO_SECTION_PASS_KEYS,x as heroSingleToHero};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as t}from"../parse-option.js";const l="small",n="dot",s=[{label:"Small",value:"small"},{label:"Display",value:"display"}],o=[{label:"Dot ●",value:"dot"},{label:"Cross ✕",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle ▼",value:"triangle"},{label:"None",value:"none"}],x={dot:"●",cross:"✕",slash:"/",triangle:"▼",none:""},r={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-
|
|
1
|
+
import{parseOption as t}from"../parse-option.js";const l="small",n="dot",s=[{label:"Small",value:"small"},{label:"Display",value:"display"}],o=[{label:"Dot ●",value:"dot"},{label:"Cross ✕",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle ▼",value:"triangle"},{label:"None",value:"none"}],x={dot:"●",cross:"✕",slash:"/",triangle:"▼",none:""},r={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},i={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function c(e){return t(s,l,e)}function m(e){return t(o,n,e)}function u(e){return r[e]}function d(e,a){return i[e][a]}export{n as DEFAULT_TICKER_SEPARATOR,l as DEFAULT_TICKER_SIZE,x as SEPARATOR_GLYPH,o as TICKER_SEPARATOR_OPTIONS,s as TICKER_SIZE_OPTIONS,m as parseTickerSeparator,c as parseTickerSize,d as separatorScaleClass,u as tickerTypeClass};
|