{"_id":"@agentmarketing/payload-site-forms","_rev":"13-a86359d385bbbe5814ca08865e24867e","name":"@agentmarketing/payload-site-forms","dist-tags":{"latest":"1.5.0"},"versions":{"0.1.0":{"name":"@agentmarketing/payload-site-forms","version":"0.1.0","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@0.1.0","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"ccecb5e26a1e30de6718691ffaf8f9b7147ee861","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-0.1.0.tgz","fileCount":115,"integrity":"sha512-xWxj1cfunibut3iPgKZ2lO6EI0mpk/Vv40zOUHRuSSd3rfN27PjNQNQuKTxvj2A0OUb2YpRqLTUvtGvBOgD+0Q==","signatures":[{"sig":"MEUCIQCb5vJfabOobCadyaZEfW6LLec2BAa08BezkF2rt064EwIgc2Tnw7r2bU//16AzVrvzLC5b0uoQWIqEP+dCQZc9FWM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":302209},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"1ea64bdaadd434922ebd4965a751e4e7ef1abcd3","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, pipeline runs, mailing","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"payload":"^3.82.1","typescript":"^5.7.2","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"payload":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_0.1.0_1776779315603_0.8699563792013936","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@agentmarketing/payload-site-forms","version":"0.2.2","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@0.2.2","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"67df2921771c13c5f8824792eed897c2794d4c5e","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-0.2.2.tgz","fileCount":130,"integrity":"sha512-5q3+2c+2sPlna+QNZNw6gNBLwxG4VkirLXU1sv/kfpL2Y1IgBnUhEgRcSj+CCO137OIKzmQYoefL881WDKMYsw==","signatures":[{"sig":"MEUCIQC/bV38qhx6VCQaD0yoOqWy6aji0KNfU3najGaZjX8cJAIgJUiGGLEqtEKINOySSewPZ0LGZpanVjl0CgbIiYNSFDk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":319499},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, pipeline runs, mailing","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"payload":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_0.2.2_1776783327742_0.6318376125120262","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@agentmarketing/payload-site-forms","version":"0.2.4","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@0.2.4","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"fe3388d04766a8f05b6ba5c6d3e3f9fc257723da","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-0.2.4.tgz","fileCount":130,"integrity":"sha512-FRKp5TFuBwlKsBykCQbKBqaPKU+MXNvhelEsc0QPP8mu0uEjooi4hSgspBkAGX6fQh6qPq5EbY0yxyMWba1Xzw==","signatures":[{"sig":"MEUCIQDtkXP21TpPz/Iam9BaBPU7eYWEc/HPfQYZUGXQmTpiTwIgBNl/9DiR7+r698WFQau3sEigqOgOEpS20/NdTn4hTiI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":326566},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, sequences, and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"payload":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_0.2.4_1776784362634_0.7692881661244437","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@agentmarketing/payload-site-forms","version":"0.2.5","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@0.2.5","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"46d1f60d23ec89542532cde58b4d7256e57a81d7","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-0.2.5.tgz","fileCount":130,"integrity":"sha512-rjlb+QhBTUnnpN49LxCQIf7X1j/bCWsvbgv2BupndprjrNkG3UWfb97j+SZWL726hBL4g/oajkP0sNKwhOZx/g==","signatures":[{"sig":"MEYCIQDULQ+F0+r/9SuaGNUlQmpeGH5isFDEZ57iQX3Ggus6BwIhAMInfubsBawt1cZTeL/gQF+DwqQHboQkLd6an00GYZn+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":326478},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, sequences, and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"payload":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_0.2.5_1776874394491_0.11420749516121687","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@agentmarketing/payload-site-forms","version":"0.2.6","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@0.2.6","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"55c711a04d0fe64e09e4347952496d8ab19f6a8d","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-0.2.6.tgz","fileCount":130,"integrity":"sha512-ARDFBnT5N2fcgQgod5zO9mMLLDN85Bs6HBkaQGeIo4OI61YFh8bKSsmh2JU5zVAKo5rfgkMc+kSgaYEQAAthww==","signatures":[{"sig":"MEQCIA2G1UgKgIP/pwBdsdLDQ/qBCIhUxpJrvez0n/kub6PKAiAV1NN0qvl0RHtnXzuucgn74giVqi+wtf1VVXC3nW1HmA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":326650},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"payload":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_0.2.6_1776874747084_0.41974413041275294","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@agentmarketing/payload-site-forms","version":"1.0.0","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@1.0.0","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"8f82b23371e17c70ac91797e92743aef3f5dde7b","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.0.0.tgz","fileCount":131,"integrity":"sha512-/Lk5lmfbbV9bEhDl6KpBwq7N0c5JOZWRS13xCAaZvUikH2KJpqkPH2BYnyG/q5WqoZ+esMro2TrkQD8/GxMRog==","signatures":[{"sig":"MEUCIQDr6fN2OgG1FNSTryyL5sYHqV12mvoz91LF5j/QdqkafwIgBQSGJjzImbiuCiRnL6DIfz7rK+UHSBq7cpWt+/h9UAM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":325470},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./normalize-site-form":{"types":"./dist/utils/normalizeSiteForm.d.ts","import":"./dist/utils/normalizeSiteForm.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"payload":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_1.0.0_1776881931854_0.1056045988552603","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@agentmarketing/payload-site-forms","version":"1.1.0","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@1.1.0","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"5da79f07e24bf3d45b34ba6b041261415fa59dc6","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.1.0.tgz","fileCount":134,"integrity":"sha512-/E1D8jL0JWQOCLs4FmmDHSQ+5pm9E7n6BMk4KTqePADoGHtodWJqJMv6EjPxnMDk/nI+TnObZNzoETsLhVW9gg==","signatures":[{"sig":"MEYCIQC0gin8Zk66Pq2wVZTXZ8OinbjDDChZF3LgWspYfJDOhAIhAJRwxxovkkSF8pPr1RYUzuKbwXUkISpnb60qSqaJ5m97","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":329384},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin/steps-gate":{"types":"./dist/admin/StepsGate.d.ts","import":"./dist/admin/StepsGate.js"},"./normalize-site-form":{"types":"./dist/utils/normalizeSiteForm.d.ts","import":"./dist/utils/normalizeSiteForm.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@types/react":"^19.0.0","@payloadcms/ui":"^3.82.1","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","payload":"^3.0.0","@payloadcms/ui":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_1.1.0_1776884470384_0.7976278005533946","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@agentmarketing/payload-site-forms","version":"1.2.0","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@1.2.0","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"6fea0d28ef550946182b0323c896a96859f3d346","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.2.0.tgz","fileCount":154,"integrity":"sha512-VP7WoQlFdQINXAVeEd2A9apVtzt9bMu5G9pE4UzZj/SOqDxuza/w+8f6aSi7EKH58Vxa2+eMUUEI/PzyXpSmqQ==","signatures":[{"sig":"MEUCIF9QEQmvlQjv1IR3gMSKIz27nyM3zRPNY3ssEgrZnGXaAiEA43oynEPMzqhyz4U3YjOXrJ6yWQragsHpEC5Yhke5n8w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":367422},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin/steps-gate":{"types":"./dist/admin/StepsGate.d.ts","import":"./dist/admin/StepsGate.js"},"./normalize-site-form":{"types":"./dist/utils/normalizeSiteForm.d.ts","import":"./dist/utils/normalizeSiteForm.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@types/react":"^19.0.0","@payloadcms/ui":"^3.82.1","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","payload":"^3.0.0","@payloadcms/ui":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_1.2.0_1776894573347_0.38993198334923296","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@agentmarketing/payload-site-forms","version":"1.3.0","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@1.3.0","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"466c11c5bc02d819432101923d608bab5a3488b8","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.3.0.tgz","fileCount":158,"integrity":"sha512-qEVvFXDx8yUqkmmrS2peKINNOMfhczwqR50CRzY2A/Y6W+5KQ9tvuSPkxQx5ReMx7HqlqcaN4QfbyJtccIeUKQ==","signatures":[{"sig":"MEUCICjEpBIZMK4OkZzUoQIHuKY6b6QqvSDFMNIlr4JsFMTvAiEAnBnJsNrPvjN8PIcTX78sW/8ecwo+szsdl2Falq3DNao=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":442968},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin/steps-gate":{"types":"./dist/admin/StepsGate.d.ts","import":"./dist/admin/StepsGate.js"},"./normalize-site-form":{"types":"./dist/utils/normalizeSiteForm.d.ts","import":"./dist/utils/normalizeSiteForm.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@types/react":"^19.0.0","@payloadcms/ui":"^3.82.1","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","payload":"^3.0.0","@payloadcms/ui":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_1.3.0_1777387280216_0.6626626062273164","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@agentmarketing/payload-site-forms","version":"1.3.1","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@1.3.1","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"f03ebe406c6f9ab9044ed48bf08a2276789c85c7","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.3.1.tgz","fileCount":158,"integrity":"sha512-aegvfB+7HOi7frwwfYWjA9P4leTfYSmPvPQt1Bp6ItPqvaYy8VxPzNnYCbCNOUmaeATLTvrssPGkwUCbiyRS7A==","signatures":[{"sig":"MEUCIQCT0toXKKEa2urRKwaIei07yKjsm6/k+UY2hDR/9JPZRAIgA6PkWE77f/qnkoW438Eo845/8e4gXbiWJpx+0MrWzWM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":449232},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin/steps-gate":{"types":"./dist/admin/StepsGate.d.ts","import":"./dist/admin/StepsGate.js"},"./normalize-site-form":{"types":"./dist/utils/normalizeSiteForm.d.ts","import":"./dist/utils/normalizeSiteForm.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@types/react":"^19.0.0","@payloadcms/ui":"^3.82.1","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","payload":"^3.0.0","@payloadcms/ui":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_1.3.1_1777389262558_0.5391665171587254","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@agentmarketing/payload-site-forms","version":"1.4.1","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@1.4.1","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"23492bcba43894db4f855e758d28434bb811f903","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.4.1.tgz","fileCount":161,"integrity":"sha512-tvdYs7GR/MVe64skDk5p5X4r7KCU0FNrKVAFYKTU1oEjTZsyZKBXZKZiw50ucaS8AACIa1+tC8LYtJ6ZR96r0g==","signatures":[{"sig":"MEQCIBRB8Dx5gmiA5tc0MIr2h8I8JJ/iE1+0jMCAYB0/rsutAiBotpe9ftmRAc4TN5DMAVAVo2SIfpgfFlMiLFWXNCBwww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":469604},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin/steps-gate":{"types":"./dist/admin/StepsGate.d.ts","import":"./dist/admin/StepsGate.js"},"./normalize-site-form":{"types":"./dist/utils/normalizeSiteForm.d.ts","import":"./dist/utils/normalizeSiteForm.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"fe90ef3d0eeadeb2b2aae0688d0512653606a80d","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@types/react":"^19.0.0","@payloadcms/ui":"^3.82.1","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","payload":"^3.0.0","@payloadcms/ui":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_1.4.1_1777465220767_0.5905303233879546","host":"s3://npm-registry-packages-npm-production"}},"1.4.7":{"name":"@agentmarketing/payload-site-forms","version":"1.4.7","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","nextjs"],"author":{"name":"Shane Farmer"},"license":"MIT","_id":"@agentmarketing/payload-site-forms@1.4.7","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"homepage":"https://agentmarketing.co.uk/","bin":{"payload-site-forms":"bin/cli.mjs"},"dist":{"shasum":"8dcaa1e41a4e8758e69a8a6f3f572fe27ba9d329","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.4.7.tgz","fileCount":164,"integrity":"sha512-tSWLtj7vOmzf85aOEt7hx7BH56WeV6S/TAxo02i0a6tTdusa+5bwKNMHvLbmRVE7Aa3z+Bf6sJSQL7Bk6kIK+Q==","signatures":[{"sig":"MEUCIEKtABdoFNWUS42u4PBe0iyov7ErnxaPNo+8EgBV+l2PAiEAjbho0OPSeDUvsVaZKP6/N2t31cyvnaix/aNI7vNhTVc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":487860},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin/steps-gate":{"types":"./dist/admin/StepsGate.d.ts","import":"./dist/admin/StepsGate.js"},"./normalize-site-form":{"types":"./dist/utils/normalizeSiteForm.d.ts","import":"./dist/utils/normalizeSiteForm.js"},"./resolve-sequence-steps":{"types":"./dist/utils/resolveSequenceSteps.d.ts","import":"./dist/utils/resolveSequenceSteps.js"}},"gitHead":"989dc6397efec605441f924b1c96111a638fb3c1","scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"_npmVersion":"11.11.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"deepmerge":"^4.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","lexical":"0.41.0","payload":"^3.82.1","typescript":"^5.7.2","@types/react":"^19.0.0","@payloadcms/ui":"^3.82.1","@payloadcms/richtext-lexical":"^3.82.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","payload":"^3.0.0","@payloadcms/ui":"^3.0.0","@payloadcms/richtext-lexical":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payload-site-forms_1.4.7_1778246066699_0.6710028115772892","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@agentmarketing/payload-site-forms","version":"1.5.0","description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","author":{"name":"Shane Farmer"},"homepage":"https://agentmarketing.co.uk/","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","quiz","decision-tree","nextjs"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"payload-site-forms":"bin/cli.mjs"},"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./resolve-sequence-steps":{"import":"./dist/utils/resolveSequenceSteps.js","types":"./dist/utils/resolveSequenceSteps.d.ts"},"./normalize-site-form":{"import":"./dist/utils/normalizeSiteForm.js","types":"./dist/utils/normalizeSiteForm.d.ts"},"./decision-tree":{"import":"./dist/utils/decisionTree.js","types":"./dist/utils/decisionTree.d.ts"},"./admin/steps-gate":{"import":"./dist/admin/StepsGate.js","types":"./dist/admin/StepsGate.d.ts"},"./admin/decision-tree-gate":{"import":"./dist/admin/DecisionTreeGate.js","types":"./dist/admin/DecisionTreeGate.d.ts"}},"scripts":{"build":"node ./scripts/build.mjs","prepublishOnly":"node ./scripts/build.mjs"},"dependencies":{"deepmerge":"^4.3.1"},"peerDependencies":{"@payloadcms/richtext-lexical":"^3.0.0","@payloadcms/ui":"^3.0.0","payload":"^3.0.0","react":"^18.0.0 || ^19.0.0"},"devDependencies":{"@payloadcms/richtext-lexical":"^3.82.1","@payloadcms/ui":"^3.82.1","@types/react":"^19.0.0","lexical":"0.41.0","payload":"^3.82.1","react":"^19.0.0","typescript":"^5.7.2"},"license":"MIT","gitHead":"989dc6397efec605441f924b1c96111a638fb3c1","_id":"@agentmarketing/payload-site-forms@1.5.0","_nodeVersion":"22.11.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-6BSA4eEtc162tu/6U5OIV0ceu51pj+1Tz6NrOJXr6fWl2njaamAcSFj0OWCoeRYCuWBJxIgdh2X57ellkhTyvA==","shasum":"669ea1a7608286ba7b43821a5e0bfc53ddea3a79","tarball":"https://registry.npmjs.org/@agentmarketing/payload-site-forms/-/payload-site-forms-1.5.0.tgz","fileCount":175,"unpackedSize":565661,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBVm8qZAOy2rzphHzdqcHUSTLAympWs3wPRPEX34MY0zAiEAnV1ebC1iEMFoEA420XGY/yJTcNFxVlwNa+B/cjoczfQ="}]},"_npmUser":{"name":"agent-marketing","email":"digital@helloagent.co.uk"},"directories":{},"maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/payload-site-forms_1.5.0_1780563276394_0.8301038860179153"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-21T13:48:35.488Z","modified":"2026-06-04T08:54:36.724Z","0.1.0":"2026-04-21T13:48:35.739Z","0.2.2":"2026-04-21T14:55:27.889Z","0.2.4":"2026-04-21T15:12:42.786Z","0.2.5":"2026-04-22T16:13:14.672Z","0.2.6":"2026-04-22T16:19:07.238Z","1.0.0":"2026-04-22T18:18:52.124Z","1.1.0":"2026-04-22T19:01:10.551Z","1.2.0":"2026-04-22T21:49:33.520Z","1.3.0":"2026-04-28T14:41:20.356Z","1.3.1":"2026-04-28T15:14:22.709Z","1.4.1":"2026-04-29T12:20:20.914Z","1.4.7":"2026-05-08T13:14:26.847Z","1.5.0":"2026-06-04T08:54:36.563Z"},"author":{"name":"Shane Farmer"},"license":"MIT","homepage":"https://agentmarketing.co.uk/","keywords":["payload","payloadcms","payload-cms","plugin","forms","site-forms","submissions","multistep","sequences","quiz","decision-tree","nextjs"],"description":"Payload 3 plugin: Site Forms, submissions, form sequences (draft/save progress), and mailing. CLI (init) scaffolds UI, Site Form block, and editable mail-templates into your repo.","maintainers":[{"name":"agent-marketing","email":"digital@helloagent.co.uk"},{"name":"jake-holcroft","email":"jake@agentmarketing.co.uk"},{"name":"shane-farmer","email":"shane@helloagent.co.uk"}],"readme":"# Payload Site Forms\n\nA full **Site Forms** layer for **Payload 3**: reusable form definitions in the admin, submissions in the database, optional multi-step **sequences** with saved progress and staff approval, a front-end block, and mailing hooks — delivered without touching Payload’s official `plugin-form-builder` (they can coexist for legacy sites).\n\n**By Shane Farmer / [Agent Marketing](https://agentmarketing.co.uk/)**  \nQuestions or issues? Email [digital@agentmarketing.co.uk](mailto:digital@agentmarketing.co.uk).\n\n## What's new in 1.5.0\n\n- **Decision-tree quiz** (`formType: 'decision_tree'`): branching **Yes / No / Not sure** flow that routes to another question, a **programme**, a **page**, or the **investment guide** — no submission. Enable with the `decisionTree` plugin option ([Plugin options](#plugin-options), [Decision-tree quiz](#decision-tree-quiz)).\n- Admin: **Decision tree quiz** checkbox, **Questions** array, **Start question ID**, and quiz copy fields.\n- Runtime: `normalizeSiteForm` → `kind: 'fields' | 'decision_tree'`; export `@agentmarketing/payload-site-forms/decision-tree`.\n- CLI: `init` scaffolds `DecisionTreeForm.tsx` for the Site Form block.\n\n## What's new in 1.4.7\n\n- **Data entry grid** rows can set **Row control type**: single-line input (default for new rows and for older CMS docs without `rowType`), multi-line text, one checkbox per column, or one radio group per row. Text/checkbox/textarea cells use `${name}__grid__${rowIndex}__${colIndex}`. Radio rows use `${name}__grid__${rowIndex}__radio` with the **column index** as the value (`\"0\"`, `\"1\"`, …). Mail merge examples: `{{scores__grid__0__1}}`, `{{rating__grid__2__radio}}`.\n- `payload-site-forms init` refreshes the scaffolded grid field, `buildDefaultValues.ts`, and `submissionData.ts` as before.\n\n## What's new in 1.4.1\n\n- **Data entry grid** field block: optional sub title, configurable column and row labels, one text input per cell. Values are stored as `${name}__grid__${rowIndex}__${colIndex}` (sequence-friendly, distinct from multiple-input `__N` keys). Mail merge and exports can use the same keys, e.g. `{{scores__grid__0__1}}`.\n- `payload-site-forms init` syncs `DataEntryGridField.tsx`, `buildDefaultValues.ts`, and `submissionData.ts`, and patches the field registry when the component is present.\n- See **`CHANGELOG.md`** for the full release notes.\n\n## What's new in 1.3.1\n\n- Bug fix with multiple fields.\n- `payload-site-forms init` now correctly updates old site-form files on existing installs (idempotent; originals backed up to `.bak`).\n\n## What's new in 1.3.0\n\n- **Allow Multiple Inputs** on any input field — a per-field admin checkbox (and matching cap) lets visitors press *“Add another”* to repeat the field. Extras are stored as `name__1`, `name__2`, … alongside the base `name`, surface in admin as *Address 2*, *Address 3*, …, and expose friendly merge tags (`{{address_2}}`, `{{address_all}}`) for mailings.\n- Field names ending with `__N` are now reserved (rejected on save) to prevent clashes with the indexed extras above.\n\n## The model at a glance\n\nEvery Site Form document is a **sequence of steps**. A top-level **Multi Form** checkbox in the admin controls whether the sequence may contain more than one step.\n\n| Multi Form | Meaning |\n| --- | --- |\n| **Off** (default) | Exactly one step. The step itself can be either a single page of fields or a multi-page flow. Submits in one go via `POST /api/site-form-submissions`. No drafts. |\n| **On** | Two or more steps (rendered as tabs). Each step is independent and may itself be multi-page. Supports **Draft safe answers**, **staff approval** gates per step, identifier-based resume, and pipeline runs. |\n\nEach step has its own `stepType`:\n\n- **Single page** (`standard`) — a flat list of fields.\n- **Multi-page** (`multi_step`) — pages of fields with Next / Previous / Submit.\n\nThat means from the editor’s point of view there is just **one form type** (a sequence), driven by two checkboxes (**Multi Form** on the document, **Step layout** on each step). From the runtime point of view there is **one renderer** (`SiteFormBlock`), fed by a **single normalized shape**.\n\n### How the data stays backwards-compatible\n\nOlder databases may contain documents with `formType: 'standard'`, `formType: 'multi_step'` (legacy flat `fields` / `stages` fields), or `formType: 'multi_form'` with a relationship-based `pipeline` array. All of these:\n\n- Remain **fully editable** in the admin — legacy fields are shown only when the document is already legacy.\n- Render at runtime via an adapter (`normalizeSiteForm`) that projects them into the same step sequence shape the new model uses.\n\nNo migration is required to use the plugin on an existing dataset.\n\n## How it fits a Payload app\n\n- You register **`siteFormsPlugin(...)`** in your Payload `plugins` array. The plugin merges collections (`site-forms`, `site-form-submissions`, `site-form-draft-submissions`), fields, hooks, and endpoints into your config.\n- Editors manage forms under **Site Forms** in the admin. Submissions are stored under **Site Form Submissions**; sequence progress lives on **Site Form Draft Submissions**.\n- You expose the **Site Form** layout block on your pages (and/or posts). The block’s front-end renderer (`SiteFormBlock`) reads the document, normalises it, and dispatches to either the single-step renderer or the multi-step sequence pipeline — all inside one file.\n- The **`payload-site-forms` CLI** is the supported way to wire a new app. `payload-site-forms init` copies the UI helpers, the block, the mail templates, and patches `src/plugins/index.ts`, `next.config.js`, `src/collections/Pages`, and `src/blocks/RenderBlocks.tsx`.\n\nPayload 3, **Next.js App Router**, and **`@payloadcms/richtext-lexical`** are assumed.\n\n## Install\n\n```bash\npnpm add @agentmarketing/payload-site-forms\n# or: npm install @agentmarketing/payload-site-forms\n```\n\nBumping to a newer release:\n\n```bash\npnpm update @agentmarketing/payload-site-forms\n# or pin a major: edit package.json to \"^1.x\" and run pnpm install\n```\n\nAfter any update, run `pnpm payload generate:types` so your TypeScript collection types match the plugin schema.\n\n## Quick setup\n\n### 1. Scaffold\n\nFrom the project root:\n\n```bash\npnpm exec payload-site-forms init\n# or: npx payload-site-forms init\n```\n\nThis copies:\n\n- `src/payload-site-forms/*` — field registry and React helpers (React Hook Form integration, identifier helpers, draft hook, submission serializers).\n- `src/blocks/SiteForm/*` — the Site Form layout block (slug `siteFormBlock`, relates to `site-forms`) and its single-file renderer `Component.tsx`.\n- `src/components/ui/*` — shadcn-flavour primitives the scaffold imports: `button`, `tabs`, `radio-group`, `checkbox`, `label`, `input`, `textarea`, `select`. **Already have a shadcn install?** `init` skips any primitive that already exists in your project.\n- `src/components/Recaptcha.tsx` — a self-contained reCAPTCHA v3 wrapper. No-ops when `NEXT_PUBLIC_RECAPTCHA_KEY` is not set, so safe to keep without a reCAPTCHA account.\n- `src/lib/utils.ts` — the `cn()` helper used by the primitives.\n- `mail-templates/site-forms/*` — editable HTML / TXT copies of the bundled mail templates (commit these in your repo).\n\nAfter `init` you'll see a one-liner command to install the Radix + CVA peers that the primitives need:\n\n```bash\npnpm add @radix-ui/react-checkbox @radix-ui/react-label @radix-ui/react-radio-group \\\n  @radix-ui/react-select @radix-ui/react-slot @radix-ui/react-tabs \\\n  class-variance-authority clsx lucide-react tailwind-merge\n```\n\nRe-running is safe — `pnpm add` is a no-op for packages you already have.\n\n…and patches:\n\n- `src/plugins/index.ts` — registers `siteFormsPlugin({ mailTemplatesPath: ... })`.\n- `next.config.js` — adds the package to `transpilePackages`.\n- `src/collections/Pages/index.ts` — registers `SiteFormBlock` alongside the default `FormBlock`.\n- `src/blocks/RenderBlocks.tsx` — maps the `siteFormBlock` slug to `SiteFormBlock`.\n\nExisting projects upgrading from a pre-1.0 scaffold: `init` also removes the now-obsolete `src/blocks/SiteForm/MultiFormPipeline.tsx` (backed up to `.bak`) because the single-step and multi-step renderers are consolidated into `Component.tsx`.\n\nIf you prefer to register the plugin by hand, the minimal wiring is:\n\n```ts\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { siteFormsPlugin } from '@agentmarketing/payload-site-forms'\n\nconst projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..')\n\nexport const plugins = [\n  siteFormsPlugin({\n    mailTemplatesPath: path.join(projectRoot, 'mail-templates', 'site-forms'),\n  }),\n]\n```\n\n### 2. Regenerate Payload artifacts\n\n```bash\npnpm payload generate:types\npnpm payload generate:importmap\n```\n\n### 3. Create a form and add it to a page\n\nIn the admin: **Site Forms → New**. Author your step(s), tick **Multi Form** if you need more than one step, fill the **Confirmation** tab and **Mailing** tab, then add the **Site Form block** to a page or post and select the form.\n\n## The editor experience\n\n### Content tab\n\n- **Title** / **Slug** — standard.\n- **Multi Form** — unticked by default. Turn on to author a sequence.\n- **Draft safe answers** *(Multi Form only)* — enable visitor draft saving for this sequence. Requires at least one identifier field on one of the steps.\n- **When to save answers** *(Draft safe answers only)* —\n  - **On submit** (default) — the visitor uses a \"Save draft\" button.\n  - **After each page** — snapshot after every step / page navigation.\n  - **When they leave each field** — snapshot on blur.\n- **Steps** — array of steps in the order visitors see them.\n  - **Step label** *(Multi Form only)* — shown as a tab heading.\n  - **Step layout** — **Single page** or **Multi-page**.\n  - **Fields** *(single-page steps)* or **Pages** *(multi-page steps)*.\n  - **Visitor must finish this step before the next** *(Multi Form only)*.\n  - **Needs staff approval before continuing** *(Multi Form only)* — blocks progression until an admin approves the step.\n\nWhen **Multi Form is off**, the editor UI collapses to a single-form experience:\n\n- The \"Steps\" label and the **Add Step** button are hidden — there is always exactly one step.\n- The per-step **Step label** field is hidden.\n- The **Identifier** checkbox on each field block is hidden (identifiers are only meaningful for sequences with draft saving).\n\nTick **Multi Form** to reveal all of the above and author a full sequence.\n\n### Confirmation tab\n\n- **Confirmation type** — message or redirect.\n- **Confirmation message** — Lexical rich text shown after successful submission.\n- **Redirect URL** — used when confirmation type is redirect.\n- **Submit button label**.\n- **Sequence awaiting-approval message** *(Multi Form only)* — displayed while a step is pending staff review.\n- **Sequence rejected message** *(Multi Form only)* — displayed when a step is rejected.\n\n### Mailing tab\n\nRecipients, subjects, and Lexical body fields for each mail type (submission, approval request, approval approved, approval rejected). Bodies populate the `{{submissionMessage}}` / `{{submissionMessagePlain}}` merge tags inside the HTML / TXT templates.\n\n## Decision-tree quiz\n\nA **decision-tree quiz** is a different kind of Site Form: instead of collecting a submission, it asks a sequence of **Yes / No / Not sure** questions and routes the visitor to an **outcome**. It is opt-in — enable it with the `decisionTree` plugin option:\n\n```ts\nsiteFormsPlugin({\n  decisionTree: {\n    enabled: true,\n    programmeCollectionSlug: 'programmes', // collection used for \"programme\" outcomes\n    pageCollectionSlug: 'pages',           // collection used for \"page\" outcomes\n    programmeUrlPrefix: '/programmes',      // link prefix for programme outcomes\n  },\n})\n```\n\nWhen enabled, tick **Decision tree quiz** on a Site Form to author a **Questions** array, **Start question ID**, and quiz copy (heading, intro, start button, fallback message, investment-guide URL/message).\n\nEach row in **Questions** is one branching question:\n\n- **Question ID** — unique key used for branching (e.g. `seekingFunding`).\n- **Question** / **Explainer** — the prompt and optional supporting copy.\n- **Yes / No / Not sure** — per-answer destination, each of which can lead to **another question**, a **programme** outcome, a **page** outcome, or the **investment guide**. Custom button labels and an optional **Not sure** answer are supported per question.\n\nValidation rebuilds the tree on save to guarantee unique question IDs, a valid **Start question ID**, and reachable destinations.\n\nAt runtime, `normalizeSiteForm(doc)` returns a discriminated shape:\n\n```ts\nconst form = normalizeSiteForm(doc, { programmeUrlPrefix: '/programmes' })\n\nif (form.kind === 'decision_tree' && form.decisionTree) {\n  // form.decisionTree: { tree, heading, introText, ..., questions, programmeUrlPrefix }\n}\n```\n\nThe scaffolded `DecisionTreeForm.tsx` renders this shape (start screen, questions, Back / Continue, and the resolved outcome card). To drive your own renderer, use the tree utilities:\n\n```ts\nimport {\n  buildDecisionTree,\n  resolveNextNodeIdFromAnswer,\n  INVESTMENT_GUIDE_OUTCOME_ID,\n  type DecisionTree,\n} from '@agentmarketing/payload-site-forms/decision-tree'\n```\n\n## The front-end renderer\n\n`SiteFormBlock` is a single consolidated React component exposed from `src/blocks/SiteForm/Component.tsx`. It:\n\n1. Reads the Site Form document from the block props.\n2. Runs it through `normalizeSiteForm(doc)` which returns a `NormalizedSiteForm` (unified steps array plus policy-corrected flags such as `isSingleStep`, `allowPreSave`, `saveStrategy`).\n3. Dispatches to one of two internal components in the same file:\n   - **Single-step path** — used for any `isSingleStep` result (new Multi Form-off docs, legacy `standard`, legacy `multi_step`). Submits directly to `/api/site-form-submissions`. No pipeline runs, no draft saves.\n   - **Multi-step sequence path** — used for any sequence with more than one step. Drives the tab strip, pipeline runs, identifier gate, per-step approval, and draft progress.\n\nThere is **no second renderer file to keep in sync**. If you are adjusting layout, styling, or submit behaviour, you only ever edit `Component.tsx`.\n\n### Consuming the adapter yourself\n\nIf you build your own block, you can use the adapter directly:\n\n```ts\nimport {\n  normalizeSiteForm,\n  type NormalizedSiteForm,\n} from '@agentmarketing/payload-site-forms/normalize-site-form'\n\nconst form: NormalizedSiteForm = normalizeSiteForm(doc)\n\nif (form.isSingleStep) {\n  // render form.steps[0]\n} else {\n  // render form.steps as a sequence\n}\n```\n\n### Client-only subpaths\n\nThe main package entry pulls in server-oriented code. For **client components** (or a thin `src/payload-site-forms/index.ts` re-export) import the subpaths:\n\n```ts\nimport {\n  resolveInlineSteps,\n  type InlineSequenceStep,\n} from '@agentmarketing/payload-site-forms/resolve-sequence-steps'\n\nimport {\n  normalizeSiteForm,\n  type NormalizedSiteForm,\n  type NormalizedDecisionTree,\n  type NormalizedStep,\n  type SiteFormLike,\n} from '@agentmarketing/payload-site-forms/normalize-site-form'\n\nimport {\n  buildDecisionTree,\n  resolveNextNodeIdFromAnswer,\n  INVESTMENT_GUIDE_OUTCOME_ID,\n  type DecisionTree,\n} from '@agentmarketing/payload-site-forms/decision-tree'\n```\n\n`siteFormsPlugin`, `createDefaultFieldBlocks`, and the mailing helpers are **server only**.\n\n## Submissions and sequences\n\n- `site-form-submissions` — one row per completed submission. Single-step forms write directly here. Sequences write the final consolidated submission here when all steps are complete.\n- `site-form-draft-submissions` — one row per in-progress sequence session. Holds the pipeline run, per-step snapshots, approval status, and the identifier fingerprint used by the resume lookup.\n- Endpoints exposed by the plugin:\n  - `POST /api/site-form-draft-submissions/multi-form-action` — `ensure_run`, `save_progress`, `submit_stage` for sequences.\n  - `POST /api/site-form-submissions/resume-lookup` — identifier-based resume.\n  - `POST /api/site-form-draft-submissions/draft-upsert` — used by the draft hook.\n\n## Email\n\nLayout lives in `mail-templates/*.html` (and optional `.txt`). After `payload-site-forms init`, these are copied to `mail-templates/site-forms` in your project and `mailTemplatesPath` is patched in automatically. To add or reset templates later, run `payload-site-forms mail-templates`.\n\nMessage **copy** is pulled from the CMS Mailing tab — if a body field is empty, the plugin falls back to a sensible default. Available merge tags include `{{formTitle}}`, `{{submissionId}}`, `{{pipelineRunId}}`, submitter `{{email}}`, **`{{submissionFieldsHtml}}`** / **`{{submissionFieldsPlain}}`** (every submitted field as an HTML table or plain-text block — ideal for generic templates), and any submission field name (e.g. `{{email}}`, `{{scores__grid__0__1}}`, `{{preferences__grid__0__radio}}`).\n\nTo bypass the file + CMS pipeline entirely, pass `renderEmailTemplate` to the plugin: an async function that returns `{ subject, html?, text? }`.\n\n## Plugin options\n\n| Option | Description |\n| --- | --- |\n| `fieldBlocks` | Custom Payload **blocks** for form fields (defaults provided if omitted). |\n| `additionalFormTypeOptions` | Extra `{ label, value }` entries for the legacy form-type select. Hidden by default; retained so custom form types still round-trip. |\n| `decisionTree` | Enables the [decision-tree quiz](#decision-tree-quiz) form type. `{ enabled, programmeCollectionSlug, pageCollectionSlug, programmeUrlPrefix }`. Disabled by default. |\n| `overrides.siteForms` | Deep partial override for the `site-forms` collection. |\n| `overrides.siteFormSubmissions` | Partial override for `site-form-submissions`. |\n| `overrides.siteFormDraftSubmissions` | Partial override for `site-form-draft-submissions`. |\n| `overrides.siteFormPipelineRuns` | Deprecated alias for the draft-submissions override. |\n| `uploadCollectionSlug` | Upload relation collection slug (default `media`). |\n| `mailTemplatesPath` | Directory containing `{key}.html` / `{key}.txt`; defaults to the package `mail-templates/`. |\n| `lexicalEditorForMailing` | Lexical editor instance for mailing-related rich fields. |\n| `renderEmailTemplate` | Async override: return `{ subject, html?, text? }` and skip the file + CMS body pipeline. |\n\n## Public API (summary)\n\nServer:\n\n```ts\nimport {\n  siteFormsPlugin,\n  createDefaultFieldBlocks,\n  lexicalJsonToPlainText,\n  applyMergeTags,\n} from '@agentmarketing/payload-site-forms'\n```\n\nClient-safe subpaths:\n\n```ts\nimport {\n  resolveInlineSteps,\n  type InlineSequenceStep,\n} from '@agentmarketing/payload-site-forms/resolve-sequence-steps'\n\nimport {\n  normalizeSiteForm,\n  type NormalizedSiteForm,\n  type NormalizedDecisionTree,\n  type NormalizedStep,\n  type SiteFormLike,\n} from '@agentmarketing/payload-site-forms/normalize-site-form'\n\n// Decision-tree quiz helpers (only when `decisionTree.enabled`)\nimport {\n  buildDecisionTree,\n  mapRawQuestionsToConfig,\n  resolveNextNodeIdFromAnswer,\n  INVESTMENT_GUIDE_OUTCOME_ID,\n  type DecisionTree,\n  type DecisionTreeNode,\n} from '@agentmarketing/payload-site-forms/decision-tree'\n```\n\n## Requirements\n\n- **Payload** `^3.0.0`\n- **`@payloadcms/richtext-lexical`** `^3.0.0` (peer)\n- **`@payloadcms/ui`** `^3.0.0` (peer — used by the admin UI helper component that gates the single-form vs. sequence editor UX)\n- **`react`** `^18 || ^19` (peer)\n- Next.js App Router\n\n## License\n\nMIT.\n\n## Contact\n\n**[Agent Marketing](https://agentmarketing.co.uk/)** · [digital@agentmarketing.co.uk](mailto:digital@agentmarketing.co.uk)\n","readmeFilename":"README.md"}