efficient-web-builder 47.1.0 → 48.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 +67 -1
- package/dist/editor/components/BlockGapField.d.ts +15 -1
- package/dist/editor/components/BlockGapField.js +1 -1
- package/dist/editor/components/DuplicateToPageMenu.d.ts +2 -0
- package/dist/editor/components/DuplicateToPageMenu.js +1 -1
- package/dist/editor/components/HeroPartPanel.js +1 -1
- package/dist/editor/components/HoverEffectField.d.ts +1 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +9 -0
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.d.ts +2 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.d.ts +3 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SameInEveryViewNote.d.ts +1 -0
- package/dist/editor/components/SameInEveryViewNote.js +1 -0
- package/dist/editor/components/SaveAsTemplateButton.d.ts +5 -0
- package/dist/editor/components/SaveAsTemplateButton.js +1 -0
- package/dist/editor/components/SideSpaceField.d.ts +31 -1
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/SiteFields.d.ts +4 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/SiteRestoreNotice.js +1 -1
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/TickerSettingsPanel.js +1 -1
- package/dist/editor/components/VersionHistoryDrawer.js +1 -1
- package/dist/editor/components/WebsitePreviewButton.d.ts +2 -1
- package/dist/editor/components/WebsitePreviewButton.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +10 -0
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/usePartMotion.d.ts +10 -0
- package/dist/editor/components/usePartMotion.js +1 -0
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/animation/AnimationDurationRow.d.ts +4 -0
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/fields.d.ts +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +1 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -0
- package/dist/editor/lib/animation/loop-fields.js +1 -1
- package/dist/editor/lib/document/add-target.d.ts +2 -1
- package/dist/editor/lib/document/add-target.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/build-config.js +1 -1
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +33 -0
- package/dist/editor/lib/document/card-display-chips.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +19 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/geocode-resolve.d.ts +1 -0
- package/dist/editor/lib/document/geocode-resolve.js +1 -1
- package/dist/editor/lib/document/live-number-field.d.ts +12 -0
- package/dist/editor/lib/document/live-number-field.js +1 -0
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/document/part-motion-canvas.d.ts +10 -0
- package/dist/editor/lib/document/part-motion-canvas.js +2 -0
- package/dist/editor/lib/editor-document-adapter.d.ts +5 -1
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/editor/lib/sections/section-dry-run.d.ts +34 -0
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/format/lib/animation/hover.d.ts +5 -0
- package/dist/format/lib/animation/hover.js +1 -0
- package/dist/format/lib/animation/index.d.ts +1 -0
- package/dist/format/lib/animation/index.js +1 -1
- package/dist/format/lib/content/block-sources.d.ts +9 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +20 -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/card-template.d.ts +9 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +11 -2
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/count-numbers.d.ts +7 -0
- package/dist/format/lib/content/count-numbers.js +1 -0
- package/dist/format/lib/content/page-width.d.ts +11 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +1 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/content/site-gutter.d.ts +6 -0
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/document/easel-row-words.d.ts +2 -0
- package/dist/format/lib/document/easel-row-words.js +1 -1
- package/dist/format/lib/document/panel-bands.d.ts +1 -0
- package/dist/format/lib/document/panel-bands.js +1 -1
- package/dist/format/lib/document/panel-tabs.d.ts +8 -0
- package/dist/format/lib/document/panel-tabs.js +1 -0
- package/dist/format/lib/document/part-records.d.ts +6 -0
- package/dist/format/lib/document/part-records.js +1 -0
- package/dist/format/lib/document/passes/registry-context.d.ts +1 -1
- package/dist/format/lib/document/passes/registry-context.js +1 -1
- package/dist/format/lib/document/passes/settings-groups.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +2 -0
- package/dist/format/lib/document/section-groups.d.ts +1 -1
- package/dist/format/lib/document/site-gap-fields.d.ts +1 -1
- package/dist/format/lib/document/site-gap-fields.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/fit-words.js +4 -3
- package/dist/format/lib/hero-ticker.d.ts +1 -0
- package/dist/format/lib/hero-ticker.js +1 -1
- package/dist/format/lib/sections/strip-shape.d.ts +1 -0
- package/dist/format/lib/sections/strip-shape.js +1 -1
- package/dist/format/lib/site-theme-row.d.ts +2 -0
- package/dist/format/lib/site-twin-row.d.ts +5 -0
- package/dist/format/lib/site-twin-row.js +1 -0
- package/dist/format/lib/source-rules/flat-theme-palette.js +1 -1
- package/dist/format/lib/source-rules/one-loop-module.js +3 -3
- package/dist/render/components/BlockFrame.d.ts +2 -1
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/CountRowsContext.d.ts +8 -0
- package/dist/render/components/CountRowsContext.js +1 -0
- package/dist/render/components/Flex.d.ts +5 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.d.ts +2 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +2 -1
- package/dist/render/components/HeroGroup.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.d.ts +2 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +4 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +1 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/PartStyledKind.js +1 -1
- package/dist/render/components/PartStyledText.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +9 -1
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.d.ts +4 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +8 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +7 -1
- package/dist/render/components/SiteGutterFrame.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/animation/part-motion.d.ts +21 -0
- package/dist/render/lib/animation/part-motion.js +1 -0
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/button-look.js +1 -1
- package/dist/render/lib/content/section-edge.d.ts +10 -0
- package/dist/render/lib/content/section-edge.js +1 -0
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +8 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
- package/dist/render/lib/document/part-styles.d.ts +10 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +5 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.d.ts +16 -4
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
- package/dist/editor/lib/document/selected-host.d.ts +0 -2
- package/dist/editor/lib/document/selected-host.js +0 -1
|
@@ -47,7 +47,9 @@ export interface SiteThemeRow {
|
|
|
47
47
|
heading_max_px?: number | null;
|
|
48
48
|
site_width?: number | null;
|
|
49
49
|
site_gutter?: number | null;
|
|
50
|
+
site_gutter_phone?: number | null;
|
|
50
51
|
block_gap?: number | null;
|
|
52
|
+
block_gap_phone?: number | null;
|
|
51
53
|
hero_background_follows_width?: boolean | null;
|
|
52
54
|
section_background_width?: "full" | "content" | null;
|
|
53
55
|
section_content_width?: "full" | "content" | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t,n){return t==="tablet"?null:t==="mobile"?n.phone:n.desktop}export{e as siteTwinRow};
|
|
@@ -5,4 +5,4 @@ const b = contextLighting;
|
|
|
5
5
|
.y { color: var(--theme-accent-light); }
|
|
6
6
|
`}],c=A(e,E("textLight"));t("the name reader flags `textLight`, and not `contextLighting`",c.length===1&&c[0].startsWith("fixture.ts:1"),JSON.stringify(c));const s=A(e,$("--theme-accent-light"));t("the token reader flags `--theme-accent-light`, and not `--theme-accent-light-2`",s.length===1&&s[0].startsWith("fixture.css:2"),JSON.stringify(s))}const l=a.filter(e=>k.test(e.path)&&!x(e.path));t(`read the shipped source (${l.length} files, at least ${n.minFiles})`,l.length>=n.minFiles,"every check below asserts an absence, and a read of nothing satisfies an absence");const d=(e,c,s)=>{const r=A(l,c);t(`${e} is gone`,r.length===0,`\`${e}\` still lives in ${r.length} place(s) — ${s} (66238):
|
|
7
7
|
${r.join(`
|
|
8
|
-
`)}`)};for(const e of L)d(e,E(e),"a theme is ONE flat palette");for(const e of[..._,...R,...b])d(e,E(e),"a theme is ONE flat palette");for(const e of N)d(e,$(e),"the keys and the tokens are ONE mechanism");if(n.theme){const e=n.theme;e.DEFAULT_THEMES.forEach((s,r)=>{const g=s,o=I.filter(h=>typeof g[h]!="string");t(`preset ${r} still states all six base colours`,o.length===0,`lost ${o.join(", ")} — 66238 removes a duplicated HALF, never a colour`);const i=v.filter(h=>h in g);t(`preset ${r} carries no key 66238 deleted`,i.length===0,`still carries ${i.join(", ")}`)}),t(`read the presets (${e.DEFAULT_THEMES.length})`,e.DEFAULT_THEMES.length>0);const c={selected:0,themes:[e.DEFAULT_THEMES[0]]};for(const[s,r]of[["themeAccentStyle",e.themeAccentStyle(c)],["themeColorStyle",e.themeColorStyle(c)]])t(`${s} does not set --accent or --accent-2 directly`,!("--accent"in r)&&!("--accent-2"in r));t("the grading bands sit exactly on the WCAG thresholds",e.gradeContrast(e.READABILITY_AA)==="good"&&e.gradeContrast(e.READABILITY_AA+.5)==="good"&&e.gradeContrast(e.READABILITY_AA-.01)==="large-only"&&e.gradeContrast(e.READABILITY_AA_LARGE)==="large-only"&&e.gradeContrast(e.READABILITY_AA_LARGE-.01)==="hard"&&e.gradeContrast(1)==="hard"),t("the contrast ratio is the real WCAG figure, and symmetric",e.contrastRatio("#000000","#ffffff")===21&&e.contrastRatio("#ffffff","#000000")===21&&e.contrastRatio("not a colour","#ffffff")===null);{const s="#c9a461",r=e.normalizeThemeColors({text:"#0a0a0a",accent:s,background:"#f5f1e8"}).background,g=e.darkerAccents(s),o=[];g.length!==e.ACCENT_DARKEN_STEPS.length&&o.push(`${g.length} suggestions for ${e.ACCENT_DARKEN_STEPS.length} steps`);let i=e.contrastRatio(s,r)??0;for(const h of g){/^#[0-9a-f]{6}$/.test(h)||o.push(`${h} is not a plain hex`);const u=e.contrastRatio(h,r)??0;u>i||o.push(`${h} (${u}) does not beat the previous ${i}`),i=u}e.gradeContrast(i)!=="good"&&o.push(`the deepest reads ${e.gradeContrast(i)}, not good`),t("the darker suggestions are the same hue, and actually read better",o.length===0,o.join("; "))}t("a non-hex suggestion list is empty rather than three swatches of black",e.darkerAccents("var(--brand)").length===0)}if(n.liveAccentCarrier){const e=a.find(c=>c.path===n.liveAccentCarrier);t(`read the live site's accent carrier, ${n.liveAccentCarrier}`,!!e),t("the live site's accent carrier wears sf-theme-accent",!!e&&/className="contents sf-theme-accent
|
|
8
|
+
`)}`)};for(const e of L)d(e,E(e),"a theme is ONE flat palette");for(const e of[..._,...R,...b])d(e,E(e),"a theme is ONE flat palette");for(const e of N)d(e,$(e),"the keys and the tokens are ONE mechanism");if(n.theme){const e=n.theme;e.DEFAULT_THEMES.forEach((s,r)=>{const g=s,o=I.filter(h=>typeof g[h]!="string");t(`preset ${r} still states all six base colours`,o.length===0,`lost ${o.join(", ")} — 66238 removes a duplicated HALF, never a colour`);const i=v.filter(h=>h in g);t(`preset ${r} carries no key 66238 deleted`,i.length===0,`still carries ${i.join(", ")}`)}),t(`read the presets (${e.DEFAULT_THEMES.length})`,e.DEFAULT_THEMES.length>0);const c={selected:0,themes:[e.DEFAULT_THEMES[0]]};for(const[s,r]of[["themeAccentStyle",e.themeAccentStyle(c)],["themeColorStyle",e.themeColorStyle(c)]])t(`${s} does not set --accent or --accent-2 directly`,!("--accent"in r)&&!("--accent-2"in r));t("the grading bands sit exactly on the WCAG thresholds",e.gradeContrast(e.READABILITY_AA)==="good"&&e.gradeContrast(e.READABILITY_AA+.5)==="good"&&e.gradeContrast(e.READABILITY_AA-.01)==="large-only"&&e.gradeContrast(e.READABILITY_AA_LARGE)==="large-only"&&e.gradeContrast(e.READABILITY_AA_LARGE-.01)==="hard"&&e.gradeContrast(1)==="hard"),t("the contrast ratio is the real WCAG figure, and symmetric",e.contrastRatio("#000000","#ffffff")===21&&e.contrastRatio("#ffffff","#000000")===21&&e.contrastRatio("not a colour","#ffffff")===null);{const s="#c9a461",r=e.normalizeThemeColors({text:"#0a0a0a",accent:s,background:"#f5f1e8"}).background,g=e.darkerAccents(s),o=[];g.length!==e.ACCENT_DARKEN_STEPS.length&&o.push(`${g.length} suggestions for ${e.ACCENT_DARKEN_STEPS.length} steps`);let i=e.contrastRatio(s,r)??0;for(const h of g){/^#[0-9a-f]{6}$/.test(h)||o.push(`${h} is not a plain hex`);const u=e.contrastRatio(h,r)??0;u>i||o.push(`${h} (${u}) does not beat the previous ${i}`),i=u}e.gradeContrast(i)!=="good"&&o.push(`the deepest reads ${e.gradeContrast(i)}, not good`),t("the darker suggestions are the same hue, and actually read better",o.length===0,o.join("; "))}t("a non-hex suggestion list is empty rather than three swatches of black",e.darkerAccents("var(--brand)").length===0)}if(n.liveAccentCarrier){const e=a.find(c=>c.path===n.liveAccentCarrier);t(`read the live site's accent carrier, ${n.liveAccentCarrier}`,!!e),t("the live site's accent carrier wears sf-theme-accent",!!e&&/className=(?:"|\{`)contents sf-theme-accent/.test(e.text))}const m=T(a),p=C(a);if(n.holdsRegistry===!1)return t(`this repository holds no block registry, as it says (${m.length} registry files handed in)`,m.length===0),f();t(`read this repository's share of the block registry (${m.length} files)`,m.length>0);const y=[...p.matchAll(/className=(?:"|\{`)[^"`]*sf-theme-accent/g)].length;return t(`the registry's editor accent carriers wear sf-theme-accent (found ${y}, expected exactly ${n.editorAccentCarriers})`,y===n.editorAccentCarriers),t("the editor preview emits --theme-accent via themeAccentStyle, not a hand-rolled --accent",!/\["--accent"\]:/.test(p)),f()}export{F as flatThemePalette};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{ruleChecks as k}from"./rule.js";import{stripComments as f}from"./support/ts-source.js";const b=/\.(ts|tsx|js|jsx|mjs|cjs)$/,u=new RegExp(`\\b${["storefront","ticker"].join("-")}(?:-(?:right|up|down))?\\b`,"g"),
|
|
2
|
-
${
|
|
1
|
+
import{ruleChecks as k}from"./rule.js";import{stripComments as f}from"./support/ts-source.js";const b=/\.(ts|tsx|js|jsx|mjs|cjs)$/,u=new RegExp(`\\b${["storefront","ticker"].join("-")}(?:-(?:right|up|down))?\\b`,"g"),D=new RegExp("(?<![A-Za-z])infinite(?![A-Za-z])","g"),g=/\bmotionSeconds\(\s*["'`]loop["'`]|\bMOTION_TIMING(?:\.loop\b|\[\s*["'`]loop["'`]\s*\])/g,j=new RegExp(`\\b(?:${["ticker","scroll"].join("-")}|${["ticker","Animation"].join("")}|${["parse","Ticker","Scroll"].join("")}|${["TICKER","SCROLL","OPTIONS"].join("_")})\\b`,"g"),x=/\bparseOption\(\s*LOOP_\w*OPTIONS\b/g,y=/\b(?:loopFields|loopDirectionField|animationDurationField|loopDurationField|loopDelayField)\b/g;function r(a){const e=f(a),t=[];for(const n of e.matchAll(u))t.push(`loop keyframe (${n[0]})`);for(const n of e.matchAll(D))t.push(`endless animation (${n[0]})`);for(const n of e.matchAll(g))t.push(`loop time (${n[0]})`);for(const n of e.matchAll(j))t.push(`the old loop module (${n[0]})`);for(const n of e.matchAll(x))t.push(`loop reader (${n[0]})`);for(const n of e.matchAll(y))t.push(`loop row (${n[0]})`);return t}function E(a,e){const{check:t,report:n}=k("one loop module"),m=e.allowed??{};{const o=["storefront","ticker"].join("-"),s="infinite",O=[["a copied keyframe map",`const K = { left: "${o}" };`],["a direction keyframe",`const k = "${o}-down";`],["a hand-made marquee",`style={{ animation: \`spin 30s linear ${s}\` }}`],["a Tailwind marquee",`className="[animation:mq_40s_linear_${s}]"`],["the loop's time",'const sec = motionSeconds("loop", "duration", v);'],["the loop's time, by key","const r = MOTION_TIMING.loop.duration;"],["the old module's path",`import { x } from "@/lib/sections/${["ticker","scroll"].join("-")}";`],["the old writer",`${["ticker","Animation"].join("")}(dir, 50)`],["a loop reader",'parseOption(LOOP_DIRECTION_OPTIONS, "left", v)'],["a loop row","const f = { dir: loopDirectionField() };"],["the Duration row","const f = animationDurationField();"],["a loop's Duration row","const f = loopDurationField();"],["a loop's Delay row","const f = loopDelayField();"]];for(const[c,l]of O)t(`the reader finds ${c}`,r(l).length===1,r(l).join(", ")||"none");const w=[["a note that names it",`// runs ${o} for ever (${s})`],["the module's own writer, called","style={{ animation: loopAnimation(dir, step) }}"],["the entrance time",'motionSeconds("entrance", "duration", v)'],["a word that starts like one","const infinitely = true;"],["the one builder, called",'const f = animationTabFields("box");']];for(const[c,l]of w)t(`…and leaves ${c} alone`,r(l).length===0,r(l).join(", "))}const i=a.filter(o=>b.test(o.path));t(`read the source (${i.length} JS/TS files, at least ${e.minFiles})`,i.length>=e.minFiles,"fewer means the walk broke, and every check below is vacuous");const d=i.filter(o=>o.path.startsWith(e.moduleDir));t(`the module is there (${e.moduleDir}, ${d.length} files)`,d.some(o=>new RegExp(u.source).test(f(o.text))),"the keyframes are written in the module; none found means the folder moved");const p=i.filter(o=>!o.path.startsWith(e.moduleDir)&&!(o.path in m)).flatMap(o=>r(o.text).map(s=>`${o.path}: ${s}`));t("no file outside the module reads or writes a loop",p.length===0,`
|
|
2
|
+
${p.join(`
|
|
3
3
|
`)}
|
|
4
4
|
A loop is ${e.moduleDir}: loopAnimation for the keyframe, loopSecondsOf and
|
|
5
5
|
parseLoopDirection for the stored values, LoopTrack for a Box's row,
|
|
6
|
-
animationTabFields for the rows on the Animation tab.`);const $=new Set(i.map(o=>o.path)),
|
|
6
|
+
animationTabFields for the rows on the Animation tab.`);const $=new Set(i.map(o=>o.path)),h=Object.keys(m).filter(o=>!$.has(o));return t("every exemption names a file that is still here",h.length===0,`drop these from \`allowed\`: ${h.join(", ")}`),n()}export{E as oneLoopModule};
|
|
@@ -8,6 +8,7 @@ interface BlockFrameProps {
|
|
|
8
8
|
values: PadValues;
|
|
9
9
|
frame: number;
|
|
10
10
|
};
|
|
11
|
+
fillWidth?: string;
|
|
11
12
|
children: ReactNode;
|
|
12
13
|
}
|
|
13
14
|
export declare const FRAME_BASE = "mx-auto w-full max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)]";
|
|
@@ -16,5 +17,5 @@ export declare const FRAME = "mx-auto w-full max-w-[var(--sf-site-width,1600px)]
|
|
|
16
17
|
export declare const PRE_FRAME_BASE = "mx-auto w-full max-w-[1280px] px-[60px]";
|
|
17
18
|
export declare const PRE_FRAME_GUTTER = "max-[960px]:px-6";
|
|
18
19
|
export declare const PRE_FRAME = "mx-auto w-full max-w-[1280px] px-[60px] max-[960px]:px-6";
|
|
19
|
-
export default function BlockFrame({ contained, className, style, pad, children }: BlockFrameProps): import("react").JSX.Element;
|
|
20
|
+
export default function BlockFrame({ contained, className, style, pad, fillWidth, children }: BlockFrameProps): import("react").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import l from"./SiteGutterFrame.js";const m="mx-auto w-full max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)]",n="max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",x=`${m} ${n}`,E="mx-auto w-full max-w-[1280px] px-[60px]",f="max-[960px]:px-6",c=`${E} ${f}`;function i({contained:o,className:t="",style:r,pad:p,fillWidth:e="w-full",children:s}){return a(l,{contained:o,framedClass:`${x} ${t}`,fillClass:`${e} ${t}`,columnClass:x,style:r,pad:p,children:s})}export{x as FRAME,m as FRAME_BASE,n as FRAME_GUTTER,c as PRE_FRAME,E as PRE_FRAME_BASE,f as PRE_FRAME_GUTTER,i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as i,jsxs as l}from"react/jsx-runtime";import{SiteLink as x}from"../lib/site-runtime.js";import{BUTTON_PAD_CLASSES as y}from"../lib/content/button-look.js";const c=`sf-button group inline-flex items-center justify-center gap-2.5 border ${y} font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors`,
|
|
1
|
+
import{jsx as r,Fragment as i,jsxs as l}from"react/jsx-runtime";import{SiteLink as x}from"../lib/site-runtime.js";import{BUTTON_PAD_CLASSES as y}from"../lib/content/button-look.js";const c=`sf-button group inline-flex items-center justify-center gap-2.5 border ${y} font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors`,p={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function j(b){const{variant:m="primary",arrow:e,glyphBefore:h,spread:f,className:u,style:n,children:t,href:a,newTab:d,...g}=b,s=`${f?c.replace("justify-center","justify-between").replace("gap-2.5","gap-6"):c} ${p[m]??p.primary} ${u??""}`,o=h?l(i,{children:[e!==null&&r("span",{"aria-hidden":!0,className:"inline-flex",children:e??"→"}),t]}):l(i,{children:[t,e!==null&&r("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:e??"→"})]});return a?r(x,{href:a,className:s,style:n,...d?{target:"_blank",rel:"noopener noreferrer"}:{},children:o}):r("button",{type:"button",className:s,style:n,...g,children:o})}export{j as default};
|
|
@@ -5,6 +5,7 @@ export type CardRow = {
|
|
|
5
5
|
row: SourceRow;
|
|
6
6
|
index: number;
|
|
7
7
|
ownerType?: string;
|
|
8
|
+
item?: unknown;
|
|
8
9
|
};
|
|
9
10
|
export declare const CardRowContext: import("react").Context<CardRow | null>;
|
|
10
11
|
export declare function useCardRow(): CardRow | null;
|
|
@@ -18,8 +19,9 @@ type CardTemplateRowsProps = {
|
|
|
18
19
|
ownerType: string;
|
|
19
20
|
Template: SlotComponent | undefined;
|
|
20
21
|
rows: readonly SourceRow[];
|
|
22
|
+
items?: readonly unknown[];
|
|
21
23
|
fallback: ReactNode;
|
|
22
24
|
children: (cards: ReactNode) => ReactNode;
|
|
23
25
|
};
|
|
24
|
-
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, fallback, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
26
|
+
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, items, fallback, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
25
27
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{createContext as
|
|
1
|
+
"use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{createContext as p,useContext as s}from"react";import{REPEAT_ATTRIBUTE as C,REPEAT_INDEX_ATTRIBUTE as E}from"efficient-easel/draw";import{CARD_TEMPLATE_SLOT as R,rowFilledProps as f}from"../../format/lib/content/card-template.js";const a=p(null);function h(){return s(a)}function P({type:e,props:c,children:o}){const t=s(a);return r(i,{children:o(f(e,c,t?.row),t)})}function v({ownerId:e,ownerType:c,Template:o,rows:t,items:u,fallback:l,children:m}){if(!o||(o.blockCount??0)<=0)return r(i,{children:l});const d=t.map((T,n)=>r(a.Provider,{value:{row:T,index:n,ownerType:c,item:u?.[n]},children:r("div",{[C]:`${e}:${R}`,[E]:n,children:r(o,{})})},n));return r(i,{children:m(d)})}export{a as CardRowContext,P as CardRowDrawn,v as CardTemplateRows,h as useCardRow};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { SourceRow } from "../../format/lib/content/block-sources.js";
|
|
3
|
+
export declare const NO_COUNTS: readonly SourceRow[];
|
|
4
|
+
export declare const CountRowsContext: import("react").Context<readonly Readonly<Record<string, string>>[] | null>;
|
|
5
|
+
export declare function CountDrawn({ countKey, children }: {
|
|
6
|
+
countKey: string;
|
|
7
|
+
children: (number: string | null) => ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Fragment as r,jsx as e}from"react/jsx-runtime";import{createContext as n,useContext as m}from"react";import{countNumber as s}from"../../format/lib/content/count-numbers.js";const u=[],x=n(u);function p({countKey:t,children:o}){return e(r,{children:o(s(t,m(x)))})}export{p as CountDrawn,x as CountRowsContext,u as NO_COUNTS};
|
|
@@ -14,12 +14,16 @@ interface FlexProps {
|
|
|
14
14
|
tabShape?: unknown;
|
|
15
15
|
gap?: number | string;
|
|
16
16
|
gapPhone?: unknown;
|
|
17
|
+
gapTablet?: unknown;
|
|
17
18
|
justify: Justify;
|
|
18
19
|
align: AlignItems;
|
|
19
20
|
wrap: boolean;
|
|
20
21
|
share?: string;
|
|
21
22
|
sharePhone?: string;
|
|
23
|
+
wrapPhone?: unknown;
|
|
22
24
|
phoneRow?: number | string;
|
|
25
|
+
columns?: number | string;
|
|
26
|
+
columnsTablet?: number | string;
|
|
23
27
|
separator?: string;
|
|
24
28
|
blockSpacing?: string;
|
|
25
29
|
contained?: boolean;
|
|
@@ -46,5 +50,5 @@ interface FlexProps {
|
|
|
46
50
|
anchor?: unknown;
|
|
47
51
|
content: SlotComponent;
|
|
48
52
|
}
|
|
49
|
-
export default function Flex({ direction, label, tabShape, gap, gapPhone, justify, align, wrap, share, sharePhone, phoneRow, separator, blockSpacing, bgImage, bgImagePhone, darken, darkenStyle, placement, padV2, border, borderPhone, pad, contained, fillHeight, shadow, loop, scrollDirection, loopSeconds, loopDelay, editing, fillColor, line, upcoming, link, boxShape, boxShapePhone, jumpHighlight, anchor, content: Content, }: FlexProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
53
|
+
export default function Flex({ direction, label, tabShape, gap, gapPhone, gapTablet, justify, align, wrap, share, sharePhone, wrapPhone, phoneRow, columns, columnsTablet, separator, blockSpacing, bgImage, bgImagePhone, darken, darkenStyle, placement, padV2, border, borderPhone, pad, contained, fillHeight, shadow, loop, scrollDirection, loopSeconds, loopDelay, editing, fillColor, line, upcoming, link, boxShape, boxShapePhone, jumpHighlight, anchor, content: Content, }: FlexProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
50
54
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as W,jsx as e,jsxs as xo}from"react/jsx-runtime";import{useId as ms}from"react";import{parseHexColor as cs}from"efficient-shell/format";import is from"./BoxTabs.js";import{BoxTabPaneContext as us,useIsTabPane as fs}from"./BoxTabPaneContext.js";import{CellFillContext as ds,InBoxContext as bs,useCellOfStretchedRow as ps,useFillsCell as xs}from"./InBoxContext.js";import Cs,{InsideSiteColumn as Co}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Ss}from"./BoxSurfaceContext.js";import{BoxCellWidthContext as hs}from"./BoxCellWidthContext.js";import{useInSiteHeader as $s}from"./PhoneMenuTools.js";import{FRAME_BASE as So,FRAME_GUTTER as ho}from"./BlockFrame.js";import{containerGapProps as _s}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as Ps,boxBlockSpacingClass as Ls,boxFitContentClass as ys,boxRowColumnsClass as As,boxRowTabletColumnsClass as Bs,boxPhoneRowClasses as C,boxPhoneRowFits as Ts,boxShareClasses as X,boxWrapClass as gs}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Os,boxSeparatorSeamClass as Es,boxSeparatorStyle as Rs,isStripBox as ws}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Ns,DEFAULT_LOOP_DIRECTION as vs,DEFAULT_LOOP_SECONDS as Fs,isVerticalLoop as ks}from"../../format/lib/animation/index.js";import{LoopTrack as Ds}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as r,BOX_OWNS_SIDES_CLASS as Is,boxDarkenStyle as Us,boxPlacementClasses as Ws,CARD_SHADOW_CLASS as Xs,isBackgroundBox as $o}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as js}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Hs}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Ms,boxShapeClasses as zs}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as Gs,BOX_LINK_ATTR as _o,BOX_LINK_CLASS as Po,BOX_LINKED_CLASS as Js,boxJumpBlocksClass as Ks,boxJumpCss as Ys,boxJumpSlug as Vs,boxLinkOf as qs}from"../../format/lib/content/box-link.js";import{SiteLink as Qs}from"../lib/site-runtime.js";import{sectionBorderStyle as Zs}from"../../format/lib/content/borders.js";import{finiteNumber as a}from"../../format/lib/finite-number.js";import{sectionPadAttrs as oe}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as j}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as se}from"../../format/lib/content/ink.js";import{sizedBackground as H}from"../../format/lib/sized-image.js";import{BoxRail as ee,BoxRailStop as te,RAIL_STOPS_CLASS as ne,useTimelineRail as le}from"./TimelineRail.js";const M={"--sf-site-gutter":"0px"},re="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-[720px]:bg-[image:var(--sf-box-bg-p)]";function ae({children:s}){return e(W,{children:s(ms())})}function me({direction:s,label:Lo,tabShape:yo,gap:Ao,gapPhone:Bo,gapTablet:To,justify:B,align:f,wrap:go,share:S,sharePhone:T,wrapPhone:Oo,phoneRow:h,columns:z,columnsTablet:Eo,separator:c,blockSpacing:Ro,bgImage:$,bgImagePhone:G,darken:wo,darkenStyle:No,placement:vo,padV2:Fo=!1,border:ko,borderPhone:Do,pad:n={},contained:Io=!0,fillHeight:d=!1,shadow:Uo,loop:_,scrollDirection:g=vs,loopSeconds:Wo=Fs,loopDelay:Xo=Ns,editing:J=!1,fillColor:K,line:O,upcoming:jo,link:Ho,boxShape:Y,boxShapePhone:Mo,jumpHighlight:zo,anchor:Go,content:E}){const b=J?"":qs(Ho),i=d?"":zs(Y,Mo),Jo=!d&&Ms(Y)!=="",u=Vs(zo,Go),V=typeof K=="string"?cs(K.trim()):null,q=V?{backgroundColor:V}:void 0,Q=le(),R=O===!0&&s!=="tabs",t=$o($),w=$s(),Z=fs(),N=xs(),Ko=ps(),P=ws(s,c),m=_==="scroll"&&s!=="tabs",L=As({direction:s,separator:c,loop:_,line:O,columns:z}),v=Bs({direction:s,separator:c,loop:_,line:O,columnsTablet:Eo}),oo=[X(S),s==="row"?ys(S):"",L,v,Ls(Ro),Os(s,c)].filter(Boolean).join(" "),Yo=oo?` ${oo}`:"",so=["flex",s==="row"?P||m?"flex-row":`flex-row ${C(h,T,Oo)}`:"flex-col",gs(m?!1:go),t?Ws(vo??"center",s):Ps(m?void 0:B,f)].join(" ")+Yo,p=d||t||i||N?` ${j}`:"",F=Jo?` ${i}`:i?`${p} ${i}`:p,eo=Ko&&s==="column"&&!t&&!m&&X(S)===""&&typeof B=="string"&&B!=="start",to=p||(eo?` ${j}`:""),k=b?` ${Js}`:"",D=t||w||Fo?"":" py-6",Vo=`${So}${D} ${ho}${F}${k}`,qo=w?`${F}${k}`.trim():`w-full${D}${F}${k}`,x=_s("Flex",Ao,s==="row"?"inline":"block",Bo,P||m?void 0:To),Qo=P?{...x.style,...Rs(s,c)}:x.style,no=(o="")=>e(E,{className:`${so}${x.className}${to}${o?` ${o}`:""}${R?` ${ne}`:""}${u?` ${Ks(u)}`:""}`,style:Qo,minEmptyHeight:120}),lo=ks(g)?"":Es(s,c),ro=m?e(Ds,{direction:g,seconds:Wo,delay:Xo,editing:J,copy:o=>no(o&&lo?`${o} ${lo}`:o)}):no(),ao=s==="tabs"?e(is,{className:`${so}${x.className}${N&&!d&&!t&&!i?"":p}`,style:x.style,shape:yo,children:ro}):ro,Zo=Z?e(us.Provider,{value:!1,children:ao}):ao,os={stretchedRow:s==="row"&&!t&&(f===void 0||f==="stretch"),fillingColumn:s==="column"&&(N||eo),columnsRow:L!==""||v!==""},mo=e(bs.Provider,{value:os,children:e(ds.Provider,{value:!1,children:Zo})}),I=R?e(ee,{row:s==="row",stops:E.blockCount??0,children:mo}):mo,ss=Lo?.trim()||(Z?"":void 0),es={values:n,frame:D?24:0},ts=o=>Q?e(te,{on:Q,future:jo===!0,children:o}):o,ns=o=>b.startsWith("/")?e(Qs,{href:b,className:Po,"aria-labelledby":o,[_o]:""}):e("a",{href:b,className:Po,"aria-labelledby":o,[_o]:""}),co=u?e("style",{dangerouslySetInnerHTML:{__html:Ys(u)}}):null,ls=o=>({...t?null:js(Uo),...u?{[Gs]:u}:null,...o?{id:o}:null}),io=L!==""?Number(z):0,rs=C(h,T)===C(void 0),as=(s==="column"||s==="row"&&!P&&!m&&(io===1&&rs||io===0&&E.blockCount===1))&&!t&&!R&&!w,y=Hs({loop:_,direction:s,scrollDirection:g,bgImage:$}),uo=(o,l)=>ts(e(Cs,{contained:Io&&!y,style:y?M:void 0,framedClass:Vo,fillClass:qo,columnClass:`${So} ${ho}${to}`,tabLabel:ss,pad:t?void 0:es,border:Zs(ko,Do),outerAttrs:ls(l),box:!0,edge:as,outerStyle:t?void 0:q,children:co||l?xo(W,{children:[co,l?ns(l):null,y?e(Co,{children:o}):o]}):y?e(Co,{children:o}):o})),fo=o=>b?e(ae,{children:l=>uo(o,l)}):uo(o);if(!t){const o=f===void 0||f==="stretch",l=(X(S)!==""||L!==""||v!=="")&&!Ts(h,T)&&(o||C(h)!==C(void 0));return fo((s==="row"?l:s==="column"&&o)?e(hs.Provider,{value:!0,children:I}):I)}const A=Us(wo,No),bo=$o(G),U=oe({...n,top:a(n.top)??r.desktop,bottom:a(n.bottom)??r.desktop,topPhone:a(n.topPhone)??r.phone,bottomPhone:a(n.bottomPhone)??r.phone,left:a(n.left)??r.side,right:a(n.right)??r.side,leftPhone:a(n.leftPhone)??r.sidePhone,rightPhone:a(n.rightPhone)??r.sidePhone}),po=e("div",{className:`relative z-[1] ${Is} ${U?.className??""}${d||i?` ${j}`:""}`.trimEnd(),style:A?{...U?.style,...M,...se}:{...U?.style,...M},children:I});return fo(e(W,{children:xo("div",{className:`relative isolate overflow-hidden ${Xs}${p}${bo?` ${re}`:""}`,style:{...q,...bo?{"--sf-box-bg":H($??""),"--sf-box-bg-p":H(G??"")}:{backgroundImage:H($??""),backgroundSize:"cover",backgroundPosition:"center"}},children:[A&&e("div",{className:"absolute inset-0 z-0",style:A,"aria-hidden":!0}),A?e(Ss,{children:po}):po]})}))}export{me as default};
|
|
@@ -4,9 +4,10 @@ interface GridProps {
|
|
|
4
4
|
mobileColumns?: number | string;
|
|
5
5
|
gap?: number | string;
|
|
6
6
|
gapPhone?: unknown;
|
|
7
|
+
gapTablet?: unknown;
|
|
7
8
|
contained?: boolean;
|
|
8
9
|
fillHeight?: boolean;
|
|
9
10
|
content: SlotComponent;
|
|
10
11
|
}
|
|
11
|
-
export default function Grid({ columns, mobileColumns, gap, gapPhone, contained, fillHeight, content: Content, }: GridProps): import("react").JSX.Element;
|
|
12
|
+
export default function Grid({ columns, mobileColumns, gap, gapPhone, gapTablet, contained, fillHeight, content: Content, }: GridProps): import("react").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{FRAME_BASE as t,FRAME_GUTTER as e}from"./BlockFrame.js";import{SlotsStartAfresh as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{FRAME_BASE as t,FRAME_GUTTER as e}from"./BlockFrame.js";import{SlotsStartAfresh as g,useFillsCell as h}from"./InBoxContext.js";import G from"./SiteGutterFrame.js";import{containerGapProps as E}from"../../format/lib/content/container-gap.js";import{resolveGridColumns as y,resolveGridMobileColumns as A}from"../../format/lib/content/grid-span.js";import{SECTION_FILL_CLASS as F}from"../../format/lib/content/section-min-height.js";function _({columns:r,mobileColumns:i,gap:n,gapPhone:m,gapTablet:f,contained:a=!0,fillHeight:c=!1,content:p}){const d=h(),s=c||d?` ${F}`:"",C=`${t} py-6 ${e}${s}`,u=`w-full py-6${s}`,$=y(r),S=A(i,r),l=E("Grid",n,"both",m,f);return o(G,{contained:a,framedClass:C,fillClass:u,columnClass:`${t} ${e}${s}`,box:!0,children:o(g,{children:o(p,{className:`sf-grid-zone grid${l.className}${s}`,style:{...l.style,"--sf-grid-cols":String($),"--sf-grid-cols-phone":String(S)},minEmptyHeight:120})})})}export{_ as default};
|
|
@@ -8,6 +8,7 @@ export interface HeroGroupProps {
|
|
|
8
8
|
width?: number;
|
|
9
9
|
gap?: number | string;
|
|
10
10
|
gapPhone?: unknown;
|
|
11
|
+
gapTablet?: unknown;
|
|
11
12
|
direction?: string;
|
|
12
13
|
justify?: string;
|
|
13
14
|
align?: string;
|
|
@@ -16,4 +17,4 @@ export interface HeroGroupProps {
|
|
|
16
17
|
content?: SlotComponent;
|
|
17
18
|
dragRef?: ((element: Element | null) => void) | null;
|
|
18
19
|
}
|
|
19
|
-
export default function HeroGroup({ placement, nudgeX, nudgeY, width, gap, gapPhone, direction, justify, align, wrap, pad, content: Content, dragRef, }: HeroGroupProps): import("react").JSX.Element;
|
|
20
|
+
export default function HeroGroup({ placement, nudgeX, nudgeY, width, gap, gapPhone, gapTablet, direction, justify, align, wrap, pad, content: Content, dragRef, }: HeroGroupProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import{containerDirectionClass as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{containerDirectionClass as H,resolveContainerDirection as P}from"../../format/lib/content/container-direction.js";import{containerGapProps as j}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as $,boxWrapClass as C}from"../../format/lib/content/box-layout.js";import{sectionPadAttrs as k}from"../lib/content/section-padding.js";import{clampNudge as p,clampWidth as v,normalisePlacement as D,placementParts as W,placementRow as w}from"../../format/lib/hero-group-placement.js";function A({placement:c,nudgeX:f,nudgeY:u,width:r,gap:g,gapPhone:d,gapTablet:y,direction:t,justify:h,align:x,wrap:b,pad:N={},content:n,dragRef:G}){const s=D(c),a=p(f),l=p(u),i=j("HeroGroup",g,P("HeroGroup",t)==="column"?"block":"inline",d,y),o={"--sf-hg-row":w(s),justifySelf:W(s).column};typeof r=="number"&&Number.isFinite(r)&&(o["--sf-hg-w"]=`${v(r)}%`),(a!==0||l!==0)&&(o["--sf-hg-nudge"]=`${a}px ${l}px`);const e=k(N);return m("div",{className:e?`sf-hero-group ${e.className}`:"sf-hero-group","data-hg":s,style:e?{...o,...e.style}:o,ref:G??void 0,children:n?m(n,{className:["sf-hero-group-blocks flex",H("HeroGroup",t),$(h,x),C(b)].filter(Boolean).join(" ")+i.className,style:i.style,minEmptyHeight:40}):null})}export{A as default};
|
|
@@ -30,5 +30,6 @@ interface Props {
|
|
|
30
30
|
arrowsShape?: HeroArrowShape;
|
|
31
31
|
arrowsPlacement?: string;
|
|
32
32
|
editing?: boolean;
|
|
33
|
+
partMotion?: Record<string, unknown>;
|
|
33
34
|
}
|
|
34
|
-
export default function HeroSection({ slides: Slides, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, }: Props): import("react").JSX.Element;
|
|
35
|
+
export default function HeroSection({ slides: Slides, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as ge,useRef as u,useState as R}from"react";import{markOverlayPortal as Q}from"../../format/lib/document/overlay-portal.js";import Se from"./Ticker.js";import{HeroSlideStyleContext as Te}from"./HeroSlide.js";import Re from"./HeroArrows.js";import Oe from"./Reel.js";import{TICKER_PART_ATTR as He}from"./PreviewTickerContext.js";import{useReducedMotion as Ae}from"./useReducedMotion.js";import{hasSectionHeight as Le,resolveSectionHeight as W}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Me}from"../lib/document/header-clearance.js";import{nextReel as Ne,normaliseHeroReelShape as Ce,reelShown as Pe}from"../../format/lib/reel.js";import{arrowsShown as Ie,arrowStep as De}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ve,swipeStep as $e}from"../../format/lib/hero-swipe.js";import{videoControlShown as ze,videoHeld as Xe}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as P}from"efficient-easel/draw";import{say as Z}from"../../format/lib/editor-words.js";import{markedChildren as ee}from"../../format/lib/marked-children.js";import{DEFAULT_TICKER_ITEMS as Ge,TICKER_MOTION_PART as je}from"../../format/lib/hero-ticker.js";import{SectionAnimation as Be}from"./SectionAnimation.js";import{entranceDrawn as Ye}from"../lib/animation/entrance.js";import{readPartMotion as qe}from"../lib/animation/part-motion.js";import{scrim as Fe}from"../../format/lib/content/scrim.js";const Ke="Play video",Ue="Hold video",Je="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",Qe=()=>Z("item"),te=new Map;function We(d,a){const i=d?.ownerDocument?.defaultView;if(i)return i.addEventListener(P,a),()=>i.removeEventListener(P,a)}function Ze({slides:d,alignment:a,textureOpacity:i,showTexture:k,textureColor:y,phoneUpDown:E,phoneSideways:re,autoplay:I,autoplayInterval:O,showTicker:oe,tickerItems:ne,heightDesktop:D,heightMobile:V,showPicker:se,pickerShape:ce,pickerPlacement:ae,showArrows:ie,arrowsShape:le,arrowsPlacement:ue,editing:s,partMotion:de}){const $=Le(D,V),me=$?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",fe=$?{"--sf-hero-h-d":W(D),"--sf-hero-h-m":W(V)}:void 0,z=(ne??Ge.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:s?Qe():"").filter(Boolean),he=oe!==!1,pe=Ye(qe({_partMotion:de},je)),m=u(null),X=u(null),G=u(null),j=u(null),B=ge(),H=u(B),[_,ve]=R([]),[xe,Y]=R(0),x=u(0),[q,F]=R(!1),[g,be]=R(!1),A=Ae(),S=v(()=>m.current?.querySelector(".hero-track")??null,[]),l=v((e,t=!1)=>{Y(e),x.current=e,te.set(H.current,e);const r=m.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=m.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||B;H.current=t;const r=te.get(t);typeof r=="number"&&(Y(r),x.current=r)},[]),w(()=>{const e=S();if(!e)return;const t=()=>{ve(o=>Ne(o,ee(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[S]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=m.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||H.current;r.id&&r.id!==p||l(r.index,!0)};return We(m.current,e)},[s,l]);const c=_.length,f=Math.min(Math.max(xe,0),Math.max(0,c-1)),L=Pe({shown:se,count:c}),K=Ie({shown:ie,count:c}),U=ze({editing:s,shown:f,slides:_}),we=Xe({editing:s,playing:g,controlShown:U}),T=Ve({count:c,editing:s}),h=u(null),b=u(null),ke=v(e=>{if(h.current=null,b.current=null,!T||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},b.current={x:t.clientX,y:t.clientY}},[T]),ye=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];b.current={x:t.clientX,y:t.clientY}},[]),Ee=v(()=>{const e=h.current,t=b.current;if(h.current=null,b.current=null,!T||!e||!t)return;const r=$e(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&l(r)},[T,c,l]);w(()=>{if(s||!I||q||A||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((f+1)%c),t);return()=>window.clearTimeout(r)},[s,I,O,q,A,c,f,l]),w(()=>{const e=[X.current,G.current,j.current].filter(Boolean),t=e.map(o=>Q(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),J=M??p.closest("[data-idx]");if(!J)return;o.stopPropagation(),o.preventDefault();const N=M?De(M.dataset.heroNav,x.current,c):Number(J.dataset.idx);Number.isNaN(N)||(l(N,s),ee(S(),"data-slide-name")[N]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,l,S,s]);const _e=v(e=>{if(!e)return;const t=Q(e),r=o=>{o.stopPropagation(),o.preventDefault(),be(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Te.Provider,{value:{alignment:a,textureOpacity:i,textureOn:k,textureColor:y,quietVideo:we,phoneUpDown:E,phoneSideways:re},children:C("div",{ref:m,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${me} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:fe,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),onTouchStart:ke,onTouchMove:ye,onTouchEnd:Ee,children:[n(d,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${f*100}%)`,transition:A?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),U&&n("div",{ref:_e,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Me} + 16px)`},children:C("button",{type:"button",className:Je,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),Z(g?Ue:Ke)]})}),(L||K)&&C("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[L&&n(Oe,{ref:X,slides:_,active:f,shape:Ce(ce),placement:ae}),K&&n(Re,{ref:j,shape:le,placement:ue})]}),L&&n("div",{ref:G,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:_.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===f?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),he&&z.length>0&&n(et,{editing:!!s,entrance:pe,children:n(Se,{items:z,backdrop:"dark-media"})})]})})}function et({editing:d,entrance:a,children:i}){const k="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",y=d?{[He]:""}:void 0,E={background:Fe(.55)};return a?n(Be,{desktop:a.desktop,phone:a.phone,editing:d,boxClass:k,boxAttrs:y,boxStyle:E,children:i}):n("div",{className:k,...y,style:E,children:i})}export{P as HERO_SLIDER_GOTO_EVENT,Ue as HERO_VIDEO_HOLD_LABEL,Ke as HERO_VIDEO_PLAY_LABEL,Ze as default,We as subscribeSliderGoto};
|
|
@@ -24,5 +24,6 @@ export interface HeroSingleProps {
|
|
|
24
24
|
youtubeUrl?: string;
|
|
25
25
|
videoPlayback?: string;
|
|
26
26
|
editing?: boolean;
|
|
27
|
+
partMotion?: Record<string, unknown>;
|
|
27
28
|
}
|
|
28
|
-
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, editing, }: HeroSingleProps): import("react").JSX.Element;
|
|
29
|
+
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useRef as re,useState as ie}from"react";import y from"./HeroPoster.js";import{HeroVideoBackdrop as se,HeroVideoPlayer as te}from"./HeroVideoPlay.js";import{resolveMedia as t}from"../lib/media.js";import{hasSectionHeight as ne,resolveSectionHeight as D}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as ae,overlayGradient as ce}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as de}from"../../format/lib/content/ink.js";import{HERO_PART_ATTR as le}from"../lib/document/hero-media-parts.js";import{hidableText as me}from"efficient-easel/draw";import{normaliseVideoPlayback as pe,normaliseVideoSource as ue,parseYouTubeId as he}from"../../format/lib/hero-video.js";import{heroPictureCount as fe,normaliseMediaLayout as xe,resolvePhoneLayout as ge}from"../../format/lib/hero-media-layout.js";import{DEFAULT_TINT as w}from"../../format/lib/content/tint.js";import{SectionAnimation as $}from"./SectionAnimation.js";import{entranceDrawn as ve}from"../lib/animation/entrance.js";import{readPartMotion as be}from"../lib/animation/part-motion.js";function ye({overlay:n=100,overlayColor:o=w,overlayPosition:a=ae,mediaType:c="image",mediaSrc:i,poster:d,objectPosition:k,objectPositionPhone:T,tintColor:N=w,tintOpacity:f=0,heightDesktop:_,heightMobile:S,boxes:H,videoSource:Y,youtubeUrl:F,videoPlayback:G,mediaLayout:I,mediaLayoutPhone:M,mediaImage2:K,objectPosition2:U,objectPosition2Phone:B,tintColor2:q=w,tintOpacity2:J=0,editing:r=!1,partMotion:Q}){const V=ne(_,S),W=V?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",X=V?{"--sf-hero-h-d":D(_),"--sf-hero-h-m":D(S)}:void 0,s=c==="video",j=s?t(i):void 0,z=s?t(d):t(i)??t(d),m=s&&ue(Y)==="youtube",x=s&&pe(G)==="click",A=m?he(me(F)):null,E=s&&!m&&!x,[R,Z]=ie(!1),g=!R,ee=re(null),L=c==="video"?"media":"image",p=h=>ve(be({_partMotion:Q},h)),oe=h=>{const b=p("media");return b?e($,{desktop:b.desktop,phone:b.phone,editing:r,boxClass:"absolute inset-0 z-[1]",children:h}):h},u=xe(I),v=ge(M,u),O=!s&&fe({mediaLayout:I,mediaLayoutPhone:M})>1;return l("section",{ref:ee,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${W} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:X,children:[oe(O?l("div",{className:`absolute inset-0 z-[1] grid ${we[v]} ${Pe[u]}`,"data-hero-layout":u,"data-hero-layout-phone":v,children:[l(P,{part:"image",editing:r,entrance:p("image"),className:"relative overflow-hidden",children:[e(y,{posterSrc:t(i),showVideo:!1,objectPosition:k,objectPositionPhone:T}),e(C,{color:N,opacity:f})]}),l(P,{part:"image2",editing:r,entrance:p("image2"),className:`relative overflow-hidden${v==="one"?" max-[719px]:hidden":""}${u==="one"?" min-[720px]:hidden":""}`,children:[e(y,{posterSrc:t(K),showVideo:!1,objectPosition:U,objectPositionPhone:B}),e(C,{color:q,opacity:J})]})]}):l(P,{part:L,editing:r,entrance:L==="image"?p("image"):null,className:"absolute inset-0 z-[1]",children:[e(y,{videoSrc:E?j:void 0,posterSrc:z,showVideo:E,objectPosition:k,objectPositionPhone:T}),m&&e(se,{youTubeId:A,ownPoster:!!z,background:!x,editing:r})]})),x&&e(te,{youTubeId:A,fileSrc:m?void 0:j,playing:R,onPlay:()=>Z(!0),editing:r}),g&&!O&&f>0&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:N,opacity:Math.min(Math.max(f,0),100)/100}}),g&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:ce(o,a),opacity:Math.min(Math.max(n,0),100)/100}}),g&&H&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",r?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:de,children:e(H,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const we={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},Pe={one:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-1",side:"min-[720px]:grid-cols-2 min-[720px]:grid-rows-1",stacked:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-2"};function C({color:n,opacity:o}){return o>0?e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:n,opacity:Math.min(Math.max(o,0),100)/100}}):null}function P({part:n,editing:o,entrance:a,className:c,children:i}){const d=o?{[le]:n}:void 0;return a?e($,{desktop:a.desktop,phone:a.phone,editing:o,boxClass:c,boxAttrs:d,children:i}):e("div",{className:c,...d,children:i})}export{ye as default};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ImageFit } from "../../format/lib/content/image-fit.js";
|
|
2
|
+
import type { PadValues } from "../lib/content/section-padding.js";
|
|
2
3
|
type Aspect = "auto" | "21/9" | "16/9" | "4/3" | "1/1";
|
|
3
4
|
interface ImageBlockProps {
|
|
4
5
|
editing?: boolean;
|
|
@@ -14,6 +15,8 @@ interface ImageBlockProps {
|
|
|
14
15
|
focalPhone?: string;
|
|
15
16
|
corners?: number;
|
|
16
17
|
cornerSides?: string[] | null;
|
|
18
|
+
pad?: PadValues;
|
|
19
|
+
ownSize?: boolean;
|
|
17
20
|
}
|
|
18
|
-
export default function ImageBlock({ src, alt, aspect, contained, grayscale, href, fit, focal, focalPhone, corners, cornerSides, editing, }: ImageBlockProps): import("react").JSX.Element | null;
|
|
21
|
+
export default function ImageBlock({ src, alt, aspect, contained, grayscale, href, fit, focal, focalPhone, corners, cornerSides, pad, ownSize, editing, }: ImageBlockProps): import("react").JSX.Element | null;
|
|
19
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{SiteLink as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{SiteLink as C}from"../lib/site-runtime.js";import E from"./BlockFrame.js";import{useSectionEdge as F}from"./SiteGutterFrame.js";import{useSitePhotography as z}from"./SitePhotographyContext.js";import{media as P}from"../lib/media.js";import{CONTENT_SIZES as T,sizedImage as A}from"../../format/lib/sized-image.js";import{imageCornerStyle as B}from"../../format/lib/content/image-corners.js";import{imageFitClass as L,imageIsCropped as O,parseImageFit as W}from"../../format/lib/content/image-fit.js";import{resolveImageTreatment as _}from"../../format/lib/content/image-treatment.js";import{phoneFocus as q}from"../../format/lib/content/phone-focus.js";import{say as Z}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as D}from"../lib/content/section-edge.js";const G={auto:"","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square"};function H({src:t,alt:g,aspect:l,contained:y,grayscale:N,href:S,fit:b,focal:c,focalPhone:k,corners:v,cornerSides:x,pad:n,ownSize:I=!1,editing:$=!1}){const a=_(N,z()),f=W(b,"cover"),d=B(v,x),p=O(l,f),i=q(p?k:void 0),u={...a.style??{},...c&&p?{objectPosition:c}:{},...i.style},s=t?A(P(t)):null,m=t&&s?e("img",{src:s.src,...s.srcSet?{srcSet:s.srcSet,sizes:T}:{},alt:g,className:`h-full w-full ${l==="auto"?"":L(f)}${a.className?` ${a.className}`:""}${i.className?` ${i.className}`:""}`,...Object.keys(u).length?{style:u}:{}}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:Z("Image — set a path")}),r=(S??"").trim(),j=r&&t?r.startsWith("/")?e(C,{href:r,className:"block h-full w-full",children:m}):e("a",{href:r,className:"block h-full w-full",children:m}):m,h=F(),o=h&&!I?D(h):null,w=n?{values:n,frame:24}:void 0;return!t&&!$?null:e(E,{contained:o?!1:y,className:"py-6",pad:w,...o?{fillWidth:o.className,style:o.style}:{},children:e("figure",{children:e("div",{className:`relative w-full overflow-hidden bg-surface ${G[l]}`,...d?{style:d}:{},children:j})})})}export{H as default};
|
|
@@ -2,6 +2,7 @@ import { type CSSProperties, type ReactNode } from "react";
|
|
|
2
2
|
export type BoxCell = {
|
|
3
3
|
stretchedRow: boolean;
|
|
4
4
|
fillingColumn: boolean;
|
|
5
|
+
columnsRow?: boolean;
|
|
5
6
|
};
|
|
6
7
|
export declare const InBoxContext: import("react").Context<BoxCell | null>;
|
|
7
8
|
export declare const useInBox: () => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n}from"react/jsx-runtime";import{createContext as
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import{createContext as u,useContext as t}from"react";import{SECTION_FILL_CLASS as f}from"../../format/lib/content/section-min-height.js";const a={stretchedRow:!1,fillingColumn:!1},l=u(null),d=()=>t(l)!==null,w=()=>t(l),c=u(!1);function C(){const e=t(l)?.stretchedRow===!0,o=t(c);return e&&!o}const p=()=>t(c);function m(){const e=t(l),o=C(),r=p();return{fill:r?` ${f}`:"",inner:s=>{const i=o||r?n(c.Provider,{value:!0,children:s}):s;return e?.columnsRow?n(l.Provider,{value:{...e,columnsRow:!1},children:i}):i}}}function R({className:e,style:o,attrs:r,children:s}){const{fill:i,inner:x}=m();return n("div",{className:`${e}${i}`,...o?{style:o}:{},...r,children:x(s)})}function B({children:e}){const o=d();return n(l.Provider,{value:o?a:null,children:n(c.Provider,{value:!1,children:e})})}export{c as CellFillContext,R as CellWrap,l as InBoxContext,B as SlotsStartAfresh,w as useBoxCell,m as useCellLayer,C as useCellOfStretchedRow,p as useFillsCell,d as useInBox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as Q}from"react/jsx-runtime";import U from"./Btn.js";import u from"./Placeholder.js";import
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as Q}from"react/jsx-runtime";import U from"./Btn.js";import u from"./Placeholder.js";import W from"./SectionEyebrow.js";import{renderGold as N,renderHeadline as X,splitParagraphs as Z}from"./goldPhrases.js";import{resolveTypeSize as o}from"../../format/lib/content/section-type-size.js";import{HEADER_HEIGHT_CSS as _}from"../lib/document/header-clearance.js";import{resolveSectionHeight as j}from"../../format/lib/content/section-height.js";import{INTRO_BLEED_COPY_SHARE as k,parseIntroBleedLayout as ee,resolveCopyShare as E}from"../../format/lib/sections/intro-bleed-layout.js";import{ON_MEDIA_INK_STYLE as te}from"../../format/lib/content/ink.js";import{SCROLL_OVER_CLASS as S}from"../../format/lib/content/section-sticky.js";function re({eyebrow:a,title:l,body:s,cta:i,imageLabel:d,imageSrc:c,imageSrcMobile:w,layout:I,copyShareDesktop:L,copyShareMobile:z,sticky:m=!0,heightDesktop:C,heightMobile:D,overlay:p,titleSizeDesktop:H,titleSizeMobile:B,bodySizeDesktop:O,bodySizeMobile:R,buttonColor:T,buttonTextColor:$,uppercase:A=!1,capStyle:h}){const r=ee(I)==="stacked",x=n=>r?`calc(${j(n)} - ${_})`:j(n),M=x(C),F=x(D),P=o(H,"clamp(48px,7vw,96px)","heading","headingLarge"),G=o(B,"clamp(36px,7vw,96px)","heading","headingLarge"),Y=o(O,"17px","body","body"),K=o(R,"16px","body","body"),V=p!=null?p/100:r?0:.6,v=T||"var(--btn)",q=$||"var(--btn-ink)",f={"--intro-h-d":M,"--intro-h-m":F,"--intro-title-d":P,"--intro-title-m":G,"--intro-body-d":Y,"--intro-body-m":K,...r?{"--intro-copy-d":E(L,k.desktop),"--intro-copy-m":E(z,k.mobile),marginTop:_}:{}},g=h?"px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]":"px-[60px] max-[960px]:px-6",b=t(Q,{children:[t("div",{className:"absolute inset-0",children:[e("div",{className:"absolute inset-0 hidden min-[960px]:block",children:e(u,{label:d,src:c})}),e("div",{className:"absolute inset-0 min-[960px]:hidden",children:e(u,{label:d,src:w||c})}),e("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(45deg, transparent 0 80px, rgba(201,164,97,.04) 80px 81px)"}})]}),e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${V})`}})]}),y=t("div",{style:h,className:"flex flex-col gap-6",children:[a&&e(W,{text:a,size:14}),l&&e("h2",{className:["font-display font-medium leading-[0.95] tracking-[-0.03em]","text-[length:var(--intro-title-m)] min-[960px]:text-[length:var(--intro-title-d)]",A?"uppercase":""].join(" "),children:X(l,!1)}),s&&Z(s).map((n,J)=>e("p",{className:"max-w-[560px] leading-[1.6] opacity-85 text-[length:var(--intro-body-m)] min-[960px]:text-[length:var(--intro-body-d)]",children:N(n)},J)),i.text&&e("div",{className:"mt-2 self-start",children:e(U,{href:i.href,variant:"ghost",style:{background:v,color:q,borderColor:v},children:N(i.text)})})]});return r?t("section",{style:f,className:[m?`sticky top-0 ${S}`:"relative","flex flex-col","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0 z-[1]"].join(" "),children:[e("div",{className:["relative z-[2] flex shrink-0 flex-col justify-center bg-bg py-10","min-h-[var(--intro-copy-m)] min-[960px]:min-h-[var(--intro-copy-d)]",g].join(" "),style:{color:"var(--fg)"},children:y}),e("div",{className:"relative min-h-0 flex-1 overflow-hidden",children:b})]}):t("section",{style:f,className:[m?`sticky top-0 ${S}`:"relative","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0 z-[1]","mx-auto w-full max-w-[var(--sf-bg-cap,none)]"].join(" "),children:[b,e("div",{className:["relative z-[2] flex h-full flex-col justify-center",g].join(" "),style:te,children:y})]})}export{re as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as s}from"react/jsx-runtime";import{useMemo as v}from"react";import{hasMapCoords as m}from"../../format/lib/map-styles.js";import _ from"./SiteMap.js";const y="relative overflow-hidden max-[1100px]:aspect-square";function k(e,r,t){return m(r,t)?[{key:"place",label:e,lat:r,lng:t,glyph:"",tone:""}]:[]}function N(e,r,t,a){return e||(r?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent([r,t,a].filter(Boolean).join(" "))}`:"")}function j({href:e}){return n("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent transition-colors hover:text-fg",children:"Get directions
|
|
1
|
+
"use client";import{jsx as n,jsxs as s}from"react/jsx-runtime";import{useMemo as v}from"react";import{hasMapCoords as m}from"../../format/lib/map-styles.js";import _ from"./SiteMap.js";const y="relative overflow-hidden max-[1100px]:aspect-square";function k(e,r,t){return m(r,t)?[{key:"place",label:e,lat:r,lng:t,glyph:"",tone:""}]:[]}function N(e,r,t,a){return e||(r?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent([r,t,a].filter(Boolean).join(" "))}`:"")}function j({href:e}){return n("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent transition-colors hover:text-fg",children:"Get directions ↗"})}function w({name:e,state:r,country:t,lat:a,lng:i,mapsUrl:u,mapTheme:f="auto",pick:c,editing:g,boxClass:l=y}){const h=m(a,i),p=r,o=e||"Location",b=v(()=>k(o,a,i),[o,a,i]),d=N(u,e,r,t),x=s("div",{className:"absolute left-5 top-5 z-10 flex max-w-[64%] flex-col gap-1.5 border border-line bg-bg p-3.5 shadow-[0_8px_24px_color-mix(in_srgb,var(--overlay-scrim)_40%,transparent)]",children:[s("span",{className:"font-display text-[length:var(--size-body,14px)] font-medium tracking-[-0.01em]",children:[o,p?`, ${p}`:""]}),d&&n(j,{href:d})]});return h?n("div",{"data-loc-pick":c,className:l,children:n(_,{pins:b,mapTheme:f,ariaLabel:o,className:"absolute inset-0",children:x})}):s("div",{"data-loc-pick":c,className:`${l} bg-bg`,style:{backgroundImage:"repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 4%, transparent) 0 1px, transparent 1px 14px), repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 4%, transparent) 0 1px, transparent 1px 14px), linear-gradient(135deg, var(--site-surface-2), var(--site-surface))"},children:[x,g&&n("div",{className:"absolute inset-0 flex items-center justify-center px-6 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim/40",children:"Add latitude & longitude"})]})}export{j as DirectionsLink,y as LOCATION_MAP_BOX,w as default,N as directionsHref,k as locationMapPins};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as l,jsx as n}from"react/jsx-runtime";import{usePartEntrance as i,usePublishedPartKindRule as c,usePublishedSharedKindRule as f}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as m,TEXT_STYLE_ATTR as T}from"../lib/document/part-styles.js";function d({kind:t,shared:s=!1,children:r}){const a=c(t),o=f(t),e=s?o:a,u=i(e);return e?n("span",{ref:u,[m]:e.stamp,...e.textStyle?{[T]:e.textStyle}:{},children:r}):n(l,{children:r})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as s,jsx as e}from"react/jsx-runtime";import{ClaimedStamp as m,usePartEntrance as l,usePublishedPartRule as i}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as o,TEXT_STYLE_ATTR as u}from"../lib/document/part-styles.js";function T({value:a,children:r}){const t=i(a),n=l(t);return t?e(m,{stamp:t.stamp,children:e("span",{ref:n,[o]:t.stamp,...t.textStyle?{[u]:t.textStyle}:{},children:r})}):e(s,{children:r})}export{T as default};
|
|
@@ -43,9 +43,13 @@ type Ctx = {
|
|
|
43
43
|
siteWidth: number | null;
|
|
44
44
|
setSiteWidth: (v: number | null) => void;
|
|
45
45
|
siteGutter: number | null;
|
|
46
|
+
siteGutterPhone: number | null;
|
|
46
47
|
blockGap: number | null;
|
|
48
|
+
blockGapPhone: number | null;
|
|
47
49
|
setSiteGutter: (v: number | null) => void;
|
|
50
|
+
setSiteGutterPhone: (v: number | null) => void;
|
|
48
51
|
setBlockGap: (v: number | null) => void;
|
|
52
|
+
setBlockGapPhone: (v: number | null) => void;
|
|
49
53
|
heroBackgroundFollowsWidth: boolean | null;
|
|
50
54
|
setHeroBackgroundFollowsWidth: (v: boolean | null) => void;
|
|
51
55
|
sectionBackgroundWidth: "full" | "content" | null;
|
|
@@ -59,7 +63,7 @@ type Ctx = {
|
|
|
59
63
|
themeFromDocument: boolean;
|
|
60
64
|
};
|
|
61
65
|
export declare const PreviewHeaderContext: import("react").Context<Ctx>;
|
|
62
|
-
export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, themeRow, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, blockGap, onSiteGutterChange, onBlockGapChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
|
|
66
|
+
export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, themeRow, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, siteGutterPhone, blockGap, blockGapPhone, onSiteGutterChange, onSiteGutterPhoneChange, onBlockGapChange, onBlockGapPhoneChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
|
|
63
67
|
children: ReactNode;
|
|
64
68
|
websiteName?: string | null;
|
|
65
69
|
templateChrome?: boolean;
|
|
@@ -91,8 +95,12 @@ export declare function PreviewHeaderProvider({ children, websiteName, templateC
|
|
|
91
95
|
siteWidth?: number | null;
|
|
92
96
|
siteGutter?: number | null;
|
|
93
97
|
blockGap?: number | null;
|
|
98
|
+
blockGapPhone?: number | null;
|
|
94
99
|
onSiteGutterChange?: (v: number | null) => void;
|
|
100
|
+
siteGutterPhone?: number | null;
|
|
101
|
+
onSiteGutterPhoneChange?: (v: number | null) => void;
|
|
95
102
|
onBlockGapChange?: (v: number | null) => void;
|
|
103
|
+
onBlockGapPhoneChange?: (v: number | null) => void;
|
|
96
104
|
onSiteWidthChange?: (v: number | null) => void;
|
|
97
105
|
textStyles?: unknown;
|
|
98
106
|
onTextStylesChange?: (v: unknown) => void;
|