[
  {
    "path": ".gitignore",
    "content": "node_modules\nnpm-debug.log\n.DS_Store\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "- - -\n\n**_This project is not actively maintained. Proceed at your own risk!_**\n\n- - -\n\n<img height=\"224px\" width=\"704px\" src=\"./src/elements/Banner/ReactPageLogo@2x.png\"/>\n\n\n  - <h4>Render [React](http://www.github.com/facebook/react/) pages on the server or client - _effortlessly_.</h4>\n  - <h4>Use CommonJS to build and share UI components.</h4>\n  - <h4>Develop rapidly - instant reloading.</h4>\n\n<br>\n\n\n##Install (Mac/Linux - requires a recent version of node/npm)\n\n> Clone this project\n\n    git clone https://github.com/facebook/react-page\n    cd react-page\n    npm install                            # install dependencies.\n\n> Try out the server rendering\n\n    node server.js\n    # open http://localhost:8080/index.html\n    # Make changes to src/index.js, and refresh instantly!\n\n\n##Philosophy\n\n##### Why Server Rendering?\n\n  - Faster Pages: Markup displayed before downloading JS (with SEO benefits)\n  - Page generation on a fast server vs. low power client devices.\n  - Instantly refresh while developing.\n  - Static content sites: As easy as a single `wget` command.\n\n\n##### Why React?\n\n  - React is a client/server rendering framework from the ground up.\n  - When performance constraints change, simply change _where_ you render it - don't change your app.\n  - React is functional. Explore the documentation on the [React Github Page](http://www.github.com/facebook/react/).\n  - Server rendering optional - you can always just use React as a declarative client side framework.\n\n\n##Developing\n\n#### Default Project Structure\n\nThe included directory structure suggests a way to organize a single _or_ multi-page app.\n`npm install` other components/libraries and they automatically work. It's the same commonJS\nthat you know and love.\n\n\n    react-page/\n     ├── package.json                # Add npm dependencies here.\n     ├── server.js                   # Start web server with `node server.js`\n     ├── ...                         # Create more pages/directories here\n     └── src                         # All your application JS.\n         ├── elements/               # Shared React components.\n         │   ├── SiteBoilerPlate.js  # Reusable html/body component\n         │   └── Banner.js           # An example component for displaying text\n         │\n         ├── index.js                # localhost:8080/index.html routed here\n         └── pages                   # Make your site structure\n             └── about.js            # localhost:8080/pages/about.html\n\n\n#### Everything Is A Component\n\nReact's philosophy is that mutation-minimal functions and composition are the\nbest tools for building sophisticated applications with low complexity. In React,\n_\"components\"_ are the tool for composing. `react-page` embraces this simplicity,\neven allowing the _entire page_ to be expressed as an arbitrarily deep composition\nof components.\n\n`react-page/src/index.js` corresponds to `index.html`. `index.js` is a React\ncomponent that renders the `<html>`,`<body>`, and all the contents of the page.\n\nIf you look at `index.js`, you'll notice that it doesn't output all the `<div>`s\nand `<span>`s directly - it _composes_ other components that take on much of that\nresponsibility. `index.js` composes a `<Banner>` component, and inside of `Banner.js`,\nyou'll see that the implementation of `<Banner>` outputs an `<h1>` DOM component.\nEven DOM representations such as `<h1>` are components in React\n\nTo build out your app, just add or install more components with `npm`.\n\n#### Simple Default Page Routing\n\nRequests to `path/file.html` are routed to your React component located at\n`src/path/file.js`. By default all page requests are routed to the `src`\ndirectory, but you can customize that behavior via the `pageRouteRoot` setting.\n\nHere are a couple of examples of the default configuration:\n\n    http://localhost:8080/index.html => react-page/src/pages/index.js\n    http://localhost:8080/docs/hello.html => react-page/src/pages/docs/hello.js\n    http://localhost:8080/pages/about.html => react-page/src/pages/about/index.js\n    http://localhost:8080/path/img.png => react-page/src/path/img.png\n\n\n- Currently, every `html` routing must map to a `.js` file that exports a single React\n  component, that renders the page, including `html/body` tags.\n- Routing is customizable (more later).\n\n\n## How Does Server Rendering Work?\n\n  - `react-page` computes page markup on the server, sends it to the client so the\n    user can see it quickly.\n  - The corresponding JavaScript is then packaged and sent.\n  - The browser runs that JavaScript, so that all of the event handlers,\n  interactions and update code will run seamlessly on top of the server\n  generated markup.\n  - From the developer's (and the user's) perspective, it's just as if the\n  rendering occurred on the client, only faster.\n\n\n\n## Command Line Usage:\n\n    # --useSourceMaps=true        # default:true\n    # --useBrowserBuiltins=false  # Allow node modules (util)  - default:false\n    # --logTiming=true            # Shows colored timing metrics - default:true\n    # --pageRouteRoot=<root_dir>  # page URLs root - default: react-page/src\n\n    # for example:\n    node server.js --useSourceMaps=true\n\n\n**Node Modules in the Browser:** You can use modules installed via `npm`,\nbut if anything requires builtin modules (such as `util`), make sure to\nenable the `useBrowserBuiltins` option.\n\n\n\n## React As A Blogging Engine:\n\nReact can power dynamic, network-connected apps. But with `react-page`, React\ncan also be used to build a static blog, Github documentation, or any other\nstatic site. Because `react-page` uses server rendering, creating a static site\nis as easy as a single `wget` command.\n\n    node server.js\n    wget -mpck --user-agent=\"\" -e robots=off http://localhost:8080/index.html\n\nGet `wget` on OS X: try http://osxdaily.com/2012/05/22/install-wget-mac-os-x/ or if you have brew: `brew install wget`\n\nThis prebuilds your entire interactive site, so it can be served from a file server or github etc.\n**Don't forget** to enable gzip on your file server! React markup is large but compresses very well.\n\n\n\n## Motivations/Next-Steps:\n\n-`react-page` is a rapid development environment for experimenting with new ways of\nbuilding production web apps powered by React. It provides a common environment\nthat allows sharing of modules client/server architecture prototypes.\n\nIn order to use this technology in a production environment, you must audit and\nverify that the server rendering strategy is safe and suitable for your purposes.\n\n- You  must ensure that a proper server sandbox is enforced. However, `react-page`\n_does_ run your UI rendering code inside of contextify as a preliminary sandbox.\n\n- In production, the js packaging features of `react-page` should be performed\nahead of time and stored in a CDN. However, dynamic server rendering\nis a compelling production feature.\n\n- Additional connect middleware should be added to prevent stack traces from showing\nup in browser.\n\n\n#### TODO:\n\n  - Windows support (depends on fixing https://github.com/facebook/node-haste/pull/2)\n  - Allow sharing of css/images through npm packages.\n  - Experiments with optimizing page load time - incremental streaming of\n  markup/resources.\n  - Advanced packaging such as splitting projects into several independently\n  cacheable sub-packages.\n  - require('image/path/img.jpg') should resolve to image path.\n  - A way to automatically package/bundle css, regardless of file path of\n  depending js resource. (using require('commonJSPath/to/css.css'))\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"react-page\",\n  \"version\": \"0.2.0\",\n  \"description\": \"Starter Application for React, CommonJS, JSX, Server Rendering.\",\n  \"main\": \"index.js\",\n  \"start\": \"node server.js\",\n  \"dependencies\": {\n    \"React\": \"git://github.com/facebook/react.git\",\n    \"optimist\": \"0.6.0\",\n    \"react-page-middleware\": \"git://github.com/reactjs/react-page-middleware.git\",\n    \"connect\": \"2.8.3\"\n  },\n  \"author\": {\n    \"name\": \"Jordan Walke\",\n    \"email\": \"jordwalke@facebook.com\",\n    \"url\": \"http://github.com/jordwalke\"\n  },\n  \"engines\": {\n    \"node\": \">=0.10.0\"\n  },\n  \"license\": \"Apache-2.0\"\n}\n"
  },
  {
    "path": "server.js",
    "content": "/**\n * Copyright 2013 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\"use strict\";\nvar connect = require('connect');\nvar http = require('http');\nvar optimist = require('optimist');\nvar path = require('path');\nvar reactMiddleware = require('react-page-middleware');\n\nvar argv = optimist.argv;\n\nvar PROJECT_ROOT = __dirname;\nvar FILE_SERVE_ROOT = path.join(PROJECT_ROOT, 'src');\n\nvar port = argv.port;\n\nvar isServer = !argv.computeForPath;\n\nvar serverDefaults = {\n  serverRender: true,\n  skipES5Shim: false,\n  useBrowserBuiltins: false,\n  logTiming: true,\n  useSourceMaps: true,\n  pageRouteRoot: FILE_SERVE_ROOT,\n  sourceMapsType: 'linked'\n};\n\nvar computeDefaults = {\n  serverRender: false,\n  skipES5Shim: false,\n  useBrowserBuiltins: false,\n  logTiming: false,\n  useSourceMaps: false,\n  pageRouteRoot: FILE_SERVE_ROOT,\n  sourceMapsType: 'linked'\n};\n\nvar defaults = isServer ? serverDefaults : computeDefaults;\n\nvar buildOptions = {\n  projectRoot: PROJECT_ROOT,\n  skipES5Shim: argv.skipES5Shim == 'true',      // Skip shim if you know you have\n                                                // a very modern browser.\n  useBrowserBuiltins:                           // Include node util modules.\n    'useBrowserBuiltins' in argv ?\n    argv.useBrowserBuiltins === 'true' :\n    defaults.useBrowserBuiltins,\n  logTiming: 'logTiming' in argv ?              // Colored timing logs.\n    argv.logTiming === 'true' :\n    defaults.logTiming,\n  sourceMapsType: 'sourceMapsType' in argv ?\n    argv.sourceMapsType: defaults.sourceMapsType,\n  pageRouteRoot: 'pageRouteRoot' in argv ?\n    argv.pageRouteRoot : defaults.pageRouteRoot, // URLs based in this directory\n  useSourceMaps: 'useSourceMaps' in argv ?\n    argv.useSourceMaps === 'true' :\n    defaults.useSourceMaps,                     // Generate client source maps.\n  ignorePaths: function(p) {                    // Additional filtering\n    return p.indexOf('__tests__') !== -1;\n  },\n  blacklistRE: argv.blacklistRE && new RegExp(argv.blacklistRE),\n  serverRender: 'serverRender' in argv ?\n    argv.serverRender === 'true': defaults.serverRender,\n  dev: argv.dev === 'true'\n};\n\nif (!isServer) {\n  reactMiddleware.compute(buildOptions)(argv.computeForPath, function(str) {\n    process.stdout.write(str);\n  });\n} else {\n  var app = connect()\n    .use(reactMiddleware.provide(buildOptions))\n    .use(connect['static'](FILE_SERVE_ROOT))\n    .use(connect.favicon(path.join(FILE_SERVE_ROOT, 'elements', 'favicon', 'favicon.ico')))\n    .use(connect.logger())\n    .use(connect.compress())\n    .use(connect.errorHandler());\n\n  var portToUse = port || 8080;\n  http.createServer(app).listen(portToUse);\n  console.log('Open http://localhost:' + portToUse + '/index.html');\n}\n"
  },
  {
    "path": "src/core/SiteBoilerPlate.js",
    "content": "/**\n * Copyright 2013 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @jsx React.DOM\n */\n\nvar React = require('React');\n\n/**\n * Component for performing some redundant site wrapping. Customize to your\n * liking, or create a new, similar module. `react-page` automatically ensures\n * that all fo the JavaScript used to generate the page, will be bundled and\n * sent into the response so that all the event handlers will work.\n *\n * Usage:\n *\n * var React = require('React');\n * var SiteBoilerPlate = require('./components/SiteBoilerPlate.jsx');\n * var MyPage = React.createClass({\n *   render: function() {\n *     return (\n *       <SiteBoilerPlate>\n *          <div>Hello This Is My App!</div>\n *       </SiteBoilerPlate>\n *     );\n *   }\n * });\n */\n\nvar SiteBoilerPlate = React.createClass({\n  render: function() {\n    return (\n      <html>\n        <head>\n          <meta charset=\"UTF-8\" />\n          <title>React Page | Client-Server JavaScript Rendering</title>\n          <meta\n            name=\"viewport\"\n            content=\"width=device-width, initial-scale=1.0, user-scalable=no\"\n          />\n          <link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />\n        </head>\n        <body>\n          {this.props.children}\n        </body>\n      </html>\n    );\n  }\n});\n\nmodule.exports = SiteBoilerPlate;\n"
  },
  {
    "path": "src/elements/Banner/Banner.js",
    "content": "/**\n * Copyright 2013 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @jsx React.DOM\n */\n\"use strict\";\n\nvar React = require('React');\n\n/**\n * Look at Banner, Michael!\n */\nvar Banner = React.createClass({\n  getInitialState: function() {\n    return {initialized: false};\n  },\n\n  componentDidMount: function() {\n    this.setState({initialized: true});\n  },\n\n  render: function() {\n    var classes = [\n      'banner',\n      this.state.initialized ? 'fadeIn' : ''\n    ].join(' ');\n    return (\n      <h1 className={classes}>\n        {this.props.bannerMessage}\n      </h1>\n    );\n  }\n});\n\nmodule.exports = Banner;\n"
  },
  {
    "path": "src/elements/VectorWidget/VectorWidget.js",
    "content": "/**\n * Copyright 2013 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @jsx React.DOM\n */\n\"use strict\";\n\nvar React = require('React');\nvar path = React.DOM.path;\n\nvar MOUSE_UP_DRAG = 0.978;\nvar MOUSE_DOWN_DRAG = 0.9;\nvar MAX_VEL = 11;\nvar CLICK_ACCEL = 3;\nvar BASE_VEL = 0.15;\n\n/**\n * An animated SVG component.\n */\nvar VectorWidget = React.createClass({\n  /**\n   * Initialize state members.\n   */\n  getInitialState: function() {\n    return {degrees: 0, velocity: 0, drag: MOUSE_UP_DRAG};\n  },\n\n  /**\n   * When the component is mounted into the document - this is similar to a\n   * constructor, but invoked when the instance is actually mounted into the\n   * document. Here's, we'll just set up an animation loop that invokes our\n   * method. Binding of `this.onTick` is not needed because all React methods\n   * are automatically bound before being mounted.\n   */\n  componentDidMount: function() {\n    this._interval = window.setInterval(this.onTick, 20);\n  },\n\n  componentWillUnmount: function() {\n    window.clearInterval(this._interval);\n  },\n\n  onTick: function() {\n    var nextDegrees = this.state.degrees + BASE_VEL + this.state.velocity;\n    var nextVelocity = this.state.velocity * this.state.drag;\n    this.setState({degrees: nextDegrees, velocity: nextVelocity});\n  },\n  \n  /**\n   * When mousing down, we increase the friction down the velocity.\n   */\n  handleMouseDown: function() {\n    this.setState({drag: MOUSE_DOWN_DRAG});\n  },\n\n  /**\n   * Cause the rotation to \"spring\".\n   */\n  handleMouseUp: function() {\n    var nextVelocity = Math.min(this.state.velocity + CLICK_ACCEL, MAX_VEL);\n    this.setState({velocity: nextVelocity, drag: MOUSE_UP_DRAG});\n  },\n\n  /**\n   * This is the \"main\" method for any component. The React API allows you to\n   * describe the structure of your UI component at *any* point in time.\n   */\n  render: function() {\n    var transformOrigin = '50% 50%';\n    var transform = 'rotate(' + this.state.degrees + 'deg)';\n\n    var rotationStyle = {\n      WebkitTransformOrigin: transformOrigin,\n      WebkitTransform: transform,\n      // TODO: Figure out why transform-origin don't work in Firefox\n      // transformOrigin: transformOrigin,\n      // transform: transform\n    };\n    return (\n      <svg\n        width=\"100%\"\n        height=\"100%\"\n        viewBox=\"0 0 700 700\"\n        version=\"1.1\"\n        style={{cursor: 'pointer'}}\n        onMouseDown={this.handleMouseDown}\n        onMouseUp={this.handleMouseUp}>\n        {this.renderGraphic(rotationStyle)}\n      </svg>\n    );\n  },\n\n  /**\n   * Better SVG support for React coming soon.\n   */\n  renderGraphic: function(rotationStyle) {\n\n    return (\n      <g fill=\"none\" stroke=\"none\">\n        <g transform=\"translate(210.000000, 135.000000)\">\n          <path fill=\"rgba(0,0,0,0.1)\" d={BORDER_PATH} />\n          <path fill=\"#7BC7BA\" d={BG_PATH} />\n          <path fill=\"#DCDCDC\" d={BAR_PATH} />\n          <path fill=\"#D97B76\" d={RED_DOT_PATH}/>\n          <path fill=\"#DBBB79\" d={YELLOW_DOT_PATH} />\n          <path fill=\"#A6BD8A\" d={GREEN_DOT_PATH}/>\n          <g transform=\"translate(55, 29)\">\n            <g style={rotationStyle}>\n              <path fill=\"#FFFFFF\"  d={CENTER_DOT_PATH}/>\n              <g stroke=\"#FFFFFF\" strokeWidth=\"8\">\n                <path d={RING_ONE_PATH} />\n                <path d={RING_TWO_PATH} transform={RING_TWO_ROTATE} />\n                <path d={RING_THREE_PATH} transform={RING_THREE_ROTATE} />\n              </g>\n            </g>\n          </g>\n        </g>\n      </g>\n    );\n  }\n});\n\nvar BORDER_PATH = \"M3.00191459,4 C1.34400294,4 0,5.34785514 0,7.00550479 L0,220.994495 C0,222.65439 1.34239483,224 3.00191459,224 L276.998085,224 C278.655997,224 280,222.652145 280,220.994495 L280,7.00550479 C280,5.34561033 278.657605,4 276.998085,4 L3.00191459,4 Z M3.00191459,4\";\nvar BG_PATH = \"M3.00191459,1 C1.34400294,1 0,2.34785514 0,4.00550479 L0,217.994495 C0,219.65439 1.34239483,221 3.00191459,221 L276.998085,221 C278.655997,221 280,219.652145 280,217.994495 L280,4.00550479 C280,2.34561033 278.657605,1 276.998085,1 L3.00191459,1 Z M3.00191459,1\";\nvar BAR_PATH = \"M3.00191459,0 C1.34400294,0 0,1.34559019 0,3.00878799 L0,21 C0,21 0,21 0,21 L280,21 C280,21 280,21 280,21 L280,3.00878799 C280,1.34708027 278.657605,0 276.998085,0 L3.00191459,0 Z M3.00191459,0\";\nvar RED_DOT_PATH = \"M12.5,17 C16.0898511,17 19,14.0898511 19,10.5 C19,6.91014895 16.0898511,4 12.5,4 C8.91014895,4 6,6.91014895 6,10.5 C6,14.0898511 8.91014895,17 12.5,17 Z M12.5,17\";\nvar YELLOW_DOT_PATH = \"M31.5,17 C35.0898511,17 38,14.0898511 38,10.5 C38,6.91014895 35.0898511,4 31.5,4 C27.9101489,4 25,6.91014895 25,10.5 C25,14.0898511 27.9101489,17 31.5,17 Z M31.5,17\";\nvar GREEN_DOT_PATH = \"M50.5,17 C54.0898511,17 57,14.0898511 57,10.5 C57,6.91014895 54.0898511,4 50.5,4 C46.9101489,4 44,6.91014895 44,10.5 C44,14.0898511 46.9101489,17 50.5,17 Z M50.5,17\";\nvar CENTER_DOT_PATH = \"M84,105 C92.8365564,105 100,97.8365564 100,89 C100,80.1634436 92.8365564,73 84,73 C75.1634436,73 68,80.1634436 68,89 C68,97.8365564 75.1634436,105 84,105 Z M84,105\";\nvar RING_ONE_PATH = \"M84,121 C130.391921,121 168,106.673113 168,89 C168,71.3268871 130.391921,57 84,57 C37.6080787,57 0,71.3268871 0,89 C0,106.673113 37.6080787,121 84,121 Z M84,121\";\nvar RING_TWO_PATH = \"M84,121 C130.391921,121 168,106.673113 168,89 C168,71.3268871 130.391921,57 84,57 C37.6080787,57 0,71.3268871 0,89 C0,106.673113 37.6080787,121 84,121 Z M84,121\";\nvar RING_THREE_PATH = \"M84,121 C130.391921,121 168,106.673113 168,89 C168,71.3268871 130.391921,57 84,57 C37.6080787,57 0,71.3268871 0,89 C0,106.673113 37.6080787,121 84,121 Z M84,121\";\nvar RING_TWO_ROTATE = \"translate(84.000000, 89.000000) rotate(-240.000000) translate(-84.000000, -89.000000)\";\nvar RING_THREE_ROTATE = \"translate(84.000000, 89.000000) rotate(-300.000000) translate(-84.000000, -89.000000)\";\n\nmodule.exports = VectorWidget;\n\n"
  },
  {
    "path": "src/index.js",
    "content": "/**\n * Copyright 2013 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @jsx React.DOM\n */\n\nvar Banner = require('./elements/Banner/Banner.js');\nvar React = require('React');\nvar SiteBoilerPlate = require('./core/SiteBoilerPlate.js');\nvar VectorWidget = require('./elements/VectorWidget/VectorWidget.js');\n\nvar index = React.createClass({\n  render: function() {\n    return (\n      <SiteBoilerPlate>\n        <Banner bannerMessage=\"Welcome to React\"/>\n        <VectorWidget />\n      </SiteBoilerPlate>\n    );\n  }\n});\n\nmodule.exports = index;\n"
  },
  {
    "path": "src/pages/about.js",
    "content": "/**\n * Copyright 2013 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @jsx React.DOM\n */\n\n\nvar React = require('React');\nvar SiteBoilerPlate = require('../core/SiteBoilerPlate.js');\nvar Banner = require('../elements/Banner/Banner.js');\n\nvar index = React.createClass({\n\n  render: function() {\n    return (\n      <SiteBoilerPlate>\n        <Banner bannerMessage=\"About Us\"/>\n      </SiteBoilerPlate>\n    );\n  }\n});\n\nmodule.exports = index;\n"
  },
  {
    "path": "src/style.css",
    "content": "* {\n  boxSizing: border-box;\n}\n\nh1.banner {\n  opacity: 0;\n  font-family: Helvetica;\n  color: #444;\n  font-weight: bold;\n  margin-top: 60px;\n  margin-bottom: 0;\n  text-align: center;\n  -webkit-user-select: none;\n  font-size: 5vh; /* Chrome bug prevents resizing on window resize! */\n  width: 100%;    /* Putting width 100% causes repaint on resize */\n}\n\nh1.banner.fadeIn {\n  opacity: 1;\n  transition: opacity 3s ease-in;\n}\n"
  }
]