{"_id":"stb-react","_rev":"66-95f3925b9a3a1523ef9c3847d18a6387","name":"stb-react","dist-tags":{"latest":"0.0.1-beta","beta":"0.5.1-beta.4","dev":"0.5.1-beta.3"},"versions":{"0.0.1-beta":{"name":"stb-react","version":"0.0.1-beta","description":"享受 preact 在 epg 平台的极速开发体验！","main":"none","scripts":{"build":"webpack","prod":"webpack -p","test":"echo \"Error: no test specified\" && exit 1","dev":"webpack-dev-server --inline --hot --progress --content-base public --open"},"keywords":["starter","frontend","preact","redux","typescript","epg","stb"],"author":{"name":"shitaozhang"},"license":"MIT","dependencies":{"http-decorator":"^1.0.5","stylesheet-decorator":"^1.4.1","typescript":"~2.5.3"},"devDependencies":{"awesome-typescript-loader":"^5.2.0","webpack":"~3.8.1","webpack-dev-server":"~2.9.3"},"gitHead":"ced5ada96a1ebac772edd6fdcb159f740fd4f3a9","_id":"stb-react@0.0.1-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-3B8GsYYN4mMhnuIsiXn65lOL3s8IdIasi3Qh3uS5+OA30KK/CGOe3oH8MwmwQK0hXH0NlPB/dYu3IDhdUt3OPg==","shasum":"499ed7b70c01df0e89c62de74a9d24ec488d22d7","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.1-beta.tgz","fileCount":22,"unpackedSize":68116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyGDpCRA9TVsSAnZWagAAWYgP/RXyIcMPEcO1BtSIjMHc\nY/t1bxuFMWr/aSoQ0QrnGdZVh51m4uJUVH5u5fcoEmhc2BKFcZ5P5vPFup+U\nGkZrDY8Ymawyu/25FAXdTKPyyBwZ1OqNfjdtldjwvz0N28S3Lbpv6B69W33C\n1dk+cFcuHMp6Q9jDapcRJExVvizJL13L3ZW2EweABh0iVnKgP6sseADsxeK9\nPYSBp+XudUmmurKIvaCRNlSDZ2+BAlJb9Acqtbouqk0/ABXCt8MfSOt2sSab\nYQhHE/TEld27xlNJa29RlwFJO+fcW2yp4ZgwgJ/cM+xYc5b8jp7HR/nzUqKy\nmOj1PSNoX24EIrNQedkju5MO7BZjCy91KUqtP1sYxzSrldDpn4LJ3cOEm+B6\nncicNStjCwAkkxbfQsRufC8jBSM0GY8EhlnYO2uaMLhsJTXz/z42zTZF65LI\nsDaOYRXtuzLJb2+DIkbXQbeb5Jk1tG3dArkmbB8yntWEQM0YBWMCKPOKh+Fc\nuaa3hg5zbMpg5979sNOXjsfvamrW2BXhiU6bSbchi/FzZhF+JDB8uQ+3j7Mh\n7EcjZnsW8tQjgzeUlj+3s0eWyfS5Xrc3A1WwWglvXTTiQXRzdZFC8Ls3/+yu\nPPsz+axRoVZRL3QSO9apGUps8vHlHc+rB+ZMAUiyUUuRzNyBPnv2DI52uVx+\nc/wl\r\n=FGmT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC13sJNQWJLlIBYy1xqOM26t/6GXlDr0Wc6HmCZlw5WGAIgNHdhBx3VNGe5wXW7BsH3f7Q7Sxr2yUAqST06V4k8FOo="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.1-beta_1556635880751_0.22037852033294603"},"_hasShrinkwrap":false},"0.0.2-beta":{"name":"stb-react","version":"0.0.2-beta","description":"享受 preact 在 epg 平台的极速开发体验！","main":"none","scripts":{"build":"webpack","prod":"webpack -p","test":"echo \"Error: no test specified\" && exit 1","dev":"webpack-dev-server --inline --hot --progress --content-base public --open"},"keywords":["starter","frontend","preact","redux","typescript","epg","stb"],"author":{"name":"shitaozhang"},"license":"MIT","dependencies":{"http-decorator":"^1.0.5","stylesheet-decorator":"^1.4.1","typescript":"~2.5.3"},"devDependencies":{"awesome-typescript-loader":"^5.2.0","webpack":"~3.8.1","webpack-dev-server":"~2.9.3"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>替代React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## Sponsors\n\n支持我们每月捐款，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"ced5ada96a1ebac772edd6fdcb159f740fd4f3a9","_id":"stb-react@0.0.2-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-kvz/tz7yNacpSaeNQHcUkXlYS1u6XDXtbS7Gli1zdq905UtYuiigofdIlPPo1GgFVwBOfk1GLKv2J9uogkSgyQ==","shasum":"d444843c118b4c237c255643e515bf979f9c2f0d","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.2-beta.tgz","fileCount":23,"unpackedSize":69792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyGNlCRA9TVsSAnZWagAAEhwP/RdqNxRcrkJeDufLCsBu\nfcX4nTHdQ4ztRQvPxNH232IW16wj5E2CdR0VbqQjpEGr6ych+HwaqX8GUthp\n+H4SMyOoeJisIpybDMPjUA7oOuYm25tibOTyG7Jdx/O69hRKEng9cXdqSSEa\nlJ9K3R4u1imQcNuw+xjWQlX21NSNxa3IGbpMqiQ0vdnC5yoK5vfch92I/EvQ\nfP96gK3aoa3e7bYTHQAgzMf0VR7mWeu7gQ5/Jcn4m1Nx1aIq2c5bpxi29ajC\nwFHtqxsAuUHvwwUIVufbv2+AIgCLqDZYTAgxcjaAtTyurh0xo7OJijDQgPkN\nAr9zIX9qV5xZg9w2u7zvKThusnd83gWRYLWWcW6u65D5A0uISW6ekOTsQXAl\naVDGcxaWVeguFetcCm62Aec979N+qoQJ6z0rK3adVYmR7LIFAFYZS6kTfXnC\nuzpALmnqAcE5ou/sNFQqOhMK8VwEaOtJ0qVwXNYSgjRD3+zkkugkGbP38/FV\n1ME2juC7jzbx6ssemnd7/1hbv5VlYgtP1MSYy0CjZgEZ6cOrV+L9w01Sey6X\nEBTOUOVp5gfaGhwhZg4AVGxb8+AsQxBgYt8Tngd4M1Xj4nCiURyVcgPV4HyB\nCM9Bdkcc8Ev3SqMsklbR56cYUWED/wZlSGAr2dXZnuPMoJVSRpoTziNP8L8Z\nmL6h\r\n=aJcM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxArcO7VPRUaqlJVq5C+iKHUke0jtevGOsbxI6QmVlkAIgd7X0cNkQpye1FovGxynJyiW41XE1BM3IwyjtlyX1ngk="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.2-beta_1556636516401_0.8449130989987268"},"_hasShrinkwrap":false},"0.0.3-beta":{"name":"stb-react","version":"0.0.3-beta","description":"享受 preact 在 epg 平台的极速开发体验！","main":"src/stb-react.ts","scripts":{"build":"webpack","prod":"webpack -p","test":"echo \"Error: no test specified\" && exit 1","dev":"webpack-dev-server --inline --hot --progress --content-base public --open"},"keywords":["starter","frontend","typescript","epg","stb"],"author":{"name":"shitaozhang"},"license":"MIT","dependencies":{"http-decorator":"^1.0.5","stylesheet-decorator":"^1.4.1","typescript":"~2.5.3"},"devDependencies":{"awesome-typescript-loader":"^5.2.0","webpack":"~3.8.1","webpack-dev-server":"~2.9.3"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>替代React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## Sponsors\n\n支持我们每月捐款，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"ced5ada96a1ebac772edd6fdcb159f740fd4f3a9","_id":"stb-react@0.0.3-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-ppPmshZeOmpM7CY3iYiY4/Lu3LaaU21jj0aKSAWh1wBambbGFRTJksqguTQjFPEZDotUOwp6n2N4+/ZXeNzSBg==","shasum":"0dee1dec9bfbb143f693141a2dcc28c5a1e90b4b","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.3-beta.tgz","fileCount":22,"unpackedSize":68101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyGhFCRA9TVsSAnZWagAARNwP/0mzM0r4kB80ut0+BJCM\nq4a6Q7blPo2OJgvKCbvmEcOKna73j1cZtKoBUtRNrAZoslzZrFBD30IufzGC\nf4TB4XRemryZQt85WR1yZMUMbZZmn7C0MZnA0VXDKu2dVyUWZFdLIAI7lJmL\nkc7eC80dWV1W06oPEiG/2PihaaSeH6YoXgj2/13skv6VyO07Ci3M36RWpisJ\nHKvlX9n5g/JWGmD3dwL6PbE1rEJuzXAqli7/ivaxevSyypFpUCzMUZuD6xDK\nxf75a0uyuJ6f5VW+cpzBqZNhrvW4x+nY29+dl5NnKE0wNolOL3OmI4ZVPj3o\nuI1qrFvsfBPXrPmrorfngL0DQNz9ybVgd5aVcJZg7zRM+DeTEmT7ib3p2bSr\n3Qbs5BSeVogIeZ33MsD8a3Hwa3R66gZV1CbHSGSemwqiMe6ZmDmhfdKtOsBT\nFDVV7Twwo9Cl5JPgHsY3ZQVprJvIf177J81Y2XSj343pQAKcQ6NTiijesS5P\npKfLTwa8g2EFVYJxvw2vwpR8miD4dnu5+6SBqDkUYjtUIM6xsX7qEPP5j1Eq\nvuJSxe18Ka8H8zn9jFzb5qAcc4hH+W6hAi/FkABZleTJ8HhfwJCaqDoTQdy/\nRMTtqnS7FV6veid/vW52ZjSEAvzNPzzq7/Ci+lgMrj9XuNXOIY0w0XQlvq4c\n85r3\r\n=BXOZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmglicP4qKkkSzYQ3sOFTaEP3QjjVD0h0FU8wav2xVBQIgDuC+4hS2X/0YU2qKTKSby3XUgPQCwV06LLgqn7X2yOk="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.3-beta_1556637764911_0.32628754797471515"},"_hasShrinkwrap":false},"0.0.5-beta":{"name":"stb-react","version":"0.0.5-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"0837f5bcadbe7c6c5d7282dbe91dca7023f84d19","_id":"stb-react@0.0.5-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-RFOtdJtO72PkHEO521uZ/RyCzJcgLZbJXaE/JcfWqhudRSf9nhyMsif1/ePXr/frg7j9Eh1GL0bcNVEI+9MPSQ==","shasum":"b8d1ccd5686d47460f5f0c6f5ef325f004ff43df","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.5-beta.tgz","fileCount":39,"unpackedSize":470805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyTVGCRA9TVsSAnZWagAAnq8P/iwpvFtYkczO0p+P1Z1b\nR5Fng+0t90ccWSRILYLOSeFLDhc8XL2c2KLVYfqvaiZ05v2hkodT9CoOyIya\nHCvLv6HiJiekF3peb/hvePL3BCuHIFjlgPxH4BLj6LuyRq5EnHuImDmfTfJi\nfmIxJizAPmUkFFxqaC56jtuQlrH95ATtcrOZTd6f5ivqdyNWYja54xWSSrFG\ngvogj5xwOi39wWEIk4UGDdJ+y+n4wpS3Y0X6shub2gyY88xcSn0MmmTHZv6N\n5/04eBQJcQ/GQu1kE51X115j68UeAgiMxFB1o1G20W0v+MLW2HF5B1eN87LK\nJjR4o1jSPl304UgIovvZH4ly/QtyeHsrfNxtnRvb22hLVSw58bNeYW6vvoyg\nQA8V8L3w+3VBpywz/IqSfl2MFG+XwpW4xgwtQreF8CUsEHH9puKqr6BOayHQ\nuc64EUz5KYeykTl3Fh8MCGLPhtRDNavJ+iITfuqVN0V1nakV6dnuIT6mG2+V\n0To4dWT1OqAFaRSzf9X6sQIqo4gXrMEEb+lcn37dJ4oVkeNWDUAd8dGyyazL\n2IKBHsvs26JW1Wk2KGEI+vcw3FiKSWIkxF8KyKrM3vO3Y7n+uWo1eaETIznL\nqgXayceWR4l2iFB9V5TVqz+CGPcF0qmiHUqHvkeHVXI+465NX6yZ0e3EM/S4\nC0Wp\r\n=7CE2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH4ZiT9hNQNiT0pKROTVSazX4NY9Dxuni3pTt3JyXbMTAiBYeAizgz48uqCYirSmEZf4VOcrOz1M9ggazulfbdggRA=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.5-beta_1556690246018_0.28829814229175277"},"_hasShrinkwrap":false},"0.0.6-beta":{"name":"stb-react","version":"0.0.6-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"0837f5bcadbe7c6c5d7282dbe91dca7023f84d19","_id":"stb-react@0.0.6-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-Z7ZNAksRimSd5BHd2WWtr4CQS++69YFQFwm280tnEUSs1EPwp26OKPWgGdDmdaS3WQX/V9E4W7ORIwQTre8DYQ==","shasum":"79b65ba2b4ce4766bff31978be1f8446c10aa7c7","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.6-beta.tgz","fileCount":39,"unpackedSize":470812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0VenCRA9TVsSAnZWagAAQ9EQAI7UARjgAI5Fadi5OUsN\nL1nEXISz68isTAcBSmGg0vv7q/9d5VyS+bt0yLsuIZ99JSnv9BF0iFfavGQc\nl8+xvUtybKXui/vMdiqRHbH4c0t/tkfgb4+u4GFPDreI7VRuVEoKNf+MBzI6\nhiccXmE9K1mTEDEaUoMCq7jfEWMOA1enaujpvFkueZ27yaPvvIPq8AVz2XgI\nTmtIsu2qBPX0gwHkR5RgMjmTlgfwJ4J/0j6QlbJ9lxPZMUbSmv0YMJ3QuUDW\n4SgWIp0HC2i/xpV801XcJdp4C1WsjtP3/JD7w+AFQZ/SPbWNDVjVAzvC+2q9\nTDOPUkdpZZk51kYTBtgEds1cJI/tWmy5O8XRQjbsSWi3Ur0qERUFc65Ddi4P\nZt9GTnA/j/Y2gMP5pYtzGVSBIyFzpCy44QhVD2ufTBHNOa/wm0J43nBAp8hG\nC4eoUhpyw9JabIj/wg3mqBNYnLoLMXUcIKUKgTc/F4S9qQAIN6dy/BRHYbvn\nrL5PacF3VcWXhkQi0KGBDzr6R+ml662pBjF9jE1RyNlwIhWjLrPzA2cLjV2C\nDXYeZfjJ/yNXPU0TcQZhTfJ55vcP7mrUtWVHFxPKS2LtA+UKL3lpqfJhuM1R\nlhN8r4BqkhBFP+g541tQwfoE9IsyjZpUqG8dLmUZ05wCZf1r4yhfektjYJLG\nLMvj\r\n=T8zF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJGNnOeCvGDufcT27J1RT62ET8P5lsfXZHL9jsLXxzzgIgaWH9EtbxAv5OuizAUg+K5BcY0Ju1CuTksfnxMbVWkHM="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.6-beta_1557223334412_0.6681244965209905"},"_hasShrinkwrap":false},"0.0.7-beta":{"name":"stb-react","version":"0.0.7-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","stb-event":"^0.0.1-beta","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"0837f5bcadbe7c6c5d7282dbe91dca7023f84d19","_id":"stb-react@0.0.7-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-Y0pzWBBiTqC2QUZCHQ8A1IZ/0SiTyliRmr+drmXJlqF+ceupdHmDMPK+ucu9P1E1hUVQKTvEyjJSRI758JcXDg==","shasum":"c213cdd137cd78d0726ed595b4bfd1e4ef8ce4b9","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.7-beta.tgz","fileCount":39,"unpackedSize":567738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1mdiCRA9TVsSAnZWagAATM8QAKBnjefmjCGFtQA/fMAq\nXKWTgX9aKiqmZ4Xe+AY3q9h/33gv+GfJmV5epR6au/UPLV4K1uJjnoVV7b7I\nDF6nh2CV+DrBEfOyYWtfO0K1/q1FnufdprOxlkzFacG4zBuaWfcZTup/gsG2\ndV9hqqXG+V4ovd1Cn60M8t/wg1M4ImsI4B0C/KdnCnF4KaTOxo1KPeOEbfT0\nl04byM2mrahPnb6r3n1rue3wMSeVHjTD4sX3i6jnB+HLWVjmlfw2l+q0ozVN\n+rH/YDmJw02hydgKLPQHrtuwRlxqzgNPTMZgE75BVTt2AC16r65t3ESdJUiF\n2qR3AvhuZksPO5b/yFmaIrc3FUd3YbK9R66ZclYkZc0yCZ866szFVVHxG65+\nhQYjkCCi30LYiux6sPBw+J4LXgAkrgyuWBf9xNEd3SSw/EQO6FdFPIArJDye\nl34lDP2O9FkZxnl9QkTaoz8Evx+bz1UlrCgNS7k2+RqNqO1mdOHtNAIiIzgn\nrqz5WNSRBF0v33rFpcgvr5CesU+9JShVQTLB8VvLQMkKFXW5LBtvVxa4fj+F\nR9gA9zYGjjTFjZfS4SD9TfuqWu3Z7rlOF3evb/yBA5uDoE8P0tO0e77LJ9Zc\n/p5g2vhxN0S95aTjW8sa4zN5l4F6L/f/mM44trlZVZwcp4zhdxdFjTfotGj4\n67+2\r\n=ImZS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBlfQ11hxLUkJRyCDN9GzUC9zNuiWT5UQlAHoaFexNNaAiAsJbDYC8MjYqXzSzh7iXgmnzjDZaTzqe/X/JzYb0DGuw=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.7-beta_1557555041537_0.10004494163928701"},"_hasShrinkwrap":false},"0.0.8-beta":{"name":"stb-react","version":"0.0.8-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","stb-event":"0.0.4-beta","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"0837f5bcadbe7c6c5d7282dbe91dca7023f84d19","_id":"stb-react@0.0.8-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-yxdhNOFedOWcgerrH98xd2xV87lEECc1NBNVzQ329HY/iEIpz0qZ+zyCk+4AY8k7e4z68rSqltGDpgm8DWMoWQ==","shasum":"dbc0cf1544af74747e392957df5f4fff3528de1e","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.8-beta.tgz","fileCount":39,"unpackedSize":490994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1oHKCRA9TVsSAnZWagAA2YIQAIBssR1rAJpTSOHhkk2B\nqcGluBb+BAXgv9d3SLusNIM5FtwqoA51iBgWbItUCP9sZTsk+iAxJ/dXKurl\nNxPw2TAQK68OCE/uMNW8g5kvm9M5tk6VhfCqzfsEep37pQLTseOfwQo4vndi\neSKeT2BG80D3uboYpGzGfS1z2d+/o8Z1b4SRl0Ah1m+ZBTZAyqKc9yOZrjXg\n28KTGEDFmNc00m1gFQ0Iq/9CsKFTlOeLjb4Xp3pX9zfKceOkVbkP3k76r61O\n/sUxt/6ykV/tVhp+RAyJFE2ul6pLSbRjMcaorOOcQfj5cCD20gYMpLQ/wbqE\nBRGDbFXyTvv2aQgnZdRqQBHirc12DtRenti9mc6BN/9emiyzK4g/VdDTotJh\nUvXDaYGQuUI0DIeT6Yk05gVqQHT32pq0sA8JdK7U6IjVFZhHWahCH4nMaoeO\njKlAYbRr6U+iugzwxfA4UMedMZea4NKbK20GEjSqTA1yd+tkCQzQMJrrbSFk\nDap6RoHnAen8IOlDOUyYwNDdMns9dI1BwCUk2ZnzgQ2E25nXCjcHr7bN5ER2\n6MfH9P9YvTIaDh1Yg1YWFtgWvAkI3S1hdsJ5t+qr1zFaBOT8/IGUoZQTOPro\ntaSSdSHCs9KNtJOSjyr+Bow9KxaFeW92/SPuuiXqY25ME1+x7EonU1G6lIKU\n+d8l\r\n=fRAs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkHuwAuYRSHP05Rs17gpIHPVYpQFd2bIx9uOlGHKvxMQIhAOeTHNxu1WnTRflT8dZ/mf68VlY0hzHz+Bs8dxpWOF1z"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.8-beta_1557561801640_0.1545445484003931"},"_hasShrinkwrap":false},"0.0.9-beta":{"name":"stb-react","version":"0.0.9-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"0837f5bcadbe7c6c5d7282dbe91dca7023f84d19","_id":"stb-react@0.0.9-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-ZEj2iIxQ0icTKsI5smEaXFDlwzgpHGBwCNvQgfdl4tABMQNbl6LD9Gwtgwcqs4tblkHurMiFeauBFRU/AKyrsg==","shasum":"4e71bf8fa2bd56c32fca26f15046ba4f01abad69","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.0.9-beta.tgz","fileCount":39,"unpackedSize":564086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1oi3CRA9TVsSAnZWagAAMrMP/24B/SwvlZDXB4vyMGBV\nWL9i7nUmPZqAwmMJdN52EOjgEY57mNmdaUDnWoHglIhvTVA2+16CFax515gW\nFCbxGb5fISaU1y+Jrlak92fpc/KMBy5byoggWmI8wppFrAlAant70UKZUOpL\nQlDtMccqXyYEzpxKU2VeilqVgqLIYqPnVVLVNndlD3NwfrWPegjPMxm1VUUN\niBuBHY3Lec35Kvs0CNzEvL8favilFK+9GPisnslnZCVPD7z6E+09uoiFjIXA\nnapuGTSxJWpZfGhRH01cg5PcH9NbByzMu8MbEDdVP3Z+Xh1ekOa+nqP0Ecbj\nCkoHFS6c4yZGhVbU2XoI7YlIx90cL1MOBWMEfiI/rG7laomN7gzaEc13mgtc\nVwXLOd456FgktYqeQE0I1SjscLSYQsgy0e7Og1d7hJt0hS+yMTx1SafDKYv/\n2Eyazd7UNzayeYDEJSjvIrrwXAeQFcnrWWGPVPU0jbJb8pyEoSbNd1+ydKub\n+kyu0J36PU2Fn0cSOK7gFuKZFVQxbRfl6eS90BSQA9PfX1001IGBXk6Tm9js\nJK4lWvMcRGTJ7Gs9oPVuassQLwcUJQFhlBsjbtGhXWFXa+SzPa63yprEzvge\nfCpv3MqgNgUiYr8qDs49iyZNXk5iIoTGPpbIMkavhvhrc6ItW7mC5Ln1RMbt\nWCaC\r\n=xjP5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA1cpI1qlizY5EH7xdUYgNvsRHxeUors/nVR1M5/4j6gIgKtchclHSRJQQKBWEyb0dUeF2v4Rr3gR7M7Va8KCCU0I="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.0.9-beta_1557563574975_0.0682832347833009"},"_hasShrinkwrap":false},"0.1.0-beta":{"name":"stb-react","version":"0.1.0-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"61daad260028a3d66c164df168a9d01b309eade2","_id":"stb-react@0.1.0-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-LJvlHQwt3pD0uOLTxk+QW0XI0laS6gGK7FKL3VdugwVcPjTd1sjiMoWwLHuIq/wjIxpKHANVBeTEL/J0bQoCnw==","shasum":"6c8a88ce01bf966088dc5c2ac93fc9ad4a6596ab","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.0-beta.tgz","fileCount":39,"unpackedSize":564128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1rSsCRA9TVsSAnZWagAATm4P+gMlrRqgDvkgPJo4pFCP\nh97OEBrVKROtI6XmKnZHRQ6+RVsLUqP0ZP1/Y+Jx+cwpXx3WZIXfvQoA3Tmy\nKVw1fgV25LtmhwqOFAwGx9B+eiXElVQ0xb6jXXUWthnRwWqKlplQwHFvBZZ3\nxNTRiQnZM3oRIU9GjlXa8pG7cl2kgyyieafuTdsbSr3AsCN6zGwEzEsqz83i\nRKceSNMNXI/+f4vdsQ4Yt3U64s6+mzEhYnZepYHoNOeq06ZPB6IPnKwKDApt\nMI/mhHXBP0WIseCzQAHkCkwf+z+U/S75bHOkEkAAwgnUqgn5umUs4FHeDvlU\naMryIG0q9BTOfUSYewguP5BANy6DRRPKy7Oo0B0aG+w4b8ZHNV1ACMRdyA7y\n/XNzKLY24sOb9duhQxm7mH4w4KxiXVDtLY/6pcmrxr8TAF25YTJWQiqHMFOp\nkmKO74cdRjY77lm+Wo2RL/Se2TX5qtdRdd24OqtFRwW5fv2594GYwAhHGq19\ngdUZDIChkAtY5Xtl0yJ9pegXe2Yky1SZHHwSKH0V7SanJtSuVS+5jrWn/MGM\ntzto7x4fn2dF4P3ntKcV2toc4SRe8EJo3AJSxCVfADrMZh7WA8xDalTSxk0d\nfU0/VI3lRM62IURCqYh/ZbKQjXF9z8MOe7R1dxcW69xK1/sG1w/JGpLdxE8s\nPndj\r\n=fHk9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGM/2KLioOcVEFDotuyj98OtCNYlWYobGngLXQGFvNRpAiBfn3Fkdb4eSFD2+cpRvVKe9+S/8CqtnR5K/WdRFmeAhw=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.0-beta_1557574827396_0.2989392369584907"},"_hasShrinkwrap":false},"0.1.1-beta":{"name":"stb-react","version":"0.1.1-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"61daad260028a3d66c164df168a9d01b309eade2","_id":"stb-react@0.1.1-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-qsv+6TF306hzGra31L3n5XohT11CsUkVKQOzjC2VQsBRFQWhiFHJ6OXVuXyrqfYROx7bpsYOSNpfoIDia27mXA==","shasum":"7200ccb0f181a26565d02ae59f9a3be0e3e719d4","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.1-beta.tgz","fileCount":39,"unpackedSize":568902,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1sRCCRA9TVsSAnZWagAAV5EP/jMLeqr5IbBhe/EU8N9g\n5q0a6Sp4XWdBELS4Mq2CcWMypmv4RlbpVGjRD1iLw+oJgE/skJ3o2X/dTAY0\nIbhqeHwAHO5hEZ4nnk6vzs2GvkpZXg4XXGKWoor93amN9nv/ni+RhHch0R44\ngJrgB0THaxe7S2i9rwoWPN+SEXC6XbjukAebBSL+8uqvhjxs+pdYD8a6QLJ+\njSSpUWoqwQbHlaJQJReychKoXjIMbh4tDp7SOGuGgBgcEokw5Dk+NBJVNSa4\nauKIpKrdUU3zn96f23ZPdalr6cNGHuZxt7HC3MnQFyfAX8Sc7eaJrXmQIvx+\na3+JdHlGe/61hGMbY8ae8TQDx7NuzSgE9c7fVcn1tjADHuH3ilkrCLWr7t4l\nrGdDQnHe6QcnkRLj6dzRWbQNAl80xZAneqFO06+5PvzBXljzZrkWZiFTXoTX\nNHd1UlkhXFrpHAqMUe7eoo9W0befxnoyDVRd5efV64IHneA6hwkGirPZSErn\nH3bC4Gv3wwel9z/BgJXUQmkLV/BNbCpAkM0gOslZejwFmWkrlkgFCcYxuCDP\n/SflzYb5wVRmyY1i30sD7U9fz4D4lQLU9DnK5miJm9RQLqtKY7HW+33BbYme\nD8GfxlSvr/NPTw7ZJCNzKCOobGLY8usiKTADZwAEBtpMrGWD7UwqFZ/VPa4t\ngo4y\r\n=cT/k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC90RjBZ6h2txHWwPdfMijAf4w6nJQJR4RPnQDxeqQSjAIgDZReiRA7iQcsnvmwoyOZ4Q8hqy5QspB9FfDEVkwHT5U="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.1-beta_1557578817205_0.6436408654465371"},"_hasShrinkwrap":false},"0.1.2-beta":{"name":"stb-react","version":"0.1.2-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"61daad260028a3d66c164df168a9d01b309eade2","_id":"stb-react@0.1.2-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-nrfBvho4FlQ6gwiAuEtqWpBjVLt6JOhCK1LtYDGDuvKnCs6piKFTTYuuQq3GVIV0epPVp8ev3pwYKHO+kIb8+A==","shasum":"8f3ddc10e8b2dc640e7ee371413071cce2edfed1","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.2-beta.tgz","fileCount":39,"unpackedSize":571550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1tGHCRA9TVsSAnZWagAA72oP/219VYE/0zyON7Ejbr82\n970ydbJYiSlbYSufCJ8CZfYyZzmK3W93z9P3rqVCUuvU7rFPxby5NrpNBbkr\ndrGmjgyGSqMJs+RsDc7knZbk1p9cBwNxqEX4FPGUxWhR40N5S2p+eYjEnx/R\naOeBpMzxFOO7sIbu30eOSJWuuY0Yp6CcMqKrcwC5hSefHXdjItIQbpRBOCnD\nxCSToiaJaYn7vqYUF0GdqVx7MdsMS+e0muGShfGScl1awXgr91dylfZIV9xD\n15Nx4886jRbo5tmc2Os/2h3Oan5FUvjpHnjQ0+OKJyC4axGOhKHGTvegTh/A\nJrDcNqqke7Vj+46ETE9m05RPeg0UVmrbISe131pgYcwkdFpCmj5AqumpUrmu\nBCw9CKZuph5J9iYlh5l++WUGMm3KhLdlnlmoXnqg2PpNOaMcLfX5wj8Hgy+m\ng5fzZvdouZZ2q6f7bVqsrKh3EF0P3uKkvpyL8p5klOy+BuJ0Mi1oELxetqQn\nXT5MoziOsBybE1XyebXUiba/7/Ag+3bg7CtbX+gZy63PzfSgrIlA+mbmKpYr\nH2NoZ4ymz6SsUhnoLlIeK4IL07Ue7Tby0EvbTKj5hXjnuK/oLaHiM7ZcM/fb\nyTMo/AhmtQO9ab7Tu8neNwGsec3UbECiXyPw8W6iEwQAMOmGOjHA3yeLmYRR\niEP/\r\n=6O2n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9fA605jYoFXgAtX4KRdeaRGQdcadysQETO4F74JciGAiEArv/KThWcVW8ubWij3vaKGNah7xe2VCZc2vQtOHWnvao="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.2-beta_1557582215252_0.14525374286171577"},"_hasShrinkwrap":false},"0.1.3-beta":{"name":"stb-react","version":"0.1.3-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"61daad260028a3d66c164df168a9d01b309eade2","_id":"stb-react@0.1.3-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-ARyV50IsrcIJ7V5g0Wk1HRBhSh6av3nmWSJtkxfVMbwSW8lEgrsuChphxD1ob8vn3ywZc+8RBPPzAQQdnQ/Hiw==","shasum":"b9677ef796c70654d2876375483b502d486d7ab2","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.3-beta.tgz","fileCount":39,"unpackedSize":573191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1toNCRA9TVsSAnZWagAAVq8P/AoOc+6fy1aYAFqPQGAL\nLheLUxImbwYvzZauWtspLxq0S1eowPbCQ16QsXjeiKCh3UOhnfkTLi0t7I10\n7R8Z6uWgMtlSv36SJP/WeyFasZmUYNOk/nw3c+Jd592+w/T/3F2scaHWbcg/\nqKJSOLRQqcCZhQCKz0hc+1PgiI54vQB2+7uUh4ZxpVxl+hMwiJZqltZJlt80\npmHaZRyYAhbQKs5QJzM2YycxPJ5zyYQr3Ds0JFIqEzy211NBEY2TKS5AsQYL\nTu1vNIItlqihiPH4/4Cat6d2ThLpWSpAwhG0fSmTCQrPEKgaiPlMbcJFMRGI\n8vd4gVuRTT/gTaT8RGHKOIx2qw4FFtU5+gv3yMLRT2sLzdIl+ZvAdkmZEhux\nCaawlgM+JO/3KPnY8T2w17OukYtJO0z07r9ODCDtxH6MoJoJC99gwnoHtsfY\n01DMx4BeNLswGWvcflcIAoMOjMExrxt0vyVYAraVrofPq/137cuJVnuGW/Sl\nGUIZJ5cNxKOsPHKaSmk/QlEbi6kdQDOjDJy/WktunhnhQYx0CQUur9URH1Sm\nURTADh8WF24El/DXp1dwviJGQmv5BCXXST9Fmv5nmRjkjn4Ai+hkvnuMwySI\nxcS7tL3iqxoTIDyZQrO6eS1SRJRFK5SHr+fzyaS4ALScgx9cDCAhH5LquSWt\nLto8\r\n=h5wQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB0N4NQ27WgdmwVbSbfiaBIcIIQ6ELaF8exhW20sO1rQIhAOiJHatQ8ZR1LgbpuMZAal6vpl7t5vh80p/Y4KBQQ7FN"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.3-beta_1557584396385_0.34960020048709306"},"_hasShrinkwrap":false},"0.1.4-beta":{"name":"stb-react","version":"0.1.4-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"61daad260028a3d66c164df168a9d01b309eade2","_id":"stb-react@0.1.4-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-Il5ujH5PBn5bQIL3AKEn+tiYIMUuXvturAWoJWt9WKmh9DwLuXnEaRQrFVVHCZxuQUIEP0fbqrCR3kXJF9AeDA==","shasum":"7580f5541c5f30ece080d1a378ebeeed9911470e","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.4-beta.tgz","fileCount":39,"unpackedSize":573180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1tsYCRA9TVsSAnZWagAAYtsP/iNArq5pa6+zDN+BXjPr\nvJIL6ccQdqfIONskknwE9QDJr3NjL5NsGh7NE9LRSweuLjpQo5mbTZD42a35\nFOcMSFzOllvwuiqxDYq8LBkZEN9iEo5UPR99zD1HFWM1+T/hw/+PUMJJJuk0\nZR59dB57S6Z3X5IqgLuCu1NnmJjmCiQ6HRi5XFmjDT52MHoHFRa09/IqulI+\nDU/flUVM40ZvN923wNpywVPIGqmoxHQ7TJcPolSlPAksAxUkm6n9CIcfbNH+\n4uRiGzghYOWcgRvNxFaj5DttpHmF5ttYBrs7nQxVQEQuapwoiONQbX6YW4LV\nwV2WjV4LNRTQXA6+q/i/+rv9M6E2sNxa1jjAWdOfgKr8yi+uYfSoSlGTyrGO\np3mUqsnK6VulfpdQXUBhuNDWLh+lNPUkq6hmYqzAFKgVFVdEP92fClvytrN1\n/9PBbfKYXQraFLK3ryr1IAA+Si9AnYCMWPTxHQBYW0qlug2m72jQ8H2a8Xj5\nW7VYrCXtzsBpfprs9tDPTqy6WI3X2fFfjE15JKADRQvvwj9MqBB3a/hhzyjS\nrDwbUX49CwWaqxOlE/KDYTkZg86cNTuLuSqyaVmmUAJKbLH4kRubyfJGuQI2\nl3gi8GSXTBI6W25g42KntuQqy/wOnarlOWlw4qR6D6ZtSnxoln0TIeTaKkFC\nbDNA\r\n=Kqie\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjyzJ9jZwR38SDtruoCilJih0Gs9AK03FcG49NhnDKfQIgZvVr9D2eK9Mzi5A+KARSDhZhKGXwZx2/4M7qSar+/zI="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.4-beta_1557584663376_0.6964231544011983"},"_hasShrinkwrap":false},"0.1.5-beta":{"name":"stb-react","version":"0.1.5-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- 扩展 JSX tag 属性，取值 \"focus\" ✅\n- 扩展 tags 属性\n- 扩展组件 identCode 属性 ✅\n- 扩展组件 event 对象 ✅\n- 扩展组件 index 属性 ✅\n- 扩展组件 subscribeToEvents 事件 ✅\n- 扩展组件 componentFocusDidUpdate 事件 ✅\n- 扩展组件 setIndex 方法 ✅\n- 扩展组件 setFocus 方法 ✅\n- 扩展组件 onfocus 事件\n- 扩展组件 onblur 事件\n- 扩展组件 onkeydown 事件\n- 扩展组件 target 事件\n- 扩展组件 trigger 事件\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"b6ed49d0cf25430200bdf637afefe8bb473d45b8","_id":"stb-react@0.1.5-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-XDM2tx/NHPyfgL9UW52WgDBnT/1JBtaN42pGwVFM8VjHMvIozIrnP/PTrll9tyY/zcZEGsiv01CPOg3ZA3fdUw==","shasum":"1e3f1b58282ac29375fe59643d93ce715c93ebc8","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.5-beta.tgz","fileCount":39,"unpackedSize":574897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc16FtCRA9TVsSAnZWagAAz9sP/0H4J1qGwpo6nabW7MuN\nvwsWzME04EEFjh0eaGCBqOh95L38NHHCsNPY34ltFKZfC7KFvf3IJa6IEEOK\n/j7k4YpAQBo5s7zMsRqRd7eLcH3qSFaf9npg/QjxooXkgRgT8n0qKRzfBvlr\nH6Gu2B+OT0UanMmZ4LGAu+4OOKsaLsnmaOSM1BPgpbHT4pAN5vitzdOeX3BW\n72xl2lphqjB33HTzfupoqF3c4W0aabsjkEG5gvpNp+Ve6pbaN8fP1k96ldab\n4aAx7UNKQ2JPVBoy9bAVDMbdQ9aRRAtoNFybXDB0xdCIAq+/wx9SlEsC/nX7\nz8bhJQOJFUPltcOlS75CrNp8TIuDmGMncTEZzIUqUpd5VAcnwThTT9QrV1Vr\nPs9apVhrstZAZjHD/4Y1KtCU/nxB4/6OhdbiN4gv1XqsPkLKgTbWpMn0x/yI\n6qF0BEvi/GnEeA9rCOFIaBxFhEsoDgPtiUOmHJ6q52rlUQNiF/RB0f0DQVsH\ntlI6EbwoONJKL3nkqe9J5arANl3+jYPC9GE3zJnBchouhHw0bGrqArwdUkEM\nLyAFdS9pe9dYkgY4djIVWVvQWlJ6Fg19Rbj73fK0AmuclZhfLpc6knwuMRoX\nCymaEUd/05O1FcgKZAL9vtExAg9pOoWZcdd/N4LANsbutCQbQlscpCn65Rbu\nA5Xe\r\n=0Fqx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUM1/lK1e4eC+XPenjwR1OjsFHSZUA+9LBjND71pLD/wIhAN9pG59Ekrj6BbJGyhOyWHCVp9NnKJnarwbErz3HZ9iE"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.5-beta_1557635437132_0.9965499537332412"},"_hasShrinkwrap":false},"0.1.6-beta":{"name":"stb-react","version":"0.1.6-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"b6ed49d0cf25430200bdf637afefe8bb473d45b8","_id":"stb-react@0.1.6-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-IbuYWB5kcic0pRHK/AFbaT7A9TRA9LRUuhlnPZAS16MHCYavav6wuTD09xEUzrf+rubSxkqiLkqRmVUO9PWoMw==","shasum":"15e6d7ce738700cb837d2adbae401bfc03f202cc","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.6-beta.tgz","fileCount":39,"unpackedSize":587096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc171qCRA9TVsSAnZWagAAb0gP/RNlHrgJh054dkhYyN0L\ndgaKXAvQ1OByP/SriDoyhy8fHe2YBBIJJ9co989eLe14NudTAJ+Y3Naqv55c\n5aPETMKQB/WZJj/TU6gpOZB6x5p6LhimP3irCXfuVG3Jipm6Q/qBxj9/Xnpq\nJkCbM/IXmi0Z0BznwMzIlwtCDyRyJBIDccctFrAfC/+EPGEg0KQ0h3ZJ+o9v\nspD1MqAxs9s9G4eTR/Sa132aSanCqYJSovD99ol4O05saehNGJi84nhOdb1U\n8Tz4uj9i+5L40V0Y8fYABgO8BLgUJJy3ea8M6mkB2PDqP4umorrlFQb6+978\nEnIrQQMXHVjl03sW3F+f5xOBXJuJgFqjgPCX5emVB2Hvh+a1sdVzqj0Eqtj1\nE9bnNCXcc70KNuq61wiJQ7BWAzSMWydkjZ+YjhEImGQt7sxxq+dfKr5tdSBX\nAUiqAkU1EqojQDei8J1HFqbmTl4b3b4Z3X9/cd4yZbhHr+zq0rQp3pVOhWK/\nxUljI9LfmaTjCkI4bNx45f21k5gVWLR/EIKAqFtW6NeltD2oPOCji5pJTN1f\nBMLtCpjgPCvWebxiTL7t/qn/44We4Eek5IqOtoHWClSosxag7xuUJeQJcujs\nOn1bi5U55sB1WN+PWwyFIKw01aHIapGy/mKR5Itvt75zr+w/smVFaOO+fac9\n83oi\r\n=KoQ2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBKphRBapGDvmAZgI7cdMaqGM2Zwa3QiuA/0wzpvuVYUAiBDOUoLvIzmz82mWn02H/UaKUtWe1jVKsZNcx8HQkqgKg=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.6-beta_1557642601298_0.19625700657608536"},"_hasShrinkwrap":false},"0.1.7-beta":{"name":"stb-react","version":"0.1.7-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"b6ed49d0cf25430200bdf637afefe8bb473d45b8","_id":"stb-react@0.1.7-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-8QBlYBDi27idXZAMqRhlpjsX+Lwv/NfLw7JLmd89RC2mIEgK8n2cN74C9NHjSvz9BVneAysWibzu19Rb/jo7wg==","shasum":"49ebec61eedd493aa7965089625b19e0186b21ad","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.7-beta.tgz","fileCount":39,"unpackedSize":587342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1/cVCRA9TVsSAnZWagAABPwQAIFMhf5lnDItK8MfbA+o\nRwmNozkvL2rqGXmnW9nQqFnMXsiiGrgwBR3uzwh+Fjp90syxpamzdvy0ixM0\narmxiK1SHWmAW8nIgG/Ur77S7lgobGWk5qd/yj9uT3PYU3xMSoNmbGvHnwAX\n5nLx35VDoL/aFsnf2K+6nYFVOHMLD/5c3Xwxx2xMxHPsbkW7nD1Cj1ZGWD1j\n+aFJYbzCkopXJvIqOmJUIp8HJS2vNSTfeuomdHSbus/61iF8+Dqly6iZTUs/\naP3+pf0wneOJEcy075BrbplxIwkBGChonZ9zUi1VeRivWoJHTEffGUVbFor6\nCZ5Tx3N3PY6aRMlaKkBtXr0kRWCHBPFIjXXdajQDmaTQyNndc3FJVUih/Xp5\nB+xAgJBtrfpU/kN8v7P03md+mBVZsvyglV3yTLvhL1CF3HGA2pk6T07ohzBI\nS++hO4fKvbYhvxLoW6FAwMHRcrMSw/ixprw7iv+z/qkf9JzUlrM8z3c/3n9m\nf+f87HqxiNqPY9qHxH8uGyrFbbKKjJg97w8DJ1IZ2wmYte273M9tSh3lG0JR\n35yCJDR8I7ExjzkJgAL8GbDGZvV6rCMqySYHiJxqGw9ylhdxvVqKhg1/4Cle\nDXHm4z4g0mypVLdwL4DkVp468C7WO6gxiVrK8rXPawaxtVtIUAEIiQpdl74o\nYELl\r\n=7Ip+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHY3EiiIEpPnvxw2DdHlWRYfTI3h0ODXKlZ9tHrQ/KNYAiAJ8JtwN1NmMHfWu/YWbOmt3iS69MmgutyHcE9ZZN+vKg=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.7-beta_1557657365329_0.1965021260787443"},"_hasShrinkwrap":false},"0.1.8-beta":{"name":"stb-react","version":"0.1.8-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.5-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                         |\n| --------------------------- | ------------------------------------ |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后              |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                  |\n| `componentWillReceiveProps` | 在新道具被接受之前                   |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染 |\n| `componentWillUpdate`       | `render()` 之前                      |\n| `componentDidUpdate`        | `render()` 之后                      |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"b6ed49d0cf25430200bdf637afefe8bb473d45b8","_id":"stb-react@0.1.8-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-E+GFruog8xk8hmzTPwZE75c2DIhi/U2KGiCei4MXdjq5vFkiFEQi3+jLQAH74mvGvt+hBVvcW5+21wvjaja4hQ==","shasum":"51bab60653a438d9d105d8a7e4367bd963175643","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.8-beta.tgz","fileCount":39,"unpackedSize":587717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1/k9CRA9TVsSAnZWagAA5FYP/0Ln7jsKyGFusIN7sDlR\nAfQTP6w6T5Ac7K+ABlF3/IqWAnOoftd0F8BDtzF6y8P+ejjT1PWlsEVw7Tsn\n7cv2DR1guBycFi+Y4Oq6MIlJmjn3mlFoCainRtJRP6Wuk9WsRfFS0wbeVQyR\nKOzTAJwbeVrMviRcH14hBpCO/MJkZ4Iy1aAGxOLzcXmHA3JCEZucYYiwwWnT\nw4nKOZNKsSx8UaZzHxS0BlyWWEFuHvspTcu0vcGMjGS/aQIB3R0i7I864AI0\nRlKestp6ipWTH9BqsiJQMhm7uzPZMZqZtp6fjgmpjEr/NFGu42MecVHfHXTG\n873z1sMh1fkZv0Dly5eftOjsj8DWcBY2kqN5uJ6pxFnu111rxmPcPFzFNTzG\nDQsNe8pm8C9KzknQ8VRDs72qCkRJQhJHe2W8Dcqx2soFXwiHjncMcu+Hu8Fi\nDDzanKHZg4IZ728H5ajYnpb5zm27ml1JKd/SmnM7ANY/yBj8oOas6cYS2/Rt\nrBF+FhOcNnc2GziXXPeReJn4AjvADOezrD/LUyp1i3bGVRrCoFE7Rfghc8gs\nAkiwXxKkdK7XGVADZRWV4TFx73AT4utsv8fViVqoqBeHnATDTMCZW4XuhqW9\nh+sFNhEkZxNj4qjyRfRqpVSzpjXspoJDcckChZFFHS85QvN4pav4bEVAMJyH\nHSyW\r\n=nqS3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtt4oCNqv+h3snz1TLySCxq2VzVr7c/4MBXrW889CTsgIhAJ1RJKct+Ker7y6iArBGyUbzhJcfGi+Fjx0bWqjv4wPL"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.8-beta_1557657916608_0.7070929684611813"},"_hasShrinkwrap":false},"0.1.9-beta":{"name":"stb-react","version":"0.1.9-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.8-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerBlank 事件\n- ✅ 扩展组件 triggerPrevious 事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"738cf9dc7404b4a238b9412fdef995016491b8ee","_id":"stb-react@0.1.9-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-HiOjV0Z5krMAYurm+NFpeLuyG19C0WKtIqa2XErdkz6pqr5dq7lRrAdES+HOF20QN2+L646suxsHttFFNzQSrA==","shasum":"ee7aa174a8b1df4fe83b3a91703fbb2f6b755e6c","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.1.9-beta.tgz","fileCount":39,"unpackedSize":717583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2OvFCRA9TVsSAnZWagAAmScP/2+LfXa0jpc2+B/17xMe\nMI8RZ3rtTI07+ErAJ1wXcVdm82+LoEVjHtKn+q+pw9YV/DSViL11IWNFcj5p\n63TPqw0U7BAEo9UgjAwsv49BJHCZB6tg2zdxEcGxhWRErWW+B7c2O8u+5p+m\n4BT5u8nG168f/BwHruui+T1+UFtGNjByXSd2xKJkIUzoYgw3l6HaakiTjyIU\nX1SEZGJ/mLrcww0TOGqEG6AcKYgrdvK9sjcKKtTjw0m9JSAJMV+BFbNDE/2P\nzaJ8lIKxagpTY0g7aSUBhpbKdnAGc3ygAHEW17s40IU25I502mfP6qGfI+cQ\nKQcl6KiWKwij6EC2CRM+ILDoItVuSR0m+q0bFNvn5ON3+nLW2rL+gnvgBthY\n5/mA0CAaW3a2WypNJO+JiD2+EGOMcaAMSAlNJjhPL7Y6t6gfSNH0XCjpuOlZ\njlHfSaoQCS4vtFwbcaubXBBFnT9rJo9e/s0TbrY8Muu4EJEkaaKH4NqKbHgK\nSzNrmwJYC+9UDhKlUG6/oIXSyakHzEuCIbQi1sBj1pvEmd4jbjm0ctIDzbBY\n4xQklx/ReuYwey+iY0OzVaIbhbbSWBFhZd/shaSBnRXkf8+VSXChI2X2r3jX\noG5chIpBPj1wLkR26ViSFZjN2McU2KQQ+56H1u2ibnVsZ2Sg0o4FQ6/8kSSA\nP2Ce\r\n=81U7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUB4qC8NVZG0OChv2P18jXbAq/sh/hh/Fim9xShv3oGwIgWIBxvDjAS/MYLZM8I4lC2qiRBsrzV+/smGTCBvCEY1o="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.1.9-beta_1557720004553_0.3043940753298606"},"_hasShrinkwrap":false},"0.2.0-beta":{"name":"stb-react","version":"0.2.0-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.8-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerBlank 事件\n- ✅ 扩展组件 triggerPrevious 事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"738cf9dc7404b4a238b9412fdef995016491b8ee","_id":"stb-react@0.2.0-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-1rT+bb2qOud2ZACq25Pz7qMYuby1939jjlEgXNBgwz6mDBFIYcQ7jXSHta/qXoJ9vLdqolUjcK3uY5Mk1XZ+Fg==","shasum":"74acfb85777692a93b2c474d9743bccf573283e6","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.0-beta.tgz","fileCount":39,"unpackedSize":717651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2QQ3CRA9TVsSAnZWagAAH8wQAIiegnFZhaAlNHtPTtrX\n4RtYwBbm+MghI6SJJW1S1hwsXterZchqFPtfj1yy4/elwxTqho6xXTXwF17Q\nsJMMcQRCZjjOvoqcvZ4ydUIsEL3lRSGS9YtVORTyd86jD5DczOTCZ2DfUemP\nO04JlnDAaI6e3wVO3phuQ+FcQlaCcbiwn2av2LhozBvyNvgEiomnn1Kqdk6u\n7UikV1FcWBlukERovz5KRXnF2NTsdagHcSld5WO25XrkDrWofcPcDGWWS/1Y\nXBAUjJfvx7APYL+SDfFcmyDkDExQeQL7yoHNyOQsRbofqFOTtEmwuTla7Sjn\nM+W5TKKlJy9vGM+Mhf0UgdFwExgB93G03WyAn+O2zGpw3pVmYITsROqwNaG5\nKCWimNLbR3H48aTcRHPSj3qL05lHgVjKOMxBjWylPdoXDaNzrJFSR0xmdx51\n31Xj7o9dLRv1A7D3CZawJ1lnp4LfnK2/dwoSdRS+8cC3NeejcVWod4+YU0lC\nj5chgrOwi5sMmL41zU/50H9TAqlHSxiTX8CBAvrmoy8NVxmg9rXobNtqsJwd\nf7IpYywIG07Zs4NZagZ40BVc+m4e3OFr1FytL58OgCKdA9gy0Hd8wg314Hkd\nftSvv9eEUMFvQV7VefUi/teeLa0W2LA85yR1RT8R1EUr8+1kVk7qAIeV6w6J\nOwZx\r\n=XYq3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPxs0MKSV9J7A1xQ01+xBNaj8ASlBPVPD8vuevDmMM1QIgYJ6qFnBf0AMjbhIeIHmbuAMymyPi3wTiviUQoOQq5mE="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.0-beta_1557726262776_0.12288682923494942"},"_hasShrinkwrap":false},"0.2.1-beta":{"name":"stb-react","version":"0.2.1-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerBlank 事件\n- ✅ 扩展组件 triggerPrevious 事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"738cf9dc7404b4a238b9412fdef995016491b8ee","_id":"stb-react@0.2.1-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-1055OjI7nWYfteuc0lNw9iYM48uxAnuOB2jIreNkl9qcpzperfQ6SetA7KCJoGxMvh9B4m7VfoguoDkiKqwr8g==","shasum":"cc9b2de86b3b2def0330d273f60f8a3dbcf8bf69","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.1-beta.tgz","fileCount":39,"unpackedSize":717651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2QetCRA9TVsSAnZWagAAmDcP/RMBzJRjskTuNm98mREe\nkd3/l2U3qO5FvqvWW8bkt81jsMzdOIvaAelwo6m2CI+LjTt/EEhSSiGa+Cm2\nf0TTxUF3CFeXMvf0fw0X6ASyloF+EPfnZc9G8SR4v9ubvudVOIUPMJ6F+wbs\nP/t3fQXu29/NhpZiHIQLF/QCnW+D1ilj/0xUWN8MpIIflqQV/BknZT17mRhS\ne/lqdbaOsQCcMZrswQaELJ0sIA3aCdRwq2cnyrzoEzHtp7BcZppJvVm0zzdh\nc7uqortf8H9Lj5v/rq6QBmGfIgT+bHkH5yGT6AdA1yjbUCPNoqN7fZRaBLtj\npUdGL+AkFfE5BBAEvV73OKVBs5rLM8Kd0vpGcEzb1aWJGUhOol9dnuSRsOx2\nMNEhN0TKTLnK91l6SC6DWtHNoGonQszZjav015yuxT2Iei42UBQA4Qh1+Sbo\nEx0vtjB3FFYwZUe9jtryjfx9VNnVmhTem1hOEp6WVbWKw00tghTOzFAXjc74\n4+lrU1xnivJXPzBCkrwxb3F1kmy13ouHJ7ndCI+JhrtG5S2eTUBgGaQ5NQYX\nwzEiB3PitUy0M+QX3cZwEOAJC35L4TEnKqk+alpe+BHAyjFHaQ2m2Rbam7Vw\n1QGMvOoNi2k5B/1iPljQODjO30joZkAJjhJ6Vix0zLmH+EQVD8+SXAgjrxF5\nLW63\r\n=XDSb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxbVydJqjKzR8ed0oXYjKfKC+kvAK7PpXIVmSxcRJEbgIhAKDTp3jetVN0og8NJaJ4V6Qq0ZP/mGi0JehBzXmMuBs2"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.1-beta_1557727147976_0.8502071667070794"},"_hasShrinkwrap":false},"0.2.2-beta":{"name":"stb-react","version":"0.2.2-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"738cf9dc7404b4a238b9412fdef995016491b8ee","_id":"stb-react@0.2.2-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-4ZEA+AIG+mieamBiN8Jw4rO2wjjcUbOkatgBQH2NY4lWPuaBKxkromhyEfxL+ulg8HL60B/AM8DfBMEesyOXwA==","shasum":"95ee850f408e1fffcef7f40909fa3c8f993816bf","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.2-beta.tgz","fileCount":39,"unpackedSize":718081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2T4YCRA9TVsSAnZWagAAoJQP/j6X358ugyQ58XlFrXbm\nkKGBwQXZzrd0ID8Cuh4Hh2EiZ6vzev9xQ8MnRazxy6k9OHwZERR+bmagbPwD\n56ctwrG0z/61Pxxv1IFA4a/2Bw6c/5kSSCcoqyumfKEx3G2nTw4keUsTp4YW\n6f0tsXwBRKFBVvDfUcDtdM/2/95D4dNRef+OtYDo0HDDdTtU1jkxUHJAE3te\nSU066Q4A59981gaHfbju880R4uXu7g4d3j+Eby+hWX9IqILEkFoCmG/z3l/j\nOebRXM8iTYdiZisTJdAUWBfQVu8rf94QflK9PNv3k5OHhk9KUZOUSRkD6Nby\n75YcxNx/126SWZMgu++F1zQTx7/ChqxX4aHyv77OHQ03gcDSQ66HUKJQHDCg\nS54iOHMwrt3JeXQOAvpDD0YIzlXWElqy3Q+MUh9Qqr+IpY0PYePa2fcQSCkW\njJLlRdl0jyLNiMD6bm5UZ1g+SD4iIqbQKwF8MqLu3O19D7ik0zg9H30EElKy\nU1cSFiK5Z8FKN27PQpzpdaw+/ke8cgkrM4EVqESOWnHM55ZIkszeF7bXTNTP\n1jiVr2opj/zPa1zGeQG6w1WHLfG33j7ldiEszRy99LIFe40PbCGMCMBYUSUC\n/uPGwEr0x+HDU7ciPiZPIWFsOnbJaSU2ClmdRLdXMvZm7nzxA7aRT5RFipBH\njo/T\r\n=tFxX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICnCl8tiviPGubX3wWnwgPuK1MAseVnpENsgyL5SCthJAiApojvi8bglNgjXPe4azcfSbToidtvOlo5ok2hrNdTjPg=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.2-beta_1557741079619_0.2151991747320896"},"_hasShrinkwrap":false},"0.2.3-beta":{"name":"stb-react","version":"0.2.3-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"738cf9dc7404b4a238b9412fdef995016491b8ee","_id":"stb-react@0.2.3-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-WPG6sT15A5cKqA4GKZRWQtyIN3eWUJVb7Euz7+ord7xNuniYhwBQZx1hz3hHFS3OpPikIzPwRA/uysbh5ufQKg==","shasum":"46274fcae211cc5b2589ddb2bdbf8d62aa167992","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.3-beta.tgz","fileCount":39,"unpackedSize":718485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2UL+CRA9TVsSAnZWagAA3YgP/3VSxyRe3mkbgSP1Nh0g\n0AT8K+5NctVReovAxhM/4tg+gQtbOnjpYrd3MphmpOaaBtFIyZcI00lJLh1H\nU+eBW5l2Bz/HEFQcuFxelLu4ZXwYnBbGvgRaNzu/HJJnzQ2KHLSt0zFJalaF\nTvq1V5Zjf8OvrU/RsgnT1doYbnfGJyPBwuV5s0e70oC1JO1RTU3aENfkz6AP\njzWRXWVUqug2ABhiIMU1EfJA3xbcDv6CZpj/bBaszBW/p7pUgs2ZX52tSrsw\nh2EY8LjF6veZ2NNWIwrJ/wHFzYE2chv216kSds88iDzGhoft47aV0trjt7eJ\nYCIsP4nVpNSUNUoSGuM8jKj9pTBxcO9Lt9mw/L305pknhOLYlkCTjT4wjX0k\nqa2gelHsuywYsrcuN4rk/ZVKm+PNGa4tXO8UCYolV4JcbAcpn0abv0j3S9yc\noSi3PpWrrM2vfcPUAf1HF6C+ul8RhVI6M2nksW+x5+pRu7uZ5G4ybjFJMecr\nSwWypzzyVN0qpVwpLi1eLDFtBcA73MYoA0yUj7bkOOiMFJGjXmcl+W62WhiP\nW2fZ3jUBwhMm96ZFZSd5+l6JIA/fPR4k2qsTGPBVQyauiHtGKT2ex9WdVOwx\nky8VgfaWw614mBuA56JvObAltBcABFtG8stEJe25cZ5FaqRH/Tnv1NgXk06e\nW12x\r\n=8diL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw8MaqamX2xpdVBbfEbOVTIOlTYegBoB4DQ5rn8MvZsgIgZxl7a7E6oNEdBmqFf/lMLDgC00txK8KYRdBgcm7XP2w="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.3-beta_1557742333700_0.4009189974414644"},"_hasShrinkwrap":false},"0.2.4-beta":{"name":"stb-react","version":"0.2.4-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"738cf9dc7404b4a238b9412fdef995016491b8ee","_id":"stb-react@0.2.4-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-A4jDJvsXPex8tLKCJNTCszv/RPVpyGrr76GH2vkT00BbhCCE5+o+Z336SFGyWqjeDLFsibzbKWo6IfUPSe/jGA==","shasum":"5b950b08e9ff1e141752354a17112288be8cbe39","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.4-beta.tgz","fileCount":39,"unpackedSize":718684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2VfBCRA9TVsSAnZWagAA50kP/0p77pLW8T8sGUXCns3C\n8ukeA0VSCng5lO0wAEG/qAGT5VcZ+kPHdFcmmvL4AKjSzA5KRm+ZaB/sgbz5\n08qtXePgr7nahedMlvSwPOoMgJwgOQwEp4AzfzaG8fuUNQiutvykzfdUEPPZ\nFkCbVSmon+v3NmiL1nc0bZ1i9SIqjrQawNAyji2GS4yyMact7ImRNf3ukDoy\nW6TVmUUxWQN18ZeyVOBjS9Yp+fsNO0d/Kuwt+M197zosKR23pwiqqjOgouzu\nFb6o4tKinCFfHowMPAnjhPTBoyBXAkjgh4/Pda7ezrg9ZZgP/8q7fAirlh9H\nDowzjD3qL5jT+RscsG0lPhHscPhryQXD5CFmyC9z31VK3e9V8Nn/vc9ehz8v\ne8cwWHAK733kS97Ws5rgXkOVWiFSXqCSIk1JqiBNRprUYS2fOWwJwkqx2bX4\nzntrtMRKCJKekZvUZRP9Y5ro0i4EiKQrI0TYAQPtruwcyJRGR5J+lqNEEPmy\n7n23CqoeByW1eqElK0ivgzrxdjSYtWN9HYVZk8qv+hRHrHJWQt6C3hHYE49N\nsTOel7a3J0gAZYiXAk1q9Jzsr8unwK3WuC8mpJ4eiO0je9jL7CG6ZwxfW/yH\nm/3bj/j1KHb5d/HWGq71LA55FQnOZW5GROgkeBbJ41ejsZeRClpKUDtGtHa2\nzZN9\r\n=dCVb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdPFLrJndnWXo1B1Cv2LWRVf6KMPdolRxH1arS10Z6ZgIgNTw0opSMX4wOFU6aivSOnz3Z4sSV971te9DBVFrYO34="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.4-beta_1557747648592_0.2793322026317482"},"_hasShrinkwrap":false},"0.2.5-beta":{"name":"stb-react","version":"0.2.5-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系\n- ✅ 扩展组件 tagTo 属性\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"738cf9dc7404b4a238b9412fdef995016491b8ee","_id":"stb-react@0.2.5-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-qhNn9gr/AwY7aWH0vDMaNGvAU4z97DVAszFExTcjotIemwDokhai1epU2nf3ccdveLAoSoT9Jhv7LU5p6WTEoQ==","shasum":"181b45498eaa211215e44afe14f2fc47d53da490","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.5-beta.tgz","fileCount":39,"unpackedSize":771620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2XeACRA9TVsSAnZWagAAywkQAIcHvodIUtCcE2a+be1t\ncsmvCcUc+nUP0NT8m8cVhLJf/JddCgZ5MYx8NUM8H078MLYCYhHszhSoyTXg\nXb4xZLYT+PvXWNLUqd28KOdaz+1tl7ioSqiNEz+xvI00tYxW5hqcGlYvpPg5\niWzJQHLCeWD2DVSNeUw0YahxHkMYKdm9Zie+pk3zsh6jtgxpYIMza0O9aspL\nLvhIrHJK1127U9vuQpE0usiIBcVepPaabeJO4aiURHc5whivakMmNOsNA7O+\nv/1QMywJUAoBsnq8yCGc6zSKXTi/nbhnPFRMFYdso2BpG0qIr1SaglXZxn8Z\n0p+ECp/Z4HlLUUvpfKrtqDU+rMoEFmSedSn1O+N0AVIyfbknUhdRZqqUJLWF\nnM36RqC5IxvFSVHjj2fcLqwNV3SynLk63rXca5RLW8HxLp3DNuw1nBdXiCpZ\nA7+mahVowt1DgIlWpqLF687tLLd3PNhX45diaN+dWK8go0I0EsxaitzyXZAn\njwt7VjNjHlUpVEkKO9JMy+Mef3SbhO9fdEVnVSpocJi6UuNbmJ0vS+VG1WIG\nV3vZv+lxEr6dmwT5IZi0UDwZd7PADwni5r5frk+Apd4kqi8g2KjhcTxWUN/I\n2Oap0GbsfJ4tqJ38m/ICFnc2aLcZt9O9XoGmFMOoFR8O53g0MlH+DQ8nTf3q\nRJ3E\r\n=fOIm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdFZBpp1eq97mShHFsI8i9EMPCpU5qlGd0gO8pDgrJJAiBMArxe7dNtY1UVmkP2uuM/PaPAo6RTw9YnnILjj3yLww=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.5-beta_1557755775984_0.31010767061200517"},"_hasShrinkwrap":false},"0.2.6-beta":{"name":"stb-react","version":"0.2.6-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.2.6-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-peH562/yczjHIbZIeip4/KNXlK/+UyDjGbOgYff5Y7qexItVon3vy9YooE3a0At8O1dOsN9/ONip6Eq/JVl1VQ==","shasum":"ede802b8c559c393ee651033d4fce76e67b289f3","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.6-beta.tgz","fileCount":39,"unpackedSize":770127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2iAPCRA9TVsSAnZWagAAiBAP/3C8Xy388U5uWsLDweo+\nTi9/2Vd7atqUbAziunkiJMbZf4EmvjnGCZRFMKeTOvdFPRuHqkdBLP0siu3E\nYEwiv/cb40cITbNs62k2w1WlxpRNZ0rPeaUdDo2W57iTPc2PqhTsK9+W3CVS\nx9NNGvqn4eDruRLhUW0aIz4VkjIxHaeS+2EcLspfnlVJQkioaCl+gXflYeuR\nDepcmudZlZdATn9ehTkMk+tSoGfYLgW9E7CaYyYgzZW8YHN3sFBgMkGECu3v\nATvBQJZ1VOolRPcaxdsyunzdMZxNawhHzGWwg/4PzY0S80qSzi+LjINwFPq6\nnh5TZG+ikOY9cPmyqfNT0t3HDAqSQRtMjFo31MmzFSQ1+pf2PNE281YbYoTx\nuW7BpG566y2pdmMJmxoUMhcB6tWAHR5atZWuLI0fMKRS4zBNTefJ+Zyjc1XJ\nUOnhJ9+buH+EbdiXukyqhyHvDlBNEkh7zO5QmICo1I7fbPuY3FzFJtq5tDSJ\npeXod1RpLY5H8uhVqrEfX+f9pPLt8P+g1FMMrSowxx4z79MPcb0JaXZdx1IB\naSo4BE+W66c2NXbh4HRYq2NF1jyDzSuKaFJ49J88BOG44RDzS6qQNH+r9n/x\nDABlR9tvIq1sCDYiHWYtggli3fzlZBJNiUo22+1knd+TBVG0+z/y/MSv1P36\n+2xf\r\n=KsGX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF4fw/T5p415MSFNvlyEZ51PDqPlaMBEWLfcNPGspNrTAiBzH2+vYFFB3tZpQCgTlwoCA6P9rB+X7n3YpfbXSkB/RA=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.6-beta_1557798927059_0.0019211058699550865"},"_hasShrinkwrap":false},"0.2.7-beta":{"name":"stb-react","version":"0.2.7-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.2.7-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-9ce3u0uTxvcN1OVqG9wyrE3eAcv3r9vzwXN8yzCpV9H5K5Q9yH0KthFA3P0zMJeZXvZL4FWvwD0GYS6JNPwt6w==","shasum":"1f7ec326e09b4c976afe14fb39e9b14c3cfb495c","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.7-beta.tgz","fileCount":39,"unpackedSize":770201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2iE1CRA9TVsSAnZWagAAVQYQAIW3ftxYIDdxz8dVsv2R\nlR4s0CnLoEJnZ4eTEFMOklyh6RSSYLXDW2TLDiZJRT0W9yLKQe6FPH2T36L8\nwuQeaZuvp+DBu9IJLTrF+K+R+HJxygdr3LyRcSpFV6azp1goLwbXAHRC6rGs\nW11S1SIllkbmZkbGK4+bcCQjMb+xVooE3C+9S1FG3wSBjwfKZowiOKdUrDAR\nlxIeo2n9aK+9QfGmSFnqcdJN+lDBXqkclZNUYv8aMv0MXPuSa1NBwF5Z9Hn6\naCNbgcYvUX+nOB/G+DahrYGWUPKdbzgHBnZY3EvsTNL+W7mMxbdXrEaj6lSq\nDhK/r3yOPwRCJoCl79Z3rNJ980ZxGG22D02NsiaiO7Mgv0g2DQKc8wAjcReN\nv5Q6AYT6YK/D5/pOKxIwoiQp7E+BBQLndD1w6FGSKTog+P/Yv55LQaZlKEFB\nz+GX7iOiBUegnYEfePTgEvNUMyxusO2HTU5pIRxjVdkyISgWvuOujBPZZzGV\nzDURsBI7dXAwtaLL530M2LiaBmHAJCRJ699IJc2V8nZ1sm7mxpRrPjxC+A40\nBaywM19qlpDPA4SnGCaURwUDyzaqhIgJLkGefYWFHywBks3QBVobfqnei6MY\nnpLZJX2Cy0smd4cHN8gvh2LXwglBE1DhWLH1C5i9OapvoBo52m/92HmkKXKy\nK+lb\r\n=iRq+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUzOjyXPSVIUfvZE8IPExnjXKEn3SkNh6Z/3KApUVhigIhAPRutBDkiLg73IYiN0eyoFTOmaoy7UJNELdkhryZ814r"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.7-beta_1557799220551_0.5543742871313364"},"_hasShrinkwrap":false},"0.2.8-beta":{"name":"stb-react","version":"0.2.8-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.2.8-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-pRaHJ6MrxX6mD1xyHocUrG9+wqqtV9H004iQ18bHkASKTVTE613tLDReV8iSzf4FEF9O5zKMxzo8lLhr2EMYew==","shasum":"c3ca35304ceb060e73c781647b5dfc0d94e824fd","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.8-beta.tgz","fileCount":39,"unpackedSize":773277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2iWtCRA9TVsSAnZWagAAW7AP/2uJAUMXvMCknUT15gK2\n8DK6Ijin9bnDIq+CBzfzfvlrcV/EO3mS7LwrD25kEt8d41UWKqhLb3K9sNAq\nv7YHCVzHD8ncZgFbKQQcJJFRPWLk24/WYUNin812e2jz0TX5Itxff6hZwa1N\n9vvEaVU1kN4yKvehbIuPxS6yzwKuKY+bOwIQkLk4fCd+d2ZMpvIffkTopClt\nYBoTRUxGp+pEVNJWYNgiAoFfvtThHSse31KPFZywNts+On2oUI4CNGgo32n8\nAtr4NOIdroiKqOqXVgt501rION1unwODb5hRAjSaOsyfhrZf2lDzn+/Ip3ZP\nfBo85t11yKHnxZ4PFYrqUfsQ5F9sPtpg6FDNrNnHxQy+5lfGvNRNl6Fx8+SK\nPbSs4X4lZ6ou3U8ncCi6igLJXpd6K+NFMQUHg8PjAjsFrUiTtahlKclQ/kJl\nBPzzUOa09zEiUysOjL0KIVBQ0RNn03uv2kZNxCQIEgsAyT40e3riAaEe+Qf7\nYP5FNDzga7rlaQaz6TNq020UBvH/cQ9ryUjm8yBhR3kOKOV9ja9aRJLrewzG\nHIOcxwD7K96s9Ig5nxl7In3aAS0jAbw0q+UTEONY7XLaAMedtypyS870ZSPu\n7lg1pDBPl2P4bHosmTT6Vlp6u+f/6E1Kg5JPtogPekR4MRpDPUf4uRJypy4I\nv+kb\r\n=4p5b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDv7KnXkGWq1WV2FMZjWXSkBca7VakrXVlxI6CShSx53AiEA/NvTLwptPzk2nV0XzmVUNkHTUHe/w5r84vO/Dh8LxxY="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.8-beta_1557800364878_0.4514133350794314"},"_hasShrinkwrap":false},"0.2.9-beta":{"name":"stb-react","version":"0.2.9-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.2.9-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-4lDnl0arpN5qpSyrWjf1Ao1ExryW1fMxaiBAMcnIJOx1jSc+4OoaH3h3p1ClycDt1agWbcMinXGhaAHGR3f0dQ==","shasum":"32031b6716a9445d566249ebbeb4edb21ca1b9ff","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.2.9-beta.tgz","fileCount":39,"unpackedSize":773215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2ichCRA9TVsSAnZWagAAhMoQAINC11hpOra/kldHGT1q\n1P4CkgnzCZ10brB8RXItHyC51q5LwFhwxAqp2k4pU9kDoq7I2v0dUQDYfT9w\nBKvmIW42D7wff2gxPikteKDCkeK/JUqJuiGYomcE2p4l4vGlgClU5EJu5lYH\nVvGYVcpAjxLLMi/07mGzEVPIx2W/+LTlwGyhRwbS84uX5T+tVzbB4ddbnXI2\nzRgQO8DnK6xj8jp1JS4LW0oMlz+ffMlmM5UsG7kaBZyAaKypDoDEtNbx+AYx\ng7Y2U4deLUP6Udi85/w8FsIa6npGuDJRb+mgeQ8K1n4Bx6GcWyZtYxMBoekU\noKQohjrGu1zXiYfBxMBl7zxC8wPS0DYIljYyyE2BOMpb2MEEIAm3vHzLir4l\ngMVPk0HXcC57OYt2h3rrn+Jqz8mh6kKf6b9+TX3/Z09Bvjd++6caHoVGgraJ\nEhn0nqjJ3/p5BfU7WMk1CsgNu9TmMbgRSbkXDlarm3++dBiohG3p0gNOisiT\nmrik9woZtuLL9HcVe3kUDzxBdKcGGsWUxWsq4tOsa5pZDy6s1eawdpANAyJK\nfFGJ7krXjzL1s8FBsiqZNIE0YgmSCb8X3nuAlvQtKluuOjQjTlk2cuhiQH6h\n2d168GITqXoIWPjyMOCfRUqW59bQDSqciHHBMA3tguvgirfJ8IIjIuyU9gLE\ndm9l\r\n=mkdD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEGcAJa1pPOLzfgWHroqqP89hlqLqZuhJD8eUI5x8KiQIgLnbOPiejn75BUGq0qn3Ydpc1YORkX/D/TCeBnJRmoYs="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.2.9-beta_1557800736606_0.8025091371498623"},"_hasShrinkwrap":false},"0.3.0-beta":{"name":"stb-react","version":"0.3.0-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.3.0-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-iW4D5C47TwcoaQzO9xtN68uXibpprRt0eU3X86YkeCEmriTjO+prdsRR64C+/aXUjYmg7iBTB3diwH+HFaUVoA==","shasum":"26e0fcdb01506f7f71f2f92eafb9ed774c734e09","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.0-beta.tgz","fileCount":39,"unpackedSize":773403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2isrCRA9TVsSAnZWagAAzc8QAJZcx4nKs2u2mkGcyXPW\ncYqAx04s3T/DmE2nX90SYnCQmDC2xsA7F5IZqJtSDmNlmtpv+24u8dSrdX08\ncgv+ySkitOKVsPmh/xcvfXhpVIKW5bMql7/D1cshwcAL+iM10bBTjI1HXgD5\noCdfibWpszdhfXPgMlg9KWn9YuXoaOzNrfc51f7UE1sANM1qHvzDfqggZjRW\n8g8xWNmhuryxtg3YdoKUrxrx7kaXJqhLEWM/gd+I3UIKGf8lpaHPfqBEhmWo\nX2yC4s15UCzSUC1lyEMZ8lNbqmP3AKv2j/lXYRpTJ72m+4f5sR3aPd7Posoq\nQIKOY0ugnUM4Zng6j0Exraxwl3rBnnHwJe33RQtuTuf8F3Cjed76xKx61J3b\nLcPjtudx8ZhZtMnoVU1Ua4XPrYlQYe/+sOapuf0iWqiCk3aeg17lke4S1TWp\nD+zDGLUmil0mr/vQJ/CD6IONDVPMsB2zP6ICCEQBVEOC13RpfUu2NFoOVKHL\nfsz+CJwuWlcPFXeDo3Edzg1IYIbjTIzX0TKRivtBJ2+UJiRV2tqtgYPDTBwE\nuWgZs8z10LPBSIPb7UjNuDw19Dj/hYI7nPnNMq/g9owI6K7wJV32MZ7IOU+F\n4zg9mrJZ9NysKsQsE8MyXjDBmoBGP/3MwpC1Alq48JC6nZDjG+1Kt//bjDSG\nYO9+\r\n=xOIh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvym5ghJRERwE2RfSYTVatN99jCIB+opPOAIfYw0ezLgIhAMCwbY16/F4cSTLQhN3eehyUtYHXyr/oTDSz7bb6yyV1"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.0-beta_1557801770941_0.2597735710953255"},"_hasShrinkwrap":false},"0.3.1-beta":{"name":"stb-react","version":"0.3.1-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.3.1-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-sPxGEOoLrwkDzzxN8kfwnSpgZ2vjmzOeT3eQEkVujNxFhgjkS104kYtGSRrJaXau6nPrVSMfYrwtADdvKwLnWQ==","shasum":"3359ae23e9488f4df7ff0c66476dc00315333b12","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.1-beta.tgz","fileCount":39,"unpackedSize":772748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2i6DCRA9TVsSAnZWagAAAn8P+QEVEjiJI8w6LZVA1ncc\nIGfY3tcp1MpcgbvL/uhKJ3kGPMP3w+8vAtINNur+Mxg3cmScyp8YSLEi6XsD\nm02cilYoPENIEq4QaMDI2OZOmrYBMy68lPSx7VFi4ft2P+25CgYMl8mIBqHW\nkKvL+MM7pCA/ee/dt4RMGbrY/UbFHLC4HHl4voOgcqvaLNwdVoyWEC0L1FBm\nGGY3+uO7Y8KV3qkFSz7wCIKYgpFkiiVsHqIwdoxbhWVKHOTvXykfE5EhENcJ\nuNDFypETVBR20zGC/ISiPSqiP6x0cQJ3HbsGqmxAYijyGKew8S2FUzT8c40R\nxRhkrBZzwaioGfot5ocPYO75slMq4Cb6F4cRdLaS0RGKzX6pyOrYlvLzPe4H\ni35/BL3Tv2vu0Do8rQUlke85YvgbvKY6CjD0oHI4Ty718JmXOgclLmcMPWVZ\n0d0AzBlFax4SbXxW30AG3I8JdtYgJslRoMl2Qqfw43DwaesEiSvTSgBH+Gi3\nMGC+Q9+FmIk0pfr8MXdFGowE/zpeyCQXoHRoq8NyQOXfAtrpqx+ImKmtxCMQ\nlxF7/diQzdw7kjQDdZZwhF30qOU6uD8AcNdGuAHKSMEyzj11BUjA5L1roz1b\nZrpYqQoi15E3b5BMUMCPRbrmCAtnBBoG4NhOvFYVgarwKCHensnQ9xT5M0qN\nROHl\r\n=J/dQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqNFal4oiqSwuWSo8WPCkxTyBr6I7iBCXRwnOmlnS/aAiB98pIbdLPI0K2UbaoKHxmm+4QF7nlqmLPZyMr/enqPNA=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.1-beta_1557802625985_0.13646617947165085"},"_hasShrinkwrap":false},"0.3.2-beta":{"name":"stb-react","version":"0.3.2-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.3.2-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-4mpgbTIkAEEb6dB/L0sxcDec7b4PQSaOxB5MY3s9R/8uHeWWehiGLSx+hpT8wL9/D+PnmT5UM/kBTKxDtwbLrw==","shasum":"648efa625003a8222908c39758ab4df15ed87b4b","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.2-beta.tgz","fileCount":39,"unpackedSize":773144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2jQ3CRA9TVsSAnZWagAAmLUQAJ3AkjZ3TBnSseOUvxpF\ni4I/KJDQj7lLyay77E4XLtuDfYt6QX4WneLzHJApqvqnZ6LjD0O3C4v+dszi\ngEEy5gXC1dc1YMPy6c74xxtFRW5poBYAWqg+rihWuYWPKMgEt4cz712KOzOp\njHolb8OP+USNKKZPh4d0OdnnZroOo1O8a88v/y1t6qGc9Ajh0q/FhsR0+S/h\nc74EQnINcAaZoTw9BgY6oWEgLwE08Wfkj0QnCRLNXw+Dwq1ktY7vTMZtzMso\nlZEzStE3kQHHPXh2x3E8jZUiUMkJf01ed0f+/q5aKT083h8PBday6FwCKv0b\nLkRTq+5H8akTEw7BcPlYTCnLoWgZnR9w1bhhphjKzLCjQQpxZNx3SwPu9qlp\nl5wcOcrZq6B3p09kMVmESJPBE58Ki6OWlV1uW/Hdf0PgdmtZ3pIcYx896+bE\n0V+NcyG/v+tuhuUCinUJFEYAvaB9DwQfXPxxFSNAeIfSnIAO9bqvmUx3B2xB\n71+JgfYPBaysdgGc/lFwnK/e6gRsu0dsphThnhXnnowM8J9c//JElIvVG8Ni\niLtbVn08Bmob1kh9BJGmIaEJjuMj+DquU3y5MezmsGZVI5l40BI04xzLlB3t\nxMKap7uztiA2U1oeKmUqVkRp3wdx2K62GsBvB3a5cGUVfOTeyH1TVRr5U+e7\n2fve\r\n=rBP7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzhiw96ctUgWi6PQOqYvR1i+RN+pPUu69FoXBer6DClAiBz4GXZyx4VXX1UzDcN9vLi3vdmJaEsm+yjEJ2QQ5JOXQ=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.2-beta_1557804086947_0.0650819029355163"},"_hasShrinkwrap":false},"0.3.3-beta":{"name":"stb-react","version":"0.3.3-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 取消 扩展组件 tagTo 属性 identTo 关联父组件\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"25956b068c0590f6ccbf8de12039e5414ac4130f","_id":"stb-react@0.3.3-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-Q61tqKEv3c1lzokXlcXQGZzRAxv8GucZ5u2R/pLWPlnPNQGV1Ms3fJ1ZjDX4XX38PcZ7nTHg4KoWGj9Fqzti4w==","shasum":"c99e245f202d4f447f12287e1a3f1c71563f5a43","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.3-beta.tgz","fileCount":39,"unpackedSize":772994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2jTuCRA9TVsSAnZWagAAy6UP+QFMJz9NtFepQopZA+DH\nB/2GVY7JcLWMjm6LUUMEKP2BoBqnWPC98eaihL80flbafu+bxc4AI1qeQIKp\nANCBuQ7h84yJcGTqohcaYTTh5ptIvGEURT/vcNQEnkDb+4gF84JQ4AkJx2FA\n+DVHHSL1ievYwnAjFE8CNEnx+VTNnrfPQ5chXEraZkP44T311DEreYOKIDpY\nao+Fvija6pAQwjEKHsiGjOmyJWhpwWI8U0CLLf15Xg69uRvatGPBx42Vf5Cf\nYNQRrx8jfDg9bcBNe2EsGBjqfcLRqPo6RBMNRn4XJvwr2pSHE62bvzanRcyx\nAH1xd2hX+60dIb5/zgNuQdQH8aRx7t+IhxTIRDlwJjSSE2UfbmudzFgusBJF\nQeQye0PXwgPYWYT1eIKLHwUvGd0KPcDgjFngzMFC7f5ABgFcxk5HMSweF//o\n03tiE5LBKs57dUE0ahdgrOivEO/fwNGb+2WYK13V19HwZVs8B0bFmommQm/e\n7C3F2Up28b4x8pj0RSO/4OuW2jal5Iijlbf5yfUmd2zSNUzqwcfKDQInG3cq\nMY0R0m8SW1gQo+yVya/+wSCOYkbHJJ1xHaA9TGEsczMGlVCxRF9zAEvddHmQ\nLx3AswnnBtXsSzXP23NlEEFPn9kqW50W1HNhYox99zVLbKTmShfsytJobfob\nR8SJ\r\n=ZQQp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEc/AEJ79P/w9zk68jM7xu/fbdvzeUxHqElm6mODEC7UAiEAm4cEOfjT4QWuf9vXjFoZtxVJWSqiQHRR3pUxyNvSKig="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.3-beta_1557804269783_0.22371034633533382"},"_hasShrinkwrap":false},"0.3.4-beta":{"name":"stb-react","version":"0.3.4-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.3.4-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-rxhSdfTbGDhMUzhsk5OY9yqCOE5Lci2es73/tjMBhmNqspygLGmnj1V6uZtm1e26IxSA1qbdWPNApSbR0OdglQ==","shasum":"9b5c0ee140805ee50a726c5d378a457325036d9c","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.4-beta.tgz","fileCount":39,"unpackedSize":774290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2oSHCRA9TVsSAnZWagAA30wQAJNexCtxgM5XbRVCDHjM\nQt2dLvlF1YK00Kw89nyDbt8kvloJ5U4AyeOJggre4UdU69G5ihDGEn2do6MA\nBmxjsS0EJZ4wkHarENCxcwT0eBfZ1QhHv8RFGDlmwfCT/PLaqttAtZR2PJb3\nroAMcypep7ZwOJ5Kq/77e6XsezPDY18YTS8jadLLkbCqgC0Z1wNLTchrWqO0\nnJVlWxc1gBJLbotQIDxC9+eOXUzkRkvMKBsVFbClSlUVuN/FO/fFGDe30Aav\nvHtN+d6Ef1dTgeq7QhoqYQ2wO3GfgWxO/ru+O8e7rbO+eL8ghEisib9LY93i\n/04AV2WW/4qRuB/H8MAzIZEIlwAYsnLwpv3oXtAzDs9S4Zb/PNnQmqhPUdjl\ngJn1eVju4tyCtzk1j0ssY+iRfiuxiPGQW8cXwJmzBnH7vPj2Kkg4hgXbUA4a\n/mKEZ4xw9x7lnWHATt89V7kyv6hprdE5RMcA8n8Fh3KbF1oKQmplmq1E9R4E\n80izWaLeyZoMgDvmJOSUMcuG0Qp8qSjacFY5/WFJwTAyfJhGqjUKFeBsOpY7\njMYkXUoxm73Gi0ZTtv6fXHg7cb6EwvDnyXYdm74gDAC/HaS0X1IWgrzcusk1\nYEhScrhgTEuaEwVfycRA0mAjL3W/Aj8cSM460b5C3E10C8FDDr7oIIT2PBXR\nvZbP\r\n=sqIa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAecjEfg9VfFzoN/jNqgZAO37dV1qNZu1h2t/wqPN+2tAiAMtgiCLeDhHUTxmSFNBcL1RetdZKj5OD8lHf4rqZPVZw=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.4-beta_1557824646065_0.710549028770141"},"_hasShrinkwrap":false},"0.3.5-beta":{"name":"stb-react","version":"0.3.5-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.3.5-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-Lu8/wuK1MyZnYuX2F1UzNujrgiv9IPMxPpOlQGLgp/snRS+MImt8bb6WK/sZAw80FiUCLqUbdWbVBcnacY9qug==","shasum":"7c0b2b7ab06f1dcabad27adc020b52c1a5967908","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.5-beta.tgz","fileCount":39,"unpackedSize":776204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2oVyCRA9TVsSAnZWagAAAIYQAJ3PYzz9oczcaeKRdLqZ\ntjE2VauoqLGZxy5gs4n3CxNPcOG+R+ogKwgLLkpjmk4NzV2AZ+05mb6RkSFz\nOObrQ1SvpWeB2QeVHeU9vb/r3YaZ2fJpEViVm2pgQo9gEmSVvSZNp2st/rin\ng0Ztszz8Kbgp1kAp8MqUsqa1Qof0p2S+LjehD7X9z4OHikajHyMfV9mPrSrq\nrFR7qMp+mdReMa4/G4XqgWamh7BBih6cdJyv8s/7EsUHq3u0sjxD9dpQOj6+\n3H4gL0XkOoVFkwKTdd63MPQmoHkrZxkjghtVM5fns2spB74R9Ln6PAKK5I6D\nYwxzpmgo+kRmE/NjGkARWdAuQBM+vAubkO4DrN0jA007Yz8AVvWb68h3DooI\n53rxW3v9prtM1Zfk1GF4XjG4oBAi231EDs9ACX+vBCC7uX2o9ktVb8ielMO6\nGXEA/nkNam/mmApMgBS5gnXlScMVbR4UT3qPegc/EvWjrotV+HD60G/Y4Qxl\ncy8gH/2m0fe/bdG+DBtpWjdQY+sn+p+SCy9wN7yXf7FbFXZQbK8Lrz6HHns6\nNiw+MlBEV5MnYdK0uFrIKxMLRnUOYJ05f44rvppnyz/CamM73IRVTXrZSfWg\nPH83EwdaIYIYjSlnb4Vpiz7JD5IEWodJY/whXHDm6MHbXPkrY2NuY7RxMs45\nASeW\r\n=dJh6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEsBSJ8IdTAHbe1FQtdJQkpXA1yn94pweuginrcbEuc3AiEAstjrfD3Q+SSXjHJtsig/NZleA8DyLnhFEdL7+BgwY2s="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.5-beta_1557824881664_0.24203345463016834"},"_hasShrinkwrap":false},"0.3.6-beta":{"name":"stb-react","version":"0.3.6-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.3.6-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-ccQ8GitINGTddgvgETDNQVy4z835pz3kRU1uRqrp+0IT6q+APFuIinh3vlMBzALK7lLHfcQijIkHs00n/WzRRA==","shasum":"93ceb8c3b95b334fc669d7593f34fead39392a6d","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.6-beta.tgz","fileCount":39,"unpackedSize":777271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2o45CRA9TVsSAnZWagAA0SQP/jin0zvLVoUUawg160GV\n6EBthDhybBsj7JP5RGEQcqy06HiNdK+UXnfIVh7QaMQRJkr/DqdiHoIzGe/x\n1lALKetS2V6xqX0q0lnysR4QrBgMqjeRekqsB0lI0VIz/rKR3r9SBVY5pqW7\n2V/g973bR5uqTmC2oML8JzM61RttrmtrcPVh+t9lgBPOyxjsv+p7nf8Bcxlu\nJIZ7gYiSMZAS15wo+TDu+qXGpwCBd+AgemyNgpxpodPXfmO1khM5tvV6Faf0\n5VRNKSjXwQdKZaYLWpA2HcN1R7yK+sLlzLTdKlc88L0DYSPlc7/+mmEh1Q4f\n6VdfmOEtu2wSWAsRXWHQWgu3fb4venVKUXkBw+1FTfyqEa2Y2ClDYN9Xgu4A\nHfYceG+6lHZj5m94mspiw8d5zZpOmqYjQcdyQds79diuL3Ym0Mdo7lamRpjf\nDVoT6C+WhlkyCnih4ovwWriooBcDvTria8LeiuWYieS50vJ72C4dhxolSXwK\nGld+xQZLddHKYN8pr73KPQF+JZp8Y4q+Ae0+V3tligXZMBJZNi0I8TJBkRMY\n0rTAn1meGFUuTrGbkRSjYvn7CqIPuvOvKbb+SgeiR9v/mL+UKuR/qtJsiMkR\n1HONRh/JdO1/Qf6XDT4bOvoVbnMu2Z6m8/IGISyAOEYbg6KmcUP86MXJROQM\nzibV\r\n=LtGY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRjiGITes4fqXQBPmeW8hgmvZyHpCIjJZ+McimYRTihAIgUOFq2JYwd8IlPoS+jCB+Qt+ItsAyx/f1/PHZjIPDBGo="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.6-beta_1557827128545_0.556736804845434"},"_hasShrinkwrap":false},"0.3.7-beta":{"name":"stb-react","version":"0.3.7-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.3.7-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-ebdriwbYyr2ME69/cM7EID3jqIk8bi0vrfDEQzv+ocR/RSkYk8Ftog2sGdyqKUKfTUtQzOWTRfbN4PowTsPh/g==","shasum":"5678998298b2e8b36fc8f33fcc88960102328a68","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.7-beta.tgz","fileCount":39,"unpackedSize":778672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2pLoCRA9TVsSAnZWagAAhWsP/juhWANRss/8vGIdZ298\nyMI7g52mzOejxn2ce8xmCPqPwXJdqveE6euC3lW+uoxzrVdMjeO8L3a4BdvB\n4GmvUe1Oe12AJXBAVByLxvEqaWhtD7WwHbJMubSEYdEnW7p+naplHA+Q1KU4\nZ8ClNDqeI2bdCLQCzAuP+aju2GcVo4/Gyj6721PVHYNHx7IF+6x6Phz7g+mY\nKWoZ7mYzjGwyLYcrU0l6EIMToGdVygHHtQ1weUIVX/+/hGJMVjVxjlHRBX0M\nAdUAp+mcQEXUVdtpdppN9Xc4q7ALQXNdI0vUentEWw89htajBLUbf6CISO7M\nenHg6dxaPssT4ZEhNCOixN4Hc2SQ11jhZAMw0ccmAYL/kWe+zQSBMhWQpEeD\n5gD8mmch9zYNo/a0E8PEWNGARPcka+vLqL1cV2Nu7guT2LB21UB4aYVMcIrG\n8bbQLLHPu5iSODYqY13tC/sV+VEHMxOLE6P5YT1em55P3dSpicQ+OlGoVXPY\nnxVsEeUfW8FbrBVG8MCAZkPH5nq6DjnZS1/QsVU6YBO/knfwn7iONdKre0fM\nlgBbh5gSNCaOFxNtnFTiIlLiodbgGMKLvcrBYHbpoEOMVxnSTXBesHd3sqkl\n9cyEdRJI+BY7pNdVJY4IE1QA2A5dq5tHyJPhCFjjt39mWe2sgeC5U11Z/mv9\nRaTc\r\n=C1/g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEeZxEw/oLa4D2Ej8HT4uAy/1h4eQUpNnF6O2uKdAoMzAiEAkqcM8JcRPH6W01/ExZBDt1YE7veFZvnsNbeFq2bKa9Q="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.7-beta_1557828327929_0.4488022456441825"},"_hasShrinkwrap":false},"0.3.8-beta":{"name":"stb-react","version":"0.3.8-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.3.8-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-+MyE6Y65ypxck4H8u345ciU18HHQLZbiLdbzKvJxCCBfVDqA7vay3z2v+4YgZlkEFWtm8KJn+7bVIE7FUP8ISA==","shasum":"77574306bf9b848e985dfb94fbfc7dbc8df963c5","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.8-beta.tgz","fileCount":39,"unpackedSize":779093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2p8XCRA9TVsSAnZWagAATbsP/jh2EkHAiL0XP6IG/YuD\n3Zm+vvrcgtRAZrd/oDG8XfUFGLPEwXO05gcSjvfJq0hcoVygtO+IW3m6qxkO\nM5cEAh6JIxmAXoVlEjEQgMROXRGBOMG0E+vf+t+d+Q50fZXdfMi95Aa9DeL6\nnvvkOaR3tdCg4kWB5WzWKeGZtWcYkSNfSGzMNFKpHsaXvo3CBVVpjK5HYDrz\nRU/YpBjdx8U1/OiVvk2cYhFxD2TwErjOmEheDTcfLVq654URcMoBC5ptR/NW\ne9RQzMvtGX5BVvtjA4jvwuJWgn9ZAvu+AK7THeR1Bpc8o5O0pab/4tgKs72B\nRQJQ3Q4Cri2q8M4NdOjctLTlpq5dvSIcoTM1H4DXNpsVMdo/0B1KspLuKnBz\ns+nG9I/gziZcFdnr+yjLfVeYEmfFcmg6bLgr5nmghzj+47MWaxS1moRn6Nrl\nkVpp/PViBjmmdVa962F3AqprbEQpF20Is4ZlX7iKOyTOFdkeBorZhuev0L6P\nvVszlJLm4MmFFKUTSaStsbNAmzrCr0ll5bEXTD5+mUOBca76NfBbLcAJ6gX+\nmKvRih1ZZuffR+yvx2FK9SK9UK9zyMokeuOXWg5RfpXMvb/htRk759R5zrw8\nNxUdvFTOpl5auU9Ld87ShKr3bB79eNROFmVBvNYsZ8WuDKsNkuuahmaj2eEU\na+hs\r\n=Kw6E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICs+xibOB0h6XRHc/wYHOOFmamFgjXXJZifTIyV6hBC0AiEAtWe0jcc1E9djd4uHrSYcBoiBF99R9oOu930tU0SsrPc="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.8-beta_1557831446736_0.7917362735433358"},"_hasShrinkwrap":false},"0.3.9-beta":{"name":"stb-react","version":"0.3.9-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.3.9-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-J8zffzipT4U3miH2wONsL49rPhMkF0XzVSu1Zg2h8nWtOBVnNTg2Tq20GDWN1ylSYxbXI2TKvD7qwxp0I6sE9A==","shasum":"7aca564b65ff19479fb4ac20e98071a31429b593","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.3.9-beta.tgz","fileCount":39,"unpackedSize":776306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2qGJCRA9TVsSAnZWagAAhK0P/AnYro1SaT56uvtta3od\njnv7yyjxzBOYzxrfSelX4Bjqm9aLvpVpKGL6lVSv1f8QFuds6D7wMNZnGX99\nhNbBofTqaBiBhzkpiCIpGkwAzwX8fybVCMbWfNC3dMJjiHDbwERUZvG0q5k6\nCEmupTMKplw3N55i7O4uaqJo4zFHpCHvTq0OMzW9L4PhCVCLV/7UWrjSwpN3\nONCfkuAy8EiFhjjsYlKXT8QQ/0mVdTlHe1MwrXJgMk55ce47n5b6HqNoztL9\ndC1xIvaUhM38Rpds9cAVBHGnut5fkJ9jQik86JBmAPL/VP1/XY11Lc8ABUfp\nuFDE7TPLYUmbRdMy89HUkTVd17lyPuYKBklt1ABFtosz7UvqrGN1rBstMFFW\nQlrDrhvbqFQLCVpZfAlAvyDHCOJv/+E9+z5kzxUTrEti8BhU68IVWxUIja1H\ndl7wMBm68Ej3VD/LtoACvhw+AAN1wYiiKQ8jU/pcYHHOfOB5gnRBK45TcJrX\nrCemJk5iY8oZdTq1+OZ+W1x6DKZAs6hPkCQAtvh6qSV+sbo76khyF26dK/vD\ns8Yt1CforAGc0GQa0/ENzANVWWAoTN9wdK4VE3jpadMu4vMGh6w+0n7u/139\nB3e8ZmbcyZwnfQRiiSa6jBVlTOhsFKGD6M30aFMd6fJj1vyu01jp37xA8Bux\n96Tw\r\n=kONN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnH/Tsp6J5EGylcxj9PV7kCvBqNAtASYma/ybO7nKUzQIhANk0JsnQJAnc/tVTHoaDkf5sIKs+N9ysBlI1YC6OBzwc"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.3.9-beta_1557832073125_0.05815814628619531"},"_hasShrinkwrap":false},"0.4.0-beta":{"name":"stb-react","version":"0.4.0-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.4.0-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-zIjwKgnMeMoT36EXzNbN3OUas7MaCi9mZ4dCZkLCkY/1+EmpFZCKhG3u79mxzaQcGWaXmTTv5IYyZHhQ6Q5PAg==","shasum":"e7aba9e3c4a3cfd052cfa3564021c6fd74bd53e8","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.0-beta.tgz","fileCount":39,"unpackedSize":652086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2qNmCRA9TVsSAnZWagAArdQQAJdpr6IW6oj2Gb9sltrw\nktXO9WbDc4AQ5iv41LiBqXHioH+8LYI7CLQdjkPD5q77ZTPUjgy0oxs7z4Cq\nRW2ht0ynzNyCkvdbCdBE4C1q5qgk22IWoGSl/SMOiyUHwkr/I+UQFeVozS21\nShppC8fRL8/9D/OPRtsWqtriE3qA0jM7dKUX3Z6OYS/w+VJlB42m0MUN2oFq\n03xQreH0ZxkgYVIe8Yxu1qXkLVsvD8Qx83lo5JBKmDXBluwzqlcYD/4F1qp4\nTxP+UwWDUZUyGlKNB0T1i/BcyooHlhjtsotSPfzFjKQppM5kSZZuXz9ngPqG\nG/4+VF2DSM2hQGFyBFlad+7MF+WdC28YCWfvJm4Db4T9lDR84Jl7libXM8/O\noFqqYPy+mHfbmHEJcmZaEoCg0xpSayThggmlL931/LS95AdTKXx2QupL+kBT\nvoCdvixlBiJsryURDlvrWmAF0aMEKjGsqrZAhEkKJKvbjjhJTOlYheFjONMj\nkkRvD02sXSE0qEUTpnhOTBs6/zp9eaUk3W6LdwPMBDrgxNK9eVhNxiKyRy3P\nosAKruJ/HEp6hz+GG+OpeC6S+S+NCg4I5KiUzxZ8UAiPcIsJaGunizUlbP6u\nK8LmajDVwKibvtcSWfAclh1s8J510hemcdwzOP53Ir/aSeCcjloBzhgrUX9f\nqKnx\r\n=+C61\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMifuxday08q4lt++lDU77kOCHjbdqFZ9V1KnIjOTqbAiAjyoOJFTQq3zvkizsZnIMH3MEOm2VCugXpb5ksn70Ijw=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.0-beta_1557832549415_0.9406539058332213"},"_hasShrinkwrap":false},"0.4.1-beta":{"name":"stb-react","version":"0.4.1-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.4.1-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-Oon185nNOQ3W6M2Bru7plHzy2cujd2O35FL2cb+VU8JU0lFIEcPiKfv8SYBCYfnRO+D3nUptLMy+hkh4p/rl2g==","shasum":"992723c1226dd7d94bf9a177a2abbf2b57a90fbe","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.1-beta.tgz","fileCount":39,"unpackedSize":779734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2qyECRA9TVsSAnZWagAA12AP+wbCwamN5In26aZcmFbc\nlNj4FoDJFfK462/Fuq9To2O2tliROAnZFrLiB0JABcwiZVtnj/vWcZdSs+d9\nN8hTw79WHKq5IsO41siY9P+W3DD6096j6REYd7z5aEM9MQ6ingYWcG3qPbdo\nFL1gmZ7TK+H3jsS0t7SrgRiqmUUerFKS4X5cBLRKSetagMTnwoUxqYWrBfmO\nP/p6Tc8kFRP+dz5y3l0HfPIbOYr3EaEnBomRcW6FnE0lT15htEbVZa30S5SH\nqL7PH6TfxV7+0jvV0rHQBRho+CTWBHjwPhStFb6XPwgMxlcZZc+ciPTd4p5b\nB8yRep3QCf3wmzYnEmV9TOoOGmImjy6COav0xwgtz7VSAbaoVZ++nYbuZtIu\nBiXgy9vNS4LjBXWcn5/pPTbEfDbBXvqwSk3Vf0aG3xPVOMPs54rBQa2QTFWK\nv7AbeAQcINkPaYybo+Pg6dh94WQUxY4FgKLCMr5Le8uxo2N37XWDfHz7w2/z\nTxo9IOMG0XsjE6rV4tmL4tYyj0fSPM6AlQoZol9thkk72EeM8c9oODaDDIYx\nOHfEgmwpqsLTdUPKQsV+XFtHF1MFzz7xm9ghFeXXkZtvBdYSVoXWY4jeh1AD\nsLDI9j5kjiuC8h4SE1TutytskHANa9m7mOw5zpb5bPhEE6HZGFlBFiZFySTQ\noXM/\r\n=DWyJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAlXC/OKQBN2cX7c5hUT8ecz9PLgAPWbsTa7+ZV4cBWgIgJvOpZCIbw5cK7DLffcL59ICaM0jbjG7FQlr8ZrpNVDg="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.1-beta_1557834883555_0.9441407937539827"},"_hasShrinkwrap":false},"0.4.2-beta":{"name":"stb-react","version":"0.4.2-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.4.2-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-92AMADJF25qzjcdy6edBBi53lCGkQnJ5SKEmQ0SQPYRK1VvsFnED/RbneKbYp7B7RA4wE6S8FHe8JeqhMJyiZA==","shasum":"98186516744014678713423b0a244f2edc392f14","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.2-beta.tgz","fileCount":39,"unpackedSize":780122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2ru3CRA9TVsSAnZWagAAHXIP/2WWptAU3AtZGfSHIUVu\nhI+4j0TN8cKM9tCmwleiUrxu6NjwBVHU7NUKpj/uL6XWoUCDw5Xq7Zlzbx3U\nfNM/z58yykA/KsY2erl4E4J01x05bn3+9SnZjMmdJnJ2Tz712sSC97WX5Uwy\njhUc2kQGSesnXeK/kEm0k3FuZJ/jkCnQ9nUlZpl5qZt5ztUwjvlmMqWkqXza\n8UyAix4x1qysmVh1BnVPbTjsAFcBFfwP6KDIJhFfFpN3xk+bb1lsVQSjKE1r\nfX5VxsQNMrrlt67ueaLxGiEhPrGClkK62IJfDAHgjm1jlvmgZrtMTBSu2wn0\n2iUio1UyG+aWopRAN85zJiiChCv1blCvfdfiZ1OrbN97omuJIxg9WXam4WFE\njj/KFX5Ga1rZvDG5+CEfJ5z5xsChZt2oHon2ZNRqs8I1IugBg2D7YLwXk7l6\nazj/D/7zvmvDwzUSgYs3Q4bya47GbyIoN9VbFybHN9Y9mcLnAbe1jsrpbuyD\nWCdFTw8ojbA2iwYP9atr/dGSSUXaFEuveZIZpIINPXdYTEKiTQN8EnC+0cnM\nC6mat9lq8xZ7AKlxMG+nzbMlTURcQAoMo6x5lvCP0JtuWhoSAwAgcDAPDvQd\nrxBPNO9uM1FkzfwbofT77SbRA3zSunJAxpSzHV+/jAFRcOOc9rtiPF+axBFy\nBcf4\r\n=0apg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGF58NwbwdAxG8zFJ/hh4BS9bNWlNRdSkev2Pp722S8sAiAy0gEpxjplORAyIcwprmV/RvBchv33Hja/UBL1OAncfw=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.2-beta_1557838774662_0.8125330980586751"},"_hasShrinkwrap":false},"0.4.3-beta":{"name":"stb-react","version":"0.4.3-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.4.3-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-Eyw3o4XyTW5px7emmr+lLAiJVLFEkDEu0bGP8nQxXO1oUHXS2pwM4cath1n8uhKEkF+2YVAF99Vyp1iTwcHPsA==","shasum":"a765cca6c3fce2ed69d2cbc7647257b0970fd977","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.3-beta.tgz","fileCount":39,"unpackedSize":778600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc23YHCRA9TVsSAnZWagAABXUP/iMgYht39rfqaDL7Esl5\nDACAvA/ttxuSlCoBHcyoU2izBy2i+wT2LlHbJq5jSEyIs/aEOtFyx/0H6klc\nNkWKTeT6nTgxBCaXl7ttEAqY4VomK2d90mErQlSWVPm+gbf6YSeOWrOFU0Nh\nwJ4XhgADDWFw7WqprQYbF7MNYActhtR5wZRsVoEo1QIvdw07rNtB6jE+Ve6U\nBRR77glv8hp/l4ugDLH69Gu3K50v51lzsOAV9yw1YKp+ODgwFFuBA9WFa8ni\ndOH5m7KbPsqtheliPBw6zlG+ykSuv9Kaf7Ob1de7gVZNBFZRLuqwDKCBadjM\nj75Fvn+nhEbeF9XM7pZpel1ZgAMZG58hdfdT9KtRivVnhRn3GhFh59ePfKJn\n6H7ZvfOXbjIrE1doOv68mC6xsAQdBKtaKfQ/d4CD6S9dEqkVich29oqGlOxL\nwrFAGLSLX5N0070xXLwxeWlPisGtOefZV7KR/tzdb2o8/fmWtS2WfYq2KXQJ\nZRDDzxUlWPFHl84cdKP02fZRhRW/JYM938qfceaR0/D7mVk5+CiWYOt6nOcR\n+U+tmb+vl5AaJVfHp807FQlT4Z2zbaSALt4bBjbD2LQNKkGhGVuaxOPcYZ38\n1Gu2tYnQAs14rmOvrxcAPwG1BIvki2nc8t4yBixSF4wtnz8mbpB874k3MH4A\nxcOh\r\n=g/tY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCloeYQj6HINcFcBviXYnjg1x3rymAU4tmdNam6dgYEDAIhAMi854X5LhIKhsIUehhhNOQ0AJ2Q5vq/iV5tvz9OmU08"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.3-beta_1557886470479_0.3112262781013637"},"_hasShrinkwrap":false},"0.4.4-beta":{"name":"stb-react","version":"0.4.4-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.4.4-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-JVch0mo6TmYqXubkxvuHCHaFHf11xbiPwuvItNUN3epqpiL6pvyhdkes7VcrSdAJAuBpXUS/y9D1PMOWa9Zv7g==","shasum":"08fe3323519fbab8138c1525b09a2c0a45341189","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.4-beta.tgz","fileCount":39,"unpackedSize":778874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc23sACRA9TVsSAnZWagAAMRQP/iFT97MWqP5c2w5hEhep\nr3rS3XGa0mytbR2WaWbFOv+CCTWTLA0BjY3DgmjxrJyFUrkwafSyODguw84e\nH7n9XNFKVh0Lcc1lChBAzKDI3rON9LRhRladaTZ7Gjwbm7bAVbKeh6eOR8gC\nnoDlivqoBiC7t/t17FlbKZrmUY6r6K8Bg0iChC/CD60d3F0HUjpSPD56ugjf\nl1jNoeVa7et8OFEu6HJj8yW60jEJeVaMLAnaIwdnwNbh29sUUYcyjUyPAyuR\nakFVI1mso+kgeSeIoUQiW76IGMLL/Wdv09zshWkkbdApTr3gF0vQmMZjXeYI\n7H7hwNcgMYjXw6n5m4+1Vvh68vgrqKIREv/fGUvDROgYyvEndPOhUW0L39+d\n6h5QcTtT9ghwhvOHqfOj/2HzdeemtbD7MkOm+6ZPVoudOxgBa62wxaPw1vhp\nVUF6WNa9Hijqo0dTh1zsPzOhq17xERy6x+oD3hnVSlyuiK9wCNYONjFjmz6l\nyKQPFl3ApxJrt2bGrr+oYwWFvD8nH9mzdD1yH8nxcUiXKnwFdF/EUxO3c+M5\n7XWhOHjFphkLgb/HDZ+mJ+qt3n0G3ccCOcGBNyUKY6tIu82ovLr//l6YIFcY\nXvCRoZypNx6hwXsBre2ogR9YmdsOJP46KXag/X/szrsywDvbgxZdnC0Igch/\ncIc8\r\n=bXrl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2+B//XiTUeooKEjwis0voETPJ21wzmvtBh6ZbvE1N1gIgScUOXoDVsZFBQXhVbqB3bNtcM9ulsYDu9oIyOJG3bLI="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.4-beta_1557887743355_0.07878353887483147"},"_hasShrinkwrap":false},"0.4.5-beta":{"name":"stb-react","version":"0.4.5-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.4.5-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-2NAH2Gm0V7FI5Z94A/8GywZFUPkeCnQQZn6vwc4l0J29//LfF7wFVzqu6Wwp5++si0FgEop+HYa3Dv9j37VTAA==","shasum":"5fbe2758d233a115a9aca03470810e163ee446fb","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.5-beta.tgz","fileCount":39,"unpackedSize":778974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc24dxCRA9TVsSAnZWagAAJKgP/0oe8pSssEpRv8VKYJNV\nSOiGUOxemUAi5CNLQLSG3sxzTydMqOoJTjg2zxJjYyUfnzUBptJTPCcsmUJX\ndD1W/0MO+PZs90bNBw32rVdcNBGQVEwdnhdDm3pWxxYSkhbfFL750Pk7I/md\n3sX+10tvMtv4yXhSrRqE9xBd5u4ZdepGyy5aVP2btTvdr7z1vew+lGGrwCLt\nBINZAZ4vT+uol3ZUuseO2de5dudakPC1odWOsbl5roYrY5VnkRYQBG9+exVS\nrWhn01Q0/6q2xH0m62j9O3UestHu9B0ExABP8kVNRR6Y2VwtZi3dlI8BlG+R\nPwGfkBceN6MLTqH1rv9/LEv7qPAzFbGjr3cq7rEV5rcmStCG5lohowgILhvS\nvDiCqopuAceXbntQTmXcBghwsTzbOL3gigWyvr0qi2Rzmuv4Qtl610tjPFtl\n0OFo7IQKazGcIKhSbMMMGt/VPCx9cA+HA4TEHWin1Ztz1pWSYp413BYvKnnA\nGkcU0jUscXQgHRmWN5DGWiEn7+P9FkrOB8K0eWzDt8PeJhLNcdvCKSO2LL1E\nwiNL6l48AogQvhOpHwiW1SQH94TUpvqVMO9nxSnaJjexeG9uR3FuiNUk2XYH\nowyjXflb5+tQ7a9yc/jRWEFJTeHdfWRU6SkT3C8uMCAlNhIA+GpYuTInBP88\n2uPk\r\n=2XgJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIrU3cdKJQ8lLaGoIG2nzSeP1ZNeZqv1IULRUEH2iyZQIhAKf15KUaQx2BxHve6EBK+6bNoJMwdimK5eajuy2+g1Bw"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.5-beta_1557890929049_0.37173765120746394"},"_hasShrinkwrap":false},"0.4.6-beta":{"name":"stb-react","version":"0.4.6-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"3f594eeda0a41d9169e0d942f24f6d451baf5d3d","_id":"stb-react@0.4.6-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-FIMZUcwFOlCLWAzuVmaqeWoh+x5L7fJV1vJtmus3ouRgLnrbsAXgoeFql7c+g6PcmD6thVQTDvApvqcRTLyaxQ==","shasum":"ed3e41f519d263ecac54b955d433d746847e5b87","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.6-beta.tgz","fileCount":39,"unpackedSize":777288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc26DgCRA9TVsSAnZWagAAfJYP/RMxteY/yden8FRySqMO\n+oiA+qxbs114YAZgqxIHXzX297a0r4Go07B/0g4UoYHyfkhEBo0tTMd/bk6L\nJFL3UtvoptPSvz4Tr+6/7TuBRfcQKBz0mYPY4wrKN0VeJx711Z1XyC0f2ylh\nGidFuEQkfvnYAnaB1uInDNfMpvuz7sfAZ07ILKYnMsfBIpe1hKYUdqxkrOGI\nSuKW2GMNV6u7OWsc1iuFoQPKJvz44f6eD4gfdj1EBiEO+yQzzEk2bebgOM50\ngXtptonwzjLosRxgSDV51bqNYObf0KYnJ9MsaIlkvJprmG7TYZrDP1z6wroJ\n9bIMFHuM9+itl3kAtatJNfObYuJZosk2nTHsXUoxjVig1A0vvrltjZLoDYaL\nSdlPr3HdCiiMk/Iw8TMwzdYZo9j1Q7HYleMBl2HFVbgFik1ycVX//u+kLhcG\nHRPI4gLsLWSB+CfchdUWIMGHsp6LS1ZrEAy+r8ha0t2797BM/PgXKUn9s1TI\nycZyD4cQegJoz4YMNFnv8v50iOlNoZ0emzdXxwABnzXqMnUxha6Dax1DgH2e\nyEofUU/1sUiSPcjuv9A84m90nooh/QBcw6M5uJ1wJUq/6+WCZ+eSBFAi/q4u\nSaCqmgh1fIYhON43vVVKlzzZTj7NpyTzfFx6GNZtOyBUl+LJvGnFsYVpwI5H\n+Y9s\r\n=T8Tw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQFbHXJVodDZ2jAJrupcDt2vYekk/tg41u1JVRV3z2lwIhAKvoVhQdBJIEDKAFGkktU4HQNa1QtLi8BXA4fdhdMpYE"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.6-beta_1557897439725_0.8456436901894848"},"_hasShrinkwrap":false},"0.5.0-beta.1":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.1","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","_id":"stb-react@0.5.0-beta.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-oQpIHKLie5fOyMm8gTBxNiWpiWMRbJyqBNibOObkDulsnx2kVw0sI/ZBE7Sc+jCgoDTmq0eaAliK/DE4+wN+nw==","shasum":"b8bbf0558e58122c20f8fcc94d82b3b5aafe49f6","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.1.tgz","fileCount":39,"unpackedSize":172047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2+lNCRA9TVsSAnZWagAAI+wP/0iRGfvF4hHF1yuFv06U\nsRxB651Q8czhHwmCvKZe/f7GnsfQSxTd+Hk+lpvzhdyOuDRcQI/XUHUvr66k\nd/KckaCclRv4c5s6SgZhBZR6EFGtu2grM9yV+kfa/f5HMMh0OlcXCjvhQhON\nPpRhaA75tDcInvkgLt51tTpM8gj9/uZRufcOPsOyu4hfs17boB43iSTmxOfG\nT3vFfcvbGiTF7XIpSkxp02RfE7TmTP0huvH12v+Se/vGG1PC2iR1qv/azQJw\nFOBUsrFQt/WUmL7iUXFc1rfGgybYWkQxER/9WIPG4dxvgAfxTtIripTy2KcE\nqeLe6tTP7Y7pbNnBoI4Uzq3l9sVipy+EIpwBdb7GMMjy1Aj5a3EFabzJu+PR\n3Ar06tKyPOQprlPGRStNjbdlJD/JJxEtmrXXOi2amHO28PaZrmJH9kXvxQlh\nDVuTZAm2wEhh+bSo56dMNhP2n0UxqeGuZvpuYOTjchDidijRLZXYd0J9mZMZ\nmNT9NILEQHrmU3z2UkivIqnLxuyLwDrx3rqE0PVtcvfe9DhUBsqVs3tpW4Ex\nXbCL/Em8akizDZIJtCO7UNzA7BOOEAscAQ7s0a/RmfIn9ttuDDNQAjNs+/Zx\no2riVk5L8xf7ZZ6vv5V8nkxWwKSp3hW57lmRfaVJjzzgJAogQUUzNLc3d9/p\nzuAB\r\n=AG5u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGDGh/R6QCXRgwX7BkpDitb2ZUAX0ovRu56IUOoHaHG/AiEAx6NrIQPSftr8WQjpSFt83nGWiIJ/7VX+WMDekDkpg44="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.1_1557915980912_0.9018699894569531"},"_hasShrinkwrap":false},"0.5.0-beta.2":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.2","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","_id":"stb-react@0.5.0-beta.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-q5CSUtRn6GJ+HW1tMdnGXmCJwZTSFOd0GP15tK7/4iSc66LD/oYwJYbC2SkVFxdbTMpXjcddaYRLtKbk39Vcjg==","shasum":"40f0aa94e3ed6b210a433785878fb90e003295a9","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.2.tgz","fileCount":69,"unpackedSize":653522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2+yoCRA9TVsSAnZWagAAamEP/iVpTSoiXgv91tOfdtZr\n2cv2Qxu2GKSFAF0kWQ90Ih1cGAYEYvsKtjjK1H13SsrM984b5y/cZm5ZY0CP\nXLvIM4rv2Kjtx8rwcH2t2OuUpEpAspcFl+I3zOcR78heJ7ACIGm5aG3RNtxL\n+O8HATDw45WY+ChvK1fuL+cVYMmaag9uEWYwscFjkeTvJHyKWGpvmtXbV3AQ\nCsMSx7JfxFORv9BL/7N6NTNZo7nT5Zfv6ICYDNpVmLzf/NJ1FheMTAL+lb7X\n0MxJt/aI9uCASN4cr1dSSVtldVq52alvm0paPof8GkjgXxxdMTKWFAeTRUfb\nqui45p7rMn6D3GmB+nmuaQja3VSjHIugQRLxchBdUz0/TeqGrJ8tKJcGvt6F\nYQieGuHofHZITvUJPgHkNyhHIXpVz7lLt9EKZ4xYiyQuHsR+/jzb+RGor0mH\nGf/TPRswVH0Ysn7lb9sP0/u4XYBWzaoAp+tgSVnf636EaoGMLHlaPXraOQOM\nlgd2NAyG8mFI18lG4+E1+rV9mejpTl7CFvOCqGi8t2OngM5R3Hjewy5KuTDQ\ninJtO6aR5KyTgVA/FmeoL//wPtQTie2x6FsaNxPXk39VmmKU4ey/ivRlo0Hi\nOWFOxGqUizodrVUVG8OPd5FfpsRFxiAak1MP40veddupkehOT1yPylPPBURU\nOG6X\r\n=oPCT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID44bWQtwjhdHZIl7rFgmp4oi//a1SXBr0eW/5bkbr6vAiEAoJLzdj5fABiYPqkgAIYrFk4bObdc/EpTaEAlWXmPe/c="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.2_1557916839802_0.8633328308562132"},"_hasShrinkwrap":false},"0.5.0-beta.3":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.3","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"2aff189baf4694e2508cd2d491ce7225e25ca6e5","_id":"stb-react@0.5.0-beta.3","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-R8qBffdwEnflkCmqFtaUIRq2F9rtYzh7ol5vYpyYu9bDebvahSUCehXtrTUyY4fzA03TBrztO7hkkFE7HXHqRg==","shasum":"a3ac22cad43ca8eb5185317339a636c7006717f9","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.3.tgz","fileCount":69,"unpackedSize":653514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3AJHCRA9TVsSAnZWagAAFrYP/RgeBL5rVNYBtzfZ2lK0\ntUUewVGkE617IYCTDEYYCYONLF+6cN4BdiX+AwPgNxDnxVTxW3l8ZI9SbvJn\nnNcCq6qd9iquva5pE45wQudX9w3JpOPDXYxemzGznDBvxkWVOBYPRTB5UV5t\n61EbIzb/LtakpSNo8vS+1OVeztkiFVJ3VdGNfT9n9yL+FkO0kEtFQf7JuE7j\ngX49A00D1STl0zL9r/KbKmNSybbFG87/s3NJTa5i2g7iJajBINAOB9zASmwj\nWwGl1q2QlosMGEmaHAIy9hkgaiQlXq7lk92JfynRBXcoltHszFJ1+2Pm4/OK\nJI8y99z2OCd7BXw2gzyPxOXVcqnBYMbGpKUSo19JOs07nUkkN1vmPpBOpgmi\nGqS9TX9U+YTucHRhg3C+FZ3r6BEwu5ZLirx0h1oHhal7fOF/n5kzHquZu20J\ns7ANHXzDA7ljhIw22MAqnEhSCxhCWvRJQGPg+BSUEvLxpACy6Dbr1dKk4Xvn\nIc17HHvCrZVpKzzv+OuQtW8twTH/OyZMaZGgD//lvJU2pblx+sxIHxGSc9bw\nzVQ3v59V9koukiAnBPEtqZ/VDUyFqKmfSq5ukh3TEGTw7dDVO9uaqqKPcR/X\nw+Kl8kaCem7LxrXevHuUV4NHwsDVjPK5hykB6AAhSeguxhTW/YVVqMLoTArJ\nf1EY\r\n=L3E0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1ZwB0tbYYe25/trKudFkybUGWP3aMncCUUzOTN4PNLAiEAydoJM8DBZh2vFPqVTSK1cztHeS7+xLBW5h9OT4bQ34c="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.3_1557922374584_0.21526713034085665"},"_hasShrinkwrap":false},"0.5.0-beta.4":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.4","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"2aff189baf4694e2508cd2d491ce7225e25ca6e5","_id":"stb-react@0.5.0-beta.4","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-lfWaSsEPlIvCt4aCSVaLj89cRFwHhN/vn5pHDHkkYYOeufAuKtiQHPD7Ys4G0plA2oKP4VoSzscnjV0g6LHYDw==","shasum":"8c04e1adf1ee06118779025a6b3e954182d5e279","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.4.tgz","fileCount":69,"unpackedSize":653385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3AJsCRA9TVsSAnZWagAAmx4P/3RimVEmQiz80k+XLvJc\nhe2Mhf758X+nDNbkKpNrHY8I3H1s695+NMlY1sF2xEb4MGCc+UCjFMIwTrqG\nosrGxq1ROz/ORx2TQLlBErMcXLHl6YeJcxP6ZJGV+PRsBoYP5/QVZtkAvH5d\nyL8Hcg3nFsPCqjGPUjN+JMhSV3OV62hhf6ogoB8moVB9X7001YhT1vOvbIai\n+G+O5lpMadqtgIFRZd/uhLEHwy01mbjle5TawO1jc5Ahr++LmMuYd0GS8A/C\n93DYrvgwBubgKNwkJ9OqUJdyi1hpR2ZpV0qxuPRn+5EoMgzB5Un1QQgYsO1s\nB+E+Y54z9V+MhLfSLMon5dCR+3DbhUtWqYl15WIyWYAGD9nfFnznuPqnvcsE\nHTHLqP4kwffA3pN/wJl7PNiz0VJLmMD40B+3wPuk2Fu8zIv6bHDhNNQSSTNB\nwUy794hfT76FN8zbZHTWBhThHe1zXlkQVCrp37tRXa/PKNaASXcbtVfT1Zwl\nOO883cnkpMb5x1Ug6IdQ8RTnRtEeogQ+W9EGbe4Es/gAFQNCKJT0JMWab7mM\ntqP11A8ax5+sKTN4tI8eWOQ+2kMDDxWfVWg0CXW+NMXlHwqswjCw93BTRpsX\nMDXB5Lb3Dd/qTR0FqcRIqZOpTAKbQuy2ut/ruZOS3/zXV+GXGBlxsaO7vzQE\nwmFt\r\n=nkdQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1DTt35FOg7RqSFUJZgd04subH+ZbHrJJIKzCICCiv6gIgDu9u20indLT6C0LV2fyIrF9lZw6+l8PssXE0WGiNuZk="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.4_1557922411800_0.45912920649588185"},"_hasShrinkwrap":false},"0.5.0-beta.5":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.5","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"34ad5cde18537c73d1c9597be24d5c1fe52dd44b","_id":"stb-react@0.5.0-beta.5","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-rJNZ4RyNkXFlL2N8jfcerVqlCinRrZmzoABP38D6viOnDL16INc2JEdYQ3KP9JaantGpzLSLkJKMclmyNphcsw==","shasum":"d6f0fb2aa5d53f7bbc4c0c8b9cbfab09c0616b4f","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.5.tgz","fileCount":69,"unpackedSize":657188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3lZ9CRA9TVsSAnZWagAAXzMP/R181PnYoTgeAS+3rZnw\ndpGV1MWgSn8loz6IMURc+5zmSi8/Qdr4TVLbT7FjDyw8fBLh5eeAFYgPO+hR\nh7YTu0lYe0yw0Cbc4HRJqct4mF/mxWizQIAaE0om3x0Y2y6Kdd2c9gGOGLB6\nAp55IxbzU/YGvv1vxDKDh/2q8IfvmNlNxjmckCU4hh06UM4V1nXB/SfbW0Sj\n5XuSDpfNEkofvkz8JXVYSZkW5EJ6Bpgro/tf4Pky85TBhCHcisQicOaM6GAU\n5wdB3GnL8E2MJS9vRq2MFMFhJYmbBORPvlYXc5kRsix3RLbo/xxngVRm3Ek4\nmh1di80ST/84eIbTZWrRkIo8i8HnS69obWGtBit8aw2N4RiNmT4o5z0GBq6L\nSPMDWiu/3cAnXfLqK5Ejvn12ivdUsDxFHcfS/xfzQFzkZ3h9C4eVn4H1V8Zv\n9yOFfU0GUCRpCQVGMdb0Hdx+eoFLvmSQojzPDyxnRjFfWCBEjuEx4zb6PmaT\nTPqa86nT+CV6f6X3zsXJk7CnoiHz93eB5XITPlvQxN4kJwYL8dY80Qliozqy\ngdqRm1IL5hdGxYAiP+ahNk87nNMF/gHHen46MQD0vIiHE5FAXzTA99YycJyC\nXxbO1HuxmJAiNs2/wm619Q3T/IjdwoSrhosmDN3xYgjO7MjN5jRH2TBnO9c0\n2Et/\r\n=QttJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkBV+KKM3Kyxvyy22JLtFPPUhhtV11ogHDAqx9SgO/KAIhANdadesDXbzVDYdsJTAbVOX74/l1Ud/G3pp/SdRFpaGV"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.5_1558075004393_0.41014430988782835"},"_hasShrinkwrap":false},"0.4.7-beta":{"name":"stb-react","version":"0.4.7-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- ✅ 扩展方法 props 事假参数绑定\n- ✅ 扩展组件 新增标签属性 alias: \"marquee\" | \"tab-group\" | \"tab\";\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"6c58d10ed2c1a117431fa638cfc0e7200b89fafd","_id":"stb-react@0.4.7-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-g6lZJWP47RqLxf8yMHOlLWJE0K1UBSKv7NOc93Ggjs6t0ZG/chMPaSrMCAmcP2sEVJeeVGH+pdQqgLoTUvEbjA==","shasum":"dd533f20ac9e4acc4ddf71de6e0d702bbc2df714","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.7-beta.tgz","fileCount":39,"unpackedSize":779074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51oICRA9TVsSAnZWagAA6cAP/i3crkAiKofVlgdxwPdC\nongl2hwzhZ47bpridArym5Wi3GGWes3ZTlnA1uWw10MyMya2LU5IXu4Sq6zH\nCLTNJk724rZ6NjFN0usOEY8ikVadCsDOUK7eWHlaBV6VeJ9jcKCUtylRXG/Q\nIjYDBxESvQ03lUT71JIsNUNYVqwNdGwHvncQ9FBKqpradh30srVz7a15LMFL\ntkTqymU2X8as3GDSq/mqHYJpJljtys8KODKfid2qyURyB6zYD/2GOWYc0Q8t\n7X+BUctJnyn4V2SoM0RHNUjEBG0H1kbP16Bip+OlcbKVv6VC2l/HtrUGSugQ\nyd3/fJySOrRj93YewYF6EMigi3Vy70WaFe3uzEdFYHVRNK5RpDLmHl1Vkhp+\nejyyc7EeCm1/S6LQ9VBiaGUVOnd5IGKOf5tdPMjv4PpBDgp7/LlNiNGK6CsD\nkwykHHt9FXNRzL4PgfhSB4kRa1a6zhco3T22cLT+ksISIyf6QawvwbDJq+64\nZzGpRi+5n4GttscU6kj2bK7nOGzR2+B0sb5h1bl2pAeuMhiak9BC0ctGlcTy\nvLxLBlvZSNDPOZxelJwLP1J6ogyGVnun6jgU1omvD+1mlF6bu/O3PozqfvQN\nn9JL4WS/i4N0Hp8C2THmWWLl7ZTFMHvFngrpVmuPqq0KBDPpFr5YLLnFAN/T\nK37o\r\n=3/6C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD98gggUbgRZ1Fb/2XqLgq20rmzWNdAukKv6kSiRQ5y4wIgeiyCQCni4wU9Qj6fg4I6tEJFwIroon08EgraeeAHW38="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.7-beta_1558665735354_0.1953856466483066"},"_hasShrinkwrap":false},"0.4.8-beta":{"name":"stb-react","version":"0.4.8-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- ✅ 扩展方法 props 事假参数绑定\n- ✅ 扩展组件 新增标签属性 alias: \"marquee\" | \"tab-group\" | \"tab\";\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"4f946bd489f318dc156e864fc5789e188f732e8b","_id":"stb-react@0.4.8-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-o8O5LpJMEXSGYRvquLgp+SdHCUfxrIyoifQYYZrIfvubMRmIqbcsQ0pKxVU3UXaz5TUZ8d+GfWbzYffWm+Sy1A==","shasum":"21953eb5040092a1ee88b323f9c354e6576acaf9","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.8-beta.tgz","fileCount":39,"unpackedSize":779076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51qpCRA9TVsSAnZWagAAKeAP/AxpoM6bEg/wbfXWUueZ\nh5givaQHDdu7CeURDw93nskyRX9LEdU+i9/6F7YBkJDJ9+h4xroMGbyn3cxK\n+1iBC4kKwAtAaGDvlCDLwK73rCFD3xcv3+LV5BqY2GsxVgUYKsZfQHkL4aNq\nIVcRmCFw19SiPoyOaNyczRotfwfw/dRvKV4gmhEQc0HaGKIBfcb+0QeLXhjI\nDbsE6NwaEjgslXoAYDpcIphULzq+M/q3XAoLeSqPXunRD3s4C4DNGSmcCsio\nktB2ufIFqhXIn8dt0dQxe0Mo9yj+9FCuQizuGhOSRGkAAEdf2v4Vv3J3l75X\ncvzNv2Uw/O8UVQDnlbxcTrEIdJmmWeyWyL+ti5rrMj3/7UFF2aNYFXM945rJ\nYufuw5IV3Nsu7ErnGjM+tLCFgq3kMuoghRLXnO0u8CamTm5kZdIh7QMkOt6O\nEtdRSickbhIlaxK+Qt3SjLInY9W7Ki1Wv606Mqid0UnqaHYp8tPNrJaA5iEV\nxRl3+w2rbTe/HrPvN+VfUzrV3GL8fY2PE4TI5l29RPLp96m1U0MXp/rdvZeS\nPrMMnYr8ARfZrGatgOdAqQN02GRxa9EQFmUN4B6vbaqT77NodlbY9IVVrDXW\nhDQVfNCFI7nvnO2mBozCdFCe4NV0U7XxojPXQVd3s9kW/ZjJsOQRBI8rKekA\nUuS4\r\n=Ie5p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJBQTwNGidPdF6ZyBpyWZG4YTNb9T9yufQaIPSKKE06AiEA7cHrhRiD87PZHvZV4h8P3QIA3poFhEljCP73fq+Dnqk="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.8-beta_1558665896641_0.7840843385637748"},"_hasShrinkwrap":false},"0.4.9-beta":{"name":"stb-react","version":"0.4.9-beta","description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","jsnext:main":"dist/preact.mjs","module":"dist/preact.mjs","dev:main":"dist/preact.dev.js","minified:main":"dist/preact.min.js","types":"dist/preact.d.ts","scripts":{"clean":"rimraf dist/ devtools.js devtools.js.map debug.js debug.js.map test/ts/**/*.js","copy-flow-definition":"copyfiles -f src/preact.js.flow dist","copy-typescript-definition":"copyfiles -f src/preact.d.ts dist","build":"npm-run-all --silent clean transpile copy-flow-definition copy-typescript-definition strip optimize minify size","flow":"flow","transpile:main":"rollup -c config/rollup.config.js","transpile:devtools":"rollup -c config/rollup.config.devtools.js","transpile:esm":"rollup -c config/rollup.config.module.js","transpile:debug":"babel debug/ -o debug.js -s","transpile":"npm-run-all transpile:main transpile:esm transpile:devtools transpile:debug","optimize":"uglifyjs dist/preact.dev.js -c conditionals=false,sequences=false,loops=false,join_vars=false,collapse_vars=false --pure-funcs=Object.defineProperty --mangle-props --mangle-regex=\"/^(_|normalizedNodeName|nextBase|prev[CPS]|_parentC)/\" --name-cache config/properties.json -b width=120,quote_style=3 -o dist/preact.js -p relative --in-source-map dist/preact.dev.js.map --source-map dist/preact.js.map","minify":"uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map","prepare":"npm run build","strip:main":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.dev.js","strip:esm":"jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.mjs && jscodeshift --run-in-band -s -t config/codemod-let-name.js dist/preact.mjs","strip":"npm-run-all strip:main strip:esm","size":"node -e \"process.stdout.write('gzip size: ')\" && gzip-size --raw dist/preact.min.js","test":"npm-run-all lint --parallel test:mocha test:karma test:ts test:flow test:size","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"karma start test/karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"npm run test:karma -- no-single-run","test:size":"bundlesize","lint":"eslint debug devtools src test","prepublishOnly":"npm run build","smart-release":"npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish","release":"cross-env npm run smart-release","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"./config/eslint-config.js"},"typings":"./dist/preact.d.ts","repository":{"type":"git","url":"git+https://github.com/shitaozhang/stb-react.git"},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom","stb","iptv","frontend"],"author":{"name":"shitaozhang"},"license":"MIT","bugs":{"url":"https://github.com/shitaozhang/stb/issues"},"homepage":"https://github.com/shitaozhang","devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.5","@types/node":"^9.6.40","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^8.2.6","babel-loader":"^7.0.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","bundlesize":"^0.17.0","chai":"^4.2.0","copyfiles":"^2.1.0","core-js":"^2.6.0","coveralls":"^3.0.0","cross-env":"^5.1.4","diff":"^3.0.0","eslint":"^4.18.2","eslint-plugin-react":"^7.11.1","flow-bin":"^0.67.1","gzip-size-cli":"^2.0.0","istanbul-instrumenter-loader":"^3.0.0","jscodeshift":"^0.5.0","karma":"^2.0.5","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.0.4","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.2.0","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^3.0.5","mocha":"^5.0.4","npm-run-all":"^4.1.5","puppeteer":"^1.11.0","rimraf":"^2.5.3","rollup":"^0.57.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^3.0.0","rollup-plugin-node-resolve":"^3.4.0","sinon":"^4.4.2","sinon-chai":"^3.3.0","typescript":"^3.0.1","uglify-js":"^2.7.5","webpack":"^4.27.1"},"greenkeeper":{"ignore":["babel-cli","babel-core","babel-eslint","babel-loader","jscodeshift","rollup-plugin-babel"]},"bundlesize":[{"path":"./dist/preact.min.js","threshold":"4Kb"}],"dependencies":{"stb-event":"0.0.9-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">使用相同的现代API 快速<b>3KB</b>实现STB(Set Top Box)端React。</p>\n\n**Virtual DOM 组件的所有功能：**\n\n- 熟悉的 React API 和模式：ES6 类和功能组件\n- 通过简单的 preact-compat 别名实现广泛的 React 兼容性\n- 你需要的一切：JSX，VDOM，React DevTools，HMR，SSR ..\n- 高度优化的差异算法和无缝的服务器端渲染\n- 使用可插拔调度程序的透明异步呈现\n\n**技术支持：**\n\n- 核心源码基于 preact@8.4.2\n- 描述文件基于 preact@8.3.1\n\n### 💁 Preact 网站上的 [Preact Website ➞](https://preactjs.com)\n\nPreact 会调用以下生命周期方法：\n\n| 生命周期方法                | 当它被调用时                                                        |\n| --------------------------- | ------------------------------------------------------------------- |\n| `componentWillMount`        | 在组件挂载到 DOM 之前                                               |\n| `componentDidMount`         | 在组件被挂载到 DOM 之后                                             |\n| `componentWillUnmount`      | 在从 DOM 中删除之前                                                 |\n| `componentWillReceiveProps` | 在新道具被接受之前                                                  |\n| `shouldComponentUpdate`     | 在`render()`之前返回 `false`跳过渲染                                |\n| `componentWillUpdate`       | `render()` 之前                                                     |\n| `componentDidUpdate`        | `render()` 之后                                                     |\n| `componentFocusDidUpdate`   | `componentDidUpdate()&PageType.Focus&PageType.Blur&setFocus()` 之后 |\n\n## 更新日志\n\n- ✅ 扩展 JSX tag 属性，取值 \"focus\"\n- ✅ 扩展 tags 属性\n- ✅ 扩展组件 identCode 属性\n- ✅ 扩展组件 event 对象\n- ✅ 扩展组件 index 属性\n- ✅ 扩展组件 subscribeToEvents 事件\n- ✅ 扩展组件 componentFocusDidUpdate 事件\n- ✅ 扩展组件 setIndex 方法\n- ✅ 扩展组件 setFocus 方法\n- ✅ 扩展组件 onfocus 事件\n- ✅ 扩展组件 onblur 事件\n- ✅ 扩展组件 onkeydown 事件\n- ✅ 扩展组件 target 事件\n- ✅ 扩展组件 trigger 事件\n- ✅ 扩展组件 IFocusProps 属性接口\n- ✅ 更新组件 tags 属性作为 HElement 类实例\n- ✅ 取消组件预注册机制，考虑到相同布局的多套组件，无法确定其数量\n- ✅ 扩展组件 triggerGlobal 事件\n- ✅ 扩展组件 onChange(true, keyCode) 事件\n- ✅ 扩展组件 autoFocus(keyCode) 事件\n- ✅ 扩展组件 onEnter(keyCode) 事件\n- ✅ 扩展组件 onBackspace(keyCode) 事件\n- ✅ 扩展组件 焦点组件与子组件关联关系，实现模块级别关联\n- ✅ 调整组件 componentFocusDidUpdate 事件通知参数取值(\"didupdate\"|\"exception\"|\"focus\"|\"blur\"|\"change\")\n- ✅ 扩展方法 props 事假参数绑定\n- ✅ 扩展组件 新增标签属性 alias: \"marquee\" | \"tab-group\" | \"tab\";\n- 扩展全局接口 ISubmoduleProps IModuleProps\n- 关联组件刷新也要刷新父组件焦点事件\n- 验证组件更新导致 tag 个数变动 tags 是否能同步消息;父组件更新关联节点保持同步；关联节点更新父组件保持同步\n- 修复组件 关联子组件，父组件重载时子组件未卸载，父组件丢失了子组件注册节点信息\n\n## Sponsors\n\n支持我们，并帮助我们继续我们的活动。\n\n<!--\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a> -->\n","readmeFilename":"README.md","gitHead":"576871bd5b8fabcb83c10657c4e2c56068da54d0","_id":"stb-react@0.4.9-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-nnEhHTbit5JweDu7X8CGPZS6cnpsjMVDgjxo3mSB15LaHI6WNci1yGMVaTJg/LMGcZn3VGvIWJe1qlU6h9YkLQ==","shasum":"a318f30498bbedbe3136703bf12acb5e46e314cb","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.4.9-beta.tgz","fileCount":39,"unpackedSize":779074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51uCCRA9TVsSAnZWagAAwi8P/1v5whEICzoxac3L1g9h\n2oycjqaF6lxjj9n3zTjALIpXnMDHnahda12eyu7TcbCP0xVvhigUEPw9ldtl\nK6HzIHycxl1A46DkT8QtQeuES3uir4fzoI2jQVCT/rYwmjjz5CsB7GY7w4dV\nY6tmYtnxVIBrh69saAGzXlC0sygG12XKCI23NHgYILZdI9Bau9snCZKd6Cd8\npfcwiPQ3FZQfPHacO6M1XytOyiy4Hvv3JA7wkRcZsWjPNoxI9x3wacicq4KT\nkDCPECqNcjCd4Zk5KPcQ7nPem0NsYQ209T66rRVFxX6V9qUaPdFceO3xcenp\nzlhzPsh2h0xZgWKm/vvAq020PLct/xJxxRMPkhKyvhLRBbi+SdLTI6SnQM8p\n9Fhr5OlF5F1E+zDtLGa7bb8ecpP1wSqprq4uVcO/GnIqapUQi+wJzOQLmSVB\nI73QA2C6PSoGjirmFCBruyxdAfPRUvdVLVx7VRXTPs/YfVWe+FugTzRVTHxm\nXIVBm5VoqnCykE5ucip6cUTFJIcWKss3rrMDQHD686XSg5nfEeuCBPyXvSTx\nCilcshOBKIXGjgypgG2U+KTP1zJAawzCB7KEtD7P2o+XgSDCUtQknor5JENE\nnSNT/qEytVenA8NKlUYQ7Mr1wSNjrUe1XNfMS6uCTKkjRyLVaJIG3aHeKDv6\nFxyE\r\n=5byE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvlEP2xgCmQ6ambdt0pfhrX+GLqKe7iGwfOmOpHema1wIhAPWpw295TfH+oD3kvhSHtOShIOJh2RuCZ9eBa/jLvWw1"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.4.9-beta_1558666113721_0.08682335727388169"},"_hasShrinkwrap":false},"0.5.0-beta.6":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.6","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"df61a204adb2e25ff2cf63aa0fc697cdba4db450","_id":"stb-react@0.5.0-beta.6","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-m+kkQOygTYGX9OTNjwtM647A+3sKxEuIR5jjQVTySbces4lZNUP8hnDiVTOTtwOetWJGfe8KEQdFtT9jP1VNIw==","shasum":"3ee900e13e82e913d676e8e9a65a563b176383c4","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.6.tgz","fileCount":69,"unpackedSize":657231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc52KtCRA9TVsSAnZWagAAeaYP/05NoIhs1JkEwlLa+K2t\nD5tsUlc3GO7POzoSDhAkKllnUf3l9862dQ015OA7uBL+5kpmNqIyik6IJ9sK\na0JoiFzU9bI//Cw/9KmbtavRfkdyPapiPx8CiK25l8N2brXJ4L2BvdvbOF4L\nS8TYQCgg785GHf06RChJo93YpWx1RUc2bkHAMbXVB+YSTWJNpyDEgCpU7XMt\n2fn7MTk9x3rB3fFyxImTzL31n3c0GsybdnXVioJoa+r4BJt0Ebp6SeenTn05\nHFxLv1RwmKNKb00Ggf1aVCTg5cyyAUZJWW6Y6azd2oMyQfozWOnwNHsSmcQU\nvSLrWgy5/JGO6Ur+l96ABqcFB6RCTuuIXIKlHUhPKY4HBBO/i9M1EjZ81jAc\nNjNvxWyou5HEiua4k7R/o81ofyl6zISoBwKCnq1NXGIbQmKmZPz7/x1GvH64\nzYuTOsgplWZbvJneEWcmyUGxDOt0fsywHtUt837heCwCB4EEO2xAUERZ1FRC\nes7b0BslE9spNsD8yHJuB8pZFcd8TrN3xJLsOq/xezombQRqKdvVu0tJyjfu\n2BW76VBCfaQELY0RWmUJ2dHqJhYj6aR4NkrL8/8Ve1/0b+h6P/p2XgCGvSgv\n4myouzXsaTVWYvqVcHfzX6nO2Y44Zdxrt5l7qr0MPAMhejXM4evPM60+RL6/\nQDdV\r\n=d7dN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHxO4tYbghnXGFURtCssYESmgkGgequhS7ZF96Q365dgIgQyMliGqLOYdVPpCJUPqDGrXVA8Fs+JqMVvm48vJ0xdg="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.6_1558667948667_0.11010056043802385"},"_hasShrinkwrap":false},"0.5.0-beta.7":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.7","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"1fb31899e4bed729416d1150a9de19c95cb8d626","_id":"stb-react@0.5.0-beta.7","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-EcboOBJm+lA7wWkNqL9+XwpfhMQIGtG6GuEoRFW7nkWWBJhA+ellt/tO+DmiEfPJ9B+fsNGBrmiAhsp4Wq22bg==","shasum":"6796bcaf68fea8c1b4888a928dc30d8d4b36639a","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.7.tgz","fileCount":69,"unpackedSize":658805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc64XDCRA9TVsSAnZWagAA6EYP/2nMUaif6rBG27lQAM4z\nuR34GrBRcNktPpTCaUJ9V799PLXtoHNSu3iZjdh6dV0NcTVQfvDIVEbbovs5\nC19G6t8nv/4Oyh0+Y729LQd7OGSO7SLC7+qsFjt5uCC8zDWXgvIpRrWbHSWN\nl2Eb/mdp1lI6da3kKAIxCMMAuj1csm7xH9mOtEbAHPMV6QD4/fm1pGXcqq2I\nEanTuITIXq4Gq/CnpJ9PxCVZaq0Fxf304q6BL2FVEtx+Sl7MaaWjug+wEpZj\nmmI5FgGuQiNDlNXt+bZKhcGijZGdc/llCN21sMyTkD5xHYiV4jukL1Ozn3O0\nNR/xW3bVbUu3Bim7+asX5hVLa6L/InTOn+COdzeQY1STbM65bFhv/u9d96q8\npPBOUIxyBAfeVSiOaswMHYXkz/6M4Whpv8VR4KTEckNgmkkdXZCRkZxJBrCG\ngAgtZPBLCdGdvP5O/oQwwSvEyzpbMhrRci6lp+tTQNNNZLtgVRBeQMVeUnaE\n3RjiJT99Nxm6GYDSdis+xcdUNsAryAYnwD0qWwyYsBQ9gi1BYKcHVARKMggt\nQaB1Q3z8bujCHOFebx8WcaCCTYMCzCJtrWZxTLcg0idyRbcUBeIba3WR99S8\n561nCkVpJvkSYCjG1DIz4TQx1nsl1PYF59HXmmbuFkJ00qCwE2OannSsrTx9\n5ZDw\r\n=MGPZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6GiVZRo+EebBZ87w57lpJgYf0KWVFAhTJM65t+3PXdAiEAntIIWWmzILkxhnW64eeQndtD5B/EiHkO2P2Fof9I6SA="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.7_1558939074846_0.13249267369364892"},"_hasShrinkwrap":false},"0.5.0-beta.8":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.8","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"c73c20c527728ca88b12cdd5d23ae3499b94b6ea","_id":"stb-react@0.5.0-beta.8","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-vbxsySOuhUyIkTyQpPLeeNa7zKIZu0mufPlFcbZrTnhU6g0rkcCmhJJhxgezY5/BARS3eh5CCcCERAVHlEGb5Q==","shasum":"11d69faa1d0a45d99fcb0f15e3266582331854c2","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.8.tgz","fileCount":69,"unpackedSize":659816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc64mbCRA9TVsSAnZWagAA8kMP/1wzdbfOfL3nGCoIhW9P\nx6wbNMTmYJNi21HkXOoHgkFoBhsBgBsMwQ0ub0Ky+sPJESBbtHH36vV6l9U8\n2yQ+EycB+4V2vHpycphTpRVglbq8gQ2GttTgKz6+7ZBGPl1NPWK5AMC+PPul\n1CZG32l6GunVrPgaqWxCTnFYdVD7THlRSQ8fdJ0xO/DOXuijEmstYY4eAzTk\nrgHFNK5hyw/n8NnWiBi87rStwQc7nbhPG+q9OyxwdYjG1bwgH9B7e6ucVo0i\nmaw3f3a0NpW99yq+6YCf3EN40aL5zPsmM+Kc1sxH9fPixN+GkEDqpEAIEw/c\nbttN9i9Gr5uR61bH+t9q2lCd5KhhUPE/Wglbn/PsUEamd4G/wNhDTxUjBx5H\nFZJKqUy4BkSTtTT7mJXvgoUWFo0efyVpTcuGOUrHTvrfa+9Esjc3LLqjtt86\n9EnjLQR6hZT+og/MTY0ZwC300PrgrsOuxOmC7Sbnx5cfLzxC3copbdC+IbHa\nZt2WClqnj6gn6Yy1O5rg9fcI/piiAJiwSAXMZRIXYQzHyRkwKhR7AuqblEPr\n8Z1uHNciBmVOsRVFIwjf9L5yP/iyyFdpFAVrJTcH4roJS407m7ViArsJ2kBn\nXgf/WcqspU/Pp8Nzd4BvoMBABlhVdcGYe3bQ27bz7+5b8e75Z0g6k8gWXK68\nyI8t\r\n=YqPs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoMwnRNe4BE+K3LsFSrzKZHbp85O0zVVEQShGcP+oRrwIhANFBOc5kdcNQWj1KxDeoHJfMVwEPfBUEc3Bw/A0IwFX4"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.8_1558940058842_0.5271411287454186"},"_hasShrinkwrap":false},"0.5.0-beta.9":{"name":"stb-react","amdName":"stb-react","version":"0.5.0-beta.9","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta.1","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta.7"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"c73c20c527728ca88b12cdd5d23ae3499b94b6ea","_id":"stb-react@0.5.0-beta.9","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-7CIvq5I8nS49ODFG8egSQkGqnwRsCQmhCmELHLG+dFrSRhVq83298h/G3MgGJZ1fNVq+P2ozVDf4aL20P8wrKw==","shasum":"c8e42cf5971368ba8320ffd5a063c72178f78c4c","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.0-beta.9.tgz","fileCount":69,"unpackedSize":659820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc70V2CRA9TVsSAnZWagAA7YQP/2uBS9PqZyroFRqXsAWM\nmwgY3jegdcXDKSYgKe31Mr/thmnd/IiNSmMN4Ums8Wo6aZpZZCvq2eRUqDyb\nDXRFnLuxMH0w0ZzmZel3pMX6J94TVHvLBntV8yoLP5BB3h1F9ywJ2GW7H+pZ\nh62TNUivvMyN9oq3ArxGg3CXeMQoGGqD2pCMOdNhuUD4N1NIMTTHcfp/MlwI\n0AH9KumwVWlgRjgN+Xf2EzCfMzqggClk4ev06je0bLRCDX8bBRP9KkMjP5EN\njJOolhody+Hf4+GVhPXmtZy1Q9hG4Z+6/zCsPk9eigOo8lXF7XWxMeNTgy5O\nPkacq77cyUnrNghOKJtyI3knB8Lyx/00172NVPA3rlxopZoN2xYX5F2D5ebW\nwQV41Qog3fHWR+cFgpf+HhZuSyLGYp9IB1d2AJjRob9BOP4kyG4s8ziNEcba\nSdsH9iF5imRPOz1mAnYMaCVHED8xtIBLR3PY5MYhM8pvpYUHYsbPgDCFHaQq\nQ0ZB9p30hiAENhbeNvUePY7u9gn5A4LEYi3HyX0aaQGiaiwXIi9glsTaj9DJ\nCjt3+Sm+f3MweEGUgkzQS9+rG72IPQX6ZCU9GLdxKXPgwoESv8Wtcpsf+FV0\nTTvdW1m7c6CEbuQU0Ja1XWWBClGB2Fl3QWKc68i2xT+db8QlIL6oodu3GI1B\nItV/\r\n=SYkD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqYlbK84suxPCnsx1uOSaspC/DhwXTjtVBcNITQAzHdAiAUEjQYnEo4hwLLYSsz9L2SEqDKbyONmqT06MSnXl8zGA=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.0-beta.9_1559184757936_0.6847337412030483"},"_hasShrinkwrap":false},"0.5.1-beta":{"name":"stb-react","amdName":"stb-react","version":"0.5.1-beta","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta.1","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta.7"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"1f68c0568835acc1577c462d23cabeb9883b3b03","_id":"stb-react@0.5.1-beta","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-S6TLzPmBSciomoQX9FpzQ1SISIfQ+4ZfZC8HWrpu1pIbyujWPa7G6ADmD0a81Sq22JpHK3kW2gacAjf9UhnN0w==","shasum":"ea9ec6c96d16736c1810e535d9fcab7a783f21b2","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.1-beta.tgz","fileCount":69,"unpackedSize":660471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc74pBCRA9TVsSAnZWagAACvIP/R8+vpPxz6DpvHnBq0xB\nvy/E0yCCLCBk0mOnOUy106T8JemzAW0k4M0Co0onir4iIk5uFv6KNpBGmGb+\nnRLuf4P/bpj9ALj8XvcnTtQuMNusdlrLxESf4f/GQefaUuiro4nT6OY/Ns6/\nb9LJCQBOgnTpxVCV5x/tjA5I/ACtQaT2In+x0okPf4eMtXoBNfJcrBy06kKf\nib0L8dZr+V1LlvTzMiI+MT79gTXuAoBK60b963bGzsenoj5X3T4AHg3vk0Km\nWB3cT/U8XdTP5/xWVCFbfR2VGIGvI2wYkqtjRC4k43kOIRUuWptOAwe+NYuN\nIRAx2+MEnM8i9vQ/TJwK7Mhn19gc522J+aok5HvhF9DldL5s2w7mNc/GSYnV\n+Hn1sQf4oEcCAQrfxFMP4WM93fxliiCbk9HKSSJSUxCgjW0VoYrKlLe5ZF22\nr2tKfeDq1fqoaz20rYl0h44xa0gVqKlgP0CvP5enwvkcqdHTF32XvLVZpF+s\nK4jsm9d6i8kEFV+M9OGk4IWqHLDK3hihsgnSAR1wm8dzaX2lnKsxIgtX2tEg\nE8hvSeLoIfhtd3aa+3qQOa5YxoCZBXLXtzi3feFIy7I1n8tlGA0VYX1YCZQa\nVPx3/qwesKHEmwHdcSW6gU/6W6uU51mwhtFIyYwDb7j1WJr/jNyh+MKcOS68\n4vm5\r\n=avQL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEPrgJ8VFD3SxT85xAWVCfsnmfIVeQDeK+B6zzS7CbhGAiBtDNPv4INENoP36eoxghtjiTdnpw/WaG+rQZkpSlzW9A=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.1-beta_1559202368651_0.8319204668461524"},"_hasShrinkwrap":false},"0.5.1-beta.1":{"name":"stb-react","amdName":"stb-react","version":"0.5.1-beta.1","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta.1","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta.7"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"1f68c0568835acc1577c462d23cabeb9883b3b03","_id":"stb-react@0.5.1-beta.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-dtcT+YkbBuc26AuD3TwMNqKyIXIAq4ip1j2pn14Q3KH5PG18FtOK9u7VqctDLPvBqSALhTUOfm+9mSKEZvZAdg==","shasum":"20f0e92be6fa1d3bbbdfdfd45d0c81eb01d77740","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.1-beta.1.tgz","fileCount":69,"unpackedSize":660490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7451CRA9TVsSAnZWagAAcIUP/1MgXAYGK8jtSlviiWBR\nnt6wILMY9q+gh8XxmRB6E7motS2x5Dl8dkDRlEiGBqhozrf/nDsLfsYd1abr\ns1BINc3+HzgiPiLiyArK+qDQumm3prEIrUWn7ArqhNhs2hH4JM+5vbYZS54/\nFPmiY1dqhSopyHKI1QasUNi2Ka+gWxkSnUQPnq6LFoH20dJ5Dy+lsnh2aWPF\nqQGoPJoPJzEFT9uzmqrDIM8tJNcGhtlmPaBwIJwNcOwrisZtOOX3Gdr1oHSC\nGAs/BzY9qdziBJFzr2DDWjqfBYt8sn2qXJdeyQsvQlAo3aNb5+QwKVj3Froe\n+VEVa87wmsnJ2X+plBA205CAqodV+CnkbQVlQrf0VlIGSWLbToIBW4EKYLE+\nguO46efzG6FpeTDw8oEm48T29a6U9+A6IEEsUUhoiNv4gUbEqSMt7Z4v2Y/j\nGyGf48ZqifjtMo/wXqtVrcVlHd6Ev7boI/TRV2zLj7vmS9zgsxEdnozydqlc\nHso+dhQTnZLrwM8HJSMlP3mYwnBrsCkAA7/HWmel1ayIoR7e1YhVkjqGiac1\ntD9DIVCyBg2wO0d5AOAqGV+S45UUIBaDQY+T9ZqYQmDm20QTWGmM3UNHOA+d\naVsZH1uWr4uQeuisiJHUOxO2VbD5gIKYiJop6yW+LhKbIWBeVcpjiso46KLl\nmVjg\r\n=J8Cn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHA435VGhkaGBBK9mDwJXj6boIWW7Yi8QCECzNNKgDZQAiBxyBBpRl4NZaAxQe0uuRUk7TZR8W51jBPTkNMT230Qbg=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.1-beta.1_1559203445088_0.12259065198825692"},"_hasShrinkwrap":false},"0.5.1-beta.2":{"name":"stb-react","amdName":"stb-react","version":"0.5.1-beta.2","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta.1","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta.7"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started)\n\t- [Import what you need](#import-what-you-need)\n\t- [Rendering JSX](#rendering-jsx)\n\t- [Components](#components)\n\t- [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n\n---\n\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [*Create your Own!*](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact *([full example](http://git.io/preact-compat-example))*\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from 'preact';\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from 'preact';\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n>   \"plugins\": [\n>     [\"@babel/plugin-transform-react-jsx\", { \"pragma\":\"h\" }]\n>   ]\n> }\n> ```\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n>   \"jsx\": \"react\",\n>   \"jsxFactory\": \"h\",\n> }\n> ```\n\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from 'preact';\n\nrender((\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={ e => alert(\"hi!\") }>Click Me</button>\n\t</div>\n), document.body);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface.  Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`.  Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn <time datetime={time.toISOString()}>{ time.toLocaleTimeString() }</time>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n|-----------------------------|--------------------------------------------------|\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\n\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from 'preact';\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{ time }</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes.  You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n\n---\n\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events.  Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty.  Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from 'linkstate';\n\nclass Foo extends Component {\n\trender({ }, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, 'text')} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n    render({ href, children }) {\n        return <a {...{ href, children }} />;\n    }\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n    render(props) {\n        return <a {...props} />;\n    }\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => (\n    <a {...props}>{ children }</a>\n);\n```\n\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`.  Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={ click }>{ children }</span>;\n\t}\n}\n```\n\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach( m => Object.assign(this, m) );\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n\n```js\nimport { h, Component, render } from 'preact';\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire('preact/debug');\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n  'process.env': {\n    'NODE_ENV': JSON.stringify('development')\n  }\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n\n\n## Backers\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n\n## Sponsors\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n\n[preact-compat]: https://github.com/developit/preact-compat\n[ES6 Class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[Functional Components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n","readmeFilename":"README.md","gitHead":"1f68c0568835acc1577c462d23cabeb9883b3b03","_id":"stb-react@0.5.1-beta.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"dist":{"integrity":"sha512-OdtgzL1OepfB34VDUtCBDneVcQRcQrrRrwwcYWIE7e0cqPSyarhX6YUPe1ccqy9K7SFKY0hCmgxJjQNhUDO0LA==","shasum":"6e76efce94455f0e08c00fc1958f39640e5086b2","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.1-beta.2.tgz","fileCount":69,"unpackedSize":660607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc747YCRA9TVsSAnZWagAA1DMP/2/h6j0kumOvw66NJcjI\noU6iDjUOEX8PuUMVU2rg+tVE329MWapjzcYY3ZFxKLYRgyffqyDKx5vfFjT2\nwoKbSiQbPd3n+y1wcj/0xxH85Bn2sOV5t6IHtai8vd3WacJCsA9flbdzrWVG\nqI+1GGuu5CpKHCIQKLGp/M5N+l/0wpXkcoJXsNS9nNSt8UGZjbbommI+kyzJ\nuRMBoBlbYOoxLG/phHwvWu5Dkkv1XMVh/KranBlW+MzhPRt2zS0AM9Z6sjAi\nrAaIxk1UKcIKWM7xRDlP+1auu8umOB73nLzFZnGIyMZgr8DGyFks94822PDt\nwLnD/N8GLY9+WCGS60vX47A30Wd9AecMY1GtrpmnwdL/Iy05x1ltv3ZXl82x\nisa9pXQgNrkH/zcLIAuHcMhsmGCu9tIXtE9R8hwP1TNdUzlhmRPutjRanCAc\n6umvOc4kHyroipFLt2vKwMMYW0mZVkqYAF3RZbYMW8y3BIjydkMbiLaAi6Nq\ntW6g6iDJ6SOUbhhoR4Zr3+hIXEabbcZu6PGCf8IMxlhj8AB1mmNXNky6Hyyo\nShgClG7ZrdB/AY9snR1TfP83F597m90eilWzulw66Z4RXi+m5OWUAI19fkgs\nwlYPamfaw950pVPRSYLUpPCLUDu9QwowbT93gVYnfTcvRq4R8zcH1E0jWuX5\n7bsf\r\n=Yn1b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC0iSKw7BMKtGdS/9XQ4T6hbzDNoqe8xM/T/nxO7iVXXAiBWIzc6EhyHGKbhUjko6VHji5yjqiHddbWvdRVO2X2j8w=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.1-beta.2_1559203544024_0.9105126573142699"},"_hasShrinkwrap":false},"0.5.1-beta.3":{"name":"stb-react","amdName":"stb-react","version":"0.5.1-beta.3","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta.1","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta.7"},"gitHead":"2608ca7ae0e62bea934bfdbe298e52b7db16c0b9","readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started) - [Import what you need](#import-what-you-need) - [Rendering JSX](#rendering-jsx) - [Components](#components) - [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n---\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [_Create your Own!_](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact _([full example](http://git.io/preact-compat-example))_\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from \"preact\";\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from \"preact\";\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n> \t\"plugins\": [[\"transform-react-jsx\", { \"pragma\": \"h\" }]]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n> \t\"plugins\": [[\"@babel/plugin-transform-react-jsx\", { \"pragma\": \"h\" }]]\n> }\n> ```\n>\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n> \t\"jsx\": \"react\",\n> \t\"jsxFactory\": \"h\"\n> }\n> ```\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from \"preact\";\n\nrender(\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={e => alert(\"hi!\")}>Click Me</button>\n\t</div>,\n\tdocument.body\n);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface. Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`. Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from \"preact\";\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn (\n\t\t\t<time datetime={time.toISOString()}>{time.toLocaleTimeString()}</time>\n\t\t);\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n| --------------------------- | ------------------------------------------------ |\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from \"preact\";\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{time}</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes. You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n---\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events. Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({}, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty. Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from \"linkstate\";\n\nclass Foo extends Component {\n\trender({}, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, \"text\")} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n\trender({ href, children }) {\n\t\treturn <a {...{ href, children }} />;\n\t}\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n\trender(props) {\n\t\treturn <a {...props} />;\n\t}\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => <a {...props}>{children}</a>;\n```\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`. Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={click}>{children}</span>;\n\t}\n}\n```\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach(m => Object.assign(this, m));\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n```js\nimport { h, Component, render } from \"preact\";\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire(\"preact/debug\");\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n\t\"process.env\": {\n\t\tNODE_ENV: JSON.stringify(\"development\")\n\t}\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n## Backers\n\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n## Sponsors\n\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n[preact-compat]: https://github.com/developit/preact-compat\n[es6 class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[functional components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n\n## 更新日志\n\n### 2019-08-28\n\n- ✅ mobx 替代方案 forceUpdate(identCode:number|string,callback?: () => void): void;\n","readmeFilename":"README.md","_id":"stb-react@0.5.1-beta.3","_nodeVersion":"8.12.0","_npmVersion":"6.10.1","dist":{"integrity":"sha512-VSMMPrjBO6DXNQyAKI+PUcHllUtnmR0WMNkCewudUGHdx+aMUWkkJ/XSrQ5yy06jGMziqCLjNNjq1nLOqHdC4A==","shasum":"8c7134235fd5e3b78bd0beabbfa4c97a159416d4","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.1-beta.3.tgz","fileCount":69,"unpackedSize":662905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZkHpCRA9TVsSAnZWagAAnV0QAI/p3zgbcdLChK8yQ1fb\nQ3gTIBRb5lRy5zSkbBm+owNy71cdzcmG7BaWHiHc17mSKkh8O+dt5RGj93LV\nYM/Vt30eU527lTMmc6pRtyiX5iRwQO/EOyiAQETrflzyQBiPGqFteXaHaV12\n74nAPpKZyZs2b2HXArOHndXP6KVP6TDQZDkisreW5tG8axXP1y5M4CURqYS7\nv/UkkDW+pVwqMKvjrmuSlbRFqZf/q6A97xYezFmxW4v1Ie4YeHvWIvXJk2b/\nfKn3UMd9znZzu29FX+rDhNLcMbmCT0Q8VZKSKJPnzZnxVlhB07TifsgZtIfi\nNk9YbFHRoQbdif8u5sO9QXZ5y7qBfV9Ke8Bex2dR1DorvLRvciORJhKRxxRf\nIV5Ck+4xaD6NZLEP5GajhFf58AiktOQYHNJ5OH+NFJyG93GVp0eWpHYZNYwJ\nvK5KEKlI2HXVwApIx8RIw0Q1xgDm5v4cMyjDAJiC68acJHOy+yFw3+gvVAGm\nZYDjAQYheiXifu5GEvweH4pB/y8hWwWMRel0Dt1U9fLxhnN5LZTafgrZVvvP\nhFtEVko2tvT04kqji/NjBaM8oro2+iSB2S95chzzJrIn+2Ju/tyCKyJZA6Fa\nWA0kOPMKpypi+uBjWVcN5l88144MZuGymTW5N4MVNzR4fo5cEUqy5ni5dyui\nw1Og\r\n=kdLl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAs1ysr8ZckDJ+OfNJVIWbrto17lB5iyItzVqq4WQv3XAiBKK0ozou8+mtl0SriMuO4dOC11Nwjs5/fT/NtBFifz3A=="}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.1-beta.3_1566982632225_0.3540041902704749"},"_hasShrinkwrap":false},"0.5.1-beta.4":{"name":"stb-react","amdName":"stb-react","version":"0.5.1-beta.4","private":false,"description":"3kb 大小源码享受 preact 在 epg 平台的极速开发体验！","main":"dist/preact.js","module":"dist/preact.module.js","umd:main":"dist/preact.umd.js","source":"src/index.js","license":"MIT","types":"src/index.d.ts","scripts":{"build":"npm-run-all --parallel build:*","build:core":"microbundle build --raw","build:debug":"microbundle build --raw --cwd debug","build:hooks":"microbundle build --raw --cwd hooks","build:test-utils":"microbundle build --raw --cwd test-utils","build:compat":"microbundle build --raw --cwd compat --globals 'preact/hooks=preactHooks'","dev":"microbundle watch --raw --format cjs,umd","dev:hooks":"microbundle watch --raw --format cjs --cwd hooks","test":"npm-run-all lint build --parallel test:mocha test:karma test:ts","test:flow":"flow check","test:ts":"tsc -p test/ts/ && mocha --require babel-register test/ts/**/*-test.js","test:mocha":"mocha --recursive --require babel-register test/shared test/node","test:karma":"cross-env COVERAGE=true karma start karma.conf.js --single-run","test:mocha:watch":"npm run test:mocha -- --watch","test:karma:watch":"karma start karma.conf.js --no-single-run","test:karma:hooks":"cross-env COVERAGE=false karma start karma.conf.js --grep=hooks/test/browser/**.js --no-single-run","test:karma:test-utils":"cross-env PERFORMANCE=false COVERAGE=false karma start karma.conf.js --grep=test-utils/test/shared/**.js --no-single-run","test:karma:bench":"cross-env PERFORMANCE=true COVERAGE=false karma start karma.conf.js --grep=test/benchmarks/**.js --single-run","benchmark":"npm run test:karma:bench -- no-single-run","test:size":"bundlesize","lint":"eslint src test","postinstall":"node -e \"console.log('\\u001b[35m\\u001b[1mLove Preact? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/preact/donate\\u001b[0m')\""},"eslintConfig":{"extends":"developit","settings":{"react":{"pragma":"createElement"}},"rules":{"prefer-rest-params":0,"prefer-spread":0,"no-cond-assign":0,"react/jsx-no-bind":0,"react/prefer-stateless-function":0,"react/sort-comp":0,"jest/valid-expect":0,"jest/no-disabled-tests":0,"react/no-find-dom-node":0}},"keywords":["preact","react","virtual dom","vdom","components","virtual","dom"],"authors":["Jason Miller <jason@developit.ca>"],"repository":{"type":"git","url":"git+https://github.com/developit/preact.git"},"bugs":{"url":"https://github.com/developit/preact/issues"},"homepage":"https://github.com/developit/preact","devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^5.0.0","@types/node":"^10.5.2","babel-cli":"^6.24.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-istanbul":"^5.0.1","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","bundlesize":"^0.17.0","chai":"^4.1.2","coveralls":"^3.0.0","cross-env":"^5.2.0","diff":"^3.5.0","eslint":"^5.1.0","eslint-config-developit":"^1.1.1","flow-bin":"^0.79.1","karma":"^3.0.0","karma-babel-preprocessor":"^7.0.0","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-source-map-support":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","lodash":"^4.17.10","microbundle":"^0.11.0","mocha":"^5.2.0","npm-run-all":"^4.0.0","prop-types":"^15.7.2","sinon":"^6.1.3","sinon-chai":"^3.0.0","typescript":"^3.0.1","webpack":"^4.3.0"},"bundlesize":[{"path":"./dist/preact.js","maxSize":"3Kb"}],"dependencies":{"stb-conllection":"0.0.5-beta.1","stb-event":"0.1.0-beta","stb-tools":"0.0.9-beta.7"},"readme":"<p align=\"center\">\n<a href=\"https://preactjs.com\" target=\"_blank\">\n\t\n![Preact](https://raw.githubusercontent.com/developit/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true \"Preact\")\n\n</a>\n</p>\n<p align=\"center\">Fast <b>3kB</b> alternative to React with the same modern API.</p>\n\n**All the power of Virtual DOM components, without the overhead:**\n\n- Familiar React API & patterns: [ES6 Class] and [Functional Components]\n- Extensive React compatibility via a simple [preact-compat] alias\n- Everything you need: JSX, <abbr title=\"Virtual DOM\">VDOM</abbr>, React DevTools, <abbr title=\"Hot Module Replacement\">HMR</abbr>, <abbr title=\"Server-Side Rendering\">SSR</abbr>..\n- A highly optimized diff algorithm and seamless Server Side Rendering\n- Transparent asynchronous rendering with a pluggable scheduler\n- 🆕💥 **Instant no-config app bundling with [Preact CLI](https://github.com/developit/preact-cli)**\n\n### 💁 More information at the [Preact Website ➞](https://preactjs.com)\n\n---\n\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n\n- [Demos](#demos)\n- [Libraries & Add-ons](#libraries--add-ons)\n- [Getting Started](#getting-started) - [Import what you need](#import-what-you-need) - [Rendering JSX](#rendering-jsx) - [Components](#components) - [Props & State](#props--state)\n- [Linked State](#linked-state)\n- [Examples](#examples)\n- [Extensions](#extensions)\n- [Debug Mode](#debug-mode)\n- [Backers](#backers)\n- [Sponsors](#sponsors)\n- [License](#license)\n\n<!-- /TOC -->\n\n# Preact\n\n[![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)\n[![CDNJS](https://img.shields.io/cdnjs/v/preact.svg)](https://cdnjs.com/libraries/preact)\n[![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://preact-slack.now.sh)\n[![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)\n[![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)\n[![travis](https://travis-ci.org/developit/preact.svg?branch=master)](https://travis-ci.org/developit/preact)\n[![coveralls](https://img.shields.io/coveralls/developit/preact/master.svg)](https://coveralls.io/github/developit/preact)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip)](https://unpkg.com/preact/dist/preact.min.js)\n[![install size](https://packagephobia.now.sh/badge?p=preact)](https://packagephobia.now.sh/result?p=preact)\n\nPreact supports modern browsers and IE9+:\n\n[![Browsers](https://saucelabs.com/browser-matrix/preact.svg)](https://saucelabs.com/u/preact)\n\n---\n\n## Demos\n\n#### Real-World Apps\n\n- [**Preact Hacker News**](https://hn.kristoferbaxter.com) _([GitHub Project](https://github.com/kristoferbaxter/preact-hn))_\n- [**Play.cash**](https://play.cash) :notes: _([GitHub Project](https://github.com/feross/play.cash))_\n- [**BitMidi**](https://bitmidi.com/) 🎹 Wayback machine for free MIDI files _([GitHub Project](https://github.com/feross/bitmidi.com))_\n- [**Ultimate Guitar**](https://www.ultimate-guitar.com) 🎸speed boosted by Preact.\n- [**ESBench**](http://esbench.com) is built using Preact.\n- [**BigWebQuiz**](https://bigwebquiz.com) _([GitHub Project](https://github.com/jakearchibald/big-web-quiz))_\n- [**Nectarine.rocks**](http://nectarine.rocks) _([GitHub Project](https://github.com/developit/nectarine))_ :peach:\n- [**TodoMVC**](https://preact-todomvc.surge.sh) _([GitHub Project](https://github.com/developit/preact-todomvc))_\n- [**OSS.Ninja**](https://oss.ninja) _([GitHub Project](https://github.com/developit/oss.ninja))_\n- [**GuriVR**](https://gurivr.com) _([GitHub Project](https://github.com/opennewslabs/guri-vr))_\n- [**Color Picker**](https://colors.now.sh) _([GitHub Project](https://github.com/lukeed/colors-app))_ :art:\n- [**Offline Gallery**](https://use-the-platform.com/offline-gallery/) _([GitHub Project](https://github.com/vaneenige/offline-gallery/))_ :balloon:\n- [**Periodic Weather**](https://use-the-platform.com/periodic-weather/) _([GitHub Project](https://github.com/vaneenige/periodic-weather/))_ :sunny:\n- [**Rugby News Board**](http://nbrugby.com) _[(GitHub Project)](https://github.com/rugby-board/rugby-board-node)_\n- [**Preact Gallery**](https://preact.gallery/) an 8KB photo gallery PWA built using Preact.\n- [**Rainbow Explorer**](https://use-the-platform.com/rainbow-explorer/) Preact app to translate real life color to digital color _([Github project](https://github.com/vaneenige/rainbow-explorer))_.\n- [**YASCC**](https://carlosqsilva.github.io/YASCC/#/) Yet Another SoundCloud Client _([Github project](https://github.com/carlosqsilva/YASCC))_.\n- [**Journalize**](https://preact-journal.herokuapp.com/) 14k offline-capable journaling PWA using preact. _([Github project](https://github.com/jpodwys/preact-journal))_.\n\n#### Runnable Examples\n\n- [**Flickr Browser**](http://codepen.io/developit/full/VvMZwK/) (@ CodePen)\n- [**Animating Text**](http://codepen.io/developit/full/LpNOdm/) (@ CodePen)\n- [**60FPS Rainbow Spiral**](http://codepen.io/developit/full/xGoagz/) (@ CodePen)\n- [**Simple Clock**](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/) (@ JSFiddle)\n- [**3D + ThreeJS**](http://codepen.io/developit/pen/PPMNjd?editors=0010) (@ CodePen)\n- [**Stock Ticker**](http://codepen.io/developit/pen/wMYoBb?editors=0010) (@ CodePen)\n- [_Create your Own!_](https://jsfiddle.net/developit/rs6zrh5f/embedded/result/) (@ JSFiddle)\n\n### Starter Projects\n\n- [**Preact Boilerplate**](https://preact-boilerplate.surge.sh) _([GitHub Project](https://github.com/developit/preact-boilerplate))_ :zap:\n- [**Preact Offline Starter**](https://preact-starter.now.sh) _([GitHub Project](https://github.com/lukeed/preact-starter))_ :100:\n- [**Preact PWA**](https://preact-pwa-yfxiijbzit.now.sh/) _([GitHub Project](https://github.com/ezekielchentnik/preact-pwa))_ :hamburger:\n- [**Parcel + Preact + Unistore Starter**](https://github.com/hwclass/parcel-preact-unistore-starter)\n- [**Preact Mobx Starter**](https://awaw00.github.io/preact-mobx-starter/) _([GitHub Project](https://github.com/awaw00/preact-mobx-starter))_ :sunny:\n- [**Preact Redux Example**](https://github.com/developit/preact-redux-example) :star:\n- [**Preact Redux/RxJS/Reselect Example**](https://github.com/continuata/preact-seed)\n- [**V2EX Preact**](https://github.com/yanni4night/v2ex-preact)\n- [**Preact Coffeescript**](https://github.com/crisward/preact-coffee)\n- [**Preact + TypeScript + Webpack**](https://github.com/k1r0s/bleeding-preact-starter)\n- [**0 config => Preact + Poi**](https://github.com/k1r0s/preact-poi-starter)\n- [**Zero configuration => Preact + Typescript + Parcel**](https://github.com/aalises/preact-typescript-parcel-starter)\n\n---\n\n## Libraries & Add-ons\n\n- :raised_hands: [**preact-compat**](https://git.io/preact-compat): use any React library with Preact _([full example](http://git.io/preact-compat-example))_\n- :twisted_rightwards_arrows: [**preact-context**](https://github.com/valotas/preact-context): React's `createContext` api for Preact\n- :page_facing_up: [**preact-render-to-string**](https://git.io/preact-render-to-string): Universal rendering.\n- :eyes: [**preact-render-spy**](https://github.com/mzgoddard/preact-render-spy): Enzyme-lite: Renderer with access to the produced virtual dom for testing.\n- :loop: [**preact-render-to-json**](https://git.io/preact-render-to-json): Render for Jest Snapshot testing.\n- :earth_americas: [**preact-router**](https://git.io/preact-router): URL routing for your components\n- :bookmark_tabs: [**preact-markup**](https://git.io/preact-markup): Render HTML & Custom Elements as JSX & Components\n- :satellite: [**preact-portal**](https://git.io/preact-portal): Render Preact components into (a) SPACE :milky_way:\n- :pencil: [**preact-richtextarea**](https://git.io/preact-richtextarea): Simple HTML editor component\n- :bookmark: [**preact-token-input**](https://github.com/developit/preact-token-input): Text field that tokenizes input, for things like tags\n- :card_index: [**preact-virtual-list**](https://github.com/developit/preact-virtual-list): Easily render lists with millions of rows ([demo](https://jsfiddle.net/developit/qqan9pdo/))\n- :repeat: [**preact-cycle**](https://git.io/preact-cycle): Functional-reactive paradigm for Preact\n- :triangular_ruler: [**preact-layout**](https://download.github.io/preact-layout/): Small and simple layout library\n- :thought_balloon: [**preact-socrates**](https://github.com/matthewmueller/preact-socrates): Preact plugin for [Socrates](http://github.com/matthewmueller/socrates)\n- :rowboat: [**preact-flyd**](https://github.com/xialvjun/preact-flyd): Use [flyd](https://github.com/paldepind/flyd) FRP streams in Preact + JSX\n- :speech_balloon: [**preact-i18nline**](https://github.com/download/preact-i18nline): Integrates the ecosystem around [i18n-js](https://github.com/everydayhero/i18n-js) with Preact via [i18nline](https://github.com/download/i18nline).\n- :microscope: [**preact-jsx-chai**](https://git.io/preact-jsx-chai): JSX assertion testing _(no DOM, right in Node)_\n- :tophat: [**preact-classless-component**](https://github.com/ld0rman/preact-classless-component): create preact components without the class keyword\n- :hammer: [**preact-hyperscript**](https://github.com/queckezz/preact-hyperscript): Hyperscript-like syntax for creating elements\n- :white_check_mark: [**shallow-compare**](https://github.com/tkh44/shallow-compare): simplified `shouldComponentUpdate` helper.\n- :shaved_ice: [**preact-codemod**](https://github.com/vutran/preact-codemod): Transform your React code to Preact.\n- :construction_worker: [**preact-helmet**](https://github.com/download/preact-helmet): A document head manager for Preact\n- :necktie: [**preact-delegate**](https://github.com/NekR/preact-delegate): Delegate DOM events\n- :art: [**preact-stylesheet-decorator**](https://github.com/k1r0s/preact-stylesheet-decorator): Add Scoped Stylesheets to your Preact Components\n- :electric_plug: [**preact-routlet**](https://github.com/k1r0s/preact-routlet): Simple `Component Driven` Routing for Preact using ES7 Decorators\n- :fax: [**preact-bind-group**](https://github.com/k1r0s/preact-bind-group): Preact Forms made easy, Group Events into a Single Callback\n- :hatching_chick: [**preact-habitat**](https://github.com/zouhir/preact-habitat): Declarative Preact widgets renderer in any CMS or DOM host ([demo](https://codepen.io/zouhir/pen/brrOPB)).\n- :tada: [**proppy-preact**](https://github.com/fahad19/proppy): Functional props composition for Preact components\n\n#### UI Component Libraries\n\n> Want to prototype something or speed up your development? Try one of these toolkits:\n\n- [**preact-material-components**](https://github.com/prateekbh/preact-material-components): Material Design Components for Preact ([website](https://material.preactjs.com/))\n- [**preact-mdc**](https://github.com/BerndWessels/preact-mdc): Material Design Components for Preact ([demo](https://github.com/BerndWessels/preact-mdc-demo))\n- [**preact-mui**](https://git.io/v1aVO): The MUI CSS Preact library.\n- [**preact-photon**](https://git.io/preact-photon): build beautiful desktop UI with [photon](http://photonkit.com)\n- [**preact-mdl**](https://git.io/preact-mdl): [Material Design Lite](https://getmdl.io) for Preact\n- [**preact-weui**](https://github.com/afeiship/preact-weui): [Weui](https://github.com/afeiship/preact-weui) for Preact\n\n---\n\n## Getting Started\n\n> 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_\n\nThe easiest way to get started with Preact is to install [Preact CLI](https://github.com/developit/preact-cli). This simple command-line tool wraps up the best possible Webpack and Babel setup for you, and even keeps you up-to-date as the underlying tools change. Best of all, it's easy to understand! It builds your app in a single command (`preact build`), doesn't need any configuration, and bakes in best-practises 🙌.\n\nThe following guide assumes you have some sort of ES2015 build set up using babel and/or webpack/browserify/gulp/grunt/etc.\n\nYou can also start with [preact-boilerplate] or a [CodePen Template](http://codepen.io/developit/pen/pgaROe?editors=0010).\n\n### Import what you need\n\nThe `preact` module provides both named and default exports, so you can either import everything under a namespace of your choosing, or just what you need as locals:\n\n##### Named:\n\n```js\nimport { h, render, Component } from \"preact\";\n\n// Tell Babel to transform JSX into h() calls:\n/** @jsx h */\n```\n\n##### Default:\n\n```js\nimport preact from \"preact\";\n\n// Tell Babel to transform JSX into preact.h() calls:\n/** @jsx preact.h */\n```\n\n> Named imports work well for highly structured applications, whereas the default import is quick and never needs to be updated when using different parts of the library.\n>\n> Instead of declaring the `@jsx` pragma in your code, it's best to configure it globally in a `.babelrc`:\n>\n> **For Babel 5 and prior:**\n>\n> ```json\n> { \"jsxPragma\": \"h\" }\n> ```\n>\n> **For Babel 6:**\n>\n> ```json\n> {\n> \t\"plugins\": [[\"transform-react-jsx\", { \"pragma\": \"h\" }]]\n> }\n> ```\n>\n> **For Babel 7:**\n>\n> ```json\n> {\n> \t\"plugins\": [[\"@babel/plugin-transform-react-jsx\", { \"pragma\": \"h\" }]]\n> }\n> ```\n>\n> **For using Preact along with TypeScript add to `tsconfig.json`:**\n>\n> ```json\n> {\n> \t\"jsx\": \"react\",\n> \t\"jsxFactory\": \"h\"\n> }\n> ```\n\n### Rendering JSX\n\nOut of the box, Preact provides an `h()` function that turns your JSX into Virtual DOM elements _([here's how](http://jasonformat.com/wtf-is-jsx))_. It also provides a `render()` function that creates a DOM tree from that Virtual DOM.\n\nTo render some JSX, just import those two functions and use them like so:\n\n```js\nimport { h, render } from \"preact\";\n\nrender(\n\t<div id=\"foo\">\n\t\t<span>Hello, world!</span>\n\t\t<button onClick={e => alert(\"hi!\")}>Click Me</button>\n\t</div>,\n\tdocument.body\n);\n```\n\nThis should seem pretty straightforward if you've used hyperscript or one of its many friends. If you're not, the short of it is that the `h()` function import gets used in the final, transpiled code as a drop in replacement for `React.createElement()`, and so needs to be imported even if you don't explicitly use it in the code you write. Also note that if you're the kind of person who likes writing your React code in \"pure JavaScript\" (you know who you are) you will need to use `h()` wherever you would otherwise use `React.createElement()`.\n\nRendering hyperscript with a virtual DOM is pointless, though. We want to render components and have them updated when data changes - that's where the power of virtual DOM diffing shines. :star2:\n\n### Components\n\nPreact exports a generic `Component` class, which can be extended to build encapsulated, self-updating pieces of a User Interface. Components support all of the standard React [lifecycle methods], like `shouldComponentUpdate()` and `componentWillReceiveProps()`. Providing specific implementations of these methods is the preferred mechanism for controlling _when_ and _how_ components update.\n\nComponents also have a `render()` method, but unlike React this method is passed `(props, state)` as arguments. This provides an ergonomic means to destructure `props` and `state` into local variables to be referenced from JSX.\n\nLet's take a look at a very simple `Clock` component, which shows the current time.\n\n```js\nimport { h, render, Component } from \"preact\";\n\nclass Clock extends Component {\n\trender() {\n\t\tlet time = new Date();\n\t\treturn (\n\t\t\t<time datetime={time.toISOString()}>{time.toLocaleTimeString()}</time>\n\t\t);\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nThat's great. Running this produces the following HTML DOM structure:\n\n```html\n<span>10:28:57 PM</span>\n```\n\nIn order to have the clock's time update every second, we need to know when `<Clock>` gets mounted to the DOM. _If you've used HTML5 Custom Elements, this is similar to the `attachedCallback` and `detachedCallback` lifecycle methods._ Preact invokes the following lifecycle methods if they are defined for a Component:\n\n| Lifecycle method            | When it gets called                              |\n| --------------------------- | ------------------------------------------------ |\n| `componentWillMount`        | before the component gets mounted to the DOM     |\n| `componentDidMount`         | after the component gets mounted to the DOM      |\n| `componentWillUnmount`      | prior to removal from the DOM                    |\n| `componentWillReceiveProps` | before new props get accepted                    |\n| `shouldComponentUpdate`     | before `render()`. Return `false` to skip render |\n| `componentWillUpdate`       | before `render()`                                |\n| `componentDidUpdate`        | after `render()`                                 |\n\nSo, we want to have a 1-second timer start once the Component gets added to the DOM, and stop if it is removed. We'll create the timer and store a reference to it in `componentDidMount()`, and stop the timer in `componentWillUnmount()`. On each timer tick, we'll update the component's `state` object with a new time value. Doing this will automatically re-render the component.\n\n```js\nimport { h, render, Component } from \"preact\";\n\nclass Clock extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t// set initial time:\n\t\tthis.state = {\n\t\t\ttime: Date.now()\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// update time every second\n\t\tthis.timer = setInterval(() => {\n\t\t\tthis.setState({ time: Date.now() });\n\t\t}, 1000);\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// stop when not renderable\n\t\tclearInterval(this.timer);\n\t}\n\n\trender(props, state) {\n\t\tlet time = new Date(state.time).toLocaleTimeString();\n\t\treturn <span>{time}</span>;\n\t}\n}\n\n// render an instance of Clock into <body>:\nrender(<Clock />, document.body);\n```\n\nNow we have [a ticking clock](http://jsfiddle.net/developit/u9m5x0L7/embedded/result,js/)!\n\n### Props & State\n\nThe concept (and nomenclature) for `props` and `state` is the same as in React. `props` are passed to a component by defining attributes in JSX, `state` is internal state. Changing either triggers a re-render, though by default Preact re-renders Components asynchronously for `state` changes and synchronously for `props` changes. You can tell Preact to render `prop` changes asynchronously by setting `options.syncComponentUpdates` to `false`.\n\n---\n\n## Linked State\n\nOne area Preact takes a little further than React is in optimizing state changes. A common pattern in ES2015 React code is to use Arrow functions within a `render()` method in order to update state in response to events. Creating functions enclosed in a scope on every render is inefficient and forces the garbage collector to do more work than is necessary.\n\nOne solution to this is to bind component methods declaratively.\nHere is an example using [decko](http://git.io/decko):\n\n```js\nclass Foo extends Component {\n\t@bind\n\tupdateText(e) {\n\t\tthis.setState({ text: e.target.value });\n\t}\n\trender({}, { text }) {\n\t\treturn <input value={text} onInput={this.updateText} />;\n\t}\n}\n```\n\nWhile this achieves much better runtime performance, it's still a lot of unnecessary code to wire up state to UI.\n\nFortunately there is a solution, in the form of a module called [linkstate](https://github.com/developit/linkstate). Calling `linkState(component, 'text')` returns a function that accepts an Event and uses its associated value to update the given property in your component's state. Calls to `linkState()` with the same arguments are cached, so there is no performance penalty. Here is the previous example rewritten using _Linked State_:\n\n```js\nimport linkState from \"linkstate\";\n\nclass Foo extends Component {\n\trender({}, { text }) {\n\t\treturn <input value={text} onInput={linkState(this, \"text\")} />;\n\t}\n}\n```\n\nSimple and effective. It handles linking state from any input type, or an optional second parameter can be used to explicitly provide a keypath to the new state value.\n\n> **Note:** In Preact 7 and prior, `linkState()` was built right into Component. In 8.0, it was moved to a separate module. You can restore the 7.x behavior by using linkstate as a polyfill - see [the linkstate docs](https://github.com/developit/linkstate#usage).\n\n## Examples\n\nHere is a somewhat verbose Preact `<Link>` component:\n\n```js\nclass Link extends Component {\n\trender(props, state) {\n\t\treturn <a href={props.href}>{props.children}</a>;\n\t}\n}\n```\n\nSince this is ES6/ES2015, we can further simplify:\n\n```js\nclass Link extends Component {\n\trender({ href, children }) {\n\t\treturn <a {...{ href, children }} />;\n\t}\n}\n\n// or, for wide-open props support:\nclass Link extends Component {\n\trender(props) {\n\t\treturn <a {...props} />;\n\t}\n}\n\n// or, as a stateless functional component:\nconst Link = ({ children, ...props }) => <a {...props}>{children}</a>;\n```\n\n## Extensions\n\nIt is likely that some projects based on Preact would wish to extend Component with great new functionality.\n\nPerhaps automatic connection to stores for a Flux-like architecture, or mixed-in context bindings to make it feel more like `React.createClass()`. Just use ES2015 inheritance:\n\n```js\nclass BoundComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bind();\n\t}\n\tbind() {\n\t\tthis.binds = {};\n\t\tfor (let i in this) {\n\t\t\tthis.binds[i] = this[i].bind(this);\n\t\t}\n\t}\n}\n\n// example usage\nclass Link extends BoundComponent {\n\tclick() {\n\t\topen(this.href);\n\t}\n\trender() {\n\t\tlet { click } = this.binds;\n\t\treturn <span onclick={click}>{children}</span>;\n\t}\n}\n```\n\nThe possibilities are pretty endless here. You could even add support for rudimentary mixins:\n\n```js\nclass MixedComponent extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\t(this.mixins || []).forEach(m => Object.assign(this, m));\n\t}\n}\n```\n\n## Debug Mode\n\nYou can inspect and modify the state of your Preact UI components at runtime using the\n[React Developer Tools](https://github.com/facebook/react-devtools) browser extension.\n\n1. Install the [React Developer Tools](https://github.com/facebook/react-devtools) extension\n2. Import the \"preact/debug\" module in your app\n3. Set `process.env.NODE_ENV` to 'development'\n4. Reload and go to the 'React' tab in the browser's development tools\n\n```js\nimport { h, Component, render } from \"preact\";\n\n// Enable debug mode. You can reduce the size of your app by only including this\n// module in development builds. eg. In Webpack, wrap this with an `if (module.hot) {...}`\n// check.\nrequire(\"preact/debug\");\n```\n\n### Runtime Error Checking\n\nTo enable debug mode, you need to set `process.env.NODE_ENV=development`. You can do this\nwith webpack via a builtin plugin.\n\n```js\n// webpack.config.js\n\n// Set NODE_ENV=development to enable error checking\nnew webpack.DefinePlugin({\n\t\"process.env\": {\n\t\tNODE_ENV: JSON.stringify(\"development\")\n\t}\n});\n```\n\nWhen enabled, warnings are logged to the console when undefined components or string refs\nare detected.\n\n### Developer Tools\n\nIf you only want to include devtool integration, without runtime error checking, you can\nreplace `preact/debug` in the above example with `preact/devtools`. This option doesn't\nrequire setting `NODE_ENV=development`.\n\n## Backers\n\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]\n\n<a href=\"https://opencollective.com/preact/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/backer/29/avatar.svg\"></a>\n\n## Sponsors\n\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]\n\n<a href=\"https://opencollective.com/preact/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/9/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/10/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/11/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/12/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/13/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/14/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/15/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/16/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/17/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/18/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/19/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/20/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/21/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/22/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/23/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/24/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/25/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/26/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/27/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/28/avatar.svg\"></a>\n<a href=\"https://opencollective.com/preact/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/preact/sponsor/29/avatar.svg\"></a>\n\n## License\n\nMIT\n\n[![Preact](http://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)\n\n[preact-compat]: https://github.com/developit/preact-compat\n[es6 class]: https://facebook.github.io/react/docs/reusable-components.html#es6-classes\n[functional components]: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components\n[hyperscript]: https://github.com/dominictarr/hyperscript\n[preact-boilerplate]: https://github.com/developit/preact-boilerplate\n[lifecycle methods]: https://facebook.github.io/react/docs/component-specs.html\n\n## 更新日志\n\n### 2019-08-28\n\n- ✅ mobx 替代方案 forceUpdate(identCode:number|string,callback?: () => void): void;\n","readmeFilename":"README.md","gitHead":"2608ca7ae0e62bea934bfdbe298e52b7db16c0b9","_id":"stb-react@0.5.1-beta.4","_nodeVersion":"8.12.0","_npmVersion":"6.10.1","dist":{"integrity":"sha512-7KHvif+vc9oO3TFRp+ZBet9WmVm0pj+0s6Sgpmq5SNPZiXm9SJcqz8EYPvRz0D/73IcPmFYyAT4BUlLat7HQVA==","shasum":"f78b16c401d337410887ca6973e847e0052e7c90","tarball":"https://registry.npmjs.org/stb-react/-/stb-react-0.5.1-beta.4.tgz","fileCount":69,"unpackedSize":665301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcKebCRA9TVsSAnZWagAAaDsP/2VcoPoU1yxxvXprHwcf\nScltjILcEZu1pXi6U948i8YqyItb2emks5mnvhRxc77aLJ9/HX6cahakf0Me\nYpHVqZY+q0p5WqDrjzl18Hffc6j91jsMwn9uPUf0XSH8EKPtTCtCrY85fRqw\nzz5bn/sEixlBCdd8cR8BfFIHnc/W6qxpRcXR7+Cj0w14+NJINHXFJwsbjrDv\nj8mnFR/bWSF3X3orUKvIU9cMKm+IEIiuBq+cyWC1dFqxhkZHpuMbnyZG2w9L\nYOyitATKxTASF1a4K6XQN4XBn4naqG96CrgyXX06GXP2YPg6lOzbn/zVfsK5\n3AH1xOSp3gC25PAymqzOR0s0QiEA3gnuUy3a8BZYH8CYKIY7kAUpd2uT9Hih\nZCEnJLzC7nUkjE52LnxBzYnZGfFyzX0GdfwHhenkMOsIQoOiZ9qckG9tbEZE\n1NbbwldWeWyEJZtWF+sVfyfGLhoiVW0I9yOla36RDnsQ3oXJV/xsql4ZshE0\nfBBp8GzNTlqt5BkvPxw8LrReNHgq7sGyaTGH00VM2cOFPMHbjO4JhKXIFJW0\nh4xRFsN/XNeRSFaACOfSGyLV2/l6u1qJc6jjLV2wBQy9wlCPS95VmJZ9VPIw\nvT+Fagqw8Gqu1c3V4+OoqAn5Yy8x9yJFbQLBldnKjJBhVbfDfO3IPVnsd744\nS9oo\r\n=nWBT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8bd76w0cNfaetTnWb6w6A69QbO9UOMHZWbU7ndl18uQIhAPfq0Mpco4cR0ElOZSGDXI+M5hPVk8RTXTMArgjz2H8m"}]},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"_npmUser":{"name":"zst442331311","email":"442331311@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stb-react_0.5.1-beta.4_1567664027096_0.48672391169184737"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-30T14:21:34.444Z","0.0.1":"2019-04-30T14:21:34.643Z","modified":"2022-05-18T16:52:08.050Z","0.0.1-beta":"2019-04-30T14:51:20.847Z","0.0.2-beta":"2019-04-30T15:01:56.534Z","0.0.3-beta":"2019-04-30T15:22:45.019Z","0.0.4-beta":"2019-04-30T16:22:49.637Z","0.0.5-beta":"2019-05-01T05:57:26.207Z","0.0.6-beta":"2019-05-07T10:02:14.567Z","0.0.7-beta":"2019-05-11T06:10:41.754Z","0.0.8-beta":"2019-05-11T08:03:21.790Z","0.0.9-beta":"2019-05-11T08:32:55.214Z","0.1.0-beta":"2019-05-11T11:40:27.577Z","0.1.1-beta":"2019-05-11T12:46:57.386Z","0.1.2-beta":"2019-05-11T13:43:35.463Z","0.1.3-beta":"2019-05-11T14:19:56.574Z","0.1.4-beta":"2019-05-11T14:24:23.527Z","0.1.5-beta":"2019-05-12T04:30:37.315Z","0.1.6-beta":"2019-05-12T06:30:01.546Z","0.1.7-beta":"2019-05-12T10:36:05.462Z","0.1.8-beta":"2019-05-12T10:45:16.791Z","0.1.9-beta":"2019-05-13T04:00:04.691Z","0.2.0-beta":"2019-05-13T05:44:23.005Z","0.2.1-beta":"2019-05-13T05:59:08.443Z","0.2.2-beta":"2019-05-13T09:51:19.749Z","0.2.3-beta":"2019-05-13T10:12:13.855Z","0.2.4-beta":"2019-05-13T11:40:48.719Z","0.2.5-beta":"2019-05-13T13:56:16.146Z","0.2.6-beta":"2019-05-14T01:55:27.201Z","0.2.7-beta":"2019-05-14T02:00:20.751Z","0.2.8-beta":"2019-05-14T02:19:25.112Z","0.2.9-beta":"2019-05-14T02:25:36.762Z","0.3.0-beta":"2019-05-14T02:42:51.137Z","0.3.1-beta":"2019-05-14T02:57:06.200Z","0.3.2-beta":"2019-05-14T03:21:27.159Z","0.3.3-beta":"2019-05-14T03:24:29.934Z","0.3.4-beta":"2019-05-14T09:04:06.236Z","0.3.5-beta":"2019-05-14T09:08:01.865Z","0.3.6-beta":"2019-05-14T09:45:28.797Z","0.3.7-beta":"2019-05-14T10:05:28.137Z","0.3.8-beta":"2019-05-14T10:57:26.889Z","0.3.9-beta":"2019-05-14T11:07:53.301Z","0.4.0-beta":"2019-05-14T11:15:49.627Z","0.4.1-beta":"2019-05-14T11:54:43.709Z","0.4.2-beta":"2019-05-14T12:59:34.812Z","0.4.3-beta":"2019-05-15T02:14:30.632Z","0.4.4-beta":"2019-05-15T02:35:43.610Z","0.4.5-beta":"2019-05-15T03:28:49.198Z","0.4.6-beta":"2019-05-15T05:17:19.878Z","0.5.0-beta.1":"2019-05-15T10:26:21.109Z","0.5.0-beta.2":"2019-05-15T10:40:39.936Z","0.5.0-beta.3":"2019-05-15T12:12:54.726Z","0.5.0-beta.4":"2019-05-15T12:13:31.934Z","0.5.0-beta.5":"2019-05-17T06:36:44.659Z","0.4.7-beta":"2019-05-24T02:42:15.577Z","0.4.8-beta":"2019-05-24T02:44:57.013Z","0.4.9-beta":"2019-05-24T02:48:33.935Z","0.5.0-beta.6":"2019-05-24T03:19:08.916Z","0.5.0-beta.7":"2019-05-27T06:37:55.076Z","0.5.0-beta.8":"2019-05-27T06:54:19.028Z","0.5.0-beta.9":"2019-05-30T02:52:38.213Z","0.5.1-beta":"2019-05-30T07:46:08.999Z","0.5.1-beta.1":"2019-05-30T08:04:05.388Z","0.5.1-beta.2":"2019-05-30T08:05:44.294Z","0.5.1-beta.3":"2019-08-28T08:57:12.581Z","0.5.1-beta.4":"2019-09-05T06:13:47.304Z"},"maintainers":[{"name":"zst442331311","email":"442331311@qq.com"}],"description":"享受 preact 在 epg 平台的极速开发体验！","keywords":["starter","frontend","preact","redux","typescript","epg","stb"],"author":{"name":"shitaozhang"},"license":"MIT","readme":"","readmeFilename":""}