{"id":15064403,"url":"https://github.com/StudyResearchProjects/manzana","last_synced_at":"2025-10-05T00:31:14.103Z","repository":{"id":40695254,"uuid":"465502678","full_name":"StudyResearchProjects/manzana","owner":"StudyResearchProjects","description":"🍏 Build forms on Svelte as easy as eating apple.","archived":true,"fork":false,"pushed_at":"2022-10-14T11:53:56.000Z","size":396,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T22:25:21.959Z","etag":null,"topics":["forms","svelte"],"latest_commit_sha":null,"homepage":"https://manzana.estebanborai.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StudyResearchProjects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-02T23:32:38.000Z","updated_at":"2025-08-14T19:39:43.000Z","dependencies_parsed_at":"2023-01-19T23:03:43.936Z","dependency_job_id":null,"html_url":"https://github.com/StudyResearchProjects/manzana","commit_stats":null,"previous_names":["leoborai/manzana","estebanborai/manzana","studyresearchprojects/manzana"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/StudyResearchProjects/manzana","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Fmanzana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Fmanzana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Fmanzana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Fmanzana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StudyResearchProjects","download_url":"https://codeload.github.com/StudyResearchProjects/manzana/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudyResearchProjects%2Fmanzana/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395875,"owners_count":25979685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forms","svelte"],"created_at":"2024-09-25T00:17:18.468Z","updated_at":"2025-10-05T00:31:13.657Z","avatar_url":"https://github.com/StudyResearchProjects.png","language":"TypeScript","readme":"\u003cdiv\u003e\n  \u003ch1 align=\"center\"\u003emanzana\u003c/h1\u003e\n  \u003ch4 align=\"center\"\u003e\n    🍏 Build forms on Svelte as easy as eating apple.\n  \u003c/h4\u003e\n\u003c/div\u003e\n\n## Installation\n\n```bash\n# npm\nnpm install manzana\n\n# yarn\nyarn add manzana\n\n# pnpm\npnpm add manzana\n```\n\n## Examples\n\n### Creating a new form\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n  import { newForm } from 'manzana';\n  import * as Sentry from '@sentry/browser';\n  import * as Yup from 'yup';\n\n  import { EmailAlreadyTaken } from '$lib/errors';\n  import { agentService } from '$lib/services/agent';\n  import { notificationStore } from '$lib/stores/notification';\n\n  const { handleSubmit, values, errors, isSubmitting } = newForm({\n    initialValues: {\n      name: 'James'\n      lastName: 'Bond',\n      nickname: 'Agent 007',\n      email: 'james.bond@agent007.com',\n    },\n    validationSchema: Yup.object({\n      name: Yup.string().required(),\n      lastName: Yup.string().required(),\n      nickname: Yup.string().required(),\n      email: Yup.string().email().required(),\n    }),\n    onSubmit: async (values, helpers) =\u003e {\n      try {\n        await agentService.register(values);\n      } catch (error) {\n        if (error instanceof EmailAlreadyTaken) {\n          helpers.setFieldError(\n            'email',\n            'The email is already taken!');\n          return;\n        }\n\n        Sentry.captureException(error);\n\n        notificationStore.displayError({\n          text: 'An error ocurred registering an agent.'\n        });\n      }\n    },\n  });\n\u003c/script\u003e\n\n\u003cform\u003e\n  \u003cdiv\u003e\n    \u003clabel\u003eName\u003c/label\u003e\n    \u003cinput type=\"text\" name=\"name\" bind:value={$values.name} /\u003e\n    \u003cp class:hidden={!$errors.name}\u003e\u003c/p\u003e\n  \u003c/div\u003e\n  \u003cdiv\u003e\n    \u003clabel\u003eLast Name\u003c/label\u003e\n    \u003cinput type=\"text\" name=\"lastName\" bind:value={$values.lastName} /\u003e\n    \u003cp class:hidden={!$errors.lastName}\u003e\u003c/p\u003e\n  \u003c/div\u003e\n  \u003cdiv\u003e\n    \u003clabel\u003eNickname\u003c/label\u003e\n    \u003cinput type=\"text\" name=\"nickname\" bind:value={$values.nickname} /\u003e\n    \u003cp class:hidden={!$errors.nickname}\u003e\u003c/p\u003e\n  \u003c/div\u003e\n  \u003cdiv\u003e\n    \u003clabel\u003eEmail\u003c/label\u003e\n    \u003cinput type=\"text\" name=\"email\" bind:value={$values.email} /\u003e\n    \u003cp class:hidden={!$errors.email}\u003e\u003c/p\u003e\n  \u003c/div\u003e\n  \u003cbutton type=\"submit\" class:disabled={$isSubmitting} disabled={$isSubmitting}\u003e\n    Create Account\n  \u003c/button\u003e\n\u003c/form\u003e\n```\n\n## Releasing\n\nWhenever a tag is pushed a new release is created an the package is\npublished to the NPM registry using GitHub Actions.\n\nBump the current version using `npm` as follows:\n\n```sh\n# for versions with breaking changes use `major`\nnpm version major\n\n# for versions with non-breaking changes use `minor`\nnpm version minor\n\n# for patch versions use `patch`\nnpm version patch\n```\n\nThen push the repository including tag metadata as follows\n\n```sh\ngit push origin main --follow-tags\n```\n\n## Contributions\n\nAny contribution to this package is welcome! Don't hesitate on opening a\nPR or creating an issue!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStudyResearchProjects%2Fmanzana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStudyResearchProjects%2Fmanzana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStudyResearchProjects%2Fmanzana/lists"}