{"_id":"formsmd","_rev":"9-81f5964bc237e4d38a60b75e37789740","name":"formsmd","dist-tags":{"latest":"1.1.3"},"versions":{"1.1.0":{"name":"formsmd","version":"1.1.0","keywords":["accessibility","blog","form","form-builder","form builder","google-sheets","google sheets","markdown","slides","ssg","static-site-generator","static site generator","typeform","typeform-clone"],"author":{"name":"Tahmid Khan Nafee"},"license":"Apache-2.0","_id":"formsmd@1.1.0","maintainers":[{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"}],"bin":{"formsmd":"bin/index.js"},"dist":{"shasum":"508e15384cabcc165e4b196957ca25e30ff5d44d","tarball":"https://registry.npmjs.org/formsmd/-/formsmd-1.1.0.tgz","fileCount":80,"integrity":"sha512-vD0I1a8ZAjc7cMwpENStq9MyFylJmnpv2mBzonezKlVTF8D7VWsqv0UkA42pQdLK2mKIwTvhE96umvUdnfn4CQ==","signatures":[{"sig":"MEQCIBbPb2ZTUTIXHlsshRfNc+fRPg/HWwUrlr4zMHlOMCK9AiAH5lSNSfYtSm/L1hAH4tF6D3hAjHnV2QJdZY6Qy7VlFg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2061738},"jest":{"testEnvironment":"jsdom"},"main":"src/index.js","babel":{"presets":["@babel/preset-env"]},"types":"types/index.d.ts","gitHead":"a47f3c336c18440d10ed8c612631f61b883787e3","scripts":{"lint":"eslint bin/ --fix && eslint google-apps-script/ --fix && eslint src/ --fix && eslint tests/ --fix","test":"jest --runInBand","build":"rtlcss dist/css/formsmd.css dist/css/formsmd.rtl.css && tsc && npm run lint && npm run format && csso dist/css/formsmd.css -o dist/css/formsmd.min.css -s file && csso dist/css/formsmd.rtl.css -o dist/css/formsmd.rtl.min.css -s file && webpack --config webpack.config.js && npx babel dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && terser dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && npx babel dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js && terser dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js","format":"npx prettier . --write","webpack":"webpack --config webpack.config.js"},"_npmUser":{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"},"prettier":{"useTabs":true,"quoteProps":"consistent"},"_npmVersion":"10.8.2","description":"Developer-first, open source Typeform alternative","directories":{},"_nodeVersion":"20.18.1","dependencies":{"yargs":"^17.7.2","marked":"^12.0.1","nunjucks":"^3.2.4","dompurify":"^3.1.2","highlight.js":"^11.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.14.0","rtlcss":"^4.1.1","terser":"^5.30.4","globals":"^15.12.0","webpack":"^5.90.3","beautify":"^0.0.8","csso-cli":"^4.0.2","fs-extra":"^11.2.0","prettier":"^3.2.5","@babel/cli":"^7.24.7","@eslint/js":"^9.14.0","typescript":"^5.4.2","@babel/core":"^7.24.7","webpack-cli":"^5.1.4","@babel/preset-env":"^7.24.7","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/formsmd_1.1.0_1739624639230_0.3781404789103877","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"formsmd","version":"1.1.1","keywords":["accessibility","blog","form","form-builder","form builder","google-sheets","google sheets","markdown","slides","ssg","static-site-generator","static site generator","typeform","typeform-clone"],"author":{"name":"Tahmid Khan Nafee"},"license":"Apache-2.0","_id":"formsmd@1.1.1","maintainers":[{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"}],"bin":{"formsmd":"bin/index.js"},"dist":{"shasum":"428462a5f798f59f3ddc313477fa3081451851d6","tarball":"https://registry.npmjs.org/formsmd/-/formsmd-1.1.1.tgz","fileCount":80,"integrity":"sha512-R5vu/0TdKN4FARfE+P2dG2J5KTfWTwr7pCY7Zz6CeOxkU0anL33gwNFW1A2e+IDFk1db7dcpBlAiyt75ZPyIuQ==","signatures":[{"sig":"MEUCIQDIDiQmFSlSaF3OE0u7HkqLcTC/eNl5HJrYt8qvx74uLgIgGf/iAI+QzSuxKn+ncd3OoqC8urq6yNd7x2v8bRkYQzw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2061813},"jest":{"testEnvironment":"jsdom"},"main":"src/index.js","babel":{"presets":["@babel/preset-env"]},"types":"types/index.d.ts","gitHead":"e0383bdef2c92c8d863652eb5eda1fa9f297efaa","scripts":{"lint":"eslint bin/ --fix && eslint google-apps-script/ --fix && eslint src/ --fix && eslint tests/ --fix","test":"jest --runInBand","build":"rtlcss dist/css/formsmd.css dist/css/formsmd.rtl.css && tsc && npm run lint && npm run format && csso dist/css/formsmd.css -o dist/css/formsmd.min.css -s file && csso dist/css/formsmd.rtl.css -o dist/css/formsmd.rtl.min.css -s file && webpack --config webpack.config.js && npx babel dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && terser dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && npx babel dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js && terser dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js","format":"npx prettier . --write","webpack":"webpack --config webpack.config.js"},"_npmUser":{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"},"prettier":{"useTabs":true,"quoteProps":"consistent"},"_npmVersion":"10.8.2","description":"Developer-first, open source Typeform alternative","directories":{},"_nodeVersion":"20.18.1","dependencies":{"yargs":"^17.7.2","marked":"^12.0.1","nunjucks":"^3.2.4","dompurify":"^3.2.4","highlight.js":"^11.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.14.0","rtlcss":"^4.1.1","terser":"^5.30.4","globals":"^15.12.0","webpack":"^5.90.3","beautify":"^0.0.8","csso-cli":"^4.0.2","fs-extra":"^11.2.0","prettier":"^3.2.5","@babel/cli":"^7.24.7","@eslint/js":"^9.14.0","typescript":"^5.4.2","@babel/core":"^7.24.7","webpack-cli":"^5.1.4","@babel/preset-env":"^7.24.7","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/formsmd_1.1.1_1739629136470_0.16487345542588927","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"formsmd","version":"1.1.2","keywords":["accessibility","blog","form","form-builder","form builder","google-sheets","google sheets","markdown","slides","ssg","static-site-generator","static site generator","typeform","typeform-clone"],"author":{"name":"Tahmid Khan Nafee"},"license":"Apache-2.0","_id":"formsmd@1.1.2","maintainers":[{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"}],"bin":{"formsmd":"bin/index.js"},"dist":{"shasum":"f3a69eb17915126d9d01c1ac79c9454f3a6e8e4f","tarball":"https://registry.npmjs.org/formsmd/-/formsmd-1.1.2.tgz","fileCount":81,"integrity":"sha512-D9S7MSA+3nwm+LASGqkS32/0OyV2b8h2xSV0hFXCdgdopvpIFpXWr/srg/xt70RcsmBkXk9gGRsWQhNcvENOjA==","signatures":[{"sig":"MEQCIH7m+k9K2xTR1Jd67nGUumHEtduk81fBlrY+hBeUVdghAiAoy71x1jFlsVAkYkce+ygHKWqcPxFiwaZZz5Xd5Glrgw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2061973},"jest":{"testEnvironment":"jsdom"},"main":"src/index.js","babel":{"presets":["@babel/preset-env"]},"types":"types/index.d.ts","gitHead":"f889012f8b7de19da1a93521aac81f089e83253f","scripts":{"lint":"eslint bin/ --fix && eslint google-apps-script/ --fix && eslint src/ --fix && eslint tests/ --fix","test":"jest --runInBand","build":"rtlcss dist/css/formsmd.css dist/css/formsmd.rtl.css && tsc && npm run lint && npm run format && csso dist/css/formsmd.css -o dist/css/formsmd.min.css -s file && csso dist/css/formsmd.rtl.css -o dist/css/formsmd.rtl.min.css -s file && webpack --config webpack.config.js && npx babel dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && terser dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && npx babel dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js && terser dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js","format":"npx prettier . --write","webpack":"webpack --config webpack.config.js"},"_npmUser":{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"},"prettier":{"useTabs":true,"quoteProps":"consistent"},"_npmVersion":"10.8.2","description":"Developer-first, open source Typeform alternative","directories":{},"_nodeVersion":"20.18.1","dependencies":{"yargs":"^17.7.2","marked":"^12.0.1","nunjucks":"^3.2.4","dompurify":"^3.2.4","highlight.js":"^11.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.14.0","rtlcss":"^4.1.1","terser":"^5.30.4","globals":"^15.12.0","webpack":"^5.90.3","beautify":"^0.0.8","csso-cli":"^4.0.2","fs-extra":"^11.2.0","prettier":"^3.2.5","@babel/cli":"^7.24.7","@eslint/js":"^9.14.0","typescript":"^5.4.2","@babel/core":"^7.24.7","webpack-cli":"^5.1.4","@babel/preset-env":"^7.24.7","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/formsmd_1.1.2_1740733246471_0.29737659420909335","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"formsmd","version":"1.1.3","description":"Developer-first, open source Typeform alternative","main":"src/index.js","types":"types/index.d.ts","scripts":{"build":"rtlcss dist/css/formsmd.css dist/css/formsmd.rtl.css && tsc && npm run lint && npm run format && csso dist/css/formsmd.css -o dist/css/formsmd.min.css -s file && csso dist/css/formsmd.rtl.css -o dist/css/formsmd.rtl.min.css -s file && webpack --config webpack.config.js && npx babel dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && terser dist/js/formsmd.bundle.min.js -o dist/js/formsmd.bundle.min.js && npx babel dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js && terser dist/js/composer.bundle.min.js -o dist/js/composer.bundle.min.js","format":"npx prettier . --write","lint":"eslint bin/ --fix && eslint google-apps-script/ --fix && eslint src/ --fix && eslint tests/ --fix","test":"jest --runInBand","webpack":"webpack --config webpack.config.js"},"bin":{"formsmd":"bin/index.js"},"keywords":["accessibility","blog","form","form-builder","form builder","google-sheets","google sheets","markdown","slides","ssg","static-site-generator","static site generator","typeform","typeform-clone"],"author":{"name":"Tahmid Khan Nafee"},"license":"Apache-2.0","devDependencies":{"@babel/cli":"^7.24.7","@babel/core":"^7.24.7","@babel/preset-env":"^7.24.7","@eslint/js":"^9.14.0","beautify":"^0.0.8","csso-cli":"^4.0.2","eslint":"^9.14.0","fs-extra":"^11.2.0","globals":"^15.12.0","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","prettier":"^3.2.5","rtlcss":"^4.1.1","terser":"^5.30.4","typescript":"^5.4.2","webpack":"^5.90.3","webpack-cli":"^5.1.4"},"dependencies":{"dompurify":"^3.2.4","highlight.js":"^11.9.0","marked":"^12.0.1","nunjucks":"^3.2.4","yargs":"^17.7.2"},"prettier":{"useTabs":true,"quoteProps":"consistent"},"babel":{"presets":["@babel/preset-env"]},"jest":{"testEnvironment":"jsdom"},"_id":"formsmd@1.1.3","gitHead":"9288ca52d95ab34fd03a8d33e311e9d2c9ac955e","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Y3TVk2QcFXxH5D0yo2EILwivvPSc/l9WKyZ/w10pW3ZLzpKXbVEpZ/dI96Kw7sYwXSyVxtKwYTG6utBaB2z3Wg==","shasum":"89a11d7d88806ee59b717b617670f0ca179ba485","tarball":"https://registry.npmjs.org/formsmd/-/formsmd-1.1.3.tgz","fileCount":81,"unpackedSize":2061843,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDNR06KGQNadW3wDZ0fI0yvEyGCa0w7MYRAS2rKEKC1nAiB1gyiOM6UMHDPhbO7YfpRBjazILogEk3l3u8ZB5CgV3Q=="}]},"_npmUser":{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"},"directories":{},"maintainers":[{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/formsmd_1.1.3_1745753824816_0.35700870115028627"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-15T13:03:59.229Z","modified":"2025-04-27T11:37:05.202Z","1.1.0-beta.16":"2024-12-10T15:36:41.509Z","1.1.0-beta.17":"2024-12-17T11:04:58.915Z","1.1.0-beta.18":"2024-12-17T11:07:54.990Z","1.1.0-beta.19":"2025-01-19T12:52:50.093Z","1.1.0":"2025-02-15T13:03:59.455Z","1.1.1":"2025-02-15T14:18:56.726Z","1.1.2":"2025-02-28T09:00:46.703Z","1.1.3":"2025-04-27T11:37:05.037Z"},"author":{"name":"Tahmid Khan Nafee"},"license":"Apache-2.0","keywords":["accessibility","blog","form","form-builder","form builder","google-sheets","google sheets","markdown","slides","ssg","static-site-generator","static site generator","typeform","typeform-clone"],"description":"Developer-first, open source Typeform alternative","maintainers":[{"name":"halfmoonui","email":"tahmid.hm.dev@gmail.com"}],"readme":"![Forms.md cover image](https://res.cloudinary.com/dnriuttuy/image/upload/v1737557694/formsmd-og-image_qxkxec.png)\n\n# Forms.md: Developer-first, open source Typeform alternative\n\n**Forms.md** (formerly Blocks.md) lets you build powerful multi-step forms and surveys with minimal code. Create production-ready forms that are privacy-focused, accessible, localizable, and themeable. Perfect for user onboarding, data collection, customer feedback, and much more. The best part? [It's completely free](https://forms.md/pricing/).\n\nTo learn more, please [visit the website](https://forms.md) or [read the docs](https://docs.forms.md).\n\n## Installation\n\n### Install via npm\n\n```\nnpm install formsmd\n```\n\n### Use in browser\n\nDownload the distribution files from this repo and include them using `<link>` and `<script>` tags in your template.\n\n```html\n<!-- Forms.md CSS -->\n<link rel=\"stylesheet\" type=\"text/css\" href=\"path/to/formsmd/dist/css/formsmd.min.css\" />\n<!--\nOr RTL version:\n<link rel=\"stylesheet\" type=\"text/css\" href=\"path/to/formsmd/dist/css/formsmd.rtl.min.css\" />\n-->\n\n<!-- Forms.md JS bundle -->\n<script src=\"path/to/formsmd/dist/js/formsmd.bundle.min.js\"></script>\n```\n\n***\n\n## Usage\n\nCreate forms programmatically using the Composer class, then initialize them with the Formsmd class by passing in the template.\n\n```javascript\nimport \"formsmd/dist/css/formsmd.min.css\"; // Or import formsmd.rtl.min.css in case of RTL\nimport { Composer, Formsmd } from \"formsmd\";\n \n// Create form with ID and submission endpoint\nconst composer = new Composer({\n  id: \"onboarding-form\",\n  postUrl: \"/api/onboard\"\n});\n \n// Choice input for position\ncomposer.choiceInput(\"position\", {\n  question: \"What's your position?\",\n  choices: [\"Product Manager\", \"Software Engineer\", \"Founder\", \"Other\"],\n  required: true\n});\n \n// Text input if user selects \"Other\" position\ncomposer.textInput(\"positionOther\", {\n  question: \"Other\",\n  required: true,\n  labelStyle: \"classic\",\n  displayCondition: {\n    dependencies: [\"position\"],\n    condition: \"position == 'Other'\"\n  }\n});\n \n// Start new slide, progress indicator at 50%\ncomposer.slide({\n  pageProgress: \"50%\"\n});\n \n// Choice input for how user discovered the product\ncomposer.choiceInput(\"referralSource\", {\n  question: \"How did you hear about us?\",\n  choices: [\"News\", \"Search Engine\", \"Social Media\", \"Recommendation\"],\n  required: true\n});\n \n// Start new slide, show only if user was recommended, progress indicator at 75%\ncomposer.slide({\n  jumpCondition: \"referralSource == 'Recommendation'\",\n  pageProgress: \"75%\"\n});\n \n// Email input for recommender email address\ncomposer.emailInput(\"recommender\", {\n  question: \"Who recommended you?\",\n  description: \"We may be able to reach out to them and provide a discount for helping us out.\"\n});\n \n// Initialize with template, container, and options\nconst formsmd = new Formsmd(\n  composer.template,\n  document.getElementById(\"onboarding-form-container\"),\n  {\n    postHeaders: {\n      Authorization: `Bearer ${localStorage.getItem(\"token\")}`\n    }\n  }\n);\nformsmd.init();\n```\n\n## Build\n\nRun the following to build the project:\n\n```\nnpm run build\n```\n\nMake sure you have the dev dependencies installed.\n\n## Test\n\nRun the following to test the project:\n\n```\nnpm run test\n```\n\nAgain, make sure you have the dev dependencies installed.\n\n## License\n\n**Forms.md** is [licensed under Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).\n","readmeFilename":"README.md"}