@marktiderman/genesis-sites 0.8.0 → 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 +128 -11
- package/SKILL.md +5 -0
- package/dist/analytics.d.ts +184 -0
- package/dist/analytics.js +3 -0
- package/dist/analytics.js.map +1 -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-YGLB7VKL.js.map → assets.generated-ZBFSP23U.js.map} +1 -1
- package/dist/{chunk-MXV2HOJO.js → chunk-5G2H6EZ2.js} +6 -6
- 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-FMQTSXJN.js → chunk-ATRS5GSD.js} +60 -19
- 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-6CXTOPYI.js → chunk-QGU6FDH5.js} +74 -8
- package/dist/chunk-QGU6FDH5.js.map +1 -0
- package/dist/{chunk-I767PDBR.js → chunk-SBONYMUC.js} +38 -15
- package/dist/chunk-SBONYMUC.js.map +1 -0
- package/dist/{chunk-YAMQ2JKO.js → chunk-UOKNFG5O.js} +127 -14
- package/dist/chunk-UOKNFG5O.js.map +1 -0
- package/dist/{chunk-QE7KS2JS.js → chunk-UUC5USJH.js} +8 -45
- package/dist/chunk-UUC5USJH.js.map +1 -0
- package/dist/editor.d.ts +63 -14
- package/dist/editor.js +682 -254
- package/dist/editor.js.map +1 -1
- package/dist/handler-OR554RTS.js +11 -0
- package/dist/{handler-J5BCH2VW.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 +23 -9
- package/dist/index.js +4 -4
- package/dist/{redirects-BNSD9MKa.d.ts → redirects-LcCNIJHQ.d.ts} +2 -2
- package/dist/{registry-BPn-tDlL.d.ts → registry-Cw7NF_le.d.ts} +17 -1
- package/dist/sections.d.ts +1 -1
- package/dist/sections.js +3 -3
- package/dist/{store-B_GMH42V.d.ts → store-BNYD5NAQ.d.ts} +30 -4
- package/dist/supabase.d.ts +4 -4
- package/dist/supabase.js +4 -4
- package/dist/{templates-CFSSG1iU.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-Dw42GDI_.d.ts → theme-HJzN2tOm.d.ts} +2 -2
- package/dist/web.d.ts +49 -13
- package/dist/web.js +7 -6
- package/package.json +6 -2
- package/dist/assets/islands.83aaf5e0df.js +0 -1
- package/dist/assets/sites-forms.bac9a6aafd.css +0 -10
- package/dist/assets/sites.323090ba26.css +0 -2
- package/dist/assets.generated-YGLB7VKL.js +0 -3
- package/dist/chunk-6CXTOPYI.js.map +0 -1
- package/dist/chunk-FMQTSXJN.js.map +0 -1
- package/dist/chunk-I767PDBR.js.map +0 -1
- package/dist/chunk-MU2Z2C4F.js.map +0 -1
- package/dist/chunk-MXV2HOJO.js.map +0 -1
- package/dist/chunk-QE7KS2JS.js.map +0 -1
- package/dist/chunk-YAMQ2JKO.js.map +0 -1
- package/dist/handler-J5BCH2VW.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/schemas.ts","../src/core/not-found.ts","../src/core/posts.ts","../src/core/seo.ts","../src/core/registry.ts","../src/core/sample-images.ts"],"names":["z"],"mappings":";;;;;AAgBA,IAAI,OAAQ,CAAA,CAAiC,YAAA,KAAiB,UAAA,EAAY;AACxE,EAAA,MAAM,IA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,8OAAA,CAAA,EAAkP,GAAA,EAAK,EAAE,CAAA;AAAA,IAClQ,KAAA,EAAO,GAAA;AAAA,IACP,MAAA,EAAQ;AAAA;AAEZ,CAAA;AAEA,IAAM,UAAA,GAAa,CAAC,GAAA,KAAgC;AAClD,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,EAAU,OAAO,IAAA;AACpC,EAAA,IAAI,GAAA,CAAI,UAAA,CAAW,mBAAmB,CAAA,EAAG;AACvC,IAAA,MAAM,IAAA,GAAO,IAAI,KAAA,CAAM,mBAAA,CAAoB,MAAM,CAAA,CAAE,OAAA,CAAQ,UAAU,EAAE,CAAA;AACvE,IAAA,OAAO,IAAA,IAAQ,UAAU,IAAA,GAAO,IAAA;AAAA,EAClC;AACA,EAAA,OAAO,cAAA,CAAe,GAAG,CAAA,IAAK,IAAA;AAChC,CAAA;AAGO,SAAS,cAAc,GAAA,EAAuB;AACnD,EAAA,OAAO,UAAA,CAAW,GAAG,CAAA,KAAM,IAAA;AAC7B;AAGO,SAAS,YAAY,GAAA,EAAqE;AAC/F,EAAA,MAAM,IAAA,GAAO,WAAW,GAAG,CAAA;AAC3B,EAAA,OAAO,IAAA,GAAO,OAAA,CAAQ,IAAI,CAAA,GAAK,IAAA;AACjC;AAGO,IAAM,aAAa,CAAC,IAAA,KAA2B,CAAA,EAAG,mBAAmB,GAAG,IAAI,CAAA,IAAA","file":"chunk-QGU6FDH5.js","sourcesContent":["/**\n * The documents a site is made of, as zod 4 schemas: a `SiteDoc` (theme,\n * header, navigation, footer, SEO defaults, redirects), one `PageDoc` per\n * page (its sections and SEO), and the `ReleaseSnapshot` a publish freezes.\n *\n * A page's `content` is an array of `{ id, type, v, variant, props }`\n * section nodes, which is the shape Puck's `content` uses, so the editor\n * reads and writes these documents unchanged. A section's `props` are\n * checked by that section's own schema (see `defineSection`), not here.\n */\nimport { MAX_PLACEHOLDER, isSafePlaceholder } from \"@marktiderman/genesis-media\";\nimport { z } from \"zod\";\nimport { FONT_IDS } from \"@marktiderman/genesis-design-system/fonts\";\nimport { MAX_URL_LENGTH, PAGE_PATH, isSafeHref, isSafeImageSrc } from \"./urls\";\n\n/** zod 4 is required: `z.toJSONSchema` (editor fields, AI output) exists only there. */\nif (typeof (z as { toJSONSchema?: unknown }).toJSONSchema !== \"function\") {\n throw new Error(\"@marktiderman/genesis-sites needs zod 4 (zod@^4.0.0): z.toJSONSchema is missing.\");\n}\n\n// ── Building blocks for section schemas ─────────────────────────────────────\n\n/** A link target: a site path, a fragment, or an http(s), mailto or tel URL. */\nexport const Href = z\n .string()\n .max(MAX_URL_LENGTH)\n .refine(isSafeHref, { message: \"Use a site path (/about), a #section, or an https, mailto or tel link.\" })\n .meta({ title: \"Link\", format: \"uri-reference\" });\n\n/** An analytics event name for a link: `data-gs-event` on the page (default `cta` on buttons). */\nexport const LinkEvent = z\n .string()\n .regex(/^[a-z0-9][a-z0-9_.:-]{0,47}$/, \"An event name is lowercase letters, digits and _ . : -\")\n .meta({ title: \"Analytics event\" });\n\n/**\n * A labelled link: a button, a menu entry, a footer link, an outbound\n * booking link.\n *\n * - `external: true` marks a link that leaves the site (a booking or\n * membership system): it must be an `http(s)` URL, and it renders with\n * `rel=\"noopener noreferrer\"` and `data-gs-outbound` for analytics.\n * - `target` (`_blank` for a new tab) applies to http(s) links only;\n * `newTab: true` is the older spelling of `target: \"_blank\"`.\n * - `event` names the click for the host's analytics (`data-gs-event`).\n */\nexport const Link = z\n .object({\n label: z.string().trim().min(1).max(80),\n href: Href,\n /** Opens in a new tab (http(s) links only). The same as `target: \"_blank\"`. */\n newTab: z.boolean().optional(),\n /** Where an http(s) link opens: this tab (`_self`, the default) or a new one (`_blank`). */\n target: z.enum([\"_self\", \"_blank\"]).optional().meta({ title: \"Opens in\" }),\n /** A link that leaves the site (a booking system): http(s) only, `rel=\"noopener noreferrer\"`. */\n external: z.boolean().optional().meta({ title: \"Outbound link\" }),\n event: LinkEvent.optional(),\n })\n .refine((link) => !link.external || /^https?:\\/\\//i.test(link.href), { message: \"An outbound link is an http(s) URL.\", path: [\"href\"] })\n .meta({ title: \"Link\" });\nexport type Link = z.infer<typeof Link>;\n\n/** Does this link open in a new tab? Only an http(s) link can. */\nexport const opensInNewTab = (link: Pick<Link, \"href\" | \"newTab\" | \"target\">): boolean =>\n /^https?:\\/\\//i.test(link.href) && (link.target === \"_blank\" || (link.target === undefined && link.newTab === true));\n\n/**\n * A downloadable file (a PDF timetable, a waiver): a site path (an upload\n * under `sites/<site_id>/files/`) or an https URL. `bytes` and `mime` say\n * what the visitor is about to download.\n */\nexport const FileRef = z\n .object({\n src: z\n .string()\n .max(MAX_URL_LENGTH)\n .refine(isSafeImageSrc, { message: \"A file loads from a site path or an https URL.\" }),\n /** The file's type; PDF unless it is an image. */\n mime: z.enum([\"application/pdf\", \"image/png\", \"image/jpeg\", \"image/webp\", \"image/avif\", \"image/gif\"]).default(\"application/pdf\"),\n /** Its size, shown beside the link (\"PDF, 1.2 MB\"). */\n bytes: z.number().int().positive().max(100 * 1024 * 1024).optional(),\n })\n .meta({ title: \"File\", \"x-genesis-kind\": \"file\" });\nexport type FileRef = z.infer<typeof FileRef>;\n\nconst Focal = z.object({ x: z.number().min(0).max(100), y: z.number().min(0).max(100) });\n\n/**\n * An image. `alt` describes it for someone who can't see it; an image that\n * adds nothing (a texture) is `decorative: true` and gets an empty alt. The\n * accessibility check refuses to publish an image with neither.\n */\nexport const Image = z\n .object({\n src: z\n .string()\n .max(MAX_URL_LENGTH)\n .refine(isSafeImageSrc, { message: \"An image loads from a site path or an https URL.\" }),\n alt: z.string().max(300).default(\"\"),\n decorative: z.boolean().optional(),\n width: z.number().int().positive().max(10000).optional(),\n height: z.number().int().positive().max(10000).optional(),\n /** Where the subject is, for cropping: 0–100 from the left and top. */\n focal: Focal.optional(),\n /** A crop for phones (narrow screens), shown instead under 640px wide. It shares the image's alt. */\n phone: z\n .object({\n src: z\n .string()\n .max(MAX_URL_LENGTH)\n .refine(isSafeImageSrc, { message: \"An image loads from a site path or an https URL.\" }),\n width: z.number().int().positive().max(10000).optional(),\n height: z.number().int().positive().max(10000).optional(),\n focal: Focal.optional(),\n })\n .optional(),\n /** A tiny blurred preview shown while the image loads: a base64 PNG, JPEG, WebP or GIF `data:` URI. */\n placeholder: z.string().max(MAX_PLACEHOLDER).refine(isSafePlaceholder, { message: \"A placeholder is a small base64 PNG, JPEG, WebP or GIF data: URI.\" }).optional(),\n })\n .meta({ title: \"Image\", \"x-genesis-kind\": \"image\" });\nexport type Image = z.infer<typeof Image>;\n\n/**\n * Rich text: the JSON genesis-ui's `RichTextEditor` (TipTap) produces. Only\n * its outline is checked here; genesis-ui's `RichText` sanitizes it again\n * when it renders, so a stored document can never carry raw HTML.\n */\nexport const RichText = z\n .object({\n type: z.literal(\"doc\"),\n content: z.array(z.record(z.string(), z.unknown())).max(2000).optional(),\n })\n .meta({ title: \"Rich text\", \"x-genesis-kind\": \"rich-text\" });\nexport type RichText = z.infer<typeof RichText>;\n\n/** The band a section sits on. */\nexport const Surface = z.enum([\"base\", \"muted\", \"accent\", \"inverse\"]).meta({ title: \"Background\" });\nexport type Surface = z.infer<typeof Surface>;\n\n/** A short line of copy (a heading, a label). */\nexport const Line = (max = 120) => z.string().trim().min(1).max(max);\n/** A paragraph of plain copy. */\nexport const Copy = (max = 600) => z.string().trim().max(max);\n\n// ── Section nodes and pages ─────────────────────────────────────────────────\n\n/** A section's id: stable, letters, digits, `-` and `_` (Shopify's rule). */\nexport const SectionId = z.string().regex(/^[A-Za-z0-9_-]{1,64}$/, \"A section id is 1–64 letters, digits, - or _.\");\n\nexport const SectionNode = z.object({\n id: SectionId,\n /** The section's registry key, such as `hero`. */\n type: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/),\n /** The props version the props were written at; `migrateNode` brings them up to date. */\n v: z.number().int().min(1),\n variant: z.string().max(64).optional(),\n /** Kept in the page, not rendered (Shopify's `disabled`). */\n hidden: z.boolean().optional(),\n /** Hidden on phones or on wider screens. */\n hideOn: z.array(z.enum([\"mobile\", \"desktop\"])).max(2).optional(),\n /**\n * Set by a template on content someone must replace (a sample quote). The\n * publish check refuses a visible section that still has it; the editor\n * clears it once the section is edited.\n */\n placeholder: z.boolean().optional(),\n props: z.record(z.string(), z.unknown()),\n});\nexport type SectionNode = z.infer<typeof SectionNode>;\n\nexport const Seo = z.object({\n title: z.string().trim().max(70).optional(),\n description: z.string().trim().max(200).optional(),\n ogImage: Image.optional(),\n /** An absolute canonical URL, when this page's content lives elsewhere. */\n canonical: z.url({ protocol: /^https?$/ }).max(MAX_URL_LENGTH).optional(),\n noindex: z.boolean().optional(),\n});\nexport type Seo = z.infer<typeof Seo>;\n\nexport const PageDoc = z.object({\n schemaVersion: z.literal(1),\n root: z.object({\n props: z.looseObject({\n title: z.string().trim().min(1).max(120),\n /** Leave out the site's header and footer (a focused landing page). */\n hideSiteChrome: z.boolean().optional(),\n /** Shown from this time (ISO, with an offset); before it, as if the page weren't there. */\n showFrom: z.iso.datetime({ offset: true }).optional(),\n /** Shown until this time (ISO, with an offset); from it, as if the page weren't there. */\n showUntil: z.iso.datetime({ offset: true }).optional(),\n }),\n }),\n content: z.array(SectionNode).max(60),\n seo: Seo.optional(),\n});\nexport type PageDoc = z.infer<typeof PageDoc>;\n\n/**\n * What a page is: an ordinary `page`, a focused `landing` page, or the\n * `post` page: the template every blog post renders in. A site has at most\n * one post page; at its own path (`/blog`) it is the blog's index, and at\n * `/blog/<slug>` it shows that post in its `post-body` section.\n */\nexport const PageKind = z.enum([\"page\", \"landing\", \"post\"]);\nexport type PageKind = z.infer<typeof PageKind>;\n\nexport const PagePath = z.string().max(200).regex(PAGE_PATH, 'A page path looks like \"/\" or \"/about\".');\n\n// ── The site ────────────────────────────────────────────────────────────────\n\nexport const MenuItem = z.object({\n label: z.string().trim().min(1).max(40),\n href: Href,\n});\nexport type MenuItem = z.infer<typeof MenuItem>;\n\nexport const Redirect = z.object({\n from: PagePath,\n to: Href,\n status: z.union([z.literal(301), z.literal(302)]),\n /**\n * `\"prefix\"`: also every address under `from` (`/people` takes\n * `/people/ana`), where no page or post is: pages win. Unset: `from` only.\n */\n match: z.literal(\"prefix\").optional(),\n /** With `\"prefix\"` and a site path `to`: keep the rest of the address (`/people/ana` → `/team/ana`). */\n keepRest: z.boolean().optional(),\n});\nexport type Redirect = z.infer<typeof Redirect>;\n\n/** Fonts a site may choose for its headings: genesis-design-system's `FONT_IDS` (see `FONT_CHOICES` for their stacks). */\nexport const FontChoice = z.enum(FONT_IDS);\nexport type FontChoice = z.infer<typeof FontChoice>;\n\n/** Fonts a site may choose for its body text: every choice but the display faces that have one weight. */\nexport const BodyFontChoice = FontChoice.exclude([\"bebas-neue\"]);\nexport type BodyFontChoice = z.infer<typeof BodyFontChoice>;\n\n/**\n * A site's theme choices on top of the brand: token choices only, never raw\n * CSS, so a site stays inside the design system.\n */\nexport const TokenOverrides = z.object({\n radius: z.enum([\"none\", \"sm\", \"md\", \"lg\", \"full\"]).optional(),\n headingFont: FontChoice.optional(),\n bodyFont: BodyFontChoice.optional(),\n});\nexport type TokenOverrides = z.infer<typeof TokenOverrides>;\n\nexport const SeoDefaults = z.object({\n /** `%s` is the page's title: `\"%s · Riverside Works\"`. */\n titleTemplate: z.string().max(80).optional(),\n description: z.string().trim().max(200).optional(),\n ogImage: Image.optional(),\n /** Organization facts for JSON-LD. */\n organization: z\n .object({\n name: z.string().trim().min(1).max(120),\n logo: z.string().max(MAX_URL_LENGTH).refine(isSafeImageSrc).optional(),\n sameAs: z.array(z.url({ protocol: /^https$/ }).max(MAX_URL_LENGTH)).max(10).optional(),\n })\n .optional(),\n /**\n * The business at an address, for JSON-LD on the home page (and `pages`):\n * `type` is a schema.org LocalBusiness type (`LocalBusiness`, or a more\n * specific one such as `Store`); its logo, links and URL come from the site.\n */\n localBusiness: z\n .object({\n type: z.string().regex(/^[A-Z][A-Za-z]{2,40}$/, \"A schema.org type, such as LocalBusiness.\").default(\"LocalBusiness\"),\n name: z.string().trim().min(1).max(120).optional(),\n description: z.string().trim().max(300).optional(),\n telephone: z.string().trim().regex(/^\\+?[0-9 ().-]{5,30}$/).optional(),\n email: z.email().max(254).optional(),\n /** `YYYY`, `YYYY-MM` or `YYYY-MM-DD`. */\n foundingDate: z.string().regex(/^\\d{4}(-\\d{2}){0,2}$/).optional(),\n priceRange: z.string().trim().max(20).optional(),\n image: z.string().max(MAX_URL_LENGTH).refine(isSafeImageSrc).optional(),\n address: z.object({\n streetAddress: z.string().trim().min(1).max(200),\n addressLocality: z.string().trim().min(1).max(100),\n addressRegion: z.string().trim().max(100).optional(),\n postalCode: z.string().trim().max(20).optional(),\n /** ISO 3166-1 alpha-2, such as US. */\n addressCountry: z.string().regex(/^[A-Z]{2}$/).optional(),\n }),\n geo: z.object({ latitude: z.number().min(-90).max(90), longitude: z.number().min(-180).max(180) }).optional(),\n /** schema.org opening hours: `\"Mo-Fr 06:00-20:00\"`, `\"Sa 08:00-12:00\"`. */\n openingHours: z.array(z.string().regex(/^(Mo|Tu|We|Th|Fr|Sa|Su)(-(Mo|Tu|We|Th|Fr|Sa|Su))?(,(Mo|Tu|We|Th|Fr|Sa|Su)(-(Mo|Tu|We|Th|Fr|Sa|Su))?)* \\d{2}:\\d{2}-\\d{2}:\\d{2}$/)).max(14).optional(),\n /** The pages that carry it besides the home page (a contact page). */\n pages: z.array(z.string().max(200).regex(PAGE_PATH)).max(10).optional(),\n })\n .optional(),\n noindex: z.boolean().optional(),\n});\nexport type SeoDefaults = z.infer<typeof SeoDefaults>;\n\nexport const SiteDoc = z.object({\n schemaVersion: z.literal(1),\n name: z.string().trim().min(1).max(120),\n /** BCP 47 language of the site's pages. */\n lang: z.string().regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/).default(\"en\"),\n theme: z\n .object({\n colorScheme: z.enum([\"light\", \"dark\", \"auto\"]).default(\"light\"),\n overrides: TokenOverrides.optional(),\n })\n .default({ colorScheme: \"light\" }),\n /** The site's header: usually one `nav` section. */\n header: z.array(SectionNode).max(2).default([]),\n /** The header's menu. */\n nav: z.array(MenuItem).max(12).default([]),\n /** The site's footer: usually one `footer` section. */\n footer: z.array(SectionNode).max(3).default([]),\n seo: SeoDefaults.default({}),\n redirects: z.array(Redirect).max(500).default([]),\n /**\n * Where the site's images and files may load from. `\"own\"`: only the site\n * itself and the store's asset origin. An image elsewhere then blocks the\n * publish, and the page's Content-Security-Policy refuses other hosts.\n * Unset: any https host, and an image elsewhere is a warning.\n */\n images: z.enum([\"any\", \"own\"]).optional(),\n /**\n * Landing pages (pages of kind `landing`): `directory` is the path the\n * editor makes new ones under (`/go/spring-offer`). Unset: `/go`\n * (`DEFAULT_LANDING_DIRECTORY`). It is where new landing pages go, not a\n * rule: each page's own path is checked when it is made or moved.\n */\n landing: z.object({ directory: PagePath.refine((p) => p !== \"/\", { message: \"Landing pages need a directory of their own, not /.\" }) }).optional(),\n});\nexport type SiteDoc = z.infer<typeof SiteDoc>;\n/** A `SiteDoc` as written, before defaults. */\nexport type SiteDocInput = z.input<typeof SiteDoc>;\n\n// ── Releases ────────────────────────────────────────────────────────────────\n\nexport const ReleasePage = z.object({\n id: z.string().min(1),\n path: PagePath,\n kind: PageKind,\n doc: PageDoc,\n});\nexport type ReleasePage = z.infer<typeof ReleasePage>;\n\n/** Everything a published site serves: the site document and every page, frozen at publish. */\nexport const ReleaseSnapshot = z.object({\n schemaVersion: z.literal(1),\n site: SiteDoc,\n pages: z.array(ReleasePage).max(500),\n /**\n * The brand the release was published with (a `BrandInput`). The live site\n * renders with it, so a brand edit goes live with the next publish and a\n * rollback brings back the look it had. Releases from before it have none:\n * they render with the host's current brand.\n */\n brand: z.record(z.string(), z.unknown()).optional(),\n});\nexport type ReleaseSnapshot = z.infer<typeof ReleaseSnapshot>;\n\n/**\n * Read a stored snapshot page by page: a page that no longer parses (a\n * schema this release tightened, a document written past the checks) is\n * left out and reported, so one bad page doesn't take the whole site down.\n * Null only when the site document itself doesn't parse.\n */\nexport function parseSnapshot(value: unknown, report: (message: string) => void = (m) => console.error(`[genesis-sites] ${m}`)): ReleaseSnapshot | null {\n const raw = value && typeof value === \"object\" ? (value as { schemaVersion?: unknown; site?: unknown; pages?: unknown }) : {};\n if (raw.schemaVersion !== 1) {\n report(\"the snapshot isn't schemaVersion 1.\");\n return null;\n }\n const site = SiteDoc.safeParse(raw.site);\n if (!site.success) {\n report(`the snapshot's site document doesn't parse: ${site.error.message}`);\n return null;\n }\n const pages: ReleasePage[] = [];\n for (const page of Array.isArray(raw.pages) ? raw.pages.slice(0, 500) : []) {\n const parsed = ReleasePage.safeParse(page);\n if (parsed.success) pages.push(parsed.data);\n else report(`the page ${JSON.stringify((page as { path?: unknown })?.path ?? \"?\")} doesn't parse and is left out: ${parsed.error.message}`);\n }\n const brand = raw && typeof (raw as { brand?: unknown }).brand === \"object\" && (raw as { brand?: unknown }).brand !== null && !Array.isArray((raw as { brand?: unknown }).brand) ? ((raw as { brand: Record<string, unknown> }).brand) : undefined;\n return { schemaVersion: 1, site: site.data, pages, ...(brand ? { brand } : {}) };\n}\n\nexport interface ReleaseMeta {\n id: string;\n siteId: string;\n number: number;\n note: string | null;\n createdAt: string;\n publishedAt: string | null;\n /** The brand the release was checked against (`brandHash`), when known. */\n brandHash: string | null;\n}\n\nexport interface Release extends ReleaseMeta {\n snapshot: ReleaseSnapshot;\n}\n\nexport interface PageMeta {\n id: string;\n siteId: string;\n path: string;\n kind: PageKind;\n title: string;\n sort: number;\n rev: number;\n}\n\n/** The size limit of one stored document, as the database enforces it (512 KiB of JSON). */\nexport const MAX_DOC_BYTES = 512 * 1024;\n","/**\n * The site's 404 page: the page at `/404`, made and edited like any other\n * page, with the site's sections. A visitor to an address the site doesn't\n * have sees it (with `unknownPath: \"not-found\"`), with status 404 and\n * `noindex`; a site without one shows the built-in \"Page not found\" text.\n * It stays out of the sitemap and the menu's suggestions.\n */\nimport type { PageDoc, PageMeta } from \"./schemas\";\n\n/** Where a site's 404 page lives. */\nexport const NOT_FOUND_PATH = \"/404\";\n\n/** Is this the site's 404 page (the page at `/404`)? */\nexport function isNotFoundPage(page: Pick<PageMeta, \"path\">): boolean {\n return page.path === NOT_FOUND_PATH;\n}\n\n/** A starting 404 page: a heading, a line of copy and a button home. */\nexport function notFoundPageDoc(input: { title?: string } = {}): PageDoc {\n const title = input.title?.trim() || \"Page not found\";\n return {\n schemaVersion: 1,\n root: { props: { title: title.slice(0, 120) } },\n content: [\n {\n id: \"not-found\",\n type: \"hero\",\n v: 1,\n variant: \"centered\",\n props: {\n heading: title.slice(0, 90),\n body: \"There's no page at this address. It may have moved.\",\n primaryCta: { label: \"Go to the home page\", href: \"/\" },\n },\n },\n ],\n seo: { noindex: true },\n };\n}\n","/**\n * Blog posts: a site's collection of dated articles.\n *\n * A post is its own document (`PostDoc`), kept beside the pages rather than\n * in them, with a draft and a published copy. `publishPost` checks the draft\n * and copies it to the published copy; that copy is what visitors see, so\n * a post goes live (and comes down) on its own, without republishing the\n * site. The site's `post` page is the template every post renders in: at its\n * own path it is the blog's index, and at `<path>/<slug>` it shows the post.\n */\nimport { z } from \"zod\";\nimport { Copy, Href, Image, Line, RichText, Seo } from \"./schemas\";\n\n/** A post's slug: lowercase letters, digits and single hyphens (`september-testing`). */\nexport const PostSlug = z\n .string()\n .max(80)\n .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, \"A post slug is lowercase letters, digits and single hyphens.\");\n\nexport const PostAuthor = z.object({\n name: Line(80),\n /** Their page: a site path or an http(s) URL. */\n url: Href.optional(),\n});\n\nexport const PostDoc = z.object({\n schemaVersion: z.literal(1),\n title: Line(160),\n /** A sentence or two for the list, search results and the feed. */\n excerpt: Copy(400).optional(),\n body: RichText,\n cover: Image.optional(),\n author: PostAuthor.optional(),\n category: Line(60).optional(),\n tags: z.array(Line(40)).max(12).optional(),\n seo: Seo.optional(),\n});\nexport type PostDoc = z.infer<typeof PostDoc>;\nexport type PostDocInput = z.input<typeof PostDoc>;\n\nexport type PostStatus = \"draft\" | \"published\";\n\n/** A post as the editor lists it. */\nexport interface PostMeta {\n id: string;\n siteId: string;\n slug: string;\n title: string;\n status: PostStatus;\n /** The draft's revision, for compare-and-swap saves. */\n rev: number;\n /** When it was first published (kept when it is published again), or null. */\n publishedAt: string | null;\n updatedAt: string;\n}\n\n/** A post's draft, for the editor. */\nexport interface PostDraft extends PostMeta {\n doc: PostDoc;\n}\n\n/** A published post, as visitors see it. */\nexport interface LivePost {\n slug: string;\n publishedAt: string;\n /** When its published copy last changed. */\n updatedAt: string;\n doc: PostDoc;\n}\n\n/** A published post in a list: everything but the body. */\nexport interface PostSummary {\n slug: string;\n title: string;\n excerpt?: string;\n cover?: Image;\n author?: z.infer<typeof PostAuthor>;\n category?: string;\n /** Kept out of the sitemap and the feed (`seo.noindex`, or a canonical elsewhere). */\n noindex?: boolean;\n publishedAt: string;\n updatedAt: string;\n}\n\n/** A list item as a store returns it, checked: a stored row that skipped the checks is left out. */\nexport const PostSummarySchema = z.object({\n slug: PostSlug,\n title: Line(160),\n excerpt: Copy(400).optional(),\n cover: Image.optional(),\n author: PostAuthor.optional(),\n category: Line(60).optional(),\n noindex: z.boolean().optional(),\n publishedAt: z.string().refine((s) => !Number.isNaN(Date.parse(s)), \"a date\"),\n updatedAt: z.string().refine((s) => !Number.isNaN(Date.parse(s)), \"a date\"),\n});\n\n/** The most posts a list reads (the newest first). */\nexport const MAX_LIVE_POSTS = 500;\n\n/** A save of a post: a new one (no `id`), or a compare-and-swap of an existing one's draft. */\nexport interface SavePostInput {\n id?: string;\n slug: string;\n /** The draft revision this save started from (required with `id`). */\n rev?: number;\n doc: PostDocInput;\n}\n\nexport type SavePostResult = { id: string; rev: number } | { id: string; conflict: PostDoc; rev: number };\n\n/** One post to import (a move from another site): published as of `publishedAt` unless it fails a check. */\nexport interface ImportPost {\n slug: string;\n doc: PostDocInput;\n /** When it was first published, kept from the old site (default: now). */\n publishedAt?: string;\n /** `draft` imports it unpublished. Default `published`. */\n status?: PostStatus;\n}\n\nexport interface ImportPostsResult {\n /** Imported posts: published, or a draft when asked for or when a check failed (see `issues`). */\n imported: { slug: string; id: string; status: PostStatus; issues?: string[] }[];\n /** Posts left out: a slug the site already has, or a document that doesn't parse. */\n skipped: { slug: string; reason: string }[];\n}\n\n/** The most posts one `importPosts` call takes. */\nexport const MAX_IMPORT_POSTS = 500;\n\n/** A published post as a list item. */\nexport function postSummary(post: LivePost): PostSummary {\n const d = post.doc;\n return {\n slug: post.slug,\n title: d.title,\n ...(d.excerpt ? { excerpt: d.excerpt } : {}),\n ...(d.cover ? { cover: d.cover } : {}),\n ...(d.author ? { author: d.author } : {}),\n ...(d.category ? { category: d.category } : {}),\n ...(d.seo?.noindex || d.seo?.canonical ? { noindex: true } : {}),\n publishedAt: post.publishedAt,\n updatedAt: post.updatedAt,\n };\n}\n\n/** Plain text of a rich text document (for a feed's description when a post has no excerpt). */\nexport function richTextPlain(value: unknown, max = 400): string {\n const out: string[] = [];\n const walk = (node: unknown) => {\n if (out.join(\" \").length > max || !node || typeof node !== \"object\") return;\n const n = node as { type?: unknown; text?: unknown; content?: unknown };\n if (n.type === \"text\" && typeof n.text === \"string\") out.push(n.text);\n if (Array.isArray(n.content)) n.content.forEach(walk);\n };\n walk(value);\n const text = out.join(\" \").replace(/\\s+/g, \" \").trim();\n return text.length > max ? `${text.slice(0, max - 1).trimEnd()}…` : text;\n}\n\n/** Validate a post slug, throwing with a readable message. */\nexport function validatePostSlug(slug: string): string {\n const parsed = PostSlug.safeParse(slug);\n if (!parsed.success) throw new Error(`\"${slug}\": ${parsed.error.issues[0]?.message ?? \"not a post slug\"}`);\n return slug;\n}\n","/**\n * SEO: a page's meta tags (title, description, canonical, robots, Open Graph,\n * Twitter), sitemap.xml, robots.txt, JSON-LD (Organization, WebSite,\n * BreadcrumbList), and the redirects a page move leaves behind.\n *\n * Canonical and absolute URLs are built from `origin`, the site's primary\n * address, which the host passes in. Nothing here reads a request's Host.\n */\nimport type { LivePost, PostSummary } from \"./posts\";\nimport { richTextPlain } from \"./posts\";\nimport type { Image, PageDoc, Redirect, ReleasePage, SiteDoc } from \"./schemas\";\nimport { isNotFoundPage } from \"./not-found\";\nimport { isSafeHref } from \"./urls\";\n\nexport interface PageMetaInput {\n site: SiteDoc;\n page: ReleasePage;\n /** The site's primary origin, `https://riverside.example`, no trailing slash. */\n origin: string;\n /** The path prefix the site is served under (`\"\"` at the root). */\n basePath?: string;\n /** A preview: always `noindex`. */\n preview?: boolean;\n /** The page is a blog post: Open Graph says `article`, with its dates. */\n article?: { publishedTime: string; modifiedTime?: string; author?: string; section?: string };\n}\n\nexport interface PageMeta {\n title: string;\n description?: string;\n canonical: string;\n robots: string;\n openGraph: Record<string, string>;\n twitter: Record<string, string>;\n}\n\n/** `s` without its trailing slashes. A loop, not `/\\/+$/`, which backtracks on a long run of slashes. */\nfunction trimTrailingSlashes(s: string): string {\n let end = s.length;\n while (end > 0 && s.charCodeAt(end - 1) === 47 /* \"/\" */) end--;\n return s.slice(0, end);\n}\n\n/** The absolute URL of a site path. */\nexport function absoluteUrl(origin: string, basePath: string, path: string): string {\n const base = trimTrailingSlashes(origin) + trimTrailingSlashes(basePath ?? \"\");\n return path === \"/\" ? `${base}/` : `${base}${path}`;\n}\n\nfunction imageUrl(image: Image | undefined, origin: string, basePath: string): string | undefined {\n if (!image) return undefined;\n return image.src.startsWith(\"/\") ? absoluteUrl(origin, basePath, image.src) : image.src;\n}\n\n/**\n * The page's title with the site's template (`%s · Riverside Works`), so every\n * tab and search result names the site. An SEO title written for the page\n * (`seo.title`) is used as it is, and a page titled with the site's name\n * isn't given it twice.\n */\nexport function pageTitle(site: SiteDoc, doc: PageDoc, _path: string): string {\n const own = doc.seo?.title?.trim();\n if (own) return own;\n const title = doc.root.props.title;\n const template = site.seo.titleTemplate;\n if (!template || !template.includes(\"%s\")) return title;\n // A page titled with the site's own name (often the home page) gets it once, not \"Name · Name\".\n const rest = trimSeparators(template.replace(\"%s\", \"\"));\n if (rest && rest.toLowerCase() === title.trim().toLowerCase()) return title;\n return template.replace(\"%s\", title);\n}\n\nconst SEPARATOR = /[\\s·|•—–:-]/;\n\n/** Trims spaces and title separators from both ends, in one pass (no backtracking regex). */\nfunction trimSeparators(text: string): string {\n let start = 0;\n let end = text.length;\n while (start < end && SEPARATOR.test(text[start]!)) start++;\n while (end > start && SEPARATOR.test(text[end - 1]!)) end--;\n return text.slice(start, end);\n}\n\n/** Every meta value a page prints in its `<head>`. */\nexport function pageMeta({ site, page, origin, basePath = \"\", preview = false, article }: PageMetaInput): PageMeta {\n const doc = page.doc;\n const title = pageTitle(site, doc, page.path);\n const description = doc.seo?.description?.trim() || site.seo.description?.trim() || undefined;\n const canonical = doc.seo?.canonical ?? absoluteUrl(origin, basePath, page.path);\n const noindex = preview || site.seo.noindex === true || doc.seo?.noindex === true;\n const image = doc.seo?.ogImage ?? site.seo.ogImage;\n const img = imageUrl(image, origin, basePath);\n const openGraph: Record<string, string> = {\n \"og:type\": \"website\",\n \"og:title\": title,\n \"og:url\": canonical,\n \"og:site_name\": site.name,\n \"og:locale\": site.lang.replace(\"-\", \"_\"),\n };\n if (description) openGraph[\"og:description\"] = description;\n if (article) {\n openGraph[\"og:type\"] = \"article\";\n openGraph[\"article:published_time\"] = new Date(article.publishedTime).toISOString();\n if (article.modifiedTime) openGraph[\"article:modified_time\"] = new Date(article.modifiedTime).toISOString();\n if (article.author) openGraph[\"article:author\"] = article.author;\n if (article.section) openGraph[\"article:section\"] = article.section;\n }\n if (img) {\n openGraph[\"og:image\"] = img;\n if (image?.alt) openGraph[\"og:image:alt\"] = image.alt;\n if (image?.width) openGraph[\"og:image:width\"] = String(image.width);\n if (image?.height) openGraph[\"og:image:height\"] = String(image.height);\n }\n const twitter: Record<string, string> = { \"twitter:card\": img ? \"summary_large_image\" : \"summary\", \"twitter:title\": title };\n if (description) twitter[\"twitter:description\"] = description;\n if (img) twitter[\"twitter:image\"] = img;\n return {\n title,\n ...(description ? { description } : {}),\n canonical,\n robots: noindex ? \"noindex, nofollow\" : \"index, follow\",\n openGraph,\n twitter,\n };\n}\n\n// ── JSON-LD ─────────────────────────────────────────────────────────────────\n\nexport function organizationJsonLd(site: SiteDoc, origin: string, basePath = \"\"): Record<string, unknown> {\n const org = site.seo.organization;\n const out: Record<string, unknown> = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Organization\",\n name: org?.name ?? site.name,\n url: absoluteUrl(origin, basePath, \"/\"),\n };\n if (org?.logo) out.logo = org.logo.startsWith(\"/\") ? absoluteUrl(origin, basePath, org.logo) : org.logo;\n if (org?.sameAs?.length) out.sameAs = org.sameAs;\n return out;\n}\n\n/** The site's business at its address (`seo.localBusiness`), or null when it has none or `path` doesn't carry it. */\nexport function localBusinessJsonLd(site: SiteDoc, path: string, origin: string, basePath = \"\"): Record<string, unknown> | null {\n const biz = site.seo.localBusiness;\n if (!biz || (path !== \"/\" && !(biz.pages ?? []).includes(path))) return null;\n const org = site.seo.organization;\n const abs = (src: string) => (src.startsWith(\"/\") ? absoluteUrl(origin, basePath, src) : src);\n const out: Record<string, unknown> = {\n \"@context\": \"https://schema.org\",\n \"@type\": biz.type ?? \"LocalBusiness\",\n name: biz.name ?? org?.name ?? site.name,\n url: absoluteUrl(origin, basePath, \"/\"),\n address: { \"@type\": \"PostalAddress\", ...biz.address },\n };\n if (biz.description) out.description = biz.description;\n if (biz.telephone) out.telephone = biz.telephone;\n if (biz.email) out.email = biz.email;\n if (biz.foundingDate) out.foundingDate = biz.foundingDate;\n if (biz.priceRange) out.priceRange = biz.priceRange;\n if (biz.image ?? org?.logo) out.image = abs((biz.image ?? org?.logo)!);\n if (org?.logo) out.logo = abs(org.logo);\n if (biz.geo) out.geo = { \"@type\": \"GeoCoordinates\", ...biz.geo };\n if (biz.openingHours?.length) out.openingHours = biz.openingHours;\n if (org?.sameAs?.length) out.sameAs = org.sameAs;\n return out;\n}\n\n/**\n * The page's questions and answers as one FAQPage: every visible `faq`\n * section's items, in order. Null when the page has none.\n */\n/**\n * An FAQ answer as plain text: a string as it is, or a rich text document's\n * words (text in a block runs together; blocks and line breaks are spaces).\n */\nfunction answerText(answer: unknown): string {\n if (typeof answer === \"string\") return answer.trim();\n const out: string[] = [];\n const walk = (node: unknown) => {\n if (!node || typeof node !== \"object\") return;\n const n = node as { type?: unknown; text?: unknown; content?: unknown };\n if (n.type === \"text\" && typeof n.text === \"string\") out.push(n.text);\n else if (n.type === \"hardBreak\") out.push(\" \");\n if (Array.isArray(n.content)) {\n n.content.forEach(walk);\n if (n.type !== \"doc\") out.push(\" \");\n }\n };\n walk(answer);\n return out.join(\"\").replace(/\\s+/g, \" \").trim();\n}\n\nexport function faqPageJsonLd(page: Pick<PageDoc, \"content\">): Record<string, unknown> | null {\n const items: { question: string; answer: string }[] = [];\n const walk = (nodes: readonly { type: string; hidden?: boolean | undefined; props: Record<string, unknown> }[]) => {\n for (const node of nodes) {\n if (node.hidden) continue;\n if (node.type === \"faq\" && Array.isArray(node.props.items)) {\n for (const item of node.props.items as { question?: unknown; answer?: unknown }[]) {\n const answer = answerText(item?.answer);\n if (typeof item?.question === \"string\" && item.question.trim() && answer) items.push({ question: item.question.trim(), answer });\n }\n }\n }\n };\n walk(page.content);\n if (!items.length) return null;\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"FAQPage\",\n mainEntity: items.map((i) => ({ \"@type\": \"Question\", name: i.question, acceptedAnswer: { \"@type\": \"Answer\", text: i.answer } })),\n };\n}\n\nexport function websiteJsonLd(site: SiteDoc, origin: string, basePath = \"\"): Record<string, unknown> {\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"WebSite\",\n name: site.name,\n url: absoluteUrl(origin, basePath, \"/\"),\n inLanguage: site.lang,\n };\n}\n\n/** The trail from the home page to `page`, through every ancestor path that is a page. */\nexport function breadcrumbJsonLd(pages: readonly ReleasePage[], page: ReleasePage, origin: string, basePath = \"\"): Record<string, unknown> | null {\n if (page.path === \"/\") return null;\n const byPath = new Map(pages.map((p) => [p.path, p]));\n const trail: ReleasePage[] = [];\n const home = byPath.get(\"/\");\n if (home) trail.push(home);\n const segments = page.path.split(\"/\").filter(Boolean);\n for (let i = 1; i <= segments.length; i++) {\n const ancestor = byPath.get(`/${segments.slice(0, i).join(\"/\")}`);\n if (ancestor) trail.push(ancestor);\n }\n if (trail.length < 2) return null;\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"BreadcrumbList\",\n itemListElement: trail.map((p, i) => ({\n \"@type\": \"ListItem\",\n position: i + 1,\n name: p.doc.root.props.title,\n item: absoluteUrl(origin, basePath, p.path),\n })),\n };\n}\n\n/** An ISO date, or null when the value isn't a date (a stored row that skipped the checks). */\nfunction isoDate(value: unknown): string | null {\n if (typeof value !== \"string\" && typeof value !== \"number\") return null;\n const d = new Date(value);\n return Number.isNaN(d.getTime()) ? null : d.toISOString();\n}\n\n/** Text for a feed, or undefined when the value isn't text. */\nconst textOf = (value: unknown): string | undefined => (typeof value === \"string\" && value ? value : undefined);\n\n/** The URL of a post: `<post page path>/<slug>`. */\nexport function postPath(postsPath: string, slug: string): string {\n return `${postsPath === \"/\" ? \"\" : postsPath}/${slug}`;\n}\n\n/** `Article` JSON-LD for a blog post. */\nexport function articleJsonLd(site: SiteDoc, post: LivePost, url: string, origin: string, basePath = \"\"): Record<string, unknown> {\n const d = post.doc;\n const org = site.seo.organization;\n const publisher: Record<string, unknown> = { \"@type\": \"Organization\", name: org?.name ?? site.name, url: absoluteUrl(origin, basePath, \"/\") };\n if (org?.logo) publisher.logo = { \"@type\": \"ImageObject\", url: org.logo.startsWith(\"/\") ? absoluteUrl(origin, basePath, org.logo) : org.logo };\n const description = d.excerpt ?? d.seo?.description;\n const image = imageUrl(d.cover ?? d.seo?.ogImage, origin, basePath);\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Article\",\n headline: d.title.slice(0, 110),\n ...(description ? { description } : {}),\n ...(image ? { image: [image] } : {}),\n datePublished: new Date(post.publishedAt).toISOString(),\n dateModified: new Date(post.updatedAt).toISOString(),\n author: d.author\n ? { \"@type\": \"Person\", name: d.author.name, ...(d.author.url && isSafeHref(d.author.url) ? { url: d.author.url.startsWith(\"/\") ? absoluteUrl(origin, basePath, d.author.url) : d.author.url } : {}) }\n : { \"@type\": \"Organization\", name: org?.name ?? site.name },\n publisher,\n mainEntityOfPage: { \"@type\": \"WebPage\", \"@id\": url },\n ...(d.category ? { articleSection: d.category } : {}),\n ...(d.tags?.length ? { keywords: d.tags.join(\", \") } : {}),\n inLanguage: site.lang,\n };\n}\n\nexport interface RssInput {\n site: SiteDoc;\n /** Published posts, newest first. */\n posts: readonly PostSummary[];\n /** The post page's path (`/blog`). */\n postsPath: string;\n /** Its title, the feed's (default: the site's name). */\n title?: string;\n origin: string;\n basePath?: string;\n /** The most items (default 20). */\n limit?: number;\n}\n\n/** The blog's RSS 2.0 feed: the newest posts, with their excerpts. */\nexport function rssXml({ site, posts, postsPath, title, origin, basePath = \"\", limit = 20 }: RssInput): string {\n const link = absoluteUrl(origin, basePath, postsPath);\n const self = absoluteUrl(origin, basePath, \"/rss.xml\");\n // A post whose stored fields aren't what they should be is left out, not the whole feed.\n const usable = posts.filter((p) => !p.noindex && textOf(p.title) && textOf(p.slug) && isoDate(p.publishedAt));\n const items = usable.slice(0, limit).map((p) => {\n const url = absoluteUrl(origin, basePath, postPath(postsPath, p.slug));\n const excerpt = textOf(p.excerpt);\n const category = textOf(p.category);\n const author = textOf(p.author?.name);\n return [\n \"<item>\",\n `<title>${escapeXml(p.title)}</title>`,\n `<link>${escapeXml(url)}</link>`,\n `<guid isPermaLink=\"true\">${escapeXml(url)}</guid>`,\n `<pubDate>${new Date(isoDate(p.publishedAt)!).toUTCString()}</pubDate>`,\n excerpt ? `<description>${escapeXml(excerpt)}</description>` : \"\",\n category ? `<category>${escapeXml(category)}</category>` : \"\",\n author ? `<dc:creator>${escapeXml(author)}</dc:creator>` : \"\",\n \"</item>\",\n ].join(\"\");\n });\n const newest = usable[0];\n return (\n `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n` +\n `<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"><channel>` +\n `<title>${escapeXml(title ?? site.name)}</title>` +\n `<link>${escapeXml(link)}</link>` +\n `<description>${escapeXml(site.seo.description ?? `Posts from ${site.name}`)}</description>` +\n `<language>${escapeXml(site.lang)}</language>` +\n `<atom:link href=\"${escapeXml(self)}\" rel=\"self\" type=\"application/rss+xml\"/>` +\n (newest ? `<lastBuildDate>${new Date(isoDate(newest.updatedAt) ?? isoDate(newest.publishedAt)!).toUTCString()}</lastBuildDate>` : \"\") +\n `${items.join(\"\")}</channel></rss>\\n`\n );\n}\n\n/** A post's description for a feed or a page with no excerpt: its first words. */\nexport const postDescription = (doc: LivePost[\"doc\"]): string | undefined => doc.excerpt ?? doc.seo?.description ?? (richTextPlain(doc.body, 200) || undefined);\n\n/**\n * JSON for a `<script type=\"application/ld+json\">` (or any JSON inside HTML):\n * `<`, `>`, `&` and the line separators are escaped as `\\uXXXX`, so stored\n * text can never close the script element or open a comment.\n */\nexport function safeJsonForHtml(value: unknown): string {\n return JSON.stringify(value)\n .replace(/</g, \"\\\\u003c\")\n .replace(/>/g, \"\\\\u003e\")\n .replace(/&/g, \"\\\\u0026\")\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\n\n// ── sitemap.xml and robots.txt ──────────────────────────────────────────────\n\nexport function escapeXml(text: string): string {\n return text.replace(/[<>&'\"]/g, (c) => ({ \"<\": \"<\", \">\": \">\", \"&\": \"&\", \"'\": \"'\", '\"': \""\" })[c]!);\n}\n\nexport interface SitemapInput {\n site: SiteDoc;\n pages: readonly ReleasePage[];\n origin: string;\n basePath?: string;\n /** The release's publish time, as every page's `lastmod`. */\n lastModified?: string | null;\n /** The blog: its post page's path and the published posts (each with its own `lastmod`). */\n posts?: { path: string; items: readonly PostSummary[] };\n}\n\n/** sitemap.xml: every indexable page (not `noindex`, not one whose canonical points elsewhere). */\nexport function sitemapXml({ site, pages, origin, basePath = \"\", lastModified, posts }: SitemapInput): string {\n const urls = site.seo.noindex\n ? []\n : pages\n // The 404 page is never a page to index.\n .filter((p) => !p.doc.seo?.noindex && !p.doc.seo?.canonical && !isNotFoundPage(p))\n .sort((a, b) => (a.path === \"/\" ? -1 : b.path === \"/\" ? 1 : a.path.localeCompare(b.path)))\n .map((p) => {\n const loc = `<loc>${escapeXml(absoluteUrl(origin, basePath, p.path))}</loc>`;\n const mod = lastModified ? `<lastmod>${escapeXml(new Date(lastModified).toISOString())}</lastmod>` : \"\";\n return `<url>${loc}${mod}</url>`;\n });\n const blogPage = posts ? pages.find((p) => p.path === posts.path) : undefined;\n if (posts && !site.seo.noindex && blogPage && !blogPage.doc.seo?.noindex) {\n for (const p of posts.items) {\n if (p.noindex) continue;\n const mod = isoDate(p.updatedAt) ?? isoDate(p.publishedAt);\n urls.push(`<url><loc>${escapeXml(absoluteUrl(origin, basePath, postPath(posts.path, p.slug)))}</loc>${mod ? `<lastmod>${escapeXml(mod)}</lastmod>` : \"\"}</url>`);\n }\n }\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">${urls.join(\"\")}</urlset>\\n`;\n}\n\nexport interface RobotsInput {\n origin: string;\n basePath?: string;\n /** `Disallow: /` for everyone: a site that is `noindex`, or a preview. */\n disallowAll?: boolean;\n}\n\nexport function robotsTxt({ origin, basePath = \"\", disallowAll = false }: RobotsInput): string {\n const lines = [\"User-agent: *\", disallowAll ? \"Disallow: /\" : \"Allow: /\"];\n if (!disallowAll) lines.push(\"\", `Sitemap: ${absoluteUrl(origin, basePath, \"/sitemap.xml\")}`);\n return `${lines.join(\"\\n\")}\\n`;\n}\n\n// ── Redirects ───────────────────────────────────────────────────────────────\n\n/**\n * The redirects after a page moves from `from` to `to`: a permanent redirect\n * from the old path, earlier redirects to the old path pointed straight at\n * the new one (no chains), and any redirect away from the new path dropped\n * (a page lives there now). A move back undoes the earlier redirect.\n */\nexport function redirectsAfterMove(redirects: readonly Redirect[], from: string, to: string): Redirect[] {\n if (from === to) return [...redirects];\n const next = redirects\n .filter((r) => r.from !== to && r.from !== from)\n .map((r) => (r.to === from ? { ...r, to } : r))\n .filter((r) => r.from !== r.to);\n next.push({ from, to, status: 301 });\n return next;\n}\n\n/** Is `path` under the prefix redirect's `from` (`/people/ana` under `/people`)? */\nexport function isUnderPrefix(path: string, from: string): boolean {\n return path === from || path.startsWith(`${from}/`);\n}\n\n/**\n * The exact redirect for a request path, if any (on the normalised path).\n * Prefix redirects apply only where no page is: `matchPrefixRedirect`.\n */\nexport function matchRedirect(redirects: readonly Redirect[], path: string): Redirect | undefined {\n return redirects.find((r) => r.match !== \"prefix\" && r.from === path && isSafeHref(r.to));\n}\n\n/**\n * The prefix redirect for a path with no page, the longest `from` first, and\n * where it goes: `to`, plus the rest of the path when it keeps it.\n */\nexport function matchPrefixRedirect(redirects: readonly Redirect[], path: string): { redirect: Redirect; to: string } | undefined {\n let best: Redirect | undefined;\n for (const r of redirects) {\n if (r.match !== \"prefix\" || !isSafeHref(r.to) || !isUnderPrefix(path, r.from)) continue;\n if (!best || r.from.length > best.from.length) best = r;\n }\n if (!best) return undefined;\n const rest = path.slice(best.from.length);\n if (!best.keepRest || !rest || !best.to.startsWith(\"/\")) return { redirect: best, to: best.to };\n // The path arrives decoded: each segment is escaped again, so a `%3F` in it stays part of the path.\n const escaped = rest.split(\"/\").map(escapePathSegment).join(\"/\");\n const cut = best.to.search(/[?#]/);\n const base = cut < 0 ? best.to : best.to.slice(0, cut);\n const tail = cut < 0 ? \"\" : best.to.slice(cut);\n return { redirect: best, to: `${base === \"/\" ? \"\" : base.replace(/\\/+$/, \"\")}${escaped}${tail}` };\n}\n\n/** A decoded path segment as it may stand in a URL: `%`, `?`, `#` and the like escaped, the path's own punctuation kept. */\nfunction escapePathSegment(segment: string): string {\n return encodeURIComponent(segment).replace(/%(?:21|24|26|27|28|29|2A|2B|2C|3A|3B|3D|40)/gi, (m) => decodeURIComponent(m));\n}\n\n/** A site path's next stop for `redirectLoops`: null where the visitor lands. */\ntype RedirectStep = (path: string) => string | null;\n\n/** The path a redirect's destination names, without query or fragment (null for a full URL). */\nfunction redirectTargetPath(to: string): string | null {\n if (!to.startsWith(\"/\")) return null;\n const path = to.split(/[?#]/)[0]!;\n let decoded = path;\n try {\n decoded = decodeURIComponent(path);\n } catch {\n /* kept as written */\n }\n const lower = decoded.toLowerCase();\n return lower.length > 1 && lower.endsWith(\"/\") ? lower.slice(0, -1) : lower;\n}\n\n/**\n * Where a request for `path` goes, hop by hop, as the handler answers it: an\n * exact redirect first, then a page (`hasPage`), then a prefix redirect.\n */\nexport function redirectStep(redirects: readonly Redirect[], hasPage: (path: string) => boolean): RedirectStep {\n return (path) => {\n const exact = matchRedirect(redirects, path);\n if (exact) return redirectTargetPath(exact.to);\n if (hasPage(path)) return null;\n const prefix = matchPrefixRedirect(redirects, path);\n return prefix ? redirectTargetPath(prefix.to) : null;\n };\n}\n\n/**\n * The redirects a visitor never gets out of: following each one (and, for a\n * prefix redirect, an address under it) as the handler would comes back to\n * an address it has passed, or keeps going past `maxHops` (an address that\n * grows on every hop). The `from` of each, once.\n */\nexport function redirectLoops(redirects: readonly Redirect[], hasPage: (path: string) => boolean = () => false, maxHops = 10): string[] {\n const step = redirectStep(redirects, hasPage);\n const loops: string[] = [];\n for (const r of redirects) {\n const starts = r.match === \"prefix\" ? [r.from, `${r.from === \"/\" ? \"\" : r.from}/x-check`] : [r.from];\n const loops_ = starts.some((start) => {\n const seen = new Set<string>([start]);\n let at: string | null = start;\n for (let hop = 0; hop <= maxHops; hop++) {\n at = step(at);\n if (at === null) return false;\n if (seen.has(at)) return true;\n seen.add(at);\n }\n return true;\n });\n if (loops_) loops.push(r.from);\n }\n return loops;\n}\n","/**\n * Sections: `defineSection` describes one kind of section (its props schema,\n * variants, presets, migrations and server-safe React renderer), and the\n * registry holds every kind a site can use.\n *\n * Modelled on genesis-forms' `registerContentType`: one registry per process,\n * kept on a `Symbol.for` global so two copies of this package (a host's and a\n * dependency's) share it; manifests are frozen; a host adds its own kinds and\n * replaces a built-in only with `{ replace: true }`.\n *\n * Everything the editor needs comes from the definition: `label`,\n * `category`, `variants`, `presets` and `sectionJsonSchema(type)`\n * (`z.toJSONSchema` of the props schema) for its fields and for AI output.\n */\nimport type { ImageUrlBuilder } from \"@marktiderman/genesis-media\";\nimport type { ReactNode } from \"react\";\nimport { z } from \"zod\";\nimport type { MenuItem, PageKind, SectionNode } from \"./schemas\";\nimport type { ResolvedForm } from \"./forms\";\nimport type { LivePost, PostSummary } from \"./posts\";\n\nexport const SECTION_CATEGORIES = [\"header\", \"intro\", \"content\", \"social-proof\", \"conversion\", \"footer\"] as const;\nexport type SectionCategory = (typeof SECTION_CATEGORIES)[number];\n\n/** Where on a page a section may go: the site header, the page body, or the site footer. */\nexport type SectionPlacement = \"header\" | \"body\" | \"footer\";\n\nexport interface SectionVariant {\n id: string;\n label: string;\n}\n\nexport interface SectionPreset<P = Record<string, unknown>> {\n /** Shown in the editor's Add picker. */\n name: string;\n variant: string;\n props: P;\n /**\n * The props are made-up content its owner must replace: names, prices,\n * times, quotes, an address, or copy that says what to write (\"Say what you\n * do, for whom\"). A section added from it is marked `placeholder`, so the\n * publish check holds it until it is edited or hidden, and the editor shows\n * its text as hints. Leave it off for a preset that is ready to publish as\n * it is (a header, a footer, a post list).\n */\n sample?: boolean;\n}\n\n/** What a section's renderer is told about the page it is on. */\nexport interface RenderContext {\n /**\n * The level of the section's title: 1 for the page's main heading (the\n * first section that `providesH1`), 2 for every other section. Items in a\n * section are one level below it.\n */\n headingLevel: 1 | 2;\n site: {\n name: string;\n lang: string;\n nav: readonly MenuItem[];\n logo?: { src: string; alt: string } | undefined;\n };\n /** The page's own path, such as `/about`. */\n pagePath: string;\n /** A stored link as the page should print it: site paths get the host's base path. */\n href(href: string): string;\n /** Forms on the page, resolved by slug before rendering (null: the host doesn't know the slug). */\n forms: ReadonlyMap<string, ResolvedForm | null>;\n mode: \"live\" | \"preview\";\n /** A prefix that makes ids unique on the page: the section node's id. */\n idPrefix: string;\n /**\n * The site's blog, when it has a post page: its path, the published posts\n * (newest first, without bodies), the post this page shows (on\n * `<path>/<slug>`), and the list's page number (`?page=`).\n */\n posts?: PostsContext;\n /**\n * How the page's images load: the host's image URL builder (for `srcset`)\n * and whether the page's first large image has taken the high priority.\n * Without it, images load at their own URL and large ones lazily.\n */\n media?: RenderMedia;\n}\n\n/** One page render's image state. */\nexport interface RenderMedia {\n /** The host's image URL builder (genesis-media); pass-through when the host gives none. */\n imageUrl: ImageUrlBuilder;\n /** Set once the page's first large image has rendered: it alone loads at high priority. */\n firstLarge: { claimed: boolean };\n}\n\nexport interface PostsContext {\n /** The post page's path (`/blog`): posts live at `<path>/<slug>`. */\n path: string;\n list: readonly PostSummary[];\n current: LivePost | null;\n /** The list's page, from `?page=` (1 when absent). */\n page: number;\n}\n\nexport interface SectionRenderProps<P> {\n props: P;\n variant: string;\n node: SectionNode;\n ctx: RenderContext;\n}\n\nexport interface SectionDefinition<P = Record<string, unknown>> {\n /** The registry key stored in each node: lowercase, such as `hero`. */\n type: string;\n /** The current props version. Nodes at a lower `v` are migrated on read. */\n version: number;\n label: string;\n description?: string;\n category: SectionCategory;\n /** The props schema (zod 4). Its input type is what an editor writes. */\n schema: z.ZodType<P>;\n variants: readonly SectionVariant[];\n defaultVariant: string;\n presets: readonly SectionPreset<z.input<z.ZodType<P>>>[];\n /** At most this many on a page. */\n limit?: number;\n /** The page kinds it may appear on (default: every kind). */\n enabledOn?: readonly PageKind[];\n /** Where it may go (default: the page body). */\n placement?: SectionPlacement;\n /** Its title is the page's `h1` when it comes first (a hero). */\n providesH1?: boolean;\n /**\n * `migrations[n]` turns version `n - 1` props into version `n` props. Pure\n * functions: `migrateNode` runs them in order on read, in the editor and in\n * the renderer, and a publish writes the result into the release.\n */\n migrations?: Readonly<Record<number, (props: Record<string, unknown>) => Record<string, unknown>>>;\n /**\n * The https origins this section frames (a map), so the page's\n * Content-Security-Policy allows them in `frame-src`. Only origins the\n * section builds itself, never a URL an editor typed.\n */\n frameOrigins?: (props: P) => readonly string[];\n /** It needs the islands loader (a click-to-load map, say). */\n islands?: boolean;\n /** Server-safe React: no state, no effects, no browser APIs. Returning null gives the page's h1 back. */\n render: (input: SectionRenderProps<P>) => ReactNode;\n}\n\n/** A definition as the registry holds it: props erased to a record. */\nexport type AnySectionDefinition = SectionDefinition<any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n\nexport class SectionDefinitionError extends Error {\n constructor(readonly problems: string[]) {\n super(`Invalid section definition:\\n${problems.map((p) => ` - ${p}`).join(\"\\n\")}`);\n this.name = \"SectionDefinitionError\";\n }\n}\n\nconst TYPE = /^[a-z][a-z0-9-]{0,63}$/;\n\nfunction definitionProblems(def: AnySectionDefinition): string[] {\n const problems: string[] = [];\n if (!def || typeof def !== \"object\") return [\"a section definition is an object\"];\n const at = typeof def.type === \"string\" ? `\"${def.type}\"` : \"a section\";\n if (typeof def.type !== \"string\" || !TYPE.test(def.type)) problems.push(`${at}: \\`type\\` is lowercase letters, digits and -`);\n if (!Number.isInteger(def.version) || def.version < 1) problems.push(`${at}: \\`version\\` is a whole number from 1`);\n if (typeof def.label !== \"string\" || !def.label.trim()) problems.push(`${at}: needs a \\`label\\``);\n if (!(SECTION_CATEGORIES as readonly string[]).includes(def.category)) problems.push(`${at}: \\`category\\` is one of ${SECTION_CATEGORIES.join(\", \")}`);\n if (!def.schema || typeof (def.schema as { safeParse?: unknown }).safeParse !== \"function\") problems.push(`${at}: \\`schema\\` is a zod schema`);\n if (typeof def.render !== \"function\") problems.push(`${at}: \\`render\\` is a function`);\n const ids = new Set<string>();\n if (!Array.isArray(def.variants) || def.variants.length === 0) problems.push(`${at}: needs at least one variant`);\n else\n for (const v of def.variants) {\n if (!v || typeof v.id !== \"string\" || !/^[a-z][a-z0-9-]{0,63}$/.test(v.id) || typeof v.label !== \"string\") problems.push(`${at}: a variant is { id, label }`);\n else if (ids.has(v.id)) problems.push(`${at}: variant \"${v.id}\" is listed twice`);\n else ids.add(v.id);\n }\n if (!ids.has(def.defaultVariant)) problems.push(`${at}: \\`defaultVariant\\` \"${String(def.defaultVariant)}\" is not one of its variants`);\n if (def.limit !== undefined && (!Number.isInteger(def.limit) || def.limit < 1)) problems.push(`${at}: \\`limit\\` is a whole number from 1`);\n if (def.placement !== undefined && ![\"header\", \"body\", \"footer\"].includes(def.placement)) problems.push(`${at}: \\`placement\\` is header, body or footer`);\n if (def.frameOrigins !== undefined && typeof def.frameOrigins !== \"function\") problems.push(`${at}: \\`frameOrigins\\` is a function`);\n for (const [key, fn] of Object.entries(def.migrations ?? {})) {\n const n = Number(key);\n if (!Number.isInteger(n) || n < 2 || n > def.version) problems.push(`${at}: migration ${key} must be between 2 and the version (${def.version})`);\n if (typeof fn !== \"function\") problems.push(`${at}: migration ${key} is a function`);\n }\n for (let n = 2; n <= (Number.isInteger(def.version) ? def.version : 0); n++) {\n if (!def.migrations?.[n]) problems.push(`${at}: version ${def.version} needs a migration to ${n}`);\n }\n if (!Array.isArray(def.presets) || def.presets.length === 0) problems.push(`${at}: needs at least one preset (the editor's Add picker)`);\n else if (def.schema && typeof (def.schema as { safeParse?: unknown }).safeParse === \"function\")\n for (const preset of def.presets) {\n if (!preset || typeof preset.name !== \"string\" || !ids.has(preset.variant)) {\n problems.push(`${at}: preset ${JSON.stringify(preset?.name)} needs a name and one of its variants`);\n continue;\n }\n const parsed = def.schema.safeParse(preset.props);\n if (!parsed.success) problems.push(`${at}: preset \"${preset.name}\" doesn't match the schema: ${parsed.error.issues.map((i) => `${i.path.join(\".\") || \"props\"} ${i.message}`).join(\"; \")}`);\n }\n return problems;\n}\n\n/**\n * Declare a section kind. Checks the definition (and every preset against its\n * schema) and returns it frozen. It isn't registered until `registerSection`.\n *\n * @stability Beta\n */\nexport function defineSection<P>(def: SectionDefinition<P>): Readonly<SectionDefinition<P>> {\n const problems = definitionProblems(def as AnySectionDefinition);\n if (problems.length) throw new SectionDefinitionError(problems);\n return Object.freeze({\n ...def,\n variants: Object.freeze(def.variants.map((v) => Object.freeze({ ...v }))),\n presets: Object.freeze(def.presets.map((p) => Object.freeze({ ...p }))),\n ...(def.enabledOn ? { enabledOn: Object.freeze([...def.enabledOn]) } : {}),\n ...(def.migrations ? { migrations: Object.freeze({ ...def.migrations }) } : {}),\n });\n}\n\n// ── The registry ────────────────────────────────────────────────────────────\n\nconst REGISTRY = Symbol.for(\"@marktiderman/genesis-sites/sections@1\");\nconst BUILT_IN = Symbol.for(\"@marktiderman/genesis-sites/built-in-sections@1\");\ntype Scope = typeof globalThis & { [REGISTRY]?: Map<string, AnySectionDefinition>; [BUILT_IN]?: Set<string> };\nconst scope = globalThis as Scope;\nconst registry: Map<string, AnySectionDefinition> = (scope[REGISTRY] ??= new Map());\nconst builtIns: Set<string> = (scope[BUILT_IN] ??= new Set());\n\n/** The built-in section kinds, which a host replaces only with `{ replace: true }`. */\nexport const BUILT_IN_SECTION_TYPES = Object.freeze([\n \"nav\",\n \"hero\",\n \"features\",\n \"cta\",\n \"testimonials\",\n \"faq\",\n \"pricing\",\n \"logos\",\n \"stats\",\n \"gallery\",\n \"rich-text\",\n \"form-embed\",\n \"footer\",\n \"schedule\",\n \"team\",\n \"blog-list\",\n \"post-body\",\n \"map\",\n \"timeline\",\n \"file\",\n] as const);\nexport type BuiltInSectionType = (typeof BUILT_IN_SECTION_TYPES)[number];\n\nexport interface RegisterSectionOptions {\n /** Replace a built-in kind, for every site in this process. */\n replace?: boolean;\n}\n\n/**\n * Register a section kind (from `defineSection`, or a plain definition, which\n * is checked the same way). Re-registering a host kind replaces it, so hot\n * reload works; a built-in kind's name throws unless `{ replace: true }`.\n *\n * @stability Beta\n */\nexport function registerSection(def: AnySectionDefinition, options: RegisterSectionOptions = {}): void {\n const frozen = Object.isFrozen(def) && definitionProblems(def).length === 0 ? def : defineSection(def);\n if ((BUILT_IN_SECTION_TYPES as readonly string[]).includes(frozen.type) && options.replace !== true) {\n throw new Error(\n `registerSection: \"${frozen.type}\" is a built-in section; pass { replace: true } to replace it for every site in this process.`,\n );\n }\n registry.set(frozen.type, frozen);\n}\n\n/** For `@marktiderman/genesis-sites/sections`: register a built-in unless one (or a replacement) is there. @internal */\nexport function registerBuiltInSection(def: AnySectionDefinition): void {\n if (!registry.has(def.type)) registry.set(def.type, def);\n builtIns.add(def.type);\n}\n\nexport function getSection(type: string): AnySectionDefinition | undefined {\n return registry.get(type);\n}\n\nexport function listSections(): AnySectionDefinition[] {\n return [...registry.values()];\n}\n\n/** Remove a host section kind (tests, hot reload). Built-ins can't be removed, only replaced. */\nexport function unregisterSection(type: string): boolean {\n if ((BUILT_IN_SECTION_TYPES as readonly string[]).includes(type)) throw new Error(`unregisterSection: \"${type}\" is built in; replace it with registerSection(…, { replace: true }).`);\n return registry.delete(type);\n}\n\nconst jsonSchemas = new WeakMap<object, Record<string, unknown>>();\n\n/**\n * The JSON Schema of a section's props (`z.toJSONSchema`, input side), for the\n * editor's fields and for validating AI output. Refinements (safe URLs) don't\n * appear in JSON Schema; the zod schema still checks them on save.\n *\n * @stability Beta\n */\nexport function sectionJsonSchema(typeOrDef: string | AnySectionDefinition): Record<string, unknown> {\n const def = typeof typeOrDef === \"string\" ? registry.get(typeOrDef) : typeOrDef;\n if (!def) throw new Error(`sectionJsonSchema: no section \"${String(typeOrDef)}\" is registered.`);\n let schema = jsonSchemas.get(def.schema);\n if (!schema) {\n schema = z.toJSONSchema(def.schema, { io: \"input\", unrepresentable: \"any\" }) as Record<string, unknown>;\n jsonSchemas.set(def.schema, schema);\n }\n return schema;\n}\n\n/** What the editor's Add picker and fields need about one section kind. */\nexport interface SectionManifest {\n type: string;\n version: number;\n label: string;\n description?: string;\n category: SectionCategory;\n placement: SectionPlacement;\n variants: readonly SectionVariant[];\n defaultVariant: string;\n presets: readonly SectionPreset[];\n limit?: number;\n enabledOn?: readonly PageKind[];\n jsonSchema: Record<string, unknown>;\n}\n\n/** Every registered section as editor data (no renderers): the editor's catalog. @stability Beta */\nexport function sectionManifests(): SectionManifest[] {\n return listSections().map((def) => ({\n type: def.type,\n version: def.version,\n label: def.label,\n ...(def.description ? { description: def.description } : {}),\n category: def.category,\n placement: def.placement ?? \"body\",\n variants: def.variants,\n defaultVariant: def.defaultVariant,\n presets: def.presets as readonly SectionPreset[],\n ...(def.limit ? { limit: def.limit } : {}),\n ...(def.enabledOn ? { enabledOn: def.enabledOn } : {}),\n jsonSchema: sectionJsonSchema(def),\n }));\n}\n\nlet counter = 0;\n/** A new section id: short, alphanumeric, unique enough within a page. */\nexport function newSectionId(prefix = \"s\"): string {\n counter = (counter + 1) % 1_000_000;\n const random = Math.random().toString(36).slice(2, 8);\n return `${prefix}${Date.now().toString(36)}${counter.toString(36)}${random}`.slice(0, 64);\n}\n\n/** A section node from a preset: the editor's Add, and templates. A `sample` preset's node is a `placeholder`. */\nexport function nodeFromPreset(type: string, presetName?: string, id = newSectionId(type.replace(/-/g, \"\").slice(0, 6))): SectionNode {\n const def = registry.get(type);\n if (!def) throw new Error(`nodeFromPreset: no section \"${type}\" is registered.`);\n const preset = presetName ? def.presets.find((p) => p.name === presetName) : def.presets[0];\n if (!preset) throw new Error(`nodeFromPreset: \"${type}\" has no preset \"${presetName}\".`);\n return { id, type, v: def.version, variant: preset.variant, ...(preset.sample ? { placeholder: true } : {}), props: structuredClone(preset.props) as Record<string, unknown> };\n}\n","/**\n * Sample images for section presets (a photo grid, a logo row), drawn inline\n * so a new section shows a picture, never a broken image, before its owner\n * uploads their own. A sample lives at a reserved site path; the renderer\n * swaps in the inline SVG, and the `sample-image` check flags one (blocking,\n * warning or off, as the app chooses).\n */\n\n/** Where samples live: no upload is ever stored here. */\nexport const SAMPLE_IMAGE_PREFIX = \"/_gs/sample/\";\n\n/** Before samples had their own paths, the presets pointed at files no site had. */\nconst LEGACY_SAMPLES: Readonly<Record<string, string>> = {\n \"/photo-1.jpg\": \"photo\",\n \"/photo-2.jpg\": \"photo\",\n \"/photo-3.jpg\": \"photo\",\n \"/logo-partner.svg\": \"logo\",\n};\n\nconst svg = (body: string, w: number, h: number) =>\n `data:image/svg+xml,${encodeURIComponent(`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${w} ${h}\" width=\"${w}\" height=\"${h}\">${body}</svg>`)}`;\n\nconst SAMPLES: Readonly<Record<string, { src: string; width: number; height: number }>> = {\n // A grey frame with a sun and hills: a photo goes here.\n photo: {\n src: svg(\n `<rect width=\"800\" height=\"800\" fill=\"gainsboro\"/><circle cx=\"560\" cy=\"270\" r=\"70\" fill=\"silver\"/><path d=\"M0 620 L250 360 L430 540 L560 420 L800 640 L800 800 L0 800 Z\" fill=\"silver\"/>`,\n 800,\n 800,\n ),\n width: 800,\n height: 800,\n },\n // A rounded grey mark: a logo goes here.\n logo: {\n src: svg(`<rect x=\"4\" y=\"4\" width=\"232\" height=\"72\" rx=\"14\" fill=\"none\" stroke=\"darkgray\" stroke-width=\"4\" stroke-dasharray=\"10 8\"/><text x=\"120\" y=\"50\" font-family=\"system-ui, sans-serif\" font-size=\"24\" fill=\"gray\" text-anchor=\"middle\">Logo</text>`, 240, 80),\n width: 240,\n height: 80,\n },\n};\n\nconst sampleName = (src: unknown): string | null => {\n if (typeof src !== \"string\") return null;\n if (src.startsWith(SAMPLE_IMAGE_PREFIX)) {\n const name = src.slice(SAMPLE_IMAGE_PREFIX.length).replace(/\\.svg$/, \"\");\n return name in SAMPLES ? name : null;\n }\n return LEGACY_SAMPLES[src] ?? null;\n};\n\n/** Is this image a preset's sample, still waiting to be replaced? */\nexport function isSampleImage(src: unknown): boolean {\n return sampleName(src) !== null;\n}\n\n/** The inline picture to draw for a sample image, or null when the image is a real one. */\nexport function sampleImage(src: unknown): { src: string; width: number; height: number } | null {\n const name = sampleName(src);\n return name ? SAMPLES[name]! : null;\n}\n\n/** A preset's sample image path: `samplePath(\"photo\")` → \"/_gs/sample/photo.svg\". */\nexport const samplePath = (name: \"photo\" | \"logo\") => `${SAMPLE_IMAGE_PREFIX}${name}.svg`;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mailtoHref } from './chunk-VZUDRPFG.js';
|
|
2
|
-
import { Line, Link, Surface, Image, Copy, defineSection, RichText, Href, FileRef, registerBuiltInSection, safeJsonForHtml, postPath, opensInNewTab } from './chunk-
|
|
3
|
-
import { isSafeImageSrc, isSafeHref, isExternalHref } from './chunk-
|
|
2
|
+
import { Line, Link, Surface, Image, Copy, defineSection, RichText, samplePath, Href, FileRef, registerBuiltInSection, sampleImage, safeJsonForHtml, postPath, opensInNewTab } from './chunk-QGU6FDH5.js';
|
|
3
|
+
import { isSafeImageSrc, isSafeHref, isLocalDevUrl, isExternalHref } from './chunk-CXBBUKGB.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { BandLead, Band, Display } from '@marktiderman/genesis-ui/band';
|
|
6
6
|
import { cn } from '@marktiderman/genesis-ui/utils';
|
|
@@ -135,6 +135,10 @@ function SiteImage({ image, className, sizes, large, eager, ctx }) {
|
|
|
135
135
|
console.error(`[genesis-sites] refused an unsafe image source on ${ctx.pagePath}.`);
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
|
+
const sample = sampleImage(image.src);
|
|
139
|
+
if (sample) {
|
|
140
|
+
return /* @__PURE__ */ jsx("img", { src: sample.src, alt: image.decorative ? "" : image.alt, width: sample.width, height: sample.height, className, "data-gs-sample-image": "" });
|
|
141
|
+
}
|
|
138
142
|
const at = (src) => src.startsWith("/") ? ctx.href(src) : src;
|
|
139
143
|
const priority = claimPriority(ctx, large);
|
|
140
144
|
const r = responsiveImage(
|
|
@@ -234,7 +238,7 @@ function withAccent(heading, accent, onAccentBand = false) {
|
|
|
234
238
|
if (at < 0) return heading;
|
|
235
239
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
236
240
|
heading.slice(0, at),
|
|
237
|
-
/* @__PURE__ */ jsx("span", { "data-gs-text": "accent", className: onAccentBand ? "underline decoration-2 underline-offset-[0.2em]" : "text-primary", children: heading.slice(at, at + phrase.length) }),
|
|
241
|
+
/* @__PURE__ */ jsx("span", { "data-gs-text": "accent", className: onAccentBand ? "underline decoration-2 underline-offset-[0.2em]" : "text-[hsl(var(--primary-display,var(--primary-text)))]", children: heading.slice(at, at + phrase.length) }),
|
|
238
242
|
heading.slice(at + phrase.length)
|
|
239
243
|
] });
|
|
240
244
|
}
|
|
@@ -414,6 +418,7 @@ var faqSection = defineSection({
|
|
|
414
418
|
presets: [
|
|
415
419
|
{
|
|
416
420
|
name: "FAQ",
|
|
421
|
+
sample: true,
|
|
417
422
|
variant: "accordion",
|
|
418
423
|
props: { heading: "Questions", items: [{ question: "A question people ask?", answer: answerToRichText("A short, direct answer.") }, { question: "Another question?", answer: answerToRichText("Another answer.") }] }
|
|
419
424
|
}
|
|
@@ -489,6 +494,7 @@ var featuresSection = defineSection({
|
|
|
489
494
|
presets: [
|
|
490
495
|
{
|
|
491
496
|
name: "Three features",
|
|
497
|
+
sample: true,
|
|
492
498
|
variant: "grid",
|
|
493
499
|
props: {
|
|
494
500
|
heading: "What you get",
|
|
@@ -501,11 +507,13 @@ var featuresSection = defineSection({
|
|
|
501
507
|
},
|
|
502
508
|
{
|
|
503
509
|
name: "Feature list",
|
|
510
|
+
sample: true,
|
|
504
511
|
variant: "list",
|
|
505
512
|
props: { heading: "Why people choose us", columns: 2, items: [{ title: "A reason", body: "In a sentence.", icon: "check" }, { title: "Another reason", body: "In a sentence.", icon: "check" }] }
|
|
506
513
|
},
|
|
507
514
|
{
|
|
508
515
|
name: "Numbered steps",
|
|
516
|
+
sample: true,
|
|
509
517
|
variant: "steps",
|
|
510
518
|
props: {
|
|
511
519
|
heading: "How to start",
|
|
@@ -518,6 +526,7 @@ var featuresSection = defineSection({
|
|
|
518
526
|
},
|
|
519
527
|
{
|
|
520
528
|
name: "Included and not included",
|
|
529
|
+
sample: true,
|
|
521
530
|
variant: "grid",
|
|
522
531
|
props: {
|
|
523
532
|
heading: "What's in it",
|
|
@@ -897,7 +906,7 @@ var schema5 = z.object({
|
|
|
897
906
|
heading: Line(90),
|
|
898
907
|
body: Copy(400).optional(),
|
|
899
908
|
/** The form's slug, which the host's forms resolver knows. */
|
|
900
|
-
form: z.string().regex(/^[a-z0-9][a-z0-9-]{0,79}$/, "A form slug is lowercase letters, digits and hyphens."),
|
|
909
|
+
form: z.string().regex(/^[a-z0-9][a-z0-9-]{0,79}$/, "A form slug is lowercase letters, digits and hyphens.").meta({ "x-genesis-kind": "form" }),
|
|
901
910
|
surface: Surface.default("base"),
|
|
902
911
|
anchor: Anchor.default("contact")
|
|
903
912
|
});
|
|
@@ -931,8 +940,8 @@ function EmbeddedForm({ slug, heading, ctx }) {
|
|
|
931
940
|
] });
|
|
932
941
|
}
|
|
933
942
|
if (resolved.kind === "embed") {
|
|
934
|
-
if (!isSafeHref(resolved.url)
|
|
935
|
-
console.error(`[genesis-sites] refused the form embed URL for "${slug}": it must be https.`);
|
|
943
|
+
if (!(isSafeHref(resolved.url) && resolved.url.startsWith("https://")) && !isLocalDevUrl(resolved.url)) {
|
|
944
|
+
console.error(`[genesis-sites] refused the form embed URL for "${slug}": it must be https (or http on localhost).`);
|
|
936
945
|
return null;
|
|
937
946
|
}
|
|
938
947
|
return /* @__PURE__ */ jsx(
|
|
@@ -1040,7 +1049,7 @@ var gallerySection = defineSection({
|
|
|
1040
1049
|
{
|
|
1041
1050
|
name: "Photo grid",
|
|
1042
1051
|
variant: "grid",
|
|
1043
|
-
props: { heading: "Inside", images: [{ src: "
|
|
1052
|
+
props: { heading: "Inside", images: [{ src: samplePath("photo") }, { src: samplePath("photo") }, { src: samplePath("photo") }] }
|
|
1044
1053
|
}
|
|
1045
1054
|
],
|
|
1046
1055
|
render: ({ props, variant, node, ctx }) => {
|
|
@@ -1093,11 +1102,13 @@ var heroSection = defineSection({
|
|
|
1093
1102
|
presets: [
|
|
1094
1103
|
{
|
|
1095
1104
|
name: "Centred hero",
|
|
1105
|
+
sample: true,
|
|
1096
1106
|
variant: "centered",
|
|
1097
1107
|
props: { heading: "Say what you do, for whom", body: "One or two sentences on why it matters.", primaryCta: { label: "Get started", href: "#contact" } }
|
|
1098
1108
|
},
|
|
1099
1109
|
{
|
|
1100
1110
|
name: "Hero with image",
|
|
1111
|
+
sample: true,
|
|
1101
1112
|
variant: "split",
|
|
1102
1113
|
props: { heading: "Say what you do, for whom", body: "One or two sentences on why it matters.", primaryCta: { label: "Get started", href: "#contact" } }
|
|
1103
1114
|
}
|
|
@@ -1163,10 +1174,11 @@ var logosSection = defineSection({
|
|
|
1163
1174
|
{
|
|
1164
1175
|
name: "Logo row",
|
|
1165
1176
|
variant: "row",
|
|
1166
|
-
props: { heading: "Trusted by", items: [{ name: "Partner", image: { src: "
|
|
1177
|
+
props: { heading: "Trusted by", items: [{ name: "Partner", image: { src: samplePath("logo"), alt: "Partner" } }] }
|
|
1167
1178
|
},
|
|
1168
1179
|
{
|
|
1169
1180
|
name: "Trust bar",
|
|
1181
|
+
sample: true,
|
|
1170
1182
|
variant: "trust-bar",
|
|
1171
1183
|
props: { claim: "Why people trust us", items: [{ name: "Friendly people" }, { name: "Fair prices" }, { name: "Free first visit" }], surface: "inverse" }
|
|
1172
1184
|
}
|
|
@@ -1382,6 +1394,7 @@ var pricingSection = defineSection({
|
|
|
1382
1394
|
presets: [
|
|
1383
1395
|
{
|
|
1384
1396
|
name: "Plan groups",
|
|
1397
|
+
sample: true,
|
|
1385
1398
|
variant: "cards",
|
|
1386
1399
|
props: {
|
|
1387
1400
|
heading: "Plans and prices",
|
|
@@ -1393,6 +1406,7 @@ var pricingSection = defineSection({
|
|
|
1393
1406
|
},
|
|
1394
1407
|
{
|
|
1395
1408
|
name: "Three plans",
|
|
1409
|
+
sample: true,
|
|
1396
1410
|
variant: "cards",
|
|
1397
1411
|
props: {
|
|
1398
1412
|
heading: "Plans",
|
|
@@ -1503,6 +1517,7 @@ var richTextSection = defineSection({
|
|
|
1503
1517
|
presets: [
|
|
1504
1518
|
{
|
|
1505
1519
|
name: "Text",
|
|
1520
|
+
sample: true,
|
|
1506
1521
|
variant: "narrow",
|
|
1507
1522
|
props: {
|
|
1508
1523
|
body: {
|
|
@@ -1560,6 +1575,7 @@ var statsSection = defineSection({
|
|
|
1560
1575
|
presets: [
|
|
1561
1576
|
{
|
|
1562
1577
|
name: "Three numbers",
|
|
1578
|
+
sample: true,
|
|
1563
1579
|
variant: "row",
|
|
1564
1580
|
props: { items: [{ value: "12", label: "years open" }, { value: "500+", label: "people served" }, { value: "6", label: "on the team" }] }
|
|
1565
1581
|
}
|
|
@@ -1604,8 +1620,8 @@ var testimonialsSection = defineSection({
|
|
|
1604
1620
|
],
|
|
1605
1621
|
defaultVariant: "grid",
|
|
1606
1622
|
presets: [
|
|
1607
|
-
{ name: "Quotes", variant: "grid", props: { heading: "What people say", items: [{ quote: "A quote, in their words.", name: "Their name" }] } },
|
|
1608
|
-
{ name: "One quote", variant: "single", props: { items: [{ quote: "A quote, in their words.", name: "Their name", role: "Who they are" }] } }
|
|
1623
|
+
{ name: "Quotes", sample: true, variant: "grid", props: { heading: "What people say", items: [{ quote: "A quote, in their words.", name: "Their name" }] } },
|
|
1624
|
+
{ name: "One quote", sample: true, variant: "single", props: { items: [{ quote: "A quote, in their words.", name: "Their name", role: "Who they are" }] } }
|
|
1609
1625
|
],
|
|
1610
1626
|
render: ({ props, variant, node, ctx }) => {
|
|
1611
1627
|
const inverted = onAccent(props.surface);
|
|
@@ -1796,8 +1812,8 @@ var fileSection = defineSection({
|
|
|
1796
1812
|
],
|
|
1797
1813
|
defaultVariant: "list",
|
|
1798
1814
|
presets: [
|
|
1799
|
-
{ name: "Downloads", variant: "list", props: { heading: "Downloads", files: [{ label: "Price list", file: { src: "/files/price-list.pdf", mime: "application/pdf" } }] } },
|
|
1800
|
-
{ name: "File cards", variant: "cards", props: { heading: "Forms to bring", files: [{ label: "Sign-up form", description: "Fill it in before your first visit.", file: { src: "/files/sign-up.pdf", mime: "application/pdf" } }] } }
|
|
1815
|
+
{ name: "Downloads", sample: true, variant: "list", props: { heading: "Downloads", files: [{ label: "Price list", file: { src: "/files/price-list.pdf", mime: "application/pdf" } }] } },
|
|
1816
|
+
{ name: "File cards", sample: true, variant: "cards", props: { heading: "Forms to bring", files: [{ label: "Sign-up form", description: "Fill it in before your first visit.", file: { src: "/files/sign-up.pdf", mime: "application/pdf" } }] } }
|
|
1801
1817
|
],
|
|
1802
1818
|
render: ({ props, variant, node, ctx }) => {
|
|
1803
1819
|
const inverted = onAccent(props.surface);
|
|
@@ -1894,11 +1910,13 @@ var mapSection = defineSection({
|
|
|
1894
1910
|
presets: [
|
|
1895
1911
|
{
|
|
1896
1912
|
name: "Find us",
|
|
1913
|
+
sample: true,
|
|
1897
1914
|
variant: "split",
|
|
1898
1915
|
props: { heading: "Find us", address: ["1 River Road", "Riverside"], provider: "openstreetmap", lat: 51.5007, lng: -0.1246 }
|
|
1899
1916
|
},
|
|
1900
1917
|
{
|
|
1901
1918
|
name: "Map and address",
|
|
1919
|
+
sample: true,
|
|
1902
1920
|
variant: "stacked",
|
|
1903
1921
|
props: { heading: "Visit", address: ["1 River Road", "Riverside"], provider: "google", query: "1 River Road, Riverside" }
|
|
1904
1922
|
}
|
|
@@ -2190,6 +2208,7 @@ var scheduleSection = defineSection({
|
|
|
2190
2208
|
presets: [
|
|
2191
2209
|
{
|
|
2192
2210
|
name: "Weekly timetable",
|
|
2211
|
+
sample: true,
|
|
2193
2212
|
variant: "grid",
|
|
2194
2213
|
props: {
|
|
2195
2214
|
heading: "This week",
|
|
@@ -2206,6 +2225,7 @@ var scheduleSection = defineSection({
|
|
|
2206
2225
|
},
|
|
2207
2226
|
{
|
|
2208
2227
|
name: "Day by day",
|
|
2228
|
+
sample: true,
|
|
2209
2229
|
variant: "agenda",
|
|
2210
2230
|
props: { heading: "This week", days: ["mon", "tue", "wed", "thu", "fri"], sessions: [{ day: "mon", start: "18:00", end: "19:00", title: "Session name" }] }
|
|
2211
2231
|
}
|
|
@@ -2323,6 +2343,7 @@ var teamSection = defineSection({
|
|
|
2323
2343
|
presets: [
|
|
2324
2344
|
{
|
|
2325
2345
|
name: "Team cards",
|
|
2346
|
+
sample: true,
|
|
2326
2347
|
variant: "cards",
|
|
2327
2348
|
props: {
|
|
2328
2349
|
heading: "Meet the team",
|
|
@@ -2334,6 +2355,7 @@ var teamSection = defineSection({
|
|
|
2334
2355
|
},
|
|
2335
2356
|
{
|
|
2336
2357
|
name: "Team list",
|
|
2358
|
+
sample: true,
|
|
2337
2359
|
variant: "list",
|
|
2338
2360
|
props: { heading: "The team", members: [{ name: "Person's name", credentials: "Their qualifications", bio: "Their story, in a few short paragraphs." }] }
|
|
2339
2361
|
}
|
|
@@ -2425,6 +2447,7 @@ var timelineSection = defineSection({
|
|
|
2425
2447
|
presets: [
|
|
2426
2448
|
{
|
|
2427
2449
|
name: "Week by week",
|
|
2450
|
+
sample: true,
|
|
2428
2451
|
variant: "vertical",
|
|
2429
2452
|
props: {
|
|
2430
2453
|
heading: "Week by week",
|
|
@@ -2435,7 +2458,7 @@ var timelineSection = defineSection({
|
|
|
2435
2458
|
]
|
|
2436
2459
|
}
|
|
2437
2460
|
},
|
|
2438
|
-
{ name: "Steps as cards", variant: "cards", props: { heading: "How it works", steps: [{ title: "First step" }, { title: "Second step" }, { title: "Third step" }] } }
|
|
2461
|
+
{ name: "Steps as cards", sample: true, variant: "cards", props: { heading: "How it works", steps: [{ title: "First step" }, { title: "Second step" }, { title: "Third step" }] } }
|
|
2439
2462
|
],
|
|
2440
2463
|
render: ({ props, variant, node, ctx }) => {
|
|
2441
2464
|
const inverted = onAccent(props.surface);
|
|
@@ -2507,5 +2530,5 @@ var builtInSections = Object.freeze([
|
|
|
2507
2530
|
for (const def of builtInSections) registerBuiltInSection(def);
|
|
2508
2531
|
|
|
2509
2532
|
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, formDrawMode, formEmbedSection, formatPostDate, formatTime, gallerySection, heroSection, linkAttrs, logosSection, mapEmbedUrl, mapPageUrl, mapSection, navSection, postBodySection, pricingSection, resolveHref, richTextSection, scheduleSection, siteFormSlots, statsSection, teamSection, testimonialsSection, timelineSection, titleId, withAccent };
|
|
2510
|
-
//# sourceMappingURL=chunk-
|
|
2511
|
-
//# sourceMappingURL=chunk-
|
|
2533
|
+
//# sourceMappingURL=chunk-SBONYMUC.js.map
|
|
2534
|
+
//# sourceMappingURL=chunk-SBONYMUC.js.map
|