├── static ├── favicon.ico ├── sphere.gif ├── index.html └── style.css ├── scripts ├── share.sh ├── deploy-www.sh ├── bin │ └── extract_zim_x86_64-pc-linux-gnu ├── extract.sh ├── download.sh ├── test.js ├── transform.sh ├── build.sh ├── deploy.sh ├── deploy-run.sh ├── main.sh ├── relinker.js ├── list.js └── transform.js ├── .flowconfig ├── www ├── .well-known │ └── dat └── index.html ├── .babelrc ├── .eslintrc ├── .gitignore ├── flow-typed └── npm │ ├── flow-bin_v0.x.x.js │ ├── mkdirp_v0.5.x.js │ ├── pify_v3.x.x.js │ ├── yauzl_vx.x.x.js │ ├── bubleify_vx.x.x.js │ ├── simple-concat_vx.x.x.js │ ├── zimmer_vx.x.x.js │ ├── normalize-for-search_vx.x.x.js │ ├── binary-search-bounds_vx.x.x.js │ ├── eslint-config-standard_vx.x.x.js │ ├── eslint-config-standard-flow_vx.x.x.js │ ├── eslint-config-standard-react_vx.x.x.js │ ├── react-autocomplete_vx.x.x.js │ ├── webworkify_vx.x.x.js │ ├── datauri_vx.x.x.js │ ├── prettier-eslint-cli_vx.x.x.js │ ├── eslint-plugin-standard_vx.x.x.js │ ├── comlinkjs_vx.x.x.js │ ├── eslint-plugin-promise_vx.x.x.js │ ├── flow-typed_vx.x.x.js │ ├── watchify_vx.x.x.js │ ├── npm-check_vx.x.x.js │ ├── eslint-plugin-node_vx.x.x.js │ ├── brfs_vx.x.x.js │ ├── eslint-plugin-import_vx.x.x.js │ ├── gl-matrix_v2.x.x.js │ └── eslint-plugin-react_vx.x.x.js ├── most-viewed ├── README.txt └── list.txt ├── app ├── App.js ├── worker.js ├── types.js ├── search.js ├── ArticlePage.js ├── SearchPage.js ├── SearchBox.js ├── globe.js └── index.js ├── lib ├── util.js └── unzip.js ├── README.md └── package.json /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcposch/datpedia/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/sphere.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcposch/datpedia/HEAD/static/sphere.gif -------------------------------------------------------------------------------- /scripts/share.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | cd ./organize/$1 4 | dat share --watch=false 5 | -------------------------------------------------------------------------------- /scripts/deploy-www.sh: -------------------------------------------------------------------------------- 1 | tar -czvf - www | ssh dcpos.ch "cd datpedia && tar -xzvf -" 2 | echo "done" 3 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | /build/.* 3 | 4 | [include] 5 | 6 | [libs] 7 | 8 | [options] 9 | -------------------------------------------------------------------------------- /www/.well-known/dat: -------------------------------------------------------------------------------- 1 | dat://74cae9d1f584fb5d4ad1e9d3a7e7dae1a39c757d309faf20ea4d32e91696eb31 2 | TTL=3600 3 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "transform-es2015-modules-commonjs" 4 | ], 5 | "presets": [ 6 | "react" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /scripts/bin/extract_zim_x86_64-pc-linux-gnu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcposch/datpedia/HEAD/scripts/bin/extract_zim_x86_64-pc-linux-gnu -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["standard", "standard-flow", "standard-react"], 3 | "rules": { 4 | "generator-star-spacing": ["off"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | 3 | download/ 4 | extract/ 5 | transform/ 6 | build/ 7 | 8 | static/bundle.js 9 | static/wiki.zip 10 | static/list-full.json 11 | static/list-partial.json 12 | 13 | .cache/ 14 | -------------------------------------------------------------------------------- /scripts/extract.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -d extract/$1 ]; then 5 | echo "Skipping extract, directory exists: extract/$1" 6 | else 7 | time ./scripts/bin/extract_zim_$MACHTYPE -o extract/$1 download/$1.zim 8 | fi 9 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -f download/$1.zim ]; then 5 | echo "Skipping download, file exists: download/$1.zim" 6 | else 7 | time wget https://dumps.wikimedia.org/other/kiwix/zim/wikipedia/$1.zim -O download/$1.zim 8 | fi 9 | -------------------------------------------------------------------------------- /scripts/test.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const {getLinks} = require('./relinker.js') 3 | 4 | const filename = './extract/wikipedia_en_ray_charles_2015-06/A/Ray_Charles.html' 5 | const html = fs.readFileSync(filename, 'utf8') 6 | const urls = getLinks(html) 7 | 8 | console.log(urls.join('\n')) 9 | -------------------------------------------------------------------------------- /scripts/transform.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -d transform/$1 ]; then 5 | echo "Skipping transform, directory exists: transform/$1" 6 | else 7 | time ./scripts/transform.js $1 8 | cd transform/$1 9 | time zip -r wiki.zip A 10 | cd ../.. 11 | time ./scripts/list.js $1 12 | fi 13 | -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | datpedia 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | npm run build 5 | 6 | rm -rf build/$1 7 | mkdir -p build/$1 8 | cd build/$1 9 | 10 | ln -s ../../static/favicon.ico ./ 11 | ln -s ../../static/index.html ./ 12 | ln -s ../../static/bundle.js ./ 13 | ln -s ../../static/sphere.gif ./ 14 | ln -s ../../static/style.css ./ 15 | 16 | ln -s ../../transform/$1/wiki.zip ./ 17 | ln -s ../../transform/$1/list-full.tsv ./ 18 | ln -s ../../transform/$1/list-partial.json ./ 19 | -------------------------------------------------------------------------------- /flow-typed/npm/mkdirp_v0.5.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 82aa0feffc2bbd64dce3bec492f5d601 2 | // flow-typed version: 3315d89a00/mkdirp_v0.5.x/flow_>=v0.25.0 3 | 4 | declare module 'mkdirp' { 5 | declare type Options = number | { mode?: number; fs?: mixed }; 6 | 7 | declare type Callback = (err: ?Error, path: ?string) => void; 8 | 9 | declare module.exports: { 10 | (path: string, options?: Options | Callback, callback?: Callback): void; 11 | sync(path: string, options?: Options): void; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /most-viewed/README.txt: -------------------------------------------------------------------------------- 1 | Array.prototype.slice.apply(document.querySelectorAll('a')) 2 | .map(a => a.href) 3 | .filter(url => url.startsWith('https://en.wikipedia.org/wiki')) 4 | .map(url => url.substring('https://en.wikipedia.org/wiki/'.length)) 5 | .filter(n => !n.startsWith('Wikipedia') && !n.startsWith('Special:') && !n.startsWith('Help:') && !n.startsWith('Portal:') && !n.startsWith('Category:') && !n.startsWith('User:') && n !== '-' && !n.endsWith('.php')) 6 | .join('\n') 7 | 8 | https://en.wikipedia.org/wiki/Wikipedia:Multiyear_ranking_of_most_viewed_pages 9 | -------------------------------------------------------------------------------- /app/App.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import React from 'react' 4 | import SearchPage from './SearchPage.js' 5 | import ArticlePage from './ArticlePage.js' 6 | 7 | import type { StoreDispatch } from './types.js' 8 | 9 | export default function App (props: StoreDispatch) { 10 | const { store, dispatch } = props 11 | const { urlName } = store 12 | console.log('rendering', urlName || 'search page') 13 | 14 | if (urlName != null) { 15 | return 16 | } else { 17 | return 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/util.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Sort `searchIndex` items with shape { name, searchName, urlName } 3 | * alphabetically by the `searchName` property. 4 | */ 5 | exports.searchIndexSort = function searchIndexSort (item1, item2) { 6 | const name1 = item1.searchName 7 | const name2 = item2.searchName 8 | 9 | if (name1 === name2) return 0 10 | 11 | return name1 < name2 ? -1 : 1 12 | } 13 | 14 | exports.urlNameToName = function urlNameToName (urlName) { 15 | let name = urlName.replace(/_/g, ' ') 16 | try { 17 | name = decodeURIComponent(name) 18 | } catch (_) {} 19 | return name 20 | } 21 | -------------------------------------------------------------------------------- /app/worker.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Comlink } from 'comlinkjs' 4 | 5 | export default function (self: any) { 6 | async function fetchIndex (url) { 7 | console.log('fetching search index ' + url) 8 | const res = await self.fetch(url) 9 | if (res.status !== 200) { 10 | throw new Error('Non-200 status code ' + res.status) 11 | } 12 | return res 13 | } 14 | 15 | async function fetchPartialIndex (url) { 16 | const res = await fetchIndex(url) 17 | const partialIndex = await res.json() 18 | return partialIndex 19 | } 20 | 21 | Comlink.expose({ 22 | fetchPartialIndex 23 | }, self) 24 | } 25 | -------------------------------------------------------------------------------- /scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | 2 | HOST="$1" 3 | 4 | if [ -z "$HOST" ]; then 5 | HOST="datpedia.us-east-1.aws" 6 | fi 7 | 8 | echo "Deploying to $HOST" 9 | 10 | cd .. && tar -czvf - \ 11 | --exclude='datpedia/node_modules' \ 12 | --exclude='datpedia/download' \ 13 | --exclude='datpedia/extract' \ 14 | --exclude='datpedia/transform' \ 15 | --exclude='datpedia/list' \ 16 | --exclude='datpedia/build' \ 17 | --exclude='datpedia/.git' \ 18 | --exclude='datpedia/static/wiki.zip' \ 19 | --exclude='datpedia/static/list-full.json' \ 20 | --exclude='datpedia/static/list-partial.json' \ 21 | datpedia | ssh $HOST "cd /mnt/disk && tar -xzvf -" 22 | cd datpedia 23 | echo "done" 24 | -------------------------------------------------------------------------------- /scripts/deploy-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | DEFAULT_HOST="datpedia.us-east-1.aws" 6 | 7 | if [ -z "$1" ]; then 8 | echo "Usage: ./scripts/deploy-run.sh " 9 | echo " Deploys, then invokes main.sh on the remote host" 10 | echo " Host defaults to $DEFAULT_HOST" 11 | fi 12 | 13 | if [ -z "$2" ]; then 14 | HOST="$DEFAULT_HOST" 15 | else 16 | HOST="$2" 17 | fi 18 | 19 | echo 'DEPLOYING' 20 | # ./scripts/deploy.sh $HOST 21 | 22 | echo 'RUNNING' 23 | #ssh $HOST "cd /mnt/disk/datpedia && screen -d -m -S deploy-run ./scripts/main.sh $1" 24 | #echo "Command started" 25 | 26 | ssh $HOST "cd /mnt/disk/datpedia && ./scripts/main.sh $1" 27 | -------------------------------------------------------------------------------- /scripts/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -z "$1" ]; then 5 | echo "Usage: ./scripts/main.sh " 6 | echo " Where comes from https://dumps.wikimedia.org/other/kiwix/zim/wikipedia/" 7 | echo 8 | echo "Example: ./scripts/main.sh wikipedia_en_ray_charles_2015-06" 9 | echo 10 | exit 11 | fi 12 | 13 | echo "WIKIMEDIA TO DAT" 14 | mkdir -p download extract 15 | 16 | echo "DOWNLOADING..." 17 | ./scripts/download.sh $1 18 | 19 | echo "EXTRACTING..." 20 | ./scripts/extract.sh $1 21 | 22 | echo "TRANSFORMING..." 23 | ./scripts/transform.sh $1 24 | 25 | echo "BUILDING THE WEB APP..." 26 | ./scripts/build.sh $1 27 | 28 | echo "DONE" 29 | echo "To update Datpedia, run:" 30 | echo "dat share -d build/$1" 31 | -------------------------------------------------------------------------------- /flow-typed/npm/pify_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4e2c2165eabcf00092e6d9d2222940ac 2 | // flow-typed version: 2e22276b15/pify_v3.x.x/flow_>=v0.25.x 3 | 4 | type $npm$pify$CPSFunction = (...args: any[]) => any; 5 | 6 | type $npm$pify$Options = { 7 | multiArgs?: boolean, 8 | include?: Array, 9 | exclude?: Array, 10 | excludeMain?: boolean, 11 | errorFirst?: boolean, 12 | promiseModule?: () => any 13 | }; 14 | 15 | type $npm$pify$PromisifiedFunction = (...args: any[]) => Promise<*>; 16 | 17 | declare module "pify" { 18 | declare module.exports: ( 19 | input: $npm$pify$CPSFunction | Object, 20 | options?: $npm$pify$Options 21 | ) => (...args: any[]) => Promise<*> | Object; 22 | } 23 | -------------------------------------------------------------------------------- /app/types.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export type Article = { 4 | urlName: string, 5 | name: string, 6 | searchName: string, 7 | compressedSize: number, 8 | relativeOffsetOfLocalHeader: number, 9 | compressedMethod: number, 10 | generalPurposeBitFlag: number 11 | } 12 | 13 | export type Store = { 14 | urlName: ?string, 15 | citeNote: ?string, 16 | searchIndexes: { 17 | partial: Article[], 18 | full: Article[], 19 | partialPromise: ?Promise, 20 | fullPromise: ?Promise 21 | }, 22 | articleCache: { [string]: string }, 23 | search: ?string 24 | } 25 | 26 | export type DispatchFunc =(string, any) => void 27 | 28 | export type StoreDispatch = { 29 | store: Store, 30 | dispatch: DispatchFunc 31 | } 32 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | datpedia 5 | 10 | 17 | 18 | 19 |

datpedia

20 |

21 | this is the old web. go to 22 | wikipedia.org, or install 23 | Beaker Browser to explore the 24 | peer-to-peer web. try visiting 25 | dat://datpedia.org in Beaker. 26 |

27 | 28 | 29 | -------------------------------------------------------------------------------- /flow-typed/npm/yauzl_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: cd7f348a220d53659ce1acd7853cc324 2 | // flow-typed version: <>/yauzl_vgithub:dcposch/yauzl/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'yauzl' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'yauzl' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'yauzl/index' { 29 | declare module.exports: $Exports<'yauzl'>; 30 | } 31 | declare module 'yauzl/index.js' { 32 | declare module.exports: $Exports<'yauzl'>; 33 | } 34 | -------------------------------------------------------------------------------- /app/search.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import normalizeForSearch from 'normalize-for-search' 4 | import binarySearchBounds from 'binary-search-bounds' 5 | 6 | import { searchIndexSort } from '../lib/util.js' 7 | 8 | import type { Article } from './types.js' 9 | 10 | module.exports = { findItem, findRange } 11 | 12 | function findItem (searchIndex: Article[], name: string) { 13 | const searchName = normalizeForSearch(name) 14 | const ix = binarySearchBounds.eq(searchIndex, { searchName }, searchIndexSort) 15 | return ix < 0 ? null : searchIndex[ix] 16 | } 17 | 18 | function findRange (searchIndex: Article[], prefix: string) { 19 | const searchPrefix = normalizeForSearch(prefix) 20 | 21 | // create items for binary search 22 | const startItem = { searchName: searchPrefix } 23 | const endItem = { searchName: searchPrefix + String.fromCharCode(0xffff) } 24 | 25 | const matchedItems = searchIndex.slice( 26 | binarySearchBounds.ge(searchIndex, startItem, searchIndexSort), 27 | binarySearchBounds.lt(searchIndex, endItem, searchIndexSort) + 1 28 | ) 29 | 30 | return matchedItems 31 | } 32 | -------------------------------------------------------------------------------- /app/ArticlePage.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import React from 'react' 4 | import SearchBox from './SearchBox.js' 5 | 6 | import type { StoreDispatch } from './types.js' 7 | 8 | /** 9 | * Shows a Wikipedia article, with a search bar at the top. 10 | */ 11 | export default class ArticlePage extends React.Component { 12 | props: StoreDispatch 13 | 14 | render () { 15 | const { store, dispatch } = this.props 16 | const { articleCache, urlName } = store 17 | 18 | if (urlName == null) return null 19 | 20 | const isSearching = store.search != null 21 | const name = urlName.replace(/_/g, ' ') 22 | 23 | const html = 24 | articleCache[urlName] || '

' + name + '

Loading...

' 25 | 26 | return ( 27 |
28 |
29 | datpedia 30 | 31 |
32 |
36 |
37 | ) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/bubleify_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e6f1d92a6efcc57f3d727b5e0b81de5a 2 | // flow-typed version: <>/bubleify_v^1.1.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'bubleify' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'bubleify' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'bubleify/lib/Bubleify' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'bubleify/index' { 31 | declare module.exports: $Exports<'bubleify'>; 32 | } 33 | declare module 'bubleify/index.js' { 34 | declare module.exports: $Exports<'bubleify'>; 35 | } 36 | declare module 'bubleify/lib/Bubleify.js' { 37 | declare module.exports: $Exports<'bubleify/lib/Bubleify'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/simple-concat_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5619e3acb5c6851b13acb9c2c05015b2 2 | // flow-typed version: <>/simple-concat_v^1.0.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'simple-concat' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'simple-concat' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'simple-concat/test/basic' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'simple-concat/index' { 31 | declare module.exports: $Exports<'simple-concat'>; 32 | } 33 | declare module 'simple-concat/index.js' { 34 | declare module.exports: $Exports<'simple-concat'>; 35 | } 36 | declare module 'simple-concat/test/basic.js' { 37 | declare module.exports: $Exports<'simple-concat/test/basic'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/zimmer_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4cf1c1e142364a8013af084e5fcd1ac9 2 | // flow-typed version: <>/zimmer_v^1.1.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'zimmer' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'zimmer' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'zimmer/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'zimmer/test' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'zimmer/cli.js' { 35 | declare module.exports: $Exports<'zimmer/cli'>; 36 | } 37 | declare module 'zimmer/index' { 38 | declare module.exports: $Exports<'zimmer'>; 39 | } 40 | declare module 'zimmer/index.js' { 41 | declare module.exports: $Exports<'zimmer'>; 42 | } 43 | declare module 'zimmer/test.js' { 44 | declare module.exports: $Exports<'zimmer/test'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/normalize-for-search_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f67661c015b0acc931c402b1e3f48512 2 | // flow-typed version: <>/normalize-for-search_v^2.0.1/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'normalize-for-search' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'normalize-for-search' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'normalize-for-search/src/normalize' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'normalize-for-search/tests/normalize.test' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'normalize-for-search/src/normalize.js' { 35 | declare module.exports: $Exports<'normalize-for-search/src/normalize'>; 36 | } 37 | declare module 'normalize-for-search/tests/normalize.test.js' { 38 | declare module.exports: $Exports<'normalize-for-search/tests/normalize.test'>; 39 | } 40 | -------------------------------------------------------------------------------- /app/SearchPage.js: -------------------------------------------------------------------------------- 1 | /* flow */ 2 | 3 | import React from 'react' 4 | 5 | import SearchBox from './SearchBox.js' 6 | // import Globe from './Globe.js' 7 | 8 | import type { StoreDispatch } from './types.js' 9 | 10 | /** 11 | * Search page; doubles as the Datpedia homepage. 12 | */ 13 | export default class SearchPage extends React.Component { 14 | props: StoreDispatch 15 | 16 | render () { 17 | const { store, dispatch } = this.props 18 | 19 | const styleGlobe = { 20 | position: 'absolute', 21 | top: 0, 22 | left: '10%', 23 | bottom: 0, 24 | right: '10%', 25 | backgroundImage: 'url(./sphere---DISABLED---.gif)', 26 | backgroundSize: 'cover', 27 | backgroundRepeat: 'no-repeat', 28 | zIndex: -2 29 | } 30 | 31 | const styleBlur = { 32 | position: 'absolute', 33 | top: 0, 34 | left: 0, 35 | bottom: 0, 36 | right: 0, 37 | filter: 'blur(8px)', 38 | zIndex: -1 39 | } 40 | 41 | return ( 42 |
43 |
44 |
45 |
46 | 47 |

datpedia

48 | 49 |

50 | wikipedia over dat://
51 |
52 | a peer-to-peer encyclopedia
53 | for the peer-to-peer web 54 |

55 | 56 | 57 |
58 | ) 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /flow-typed/npm/binary-search-bounds_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8735fece322f998a39aa2742373c864b 2 | // flow-typed version: <>/binary-search-bounds_v^2.0.3/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'binary-search-bounds' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'binary-search-bounds' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'binary-search-bounds/example/example' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'binary-search-bounds/search-bounds' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'binary-search-bounds/test/test' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'binary-search-bounds/example/example.js' { 39 | declare module.exports: $Exports<'binary-search-bounds/example/example'>; 40 | } 41 | declare module 'binary-search-bounds/search-bounds.js' { 42 | declare module.exports: $Exports<'binary-search-bounds/search-bounds'>; 43 | } 44 | declare module 'binary-search-bounds/test/test.js' { 45 | declare module.exports: $Exports<'binary-search-bounds/test/test'>; 46 | } 47 | -------------------------------------------------------------------------------- /scripts/relinker.js: -------------------------------------------------------------------------------- 1 | 2 | function getLinks (html) { 3 | const re = /]* href="([^"]*)"/gm 4 | return getGroup1(html, re) 5 | } 6 | 7 | function getImageUrls (html) { 8 | const re = /]* src="([^"]*)"/gm 9 | return getGroup1(html, re) 10 | } 11 | 12 | function rewriteImageUrls (html, func) { 13 | const re = /]*) src="([^"]*)"/gm 14 | 15 | const ret = [] 16 | let lastIndex = 0 17 | let m 18 | while ((m = re.exec(html)) != null) { 19 | ret.push(html.substring(lastIndex, re.lastIndex - m[0].length)) 20 | ret.push(']*) href="([^"]*)"/gm 34 | 35 | const ret = [] 36 | let lastIndex = 0 37 | let m 38 | while ((m = re.exec(html)) != null) { 39 | ret.push(html.substring(lastIndex, re.lastIndex - m[0].length)) 40 | ret.push('>/eslint-config-standard_v^10.0.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-standard' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-standard' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-standard/test/basic' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-standard/test/validate-config' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'eslint-config-standard/index' { 35 | declare module.exports: $Exports<'eslint-config-standard'>; 36 | } 37 | declare module 'eslint-config-standard/index.js' { 38 | declare module.exports: $Exports<'eslint-config-standard'>; 39 | } 40 | declare module 'eslint-config-standard/test/basic.js' { 41 | declare module.exports: $Exports<'eslint-config-standard/test/basic'>; 42 | } 43 | declare module 'eslint-config-standard/test/validate-config.js' { 44 | declare module.exports: $Exports<'eslint-config-standard/test/validate-config'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-standard-flow_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: af3325aa0315ad173708cca034e4adc4 2 | // flow-typed version: <>/eslint-config-standard-flow_v^1.0.1/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-standard-flow' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-standard-flow' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-standard-flow/test/basic' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-standard-flow/test/validate-config' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'eslint-config-standard-flow/index' { 35 | declare module.exports: $Exports<'eslint-config-standard-flow'>; 36 | } 37 | declare module 'eslint-config-standard-flow/index.js' { 38 | declare module.exports: $Exports<'eslint-config-standard-flow'>; 39 | } 40 | declare module 'eslint-config-standard-flow/test/basic.js' { 41 | declare module.exports: $Exports<'eslint-config-standard-flow/test/basic'>; 42 | } 43 | declare module 'eslint-config-standard-flow/test/validate-config.js' { 44 | declare module.exports: $Exports<'eslint-config-standard-flow/test/validate-config'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-standard-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4602adb94d8aab77f4e2ba5fcc8a6618 2 | // flow-typed version: <>/eslint-config-standard-react_v^5.0.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-standard-react' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-standard-react' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-standard-react/test/basic' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-standard-react/test/validate-config' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'eslint-config-standard-react/index' { 35 | declare module.exports: $Exports<'eslint-config-standard-react'>; 36 | } 37 | declare module 'eslint-config-standard-react/index.js' { 38 | declare module.exports: $Exports<'eslint-config-standard-react'>; 39 | } 40 | declare module 'eslint-config-standard-react/test/basic.js' { 41 | declare module.exports: $Exports<'eslint-config-standard-react/test/basic'>; 42 | } 43 | declare module 'eslint-config-standard-react/test/validate-config.js' { 44 | declare module.exports: $Exports<'eslint-config-standard-react/test/validate-config'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/react-autocomplete_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 81ac5b4bf4135e7c6f76c9469523c473 2 | // flow-typed version: <>/react-autocomplete_v^1.7.2/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-autocomplete' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-autocomplete' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-autocomplete/build/lib/Autocomplete' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-autocomplete/build/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-autocomplete/dist/react-autocomplete' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-autocomplete/dist/react-autocomplete.min' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'react-autocomplete/build/lib/Autocomplete.js' { 43 | declare module.exports: $Exports<'react-autocomplete/build/lib/Autocomplete'>; 44 | } 45 | declare module 'react-autocomplete/build/lib/index.js' { 46 | declare module.exports: $Exports<'react-autocomplete/build/lib/index'>; 47 | } 48 | declare module 'react-autocomplete/dist/react-autocomplete.js' { 49 | declare module.exports: $Exports<'react-autocomplete/dist/react-autocomplete'>; 50 | } 51 | declare module 'react-autocomplete/dist/react-autocomplete.min.js' { 52 | declare module.exports: $Exports<'react-autocomplete/dist/react-autocomplete.min'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/webworkify_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7fbc8ae096d4c8ffa73b0bc5df2f6014 2 | // flow-typed version: <>/webworkify_v^1.5.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webworkify' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webworkify' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webworkify/example/bare-blob-main' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webworkify/example/bare-blob-worker' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webworkify/example/main' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webworkify/example/worker' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'webworkify/example/bare-blob-main.js' { 43 | declare module.exports: $Exports<'webworkify/example/bare-blob-main'>; 44 | } 45 | declare module 'webworkify/example/bare-blob-worker.js' { 46 | declare module.exports: $Exports<'webworkify/example/bare-blob-worker'>; 47 | } 48 | declare module 'webworkify/example/main.js' { 49 | declare module.exports: $Exports<'webworkify/example/main'>; 50 | } 51 | declare module 'webworkify/example/worker.js' { 52 | declare module.exports: $Exports<'webworkify/example/worker'>; 53 | } 54 | declare module 'webworkify/index' { 55 | declare module.exports: $Exports<'webworkify'>; 56 | } 57 | declare module 'webworkify/index.js' { 58 | declare module.exports: $Exports<'webworkify'>; 59 | } 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # datpedia 2 | 3 | screen shot 2018-01-27 at 10 10 53 pm 4 | 5 | screen shot 2018-01-27 at 10 11 34 pm 6 | 7 | screen shot 2018-01-27 at 10 12 06 pm 8 | 9 | 10 | ## quick start 11 | 12 | 1. get [Beaker Browser](https://beakerbrowser.com) 13 | 2. using Beaker, go to `datpedia.org` 14 | 15 | 16 | ## code 17 | 18 | ``` 19 | npm install 20 | npm test 21 | npm start 22 | ``` 23 | 24 | that should print instructions to get started. 25 | 26 | - **scripts** contains scripts to download and process Wikipedia dumps 27 | - **www** contains the old-web website served at https://datpedia.org 28 | - **app** contains the React app that renders peer-to-peer Wikipedia 29 | 30 | 31 | ### development setup 32 | 33 | Install node or upgrade node. `node --version` should be v9 or above. 34 | 35 | ``` 36 | brew install node 37 | brew upgrade node 38 | ``` 39 | 40 | Install Atom. 41 | 42 | Go to Atom > Preferences > Install, then install `prettier-atom`, `flow-ide`, and `linter-eslint`. Restart Atom once these packages finish installing. 43 | 44 | Click on Settings for the `prettier-atom` and make them look like this: 45 | 46 | ![image](https://user-images.githubusercontent.com/169280/34692161-02e31134-f474-11e7-8fb6-22353dd7e3e9.png) 47 | 48 | Go to the `flow-ide` settings, set the Flow binary path to `<...path to repo...>/node_modules/.bin/flow` 49 | 50 | Go to the `linter-eslint` settings, enable format-on-save. Ignore the warning from `prettier`. 51 | 52 | Done! You now have `standard`-compliant autoformatting, linting, and Flow integration. 53 | 54 | You should have the following 10 Atom packages installed: 55 | 56 | ![image](https://user-images.githubusercontent.com/169280/34857020-67ee29ac-f6fd-11e7-9e5a-eb6dc461e033.png) 57 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "datpedia", 3 | "description": "wikipedia over dat://", 4 | "version": "0.0.0", 5 | "browserify": { 6 | "transform": [ 7 | "babelify" 8 | ] 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/dcposch/datpedia/issues" 12 | }, 13 | "dependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-eslint": "^8.2.2", 16 | "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", 17 | "babel-preset-env": "*", 18 | "babel-preset-react": "*", 19 | "babelify": "*", 20 | "binary-search-bounds": "^2.0.3", 21 | "brfs": "^1.4.3", 22 | "browserify": "^16.1.0", 23 | "comlinkjs": "^2.3.1", 24 | "csv-stream": "^0.1.3", 25 | "datauri": "^1.0.5", 26 | "ecstatic": "^3.2.0", 27 | "eslint": "^3.0.0", 28 | "eslint-config-standard": "^10.0.0", 29 | "eslint-config-standard-flow": "^1.0.1", 30 | "eslint-config-standard-react": "^5.0.0", 31 | "eslint-plugin-flowtype": "^2.46.1", 32 | "eslint-plugin-import": "^2.8.0", 33 | "eslint-plugin-node": "^6.0.0", 34 | "eslint-plugin-promise": "^3.6.0", 35 | "eslint-plugin-react": "^7.6.1", 36 | "eslint-plugin-standard": "^3.0.1", 37 | "flow-bin": "^0.52.0", 38 | "flow-typed": "^2.3.0", 39 | "gl-matrix": "^2.4.0", 40 | "mkdirp": "^0.5.1", 41 | "normalize-for-search": "^2.0.1", 42 | "npm-check": "^5.5.2", 43 | "pify": "^3.0.0", 44 | "prettier-eslint-cli": "^4.1.0", 45 | "react": "^16.2.0", 46 | "react-autocomplete": "^1.7.2", 47 | "react-dom": "^16.2.0", 48 | "simple-concat": "^1.0.0", 49 | "standard": "^11.0.0", 50 | "watchify": "^3.9.0", 51 | "webworkify": "^1.5.0", 52 | "yauzl": "github:dcposch/yauzl", 53 | "zimmer": "^1.1.0" 54 | }, 55 | "homepage": "https://github.com/dcposch/datpedia#readme", 56 | "license": "ISC", 57 | "main": "scripts/main.sh", 58 | "repository": { 59 | "type": "git", 60 | "url": "git+https://github.com/dcposch/datpedia.git" 61 | }, 62 | "scripts": { 63 | "build": "browserify app/index.js -o static/bundle.js", 64 | "flow-typed": "flow-typed install", 65 | "start": "./scripts/main.sh", 66 | "test": "eslint scripts app && flow", 67 | "watch": "./scripts/main.sh wikipedia_en_ray_charles_2015-06 && (watchify app/index.js -dv -o static/bundle.js & ecstatic -p 4000 build/wikipedia_en_ray_charles_2015-06)" 68 | }, 69 | "standard": { 70 | "parser": "babel-eslint", 71 | "plugins": "flowtype", 72 | "ignore": [ 73 | "flow-typed" 74 | ] 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /flow-typed/npm/datauri_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 02fbda3239144f8dbe5a9c7bfe8415fe 2 | // flow-typed version: <>/datauri_v^1.0.5/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'datauri' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'datauri' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'datauri/api' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'datauri/module' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'datauri/old/api' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'datauri/old/module' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'datauri/old/template/css' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'datauri/old/template/uri' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'datauri/template/css' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'datauri/template/uri' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'datauri/api.js' { 59 | declare module.exports: $Exports<'datauri/api'>; 60 | } 61 | declare module 'datauri/index' { 62 | declare module.exports: $Exports<'datauri'>; 63 | } 64 | declare module 'datauri/index.js' { 65 | declare module.exports: $Exports<'datauri'>; 66 | } 67 | declare module 'datauri/module.js' { 68 | declare module.exports: $Exports<'datauri/module'>; 69 | } 70 | declare module 'datauri/old/api.js' { 71 | declare module.exports: $Exports<'datauri/old/api'>; 72 | } 73 | declare module 'datauri/old/module.js' { 74 | declare module.exports: $Exports<'datauri/old/module'>; 75 | } 76 | declare module 'datauri/old/template/css.js' { 77 | declare module.exports: $Exports<'datauri/old/template/css'>; 78 | } 79 | declare module 'datauri/old/template/uri.js' { 80 | declare module.exports: $Exports<'datauri/old/template/uri'>; 81 | } 82 | declare module 'datauri/template/css.js' { 83 | declare module.exports: $Exports<'datauri/template/css'>; 84 | } 85 | declare module 'datauri/template/uri.js' { 86 | declare module.exports: $Exports<'datauri/template/uri'>; 87 | } 88 | -------------------------------------------------------------------------------- /static/style.css: -------------------------------------------------------------------------------- 1 | 2 | /* GLOBAL */ 3 | 4 | * { 5 | box-sizing: border-box; 6 | } 7 | 8 | dd { 9 | margin: 0; 10 | } 11 | 12 | /* ARTICLE PAGE */ 13 | 14 | .ArticlePage { 15 | min-width: 710px; 16 | max-width: 710px; 17 | margin: 32px auto; 18 | font: 14px/24px sans-serif; 19 | } 20 | 21 | .ArticlePage header { 22 | font-size: 24px; 23 | font-weight: bold; 24 | padding-bottom: 8px; 25 | } 26 | 27 | .ArticlePage .SearchBox { 28 | display: inline-block; 29 | width: 518px; 30 | } 31 | 32 | .ArticlePage header a { 33 | display: inline-block; 34 | width: 192px; 35 | color: #000; 36 | } 37 | 38 | .ArticlePage header a:link, 39 | .ArticlePage header a:visited { 40 | text-decoration: none; 41 | } 42 | 43 | .ArticlePage header a:hover, 44 | .ArticlePage header a:active { 45 | text-decoration: underline; 46 | } 47 | 48 | 49 | /* ARTICLE BODY */ 50 | 51 | .ArticleBody.deemphasized { 52 | opacity: 0.2; 53 | } 54 | 55 | .ArticleBody { 56 | padding-top: 64px; 57 | border-top: 2px solid black; 58 | transition: opacity 0.25s; 59 | } 60 | 61 | .ArticlePage .SearchBox input { 62 | padding: 8px 32px; 63 | } 64 | 65 | /* ARTICLE MEDIAWIKI CONTENT */ 66 | 67 | .ArticleBody .mw-body { 68 | padding: 0 !important; 69 | font-size: 16px; 70 | line-height: 28px; 71 | } 72 | 73 | .ArticleBody .infobox { 74 | float: right; 75 | margin-left: 32px; 76 | } 77 | 78 | .ArticleBody #titleHeading { 79 | margin: 0 0 32px 0 !important; 80 | } 81 | 82 | .ArticleBody .thumb { 83 | display: inline-block; 84 | margin: 0 24px 24px 0; 85 | vertical-align: top; 86 | } 87 | 88 | .ArticleBody .tracklist { 89 | margin: 0 !important; 90 | } 91 | 92 | 93 | /* SEARCH PAGE */ 94 | 95 | .SearchPage { 96 | max-width: 480px; 97 | margin: 32px auto; 98 | font: 16px/32px sans-serif; 99 | } 100 | 101 | .SearchPage h1, 102 | .SearchPage h2 { 103 | background: #fff; 104 | text-align: center; 105 | } 106 | 107 | .SearchPage h1 { 108 | font-size: 64px; 109 | padding: 32px; 110 | margin: 32px 0; 111 | } 112 | 113 | .SearchPage h2 { 114 | font-size: 24px; 115 | padding: 16px; 116 | margin: 32px 0; 117 | } 118 | 119 | .SearchPage hr { 120 | border: none; 121 | border-bottom: 3px solid #333; 122 | width: 40px; 123 | } 124 | 125 | .SearchPage .SearchBox { 126 | width: 100%; 127 | } 128 | 129 | /* SEARCH BOX (ALL PAGES */ 130 | 131 | .SearchBox input { 132 | border: 2px solid transparent; 133 | outline: 0; 134 | font-size: 24px; 135 | font-weight: bold; 136 | padding: 16px 32px; 137 | box-sizing: border-box; 138 | width: 100%; 139 | } 140 | 141 | .SearchBox input:focus { 142 | border-color: black; 143 | } 144 | 145 | .SearchBox .searchItem { 146 | font-size: 24px; 147 | padding: 8px; 148 | } 149 | -------------------------------------------------------------------------------- /flow-typed/npm/prettier-eslint-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 372d7e63da26a6fe366dd761724148ca 2 | // flow-typed version: <>/prettier-eslint-cli_v^4.1.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'prettier-eslint-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'prettier-eslint-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'prettier-eslint-cli/dist/add-exception-handler' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'prettier-eslint-cli/dist/argv' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'prettier-eslint-cli/dist/format-files' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'prettier-eslint-cli/dist/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'prettier-eslint-cli/dist/messages' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'prettier-eslint-cli/dist/no-main' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'prettier-eslint-cli/dist/parser' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'prettier-eslint-cli/dist/uncaught-exception-handler' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'prettier-eslint-cli/dist/add-exception-handler.js' { 59 | declare module.exports: $Exports<'prettier-eslint-cli/dist/add-exception-handler'>; 60 | } 61 | declare module 'prettier-eslint-cli/dist/argv.js' { 62 | declare module.exports: $Exports<'prettier-eslint-cli/dist/argv'>; 63 | } 64 | declare module 'prettier-eslint-cli/dist/format-files.js' { 65 | declare module.exports: $Exports<'prettier-eslint-cli/dist/format-files'>; 66 | } 67 | declare module 'prettier-eslint-cli/dist/index.js' { 68 | declare module.exports: $Exports<'prettier-eslint-cli/dist/index'>; 69 | } 70 | declare module 'prettier-eslint-cli/dist/messages.js' { 71 | declare module.exports: $Exports<'prettier-eslint-cli/dist/messages'>; 72 | } 73 | declare module 'prettier-eslint-cli/dist/no-main.js' { 74 | declare module.exports: $Exports<'prettier-eslint-cli/dist/no-main'>; 75 | } 76 | declare module 'prettier-eslint-cli/dist/parser.js' { 77 | declare module.exports: $Exports<'prettier-eslint-cli/dist/parser'>; 78 | } 79 | declare module 'prettier-eslint-cli/dist/uncaught-exception-handler.js' { 80 | declare module.exports: $Exports<'prettier-eslint-cli/dist/uncaught-exception-handler'>; 81 | } 82 | -------------------------------------------------------------------------------- /scripts/list.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { searchIndexSort, urlNameToName } = require('../lib/util.js') 4 | const { readEntries } = require('../lib/unzip.js') 5 | 6 | const fs = require('fs') 7 | const pify = require('pify') 8 | const yauzl = require('yauzl') 9 | const normForSearch = require('normalize-for-search') 10 | 11 | if (process.argv.length !== 3) { 12 | console.log('Usage: ./scripts/list.js ') 13 | process.exit() 14 | } 15 | 16 | const yauzlOpen = pify(yauzl.open.bind(yauzl)) 17 | 18 | main(process.argv[2]) 19 | 20 | async function main (name) { 21 | const dir = 'transform/' + name 22 | 23 | console.log('loading wiki.zip') 24 | const articles = await loadArticles(dir + '/wiki.zip') 25 | articles.sort(searchIndexSort) 26 | 27 | console.log('creating list-full.tsv') 28 | writeTsv(dir + '/list-full.tsv', articles) 29 | 30 | console.log('creating list-partial.json') 31 | const topArticleNames = fs 32 | .readFileSync('most-viewed/list.txt', 'utf8') 33 | .split(/\n/g) 34 | .filter(s => s.length > 0) 35 | const topArticles = articles.filter(a => topArticleNames.includes(a.urlName)) 36 | console.log('creating list-partial.json from %d top articles', topArticles.length) 37 | 38 | writeJsonArray(dir + '/list-partial.json', topArticles) 39 | } 40 | 41 | function writeTsv (path, items) { 42 | const stream = fs.createWriteStream(path) 43 | const cols = [ 44 | 'name', 45 | 'searchName', 46 | 'compressedSize', 47 | 'relativeOffsetOfLocalHeader', 48 | 'compressionMethod', 49 | 'generalPurposeBitFlag' 50 | ] 51 | stream.write(cols.join('\t') + '\n', 'utf8') 52 | for (let i = 0; i < items.length; i++) { 53 | const vals = cols.map(c => items[i][c]) 54 | stream.write(vals.join('\t') + '\n', 'utf8') 55 | if ((i + 1) % 100000 === 0) { 56 | console.log(`wrote ${i + 1} lines`) 57 | } 58 | } 59 | stream.end() 60 | } 61 | 62 | function writeJsonArray (path, items) { 63 | const stream = fs.createWriteStream(path) 64 | stream.write('[\n', 'utf8') 65 | for (let i = 0; i < items.length; i++) { 66 | const line = JSON.stringify(items[i]) + (i < items.length - 1 ? ',' : '') 67 | stream.write(line + '\n', 'utf8') 68 | if ((i + 1) % 100000 === 0) { 69 | console.log(`wrote ${i + 1} lines`) 70 | } 71 | } 72 | stream.write(']\n', 'utf8') 73 | stream.end() 74 | } 75 | 76 | async function loadArticles (path) { 77 | const zipfile = await yauzlOpen(path, { lazyEntries: true }) 78 | console.log('opened ' + path) 79 | const articles = await readEntries(zipfile, entryToArticle) 80 | return articles 81 | } 82 | 83 | function entryToArticle (entry) { 84 | const { 85 | fileName, 86 | compressedSize, 87 | relativeOffsetOfLocalHeader, 88 | compressionMethod, 89 | generalPurposeBitFlag 90 | } = entry 91 | 92 | if (!fileName.startsWith('A/') || !fileName.endsWith('.html')) { 93 | throw new Error('unexpected filename ' + fileName) 94 | } 95 | 96 | const urlName = fileName.substring( 97 | 'A/'.length, 98 | fileName.length - '.html'.length 99 | ) 100 | const name = urlNameToName(urlName) 101 | const searchName = normForSearch(name) 102 | 103 | return { 104 | urlName, 105 | name, 106 | searchName, 107 | compressedSize, 108 | relativeOffsetOfLocalHeader, 109 | compressionMethod, 110 | generalPurposeBitFlag 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-standard_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b317a0c3465a8ddccc9138e8ff854a1b 2 | // flow-typed version: <>/eslint-plugin-standard_v^3.0.1/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-standard' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-standard' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-standard/rules/array-bracket-even-spacing' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-standard/rules/computed-property-even-spacing' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-standard/rules/no-callback-literal' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-standard/rules/object-curly-even-spacing' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-standard/tests/array-bracket-even-spacing' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-standard/tests/computed-property-even-spacing' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-standard/tests/no-callback-literal' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-standard/tests/object-curly-even-spacing' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'eslint-plugin-standard/index' { 59 | declare module.exports: $Exports<'eslint-plugin-standard'>; 60 | } 61 | declare module 'eslint-plugin-standard/index.js' { 62 | declare module.exports: $Exports<'eslint-plugin-standard'>; 63 | } 64 | declare module 'eslint-plugin-standard/rules/array-bracket-even-spacing.js' { 65 | declare module.exports: $Exports<'eslint-plugin-standard/rules/array-bracket-even-spacing'>; 66 | } 67 | declare module 'eslint-plugin-standard/rules/computed-property-even-spacing.js' { 68 | declare module.exports: $Exports<'eslint-plugin-standard/rules/computed-property-even-spacing'>; 69 | } 70 | declare module 'eslint-plugin-standard/rules/no-callback-literal.js' { 71 | declare module.exports: $Exports<'eslint-plugin-standard/rules/no-callback-literal'>; 72 | } 73 | declare module 'eslint-plugin-standard/rules/object-curly-even-spacing.js' { 74 | declare module.exports: $Exports<'eslint-plugin-standard/rules/object-curly-even-spacing'>; 75 | } 76 | declare module 'eslint-plugin-standard/tests/array-bracket-even-spacing.js' { 77 | declare module.exports: $Exports<'eslint-plugin-standard/tests/array-bracket-even-spacing'>; 78 | } 79 | declare module 'eslint-plugin-standard/tests/computed-property-even-spacing.js' { 80 | declare module.exports: $Exports<'eslint-plugin-standard/tests/computed-property-even-spacing'>; 81 | } 82 | declare module 'eslint-plugin-standard/tests/no-callback-literal.js' { 83 | declare module.exports: $Exports<'eslint-plugin-standard/tests/no-callback-literal'>; 84 | } 85 | declare module 'eslint-plugin-standard/tests/object-curly-even-spacing.js' { 86 | declare module.exports: $Exports<'eslint-plugin-standard/tests/object-curly-even-spacing'>; 87 | } 88 | -------------------------------------------------------------------------------- /flow-typed/npm/comlinkjs_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5ffd2d87d18c408113ee842fb8d1df29 2 | // flow-typed version: <>/comlinkjs_v^2.3.1/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'comlinkjs' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'comlinkjs' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'comlinkjs/comlink.es6' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'comlinkjs/comlink.es6.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'comlinkjs/comlink.global' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'comlinkjs/comlink.global.min' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'comlinkjs/comlink.umd' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'comlinkjs/comlink.umd.min' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'comlinkjs/messagechanneladapter.es6' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'comlinkjs/messagechanneladapter.es6.min' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'comlinkjs/messagechanneladapter.global' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'comlinkjs/messagechanneladapter.global.min' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'comlinkjs/messagechanneladapter.umd' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'comlinkjs/messagechanneladapter.umd.min' { 70 | declare module.exports: any; 71 | } 72 | 73 | // Filename aliases 74 | declare module 'comlinkjs/comlink.es6.js' { 75 | declare module.exports: $Exports<'comlinkjs/comlink.es6'>; 76 | } 77 | declare module 'comlinkjs/comlink.es6.min.js' { 78 | declare module.exports: $Exports<'comlinkjs/comlink.es6.min'>; 79 | } 80 | declare module 'comlinkjs/comlink.global.js' { 81 | declare module.exports: $Exports<'comlinkjs/comlink.global'>; 82 | } 83 | declare module 'comlinkjs/comlink.global.min.js' { 84 | declare module.exports: $Exports<'comlinkjs/comlink.global.min'>; 85 | } 86 | declare module 'comlinkjs/comlink.umd.js' { 87 | declare module.exports: $Exports<'comlinkjs/comlink.umd'>; 88 | } 89 | declare module 'comlinkjs/comlink.umd.min.js' { 90 | declare module.exports: $Exports<'comlinkjs/comlink.umd.min'>; 91 | } 92 | declare module 'comlinkjs/messagechanneladapter.es6.js' { 93 | declare module.exports: $Exports<'comlinkjs/messagechanneladapter.es6'>; 94 | } 95 | declare module 'comlinkjs/messagechanneladapter.es6.min.js' { 96 | declare module.exports: $Exports<'comlinkjs/messagechanneladapter.es6.min'>; 97 | } 98 | declare module 'comlinkjs/messagechanneladapter.global.js' { 99 | declare module.exports: $Exports<'comlinkjs/messagechanneladapter.global'>; 100 | } 101 | declare module 'comlinkjs/messagechanneladapter.global.min.js' { 102 | declare module.exports: $Exports<'comlinkjs/messagechanneladapter.global.min'>; 103 | } 104 | declare module 'comlinkjs/messagechanneladapter.umd.js' { 105 | declare module.exports: $Exports<'comlinkjs/messagechanneladapter.umd'>; 106 | } 107 | declare module 'comlinkjs/messagechanneladapter.umd.min.js' { 108 | declare module.exports: $Exports<'comlinkjs/messagechanneladapter.umd.min'>; 109 | } 110 | -------------------------------------------------------------------------------- /scripts/transform.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs') 4 | const mkdirpSync = require('mkdirp').sync 5 | const dataUriSync = require('datauri').sync 6 | 7 | const { rewriteImageUrls, rewriteLinks } = require('./relinker.js') 8 | 9 | if (3 !== process.argv.length) { 10 | console.log('Usage: ./scripts/transform.js ') 11 | process.exit() 12 | } 13 | 14 | main(process.argv[2]) 15 | 16 | function main (name) { 17 | const dst = 'transform/' + name 18 | const dstA = dst + '/A' 19 | mkdirpSync(dstA) 20 | 21 | console.log('listing articles') 22 | 23 | let articles = fs 24 | .readdirSync('extract/' + name + '/A/') 25 | .filter(s => s.endsWith('.html')) 26 | .map(s => s.substring(0, s.length - '.html'.length)) 27 | 28 | articles.forEach(article => transferArticle(name, article, dstA)) 29 | } 30 | 31 | function transferArticle (dumpName, name, dst) { 32 | const filename = 'extract/' + dumpName + '/A/' + name + '.html' 33 | 34 | if (!fs.existsSync(filename)) { 35 | console.log('not found, skipping: ' + filename) 36 | return 37 | } 38 | 39 | console.log('transferring %s', name) 40 | 41 | const html = fs.readFileSync(filename, 'utf8') 42 | const newHtml = transformHtml(html, dumpName, name) 43 | fs.writeFileSync(dst + '/' + name + '.html', newHtml) 44 | } 45 | 46 | function transformHtml (html, dumpName, pageUrlName) { 47 | const lines = html.split(/\n/g).map(s => s.trim()) 48 | 49 | let foundStylesheet = false 50 | const newLines = lines.filter(line => !line.includes(' { 51 | if (line.startsWith('' 58 | } else if (line.startsWith('' 60 | } else { 61 | return line 62 | } 63 | }) 64 | 65 | let newHtml = newLines.join('\n') 66 | newHtml = rewriteImageUrls(newHtml, url => transformImageUrl(url, dumpName)) 67 | newHtml = rewriteLinks(newHtml, url => transformLink(url, pageUrlName)) 68 | return newHtml 69 | } 70 | 71 | // Transforms image urls to data:// URIs 72 | function transformImageUrl (url, dumpName) { 73 | if (!url.startsWith('../I/m')) return url 74 | 75 | const imageFileName = decodeURIComponent(url.substring(3)) 76 | const path = 'extract/' + dumpName + '/' + imageFileName 77 | let dataURI 78 | try { 79 | dataURI = dataUriSync(path) 80 | } catch (e) { 81 | console.log('failed to turn image into data URI', path, e) 82 | dataURI = 83 | 'data:image/gif;base64,' + 84 | 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' 85 | } 86 | return dataURI 87 | } 88 | 89 | function transformLink (url, pageUrlName) { 90 | // Leave external links alone 91 | if ( 92 | url === '' || 93 | url.startsWith('http://') || 94 | url.startsWith('https://') || 95 | url.startsWith('ftp://') 96 | ) { 97 | return url 98 | } 99 | if (url.startsWith('geo:')) { 100 | return 'https://www.google.com/maps?t=k&q=loc:' + url.substr('geo:'.length) 101 | } 102 | if (url.startsWith('#')) { 103 | // Cite notes, etc. Rewrite "#cite_note-1" to '#Hypertext#cite_note-1' 104 | return '#' + pageUrlName + url 105 | } 106 | if (url.includes('.html#')) { 107 | // Turn eg "Foo.html#bar" into "#Foo#bar" 108 | const ix = url.indexOf('.html#') 109 | return '#' + url.substring(0, ix) + url.substring(ix + '.html'.length) 110 | } 111 | if (url.includes('#')) { 112 | // Turn "Foo#bar" into "#Foo#bar" 113 | return '#' + url 114 | } 115 | if (!url.endsWith('.html')) { 116 | console.log('skipping non-standard link: ' + url) 117 | return url 118 | } 119 | // Wiki links. Rewrite 'Anarchism.html' to '#Anarchism' 120 | return '#' + url.substring(0, url.length - '.html'.length) 121 | } 122 | -------------------------------------------------------------------------------- /app/SearchBox.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import React from 'react' 4 | import ReactAutocomplete from 'react-autocomplete' 5 | import { findRange } from './search.js' 6 | 7 | import type { StoreDispatch, Article } from './types.js' 8 | 9 | const NUM_RESULTS = 5 10 | 11 | /** 12 | * Shows a typeahead search box over a given list of items. 13 | * Each item must have {value, name} 14 | * Dispatches a 'NAVIGATE' action when the user chooses an item. 15 | */ 16 | export default class SearchBox extends React.Component { 17 | props: StoreDispatch & { autoFocus?: boolean, whiteBg?: boolean } 18 | state: { 19 | matchedItems: Article[] 20 | } 21 | _onInputChangeBound: () => void 22 | _input: ?HTMLInputElement 23 | 24 | constructor (props: $PropertyType) { 25 | super(props) 26 | this.state = { 27 | matchedItems: [] 28 | } 29 | this._onInputChangeBound = this._onInputChange.bind(this) 30 | this._input = null 31 | } 32 | 33 | render () { 34 | const { autoFocus = false, whiteBg = false, store, dispatch } = this.props 35 | 36 | const { search } = store 37 | 38 | const { matchedItems } = this.state 39 | 40 | const menuStyle = { 41 | padding: '0', 42 | position: 'absolute', 43 | overflow: 'auto', 44 | zIndex: 999, 45 | cursor: 'pointer', 46 | background: '', 47 | borderBottom: '', 48 | borderLeft: '', 49 | borderRight: '' 50 | } 51 | 52 | if (whiteBg) { 53 | menuStyle.background = '#fff' 54 | if (matchedItems.length > 0) { 55 | menuStyle.borderBottom = '2px solid #000' 56 | menuStyle.borderLeft = '2px solid #000' 57 | menuStyle.borderRight = '2px solid #000' 58 | } 59 | } 60 | 61 | return ( 62 | { 64 | this._input = e 65 | }} 66 | inputProps={{ 67 | placeholder: 'search...', 68 | className: 'search', 69 | autoFocus 70 | }} 71 | menuStyle={menuStyle} 72 | wrapperProps={{ className: 'SearchBox' }} 73 | items={matchedItems} 74 | getItemValue={item => item.name} 75 | renderItem={(item, highlighted) => ( 76 |
88 | {item.name} 89 |
90 | )} 91 | value={search || ''} 92 | onChange={this._onInputChangeBound} 93 | onSelect={(value, item) => { 94 | if (this._input != null) this._input.blur() 95 | this.setState({ matchedItems: [] }) 96 | dispatch('NAVIGATE', '#' + item.urlName) 97 | }} 98 | /> 99 | ) 100 | } 101 | 102 | _onInputChange () { 103 | console.time('_onInputChange') 104 | 105 | const { dispatch } = this.props 106 | 107 | const target = this._input 108 | if (target == null) return 109 | const value = target.refs.input.value 110 | dispatch('SET_SEARCH', value === '' ? null : value) 111 | 112 | if (value === '') { 113 | this.setState({ matchedItems: [] }) 114 | return 115 | } 116 | 117 | const partialIndexItems = this._search('partial', value).slice( 118 | 0, 119 | NUM_RESULTS 120 | ) 121 | 122 | const fullIndexItems = [] /* TODO: this._search('full', value) 123 | .slice(0, NUM_RESULTS) 124 | .filter(fullItem => { 125 | // Dedupe, since the same result may be in the partial index 126 | const inPartialIndex = partialIndexItems.find(partialItem => { 127 | return partialItem.urlName === fullItem.urlName 128 | }) 129 | return !inPartialIndex 130 | }) */ 131 | 132 | const matchedItems = [].concat(partialIndexItems, fullIndexItems) 133 | 134 | this.setState({ 135 | matchedItems: matchedItems.slice(0, NUM_RESULTS) 136 | }) 137 | 138 | console.timeEnd('_onInputChange') 139 | } 140 | 141 | _search (indexName: string, value: string) { 142 | const { store } = this.props 143 | const { searchIndexes } = store 144 | const searchIndex = searchIndexes[indexName] 145 | return findRange(searchIndex, value) 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /app/globe.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import React from 'react' 4 | import { mat4, vec4, vec3 } from 'gl-matrix' 5 | 6 | export default class Globe extends React.Component { 7 | state: { 8 | width: number, 9 | height: number 10 | } 11 | 12 | _svg: ?HTMLElement 13 | _svgLines: Element[][] 14 | _onResizeBound: () => void 15 | _frameBound: () => void 16 | _nlat: number 17 | _nlon: number 18 | _theta: number 19 | _points: Float32Array 20 | 21 | constructor () { 22 | super({}) 23 | 24 | this._svg = null 25 | this._svgLines = [] 26 | this._onResizeBound = () => this.onResize() 27 | this._frameBound = () => this.frame() 28 | 29 | const nlat = (this._nlat = 5) 30 | const nlon = (this._nlon = 8) 31 | 32 | this._theta = 0 33 | this._points = new Float32Array(nlat * nlon * 3) 34 | for (let i = 0; i < nlat; i++) { 35 | for (let j = 0; j < nlon; j++) { 36 | const plat = (i - (nlat - 1) / 2) / (nlat + 1) * Math.PI 37 | const plon = j / nlon * 2 * Math.PI 38 | 39 | // x y z 40 | this._points[3 * (i * nlon + j) + 0] = Math.cos(plon) * Math.cos(plat) 41 | this._points[3 * (i * nlon + j) + 1] = Math.sin(plon) * Math.cos(plat) 42 | this._points[3 * (i * nlon + j) + 2] = Math.sin(plat) 43 | } 44 | } 45 | 46 | this.state = { width: window.innerWidth, height: window.innerHeight } 47 | } 48 | 49 | onResize () { 50 | this.setState({ width: window.innerWidth, height: window.innerHeight }) 51 | } 52 | 53 | componentDidMount () { 54 | window.addEventListener('resize', this._onResizeBound) 55 | } 56 | 57 | componentWillUnmount () { 58 | this._svg = null 59 | window.removeEventListener('resize', this._onResizeBound) 60 | } 61 | 62 | render () { 63 | const { width, height } = this.state 64 | const style = { 65 | position: 'absolute', 66 | top: 0, 67 | left: 0, 68 | bottom: 0, 69 | right: 0, 70 | zIndex: -1 71 | } 72 | return ( 73 | this.initSvg(e)} 75 | width={width} 76 | height={height} 77 | style={style} 78 | /> 79 | ) 80 | } 81 | 82 | initSvg (svg: HTMLElement) { 83 | if (this._svg != null) throw new Error('double init') 84 | 85 | this._svg = svg 86 | 87 | const nla = this._nlat 88 | const nlo = this._nlon 89 | 90 | const xmlns = 'http://www.w3.org/2000/svg' 91 | for (let i = 0; i < nla; i++) { 92 | for (let j = 0; j < nlo; j++) { 93 | const lines = [] 94 | for (let k = 0; k < 1 + (i < nla - 1 ? 1 : 0); k++) { 95 | const line = document.createElementNS(xmlns, 'line') 96 | 97 | line.setAttribute('stroke', 'black') 98 | line.setAttribute('stroke-width', '1.5') 99 | 100 | svg.appendChild(line) 101 | lines.push(line) 102 | } 103 | this._svgLines[i * nlo + j] = lines 104 | } 105 | } 106 | 107 | this.frame() 108 | } 109 | 110 | frame () { 111 | if (this._svg == null) { 112 | return 113 | } 114 | 115 | // COMPUTE frame 116 | const { width, height } = this.state 117 | const w2 = width / 2 118 | const h2 = height / 2 119 | const m = 0.8 * Math.min(w2, h2) 120 | 121 | // COMPUTE CAMERA 122 | const mat = mat4.create() 123 | const t = window.performance.now() / 1000 124 | const center = vec3.create() 125 | const eye = vec3.fromValues( 126 | 2 * Math.cos(t / 3), 127 | 2 * Math.sin(t / 3), 128 | 0.1 * Math.sin(t / Math.PI) 129 | ) 130 | const up = vec3.create() 131 | vec3.cross(up, eye, vec3.fromValues(0, 0, 1)) 132 | vec3.normalize(up, up) 133 | mat4.lookAt(mat, eye, center, up) 134 | 135 | // DRAW LINES 136 | const nla = this._nlat 137 | const nlo = this._nlon 138 | for (let i = 0; i < nla; i++) { 139 | for (let j = 0; j < nlo; j++) { 140 | const p00 = this.getPoint(i, j) 141 | const p01 = this.getPoint(i, (j + 1) % nlo) 142 | const lines = this._svgLines[i * nlo + j] 143 | setLine(lines[0], p00, p01, mat, m, w2, h2) 144 | 145 | if (i < nla - 1) { 146 | const p10 = this.getPoint(i + 1, j) 147 | setLine(lines[1], p00, p10, mat, m, w2, h2) 148 | } 149 | } 150 | } 151 | 152 | window.requestAnimationFrame(this._frameBound) 153 | } 154 | 155 | getPoint (i: number, j: number) { 156 | const ix = (i * this._nlon + j) * 3 157 | return this._points.slice(ix, ix + 3) 158 | } 159 | } 160 | 161 | function setLine (line, pA, pB, mat, m, w2, h2) { 162 | // TODO: projection matrix 163 | 164 | const a = vec4.fromValues(pA[0], pA[1], pA[2], 1) 165 | const b = vec4.fromValues(pB[0], pB[1], pB[2], 1) 166 | 167 | vec4.transformMat4(a, a, mat) 168 | vec4.transformMat4(b, b, mat) 169 | 170 | if (a[3] !== 1 || b[3] !== 1) { 171 | if (Math.random() < 0.001) { 172 | console.log('div != 1') 173 | } 174 | } 175 | 176 | line.setAttribute('x1', '' + (a[0] / a[3] * m + w2)) 177 | line.setAttribute('y1', '' + (a[1] / a[3] * m + w2)) 178 | line.setAttribute('x2', '' + (b[0] / b[3] * m + h2)) 179 | line.setAttribute('y2', '' + (b[1] / b[3] * m + h2)) 180 | } 181 | -------------------------------------------------------------------------------- /lib/unzip.js: -------------------------------------------------------------------------------- 1 | const pify = require('pify') 2 | const yauzl = require('yauzl') 3 | const concat = require('simple-concat') 4 | const stream = require('stream') 5 | 6 | // Shim setImmediate() for `yauzl` 7 | global.setImmediate = process.nextTick.bind(process) 8 | 9 | const concatAsync = pify(concat) 10 | const zipFromRandomAccessReaderAsync = pify(yauzl.fromRandomAccessReader) 11 | 12 | module.exports = { openZip, getFile, readEntries } 13 | 14 | /** 15 | * Opens a zip file 16 | */ 17 | async function openZip (zipPath) { 18 | // TODO: remove hardcode once Beaker supports HEAD requests 19 | // https://github.com/beakerbrowser/beaker/issues/826 20 | 21 | let zipSize = await fetchZipSize(zipPath) 22 | if (zipSize === 0) { 23 | zipSize = 169316988448 24 | console.log('fallback hardcoded zip size: ' + zipSize) 25 | } else { 26 | console.log('fetched zip size: ' + zipSize) 27 | } 28 | 29 | const reader = new ZipRandomAccessReader(zipPath) 30 | const zipFile = await zipFromRandomAccessReaderAsync(reader, zipSize, { 31 | lazyEntries: true 32 | }) 33 | zipFile.openReadStreamAsync = pify(zipFile.openReadStream.bind(zipFile)) 34 | 35 | return zipFile 36 | } 37 | 38 | async function fetchZipSize (zipPath) { 39 | const response = await window.fetch(zipPath, { method: 'HEAD' }) 40 | const size = Number(response.headers.get('content-length')) 41 | return size 42 | } 43 | 44 | /** 45 | * Given a zip file and a filename, extracts file data 46 | */ 47 | async function getFile (zipFile, entryData) { 48 | const entryValues = {} 49 | Object.keys(entryData).forEach(k => { 50 | entryValues[k] = { value: entryData[k] } 51 | }) 52 | const entry = Object.create(yauzl.Entry.prototype, entryValues) 53 | 54 | const readStream = await zipFile.openReadStreamAsync(entry) 55 | 56 | const fileData = await concatAsync(readStream) 57 | return fileData 58 | } 59 | 60 | // In zip file entries, directory file names end with '/' 61 | const RE_DIRECTORY_NAME = /\/$/ 62 | 63 | async function readEntries (zipFile, fn) { 64 | fn = fn || (a => a) 65 | return new Promise((resolve, reject) => { 66 | const entries = [] 67 | 68 | let remainingEntries = zipFile.entryCount 69 | 70 | zipFile.readEntry() 71 | zipFile.on('entry', onEntry) 72 | zipFile.once('error', onError) 73 | 74 | function onEntry (entry) { 75 | remainingEntries -= 1 76 | 77 | if (RE_DIRECTORY_NAME.test(entry.fileName)) { 78 | // This is a directory entry 79 | // Note that entires for directories themselves are optional. 80 | // An entry's fileName implicitly requires its parent directories to exist. 81 | } else { 82 | // This is a file entry 83 | entries.push(fn(entry)) 84 | } 85 | 86 | if (remainingEntries === 0) { 87 | cleanup() 88 | resolve(entries) 89 | } else { 90 | // Continue reading entries 91 | zipFile.readEntry() 92 | } 93 | } 94 | 95 | function onError (err) { 96 | cleanup() 97 | reject(err) 98 | } 99 | 100 | function cleanup () { 101 | zipFile.removeListener('entry', onEntry) 102 | zipFile.removeListener('error', onError) 103 | } 104 | }) 105 | } 106 | 107 | const PAGE_SIZE = 1 << 18 108 | 109 | class ZipRandomAccessReader extends yauzl.RandomAccessReader { 110 | constructor (zipPath) { 111 | super() 112 | this._zipPath = zipPath 113 | this._pagePromiseCache = [] 114 | } 115 | 116 | _readStreamForRange (start, end) { 117 | const through = new stream.PassThrough() 118 | 119 | // Convert [start, end) to [start, end] 120 | readBufsForRange(this, start, end - 1).then(pages => { 121 | pages.forEach(page => through.write(page)) 122 | through.end() 123 | }) 124 | 125 | return through 126 | } 127 | 128 | read (buffer, offset, length, position, callback) { 129 | readBufsForRange(this, position, position + length - 1).then(pages => { 130 | pages.forEach(page => { 131 | page.copy(buffer, offset) 132 | offset += page.length 133 | }) 134 | callback() 135 | }) 136 | } 137 | } 138 | 139 | /** 140 | * Reads bit range [start, end], inclusive. Returns buffers to concat. 141 | */ 142 | async function readBufsForRange (reader, start, end) { 143 | // Kick off any fetches not yet started 144 | const pageStart = Math.floor(start / PAGE_SIZE) 145 | const pageEnd = Math.floor(end / PAGE_SIZE) 146 | for (let page = pageStart; page <= pageEnd; page++) { 147 | let promise = reader._pagePromiseCache[page] 148 | if (promise == null) { 149 | promise = reader._pagePromiseCache[page] = readPage(reader, page) 150 | } 151 | } 152 | 153 | // Return buffers 154 | const ret = new Array(pageEnd - pageStart + 1) 155 | for (let page = pageStart; page <= pageEnd; page++) { 156 | const promise = reader._pagePromiseCache[page] 157 | let buf = await promise 158 | if (page === pageStart && page === pageEnd) { 159 | buf = buf.slice(start - page * PAGE_SIZE, end - page * PAGE_SIZE + 1) 160 | } else if (page === pageStart) { 161 | buf = buf.slice(start - pageStart * PAGE_SIZE, 1 * PAGE_SIZE) 162 | } else if (page === pageEnd) { 163 | buf = buf.slice(0, end - pageEnd * PAGE_SIZE + 1) 164 | } 165 | ret[page - pageStart] = buf 166 | } 167 | return ret 168 | } 169 | 170 | async function readPage (reader, page) { 171 | console.log('loading page ' + page) 172 | 173 | const start = page * PAGE_SIZE 174 | const end = (page + 1) * PAGE_SIZE - 1 175 | const headers = new window.Headers({ 176 | Range: `bytes=${start}-${end}` 177 | }) 178 | 179 | // TODO: use simple-get (which uses john's stream-http internally) to 180 | // return a proper stream back, instead of this solution which waits for 181 | // the full range request to return before returning the data 182 | const res = await window.fetch(reader._zipPath, { headers }) 183 | const abuf = await res.arrayBuffer() 184 | const buf = Buffer.from(abuf) 185 | 186 | console.log( 187 | `loaded ${start} to ${end}, ` + 188 | `expected ${end - start + 1}b, got ${buf.length}b` 189 | ) 190 | 191 | return buf 192 | } 193 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-promise_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 41dc47259806d59614e31f5702fb19ad 2 | // flow-typed version: <>/eslint-plugin-promise_v^3.6.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-promise' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-promise' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-promise/rules/always-return' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-promise/rules/avoid-new' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-promise/rules/catch-or-return' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-promise/rules/lib/has-promise-callback' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-promise/rules/lib/is-callback' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-promise/rules/lib/is-inside-callback' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-promise/rules/lib/is-inside-promise' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-promise/rules/lib/is-named-callback' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-promise/rules/lib/is-promise' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-promise/rules/no-callback-in-promise' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-promise/rules/no-native' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-promise/rules/no-nesting' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-promise/rules/no-promise-in-callback' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-promise/rules/no-return-in-finally' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-promise/rules/no-return-wrap' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-promise/rules/param-names' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-promise/rules/prefer-await-to-callbacks' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-promise/rules/prefer-await-to-then' { 94 | declare module.exports: any; 95 | } 96 | 97 | // Filename aliases 98 | declare module 'eslint-plugin-promise/index' { 99 | declare module.exports: $Exports<'eslint-plugin-promise'>; 100 | } 101 | declare module 'eslint-plugin-promise/index.js' { 102 | declare module.exports: $Exports<'eslint-plugin-promise'>; 103 | } 104 | declare module 'eslint-plugin-promise/rules/always-return.js' { 105 | declare module.exports: $Exports<'eslint-plugin-promise/rules/always-return'>; 106 | } 107 | declare module 'eslint-plugin-promise/rules/avoid-new.js' { 108 | declare module.exports: $Exports<'eslint-plugin-promise/rules/avoid-new'>; 109 | } 110 | declare module 'eslint-plugin-promise/rules/catch-or-return.js' { 111 | declare module.exports: $Exports<'eslint-plugin-promise/rules/catch-or-return'>; 112 | } 113 | declare module 'eslint-plugin-promise/rules/lib/has-promise-callback.js' { 114 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/has-promise-callback'>; 115 | } 116 | declare module 'eslint-plugin-promise/rules/lib/is-callback.js' { 117 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-callback'>; 118 | } 119 | declare module 'eslint-plugin-promise/rules/lib/is-inside-callback.js' { 120 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-inside-callback'>; 121 | } 122 | declare module 'eslint-plugin-promise/rules/lib/is-inside-promise.js' { 123 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-inside-promise'>; 124 | } 125 | declare module 'eslint-plugin-promise/rules/lib/is-named-callback.js' { 126 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-named-callback'>; 127 | } 128 | declare module 'eslint-plugin-promise/rules/lib/is-promise.js' { 129 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-promise'>; 130 | } 131 | declare module 'eslint-plugin-promise/rules/no-callback-in-promise.js' { 132 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-callback-in-promise'>; 133 | } 134 | declare module 'eslint-plugin-promise/rules/no-native.js' { 135 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-native'>; 136 | } 137 | declare module 'eslint-plugin-promise/rules/no-nesting.js' { 138 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-nesting'>; 139 | } 140 | declare module 'eslint-plugin-promise/rules/no-promise-in-callback.js' { 141 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-promise-in-callback'>; 142 | } 143 | declare module 'eslint-plugin-promise/rules/no-return-in-finally.js' { 144 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-return-in-finally'>; 145 | } 146 | declare module 'eslint-plugin-promise/rules/no-return-wrap.js' { 147 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-return-wrap'>; 148 | } 149 | declare module 'eslint-plugin-promise/rules/param-names.js' { 150 | declare module.exports: $Exports<'eslint-plugin-promise/rules/param-names'>; 151 | } 152 | declare module 'eslint-plugin-promise/rules/prefer-await-to-callbacks.js' { 153 | declare module.exports: $Exports<'eslint-plugin-promise/rules/prefer-await-to-callbacks'>; 154 | } 155 | declare module 'eslint-plugin-promise/rules/prefer-await-to-then.js' { 156 | declare module.exports: $Exports<'eslint-plugin-promise/rules/prefer-await-to-then'>; 157 | } 158 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-typed_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 254e8e0a2ab0c28c8f31d3d385966ee0 2 | // flow-typed version: <>/flow-typed_v^2.3.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'flow-typed' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'flow-typed' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'flow-typed/dist/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'flow-typed/dist/commands/create-stub' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'flow-typed/dist/commands/install' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'flow-typed/dist/commands/runTests' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'flow-typed/dist/commands/search' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'flow-typed/dist/commands/update-cache' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'flow-typed/dist/commands/update' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'flow-typed/dist/commands/validateDefs' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'flow-typed/dist/commands/version' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'flow-typed/dist/lib/cacheRepoUtils' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'flow-typed/dist/lib/codeSign' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'flow-typed/dist/lib/fileUtils' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'flow-typed/dist/lib/flowProjectUtils' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'flow-typed/dist/lib/flowVersion' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'flow-typed/dist/lib/git' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'flow-typed/dist/lib/github' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'flow-typed/dist/lib/isInFlowTypedRepo' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'flow-typed/dist/lib/libDefs' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'flow-typed/dist/lib/node' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'flow-typed/dist/lib/npm/npmLibDefs' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'flow-typed/dist/lib/npm/npmProjectUtils' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'flow-typed/dist/lib/semver' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'flow-typed/dist/lib/stubUtils' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'flow-typed/dist/lib/validationErrors' { 118 | declare module.exports: any; 119 | } 120 | 121 | // Filename aliases 122 | declare module 'flow-typed/dist/cli.js' { 123 | declare module.exports: $Exports<'flow-typed/dist/cli'>; 124 | } 125 | declare module 'flow-typed/dist/commands/create-stub.js' { 126 | declare module.exports: $Exports<'flow-typed/dist/commands/create-stub'>; 127 | } 128 | declare module 'flow-typed/dist/commands/install.js' { 129 | declare module.exports: $Exports<'flow-typed/dist/commands/install'>; 130 | } 131 | declare module 'flow-typed/dist/commands/runTests.js' { 132 | declare module.exports: $Exports<'flow-typed/dist/commands/runTests'>; 133 | } 134 | declare module 'flow-typed/dist/commands/search.js' { 135 | declare module.exports: $Exports<'flow-typed/dist/commands/search'>; 136 | } 137 | declare module 'flow-typed/dist/commands/update-cache.js' { 138 | declare module.exports: $Exports<'flow-typed/dist/commands/update-cache'>; 139 | } 140 | declare module 'flow-typed/dist/commands/update.js' { 141 | declare module.exports: $Exports<'flow-typed/dist/commands/update'>; 142 | } 143 | declare module 'flow-typed/dist/commands/validateDefs.js' { 144 | declare module.exports: $Exports<'flow-typed/dist/commands/validateDefs'>; 145 | } 146 | declare module 'flow-typed/dist/commands/version.js' { 147 | declare module.exports: $Exports<'flow-typed/dist/commands/version'>; 148 | } 149 | declare module 'flow-typed/dist/lib/cacheRepoUtils.js' { 150 | declare module.exports: $Exports<'flow-typed/dist/lib/cacheRepoUtils'>; 151 | } 152 | declare module 'flow-typed/dist/lib/codeSign.js' { 153 | declare module.exports: $Exports<'flow-typed/dist/lib/codeSign'>; 154 | } 155 | declare module 'flow-typed/dist/lib/fileUtils.js' { 156 | declare module.exports: $Exports<'flow-typed/dist/lib/fileUtils'>; 157 | } 158 | declare module 'flow-typed/dist/lib/flowProjectUtils.js' { 159 | declare module.exports: $Exports<'flow-typed/dist/lib/flowProjectUtils'>; 160 | } 161 | declare module 'flow-typed/dist/lib/flowVersion.js' { 162 | declare module.exports: $Exports<'flow-typed/dist/lib/flowVersion'>; 163 | } 164 | declare module 'flow-typed/dist/lib/git.js' { 165 | declare module.exports: $Exports<'flow-typed/dist/lib/git'>; 166 | } 167 | declare module 'flow-typed/dist/lib/github.js' { 168 | declare module.exports: $Exports<'flow-typed/dist/lib/github'>; 169 | } 170 | declare module 'flow-typed/dist/lib/isInFlowTypedRepo.js' { 171 | declare module.exports: $Exports<'flow-typed/dist/lib/isInFlowTypedRepo'>; 172 | } 173 | declare module 'flow-typed/dist/lib/libDefs.js' { 174 | declare module.exports: $Exports<'flow-typed/dist/lib/libDefs'>; 175 | } 176 | declare module 'flow-typed/dist/lib/node.js' { 177 | declare module.exports: $Exports<'flow-typed/dist/lib/node'>; 178 | } 179 | declare module 'flow-typed/dist/lib/npm/npmLibDefs.js' { 180 | declare module.exports: $Exports<'flow-typed/dist/lib/npm/npmLibDefs'>; 181 | } 182 | declare module 'flow-typed/dist/lib/npm/npmProjectUtils.js' { 183 | declare module.exports: $Exports<'flow-typed/dist/lib/npm/npmProjectUtils'>; 184 | } 185 | declare module 'flow-typed/dist/lib/semver.js' { 186 | declare module.exports: $Exports<'flow-typed/dist/lib/semver'>; 187 | } 188 | declare module 'flow-typed/dist/lib/stubUtils.js' { 189 | declare module.exports: $Exports<'flow-typed/dist/lib/stubUtils'>; 190 | } 191 | declare module 'flow-typed/dist/lib/validationErrors.js' { 192 | declare module.exports: $Exports<'flow-typed/dist/lib/validationErrors'>; 193 | } 194 | -------------------------------------------------------------------------------- /app/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import csvStream from 'csv-stream' 4 | import get from 'simple-get' 5 | import React from 'react' 6 | import ReactDOM from 'react-dom' 7 | import webworkify from 'webworkify' 8 | import { Comlink } from 'comlinkjs' 9 | 10 | import App from './App.js' 11 | import { openZip, getFile } from '../lib/unzip.js' 12 | import { urlNameToName } from '../lib/util.js' 13 | import { findItem } from './search.js' 14 | 15 | const SEARCH_INDEX_PATHS = { 16 | partial: '/list-partial.json', 17 | full: '/list-full.tsv' 18 | } 19 | 20 | const worker = Comlink.proxy(webworkify(require('./worker.js'))) 21 | const zipFilePromise = openZip('/wiki.zip') 22 | 23 | const store = { 24 | urlName: null, // null for the home page, or eg "Star_Wars" for that article 25 | citeNote: null, 26 | searchIndexes: { 27 | partial: [], // list of *top* articles, search normalized and sorted 28 | partialPromise: null 29 | }, 30 | articleCache: {}, // article HTML cache, eg "Star_Wars": "..." 31 | search: null // current search, eg "sta", or null 32 | } 33 | 34 | // Available for easier debugging: 35 | window.store = store 36 | 37 | init() 38 | 39 | async function init () { 40 | if (!window.DatArchive) { 41 | console.log('old web, not loading dat...') 42 | } else { 43 | // initDat() 44 | } 45 | 46 | window.addEventListener('hashchange', routeAndRender) 47 | routeAndRender() 48 | 49 | await initSearchIndex('partial') 50 | await initFullIndex() 51 | // TODO: load full search index from list.tsv 52 | } 53 | 54 | async function initFullIndex () { 55 | const url = SEARCH_INDEX_PATHS.full 56 | get(url, function (err, res) { 57 | if (err) return window.alert('Could not load search index') 58 | res 59 | .pipe(csvStream.createStream({ 60 | delimiter: '\t' 61 | })) 62 | .on('data', data => { 63 | console.log(data) 64 | }) 65 | }) 66 | } 67 | 68 | /* 69 | function initDat () { 70 | // Get the url of the current archive 71 | const datUrl = window.location.origin 72 | 73 | const archive = new window.DatArchive(datUrl) 74 | 75 | // Listen to network events, for debugging purposes... 76 | const networkActivity = archive.createNetworkActivityStream() 77 | 78 | networkActivity.addEventListener('network-changed', ({connections}) => { 79 | console.log(connections, 'current peers') 80 | }) 81 | networkActivity.addEventListener('download', ({feed, block, bytes}) => { 82 | console.log('downloaded a block in the', feed, {block, bytes}) 83 | }) 84 | networkActivity.addEventListener('upload', ({feed, block, bytes}) => { 85 | console.log('uploaded a block in the', feed, {block, bytes}) 86 | }) 87 | networkActivity.addEventListener('sync', ({feed}) => { 88 | console.log('downloaded everything currently published in the', feed) 89 | }) 90 | } 91 | */ 92 | 93 | /** 94 | * Either starts fetching a given search index, 95 | * or returns the promise for a fetch already done or already in progress. 96 | * (Returns a promise no matter what.) 97 | */ 98 | function initSearchIndex (indexName) { 99 | let promise = store.searchIndexes[indexName + 'Promise'] 100 | 101 | if (promise == null) { 102 | // Start the fetch 103 | promise = fetchPartialIndex(indexName) 104 | store.searchIndexes[indexName + 'Promise'] = promise 105 | } 106 | 107 | return promise 108 | } 109 | 110 | async function fetchPartialIndex (indexName) { 111 | const indexPath = SEARCH_INDEX_PATHS[indexName] 112 | const url = window.location.origin + indexPath 113 | const searchIndex = await worker.fetchPartialIndex(url) 114 | 115 | store.searchIndexes[indexName] = searchIndex 116 | console.log( 117 | 'loaded search index %s, %d entries', 118 | indexName, 119 | searchIndex.length 120 | ) 121 | 122 | return searchIndex 123 | } 124 | 125 | function render () { 126 | const root = document.querySelector('#root') 127 | const app = 128 | ReactDOM.render(app, root) 129 | } 130 | 131 | function maybeScrollToCiteNote () { 132 | const { citeNote } = store 133 | 134 | // If no citation currently selected, do nothing 135 | if (citeNote == null) return 136 | 137 | const $citeNote = document.getElementById(citeNote) 138 | 139 | // If no matching citation found, early return 140 | if ($citeNote == null) return 141 | 142 | // Clear the cite note so we don't scroll to it again if render() is called 143 | // multiple times 144 | store.citeNote = null 145 | 146 | // Smoothly scroll to the citation location on page 147 | $citeNote.scrollIntoView({ 148 | block: 'start', 149 | inline: 'nearest' 150 | }) 151 | } 152 | 153 | function dispatch (action, data) { 154 | console.log('dispatch', action, data) 155 | switch (action) { 156 | case 'NAVIGATE': 157 | store.search = null 158 | window.location = data 159 | return 160 | case 'SET_SEARCH': 161 | store.search = data 162 | render() 163 | return 164 | default: 165 | throw new Error('unknown action ' + action) 166 | } 167 | } 168 | 169 | function routeAndRender () { 170 | // Route 171 | const { hash } = window.location 172 | const parts = hash.split('#') 173 | store.urlName = parts[1] || null 174 | store.citeNote = parts[2] || null 175 | 176 | console.log('routing', store.urlName) 177 | 178 | // Start loading the article asynchronously 179 | if (store.urlName != null) loadArticle(store.urlName) 180 | 181 | // Render immediately 182 | render() 183 | maybeScrollToCiteNote() 184 | } 185 | 186 | async function loadArticle (urlName) { 187 | if (store.articleCache[urlName] != null) { 188 | return 189 | } 190 | 191 | console.log(`loading article ${urlName}`) 192 | 193 | const zipFile = await zipFilePromise 194 | 195 | const entryData = await getEntryData(urlName) 196 | if (entryData == null) { 197 | throw new Error('entry not found: ' + urlName) 198 | } 199 | 200 | const html = await getFile(zipFile, entryData) 201 | 202 | console.log(`loaded article ${urlName}, got ${html && html.length} b`) 203 | store.articleCache[urlName] = html 204 | 205 | render() 206 | } 207 | 208 | async function getEntryData (urlName) { 209 | // TODO: IndexedDB 210 | 211 | // First, find the search name 212 | const name = urlNameToName(urlName) 213 | 214 | // First, check the partial index 215 | const partial = await initSearchIndex('partial') 216 | let entryData = findItem(partial, name) 217 | 218 | // TODO: full search index 219 | /* if (entryData == null) { 220 | // Then, check the full index 221 | const full = await initSearchIndex('full') 222 | entryData = findItem(full, name) 223 | } */ 224 | 225 | return entryData 226 | } 227 | -------------------------------------------------------------------------------- /flow-typed/npm/watchify_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 786e5f73fdf926d29f4b2c3cca96817a 2 | // flow-typed version: <>/watchify_v^3.9.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'watchify' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'watchify' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'watchify/bin/args' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'watchify/bin/cmd' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'watchify/example/files/main' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'watchify/example/files/one' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'watchify/example/files/two' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'watchify/test/api_brfs' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'watchify/test/api_ignore_watch_default' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'watchify/test/api_ignore_watch_multiple' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'watchify/test/api_ignore_watch' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'watchify/test/api_implicit_cache' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'watchify/test/api' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'watchify/test/bin_brfs' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'watchify/test/bin_ignore_watch_default' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'watchify/test/bin_ignore_watch_multiple' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'watchify/test/bin_ignore_watch' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'watchify/test/bin_pipe' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'watchify/test/bin_plugins_pipelining_multiple_errors' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'watchify/test/bin_standalone' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'watchify/test/bin' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'watchify/test/errors_transform' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'watchify/test/errors' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'watchify/test/expose' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'watchify/test/many_immediate' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'watchify/test/many' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'watchify/test/zzz' { 122 | declare module.exports: any; 123 | } 124 | 125 | // Filename aliases 126 | declare module 'watchify/bin/args.js' { 127 | declare module.exports: $Exports<'watchify/bin/args'>; 128 | } 129 | declare module 'watchify/bin/cmd.js' { 130 | declare module.exports: $Exports<'watchify/bin/cmd'>; 131 | } 132 | declare module 'watchify/example/files/main.js' { 133 | declare module.exports: $Exports<'watchify/example/files/main'>; 134 | } 135 | declare module 'watchify/example/files/one.js' { 136 | declare module.exports: $Exports<'watchify/example/files/one'>; 137 | } 138 | declare module 'watchify/example/files/two.js' { 139 | declare module.exports: $Exports<'watchify/example/files/two'>; 140 | } 141 | declare module 'watchify/index' { 142 | declare module.exports: $Exports<'watchify'>; 143 | } 144 | declare module 'watchify/index.js' { 145 | declare module.exports: $Exports<'watchify'>; 146 | } 147 | declare module 'watchify/test/api_brfs.js' { 148 | declare module.exports: $Exports<'watchify/test/api_brfs'>; 149 | } 150 | declare module 'watchify/test/api_ignore_watch_default.js' { 151 | declare module.exports: $Exports<'watchify/test/api_ignore_watch_default'>; 152 | } 153 | declare module 'watchify/test/api_ignore_watch_multiple.js' { 154 | declare module.exports: $Exports<'watchify/test/api_ignore_watch_multiple'>; 155 | } 156 | declare module 'watchify/test/api_ignore_watch.js' { 157 | declare module.exports: $Exports<'watchify/test/api_ignore_watch'>; 158 | } 159 | declare module 'watchify/test/api_implicit_cache.js' { 160 | declare module.exports: $Exports<'watchify/test/api_implicit_cache'>; 161 | } 162 | declare module 'watchify/test/api.js' { 163 | declare module.exports: $Exports<'watchify/test/api'>; 164 | } 165 | declare module 'watchify/test/bin_brfs.js' { 166 | declare module.exports: $Exports<'watchify/test/bin_brfs'>; 167 | } 168 | declare module 'watchify/test/bin_ignore_watch_default.js' { 169 | declare module.exports: $Exports<'watchify/test/bin_ignore_watch_default'>; 170 | } 171 | declare module 'watchify/test/bin_ignore_watch_multiple.js' { 172 | declare module.exports: $Exports<'watchify/test/bin_ignore_watch_multiple'>; 173 | } 174 | declare module 'watchify/test/bin_ignore_watch.js' { 175 | declare module.exports: $Exports<'watchify/test/bin_ignore_watch'>; 176 | } 177 | declare module 'watchify/test/bin_pipe.js' { 178 | declare module.exports: $Exports<'watchify/test/bin_pipe'>; 179 | } 180 | declare module 'watchify/test/bin_plugins_pipelining_multiple_errors.js' { 181 | declare module.exports: $Exports<'watchify/test/bin_plugins_pipelining_multiple_errors'>; 182 | } 183 | declare module 'watchify/test/bin_standalone.js' { 184 | declare module.exports: $Exports<'watchify/test/bin_standalone'>; 185 | } 186 | declare module 'watchify/test/bin.js' { 187 | declare module.exports: $Exports<'watchify/test/bin'>; 188 | } 189 | declare module 'watchify/test/errors_transform.js' { 190 | declare module.exports: $Exports<'watchify/test/errors_transform'>; 191 | } 192 | declare module 'watchify/test/errors.js' { 193 | declare module.exports: $Exports<'watchify/test/errors'>; 194 | } 195 | declare module 'watchify/test/expose.js' { 196 | declare module.exports: $Exports<'watchify/test/expose'>; 197 | } 198 | declare module 'watchify/test/many_immediate.js' { 199 | declare module.exports: $Exports<'watchify/test/many_immediate'>; 200 | } 201 | declare module 'watchify/test/many.js' { 202 | declare module.exports: $Exports<'watchify/test/many'>; 203 | } 204 | declare module 'watchify/test/zzz.js' { 205 | declare module.exports: $Exports<'watchify/test/zzz'>; 206 | } 207 | -------------------------------------------------------------------------------- /flow-typed/npm/npm-check_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 64a3cc6158579d4614ab24431bcfca7e 2 | // flow-typed version: <>/npm-check_v^5.5.2/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'npm-check' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'npm-check' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'npm-check/bin/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'npm-check/lib-es5/cli' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'npm-check/lib-es5/in/best-guess-homepage' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'npm-check/lib-es5/in/create-package-summary' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'npm-check/lib-es5/in/get-installed-packages' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'npm-check/lib-es5/in/get-latest-from-registry' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'npm-check/lib-es5/in/get-unused-packages' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'npm-check/lib-es5/in/index' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'npm-check/lib-es5/in/read-package-json' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'npm-check/lib-es5/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'npm-check/lib-es5/out/emoji' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'npm-check/lib-es5/out/install-packages' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'npm-check/lib-es5/out/interactive-update' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'npm-check/lib-es5/out/static-output' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'npm-check/lib-es5/state/debug' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'npm-check/lib-es5/state/init' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'npm-check/lib-es5/state/state' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'npm-check/lib/cli' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'npm-check/lib/in/best-guess-homepage' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'npm-check/lib/in/create-package-summary' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'npm-check/lib/in/get-installed-packages' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'npm-check/lib/in/get-latest-from-registry' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'npm-check/lib/in/get-unused-packages' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'npm-check/lib/in/index' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'npm-check/lib/in/read-package-json' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'npm-check/lib/index' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'npm-check/lib/out/emoji' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'npm-check/lib/out/install-packages' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'npm-check/lib/out/interactive-update' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'npm-check/lib/out/static-output' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'npm-check/lib/state/debug' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'npm-check/lib/state/init' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'npm-check/lib/state/state' { 154 | declare module.exports: any; 155 | } 156 | 157 | // Filename aliases 158 | declare module 'npm-check/bin/cli.js' { 159 | declare module.exports: $Exports<'npm-check/bin/cli'>; 160 | } 161 | declare module 'npm-check/lib-es5/cli.js' { 162 | declare module.exports: $Exports<'npm-check/lib-es5/cli'>; 163 | } 164 | declare module 'npm-check/lib-es5/in/best-guess-homepage.js' { 165 | declare module.exports: $Exports<'npm-check/lib-es5/in/best-guess-homepage'>; 166 | } 167 | declare module 'npm-check/lib-es5/in/create-package-summary.js' { 168 | declare module.exports: $Exports<'npm-check/lib-es5/in/create-package-summary'>; 169 | } 170 | declare module 'npm-check/lib-es5/in/get-installed-packages.js' { 171 | declare module.exports: $Exports<'npm-check/lib-es5/in/get-installed-packages'>; 172 | } 173 | declare module 'npm-check/lib-es5/in/get-latest-from-registry.js' { 174 | declare module.exports: $Exports<'npm-check/lib-es5/in/get-latest-from-registry'>; 175 | } 176 | declare module 'npm-check/lib-es5/in/get-unused-packages.js' { 177 | declare module.exports: $Exports<'npm-check/lib-es5/in/get-unused-packages'>; 178 | } 179 | declare module 'npm-check/lib-es5/in/index.js' { 180 | declare module.exports: $Exports<'npm-check/lib-es5/in/index'>; 181 | } 182 | declare module 'npm-check/lib-es5/in/read-package-json.js' { 183 | declare module.exports: $Exports<'npm-check/lib-es5/in/read-package-json'>; 184 | } 185 | declare module 'npm-check/lib-es5/index.js' { 186 | declare module.exports: $Exports<'npm-check/lib-es5/index'>; 187 | } 188 | declare module 'npm-check/lib-es5/out/emoji.js' { 189 | declare module.exports: $Exports<'npm-check/lib-es5/out/emoji'>; 190 | } 191 | declare module 'npm-check/lib-es5/out/install-packages.js' { 192 | declare module.exports: $Exports<'npm-check/lib-es5/out/install-packages'>; 193 | } 194 | declare module 'npm-check/lib-es5/out/interactive-update.js' { 195 | declare module.exports: $Exports<'npm-check/lib-es5/out/interactive-update'>; 196 | } 197 | declare module 'npm-check/lib-es5/out/static-output.js' { 198 | declare module.exports: $Exports<'npm-check/lib-es5/out/static-output'>; 199 | } 200 | declare module 'npm-check/lib-es5/state/debug.js' { 201 | declare module.exports: $Exports<'npm-check/lib-es5/state/debug'>; 202 | } 203 | declare module 'npm-check/lib-es5/state/init.js' { 204 | declare module.exports: $Exports<'npm-check/lib-es5/state/init'>; 205 | } 206 | declare module 'npm-check/lib-es5/state/state.js' { 207 | declare module.exports: $Exports<'npm-check/lib-es5/state/state'>; 208 | } 209 | declare module 'npm-check/lib/cli.js' { 210 | declare module.exports: $Exports<'npm-check/lib/cli'>; 211 | } 212 | declare module 'npm-check/lib/in/best-guess-homepage.js' { 213 | declare module.exports: $Exports<'npm-check/lib/in/best-guess-homepage'>; 214 | } 215 | declare module 'npm-check/lib/in/create-package-summary.js' { 216 | declare module.exports: $Exports<'npm-check/lib/in/create-package-summary'>; 217 | } 218 | declare module 'npm-check/lib/in/get-installed-packages.js' { 219 | declare module.exports: $Exports<'npm-check/lib/in/get-installed-packages'>; 220 | } 221 | declare module 'npm-check/lib/in/get-latest-from-registry.js' { 222 | declare module.exports: $Exports<'npm-check/lib/in/get-latest-from-registry'>; 223 | } 224 | declare module 'npm-check/lib/in/get-unused-packages.js' { 225 | declare module.exports: $Exports<'npm-check/lib/in/get-unused-packages'>; 226 | } 227 | declare module 'npm-check/lib/in/index.js' { 228 | declare module.exports: $Exports<'npm-check/lib/in/index'>; 229 | } 230 | declare module 'npm-check/lib/in/read-package-json.js' { 231 | declare module.exports: $Exports<'npm-check/lib/in/read-package-json'>; 232 | } 233 | declare module 'npm-check/lib/index.js' { 234 | declare module.exports: $Exports<'npm-check/lib/index'>; 235 | } 236 | declare module 'npm-check/lib/out/emoji.js' { 237 | declare module.exports: $Exports<'npm-check/lib/out/emoji'>; 238 | } 239 | declare module 'npm-check/lib/out/install-packages.js' { 240 | declare module.exports: $Exports<'npm-check/lib/out/install-packages'>; 241 | } 242 | declare module 'npm-check/lib/out/interactive-update.js' { 243 | declare module.exports: $Exports<'npm-check/lib/out/interactive-update'>; 244 | } 245 | declare module 'npm-check/lib/out/static-output.js' { 246 | declare module.exports: $Exports<'npm-check/lib/out/static-output'>; 247 | } 248 | declare module 'npm-check/lib/state/debug.js' { 249 | declare module.exports: $Exports<'npm-check/lib/state/debug'>; 250 | } 251 | declare module 'npm-check/lib/state/init.js' { 252 | declare module.exports: $Exports<'npm-check/lib/state/init'>; 253 | } 254 | declare module 'npm-check/lib/state/state.js' { 255 | declare module.exports: $Exports<'npm-check/lib/state/state'>; 256 | } 257 | -------------------------------------------------------------------------------- /most-viewed/list.txt: -------------------------------------------------------------------------------- 1 | 1989_(Taylor_Swift_album) 2 | 21_(Adele_album) 3 | 50_Cent 4 | 808s_%26_Heartbreak 5 | A.C._Milan 6 | AC/DC 7 | AMGTV 8 | A_Game_of_Thrones 9 | A_Song_of_Ice_and_Fire 10 | Abbey_Road 11 | Aboriginal_Australian 12 | Abraham 13 | Abraham_Lincoln 14 | Academy_Awards 15 | Adele 16 | Adolf_Hitler 17 | Aeneid 18 | Albert_Einstein 19 | Alexander_the_Great 20 | Alice%27s_Adventures_in_Wonderland 21 | Amazon.com 22 | American_Civil_War 23 | American_Idiot 24 | American_football 25 | Amsterdam 26 | Ancient_Egypt 27 | Ancient_Greece 28 | Ancient_Rome 29 | Angelina_Jolie 30 | Angelsberg 31 | Animal_Farm 32 | Anime 33 | Archimedes 34 | Argentina_national_football_team 35 | Ariana_Grande 36 | Aristotle 37 | Arnold_Schwarzenegger 38 | Arrow_(TV_series) 39 | Arsenal_F.C. 40 | Asoka 41 | Association_football 42 | Aston_Villa_F.C. 43 | Augustus 44 | Auli%27i_Cravalho 45 | Australia 46 | Avatar_(2009_film) 47 | Avenged_Sevenfold 48 | Backstreet_Boys 49 | Bad_(album) 50 | Barack_Obama 51 | Barcelona 52 | Basketball 53 | Beatles 54 | Bee_Gees 55 | Benjamin_Franklin 56 | Beowulf 57 | Berlin 58 | Beyonc%C3%A9_Knowles 59 | Bible 60 | Bill_Clinton 61 | Bill_Gates 62 | Blink-182 63 | Bob_Marley 64 | Book_of_the_Dead 65 | Borussia_Dortmund 66 | Boston 67 | Brad_Pitt 68 | Brave_New_World 69 | Brazil 70 | Brazil_national_football_team 71 | Breaking_Bad 72 | Britney_Spears 73 | Brock_Lesnar 74 | Bruce_Lee 75 | Bruno_Mars 76 | Caligula 77 | Caliphate 78 | Canada 79 | Catharina-Amalia,_Princess_of_Orange 80 | Celtic_F.C. 81 | Charlemagne 82 | Charles,_Prince_of_Wales 83 | Charlie_Sheen 84 | Che_Guevara 85 | Chelsea_F.C. 86 | Chicago 87 | Chicago_Bulls 88 | China 89 | Christopher_Columbus 90 | Circus_(Britney_Spears_album) 91 | Cleopatra 92 | Clint_Eastwood 93 | Code_Geass 94 | Code_of_Hammurabi 95 | Coldplay 96 | Confucius 97 | Connie_Talbot 98 | Conor_McGregor 99 | Cricket 100 | Cristiano_Ronaldo 101 | Cupid_and_Psyche 102 | Dafne_Keen 103 | Daft_Punk 104 | David 105 | David_Beckham 106 | David_Bowie 107 | David_Mazouz 108 | Demi_Lovato 109 | Despacito 110 | Dexter_(TV_series) 111 | Divine_Comedy 112 | Doctor_Who 113 | Domesday_Book 114 | Donald_Trump 115 | Dracula 116 | Dwayne_Johnson 117 | Earth 118 | Egypt 119 | Elizabeth_I 120 | Elizabeth_II 121 | Elvis_Presley 122 | Eminem 123 | Emma_Stone 124 | Emma_Watson 125 | England 126 | England_in_the_Middle_Ages 127 | England_national_football_team 128 | English_language 129 | Epic_of_Gilgamesh 130 | FC_Barcelona 131 | FC_Bayern_Munich 132 | Facebook 133 | Family_Guy 134 | Favicon.ico 135 | Fearless_(Taylor_Swift_album) 136 | Fifty_Shades_of_Grey 137 | Finn_Wolfhard 138 | Floyd_Mayweather,_Jr. 139 | Foo_Fighters 140 | Football 141 | France 142 | France_national_football_team 143 | Frankenstein 144 | Frankie_Jonas 145 | Franklin_D._Roosevelt 146 | Freddie_Mercury 147 | Friends 148 | Game_of_Thrones 149 | Gaten_Matarazzo 150 | Gautama_Buddha 151 | Genghis_Khan 152 | George_H._W._Bush 153 | George_W._Bush 154 | George_Washington 155 | Germany 156 | Germany_national_football_team 157 | Girls%27_Generation 158 | Glee_(TV_series) 159 | Global_warming 160 | Golden_State_Warriors 161 | Golf 162 | Good_Kid,_M.A.A.D_City 163 | Google 164 | Gorillaz 165 | Graduation_(album) 166 | Greece 167 | Green_Day 168 | Grey%27s_Anatomy 169 | Guns_N%27_Roses 170 | Halloween 171 | Hannibal 172 | Harry_Potter 173 | Harry_Potter_and_the_Deathly_Hallows 174 | Harshaali_Malhotra 175 | Heath_Ledger 176 | Henry_VIII_of_England 177 | History_of_China 178 | History_of_India 179 | History_of_ancient_Israel_and_Judah 180 | Hong_Kong 181 | House_(TV_series) 182 | How_I_Met_Your_Mother 183 | Human_penis_size 184 | Hybrid_Theory 185 | I_Ching 186 | Iliad 187 | Illuminati 188 | India 189 | Indigenous_australian 190 | Indonesia 191 | Inferno_(Dante) 192 | Internet_Movie_Database 193 | Iran 194 | Ireland 195 | Iron_Maiden 196 | Israel 197 | Istanbul 198 | Italy 199 | Italy_in_the_Middle_Ages 200 | Italy_national_football_team 201 | Jackie_Evancho 202 | Jacob_Tremblay 203 | James,_Viscount_Severn 204 | Japan 205 | Java 206 | Java_(programming_language) 207 | Jay-Z 208 | Jazz_Jennings 209 | Jennifer_Aniston 210 | Jennifer_Lawrence 211 | Jerusalem 212 | Jesus 213 | Joan_of_Arc 214 | John_Cena 215 | John_F._Kennedy 216 | John_Lennon 217 | Johnny_Depp 218 | Jonas_Brothers 219 | Joseph_Stalin 220 | Judaism 221 | Judo 222 | Julius_Caesar 223 | Justin_Bieber 224 | Juventus_F.C. 225 | Kama_Sutra 226 | Kanye_West 227 | Katy_Perry 228 | Kendrick_Lamar 229 | Kim_Kardashian 230 | King_Arthur 231 | Kiss_(band) 232 | Kobe_Bryant 233 | Kristen_Stewart 234 | LaMelo_Ball 235 | Lady_Gaga 236 | Lady_Louise_Windsor 237 | Laurie_Hernandez 238 | LeBron_James 239 | Led_Zeppelin 240 | Led_Zeppelin_IV 241 | Leicester_City_F.C. 242 | Leonardo_DiCaprio 243 | Les_Mis%C3%A9rables 244 | Let_It_Be 245 | Lil_Pump 246 | Lil_Wayne 247 | Linkin_Park 248 | Lionel_Messi 249 | List_of_Presidents_of_the_United_States 250 | List_of_The_Big_Bang_Theory_episodes 251 | List_of_best-selling_books 252 | List_of_most_viewed_YouTube_videos 253 | Liverpool_F.C. 254 | Lolita 255 | London 256 | Los_Angeles 257 | Los_Angeles_Lakers 258 | Lost_(TV_series) 259 | Loud_(Rihanna_album) 260 | Lysistrata 261 | Macau 262 | Mackenzie_Foy 263 | Maddie_Ziegler 264 | Madison_De_La_Garza 265 | Madonna_(entertainer) 266 | Mahabharata 267 | Mahatma_Gandhi 268 | Main_Page 269 | Main_page 270 | Malware 271 | Manchester_City_F.C. 272 | Manchester_United_F.C. 273 | Manga 274 | Manny_Pacquiao 275 | Marco_Polo 276 | Margaret_Thatcher 277 | Mariah_Carey 278 | Marilyn_Monroe 279 | Mark_Wahlberg 280 | Mark_Zuckerberg 281 | Maroon_5 282 | Masturbation 283 | Maya_civilization 284 | Megan_Fox 285 | Member_states_of_the_United_Nations 286 | Mesoamerican_Long_Count_calendar 287 | Mesopotamia 288 | Metallica 289 | Metallica_(album) 290 | Mexico 291 | Miami_Heat 292 | Michael_Jackson 293 | Michael_Jordan 294 | Michael_Phelps 295 | Mike_Tyson 296 | Mila_Kunis 297 | Miley_Cyrus 298 | Millie_Bobby_Brown 299 | Mixed_martial_arts 300 | Monaco 301 | Montreal 302 | Moses 303 | Muhammad 304 | Muhammad_Ali 305 | Mumbai 306 | Muse_(band) 307 | My_Beautiful_Dark_Twisted_Fantasy 308 | NCIS_(TV_series) 309 | Naruto 310 | Natalie_Portman 311 | Nelson_Mandela 312 | Nero 313 | Netherlands 314 | Netherlands_national_football_team 315 | Nevermind 316 | New_England_Patriots 317 | New_York_City 318 | New_York_Yankees 319 | New_Zealand 320 | Newcastle_United_F.C. 321 | Neymar 322 | Nicki_Minaj 323 | Nineteen_Eighty-Four 324 | Nirvana 325 | Nirvana_(band) 326 | Noah_Cyrus 327 | North_Korea 328 | Novak_Djokovic 329 | O._J._Simpson 330 | Oakland_Raiders 331 | Odyssey 332 | Oedipus_the_King 333 | Of_Mice_and_Men 334 | Once_Upon_a_Time_(TV_series) 335 | One_Direction 336 | One_Thousand_and_One_Nights 337 | Osama_bin_Laden 338 | Pakistan 339 | Paramore 340 | Paris 341 | Paris_Saint-Germain_F.C. 342 | Peyton_Manning 343 | Philadelphia 344 | Philippines 345 | Pink_Floyd 346 | Plato 347 | Pompeii 348 | Porno_(novel) 349 | Pornography 350 | Pride_and_Prejudice 351 | Prince_(musician) 352 | Prince_George_of_Cambridge 353 | Prince_Philip,_Duke_of_Edinburgh 354 | Princess_Charlotte_of_Cambridge 355 | Princess_Elisabeth,_Duchess_of_Brabant 356 | Professional_boxing 357 | Professional_wrestling 358 | Pythagoras 359 | Queen_(band) 360 | Queen_Victoria 361 | Quran 362 | Quvenzhan%C3%A9_Wallis 363 | RMS_Titanic 364 | Radiohead 365 | Rafael_Nadal 366 | Ragnar_Lodbrok 367 | Ramayana 368 | Rangers_F.C. 369 | Real_Madrid_C.F. 370 | Recovery_(Eminem_album) 371 | Red_(Taylor_Swift_album) 372 | Red_Hot_Chili_Peppers 373 | Richard_I_of_England 374 | Richard_Nixon 375 | Rigveda 376 | Rihanna 377 | Rio_de_Janeiro 378 | Robin_Hood 379 | Robin_Williams 380 | Roger_Federer 381 | Rome 382 | Ronald_Reagan 383 | Ronaldinho 384 | Ronaldo 385 | Ronda_Rousey 386 | Rosetta_Stone 387 | Rowan_Blanchard 388 | Rubber_Soul 389 | Russia 390 | Ryan_Reynolds 391 | Sachin_Tendulkar 392 | Salman_Khan 393 | San_Francisco 394 | Sarah_Palin 395 | Scarlett_Johansson 396 | Search 397 | Seattle 398 | Selena_Gomez 399 | September_11_attacks 400 | Serena_Williams 401 | Sex 402 | Sex_(book) 403 | Sexual_intercourse 404 | Sgt._Pepper%27s_Lonely_Hearts_Club_Band 405 | Shanghai 406 | Shaquille_O%27Neal 407 | Sherlock_(TV_series) 408 | Singapore 409 | Skai_Jackson 410 | Slipknot_(band) 411 | Socrates 412 | Sons_of_Anarchy 413 | South_Africa 414 | South_Park 415 | Spain 416 | Spain_national_football_team 417 | Sparta 418 | Spartacus 419 | Spice_Girls 420 | Sprint_(running) 421 | Star_Wars 422 | Stephen_Hawking 423 | Steve_Jobs 424 | Sunny_Leone 425 | Sweden 426 | Swimming_(sport) 427 | Switzerland 428 | Sylvester_Stallone 429 | Talk:Main_Page 430 | Talmud 431 | Tao_Te_Ching 432 | Taylor_Swift 433 | Teenage_Dream_(Katy_Perry_album) 434 | Tennis 435 | The_Art_of_War 436 | The_Avengers_(2012_film) 437 | The_Beatles 438 | The_Beatles_(album) 439 | The_Big_Bang_Theory 440 | The_Canterbury_Tales 441 | The_Catcher_in_the_Rye 442 | The_Dark_Knight_Rises 443 | The_Dark_Side_of_the_Moon 444 | The_Decameron 445 | The_Eminem_Show 446 | The_Fame 447 | The_Girl_with_the_Dragon_Tattoo 448 | The_Great_Gatsby 449 | The_Hobbit 450 | The_Hunger_Games 451 | The_Lord_of_the_Rings 452 | The_Marshall_Mathers_LP 453 | The_Office_(U.S._TV_series) 454 | The_Picture_of_Dorian_Gray 455 | The_Rolling_Stones 456 | The_Simpsons 457 | The_Slim_Shady_LP 458 | The_Undertaker 459 | The_Vampire_Diaries 460 | The_Walking_Dead_(TV_series) 461 | The_Wall 462 | The_Winds_of_Winter 463 | Theodore_Roosevelt 464 | Thomas_Jefferson 465 | Thriller_(Michael_Jackson_album) 466 | Tiger_Woods 467 | Titanic_(1997_film) 468 | Titanomachy 469 | To_Kill_a_Mockingbird 470 | Tokyo 471 | Tom_Brady 472 | Tom_Cruise 473 | Tom_Hardy 474 | Toronto 475 | Tottenham_Hotspur_F.C. 476 | True_Blood 477 | Tupac_Shakur 478 | Turkey 479 | Tutankhamun 480 | Two_and_a_Half_Men 481 | U2 482 | Undefined 483 | United_Kingdom 484 | United_States 485 | Upanishads 486 | Usain_Bolt 487 | Usenet_cabal 488 | Vagina 489 | Vancouver 490 | Vedas 491 | Venice 492 | Vietnam_War 493 | Vladimir_Putin 494 | Washington,_D.C. 495 | Watch_the_Throne 496 | Watchmen 497 | Wayne_Rooney 498 | Web_scraping 499 | West_Ham_United_F.C. 500 | Wiki 501 | Will_Smith 502 | William_Shakespeare 503 | William_Wallace 504 | Willow_Shields 505 | Willow_Smith 506 | Winston_Churchill 507 | World_War_I 508 | World_War_II 509 | XHamster 510 | Yara_Shahidi 511 | Yeezus 512 | YouTube 513 | Youtube 514 | Zaira_Wasim 515 | Zlatan_Ibrahimovi%C4%87 516 | Ray_Charles 517 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-node_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c345527dba9c35db13b611aba45a7832 2 | // flow-typed version: <>/eslint-plugin-node_v^6.0.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-node' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-node' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-node/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-node/lib/rules' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-node/lib/rules/exports-style' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-node/lib/rules/no-deprecated-api' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-node/lib/rules/no-extraneous-import' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-node/lib/rules/no-extraneous-require' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-node/lib/rules/no-hide-core-modules' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-node/lib/rules/no-missing-import' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-node/lib/rules/no-missing-require' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-node/lib/rules/no-unpublished-bin' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-node/lib/rules/no-unpublished-import' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-node/lib/rules/no-unpublished-require' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-node/lib/rules/no-unsupported-features' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-node/lib/rules/process-exit-as-throw' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-node/lib/rules/shebang' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-node/lib/util/cache' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-node/lib/util/check-existence' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-node/lib/util/check-extraneous' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-node/lib/util/check-publish' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-node/lib/util/deprecated-apis' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-node/lib/util/exists' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-node/lib/util/features' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-node/lib/util/get-allow-modules' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-node/lib/util/get-convert-path' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-node/lib/util/get-docs-url' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-node/lib/util/get-import-export-targets' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-node/lib/util/get-npmignore' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-node/lib/util/get-package-json' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-node/lib/util/get-require-targets' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-node/lib/util/get-resolve-paths' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-node/lib/util/get-try-extensions' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-node/lib/util/get-value-if-string' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-node/lib/util/import-target' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-node/lib/util/strip-import-path-params' { 158 | declare module.exports: any; 159 | } 160 | 161 | // Filename aliases 162 | declare module 'eslint-plugin-node/lib/index.js' { 163 | declare module.exports: $Exports<'eslint-plugin-node/lib/index'>; 164 | } 165 | declare module 'eslint-plugin-node/lib/rules.js' { 166 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules'>; 167 | } 168 | declare module 'eslint-plugin-node/lib/rules/exports-style.js' { 169 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/exports-style'>; 170 | } 171 | declare module 'eslint-plugin-node/lib/rules/no-deprecated-api.js' { 172 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-deprecated-api'>; 173 | } 174 | declare module 'eslint-plugin-node/lib/rules/no-extraneous-import.js' { 175 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-extraneous-import'>; 176 | } 177 | declare module 'eslint-plugin-node/lib/rules/no-extraneous-require.js' { 178 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-extraneous-require'>; 179 | } 180 | declare module 'eslint-plugin-node/lib/rules/no-hide-core-modules.js' { 181 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-hide-core-modules'>; 182 | } 183 | declare module 'eslint-plugin-node/lib/rules/no-missing-import.js' { 184 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-missing-import'>; 185 | } 186 | declare module 'eslint-plugin-node/lib/rules/no-missing-require.js' { 187 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-missing-require'>; 188 | } 189 | declare module 'eslint-plugin-node/lib/rules/no-unpublished-bin.js' { 190 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-unpublished-bin'>; 191 | } 192 | declare module 'eslint-plugin-node/lib/rules/no-unpublished-import.js' { 193 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-unpublished-import'>; 194 | } 195 | declare module 'eslint-plugin-node/lib/rules/no-unpublished-require.js' { 196 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-unpublished-require'>; 197 | } 198 | declare module 'eslint-plugin-node/lib/rules/no-unsupported-features.js' { 199 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/no-unsupported-features'>; 200 | } 201 | declare module 'eslint-plugin-node/lib/rules/process-exit-as-throw.js' { 202 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/process-exit-as-throw'>; 203 | } 204 | declare module 'eslint-plugin-node/lib/rules/shebang.js' { 205 | declare module.exports: $Exports<'eslint-plugin-node/lib/rules/shebang'>; 206 | } 207 | declare module 'eslint-plugin-node/lib/util/cache.js' { 208 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/cache'>; 209 | } 210 | declare module 'eslint-plugin-node/lib/util/check-existence.js' { 211 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/check-existence'>; 212 | } 213 | declare module 'eslint-plugin-node/lib/util/check-extraneous.js' { 214 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/check-extraneous'>; 215 | } 216 | declare module 'eslint-plugin-node/lib/util/check-publish.js' { 217 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/check-publish'>; 218 | } 219 | declare module 'eslint-plugin-node/lib/util/deprecated-apis.js' { 220 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/deprecated-apis'>; 221 | } 222 | declare module 'eslint-plugin-node/lib/util/exists.js' { 223 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/exists'>; 224 | } 225 | declare module 'eslint-plugin-node/lib/util/features.js' { 226 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/features'>; 227 | } 228 | declare module 'eslint-plugin-node/lib/util/get-allow-modules.js' { 229 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-allow-modules'>; 230 | } 231 | declare module 'eslint-plugin-node/lib/util/get-convert-path.js' { 232 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-convert-path'>; 233 | } 234 | declare module 'eslint-plugin-node/lib/util/get-docs-url.js' { 235 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-docs-url'>; 236 | } 237 | declare module 'eslint-plugin-node/lib/util/get-import-export-targets.js' { 238 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-import-export-targets'>; 239 | } 240 | declare module 'eslint-plugin-node/lib/util/get-npmignore.js' { 241 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-npmignore'>; 242 | } 243 | declare module 'eslint-plugin-node/lib/util/get-package-json.js' { 244 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-package-json'>; 245 | } 246 | declare module 'eslint-plugin-node/lib/util/get-require-targets.js' { 247 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-require-targets'>; 248 | } 249 | declare module 'eslint-plugin-node/lib/util/get-resolve-paths.js' { 250 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-resolve-paths'>; 251 | } 252 | declare module 'eslint-plugin-node/lib/util/get-try-extensions.js' { 253 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-try-extensions'>; 254 | } 255 | declare module 'eslint-plugin-node/lib/util/get-value-if-string.js' { 256 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/get-value-if-string'>; 257 | } 258 | declare module 'eslint-plugin-node/lib/util/import-target.js' { 259 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/import-target'>; 260 | } 261 | declare module 'eslint-plugin-node/lib/util/strip-import-path-params.js' { 262 | declare module.exports: $Exports<'eslint-plugin-node/lib/util/strip-import-path-params'>; 263 | } 264 | -------------------------------------------------------------------------------- /flow-typed/npm/brfs_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8f97237004ca212d8705861373754ac3 2 | // flow-typed version: <>/brfs_v^1.4.3/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'brfs' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'brfs' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'brfs/bin/cmd' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'brfs/example/async' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'brfs/example/main' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'brfs/test/ag' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'brfs/test/async' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'brfs/test/buffer' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'brfs/test/bundle' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'brfs/test/cmd' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'brfs/test/dynamic_read_concat' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'brfs/test/dynamic_read_no_concat' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'brfs/test/encoding' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'brfs/test/files/ag' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'brfs/test/files/async_encoding' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'brfs/test/files/async_str_encoding' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'brfs/test/files/async' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'brfs/test/files/buffer' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'brfs/test/files/dynamic_read_concat' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'brfs/test/files/dynamic_read_no_concat' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'brfs/test/files/encoding' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'brfs/test/files/hoist' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'brfs/test/files/inline' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'brfs/test/files/main' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'brfs/test/files/multi_var' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'brfs/test/files/non_fs' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'brfs/test/files/path_join_other_name' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'brfs/test/files/path_join_single_var' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'brfs/test/files/path_join' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'brfs/test/files/readdir-sync' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'brfs/test/files/readdir' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'brfs/test/files/separators' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'brfs/test/files/with_comments' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'brfs/test/hoist' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'brfs/test/inline' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'brfs/test/multi_var' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'brfs/test/non_fs' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'brfs/test/path_join_other_name' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'brfs/test/path_join_single_var' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'brfs/test/path_join' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'brfs/test/readdir' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'brfs/test/require_resolve' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'brfs/test/require_resolve/main' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'brfs/test/separators' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'brfs/test/tr' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'brfs/test/with_comments' { 198 | declare module.exports: any; 199 | } 200 | 201 | // Filename aliases 202 | declare module 'brfs/bin/cmd.js' { 203 | declare module.exports: $Exports<'brfs/bin/cmd'>; 204 | } 205 | declare module 'brfs/example/async.js' { 206 | declare module.exports: $Exports<'brfs/example/async'>; 207 | } 208 | declare module 'brfs/example/main.js' { 209 | declare module.exports: $Exports<'brfs/example/main'>; 210 | } 211 | declare module 'brfs/index' { 212 | declare module.exports: $Exports<'brfs'>; 213 | } 214 | declare module 'brfs/index.js' { 215 | declare module.exports: $Exports<'brfs'>; 216 | } 217 | declare module 'brfs/test/ag.js' { 218 | declare module.exports: $Exports<'brfs/test/ag'>; 219 | } 220 | declare module 'brfs/test/async.js' { 221 | declare module.exports: $Exports<'brfs/test/async'>; 222 | } 223 | declare module 'brfs/test/buffer.js' { 224 | declare module.exports: $Exports<'brfs/test/buffer'>; 225 | } 226 | declare module 'brfs/test/bundle.js' { 227 | declare module.exports: $Exports<'brfs/test/bundle'>; 228 | } 229 | declare module 'brfs/test/cmd.js' { 230 | declare module.exports: $Exports<'brfs/test/cmd'>; 231 | } 232 | declare module 'brfs/test/dynamic_read_concat.js' { 233 | declare module.exports: $Exports<'brfs/test/dynamic_read_concat'>; 234 | } 235 | declare module 'brfs/test/dynamic_read_no_concat.js' { 236 | declare module.exports: $Exports<'brfs/test/dynamic_read_no_concat'>; 237 | } 238 | declare module 'brfs/test/encoding.js' { 239 | declare module.exports: $Exports<'brfs/test/encoding'>; 240 | } 241 | declare module 'brfs/test/files/ag.js' { 242 | declare module.exports: $Exports<'brfs/test/files/ag'>; 243 | } 244 | declare module 'brfs/test/files/async_encoding.js' { 245 | declare module.exports: $Exports<'brfs/test/files/async_encoding'>; 246 | } 247 | declare module 'brfs/test/files/async_str_encoding.js' { 248 | declare module.exports: $Exports<'brfs/test/files/async_str_encoding'>; 249 | } 250 | declare module 'brfs/test/files/async.js' { 251 | declare module.exports: $Exports<'brfs/test/files/async'>; 252 | } 253 | declare module 'brfs/test/files/buffer.js' { 254 | declare module.exports: $Exports<'brfs/test/files/buffer'>; 255 | } 256 | declare module 'brfs/test/files/dynamic_read_concat.js' { 257 | declare module.exports: $Exports<'brfs/test/files/dynamic_read_concat'>; 258 | } 259 | declare module 'brfs/test/files/dynamic_read_no_concat.js' { 260 | declare module.exports: $Exports<'brfs/test/files/dynamic_read_no_concat'>; 261 | } 262 | declare module 'brfs/test/files/encoding.js' { 263 | declare module.exports: $Exports<'brfs/test/files/encoding'>; 264 | } 265 | declare module 'brfs/test/files/hoist.js' { 266 | declare module.exports: $Exports<'brfs/test/files/hoist'>; 267 | } 268 | declare module 'brfs/test/files/inline.js' { 269 | declare module.exports: $Exports<'brfs/test/files/inline'>; 270 | } 271 | declare module 'brfs/test/files/main.js' { 272 | declare module.exports: $Exports<'brfs/test/files/main'>; 273 | } 274 | declare module 'brfs/test/files/multi_var.js' { 275 | declare module.exports: $Exports<'brfs/test/files/multi_var'>; 276 | } 277 | declare module 'brfs/test/files/non_fs.js' { 278 | declare module.exports: $Exports<'brfs/test/files/non_fs'>; 279 | } 280 | declare module 'brfs/test/files/path_join_other_name.js' { 281 | declare module.exports: $Exports<'brfs/test/files/path_join_other_name'>; 282 | } 283 | declare module 'brfs/test/files/path_join_single_var.js' { 284 | declare module.exports: $Exports<'brfs/test/files/path_join_single_var'>; 285 | } 286 | declare module 'brfs/test/files/path_join.js' { 287 | declare module.exports: $Exports<'brfs/test/files/path_join'>; 288 | } 289 | declare module 'brfs/test/files/readdir-sync.js' { 290 | declare module.exports: $Exports<'brfs/test/files/readdir-sync'>; 291 | } 292 | declare module 'brfs/test/files/readdir.js' { 293 | declare module.exports: $Exports<'brfs/test/files/readdir'>; 294 | } 295 | declare module 'brfs/test/files/separators.js' { 296 | declare module.exports: $Exports<'brfs/test/files/separators'>; 297 | } 298 | declare module 'brfs/test/files/with_comments.js' { 299 | declare module.exports: $Exports<'brfs/test/files/with_comments'>; 300 | } 301 | declare module 'brfs/test/hoist.js' { 302 | declare module.exports: $Exports<'brfs/test/hoist'>; 303 | } 304 | declare module 'brfs/test/inline.js' { 305 | declare module.exports: $Exports<'brfs/test/inline'>; 306 | } 307 | declare module 'brfs/test/multi_var.js' { 308 | declare module.exports: $Exports<'brfs/test/multi_var'>; 309 | } 310 | declare module 'brfs/test/non_fs.js' { 311 | declare module.exports: $Exports<'brfs/test/non_fs'>; 312 | } 313 | declare module 'brfs/test/path_join_other_name.js' { 314 | declare module.exports: $Exports<'brfs/test/path_join_other_name'>; 315 | } 316 | declare module 'brfs/test/path_join_single_var.js' { 317 | declare module.exports: $Exports<'brfs/test/path_join_single_var'>; 318 | } 319 | declare module 'brfs/test/path_join.js' { 320 | declare module.exports: $Exports<'brfs/test/path_join'>; 321 | } 322 | declare module 'brfs/test/readdir.js' { 323 | declare module.exports: $Exports<'brfs/test/readdir'>; 324 | } 325 | declare module 'brfs/test/require_resolve.js' { 326 | declare module.exports: $Exports<'brfs/test/require_resolve'>; 327 | } 328 | declare module 'brfs/test/require_resolve/main.js' { 329 | declare module.exports: $Exports<'brfs/test/require_resolve/main'>; 330 | } 331 | declare module 'brfs/test/separators.js' { 332 | declare module.exports: $Exports<'brfs/test/separators'>; 333 | } 334 | declare module 'brfs/test/tr.js' { 335 | declare module.exports: $Exports<'brfs/test/tr'>; 336 | } 337 | declare module 'brfs/test/with_comments.js' { 338 | declare module.exports: $Exports<'brfs/test/with_comments'>; 339 | } 340 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-import_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: dbbde3c4d9b46061e1efcb8d1ad84dbf 2 | // flow-typed version: <>/eslint-plugin-import_v^2.8.0/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-import' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-import' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-import/config/electron' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-import/config/errors' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-import/config/react-native' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-import/config/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-import/config/recommended' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-import/config/stage-0' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-import/config/warnings' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-import/lib/core/importType' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-import/lib/core/staticRequire' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-import/lib/ExportMap' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-import/lib/importDeclaration' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-import/lib/index' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-import/lib/rules/default' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-import/lib/rules/export' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-import/lib/rules/exports-last' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-import/lib/rules/extensions' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-import/lib/rules/first' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-import/lib/rules/imports-first' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-import/lib/rules/max-dependencies' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-import/lib/rules/named' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-import/lib/rules/namespace' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-import/lib/rules/newline-after-import' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-import/lib/rules/no-amd' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-import/lib/rules/no-commonjs' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-import/lib/rules/no-deprecated' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-import/lib/rules/no-duplicates' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-import/lib/rules/no-named-default' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-import/lib/rules/no-namespace' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-import/lib/rules/no-unresolved' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-import/lib/rules/order' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-import/lib/rules/unambiguous' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'eslint-plugin-import/memo-parser/index' { 202 | declare module.exports: any; 203 | } 204 | 205 | // Filename aliases 206 | declare module 'eslint-plugin-import/config/electron.js' { 207 | declare module.exports: $Exports<'eslint-plugin-import/config/electron'>; 208 | } 209 | declare module 'eslint-plugin-import/config/errors.js' { 210 | declare module.exports: $Exports<'eslint-plugin-import/config/errors'>; 211 | } 212 | declare module 'eslint-plugin-import/config/react-native.js' { 213 | declare module.exports: $Exports<'eslint-plugin-import/config/react-native'>; 214 | } 215 | declare module 'eslint-plugin-import/config/react.js' { 216 | declare module.exports: $Exports<'eslint-plugin-import/config/react'>; 217 | } 218 | declare module 'eslint-plugin-import/config/recommended.js' { 219 | declare module.exports: $Exports<'eslint-plugin-import/config/recommended'>; 220 | } 221 | declare module 'eslint-plugin-import/config/stage-0.js' { 222 | declare module.exports: $Exports<'eslint-plugin-import/config/stage-0'>; 223 | } 224 | declare module 'eslint-plugin-import/config/warnings.js' { 225 | declare module.exports: $Exports<'eslint-plugin-import/config/warnings'>; 226 | } 227 | declare module 'eslint-plugin-import/lib/core/importType.js' { 228 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/importType'>; 229 | } 230 | declare module 'eslint-plugin-import/lib/core/staticRequire.js' { 231 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/staticRequire'>; 232 | } 233 | declare module 'eslint-plugin-import/lib/ExportMap.js' { 234 | declare module.exports: $Exports<'eslint-plugin-import/lib/ExportMap'>; 235 | } 236 | declare module 'eslint-plugin-import/lib/importDeclaration.js' { 237 | declare module.exports: $Exports<'eslint-plugin-import/lib/importDeclaration'>; 238 | } 239 | declare module 'eslint-plugin-import/lib/index.js' { 240 | declare module.exports: $Exports<'eslint-plugin-import/lib/index'>; 241 | } 242 | declare module 'eslint-plugin-import/lib/rules/default.js' { 243 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/default'>; 244 | } 245 | declare module 'eslint-plugin-import/lib/rules/export.js' { 246 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/export'>; 247 | } 248 | declare module 'eslint-plugin-import/lib/rules/exports-last.js' { 249 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/exports-last'>; 250 | } 251 | declare module 'eslint-plugin-import/lib/rules/extensions.js' { 252 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/extensions'>; 253 | } 254 | declare module 'eslint-plugin-import/lib/rules/first.js' { 255 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/first'>; 256 | } 257 | declare module 'eslint-plugin-import/lib/rules/imports-first.js' { 258 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/imports-first'>; 259 | } 260 | declare module 'eslint-plugin-import/lib/rules/max-dependencies.js' { 261 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/max-dependencies'>; 262 | } 263 | declare module 'eslint-plugin-import/lib/rules/named.js' { 264 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/named'>; 265 | } 266 | declare module 'eslint-plugin-import/lib/rules/namespace.js' { 267 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/namespace'>; 268 | } 269 | declare module 'eslint-plugin-import/lib/rules/newline-after-import.js' { 270 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/newline-after-import'>; 271 | } 272 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path.js' { 273 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-absolute-path'>; 274 | } 275 | declare module 'eslint-plugin-import/lib/rules/no-amd.js' { 276 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-amd'>; 277 | } 278 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export.js' { 279 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-anonymous-default-export'>; 280 | } 281 | declare module 'eslint-plugin-import/lib/rules/no-commonjs.js' { 282 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-commonjs'>; 283 | } 284 | declare module 'eslint-plugin-import/lib/rules/no-deprecated.js' { 285 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-deprecated'>; 286 | } 287 | declare module 'eslint-plugin-import/lib/rules/no-duplicates.js' { 288 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-duplicates'>; 289 | } 290 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require.js' { 291 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-dynamic-require'>; 292 | } 293 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies.js' { 294 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-extraneous-dependencies'>; 295 | } 296 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules.js' { 297 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-internal-modules'>; 298 | } 299 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports.js' { 300 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-mutable-exports'>; 301 | } 302 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member.js' { 303 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default-member'>; 304 | } 305 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default.js' { 306 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default'>; 307 | } 308 | declare module 'eslint-plugin-import/lib/rules/no-named-default.js' { 309 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-default'>; 310 | } 311 | declare module 'eslint-plugin-import/lib/rules/no-namespace.js' { 312 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-namespace'>; 313 | } 314 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules.js' { 315 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-nodejs-modules'>; 316 | } 317 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths.js' { 318 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-restricted-paths'>; 319 | } 320 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import.js' { 321 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unassigned-import'>; 322 | } 323 | declare module 'eslint-plugin-import/lib/rules/no-unresolved.js' { 324 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unresolved'>; 325 | } 326 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js' { 327 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-webpack-loader-syntax'>; 328 | } 329 | declare module 'eslint-plugin-import/lib/rules/order.js' { 330 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/order'>; 331 | } 332 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export.js' { 333 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/prefer-default-export'>; 334 | } 335 | declare module 'eslint-plugin-import/lib/rules/unambiguous.js' { 336 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/unambiguous'>; 337 | } 338 | declare module 'eslint-plugin-import/memo-parser/index.js' { 339 | declare module.exports: $Exports<'eslint-plugin-import/memo-parser/index'>; 340 | } 341 | -------------------------------------------------------------------------------- /flow-typed/npm/gl-matrix_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 209f8b11dcc5193540f891b284cbf2b7 2 | // flow-typed version: da30fe6876/gl-matrix_v2.x.x/flow_>=v0.25.x 3 | 4 | declare module "gl-matrix" { 5 | declare type Vec2 = [number, number]; 6 | 7 | declare type Vec3 = [number, number, number]; 8 | 9 | declare type Vec4 = [number, number, number, number]; 10 | 11 | declare type Quat = [number, number, number, number]; 12 | 13 | declare type Mat2d = [number, number, number, number, number, number]; 14 | 15 | declare type Mat2 = [number, number, number, number]; 16 | 17 | declare type Mat3 = [ 18 | number, 19 | number, 20 | number, 21 | number, 22 | number, 23 | number, 24 | number, 25 | number, 26 | number 27 | ]; 28 | 29 | declare type Mat4 = [ 30 | number, 31 | number, 32 | number, 33 | number, 34 | number, 35 | number, 36 | number, 37 | number, 38 | number, 39 | number, 40 | number, 41 | number, 42 | number, 43 | number, 44 | number, 45 | number 46 | ]; 47 | 48 | declare var vec2: { 49 | create(): Vec2, 50 | clone(a: Vec2): Vec2, 51 | fromValues(x: number, y: number): Vec2, 52 | copy(out: Vec2, a: Vec2): Vec2, 53 | set(out: Vec2, x: number, y: number): Vec2, 54 | add(out: Vec2, a: Vec2, b: Vec2): Vec2, 55 | subtract(out: Vec2, a: Vec2, b: Vec2): Vec2, 56 | sub(out: Vec2, a: Vec2, b: Vec2): Vec2, 57 | multiply(out: Vec2, a: Vec2, b: Vec2): Vec2, 58 | mul(out: Vec2, a: Vec2, b: Vec2): Vec2, 59 | divide(out: Vec2, a: Vec2, b: Vec2): Vec2, 60 | div(out: Vec2, a: Vec2, b: Vec2): Vec2, 61 | ceil(out: Vec2, a: Vec2): Vec2, 62 | floor(out: Vec2, a: Vec2): Vec2, 63 | min(out: Vec2, a: Vec2, b: Vec2): Vec2, 64 | max(out: Vec2, a: Vec2, b: Vec2): Vec2, 65 | round(out: Vec2, a: Vec2): Vec2, 66 | scale(out: Vec2, a: Vec2, b: number): Vec2, 67 | scaleAndAdd(out: Vec2, a: Vec2, b: Vec2, scale: number): Vec2, 68 | distance(a: Vec2, b: Vec2): number, 69 | dist(a: Vec2, b: Vec2): number, 70 | squaredDistance(a: Vec2, b: Vec2): number, 71 | sqrDist(a: Vec2, b: Vec2): number, 72 | length(a: Vec2): number, 73 | len(a: Vec2): number, 74 | squaredLength(a: Vec2): number, 75 | sqrLen(a: Vec2): number, 76 | negate(out: Vec2, a: Vec2): Vec2, 77 | inverse(out: Vec2, a: Vec2): Vec2, 78 | normalize(out: Vec2, a: Vec2): Vec2, 79 | dot(a: Vec2, b: Vec2): number, 80 | cross(out: Vec3, a: Vec2, b: Vec2): Vec3, 81 | lerp(out: Vec2, a: Vec2, b: Vec2, t: number): Vec2, 82 | random(out: Vec2, scale?: number): Vec2, 83 | transformMat2(out: Vec2, a: Vec2, m: Mat2): Vec2, 84 | transformMat2d(out: Vec2, a: Vec2, m: Mat2d): Vec2, 85 | transformMat3(out: Vec2, a: Vec2, m: Mat3): Vec2, 86 | transformMat4(out: Vec2, a: Vec2, m: Mat4): Vec2, 87 | str(a: Vec2): string, 88 | exactEquals(a: Vec2, b: Vec2): boolean, 89 | equals(a: Vec2, b: Vec2): boolean 90 | }; 91 | 92 | declare var vec3: { 93 | create(): Vec3, 94 | clone(a: Vec3): Vec3, 95 | fromValues(x: number, y: number, z: number): Vec3, 96 | copy(out: Vec3, a: Vec3): Vec3, 97 | set(out: Vec3, x: number, y: number, z: number): Vec3, 98 | add(out: Vec3, a: Vec3, b: Vec3): Vec3, 99 | subtract(out: Vec3, a: Vec3, b: Vec3): Vec3, 100 | sub(out: Vec3, a: Vec3, b: Vec3): Vec3, 101 | multiply(out: Vec3, a: Vec3, b: Vec3): Vec3, 102 | mul(out: Vec3, a: Vec3, b: Vec3): Vec3, 103 | divide(out: Vec3, a: Vec3, b: Vec3): Vec3, 104 | div(out: Vec3, a: Vec3, b: Vec3): Vec3, 105 | ceil(out: Vec3, a: Vec3): Vec3, 106 | floor(out: Vec3, a: Vec3): Vec3, 107 | min(out: Vec3, a: Vec3, b: Vec3): Vec3, 108 | max(out: Vec3, a: Vec3, b: Vec3): Vec3, 109 | round(out: Vec3, a: Vec3): Vec3, 110 | scale(out: Vec3, a: Vec3, b: number): Vec3, 111 | scaleAndAdd(out: Vec3, a: Vec3, b: Vec3, scale: number): Vec3, 112 | distance(a: Vec3, b: Vec3): number, 113 | dist(a: Vec3, b: Vec3): number, 114 | squaredDistance(a: Vec3, b: Vec3): number, 115 | sqrDist(a: Vec3, b: Vec3): number, 116 | length(a: Vec3): number, 117 | len(a: Vec3): number, 118 | squaredLength(a: Vec3): number, 119 | sqrLen(a: Vec3): number, 120 | negate(out: Vec3, a: Vec3): Vec3, 121 | inverse(out: Vec3, a: Vec3): Vec3, 122 | normalize(out: Vec3, a: Vec3): Vec3, 123 | dot(a: Vec3, b: Vec3): number, 124 | cross(out: Vec3, a: Vec3, b: Vec3): Vec3, 125 | lerp(out: Vec3, a: Vec3, b: Vec3, t: number): Vec3, 126 | hermite(out: Vec3, a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: number): Vec3, 127 | bezier(out: Vec3, a: Vec3, b: Vec3, c: Vec3, d: Vec3, t: number): Vec3, 128 | random(out: Vec3, scale?: number): Vec3, 129 | transformMat4(out: Vec3, a: Vec3, m: Mat4): Vec3, 130 | transformMat3(out: Vec3, a: Vec3, m: Mat4): Vec3, 131 | transformQuat(out: Vec3, a: Vec3, q: Quat): Vec3, 132 | rotateX(out: Vec3, a: Vec3, b: Vec3, c: number): Vec3, 133 | rotateY(out: Vec3, a: Vec3, b: Vec3, c: number): Vec3, 134 | rotateZ(out: Vec3, a: Vec3, b: Vec3, c: number): Vec3, 135 | forEach( 136 | arr: Array, 137 | stride: number, 138 | offset: number, 139 | count: number, 140 | fn: (a: Vec3, arg: T) => U, 141 | arg: T 142 | ): Array, 143 | angle(a: Vec3, b: Vec3): number, 144 | str(a: Vec3): string, 145 | exactEquals(a: Vec3, b: Vec3): boolean, 146 | equals(a: Vec3, b: Vec3): boolean 147 | }; 148 | 149 | declare var vec4: { 150 | create(): Vec4, 151 | clone(a: Vec4): Vec4, 152 | fromValues(x: number, y: number, z: number, w: number): Vec4, 153 | copy(out: Vec4, a: Vec4): Vec4, 154 | set(out: Vec4, x: number, y: number, z: number, w: number): Vec4, 155 | add(out: Vec4, a: Vec4, b: Vec4): Vec4, 156 | subtract(out: Vec4, a: Vec4, b: Vec4): Vec4, 157 | sub(out: Vec4, a: Vec4, b: Vec4): Vec4, 158 | multiply(out: Vec4, a: Vec4, b: Vec4): Vec4, 159 | mul(out: Vec4, a: Vec4, b: Vec4): Vec4, 160 | divide(out: Vec4, a: Vec4, b: Vec4): Vec4, 161 | div(out: Vec4, a: Vec4, b: Vec4): Vec4, 162 | ceil(out: Vec4, a: Vec4): Vec4, 163 | floor(out: Vec4, a: Vec4): Vec4, 164 | min(out: Vec4, a: Vec4, b: Vec4): Vec4, 165 | max(out: Vec4, a: Vec4, b: Vec4): Vec4, 166 | round(out: Vec4, a: Vec4): Vec4, 167 | scale(out: Vec4, a: Vec4, b: number): Vec4, 168 | scaleAndAdd(out: Vec4, a: Vec4, b: Vec4, scale: number): Vec4, 169 | distance(a: Vec4, b: Vec4): number, 170 | dist(a: Vec4, b: Vec4): number, 171 | squaredDistance(a: Vec4, b: Vec4): number, 172 | sqrDist(a: Vec4, b: Vec4): number, 173 | length(a: Vec4): number, 174 | len(a: Vec4): number, 175 | squaredLength(a: Vec4): number, 176 | sqrLen(a: Vec4): number, 177 | negate(out: Vec4, a: Vec4): Vec4, 178 | inverse(out: Vec4, a: Vec4): Vec4, 179 | normalize(out: Vec4, a: Vec4): Vec4, 180 | dot(a: Vec4, b: Vec4): number, 181 | lerp(out: Vec4, a: Vec4, b: Vec4, t: number): Vec4, 182 | random(out: Vec4, scale?: number): Vec4, 183 | transformMat4(out: Vec4, a: Vec4, m: Mat4): Vec4, 184 | transformQuat(out: Vec4, a: Vec4, q: Quat): Vec4, 185 | str(a: Vec4): string, 186 | exactEquals(a: Vec4, b: Vec4): boolean, 187 | equals(a: Vec4, b: Vec4): boolean 188 | }; 189 | 190 | declare var quat: { 191 | create(): Quat, 192 | rotationTo(out: Quat, a: Vec3, b: Vec3): Quat, 193 | setAxes(out: Quat, view: Vec3, right: Vec3, up: Vec3): Quat, 194 | clone(a: Quat): Quat, 195 | fromValues(x: number, y: number, z: number, w: number): Quat, 196 | copy(out: Quat, a: Quat): Quat, 197 | set(out: Quat, x: number, y: number, z: number, w: number): Quat, 198 | identity(out: Quat): Quat, 199 | setAxisAngle(out: Quat, axis: Vec3, rad: number): Quat, 200 | getAxisAngle(out_axis: Vec3, q: Quat): number, 201 | add(out: Quat, a: Quat, b: Quat): Quat, 202 | multiply(out: Quat, a: Quat, b: Quat): Quat, 203 | mul(out: Quat, a: Quat, b: Quat): Quat, 204 | scale(out: Quat, a: Quat, b: number): Quat, 205 | rotateX(out: Quat, a: Quat, rad: number): Quat, 206 | rotateY(out: Quat, a: Quat, rad: number): Quat, 207 | rotateZ(out: Quat, a: Quat, rad: number): Quat, 208 | calculateW(out: Quat, a: Quat): Quat, 209 | dot(a: Quat, b: Quat): number, 210 | lerp(out: Quat, a: Quat, b: Quat, t: number): Quat, 211 | slerp(out: Quat, a: Quat, b: Quat, t: number): Quat, 212 | sqlerp(out: Quat, a: Quat, b: Quat, d: Quat, d: Quat, t: number): Quat, 213 | invert(out: Quat, a: Quat): Quat, 214 | conjugate(out: Quat, a: Quat): Quat, 215 | length(a: Quat): number, 216 | len(a: Quat): number, 217 | squaredLength(a: Quat): number, 218 | sqrLen(a: Quat): number, 219 | normalize(out: Quat, a: Quat): Quat, 220 | fromMat3(out: Quat, m: Mat3): Quat, 221 | str(a: Quat): string, 222 | exactEquals(a: Quat, b: Quat): boolean, 223 | equals(a: Quat, b: Quat): boolean 224 | }; 225 | 226 | declare var mat2: { 227 | create(): Mat2, 228 | clone(a: Mat2): Mat2, 229 | copy(out: Mat2, a: Mat2): Mat2, 230 | identity(out: Mat2): Mat2, 231 | fromValues(m00: number, m01: number, m10: number, m11: number): Mat2, 232 | set(out: Mat2, m00: number, m01: number, m10: number, m11: number): Mat2, 233 | transpose(out: Mat2, a: Mat2): Mat2, 234 | invert(out: Mat2, a: Mat2): Mat2, 235 | adjoint(out: Mat2, a: Mat2): Mat2, 236 | determinant(a: Mat2): number, 237 | multiply(out: Mat2, a: Mat2, b: Mat2): Mat2, 238 | mul(out: Mat2, a: Mat2, b: Mat2): Mat2, 239 | rotate(out: Mat2, a: Mat2, rad: number): Mat2, 240 | scale(out: Mat2, a: Mat2, v: Vec2): Mat2, 241 | fromRotation(out: Mat2, rad: number): Mat2, 242 | fromScaling(out: Mat2, v: Vec2): Mat2, 243 | str(a: Mat2): string, 244 | frob(a: Mat2): number, 245 | LDU(L: Mat2, D: Mat2, U: Mat2, a: Mat2): [Mat2, Mat2, Mat2], 246 | add(out: Mat2, a: Mat2, b: Mat2): Mat2, 247 | subtract(out: Mat2, a: Mat2, b: Mat2): Mat2, 248 | sub(out: Mat2, a: Mat2, b: Mat2): Mat2, 249 | exactEquals(a: Mat2, b: Mat2): boolean, 250 | equals(a: Mat2, b: Mat2): boolean, 251 | multiplyScalar(out: Mat2, a: Mat2, b: number): Mat2, 252 | multiplyScalarAndAdd(out: Mat2, a: Mat2, b: Mat2, scale: number): Mat2 253 | }; 254 | 255 | declare var mat2d: { 256 | create(): Mat2d, 257 | clone(a: Mat2d): Mat2d, 258 | copy(out: Mat2d, a: Mat2d): Mat2d, 259 | identity(out: Mat2d): Mat2d, 260 | fromValues( 261 | a: number, 262 | b: number, 263 | c: number, 264 | d: number, 265 | tx: number, 266 | ty: number 267 | ): Mat2d, 268 | set( 269 | out: Mat2d, 270 | a: number, 271 | b: number, 272 | c: number, 273 | d: number, 274 | tx: number, 275 | ty: number 276 | ): Mat2d, 277 | invert(out: Mat2d, a: Mat2d): Mat2d, 278 | determinant(a: Mat2d): number, 279 | multiply(out: Mat2d, a: Mat2d, b: Mat2d): Mat2d, 280 | mul(out: Mat2d, a: Mat2d, b: Mat2d): Mat2d, 281 | rotate(out: Mat2d, a: Mat2d, rad: number): Mat2d, 282 | scale(out: Mat2d, a: Mat2d, v: Vec2): Mat2d, 283 | translate(out: Mat2d, a: Mat2d, v: Vec2): Mat2d, 284 | fromRotation(out: Mat2d, rad: number): Mat2d, 285 | fromScaling(out: Mat2d, v: Vec2): Mat2d, 286 | fromTranslation(out: Mat2d, v: Vec2): Mat2d, 287 | str(a: Mat2d): string, 288 | frob(a: Mat2d): number, 289 | add(out: Mat2d, a: Mat2d, b: Mat2d): Mat2d, 290 | subtract(out: Mat2d, a: Mat2d, b: Mat2d): Mat2d, 291 | sub(out: Mat2d, a: Mat2d, b: Mat2d): Mat2d, 292 | multiplyScalar(out: Mat2d, a: Mat2d, b: number): Mat2d, 293 | multiplyScalarAndAdd(out: Mat2d, a: Mat2d, b: Mat2d, scale: number): Mat2d, 294 | exactEquals(a: Mat2d, b: Mat2d): boolean, 295 | equals(a: Mat2d, b: Mat2d): boolean 296 | }; 297 | 298 | declare var mat3: { 299 | create(): Mat3, 300 | fromMat4(out: Mat3, a: Mat4): Mat3, 301 | clone(a: Mat3): Mat3, 302 | copy(out: Mat3, a: Mat3): Mat3, 303 | fromValues( 304 | m00: number, 305 | m01: number, 306 | m02: number, 307 | m10: number, 308 | m11: number, 309 | m12: number, 310 | m20: number, 311 | m21: number, 312 | m22: number 313 | ): Mat3, 314 | set( 315 | out: Mat3, 316 | m00: number, 317 | m01: number, 318 | m02: number, 319 | m10: number, 320 | m11: number, 321 | m12: number, 322 | m20: number, 323 | m21: number, 324 | m22: number 325 | ): Mat3, 326 | identity(out: Mat3): Mat3, 327 | transpose(out: Mat3, a: Mat3): Mat3, 328 | invert(out: Mat3, a: Mat3): Mat3, 329 | adjoint(out: Mat3, a: Mat3): Mat3, 330 | determinant(a: Mat3): number, 331 | multiply(out: Mat3, a: Mat3, b: Mat3): Mat3, 332 | mul(out: Mat3, a: Mat3, b: Mat3): Mat3, 333 | translate(out: Mat3, a: Mat3, v: Vec2): Mat3, 334 | rotate(out: Mat3, a: Mat3, rad: number): Mat3, 335 | scale(out: Mat3, a: Mat3, v: Vec2): Mat3, 336 | fromTranslation(out: Mat3, v: Vec2): Mat3, 337 | fromRotation(out: Mat3, rad: number): Mat3, 338 | fromScaling(out: Mat3, v: Vec2): Mat3, 339 | fromMat2d(out: Mat3, a: Mat2d): Mat3, 340 | fromQuat(out: Mat3, q: Quat): Mat3, 341 | normalFromMat4(out: Mat3, a: Mat4): Mat3, 342 | str(a: Mat3): string, 343 | frob(a: Mat3): number, 344 | add(out: Mat3, a: Mat3, b: Mat3): Mat3, 345 | subtract(out: Mat3, a: Mat3, b: Mat3): Mat3, 346 | sub(out: Mat3, a: Mat3, b: Mat3): Mat3, 347 | multiplyScalar(out: Mat3, a: Mat3, b: number): Mat3, 348 | multiplyScalarAndAdd(out: Mat3, a: Mat3, b: Mat3, scale: number): Mat3, 349 | exactEquals(a: Mat3, b: Mat3): boolean, 350 | equals(a: Mat3, b: Mat3): boolean 351 | }; 352 | 353 | declare var mat4: { 354 | create(): Mat4, 355 | clone(a: Mat4): Mat4, 356 | copy(out: Mat4, a: Mat4): Mat4, 357 | fromValues( 358 | m00: number, 359 | m01: number, 360 | m02: number, 361 | m03: number, 362 | m10: number, 363 | m11: number, 364 | m12: number, 365 | m13: number, 366 | m20: number, 367 | m21: number, 368 | m22: number, 369 | m23: number, 370 | m30: number, 371 | m31: number, 372 | m32: number, 373 | m33: number 374 | ): Mat4, 375 | set( 376 | out: Mat4, 377 | m00: number, 378 | m01: number, 379 | m02: number, 380 | m03: number, 381 | m10: number, 382 | m11: number, 383 | m12: number, 384 | m13: number, 385 | m20: number, 386 | m21: number, 387 | m22: number, 388 | m23: number, 389 | m30: number, 390 | m31: number, 391 | m32: number, 392 | m33: number 393 | ): Mat4, 394 | identity(out: Mat4): Mat4, 395 | determinant(a: Mat4): number, 396 | rotate(out: Mat4, a: Mat4, rad: number, axis: Vec3): Mat4, 397 | fromTranslation(out: Mat4, v: Vec3): Mat4, 398 | fromScaling(out: Mat4, v: Vec3): Mat4, 399 | fromRotation(out: Mat4, rad: number, axis: Vec3): Mat4, 400 | fromXRotation(out: Mat4, rad: number): Mat4, 401 | fromYRotation(out: Mat4, rad: number): Mat4, 402 | fromZRotation(out: Mat4, rad: number): Mat4, 403 | fromRotationTranslation(out: Mat4, q: Quat, v: Vec3): Mat4, 404 | getTranslation(out: Vec3, mat: Mat4): Vec3, 405 | getScaling(out: Vec3, mat: Mat4): Vec3, 406 | getRotation(out: Quat, mat: Mat4): Quat, 407 | fromRotationTranslationScale(out: Mat4, q: Quat, v: Vec3, s: Vec3): Mat4, 408 | fromRotationTranslationScaleOrigin( 409 | out: Mat4, 410 | q: Quat, 411 | v: Vec3, 412 | s: Vec3, 413 | o: Vec3 414 | ): Mat4, 415 | fromQuat(out: Mat4, q: Quat): Mat4, 416 | frustum( 417 | out: Mat4, 418 | left: number, 419 | right: number, 420 | bottom: number, 421 | top: number, 422 | near: number, 423 | far: number 424 | ): Mat4, 425 | perspective( 426 | out: Mat4, 427 | fovy: number, 428 | aspect: number, 429 | near: number, 430 | far: number 431 | ): Mat4, 432 | perspectiveFromFieldOfView( 433 | out: Mat4, 434 | fov: { 435 | upDegrees: number, 436 | downDegrees: number, 437 | leftDegrees: number, 438 | rightDegrees: number 439 | }, 440 | near: number, 441 | far: number 442 | ): Mat4, 443 | ortho( 444 | out: Mat4, 445 | left: number, 446 | right: number, 447 | bottom: number, 448 | top: number, 449 | near: number, 450 | far: number 451 | ): Mat4, 452 | lookAt(out: Mat4, eye: Vec3, center: Vec3, up: Vec3): Mat4, 453 | str(a: Mat4): string, 454 | frob(a: Mat4): number, 455 | add(out: Mat4, a: Mat4, b: Mat4): Mat4, 456 | subtract(out: Mat4, a: Mat4, b: Mat4): Mat4, 457 | sub(out: Mat4, a: Mat4, b: Mat4): Mat4, 458 | mul(out: Mat4, a: Mat4, b: Mat4): Mat4, 459 | multiplyScalar(out: Mat4, a: Mat4, b: number): Mat4, 460 | multiplyScalarAndAdd(out: Mat4, a: Mat4, b: Mat4, scale: number): Mat4, 461 | exactEquals(a: Mat4, b: Mat4): boolean, 462 | equals(a: Mat4, b: Mat4): boolean, 463 | 464 | transpose(out: Mat4, a: Mat4): Mat4, 465 | invert(out: Mat4, a: Mat4): Mat4, 466 | adjoint(out: Mat4, a: Mat4): Mat4, 467 | multiply(out: Mat4, a: Mat4, b: Mat4): Mat4, 468 | translate(out: Mat4, a: Mat4, v: Vec3): Mat4, 469 | scale(out: Mat4, a: Mat4, v: Vec3): Mat4, 470 | rotateX(out: Mat4, a: Mat4, rad: number): Mat4, 471 | rotateY(out: Mat4, a: Mat4, rad: number): Mat4, 472 | rotateZ(out: Mat4, a: Mat4, rad: number): Mat4, 473 | 474 | SIMD: { 475 | transpose(out: Mat4, a: Mat4): Mat4, 476 | invert(out: Mat4, a: Mat4): Mat4, 477 | adjoint(out: Mat4, a: Mat4): Mat4, 478 | multiply(out: Mat4, a: Mat4, b: Mat4): Mat4, 479 | translate(out: Mat4, a: Mat4, v: Vec3): Mat4, 480 | scale(out: Mat4, a: Mat4, v: Vec3): Mat4, 481 | rotateX(out: Mat4, a: Mat4, rad: number): Mat4, 482 | rotateY(out: Mat4, a: Mat4, rad: number): Mat4, 483 | rotateZ(out: Mat4, a: Mat4, rad: number): Mat4 484 | }, 485 | 486 | scalar: { 487 | transpose(out: Mat4, a: Mat4): Mat4, 488 | invert(out: Mat4, a: Mat4): Mat4, 489 | adjoint(out: Mat4, a: Mat4): Mat4, 490 | multiply(out: Mat4, a: Mat4, b: Mat4): Mat4, 491 | translate(out: Mat4, a: Mat4, v: Vec3): Mat4, 492 | scale(out: Mat4, a: Mat4, v: Vec3): Mat4, 493 | rotateX(out: Mat4, a: Mat4, rad: number): Mat4, 494 | rotateY(out: Mat4, a: Mat4, rad: number): Mat4, 495 | rotateZ(out: Mat4, a: Mat4, rad: number): Mat4 496 | } 497 | }; 498 | } 499 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e6af7b36d0383dfcfbc59f9a5be62b29 2 | // flow-typed version: <>/eslint-plugin-react_v^7.6.1/flow_v0.52.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-react' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-react' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-react/lib/rules/boolean-prop-naming' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-react/lib/rules/button-has-type' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-react/lib/rules/default-props-match-prop-types' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-react/lib/rules/destructuring-assignment' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-react/lib/rules/display-name' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-react/lib/rules/forbid-component-props' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-react/lib/rules/forbid-dom-props' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-react/lib/rules/forbid-elements' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-react/lib/rules/forbid-foreign-prop-types' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-react/lib/rules/forbid-prop-types' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-react/lib/rules/jsx-boolean-value' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-react/lib/rules/jsx-child-element-spacing' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-react/lib/rules/jsx-closing-bracket-location' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-react/lib/rules/jsx-closing-tag-location' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-react/lib/rules/jsx-curly-brace-presence' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-react/lib/rules/jsx-curly-spacing' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-react/lib/rules/jsx-equals-spacing' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-react/lib/rules/jsx-filename-extension' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-react/lib/rules/jsx-first-prop-new-line' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-react/lib/rules/jsx-handler-names' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-react/lib/rules/jsx-indent-props' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-react/lib/rules/jsx-indent' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-react/lib/rules/jsx-key' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-react/lib/rules/jsx-max-props-per-line' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-react/lib/rules/jsx-no-bind' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-react/lib/rules/jsx-no-comment-textnodes' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-react/lib/rules/jsx-no-duplicate-props' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-react/lib/rules/jsx-no-literals' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-react/lib/rules/jsx-no-target-blank' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-react/lib/rules/jsx-no-undef' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-react/lib/rules/jsx-one-expression-per-line' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-react/lib/rules/jsx-pascal-case' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-react/lib/rules/jsx-sort-default-props' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-react/lib/rules/jsx-sort-props' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-react/lib/rules/jsx-space-before-closing' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-react/lib/rules/jsx-tag-spacing' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-react' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-vars' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-react/lib/rules/jsx-wrap-multilines' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-react/lib/rules/no-access-state-in-setstate' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-react/lib/rules/no-array-index-key' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-react/lib/rules/no-children-prop' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-react/lib/rules/no-danger-with-children' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-react/lib/rules/no-danger' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'eslint-plugin-react/lib/rules/no-deprecated' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'eslint-plugin-react/lib/rules/no-did-mount-set-state' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'eslint-plugin-react/lib/rules/no-did-update-set-state' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'eslint-plugin-react/lib/rules/no-direct-mutation-state' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'eslint-plugin-react/lib/rules/no-find-dom-node' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'eslint-plugin-react/lib/rules/no-is-mounted' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'eslint-plugin-react/lib/rules/no-multi-comp' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module 'eslint-plugin-react/lib/rules/no-redundant-should-component-update' { 230 | declare module.exports: any; 231 | } 232 | 233 | declare module 'eslint-plugin-react/lib/rules/no-render-return-value' { 234 | declare module.exports: any; 235 | } 236 | 237 | declare module 'eslint-plugin-react/lib/rules/no-set-state' { 238 | declare module.exports: any; 239 | } 240 | 241 | declare module 'eslint-plugin-react/lib/rules/no-string-refs' { 242 | declare module.exports: any; 243 | } 244 | 245 | declare module 'eslint-plugin-react/lib/rules/no-this-in-sfc' { 246 | declare module.exports: any; 247 | } 248 | 249 | declare module 'eslint-plugin-react/lib/rules/no-typos' { 250 | declare module.exports: any; 251 | } 252 | 253 | declare module 'eslint-plugin-react/lib/rules/no-unescaped-entities' { 254 | declare module.exports: any; 255 | } 256 | 257 | declare module 'eslint-plugin-react/lib/rules/no-unknown-property' { 258 | declare module.exports: any; 259 | } 260 | 261 | declare module 'eslint-plugin-react/lib/rules/no-unused-prop-types' { 262 | declare module.exports: any; 263 | } 264 | 265 | declare module 'eslint-plugin-react/lib/rules/no-unused-state' { 266 | declare module.exports: any; 267 | } 268 | 269 | declare module 'eslint-plugin-react/lib/rules/no-will-update-set-state' { 270 | declare module.exports: any; 271 | } 272 | 273 | declare module 'eslint-plugin-react/lib/rules/prefer-es6-class' { 274 | declare module.exports: any; 275 | } 276 | 277 | declare module 'eslint-plugin-react/lib/rules/prefer-stateless-function' { 278 | declare module.exports: any; 279 | } 280 | 281 | declare module 'eslint-plugin-react/lib/rules/prop-types' { 282 | declare module.exports: any; 283 | } 284 | 285 | declare module 'eslint-plugin-react/lib/rules/react-in-jsx-scope' { 286 | declare module.exports: any; 287 | } 288 | 289 | declare module 'eslint-plugin-react/lib/rules/require-default-props' { 290 | declare module.exports: any; 291 | } 292 | 293 | declare module 'eslint-plugin-react/lib/rules/require-optimization' { 294 | declare module.exports: any; 295 | } 296 | 297 | declare module 'eslint-plugin-react/lib/rules/require-render-return' { 298 | declare module.exports: any; 299 | } 300 | 301 | declare module 'eslint-plugin-react/lib/rules/self-closing-comp' { 302 | declare module.exports: any; 303 | } 304 | 305 | declare module 'eslint-plugin-react/lib/rules/sort-comp' { 306 | declare module.exports: any; 307 | } 308 | 309 | declare module 'eslint-plugin-react/lib/rules/sort-prop-types' { 310 | declare module.exports: any; 311 | } 312 | 313 | declare module 'eslint-plugin-react/lib/rules/style-prop-object' { 314 | declare module.exports: any; 315 | } 316 | 317 | declare module 'eslint-plugin-react/lib/rules/void-dom-elements-no-children' { 318 | declare module.exports: any; 319 | } 320 | 321 | declare module 'eslint-plugin-react/lib/util/annotations' { 322 | declare module.exports: any; 323 | } 324 | 325 | declare module 'eslint-plugin-react/lib/util/ast' { 326 | declare module.exports: any; 327 | } 328 | 329 | declare module 'eslint-plugin-react/lib/util/Components' { 330 | declare module.exports: any; 331 | } 332 | 333 | declare module 'eslint-plugin-react/lib/util/docsUrl' { 334 | declare module.exports: any; 335 | } 336 | 337 | declare module 'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket' { 338 | declare module.exports: any; 339 | } 340 | 341 | declare module 'eslint-plugin-react/lib/util/makeNoMethodSetStateRule' { 342 | declare module.exports: any; 343 | } 344 | 345 | declare module 'eslint-plugin-react/lib/util/pragma' { 346 | declare module.exports: any; 347 | } 348 | 349 | declare module 'eslint-plugin-react/lib/util/props' { 350 | declare module.exports: any; 351 | } 352 | 353 | declare module 'eslint-plugin-react/lib/util/variable' { 354 | declare module.exports: any; 355 | } 356 | 357 | declare module 'eslint-plugin-react/lib/util/version' { 358 | declare module.exports: any; 359 | } 360 | 361 | // Filename aliases 362 | declare module 'eslint-plugin-react/index' { 363 | declare module.exports: $Exports<'eslint-plugin-react'>; 364 | } 365 | declare module 'eslint-plugin-react/index.js' { 366 | declare module.exports: $Exports<'eslint-plugin-react'>; 367 | } 368 | declare module 'eslint-plugin-react/lib/rules/boolean-prop-naming.js' { 369 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/boolean-prop-naming'>; 370 | } 371 | declare module 'eslint-plugin-react/lib/rules/button-has-type.js' { 372 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/button-has-type'>; 373 | } 374 | declare module 'eslint-plugin-react/lib/rules/default-props-match-prop-types.js' { 375 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/default-props-match-prop-types'>; 376 | } 377 | declare module 'eslint-plugin-react/lib/rules/destructuring-assignment.js' { 378 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/destructuring-assignment'>; 379 | } 380 | declare module 'eslint-plugin-react/lib/rules/display-name.js' { 381 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/display-name'>; 382 | } 383 | declare module 'eslint-plugin-react/lib/rules/forbid-component-props.js' { 384 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-component-props'>; 385 | } 386 | declare module 'eslint-plugin-react/lib/rules/forbid-dom-props.js' { 387 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-dom-props'>; 388 | } 389 | declare module 'eslint-plugin-react/lib/rules/forbid-elements.js' { 390 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-elements'>; 391 | } 392 | declare module 'eslint-plugin-react/lib/rules/forbid-foreign-prop-types.js' { 393 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-foreign-prop-types'>; 394 | } 395 | declare module 'eslint-plugin-react/lib/rules/forbid-prop-types.js' { 396 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-prop-types'>; 397 | } 398 | declare module 'eslint-plugin-react/lib/rules/jsx-boolean-value.js' { 399 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-boolean-value'>; 400 | } 401 | declare module 'eslint-plugin-react/lib/rules/jsx-child-element-spacing.js' { 402 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-child-element-spacing'>; 403 | } 404 | declare module 'eslint-plugin-react/lib/rules/jsx-closing-bracket-location.js' { 405 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-closing-bracket-location'>; 406 | } 407 | declare module 'eslint-plugin-react/lib/rules/jsx-closing-tag-location.js' { 408 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-closing-tag-location'>; 409 | } 410 | declare module 'eslint-plugin-react/lib/rules/jsx-curly-brace-presence.js' { 411 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-curly-brace-presence'>; 412 | } 413 | declare module 'eslint-plugin-react/lib/rules/jsx-curly-spacing.js' { 414 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-curly-spacing'>; 415 | } 416 | declare module 'eslint-plugin-react/lib/rules/jsx-equals-spacing.js' { 417 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-equals-spacing'>; 418 | } 419 | declare module 'eslint-plugin-react/lib/rules/jsx-filename-extension.js' { 420 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-filename-extension'>; 421 | } 422 | declare module 'eslint-plugin-react/lib/rules/jsx-first-prop-new-line.js' { 423 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-first-prop-new-line'>; 424 | } 425 | declare module 'eslint-plugin-react/lib/rules/jsx-handler-names.js' { 426 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-handler-names'>; 427 | } 428 | declare module 'eslint-plugin-react/lib/rules/jsx-indent-props.js' { 429 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-indent-props'>; 430 | } 431 | declare module 'eslint-plugin-react/lib/rules/jsx-indent.js' { 432 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-indent'>; 433 | } 434 | declare module 'eslint-plugin-react/lib/rules/jsx-key.js' { 435 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-key'>; 436 | } 437 | declare module 'eslint-plugin-react/lib/rules/jsx-max-props-per-line.js' { 438 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-max-props-per-line'>; 439 | } 440 | declare module 'eslint-plugin-react/lib/rules/jsx-no-bind.js' { 441 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-bind'>; 442 | } 443 | declare module 'eslint-plugin-react/lib/rules/jsx-no-comment-textnodes.js' { 444 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-comment-textnodes'>; 445 | } 446 | declare module 'eslint-plugin-react/lib/rules/jsx-no-duplicate-props.js' { 447 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-duplicate-props'>; 448 | } 449 | declare module 'eslint-plugin-react/lib/rules/jsx-no-literals.js' { 450 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-literals'>; 451 | } 452 | declare module 'eslint-plugin-react/lib/rules/jsx-no-target-blank.js' { 453 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-target-blank'>; 454 | } 455 | declare module 'eslint-plugin-react/lib/rules/jsx-no-undef.js' { 456 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-undef'>; 457 | } 458 | declare module 'eslint-plugin-react/lib/rules/jsx-one-expression-per-line.js' { 459 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-one-expression-per-line'>; 460 | } 461 | declare module 'eslint-plugin-react/lib/rules/jsx-pascal-case.js' { 462 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-pascal-case'>; 463 | } 464 | declare module 'eslint-plugin-react/lib/rules/jsx-sort-default-props.js' { 465 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-sort-default-props'>; 466 | } 467 | declare module 'eslint-plugin-react/lib/rules/jsx-sort-props.js' { 468 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-sort-props'>; 469 | } 470 | declare module 'eslint-plugin-react/lib/rules/jsx-space-before-closing.js' { 471 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-space-before-closing'>; 472 | } 473 | declare module 'eslint-plugin-react/lib/rules/jsx-tag-spacing.js' { 474 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-tag-spacing'>; 475 | } 476 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-react.js' { 477 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-uses-react'>; 478 | } 479 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-vars.js' { 480 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-uses-vars'>; 481 | } 482 | declare module 'eslint-plugin-react/lib/rules/jsx-wrap-multilines.js' { 483 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-wrap-multilines'>; 484 | } 485 | declare module 'eslint-plugin-react/lib/rules/no-access-state-in-setstate.js' { 486 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-access-state-in-setstate'>; 487 | } 488 | declare module 'eslint-plugin-react/lib/rules/no-array-index-key.js' { 489 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-array-index-key'>; 490 | } 491 | declare module 'eslint-plugin-react/lib/rules/no-children-prop.js' { 492 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-children-prop'>; 493 | } 494 | declare module 'eslint-plugin-react/lib/rules/no-danger-with-children.js' { 495 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-danger-with-children'>; 496 | } 497 | declare module 'eslint-plugin-react/lib/rules/no-danger.js' { 498 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-danger'>; 499 | } 500 | declare module 'eslint-plugin-react/lib/rules/no-deprecated.js' { 501 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-deprecated'>; 502 | } 503 | declare module 'eslint-plugin-react/lib/rules/no-did-mount-set-state.js' { 504 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-did-mount-set-state'>; 505 | } 506 | declare module 'eslint-plugin-react/lib/rules/no-did-update-set-state.js' { 507 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-did-update-set-state'>; 508 | } 509 | declare module 'eslint-plugin-react/lib/rules/no-direct-mutation-state.js' { 510 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-direct-mutation-state'>; 511 | } 512 | declare module 'eslint-plugin-react/lib/rules/no-find-dom-node.js' { 513 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-find-dom-node'>; 514 | } 515 | declare module 'eslint-plugin-react/lib/rules/no-is-mounted.js' { 516 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-is-mounted'>; 517 | } 518 | declare module 'eslint-plugin-react/lib/rules/no-multi-comp.js' { 519 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-multi-comp'>; 520 | } 521 | declare module 'eslint-plugin-react/lib/rules/no-redundant-should-component-update.js' { 522 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-redundant-should-component-update'>; 523 | } 524 | declare module 'eslint-plugin-react/lib/rules/no-render-return-value.js' { 525 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-render-return-value'>; 526 | } 527 | declare module 'eslint-plugin-react/lib/rules/no-set-state.js' { 528 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-set-state'>; 529 | } 530 | declare module 'eslint-plugin-react/lib/rules/no-string-refs.js' { 531 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-string-refs'>; 532 | } 533 | declare module 'eslint-plugin-react/lib/rules/no-this-in-sfc.js' { 534 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-this-in-sfc'>; 535 | } 536 | declare module 'eslint-plugin-react/lib/rules/no-typos.js' { 537 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-typos'>; 538 | } 539 | declare module 'eslint-plugin-react/lib/rules/no-unescaped-entities.js' { 540 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unescaped-entities'>; 541 | } 542 | declare module 'eslint-plugin-react/lib/rules/no-unknown-property.js' { 543 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unknown-property'>; 544 | } 545 | declare module 'eslint-plugin-react/lib/rules/no-unused-prop-types.js' { 546 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unused-prop-types'>; 547 | } 548 | declare module 'eslint-plugin-react/lib/rules/no-unused-state.js' { 549 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unused-state'>; 550 | } 551 | declare module 'eslint-plugin-react/lib/rules/no-will-update-set-state.js' { 552 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-will-update-set-state'>; 553 | } 554 | declare module 'eslint-plugin-react/lib/rules/prefer-es6-class.js' { 555 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/prefer-es6-class'>; 556 | } 557 | declare module 'eslint-plugin-react/lib/rules/prefer-stateless-function.js' { 558 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/prefer-stateless-function'>; 559 | } 560 | declare module 'eslint-plugin-react/lib/rules/prop-types.js' { 561 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/prop-types'>; 562 | } 563 | declare module 'eslint-plugin-react/lib/rules/react-in-jsx-scope.js' { 564 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/react-in-jsx-scope'>; 565 | } 566 | declare module 'eslint-plugin-react/lib/rules/require-default-props.js' { 567 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-default-props'>; 568 | } 569 | declare module 'eslint-plugin-react/lib/rules/require-optimization.js' { 570 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-optimization'>; 571 | } 572 | declare module 'eslint-plugin-react/lib/rules/require-render-return.js' { 573 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-render-return'>; 574 | } 575 | declare module 'eslint-plugin-react/lib/rules/self-closing-comp.js' { 576 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/self-closing-comp'>; 577 | } 578 | declare module 'eslint-plugin-react/lib/rules/sort-comp.js' { 579 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/sort-comp'>; 580 | } 581 | declare module 'eslint-plugin-react/lib/rules/sort-prop-types.js' { 582 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/sort-prop-types'>; 583 | } 584 | declare module 'eslint-plugin-react/lib/rules/style-prop-object.js' { 585 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/style-prop-object'>; 586 | } 587 | declare module 'eslint-plugin-react/lib/rules/void-dom-elements-no-children.js' { 588 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/void-dom-elements-no-children'>; 589 | } 590 | declare module 'eslint-plugin-react/lib/util/annotations.js' { 591 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/annotations'>; 592 | } 593 | declare module 'eslint-plugin-react/lib/util/ast.js' { 594 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/ast'>; 595 | } 596 | declare module 'eslint-plugin-react/lib/util/Components.js' { 597 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/Components'>; 598 | } 599 | declare module 'eslint-plugin-react/lib/util/docsUrl.js' { 600 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/docsUrl'>; 601 | } 602 | declare module 'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket.js' { 603 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket'>; 604 | } 605 | declare module 'eslint-plugin-react/lib/util/makeNoMethodSetStateRule.js' { 606 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/makeNoMethodSetStateRule'>; 607 | } 608 | declare module 'eslint-plugin-react/lib/util/pragma.js' { 609 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/pragma'>; 610 | } 611 | declare module 'eslint-plugin-react/lib/util/props.js' { 612 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/props'>; 613 | } 614 | declare module 'eslint-plugin-react/lib/util/variable.js' { 615 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/variable'>; 616 | } 617 | declare module 'eslint-plugin-react/lib/util/version.js' { 618 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/version'>; 619 | } 620 | --------------------------------------------------------------------------------