{"_id":"@goco/draft-js-typeahead","_rev":"88-5d2a827b4b370359e62de43f563c0af6","name":"@goco/draft-js-typeahead","dist-tags":{"latest":"0.2.4"},"versions":{"0.2.0":{"name":"@goco/draft-js-typeahead","version":"0.2.0","description":"Typeaheads for Draft.js inspired by Facebook.com","keywords":["react","draft-js","mentions","typeahead","editor"],"homepage":"https://github.com/goco-inc/draft-js-typeahead","license":"MIT","author":{"name":"Justin Vaillancourt","email":"justin@dooly.ai"},"files":["dist","lib"],"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/dooly-ai/draft-js-typeahead.git"},"scripts":{"prepublish":"gulp"},"devDependencies":{"babel-core":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-0":"^6.5.0","babel-transform-in-browser":"^6.4.6","del":"^2.2.0","es6-shim":"^0.35.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","run-sequence":"^1.1.5","webpack-stream":"^3.1.0"},"dependencies":{"draft-js":"^0.8.1","immutable":"^3.7.6","react":"^0.14.7","react-dom":"^0.14.7"},"gitHead":"a7f36a4d4aae45a795d0c188ff8809f8663b4631","bugs":{"url":"https://github.com/dooly-ai/draft-js-typeahead/issues"},"_id":"@goco/draft-js-typeahead@0.2.0","_npmVersion":"5.7.1","_nodeVersion":"8.0.0","_npmUser":{"name":"maikelrobier","email":"maikelrobier@gmail.com"},"dist":{"integrity":"sha512-zIeJJf1rGqvcQ33x4+FYyLjpgYblzolsM3NzaqRdHLyq51OW3CJDVED6Xy0hXh7/a+d1FedeW3fFygQODEBlJg==","shasum":"ddf408aa1293e01480f65d6a1c7c160ce947ab37","tarball":"https://registry.npmjs.org/@goco/draft-js-typeahead/-/draft-js-typeahead-0.2.0.tgz","fileCount":6,"unpackedSize":813823,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6Qzpj9vFjV76pvOKXol9+Ihv2u2LiOSorEJVyfWDRXAiBnrwnTdZp2rfwm8scTPN9Xr4GFM+KT+SlUHQnDsYZ0Hw=="}]},"maintainers":[{"name":"jongbeau","email":"jason@goco.io"},{"name":"maikelrobier","email":"maikelrobier@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-typeahead_0.2.0_1521829251454_0.8120552305026281"},"_hasShrinkwrap":false},"0.2.1":{"name":"@goco/draft-js-typeahead","version":"0.2.1","description":"Typeaheads for Draft.js inspired by Facebook.com","keywords":["react","draft-js","mentions","typeahead","editor"],"homepage":"https://github.com/goco-inc/draft-js-typeahead","license":"MIT","author":{"name":"Justin Vaillancourt","email":"justin@dooly.ai"},"files":["dist","lib"],"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/dooly-ai/draft-js-typeahead.git"},"scripts":{"prepublish":"gulp"},"devDependencies":{"babel-core":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-0":"^6.5.0","babel-transform-in-browser":"^6.4.6","del":"^2.2.0","es6-shim":"^0.35.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","run-sequence":"^1.1.5","webpack-stream":"^3.1.0"},"dependencies":{"draft-js":"^0.8.1","immutable":"^3.7.6","react":"^0.14.7","react-dom":"^0.14.7"},"gitHead":"9a4f1d77b8d7257ab2d71c4464005d0849d32e9e","bugs":{"url":"https://github.com/dooly-ai/draft-js-typeahead/issues"},"_id":"@goco/draft-js-typeahead@0.2.1","_shasum":"6401d1ecdc5a3ae1f3f37b32c889ca99af5a3c20","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"maikelrobier","email":"maikelrobier@gmail.com"},"dist":{"shasum":"6401d1ecdc5a3ae1f3f37b32c889ca99af5a3c20","tarball":"https://registry.npmjs.org/@goco/draft-js-typeahead/-/draft-js-typeahead-0.2.1.tgz","fileCount":6,"unpackedSize":814396,"integrity":"sha512-a8sqMvJ75tD2XeOPhdWl3OJqcmFAkWuA4jBOTw9Ge7V9pNKJxRKW5h/yWAvIcXiwmJzjzkC1YGKJ/i9AWxGmSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWDeB/dZtb++20E05LKI7/Yzx4ZCbRDz2xNS+yHOo7KAiB3dRJPUbkaWqAAp1/RcQj1Vwa1tJWv72bGUtARutcCdg=="}]},"maintainers":[{"email":"chris@chrisg.io","name":"christopher-gibson"},{"email":"jason@goco.io","name":"jongbeau"},{"email":"maikelrobier@gmail.com","name":"maikelrobier"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-typeahead_0.2.1_1523290113285_0.6871295128563637"},"_hasShrinkwrap":false},"0.2.2":{"name":"@goco/draft-js-typeahead","version":"0.2.2","description":"Typeaheads for Draft.js inspired by Facebook.com","keywords":["react","draft-js","mentions","typeahead","editor"],"homepage":"https://github.com/goco-inc/draft-js-typeahead","license":"MIT","author":{"name":"Justin Vaillancourt","email":"justin@dooly.ai"},"files":["dist","lib"],"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/dooly-ai/draft-js-typeahead.git"},"scripts":{"prepublish":"gulp"},"devDependencies":{"babel-core":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-0":"^6.5.0","babel-transform-in-browser":"^6.4.6","del":"^2.2.0","es6-shim":"^0.35.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","run-sequence":"^1.1.5","webpack-stream":"^3.1.0"},"dependencies":{"draft-js":"^0.8.1","immutable":"^3.7.6","react":"^0.14.7","react-dom":"^0.14.7"},"gitHead":"d539d3a505a2c9642f9704497d08a16d2f160855","bugs":{"url":"https://github.com/dooly-ai/draft-js-typeahead/issues"},"_id":"@goco/draft-js-typeahead@0.2.2","_shasum":"f8184a034b840fae55b0f3c63d7309cc49a922e4","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"maikelrobier","email":"maikelrobier@gmail.com"},"dist":{"shasum":"f8184a034b840fae55b0f3c63d7309cc49a922e4","tarball":"https://registry.npmjs.org/@goco/draft-js-typeahead/-/draft-js-typeahead-0.2.2.tgz","fileCount":6,"unpackedSize":814396,"integrity":"sha512-ecGqUGIOXN5n34Iu53Q6RUSckDmnZCHIQyMyjCAuVjPHN6ZTZUWezoXlirtjCcYXnQ13//Ksun4XBH7CxgjOVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKNzCyDbA5vQKIXmlGGqFkvcXhJDkUU2g77Yhj0a/UBQIgFszkrTAOFKKyI8o+tOFOvY6dl9na0TRFGksa3W7/sI0="}]},"maintainers":[{"email":"chris@chrisg.io","name":"christopher-gibson"},{"email":"jason@goco.io","name":"jongbeau"},{"email":"maikelrobier@gmail.com","name":"maikelrobier"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-typeahead_0.2.2_1523290218360_0.6800968113610475"},"_hasShrinkwrap":false},"0.2.3":{"name":"@goco/draft-js-typeahead","version":"0.2.3","description":"Typeaheads for Draft.js inspired by Facebook.com","keywords":["react","draft-js","mentions","typeahead","editor"],"homepage":"https://github.com/goco-inc/draft-js-typeahead","license":"MIT","author":{"name":"Justin Vaillancourt","email":"justin@dooly.ai"},"files":["dist","lib"],"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/goco-inc/draft-js-typeahead.git"},"scripts":{"prepublish":"gulp"},"devDependencies":{"babel-core":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-0":"^6.5.0","babel-transform-in-browser":"^6.4.6","del":"^2.2.0","es6-shim":"^0.35.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","run-sequence":"^1.1.5","webpack-stream":"^3.1.0"},"dependencies":{"draft-js":"^0.8.1","immutable":"^3.7.6","react":"^0.14.7","react-dom":"^0.14.7"},"gitHead":"96df8f6783a930f53b3f721db93204e13d0b45ac","bugs":{"url":"https://github.com/goco-inc/draft-js-typeahead/issues"},"_id":"@goco/draft-js-typeahead@0.2.3","_shasum":"a23c9c89c6a75d9ce31ac00675cff12ca1d7f1e5","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"maikelrobier","email":"maikelrobier@gmail.com"},"dist":{"shasum":"a23c9c89c6a75d9ce31ac00675cff12ca1d7f1e5","tarball":"https://registry.npmjs.org/@goco/draft-js-typeahead/-/draft-js-typeahead-0.2.3.tgz","fileCount":6,"unpackedSize":814396,"integrity":"sha512-w22B7uOpCgp6QYk8YGdczL7J44RQ5upcLwJZkoJ6B8bw4Pto7S99RuHO3rT9Ft/kEGnha1YCZWIMZKHzJ9wzuQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICo9PxuQuhg1q+a/6m5dJV6/z+tvSbTWy1Jxp3d5I7LHAiEAtonKwo9HMRo1twog8SrxPocyb2xvvgimOYOqSPse9F0="}]},"maintainers":[{"email":"chris@chrisg.io","name":"christopher-gibson"},{"email":"jason@goco.io","name":"jongbeau"},{"email":"maikelrobier@gmail.com","name":"maikelrobier"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-typeahead_0.2.3_1523290568038_0.3879408511585394"},"_hasShrinkwrap":false},"0.2.4":{"name":"@goco/draft-js-typeahead","version":"0.2.4","description":"Typeaheads for Draft.js inspired by Facebook.com","keywords":["react","draft-js","mentions","typeahead","editor"],"homepage":"https://github.com/goco-inc/draft-js-typeahead","license":"MIT","author":{"name":"Justin Vaillancourt","email":"justin@dooly.ai"},"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/goco-inc/draft-js-typeahead.git"},"scripts":{"prepublish":"gulp"},"peerDependencies":{"react":"^0.14.7 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0","react-dom":"^0.14.7 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0","draft-js":"^0.8.1","immutable":"^3.7.6"},"devDependencies":{"babel-core":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-0":"^6.5.0","babel-transform-in-browser":"^6.4.6","del":"^2.2.0","es6-shim":"^0.35.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","run-sequence":"^1.1.5","webpack-stream":"^3.1.0"},"gitHead":"04f4d77a15794edb38fe73f2dda0cefaeb87be19","bugs":{"url":"https://github.com/goco-inc/draft-js-typeahead/issues"},"_id":"@goco/draft-js-typeahead@0.2.4","_npmVersion":"6.4.1","_nodeVersion":"8.11.2","_npmUser":{"name":"maikelrobier","email":"maikelrobier@gmail.com"},"dist":{"integrity":"sha512-cN511zbMlUOcRSqyvFWc10bMgaSHGkSJs0jbRTruWxzJvJcxkMQuGl/IrvhDfJyNhx6D1Usa6rcXO68TZ+t+JA==","shasum":"575f95d8073cd234785c68f00cf7df1560241bd9","tarball":"https://registry.npmjs.org/@goco/draft-js-typeahead/-/draft-js-typeahead-0.2.4.tgz","fileCount":6,"unpackedSize":27869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAG0xCRA9TVsSAnZWagAAb2oP/R7ZBsF1lfUFb26z/Qhk\nD264s5dXkhvMzAOnrYfFhY3V/Bf18wS/af84iTFU1DuSKQ1pqAPXdJoGg+Yn\nNknAUpfj8WUBL9kuAEPibyu7s7bEFVYwC11lCl4BVHj8MZFslT/OIvoJDTBJ\nUgV1R+1OOGEAGOeAkCDeXjhwjYpaxq1R8TEHwLQSM3DHSPp9u8TWg4y+5BNr\n70QDFQIDMKVt4A8hkOgroocwwchGY4j1EXL0l6yGDFOOehzoyVJoJnIRekNH\nuAZQW5tdfKAmApWqc1+4P3EtXAy0HBZZPOO7tm7ngvFZWiCTT1p/r6Hryg6A\nhy3g13+4zNv/PuTusjJWpibhsEgY8JGFIUX9OwNAHGcVscDSvH5+5RsGHAAv\nN0WgeGk/m9s2nMiNeUNhhhyUM2NM9tExCqlLPh7UBzYixpdGB0DJ/IJmYeUQ\n/S3Q5BtinJUztUj8HhwD0fkSVh++OH9mLlEXWT6E+c0DCnUbRfHNzhqo/dWW\nEoSpLJYXKg/tn7JKDPbSAZEapVRVrxfyaHHJSfqUMZFWvlwfDYHI1TGLDtAT\nbrXEdCjanCPIHCd0xHBM1aTUeLAgTSKKMiLPfYXN8sYm0GSH2kEozG7UAjy/\n8IHZf1+fmWhlKGtwEN6wWYNDk/1f9nocumQw3RQDrHrW4hXQHY31jpTInHcu\ndXZF\r\n=6iII\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGE8iMvQXcgQLStU88/8qvSgGDEfkLR8td+pToNQJcBBAiEA/gqKwlufe7orXcm7egX5kl7jblfQ2dnZlQ+aHe0gJ+E="}]},"maintainers":[{"email":"chris@chrisg.io","name":"christopher-gibson"},{"email":"jason+gocodev@goco.io","name":"gocodev"},{"email":"jason@goco.io","name":"jongbeau"},{"email":"maikelrobier@gmail.com","name":"maikelrobier"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/draft-js-typeahead_0.2.4_1543531824426_0.6144371990830972"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-23T18:20:51.403Z","0.2.0":"2018-03-23T18:20:51.609Z","modified":"2023-06-22T16:16:05.203Z","0.2.1":"2018-04-09T16:08:33.430Z","0.2.2":"2018-04-09T16:10:18.498Z","0.2.3":"2018-04-09T16:16:08.120Z","0.2.4":"2018-11-29T22:50:24.608Z"},"maintainers":[],"description":"Typeaheads for Draft.js inspired by Facebook.com","homepage":"https://github.com/goco-inc/draft-js-typeahead","keywords":["react","draft-js","mentions","typeahead","editor"],"repository":{"type":"git","url":"git+https://github.com/goco-inc/draft-js-typeahead.git"},"author":{"name":"Justin Vaillancourt","email":"justin@dooly.ai"},"bugs":{"url":"https://github.com/goco-inc/draft-js-typeahead/issues"},"license":"MIT","readme":"# Draft.js Typeahead\n\n[![NPM version][npm-image]][npm-url]\n\nTypeaheads for [Draft.js](https://github.com/facebook/draft-js) inspired by Facebook.com.\n\n![example](example.gif)\n\n[Check out an example of mentions in draft using draft-js-typeahead here. 🎉](http://dooly-ai.github.io/draft-js-typeahead/)\n\nThis package provides a higher-order component that wraps draft's `Editor` component and augments it with typeahead superpowers. One popular use for `draft-js-typeahead` is to add mentions to your editors.\n\n`draft-js-typeahead` helps in three ways:\n - It figures out *if* and *where* the typeahead should be showing.\n - It keeps track of the typeahead's highlighted item.\n - It triggers a callback when an item is selected (by hitting return).\n\n\n## Installation\n\n```sh\n$ npm install --save @goco/draft-js-typeahead\n```\n\n\n## Examples\n\n[Examples are available under the `examples/` directory.](examples/)\n\n\n## Usage\n\nFirst we'll need to import `TypeaheadEditor`:\n\n```javascript\nimport { TypeaheadEditor } from '@goco/draft-js-typeahead';\n```\n\n`TypeaheadEditor` is a react component that wraps draft's `Editor`. It supports all of the same properties as the latter, as well as a few others:\n\n```\nonTypeaheadChange(typeaheadState: TypeaheadState) => void\n```\n\n\nIf there was a type called `TypeaheadState`, it would be like this:\n```typescript\ntype TypeaheadState = {\n  left: number,\n  top: number,\n  text: string,\n  selectedIndex: number,\n}\n```\n\nThis method is called when the typeahead's *visibility*, *position*, or *text* changes. `typeaheadState` is an object with `left`, `top`, `text`, and `selectedIndex` properties. A typical callback sets `typeaheadState` on its own state and uses it to render an overlay in its component's `render` method. This method is also called when the typeahead is hidden by passing `null` to `typeaheadState`.\n\n```\nhandleTypeaheadReturn(text: string, selectedIndex: number, selection: DraftJs.SelectionState) => void\n```\n\nThis method is called when an item in the typeahead is selected (by hitting return). A typical callback autocompletes the editor with the selected item and tags it with a draft entity.\n\n*Note:* By default draft-js-typeahead does not filter items in the typeahead based on the entered text, [see the mentions example for one approach to filtering](/examples/mentions).\n\n\n## License\n\nMIT © [Justin Vaillancourt](mailto:justin@dooly.ai)\n\n\n[npm-image]: https://badge.fury.io/js/%40goco%2Fdraft-js-typeahead.svg\n[npm-url]: https://www.npmjs.com/package/@goco/draft-js-typeahead\n","readmeFilename":"README.md"}