{"_id":"text-field-edit","_rev":"14-bce06e88879b58c10a46b390ee7ebc73","name":"text-field-edit","dist-tags":{"latest":"4.1.1","next":"3.0.0-0"},"versions":{"0.0.0":{"name":"text-field-edit","version":"0.0.0","description":"Insert text in a textarea and input[text] (supports Firefox and Undo, where possible)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","form","inject","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"license":"MIT","type":"module","module":"index.js","scripts":{"build":"tsc","prepare":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"extensions":["ts"],"overrides":[{"files":"**/*.ts","extends":"xo-typescript"}]},"devDependencies":{"@sindresorhus/tsconfig":"^0.3.0","@typescript-eslint/eslint-plugin":"^1.4.2","@typescript-eslint/parser":"^2.6.1","browserify":"^16.2.2","eslint-config-xo-typescript":"^0.9.0","esmify":"^2.1.1","npm-run-all":"^4.1.3","tape":"^4.10.1","tape-run":"^5.0.0","typescript":"^3.3.3333","xo":"*"},"gitHead":"ccef9a7035f6a083864e26ff831ac5d68df95f51","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@0.0.0","_nodeVersion":"13.8.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-OCg575rt5iTO+qT1xy0aTJafswlkhzsA59NifqdZO81uwf33hgUeQBy1PbfJ+qITFC/m8XOO2kjMolAH8thIHQ==","shasum":"3c4c6e128cfbdd7c136abe3f81db3dbf5bc4c7d2","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-0.0.0.tgz","fileCount":5,"unpackedSize":6685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeioRZCRA9TVsSAnZWagAA7LUP/j9gR4kotv1L2ah/3Y2Z\njJwT0d2prhYyIqgTX2ZvvXNPW69nqjgfat5csHpsEb0e2gquFCcAwIiQEalp\n8esYFC98mozYNqqKP3lXGoYheEgd1R9XGHK0Vc7YMvpY8GER1niJoNm5nY5y\nIe3XutN4uMaLpEVMpQDL9ZVCwafBYBo+ehp5sKyGIRt8wpbi0fI5c/xmsrc9\nrUiGC8iqlA4KPzR+j1sEIkvcLkYtEf4hFJGbS6FSrXpB4SN8nHBgM8XzBOea\nCQIQJcZ2KDuVneSxyf9Vj9+1vU5W7kP/YwOgY6XpVYBPxNlWOXRMbyncAlGY\nB/fW3oNTHoiMjteaspFEgqkC92yCM+mPaFwkMrUBLOvHk+AxGTL4zQp4CTvq\nFd4M7+knPmUUqh8WXeVvOVCDBsl3X9gIPYCM9YU3l0ZoI0Gd5wKWSn4K5WBo\n0cc/5Oj2hT/On5bQjfB06MaCk7KQE2nqWsXtVQ8dPNo50JfABt9vzRNlYkQp\nGUruuqyr+FAyn+s9p872uPPCFvXQzp5JZlNsqfPAvsHI2J5EHSd54pGdtXgK\n7+LY7n+HwzycxC78LHoodsXpzC7W9xRz7VryLbJIbJ8t9mdyqyV6SeHnNHVa\nrJdOR1iennFOBc3nluvO1stYYjDztNHS7t8ARwQwqCD9VpcEfiGs5Ugj1crt\nkGu3\r\n=cugP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHdcoT2aG2w8reSzlXqgGs364xzQ/tXFvmAKVtwjJ/AqAiEA55XqKFmhtaz33lKL8SzMjxSREE30ndoV/72ryAEsUhM="}]},"maintainers":[{"name":"bfred-it","email":"npm@bfred.it"}],"_npmUser":{"name":"bfred-it","email":"npm@bfred.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_0.0.0_1586136152562_0.8239074586116928"},"_hasShrinkwrap":false},"3.0.0-0":{"name":"text-field-edit","version":"3.0.0-0","description":"Insert text in a textarea and input[text] (supports Firefox and Undo, where possible)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","form","inject","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"license":"MIT","type":"module","module":"index.js","scripts":{"build":"tsc","prepare":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"extensions":["ts"],"overrides":[{"files":"**/*.ts","extends":"xo-typescript"}]},"devDependencies":{"@sindresorhus/tsconfig":"^0.3.0","@typescript-eslint/eslint-plugin":"^1.4.2","@typescript-eslint/parser":"^2.6.1","browserify":"^16.2.2","eslint-config-xo-typescript":"^0.9.0","esmify":"^2.1.1","npm-run-all":"^4.1.3","tape":"^4.10.1","tape-run":"^5.0.0","typescript":"^3.3.3333","xo":"*"},"readme":"# text-field-edit [![][badge-gzip]](#link-npm)\n\n  [badge-gzip]: https://img.shields.io/bundlephobia/minzip/text-field-edit.svg?label=gzipped\n  [link-npm]: https://www.npmjs.com/package/text-field-edit\n\n<img align=\"right\" width=\"360\" src=\"https://user-images.githubusercontent.com/1402241/55075820-e3645800-50ce-11e9-8591-9195c3cdfc8a.gif\">\n\n> Insert text in a `<textarea>` and `<input>` (supports Firefox and Undo, where possible)\n\nYou should use this instead of setting the `field.value` directly because:\n\n- it doesn't break the undo history (in supported browsers)\n- it fires an `input` event (with `event.inputType === 'insertText'`)\n- it's the most efficient way of adding/replacing selected text in a field\n- it's cross-browser (modern browsers)\n\nIt uses `document.execCommand('insertText')` in Chrome (which has **Undo** support) and it replicates its behavior in Firefox (without Undo support until [this bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1220696) is solved).\n\nIf you need IE support, use [insert-text-at-cursor](https://github.com/grassator/insert-text-at-cursor).\n\n## Install\n\nYou can just download the [standalone bundle](https://packd.fregante.now.sh/text-field-edit)\n\nOr use `npm`:\n\n```sh\nnpm install text-field-edit\n```\n\n```js\n// This module is only offered as a ES Module\nimport * as textFieldEdit from 'text-field-edit';\n```\n\n## Usage\n\nInsert text at the cursor, replacing any possible selected text, acting like a `paste` would:\n\n```js\nconst input = document.querySelector('input');\nconst button = document.querySelector('.js-add-signature');\nbutton.addEventListener(event => {\n\ttextFieldEdit.insert(input, 'Made by 🐝 with pollen.');\n});\n```\n\nThis will act like `field.value = 'New value'` but with **undo** support and by firing the `input` event:\n\n```js\nconst textarea = document.querySelector('textarea');\nconst resetButton = document.querySelector('.js-markdown-reset-field');\nresetButton.addEventListener(event => {\n\ttextFieldEdit.set(textarea, 'New value');\n});\n```\n\n## API\n\n### textFieldEdit.insert(field, text)\n\nInserts `text` at the cursor’s position, replacing any selection.\n\n```js\nconst field = document.querySelector('input[type=\"text\"]');\ntextFieldEdit.insert(field, '🥳');\n// Changes field's value from 'Party|' to 'Party🥳|' (where | is the cursor)\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement`\n\n#### text\n\nType: `string`\n\nThe text to insert at the cursor's position.\n\n### textFieldEdit.set(field, text)\n\nReplaces the entire content, equivalent to `field.value = 'New text!'` but with **undo** support and by firing the `input` event:\n\n```js\nconst textarea = document.querySelector('textarea');\ntextFieldEdit.set(textarea, 'New text!');\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement`\n\n#### text\n\nType: `string`\n\nThe new value that the field will have.\n\n### textFieldEdit.wrapSelection(field, wrappingText, endWrappingText?)\n\nAdds the `wrappingText` before and after field’s selection (or cursor). If `endWrappingText` is provided, it will be used instead of `wrappingText` at on the right.\n\n```js\nconst field = document.querySelector('textarea');\ntextFieldEdit.wrapSelection(field, '**');\n// Changes the field's value from 'I |love| gudeg' to 'I **|love|** gudeg' (where | marks the selected text)\n```\n\n```js\nconst field = document.querySelector('textarea');\ntextFieldEdit.wrapSelection(field, '(', ')');\n// Changes the field's value from '|almost| cool' to '(|almost|) cool' (where | marks the selected text)\n```\n\n### textFieldEdit.getSelection(field)\n\nUtility method to get the selected text in a field or an empty string if nothing is selected.\n\n```js\nconst field = document.querySelector('textarea');\ntextFieldEdit.getSelection(field);\n// => 'almost'\n// If the field's value is '|almost| cool' (where | marks the selected text)\n\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement`\n\n# Related\n\n- [indent-textarea](https://github.com/fregante/indent-textarea) - Add editor-like tab-to-indent functionality to `<textarea>`, in a few bytes. Uses this module.\n- [fit-textarea](https://github.com/fregante/fit-textarea) - Automatically expand a `<textarea>` to fit its content, in a few bytes.\n- [Refined GitHub](https://github.com/sindresorhus/refined-github) - Uses this module.\n","readmeFilename":"readme.md","gitHead":"ab65aac3b7c9046c3fd0ede16332856393eda838","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.0.0-0","_nodeVersion":"13.8.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-mVfqP1+mhFDwxCqqo2DtbOZy3r08OHTMtIhcmDq8jYXlSPOdIxp55hzFJxrHQt+0sNpgsxP/yECBXThR/ircIw==","shasum":"d8a5034183bd1180cc3d38b37af54da70b777b74","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.0.0-0.tgz","fileCount":5,"unpackedSize":9839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejH3NCRA9TVsSAnZWagAAY2wP/ArE0cG5rcRqi6TwDrZr\n+VjzYUWW+2A6Df0fp/O2azh8ovGdFqzWt69H4Q0GWXxp+DtbuNKCFyqzoBoy\nG79iwJsfS+EIrqqRr3PPdDd6ppnp6FIQKF/RjsPLOTbBKvDjEnCmLrQaVSMI\n8RJEO4XovSXCifJo7pR2Xe2QShL3vUkUbZkhD70q7dOa/cUt+Mz6fUo0spZ2\nmf+6eCgDFLMo7D+dVY2G+Kzjr2GV5bXv2nwvL+3kybA3bJxiM7U8W5oFexXn\njgsnqYJnHsKHXB+Hhm2Ip0KzvSy9EcmL7/8x4q+LjjAjT2Sx45gEaEfRYxQn\nY3kMZ/Pq+/DCboyEbwdWWyhuYukBWug+lMuX6PBtmlZlrlv8SDvHwdukmuSU\nHimfwU5n7oUdXDpAJCskeZhrrx6Iaa6VXiZ3ev5tsQyzzmiyJVLhXbIUfeHd\nu1O7hwOepL+XBZ6Gw7UnNz6oWfBshUcxuu7voGXh+uHYQL5ezb3fjkV6ZKvl\nJyTyneu/Hq+UM3e+DYjHiMXN1nXpiWmn7oIA4jbVNr5eRIJ1SrOp2vOvkaE5\niuwHk1Cy7i9YdtvF8EMGlgQK3nseM5YB3Pz5UGPv+jEEAQCXXdm90RKG13cO\nasYYiW9bfbTGSntz/V3sq5S8tvcZNV+6d5+FUBnhYBvBqVUz0zNoloZVEStL\n80Qg\r\n=n0bS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuMs7CPSyE+n8eADI+t5RjtvqRYsruo29z0mcEAUC8OwIgYwuftssntu43Nug2w21M5WCCjfNoUjUbJDhF1CySM04="}]},"maintainers":[{"name":"bfred-it","email":"npm@bfred.it"}],"_npmUser":{"name":"bfred-it","email":"npm@bfred.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.0.0-0_1586265549082_0.9019602677220406"},"_hasShrinkwrap":false},"3.0.0":{"name":"text-field-edit","version":"3.0.0","description":"Insert text in a <textarea> and <input> (supports Firefox and Undo, where possible)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"license":"MIT","type":"module","module":"index.js","scripts":{"build":"tsc","prepublishOnly":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"extensions":["ts"],"overrides":[{"files":"**/*.ts","extends":"xo-typescript"}]},"devDependencies":{"@sindresorhus/tsconfig":"^0.3.0","@typescript-eslint/eslint-plugin":"^1.4.2","@typescript-eslint/parser":"^2.6.1","browserify":"^16.2.2","eslint-config-xo-typescript":"^0.9.0","esmify":"^2.1.1","npm-run-all":"^4.1.3","tape":"^4.10.1","tape-run":"^5.0.0","typescript":"^3.3.3333","xo":"*"},"gitHead":"769732597d8a9c09c2d347c1edf51b48b5921073","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.0.0","_nodeVersion":"12.15.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-HTW0e9O10n+hrdvXbP252YM/S628tTU974wBC8sW+JU48vYxYZk+LWzDfXpOArr2ShC1FzDO/S+pBbJo1tqguA==","shasum":"58272615cc63262dad554325b774ff1d30628963","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.0.0.tgz","fileCount":5,"unpackedSize":9853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejRDCCRA9TVsSAnZWagAAiNsP+wd6z8JVgFWecx3P/O6K\nNdz/ApShOzU6ouTICxWTgYYTprtOAxiJnUfZ60XzqSZ5utWljjtAdLAHbXmu\nv/Mh9eOVzD2RaA3xcHJJp5Qi9sJPbyT4RN8u+rbLDgwWC37LYOZ+P76CsuC0\nfkl0qDBTdIotBpvu+/bIA3b3r724lxT/nhWApsuJvmEZk+GZrePTZhp8HJUT\nyHVc3srtfLlMXCfREnCoyTCYtOvkVmS2vLvxexX0gm06KOVFX0/gWuM08t8G\n2dsKqBDLr2nWahZlxRNTPcbvh1UpLSAu2W8bZ7oLFavdSPY3DbGRU4UK+Q7t\nvTWwFPpgaDhQLTZVdsdewdewQdpquQNkrCgO+kOK4TU8Y32b7U8nLEdtJX6m\npFYQ1fBVLkRPh9qgFS6tGblF9rmd5G/NLge/nUGbMsorhHUidjgTSjpbgdZB\nRvQ0o+uhkawBVeWZsHAU68SfrWS4OyjCF/wd7EUoWd/1X3Q+wxZuklrc+/VZ\njyY83lQ0F/m4SC0q4nYDQzLTbBRpyTAPTO9DCtB0uFTQNJZkQmaoiIuAVY5d\n6R/2QIbKUsLlglsbR5xElTmckbA9s7pyzbIwaLoVXx2USDldQq13hFzTVTZ7\nz5mtos5lnki03de3g2tPZFJY3typpE58A3iPyDcafT2ffaxkCb9uTZwyNCD5\nkpGP\r\n=Qth+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGeIs5wUrLqjhWORUinZo18QSxUb7B1Jnvn2yg5XlCT5AiEAy1vxc3ONJ6oXYTfz+hDSeW8jDcIEQmxP01nbbMYu82A="}]},"maintainers":[{"name":"bfred-it","email":"npm@bfred.it"}],"_npmUser":{"name":"bfred-it","email":"npm@bfred.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.0.0_1586303169970_0.3098831453802393"},"_hasShrinkwrap":false},"3.0.1":{"name":"text-field-edit","version":"3.0.1","description":"Insert text in a <textarea> and <input> (supports Firefox and Undo, where possible)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"license":"MIT","type":"module","module":"index.js","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"rules":{"@typescript-eslint/prefer-nullish-coalescing":"off"}},"devDependencies":{"@sindresorhus/tsconfig":"^0.7.0","browserify":"^16.5.1","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.0.0","tape-run":"^7.0.0","typescript":"^3.8.3","xo":"*"},"gitHead":"f5eae465803b463d0cb7e14250827ed3824457cc","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.0.1","_nodeVersion":"12.15.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Z/PUlQPryn/6YtQnyt8ekeaSp1NdVxn5PnNZF+vhuahJzINBVT8OA3ZjVpcMaj2BoG2y0ENYPctYN6ZzPnpL/A==","shasum":"5345d240e96cc26e45a77deace13c53e286967fe","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.0.1.tgz","fileCount":5,"unpackedSize":9665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqwvoCRA9TVsSAnZWagAAmhYQAIGoEfK1L8194Jly1WKl\nE2QADIR+NYRBmaUIaiOfhLvwcWN++Cm377D9mYEi+4Gp8w7MMYwoqhWA2Okb\nhLFr/cueHHcEWJEFj1CN+w7kf1I87uqBPvPcy93vOTe2NXBY9PZHfzmNGRYB\nouPFDCvhUVIdW/9eGB9wlI5k2RCEQrz8YLBQHiqP4rtcfggPnh6yLkgKKGAT\nVKq/TFKflw3+RZ6ZLvZg6THU9V/LgBTdNwG3JxD/0jgVFNtleVp7dwnztffO\nY90aFHYGpUnmTgYccyOVdmcOjSTudcxZ9oR1JUTv2lDlan2UaGIBzf1sxOzz\n+ScrcLpKQC2ILEwG4zvTrJCvDulO2Lhtl6bCwP/GyAGq/XbrU01vJ+4H8Uhm\ncl2hmS7nRFgFhhk83KeafEzuXscl5zYy6Kuey3ZP+04mdwIFAcp7lxCh0sYo\nl8Y5fmPJWJo9iwTNwTUMsPeF1U8ms1008drrvTViXYngGTqtqIYAUBaXNrNQ\nt9hVOoo0jbx2APFBV5ROq7wPtLNFVEYxHJXKW4EVKhef6OeAbJnKcF3mRKtS\nesPc16NB02BIeHOkxmZX3dsOeH09kl6dP6Av8MXFviAqA0yWM32SUujqavqE\n919hM9g1MUp4OpCaDxAU4NyjT1/pLTLdDlwGShUhRyXxaN5ezVFRQvqtVvdp\nvDhv\r\n=HM+V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeYZcdwEJP7WNvn7iPsBH0ztE9usCVjbF71iXImax5FgIgIcnCUpb2G/a4xSE0AbxqFAevYd0Zx9vKufkZtd7Q7fI="}]},"maintainers":[{"name":"bfred-it","email":"npm@bfred.it"}],"_npmUser":{"name":"bfred-it","email":"npm@bfred.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.0.1_1588268007726_0.2781317596565087"},"_hasShrinkwrap":false},"3.1.0":{"name":"text-field-edit","version":"3.1.0","description":"Insert text in a <textarea> and <input> (supports Firefox and Undo, where possible)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"license":"MIT","type":"module","module":"index.js","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"rules":{"@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-readonly-parameter-types":"off"}},"devDependencies":{"@sindresorhus/tsconfig":"^0.7.0","browserify":"^16.5.1","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.0.0","tape-run":"^7.0.0","typescript":"^3.8.3","xo":"^0.30.0"},"gitHead":"840295c9a50f7ec663745ed2d6e0dfca0e51e326","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.1.0","_nodeVersion":"13.8.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-4mVLiSRR5/p0Zhdl8QkjkUeYUDMSQSYdKsEgR6uOySjcc6QB/O2hzuUlxepL2kQQL0NrpYiI6Ywj6TZULYI9/w==","shasum":"f02ea723192f1e164c437b9b6fec296ea89eaddc","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.1.0.tgz","fileCount":5,"unpackedSize":12353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewFRbCRA9TVsSAnZWagAAKa4P/RwkI88NkvDxmpUyZyXU\nkW4fcKryhxegipZQxUMns396IHA5ZYm2hPbpJnVDxEkMsqU3/+GUEbAhPodc\nIjsfObZmpftyBodNWY90BH17trXv8u0Ka6BOYsjeFlhPZtZbiDOFJRw+5jSP\nJzCgc4w9wnP5SIoJkRkaQM7Syp0lB/eRagQdlolVBZpyfV29mOx3/WYOn5nQ\ngykOSWYUmesqN8zCVnRENDUPBQ4sChKOt1/svFVjKYxecetsyu1Q6YnFSSN0\njSNgdrQWOnCJGysvL8WjnwBwS0wIhRsrHX7zcA0LUnriar+O5W4nE3vdbE9Q\n3XeeqbhzolMiCh6drwm9pUz4AUcKFYn9toNvDbOkx7HLbi+px3SkhtaEfFT2\nHu7u4gjWglwTQPjqTiKuX98S4SDwMveolRpUd9sfwxRU0R08LREenOQs2GiH\n+LoivKntznHjUfHzBQq1XCUF59tU2zaWjoScHjsVwwNzbPpuFWtzOm5BTOjV\nk/kpSHddKJkrxe8/P7REKkZ7x782iBS0maK5/xNyfuQVSNjwdko2Z8SCcaFy\nbud949zC4qkq3KpoV6UTiPpwUX5MMy7Ncd0DjMciVuNijrG4tMgu6iXRQrku\nAVsSNIy4JxTuF42fJMSRjnPrSkTnMp6Y/9dfrp9elcjiTOt6v5nNArYAXl+f\ndNNC\r\n=9End\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFM6MhO7dQOVAky6yct42+ByicF+oL2QtaqNSKaSs7lSAiBdpGSSUe+lXGSASvxkoUAuCJuojdKytd142YHC9C7GQg=="}]},"maintainers":[{"name":"bfred-it","email":"npm@bfred.it"}],"_npmUser":{"name":"bfred-it","email":"npm@bfred.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.1.0_1589662810584_0.9196450063918098"},"_hasShrinkwrap":false},"3.1.1":{"name":"text-field-edit","version":"3.1.1","description":"Insert text in a `<textarea>` and `<input>` (including Undo in most browsers)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"license":"MIT","type":"module","module":"index.js","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"rules":{"@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-readonly-parameter-types":"off"}},"devDependencies":{"@sindresorhus/tsconfig":"^2.0.0","browserify":"^17.0.0","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.3.1","tape-run":"^9.0.0","typescript":"^4.4.2","xo":"^0.44.0"},"gitHead":"17074dd905ca57cd8d6658ef721baa94f5ba2d2e","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.1.1","_nodeVersion":"16.4.2","_npmVersion":"7.18.1","dist":{"integrity":"sha512-Ho+H/NHZhW0qK/CXQknrMOhHcNS4Jzs1NjhkZNi+nYa1+MS66Yc04qJeooGkHUzWdQDtNES5IYKxIbYIqmylLw==","shasum":"a32b2ab8e75a30309e15a24d687043f6a692bf8a","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.1.1.tgz","fileCount":5,"unpackedSize":12139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNlCUCRA9TVsSAnZWagAAAy0P/iHuNk/JbcfikBzcp1Ji\nKH/ioxNN4yAO0H0AxVLtPy0cE5PwNHh24DqX/92xi7s/hHQxYd5egwG4W6Bu\nYewkSRLchTgrtBQD9bIxnkQEbdfr3FitcMVfludDhz40lR1ODrvb8UXBM3Dl\nROpj+jQeb9+ttthClo6IqGSKgGLg2EPAcOEHyHUrECU9vq9HLmslNS4tMreW\nLFOLrTJ1Ct9qxM9NC2QzCfZazmO/3KdwG5g2JKX8ycpLefq1fLuZjBsfZoYW\nZ/lyufTYp+VFbLUd1QyxRl0CKw+VWVSuvG9A1t8JDMJ9cdK1mwm7xXkIeaS1\ngICeaWnKZmks0LmJ593OhTp4kqN/lypY45J9isJcr5Mxc9Tv/9nV+GkJZQ1d\nntWh1H94hi4pdH8lAChitop4N2HKRsMESC3acr6lBqjTGY2sCprh4fRSHGl/\nd/XLxSWowEIvF/fznQr4yFFs6/nx15LGvZRuDbXRp0uLtFmrkb9BINC7XMUz\nQiPm/e2I4T3v5Qm1BeFjOwHYFQ160ZdCpMsiobenKJHQEoO1eXGExxqq/ToI\npSTToAMk/2LCSoaJn15a/i6dQN7fQUNjhRztzJDvQA9h5gWLYjVfVTl1bjLs\ndgiAbb36qPKOJCp8kmAY4iEMZqUfuHwPcxPKlzgRlK3CldYP0v+Ts2wix9Lh\nsqEu\r\n=2yM9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+zJjVDOzx0ZfIAsBnFB/9XgojBbXCzt3O5NCyK1NF2AIhAJl+flAwBkYj6gSCh9BTSfuFIB0WP/bS2twI2LF5JGh9"}]},"_npmUser":{"name":"fregante","email":"opensource@bfred.it"},"directories":{},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.1.1_1630949524405_0.24275390706312105"},"_hasShrinkwrap":false},"3.1.2022":{"name":"text-field-edit","version":"3.1.2022","description":"Insert text in a `<textarea>` and `<input>` (including Undo in most browsers)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"funding":"https://github.com/sponsors/fregante","license":"MIT","author":{"name":"Federico Brigante","email":"me@fregante.com","url":"https://fregante.com"},"sideEffects":false,"type":"module","main":"index.js","module":"index.js","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"rules":{"@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-readonly-parameter-types":"off"}},"devDependencies":{"@sindresorhus/tsconfig":"^2.0.0","browserify":"^17.0.0","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.4.0","tape-run":"^9.0.0","typescript":"^4.5.4","xo":"^0.47.0"},"types":"./index.d.ts","gitHead":"dbcf5d7d32fad3970f88ecb2af97799636e20216","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.1.2022","_nodeVersion":"16.4.2","_npmVersion":"8.1.4","dist":{"integrity":"sha512-F1S4Uwwq3VBANpGPDiovTrVM8aLBndh1kx3nXeV6jcAA033Xo3OzI9BgBsbsbwuJ2A/GtMNuN1R0Sr/e1Q8zDw==","shasum":"d23e109879ca410adcf85f861f89fb7db480a377","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.1.2022.tgz","fileCount":5,"unpackedSize":12311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh16unCRA9TVsSAnZWagAA6PMP/1jVQ8fo6K6DYVy1YO9I\n3w++SuXDIGb8hsdqAiYsWdkeukVu0hj3gbfdsyOC2WXVIJnHNUXb9oNvlDQj\nE6vWJf7rp7NZKuliDgaeEV/Ym4XMhJxjvWaqlxGtCoa0NW5+GmPuSX7LoOaq\nkpm0hHbMgCKGwAfyq6m1JT0jhKNeeboI3V3YBu7UYkMGe2JZM/RXKz5x9QDP\nmxHJKVO59yGkfy5YIGTTSIppJILVC4CVqpiAoDp+UCmwA0a2BxuryW6zYZ8Q\nF0JcwtstwZqQnTMxXC2EPyQW6ug+E7PcC2bKDjEy+eMVy2/t08aP9fuO5ivy\nwgARclQTerHL1j5k8xYYlOsS8sWKi5/uWFwYZIcXOpoxUFd/Z8zgoI5a7+AT\nq4sl+6uUlyVjJ/HPH3Fnt6m+8xxHUn7VZ1KEFcQTLt7DS7IUt9v0el1Oj6k6\no+TqIFxY4jNysxleGJbJGE27ynWv8bHZ3GY/+CM3sSnhE8gHIauupHt21faY\ngSXy7Lcff1/8Kvvp7V2gtVf63MTnUFRLJAsA70rBEgZte4fSw0dbfj6CTds6\nyFfMw7qTMfD+RsZ2bdCfZ5xKezPj54nRUmIvURJHOlgL30vVr/kgxv+yx4AV\nl8JdNyJmN04hot5DyYJKnxv++jRgjtxSI0oAmHPwy34GDOFtzxaBvwBhlGyz\nkFI1\r\n=GZf7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMMbjxATOo8+aZFP4IKrPqS/QeeIa2hKr267BITt8gywIgdiCw1Dht3Zhw9Xu1vPWm2KDEVjDIcEI47xga+k0Iq90="}]},"_npmUser":{"name":"fregante","email":"opensource@bfred.it"},"directories":{},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.1.2022_1641524134998_0.7803200285746588"},"_hasShrinkwrap":false},"3.1.9001":{"name":"text-field-edit","version":"3.1.9001","description":"Insert text in a `<textarea>` and `<input>` (including Undo in most browsers)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"funding":"https://github.com/sponsors/fregante","license":"MIT","author":{"name":"Federico Brigante","email":"me@fregante.com","url":"https://fregante.com"},"sideEffects":false,"type":"module","main":"index.js","module":"index.js","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"rules":{"@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-readonly-parameter-types":"off"}},"devDependencies":{"@sindresorhus/tsconfig":"^2.0.0","browserify":"^17.0.0","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.4.0","tape-run":"^9.0.0","typescript":"^4.5.4","xo":"^0.47.0"},"types":"./index.d.ts","gitHead":"7f26e5a5fb69e1e621b9fa14c1b17387df4afb05","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.1.9001","_nodeVersion":"16.4.2","_npmVersion":"8.1.4","dist":{"integrity":"sha512-5xSqH9HMiW4r/YDoz/DMX895elwenTCV/xwjGSmhVol62YFTHivbZi3T0jKm0Oyzj63RA2C0XAnWMQSC0SO/JA==","shasum":"479bbc6ed4c5a1dd721118daf9b13fd785cda257","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.1.9001.tgz","fileCount":5,"unpackedSize":12511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKDhgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoo0A//RoyZfk2HVrqzte53QefWWNYQl/ePhyh9Fe5MU0xRtnhAoSoO\r\nSqBYyqX+Zd7wsxHLaYMcimb7sSjhhys9IpFOJfMKUt2Ik1El+KVhsAwewk/H\r\nJmDjHnq6A2ljhM0XW8fkYelNmjRU99a9i4uPfKPZrr3Av6z5WM2KENDzE7Y+\r\ntoFJtKN04+gBQ4Hbhz85Ds2QckxnXC24NZym6pQ3M0fbduPa+SEP0DVY+ZtG\r\nh/D0EK1nXrasCxavg96Q8KsDBVyhjKcR5Q5qPpBqvV49vlxLiEM4oDadMapO\r\nkLmdfB3K5nJQc6jpYiBqiZWxEjt+3LV05qys5WHP0haDmdRs9k5N631nAe5N\r\nALJAvfjuVpj+lDR8z943HcP22nIgC9kS5qx8CHdJpYCvxVmoqdRPE+QxQ8S0\r\n5FLXnlRtkt1knV8qpUlhBO4vE4FbZD6zEw1bvqDWRb3kSjaPrs1cR/uXbg3A\r\npqZnNyuy/wCZ0ScUrgK9BBJPjz29mtlJ1g2MEa/FfwmN1kQ2r9C0DWQK6ibE\r\nAgCx1qXQ54Hs3ZtPc9rTc8w2Y/5lvVzVJhrI7RGFwv4zUm+PIZi7PY0msy+m\r\ngGTtAb6wJNsNorPwTcTEemkORWkG7wQH2G4FRDl/IR3OUedU4/Yrw0lbGWax\r\nNHw89fajVkAr1oAdvJ7nWfndNFdFrosI3AM=\r\n=KuAf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBMzkKeweNEDpZOSxI1CrFxPvEMD5RFYSML1/Dz4FyPOAiEA9aRKergHby/FPOmNkFq/5MYF7SNV6svW2d6rYA68Lkk="}]},"_npmUser":{"name":"fregante","email":"opensource@bfred.it"},"directories":{},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.1.9001_1646803039753_0.515334738779984"},"_hasShrinkwrap":false},"3.2.0":{"name":"text-field-edit","version":"3.2.0","description":"Insert text in a `<textarea>` and `<input>` (including Undo in most browsers)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"funding":"https://github.com/sponsors/fregante","license":"MIT","author":{"name":"Federico Brigante","email":"me@fregante.com","url":"https://fregante.com"},"sideEffects":false,"type":"module","main":"index.js","module":"index.js","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"rules":{"@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-readonly-parameter-types":"off"}},"devDependencies":{"@sindresorhus/tsconfig":"^3.0.1","browserify":"^17.0.0","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.6.1","tape-run":"^10.0.0","typescript":"^4.9.3","xo":"^0.53.0"},"types":"./index.d.ts","gitHead":"5ddea4404843a01d31d2ed0e1b5db77bcccd055b","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@3.2.0","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-HVgVoOMAIgsXFsGuzkghk0NQPO8DrfNeHtRSbKEUQAkLOeY+Mb2ofK/AGZByxObPNo3vqODyghl+9VXUjHypig==","shasum":"677f5b3a7cd220d37f6f1b85c51850f60d9da871","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-3.2.0.tgz","fileCount":5,"unpackedSize":12653,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDRyaR7wWISJLFNqbuTSJyc9bqhAaGEJALqFNab15WlXAiBSU7PherjH6M/AAwAeVmkZ/I1cId6D89VyjNeYpOhfDQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeyPhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMwA/+MRK2XpvXNU46IKaCQP9jQORx/aeFSEdwY8Rhv4HYk5Mb7h+5\r\npZ0o9AywJuyS7hkxsOMZzaJs0mqGOX4mXZzCCwpkQ8TptmYgRlO3ZTjmf3Ji\r\n2L61W0CG/38hRXGc/EILtzVddcX+3jmlokaX1p5zhEKN/FnTcm/1aIvXfOhP\r\nPn+RhIxgbwV253o+F8sKVqXphps8opKnw0cA28PBy8zF8oJ64gMp28ixFr18\r\nUrGAVw9exi70CYK/11hP4j+2EY6XYkpXPtq1WxLPbp1yDolTK506Zd5UgMxr\r\nFLGtoZVglpoKdkdNWkeQvGNRbMXw0hIBzI/759yAVKIUQ5ic+rWhw7maeW/v\r\nkQtu23Q5v2ktjQEIuV8KgB8b2iTvNlZEh4QGYh5Hf44SN6HvVmcBcS0Yqilq\r\nAk4r/gtg4oosz+YaZP3Gr9Iac4bMOx1ektADKGVALAfdUF5EoHRoZRkQS4TW\r\nluSw8CflYWmqZPMaUOydvxexWMemREn54SO27617+3DsCF3IkFeQiwGhkORh\r\nktFdSp5hDme8uvC6hn/NoSdxERG6DpLqTP0g7P8G3SCdqHVq2MgTaAqu4Rzv\r\nkc37hazYjMFwxmswNRzUaLLa14QW93mlkpPMms3eQlt7RfSm3fZuD0LZdV+5\r\nWPsa152lMHlfuk8LSrbtmHFPp5KoTO+4V3M=\r\n=+t0/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"fregante","email":"opensource@bfred.it"},"directories":{},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_3.2.0_1669014497487_0.8297584949655465"},"_hasShrinkwrap":false},"4.0.0":{"name":"text-field-edit","version":"4.0.0","description":"Insert text in a `<textarea>` and `<input>` (including Undo in most browsers)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"funding":"https://github.com/sponsors/fregante","license":"MIT","author":{"name":"Federico Brigante","email":"me@fregante.com","url":"https://fregante.com"},"sideEffects":false,"type":"module","exports":"./index.js","main":"./index.js","types":"./index.d.ts","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch"},"xo":{"envs":["browser"],"rules":{"@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-readonly-parameter-types":"off"}},"devDependencies":{"@sindresorhus/tsconfig":"^4.0.0","browserify":"^17.0.0","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.6.6","tape-run":"^10.0.0","typescript":"^5.2.2","xo":"^0.56.0"},"engines":{"node":">=18"},"gitHead":"e07b88a779468cabc1def4fca8a1ebb9c0d2bede","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_id":"text-field-edit@4.0.0","_nodeVersion":"20.1.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-m6TZTY9UkPP2wcXOtvqFebGakfVNbrJIzk7bCC3p2YJfyb6gKy2jN3NIpDD6FN/On9yiqSGfOy7fvxDx1+U3/Q==","shasum":"e9c97edaf7a92c1f389bd87b4c91ede99f842c8e","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-4.0.0.tgz","fileCount":5,"unpackedSize":13883,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUvzNfxVSivqLk827UxHKn0CDXFmmCFYCghXvxW24lVAiBswWOZ8UHmGoWalfCSRbiTgP+vn9lO029f42YAWygGZQ=="}]},"_npmUser":{"name":"fregante","email":"opensource@bfred.it"},"directories":{},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_4.0.0_1694080696186_0.500410357223033"},"_hasShrinkwrap":false},"4.1.0":{"name":"text-field-edit","version":"4.1.0","description":"Insert text in a `<textarea>` and `<input>` (including Undo in most browsers)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"funding":"https://github.com/sponsors/fregante","license":"MIT","author":{"name":"Federico Brigante","email":"me@fregante.com","url":"https://fregante.com"},"sideEffects":false,"type":"module","exports":"./index.js","main":"./index.js","types":"./index.d.ts","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify index.test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify index.test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch --noEmitOnError false"},"xo":{"envs":["browser"]},"devDependencies":{"@sindresorhus/tsconfig":"^5.0.0","@types/tape":"^5.6.4","browserify":"^17.0.0","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.7.5","tape-run":"^11.0.0","typescript":"^5.3.3","xo":"^0.57.0"},"engines":{"node":">=18"},"_id":"text-field-edit@4.1.0","gitHead":"d8498d044d7e72885178a7cdb04365691ad8730e","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-zT+AlfeyVUzJytyzmJJawsJB4QVidzJRIXn7ZE1p6tIglH0BYVaTF6uHaKrXO6AFP3gN2M3ok3UAXdFWrfzSNQ==","shasum":"867a095267fd5cad2df01707fd7107d4f687c069","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-4.1.0.tgz","fileCount":5,"unpackedSize":16771,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9qk/EpAMIJzz0y7npnYMybvOJaru8/qyrjbnfcu8kpwIgXrrKevNUVsfnuQQ8qiiRXGorRMI5zBjyM9Ly0suk/Fc="}]},"_npmUser":{"name":"fregante","email":"opensource@bfred.it"},"directories":{},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_4.1.0_1708623014949_0.40464715043937005"},"_hasShrinkwrap":false},"4.1.1":{"name":"text-field-edit","version":"4.1.1","description":"Insert text in a `<textarea>`, `<input>` and `contenteditable` elements (including Undo support)","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","content editable","paste","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"funding":"https://github.com/sponsors/fregante","license":"MIT","author":{"name":"Federico Brigante","email":"me@fregante.com","url":"https://fregante.com"},"sideEffects":false,"type":"module","exports":"./index.js","main":"./index.js","types":"./index.d.ts","scripts":{"build":"tsc","prepack":"tsc --sourceMap false","test":"npm-run-all --silent build --parallel test:*","test:blink":"browserify -p esmify index.test.js | tape-run --browser chrome","test:gecko":"browserify -p esmify index.test.js | tape-run --browser firefox","test:lint":"xo","watch":"tsc --watch --noEmitOnError false"},"xo":{"envs":["browser"]},"devDependencies":{"@sindresorhus/tsconfig":"^5.0.0","@types/tape":"^5.6.4","browserify":"^17.0.0","esmify":"^2.1.1","npm-run-all":"^4.1.5","tape":"^5.7.5","tape-run":"^11.0.0","typescript":"^5.3.3","xo":"^0.57.0"},"engines":{"node":">=18"},"_id":"text-field-edit@4.1.1","gitHead":"dce0e168106cfe5541fd07cc53da3dd1e00a2bd0","bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"homepage":"https://github.com/fregante/text-field-edit#readme","_nodeVersion":"20.5.1","_npmVersion":"10.2.5","dist":{"integrity":"sha512-bgvsU5CFdBm8YuDdpLALNqS7Th8bVaRD5cww9VMYaBYab324iN3XOXvuQxTxp9JSPhHHF6zGCDEyF08JUV2hPw==","shasum":"a0c69b954ab1d1c8e46b0cc484480ef07d1107d6","tarball":"https://registry.npmjs.org/text-field-edit/-/text-field-edit-4.1.1.tgz","fileCount":5,"unpackedSize":17029,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTeKJ2825opy+HOz0vQ0zM+0Xt6oGQz1zFcey2gpK58AIgA2lrfYfAdtIGCxbTSgSf5mlkGqOXlIijPZfYjf+3jMU="}]},"_npmUser":{"name":"fregante","email":"opensource@bfred.it"},"directories":{},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-field-edit_4.1.1_1709860466639_0.9839703636799955"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-06T01:22:32.562Z","0.0.0":"2020-04-06T01:22:32.682Z","modified":"2024-03-08T01:14:27.511Z","3.0.0-0":"2020-04-07T13:19:09.239Z","3.0.0":"2020-04-07T23:46:10.092Z","3.0.1":"2020-04-30T17:33:27.867Z","3.1.0":"2020-05-16T21:00:10.760Z","3.1.1":"2021-09-06T17:32:04.545Z","3.1.2022":"2022-01-07T02:55:35.323Z","3.1.9001":"2022-03-09T05:17:20.099Z","3.2.0":"2022-11-21T07:08:17.643Z","4.0.0":"2023-09-07T09:58:16.351Z","4.1.0":"2024-02-22T17:30:15.344Z","4.1.1":"2024-03-08T01:14:26.852Z"},"maintainers":[{"name":"fregante","email":"opensource@bfred.it"}],"description":"Insert text in a `<textarea>`, `<input>` and `contenteditable` elements (including Undo support)","homepage":"https://github.com/fregante/text-field-edit#readme","keywords":["at cursor","cross-browser","document","dom","editor","execCommand","field","firefox","safari","content editable","paste","form","inject","event","inserttext","manipulation","text area"],"repository":{"type":"git","url":"git+https://github.com/fregante/text-field-edit.git"},"bugs":{"url":"https://github.com/fregante/text-field-edit/issues"},"license":"MIT","readme":"# text-field-edit [![][badge-gzip]](#link-npm)\n\n[badge-gzip]: https://img.shields.io/bundlephobia/minzip/text-field-edit.svg?label=gzipped\n[link-npm]: https://www.npmjs.com/package/text-field-edit\n\n<img align=\"right\" width=\"360\" src=\"https://user-images.githubusercontent.com/1402241/55075820-e3645800-50ce-11e9-8591-9195c3cdfc8a.gif\">\n\n> Insert text in a `<textarea>`, `<input>` and `contenteditable` (including Undo support)\n\nYou should use this instead of setting the `field.value` directly because:\n\n- it doesn't break the undo history\n- it fires an `input` event (with `event.inputType === 'insertText'`)\n- it's the most efficient way of adding/replacing selected text in a field\n- it's cross-browser (modern browsers)\n\nIt uses `document.execCommand('insertText')` under the hood and it automatically focuses/blurs the field you pass.\n\n## Install\n\nYou can download the [standalone bundle](https://bundle.fregante.com/?pkg=text-field-edit)\n\nOr use `npm`:\n\n```sh\nnpm install text-field-edit\n```\n\n```js\nimport textFieldEdit from 'text-field-edit';\n\n// Alternatively only import the specific methods\nimport {\n\tinsertTextIntoField,\n\tsetFieldText,\n\tgetFieldSelection,\n\twrapFieldSelection,\n\treplaceFieldText,\n} from 'text-field-edit';\n```\n\n## Usage\n\nInsert text at the cursor, replacing any possible selected text, acting like a `paste` would:\n\n```js\nconst input = document.querySelector('input');\nconst button = document.querySelector('.js-add-signature');\nbutton.addEventListener(event => {\n\ttextFieldEdit.insert(input, 'Made by 🐝 with pollen.');\n});\n```\n\nThis will act like `field.value = 'New value'` but with **undo** support and by firing the `input` event:\n\n```js\nconst textarea = document.querySelector('textarea');\nconst resetButton = document.querySelector('.js-markdown-reset-field');\nresetButton.addEventListener(event => {\n\ttextFieldEdit.set(textarea, 'New value');\n});\n```\n\n## API\n\n### textFieldEdit.insert(field, text)\n\nInserts `text` at the cursor’s position, replacing any selection.\n\n```js\nconst field = document.querySelector('input[type=\"text\"]');\ntextFieldEdit.insert(field, '🥳');\n// Changes field's value from 'Party|' to 'Party🥳|' (where | is the cursor)\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement` or any `contenteditable` element\n\n#### text\n\nType: `string`\n\nThe text to insert at the cursor's position.\n\n### textFieldEdit.set(field, text)\n\nReplaces the entire content, equivalent to `field.value = 'New text!'` but with **undo** support and by firing the `input` event:\n\n```js\nconst textarea = document.querySelector('textarea');\ntextFieldEdit.set(textarea, 'New text!');\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement` or any `contenteditable` element\n\n#### text\n\nType: `string`\n\nThe new value that the field will have.\n\n### textFieldEdit.replace(field, searchValue, replacement)\n\nFinds and replaces strings and regular expressions in the field’s value, like `field.value = field.value.replace()` but leaves the last replacement selected like a text editor would.\n\nSimilar to [String#replace](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)\n\n```js\nconst textarea = document.querySelector('textarea');\ntextarea.value = 'Hello world';\ntextFieldEdit.replace(textarea, 'Hello', 'Ciao');\n// Changes field's value from 'Hello world' to '|Ciao| world' (where | marks the selected text)\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement` (not available on `contenteditable`)\n\n#### searchValue\n\nType: `string | RegExp`\n\nThe text to replace in the field’s value.\n\n#### replacement\n\nType: `string | function`\n\nThe text that will replace `searchValue` or a callback function that matches [the signature in `String#replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter).\n\n**Note**: replacement patterns (`replace(field, /hello (world)/, 'ciao $1')`) aren't supported.\n\n### textFieldEdit.wrapSelection(field, wrappingText, endWrappingText?)\n\nAdds the `wrappingText` before and after field’s selection (or cursor). If `endWrappingText` is provided, it will be used instead of `wrappingText` on the right.\n\n```js\nconst field = document.querySelector('textarea');\ntextFieldEdit.wrapSelection(field, '**');\n// Changes the field's value from 'I |love| gudeg' to 'I **|love|** gudeg' (where | marks the selected text)\n```\n\n```js\nconst field = document.querySelector('textarea');\ntextFieldEdit.wrapSelection(field, '(', ')');\n// Changes the field's value from '|almost| cool' to '(|almost|) cool' (where | marks the selected text)\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement` or any `contenteditable` elements\n\n#### wrappingText\n\nType: `string`\n\nThe string to prepend to the selection.\n\n#### endWrappingText\n\nType: `string`\n\nThe string to append to the selection. If not provided, `wrappingText` will be used.\n\n### textFieldEdit.getSelection(field)\n\nUtility method to get the selected text in a field or an empty string if nothing is selected.\n\n```js\nconst field = document.querySelector('textarea');\ntextFieldEdit.getSelection(field);\n// => 'almost'\n// If the field's value is '|almost| cool' (where | marks the selected text)\n```\n\n#### field\n\nType: `HTMLTextAreaElement | HTMLInputElement`\n\n# Related\n\n- [indent-textarea](https://github.com/fregante/indent-textarea) - Add editor-like tab-to-indent functionality to `<textarea>`, in a few bytes. Uses this module.\n- [fit-textarea](https://github.com/fregante/fit-textarea) - Automatically expand a `<textarea>` to fit its content, in a few bytes.\n- [Refined GitHub](https://github.com/refined-github/refined-github) - Uses this module.\n","readmeFilename":"readme.md","author":{"name":"Federico Brigante","email":"me@fregante.com","url":"https://fregante.com"}}