@marktiderman/genesis-sites 0.7.6 → 0.9.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/README.md +202 -19
- package/SKILL.md +15 -0
- package/dist/analytics.d.ts +184 -0
- package/dist/analytics.js +3 -0
- package/dist/analytics.js.map +1 -0
- package/dist/assets/form-island.da6c662a73.js +51 -0
- package/dist/assets/islands.399b13ea6f.js +1 -0
- package/dist/assets/sites-forms.b64c156079.css +10 -0
- package/dist/assets/sites-forms.css +1 -1
- package/dist/assets/sites.2fac65f96a.css +2 -0
- package/dist/assets/sites.css +1 -1
- package/dist/assets.generated-ZBFSP23U.js +3 -0
- package/dist/{assets.generated-LLUGUUWZ.js.map → assets.generated-ZBFSP23U.js.map} +1 -1
- package/dist/blocks.js +2 -1
- package/dist/blocks.js.map +1 -1
- package/dist/chunk-5G2H6EZ2.js +19 -0
- package/dist/chunk-5G2H6EZ2.js.map +1 -0
- package/dist/chunk-5RYCQEEE.js +256 -0
- package/dist/chunk-5RYCQEEE.js.map +1 -0
- package/dist/{chunk-7E3YGYVH.js → chunk-ATRS5GSD.js} +77 -22
- package/dist/chunk-ATRS5GSD.js.map +1 -0
- package/dist/{chunk-MU2Z2C4F.js → chunk-CXBBUKGB.js} +14 -4
- package/dist/chunk-CXBBUKGB.js.map +1 -0
- package/dist/{chunk-IU6AI75R.js → chunk-QGU6FDH5.js} +413 -162
- package/dist/chunk-QGU6FDH5.js.map +1 -0
- package/dist/{chunk-SMJMXQ3T.js → chunk-SBONYMUC.js} +294 -73
- package/dist/chunk-SBONYMUC.js.map +1 -0
- package/dist/{chunk-VJ4HOFBA.js → chunk-UOKNFG5O.js} +144 -20
- package/dist/chunk-UOKNFG5O.js.map +1 -0
- package/dist/{chunk-KY4ALBVH.js → chunk-UUC5USJH.js} +58 -37
- package/dist/chunk-UUC5USJH.js.map +1 -0
- package/dist/editor.d.ts +76 -19
- package/dist/editor.js +1217 -245
- package/dist/editor.js.map +1 -1
- package/dist/handler-OR554RTS.js +11 -0
- package/dist/{handler-UMGSZY33.js.map → handler-OR554RTS.js.map} +1 -1
- package/dist/import.d.ts +3 -3
- package/dist/import.js +1 -1
- package/dist/index.d.ts +66 -11
- package/dist/index.js +4 -4
- package/dist/redirects-LcCNIJHQ.d.ts +43 -0
- package/dist/{registry-BIijndsq.d.ts → registry-Cw7NF_le.d.ts} +92 -1
- package/dist/sections.d.ts +86 -4
- package/dist/sections.js +3 -3
- package/dist/{store-BImtGmoF.d.ts → store-BNYD5NAQ.d.ts} +30 -4
- package/dist/supabase.d.ts +4 -4
- package/dist/supabase.js +4 -4
- package/dist/{templates-kA-jrnWA.d.ts → templates-DPv0OYLl.d.ts} +2 -2
- package/dist/templates.d.ts +3 -3
- package/dist/templates.js +7 -3
- package/dist/templates.js.map +1 -1
- package/dist/{theme-Cg-inpk5.d.ts → theme-HJzN2tOm.d.ts} +2 -2
- package/dist/web.d.ts +64 -18
- package/dist/web.js +7 -6
- package/migrations/0003_genesis_sites_post_dates.sql +117 -0
- package/migrations/tests/0003_genesis_sites_post_dates.test.sql +76 -0
- package/package.json +12 -4
- package/dist/assets/form-island.defb8daccc.js +0 -51
- package/dist/assets/islands.33a445f34e.js +0 -1
- package/dist/assets/sites-forms.aff23b5617.css +0 -10
- package/dist/assets/sites.5b3f64c627.css +0 -2
- package/dist/assets.generated-LLUGUUWZ.js +0 -3
- package/dist/chunk-7E3YGYVH.js.map +0 -1
- package/dist/chunk-IU6AI75R.js.map +0 -1
- package/dist/chunk-KY4ALBVH.js.map +0 -1
- package/dist/chunk-MU2Z2C4F.js.map +0 -1
- package/dist/chunk-RLYO6VVP.js +0 -19
- package/dist/chunk-RLYO6VVP.js.map +0 -1
- package/dist/chunk-SMJMXQ3T.js.map +0 -1
- package/dist/chunk-VJ4HOFBA.js.map +0 -1
- package/dist/handler-UMGSZY33.js +0 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ASSETS_PREFIX, handleSiteRequest, renderSitePageToString } from './chunk-ATRS5GSD.js';
|
|
2
|
+
import './chunk-5G2H6EZ2.js';
|
|
3
|
+
import './chunk-OFJISW3T.js';
|
|
4
|
+
import './chunk-5RYCQEEE.js';
|
|
5
|
+
import './chunk-SBONYMUC.js';
|
|
6
|
+
import './chunk-VZUDRPFG.js';
|
|
7
|
+
import './chunk-UOKNFG5O.js';
|
|
8
|
+
import './chunk-QGU6FDH5.js';
|
|
9
|
+
import './chunk-CXBBUKGB.js';
|
|
10
|
+
//# sourceMappingURL=handler-OR554RTS.js.map
|
|
11
|
+
//# sourceMappingURL=handler-OR554RTS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"handler-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"handler-OR554RTS.js"}
|
package/dist/import.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { Transport } from '@marktiderman/genesis-media/server';
|
|
|
2
2
|
export { BlockedAddressError, FetchedResponse, Transport, guardedLookup, isPublicAddress, urlProblems } from '@marktiderman/genesis-media/server';
|
|
3
3
|
import { Sniffed } from '@marktiderman/genesis-media';
|
|
4
4
|
export { Sniffed, sniff } from '@marktiderman/genesis-media';
|
|
5
|
-
import { S as SiteStore } from './store-
|
|
6
|
-
import './registry-
|
|
5
|
+
import { S as SiteStore } from './store-BNYD5NAQ.js';
|
|
6
|
+
import './registry-Cw7NF_le.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zod';
|
|
9
|
-
import './theme-
|
|
9
|
+
import './theme-HJzN2tOm.js';
|
|
10
10
|
import '@marktiderman/genesis-design-system';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/import.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAX_URL_LENGTH } from './chunk-
|
|
1
|
+
import { MAX_URL_LENGTH } from './chunk-CXBBUKGB.js';
|
|
2
2
|
import { createGuardedTransport, fetchGuarded, FetchRefusedError } from '@marktiderman/genesis-media/server';
|
|
3
3
|
export { BlockedAddressError, guardedLookup, isPublicAddress, urlProblems } from '@marktiderman/genesis-media/server';
|
|
4
4
|
import { sniff } from '@marktiderman/genesis-media';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { P as PageMeta$1, g as SiteDoc,
|
|
2
|
-
export { B as BUILT_IN_SECTION_TYPES, k as BodyFontChoice, l as BuiltInSectionType, C as Copy, m as FileRef, n as FontChoice, F as FormsResolver, o as FormsResolverContext, H as Href, I as Image, p as ImportPost, q as ImportPostsResult, r as Line, s as Link, t as LinkEvent, M as MAX_DOC_BYTES, u as MAX_IMPORT_POSTS, v as MAX_LIVE_POSTS, w as MenuItem, a as PageKind, x as PagePath, y as PostAuthor, z as PostDoc, D as PostDocInput, E as PostDraft, G as PostMeta, J as PostSlug, K as PostStatus, N as PostSummarySchema, O as PostsContext, Q as RegisterSectionOptions, R as Release, T as ReleaseMeta, U as ReleaseSnapshot, c as RenderContext, V as RenderMedia, d as ResolvedForm, W as RichText, X as SECTION_CATEGORIES, Y as SavePostInput, Z as SavePostResult, S as SectionCategory, _ as SectionDefinition, $ as SectionDefinitionError, a0 as SectionId, a1 as SectionManifest, a2 as SectionPlacement, a3 as SectionPreset, a4 as SectionRenderProps, a5 as SectionVariant, e as Seo, a6 as SeoDefaults, a7 as SiteDocInput, a8 as Surface, a9 as TokenOverrides, aa as defineSection, ab as getSection, ac as isPlainEmail, ad as listSections, ae as mailtoHref, af as newSectionId, ag as nodeFromPreset, ah as opensInNewTab, ai as parseSnapshot, aj as postSummary, ak as registerBuiltInSection, al as registerSection, am as richTextPlain, an as sectionJsonSchema, ao as sectionManifests, ap as unregisterSection, aq as validatePostSlug } from './registry-
|
|
3
|
-
import { R as ReservedPaths } from './store-
|
|
4
|
-
export {
|
|
1
|
+
import { P as PageMeta$1, g as SiteDoc, b as PageDoc, f as SectionNode, A as AnySectionDefinition, h as ReleasePage, i as PostSummary, L as LivePost, j as Redirect } from './registry-Cw7NF_le.js';
|
|
2
|
+
export { B as BUILT_IN_SECTION_TYPES, k as BodyFontChoice, l as BuiltInSectionType, C as Copy, m as FileRef, n as FontChoice, F as FormsResolver, o as FormsResolverContext, H as Href, I as Image, p as ImportPost, q as ImportPostsResult, r as Line, s as Link, t as LinkEvent, M as MAX_DOC_BYTES, u as MAX_IMPORT_POSTS, v as MAX_LIVE_POSTS, w as MenuItem, a as PageKind, x as PagePath, y as PostAuthor, z as PostDoc, D as PostDocInput, E as PostDraft, G as PostMeta, J as PostSlug, K as PostStatus, N as PostSummarySchema, O as PostsContext, Q as RegisterSectionOptions, R as Release, T as ReleaseMeta, U as ReleaseSnapshot, c as RenderContext, V as RenderMedia, d as ResolvedForm, W as RichText, X as SECTION_CATEGORIES, Y as SavePostInput, Z as SavePostResult, S as SectionCategory, _ as SectionDefinition, $ as SectionDefinitionError, a0 as SectionId, a1 as SectionManifest, a2 as SectionPlacement, a3 as SectionPreset, a4 as SectionRenderProps, a5 as SectionVariant, e as Seo, a6 as SeoDefaults, a7 as SiteDocInput, a8 as Surface, a9 as TokenOverrides, aa as defineSection, ab as getSection, ac as isPlainEmail, ad as listSections, ae as mailtoHref, af as newSectionId, ag as nodeFromPreset, ah as opensInNewTab, ai as parseSnapshot, aj as postSummary, ak as registerBuiltInSection, al as registerSection, am as richTextPlain, an as sectionJsonSchema, ao as sectionManifests, ap as unregisterSection, aq as validatePostSlug } from './registry-Cw7NF_le.js';
|
|
3
|
+
import { R as ReservedPaths } from './store-BNYD5NAQ.js';
|
|
4
|
+
export { e as ASSET_TYPES, A as Asset, f as AssetHostOptions, a as AssetMeta, C as CheckLevel, g as CheckReleaseOptions, D as DEFAULT_RESERVED_PATHS, I as InvalidationInfo, M as MAX_PAGE_PATH_LENGTH, h as MAX_URL_LENGTH, i as MemorySiteStore, j as MemoryStoreOptions, N as NewPage, k as NewSite, l as PAGE_PATH, m as PageDraft, n as PreparedRelease, o as PublishBlockedError, P as PublishOptions, d as SaveResult, c as SiteCheckLevels, p as SiteConflictError, q as SiteDraft, b as SiteIssue, S as SiteStore, r as applyCheckLevels, s as assetPath, t as checkAssetHosts, u as checkBlog, v as checkContrast, w as checkHtmlOutline, x as checkPage, y as checkPost, z as checkRelease, B as checkSiteDoc, E as createMemorySiteStore, F as formCacheTag, G as isConflict, H as isExternalHref, J as isOwnUrl, K as isPublishable, L as isReservedPath, O as isSafeHref, Q as isSafeImageSrc, T as normalizeRequestPath, U as pagePathProblems, V as prepareImportPost, W as prepareRelease, X as siteCacheTag, Y as validatePagePath, Z as withCacheInvalidation } from './store-BNYD5NAQ.js';
|
|
5
|
+
export { a as RedirectContext, R as RedirectDestination, b as RedirectMatch, r as redirectDestinations, c as redirectFromProblems, d as redirectToProblems, e as removeRedirect, u as upsertRedirect } from './redirects-LcCNIJHQ.js';
|
|
5
6
|
export { LATIN_UNICODE_RANGE, SELF_HOSTED_FONTS, SelfHostedFont, fontFileKey } from '@marktiderman/genesis-design-system/fonts';
|
|
6
|
-
export { B as BrandInput, a as BrandSource, S as SiteBrand, b as SiteTheme, c as SiteThemeOptions, T as ThemePair, d as brandDisplayName, e as contrastRatio, h as hexToHslTriplet, i as isSiteBrand, l as luminance, m as mix, p as parseHex, s as siteTheme, f as stableHash, t as themeCss, g as toCanonicalBrand } from './theme-
|
|
7
|
-
export { O as OnePageSiteInput, T as TemplateInput, a as TemplateMessage, b as TemplateResult, l as landingPage, o as onePageSite, s as starterSite } from './templates-
|
|
7
|
+
export { B as BrandInput, a as BrandSource, S as SiteBrand, b as SiteTheme, c as SiteThemeOptions, T as ThemePair, d as brandDisplayName, e as contrastRatio, h as hexToHslTriplet, i as isSiteBrand, l as luminance, m as mix, p as parseHex, s as siteTheme, f as stableHash, t as themeCss, g as toCanonicalBrand } from './theme-HJzN2tOm.js';
|
|
8
|
+
export { O as OnePageSiteInput, T as TemplateInput, a as TemplateMessage, b as TemplateResult, l as landingPage, o as onePageSite, s as starterSite } from './templates-DPv0OYLl.js';
|
|
8
9
|
export { FONT_CHOICES, FontInfo } from '@marktiderman/genesis-design-system';
|
|
9
10
|
import '@marktiderman/genesis-media';
|
|
10
11
|
import 'react';
|
|
@@ -21,8 +22,8 @@ import 'zod';
|
|
|
21
22
|
declare const DEFAULT_LANDING_DIRECTORY = "/go";
|
|
22
23
|
/** A landing page's slug: one path segment of lowercase letters, digits and single hyphens. */
|
|
23
24
|
declare const LANDING_SLUG: RegExp;
|
|
24
|
-
/** The site's landing page directory: `site.landing.directory`,
|
|
25
|
-
declare function landingDirectory(site: Pick<SiteDoc, "landing"> | null | undefined): string;
|
|
25
|
+
/** The site's landing page directory: `site.landing.directory`, else `fallback` (the host's default), else `/go`. */
|
|
26
|
+
declare function landingDirectory(site: Pick<SiteDoc, "landing"> | null | undefined, fallback?: string): string;
|
|
26
27
|
/** The path of the landing page `slug` under `directory`: `("/go", "spring")` → `/go/spring`. */
|
|
27
28
|
declare function landingPath(directory: string, slug: string): string;
|
|
28
29
|
/** The slug of a page under `directory` (`/go/spring` → `spring`), or null for a path outside it. */
|
|
@@ -48,6 +49,36 @@ declare function landingMoves<T extends Pick<PageMeta$1, "id" | "kind" | "path">
|
|
|
48
49
|
path: string;
|
|
49
50
|
}[];
|
|
50
51
|
|
|
52
|
+
/**
|
|
53
|
+
* The site's 404 page: the page at `/404`, made and edited like any other
|
|
54
|
+
* page, with the site's sections. A visitor to an address the site doesn't
|
|
55
|
+
* have sees it (with `unknownPath: "not-found"`), with status 404 and
|
|
56
|
+
* `noindex`; a site without one shows the built-in "Page not found" text.
|
|
57
|
+
* It stays out of the sitemap and the menu's suggestions.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/** Where a site's 404 page lives. */
|
|
61
|
+
declare const NOT_FOUND_PATH = "/404";
|
|
62
|
+
/** Is this the site's 404 page (the page at `/404`)? */
|
|
63
|
+
declare function isNotFoundPage(page: Pick<PageMeta$1, "path">): boolean;
|
|
64
|
+
/** A starting 404 page: a heading, a line of copy and a button home. */
|
|
65
|
+
declare function notFoundPageDoc(input?: {
|
|
66
|
+
title?: string;
|
|
67
|
+
}): PageDoc;
|
|
68
|
+
|
|
69
|
+
type Root = Pick<PageDoc, "root">;
|
|
70
|
+
/** The page's window, as epoch milliseconds (null where open). */
|
|
71
|
+
declare function pageWindow(doc: Root): {
|
|
72
|
+
from: number | null;
|
|
73
|
+
until: number | null;
|
|
74
|
+
};
|
|
75
|
+
/** Is the page shown at `at`? A page with no window always is. */
|
|
76
|
+
declare function isPageShown(doc: Root, at: Date): boolean;
|
|
77
|
+
/** The page's next boundary after `at` (when it appears or disappears), or null. */
|
|
78
|
+
declare function nextPageBoundary(doc: Root, at: Date): number | null;
|
|
79
|
+
/** Why a page can't have this window (empty when it can). */
|
|
80
|
+
declare function pageWindowProblems(doc: Root, path: string): string[];
|
|
81
|
+
|
|
51
82
|
/**
|
|
52
83
|
* Props migrations. A section node records the props version it was written
|
|
53
84
|
* at (`v`); its definition declares the current `version` and a pure
|
|
@@ -136,12 +167,16 @@ declare function absoluteUrl(origin: string, basePath: string, path: string): st
|
|
|
136
167
|
/**
|
|
137
168
|
* The page's title with the site's template (`%s · Riverside Works`), so every
|
|
138
169
|
* tab and search result names the site. An SEO title written for the page
|
|
139
|
-
* (`seo.title`) is used as it is
|
|
170
|
+
* (`seo.title`) is used as it is, and a page titled with the site's name
|
|
171
|
+
* isn't given it twice.
|
|
140
172
|
*/
|
|
141
173
|
declare function pageTitle(site: SiteDoc, doc: PageDoc, _path: string): string;
|
|
142
174
|
/** Every meta value a page prints in its `<head>`. */
|
|
143
175
|
declare function pageMeta({ site, page, origin, basePath, preview, article }: PageMetaInput): PageMeta;
|
|
144
176
|
declare function organizationJsonLd(site: SiteDoc, origin: string, basePath?: string): Record<string, unknown>;
|
|
177
|
+
/** The site's business at its address (`seo.localBusiness`), or null when it has none or `path` doesn't carry it. */
|
|
178
|
+
declare function localBusinessJsonLd(site: SiteDoc, path: string, origin: string, basePath?: string): Record<string, unknown> | null;
|
|
179
|
+
declare function faqPageJsonLd(page: Pick<PageDoc, "content">): Record<string, unknown> | null;
|
|
145
180
|
declare function websiteJsonLd(site: SiteDoc, origin: string, basePath?: string): Record<string, unknown>;
|
|
146
181
|
/** The trail from the home page to `page`, through every ancestor path that is a page. */
|
|
147
182
|
declare function breadcrumbJsonLd(pages: readonly ReleasePage[], page: ReleasePage, origin: string, basePath?: string): Record<string, unknown> | null;
|
|
@@ -202,8 +237,28 @@ declare function robotsTxt({ origin, basePath, disallowAll }: RobotsInput): stri
|
|
|
202
237
|
* (a page lives there now). A move back undoes the earlier redirect.
|
|
203
238
|
*/
|
|
204
239
|
declare function redirectsAfterMove(redirects: readonly Redirect[], from: string, to: string): Redirect[];
|
|
205
|
-
/**
|
|
240
|
+
/** Is `path` under the prefix redirect's `from` (`/people/ana` under `/people`)? */
|
|
241
|
+
declare function isUnderPrefix(path: string, from: string): boolean;
|
|
242
|
+
/**
|
|
243
|
+
* The exact redirect for a request path, if any (on the normalised path).
|
|
244
|
+
* Prefix redirects apply only where no page is: `matchPrefixRedirect`.
|
|
245
|
+
*/
|
|
206
246
|
declare function matchRedirect(redirects: readonly Redirect[], path: string): Redirect | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* The prefix redirect for a path with no page, the longest `from` first, and
|
|
249
|
+
* where it goes: `to`, plus the rest of the path when it keeps it.
|
|
250
|
+
*/
|
|
251
|
+
declare function matchPrefixRedirect(redirects: readonly Redirect[], path: string): {
|
|
252
|
+
redirect: Redirect;
|
|
253
|
+
to: string;
|
|
254
|
+
} | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* The redirects a visitor never gets out of: following each one (and, for a
|
|
257
|
+
* prefix redirect, an address under it) as the handler would comes back to
|
|
258
|
+
* an address it has passed, or keeps going past `maxHops` (an address that
|
|
259
|
+
* grows on every hop). The `from` of each, once.
|
|
260
|
+
*/
|
|
261
|
+
declare function redirectLoops(redirects: readonly Redirect[], hasPage?: (path: string) => boolean, maxHops?: number): string[];
|
|
207
262
|
|
|
208
263
|
declare const exampleBrands: Readonly<{
|
|
209
264
|
riverside: {
|
|
@@ -230,4 +285,4 @@ declare const exampleBrands: Readonly<{
|
|
|
230
285
|
};
|
|
231
286
|
}>;
|
|
232
287
|
|
|
233
|
-
export { AnySectionDefinition, DEFAULT_LANDING_DIRECTORY, LANDING_SLUG, LivePost, type MigratedNode, type MigratedPage, type MigrationIssue, PageDoc, PageMeta$1 as PageMeta, type PageMetaInput, PostSummary, Redirect, ReleasePage, ReservedPaths, type RobotsInput, type RssInput, SectionNode, type PageMeta as SeoPageMeta, SiteDoc, type SitemapInput, absoluteUrl, articleJsonLd, breadcrumbJsonLd, escapeXml, exampleBrands, isLandingPage, landingDirectory, landingDirectoryProblems, landingMoves, landingPages, landingPath, landingSlugOf, landingSlugProblems, matchRedirect, migrateNode, migratePage, migrateSite, organizationJsonLd, pageMeta, pageTitle, postDescription, postPath, redirectsAfterMove, robotsTxt, rssXml, safeJsonForHtml, sitemapXml, websiteJsonLd };
|
|
288
|
+
export { AnySectionDefinition, DEFAULT_LANDING_DIRECTORY, LANDING_SLUG, LivePost, type MigratedNode, type MigratedPage, type MigrationIssue, NOT_FOUND_PATH, PageDoc, PageMeta$1 as PageMeta, type PageMetaInput, PostSummary, Redirect, ReleasePage, ReservedPaths, type RobotsInput, type RssInput, SectionNode, type PageMeta as SeoPageMeta, SiteDoc, type SitemapInput, absoluteUrl, articleJsonLd, breadcrumbJsonLd, escapeXml, exampleBrands, faqPageJsonLd, isLandingPage, isNotFoundPage, isPageShown, isUnderPrefix, landingDirectory, landingDirectoryProblems, landingMoves, landingPages, landingPath, landingSlugOf, landingSlugProblems, localBusinessJsonLd, matchPrefixRedirect, matchRedirect, migrateNode, migratePage, migrateSite, nextPageBoundary, notFoundPageDoc, organizationJsonLd, pageMeta, pageTitle, pageWindow, pageWindowProblems, postDescription, postPath, redirectLoops, redirectsAfterMove, robotsTxt, rssXml, safeJsonForHtml, sitemapXml, websiteJsonLd };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { LATIN_UNICODE_RANGE, SELF_HOSTED_FONTS, fontFileKey } from './chunk-OFJISW3T.js';
|
|
2
|
-
export {
|
|
2
|
+
export { exampleBrands, landingPage, onePageSite, redirectDestinations, redirectFromProblems, redirectToProblems, removeRedirect, starterSite, upsertRedirect } from './chunk-UUC5USJH.js';
|
|
3
3
|
export { isPlainEmail, mailtoHref } from './chunk-VZUDRPFG.js';
|
|
4
|
-
export { ASSET_TYPES, FONT_CHOICES, PublishBlockedError, SiteConflictError, assetPath, brandDisplayName, checkAssetHosts, checkBlog, checkContrast, checkHtmlOutline, checkPage, checkPost, checkRelease, checkSiteDoc, contrastRatio, createMemorySiteStore, formCacheTag, hexToHslTriplet, isConflict, isOwnUrl, isPublishable, isSiteBrand, luminance, migrateNode, migratePage, migrateSite, mix, parseHex, prepareImportPost, prepareRelease, siteCacheTag, siteTheme, stableHash, themeCss, toCanonicalBrand, withCacheInvalidation } from './chunk-
|
|
5
|
-
export { BUILT_IN_SECTION_TYPES, BodyFontChoice, Copy, FileRef, FontChoice, Href, Image, Line, Link, LinkEvent, MAX_DOC_BYTES, MAX_IMPORT_POSTS, MAX_LIVE_POSTS, MenuItem, PageDoc, PageKind, PagePath, PostAuthor, PostDoc, PostSlug, PostSummarySchema, Redirect, ReleasePage, ReleaseSnapshot, RichText, SECTION_CATEGORIES, SectionDefinitionError, SectionId, SectionNode, Seo, SeoDefaults, SiteDoc, Surface, TokenOverrides, absoluteUrl, articleJsonLd, breadcrumbJsonLd, defineSection, escapeXml, getSection, listSections, matchRedirect, newSectionId, nodeFromPreset, opensInNewTab, organizationJsonLd, pageMeta, pageTitle, parseSnapshot, postDescription, postPath, postSummary, redirectsAfterMove, registerBuiltInSection, registerSection, richTextPlain, robotsTxt, rssXml, safeJsonForHtml, sectionJsonSchema, sectionManifests, sitemapXml, unregisterSection, validatePostSlug, websiteJsonLd } from './chunk-
|
|
6
|
-
export { DEFAULT_RESERVED_PATHS, MAX_PAGE_PATH_LENGTH, MAX_URL_LENGTH, PAGE_PATH, isExternalHref, isReservedPath, isSafeHref, isSafeImageSrc, normalizeRequestPath, pagePathProblems, validatePagePath } from './chunk-
|
|
4
|
+
export { ASSET_TYPES, DEFAULT_LANDING_DIRECTORY, FONT_CHOICES, LANDING_SLUG, PublishBlockedError, SiteConflictError, applyCheckLevels, assetPath, brandDisplayName, checkAssetHosts, checkBlog, checkContrast, checkHtmlOutline, checkPage, checkPost, checkRelease, checkSiteDoc, contrastRatio, createMemorySiteStore, formCacheTag, hexToHslTriplet, isConflict, isLandingPage, isOwnUrl, isPageShown, isPublishable, isSiteBrand, landingDirectory, landingDirectoryProblems, landingMoves, landingPages, landingPath, landingSlugOf, landingSlugProblems, luminance, migrateNode, migratePage, migrateSite, mix, nextPageBoundary, pageWindow, pageWindowProblems, parseHex, prepareImportPost, prepareRelease, siteCacheTag, siteTheme, stableHash, themeCss, toCanonicalBrand, withCacheInvalidation } from './chunk-UOKNFG5O.js';
|
|
5
|
+
export { BUILT_IN_SECTION_TYPES, BodyFontChoice, Copy, FileRef, FontChoice, Href, Image, Line, Link, LinkEvent, MAX_DOC_BYTES, MAX_IMPORT_POSTS, MAX_LIVE_POSTS, MenuItem, NOT_FOUND_PATH, PageDoc, PageKind, PagePath, PostAuthor, PostDoc, PostSlug, PostSummarySchema, Redirect, ReleasePage, ReleaseSnapshot, RichText, SECTION_CATEGORIES, SectionDefinitionError, SectionId, SectionNode, Seo, SeoDefaults, SiteDoc, Surface, TokenOverrides, absoluteUrl, articleJsonLd, breadcrumbJsonLd, defineSection, escapeXml, faqPageJsonLd, getSection, isNotFoundPage, isUnderPrefix, listSections, localBusinessJsonLd, matchPrefixRedirect, matchRedirect, newSectionId, nodeFromPreset, notFoundPageDoc, opensInNewTab, organizationJsonLd, pageMeta, pageTitle, parseSnapshot, postDescription, postPath, postSummary, redirectLoops, redirectsAfterMove, registerBuiltInSection, registerSection, richTextPlain, robotsTxt, rssXml, safeJsonForHtml, sectionJsonSchema, sectionManifests, sitemapXml, unregisterSection, validatePostSlug, websiteJsonLd } from './chunk-QGU6FDH5.js';
|
|
6
|
+
export { DEFAULT_RESERVED_PATHS, MAX_PAGE_PATH_LENGTH, MAX_URL_LENGTH, PAGE_PATH, isExternalHref, isReservedPath, isSafeHref, isSafeImageSrc, normalizeRequestPath, pagePathProblems, validatePagePath } from './chunk-CXBBUKGB.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { j as Redirect, P as PageMeta } from './registry-Cw7NF_le.js';
|
|
2
|
+
import { R as ReservedPaths } from './store-BNYD5NAQ.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A place a redirect can go, offered in the editor's picker: `path` is a site
|
|
6
|
+
* path (`/f/feedback`) or a full URL, `label` names it, and `group` is the
|
|
7
|
+
* heading it is listed under ("Forms", "Offers").
|
|
8
|
+
*/
|
|
9
|
+
interface RedirectDestination {
|
|
10
|
+
group: string;
|
|
11
|
+
label: string;
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
/** The site's own pages and landing pages as destinations, then the host's (`extra`), each path once. */
|
|
15
|
+
declare function redirectDestinations(pages: readonly Pick<PageMeta, "path" | "title" | "kind">[], extra?: readonly RedirectDestination[]): RedirectDestination[];
|
|
16
|
+
interface RedirectContext {
|
|
17
|
+
/** The site's redirects now. */
|
|
18
|
+
redirects: readonly Redirect[];
|
|
19
|
+
/** The site's pages: a redirect can't take a page's address. */
|
|
20
|
+
pages: readonly Pick<PageMeta, "path">[];
|
|
21
|
+
reserved?: ReservedPaths | undefined;
|
|
22
|
+
/** The address of the redirect being edited, which may keep it. */
|
|
23
|
+
editing?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** Why a redirect can't be from `from` (empty when it can). */
|
|
26
|
+
declare function redirectFromProblems(from: string, ctx: RedirectContext, how?: RedirectMatch): string[];
|
|
27
|
+
/** How a redirect matches: its `from` only, or everything under it too. */
|
|
28
|
+
interface RedirectMatch {
|
|
29
|
+
match?: "prefix" | undefined;
|
|
30
|
+
keepRest?: boolean | undefined;
|
|
31
|
+
}
|
|
32
|
+
/** Why a redirect from `from` can't go to `to` (empty when it can). */
|
|
33
|
+
declare function redirectToProblems(from: string, to: string, ctx: RedirectContext, how?: RedirectMatch): string[];
|
|
34
|
+
/**
|
|
35
|
+
* The redirects with `next` added, or put in place of the one from `replacing`.
|
|
36
|
+
* Redirects that went to `next.from` go straight to `next.to` (no chains),
|
|
37
|
+
* and any left pointing at their own address are dropped.
|
|
38
|
+
*/
|
|
39
|
+
declare function upsertRedirect(redirects: readonly Redirect[], next: Redirect, replacing?: string): Redirect[];
|
|
40
|
+
/** The redirects without the one from `from`. */
|
|
41
|
+
declare function removeRedirect(redirects: readonly Redirect[], from: string): Redirect[];
|
|
42
|
+
|
|
43
|
+
export { type RedirectDestination as R, type RedirectContext as a, type RedirectMatch as b, redirectFromProblems as c, redirectToProblems as d, removeRedirect as e, redirectDestinations as r, upsertRedirect as u };
|
|
@@ -148,6 +148,8 @@ declare const PageDoc: z.ZodObject<{
|
|
|
148
148
|
props: z.ZodObject<{
|
|
149
149
|
title: z.ZodString;
|
|
150
150
|
hideSiteChrome: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
showFrom: z.ZodOptional<z.ZodISODateTime>;
|
|
152
|
+
showUntil: z.ZodOptional<z.ZodISODateTime>;
|
|
151
153
|
}, z.core.$loose>;
|
|
152
154
|
}, z.core.$strip>;
|
|
153
155
|
content: z.ZodArray<z.ZodObject<{
|
|
@@ -214,6 +216,8 @@ declare const Redirect: z.ZodObject<{
|
|
|
214
216
|
from: z.ZodString;
|
|
215
217
|
to: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
216
218
|
status: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>]>;
|
|
219
|
+
match: z.ZodOptional<z.ZodLiteral<"prefix">>;
|
|
220
|
+
keepRest: z.ZodOptional<z.ZodBoolean>;
|
|
217
221
|
}, z.core.$strip>;
|
|
218
222
|
type Redirect = z.infer<typeof Redirect>;
|
|
219
223
|
/** Fonts a site may choose for its headings: genesis-design-system's `FONT_IDS` (see `FONT_CHOICES` for their stacks). */
|
|
@@ -333,6 +337,29 @@ declare const SeoDefaults: z.ZodObject<{
|
|
|
333
337
|
logo: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
334
338
|
sameAs: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
335
339
|
}, z.core.$strip>>;
|
|
340
|
+
localBusiness: z.ZodOptional<z.ZodObject<{
|
|
341
|
+
type: z.ZodDefault<z.ZodString>;
|
|
342
|
+
name: z.ZodOptional<z.ZodString>;
|
|
343
|
+
description: z.ZodOptional<z.ZodString>;
|
|
344
|
+
telephone: z.ZodOptional<z.ZodString>;
|
|
345
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
346
|
+
foundingDate: z.ZodOptional<z.ZodString>;
|
|
347
|
+
priceRange: z.ZodOptional<z.ZodString>;
|
|
348
|
+
image: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
349
|
+
address: z.ZodObject<{
|
|
350
|
+
streetAddress: z.ZodString;
|
|
351
|
+
addressLocality: z.ZodString;
|
|
352
|
+
addressRegion: z.ZodOptional<z.ZodString>;
|
|
353
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
354
|
+
addressCountry: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
geo: z.ZodOptional<z.ZodObject<{
|
|
357
|
+
latitude: z.ZodNumber;
|
|
358
|
+
longitude: z.ZodNumber;
|
|
359
|
+
}, z.core.$strip>>;
|
|
360
|
+
openingHours: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
361
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
362
|
+
}, z.core.$strip>>;
|
|
336
363
|
noindex: z.ZodOptional<z.ZodBoolean>;
|
|
337
364
|
}, z.core.$strip>;
|
|
338
365
|
type SeoDefaults = z.infer<typeof SeoDefaults>;
|
|
@@ -450,12 +477,37 @@ declare const SiteDoc: z.ZodObject<{
|
|
|
450
477
|
logo: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
451
478
|
sameAs: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
452
479
|
}, z.core.$strip>>;
|
|
480
|
+
localBusiness: z.ZodOptional<z.ZodObject<{
|
|
481
|
+
type: z.ZodDefault<z.ZodString>;
|
|
482
|
+
name: z.ZodOptional<z.ZodString>;
|
|
483
|
+
description: z.ZodOptional<z.ZodString>;
|
|
484
|
+
telephone: z.ZodOptional<z.ZodString>;
|
|
485
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
486
|
+
foundingDate: z.ZodOptional<z.ZodString>;
|
|
487
|
+
priceRange: z.ZodOptional<z.ZodString>;
|
|
488
|
+
image: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
489
|
+
address: z.ZodObject<{
|
|
490
|
+
streetAddress: z.ZodString;
|
|
491
|
+
addressLocality: z.ZodString;
|
|
492
|
+
addressRegion: z.ZodOptional<z.ZodString>;
|
|
493
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
494
|
+
addressCountry: z.ZodOptional<z.ZodString>;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
geo: z.ZodOptional<z.ZodObject<{
|
|
497
|
+
latitude: z.ZodNumber;
|
|
498
|
+
longitude: z.ZodNumber;
|
|
499
|
+
}, z.core.$strip>>;
|
|
500
|
+
openingHours: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
501
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
502
|
+
}, z.core.$strip>>;
|
|
453
503
|
noindex: z.ZodOptional<z.ZodBoolean>;
|
|
454
504
|
}, z.core.$strip>>;
|
|
455
505
|
redirects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
456
506
|
from: z.ZodString;
|
|
457
507
|
to: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
458
508
|
status: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>]>;
|
|
509
|
+
match: z.ZodOptional<z.ZodLiteral<"prefix">>;
|
|
510
|
+
keepRest: z.ZodOptional<z.ZodBoolean>;
|
|
459
511
|
}, z.core.$strip>>>;
|
|
460
512
|
images: z.ZodOptional<z.ZodEnum<{
|
|
461
513
|
any: "any";
|
|
@@ -482,6 +534,8 @@ declare const ReleasePage: z.ZodObject<{
|
|
|
482
534
|
props: z.ZodObject<{
|
|
483
535
|
title: z.ZodString;
|
|
484
536
|
hideSiteChrome: z.ZodOptional<z.ZodBoolean>;
|
|
537
|
+
showFrom: z.ZodOptional<z.ZodISODateTime>;
|
|
538
|
+
showUntil: z.ZodOptional<z.ZodISODateTime>;
|
|
485
539
|
}, z.core.$loose>;
|
|
486
540
|
}, z.core.$strip>;
|
|
487
541
|
content: z.ZodArray<z.ZodObject<{
|
|
@@ -644,12 +698,37 @@ declare const ReleaseSnapshot: z.ZodObject<{
|
|
|
644
698
|
logo: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
645
699
|
sameAs: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
646
700
|
}, z.core.$strip>>;
|
|
701
|
+
localBusiness: z.ZodOptional<z.ZodObject<{
|
|
702
|
+
type: z.ZodDefault<z.ZodString>;
|
|
703
|
+
name: z.ZodOptional<z.ZodString>;
|
|
704
|
+
description: z.ZodOptional<z.ZodString>;
|
|
705
|
+
telephone: z.ZodOptional<z.ZodString>;
|
|
706
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
707
|
+
foundingDate: z.ZodOptional<z.ZodString>;
|
|
708
|
+
priceRange: z.ZodOptional<z.ZodString>;
|
|
709
|
+
image: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
710
|
+
address: z.ZodObject<{
|
|
711
|
+
streetAddress: z.ZodString;
|
|
712
|
+
addressLocality: z.ZodString;
|
|
713
|
+
addressRegion: z.ZodOptional<z.ZodString>;
|
|
714
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
715
|
+
addressCountry: z.ZodOptional<z.ZodString>;
|
|
716
|
+
}, z.core.$strip>;
|
|
717
|
+
geo: z.ZodOptional<z.ZodObject<{
|
|
718
|
+
latitude: z.ZodNumber;
|
|
719
|
+
longitude: z.ZodNumber;
|
|
720
|
+
}, z.core.$strip>>;
|
|
721
|
+
openingHours: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
722
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
723
|
+
}, z.core.$strip>>;
|
|
647
724
|
noindex: z.ZodOptional<z.ZodBoolean>;
|
|
648
725
|
}, z.core.$strip>>;
|
|
649
726
|
redirects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
650
727
|
from: z.ZodString;
|
|
651
728
|
to: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
652
729
|
status: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>]>;
|
|
730
|
+
match: z.ZodOptional<z.ZodLiteral<"prefix">>;
|
|
731
|
+
keepRest: z.ZodOptional<z.ZodBoolean>;
|
|
653
732
|
}, z.core.$strip>>>;
|
|
654
733
|
images: z.ZodOptional<z.ZodEnum<{
|
|
655
734
|
any: "any";
|
|
@@ -673,6 +752,8 @@ declare const ReleaseSnapshot: z.ZodObject<{
|
|
|
673
752
|
props: z.ZodObject<{
|
|
674
753
|
title: z.ZodString;
|
|
675
754
|
hideSiteChrome: z.ZodOptional<z.ZodBoolean>;
|
|
755
|
+
showFrom: z.ZodOptional<z.ZodISODateTime>;
|
|
756
|
+
showUntil: z.ZodOptional<z.ZodISODateTime>;
|
|
676
757
|
}, z.core.$loose>;
|
|
677
758
|
}, z.core.$strip>;
|
|
678
759
|
content: z.ZodArray<z.ZodObject<{
|
|
@@ -717,6 +798,7 @@ declare const ReleaseSnapshot: z.ZodObject<{
|
|
|
717
798
|
}, z.core.$strip>>;
|
|
718
799
|
}, z.core.$strip>;
|
|
719
800
|
}, z.core.$strip>>;
|
|
801
|
+
brand: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
720
802
|
}, z.core.$strip>;
|
|
721
803
|
type ReleaseSnapshot = z.infer<typeof ReleaseSnapshot>;
|
|
722
804
|
/**
|
|
@@ -1042,6 +1124,15 @@ interface SectionPreset<P = Record<string, unknown>> {
|
|
|
1042
1124
|
name: string;
|
|
1043
1125
|
variant: string;
|
|
1044
1126
|
props: P;
|
|
1127
|
+
/**
|
|
1128
|
+
* The props are made-up content its owner must replace: names, prices,
|
|
1129
|
+
* times, quotes, an address, or copy that says what to write ("Say what you
|
|
1130
|
+
* do, for whom"). A section added from it is marked `placeholder`, so the
|
|
1131
|
+
* publish check holds it until it is edited or hidden, and the editor shows
|
|
1132
|
+
* its text as hints. Leave it off for a preset that is ready to publish as
|
|
1133
|
+
* it is (a header, a footer, a post list).
|
|
1134
|
+
*/
|
|
1135
|
+
sample?: boolean;
|
|
1045
1136
|
}
|
|
1046
1137
|
/** What a section's renderer is told about the page it is on. */
|
|
1047
1138
|
interface RenderContext {
|
|
@@ -1204,7 +1295,7 @@ interface SectionManifest {
|
|
|
1204
1295
|
declare function sectionManifests(): SectionManifest[];
|
|
1205
1296
|
/** A new section id: short, alphanumeric, unique enough within a page. */
|
|
1206
1297
|
declare function newSectionId(prefix?: string): string;
|
|
1207
|
-
/** A section node from a preset: the editor's Add, and templates. */
|
|
1298
|
+
/** A section node from a preset: the editor's Add, and templates. A `sample` preset's node is a `placeholder`. */
|
|
1208
1299
|
declare function nodeFromPreset(type: string, presetName?: string, id?: string): SectionNode;
|
|
1209
1300
|
|
|
1210
1301
|
export { SectionDefinitionError as $, type AnySectionDefinition as A, BUILT_IN_SECTION_TYPES as B, Copy as C, type PostDocInput as D, type PostDraft as E, type FormsResolver as F, type PostMeta as G, Href as H, Image as I, PostSlug as J, type PostStatus as K, type LivePost as L, MAX_DOC_BYTES as M, PostSummarySchema as N, type PostsContext as O, type PageMeta as P, type RegisterSectionOptions as Q, type Release as R, type SectionCategory as S, type ReleaseMeta as T, ReleaseSnapshot as U, type RenderMedia as V, RichText as W, SECTION_CATEGORIES as X, type SavePostInput as Y, type SavePostResult as Z, type SectionDefinition as _, PageKind as a, SectionId as a0, type SectionManifest as a1, type SectionPlacement as a2, type SectionPreset as a3, type SectionRenderProps as a4, type SectionVariant as a5, SeoDefaults as a6, type SiteDocInput as a7, Surface as a8, TokenOverrides as a9, defineSection as aa, getSection as ab, isPlainEmail as ac, listSections as ad, mailtoHref as ae, newSectionId as af, nodeFromPreset as ag, opensInNewTab as ah, parseSnapshot as ai, postSummary as aj, registerBuiltInSection as ak, registerSection as al, richTextPlain as am, sectionJsonSchema as an, sectionManifests as ao, unregisterSection as ap, validatePostSlug as aq, PageDoc as b, type RenderContext as c, type ResolvedForm as d, Seo as e, SectionNode as f, SiteDoc as g, ReleasePage as h, type PostSummary as i, Redirect as j, BodyFontChoice as k, type BuiltInSectionType as l, FileRef as m, FontChoice as n, type FormsResolverContext as o, type ImportPost as p, type ImportPostsResult as q, Line as r, Link as s, LinkEvent as t, MAX_IMPORT_POSTS as u, MAX_LIVE_POSTS as v, MenuItem as w, PagePath as x, PostAuthor as y, PostDoc as z };
|
package/dist/sections.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as SectionDefinition, s as Link, c as RenderContext, f as SectionNode, a8 as Surface, I as Image, m as FileRef, A as AnySectionDefinition } from './registry-
|
|
1
|
+
import { _ as SectionDefinition, W as RichText, s as Link, c as RenderContext, f as SectionNode, a8 as Surface, I as Image, m as FileRef, A as AnySectionDefinition } from './registry-Cw7NF_le.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { BandProps } from '@marktiderman/genesis-ui/band';
|
|
@@ -17,6 +17,8 @@ declare const ctaSection: Readonly<SectionDefinition<{
|
|
|
17
17
|
event?: string | undefined;
|
|
18
18
|
};
|
|
19
19
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
20
|
+
eyebrow?: string | undefined;
|
|
21
|
+
headingAccent?: string | undefined;
|
|
20
22
|
body?: string | undefined;
|
|
21
23
|
secondaryCta?: {
|
|
22
24
|
label: string;
|
|
@@ -26,16 +28,46 @@ declare const ctaSection: Readonly<SectionDefinition<{
|
|
|
26
28
|
external?: boolean | undefined;
|
|
27
29
|
event?: string | undefined;
|
|
28
30
|
} | undefined;
|
|
31
|
+
image?: {
|
|
32
|
+
src: string;
|
|
33
|
+
alt: string;
|
|
34
|
+
decorative?: boolean | undefined;
|
|
35
|
+
width?: number | undefined;
|
|
36
|
+
height?: number | undefined;
|
|
37
|
+
focal?: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
} | undefined;
|
|
41
|
+
phone?: {
|
|
42
|
+
src: string;
|
|
43
|
+
width?: number | undefined;
|
|
44
|
+
height?: number | undefined;
|
|
45
|
+
focal?: {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
} | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
placeholder?: string | undefined;
|
|
51
|
+
} | undefined;
|
|
29
52
|
anchor?: string | undefined;
|
|
30
53
|
}>>;
|
|
31
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Version 1 answers were plain strings: a blank line between paragraphs and a
|
|
57
|
+
* single line break kept as a break. Version 2 holds the same as rich text.
|
|
58
|
+
*/
|
|
59
|
+
declare function answerToRichText(text: string): RichText;
|
|
32
60
|
declare const faqSection: Readonly<SectionDefinition<{
|
|
33
61
|
heading: string;
|
|
34
62
|
items: {
|
|
35
63
|
question: string;
|
|
36
|
-
answer:
|
|
64
|
+
answer: {
|
|
65
|
+
type: "doc";
|
|
66
|
+
content?: Record<string, unknown>[] | undefined;
|
|
67
|
+
};
|
|
37
68
|
}[];
|
|
38
69
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
70
|
+
eyebrow?: string | undefined;
|
|
39
71
|
body?: string | undefined;
|
|
40
72
|
anchor?: string | undefined;
|
|
41
73
|
}>>;
|
|
@@ -84,12 +116,23 @@ declare const featuresSection: Readonly<SectionDefinition<{
|
|
|
84
116
|
event?: string | undefined;
|
|
85
117
|
} | undefined;
|
|
86
118
|
note?: string | undefined;
|
|
119
|
+
anchor?: string | undefined;
|
|
87
120
|
}[];
|
|
88
121
|
columns: 2 | 4 | 3;
|
|
89
122
|
numbered: boolean;
|
|
90
123
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
91
124
|
eyebrow?: string | undefined;
|
|
92
125
|
body?: string | undefined;
|
|
126
|
+
compare?: {
|
|
127
|
+
included: {
|
|
128
|
+
heading: string;
|
|
129
|
+
items: string[];
|
|
130
|
+
};
|
|
131
|
+
excluded: {
|
|
132
|
+
heading: string;
|
|
133
|
+
items: string[];
|
|
134
|
+
};
|
|
135
|
+
} | undefined;
|
|
93
136
|
cta?: {
|
|
94
137
|
label: string;
|
|
95
138
|
href: string;
|
|
@@ -124,6 +167,14 @@ declare const footerSection: Readonly<SectionDefinition<{
|
|
|
124
167
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
125
168
|
tagline?: string | undefined;
|
|
126
169
|
copyright?: string | undefined;
|
|
170
|
+
cta?: {
|
|
171
|
+
label: string;
|
|
172
|
+
href: string;
|
|
173
|
+
newTab?: boolean | undefined;
|
|
174
|
+
target?: "_self" | "_blank" | undefined;
|
|
175
|
+
external?: boolean | undefined;
|
|
176
|
+
event?: string | undefined;
|
|
177
|
+
} | undefined;
|
|
127
178
|
}>>;
|
|
128
179
|
|
|
129
180
|
declare const formEmbedSection: Readonly<SectionDefinition<{
|
|
@@ -158,6 +209,7 @@ declare const gallerySection: Readonly<SectionDefinition<{
|
|
|
158
209
|
caption?: string | undefined;
|
|
159
210
|
}[];
|
|
160
211
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
212
|
+
eyebrow?: string | undefined;
|
|
161
213
|
heading?: string | undefined;
|
|
162
214
|
body?: string | undefined;
|
|
163
215
|
anchor?: string | undefined;
|
|
@@ -165,7 +217,12 @@ declare const gallerySection: Readonly<SectionDefinition<{
|
|
|
165
217
|
|
|
166
218
|
declare const heroSection: Readonly<SectionDefinition<{
|
|
167
219
|
heading: string;
|
|
220
|
+
stats: {
|
|
221
|
+
value: string;
|
|
222
|
+
label: string;
|
|
223
|
+
}[];
|
|
168
224
|
eyebrow?: string | undefined;
|
|
225
|
+
headingAccent?: string | undefined;
|
|
169
226
|
body?: string | undefined;
|
|
170
227
|
primaryCta?: {
|
|
171
228
|
label: string;
|
|
@@ -234,6 +291,7 @@ declare const logosSection: Readonly<SectionDefinition<{
|
|
|
234
291
|
href?: string | undefined;
|
|
235
292
|
}[];
|
|
236
293
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
294
|
+
eyebrow?: string | undefined;
|
|
237
295
|
heading?: string | undefined;
|
|
238
296
|
claim?: string | undefined;
|
|
239
297
|
anchor?: string | undefined;
|
|
@@ -262,6 +320,7 @@ declare const navSection: Readonly<SectionDefinition<{
|
|
|
262
320
|
} | undefined;
|
|
263
321
|
placeholder?: string | undefined;
|
|
264
322
|
} | undefined;
|
|
323
|
+
tagline?: string | undefined;
|
|
265
324
|
cta?: {
|
|
266
325
|
label: string;
|
|
267
326
|
href: string;
|
|
@@ -270,6 +329,12 @@ declare const navSection: Readonly<SectionDefinition<{
|
|
|
270
329
|
external?: boolean | undefined;
|
|
271
330
|
event?: string | undefined;
|
|
272
331
|
} | undefined;
|
|
332
|
+
ctaShortLabel?: string | undefined;
|
|
333
|
+
drawerContact?: {
|
|
334
|
+
phone?: string | undefined;
|
|
335
|
+
email?: string | undefined;
|
|
336
|
+
address?: string | undefined;
|
|
337
|
+
} | undefined;
|
|
273
338
|
}>>;
|
|
274
339
|
|
|
275
340
|
declare const pricingSection: Readonly<SectionDefinition<{
|
|
@@ -290,6 +355,7 @@ declare const pricingSection: Readonly<SectionDefinition<{
|
|
|
290
355
|
} | undefined;
|
|
291
356
|
highlighted?: boolean | undefined;
|
|
292
357
|
badge?: string | undefined;
|
|
358
|
+
anchor?: string | undefined;
|
|
293
359
|
}[];
|
|
294
360
|
groups: {
|
|
295
361
|
heading: string;
|
|
@@ -309,6 +375,7 @@ declare const pricingSection: Readonly<SectionDefinition<{
|
|
|
309
375
|
} | undefined;
|
|
310
376
|
highlighted?: boolean | undefined;
|
|
311
377
|
badge?: string | undefined;
|
|
378
|
+
anchor?: string | undefined;
|
|
312
379
|
}[];
|
|
313
380
|
eyebrow?: string | undefined;
|
|
314
381
|
body?: string | undefined;
|
|
@@ -328,7 +395,9 @@ declare const richTextSection: Readonly<SectionDefinition<{
|
|
|
328
395
|
content?: Record<string, unknown>[] | undefined;
|
|
329
396
|
};
|
|
330
397
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
398
|
+
eyebrow?: string | undefined;
|
|
331
399
|
heading?: string | undefined;
|
|
400
|
+
headingAccent?: string | undefined;
|
|
332
401
|
anchor?: string | undefined;
|
|
333
402
|
}>>;
|
|
334
403
|
|
|
@@ -338,6 +407,7 @@ declare const statsSection: Readonly<SectionDefinition<{
|
|
|
338
407
|
label: string;
|
|
339
408
|
}[];
|
|
340
409
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
410
|
+
eyebrow?: string | undefined;
|
|
341
411
|
heading?: string | undefined;
|
|
342
412
|
body?: string | undefined;
|
|
343
413
|
anchor?: string | undefined;
|
|
@@ -371,6 +441,7 @@ declare const testimonialsSection: Readonly<SectionDefinition<{
|
|
|
371
441
|
} | undefined;
|
|
372
442
|
}[];
|
|
373
443
|
surface: "base" | "muted" | "accent" | "inverse";
|
|
444
|
+
eyebrow?: string | undefined;
|
|
374
445
|
heading?: string | undefined;
|
|
375
446
|
body?: string | undefined;
|
|
376
447
|
anchor?: string | undefined;
|
|
@@ -889,11 +960,22 @@ declare function SectionBand({ node, ctx, anchor, surface, spacing, width, label
|
|
|
889
960
|
className?: string;
|
|
890
961
|
children: React.ReactNode;
|
|
891
962
|
}): React.JSX.Element;
|
|
963
|
+
/** A phrase inside a heading to set in the accent colour ("Strong <em>together</em>"). */
|
|
964
|
+
declare const HeadingAccent: z.ZodOptional<z.ZodString>;
|
|
965
|
+
/**
|
|
966
|
+
* A heading with its accent phrase highlighted: the first place the phrase
|
|
967
|
+
* appears (any case). A phrase the heading doesn't contain changes nothing.
|
|
968
|
+
* On an accent or inverse band the brand colour would vanish, so the phrase
|
|
969
|
+
* is underlined there instead.
|
|
970
|
+
*/
|
|
971
|
+
declare function withAccent(heading: string, accent: string | undefined, onAccentBand?: boolean): React.ReactNode;
|
|
892
972
|
/** A section's heading block: an eyebrow, the title and a lead, centred or left. */
|
|
893
|
-
declare function SectionIntro({ ctx, eyebrow, heading, body, align, tone, size, }: {
|
|
973
|
+
declare function SectionIntro({ ctx, eyebrow, heading, accent, body, align, tone, size, }: {
|
|
894
974
|
ctx: RenderContext;
|
|
895
975
|
eyebrow?: string | undefined;
|
|
896
976
|
heading?: string | undefined;
|
|
977
|
+
/** A phrase of the heading to highlight. */
|
|
978
|
+
accent?: string | undefined;
|
|
897
979
|
body?: string | undefined;
|
|
898
980
|
align?: "center" | "left";
|
|
899
981
|
tone?: "muted" | "inherit";
|
|
@@ -924,4 +1006,4 @@ declare const siteFormSlots: {
|
|
|
924
1006
|
/** The built-in sections, in the editor's order. */
|
|
925
1007
|
declare const builtInSections: readonly AnySectionDefinition[];
|
|
926
1008
|
|
|
927
|
-
export { Anchor, ButtonLink, CHIP_TONES, HiddenTitle, ICONS, IconName, ItemTitle, MAP_PROVIDERS, type MapProvider, type ScheduleSession, SectionBand, SectionIntro, SectionTitle, SiteFormHeader, SiteImage, TextLink, WEEKDAYS, type Weekday, blogListSection, builtInSections, ctaSection, faqSection, featuresSection, fileDescription, fileHref, fileSection, footerSection, formEmbedSection, formatPostDate, formatTime, gallerySection, heroSection, linkAttrs, logosSection, mapEmbedUrl, mapPageUrl, mapSection, navSection, postBodySection, pricingSection, resolveHref, richTextSection, scheduleSection, siteFormSlots, statsSection, teamSection, testimonialsSection, timelineSection, titleId };
|
|
1009
|
+
export { Anchor, ButtonLink, CHIP_TONES, HeadingAccent, HiddenTitle, ICONS, IconName, ItemTitle, MAP_PROVIDERS, type MapProvider, type ScheduleSession, SectionBand, SectionIntro, SectionTitle, SiteFormHeader, SiteImage, TextLink, WEEKDAYS, type Weekday, answerToRichText, blogListSection, builtInSections, ctaSection, faqSection, featuresSection, fileDescription, fileHref, fileSection, footerSection, formEmbedSection, formatPostDate, formatTime, gallerySection, heroSection, linkAttrs, logosSection, mapEmbedUrl, mapPageUrl, mapSection, navSection, postBodySection, pricingSection, resolveHref, richTextSection, scheduleSection, siteFormSlots, statsSection, teamSection, testimonialsSection, timelineSection, titleId, withAccent };
|
package/dist/sections.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Anchor, ButtonLink, CHIP_TONES, HiddenTitle, ICONS, IconName, ItemTitle, MAP_PROVIDERS, SectionBand, SectionIntro, SectionTitle, SiteFormHeader, SiteImage, TextLink, WEEKDAYS, blogListSection, builtInSections, ctaSection, faqSection, featuresSection, fileDescription, fileHref, fileSection, footerSection, formEmbedSection, formatPostDate, formatTime, gallerySection, heroSection, linkAttrs, logosSection, mapEmbedUrl, mapPageUrl, mapSection, navSection, postBodySection, pricingSection, resolveHref, richTextSection, scheduleSection, siteFormSlots, statsSection, teamSection, testimonialsSection, timelineSection, titleId } from './chunk-
|
|
1
|
+
export { Anchor, ButtonLink, CHIP_TONES, HeadingAccent, HiddenTitle, ICONS, IconName, ItemTitle, MAP_PROVIDERS, SectionBand, SectionIntro, SectionTitle, SiteFormHeader, SiteImage, TextLink, WEEKDAYS, answerToRichText, blogListSection, builtInSections, ctaSection, faqSection, featuresSection, fileDescription, fileHref, fileSection, footerSection, formEmbedSection, formatPostDate, formatTime, gallerySection, heroSection, linkAttrs, logosSection, mapEmbedUrl, mapPageUrl, mapSection, navSection, postBodySection, pricingSection, resolveHref, richTextSection, scheduleSection, siteFormSlots, statsSection, teamSection, testimonialsSection, timelineSection, titleId, withAccent } from './chunk-SBONYMUC.js';
|
|
2
2
|
import './chunk-VZUDRPFG.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-QGU6FDH5.js';
|
|
4
|
+
import './chunk-CXBBUKGB.js';
|
|
5
5
|
//# sourceMappingURL=sections.js.map
|
|
6
6
|
//# sourceMappingURL=sections.js.map
|