{"_id":"@formkit/inertia","_rev":"8-9c278f5e56a7227c28706b1d6c452ee8","name":"@formkit/inertia","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.1":{"name":"@formkit/inertia","version":"0.1.1","keywords":["formkit","vue","inertia","events","laravel","form","composable"],"author":{"name":"Gustavo Fenilli","email":"gustavofenilli@gmail.com"},"license":"MIT","_id":"@formkit/inertia@0.1.1","maintainers":[{"name":"devoidofgenius","email":"cellinger@wearebraid.com"},{"name":"fenilli","email":"gustavofenilli@gmail.com"},{"name":"justin-schroeder","email":"justin@formkit.com"},{"name":"boyd","email":"andrew+npm@formkit.com"}],"homepage":"https://github.com/formkit/inertia#readme","bugs":{"url":"https://github.com/formkit/inertia/issues"},"dist":{"shasum":"540cc823e8da8f7a5f5107a2f5ee1ca5c4cf9b0f","tarball":"https://registry.npmjs.org/@formkit/inertia/-/inertia-0.1.1.tgz","fileCount":9,"integrity":"sha512-RHvPiPyR1hNyokYwCEq2MeyIyLKN08JfZWiCrWNCGmM/WCRvF8hxDbQXgFaIY7NlIadwbvZY4oCokNNK7jw3LQ==","signatures":[{"sig":"MEYCIQCXfcDgDAoOQVOADb72V57Bcdwk1IqzGcxxC+kFmAnBYQIhAIWxwZ0YmmTVjtRZC6wH6n4V0FsK4kuKsulVGCEXAE/7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36817},"main":"./dist/index.js","_from":"file:formkit-inertia-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"publint && eslint","test":"vitest","build":"tsup-node","release":"bumpp && pnpm publish","prerelease":"pnpm run build && pnpm run lint"},"_npmUser":{"name":"justin-schroeder","email":"justin@formkit.com"},"_resolved":"C:\\Users\\gusta\\AppData\\Local\\Temp\\aca2adf80006a27630e2a72329a6319c\\formkit-inertia-0.1.1.tgz","_integrity":"sha512-RHvPiPyR1hNyokYwCEq2MeyIyLKN08JfZWiCrWNCGmM/WCRvF8hxDbQXgFaIY7NlIadwbvZY4oCokNNK7jw3LQ==","repository":{"url":"git+https://github.com/formkit/inertia.git","type":"git"},"_npmVersion":"9.6.7","description":"FormKit + Inertia = ❤️","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","bumpp":"^9.2.0","eslint":"^8.52.0","vitest":"^0.34.6","publint":"^0.2.5","typescript":"^5.2.2","@commitlint/cli":"^18.2.0","@typescript-eslint/parser":"^6.9.1","@commitlint/config-conventional":"^18.1.0","@typescript-eslint/eslint-plugin":"^6.9.1"},"peerDependencies":{"vue":">= 3.0.0","@formkit/vue":">= 1.2.0","@inertiajs/core":">= 1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inertia_0.1.1_1698701043071_0.43763532144409","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@formkit/inertia","version":"0.1.2","keywords":["formkit","vue","inertia","events","laravel","form","composable"],"author":{"name":"Gustavo Fenilli","email":"gustavofenilli@gmail.com"},"license":"MIT","_id":"@formkit/inertia@0.1.2","maintainers":[{"name":"devoidofgenius","email":"cellinger@wearebraid.com"},{"name":"fenilli","email":"gustavofenilli@gmail.com"},{"name":"justin-schroeder","email":"justin@formkit.com"},{"name":"boyd","email":"andrew+npm@formkit.com"}],"homepage":"https://github.com/formkit/inertia#readme","bugs":{"url":"https://github.com/formkit/inertia/issues"},"dist":{"shasum":"abfd939248a4dd22429508b358d1901813ededf9","tarball":"https://registry.npmjs.org/@formkit/inertia/-/inertia-0.1.2.tgz","fileCount":9,"integrity":"sha512-rBmnI75L9+mXXo4Wg/s3K3gJnVjzsY+kk66om4C+Tw/nXe2hrJ2TSORCMH84aRYcZY9N+OECPbXxU8e3BkNmeA==","signatures":[{"sig":"MEUCICMfxhEkr7bXtXj54tCgQQllkvESpGhXOw4K0edu7y0ZAiEAo+KxrxykY/i8uX/G67wCXHob6hvmVFwiVykyA1uiQ10=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52947},"main":"./dist/index.js","_from":"file:formkit-inertia-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"publint && eslint","test":"vitest","build":"tsup-node","release":"bumpp && pnpm publish","prerelease":"pnpm run build && pnpm run lint"},"_npmUser":{"name":"justin-schroeder","email":"justin@formkit.com"},"_resolved":"C:\\Users\\gusta\\AppData\\Local\\Temp\\227038e5c7f91c49031476bc3025778e\\formkit-inertia-0.1.2.tgz","_integrity":"sha512-rBmnI75L9+mXXo4Wg/s3K3gJnVjzsY+kk66om4C+Tw/nXe2hrJ2TSORCMH84aRYcZY9N+OECPbXxU8e3BkNmeA==","repository":{"url":"git+https://github.com/formkit/inertia.git","type":"git"},"_npmVersion":"9.6.7","description":"FormKit + Inertia = ❤️","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","bumpp":"^9.2.0","eslint":"^8.52.0","vitest":"^0.34.6","publint":"^0.2.5","typescript":"^5.2.2","@commitlint/cli":"^18.2.0","@typescript-eslint/parser":"^6.9.1","@commitlint/config-conventional":"^18.1.0","@typescript-eslint/eslint-plugin":"^6.9.1"},"peerDependencies":{"vue":">= 3.0.0","@formkit/vue":">= 1.2.0","@inertiajs/core":">= 1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inertia_0.1.2_1698939187081_0.06234259340631598","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@formkit/inertia","version":"0.1.3","keywords":["formkit","vue","inertia","events","laravel","form","composable"],"author":{"name":"Gustavo Fenilli","email":"gustavofenilli@gmail.com"},"license":"MIT","_id":"@formkit/inertia@0.1.3","maintainers":[{"name":"devoidofgenius","email":"cellinger@wearebraid.com"},{"name":"fenilli","email":"gustavofenilli@gmail.com"},{"name":"justin-schroeder","email":"justin@formkit.com"},{"name":"boyd","email":"andrew+npm@formkit.com"}],"homepage":"https://github.com/formkit/inertia#readme","bugs":{"url":"https://github.com/formkit/inertia/issues"},"dist":{"shasum":"ee576e0da05d6eb2d60c9900d2046ee85f2006dc","tarball":"https://registry.npmjs.org/@formkit/inertia/-/inertia-0.1.3.tgz","fileCount":9,"integrity":"sha512-XfIdizeQW0qNG7u9m4o8fIZ9JEftM7qFiy4C776Y//n1FE2gfI0Ct6pXWHFJmErHCQgEZp//bHGcSkw4WB1TYg==","signatures":[{"sig":"MEUCIHkAwGw4RIwW9GKwsUHRTxxQmr4WuRpeW8uiS1t7Z7VbAiEAkBIPl4IvQiz0kCVXiyNWK/v6kdjpR+C6wdSDLS5tBkU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50668},"main":"./dist/index.js","_from":"file:formkit-inertia-0.1.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"publint && eslint","test":"vitest","build":"tsup-node","release":"bumpp && pnpm publish","prerelease":"pnpm run build && pnpm run lint"},"_npmUser":{"name":"justin-schroeder","email":"justin@formkit.com"},"_resolved":"C:\\Users\\gusta\\AppData\\Local\\Temp\\9b79486d80b508d54d53b6d86d07804f\\formkit-inertia-0.1.3.tgz","_integrity":"sha512-XfIdizeQW0qNG7u9m4o8fIZ9JEftM7qFiy4C776Y//n1FE2gfI0Ct6pXWHFJmErHCQgEZp//bHGcSkw4WB1TYg==","repository":{"url":"git+https://github.com/formkit/inertia.git","type":"git"},"_npmVersion":"9.6.7","description":"FormKit + Inertia = ❤️","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","bumpp":"^9.2.0","eslint":"^8.52.0","vitest":"^0.34.6","publint":"^0.2.5","typescript":"^5.2.2","@commitlint/cli":"^18.2.0","@typescript-eslint/parser":"^6.9.1","@commitlint/config-conventional":"^18.1.0","@typescript-eslint/eslint-plugin":"^6.9.1"},"peerDependencies":{"vue":">= 3.0.0","@formkit/vue":">= 1.2.0","@inertiajs/vue3":">= 1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inertia_0.1.3_1699380187065_0.6815960134719548","host":"s3://npm-registry-packages"}},"0.1.4":{"name":"@formkit/inertia","version":"0.1.4","keywords":["formkit","vue","inertia","events","laravel","form","composable"],"author":{"name":"Gustavo Fenilli","email":"gustavofenilli@gmail.com"},"license":"MIT","_id":"@formkit/inertia@0.1.4","maintainers":[{"name":"devoidofgenius","email":"cellinger@wearebraid.com"},{"name":"fenilli","email":"gustavofenilli@gmail.com"},{"name":"justin-schroeder","email":"justin@formkit.com"},{"name":"boyd","email":"andrew+npm@formkit.com"}],"homepage":"https://github.com/formkit/inertia#readme","bugs":{"url":"https://github.com/formkit/inertia/issues"},"dist":{"shasum":"17544ba7340fe2fc2e7fc67229e07375a76d6c0a","tarball":"https://registry.npmjs.org/@formkit/inertia/-/inertia-0.1.4.tgz","fileCount":9,"integrity":"sha512-jiAWpmXd/AY4zgTpizJrb89geMR7FMUnw0rUPY96zSCAJLZXso+JfjQH/bL00EpWpZYtcUt0nUFNixAyvdmFNw==","signatures":[{"sig":"MEUCIQDkogv5KS2tssHjmVINeDWKJwNqFcd816jV1UenVDRg0QIgRV6a0iTY3b6Ex5h0XBjnr1NXgjmUdBYgCmSJ02/0fHU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50782},"main":"./dist/index.js","_from":"file:formkit-inertia-0.1.4.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"publint && eslint","test":"vitest","build":"tsup-node","release":"bumpp && pnpm publish","prerelease":"pnpm run build && pnpm run lint"},"_npmUser":{"name":"justin-schroeder","email":"justin@formkit.com"},"_resolved":"C:\\Users\\gusta\\AppData\\Local\\Temp\\2ca8a83153b2174022972bf0fd697882\\formkit-inertia-0.1.4.tgz","_integrity":"sha512-jiAWpmXd/AY4zgTpizJrb89geMR7FMUnw0rUPY96zSCAJLZXso+JfjQH/bL00EpWpZYtcUt0nUFNixAyvdmFNw==","repository":{"url":"git+https://github.com/formkit/inertia.git","type":"git"},"_npmVersion":"9.6.7","description":"FormKit + Inertia = ❤️","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","bumpp":"^9.2.0","eslint":"^8.52.0","vitest":"^0.34.6","publint":"^0.2.5","typescript":"^5.2.2","@commitlint/cli":"^18.2.0","@typescript-eslint/parser":"^6.9.1","@commitlint/config-conventional":"^18.1.0","@typescript-eslint/eslint-plugin":"^6.9.1"},"peerDependencies":{"vue":">= 3.0.0","@formkit/vue":">= 1.2.0","@inertiajs/vue3":">= 1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inertia_0.1.4_1699631694374_0.8474598392448376","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"@formkit/inertia","version":"0.1.5","keywords":["formkit","vue","inertia","events","laravel","form","composable"],"author":{"name":"Gustavo Fenilli","email":"gustavofenilli@gmail.com"},"license":"MIT","_id":"@formkit/inertia@0.1.5","maintainers":[{"name":"devoidofgenius","email":"cellinger@wearebraid.com"},{"name":"fenilli","email":"gustavofenilli@gmail.com"},{"name":"justin-schroeder","email":"justin@formkit.com"},{"name":"boyd","email":"andrew+npm@formkit.com"}],"homepage":"https://github.com/formkit/inertia#readme","bugs":{"url":"https://github.com/formkit/inertia/issues"},"dist":{"shasum":"cf65fc39e155cedeb82680380cd90e6f15911f4a","tarball":"https://registry.npmjs.org/@formkit/inertia/-/inertia-0.1.5.tgz","fileCount":9,"integrity":"sha512-BLovSTsBWMJEt4XqSRFa9Ag0CHXmr2Hnc+H9vmkyX+aDbgzDoivqBMJHU4TvwOXn+zsrjo36tvVhFU0WYRZl5g==","signatures":[{"sig":"MEUCIECCFEn9NcO/hesVrqcRwBPH9A/4zdmhOoHBPl6aPlwPAiEAojUAsupD115M8duIIRTu6KTGUVGhG3Es7uz5rrLn0zg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53118},"main":"./dist/index.js","_from":"file:formkit-inertia-0.1.5.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"publint && eslint","test":"vitest","build":"tsup-node","release":"bumpp && pnpm publish","prerelease":"pnpm run build && pnpm run lint"},"_npmUser":{"name":"justin-schroeder","email":"justin@formkit.com"},"_resolved":"C:\\Users\\gusta\\AppData\\Local\\Temp\\b1fde05523c4d3787a015a8aab652e84\\formkit-inertia-0.1.5.tgz","_integrity":"sha512-BLovSTsBWMJEt4XqSRFa9Ag0CHXmr2Hnc+H9vmkyX+aDbgzDoivqBMJHU4TvwOXn+zsrjo36tvVhFU0WYRZl5g==","repository":{"url":"git+https://github.com/formkit/inertia.git","type":"git"},"_npmVersion":"9.6.7","description":"FormKit + Inertia = ❤️","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","bumpp":"^9.2.0","eslint":"^8.52.0","vitest":"^0.34.6","publint":"^0.2.5","typescript":"^5.2.2","@commitlint/cli":"^18.2.0","@typescript-eslint/parser":"^6.9.1","@commitlint/config-conventional":"^18.1.0","@typescript-eslint/eslint-plugin":"^6.9.1"},"peerDependencies":{"vue":">= 3.0.0","@formkit/vue":">= 1.2.0","@inertiajs/vue3":">= 1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inertia_0.1.5_1699632985192_0.4284281874050362","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-10-30T21:24:03.070Z","modified":"2025-11-11T18:52:36.422Z","0.1.1":"2023-10-30T21:24:03.281Z","0.1.2":"2023-11-02T15:33:07.275Z","0.1.3":"2023-11-07T18:03:07.445Z","0.1.4":"2023-11-10T15:54:54.602Z","0.1.5":"2023-11-10T16:16:25.341Z"},"bugs":{"url":"https://github.com/formkit/inertia/issues"},"author":{"name":"Gustavo Fenilli","email":"gustavofenilli@gmail.com"},"license":"MIT","homepage":"https://github.com/formkit/inertia#readme","keywords":["formkit","vue","inertia","events","laravel","form","composable"],"repository":{"url":"git+https://github.com/formkit/inertia.git","type":"git"},"description":"FormKit + Inertia = ❤️","maintainers":[{"email":"justin@formkit.com","name":"justin-schroeder"},{"email":"andrew+npm@formkit.com","name":"boyd"},{"email":"luan@wearebraid.com","name":"lnguyen-braid"},{"email":"cellinger@wearebraid.com","name":"devoidofgenius"}],"readme":"<h3 id=\"readme-top\"></h3>\n\n# Inertia Plugin\n\n<a href=\"https://github.com/formkit/inertia/actions/workflows/ci.yml\">\n  <img title=\"Build Badge\" alt=\"GitHub Build Status\" src=\"https://github.com/formkit/inertia/actions/workflows/ci.yml/badge.svg\">\n</a>\n<a href=\"https://www.npmjs.com/package/@formkit/inertia\">\n  <img title=\"Npm Version\" alt=\"Npm Version\" src=\"https://img.shields.io/npm/v/@formkit/inertia\">\n</a>\n<a href=\"https://github.com/formkit/inertia/blob/main/LICENSE.txt\">\n  <img title=\"Npm Version\" alt=\"Npm Version\" src=\"https://img.shields.io/github/license/formkit/inertia\">\n</a>\n\nThe `@formkit/inertia` plugin aims to seamlessly integrate Inertia.js with FormKit forms, leveraging a robust event system that harnesses Inertia.js event callbacks and FormKit plugins for a smooth and powerful web development experience.\n\n### Table of Contents\n\n1. [Installation](#installation)\n2. [Usage](#usage)\n3. [Addons](#addons)\n4. [Roadmap](#roadmap)\n5. [Types](#types)\n\n## Installation\n\nTo use the Inertia plugin we need to have a Laravel project already with Inertia Vue.JS installed and running you can check how by looking into the first sections of the guide [Using FormKit with Laravel Inertia](https://formkit.com/guides/using-formkit-with-laravel-inertia).\n\nNow you can install using your preferred package manager by following this bash command:\n\n```bash\nnpm install @formkit/inertia\n```\n\n## Usage\n\nTo use the Inertia plugin we need to import the `useForm` function from `@formkit/inertia`, call the `useForm` function to receive the `form`, it comes with Inertia's method calls, reactive states, the addons for extensions, and the FormKit plugin.\n\nThe `useForm` function takes one optional argument for the initial fields that will be passed to your form via plugin, it will also return methods like `submit`, `get`, `post`, `put`, `patch` and `delete`. All of these methods will return a suitable function for use as FormKit’s `@submit` handler.\n\nThe easiest way to use it is by creating a new `const` with the resulting method of your choice, and adding the `form.plugin` to the FormKit form `:plugins`:\n\n```html\n<script setup lang=\"ts\">\n  import { useForm } from '@formkit/inertia'\n\n  const form = useForm()\n  const submitHandler = form.post('/login')\n</script>\n\n<template>\n  <FormKit type=\"form\" @submit=\"submitHandler\" :plugins=\"[form.plugin]\">\n    <FormKit type=\"text\" name=\"username\" label=\"Username\" />\n    <FormKit type=\"password\" name=\"password\" label=\"Password\" />\n  </FormKit>\n</template>\n```\n\nYou could also also define the handler directly in your template:\n\n```html\n<FormKit\n  type=\"form\"\n  @submit=\"(fields, node) => form.post('/login')(fields, node)\"\n  :plugins=\"[form.plugin]\"\n>\n  <!-- The rest of your form -->\n</FormKit>\n```\n\nThe functions support all [visit options](https://inertiajs.com/manual-visits) from Inertia, such as `preserveState`, `preserveScroll`, and event callbacks.\n\n> The `options` event callbacks will overwrite any default events to that specific event, meaning that if you for example add `onStart` you will lose the events from `start` that are for example loading, disabling and processing.\n\n```html\n<FormKit\n  type=\"form\"\n  @submit=\"(fields, node) => form.post('/login', {\n    preserveScroll: true,\n    onSuccess: () => form.node.reset(),\n  })(fields, node)\"\n  :plugins=\"[form.plugin]\"\n>\n  <!-- The rest of your form -->\n</FormKit>\n```\n\nTo cancel a form submission, use the `cancel()` method.\n\n```html\n<FormKit\n  type=\"form\"\n  @submit=\"(fields, node) => form.post('/login')(fields, node)\"\n  :plugins=\"[form.plugin]\"\n>\n  <!-- The rest of your form -->\n</FormKit>\n\n<FormKit type=\"button\" @click=\"form.cancel()\" label=\"Cancel\" />\n```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\nThe `useForm()` composable also returns reactive states. The Inertia ones are: `processing`, `progress`, `recentlySuccessful` and `wasSuccessful`, the FormKit based ones are `valid`, `errors`, `dirty` and `node`. For example, you could use the `processing` state to disable the form submit button while Inertia is processing the form (assuming that you’re using your own submit button):\n\n```html\n<template>\n  <FormKit type=\"form\" @submit=\"submit\" :plugins=\"[form.plugin]\">\n    <FormKit type=\"text\" name=\"username\" label=\"Username\" />\n    <FormKit type=\"password\" name=\"password\" label=\"Password\" />\n\n    <template #submit>\n      <FormKit type=\"submit\" label=\"Log in\" :disabled=\"form.processing\" />\n    </template>\n  </FormKit>\n</template>\n```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Addons\n\nThe main feature for extending functionality is by passing addons to `addon()`, this way you can target multiple events that will be triggered when those are called by Inertia's event callback system, `addon()` accepts a function or an array of functions with `on()`, it accepts any of the events from Inertia’s event callbacks (without the `on` prefix), specifically: `before`, `start`, `progress`, `success`, `error`, `cancel`, `cancelToken` and `finish`. The arguments passed to your callback are the Inertia event’s callback arguments and then FormKit's node:\n\n```html\n<script setup lang=\"ts\">\n  import { useForm } from '@formkit/inertia'\n\n  const form = useForm()\n  form.addon((on) => {\n    on('before', (visit, node) => {\n      return confirm('Are you sure you want to delete this user?')\n    })\n\n    on('success', (page, node) => {\n      toast('User deleted.')\n    })\n  })\n</script>\n```\n\nIf you need a single event callback `useForm()` also returns `on()` directly:\n\n```html\n<script setup lang=\"ts\">\n  import { useForm } from '@formkit/inertia'\n\n  const form = useForm()\n  form.on('before', (visit, node) => {\n    return confirm('Are you sure you want to delete this user?')\n  })\n</script>\n```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Roadmap\n\n- [x] Make the `success` and `error` events to be able to return a `Promise<void>` to delay the call to the `finish` event\n- [ ] Add support for [Laravel Precognition](https://laravel.com/docs/10.x/precognition)\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Types\n\n<details>\n  <summary><code>useForm</code></summary>\n\n```ts\nexport const useForm: <F extends RequestPayload>(initialFields?: F | undefined) => {\n  on: <T extends \"before\" | \"start\" | \"progress\" | \"finish\" | \"cancel\" | \"success\" | \"error\" | \"cancelToken\">(name: T, cb: EventCallback[T]) => void;\n  addon: (addons: AddonExtension | AddonExtension[]) => void;\n  plugin: (node: FormKitNode) => false | undefined;\n  node: Ref<FormKitNode | null>;\n  dirty: Ref<boolean | null>;\n  errors: Ref<boolean | null>;\n  valid: Ref<boolean | null>;\n  processing: Ref<boolean>;\n  progress: Ref<number>;\n  recentlySuccessful: Ref<boolean>;\n  wasSuccessful: Ref<boolean>;\n  submit: (method: Method, url: URL | string, options?: Exclude<VisitOptions, 'method' | 'data'>) => (data: F, node: FormKitNode) => void;\n  get: (url: URL | string, options?: Exclude<VisitOptions, 'method' | 'data'>) => (data: F, node: FormKitNode) => void;\n  post: (url: URL | string, options?: Exclude<VisitOptions, 'method' | 'data'>) => (data: F, node: FormKitNode) => void;\n  put: (url: URL | string, options?: Exclude<VisitOptions, 'method' | 'data'>) => (data: F, node: FormKitNode) => void;\n  patch: (url: URL | string, options?: Exclude<VisitOptions, 'method' | 'data'>) => (data: F, node: FormKitNode) => void;\n  delete: (url: URL | string, options?: Exclude<VisitOptions, 'method' | 'data'>) => (data: F, node: FormKitNode) => void;\n  cancel: () => void;\n}\n```\n\n</details>\n\n<details>\n  <summary><code>AddonExtension</code></summary>\n\n```ts\nexport type AddonExtension = (on: ReturnType<typeof createEventManager>['on']) => void;\n```\n\n</details>\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n","readmeFilename":"README.md"}