galley-cms 0.0.0-stage → 0.1.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 +76 -2
- package/bin/galley.js +29 -0
- package/dist/LICENSE +202 -0
- package/dist/NOTICE +19 -0
- package/dist/galley.mjs +168872 -0
- package/dist/overlay.js +60 -0
- package/dist/starters/README.md +257 -0
- package/dist/starters/astro-editorial/CONTENT-GUIDE.md +218 -0
- package/dist/starters/astro-editorial/LICENSE +21 -0
- package/dist/starters/astro-editorial/README.md +375 -0
- package/dist/starters/astro-editorial/astro.config.ts +50 -0
- package/dist/starters/astro-editorial/galley/photography/ART-DIRECTION.md +170 -0
- package/dist/starters/astro-editorial/galley/photography/LOG.md +77 -0
- package/dist/starters/astro-editorial/galley/photography/placeholders.json +1 -0
- package/dist/starters/astro-editorial/galley/photography/shots.json +721 -0
- package/dist/starters/astro-editorial/galley/previews/chalk.webp +0 -0
- package/dist/starters/astro-editorial/galley/previews/night.webp +0 -0
- package/dist/starters/astro-editorial/galley/previews/paper.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/campaign-hero.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/chapters.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/contact.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/credits.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/cta.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/film.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/form.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/gallery.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/image-band.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/journal-list.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/look.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/lookbook-grid.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/marquee.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/newsletter.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/pieces.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/quote.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/split-editorial.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/statement.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/stockists.webp +0 -0
- package/dist/starters/astro-editorial/galley/sections/story.webp +0 -0
- package/dist/starters/astro-editorial/galley/templates/about.md +47 -0
- package/dist/starters/astro-editorial/galley/templates/about.webp +0 -0
- package/dist/starters/astro-editorial/galley/templates/campaign.md +71 -0
- package/dist/starters/astro-editorial/galley/templates/campaign.webp +0 -0
- package/dist/starters/astro-editorial/galley/templates/contact.md +19 -0
- package/dist/starters/astro-editorial/galley/templates/contact.webp +0 -0
- package/dist/starters/astro-editorial/galley/templates/lookbook.md +47 -0
- package/dist/starters/astro-editorial/galley/templates/lookbook.webp +0 -0
- package/dist/starters/astro-editorial/galley/templates/stockists.md +19 -0
- package/dist/starters/astro-editorial/galley/templates/stockists.webp +0 -0
- package/dist/starters/astro-editorial/galley/templates/story.md +49 -0
- package/dist/starters/astro-editorial/galley/templates/story.webp +0 -0
- package/dist/starters/astro-editorial/galley.config.json +334 -0
- package/dist/starters/astro-editorial/gitignore +26 -0
- package/dist/starters/astro-editorial/netlify.toml +6 -0
- package/dist/starters/astro-editorial/package.json +46 -0
- package/dist/starters/astro-editorial/public/favicon.svg +5 -0
- package/dist/starters/astro-editorial/public/images/atelier/hands.webp +0 -0
- package/dist/starters/astro-editorial/public/images/atelier/weave.webp +0 -0
- package/dist/starters/astro-editorial/public/images/atelier/workroom.webp +0 -0
- package/dist/starters/astro-editorial/public/images/campaign/aw26-harbour-wall.webp +0 -0
- package/dist/starters/astro-editorial/public/images/campaign/ss26-plaster-steps.webp +0 -0
- package/dist/starters/astro-editorial/public/images/campaign/wall-shadow.webp +0 -0
- package/dist/starters/astro-editorial/public/images/film/the-long-afternoon.webp +0 -0
- package/dist/starters/astro-editorial/public/images/journal/a-pattern-is-a-letter.webp +0 -0
- package/dist/starters/astro-editorial/public/images/journal/eleven-tries-at-rust.webp +0 -0
- package/dist/starters/astro-editorial/public/images/journal/keeping-a-wool-coat.webp +0 -0
- package/dist/starters/astro-editorial/public/images/journal/why-we-make-forty.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/cover.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-01.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-02.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-03.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-04.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-05.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-06.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-07.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/aw26/look-08.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/ss26/cover.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/ss26/look-01.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/ss26/look-02.webp +0 -0
- package/dist/starters/astro-editorial/public/images/lookbooks/ss26/look-03.webp +0 -0
- package/dist/starters/astro-editorial/public/images/people/hesper-lowe.webp +0 -0
- package/dist/starters/astro-editorial/public/images/pieces/blanket-scarf.webp +0 -0
- package/dist/starters/astro-editorial/public/images/pieces/field-coat.webp +0 -0
- package/dist/starters/astro-editorial/public/images/pieces/gansey.webp +0 -0
- package/dist/starters/astro-editorial/public/images/pieces/rib-polo.webp +0 -0
- package/dist/starters/astro-editorial/public/images/share.jpg +0 -0
- package/dist/starters/astro-editorial/scripts/check-type.mjs +198 -0
- package/dist/starters/astro-editorial/scripts/gallery/gallery.astro +77 -0
- package/dist/starters/astro-editorial/scripts/gallery/integration.mjs +43 -0
- package/dist/starters/astro-editorial/scripts/gallery/sections.md +171 -0
- package/dist/starters/astro-editorial/scripts/ingest-photos.mjs +169 -0
- package/dist/starters/astro-editorial/scripts/lib/tokens.mjs +63 -0
- package/dist/starters/astro-editorial/scripts/make-placeholders.mjs +188 -0
- package/dist/starters/astro-editorial/scripts/make-thumbnails.mjs +249 -0
- package/dist/starters/astro-editorial/scripts/starter-notice.json +9 -0
- package/dist/starters/astro-editorial/src/components/Actions.astro +31 -0
- package/dist/starters/astro-editorial/src/components/Footer.astro +195 -0
- package/dist/starters/astro-editorial/src/components/Header.astro +340 -0
- package/dist/starters/astro-editorial/src/components/Icon.astro +39 -0
- package/dist/starters/astro-editorial/src/components/LookbookCard.astro +76 -0
- package/dist/starters/astro-editorial/src/components/LookbookEntry.astro +175 -0
- package/dist/starters/astro-editorial/src/components/Media.astro +37 -0
- package/dist/starters/astro-editorial/src/components/PageEntry.astro +64 -0
- package/dist/starters/astro-editorial/src/components/PieceList.astro +70 -0
- package/dist/starters/astro-editorial/src/components/PostCard.astro +101 -0
- package/dist/starters/astro-editorial/src/components/PostList.astro +103 -0
- package/dist/starters/astro-editorial/src/components/Section.astro +47 -0
- package/dist/starters/astro-editorial/src/components/SectionHeader.astro +70 -0
- package/dist/starters/astro-editorial/src/components/Sections.astro +81 -0
- package/dist/starters/astro-editorial/src/components/StarterNotice.astro +97 -0
- package/dist/starters/astro-editorial/src/components/Tags.astro +68 -0
- package/dist/starters/astro-editorial/src/components/sections/CampaignHero.astro +288 -0
- package/dist/starters/astro-editorial/src/components/sections/Chapters.astro +142 -0
- package/dist/starters/astro-editorial/src/components/sections/Contact.astro +136 -0
- package/dist/starters/astro-editorial/src/components/sections/Credits.astro +62 -0
- package/dist/starters/astro-editorial/src/components/sections/Cta.astro +105 -0
- package/dist/starters/astro-editorial/src/components/sections/Film.astro +110 -0
- package/dist/starters/astro-editorial/src/components/sections/FormSection.astro +81 -0
- package/dist/starters/astro-editorial/src/components/sections/Gallery.astro +82 -0
- package/dist/starters/astro-editorial/src/components/sections/ImageBand.astro +33 -0
- package/dist/starters/astro-editorial/src/components/sections/JournalList.astro +132 -0
- package/dist/starters/astro-editorial/src/components/sections/Look.astro +82 -0
- package/dist/starters/astro-editorial/src/components/sections/LookbookGrid.astro +139 -0
- package/dist/starters/astro-editorial/src/components/sections/Marquee.astro +164 -0
- package/dist/starters/astro-editorial/src/components/sections/Newsletter.astro +83 -0
- package/dist/starters/astro-editorial/src/components/sections/Pieces.astro +131 -0
- package/dist/starters/astro-editorial/src/components/sections/Quote.astro +112 -0
- package/dist/starters/astro-editorial/src/components/sections/SplitEditorial.astro +81 -0
- package/dist/starters/astro-editorial/src/components/sections/Statement.astro +178 -0
- package/dist/starters/astro-editorial/src/components/sections/Stockists.astro +139 -0
- package/dist/starters/astro-editorial/src/components/sections/Story.astro +96 -0
- package/dist/starters/astro-editorial/src/components/sections/Unknown.astro +37 -0
- package/dist/starters/astro-editorial/src/content/forms/contact.json +49 -0
- package/dist/starters/astro-editorial/src/content/forms/newsletter.json +30 -0
- package/dist/starters/astro-editorial/src/content/forms/stockist.json +35 -0
- package/dist/starters/astro-editorial/src/content/journal/a-pattern-is-a-letter.md +25 -0
- package/dist/starters/astro-editorial/src/content/journal/eleven-tries-at-rust.md +29 -0
- package/dist/starters/astro-editorial/src/content/journal/keeping-a-wool-coat.md +29 -0
- package/dist/starters/astro-editorial/src/content/journal/why-we-make-forty.md +29 -0
- package/dist/starters/astro-editorial/src/content/lookbooks/aw26-the-long-afternoon.md +126 -0
- package/dist/starters/astro-editorial/src/content/lookbooks/ss26-plaster.md +55 -0
- package/dist/starters/astro-editorial/src/content/pages/404.md +14 -0
- package/dist/starters/astro-editorial/src/content/pages/atelier.md +102 -0
- package/dist/starters/astro-editorial/src/content/pages/collections.md +15 -0
- package/dist/starters/astro-editorial/src/content/pages/contact.md +35 -0
- package/dist/starters/astro-editorial/src/content/pages/index.md +144 -0
- package/dist/starters/astro-editorial/src/content/pages/journal.md +9 -0
- package/dist/starters/astro-editorial/src/content/pages/privacy.md +25 -0
- package/dist/starters/astro-editorial/src/content/pages/stockists.md +32 -0
- package/dist/starters/astro-editorial/src/content.config.ts +464 -0
- package/dist/starters/astro-editorial/src/data/navigation.json +60 -0
- package/dist/starters/astro-editorial/src/data/scripts.json +29 -0
- package/dist/starters/astro-editorial/src/data/site.json +86 -0
- package/dist/starters/astro-editorial/src/data/stockists.json +81 -0
- package/dist/starters/astro-editorial/src/data/visibility.json +30 -0
- package/dist/starters/astro-editorial/src/galley/catalog-data.js +293 -0
- package/dist/starters/astro-editorial/src/galley/catalog.js +42 -0
- package/dist/starters/astro-editorial/src/galley/client/attribution.js +79 -0
- package/dist/starters/astro-editorial/src/galley/client/forms.js +580 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/frame-post.js +77 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/galley.js +53 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/hubspot.js +110 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/mailto.js +20 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/marketo.js +133 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/pardot.js +53 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/salesforce.js +50 -0
- package/dist/starters/astro-editorial/src/galley/client/providers/webhook.js +40 -0
- package/dist/starters/astro-editorial/src/galley/client/registry.js +32 -0
- package/dist/starters/astro-editorial/src/galley/client/types.d.ts +80 -0
- package/dist/starters/astro-editorial/src/galley/components/ConsentBanner.astro +17 -0
- package/dist/starters/astro-editorial/src/galley/components/Form.astro +102 -0
- package/dist/starters/astro-editorial/src/galley/components/Scripts.astro +30 -0
- package/dist/starters/astro-editorial/src/galley/components/index.js +5 -0
- package/dist/starters/astro-editorial/src/galley/forms/forms.css +389 -0
- package/dist/starters/astro-editorial/src/galley/forms/free-email-domains.js +62 -0
- package/dist/starters/astro-editorial/src/galley/forms/logic.js +220 -0
- package/dist/starters/astro-editorial/src/galley/forms/messages.js +82 -0
- package/dist/starters/astro-editorial/src/galley/forms/render.js +490 -0
- package/dist/starters/astro-editorial/src/galley/integration.js +21 -0
- package/dist/starters/astro-editorial/src/galley/kit.d.ts +298 -0
- package/dist/starters/astro-editorial/src/galley/mailto/config.js +76 -0
- package/dist/starters/astro-editorial/src/galley/mailto/runtime.gen.js +5 -0
- package/dist/starters/astro-editorial/src/galley/runtime/site-config.js +50 -0
- package/dist/starters/astro-editorial/src/galley/schema.js +338 -0
- package/dist/starters/astro-editorial/src/galley/scripts/banner.js +80 -0
- package/dist/starters/astro-editorial/src/galley/scripts/plan.js +253 -0
- package/dist/starters/astro-editorial/src/galley/scripts/runtime.gen.js +5 -0
- package/dist/starters/astro-editorial/src/galley/scripts/snippets.js +245 -0
- package/dist/starters/astro-editorial/src/galley/settings.json +18 -0
- package/dist/starters/astro-editorial/src/galley/shared/glob.js +64 -0
- package/dist/starters/astro-editorial/src/galley/shared/markdown.js +120 -0
- package/dist/starters/astro-editorial/src/galley/visibility/config.js +223 -0
- package/dist/starters/astro-editorial/src/galley/visibility/content.js +176 -0
- package/dist/starters/astro-editorial/src/galley/visibility/crawlers.js +195 -0
- package/dist/starters/astro-editorial/src/galley/visibility/html.js +293 -0
- package/dist/starters/astro-editorial/src/galley/visibility/integration.js +528 -0
- package/dist/starters/astro-editorial/src/galley/visibility/markdown.js +498 -0
- package/dist/starters/astro-editorial/src/galley/visibility/page.js +146 -0
- package/dist/starters/astro-editorial/src/galley/visibility/site.js +583 -0
- package/dist/starters/astro-editorial/src/galley/visibility/structured.js +131 -0
- package/dist/starters/astro-editorial/src/layouts/Base.astro +98 -0
- package/dist/starters/astro-editorial/src/lib/journal.ts +45 -0
- package/dist/starters/astro-editorial/src/lib/lookbooks.ts +20 -0
- package/dist/starters/astro-editorial/src/lib/site.ts +181 -0
- package/dist/starters/astro-editorial/src/pages/404.astro +13 -0
- package/dist/starters/astro-editorial/src/pages/[...slug].astro +34 -0
- package/dist/starters/astro-editorial/src/pages/collections/[slug].astro +23 -0
- package/dist/starters/astro-editorial/src/pages/collections/index.astro +66 -0
- package/dist/starters/astro-editorial/src/pages/journal/[...page].astro +59 -0
- package/dist/starters/astro-editorial/src/pages/journal/[slug].astro +205 -0
- package/dist/starters/astro-editorial/src/pages/journal/tags/[tag]/[...page].astro +83 -0
- package/dist/starters/astro-editorial/src/styles/galley-kit.css +97 -0
- package/dist/starters/astro-editorial/src/styles/global.css +661 -0
- package/dist/starters/astro-editorial/src/styles/themes/chalk.css +181 -0
- package/dist/starters/astro-editorial/src/styles/themes/night.css +181 -0
- package/dist/starters/astro-editorial/src/styles/themes/paper.css +181 -0
- package/dist/starters/astro-editorial/src/styles/tokens.css +181 -0
- package/dist/starters/astro-editorial/starter.json +52 -0
- package/dist/starters/astro-editorial/tsconfig.json +8 -0
- package/dist/starters/astro-saas/CONTENT-GUIDE.md +273 -0
- package/dist/starters/astro-saas/LICENSE +21 -0
- package/dist/starters/astro-saas/README.md +365 -0
- package/dist/starters/astro-saas/astro.config.ts +77 -0
- package/dist/starters/astro-saas/galley/previews/home.webp +0 -0
- package/dist/starters/astro-saas/galley/previews/meridian.webp +0 -0
- package/dist/starters/astro-saas/galley/previews/night-shift.webp +0 -0
- package/dist/starters/astro-saas/galley/previews/sections.webp +0 -0
- package/dist/starters/astro-saas/galley/previews/signal.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/awards.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/case-studies.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/changelog.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/comparison.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/contact.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/cta.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/faq.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/feature-split.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/feature-tabs.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/features.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/form.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/hero-form.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/hero-split.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/hero.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/integrations.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/logos.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/metrics.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/newsletter.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/posts.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/pricing-table.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/pricing.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/rich-text.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/screenshot.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/security.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/steps.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/team.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/testimonial.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/testimonials.webp +0 -0
- package/dist/starters/astro-saas/galley/sections/use-cases.webp +0 -0
- package/dist/starters/astro-saas/galley/templates/about.md +50 -0
- package/dist/starters/astro-saas/galley/templates/about.webp +0 -0
- package/dist/starters/astro-saas/galley/templates/contact.md +30 -0
- package/dist/starters/astro-saas/galley/templates/contact.webp +0 -0
- package/dist/starters/astro-saas/galley/templates/customer-story.md +47 -0
- package/dist/starters/astro-saas/galley/templates/customer-story.webp +0 -0
- package/dist/starters/astro-saas/galley/templates/landing.md +76 -0
- package/dist/starters/astro-saas/galley/templates/landing.webp +0 -0
- package/dist/starters/astro-saas/galley/templates/pricing.md +77 -0
- package/dist/starters/astro-saas/galley/templates/pricing.webp +0 -0
- package/dist/starters/astro-saas/galley/templates/product.md +69 -0
- package/dist/starters/astro-saas/galley/templates/product.webp +0 -0
- package/dist/starters/astro-saas/galley/templates/solution.md +71 -0
- package/dist/starters/astro-saas/galley/templates/solution.webp +0 -0
- package/dist/starters/astro-saas/galley.config.json +286 -0
- package/dist/starters/astro-saas/gitignore +22 -0
- package/dist/starters/astro-saas/netlify.toml +6 -0
- package/dist/starters/astro-saas/package.json +45 -0
- package/dist/starters/astro-saas/public/favicon.svg +1 -0
- package/dist/starters/astro-saas/public/images/awards/easiest-setup.svg +1 -0
- package/dist/starters/astro-saas/public/images/awards/facilities-review.svg +1 -0
- package/dist/starters/astro-saas/public/images/awards/support-index.svg +1 -0
- package/dist/starters/astro-saas/public/images/blog/audit-schedule.svg +1 -0
- package/dist/starters/astro-saas/public/images/blog/certificate-register.svg +1 -0
- package/dist/starters/astro-saas/public/images/blog/four-numbers.svg +1 -0
- package/dist/starters/astro-saas/public/images/blog/fourteen-depots.svg +1 -0
- package/dist/starters/astro-saas/public/images/blog/offline-first.svg +1 -0
- package/dist/starters/astro-saas/public/images/blog/work-order-fields.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/corrin-foods.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/halbeck-retail.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/linmore-schools.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/ostrell-logistics.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/pellow-hotels.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/tamsett-facilities.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/vantry-health.svg +1 -0
- package/dist/starters/astro-saas/public/images/logos/wendmoor-senior-living.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/anika-thorvald.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/calum-ashby.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/dana-whitcombe.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/ellie-strand.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/grace-achterberg.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/hana-lindqvist.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/joel-marchetti.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/marcus-oyelaran.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/rosa-ferrante.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/sunmi-hollis.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/teodor-rask.svg +1 -0
- package/dist/starters/astro-saas/public/images/people/tobi-merriden.svg +1 -0
- package/dist/starters/astro-saas/public/images/product/dashboard.svg +1 -0
- package/dist/starters/astro-saas/public/images/product/evidence.svg +1 -0
- package/dist/starters/astro-saas/public/images/product/inspection.svg +1 -0
- package/dist/starters/astro-saas/public/images/product/planner.svg +1 -0
- package/dist/starters/astro-saas/public/images/product/reports.svg +1 -0
- package/dist/starters/astro-saas/public/images/product/work-orders.svg +1 -0
- package/dist/starters/astro-saas/public/images/share.png +0 -0
- package/dist/starters/astro-saas/scripts/check-type.mjs +198 -0
- package/dist/starters/astro-saas/scripts/gallery/gallery.astro +114 -0
- package/dist/starters/astro-saas/scripts/gallery/integration.mjs +42 -0
- package/dist/starters/astro-saas/scripts/gallery/sections.md +362 -0
- package/dist/starters/astro-saas/scripts/make-thumbnails.mjs +198 -0
- package/dist/starters/astro-saas/src/components/Actions.astro +30 -0
- package/dist/starters/astro-saas/src/components/Announcement.astro +51 -0
- package/dist/starters/astro-saas/src/components/Checklist.astro +55 -0
- package/dist/starters/astro-saas/src/components/CustomerCard.astro +147 -0
- package/dist/starters/astro-saas/src/components/CustomerStory.astro +343 -0
- package/dist/starters/astro-saas/src/components/Footer.astro +204 -0
- package/dist/starters/astro-saas/src/components/FormEmbed.astro +51 -0
- package/dist/starters/astro-saas/src/components/Frame.astro +88 -0
- package/dist/starters/astro-saas/src/components/Header.astro +489 -0
- package/dist/starters/astro-saas/src/components/Icon.astro +83 -0
- package/dist/starters/astro-saas/src/components/Logo.astro +40 -0
- package/dist/starters/astro-saas/src/components/Mark.astro +54 -0
- package/dist/starters/astro-saas/src/components/Media.astro +54 -0
- package/dist/starters/astro-saas/src/components/PageEntry.astro +65 -0
- package/dist/starters/astro-saas/src/components/PostCard.astro +99 -0
- package/dist/starters/astro-saas/src/components/PostList.astro +108 -0
- package/dist/starters/astro-saas/src/components/Section.astro +52 -0
- package/dist/starters/astro-saas/src/components/SectionHeader.astro +80 -0
- package/dist/starters/astro-saas/src/components/Sections.astro +100 -0
- package/dist/starters/astro-saas/src/components/StarterNotice.astro +97 -0
- package/dist/starters/astro-saas/src/components/Tags.astro +67 -0
- package/dist/starters/astro-saas/src/components/UpdateEntry.astro +145 -0
- package/dist/starters/astro-saas/src/components/sections/Awards.astro +144 -0
- package/dist/starters/astro-saas/src/components/sections/CaseStudies.astro +101 -0
- package/dist/starters/astro-saas/src/components/sections/Changelog.astro +108 -0
- package/dist/starters/astro-saas/src/components/sections/Comparison.astro +132 -0
- package/dist/starters/astro-saas/src/components/sections/Contact.astro +105 -0
- package/dist/starters/astro-saas/src/components/sections/Cta.astro +121 -0
- package/dist/starters/astro-saas/src/components/sections/Faq.astro +142 -0
- package/dist/starters/astro-saas/src/components/sections/FeatureSplit.astro +101 -0
- package/dist/starters/astro-saas/src/components/sections/FeatureTabs.astro +246 -0
- package/dist/starters/astro-saas/src/components/sections/Features.astro +119 -0
- package/dist/starters/astro-saas/src/components/sections/FormSection.astro +89 -0
- package/dist/starters/astro-saas/src/components/sections/Hero.astro +102 -0
- package/dist/starters/astro-saas/src/components/sections/HeroForm.astro +129 -0
- package/dist/starters/astro-saas/src/components/sections/HeroSplit.astro +140 -0
- package/dist/starters/astro-saas/src/components/sections/Integrations.astro +172 -0
- package/dist/starters/astro-saas/src/components/sections/Logos.astro +122 -0
- package/dist/starters/astro-saas/src/components/sections/Metrics.astro +97 -0
- package/dist/starters/astro-saas/src/components/sections/Newsletter.astro +94 -0
- package/dist/starters/astro-saas/src/components/sections/Posts.astro +93 -0
- package/dist/starters/astro-saas/src/components/sections/Pricing.astro +196 -0
- package/dist/starters/astro-saas/src/components/sections/PricingTable.astro +151 -0
- package/dist/starters/astro-saas/src/components/sections/RichText.astro +61 -0
- package/dist/starters/astro-saas/src/components/sections/Screenshot.astro +112 -0
- package/dist/starters/astro-saas/src/components/sections/Security.astro +167 -0
- package/dist/starters/astro-saas/src/components/sections/Steps.astro +177 -0
- package/dist/starters/astro-saas/src/components/sections/Team.astro +135 -0
- package/dist/starters/astro-saas/src/components/sections/Testimonial.astro +118 -0
- package/dist/starters/astro-saas/src/components/sections/Testimonials.astro +119 -0
- package/dist/starters/astro-saas/src/components/sections/Unknown.astro +37 -0
- package/dist/starters/astro-saas/src/components/sections/UseCases.astro +166 -0
- package/dist/starters/astro-saas/src/content/blog/audit-ready-maintenance-schedule.md +41 -0
- package/dist/starters/astro-saas/src/content/blog/certificate-register.md +31 -0
- package/dist/starters/astro-saas/src/content/blog/four-maintenance-numbers.md +31 -0
- package/dist/starters/astro-saas/src/content/blog/fourteen-depots-off-spreadsheets.md +33 -0
- package/dist/starters/astro-saas/src/content/blog/offline-first-inspections.md +33 -0
- package/dist/starters/astro-saas/src/content/blog/work-order-fields.md +43 -0
- package/dist/starters/astro-saas/src/content/changelog/asset-qr-labels.md +12 -0
- package/dist/starters/astro-saas/src/content/changelog/certificate-forecasts.md +12 -0
- package/dist/starters/astro-saas/src/content/changelog/contractor-bulk-upload.md +8 -0
- package/dist/starters/astro-saas/src/content/changelog/faster-planner.md +11 -0
- package/dist/starters/astro-saas/src/content/changelog/offline-inspections.md +16 -0
- package/dist/starters/astro-saas/src/content/changelog/scim-provisioning.md +8 -0
- package/dist/starters/astro-saas/src/content/changelog/weekly-reminders-fix.md +11 -0
- package/dist/starters/astro-saas/src/content/customers/linmore-schools.md +53 -0
- package/dist/starters/astro-saas/src/content/customers/ostrell-logistics.md +59 -0
- package/dist/starters/astro-saas/src/content/customers/pellow-hotels.md +47 -0
- package/dist/starters/astro-saas/src/content/customers/wendmoor-senior-living.md +47 -0
- package/dist/starters/astro-saas/src/content/forms/contact.json +31 -0
- package/dist/starters/astro-saas/src/content/forms/demo.json +133 -0
- package/dist/starters/astro-saas/src/content/forms/newsletter.json +13 -0
- package/dist/starters/astro-saas/src/content/pages/404.md +29 -0
- package/dist/starters/astro-saas/src/content/pages/about.md +83 -0
- package/dist/starters/astro-saas/src/content/pages/blog.md +11 -0
- package/dist/starters/astro-saas/src/content/pages/changelog.md +11 -0
- package/dist/starters/astro-saas/src/content/pages/contact.md +29 -0
- package/dist/starters/astro-saas/src/content/pages/customers.md +69 -0
- package/dist/starters/astro-saas/src/content/pages/index.md +161 -0
- package/dist/starters/astro-saas/src/content/pages/pricing.md +131 -0
- package/dist/starters/astro-saas/src/content/pages/privacy.md +38 -0
- package/dist/starters/astro-saas/src/content/pages/product.md +152 -0
- package/dist/starters/astro-saas/src/content/pages/security.md +69 -0
- package/dist/starters/astro-saas/src/content/pages/solutions/facilities-teams.md +114 -0
- package/dist/starters/astro-saas/src/content/pages/solutions/service-contractors.md +88 -0
- package/dist/starters/astro-saas/src/content/pages/terms.md +31 -0
- package/dist/starters/astro-saas/src/content/team/anika-thorvald.md +7 -0
- package/dist/starters/astro-saas/src/content/team/calum-ashby.md +7 -0
- package/dist/starters/astro-saas/src/content/team/hana-lindqvist.md +10 -0
- package/dist/starters/astro-saas/src/content/team/joel-marchetti.md +7 -0
- package/dist/starters/astro-saas/src/content/team/rosa-ferrante.md +7 -0
- package/dist/starters/astro-saas/src/content/team/tobi-merriden.md +10 -0
- package/dist/starters/astro-saas/src/content.config.ts +746 -0
- package/dist/starters/astro-saas/src/data/navigation.json +146 -0
- package/dist/starters/astro-saas/src/data/scripts.json +10 -0
- package/dist/starters/astro-saas/src/data/site.json +105 -0
- package/dist/starters/astro-saas/src/data/visibility.json +32 -0
- package/dist/starters/astro-saas/src/galley/catalog-data.js +293 -0
- package/dist/starters/astro-saas/src/galley/catalog.js +42 -0
- package/dist/starters/astro-saas/src/galley/client/attribution.js +79 -0
- package/dist/starters/astro-saas/src/galley/client/forms.js +580 -0
- package/dist/starters/astro-saas/src/galley/client/providers/frame-post.js +77 -0
- package/dist/starters/astro-saas/src/galley/client/providers/galley.js +53 -0
- package/dist/starters/astro-saas/src/galley/client/providers/hubspot.js +110 -0
- package/dist/starters/astro-saas/src/galley/client/providers/mailto.js +20 -0
- package/dist/starters/astro-saas/src/galley/client/providers/marketo.js +133 -0
- package/dist/starters/astro-saas/src/galley/client/providers/pardot.js +53 -0
- package/dist/starters/astro-saas/src/galley/client/providers/salesforce.js +50 -0
- package/dist/starters/astro-saas/src/galley/client/providers/webhook.js +40 -0
- package/dist/starters/astro-saas/src/galley/client/registry.js +32 -0
- package/dist/starters/astro-saas/src/galley/client/types.d.ts +80 -0
- package/dist/starters/astro-saas/src/galley/components/ConsentBanner.astro +17 -0
- package/dist/starters/astro-saas/src/galley/components/Form.astro +102 -0
- package/dist/starters/astro-saas/src/galley/components/Scripts.astro +30 -0
- package/dist/starters/astro-saas/src/galley/components/index.js +5 -0
- package/dist/starters/astro-saas/src/galley/forms/forms.css +389 -0
- package/dist/starters/astro-saas/src/galley/forms/free-email-domains.js +62 -0
- package/dist/starters/astro-saas/src/galley/forms/logic.js +220 -0
- package/dist/starters/astro-saas/src/galley/forms/messages.js +82 -0
- package/dist/starters/astro-saas/src/galley/forms/render.js +490 -0
- package/dist/starters/astro-saas/src/galley/integration.js +21 -0
- package/dist/starters/astro-saas/src/galley/kit.d.ts +298 -0
- package/dist/starters/astro-saas/src/galley/mailto/config.js +76 -0
- package/dist/starters/astro-saas/src/galley/mailto/runtime.gen.js +5 -0
- package/dist/starters/astro-saas/src/galley/runtime/site-config.js +50 -0
- package/dist/starters/astro-saas/src/galley/schema.js +338 -0
- package/dist/starters/astro-saas/src/galley/scripts/banner.js +80 -0
- package/dist/starters/astro-saas/src/galley/scripts/plan.js +253 -0
- package/dist/starters/astro-saas/src/galley/scripts/runtime.gen.js +5 -0
- package/dist/starters/astro-saas/src/galley/scripts/snippets.js +245 -0
- package/dist/starters/astro-saas/src/galley/settings.json +18 -0
- package/dist/starters/astro-saas/src/galley/shared/glob.js +64 -0
- package/dist/starters/astro-saas/src/galley/shared/markdown.js +120 -0
- package/dist/starters/astro-saas/src/galley/visibility/config.js +223 -0
- package/dist/starters/astro-saas/src/galley/visibility/content.js +176 -0
- package/dist/starters/astro-saas/src/galley/visibility/crawlers.js +195 -0
- package/dist/starters/astro-saas/src/galley/visibility/html.js +293 -0
- package/dist/starters/astro-saas/src/galley/visibility/integration.js +528 -0
- package/dist/starters/astro-saas/src/galley/visibility/markdown.js +498 -0
- package/dist/starters/astro-saas/src/galley/visibility/page.js +146 -0
- package/dist/starters/astro-saas/src/galley/visibility/site.js +583 -0
- package/dist/starters/astro-saas/src/galley/visibility/structured.js +131 -0
- package/dist/starters/astro-saas/src/layouts/Base.astro +106 -0
- package/dist/starters/astro-saas/src/lib/customers.ts +18 -0
- package/dist/starters/astro-saas/src/lib/posts.ts +47 -0
- package/dist/starters/astro-saas/src/lib/site.ts +222 -0
- package/dist/starters/astro-saas/src/pages/404.astro +13 -0
- package/dist/starters/astro-saas/src/pages/[...slug].astro +27 -0
- package/dist/starters/astro-saas/src/pages/blog/[...page].astro +49 -0
- package/dist/starters/astro-saas/src/pages/blog/[slug].astro +298 -0
- package/dist/starters/astro-saas/src/pages/blog/tags/[tag]/[...page].astro +83 -0
- package/dist/starters/astro-saas/src/pages/changelog.astro +41 -0
- package/dist/starters/astro-saas/src/pages/customers/[slug].astro +32 -0
- package/dist/starters/astro-saas/src/styles/global.css +651 -0
- package/dist/starters/astro-saas/src/styles/kit.css +70 -0
- package/dist/starters/astro-saas/src/styles/themes/meridian.css +173 -0
- package/dist/starters/astro-saas/src/styles/themes/night-shift.css +173 -0
- package/dist/starters/astro-saas/src/styles/themes/signal.css +173 -0
- package/dist/starters/astro-saas/src/styles/tokens.css +173 -0
- package/dist/starters/astro-saas/starter-notice.json +9 -0
- package/dist/starters/astro-saas/starter.json +52 -0
- package/dist/starters/astro-saas/tsconfig.json +8 -0
- package/dist/starters/astro-saas/wrangler.jsonc +12 -0
- package/dist/starters/astro-starter/CONTENT-GUIDE.md +195 -0
- package/dist/starters/astro-starter/LICENSE +21 -0
- package/dist/starters/astro-starter/README.md +381 -0
- package/dist/starters/astro-starter/astro.config.ts +77 -0
- package/dist/starters/astro-starter/galley/previews/evening.webp +0 -0
- package/dist/starters/astro-starter/galley/previews/home.webp +0 -0
- package/dist/starters/astro-starter/galley/previews/lowfield.webp +0 -0
- package/dist/starters/astro-starter/galley/previews/sage.webp +0 -0
- package/dist/starters/astro-starter/galley/previews/sections.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/contact.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/cta.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/faq.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/features.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/form.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/gallery.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/hero.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/logos.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/posts.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/pricing.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/rich-text.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/split.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/stats.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/steps.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/team.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/testimonial.webp +0 -0
- package/dist/starters/astro-starter/galley/sections/testimonials.webp +0 -0
- package/dist/starters/astro-starter/galley/templates/about.md +33 -0
- package/dist/starters/astro-starter/galley/templates/about.webp +0 -0
- package/dist/starters/astro-starter/galley/templates/contact.md +25 -0
- package/dist/starters/astro-starter/galley/templates/contact.webp +0 -0
- package/dist/starters/astro-starter/galley/templates/journal-post.md +27 -0
- package/dist/starters/astro-starter/galley/templates/journal-post.webp +0 -0
- package/dist/starters/astro-starter/galley/templates/project.md +44 -0
- package/dist/starters/astro-starter/galley/templates/project.webp +0 -0
- package/dist/starters/astro-starter/galley/templates/service.md +50 -0
- package/dist/starters/astro-starter/galley/templates/service.webp +0 -0
- package/dist/starters/astro-starter/galley.config.json +187 -0
- package/dist/starters/astro-starter/gitignore +22 -0
- package/dist/starters/astro-starter/netlify.toml +6 -0
- package/dist/starters/astro-starter/package.json +44 -0
- package/dist/starters/astro-starter/public/favicon.svg +1 -0
- package/dist/starters/astro-starter/public/images/blog/kitchen-questions.svg +6 -0
- package/dist/starters/astro-starter/public/images/blog/measured-survey.svg +5 -0
- package/dist/starters/astro-starter/public/images/blog/planning.svg +7 -0
- package/dist/starters/astro-starter/public/images/blog/renovation-guide.svg +8 -0
- package/dist/starters/astro-starter/public/images/gallery/arched-doorway.svg +5 -0
- package/dist/starters/astro-starter/public/images/gallery/garden-room.svg +4 -0
- package/dist/starters/astro-starter/public/images/gallery/kitchen.svg +7 -0
- package/dist/starters/astro-starter/public/images/gallery/plan.svg +5 -0
- package/dist/starters/astro-starter/public/images/gallery/stair.svg +3 -0
- package/dist/starters/astro-starter/public/images/gallery/window-seat.svg +6 -0
- package/dist/starters/astro-starter/public/images/logos/brackenridge.svg +1 -0
- package/dist/starters/astro-starter/public/images/logos/hartwell-glass.svg +1 -0
- package/dist/starters/astro-starter/public/images/logos/millbrook-timber.svg +1 -0
- package/dist/starters/astro-starter/public/images/logos/ostler-lime.svg +1 -0
- package/dist/starters/astro-starter/public/images/logos/wrenhallow-civic.svg +1 -0
- package/dist/starters/astro-starter/public/images/people/client-mistry.svg +3 -0
- package/dist/starters/astro-starter/public/images/projects/garden-room.svg +11 -0
- package/dist/starters/astro-starter/public/images/projects/hero-house.svg +18 -0
- package/dist/starters/astro-starter/public/images/projects/kitchen-extension.svg +16 -0
- package/dist/starters/astro-starter/public/images/projects/workshop.svg +9 -0
- package/dist/starters/astro-starter/public/images/share.png +0 -0
- package/dist/starters/astro-starter/public/images/share.svg +10 -0
- package/dist/starters/astro-starter/public/images/team/joe-whitlock.svg +1 -0
- package/dist/starters/astro-starter/public/images/team/nell-okafor.svg +1 -0
- package/dist/starters/astro-starter/public/images/team/priya-anand.svg +1 -0
- package/dist/starters/astro-starter/public/images/team/tomas-reyes.svg +1 -0
- package/dist/starters/astro-starter/scripts/check-type.mjs +198 -0
- package/dist/starters/astro-starter/scripts/gallery/gallery.astro +136 -0
- package/dist/starters/astro-starter/scripts/gallery/integration.mjs +42 -0
- package/dist/starters/astro-starter/scripts/gallery/sections.md +201 -0
- package/dist/starters/astro-starter/scripts/make-thumbnails.mjs +198 -0
- package/dist/starters/astro-starter/src/components/Actions.astro +30 -0
- package/dist/starters/astro-starter/src/components/Footer.astro +166 -0
- package/dist/starters/astro-starter/src/components/FormEmbed.astro +51 -0
- package/dist/starters/astro-starter/src/components/Header.astro +284 -0
- package/dist/starters/astro-starter/src/components/Icon.astro +57 -0
- package/dist/starters/astro-starter/src/components/Media.astro +32 -0
- package/dist/starters/astro-starter/src/components/PageEntry.astro +64 -0
- package/dist/starters/astro-starter/src/components/PostCard.astro +101 -0
- package/dist/starters/astro-starter/src/components/PostList.astro +108 -0
- package/dist/starters/astro-starter/src/components/Section.astro +43 -0
- package/dist/starters/astro-starter/src/components/SectionHeader.astro +93 -0
- package/dist/starters/astro-starter/src/components/Sections.astro +76 -0
- package/dist/starters/astro-starter/src/components/StarterNotice.astro +97 -0
- package/dist/starters/astro-starter/src/components/Tags.astro +65 -0
- package/dist/starters/astro-starter/src/components/sections/Contact.astro +106 -0
- package/dist/starters/astro-starter/src/components/sections/Cta.astro +96 -0
- package/dist/starters/astro-starter/src/components/sections/Faq.astro +107 -0
- package/dist/starters/astro-starter/src/components/sections/Features.astro +105 -0
- package/dist/starters/astro-starter/src/components/sections/FormSection.astro +91 -0
- package/dist/starters/astro-starter/src/components/sections/Gallery.astro +69 -0
- package/dist/starters/astro-starter/src/components/sections/Hero.astro +128 -0
- package/dist/starters/astro-starter/src/components/sections/Logos.astro +99 -0
- package/dist/starters/astro-starter/src/components/sections/Posts.astro +73 -0
- package/dist/starters/astro-starter/src/components/sections/Pricing.astro +186 -0
- package/dist/starters/astro-starter/src/components/sections/RichText.astro +61 -0
- package/dist/starters/astro-starter/src/components/sections/Split.astro +117 -0
- package/dist/starters/astro-starter/src/components/sections/Stats.astro +83 -0
- package/dist/starters/astro-starter/src/components/sections/Steps.astro +113 -0
- package/dist/starters/astro-starter/src/components/sections/Team.astro +112 -0
- package/dist/starters/astro-starter/src/components/sections/Testimonial.astro +82 -0
- package/dist/starters/astro-starter/src/components/sections/Testimonials.astro +107 -0
- package/dist/starters/astro-starter/src/components/sections/Unknown.astro +37 -0
- package/dist/starters/astro-starter/src/content/authors/ines-ferreira.md +5 -0
- package/dist/starters/astro-starter/src/content/authors/nell-okafor.md +6 -0
- package/dist/starters/astro-starter/src/content/authors/tomas-reyes.md +6 -0
- package/dist/starters/astro-starter/src/content/blog/kitchen-extension-questions.md +46 -0
- package/dist/starters/astro-starter/src/content/blog/living-through-a-renovation.md +47 -0
- package/dist/starters/astro-starter/src/content/blog/measured-survey.md +42 -0
- package/dist/starters/astro-starter/src/content/blog/permitted-development.md +45 -0
- package/dist/starters/astro-starter/src/content/forms/contact.json +39 -0
- package/dist/starters/astro-starter/src/content/pages/404.md +17 -0
- package/dist/starters/astro-starter/src/content/pages/about.md +66 -0
- package/dist/starters/astro-starter/src/content/pages/blog.md +9 -0
- package/dist/starters/astro-starter/src/content/pages/contact.md +30 -0
- package/dist/starters/astro-starter/src/content/pages/index.md +125 -0
- package/dist/starters/astro-starter/src/content/pages/pricing.md +77 -0
- package/dist/starters/astro-starter/src/content/pages/privacy.md +25 -0
- package/dist/starters/astro-starter/src/content/pages/services.md +84 -0
- package/dist/starters/astro-starter/src/content/team/joe-whitlock.md +10 -0
- package/dist/starters/astro-starter/src/content/team/nell-okafor.md +12 -0
- package/dist/starters/astro-starter/src/content/team/priya-anand.md +7 -0
- package/dist/starters/astro-starter/src/content/team/tomas-reyes.md +10 -0
- package/dist/starters/astro-starter/src/content.config.ts +410 -0
- package/dist/starters/astro-starter/src/data/navigation.json +64 -0
- package/dist/starters/astro-starter/src/data/scripts.json +10 -0
- package/dist/starters/astro-starter/src/data/site.json +66 -0
- package/dist/starters/astro-starter/src/data/visibility.json +30 -0
- package/dist/starters/astro-starter/src/galley/catalog-data.js +293 -0
- package/dist/starters/astro-starter/src/galley/catalog.js +42 -0
- package/dist/starters/astro-starter/src/galley/client/attribution.js +79 -0
- package/dist/starters/astro-starter/src/galley/client/forms.js +580 -0
- package/dist/starters/astro-starter/src/galley/client/providers/frame-post.js +77 -0
- package/dist/starters/astro-starter/src/galley/client/providers/galley.js +53 -0
- package/dist/starters/astro-starter/src/galley/client/providers/hubspot.js +110 -0
- package/dist/starters/astro-starter/src/galley/client/providers/mailto.js +20 -0
- package/dist/starters/astro-starter/src/galley/client/providers/marketo.js +133 -0
- package/dist/starters/astro-starter/src/galley/client/providers/pardot.js +53 -0
- package/dist/starters/astro-starter/src/galley/client/providers/salesforce.js +50 -0
- package/dist/starters/astro-starter/src/galley/client/providers/webhook.js +40 -0
- package/dist/starters/astro-starter/src/galley/client/registry.js +32 -0
- package/dist/starters/astro-starter/src/galley/client/types.d.ts +80 -0
- package/dist/starters/astro-starter/src/galley/components/ConsentBanner.astro +17 -0
- package/dist/starters/astro-starter/src/galley/components/Form.astro +102 -0
- package/dist/starters/astro-starter/src/galley/components/Scripts.astro +30 -0
- package/dist/starters/astro-starter/src/galley/components/index.js +5 -0
- package/dist/starters/astro-starter/src/galley/forms/forms.css +389 -0
- package/dist/starters/astro-starter/src/galley/forms/free-email-domains.js +62 -0
- package/dist/starters/astro-starter/src/galley/forms/logic.js +220 -0
- package/dist/starters/astro-starter/src/galley/forms/messages.js +82 -0
- package/dist/starters/astro-starter/src/galley/forms/render.js +490 -0
- package/dist/starters/astro-starter/src/galley/integration.js +21 -0
- package/dist/starters/astro-starter/src/galley/kit.d.ts +298 -0
- package/dist/starters/astro-starter/src/galley/mailto/config.js +76 -0
- package/dist/starters/astro-starter/src/galley/mailto/runtime.gen.js +5 -0
- package/dist/starters/astro-starter/src/galley/runtime/site-config.js +50 -0
- package/dist/starters/astro-starter/src/galley/schema.js +338 -0
- package/dist/starters/astro-starter/src/galley/scripts/banner.js +80 -0
- package/dist/starters/astro-starter/src/galley/scripts/plan.js +253 -0
- package/dist/starters/astro-starter/src/galley/scripts/runtime.gen.js +5 -0
- package/dist/starters/astro-starter/src/galley/scripts/snippets.js +245 -0
- package/dist/starters/astro-starter/src/galley/settings.json +18 -0
- package/dist/starters/astro-starter/src/galley/shared/glob.js +64 -0
- package/dist/starters/astro-starter/src/galley/shared/markdown.js +120 -0
- package/dist/starters/astro-starter/src/galley/visibility/config.js +223 -0
- package/dist/starters/astro-starter/src/galley/visibility/content.js +176 -0
- package/dist/starters/astro-starter/src/galley/visibility/crawlers.js +195 -0
- package/dist/starters/astro-starter/src/galley/visibility/html.js +293 -0
- package/dist/starters/astro-starter/src/galley/visibility/integration.js +528 -0
- package/dist/starters/astro-starter/src/galley/visibility/markdown.js +498 -0
- package/dist/starters/astro-starter/src/galley/visibility/page.js +146 -0
- package/dist/starters/astro-starter/src/galley/visibility/site.js +583 -0
- package/dist/starters/astro-starter/src/galley/visibility/structured.js +131 -0
- package/dist/starters/astro-starter/src/layouts/Base.astro +104 -0
- package/dist/starters/astro-starter/src/lib/posts.ts +43 -0
- package/dist/starters/astro-starter/src/lib/site.ts +201 -0
- package/dist/starters/astro-starter/src/pages/404.astro +13 -0
- package/dist/starters/astro-starter/src/pages/[...slug].astro +32 -0
- package/dist/starters/astro-starter/src/pages/blog/[...page].astro +49 -0
- package/dist/starters/astro-starter/src/pages/blog/[slug].astro +289 -0
- package/dist/starters/astro-starter/src/pages/blog/tags/[tag]/[...page].astro +82 -0
- package/dist/starters/astro-starter/src/styles/global.css +478 -0
- package/dist/starters/astro-starter/src/styles/kit.css +74 -0
- package/dist/starters/astro-starter/src/styles/themes/evening.css +135 -0
- package/dist/starters/astro-starter/src/styles/themes/lowfield.css +133 -0
- package/dist/starters/astro-starter/src/styles/themes/sage.css +134 -0
- package/dist/starters/astro-starter/src/styles/tokens.css +133 -0
- package/dist/starters/astro-starter/starter-notice.json +9 -0
- package/dist/starters/astro-starter/starter.json +52 -0
- package/dist/starters/astro-starter/tsconfig.json +8 -0
- package/dist/starters/astro-starter/wrangler.jsonc +12 -0
- package/dist/starters/astro-storefront/CONTENT-GUIDE.md +280 -0
- package/dist/starters/astro-storefront/LICENSE +21 -0
- package/dist/starters/astro-storefront/README.md +203 -0
- package/dist/starters/astro-storefront/astro.config.ts +50 -0
- package/dist/starters/astro-storefront/galley/photography/ART-DIRECTION.md +170 -0
- package/dist/starters/astro-storefront/galley/photography/LOG.md +91 -0
- package/dist/starters/astro-storefront/galley/photography/placeholders.json +1 -0
- package/dist/starters/astro-storefront/galley/photography/shots.json +743 -0
- package/dist/starters/astro-storefront/galley/previews/chalk.webp +0 -0
- package/dist/starters/astro-storefront/galley/previews/night.webp +0 -0
- package/dist/starters/astro-storefront/galley/previews/paper.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/campaign-hero.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/chapters.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/collection-grid.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/contact.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/credits.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/cta.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/featured-product.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/film.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/form.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/gallery.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/image-band.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/journal-list.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/look.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/lookbook-grid.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/marquee.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/newsletter.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/pieces.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/product-rail.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/quote.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/shop-the-look.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/split-editorial.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/statement.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/stockists.webp +0 -0
- package/dist/starters/astro-storefront/galley/sections/story.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/about.md +47 -0
- package/dist/starters/astro-storefront/galley/templates/about.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/campaign.md +71 -0
- package/dist/starters/astro-storefront/galley/templates/campaign.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/contact.md +19 -0
- package/dist/starters/astro-storefront/galley/templates/contact.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/lookbook.md +47 -0
- package/dist/starters/astro-storefront/galley/templates/lookbook.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/product-story.md +21 -0
- package/dist/starters/astro-storefront/galley/templates/product-story.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/shop-campaign.md +40 -0
- package/dist/starters/astro-storefront/galley/templates/shop-campaign.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/stockists.md +19 -0
- package/dist/starters/astro-storefront/galley/templates/stockists.webp +0 -0
- package/dist/starters/astro-storefront/galley/templates/story.md +49 -0
- package/dist/starters/astro-storefront/galley/templates/story.webp +0 -0
- package/dist/starters/astro-storefront/galley.config.json +752 -0
- package/dist/starters/astro-storefront/gitignore +26 -0
- package/dist/starters/astro-storefront/netlify.toml +6 -0
- package/dist/starters/astro-storefront/package.json +49 -0
- package/dist/starters/astro-storefront/public/favicon.svg +5 -0
- package/dist/starters/astro-storefront/public/images/_sizes/campaign/aw26-harbour-wall-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/campaign/ss26-plaster-steps-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/cover-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-01-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-02-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-03-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-04-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-05-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-06-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-07-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/aw26/look-08-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/ss26/cover-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/ss26/look-01-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/ss26/look-02-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/lookbooks/ss26/look-03-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/pieces/blanket-scarf-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/pieces/field-coat-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/pieces/gansey-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/pieces/rib-polo-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/_sizes/pieces/rollneck-640.webp +0 -0
- package/dist/starters/astro-storefront/public/images/atelier/hands.webp +0 -0
- package/dist/starters/astro-storefront/public/images/atelier/weave.webp +0 -0
- package/dist/starters/astro-storefront/public/images/atelier/workroom.webp +0 -0
- package/dist/starters/astro-storefront/public/images/campaign/aw26-harbour-wall.webp +0 -0
- package/dist/starters/astro-storefront/public/images/campaign/ss26-plaster-steps.webp +0 -0
- package/dist/starters/astro-storefront/public/images/campaign/wall-shadow.webp +0 -0
- package/dist/starters/astro-storefront/public/images/film/the-long-afternoon.webp +0 -0
- package/dist/starters/astro-storefront/public/images/journal/a-pattern-is-a-letter.webp +0 -0
- package/dist/starters/astro-storefront/public/images/journal/eleven-tries-at-rust.webp +0 -0
- package/dist/starters/astro-storefront/public/images/journal/keeping-a-wool-coat.webp +0 -0
- package/dist/starters/astro-storefront/public/images/journal/why-we-make-forty.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/cover.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-01.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-02.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-03.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-04.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-05.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-06.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-07.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/aw26/look-08.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/ss26/cover.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/ss26/look-01.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/ss26/look-02.webp +0 -0
- package/dist/starters/astro-storefront/public/images/lookbooks/ss26/look-03.webp +0 -0
- package/dist/starters/astro-storefront/public/images/people/hesper-lowe.webp +0 -0
- package/dist/starters/astro-storefront/public/images/pieces/blanket-scarf.webp +0 -0
- package/dist/starters/astro-storefront/public/images/pieces/field-coat.webp +0 -0
- package/dist/starters/astro-storefront/public/images/pieces/gansey.webp +0 -0
- package/dist/starters/astro-storefront/public/images/pieces/rib-polo.webp +0 -0
- package/dist/starters/astro-storefront/public/images/pieces/rollneck.webp +0 -0
- package/dist/starters/astro-storefront/public/images/share.jpg +0 -0
- package/dist/starters/astro-storefront/scripts/check-type.mjs +198 -0
- package/dist/starters/astro-storefront/scripts/gallery/gallery.astro +86 -0
- package/dist/starters/astro-storefront/scripts/gallery/integration.mjs +43 -0
- package/dist/starters/astro-storefront/scripts/gallery/sections.md +196 -0
- package/dist/starters/astro-storefront/scripts/ingest-photos.mjs +169 -0
- package/dist/starters/astro-storefront/scripts/lib/tokens.mjs +63 -0
- package/dist/starters/astro-storefront/scripts/make-placeholders.mjs +188 -0
- package/dist/starters/astro-storefront/scripts/make-sizes.mjs +31 -0
- package/dist/starters/astro-storefront/scripts/make-thumbnails.mjs +249 -0
- package/dist/starters/astro-storefront/scripts/seed-shopify.mjs +208 -0
- package/dist/starters/astro-storefront/src/components/Actions.astro +31 -0
- package/dist/starters/astro-storefront/src/components/Footer.astro +206 -0
- package/dist/starters/astro-storefront/src/components/Header.astro +423 -0
- package/dist/starters/astro-storefront/src/components/Icon.astro +43 -0
- package/dist/starters/astro-storefront/src/components/LookbookCard.astro +76 -0
- package/dist/starters/astro-storefront/src/components/LookbookEntry.astro +175 -0
- package/dist/starters/astro-storefront/src/components/Media.astro +37 -0
- package/dist/starters/astro-storefront/src/components/PageEntry.astro +64 -0
- package/dist/starters/astro-storefront/src/components/PieceList.astro +112 -0
- package/dist/starters/astro-storefront/src/components/PostCard.astro +101 -0
- package/dist/starters/astro-storefront/src/components/PostList.astro +103 -0
- package/dist/starters/astro-storefront/src/components/Section.astro +47 -0
- package/dist/starters/astro-storefront/src/components/SectionHeader.astro +70 -0
- package/dist/starters/astro-storefront/src/components/Sections.astro +89 -0
- package/dist/starters/astro-storefront/src/components/StarterNotice.astro +97 -0
- package/dist/starters/astro-storefront/src/components/Tags.astro +68 -0
- package/dist/starters/astro-storefront/src/components/sections/CampaignHero.astro +288 -0
- package/dist/starters/astro-storefront/src/components/sections/Chapters.astro +142 -0
- package/dist/starters/astro-storefront/src/components/sections/CollectionGrid.astro +116 -0
- package/dist/starters/astro-storefront/src/components/sections/Contact.astro +136 -0
- package/dist/starters/astro-storefront/src/components/sections/Credits.astro +62 -0
- package/dist/starters/astro-storefront/src/components/sections/Cta.astro +105 -0
- package/dist/starters/astro-storefront/src/components/sections/FeaturedProduct.astro +109 -0
- package/dist/starters/astro-storefront/src/components/sections/Film.astro +110 -0
- package/dist/starters/astro-storefront/src/components/sections/FormSection.astro +81 -0
- package/dist/starters/astro-storefront/src/components/sections/Gallery.astro +82 -0
- package/dist/starters/astro-storefront/src/components/sections/ImageBand.astro +33 -0
- package/dist/starters/astro-storefront/src/components/sections/JournalList.astro +132 -0
- package/dist/starters/astro-storefront/src/components/sections/Look.astro +82 -0
- package/dist/starters/astro-storefront/src/components/sections/LookbookGrid.astro +139 -0
- package/dist/starters/astro-storefront/src/components/sections/Marquee.astro +164 -0
- package/dist/starters/astro-storefront/src/components/sections/Newsletter.astro +83 -0
- package/dist/starters/astro-storefront/src/components/sections/Pieces.astro +131 -0
- package/dist/starters/astro-storefront/src/components/sections/ProductRail.astro +82 -0
- package/dist/starters/astro-storefront/src/components/sections/Quote.astro +112 -0
- package/dist/starters/astro-storefront/src/components/sections/ShopTheLook.astro +150 -0
- package/dist/starters/astro-storefront/src/components/sections/SplitEditorial.astro +81 -0
- package/dist/starters/astro-storefront/src/components/sections/Statement.astro +178 -0
- package/dist/starters/astro-storefront/src/components/sections/Stockists.astro +139 -0
- package/dist/starters/astro-storefront/src/components/sections/Story.astro +96 -0
- package/dist/starters/astro-storefront/src/components/sections/Unknown.astro +37 -0
- package/dist/starters/astro-storefront/src/components/shop/BagDrawer.astro +114 -0
- package/dist/starters/astro-storefront/src/components/shop/BagView.astro +241 -0
- package/dist/starters/astro-storefront/src/components/shop/Breadcrumbs.astro +63 -0
- package/dist/starters/astro-storefront/src/components/shop/ProductCard.astro +142 -0
- package/dist/starters/astro-storefront/src/components/shop/ProductGrid.astro +297 -0
- package/dist/starters/astro-storefront/src/components/shop/ProductImage.astro +53 -0
- package/dist/starters/astro-storefront/src/content/forms/contact.json +49 -0
- package/dist/starters/astro-storefront/src/content/forms/newsletter.json +30 -0
- package/dist/starters/astro-storefront/src/content/forms/stockist.json +35 -0
- package/dist/starters/astro-storefront/src/content/journal/a-pattern-is-a-letter.md +25 -0
- package/dist/starters/astro-storefront/src/content/journal/eleven-tries-at-rust.md +29 -0
- package/dist/starters/astro-storefront/src/content/journal/keeping-a-wool-coat.md +29 -0
- package/dist/starters/astro-storefront/src/content/journal/why-we-make-forty.md +29 -0
- package/dist/starters/astro-storefront/src/content/lookbooks/aw26-the-long-afternoon.md +126 -0
- package/dist/starters/astro-storefront/src/content/lookbooks/ss26-plaster.md +55 -0
- package/dist/starters/astro-storefront/src/content/pages/404.md +14 -0
- package/dist/starters/astro-storefront/src/content/pages/atelier.md +102 -0
- package/dist/starters/astro-storefront/src/content/pages/bag.md +5 -0
- package/dist/starters/astro-storefront/src/content/pages/contact.md +35 -0
- package/dist/starters/astro-storefront/src/content/pages/index.md +107 -0
- package/dist/starters/astro-storefront/src/content/pages/journal.md +9 -0
- package/dist/starters/astro-storefront/src/content/pages/lookbook.md +33 -0
- package/dist/starters/astro-storefront/src/content/pages/privacy.md +33 -0
- package/dist/starters/astro-storefront/src/content/pages/search.md +5 -0
- package/dist/starters/astro-storefront/src/content/pages/shop.md +4 -0
- package/dist/starters/astro-storefront/src/content/pages/stockists.md +66 -0
- package/dist/starters/astro-storefront/src/content/products/car-coat.md +29 -0
- package/dist/starters/astro-storefront/src/content/products/field-coat.md +35 -0
- package/dist/starters/astro-storefront/src/content/products/gansey.md +20 -0
- package/dist/starters/astro-storefront/src/content/products/wrap-coat.md +16 -0
- package/dist/starters/astro-storefront/src/content.config.ts +563 -0
- package/dist/starters/astro-storefront/src/data/navigation.json +77 -0
- package/dist/starters/astro-storefront/src/data/scripts.json +29 -0
- package/dist/starters/astro-storefront/src/data/shop/catalogue.json +2431 -0
- package/dist/starters/astro-storefront/src/data/shop/store.json +7 -0
- package/dist/starters/astro-storefront/src/data/site.json +161 -0
- package/dist/starters/astro-storefront/src/data/stockists.json +81 -0
- package/dist/starters/astro-storefront/src/data/visibility.json +33 -0
- package/dist/starters/astro-storefront/src/galley/catalog-data.js +293 -0
- package/dist/starters/astro-storefront/src/galley/catalog.js +42 -0
- package/dist/starters/astro-storefront/src/galley/client/attribution.js +79 -0
- package/dist/starters/astro-storefront/src/galley/client/forms.js +580 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/frame-post.js +77 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/galley.js +53 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/hubspot.js +110 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/mailto.js +20 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/marketo.js +133 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/pardot.js +53 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/salesforce.js +50 -0
- package/dist/starters/astro-storefront/src/galley/client/providers/webhook.js +40 -0
- package/dist/starters/astro-storefront/src/galley/client/registry.js +32 -0
- package/dist/starters/astro-storefront/src/galley/client/types.d.ts +80 -0
- package/dist/starters/astro-storefront/src/galley/components/ConsentBanner.astro +17 -0
- package/dist/starters/astro-storefront/src/galley/components/Form.astro +102 -0
- package/dist/starters/astro-storefront/src/galley/components/Scripts.astro +30 -0
- package/dist/starters/astro-storefront/src/galley/components/index.js +5 -0
- package/dist/starters/astro-storefront/src/galley/forms/forms.css +389 -0
- package/dist/starters/astro-storefront/src/galley/forms/free-email-domains.js +62 -0
- package/dist/starters/astro-storefront/src/galley/forms/logic.js +220 -0
- package/dist/starters/astro-storefront/src/galley/forms/messages.js +82 -0
- package/dist/starters/astro-storefront/src/galley/forms/render.js +490 -0
- package/dist/starters/astro-storefront/src/galley/integration.js +21 -0
- package/dist/starters/astro-storefront/src/galley/kit.d.ts +298 -0
- package/dist/starters/astro-storefront/src/galley/mailto/config.js +76 -0
- package/dist/starters/astro-storefront/src/galley/mailto/runtime.gen.js +5 -0
- package/dist/starters/astro-storefront/src/galley/runtime/site-config.js +50 -0
- package/dist/starters/astro-storefront/src/galley/schema.js +338 -0
- package/dist/starters/astro-storefront/src/galley/scripts/banner.js +80 -0
- package/dist/starters/astro-storefront/src/galley/scripts/plan.js +253 -0
- package/dist/starters/astro-storefront/src/galley/scripts/runtime.gen.js +5 -0
- package/dist/starters/astro-storefront/src/galley/scripts/snippets.js +245 -0
- package/dist/starters/astro-storefront/src/galley/settings.json +18 -0
- package/dist/starters/astro-storefront/src/galley/shared/glob.js +64 -0
- package/dist/starters/astro-storefront/src/galley/shared/markdown.js +120 -0
- package/dist/starters/astro-storefront/src/galley/visibility/config.js +223 -0
- package/dist/starters/astro-storefront/src/galley/visibility/content.js +176 -0
- package/dist/starters/astro-storefront/src/galley/visibility/crawlers.js +195 -0
- package/dist/starters/astro-storefront/src/galley/visibility/html.js +293 -0
- package/dist/starters/astro-storefront/src/galley/visibility/integration.js +528 -0
- package/dist/starters/astro-storefront/src/galley/visibility/markdown.js +498 -0
- package/dist/starters/astro-storefront/src/galley/visibility/page.js +146 -0
- package/dist/starters/astro-storefront/src/galley/visibility/site.js +583 -0
- package/dist/starters/astro-storefront/src/galley/visibility/structured.js +131 -0
- package/dist/starters/astro-storefront/src/layouts/Base.astro +112 -0
- package/dist/starters/astro-storefront/src/lib/journal.ts +45 -0
- package/dist/starters/astro-storefront/src/lib/lookbooks.ts +20 -0
- package/dist/starters/astro-storefront/src/lib/shop/data.ts +161 -0
- package/dist/starters/astro-storefront/src/lib/shop/loader.ts +30 -0
- package/dist/starters/astro-storefront/src/lib/shop/store.ts +332 -0
- package/dist/starters/astro-storefront/src/lib/shop/structured.ts +40 -0
- package/dist/starters/astro-storefront/src/lib/shop/types.ts +80 -0
- package/dist/starters/astro-storefront/src/lib/site.ts +181 -0
- package/dist/starters/astro-storefront/src/pages/404.astro +13 -0
- package/dist/starters/astro-storefront/src/pages/[...slug].astro +34 -0
- package/dist/starters/astro-storefront/src/pages/bag.astro +37 -0
- package/dist/starters/astro-storefront/src/pages/journal/[...page].astro +59 -0
- package/dist/starters/astro-storefront/src/pages/journal/[slug].astro +205 -0
- package/dist/starters/astro-storefront/src/pages/journal/tags/[tag]/[...page].astro +83 -0
- package/dist/starters/astro-storefront/src/pages/lookbook/[slug].astro +23 -0
- package/dist/starters/astro-storefront/src/pages/lookbook/index.astro +66 -0
- package/dist/starters/astro-storefront/src/pages/products/[handle].astro +455 -0
- package/dist/starters/astro-storefront/src/pages/search.astro +137 -0
- package/dist/starters/astro-storefront/src/pages/search.json.ts +36 -0
- package/dist/starters/astro-storefront/src/pages/shop/[collection].astro +65 -0
- package/dist/starters/astro-storefront/src/pages/shop/index.astro +33 -0
- package/dist/starters/astro-storefront/src/scripts/shop.ts +742 -0
- package/dist/starters/astro-storefront/src/styles/galley-kit.css +97 -0
- package/dist/starters/astro-storefront/src/styles/global.css +662 -0
- package/dist/starters/astro-storefront/src/styles/themes/chalk.css +181 -0
- package/dist/starters/astro-storefront/src/styles/themes/night.css +181 -0
- package/dist/starters/astro-storefront/src/styles/themes/paper.css +181 -0
- package/dist/starters/astro-storefront/src/styles/tokens.css +181 -0
- package/dist/starters/astro-storefront/starter-notice.json +9 -0
- package/dist/starters/astro-storefront/starter.json +53 -0
- package/dist/starters/astro-storefront/tsconfig.json +8 -0
- package/dist/starters/astro-storefront/wrangler.jsonc +12 -0
- package/dist/web/assets/AppSettingsScreen-D9ZHXus9.js +1 -0
- package/dist/web/assets/BodyEditor-DAJ8MM41.js +1 -0
- package/dist/web/assets/BrandScreen-BuYHSbp6.js +1 -0
- package/dist/web/assets/CollectionScreen-DVXLw7MF.js +1 -0
- package/dist/web/assets/EditorScreen-8vhIBZu1.js +6 -0
- package/dist/web/assets/FormsScreen-BbngAAzO.js +4 -0
- package/dist/web/assets/HistoryScreen-CubZj8QG.js +4 -0
- package/dist/web/assets/ImportScreen-DA8mZ3-S.css +1 -0
- package/dist/web/assets/ImportScreen-eVAPjnE2.js +1 -0
- package/dist/web/assets/InboxScreen-Azqy6w4_.js +2 -0
- package/dist/web/assets/MediaLibraryPane-Dpcxede9.css +1 -0
- package/dist/web/assets/MediaLibraryPane-jMuqbnLa.js +1 -0
- package/dist/web/assets/MediaScreen-BQYVSf8P.css +1 -0
- package/dist/web/assets/MediaScreen-mg2CATkP.js +1 -0
- package/dist/web/assets/NewSiteScreen-D9zWX6oE.js +1 -0
- package/dist/web/assets/NewSiteScreen-RQ3ccqTf.css +1 -0
- package/dist/web/assets/Online-bYUu0ETZ.js +1 -0
- package/dist/web/assets/OpenScreen-DR1GhNWX.js +1 -0
- package/dist/web/assets/PluginsScreen-1qEv-u35.js +3 -0
- package/dist/web/assets/PreviewControls-Du87hOEG.js +1 -0
- package/dist/web/assets/PreviewPane-SH9rzgVw.css +1 -0
- package/dist/web/assets/PreviewPane-a06mELw4.js +3 -0
- package/dist/web/assets/ProofScreen-CZfFbHFS.js +7 -0
- package/dist/web/assets/ProofScreen-fG_mV-V4.css +1 -0
- package/dist/web/assets/ProviderSettings-BOiCGeSI.js +1 -0
- package/dist/web/assets/ProviderSettings-COu_e6Mx.css +1 -0
- package/dist/web/assets/PublishDialog-CSKU1lfx.js +3 -0
- package/dist/web/assets/ReachNote-CZYr1oL0.js +1 -0
- package/dist/web/assets/ReachNote-DhT9Cta-.css +1 -0
- package/dist/web/assets/RedirectsScreen-DeR_yuj5.js +3 -0
- package/dist/web/assets/RedirectsScreen-QTaAXMh-.css +1 -0
- package/dist/web/assets/ScriptsScreen-BXY-kqbq.js +2 -0
- package/dist/web/assets/ScriptsScreen-DMdmwkY4.css +1 -0
- package/dist/web/assets/SiteHomeScreen-DOrqAteL.js +1 -0
- package/dist/web/assets/SiteSettingsScreen-B8xQnhjd.js +4 -0
- package/dist/web/assets/SourceView-B5SoYjUF.js +1 -0
- package/dist/web/assets/VisibilityScreen-B4iOATC4.js +2 -0
- package/dist/web/assets/brand-BYux4UiC.css +1 -0
- package/dist/web/assets/changes-BtRtvJ12.js +1 -0
- package/dist/web/assets/changes-DLBkrfUR.js +1 -0
- package/dist/web/assets/chrome-Brnq5kGb.js +1 -0
- package/dist/web/assets/clickToEdit-CV1WT3k1.js +1 -0
- package/dist/web/assets/coalesce-BG8d12M7.js +1 -0
- package/dist/web/assets/codemirror-CWul2x0p.js +11 -0
- package/dist/web/assets/codemirror-g0T4-Tsm.js +1 -0
- package/dist/web/assets/codemirror-languages-RlWkzgfM.js +28 -0
- package/dist/web/assets/common-BA1skXL0.css +1 -0
- package/dist/web/assets/common-BdVEb5Zs.js +2 -0
- package/dist/web/assets/cost-BhkzE86J.js +1 -0
- package/dist/web/assets/events-CTTFdOf-.js +1 -0
- package/dist/web/assets/figtree-latin-ext-wght-normal-DCwSJGxG.woff2 +0 -0
- package/dist/web/assets/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
- package/dist/web/assets/hashScroll-CSp59QpH.js +1 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/dist/web/assets/index-Djh-DSIT.js +10 -0
- package/dist/web/assets/index-Pd8oyXqS.css +1 -0
- package/dist/web/assets/jobs-BHawhnH2.js +1 -0
- package/dist/web/assets/listPlan-BXud7Oxv.js +1 -0
- package/dist/web/assets/marked.esm-CYtFtVHW.js +75 -0
- package/dist/web/assets/newsreader-latin-ext-opsz-italic-CSPGnFdO.woff2 +0 -0
- package/dist/web/assets/newsreader-latin-ext-opsz-normal-BQn1nviT.woff2 +0 -0
- package/dist/web/assets/newsreader-latin-opsz-italic-kJKFiXvB.woff2 +0 -0
- package/dist/web/assets/newsreader-latin-opsz-normal-s-izfB6B.woff2 +0 -0
- package/dist/web/assets/newsreader-vietnamese-opsz-italic-DTr-ymY4.woff2 +0 -0
- package/dist/web/assets/newsreader-vietnamese-opsz-normal-BjhtXyW2.woff2 +0 -0
- package/dist/web/assets/outside-CZs19WbV.css +1 -0
- package/dist/web/assets/outside-DaBM5h5B.js +2 -0
- package/dist/web/assets/paths-C8ESZJVU.js +1 -0
- package/dist/web/assets/prefs-BcNyBxxO.js +1 -0
- package/dist/web/assets/proof-BnPD-0Jr.css +1 -0
- package/dist/web/assets/proof-zOrlMTSg.js +2 -0
- package/dist/web/assets/purify.es-BQJV6A36.js +3 -0
- package/dist/web/assets/renderMarkdown-R9_GwOSq.js +1 -0
- package/dist/web/assets/scaffold-BHkqc62J.js +1 -0
- package/dist/web/assets/site-DJUEXLHW.js +1 -0
- package/dist/web/assets/sites-CGDZymBT.js +1 -0
- package/dist/web/assets/store-C95UZPFo.js +1 -0
- package/dist/web/assets/ui-C6O2tW4c.js +3 -0
- package/dist/web/assets/useBrand-DSAfWS_y.js +1 -0
- package/dist/web/assets/usePlugins-acEOSN5a.js +1 -0
- package/dist/web/assets/usePlugins-hom8Btua.css +1 -0
- package/dist/web/assets/useVisibility-B8cm5WkO.css +1 -0
- package/dist/web/assets/useVisibility-kpZhLMTT.js +3 -0
- package/dist/web/index.html +23 -0
- package/dist/web/theme.js +8 -0
- package/package.json +49 -3
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
// Vendored from @galley/astro 0.1.0 by scripts/vendor.mjs. Don't edit: run the script again to update.
|
|
2
|
+
// @ts-check
|
|
3
|
+
// `@galley/astro/schema` — zod schemas for the two kinds of file the site kit
|
|
4
|
+
// reads: a form (src/content/forms/<id>.json) and the scripts setup
|
|
5
|
+
// (src/data/scripts.json). They match the contract in kit.d.ts exactly
|
|
6
|
+
// (test/contract.test.ts fails if they drift) and add the checks a type
|
|
7
|
+
// cannot express — unknown field references, ids that don't look like the
|
|
8
|
+
// vendor's ids — with messages a person can act on.
|
|
9
|
+
//
|
|
10
|
+
// zod comes from Astro (`astro/zod`), so the schema is the same zod the
|
|
11
|
+
// site's content config uses and the package adds no dependency.
|
|
12
|
+
import { z } from "astro/zod";
|
|
13
|
+
import { FORM_PROVIDERS, SCRIPT_INTEGRATIONS } from "./catalog-data.js";
|
|
14
|
+
|
|
15
|
+
/** @typedef {import("./kit").JsonValue} JsonValue */
|
|
16
|
+
|
|
17
|
+
/** @type {z.ZodType<JsonValue>} */
|
|
18
|
+
const json = z.lazy(() => z.union([z.string(), z.number(), z.boolean(), z.null(), z.array(json), z.record(z.string(), json)]));
|
|
19
|
+
const settings = z.record(z.string(), json);
|
|
20
|
+
const stringMap = z.record(z.string(), z.string());
|
|
21
|
+
|
|
22
|
+
export const FIELD_TYPES = /** @type {const} */ ([
|
|
23
|
+
"text",
|
|
24
|
+
"email",
|
|
25
|
+
"tel",
|
|
26
|
+
"url",
|
|
27
|
+
"number",
|
|
28
|
+
"textarea",
|
|
29
|
+
"select",
|
|
30
|
+
"radio",
|
|
31
|
+
"checkbox",
|
|
32
|
+
"checkboxes",
|
|
33
|
+
"date",
|
|
34
|
+
"hidden",
|
|
35
|
+
"consent",
|
|
36
|
+
"heading",
|
|
37
|
+
"paragraph",
|
|
38
|
+
]);
|
|
39
|
+
|
|
40
|
+
/** Types that are only layout: they have no value and are never submitted. */
|
|
41
|
+
export const LAYOUT_TYPES = new Set(["heading", "paragraph"]);
|
|
42
|
+
/** Types that need `options`. */
|
|
43
|
+
export const OPTION_TYPES = new Set(["select", "radio", "checkboxes"]);
|
|
44
|
+
|
|
45
|
+
const FIELD_ID = /^[a-z][a-z0-9_-]*$/;
|
|
46
|
+
|
|
47
|
+
export const formFieldSchema = z.object({
|
|
48
|
+
id: z.string().regex(FIELD_ID, "Use lowercase letters, digits, hyphens and underscores, starting with a letter."),
|
|
49
|
+
type: z.enum(FIELD_TYPES),
|
|
50
|
+
label: z.string().optional(),
|
|
51
|
+
name: z.string().optional(),
|
|
52
|
+
placeholder: z.string().optional(),
|
|
53
|
+
help: z.string().optional(),
|
|
54
|
+
required: z.boolean().optional(),
|
|
55
|
+
options: z.array(z.object({ value: z.string(), label: z.string() })).optional(),
|
|
56
|
+
defaultValue: z.string().optional(),
|
|
57
|
+
width: z.enum(["full", "half"]).optional(),
|
|
58
|
+
validation: z
|
|
59
|
+
.object({
|
|
60
|
+
pattern: z.string().optional(),
|
|
61
|
+
minLength: z.number().optional(),
|
|
62
|
+
maxLength: z.number().optional(),
|
|
63
|
+
min: z.number().optional(),
|
|
64
|
+
max: z.number().optional(),
|
|
65
|
+
message: z.string().optional(),
|
|
66
|
+
businessEmailOnly: z.boolean().optional(),
|
|
67
|
+
})
|
|
68
|
+
.optional(),
|
|
69
|
+
showWhen: z
|
|
70
|
+
.object({
|
|
71
|
+
field: z.string(),
|
|
72
|
+
equals: z.string().optional(),
|
|
73
|
+
notEquals: z.string().optional(),
|
|
74
|
+
in: z.array(z.string()).optional(),
|
|
75
|
+
})
|
|
76
|
+
.optional(),
|
|
77
|
+
autofill: z
|
|
78
|
+
.object({
|
|
79
|
+
from: z.enum(["query", "utm", "referrer", "page-url", "page-title", "cookie"]),
|
|
80
|
+
key: z.string().optional(),
|
|
81
|
+
touch: z.enum(["first", "last"]).optional(),
|
|
82
|
+
})
|
|
83
|
+
.optional(),
|
|
84
|
+
text: z.string().optional(),
|
|
85
|
+
step: z.number().int().min(0).optional(),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const formDestinationSchema = z.object({
|
|
89
|
+
provider: z.string().min(1),
|
|
90
|
+
settings,
|
|
91
|
+
mapping: stringMap.optional(),
|
|
92
|
+
constants: stringMap.optional(),
|
|
93
|
+
when: z.object({ field: z.string(), equals: z.string() }).optional(),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export const formActionSchema = z.discriminatedUnion("type", [
|
|
97
|
+
z.object({ type: z.literal("message"), title: z.string().optional(), text: z.string() }),
|
|
98
|
+
z.object({ type: z.literal("redirect"), url: z.string(), passFields: z.array(z.string()).optional(), delaySeconds: z.number().optional() }),
|
|
99
|
+
z.object({ type: z.literal("download"), url: z.string(), label: z.string().optional(), auto: z.boolean().optional() }),
|
|
100
|
+
z.object({
|
|
101
|
+
type: z.literal("event"),
|
|
102
|
+
name: z.string(),
|
|
103
|
+
target: z.enum(["dataLayer", "gtag", "dom"]).optional(),
|
|
104
|
+
params: stringMap.optional(),
|
|
105
|
+
}),
|
|
106
|
+
z.object({ type: z.literal("webhook"), url: z.string() }),
|
|
107
|
+
z.object({ type: z.literal("script"), code: z.string() }),
|
|
108
|
+
]);
|
|
109
|
+
|
|
110
|
+
const formShape = z.object({
|
|
111
|
+
name: z.string(),
|
|
112
|
+
description: z.string().optional(),
|
|
113
|
+
fields: z.array(formFieldSchema),
|
|
114
|
+
submitLabel: z.string(),
|
|
115
|
+
steps: z.array(z.object({ title: z.string().optional(), nextLabel: z.string().optional() })).optional(),
|
|
116
|
+
destinations: z.array(formDestinationSchema),
|
|
117
|
+
afterSubmit: z.array(formActionSchema),
|
|
118
|
+
errorMessage: z.string().optional(),
|
|
119
|
+
messages: stringMap.optional(),
|
|
120
|
+
spam: z
|
|
121
|
+
.object({
|
|
122
|
+
honeypot: z.boolean().optional(),
|
|
123
|
+
minSeconds: z.number().optional(),
|
|
124
|
+
turnstileSiteKey: z.string().optional(),
|
|
125
|
+
})
|
|
126
|
+
.optional(),
|
|
127
|
+
appearance: z
|
|
128
|
+
.object({
|
|
129
|
+
layout: z.enum(["stacked", "inline"]).optional(),
|
|
130
|
+
size: z.enum(["regular", "compact"]).optional(),
|
|
131
|
+
labels: z.enum(["above", "floating", "hidden"]).optional(),
|
|
132
|
+
})
|
|
133
|
+
.optional(),
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The checks across fields: references point at real fields, ids are unique,
|
|
138
|
+
* choices have options, each built-in destination has the settings it needs.
|
|
139
|
+
*
|
|
140
|
+
* @param {import("./kit").FormDefinition} form
|
|
141
|
+
* @param {z.RefinementCtx} ctx
|
|
142
|
+
*/
|
|
143
|
+
function checkForm(form, ctx) {
|
|
144
|
+
const ids = new Set();
|
|
145
|
+
const issue = (/** @type {(string | number)[]} */ path, /** @type {string} */ message) => ctx.addIssue({ code: "custom", path, message });
|
|
146
|
+
|
|
147
|
+
form.fields.forEach((field, index) => {
|
|
148
|
+
if (ids.has(field.id)) issue(["fields", index, "id"], `Two fields are called “${field.id}”. Each field needs its own id.`);
|
|
149
|
+
ids.add(field.id);
|
|
150
|
+
if (OPTION_TYPES.has(field.type) && !(field.options && field.options.length > 0)) {
|
|
151
|
+
issue(["fields", index, "options"], `“${field.id}” is a ${field.type} field, so it needs at least one option.`);
|
|
152
|
+
}
|
|
153
|
+
if ((field.type === "heading" || field.type === "paragraph" || field.type === "consent") && !field.text && !field.label) {
|
|
154
|
+
issue(["fields", index, "text"], `“${field.id}” is a ${field.type}, so it needs its text.`);
|
|
155
|
+
}
|
|
156
|
+
if (field.validation?.pattern !== undefined) {
|
|
157
|
+
try {
|
|
158
|
+
new RegExp(field.validation.pattern, "u");
|
|
159
|
+
} catch {
|
|
160
|
+
issue(["fields", index, "validation", "pattern"], `The pattern for “${field.id}” isn't a regular expression a browser can read.`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (field.step !== undefined && (form.steps?.length ?? 1) <= field.step) {
|
|
164
|
+
issue(["fields", index, "step"], `“${field.id}” is on step ${field.step + 1}, but the form has ${form.steps?.length ?? 1} step${(form.steps?.length ?? 1) === 1 ? "" : "s"}.`);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
form.fields.forEach((field, index) => {
|
|
168
|
+
if (field.showWhen && !ids.has(field.showWhen.field)) issue(["fields", index, "showWhen", "field"], `“${field.id}” depends on “${field.showWhen.field}”, which isn't a field of this form.`);
|
|
169
|
+
});
|
|
170
|
+
if (form.destinations.length === 0) issue(["destinations"], "Add at least one destination, so submissions go somewhere.");
|
|
171
|
+
form.destinations.forEach((destination, index) => {
|
|
172
|
+
if (destination.when && !ids.has(destination.when.field)) issue(["destinations", index, "when", "field"], `This destination depends on “${destination.when.field}”, which isn't a field of this form.`);
|
|
173
|
+
for (const key of Object.keys(destination.mapping ?? {})) {
|
|
174
|
+
if (!ids.has(key)) issue(["destinations", index, "mapping", key], `The mapping names “${key}”, which isn't a field of this form.`);
|
|
175
|
+
}
|
|
176
|
+
const info = FORM_PROVIDERS.find((entry) => entry.id === destination.provider);
|
|
177
|
+
|
|
178
|
+
for (const setting of info?.settings ?? []) {
|
|
179
|
+
const value = destination.settings[setting.key];
|
|
180
|
+
|
|
181
|
+
if (value === undefined || value === "" || value === null) {
|
|
182
|
+
if (setting.required) issue(["destinations", index, "settings", setting.key], `${info?.name} needs its ${setting.label.toLowerCase()} (settings.${setting.key}).`);
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (setting.pattern && !new RegExp(setting.pattern).test(String(value))) {
|
|
186
|
+
issue(["destinations", index, "settings", setting.key], `“${String(value)}” doesn't look like a ${info?.name} ${setting.label.toLowerCase()}${setting.placeholder ? ` (for example ${setting.placeholder})` : ""}.`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
form.afterSubmit.forEach((action, index) => {
|
|
191
|
+
if (action.type === "redirect") {
|
|
192
|
+
for (const field of action.passFields ?? []) if (!ids.has(field)) issue(["afterSubmit", index, "passFields"], `The redirect passes “${field}”, which isn't a field of this form.`);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** A form file: src/content/forms/<id>.json. */
|
|
198
|
+
export const formSchema = formShape.superRefine(checkForm);
|
|
199
|
+
|
|
200
|
+
// ─────────────────────────────────────────────────────────────── scripts
|
|
201
|
+
|
|
202
|
+
const consentCategory = z.enum(["necessary", "analytics", "marketing", "preferences"]);
|
|
203
|
+
const placement = z.enum(["head", "body-start", "body-end"]);
|
|
204
|
+
|
|
205
|
+
export const scriptEntrySchema = z.object({
|
|
206
|
+
id: z.string().regex(FIELD_ID, "Use lowercase letters, digits, hyphens and underscores, starting with a letter."),
|
|
207
|
+
kind: z.string().min(1),
|
|
208
|
+
label: z.string().optional(),
|
|
209
|
+
enabled: z.boolean(),
|
|
210
|
+
settings,
|
|
211
|
+
placement: placement.optional(),
|
|
212
|
+
load: z.enum(["eager", "idle", "interaction"]).optional(),
|
|
213
|
+
consent: consentCategory.optional(),
|
|
214
|
+
include: z.array(z.string()).optional(),
|
|
215
|
+
exclude: z.array(z.string()).optional(),
|
|
216
|
+
inPreview: z.boolean().optional(),
|
|
217
|
+
note: z.string().optional(),
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
const categoryText = z.object({ label: z.string().optional(), description: z.string().optional() });
|
|
221
|
+
|
|
222
|
+
export const consentSettingsSchema = z.object({
|
|
223
|
+
mode: z.enum(["none", "banner", "external"]),
|
|
224
|
+
defaults: z.array(consentCategory).optional(),
|
|
225
|
+
banner: z
|
|
226
|
+
.object({
|
|
227
|
+
title: z.string().optional(),
|
|
228
|
+
text: z.string().optional(),
|
|
229
|
+
acceptLabel: z.string().optional(),
|
|
230
|
+
rejectLabel: z.string().optional(),
|
|
231
|
+
settingsLabel: z.string().optional(),
|
|
232
|
+
saveLabel: z.string().optional(),
|
|
233
|
+
policyUrl: z.string().optional(),
|
|
234
|
+
policyLabel: z.string().optional(),
|
|
235
|
+
categories: z
|
|
236
|
+
.object({
|
|
237
|
+
necessary: categoryText.optional(),
|
|
238
|
+
analytics: categoryText.optional(),
|
|
239
|
+
marketing: categoryText.optional(),
|
|
240
|
+
preferences: categoryText.optional(),
|
|
241
|
+
})
|
|
242
|
+
.optional(),
|
|
243
|
+
})
|
|
244
|
+
.optional(),
|
|
245
|
+
googleConsentMode: z.boolean().optional(),
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Each enabled entry of a known kind has the settings its snippet needs, in
|
|
250
|
+
* the shape the vendor issues them — so a typo is a build error, not a tag
|
|
251
|
+
* that silently does nothing.
|
|
252
|
+
*
|
|
253
|
+
* @param {import("./kit").ScriptsConfig} config
|
|
254
|
+
* @param {z.RefinementCtx} ctx
|
|
255
|
+
*/
|
|
256
|
+
function checkScripts(config, ctx) {
|
|
257
|
+
const ids = new Set();
|
|
258
|
+
|
|
259
|
+
config.scripts.forEach((entry, index) => {
|
|
260
|
+
const at = (/** @type {string} */ key) => ["scripts", index, "settings", key];
|
|
261
|
+
|
|
262
|
+
if (ids.has(entry.id)) ctx.addIssue({ code: "custom", path: ["scripts", index, "id"], message: `Two scripts are called “${entry.id}”. Each needs its own id.` });
|
|
263
|
+
ids.add(entry.id);
|
|
264
|
+
const info = SCRIPT_INTEGRATIONS.find((item) => item.kind === entry.kind);
|
|
265
|
+
// A kind this kit doesn't know (a plugin's) is written like "custom".
|
|
266
|
+
const custom = entry.kind === "custom" || !info;
|
|
267
|
+
|
|
268
|
+
if (custom) checkCustom(entry, at, ctx);
|
|
269
|
+
if (!info) return;
|
|
270
|
+
for (const setting of info.settings) {
|
|
271
|
+
const value = entry.settings[setting.key];
|
|
272
|
+
|
|
273
|
+
if (value === undefined || value === null || value === "") {
|
|
274
|
+
if (setting.required && entry.enabled) ctx.addIssue({ code: "custom", path: at(setting.key), message: `${info.name} needs its ${setting.label} (settings.${setting.key}${setting.placeholder ? `, like ${setting.placeholder}` : ""}).` });
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
if (setting.pattern && !new RegExp(setting.pattern).test(String(value))) {
|
|
278
|
+
ctx.addIssue({
|
|
279
|
+
code: "custom",
|
|
280
|
+
path: at(setting.key),
|
|
281
|
+
message: `“${String(value)}” doesn't look like a ${info.name} ${setting.label}${setting.placeholder ? ` (it looks like ${setting.placeholder})` : ""}.`,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if (entry.enabled && entry.kind === "plausible" && !entry.settings.scriptId && !entry.settings.domain) {
|
|
286
|
+
ctx.addIssue({ code: "custom", path: at("scriptId"), message: "Plausible needs its script ID (pa-…, from Site installation) or, for the older script, the site's domain." });
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The rules for a script written from its own src / inline: "custom", and
|
|
293
|
+
* any kind this kit has no snippet for.
|
|
294
|
+
*
|
|
295
|
+
* @param {import("./kit").ScriptEntry} entry
|
|
296
|
+
* @param {(key: string) => (string | number)[]} at
|
|
297
|
+
* @param {z.RefinementCtx} ctx
|
|
298
|
+
*/
|
|
299
|
+
function checkCustom(entry, at, ctx) {
|
|
300
|
+
if (entry.enabled && !entry.settings.src && !entry.settings.inline) {
|
|
301
|
+
ctx.addIssue({
|
|
302
|
+
code: "custom",
|
|
303
|
+
path: at("src"),
|
|
304
|
+
message: entry.kind === "custom" ? "A custom script needs a script address (settings.src) or code (settings.inline)." : `A “${entry.kind}” script is written from its own settings.src (the script's address) or settings.inline (its code); give it one of them.`,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
if (entry.settings.attributes !== undefined) {
|
|
308
|
+
const attributes = entry.settings.attributes;
|
|
309
|
+
|
|
310
|
+
if (typeof attributes !== "object" || attributes === null || Array.isArray(attributes) || Object.values(attributes).some((value) => typeof value !== "string" && typeof value !== "boolean")) {
|
|
311
|
+
ctx.addIssue({ code: "custom", path: at("attributes"), message: "settings.attributes is a list of attribute names and their text (or true for a bare attribute)." });
|
|
312
|
+
} else if (Object.keys(attributes).some((name) => !/^[a-z][a-z0-9-]*$/i.test(name) || /^on/i.test(name) || name.toLowerCase() === "src" || name.toLowerCase() === "type")) {
|
|
313
|
+
ctx.addIssue({ code: "custom", path: at("attributes"), message: "settings.attributes can't set src, type or on… handlers; use settings.src and settings.inline." });
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const scriptsShape = z.object({
|
|
319
|
+
scripts: z.array(scriptEntrySchema),
|
|
320
|
+
consent: consentSettingsSchema.optional(),
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
/** The scripts setup: src/data/scripts.json. */
|
|
324
|
+
export const scriptsSchema = scriptsShape.superRefine(checkScripts);
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* A zod error as plain lines: “scripts[0].settings.containerId: … ”.
|
|
328
|
+
*
|
|
329
|
+
* @param {z.ZodError} error
|
|
330
|
+
* @returns {string[]}
|
|
331
|
+
*/
|
|
332
|
+
export function describeIssues(error) {
|
|
333
|
+
return error.issues.map((issue) => {
|
|
334
|
+
const path = issue.path.map((part, index) => (typeof part === "number" ? `[${part}]` : `${index === 0 ? "" : "."}${String(part)}`)).join("");
|
|
335
|
+
|
|
336
|
+
return path ? `${path}: ${issue.message}` : issue.message;
|
|
337
|
+
});
|
|
338
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Vendored from @galley/astro 0.1.0 by scripts/vendor.mjs. Don't edit: run the script again to update.
|
|
2
|
+
// @ts-check
|
|
3
|
+
// The built-in consent banner: a small, non-modal region at the foot of the
|
|
4
|
+
// page with three equal choices — accept all, reject all, choose — and the
|
|
5
|
+
// categories this site actually uses. Server-rendered and hidden; the scripts
|
|
6
|
+
// runtime shows it when no choice is stored, and again whenever an element
|
|
7
|
+
// with `data-galley-consent-open` is clicked (a footer link, say).
|
|
8
|
+
//
|
|
9
|
+
// Every word comes from scripts.json → consent.banner, falling back to the
|
|
10
|
+
// defaults below (written to brand/voice.md). Styled only through custom
|
|
11
|
+
// properties, so a site themes it like its forms.
|
|
12
|
+
|
|
13
|
+
import { escapeHtml as esc, inlineMarkdown, withBase } from "../shared/markdown.js";
|
|
14
|
+
|
|
15
|
+
/** @typedef {import("../kit").ConsentSettings} ConsentSettings */
|
|
16
|
+
/** @typedef {import("../kit").ConsentCategory} ConsentCategory */
|
|
17
|
+
|
|
18
|
+
export const BANNER_DEFAULTS = Object.freeze({
|
|
19
|
+
title: "Cookies and tracking",
|
|
20
|
+
text: "This site would like to measure visits and the success of its marketing. Choose what it may use. You can change this at any time from the link at the bottom of each page.",
|
|
21
|
+
acceptLabel: "Accept all",
|
|
22
|
+
rejectLabel: "Reject all",
|
|
23
|
+
settingsLabel: "Choose…",
|
|
24
|
+
saveLabel: "Save choices",
|
|
25
|
+
policyLabel: "Privacy policy",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const CATEGORY_DEFAULTS = Object.freeze({
|
|
29
|
+
necessary: { label: "Necessary", description: "Needed for the site to work. Always on." },
|
|
30
|
+
analytics: { label: "Analytics", description: "Counts visits and shows which pages are used." },
|
|
31
|
+
marketing: { label: "Marketing", description: "Measures ads and remembers visits for campaigns." },
|
|
32
|
+
preferences: { label: "Preferences", description: "Remembers choices such as chat conversations." },
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param {ConsentSettings} consent
|
|
37
|
+
* @param {ConsentCategory[]} categories The optional categories the site uses, in order.
|
|
38
|
+
* @param {{ base?: string }} [options] `base`: the site's base path, for a policyUrl or text links written from the site root.
|
|
39
|
+
*/
|
|
40
|
+
export function renderBanner(consent, categories, options = {}) {
|
|
41
|
+
const base = options.base ?? "";
|
|
42
|
+
const text = { ...BANNER_DEFAULTS, ...Object.fromEntries(Object.entries(consent.banner ?? {}).filter(([, value]) => typeof value === "string" && value)) };
|
|
43
|
+
/** @param {ConsentCategory} category */
|
|
44
|
+
const category = (category) => ({ ...CATEGORY_DEFAULTS[category], ...(consent.banner?.categories?.[category] ?? {}) });
|
|
45
|
+
const rows = /** @type {ConsentCategory[]} */ (["necessary", ...categories])
|
|
46
|
+
.map((name) => {
|
|
47
|
+
const info = category(name);
|
|
48
|
+
const id = `galley-consent-${name}`;
|
|
49
|
+
|
|
50
|
+
return `<div class="galley-consent__category"><input type="checkbox" id="${id}"${name === "necessary" ? " checked disabled" : ` data-category="${name}"`}><label for="${id}"><span class="galley-consent__category-name">${esc(info.label)}</span> <span class="galley-consent__category-text">${esc(info.description)}</span></label></div>`;
|
|
51
|
+
})
|
|
52
|
+
.join("");
|
|
53
|
+
const policy = consent.banner?.policyUrl ? ` <a href="${esc(withBase(consent.banner.policyUrl, base))}">${esc(text.policyLabel)}</a>` : "";
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
`<section class="galley-consent" data-galley-consent aria-labelledby="galley-consent-title" hidden>` +
|
|
57
|
+
`<div class="galley-consent__inner">` +
|
|
58
|
+
`<p class="galley-consent__title" id="galley-consent-title">${esc(text.title)}</p>` +
|
|
59
|
+
`<p class="galley-consent__text">${inlineMarkdown(text.text, { base })}${policy}</p>` +
|
|
60
|
+
`<fieldset class="galley-consent__choices" id="galley-consent-choices" data-galley-consent-choices hidden><legend class="galley-visually-hidden">${esc(text.settingsLabel.replace(/…$/, ""))}</legend>${rows}</fieldset>` +
|
|
61
|
+
`<div class="galley-consent__actions">` +
|
|
62
|
+
`<button type="button" class="galley-consent__button" data-galley-consent-accept>${esc(text.acceptLabel)}</button>` +
|
|
63
|
+
`<button type="button" class="galley-consent__button" data-galley-consent-reject>${esc(text.rejectLabel)}</button>` +
|
|
64
|
+
`<button type="button" class="galley-consent__button galley-consent__button--quiet" data-galley-consent-settings aria-expanded="false" aria-controls="galley-consent-choices">${esc(text.settingsLabel)}</button>` +
|
|
65
|
+
`<button type="button" class="galley-consent__button" data-galley-consent-save hidden>${esc(text.saveLabel)}</button>` +
|
|
66
|
+
`</div></div></section>`
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
* Custom properties (with fallbacks):
|
|
72
|
+
* --galley-consent-bg Canvas --galley-consent-text CanvasText
|
|
73
|
+
* --galley-consent-border currentColor 25% --galley-consent-radius 0.5rem
|
|
74
|
+
* --galley-consent-shadow a soft shadow --galley-consent-width 44rem
|
|
75
|
+
* --galley-button-bg / --galley-button-text / --galley-button-radius (shared with forms;
|
|
76
|
+
* CanvasText on Canvas when unset — never currentColor, which on a button
|
|
77
|
+
* is its own text colour)
|
|
78
|
+
* --galley-field-focus focus ring
|
|
79
|
+
*/
|
|
80
|
+
export const BANNER_CSS = `.galley-consent [hidden]{display:none!important}.galley-consent{position:fixed;inset-inline:0;inset-block-end:0;z-index:2147483000;display:flex;justify-content:center;padding:0.75rem;pointer-events:none}.galley-consent[hidden]{display:none}.galley-consent__inner{box-sizing:border-box;display:grid;gap:0.75rem;width:min(100%,var(--galley-consent-width,44rem));max-height:calc(100vh - 1.5rem);overflow:auto;padding:1rem 1.25rem;border:1px solid var(--galley-consent-border,color-mix(in srgb,currentColor 25%,transparent));border-radius:var(--galley-consent-radius,0.5rem);background:var(--galley-consent-bg,Canvas);color:var(--galley-consent-text,CanvasText);box-shadow:var(--galley-consent-shadow,0 8px 30px rgb(0 0 0 / 0.18));font:inherit;pointer-events:auto}.galley-consent__title{margin:0;font-weight:700}.galley-consent__text{margin:0}.galley-consent__text a{color:inherit}.galley-consent__choices{display:grid;gap:0.5rem;margin:0;padding:0;border:0}.galley-consent__category{display:grid;grid-template-columns:auto 1fr;gap:0.6rem;align-items:start}.galley-consent__category input{width:1.1em;height:1.1em;margin:0.2em 0 0;accent-color:var(--galley-field-focus,Highlight)}.galley-consent__category-name{font-weight:600}.galley-consent__actions{display:flex;flex-wrap:wrap;gap:0.5rem}.galley-consent__button{min-height:2.5rem;padding:0.5em 1em;border:1px solid var(--galley-button-bg,CanvasText);border-radius:var(--galley-button-radius,0.375rem);background:var(--galley-button-bg,CanvasText);color:var(--galley-button-text,Canvas);font:inherit;font-weight:600;cursor:pointer}.galley-consent__button--quiet{background:transparent;color:inherit}.galley-consent__button:focus-visible,.galley-consent input:focus-visible,.galley-consent a:focus-visible{outline:2px solid var(--galley-field-focus,Highlight);outline-offset:2px}.galley-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}`;
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
// Vendored from @galley/astro 0.1.0 by scripts/vendor.mjs. Don't edit: run the script again to update.
|
|
2
|
+
// @ts-check
|
|
3
|
+
// scripts.json → what one page gets, and the HTML for each place it goes.
|
|
4
|
+
// Used by the integration's middleware (no template changes), by <Scripts />
|
|
5
|
+
// for sites that place things themselves, by the build summary and by the
|
|
6
|
+
// dev-only manifest at /__galley/scripts.json.
|
|
7
|
+
//
|
|
8
|
+
// Every snippet goes into the page inert — <script type="text/plain"> — and
|
|
9
|
+
// only the inline runtime (runtime.js) turns it into a running script, after
|
|
10
|
+
// checking consent, the load moment and whether the page is in the editor's
|
|
11
|
+
// preview. <noscript> fallbacks are written only for scripts that need no
|
|
12
|
+
// consent, because a page without JavaScript can't ask for it.
|
|
13
|
+
|
|
14
|
+
import { SCRIPT_INTEGRATIONS } from "../catalog-data.js";
|
|
15
|
+
import { inScope } from "../shared/glob.js";
|
|
16
|
+
import { BANNER_CSS, renderBanner } from "./banner.js";
|
|
17
|
+
import { RUNTIME } from "./runtime.gen.js";
|
|
18
|
+
import { buildSnippet } from "./snippets.js";
|
|
19
|
+
|
|
20
|
+
/** @typedef {import("../kit").ScriptsConfig} ScriptsConfig */
|
|
21
|
+
/** @typedef {import("../kit").ScriptEntry} ScriptEntry */
|
|
22
|
+
/** @typedef {import("../kit").ConsentCategory} ConsentCategory */
|
|
23
|
+
/** @typedef {import("./snippets.js").ScriptPart} ScriptPart */
|
|
24
|
+
/** @typedef {"head" | "body-start" | "body-end"} Placement */
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {object} ResolvedEntry
|
|
28
|
+
* @property {ScriptEntry} entry
|
|
29
|
+
* @property {string} name
|
|
30
|
+
* @property {ConsentCategory} consent
|
|
31
|
+
* @property {Placement} placement
|
|
32
|
+
* @property {"eager" | "idle" | "interaction"} load
|
|
33
|
+
* @property {ScriptPart[]} parts
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @typedef {object} PagePlan
|
|
38
|
+
* @property {ResolvedEntry[]} entries The entries this page carries.
|
|
39
|
+
* @property {boolean} runtime Whether the page needs the inline runtime at all.
|
|
40
|
+
* @property {boolean} banner
|
|
41
|
+
* @property {ConsentCategory[]} categories Optional categories used anywhere on the site.
|
|
42
|
+
* @property {Record<string, unknown>} config The runtime's configuration.
|
|
43
|
+
* @property {(category: ConsentCategory) => boolean} grantedByDefault
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
export const PLACEMENTS = /** @type {const} */ (["head", "body-start", "body-end"]);
|
|
47
|
+
const ORDER = /** @type {ConsentCategory[]} */ (["analytics", "marketing", "preferences"]);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Every enabled entry with its consent, placement, load moment and parts.
|
|
51
|
+
* Throws (a ScriptSettingsError) on an id that doesn't fit its integration.
|
|
52
|
+
*
|
|
53
|
+
* @param {ScriptsConfig} config
|
|
54
|
+
* @returns {ResolvedEntry[]}
|
|
55
|
+
*/
|
|
56
|
+
export function resolveEntries(config) {
|
|
57
|
+
return config.scripts
|
|
58
|
+
.filter((entry) => entry.enabled)
|
|
59
|
+
.map((entry) => {
|
|
60
|
+
const info = SCRIPT_INTEGRATIONS.find((item) => item.kind === entry.kind);
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
entry,
|
|
64
|
+
name: entry.label ?? info?.name ?? entry.kind,
|
|
65
|
+
consent: entry.consent ?? info?.defaultConsent ?? "marketing",
|
|
66
|
+
placement: entry.placement ?? info?.defaultPlacement ?? "body-end",
|
|
67
|
+
load: entry.load ?? "eager",
|
|
68
|
+
parts: buildSnippet(entry),
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @param {ScriptsConfig | null | undefined} config
|
|
75
|
+
* @param {{ path: string; dev?: boolean; host?: string; utm?: boolean; resolved?: ResolvedEntry[] }} page
|
|
76
|
+
* @returns {PagePlan}
|
|
77
|
+
*/
|
|
78
|
+
export function planPage(config, page) {
|
|
79
|
+
const consent = config?.consent ?? { mode: "none" };
|
|
80
|
+
const all = config ? page.resolved ?? resolveEntries(config) : [];
|
|
81
|
+
const entries = all.filter(({ entry }) => inScope(page.path, entry) && (!page.dev || entry.inPreview === true));
|
|
82
|
+
// UTM memory for forms is marketing attribution: under a consent mode it is
|
|
83
|
+
// stored only once "marketing" is granted, so a site whose forms use it
|
|
84
|
+
// offers Marketing in the banner even when no script needs it (docs/scripts.md).
|
|
85
|
+
const categories = ORDER.filter((category) => all.some((item) => item.consent === category) || (category === "marketing" && Boolean(page.utm)));
|
|
86
|
+
const defaults = consent.defaults ?? [];
|
|
87
|
+
const grantedByDefault = (/** @type {ConsentCategory} */ category) => category === "necessary" || consent.mode === "none" || defaults.includes(category);
|
|
88
|
+
const banner = consent.mode === "banner" && categories.length > 0;
|
|
89
|
+
const runtime = entries.length > 0 || banner || Boolean(page.utm) || (consent.mode !== "none" && Boolean(consent.googleConsentMode));
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
entries,
|
|
93
|
+
runtime,
|
|
94
|
+
banner,
|
|
95
|
+
categories,
|
|
96
|
+
grantedByDefault,
|
|
97
|
+
config: { mode: consent.mode, defaults, gcm: Boolean(consent.googleConsentMode), host: page.host ?? "", utm: Boolean(page.utm) },
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Script text that can sit inside <script>…</script> without ending it early. */
|
|
102
|
+
const scriptText = (/** @type {string} */ code) => code.replace(/<\/(script)/gi, "<\\/$1").replace(/<!--/g, "<\\!--");
|
|
103
|
+
/** @param {string} value */
|
|
104
|
+
const attr = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
105
|
+
|
|
106
|
+
/** The constant text of the runtime's inline script for this configuration. */
|
|
107
|
+
export function runtimeScript(/** @type {PagePlan} */ plan) {
|
|
108
|
+
return `(${RUNTIME})(${JSON.stringify(plan.config)})`;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** @param {Placement} placement */
|
|
112
|
+
export const runCall = (placement) => `galleyScripts.run("${placement}")`;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The HTML for one placement of one page ("" when it has nothing).
|
|
116
|
+
*
|
|
117
|
+
* @param {PagePlan} plan
|
|
118
|
+
* @param {Placement} placement
|
|
119
|
+
* @param {{ consent?: import("../kit").ConsentSettings; base?: string }} [extra] `base`: the site's base path.
|
|
120
|
+
*/
|
|
121
|
+
export function renderPlacement(plan, placement, extra = {}) {
|
|
122
|
+
if (!plan.runtime) return "";
|
|
123
|
+
let html = "";
|
|
124
|
+
|
|
125
|
+
if (placement === "head") {
|
|
126
|
+
html += `<script data-galley-scripts="head">${runtimeScript(plan)}</script>`;
|
|
127
|
+
if (plan.banner) html += `<style data-galley-consent-style>${BANNER_CSS}</style>`;
|
|
128
|
+
}
|
|
129
|
+
let blocks = 0;
|
|
130
|
+
|
|
131
|
+
for (const item of plan.entries) {
|
|
132
|
+
for (const [index, part] of item.parts.entries()) {
|
|
133
|
+
const at = part.placement ?? item.placement;
|
|
134
|
+
|
|
135
|
+
if (at !== placement) continue;
|
|
136
|
+
if (part.type === "noscript") {
|
|
137
|
+
if (plan.grantedByDefault(item.consent)) html += `<noscript data-galley-script="${attr(item.entry.id)}">${part.html ?? ""}</noscript>`;
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
blocks += 1;
|
|
141
|
+
html +=
|
|
142
|
+
`<script type="text/plain" data-galley-script="${attr(item.entry.id)}" data-part="${index}" data-placement="${placement}" data-consent="${item.consent}" data-load="${item.load}"` +
|
|
143
|
+
(item.entry.inPreview ? " data-preview" : "") +
|
|
144
|
+
(part.src ? ` data-src="${attr(part.src)}"` : "") +
|
|
145
|
+
(part.attrs && Object.keys(part.attrs).length > 0 ? ` data-attrs="${attr(JSON.stringify(part.attrs))}"` : "") +
|
|
146
|
+
`>${part.src ? "" : scriptText(part.code ?? "")}</script>`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (placement === "body-end" && plan.banner && extra.consent) html += renderBanner(extra.consent, plan.categories, { base: extra.base });
|
|
150
|
+
if (blocks > 0 || placement === "body-end") html += `<script data-galley-scripts="${placement}">${runCall(placement)}</script>`;
|
|
151
|
+
return html;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Puts each placement's HTML into a finished page: the head part right after
|
|
156
|
+
* <meta charset> (else right after <head>), body-start right after <body>,
|
|
157
|
+
* body-end before </body>. A placement the page already carries (because the
|
|
158
|
+
* layout uses <Scripts />) is left alone.
|
|
159
|
+
*
|
|
160
|
+
* @param {string} html
|
|
161
|
+
* @param {PagePlan} plan
|
|
162
|
+
* @param {{ consent?: import("../kit").ConsentSettings; base?: string }} [extra]
|
|
163
|
+
*/
|
|
164
|
+
export function injectPlan(html, plan, extra = {}) {
|
|
165
|
+
if (!plan.runtime) return html;
|
|
166
|
+
let out = html;
|
|
167
|
+
const has = (/** @type {Placement} */ placement) => out.includes(`data-galley-scripts="${placement}"`);
|
|
168
|
+
|
|
169
|
+
if (!has("head")) {
|
|
170
|
+
const head = renderPlacement(plan, "head", extra);
|
|
171
|
+
const charset = /<meta[^>]+charset[^>]*>/i.exec(out);
|
|
172
|
+
const headOpen = /<head\b[^>]*>/i.exec(out);
|
|
173
|
+
const at = charset && headOpen && charset.index > headOpen.index ? charset.index + charset[0].length : headOpen ? headOpen.index + headOpen[0].length : -1;
|
|
174
|
+
|
|
175
|
+
if (at >= 0) out = out.slice(0, at) + head + out.slice(at);
|
|
176
|
+
}
|
|
177
|
+
if (!has("body-start")) {
|
|
178
|
+
const start = renderPlacement(plan, "body-start", extra);
|
|
179
|
+
const body = /<body\b[^>]*>/i.exec(out);
|
|
180
|
+
|
|
181
|
+
if (start && body) out = out.slice(0, body.index + body[0].length) + start + out.slice(body.index + body[0].length);
|
|
182
|
+
}
|
|
183
|
+
if (!has("body-end")) {
|
|
184
|
+
// A layout that renders <ConsentBanner /> itself keeps its own.
|
|
185
|
+
const end = renderPlacement(plan, "body-end", /data-galley-consent[\s>]/.test(out) ? { base: extra.base } : extra);
|
|
186
|
+
const close = out.toLowerCase().lastIndexOf("</body>");
|
|
187
|
+
|
|
188
|
+
if (end) out = close >= 0 ? out.slice(0, close) + end + out.slice(close) : out + end;
|
|
189
|
+
}
|
|
190
|
+
return out;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* What the build log says: which scripts load on the site and under which
|
|
195
|
+
* consent, one line each.
|
|
196
|
+
*
|
|
197
|
+
* @param {ScriptsConfig} config
|
|
198
|
+
* @returns {string[]}
|
|
199
|
+
*/
|
|
200
|
+
export function summarize(config) {
|
|
201
|
+
const consent = config.consent ?? { mode: "none" };
|
|
202
|
+
const resolved = resolveEntries(config);
|
|
203
|
+
const mode = consent.mode === "banner" ? "the built-in consent banner" : consent.mode === "external" ? "another consent tool (galleyConsent.set / Consent Mode / Cookiebot)" : "no consent step";
|
|
204
|
+
const lines = [`scripts: ${resolved.length} of ${config.scripts.length} enabled · ${mode}${consent.googleConsentMode ? " · Google Consent Mode v2" : ""}`];
|
|
205
|
+
|
|
206
|
+
for (const item of resolved) {
|
|
207
|
+
const id = Object.values(item.entry.settings).find((value) => typeof value === "string" && /^[A-Za-z0-9-]{4,}$/.test(value));
|
|
208
|
+
const when = item.consent === "necessary" || consent.mode === "none" ? "always" : `after ${item.consent} consent`;
|
|
209
|
+
const where = item.entry.include?.length ? `only ${item.entry.include.join(", ")}` : "every page";
|
|
210
|
+
const except = item.entry.exclude?.length ? ` except ${item.entry.exclude.join(", ")}` : "";
|
|
211
|
+
|
|
212
|
+
lines.push(` ✓ ${item.entry.id} · ${item.name}${id ? ` ${id}` : ""} · ${item.placement}, ${item.load} · ${when} · ${where}${except}`);
|
|
213
|
+
}
|
|
214
|
+
for (const entry of config.scripts.filter((item) => !item.enabled)) lines.push(` – ${entry.id} · off`);
|
|
215
|
+
return lines;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The dev-only manifest: what a given page would load in production.
|
|
220
|
+
*
|
|
221
|
+
* @param {ScriptsConfig | null} config
|
|
222
|
+
* @param {string} path
|
|
223
|
+
* @param {string} file The scripts file, relative to the site.
|
|
224
|
+
*/
|
|
225
|
+
export function manifest(config, path, file) {
|
|
226
|
+
if (!config) return { file, exists: false, path, consent: { mode: "none" }, scripts: [] };
|
|
227
|
+
const resolved = resolveEntries(config);
|
|
228
|
+
|
|
229
|
+
return {
|
|
230
|
+
file,
|
|
231
|
+
exists: true,
|
|
232
|
+
path,
|
|
233
|
+
consent: config.consent ?? { mode: "none" },
|
|
234
|
+
scripts: config.scripts.map((entry) => {
|
|
235
|
+
const item = resolved.find((candidate) => candidate.entry === entry);
|
|
236
|
+
const onPage = Boolean(item) && inScope(path, entry);
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
id: entry.id,
|
|
240
|
+
kind: entry.kind,
|
|
241
|
+
label: item?.name ?? entry.label ?? entry.kind,
|
|
242
|
+
enabled: entry.enabled,
|
|
243
|
+
consent: item?.consent ?? entry.consent ?? null,
|
|
244
|
+
placement: item?.placement ?? entry.placement ?? null,
|
|
245
|
+
load: item?.load ?? entry.load ?? "eager",
|
|
246
|
+
inPreview: entry.inPreview === true,
|
|
247
|
+
loadsOnPage: onPage,
|
|
248
|
+
reason: !entry.enabled ? "turned off" : onPage ? (item?.consent === "necessary" || (config.consent?.mode ?? "none") === "none" ? "loads" : `loads after ${item?.consent} consent`) : "not on this page (include/exclude)",
|
|
249
|
+
inDev: onPage && entry.inPreview === true,
|
|
250
|
+
};
|
|
251
|
+
}),
|
|
252
|
+
};
|
|
253
|
+
}
|