{"_id":"@capacitor-mlkit/digital-ink-recognition","_rev":"3-c89fe2beb430aabbc0e0ff3636672360","name":"@capacitor-mlkit/digital-ink-recognition","dist-tags":{"latest":"8.2.1"},"versions":{"8.1.0":{"name":"@capacitor-mlkit/digital-ink-recognition","version":"8.1.0","keywords":["capacitor","plugin","native"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"Apache-2.0","_id":"@capacitor-mlkit/digital-ink-recognition@8.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/digital-ink-recognition/","bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"dist":{"shasum":"5caf23883a3f1042a5ca450b24beb86d2402b3c0","tarball":"https://registry.npmjs.org/@capacitor-mlkit/digital-ink-recognition/-/digital-ink-recognition-8.1.0.tgz","fileCount":46,"integrity":"sha512-1hZ/9YBs2l+lTQSz5tmo3tRPy9RXWRSnHIFaEZsZpgp+tIyF17wTtJPNUKMinNlJivFqlgAHmVjEwoLr0cL5XQ==","signatures":[{"sig":"MEUCID1IaOuzfKjMCexYsEGRz64KYg25nOzHRtzaInb+k7UVAiEAx+LBReRcaZcIlrVNbt9EDLv4MP3oJaOgnL2NsYKk+Zo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107413},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"6557f01f9f882afd5a13dff597f7635009585822","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api DigitalInkRecognitionPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/capawesome-team/capacitor-mlkit.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin for ML Kit Digital Ink Recognition on Android and iOS.","directories":{},"_nodeVersion":"24.16.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/digital-ink-recognition_8.1.0_1783756910154_0.6400831816173194","host":"s3://npm-registry-packages-npm-production"}},"8.2.0":{"name":"@capacitor-mlkit/digital-ink-recognition","version":"8.2.0","keywords":["capacitor","plugin","native"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"Apache-2.0","_id":"@capacitor-mlkit/digital-ink-recognition@8.2.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/digital-ink-recognition/","bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"dist":{"shasum":"99e1e26e8f962040e27c891c17cf5d2e826edc31","tarball":"https://registry.npmjs.org/@capacitor-mlkit/digital-ink-recognition/-/digital-ink-recognition-8.2.0.tgz","fileCount":46,"integrity":"sha512-2emiygGiyQbCKA2vTicFnL5HoLXiEuhwHivnuJr2rkhXZhuclGAjDQVUfsAIdmifYksNhoVBHvE4JkLYhTAiNQ==","signatures":[{"sig":"MEUCIQDqoLPdp5+KHOvxDg8YB/2oJN8jutCsyEhIPaJIYfAiLgIgAMwWV421jJuwjjMAVSikJyeODc24dHUQABEUNHxju68=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capacitor-mlkit%2fdigital-ink-recognition@8.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":107567},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"b960e3339eb497476360d5a6b24bb993f3449ba8","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api DigitalInkRecognitionPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a4b9629c-f4c5-4e9b-81f8-9f36b76960a2"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/capawesome-team/capacitor-mlkit.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin for ML Kit Digital Ink Recognition on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/digital-ink-recognition_8.2.0_1784269871452_0.8955956657869857","host":"s3://npm-registry-packages-npm-production"}},"8.2.1":{"_id":"@capacitor-mlkit/digital-ink-recognition@8.2.1","bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"dist":{"shasum":"5e3f94c862370de2bf09c580e1561c11b9c358c9","tarball":"https://registry.npmjs.org/@capacitor-mlkit/digital-ink-recognition/-/digital-ink-recognition-8.2.1.tgz","fileCount":46,"integrity":"sha512-btQ0ZDEQKOEkm/CwaejjIPV2KqYmyJZPviDnO8S9sYeQN/UGkE6JTGfN5klSyOsTh5Pj5W0RiiYD/6EgqxTIiQ==","signatures":[{"sig":"MEUCIE8/+M3617RVtk/++ycb3s8dGyfOeq72k2bGcpvZ5elyAiEAiSquRO6t4BgURcL2XwxnPacnh/Mey+cRpwJJFJW82j8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCKU+XQW8Yc8lV3lJYDj9kLeztIZlgcmQe2ytPd31M7/wIgJ5vytSJPianpW6aMBjhxkn9MKIRV0eN4i+2ywP1Ov6c="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capacitor-mlkit%2fdigital-ink-recognition@8.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":107607},"main":"dist/plugin.cjs.js","name":"@capacitor-mlkit/digital-ink-recognition","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"0fcd1977cfb70d9c39d618680045cf01434aebf2","license":"Apache-2.0","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api DigitalInkRecognitionPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"version":"8.2.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a4b9629c-f4c5-4e9b-81f8-9f36b76960a2"}},"homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/digital-ink-recognition/","keywords":["capacitor","plugin","native"],"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/capawesome-team/capacitor-mlkit.git","type":"git"},"_npmVersion":"11.19.0","description":"Capacitor plugin for ML Kit Digital Ink Recognition on Android and iOS.","directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_nodeVersion":"24.20.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.62.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.5.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.9.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/digital-ink-recognition_8.2.1_1789015879159_0.5484145698165301"}}},"time":{"created":"2026-07-11T08:01:49.933Z","modified":"2026-09-10T04:51:19.650Z","8.1.0":"2026-07-11T08:01:50.303Z","8.2.0":"2026-07-17T06:31:11.597Z","8.2.1":"2026-09-10T04:51:19.249Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"Apache-2.0","homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/digital-ink-recognition/","keywords":["capacitor","plugin","native"],"repository":{"url":"git+https://github.com/capawesome-team/capacitor-mlkit.git","type":"git"},"description":"Capacitor plugin for ML Kit Digital Ink Recognition on Android and iOS.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor ML Kit Digital Ink Recognition Plugin\n\nUnofficial Capacitor plugin for [ML Kit Digital Ink Recognition](https://developers.google.com/ml-kit/vision/digital-ink-recognition).[^1]\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://cloud.capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Use Cases\n\nThe Digital Ink Recognition plugin recognizes handwritten text and hand-drawn shapes from stroke coordinates directly on the device, for example:\n\n- **Handwriting input**: Let users write text with their finger or a stylus instead of typing.\n- **Note taking**: Convert handwritten notes into digital text.\n- **Form filling**: Recognize handwritten input in signature or annotation fields.\n- **Sketch recognition**: Classify hand-drawn shapes and emojis with the special gesture models.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 8.x.x          | >=8.x.x           | Active support |\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to install the plugin.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```\nUse the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capacitor-mlkit/digital-ink-recognition` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capacitor-mlkit/digital-ink-recognition\nnpx cap sync\n```\n\n**Attention**: This plugin **only supports CocoaPods** for iOS dependency management. Swift Package Manager (SPM) is not supported for the ML Kit SDK, see [this comment](https://github.com/googlesamples/mlkit/issues/180#issuecomment-1298964099).\n\n### Android\n\n#### Variables\n\nIf needed, you can define the following project variable in your app’s `variables.gradle` file to change the default version of the dependency:\n\n- `$mlkitDigitalInkRecognitionVersion` version of `com.google.mlkit:digital-ink-recognition` (default: `19.0.0`)\n\nThis can be useful if you encounter dependency conflicts with other plugins in your project.\n\n### iOS\n\n#### Minimum Deployment Target\n\nMake sure to set the deployment target in your `ios/App/Podfile` to at least `15.5`:\n\n```ruby\nplatform :ios, '15.5'\n```\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Demo\n\nA working example can be found here: [robingenz/capacitor-mlkit-plugin-demo](https://github.com/robingenz/capacitor-mlkit-plugin-demo)\n\n## Usage\n\nBefore any ink can be recognized, the model for the desired language must be downloaded:\n\n```typescript\nimport { DigitalInkRecognition } from '@capacitor-mlkit/digital-ink-recognition';\n\nconst downloadModel = async () => {\n  await DigitalInkRecognition.downloadModel({\n    languageTag: 'en-US',\n  });\n};\n```\n\nThe plugin does not render anything. Capture the strokes with your own drawing surface, for example a canvas with pointer events:\n\n```typescript\nimport type { Stroke, StrokePoint } from '@capacitor-mlkit/digital-ink-recognition';\n\nconst canvas = document.querySelector('canvas');\n\nconst strokes: Stroke[] = [];\nlet currentPoints: StrokePoint[] | undefined;\n\ncanvas.addEventListener('pointerdown', event => {\n  currentPoints = [{ x: event.offsetX, y: event.offsetY, t: Date.now() }];\n});\ncanvas.addEventListener('pointermove', event => {\n  currentPoints?.push({ x: event.offsetX, y: event.offsetY, t: Date.now() });\n});\ncanvas.addEventListener('pointerup', event => {\n  if (currentPoints) {\n    currentPoints.push({ x: event.offsetX, y: event.offsetY, t: Date.now() });\n    strokes.push({ points: currentPoints });\n    currentPoints = undefined;\n  }\n});\n```\n\nFinally, pass the captured strokes to the `recognize(...)` method:\n\n```typescript\nconst recognize = async () => {\n  const { candidates } = await DigitalInkRecognition.recognize({\n    languageTag: 'en-US',\n    strokes,\n    writingArea: {\n      width: canvas.width,\n      height: canvas.height,\n    },\n  });\n  return candidates;\n};\n```\n\nBesides the language models, there are also special models for recognizing hand-drawn shapes (`zxx-Zsym-x-autodraw`) and emojis (`zxx-Zsym-x-emoji`).\n\n## API\n\n<docgen-index>\n\n* [`deleteDownloadedModel(...)`](#deletedownloadedmodel)\n* [`downloadModel(...)`](#downloadmodel)\n* [`getDownloadedModels()`](#getdownloadedmodels)\n* [`recognize(...)`](#recognize)\n* [Interfaces](#interfaces)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### deleteDownloadedModel(...)\n\n```typescript\ndeleteDownloadedModel(options: DeleteDownloadedModelOptions) => Promise<void>\n```\n\nDelete the downloaded model for the given language.\n\nOnly available on Android and iOS.\n\n| Param         | Type                                                                                  |\n| ------------- | ------------------------------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#deletedownloadedmodeloptions\">DeleteDownloadedModelOptions</a></code> |\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### downloadModel(...)\n\n```typescript\ndownloadModel(options: DownloadModelOptions) => Promise<void>\n```\n\nDownload a model for the given language.\n\nOnly available on Android and iOS.\n\n| Param         | Type                                                                  |\n| ------------- | --------------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#downloadmodeloptions\">DownloadModelOptions</a></code> |\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### getDownloadedModels()\n\n```typescript\ngetDownloadedModels() => Promise<GetDownloadedModelsResult>\n```\n\nGet the languages for which a model has been downloaded.\n\nOnly available on Android and iOS.\n\n**Returns:** <code>Promise&lt;<a href=\"#getdownloadedmodelsresult\">GetDownloadedModelsResult</a>&gt;</code>\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### recognize(...)\n\n```typescript\nrecognize(options: RecognizeOptions) => Promise<RecognizeResult>\n```\n\nRecognize the handwritten text or hand-drawn shapes in the given strokes.\n\nThe model for the given language must be downloaded before calling this method,\notherwise the call is rejected with the error code `MODEL_NOT_DOWNLOADED`.\n\nOnly available on Android and iOS.\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#recognizeoptions\">RecognizeOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#recognizeresult\">RecognizeResult</a>&gt;</code>\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### DeleteDownloadedModelOptions\n\n| Prop              | Type                | Description                                     | Since |\n| ----------------- | ------------------- | ----------------------------------------------- | ----- |\n| **`languageTag`** | <code>string</code> | The BCP-47 language tag of the model to delete. | 8.2.0 |\n\n\n#### DownloadModelOptions\n\n| Prop              | Type                | Description                                                                                                                                                                                                                                                                                    | Since |\n| ----------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`languageTag`** | <code>string</code> | The BCP-47 language tag of the model to download. See the [supported languages](https://developers.google.com/ml-kit/vision/digital-ink-recognition/base-models) for a list of available models. The special tag `zxx-Zsym-x-autodraw` identifies the model for recognizing hand-drawn shapes. | 8.2.0 |\n\n\n#### GetDownloadedModelsResult\n\n| Prop               | Type                  | Description                                        | Since |\n| ------------------ | --------------------- | -------------------------------------------------- | ----- |\n| **`languageTags`** | <code>string[]</code> | The BCP-47 language tags of the downloaded models. | 8.2.0 |\n\n\n#### RecognizeResult\n\n| Prop             | Type                                | Description                                               | Since |\n| ---------------- | ----------------------------------- | --------------------------------------------------------- | ----- |\n| **`candidates`** | <code>RecognitionCandidate[]</code> | The recognition candidates ordered by descending quality. | 8.2.0 |\n\n\n#### RecognitionCandidate\n\n| Prop        | Type                | Description                                                                                            | Since |\n| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------ | ----- |\n| **`text`**  | <code>string</code> | The recognized text.                                                                                   | 8.2.0 |\n| **`score`** | <code>number</code> | The score of the candidate. Lower scores indicate better results. The score is not set for all models. | 8.2.0 |\n\n\n#### RecognizeOptions\n\n| Prop                 | Type                                                | Description                                                                                                                                                                                         | Default        | Since |\n| -------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ----- |\n| **`languageTag`**    | <code>string</code>                                 | The BCP-47 language tag of the model to use for recognition.                                                                                                                                        |                | 8.2.0 |\n| **`strokes`**        | <code>Stroke[]</code>                               | The strokes to recognize.                                                                                                                                                                           |                | 8.2.0 |\n| **`maxResultCount`** | <code>number</code>                                 | The maximum number of recognition candidates to return.                                                                                                                                             | <code>5</code> | 8.2.0 |\n| **`preContext`**     | <code>string</code>                                 | The characters immediately preceding the strokes to improve recognition accuracy. A good rule of thumb is to provide as many characters as possible, up to around 20 characters (including spaces). |                | 8.2.0 |\n| **`writingArea`**    | <code><a href=\"#writingarea\">WritingArea</a></code> | The size of the writing area to improve recognition accuracy.                                                                                                                                       |                | 8.2.0 |\n\n\n#### Stroke\n\n| Prop         | Type                       | Description                                                        | Since |\n| ------------ | -------------------------- | ------------------------------------------------------------------ | ----- |\n| **`points`** | <code>StrokePoint[]</code> | The points of the stroke in the order in which they were captured. | 8.2.0 |\n\n\n#### StrokePoint\n\n| Prop    | Type                | Description                                                                                      | Since |\n| ------- | ------------------- | ------------------------------------------------------------------------------------------------ | ----- |\n| **`x`** | <code>number</code> | The horizontal coordinate of the point. Increases to the right.                                  | 8.2.0 |\n| **`y`** | <code>number</code> | The vertical coordinate of the point. Increases going downward.                                  | 8.2.0 |\n| **`t`** | <code>number</code> | The timestamp of the point in milliseconds. Providing a timestamp improves recognition accuracy. | 8.2.0 |\n\n\n#### WritingArea\n\n| Prop         | Type                | Description                                                                                           | Since |\n| ------------ | ------------------- | ----------------------------------------------------------------------------------------------------- | ----- |\n| **`width`**  | <code>number</code> | The width of the writing area. The unit must be the same as the one used for the stroke coordinates.  | 8.2.0 |\n| **`height`** | <code>number</code> | The height of the writing area. The unit must be the same as the one used for the stroke coordinates. | 8.2.0 |\n\n</docgen-api>\n\n## FAQ\n\n### Which platforms are supported by this plugin?\n\nThe plugin is available on Android and iOS. The recognition and model management methods are only available on Android and iOS, so there is no web implementation.\n\n### Which languages are supported?\n\nModels are available for [over 300 languages](https://developers.google.com/ml-kit/vision/digital-ink-recognition/base-models) identified by BCP-47 language tags. There are also special models for recognizing hand-drawn shapes (`zxx-Zsym-x-autodraw`) and emojis (`zxx-Zsym-x-emoji`).\n\n### Do I need to download a model?\n\nYes. A model must be downloaded for each language before it can be used with the `recognize(...)` method. If the model has not been downloaded yet, the call is rejected with the error code `MODEL_NOT_DOWNLOADED`.\n\n### How do I capture the strokes?\n\nThe plugin does not provide a drawing surface. Capture the pointer events on your own canvas and pass the collected strokes to the `recognize(...)` method (see [Usage](#usage)).\n\n### Can I install this plugin using Swift Package Manager?\n\nNo, this plugin only supports CocoaPods for iOS dependency management because the ML Kit SDK itself does not support Swift Package Manager. Also make sure to set the deployment target in your `ios/App/Podfile` to at least `15.5` (see [Installation](#installation)).\n\n## Related Plugins\n\n- [Translation](https://capawesome.io/docs/sdks/capacitor/mlkit/translation/): Translate the recognized text into other languages.\n- [Language Identification](https://capawesome.io/docs/sdks/capacitor/mlkit/language-identification/): Identify the language of the recognized text.\n\n## Terms & Privacy\n\nThis plugin uses the [Google ML Kit](https://developers.google.com/ml-kit):\n\n- [Terms & Privacy](https://developers.google.com/ml-kit/terms)\n- [Android Data Disclosure](https://developers.google.com/ml-kit/android-data-disclosure)\n- [iOS Data Disclosure](https://developers.google.com/ml-kit/ios-data-disclosure)\n\n## Newsletter\n\nStay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-mlkit/blob/main/packages/digital-ink-recognition/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-mlkit/blob/main/packages/digital-ink-recognition/LICENSE).\n\n[^1]: This project is not affiliated with, endorsed by, sponsored by, or approved by Google LLC or any of their affiliates or subsidiaries.\n","readmeFilename":"README.md"}