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,77 @@
|
|
|
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
|
+
// A real form post — the way Web-to-Lead and Account Engagement form
|
|
4
|
+
// handlers expect browsers to send — either into a hidden frame (the visitor
|
|
5
|
+
// stays on the page) or as a normal navigation (the visitor goes on to the
|
|
6
|
+
// provider's return page). Neither provider sends CORS headers, so `fetch`
|
|
7
|
+
// could not read their answer anyway; a frame at least tells us the post
|
|
8
|
+
// completed (its `load` event), and when the provider sends the frame on to a
|
|
9
|
+
// page of *this* site, the runtime can read where it landed.
|
|
10
|
+
|
|
11
|
+
let counter = 0;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} action
|
|
15
|
+
* @param {{ [name: string]: string | string[] }} values
|
|
16
|
+
* @param {{ navigate?: boolean; timeoutMs?: number }} [options]
|
|
17
|
+
* @returns {Promise<{ loaded: boolean; location: string | null }>}
|
|
18
|
+
* `location` is the frame's final address when it is on this site's origin.
|
|
19
|
+
*/
|
|
20
|
+
export function framePost(action, values, options = {}) {
|
|
21
|
+
const form = document.createElement("form");
|
|
22
|
+
|
|
23
|
+
form.method = "POST";
|
|
24
|
+
form.action = action;
|
|
25
|
+
form.acceptCharset = "UTF-8";
|
|
26
|
+
form.hidden = true;
|
|
27
|
+
for (const [name, value] of Object.entries(values)) {
|
|
28
|
+
for (const item of Array.isArray(value) ? value : [value]) {
|
|
29
|
+
const input = document.createElement("input");
|
|
30
|
+
|
|
31
|
+
input.type = "hidden";
|
|
32
|
+
input.name = name;
|
|
33
|
+
input.value = item;
|
|
34
|
+
form.append(input);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (options.navigate) {
|
|
38
|
+
document.body.append(form);
|
|
39
|
+
form.submit();
|
|
40
|
+
return Promise.resolve({ loaded: false, location: null });
|
|
41
|
+
}
|
|
42
|
+
const name = `galley-post-${Date.now().toString(36)}-${(counter += 1)}`;
|
|
43
|
+
const frame = document.createElement("iframe");
|
|
44
|
+
|
|
45
|
+
frame.name = name;
|
|
46
|
+
frame.title = "";
|
|
47
|
+
frame.hidden = true;
|
|
48
|
+
frame.setAttribute("aria-hidden", "true");
|
|
49
|
+
frame.tabIndex = -1;
|
|
50
|
+
form.target = name;
|
|
51
|
+
document.body.append(frame, form);
|
|
52
|
+
|
|
53
|
+
return new Promise((resolve) => {
|
|
54
|
+
let settled = false;
|
|
55
|
+
const finish = (/** @type {boolean} */ loaded) => {
|
|
56
|
+
if (settled) return;
|
|
57
|
+
settled = true;
|
|
58
|
+
let location = null;
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
location = frame.contentWindow?.location.href ?? null;
|
|
62
|
+
if (location === "about:blank") location = null;
|
|
63
|
+
} catch {
|
|
64
|
+
// Another origin: the browser doesn't say where the frame is.
|
|
65
|
+
}
|
|
66
|
+
resolve({ loaded, location });
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
frame.remove();
|
|
69
|
+
form.remove();
|
|
70
|
+
}, 1000);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
frame.addEventListener("load", () => finish(true));
|
|
74
|
+
setTimeout(() => finish(false), options.timeoutMs ?? 20000);
|
|
75
|
+
form.submit();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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's own capture endpoint — the default destination. The request and
|
|
4
|
+
// response are specified in docs/forms.md, "The capture endpoint":
|
|
5
|
+
// POST <endpoint> content-type: application/json
|
|
6
|
+
// { form, values, page: { url, title, referrer }, meta }
|
|
7
|
+
// 200 { ok: true, id } · 422 { ok: false, errors: { fieldId: message }, message? }
|
|
8
|
+
// 429 { ok: false, message } + Retry-After · 403 origin refused · 404 form not taken here
|
|
9
|
+
|
|
10
|
+
/** @type {import("../types").Submitter} */
|
|
11
|
+
export async function submit(values, destination, context) {
|
|
12
|
+
const own = destination.settings.endpoint;
|
|
13
|
+
const root = /** @type {HTMLElement | null} */ (context.form.closest(".galley-form"));
|
|
14
|
+
const configured = root?.querySelector("script[data-galley-form-config]")?.textContent;
|
|
15
|
+
// Which address, in the order docs/forms.md gives: the destination's own
|
|
16
|
+
// settings.endpoint; else the page's <html data-galley-endpoint> (how
|
|
17
|
+
// Galley's preview sends test submissions to its own inbox, so it wins over
|
|
18
|
+
// the site-wide address — a published page never carries it unless the site
|
|
19
|
+
// sets it on purpose); else the site-wide capture address.
|
|
20
|
+
const endpoint = (typeof own === "string" && own) || document.documentElement.dataset.galleyEndpoint || (configured ? JSON.parse(configured).endpoint : "") || "";
|
|
21
|
+
|
|
22
|
+
if (!endpoint) return { ok: false, notConnected: true, detail: "No capture address is set for the Galley inbox." };
|
|
23
|
+
let response;
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
response = await fetch(endpoint, {
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers: { "content-type": "application/json", accept: "application/json" },
|
|
29
|
+
body: JSON.stringify({ form: context.formId, values, page: context.page, meta: context.meta }),
|
|
30
|
+
});
|
|
31
|
+
} catch (error) {
|
|
32
|
+
return { ok: false, detail: `The capture endpoint couldn't be reached: ${error instanceof Error ? error.message : String(error)}` };
|
|
33
|
+
}
|
|
34
|
+
if (response.status === 429) {
|
|
35
|
+
// The capture server says how long to wait, and exposes the header to the page.
|
|
36
|
+
const header = response.headers.get("retry-after") ?? "";
|
|
37
|
+
const seconds = /^\d+$/.test(header) ? Number(header) : header ? Math.max(1, Math.ceil((Date.parse(header) - Date.now()) / 1000)) : NaN;
|
|
38
|
+
|
|
39
|
+
return { ok: false, retry: true, ...(Number.isFinite(seconds) && seconds > 0 ? { retryAfter: seconds } : {}), detail: "The capture endpoint asked to slow down (429)." };
|
|
40
|
+
}
|
|
41
|
+
/** @type {any} */
|
|
42
|
+
const answer = await response.json().catch(() => null);
|
|
43
|
+
|
|
44
|
+
if (response.ok && answer?.ok === true) return { ok: true, detail: `Stored as ${answer.id ?? "a new submission"}.` };
|
|
45
|
+
if (response.status === 404) return { ok: false, notConnected: true, detail: `The capture endpoint doesn't take this form (404)${answer?.message ? `: ${answer.message}` : ""}.` };
|
|
46
|
+
if (response.status === 403) return { ok: false, detail: "The capture endpoint refused this page's origin (403). Check the site's addresses in the app's capture settings." };
|
|
47
|
+
return {
|
|
48
|
+
ok: false,
|
|
49
|
+
errors: answer && typeof answer.errors === "object" && answer.errors ? answer.errors : {},
|
|
50
|
+
...(typeof answer?.message === "string" && answer.message ? { message: answer.message } : {}),
|
|
51
|
+
detail: `The capture endpoint answered ${response.status}${answer?.message ? `: ${answer.message}` : ""}.`,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
// HubSpot: the Forms API's unauthenticated, CORS-enabled "submit data to a
|
|
4
|
+
// form" endpoint (legacy v3, still supported):
|
|
5
|
+
// POST https://api.hsforms.com/submissions/v3/integration/submit/{portalId}/{formGuid}
|
|
6
|
+
// (api-{region}.hsforms.com for accounts in another data region, e.g. eu1)
|
|
7
|
+
// { submittedAt, fields: [{ objectTypeId, name, value }],
|
|
8
|
+
// context: { hutk, pageUri, pageName }, legalConsentOptions? }
|
|
9
|
+
// The form must exist in HubSpot with the same field names; HubSpot runs its
|
|
10
|
+
// own validation and answers 400 with `errors: [{ message, errorType }]`.
|
|
11
|
+
//
|
|
12
|
+
// Mapping conventions (docs/forms.md):
|
|
13
|
+
// "email" a contact property (objectTypeId 0-1)
|
|
14
|
+
// "0-2/name" another object's property (here: company name)
|
|
15
|
+
// "consent:process" a consent field → legalConsentOptions.consent.consentToProcess
|
|
16
|
+
// "consent:communication:<subscriptionTypeId>"
|
|
17
|
+
// a consent field → one communications subscription
|
|
18
|
+
// An unmapped consent field counts as consent to process.
|
|
19
|
+
|
|
20
|
+
import { plainText } from "../../shared/markdown.js";
|
|
21
|
+
|
|
22
|
+
/** @param {string} name */
|
|
23
|
+
function cookie(name) {
|
|
24
|
+
const match = document.cookie.split(/;\s*/).find((part) => part.startsWith(`${name}=`));
|
|
25
|
+
|
|
26
|
+
return match ? decodeURIComponent(match.slice(name.length + 1)) : "";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** @param {string} region */
|
|
30
|
+
export function hubspotHost(region) {
|
|
31
|
+
return !region || region === "na1" ? "https://api.hsforms.com" : `https://api-${region}.hsforms.com`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** @type {import("../types").Submitter} */
|
|
35
|
+
export async function submit(_values, destination, context) {
|
|
36
|
+
const settings = destination.settings;
|
|
37
|
+
const portalId = String(settings.portalId ?? "");
|
|
38
|
+
const formId = String(settings.formId ?? "");
|
|
39
|
+
|
|
40
|
+
if (!portalId || !formId) return { ok: false, notConnected: true, detail: "HubSpot needs settings.portalId and settings.formId." };
|
|
41
|
+
/** @type {{ objectTypeId: string; name: string; value: string }[]} */
|
|
42
|
+
const fields = [];
|
|
43
|
+
/** @type {{ consentToProcess: boolean; text: string; communications: { value: boolean; subscriptionTypeId: number; text: string }[] } | null} */
|
|
44
|
+
let consent = null;
|
|
45
|
+
const consentBlock = () => (consent ??= { consentToProcess: false, text: "", communications: [] });
|
|
46
|
+
|
|
47
|
+
for (const item of context.items) {
|
|
48
|
+
const value = Array.isArray(item.value) ? item.value.join(";") : item.value;
|
|
49
|
+
|
|
50
|
+
if (item.field.type === "consent") {
|
|
51
|
+
const text = plainText(item.field.text ?? item.field.label ?? "");
|
|
52
|
+
const agreed = value === "true";
|
|
53
|
+
const communication = /^consent:communication:(\d+)$/.exec(item.name);
|
|
54
|
+
|
|
55
|
+
if (communication) consentBlock().communications.push({ value: agreed, subscriptionTypeId: Number(communication[1]), text });
|
|
56
|
+
else if (item.name === "consent:process" || !destination.mapping?.[item.field.id]) Object.assign(consentBlock(), { consentToProcess: agreed, text });
|
|
57
|
+
else fields.push({ objectTypeId: "0-1", name: item.name, value });
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const [, objectTypeId = "0-1", name = item.name] = /^(\d+-\d+)\/(.+)$/.exec(item.name) ?? [];
|
|
61
|
+
|
|
62
|
+
fields.push({ objectTypeId, name, value });
|
|
63
|
+
}
|
|
64
|
+
for (const [name, value] of Object.entries(destination.constants ?? {})) {
|
|
65
|
+
const [, objectTypeId = "0-1", property = name] = /^(\d+-\d+)\/(.+)$/.exec(name) ?? [];
|
|
66
|
+
|
|
67
|
+
fields.push({ objectTypeId, name: property, value });
|
|
68
|
+
}
|
|
69
|
+
const hutk = cookie("hubspotutk");
|
|
70
|
+
/** @type {Record<string, unknown>} */
|
|
71
|
+
const body = {
|
|
72
|
+
submittedAt: String(Date.now()),
|
|
73
|
+
fields,
|
|
74
|
+
context: { ...(hutk ? { hutk } : {}), pageUri: context.page.url, pageName: context.page.title },
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
if (consent) body.legalConsentOptions = { consent };
|
|
78
|
+
const region = typeof settings.region === "string" ? settings.region : "";
|
|
79
|
+
let response;
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
response = await fetch(`${hubspotHost(region)}/submissions/v3/integration/submit/${encodeURIComponent(portalId)}/${encodeURIComponent(formId)}`, {
|
|
83
|
+
method: "POST",
|
|
84
|
+
headers: { "content-type": "application/json" },
|
|
85
|
+
body: JSON.stringify(body),
|
|
86
|
+
});
|
|
87
|
+
} catch (error) {
|
|
88
|
+
return { ok: false, detail: `HubSpot couldn't be reached: ${error instanceof Error ? error.message : String(error)}` };
|
|
89
|
+
}
|
|
90
|
+
/** @type {any} */
|
|
91
|
+
const answer = await response.json().catch(() => ({}));
|
|
92
|
+
|
|
93
|
+
if (response.ok) return { ok: true, redirect: answer.redirectUri, detail: "HubSpot accepted the submission." };
|
|
94
|
+
if (response.status === 429) return { ok: false, retry: true, detail: "HubSpot asked to slow down (429)." };
|
|
95
|
+
/** @type {Record<string, string>} */
|
|
96
|
+
const errors = {};
|
|
97
|
+
|
|
98
|
+
for (const error of Array.isArray(answer.errors) ? answer.errors : []) {
|
|
99
|
+
// e.g. "Error in 'fields.email'. Invalid email address"
|
|
100
|
+
const field = /fields\.([\w-]+)/.exec(String(error.message ?? ""))?.[1];
|
|
101
|
+
const item = field ? context.items.find((entry) => entry.name === field || entry.name.endsWith(`/${field}`)) : undefined;
|
|
102
|
+
|
|
103
|
+
if (item) errors[item.field.id] = error.errorType === "INVALID_EMAIL" ? context.messages.email ?? String(error.message) : String(error.message).replace(/^Error in '[^']*'\.\s*/, "");
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
ok: false,
|
|
107
|
+
errors,
|
|
108
|
+
detail: `HubSpot refused the submission (${response.status}): ${(Array.isArray(answer.errors) ? answer.errors : []).map((/** @type {any} */ error) => error.errorType ?? error.message).join(", ") || answer.message || "no reason given"}`,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 last resort: opens the visitor's own mail program with the answers in a
|
|
4
|
+
// new message. Nothing is stored and the page can't know whether the message
|
|
5
|
+
// was sent — only that the mail program was asked to open.
|
|
6
|
+
|
|
7
|
+
/** @type {import("../types").Submitter} */
|
|
8
|
+
export function submit(_values, destination, context) {
|
|
9
|
+
const to = typeof destination.settings.to === "string" ? destination.settings.to : "";
|
|
10
|
+
|
|
11
|
+
if (!to) return { ok: false, notConnected: true, detail: "The mail destination needs settings.to." };
|
|
12
|
+
const subject = typeof destination.settings.subject === "string" ? destination.settings.subject : "";
|
|
13
|
+
const lines = context.items.map(({ field, value }) => `${field.label ?? field.id}: ${Array.isArray(value) ? value.join(", ") : value}`);
|
|
14
|
+
|
|
15
|
+
for (const [name, value] of Object.entries(destination.constants ?? {})) lines.push(`${name}: ${value}`);
|
|
16
|
+
const query = [subject ? `subject=${encodeURIComponent(subject)}` : "", `body=${encodeURIComponent(lines.join("\n"))}`].filter(Boolean).join("&");
|
|
17
|
+
|
|
18
|
+
location.href = `mailto:${to}?${query}`;
|
|
19
|
+
return { ok: true, detail: "Asked the mail program to open." };
|
|
20
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
// Marketo, through Marketo's own Forms 2.0 library and a hidden Marketo form,
|
|
4
|
+
// as Adobe documents it: load {host}/js/forms2/js/forms2.min.js, call
|
|
5
|
+
// MktoForms2.loadForm(host, munchkinId, formId), put the answers on the
|
|
6
|
+
// Marketo form (setValues for fields the form has, addHiddenFields for the
|
|
7
|
+
// rest — the only way values reach a known-visitor form), then submit() with
|
|
8
|
+
// an onSuccess that returns false so the page stays put.
|
|
9
|
+
//
|
|
10
|
+
// Posting straight to Marketo's endpoint is not a supported API; going
|
|
11
|
+
// through the library keeps Marketo's own validation, its anti-spam checks
|
|
12
|
+
// and the Munchkin cookie association (the library sends _mkto_trk itself).
|
|
13
|
+
// When Marketo refuses a value, its message is shown on our field.
|
|
14
|
+
|
|
15
|
+
/** @type {Map<string, Promise<void>>} */
|
|
16
|
+
const libraries = new Map();
|
|
17
|
+
/** @type {Map<string, Promise<any>>} */
|
|
18
|
+
const loaded = new Map();
|
|
19
|
+
|
|
20
|
+
/** @param {string} host */
|
|
21
|
+
function library(host) {
|
|
22
|
+
if (window.MktoForms2) return Promise.resolve();
|
|
23
|
+
const known = libraries.get(host);
|
|
24
|
+
|
|
25
|
+
if (known) return known;
|
|
26
|
+
const promise = new Promise((resolve, reject) => {
|
|
27
|
+
const script = document.createElement("script");
|
|
28
|
+
|
|
29
|
+
script.src = `${host}/js/forms2/js/forms2.min.js`;
|
|
30
|
+
script.async = true;
|
|
31
|
+
script.onload = () => (window.MktoForms2 ? resolve(undefined) : reject(new Error("Marketo's forms library loaded but did not start.")));
|
|
32
|
+
script.onerror = () => reject(new Error(`Marketo's forms library couldn't load from ${host}.`));
|
|
33
|
+
document.head.append(script);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
libraries.set(host, /** @type {Promise<void>} */ (promise));
|
|
37
|
+
return /** @type {Promise<void>} */ (promise);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** @param {string} host @param {string} munchkinId @param {string} formId */
|
|
41
|
+
function marketoForm(host, munchkinId, formId) {
|
|
42
|
+
const key = `${host}|${munchkinId}|${formId}`;
|
|
43
|
+
const known = loaded.get(key);
|
|
44
|
+
|
|
45
|
+
if (known) return known;
|
|
46
|
+
const promise = library(host).then(
|
|
47
|
+
() =>
|
|
48
|
+
new Promise((resolve, reject) => {
|
|
49
|
+
let element = document.getElementById(`mktoForm_${formId}`);
|
|
50
|
+
|
|
51
|
+
if (!element) {
|
|
52
|
+
element = document.createElement("form");
|
|
53
|
+
element.id = `mktoForm_${formId}`;
|
|
54
|
+
element.hidden = true;
|
|
55
|
+
element.setAttribute("aria-hidden", "true");
|
|
56
|
+
element.style.display = "none";
|
|
57
|
+
document.body.append(element);
|
|
58
|
+
}
|
|
59
|
+
const timer = setTimeout(() => reject(new Error("Marketo's form didn't load in time.")), 15000);
|
|
60
|
+
|
|
61
|
+
window.MktoForms2.loadForm(host, munchkinId, Number(formId), (/** @type {any} */ form) => {
|
|
62
|
+
clearTimeout(timer);
|
|
63
|
+
resolve(form);
|
|
64
|
+
});
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
loaded.set(key, promise);
|
|
69
|
+
promise.catch(() => loaded.delete(key));
|
|
70
|
+
return promise;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** @type {import("../types").Submitter} */
|
|
74
|
+
export async function submit(values, destination) {
|
|
75
|
+
const settings = destination.settings;
|
|
76
|
+
const host = String(settings.host ?? "").replace(/\/+$/, "");
|
|
77
|
+
const munchkinId = String(settings.munchkinId ?? "");
|
|
78
|
+
const formId = String(settings.formId ?? "");
|
|
79
|
+
|
|
80
|
+
if (!host || !munchkinId || !formId) return { ok: false, notConnected: true, detail: "Marketo needs settings.host, settings.munchkinId and settings.formId." };
|
|
81
|
+
let form;
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
form = await marketoForm(host, munchkinId, formId);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
return { ok: false, detail: error instanceof Error ? error.message : String(error) };
|
|
87
|
+
}
|
|
88
|
+
/** @type {Record<string, string>} */
|
|
89
|
+
const flat = {};
|
|
90
|
+
|
|
91
|
+
for (const [name, value] of Object.entries(values)) flat[name] = Array.isArray(value) ? value.join(";") : value;
|
|
92
|
+
const onForm = Object.keys(form.getValues?.() ?? {});
|
|
93
|
+
/** @type {Record<string, string>} */
|
|
94
|
+
const present = {};
|
|
95
|
+
/** @type {Record<string, string>} */
|
|
96
|
+
const extra = {};
|
|
97
|
+
|
|
98
|
+
for (const [name, value] of Object.entries(flat)) (onForm.includes(name) ? present : extra)[name] = value;
|
|
99
|
+
form.setValues(present);
|
|
100
|
+
if (Object.keys(extra).length > 0) form.addHiddenFields(extra);
|
|
101
|
+
|
|
102
|
+
// Marketo's callbacks can't be removed, so each form gets them once and
|
|
103
|
+
// they answer whichever submission is in flight.
|
|
104
|
+
if (!form.__galley) {
|
|
105
|
+
form.__galley = { end: null };
|
|
106
|
+
form.onValidate((/** @type {boolean} */ valid) => {
|
|
107
|
+
if (valid) return;
|
|
108
|
+
// Marketo marks the refused field and writes its message into its own DOM.
|
|
109
|
+
const element = form.getFormElem?.()?.[0];
|
|
110
|
+
const invalid = element?.querySelector(".mktoInvalid");
|
|
111
|
+
const message = element?.querySelector(".mktoErrorMsg")?.textContent?.trim() || "Marketo refused this answer.";
|
|
112
|
+
const name = invalid?.getAttribute("name");
|
|
113
|
+
|
|
114
|
+
form.__galley.end?.({ ok: false, errors: name ? { [name]: message } : {}, detail: `Marketo refused the submission: ${message}` });
|
|
115
|
+
});
|
|
116
|
+
form.onSuccess((/** @type {unknown} */ _values, /** @type {string} */ followUpUrl) => {
|
|
117
|
+
form.__galley.end?.({ ok: true, redirect: followUpUrl || undefined, detail: "Marketo accepted the submission." });
|
|
118
|
+
return false;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return new Promise((resolve) => {
|
|
123
|
+
const timer = setTimeout(() => end({ ok: false, detail: "Marketo didn't confirm the submission in time." }), 20000);
|
|
124
|
+
const end = (/** @type {import("../types").SubmitResult} */ result) => {
|
|
125
|
+
clearTimeout(timer);
|
|
126
|
+
form.__galley.end = null;
|
|
127
|
+
resolve(result);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
form.__galley.end = end;
|
|
131
|
+
form.submit();
|
|
132
|
+
});
|
|
133
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
// Account Engagement (Pardot) form handler: a form post to the handler's
|
|
4
|
+
// address with fields under the handler's external field names (`mapping`).
|
|
5
|
+
// Handlers don't accept fetch/XHR posts (no CORS), so the post goes through a
|
|
6
|
+
// hidden frame — or, with `mode: "navigate"`, as a normal navigation, which
|
|
7
|
+
// is the better choice when visitor tracking matters (the handler's cookie is
|
|
8
|
+
// set in a top-level page, not a third-party frame).
|
|
9
|
+
//
|
|
10
|
+
// Telling success from failure: point the handler's Success Location and
|
|
11
|
+
// Error Location at two pages on this site and copy them into
|
|
12
|
+
// `successLocation` / `errorLocation`. The frame then lands on one of them
|
|
13
|
+
// (same origin, so the page can read where) and the runtime knows which.
|
|
14
|
+
// Without them, a completed post counts as success.
|
|
15
|
+
|
|
16
|
+
import { framePost } from "./frame-post.js";
|
|
17
|
+
|
|
18
|
+
/** @param {string} a @param {string} b */
|
|
19
|
+
const samePage = (a, b) => {
|
|
20
|
+
try {
|
|
21
|
+
const x = new URL(a);
|
|
22
|
+
const y = new URL(b, location.href);
|
|
23
|
+
|
|
24
|
+
return x.origin === y.origin && x.pathname.replace(/\/+$/, "") === y.pathname.replace(/\/+$/, "");
|
|
25
|
+
} catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @type {import("../types").Submitter} */
|
|
31
|
+
export async function submit(values, destination) {
|
|
32
|
+
const settings = destination.settings;
|
|
33
|
+
const handler = typeof settings.handlerUrl === "string" ? settings.handlerUrl : "";
|
|
34
|
+
|
|
35
|
+
if (!handler) return { ok: false, notConnected: true, detail: "Account Engagement needs settings.handlerUrl." };
|
|
36
|
+
const navigate = settings.mode === "navigate";
|
|
37
|
+
const result = await framePost(handler, values, { navigate });
|
|
38
|
+
|
|
39
|
+
if (navigate) return { ok: true };
|
|
40
|
+
if (!result.loaded) return { ok: false, detail: "The form handler didn't answer in time." };
|
|
41
|
+
const errorLocation = typeof settings.errorLocation === "string" ? settings.errorLocation : "";
|
|
42
|
+
const successLocation = typeof settings.successLocation === "string" ? settings.successLocation : "";
|
|
43
|
+
|
|
44
|
+
if (result.location && errorLocation && samePage(result.location, errorLocation)) {
|
|
45
|
+
const message = new URL(result.location).searchParams.get("errorMessage");
|
|
46
|
+
|
|
47
|
+
return { ok: false, detail: message ? `The form handler refused the submission: ${message}` : "The form handler sent the visitor to its error location." };
|
|
48
|
+
}
|
|
49
|
+
if (result.location && successLocation && !samePage(result.location, successLocation) && errorLocation) {
|
|
50
|
+
return { ok: false, detail: `The form handler finished on ${result.location}, which is neither its success nor its error location.` };
|
|
51
|
+
}
|
|
52
|
+
return { ok: true, detail: result.location ? "The form handler reached its success location." : "Posted to the form handler; it does not tell the page more." };
|
|
53
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
// Salesforce Web-to-Lead. A form post to the Web-to-Lead servlet with the
|
|
4
|
+
// org's `oid`, standard lead fields by their Salesforce names (first_name,
|
|
5
|
+
// last_name, email, company, phone, lead_source, …) and custom fields by
|
|
6
|
+
// their field ids (00N…), mapped in the destination's `mapping`. Fixed
|
|
7
|
+
// values (lead_source, Campaign_ID, recordType, debug, debugEmail) go in
|
|
8
|
+
// `constants`.
|
|
9
|
+
//
|
|
10
|
+
// What the browser cannot know: Salesforce answers with a redirect to
|
|
11
|
+
// `retURL` and no CORS headers, so the page never learns whether the lead was
|
|
12
|
+
// accepted (duplicate rules, bad picklist values, the daily limit all look
|
|
13
|
+
// the same). A completed post counts as success; docs/forms.md says so.
|
|
14
|
+
|
|
15
|
+
import { framePost } from "./frame-post.js";
|
|
16
|
+
|
|
17
|
+
export const SERVLET = "https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8";
|
|
18
|
+
|
|
19
|
+
/** @type {import("../types").Submitter} */
|
|
20
|
+
export async function submit(values, destination, context) {
|
|
21
|
+
const settings = destination.settings;
|
|
22
|
+
const orgId = typeof settings.orgId === "string" ? settings.orgId : "";
|
|
23
|
+
|
|
24
|
+
if (!orgId) return { ok: false, notConnected: true, detail: "Salesforce needs settings.orgId." };
|
|
25
|
+
/** @type {{ [name: string]: string | string[] }} */
|
|
26
|
+
const fields = {};
|
|
27
|
+
|
|
28
|
+
for (const [name, value] of Object.entries(values)) {
|
|
29
|
+
// Checkboxes: Salesforce reads "1" as ticked; an unticked box is left out.
|
|
30
|
+
if (value === "true" || value === "false") {
|
|
31
|
+
const field = context.items.find((item) => item.name === name)?.field;
|
|
32
|
+
|
|
33
|
+
if (field && (field.type === "checkbox" || field.type === "consent")) {
|
|
34
|
+
if (value === "true") fields[name] = "1";
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
fields[name] = value;
|
|
39
|
+
}
|
|
40
|
+
const navigate = settings.mode === "navigate";
|
|
41
|
+
const returnUrl = typeof settings.returnUrl === "string" ? settings.returnUrl : "";
|
|
42
|
+
// In a frame, no retURL means Salesforce answers with an empty page — the
|
|
43
|
+
// lightest possible end to the post. (A page of this site loaded in the
|
|
44
|
+
// frame skips its third-party scripts: see scripts/runtime.js.)
|
|
45
|
+
const target = navigate ? returnUrl || location.href : returnUrl;
|
|
46
|
+
const result = await framePost(SERVLET, { oid: orgId, ...(target ? { retURL: target } : {}), ...fields }, { navigate });
|
|
47
|
+
|
|
48
|
+
if (navigate) return { ok: true, detail: "Sent to Salesforce; the visitor is on their way to the return address." };
|
|
49
|
+
return result.loaded ? { ok: true, detail: "Posted to Web-to-Lead. Salesforce does not tell the page whether it created the lead." } : { ok: false, detail: "Web-to-Lead didn't answer in time." };
|
|
50
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
// Any address that accepts a POST: an automation tool, a serverless
|
|
4
|
+
// function, the site owner's own service. `format: "json"` (default) sends
|
|
5
|
+
// { form, values, page, at }; `format: "form"` sends the values
|
|
6
|
+
// form-encoded. The receiving server must allow this site's origin (CORS):
|
|
7
|
+
// a JSON post is preceded by an OPTIONS preflight; a form-encoded one is not,
|
|
8
|
+
// but its answer is still only readable with Access-Control-Allow-Origin.
|
|
9
|
+
// An answer of { errors: { name: message } } puts messages on the fields.
|
|
10
|
+
|
|
11
|
+
/** @type {import("../types").Submitter} */
|
|
12
|
+
export async function submit(values, destination, context) {
|
|
13
|
+
const url = typeof destination.settings.url === "string" ? destination.settings.url : "";
|
|
14
|
+
|
|
15
|
+
if (!url) return { ok: false, notConnected: true, detail: "The webhook needs settings.url." };
|
|
16
|
+
const form = destination.settings.format === "form";
|
|
17
|
+
let body;
|
|
18
|
+
|
|
19
|
+
if (form) {
|
|
20
|
+
const params = new URLSearchParams();
|
|
21
|
+
|
|
22
|
+
for (const [name, value] of Object.entries(values)) for (const item of Array.isArray(value) ? value : [value]) params.append(name, item);
|
|
23
|
+
body = params;
|
|
24
|
+
} else {
|
|
25
|
+
body = JSON.stringify({ form: context.formId, values, page: context.page, at: new Date().toISOString() });
|
|
26
|
+
}
|
|
27
|
+
let response;
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
response = await fetch(url, { method: "POST", body, ...(form ? {} : { headers: { "content-type": "application/json" } }) });
|
|
31
|
+
} catch (error) {
|
|
32
|
+
return { ok: false, detail: `The webhook couldn't be reached (or doesn't allow this site's origin): ${error instanceof Error ? error.message : String(error)}` };
|
|
33
|
+
}
|
|
34
|
+
if (response.status === 429) return { ok: false, retry: true, detail: "The webhook asked to slow down (429)." };
|
|
35
|
+
if (response.ok) return { ok: true, detail: `The webhook answered ${response.status}.` };
|
|
36
|
+
/** @type {any} */
|
|
37
|
+
const answer = await response.json().catch(() => null);
|
|
38
|
+
|
|
39
|
+
return { ok: false, errors: answer?.errors && typeof answer.errors === "object" ? answer.errors : {}, detail: `The webhook answered ${response.status}.` };
|
|
40
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 one seam for adding a form destination: a submitter registered under a
|
|
4
|
+
// provider id. Built-in providers load from ./providers/ on demand; a site or
|
|
5
|
+
// plugin registers its own before (or after) the forms start:
|
|
6
|
+
//
|
|
7
|
+
// import { registerFormProvider } from "@galley/astro/client";
|
|
8
|
+
// registerFormProvider("crm", async (values, destination, context) => {
|
|
9
|
+
// const res = await fetch(String(destination.settings.url), { method: "POST", body: JSON.stringify(values) });
|
|
10
|
+
// return res.ok ? { ok: true } : { ok: false, detail: `HTTP ${res.status}` };
|
|
11
|
+
// });
|
|
12
|
+
//
|
|
13
|
+
// or, without a bundler: window.galleyForms.registerProvider("crm", fn).
|
|
14
|
+
|
|
15
|
+
/** @typedef {import("./types").Submitter} Submitter */
|
|
16
|
+
|
|
17
|
+
/** @type {Map<string, Submitter>} */
|
|
18
|
+
const registered = new Map();
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} id The `provider` a destination names.
|
|
22
|
+
* @param {Submitter} submitter
|
|
23
|
+
*/
|
|
24
|
+
export function registerFormProvider(id, submitter) {
|
|
25
|
+
if (typeof submitter !== "function") throw new TypeError(`registerFormProvider("${id}") needs a function.`);
|
|
26
|
+
registered.set(id, submitter);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** @param {string} id */
|
|
30
|
+
export function registeredProvider(id) {
|
|
31
|
+
return registered.get(id);
|
|
32
|
+
}
|
|
@@ -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
|
+
import type { FormAction, FormDestination, FormField } from "../kit";
|
|
3
|
+
|
|
4
|
+
/** What a submitter is given besides the values and the destination. */
|
|
5
|
+
export interface SubmitContext {
|
|
6
|
+
/** The form's id (its file name). */
|
|
7
|
+
formId: string;
|
|
8
|
+
/** The form element on the page. */
|
|
9
|
+
form: HTMLFormElement;
|
|
10
|
+
/** Every field of the form, as in its file. */
|
|
11
|
+
fields: FormField[];
|
|
12
|
+
/** The visitor's answers by field id, hidden fields left out. */
|
|
13
|
+
answers: { [fieldId: string]: string | string[] };
|
|
14
|
+
/** What this destination is sent, field by field, with the field it came from. */
|
|
15
|
+
items: Array<{ field: FormField; name: string; value: string | string[] }>;
|
|
16
|
+
page: { url: string; title: string; referrer: string };
|
|
17
|
+
meta: { elapsedMs: number; honeypot: string; turnstileToken?: string; locale: string; kit: string };
|
|
18
|
+
/** The form's resolved wording. */
|
|
19
|
+
messages: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** What a submitter reports. `ok` is the only required part. */
|
|
23
|
+
export interface SubmitResult {
|
|
24
|
+
ok: boolean;
|
|
25
|
+
/** For the console and the `galley:form:error` event; never shown as is. */
|
|
26
|
+
detail?: string;
|
|
27
|
+
/** Field-level refusals, keyed by the name the destination was sent (or the field id). */
|
|
28
|
+
errors?: { [name: string]: string };
|
|
29
|
+
/** The destination asked to slow down (HTTP 429). */
|
|
30
|
+
retry?: boolean;
|
|
31
|
+
/** How long it asked to wait, in seconds (Retry-After). */
|
|
32
|
+
retryAfter?: number;
|
|
33
|
+
/** A message for the visitor, in the form's own words, when the destination gives one. */
|
|
34
|
+
message?: string;
|
|
35
|
+
/** The destination has no address to send to. */
|
|
36
|
+
notConnected?: boolean;
|
|
37
|
+
/** Where the provider would send the visitor next, when it says (HubSpot, Marketo). */
|
|
38
|
+
redirect?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type Submitter = (
|
|
42
|
+
values: { [name: string]: string | string[] },
|
|
43
|
+
destination: FormDestination,
|
|
44
|
+
context: SubmitContext,
|
|
45
|
+
) => Promise<SubmitResult> | SubmitResult;
|
|
46
|
+
|
|
47
|
+
/** The part of a form file the runtime receives in the page. */
|
|
48
|
+
export interface ClientFormConfig {
|
|
49
|
+
id: string;
|
|
50
|
+
uid: string;
|
|
51
|
+
name: string;
|
|
52
|
+
endpoint: string;
|
|
53
|
+
fields: FormField[];
|
|
54
|
+
steps: number;
|
|
55
|
+
nextLabels?: string[];
|
|
56
|
+
destinations: FormDestination[];
|
|
57
|
+
afterSubmit: FormAction[];
|
|
58
|
+
spam: { honeypot: boolean; minSeconds: number; turnstile: boolean };
|
|
59
|
+
native: number;
|
|
60
|
+
messages: Record<string, string>;
|
|
61
|
+
freeEmailDomains: string[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface GalleyConsentApi {
|
|
65
|
+
mode: "none" | "banner" | "external";
|
|
66
|
+
granted(category: string): boolean;
|
|
67
|
+
get(): Record<string, boolean>;
|
|
68
|
+
set(choice: Record<string, boolean>): void;
|
|
69
|
+
open(): void;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare global {
|
|
73
|
+
interface Window {
|
|
74
|
+
galleyConsent?: GalleyConsentApi;
|
|
75
|
+
galleyForms?: { registerProvider(id: string, submitter: Submitter): void; init(root?: ParentNode): void };
|
|
76
|
+
dataLayer?: unknown[];
|
|
77
|
+
gtag?: (...args: unknown[]) => void;
|
|
78
|
+
MktoForms2?: any;
|
|
79
|
+
}
|
|
80
|
+
}
|