├── .circleci └── config.yml ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── .mailmap ├── .nvmrc ├── .prettierignore ├── .prettierrc.js ├── .watchmanconfig ├── AUTHORS ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── appveyor.yml ├── babel.config.js ├── dangerfile.js ├── examples ├── .eslintrc ├── react-apollo-hooks │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ └── robots.txt │ ├── src │ │ ├── app │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── Film.js │ │ │ ├── Home.js │ │ │ └── react.svg │ │ ├── client.js │ │ ├── index.js │ │ └── server.js │ └── yarn.lock ├── redux │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ └── robots.txt │ ├── src │ │ ├── app │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── Article.js │ │ │ ├── Home.js │ │ │ ├── createStore.js │ │ │ └── react.svg │ │ ├── articleData.json │ │ ├── client.js │ │ ├── index.js │ │ └── server.js │ └── yarn.lock └── urql │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ ├── favicon.ico │ └── robots.txt │ ├── src │ ├── app │ │ ├── App.css │ │ ├── App.js │ │ ├── Film.js │ │ ├── Home.js │ │ └── react.svg │ ├── client.js │ ├── index.js │ └── server.js │ └── yarn.lock ├── fixtures ├── art │ ├── .gitignore │ ├── README.md │ ├── VectorWidget.js │ ├── app.js │ ├── index.html │ ├── package.json │ ├── webpack.config.js │ └── yarn.lock ├── attribute-behavior │ ├── .gitignore │ ├── AttributeTableSnapshot.md │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ └── manifest.json │ ├── src │ │ ├── App.js │ │ ├── App.test.js │ │ ├── attributes.js │ │ ├── index.css │ │ └── index.js │ └── yarn.lock ├── devtools │ ├── regression │ │ ├── 14.9.html │ │ ├── 15.0.html │ │ ├── 15.1.html │ │ ├── 15.2.html │ │ ├── 15.3.html │ │ ├── 15.4.html │ │ ├── 15.5.html │ │ ├── 15.6.html │ │ ├── 16.0.html │ │ ├── 16.1.html │ │ ├── 16.2.html │ │ ├── 16.3.html │ │ ├── 16.4.html │ │ ├── 16.5.html │ │ ├── 16.6.html │ │ ├── 16.7.html │ │ ├── canary.html │ │ ├── index.html │ │ ├── next.html │ │ ├── server.js │ │ ├── shared.js │ │ └── styles.css │ └── standalone │ │ └── index.html ├── dom │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ │ ├── act-dom.html │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── react-logo.svg │ │ ├── renderer.html │ │ ├── renderer.js │ │ └── test.mp4 │ ├── src │ │ ├── __tests__ │ │ │ ├── nested-act-test.js │ │ │ └── wrong-act-test.js │ │ ├── components │ │ │ ├── App.js │ │ │ ├── Fixture.js │ │ │ ├── FixtureSet.js │ │ │ ├── Header.js │ │ │ ├── Iframe.js │ │ │ ├── IssueList.js │ │ │ ├── TestCase.js │ │ │ ├── VersionPicker.js │ │ │ ├── fixtures │ │ │ │ ├── buttons │ │ │ │ │ └── index.js │ │ │ │ ├── custom-elements │ │ │ │ │ └── index.js │ │ │ │ ├── date-inputs │ │ │ │ │ ├── index.js │ │ │ │ │ └── switch-date-test-case.js │ │ │ │ ├── error-handling │ │ │ │ │ └── index.js │ │ │ │ ├── event-pooling │ │ │ │ │ ├── hit-box.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── mouse-move.js │ │ │ │ │ └── persistence.js │ │ │ │ ├── home.js │ │ │ │ ├── hydration │ │ │ │ │ ├── Code.js │ │ │ │ │ ├── code-transformer.js │ │ │ │ │ ├── codemirror-paraiso-dark.css │ │ │ │ │ ├── data.js │ │ │ │ │ ├── hydration.css │ │ │ │ │ └── index.js │ │ │ │ ├── index.js │ │ │ │ ├── input-change-events │ │ │ │ │ ├── InputPlaceholderFixture.js │ │ │ │ │ ├── RadioClickFixture.js │ │ │ │ │ ├── RadioGroupFixture.js │ │ │ │ │ ├── RadioNameChangeFixture.js │ │ │ │ │ ├── RangeKeyboardFixture.js │ │ │ │ │ └── index.js │ │ │ │ ├── media-events │ │ │ │ │ └── index.js │ │ │ │ ├── mouse-events │ │ │ │ │ ├── index.js │ │ │ │ │ └── mouse-movement.js │ │ │ │ ├── number-inputs │ │ │ │ │ ├── NumberInputDecimal.js │ │ │ │ │ ├── NumberInputExtraZeroes.js │ │ │ │ │ ├── NumberTestCase.js │ │ │ │ │ └── index.js │ │ │ │ ├── password-inputs │ │ │ │ │ ├── PasswordTestCase.js │ │ │ │ │ └── index.js │ │ │ │ ├── pointer-events │ │ │ │ │ ├── drag-box.js │ │ │ │ │ ├── drag.js │ │ │ │ │ ├── hover-box.js │ │ │ │ │ ├── hover.js │ │ │ │ │ └── index.js │ │ │ │ ├── range-inputs │ │ │ │ │ └── index.js │ │ │ │ ├── selection-events │ │ │ │ │ ├── OnSelectEventTestCase.js │ │ │ │ │ ├── ReorderedInputsTestCase.js │ │ │ │ │ └── index.js │ │ │ │ ├── selects │ │ │ │ │ └── index.js │ │ │ │ ├── suspense │ │ │ │ │ └── index.js │ │ │ │ ├── text-inputs │ │ │ │ │ ├── InputTestCase.js │ │ │ │ │ ├── README.md │ │ │ │ │ ├── ReplaceEmailInput.js │ │ │ │ │ └── index.js │ │ │ │ └── textareas │ │ │ │ │ └── index.js │ │ │ └── propTypes.js │ │ ├── find-dom-node.js │ │ ├── index.js │ │ ├── polyfills.js │ │ ├── react-loader.js │ │ ├── style.css │ │ ├── tags.js │ │ └── toWarnDev.js │ └── yarn.lock ├── eslint │ ├── .eslintrc.json │ ├── README.md │ ├── index.js │ ├── package.json │ ├── proxy │ │ ├── index.js │ │ └── package.json │ ├── watch.sh │ └── yarn.lock ├── expiration │ ├── .gitignore │ ├── package.json │ ├── public │ │ └── index.html │ ├── src │ │ └── index.js │ └── yarn.lock ├── fiber-debugger │ ├── .env │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ ├── src │ │ ├── App.js │ │ ├── Editor.js │ │ ├── Fibers.js │ │ ├── describeFibers.js │ │ ├── index.css │ │ └── index.js │ └── yarn.lock ├── fiber-triangle │ └── index.html ├── fizz-ssr-browser │ └── index.html ├── packaging │ ├── README.md │ ├── babel-standalone │ │ └── dev.html │ ├── browserify │ │ ├── dev │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ │ └── prod │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ ├── brunch │ │ ├── dev │ │ │ ├── .gitignore │ │ │ ├── app │ │ │ │ └── initialize.js │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ │ └── prod │ │ │ ├── .gitignore │ │ │ ├── app │ │ │ └── initialize.js │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ ├── build-all.js │ ├── globals │ │ ├── dev.html │ │ └── prod.html │ ├── index.html │ ├── requirejs │ │ ├── dev.html │ │ └── prod.html │ ├── rjs │ │ ├── dev │ │ │ ├── .gitignore │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ │ └── prod │ │ │ ├── .gitignore │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ ├── systemjs-builder │ │ ├── dev │ │ │ ├── .gitignore │ │ │ ├── build.js │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ │ └── prod │ │ │ ├── .gitignore │ │ │ ├── build.js │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ ├── systemjs │ │ ├── dev.html │ │ └── prod.html │ ├── webpack-alias │ │ ├── dev │ │ │ ├── .gitignore │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ │ └── prod │ │ │ ├── .gitignore │ │ │ ├── config.js │ │ │ ├── index.html │ │ │ ├── input.js │ │ │ ├── package.json │ │ │ └── yarn.lock │ └── webpack │ │ ├── dev │ │ ├── .gitignore │ │ ├── config.js │ │ ├── index.html │ │ ├── input.js │ │ ├── package.json │ │ └── yarn.lock │ │ └── prod │ │ ├── .gitignore │ │ ├── config.js │ │ ├── index.html │ │ ├── input.js │ │ ├── package.json │ │ └── yarn.lock ├── scheduler │ └── index.html ├── ssr │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ ├── server │ │ ├── index.js │ │ └── render.js │ ├── src │ │ ├── components │ │ │ ├── App.js │ │ │ ├── Chrome.css │ │ │ ├── Chrome.js │ │ │ ├── Page.css │ │ │ ├── Page.js │ │ │ ├── Page2.js │ │ │ ├── Suspend.js │ │ │ └── Theme.js │ │ └── index.js │ └── yarn.lock ├── tracing │ ├── index.html │ ├── script.js │ ├── test.html │ └── test.js └── unstable-async │ └── time-slicing │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ ├── src │ ├── Charts.js │ ├── Clock.js │ ├── index.css │ └── index.js │ └── yarn.lock ├── netlify.toml ├── package.json ├── packages ├── babel-plugin-react-jsx │ ├── README.md │ ├── __tests__ │ │ ├── TransformJSXToReactCreateElement-test.js │ │ ├── TransformJSXToReactJSX-test.js │ │ └── __snapshots__ │ │ │ ├── TransformJSXToReactCreateElement-test.js.snap │ │ │ └── TransformJSXToReactJSX-test.js.snap │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ └── TransformJSXToReactBabelPlugin.js ├── create-subscription │ ├── README.md │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ ├── __tests__ │ │ └── createSubscription-test.internal.js │ │ └── createSubscription.js ├── eslint-plugin-react-hooks │ ├── README.md │ ├── __tests__ │ │ ├── ESLintRuleExhaustiveDeps-test.js │ │ └── ESLintRulesOfHooks-test.js │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ ├── ExhaustiveDeps.js │ │ ├── RulesOfHooks.js │ │ └── index.js ├── jest-mock-scheduler │ ├── README.md │ ├── npm │ │ └── index.js │ └── package.json ├── jest-react │ ├── README.md │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ └── JestReact.js ├── legacy-events │ ├── EventBatching.js │ ├── EventPluginHub.js │ ├── EventPluginRegistry.js │ ├── EventPluginUtils.js │ ├── EventPropagators.js │ ├── EventSystemFlags.js │ ├── PluginModuleType.js │ ├── ReactControlledComponent.js │ ├── ReactGenericBatching.js │ ├── ReactSyntheticEventType.js │ ├── ResponderEventPlugin.js │ ├── ResponderSyntheticEvent.js │ ├── ResponderTopLevelEventTypes.js │ ├── ResponderTouchHistoryStore.js │ ├── SyntheticEvent.js │ ├── TopLevelEventTypes.js │ ├── __tests__ │ │ ├── EventPluginRegistry-test.internal.js │ │ ├── ResponderEventPlugin-test.internal.js │ │ ├── accumulate-test.internal.js │ │ └── accumulateInto-test.internal.js │ ├── accumulate.js │ ├── accumulateInto.js │ ├── forEachAccumulated.js │ ├── forks │ │ └── ResponderTopLevelEventTypes.dom.js │ └── package.json ├── react-art │ ├── Circle.js │ ├── README.md │ ├── Rectangle.js │ ├── Wedge.js │ ├── index.js │ ├── npm │ │ ├── Circle.js │ │ ├── Rectangle.js │ │ ├── Wedge.js │ │ └── index.js │ ├── package.json │ └── src │ │ ├── ReactART.js │ │ ├── ReactARTHostConfig.js │ │ ├── ReactARTInternals.js │ │ └── __tests__ │ │ ├── ReactART-test.js │ │ └── __snapshots__ │ │ └── ReactART-test.js.snap ├── react-cache │ ├── README.md │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ ├── LRU.js │ │ ├── ReactCache.js │ │ └── __tests__ │ │ └── ReactCache-test.internal.js ├── react-debug-tools │ ├── README.md │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ ├── ReactDebugHooks.js │ │ ├── ReactDebugTools.js │ │ └── __tests__ │ │ ├── ReactDevToolsHooksIntegration-test.js │ │ ├── ReactHooksInspection-test.internal.js │ │ ├── ReactHooksInspection-test.js │ │ └── ReactHooksInspectionIntegration-test.js ├── react-devtools-core │ ├── README.md │ ├── backend.js │ ├── package.json │ ├── src │ │ ├── backend.js │ │ ├── editor.js │ │ └── standalone.js │ ├── standalone.js │ ├── webpack.backend.js │ └── webpack.standalone.js ├── react-devtools-extensions │ ├── .circleci │ │ └── config.yml │ ├── README.md │ ├── build.js │ ├── chrome │ │ ├── README.md │ │ ├── build.js │ │ ├── deploy.js │ │ ├── manifest.json │ │ ├── now.json │ │ └── test.js │ ├── deploy.chrome.html │ ├── deploy.firefox.html │ ├── deploy.html │ ├── deploy.js │ ├── firefox │ │ ├── README.md │ │ ├── build.js │ │ ├── deploy.js │ │ ├── manifest.json │ │ ├── now.json │ │ └── test.js │ ├── flow-typed │ │ ├── jest.js │ │ └── npm │ │ │ └── react-test-renderer_v16.x.x.js │ ├── icons │ │ ├── 128-deadcode.png │ │ ├── 128-development.png │ │ ├── 128-disabled.png │ │ ├── 128-outdated.png │ │ ├── 128-production.png │ │ ├── 128-unminified.png │ │ ├── 16-deadcode.png │ │ ├── 16-development.png │ │ ├── 16-disabled.png │ │ ├── 16-outdated.png │ │ ├── 16-production.png │ │ ├── 16-unminified.png │ │ ├── 32-deadcode.png │ │ ├── 32-development.png │ │ ├── 32-disabled.png │ │ ├── 32-outdated.png │ │ ├── 32-production.png │ │ ├── 32-unminified.png │ │ ├── 48-deadcode.png │ │ ├── 48-development.png │ │ ├── 48-disabled.png │ │ ├── 48-outdated.png │ │ ├── 48-production.png │ │ ├── 48-unminified.png │ │ ├── deadcode.svg │ │ ├── development.svg │ │ ├── disabled.svg │ │ ├── outdated.svg │ │ └── production.svg │ ├── main.html │ ├── package.json │ ├── panel.html │ ├── popups │ │ ├── deadcode.html │ │ ├── development.html │ │ ├── disabled.html │ │ ├── outdated.html │ │ ├── production.html │ │ ├── shared.js │ │ └── unminified.html │ ├── src │ │ ├── backend.js │ │ ├── background.js │ │ ├── contentScript.js │ │ ├── inject.js │ │ ├── injectGlobalHook.js │ │ ├── main.js │ │ ├── panel.js │ │ ├── renderer.js │ │ └── utils.js │ ├── utils.js │ ├── webpack.backend.js │ └── webpack.config.js ├── react-devtools-inline │ ├── README.md │ ├── backend.js │ ├── frontend.js │ ├── package.json │ ├── src │ │ ├── backend.js │ │ ├── constants.js │ │ └── frontend.js │ └── webpack.config.js ├── react-devtools-shared │ ├── babel.config.js │ ├── package.json │ └── src │ │ ├── __tests__ │ │ ├── __mocks__ │ │ │ └── cssMock.js │ │ ├── __snapshots__ │ │ │ ├── inspectedElementContext-test.js.snap │ │ │ ├── ownersListContext-test.js.snap │ │ │ ├── profilerContext-test.js.snap │ │ │ ├── profilingCache-test.js.snap │ │ │ ├── profilingCharts-test.js.snap │ │ │ ├── profilingCommitTreeBuilder-test.js.snap │ │ │ ├── store-test.js.snap │ │ │ ├── storeComponentFilters-test.js.snap │ │ │ ├── storeOwners-test.js.snap │ │ │ ├── storeStressSync-test.js.snap │ │ │ ├── storeStressTestConcurrent-test.js.snap │ │ │ └── treeContext-test.js.snap │ │ ├── bridge-test.js │ │ ├── console-test.js │ │ ├── inspectedElementContext-test.js │ │ ├── inspectedElementSerializer.js │ │ ├── legacy │ │ │ ├── __snapshots__ │ │ │ │ ├── inspectElement-test.js.snap │ │ │ │ └── storeLegacy-v15-test.js.snap │ │ │ ├── inspectElement-test.js │ │ │ └── storeLegacy-v15-test.js │ │ ├── ownersListContext-test.js │ │ ├── profilerContext-test.js │ │ ├── profilerStore-test.js │ │ ├── profilingCache-test.js │ │ ├── profilingCharts-test.js │ │ ├── profilingCommitTreeBuilder-test.js │ │ ├── profilingUtils-test.js │ │ ├── setupEnv.js │ │ ├── setupTests.js │ │ ├── store-test.js │ │ ├── storeComponentFilters-test.js │ │ ├── storeOwners-test.js │ │ ├── storeSerializer.js │ │ ├── storeStressSync-test.js │ │ ├── storeStressTestConcurrent-test.js │ │ ├── treeContext-test.js │ │ ├── useEditableValue-test.js │ │ ├── utils-test.js │ │ └── utils.js │ │ ├── backend │ │ ├── NativeStyleEditor │ │ │ ├── resolveBoxStyle.js │ │ │ ├── setupNativeStyleEditor.js │ │ │ └── types.js │ │ ├── agent.js │ │ ├── console.js │ │ ├── describeComponentFrame.js │ │ ├── index.js │ │ ├── legacy │ │ │ ├── renderer.js │ │ │ └── utils.js │ │ ├── renderer.js │ │ ├── types.js │ │ ├── utils.js │ │ └── views │ │ │ └── Highlighter │ │ │ ├── Highlighter.js │ │ │ ├── Overlay.js │ │ │ └── index.js │ │ ├── bridge.js │ │ ├── constants.js │ │ ├── devtools │ │ ├── ProfilerStore.js │ │ ├── ProfilingCache.js │ │ ├── cache.js │ │ ├── index.js │ │ ├── store.js │ │ ├── utils.js │ │ └── views │ │ │ ├── Button.css │ │ │ ├── Button.js │ │ │ ├── ButtonIcon.css │ │ │ ├── ButtonIcon.js │ │ │ ├── Components │ │ │ ├── Badge.css │ │ │ ├── Badge.js │ │ │ ├── Components.css │ │ │ ├── Components.js │ │ │ ├── EditableName.css │ │ │ ├── EditableName.js │ │ │ ├── EditableValue.css │ │ │ ├── EditableValue.js │ │ │ ├── Element.css │ │ │ ├── Element.js │ │ │ ├── ExpandCollapseToggle.css │ │ │ ├── ExpandCollapseToggle.js │ │ │ ├── HocBadges.css │ │ │ ├── HocBadges.js │ │ │ ├── HooksTree.css │ │ │ ├── HooksTree.js │ │ │ ├── InspectHostNodesToggle.js │ │ │ ├── InspectedElementContext.js │ │ │ ├── InspectedElementTree.css │ │ │ ├── InspectedElementTree.js │ │ │ ├── KeyValue.css │ │ │ ├── KeyValue.js │ │ │ ├── NativeStyleEditor │ │ │ │ ├── AutoSizeInput.css │ │ │ │ ├── AutoSizeInput.js │ │ │ │ ├── LayoutViewer.css │ │ │ │ ├── LayoutViewer.js │ │ │ │ ├── StyleEditor.css │ │ │ │ ├── StyleEditor.js │ │ │ │ ├── context.js │ │ │ │ ├── index.js │ │ │ │ └── types.js │ │ │ ├── OwnersListContext.js │ │ │ ├── OwnersStack.css │ │ │ ├── OwnersStack.js │ │ │ ├── SearchInput.css │ │ │ ├── SearchInput.js │ │ │ ├── SelectedElement.css │ │ │ ├── SelectedElement.js │ │ │ ├── SelectedTreeHighlight.css │ │ │ ├── SelectedTreeHighlight.js │ │ │ ├── Tree.css │ │ │ ├── Tree.js │ │ │ ├── TreeContext.js │ │ │ ├── TreeFocusedContext.js │ │ │ ├── ViewElementSourceContext.js │ │ │ └── types.js │ │ │ ├── DevTools.css │ │ │ ├── DevTools.js │ │ │ ├── ErrorBoundary.css │ │ │ ├── ErrorBoundary.js │ │ │ ├── Icon.css │ │ │ ├── Icon.js │ │ │ ├── ModalDialog.css │ │ │ ├── ModalDialog.js │ │ │ ├── Profiler │ │ │ ├── ChartNode.css │ │ │ ├── ChartNode.js │ │ │ ├── ClearProfilingDataButton.js │ │ │ ├── CommitFlamegraph.css │ │ │ ├── CommitFlamegraph.js │ │ │ ├── CommitFlamegraphListItem.js │ │ │ ├── CommitRanked.css │ │ │ ├── CommitRanked.js │ │ │ ├── CommitRankedListItem.js │ │ │ ├── CommitTreeBuilder.js │ │ │ ├── FlamegraphChartBuilder.js │ │ │ ├── InteractionListItem.css │ │ │ ├── InteractionListItem.js │ │ │ ├── Interactions.css │ │ │ ├── Interactions.js │ │ │ ├── InteractionsChartBuilder.js │ │ │ ├── NoCommitData.css │ │ │ ├── NoCommitData.js │ │ │ ├── NoInteractions.css │ │ │ ├── NoInteractions.js │ │ │ ├── Profiler.css │ │ │ ├── Profiler.js │ │ │ ├── ProfilerContext.js │ │ │ ├── ProfilingImportExportButtons.css │ │ │ ├── ProfilingImportExportButtons.js │ │ │ ├── RankedChartBuilder.js │ │ │ ├── RecordToggle.css │ │ │ ├── RecordToggle.js │ │ │ ├── ReloadAndProfileButton.js │ │ │ ├── RootSelector.css │ │ │ ├── RootSelector.js │ │ │ ├── SidebarCommitInfo.css │ │ │ ├── SidebarCommitInfo.js │ │ │ ├── SidebarInteractions.css │ │ │ ├── SidebarInteractions.js │ │ │ ├── SidebarSelectedFiberInfo.css │ │ │ ├── SidebarSelectedFiberInfo.js │ │ │ ├── SnapshotCommitList.css │ │ │ ├── SnapshotCommitList.js │ │ │ ├── SnapshotCommitListItem.css │ │ │ ├── SnapshotCommitListItem.js │ │ │ ├── SnapshotSelector.css │ │ │ ├── SnapshotSelector.js │ │ │ ├── constants.js │ │ │ ├── types.js │ │ │ └── utils.js │ │ │ ├── ReactLogo.css │ │ │ ├── ReactLogo.js │ │ │ ├── Settings │ │ │ ├── ComponentsSettings.js │ │ │ ├── GeneralSettings.js │ │ │ ├── ProfilerSettings.js │ │ │ ├── SettingsContext.js │ │ │ ├── SettingsModal.css │ │ │ ├── SettingsModal.js │ │ │ ├── SettingsModalContext.js │ │ │ ├── SettingsModalContextToggle.js │ │ │ └── SettingsShared.css │ │ │ ├── TabBar.css │ │ │ ├── TabBar.js │ │ │ ├── Toggle.css │ │ │ ├── Toggle.js │ │ │ ├── Tooltip.css │ │ │ ├── WarnIfLegacyBackendDetected.css │ │ │ ├── WarnIfLegacyBackendDetected.js │ │ │ ├── context.js │ │ │ ├── hooks.js │ │ │ ├── portaledContent.js │ │ │ ├── root.css │ │ │ └── utils.js │ │ ├── hook.js │ │ ├── hydration.js │ │ ├── node_modules │ │ └── react-window │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── dist │ │ │ ├── index-dev.umd.js │ │ │ ├── index-prod.umd.js │ │ │ ├── index.cjs.js │ │ │ ├── index.cjs.js.flow │ │ │ ├── index.esm.js │ │ │ └── index.esm.js.flow │ │ │ ├── package.json │ │ │ └── src │ │ │ ├── FixedSizeGrid.js │ │ │ ├── FixedSizeList.js │ │ │ ├── VariableSizeGrid.js │ │ │ ├── VariableSizeList.js │ │ │ ├── areEqual.js │ │ │ ├── createGridComponent.js │ │ │ ├── createListComponent.js │ │ │ ├── domHelpers.js │ │ │ ├── index.js │ │ │ ├── shallowDiffers.js │ │ │ ├── shouldComponentUpdate.js │ │ │ └── timer.js │ │ ├── storage.js │ │ ├── types.js │ │ └── utils.js ├── react-devtools-shell │ ├── README.md │ ├── index.html │ ├── now.json │ ├── package.json │ ├── src │ │ ├── app │ │ │ ├── DeeplyNestedComponents │ │ │ │ └── index.js │ │ │ ├── EditableProps │ │ │ │ └── index.js │ │ │ ├── ElementTypes │ │ │ │ └── index.js │ │ │ ├── Hydration │ │ │ │ └── index.js │ │ │ ├── Iframe │ │ │ │ └── index.js │ │ │ ├── InspectableElements │ │ │ │ ├── Contexts.js │ │ │ │ ├── CustomHooks.js │ │ │ │ ├── CustomObject.js │ │ │ │ ├── InspectableElements.js │ │ │ │ ├── NestedProps.js │ │ │ │ ├── SimpleValues.js │ │ │ │ ├── UnserializableProps.js │ │ │ │ └── index.js │ │ │ ├── InteractionTracing │ │ │ │ └── index.js │ │ │ ├── PriorityLevels │ │ │ │ └── index.js │ │ │ ├── ReactNativeWeb │ │ │ │ └── index.js │ │ │ ├── SuspenseTree │ │ │ │ └── index.js │ │ │ ├── ToDoList │ │ │ │ ├── List.css │ │ │ │ ├── List.js │ │ │ │ ├── ListItem.css │ │ │ │ ├── ListItem.js │ │ │ │ └── index.js │ │ │ ├── Toggle │ │ │ │ └── index.js │ │ │ ├── console.js │ │ │ ├── index.js │ │ │ └── styles.css │ │ └── devtools.js │ └── webpack.config.js ├── react-devtools │ ├── CHANGELOG.md │ ├── OVERVIEW.md │ ├── README.md │ ├── app.html │ ├── app.js │ ├── bin.js │ ├── icons │ │ └── icon128.png │ ├── index.js │ └── package.json ├── react-dom │ ├── README.md │ ├── index.fb.js │ ├── index.js │ ├── npm │ │ ├── package.json │ │ ├── server.js │ │ └── server.node.js │ ├── package.json │ ├── server.browser.js │ ├── server.js │ ├── server.node.js │ ├── src │ │ ├── __tests__ │ │ │ ├── CSSPropertyOperations-test.js │ │ │ ├── DOMPropertyOperations-test.js │ │ │ ├── EventPluginHub-test.js │ │ │ ├── ReactBrowserEventEmitter-test.internal.js │ │ │ ├── ReactChildReconciler-test.js │ │ │ ├── ReactComponent-test.js │ │ │ ├── ReactComponentLifeCycle-test.js │ │ │ ├── ReactCompositeComponent-test.js │ │ │ ├── ReactCompositeComponentDOMMinimalism-test.js │ │ │ ├── ReactCompositeComponentNestedState-test.js │ │ │ ├── ReactCompositeComponentState-test.js │ │ │ ├── ReactDOM-test.js │ │ │ ├── ReactDOMAttribute-test.js │ │ │ ├── ReactDOMComponent-test.js │ │ │ ├── ReactDOMComponentTree-test.js │ │ │ ├── ReactDOMEventListener-test.js │ │ │ ├── ReactDOMFiber-test.js │ │ │ ├── ReactDOMFiberAsync-test.internal.js │ │ │ ├── ReactDOMFizzServerBrowser-test.js │ │ │ ├── ReactDOMFizzServerNode-test.js │ │ │ ├── ReactDOMHooks-test.js │ │ │ ├── ReactDOMIframe-test.js │ │ │ ├── ReactDOMInput-test.js │ │ │ ├── ReactDOMInvalidARIAHook-test.js │ │ │ ├── ReactDOMOption-test.js │ │ │ ├── ReactDOMRoot-test.js │ │ │ ├── ReactDOMSVG-test.js │ │ │ ├── ReactDOMSelect-test.js │ │ │ ├── ReactDOMSelection-test.internal.js │ │ │ ├── ReactDOMServerIntegrationAttributes-test.js │ │ │ ├── ReactDOMServerIntegrationBasic-test.js │ │ │ ├── ReactDOMServerIntegrationCheckbox-test.js │ │ │ ├── ReactDOMServerIntegrationClassContextType-test.js │ │ │ ├── ReactDOMServerIntegrationElements-test.js │ │ │ ├── ReactDOMServerIntegrationFragment-test.js │ │ │ ├── ReactDOMServerIntegrationHooks-test.internal.js │ │ │ ├── ReactDOMServerIntegrationInput-test.js │ │ │ ├── ReactDOMServerIntegrationLegacyContext-test.js │ │ │ ├── ReactDOMServerIntegrationLegacyContextDisabled-test.internal.js │ │ │ ├── ReactDOMServerIntegrationModes-test.js │ │ │ ├── ReactDOMServerIntegrationNewContext-test.js │ │ │ ├── ReactDOMServerIntegrationReconnecting-test.js │ │ │ ├── ReactDOMServerIntegrationRefs-test.js │ │ │ ├── ReactDOMServerIntegrationSelect-test.js │ │ │ ├── ReactDOMServerIntegrationSpecialTypes-test.js │ │ │ ├── ReactDOMServerIntegrationTextarea-test.js │ │ │ ├── ReactDOMServerIntegrationUntrustedURL-test.internal.js │ │ │ ├── ReactDOMServerIntegrationUserInteraction-test.js │ │ │ ├── ReactDOMServerLifecycles-test.js │ │ │ ├── ReactDOMServerPartialHydration-test.internal.js │ │ │ ├── ReactDOMServerSelectiveHydration-test.internal.js │ │ │ ├── ReactDOMServerSuspense-test.internal.js │ │ │ ├── ReactDOMShorthandCSSPropertyCollision-test.internal.js │ │ │ ├── ReactDOMSuspensePlaceholder-test.js │ │ │ ├── ReactDOMTextComponent-test.js │ │ │ ├── ReactDOMTextarea-test.js │ │ │ ├── ReactDOMserverIntegrationProgress-test.js │ │ │ ├── ReactDeprecationWarnings-test.internal.js │ │ │ ├── ReactEmptyComponent-test.js │ │ │ ├── ReactErrorBoundaries-test.internal.js │ │ │ ├── ReactErrorLoggingRecovery-test.js │ │ │ ├── ReactEventIndependence-test.js │ │ │ ├── ReactFunctionComponent-test.js │ │ │ ├── ReactIdentity-test.js │ │ │ ├── ReactLegacyContextDisabled-test.internal.js │ │ │ ├── ReactLegacyErrorBoundaries-test.internal.js │ │ │ ├── ReactMockedComponent-test.js │ │ │ ├── ReactMount-test.js │ │ │ ├── ReactMountDestruction-test.js │ │ │ ├── ReactMultiChild-test.js │ │ │ ├── ReactMultiChildReconcile-test.js │ │ │ ├── ReactMultiChildText-test.js │ │ │ ├── ReactRenderDocument-test.js │ │ │ ├── ReactServerRendering-test.js │ │ │ ├── ReactServerRenderingAsync-test.js │ │ │ ├── ReactServerRenderingBrowser-test.js │ │ │ ├── ReactServerRenderingHydration-test.js │ │ │ ├── ReactServerRenderingSuspense-test.js │ │ │ ├── ReactTestUtils-test.js │ │ │ ├── ReactTestUtilsAct-test.js │ │ │ ├── ReactTestUtilsActUnmockedScheduler-test.js │ │ │ ├── ReactTreeTraversal-test.js │ │ │ ├── ReactUnmockedSchedulerWarning-test.internal.js │ │ │ ├── ReactUnmockedSchedulerWarning-test.js │ │ │ ├── ReactUpdates-test.js │ │ │ ├── __snapshots__ │ │ │ │ └── ReactTestUtils-test.js.snap │ │ │ ├── escapeTextForBrowser-test.js │ │ │ ├── findDOMNode-test.js │ │ │ ├── multiple-copies-of-react-test.js │ │ │ ├── quoteAttributeValueForBrowser-test.js │ │ │ ├── refs-destruction-test.js │ │ │ ├── refs-test.js │ │ │ ├── renderSubtreeIntoContainer-test.js │ │ │ ├── utils │ │ │ │ └── ReactDOMServerIntegrationTestUtils.js │ │ │ └── validateDOMNesting-test.js │ │ ├── client │ │ │ ├── DOMPropertyOperations.js │ │ │ ├── ReactDOM.js │ │ │ ├── ReactDOMClientInjection.js │ │ │ ├── ReactDOMComponent.js │ │ │ ├── ReactDOMComponentTree.js │ │ │ ├── ReactDOMFB.js │ │ │ ├── ReactDOMHostConfig.js │ │ │ ├── ReactDOMInput.js │ │ │ ├── ReactDOMOption.js │ │ │ ├── ReactDOMSelect.js │ │ │ ├── ReactDOMSelection.js │ │ │ ├── ReactDOMTextarea.js │ │ │ ├── ReactInputSelection.js │ │ │ ├── ToStringValue.js │ │ │ ├── __tests__ │ │ │ │ ├── dangerouslySetInnerHTML-test.js │ │ │ │ ├── getNodeForCharacterOffset-test.js │ │ │ │ └── trustedTypes-test.internal.js │ │ │ ├── getActiveElement.js │ │ │ ├── getNodeForCharacterOffset.js │ │ │ ├── inputValueTracking.js │ │ │ ├── setAttribute.js │ │ │ ├── setInnerHTML.js │ │ │ ├── setTextContent.js │ │ │ └── validateDOMNesting.js │ │ ├── events │ │ │ ├── BeforeInputEventPlugin.js │ │ │ ├── ChangeEventPlugin.js │ │ │ ├── DOMEventPluginOrder.js │ │ │ ├── DOMEventResponderSystem.js │ │ │ ├── DOMTopLevelEventTypes.js │ │ │ ├── EnterLeaveEventPlugin.js │ │ │ ├── EventListener.js │ │ │ ├── FallbackCompositionState.js │ │ │ ├── ReactBrowserEventEmitter.js │ │ │ ├── ReactDOMEventListener.js │ │ │ ├── ReactDOMEventReplaying.js │ │ │ ├── SelectEventPlugin.js │ │ │ ├── SimpleEventPlugin.js │ │ │ ├── SyntheticAnimationEvent.js │ │ │ ├── SyntheticClipboardEvent.js │ │ │ ├── SyntheticCompositionEvent.js │ │ │ ├── SyntheticDragEvent.js │ │ │ ├── SyntheticFocusEvent.js │ │ │ ├── SyntheticInputEvent.js │ │ │ ├── SyntheticKeyboardEvent.js │ │ │ ├── SyntheticMouseEvent.js │ │ │ ├── SyntheticPointerEvent.js │ │ │ ├── SyntheticTouchEvent.js │ │ │ ├── SyntheticTransitionEvent.js │ │ │ ├── SyntheticUIEvent.js │ │ │ ├── SyntheticWheelEvent.js │ │ │ ├── __tests__ │ │ │ │ ├── BeforeInputEventPlugin-test.js │ │ │ │ ├── ChangeEventPlugin-test.internal.js │ │ │ │ ├── DOMEventResponderSystem-test.internal.js │ │ │ │ ├── EnterLeaveEventPlugin-test.js │ │ │ │ ├── SelectEventPlugin-test.js │ │ │ │ ├── SimpleEventPlugin-test.internal.js │ │ │ │ ├── SyntheticClipboardEvent-test.js │ │ │ │ ├── SyntheticEvent-test.js │ │ │ │ ├── SyntheticKeyboardEvent-test.js │ │ │ │ ├── SyntheticMouseEvent-test.js │ │ │ │ ├── SyntheticWheelEvent-test.js │ │ │ │ └── getEventKey-test.js │ │ │ ├── checkPassiveEvents.js │ │ │ ├── forks │ │ │ │ └── EventListener-www.js │ │ │ ├── getEventCharCode.js │ │ │ ├── getEventKey.js │ │ │ ├── getEventModifierState.js │ │ │ ├── getEventTarget.js │ │ │ ├── getVendorPrefixedEventName.js │ │ │ └── isEventSupported.js │ │ ├── server │ │ │ ├── DOMMarkupOperations.js │ │ │ ├── ReactDOMFizzServerBrowser.js │ │ │ ├── ReactDOMFizzServerFormatConfig.js │ │ │ ├── ReactDOMFizzServerNode.js │ │ │ ├── ReactDOMNodeStreamRenderer.js │ │ │ ├── ReactDOMNodeStreamRendererAsync.js │ │ │ ├── ReactDOMServerBrowser.js │ │ │ ├── ReactDOMServerNode.js │ │ │ ├── ReactDOMStringRenderer.js │ │ │ ├── ReactDOMStringRendererAsync.js │ │ │ ├── ReactPartialRenderer.js │ │ │ ├── ReactPartialRendererContext.js │ │ │ ├── ReactPartialRendererHooks.js │ │ │ ├── ReactThreadIDAllocator.js │ │ │ ├── escapeTextForBrowser.js │ │ │ └── quoteAttributeValueForBrowser.js │ │ ├── shared │ │ │ ├── CSSProperty.js │ │ │ ├── CSSPropertyOperations.js │ │ │ ├── CSSShorthandProperty.js │ │ │ ├── DOMNamespaces.js │ │ │ ├── DOMProperty.js │ │ │ ├── HTMLNodeType.js │ │ │ ├── ReactControlledValuePropTypes.js │ │ │ ├── ReactDOMInvalidARIAHook.js │ │ │ ├── ReactDOMNullInputValuePropHook.js │ │ │ ├── ReactDOMUnknownPropertyHook.js │ │ │ ├── assertValidProps.js │ │ │ ├── checkReact.js │ │ │ ├── createMicrosoftUnsafeLocalFunction.js │ │ │ ├── dangerousStyleValue.js │ │ │ ├── hyphenateStyleName.js │ │ │ ├── isCustomComponent.js │ │ │ ├── omittedCloseTags.js │ │ │ ├── possibleStandardNames.js │ │ │ ├── sanitizeURL.js │ │ │ ├── validAriaProperties.js │ │ │ ├── voidElementTags.js │ │ │ └── warnValidStyle.js │ │ ├── test-utils │ │ │ ├── ReactTestUtils.js │ │ │ └── ReactTestUtilsAct.js │ │ └── unstable-native-dependencies │ │ │ └── ReactDOMUnstableNativeDependencies.js │ ├── test-utils.js │ ├── unstable-fizz.browser.js │ ├── unstable-fizz.js │ ├── unstable-fizz.node.js │ └── unstable-native-dependencies.js ├── react-interactions │ ├── README.md │ ├── accessibility │ │ ├── README.md │ │ ├── docs │ │ │ ├── FocusControl.md │ │ │ ├── FocusManager.md │ │ │ └── TabbableScope.md │ │ ├── focus-control.js │ │ ├── focus-list.js │ │ ├── focus-manager.js │ │ ├── focus-table.js │ │ ├── src │ │ │ ├── FocusControl.js │ │ │ ├── FocusList.js │ │ │ ├── FocusManager.js │ │ │ ├── FocusTable.js │ │ │ ├── TabbableScope.js │ │ │ └── __tests__ │ │ │ │ ├── FocusList-test.internal.js │ │ │ │ ├── FocusManager-test.internal.js │ │ │ │ ├── FocusTable-test.internal.js │ │ │ │ └── TabbableScope-test.internal.js │ │ └── tabbable-scope.js │ ├── events │ │ ├── README.md │ │ ├── context-menu.js │ │ ├── docs │ │ │ ├── ContextMenu.md │ │ │ ├── Focus.md │ │ │ ├── FocusWithin.md │ │ │ ├── Hover.md │ │ │ └── Press.md │ │ ├── drag.js │ │ ├── focus.js │ │ ├── hover.js │ │ ├── input.js │ │ ├── keyboard.js │ │ ├── press-legacy.js │ │ ├── press.js │ │ ├── scroll.js │ │ ├── src │ │ │ ├── dom │ │ │ │ ├── ContextMenu.js │ │ │ │ ├── Drag.js │ │ │ │ ├── Focus.js │ │ │ │ ├── Hover.js │ │ │ │ ├── Input.js │ │ │ │ ├── Keyboard.js │ │ │ │ ├── Press.js │ │ │ │ ├── PressLegacy.js │ │ │ │ ├── Scroll.js │ │ │ │ ├── Swipe.js │ │ │ │ ├── Tap.js │ │ │ │ ├── __tests__ │ │ │ │ │ ├── ContextMenu-test.internal.js │ │ │ │ │ ├── Drag-test.internal.js │ │ │ │ │ ├── Focus-test.internal.js │ │ │ │ │ ├── FocusWithin-test.internal.js │ │ │ │ │ ├── Hover-test.internal.js │ │ │ │ │ ├── Input-test.internal.js │ │ │ │ │ ├── Keyboard-test.internal.js │ │ │ │ │ ├── MixedResponders-test-internal.js │ │ │ │ │ ├── Press-test.internal.js │ │ │ │ │ ├── PressLegacy-test.internal.js │ │ │ │ │ ├── Scroll-test.internal.js │ │ │ │ │ └── Tap-test.internal.js │ │ │ │ ├── shared │ │ │ │ │ └── index.js │ │ │ │ └── testing-library │ │ │ │ │ ├── domEnvironment.js │ │ │ │ │ ├── domEventSequences.js │ │ │ │ │ ├── domEvents.js │ │ │ │ │ └── index.js │ │ │ └── rn │ │ │ │ └── Press.js │ │ ├── swipe.js │ │ └── tap.js │ ├── npm │ │ ├── drag.js │ │ ├── focus.js │ │ ├── hover.js │ │ ├── input.js │ │ ├── keyboard.js │ │ ├── press-legacy.js │ │ ├── press.js │ │ ├── scroll.js │ │ ├── swipe.js │ │ └── tap.js │ └── package.json ├── react-is │ ├── README.md │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ ├── ReactIs.js │ │ └── __tests__ │ │ └── ReactIs-test.js ├── react-native-renderer │ ├── fabric.js │ ├── index.js │ ├── package.json │ └── src │ │ ├── NativeMethodsMixin.js │ │ ├── NativeMethodsMixinUtils.js │ │ ├── ReactFabric.js │ │ ├── ReactFabricComponentTree.js │ │ ├── ReactFabricEventEmitter.js │ │ ├── ReactFabricEventResponderSystem.js │ │ ├── ReactFabricGlobalResponderHandler.js │ │ ├── ReactFabricHostConfig.js │ │ ├── ReactFabricInjection.js │ │ ├── ReactNativeAttributePayload.js │ │ ├── ReactNativeBridgeEventPlugin.js │ │ ├── ReactNativeComponent.js │ │ ├── ReactNativeComponentTree.js │ │ ├── ReactNativeEventEmitter.js │ │ ├── ReactNativeEventPluginOrder.js │ │ ├── ReactNativeFiberHostComponent.js │ │ ├── ReactNativeFiberInspector.js │ │ ├── ReactNativeGlobalResponderHandler.js │ │ ├── ReactNativeHostConfig.js │ │ ├── ReactNativeInjection.js │ │ ├── ReactNativeInjectionShared.js │ │ ├── ReactNativeRenderer.js │ │ ├── ReactNativeRendererSharedExports.js │ │ ├── ReactNativeTypes.js │ │ ├── __mocks__ │ │ └── react-native │ │ │ └── Libraries │ │ │ └── ReactPrivate │ │ │ ├── BatchedBridge.js │ │ │ ├── ExceptionsManager.js │ │ │ ├── InitializeNativeFabricUIManager.js │ │ │ ├── Platform.js │ │ │ ├── RCTEventEmitter.js │ │ │ ├── ReactFiberErrorDialog.js │ │ │ ├── ReactNativePrivateInitializeCore.js │ │ │ ├── ReactNativePrivateInterface.js │ │ │ ├── ReactNativeViewConfigRegistry.js │ │ │ ├── TextInputState.js │ │ │ ├── UIManager.js │ │ │ ├── deepDiffer.js │ │ │ ├── deepFreezeAndThrowOnMutationInDev.js │ │ │ └── flattenStyle.js │ │ └── __tests__ │ │ ├── ReactFabric-test.internal.js │ │ ├── ReactFabricAndNative-test.internal.js │ │ ├── ReactNativeAttributePayload-test.js │ │ ├── ReactNativeError-test.internal.js │ │ ├── ReactNativeEvents-test.internal.js │ │ ├── ReactNativeMount-test.internal.js │ │ ├── __snapshots__ │ │ ├── ReactFabric-test.internal.js.snap │ │ ├── ReactNativeEvents-test.internal.js.snap │ │ └── ReactNativeMount-test.internal.js.snap │ │ └── createReactNativeComponentClass-test.internal.js ├── react-noop-renderer │ ├── README.md │ ├── index.js │ ├── npm │ │ ├── index.js │ │ ├── persistent.js │ │ └── server.js │ ├── package.json │ ├── persistent.js │ ├── server.js │ └── src │ │ ├── ReactNoop.js │ │ ├── ReactNoopPersistent.js │ │ ├── ReactNoopServer.js │ │ └── createReactNoop.js ├── react-reconciler │ ├── README.md │ ├── index.js │ ├── inline-typed.js │ ├── inline.art.js │ ├── inline.dom-browser.js │ ├── inline.dom.js │ ├── inline.fabric.js │ ├── inline.fire.js │ ├── inline.native.js │ ├── inline.test.js │ ├── npm │ │ ├── index.js │ │ ├── persistent.js │ │ └── reflection.js │ ├── package.json │ ├── persistent.js │ ├── reflection.js │ └── src │ │ ├── ReactCapturedValue.js │ │ ├── ReactChildFiber.js │ │ ├── ReactCurrentFiber.js │ │ ├── ReactDebugFiberPerf.js │ │ ├── ReactFiber.js │ │ ├── ReactFiberBeginWork.js │ │ ├── ReactFiberClassComponent.js │ │ ├── ReactFiberCommitWork.js │ │ ├── ReactFiberCompleteWork.js │ │ ├── ReactFiberContext.js │ │ ├── ReactFiberDevToolsHook.js │ │ ├── ReactFiberErrorDialog.js │ │ ├── ReactFiberErrorLogger.js │ │ ├── ReactFiberEvents.js │ │ ├── ReactFiberExpirationTime.js │ │ ├── ReactFiberFundamental.js │ │ ├── ReactFiberHooks.js │ │ ├── ReactFiberHostConfig.js │ │ ├── ReactFiberHostContext.js │ │ ├── ReactFiberHotReloading.js │ │ ├── ReactFiberHydrationContext.js │ │ ├── ReactFiberInstrumentation.js │ │ ├── ReactFiberLazyComponent.js │ │ ├── ReactFiberNewContext.js │ │ ├── ReactFiberReconciler.js │ │ ├── ReactFiberRoot.js │ │ ├── ReactFiberScope.js │ │ ├── ReactFiberStack.js │ │ ├── ReactFiberSuspenseComponent.js │ │ ├── ReactFiberSuspenseConfig.js │ │ ├── ReactFiberSuspenseContext.js │ │ ├── ReactFiberThrow.js │ │ ├── ReactFiberTreeReflection.js │ │ ├── ReactFiberUnwindWork.js │ │ ├── ReactFiberWorkLoop.js │ │ ├── ReactHookEffectTags.js │ │ ├── ReactProfilerTimer.js │ │ ├── ReactStrictModeWarnings.js │ │ ├── ReactTypeOfMode.js │ │ ├── ReactUpdateQueue.js │ │ ├── SchedulerWithReactIntegration.js │ │ ├── __tests__ │ │ ├── ErrorBoundaryReconciliation-test.internal.js │ │ ├── ReactBatchedMode-test.internal.js │ │ ├── ReactDisableSchedulerTimeoutBasedOnReactExpirationTime-test.internal.js │ │ ├── ReactExpiration-test.internal.js │ │ ├── ReactFiberFundamental-test.internal.js │ │ ├── ReactFiberHostContext-test.internal.js │ │ ├── ReactFragment-test.js │ │ ├── ReactHooks-test.internal.js │ │ ├── ReactHooksWithNoopRenderer-test.internal.js │ │ ├── ReactIncremental-test.internal.js │ │ ├── ReactIncrementalErrorHandling-test.internal.js │ │ ├── ReactIncrementalErrorLogging-test.js │ │ ├── ReactIncrementalErrorReplay-test.internal.js │ │ ├── ReactIncrementalErrorReplay-test.js │ │ ├── ReactIncrementalPerf-test.internal.js │ │ ├── ReactIncrementalReflection-test.internal.js │ │ ├── ReactIncrementalScheduling-test.internal.js │ │ ├── ReactIncrementalSideEffects-test.internal.js │ │ ├── ReactIncrementalTriangle-test.internal.js │ │ ├── ReactIncrementalUpdates-test.internal.js │ │ ├── ReactIncrementalUpdatesMinimalism-test.js │ │ ├── ReactLazy-test.internal.js │ │ ├── ReactMemo-test.internal.js │ │ ├── ReactNewContext-test.internal.js │ │ ├── ReactNoopRendererAct-test.js │ │ ├── ReactPersistent-test.js │ │ ├── ReactPersistentUpdatesMinimalism-test.js │ │ ├── ReactSchedulerIntegration-test.internal.js │ │ ├── ReactScope-test.internal.js │ │ ├── ReactSuspense-test.internal.js │ │ ├── ReactSuspenseCallback-test.internal.js │ │ ├── ReactSuspenseFuzz-test.internal.js │ │ ├── ReactSuspenseList-test.internal.js │ │ ├── ReactSuspensePlaceholder-test.internal.js │ │ ├── ReactSuspenseWithNoopRenderer-test.internal.js │ │ ├── ReactTopLevelFragment-test.js │ │ ├── ReactTopLevelText-test.js │ │ ├── ReactTracing-test.internal.js │ │ └── __snapshots__ │ │ │ ├── ReactHooks-test.internal.js.snap │ │ │ └── ReactIncrementalPerf-test.internal.js.snap │ │ ├── forks │ │ ├── ReactFiberErrorDialog.native.js │ │ ├── ReactFiberErrorDialog.www.js │ │ ├── ReactFiberHostConfig.art.js │ │ ├── ReactFiberHostConfig.custom.js │ │ ├── ReactFiberHostConfig.dom-browser.js │ │ ├── ReactFiberHostConfig.dom.js │ │ ├── ReactFiberHostConfig.fabric.js │ │ ├── ReactFiberHostConfig.native.js │ │ └── ReactFiberHostConfig.test.js │ │ └── maxSigned31BitInt.js ├── react-refresh │ ├── README.md │ ├── babel.js │ ├── npm │ │ ├── babel.js │ │ └── runtime.js │ ├── package.json │ ├── runtime.js │ └── src │ │ ├── ReactFreshBabelPlugin.js │ │ ├── ReactFreshRuntime.js │ │ └── __tests__ │ │ ├── ReactFresh-test.js │ │ ├── ReactFreshBabelPlugin-test.js │ │ ├── ReactFreshIntegration-test.js │ │ ├── ReactFreshMultipleRenderer-test.internal.js │ │ └── __snapshots__ │ │ └── ReactFreshBabelPlugin-test.js.snap ├── react-stream │ ├── README.md │ ├── index.js │ ├── inline-typed.js │ ├── inline.dom-browser.js │ ├── inline.dom.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ ├── ReactFizzFormatConfig.js │ │ ├── ReactFizzHostConfig.js │ │ ├── ReactFizzHostConfigBrowser.js │ │ ├── ReactFizzHostConfigNode.js │ │ ├── ReactFizzStreamer.js │ │ ├── __tests__ │ │ └── ReactServer-test.js │ │ └── forks │ │ ├── ReactFizzFormatConfig.custom.js │ │ ├── ReactFizzFormatConfig.dom-browser.js │ │ ├── ReactFizzFormatConfig.dom.js │ │ ├── ReactFizzHostConfig.custom.js │ │ ├── ReactFizzHostConfig.dom-browser.js │ │ └── ReactFizzHostConfig.dom.js ├── react-test-renderer │ ├── README.md │ ├── index.js │ ├── npm │ │ ├── index.js │ │ └── shallow.js │ ├── package.json │ ├── shallow.js │ └── src │ │ ├── ReactShallowRenderer.js │ │ ├── ReactTestHostConfig.js │ │ ├── ReactTestRenderer.js │ │ ├── ReactTestRendererAct.js │ │ └── __tests__ │ │ ├── ReactShallowRenderer-test.js │ │ ├── ReactShallowRendererHooks-test.js │ │ ├── ReactShallowRendererMemo-test.js │ │ ├── ReactTestRenderer-test.internal.js │ │ ├── ReactTestRenderer-test.js │ │ ├── ReactTestRendererAct-test.js │ │ ├── ReactTestRendererAsync-test.js │ │ └── ReactTestRendererTraversal-test.js ├── react │ ├── README.md │ ├── index.js │ ├── npm │ │ └── index.js │ ├── package.json │ └── src │ │ ├── IsSomeRendererActing.js │ │ ├── React.js │ │ ├── ReactBaseClasses.js │ │ ├── ReactBatchConfig.js │ │ ├── ReactChildren.js │ │ ├── ReactContext.js │ │ ├── ReactCreateRef.js │ │ ├── ReactCurrentBatchConfig.js │ │ ├── ReactCurrentDispatcher.js │ │ ├── ReactCurrentOwner.js │ │ ├── ReactDebugCurrentFrame.js │ │ ├── ReactElement.js │ │ ├── ReactElementValidator.js │ │ ├── ReactHooks.js │ │ ├── ReactLazy.js │ │ ├── ReactNoopUpdateQueue.js │ │ ├── ReactSharedInternals.js │ │ ├── __tests__ │ │ ├── ReactChildren-test.js │ │ ├── ReactClassEquivalence-test.js │ │ ├── ReactCoffeeScriptClass-test.coffee │ │ ├── ReactContextValidator-test.js │ │ ├── ReactCreateRef-test.js │ │ ├── ReactDOMTracing-test.internal.js │ │ ├── ReactES6Class-test.js │ │ ├── ReactElement-test.js │ │ ├── ReactElementClone-test.js │ │ ├── ReactElementJSX-test.internal.js │ │ ├── ReactElementValidator-test.internal.js │ │ ├── ReactJSXElement-test.js │ │ ├── ReactJSXElementValidator-test.js │ │ ├── ReactProfiler-test.internal.js │ │ ├── ReactProfilerDOM-test.internal.js │ │ ├── ReactProfilerDevToolsIntegration-test.internal.js │ │ ├── ReactPureComponent-test.js │ │ ├── ReactStrictMode-test.internal.js │ │ ├── ReactStrictMode-test.js │ │ ├── ReactTypeScriptClass-test.ts │ │ ├── __snapshots__ │ │ │ └── ReactProfiler-test.internal.js.snap │ │ ├── createReactClassIntegration-test.internal.js │ │ ├── createReactClassIntegration-test.js │ │ ├── forwardRef-test.internal.js │ │ ├── forwardRef-test.js │ │ ├── onlyChild-test.js │ │ └── testDefinitions │ │ │ ├── PropTypes.d.ts │ │ │ ├── React.d.ts │ │ │ └── ReactDOM.d.ts │ │ ├── forks │ │ ├── ReactCurrentDispatcher.www.js │ │ ├── ReactCurrentOwner.www.js │ │ └── ReactSharedInternals.umd.js │ │ ├── forwardRef.js │ │ └── memo.js ├── scheduler │ ├── README.md │ ├── index.js │ ├── npm │ │ ├── index.js │ │ ├── tracing-profiling.js │ │ ├── tracing.js │ │ ├── umd │ │ │ ├── scheduler-tracing.development.js │ │ │ ├── scheduler-tracing.production.min.js │ │ │ ├── scheduler-tracing.profiling.min.js │ │ │ ├── scheduler.development.js │ │ │ ├── scheduler.production.min.js │ │ │ └── scheduler.profiling.min.js │ │ └── unstable_mock.js │ ├── package.json │ ├── src │ │ ├── Scheduler.js │ │ ├── SchedulerFeatureFlags.js │ │ ├── SchedulerHostConfig.js │ │ ├── SchedulerMinHeap.js │ │ ├── SchedulerPriorities.js │ │ ├── SchedulerProfiling.js │ │ ├── Tracing.js │ │ ├── TracingSubscriptions.js │ │ ├── __tests__ │ │ │ ├── Scheduler-test.js │ │ │ ├── SchedulerBrowser-test.internal.js │ │ │ ├── SchedulerNoDOM-test.js │ │ │ ├── SchedulerProfiling-test.js │ │ │ ├── SchedulerRAFOld-test.internal.js │ │ │ ├── SchedulerUMDBundle-test.internal.js │ │ │ ├── Tracing-test.internal.js │ │ │ ├── Tracing-test.js │ │ │ └── TracingSubscriptions-test.internal.js │ │ └── forks │ │ │ ├── SchedulerFeatureFlags.www.js │ │ │ ├── SchedulerHostConfig.default.js │ │ │ └── SchedulerHostConfig.mock.js │ ├── tracing.js │ └── unstable_mock.js ├── shared │ ├── ExecutionEnvironment.js │ ├── HostConfigWithNoHydration.js │ ├── HostConfigWithNoMutation.js │ ├── HostConfigWithNoPersistence.js │ ├── ReactDOMTypes.js │ ├── ReactElementType.js │ ├── ReactError.js │ ├── ReactErrorProd.js │ ├── ReactErrorUtils.js │ ├── ReactFeatureFlags.js │ ├── ReactInstanceMap.js │ ├── ReactLazyComponent.js │ ├── ReactPortal.js │ ├── ReactRootTags.js │ ├── ReactSharedInternals.js │ ├── ReactSideEffectTags.js │ ├── ReactSymbols.js │ ├── ReactTreeTraversal.js │ ├── ReactTypes.js │ ├── ReactVersion.js │ ├── ReactWorkTags.js │ ├── __tests__ │ │ ├── ReactDOMFrameScheduling-test.js │ │ ├── ReactError-test.internal.js │ │ ├── ReactErrorProd-test.internal.js │ │ ├── ReactErrorUtils-test.internal.js │ │ ├── ReactSymbols-test.internal.js │ │ └── describeComponentFrame-test.js │ ├── createEventResponder.js │ ├── createFundamentalComponent.js │ ├── createScope.js │ ├── describeComponentFrame.js │ ├── endsWith.js │ ├── enqueueTask.js │ ├── forks │ │ ├── ReactFeatureFlags.native-fb.js │ │ ├── ReactFeatureFlags.native-oss.js │ │ ├── ReactFeatureFlags.persistent.js │ │ ├── ReactFeatureFlags.readonly.js │ │ ├── ReactFeatureFlags.test-renderer.js │ │ ├── ReactFeatureFlags.test-renderer.www.js │ │ ├── ReactFeatureFlags.www.js │ │ ├── Scheduler.umd.js │ │ ├── SchedulerTracing.umd.js │ │ ├── invokeGuardedCallbackImpl.www.js │ │ ├── lowPriorityWarningWithoutStack.www.js │ │ ├── object-assign.umd.js │ │ └── warningWithoutStack.www.js │ ├── getComponentName.js │ ├── hasBadMapPolyfill.js │ ├── invariant.js │ ├── invokeGuardedCallbackImpl.js │ ├── isTextInputElement.js │ ├── isValidElementType.js │ ├── lowPriorityWarning.js │ ├── lowPriorityWarningWithoutStack.js │ ├── objectIs.js │ ├── package.json │ ├── shallowEqual.js │ ├── warning.js │ └── warningWithoutStack.js └── use-subscription │ ├── README.md │ ├── index.js │ ├── npm │ └── index.js │ ├── package.json │ └── src │ ├── __tests__ │ └── useSubscription-test.internal.js │ └── useSubscription.js ├── scripts ├── authors ├── babel │ ├── __tests__ │ │ ├── transform-prevent-infinite-loops-test.js │ │ └── wrap-warning-with-env-check-test.js │ ├── transform-object-assign-require.js │ ├── transform-prevent-infinite-loops.js │ └── wrap-warning-with-env-check.js ├── bench │ ├── .gitignore │ ├── README.md │ ├── benchmark.js │ ├── benchmarks │ │ ├── hacker-news │ │ │ ├── benchmark.js │ │ │ ├── build.js │ │ │ ├── generate.js │ │ │ ├── grayarrow.gif │ │ │ ├── index.html │ │ │ ├── logo.png │ │ │ ├── style.css │ │ │ └── top-stories.js │ │ ├── pe-class-components │ │ │ ├── benchmark.js │ │ │ ├── build.js │ │ │ └── index.html │ │ ├── pe-functional-components │ │ │ ├── benchmark.js │ │ │ ├── build.js │ │ │ └── index.html │ │ └── pe-no-components │ │ │ ├── benchmark.js │ │ │ ├── build.js │ │ │ └── index.html │ ├── build.js │ ├── package.json │ ├── runner.js │ ├── server.js │ ├── stats.js │ └── yarn.lock ├── circleci │ ├── add_build_info_json.sh │ ├── bench.sh │ ├── check_license.sh │ ├── check_minified_errors.sh │ ├── check_modules.sh │ ├── pack_and_store_artifact.sh │ ├── set_up_github_keys.sh │ ├── test_coverage.sh │ ├── test_print_warnings.sh │ ├── update_package_versions.sh │ └── upload_build.sh ├── error-codes │ ├── README.md │ ├── Types.js │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── transform-error-messages.js.snap │ │ ├── invertObject-test.js │ │ └── transform-error-messages.js │ ├── codes.json │ ├── extract-errors.js │ ├── invertObject.js │ └── transform-error-messages.js ├── eslint-rules │ ├── README.md │ ├── __tests__ │ │ ├── no-primitive-constructors-test.internal.js │ │ ├── no-to-warn-dev-within-to-throw-test.internal.js │ │ └── warning-and-invariant-args-test.internal.js │ ├── index.js │ ├── no-primitive-constructors.js │ ├── no-to-warn-dev-within-to-throw.js │ ├── package.json │ └── warning-and-invariant-args.js ├── eslint │ └── index.js ├── flow │ ├── config │ │ └── flowconfig │ ├── createFlowConfigs.js │ ├── environment.js │ ├── react-devtools.js │ ├── react-native-host-hooks.js │ └── runFlow.js ├── git │ └── pre-commit ├── jest │ ├── config.base.js │ ├── config.build-devtools.js │ ├── config.build.js │ ├── config.source-persistent.js │ ├── config.source.js │ ├── dont-run-jest-directly.js │ ├── matchers │ │ ├── __tests__ │ │ │ └── toWarnDev-test.js │ │ ├── interactionTracingMatchers.js │ │ ├── profilerMatchers.js │ │ ├── reactTestMatchers.js │ │ ├── schedulerTestMatchers.js │ │ └── toWarnDev.js │ ├── noHaste.js │ ├── preprocessor.js │ ├── setupEnvironment.js │ ├── setupHostConfigs.js │ ├── setupTests.build.js │ ├── setupTests.js │ ├── setupTests.persistent.js │ ├── shouldIgnoreConsoleError.js │ ├── spec-equivalence-reporter │ │ └── setupTests.js │ └── typescript │ │ ├── jest.d.ts │ │ └── preprocessor.js ├── lightyear-benchmarks │ ├── .eslintrc │ ├── benchmarks │ │ ├── Recursive.js │ │ ├── balanced-tree (4-4) │ │ │ └── index.js │ │ ├── balanced-tree (4-6) │ │ │ └── index.js │ │ ├── deep-tree (500) │ │ │ └── index.js │ │ ├── deep-tree (5000) │ │ │ └── index.js │ │ ├── hacker-news │ │ │ ├── index.js │ │ │ └── top-stories.js │ │ ├── wide-tree (500) │ │ │ └── index.js │ │ └── wide-tree (5000) │ │ │ └── index.js │ ├── index.js │ ├── package.json │ ├── runner.js │ └── yarn.lock ├── lightyear-release │ └── index.js ├── perf-counters │ ├── Makefile │ ├── README.md │ ├── binding.gyp │ ├── index.js │ ├── package.json │ └── src │ │ ├── hardware-counter.cpp │ │ ├── hardware-counter.h │ │ ├── jsc-perf.cpp │ │ ├── perf-counters.cpp │ │ ├── portability.h │ │ ├── thread-local.cpp │ │ └── thread-local.h ├── prettier │ └── index.js ├── print-warnings │ ├── README.md │ └── print-warnings.js ├── release │ ├── .gitignore │ ├── README.md │ ├── ci-add-build-info-json.js │ ├── ci-update-package-versions.js │ ├── create-canary-commands │ │ ├── add-build-info-json.js │ │ ├── build-artifacts.js │ │ ├── confirm-automated-testing.js │ │ ├── copy-repo-to-temp-directory.js │ │ ├── npm-pack-and-unpack.js │ │ └── update-version-numbers.js │ ├── create-canary.js │ ├── package.json │ ├── prepare-canary-commands │ │ ├── check-environment-variables.js │ │ ├── download-build-artifacts.js │ │ ├── get-latest-master-build-number.js │ │ └── parse-params.js │ ├── prepare-canary.js │ ├── prepare-stable-commands │ │ ├── check-out-packages.js │ │ ├── confirm-stable-version-numbers.js │ │ ├── get-latest-canary-version.js │ │ ├── guess-stable-version-numbers.js │ │ ├── parse-params.js │ │ └── update-stable-version-numbers.js │ ├── prepare-stable.js │ ├── publish-commands │ │ ├── check-npm-permissions.js │ │ ├── confirm-skipped-packages.js │ │ ├── confirm-version-and-tags.js │ │ ├── download-error-codes-from-ci.js │ │ ├── parse-params.js │ │ ├── print-follow-up-instructions.js │ │ ├── prompt-for-otp.js │ │ ├── publish-to-npm.js │ │ ├── update-stable-version-numbers.js │ │ ├── validate-skip-packages.js │ │ └── validate-tags.js │ ├── publish.js │ ├── shared-commands │ │ ├── print-prerelease-summary.js │ │ ├── test-packaging-fixture.js │ │ └── test-tracing-fixture.js │ ├── snapshot-test.js │ ├── snapshot-test.snapshot │ ├── theme.js │ ├── utils.js │ └── yarn.lock ├── rollup │ ├── build.js │ ├── bundles.js │ ├── consolidateBundleSizes.js │ ├── forks.js │ ├── modules.js │ ├── packaging.js │ ├── plugins │ │ ├── closure-plugin.js │ │ ├── sizes-plugin.js │ │ ├── strip-unused-imports.js │ │ └── use-forks-plugin.js │ ├── shims │ │ ├── facebook-www │ │ │ ├── ReactBrowserEventEmitter_DO_NOT_USE.js │ │ │ ├── ReactDOMComponentTree_DO_NOT_USE.js │ │ │ ├── ReactInstanceMap_DO_NOT_USE.js │ │ │ ├── findDOMNode.js │ │ │ └── renderSubtreeIntoContainer_DO_NOT_USE.js │ │ └── react-native │ │ │ ├── NativeMethodsMixin.js │ │ │ ├── ReactFabric.js │ │ │ ├── ReactFeatureFlags.js │ │ │ ├── ReactNative.js │ │ │ ├── ReactNativeViewConfigRegistry.js │ │ │ └── createReactNativeComponentClass.js │ ├── stats.js │ ├── sync.js │ ├── utils.js │ ├── validate │ │ ├── eslintignore │ │ ├── eslintrc.cjs.js │ │ ├── eslintrc.fb.js │ │ ├── eslintrc.rn.js │ │ ├── eslintrc.umd.js │ │ └── index.js │ └── wrappers.js ├── shared │ ├── __tests__ │ │ └── evalToString-test.js │ ├── evalToString.js │ ├── inlinedHostConfigs.js │ ├── listChangedFiles.js │ └── pathsByLanguageVersion.js └── tasks │ ├── danger.js │ ├── eslint.js │ ├── flow-ci.js │ ├── flow.js │ ├── linc.js │ └── version-check.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | max_line_length = 80 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | max_line_length = 0 15 | trim_trailing_whitespace = false 16 | 17 | [COMMIT_EDITMSG] 18 | max_line_length = 0 19 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # Third party 2 | **/node_modules 3 | 4 | # Not written by hand 5 | packages/react-art/npm/lib 6 | 7 | # Build products 8 | build/ 9 | coverage/ 10 | fixtures/ 11 | scripts/bench/benchmarks/**/*.js 12 | 13 | # React repository clone 14 | scripts/bench/remote-repo/ 15 | 16 | packages/react-devtools-core/dist 17 | packages/react-devtools-extensions/chrome/build 18 | packages/react-devtools-extensions/firefox/build 19 | packages/react-devtools-extensions/shared/build 20 | packages/react-devtools-inline/dist 21 | packages/react-devtools-shell/dist -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v10.16.3 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | packages/react-devtools-core/dist 2 | packages/react-devtools-extensions/chrome/build 3 | packages/react-devtools-extensions/firefox/build 4 | packages/react-devtools-extensions/shared/build 5 | packages/react-devtools-inline/dist 6 | packages/react-devtools-shell/dist -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const {esNextPaths} = require('./scripts/shared/pathsByLanguageVersion'); 4 | 5 | module.exports = { 6 | bracketSpacing: false, 7 | singleQuote: true, 8 | jsxBracketSameLine: true, 9 | trailingComma: 'es5', 10 | printWidth: 80, 11 | parser: 'babylon', 12 | 13 | overrides: [ 14 | { 15 | files: esNextPaths, 16 | options: { 17 | trailingComma: 'all', 18 | }, 19 | }, 20 | ], 21 | }; 22 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /examples/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.eslintrc.js", 3 | "parserOptions": { 4 | "ecmaVersion": 2017, 5 | "sourceType": "module", 6 | "ecmaFeatures": { 7 | "experimentalObjectRestSpread": true, 8 | "jsx": true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/react-apollo-hooks/.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | *.log 3 | npm-debug.log* 4 | .DS_Store 5 | 6 | coverage 7 | node_modules 8 | build 9 | .env.local 10 | .env.development.local 11 | .env.test.local 12 | .env.production.local -------------------------------------------------------------------------------- /examples/react-apollo-hooks/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/examples/react-apollo-hooks/public/favicon.ico -------------------------------------------------------------------------------- /examples/react-apollo-hooks/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | 3 | -------------------------------------------------------------------------------- /examples/redux/.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | *.log 3 | npm-debug.log* 4 | .DS_Store 5 | 6 | coverage 7 | node_modules 8 | build 9 | .env.local 10 | .env.development.local 11 | .env.test.local 12 | .env.production.local -------------------------------------------------------------------------------- /examples/redux/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/examples/redux/public/favicon.ico -------------------------------------------------------------------------------- /examples/redux/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | 3 | -------------------------------------------------------------------------------- /examples/redux/src/app/createStore.js: -------------------------------------------------------------------------------- 1 | import { 2 | combineReducers, 3 | createStore as createReduxStore, 4 | applyMiddleware, 5 | } from 'redux'; 6 | import thunk from 'redux-thunk'; 7 | import {articleListReducer} from './Home'; 8 | import {articleReducer} from './Article'; 9 | 10 | const reducer = combineReducers({ 11 | articleList: articleListReducer, 12 | articles: articleReducer, 13 | }); 14 | 15 | export default function createStore(initialState) { 16 | return createReduxStore(reducer, initialState, applyMiddleware(thunk)); 17 | } 18 | -------------------------------------------------------------------------------- /examples/redux/src/client.js: -------------------------------------------------------------------------------- 1 | import App from './app/App'; 2 | import createStore from './app/createStore'; 3 | import {Provider} from 'react-redux'; 4 | import {BrowserRouter} from 'react-router-dom'; 5 | import React from 'react'; 6 | import {hydrate} from 'react-dom'; 7 | 8 | const store = createStore(window.__INITIAL_STATE__); 9 | 10 | hydrate( 11 | 12 | 13 | 14 | 15 | , 16 | document.getElementById('root') 17 | ); 18 | 19 | if (module.hot) { 20 | module.hot.accept(); 21 | } 22 | -------------------------------------------------------------------------------- /examples/urql/.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | *.log 3 | npm-debug.log* 4 | .DS_Store 5 | 6 | coverage 7 | node_modules 8 | build 9 | .env.local 10 | .env.development.local 11 | .env.test.local 12 | .env.production.local -------------------------------------------------------------------------------- /examples/urql/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/examples/urql/public/favicon.ico -------------------------------------------------------------------------------- /examples/urql/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | 3 | -------------------------------------------------------------------------------- /fixtures/art/.gitignore: -------------------------------------------------------------------------------- 1 | bundle.js -------------------------------------------------------------------------------- /fixtures/art/README.md: -------------------------------------------------------------------------------- 1 | # VectorWidget example 2 | 3 | To try this example, run: 4 | 5 | ``` 6 | yarn 7 | yarn build 8 | ``` 9 | 10 | in this directory, then open index.html in your browser. 11 | -------------------------------------------------------------------------------- /fixtures/art/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var React = require('react'); 4 | var ReactDOM = require('react-dom'); 5 | var VectorWidget = require('./VectorWidget'); 6 | 7 | ReactDOM.render(, document.getElementById('container')); 8 | -------------------------------------------------------------------------------- /fixtures/art/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | VectorWidget 5 | 6 | 7 | 8 |
9 |

If you're seeing this message, it means you haven't generated the bundle file for this example. Try running:

10 | 11 |

12 |     npm install
13 |     npm run build
14 |     
15 | 16 |

then reload the page.

17 |
18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /fixtures/art/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "babel-core": "^6.24.0", 4 | "babel-loader": "^6.4.1", 5 | "babel-plugin-transform-class-properties": "^6.24.1", 6 | "babel-preset-es2015": "^6.6.0", 7 | "babel-preset-react": "^6.5.0", 8 | "react": "link:../../build/node_modules/react", 9 | "react-art": "link:../../build/node_modules/react-art/", 10 | "react-dom": "link:../../build/node_modules/react-dom", 11 | "webpack": "^1.14.0" 12 | }, 13 | "scripts": { 14 | "build": "webpack app.js bundle.js" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /fixtures/attribute-behavior/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | /public/react.development.js 12 | /public/react-dom.development.js 13 | /public/react-dom-server.browser.development.js 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /fixtures/attribute-behavior/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/fixtures/attribute-behavior/public/favicon.ico -------------------------------------------------------------------------------- /fixtures/attribute-behavior/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /fixtures/attribute-behavior/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | }); 9 | -------------------------------------------------------------------------------- /fixtures/attribute-behavior/src/index.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | body { 6 | font-family: monospace; 7 | font-size: 12px; 8 | } 9 | -------------------------------------------------------------------------------- /fixtures/attribute-behavior/src/index.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | import React from 'react'; 3 | import ReactDOM from 'react-dom'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /fixtures/devtools/regression/server.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const finalhandler = require('finalhandler'); 4 | const http = require('http'); 5 | const serveStatic = require('serve-static'); 6 | 7 | // Serve fixtures folder 8 | const serve = serveStatic(__dirname, {index: 'index.html'}); 9 | 10 | // Create server 11 | const server = http.createServer(function onRequest(req, res) { 12 | serve(req, res, finalhandler(req, res)); 13 | }); 14 | 15 | // Listen 16 | server.listen(3000); 17 | -------------------------------------------------------------------------------- /fixtures/devtools/regression/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | font-size: 12px; 4 | } 5 | 6 | h1 { 7 | margin: 0; 8 | font-size: 20px; 9 | } 10 | 11 | h2 { 12 | margin: 1rem 0 0; 13 | } 14 | 15 | iframe { 16 | border: 1px solid #ddd; 17 | border-radius: 0.5rem; 18 | } 19 | 20 | code { 21 | white-space: nowrap; 22 | } 23 | 24 | .Feature { 25 | margin: 1rem 0; 26 | border-bottom: 1px solid #eee; 27 | padding-bottom: 1rem; 28 | } 29 | .FeatureHeader { 30 | font-size: 16px; 31 | margin-bottom: 0.5rem; 32 | } 33 | .FeatureCode { 34 | background-color: #eee; 35 | padding: 0.25rem; 36 | border-radius: 0.25rem; 37 | } 38 | -------------------------------------------------------------------------------- /fixtures/dom/README.md: -------------------------------------------------------------------------------- 1 | # DOM Fixtures 2 | 3 | A set of DOM test cases for quickly identifying browser issues. 4 | 5 | ## Setup 6 | 7 | To reference a local build of React, first run `yarn build` at the root 8 | of the React project. Then: 9 | 10 | ``` 11 | cd fixtures/dom 12 | yarn 13 | yarn start 14 | ``` 15 | 16 | The `start` command runs a script that copies over the local build of react into 17 | the public directory. 18 | -------------------------------------------------------------------------------- /fixtures/dom/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/fixtures/dom/public/favicon.ico -------------------------------------------------------------------------------- /fixtures/dom/public/test.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/fixtures/dom/public/test.mp4 -------------------------------------------------------------------------------- /fixtures/dom/src/components/App.js: -------------------------------------------------------------------------------- 1 | import Header from './Header'; 2 | import Fixtures from './fixtures'; 3 | import '../style.css'; 4 | 5 | const React = window.React; 6 | 7 | class App extends React.Component { 8 | render() { 9 | return ( 10 |
11 |
12 | 13 |
14 | ); 15 | } 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/Fixture.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | const React = window.React; 3 | 4 | const propTypes = { 5 | children: PropTypes.node.isRequired, 6 | }; 7 | 8 | class Fixture extends React.Component { 9 | render() { 10 | const {children} = this.props; 11 | 12 | return
{children}
; 13 | } 14 | } 15 | 16 | Fixture.propTypes = propTypes; 17 | 18 | export default Fixture; 19 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/FixtureSet.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | const React = window.React; 3 | 4 | const propTypes = { 5 | title: PropTypes.node.isRequired, 6 | description: PropTypes.node, 7 | }; 8 | 9 | class FixtureSet extends React.Component { 10 | render() { 11 | const {title, description, children} = this.props; 12 | 13 | return ( 14 |
15 |

{title}

16 | {description &&

{description}

} 17 | 18 | {children} 19 |
20 | ); 21 | } 22 | } 23 | 24 | FixtureSet.propTypes = propTypes; 25 | 26 | export default FixtureSet; 27 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/IssueList.js: -------------------------------------------------------------------------------- 1 | const React = window.React; 2 | 3 | function csv(string) { 4 | return string.split(/\s*,\s*/); 5 | } 6 | 7 | export default function IssueList({issues}) { 8 | if (!issues) { 9 | return null; 10 | } 11 | 12 | if (typeof issues === 'string') { 13 | issues = csv(issues); 14 | } 15 | 16 | let links = issues.reduce((memo, issue, i) => { 17 | return memo.concat( 18 | i > 0 && i < issues.length ? ', ' : null, 19 | 20 | {issue} 21 | 22 | ); 23 | }, []); 24 | 25 | return {links}; 26 | } 27 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/fixtures/event-pooling/index.js: -------------------------------------------------------------------------------- 1 | import FixtureSet from '../../FixtureSet'; 2 | import MouseMove from './mouse-move'; 3 | import Persistence from './persistence'; 4 | 5 | const React = window.React; 6 | 7 | class EventPooling extends React.Component { 8 | render() { 9 | return ( 10 | 11 | 12 | 13 | 14 | ); 15 | } 16 | } 17 | 18 | export default EventPooling; 19 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/fixtures/hydration/code-transformer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Babel works across all browsers, however it requires many polyfills. 3 | */ 4 | 5 | import 'core-js/es6/weak-map'; 6 | import 'core-js/es6/weak-set'; 7 | import 'core-js/es6/number'; 8 | import 'core-js/es6/string'; 9 | import 'core-js/es6/array'; 10 | import 'core-js/modules/es6.object.set-prototype-of'; 11 | 12 | import {transform} from '@babel/standalone'; 13 | 14 | const presets = ['es2015', 'stage-3', 'react']; 15 | 16 | export function compile(raw) { 17 | return transform(raw, {presets}).code; 18 | } 19 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/fixtures/hydration/data.js: -------------------------------------------------------------------------------- 1 | export const SAMPLE_CODE = ` 2 | class Fixture extends React.Component { 3 | state = { 4 | value: 'asdf' 5 | } 6 | 7 | onChange(event) { 8 | this.setState({ value: event.target.value }); 9 | } 10 | 11 | render() { 12 | const { value } = this.state; 13 | 14 | return ( 15 |
16 | 17 |

Value: {value}

18 |
19 | ); 20 | } 21 | } 22 | `.trim(); 23 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/fixtures/mouse-events/index.js: -------------------------------------------------------------------------------- 1 | import FixtureSet from '../../FixtureSet'; 2 | import MouseMovement from './mouse-movement'; 3 | 4 | const React = window.React; 5 | 6 | class MouseEvents extends React.Component { 7 | render() { 8 | return ( 9 | 10 | 11 | 12 | ); 13 | } 14 | } 15 | 16 | export default MouseEvents; 17 | -------------------------------------------------------------------------------- /fixtures/dom/src/components/propTypes.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import semver from 'semver'; 3 | 4 | export function semverString(props, propName, componentName) { 5 | let version = props[propName]; 6 | 7 | let error = PropTypes.string(...arguments); 8 | if (!error && version != null && !semver.valid(version)) 9 | error = new Error( 10 | `\`${propName}\` should be a valid "semantic version" matching ` + 11 | 'an existing React version' 12 | ); 13 | 14 | return error || null; 15 | } 16 | -------------------------------------------------------------------------------- /fixtures/dom/src/find-dom-node.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides a standard way to access a DOM node across all versions of 3 | * React. 4 | */ 5 | 6 | import {reactPaths} from './react-loader'; 7 | 8 | const React = window.React; 9 | const ReactDOM = window.ReactDOM; 10 | 11 | export function findDOMNode(target) { 12 | const {needsReactDOM} = reactPaths(); 13 | 14 | if (needsReactDOM) { 15 | return ReactDOM.findDOMNode(target); 16 | } else { 17 | // eslint-disable-next-line 18 | return React.findDOMNode(target); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /fixtures/dom/src/index.js: -------------------------------------------------------------------------------- 1 | import './polyfills'; 2 | import loadReact from './react-loader'; 3 | 4 | loadReact() 5 | .then(() => import('./components/App')) 6 | .then(App => { 7 | const {React, ReactDOM} = window; 8 | 9 | ReactDOM.render( 10 | React.createElement(App.default), 11 | document.getElementById('root') 12 | ); 13 | }); 14 | -------------------------------------------------------------------------------- /fixtures/eslint/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parserOptions": { 4 | "ecmaVersion": 8, 5 | "sourceType": "module", 6 | "ecmaFeatures": { 7 | "jsx": true 8 | } 9 | }, 10 | "plugins": ["react-hooks"], 11 | "rules": { 12 | "react-hooks/rules-of-hooks": 2, 13 | "react-hooks/exhaustive-deps": 2 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /fixtures/eslint/README.md: -------------------------------------------------------------------------------- 1 | # ESLint Playground Fixture 2 | 3 | This is an internal playground for quick iteration on our lint rules inside an IDE like VSCode. 4 | 5 | See instructions in `./index.js` in this directory. 6 | 7 | ![Demo](https://duaw26jehqd4r.cloudfront.net/items/2Z390a31003O0l0o0e3O/Screen%20Recording%202019-01-16%20at%2010.29%20PM.gif?v=d6856125) -------------------------------------------------------------------------------- /fixtures/eslint/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "eslint-playground", 4 | "dependencies": { 5 | "eslint": "4.1.0", 6 | "eslint-plugin-react-hooks": "link:./proxy" 7 | }, 8 | "scripts": { 9 | "start": "./watch.sh", 10 | "lint": "eslint index.js" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /fixtures/eslint/proxy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "version": "0.0.0" 4 | } -------------------------------------------------------------------------------- /fixtures/eslint/watch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | (cd ../.. && yarn build eslint --type=NODE_DEV) 3 | (cd ../.. && watchman-make --make 'yarn build eslint --type=NODE_DEV' -p 'packages/eslint-plugin-*/**/*' -t ignored) 4 | -------------------------------------------------------------------------------- /fixtures/expiration/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | 23 | public/react.development.js 24 | public/react-dom.development.js -------------------------------------------------------------------------------- /fixtures/expiration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "expiration-2", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.1.1", 7 | "react-dom": "^16.1.1", 8 | "react-scripts": "1.0.17" 9 | }, 10 | "scripts": { 11 | "prestart": 12 | "cp ../../build/node_modules/react/umd/react.development.js public/ && cp ../../build/node_modules/react-dom/umd/react-dom.development.js public/", 13 | "start": "react-scripts start", 14 | "build": "react-scripts build", 15 | "test": "react-scripts test --env=jsdom", 16 | "eject": "react-scripts eject" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /fixtures/fiber-debugger/.env: -------------------------------------------------------------------------------- 1 | NODE_PATH=../../build/packages -------------------------------------------------------------------------------- /fixtures/fiber-debugger/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # testing 7 | coverage 8 | 9 | # production 10 | build 11 | 12 | # misc 13 | .DS_Store 14 | npm-debug.log 15 | -------------------------------------------------------------------------------- /fixtures/fiber-debugger/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-fiber-debugger", 3 | "version": "0.0.1", 4 | "private": true, 5 | "devDependencies": { 6 | "react-scripts": "0.9.5" 7 | }, 8 | "dependencies": { 9 | "dagre": "^0.7.4", 10 | "pretty-format": "^4.2.1", 11 | "react-draggable": "^2.2.6", 12 | "react-motion": "^0.5.0" 13 | }, 14 | "scripts": { 15 | "start": "react-scripts start", 16 | "build": "react-scripts build" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /fixtures/fiber-debugger/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/fixtures/fiber-debugger/public/favicon.ico -------------------------------------------------------------------------------- /fixtures/fiber-debugger/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | React App 9 | 10 | 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /fixtures/fiber-debugger/src/index.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | height: 100vh; 6 | cursor: -webkit-grab; cursor: -moz-grab; 7 | } 8 | 9 | #root { 10 | height: 100vh; 11 | } 12 | 13 | * { 14 | box-sizing: border-box; 15 | } -------------------------------------------------------------------------------- /fixtures/fiber-debugger/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /fixtures/packaging/babel-standalone/dev.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 13 | 14 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/dev/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/dev/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "browserify-dev-fixture", 4 | "dependencies": { 5 | "browserify": "^13.3.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && browserify ./input.js -o output.js", 9 | "prebuild": "cp -r ../../../../build/node_modules/* ./node_modules/" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/prod/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/prod/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/prod/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/prod/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "browserify-prod-fixture", 4 | "dependencies": { 5 | "browserify": "^13.3.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && browserify ./input.js -g [envify --NODE_ENV 'production'] -o output.js", 9 | "prebuild": "cp -r ../../../../build/node_modules/* ./node_modules/" 10 | }, 11 | "devDependencies": { 12 | "envify": "^4.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/dev/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | output.js.map -------------------------------------------------------------------------------- /fixtures/packaging/brunch/dev/app/initialize.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/dev/config.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | paths: { 3 | public: '.', 4 | }, 5 | files: { 6 | javascripts: { 7 | joinTo: 'output.js', 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/dev/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "brunch-dev-fixture", 4 | "devDependencies": { 5 | "brunch": "^2.9.1", 6 | "javascript-brunch": "^2.0.0" 7 | }, 8 | "scripts": { 9 | "build": "rm -rf public && brunch build", 10 | "prebuild": "cp -r ../../../../build/node_modules/* ./node_modules/" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/prod/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | output.js.map -------------------------------------------------------------------------------- /fixtures/packaging/brunch/prod/app/initialize.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/prod/config.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | paths: { 3 | public: '.', 4 | }, 5 | files: { 6 | javascripts: { 7 | joinTo: 'output.js', 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/prod/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/prod/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/prod/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "brunch-prod-fixture", 4 | "devDependencies": { 5 | "brunch": "^2.9.1", 6 | "javascript-brunch": "^2.0.0" 7 | }, 8 | "scripts": { 9 | "build": "rm -rf public && brunch build -p", 10 | "prebuild": "cp -r ../../../../build/node_modules/* ./node_modules/" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /fixtures/packaging/globals/dev.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 12 | 13 | -------------------------------------------------------------------------------- /fixtures/packaging/globals/prod.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 12 | 13 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/dev/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/rjs/dev/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | baseUrl: '.', 3 | name: 'input', 4 | out: 'output.js', 5 | optimize: 'none', 6 | paths: { 7 | react: '../../../../build/node_modules/react/umd/react.development', 8 | 'react-dom': 9 | '../../../../build/node_modules/react-dom/umd/react-dom.development', 10 | schedule: '../../../../build/dist/schedule.development', 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/dev/input.js: -------------------------------------------------------------------------------- 1 | require(['react', 'react-dom'], function(React, ReactDOM) { 2 | ReactDOM.render( 3 | React.createElement('h1', null, 'Hello World!'), 4 | document.getElementById('container') 5 | ); 6 | }); 7 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "rjs-dev-fixture", 4 | "dependencies": { 5 | "requirejs": "^2.3.2" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && r.js -o config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/dev/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | requirejs@^2.3.2: 6 | version "2.3.5" 7 | resolved "https://registry.yarnpkg.com/requirejs/-/requirejs-2.3.5.tgz#617b9acbbcb336540ef4914d790323a8d4b861b0" 8 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/prod/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/rjs/prod/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | baseUrl: '.', 3 | name: 'input', 4 | out: 'output.js', 5 | optimize: 'none', 6 | paths: { 7 | react: '../../../../build/node_modules/react/umd/react.production.min', 8 | 'react-dom': 9 | '../../../../build/node_modules/react-dom/umd/react-dom.production.min', 10 | schedule: '../../../../build/dist/schedule.development', 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/prod/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/prod/input.js: -------------------------------------------------------------------------------- 1 | require(['react', 'react-dom'], function(React, ReactDOM) { 2 | ReactDOM.render( 3 | React.createElement('h1', null, 'Hello World!'), 4 | document.getElementById('container') 5 | ); 6 | }); 7 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/prod/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "rjs-prod-fixture", 4 | "dependencies": { 5 | "requirejs": "^2.3.2" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && r.js -o config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/prod/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | requirejs@^2.3.2: 6 | version "2.3.5" 7 | resolved "https://registry.yarnpkg.com/requirejs/-/requirejs-2.3.5.tgz#617b9acbbcb336540ef4914d790323a8d4b861b0" 8 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/dev/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/dev/build.js: -------------------------------------------------------------------------------- 1 | var Builder = require('systemjs-builder'); 2 | 3 | var builder = new Builder('/', './config.js'); 4 | builder 5 | .buildStatic('./input.js', './output.js') 6 | .then(function() { 7 | console.log('Build complete'); 8 | }) 9 | .catch(function(err) { 10 | console.log('Build error'); 11 | console.log(err); 12 | }); 13 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/dev/config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | paths: { 3 | react: '../../../../build/node_modules/react/umd/react.development.js', 4 | 'react-dom': 5 | '../../../../build/node_modules/react-dom/umd/react-dom.development.js', 6 | schedule: '../../../../build/dist/schedule.development', 7 | }, 8 | }); 9 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/dev/input.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "systemjs-dev-fixture", 4 | "dependencies": { 5 | "systemjs-builder": "^0.15.34" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && node build.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/prod/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/prod/build.js: -------------------------------------------------------------------------------- 1 | var Builder = require('systemjs-builder'); 2 | 3 | var builder = new Builder('/', './config.js'); 4 | builder 5 | .buildStatic('./input.js', './output.js') 6 | .then(function() { 7 | console.log('Build complete'); 8 | }) 9 | .catch(function(err) { 10 | console.log('Build error'); 11 | console.log(err); 12 | }); 13 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/prod/config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | paths: { 3 | react: '../../../../build/node_modules/react/umd/react.production.min.js', 4 | 'react-dom': 5 | '../../../../build/node_modules/react-dom/umd/react-dom.production.min.js', 6 | schedule: '../../../../build/dist/schedule.development', 7 | }, 8 | }); 9 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/prod/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/prod/input.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/prod/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "systemjs-prod-fixture", 4 | "dependencies": { 5 | "systemjs-builder": "^0.15.34" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && node build.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/dev/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/dev/config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | module.exports = { 4 | entry: './input', 5 | output: { 6 | filename: 'output.js', 7 | }, 8 | resolve: { 9 | root: path.resolve('../../../../build/node_modules'), 10 | alias: { 11 | react: 'react/umd/react.development', 12 | 'react-dom': 'react-dom/umd/react-dom.development', 13 | }, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/dev/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "webpack-alias-dev-fixture", 4 | "dependencies": { 5 | "webpack": "^1.14.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && webpack --config config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/prod/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/prod/config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | module.exports = { 4 | entry: './input', 5 | output: { 6 | filename: 'output.js', 7 | }, 8 | resolve: { 9 | root: path.resolve('../../../../build/node_modules'), 10 | alias: { 11 | react: 'react/umd/react.production.min', 12 | 'react-dom': 'react-dom/umd/react-dom.production.min', 13 | }, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/prod/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/prod/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/prod/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "webpack-alias-prod-fixture", 4 | "dependencies": { 5 | "webpack": "^1.14.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && webpack --config config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/dev/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/webpack/dev/config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | module.exports = { 4 | entry: './input', 5 | output: { 6 | filename: 'output.js', 7 | }, 8 | resolve: { 9 | root: path.resolve('../../../../build/node_modules/'), 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/dev/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "webpack-dev-fixture", 4 | "dependencies": { 5 | "webpack": "^1.14.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && webpack --config config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/prod/.gitignore: -------------------------------------------------------------------------------- 1 | output.js -------------------------------------------------------------------------------- /fixtures/packaging/webpack/prod/config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var webpack = require('webpack'); 3 | 4 | module.exports = { 5 | entry: './input', 6 | output: { 7 | filename: 'output.js', 8 | }, 9 | resolve: { 10 | root: path.resolve('../../../../build/node_modules/'), 11 | }, 12 | plugins: [ 13 | new webpack.DefinePlugin({ 14 | 'process.env': { 15 | NODE_ENV: JSON.stringify('production'), 16 | }, 17 | }), 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/prod/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/prod/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/prod/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "webpack-prod-fixture", 4 | "dependencies": { 5 | "webpack": "^1.14.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && webpack --config config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/ssr/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/fixtures/ssr/public/favicon.ico -------------------------------------------------------------------------------- /fixtures/ssr/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /fixtures/ssr/src/components/Chrome.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 10px; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | 7 | body.light { 8 | background-color: #FFFFFF; 9 | color: #333333; 10 | } 11 | 12 | body.dark { 13 | background-color: #000000; 14 | color: #CCCCCC; 15 | } 16 | 17 | .light-loading { 18 | margin: 10px 0; 19 | padding: 10px; 20 | background-color: #CCCCCC; 21 | color: #666666; 22 | } 23 | 24 | .dark-loading { 25 | margin: 10px 0; 26 | padding: 10px; 27 | background-color: #333333; 28 | color: #999999; 29 | } 30 | -------------------------------------------------------------------------------- /fixtures/ssr/src/components/Page.css: -------------------------------------------------------------------------------- 1 | .link { 2 | font-weight: bold; 3 | cursor: pointer; 4 | } 5 | .light-box { 6 | margin: 10px 0; 7 | padding: 10px; 8 | background-color: #CCCCCC; 9 | color: #333333; 10 | } 11 | .dark-box { 12 | margin: 10px 0; 13 | padding: 10px; 14 | background-color: #333333; 15 | color: #CCCCCC; 16 | } 17 | -------------------------------------------------------------------------------- /fixtures/ssr/src/components/Page2.js: -------------------------------------------------------------------------------- 1 | import React, {useContext} from 'react'; 2 | 3 | import Theme from './Theme'; 4 | import Suspend from './Suspend'; 5 | 6 | import './Page.css'; 7 | 8 | export default function Page2() { 9 | let theme = useContext(Theme); 10 | return ( 11 |
12 | Content of a different page 13 |
14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /fixtures/ssr/src/components/Suspend.js: -------------------------------------------------------------------------------- 1 | let promise = null; 2 | let isResolved = false; 3 | 4 | export default function Suspend({children}) { 5 | // This will suspend the content from rendering but only on the client. 6 | // This is used to demo a slow loading app. 7 | if (typeof window === 'object') { 8 | if (!isResolved) { 9 | if (promise === null) { 10 | promise = new Promise(resolve => { 11 | setTimeout(() => { 12 | isResolved = true; 13 | resolve(); 14 | }, 6000); 15 | }); 16 | } 17 | throw promise; 18 | } 19 | } 20 | return children; 21 | } 22 | -------------------------------------------------------------------------------- /fixtures/ssr/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {unstable_createRoot} from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | 6 | let root = unstable_createRoot(document, {hydrate: true}); 7 | root.render(); 8 | -------------------------------------------------------------------------------- /fixtures/unstable-async/time-slicing/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /fixtures/unstable-async/time-slicing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cpu-demo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "glamor": "^2.20.40", 7 | "react-markdown": "^3.2.0", 8 | "react-scripts": "^1.1.4", 9 | "victory": "^0.25.6" 10 | }, 11 | "scripts": { 12 | "prestart": "cp -r ../../../build/node_modules/* ./node_modules/", 13 | "prebuild": "cp -r ../../../build/node_modules/* ./node_modules/", 14 | "start": "react-scripts start", 15 | "build": "react-scripts build", 16 | "test": "react-scripts test --env=jsdom", 17 | "eject": "react-scripts eject" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /fixtures/unstable-async/time-slicing/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/fixtures/unstable-async/time-slicing/public/favicon.ico -------------------------------------------------------------------------------- /fixtures/unstable-async/time-slicing/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | base = "" 3 | publish = "fixtures/dom/build" 4 | command = "yarn build --type=UMD_DEV && cd fixtures/dom/ && yarn && yarn prestart && yarn build" 5 | 6 | [[redirects]] 7 | from = "/*" 8 | to = "/index.html" 9 | status = 200 10 | -------------------------------------------------------------------------------- /packages/babel-plugin-react-jsx/README.md: -------------------------------------------------------------------------------- 1 | This package is intended to eventually replace the current `@babel/plugin-transform-react-jsx`, changing the JSX transform from targeting `React.createElement(type, props, children)` to `React.jsx(types, props, key)`. 2 | 3 | https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md 4 | 5 | **This is experimental and not intended to be used directly.** 6 | -------------------------------------------------------------------------------- /packages/babel-plugin-react-jsx/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./src/TransformJSXToReactBabelPlugin'); 4 | -------------------------------------------------------------------------------- /packages/babel-plugin-react-jsx/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-jsx-babel.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-jsx-babel.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/babel-plugin-react-jsx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "babel-plugin-react-jsx", 3 | "version": "0.1.0", 4 | "private": true, 5 | "description": "@babel/plugin-transform-react-jsx", 6 | "main": "index.js", 7 | "dependencies": { 8 | "esutils": "^2.0.0" 9 | 10 | }, 11 | "files": [ 12 | "README.md", 13 | "index.js", 14 | "build-info.json", 15 | "cjs/", 16 | "umd/" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/create-subscription/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | export * from './src/createSubscription'; 13 | -------------------------------------------------------------------------------- /packages/create-subscription/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/create-subscription.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/create-subscription.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/create-subscription/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-subscription", 3 | "description": "utility for subscribing to external data sources inside React components", 4 | "version": "16.9.0", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/facebook/react.git", 8 | "directory": "packages/create-subscription" 9 | }, 10 | "files": [ 11 | "LICENSE", 12 | "README.md", 13 | "build-info.json", 14 | "index.js", 15 | "cjs/" 16 | ], 17 | "peerDependencies": { 18 | "react": "^16.3.0" 19 | }, 20 | "devDependencies": { 21 | "rxjs": "^5.5.6" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/eslint-plugin-react-hooks/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | module.exports = require('./src/index'); 11 | -------------------------------------------------------------------------------- /packages/eslint-plugin-react-hooks/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // TODO: this doesn't make sense for an ESLint rule. 4 | // We need to fix our build process to not create bundles for "raw" packages like this. 5 | if (process.env.NODE_ENV === 'production') { 6 | module.exports = require('./cjs/eslint-plugin-react-hooks.production.min.js'); 7 | } else { 8 | module.exports = require('./cjs/eslint-plugin-react-hooks.development.js'); 9 | } 10 | -------------------------------------------------------------------------------- /packages/eslint-plugin-react-hooks/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | import RuleOfHooks from './RulesOfHooks'; 11 | import ExhaustiveDeps from './ExhaustiveDeps'; 12 | 13 | export const rules = { 14 | 'rules-of-hooks': RuleOfHooks, 15 | 'exhaustive-deps': ExhaustiveDeps, 16 | }; 17 | -------------------------------------------------------------------------------- /packages/jest-mock-scheduler/README.md: -------------------------------------------------------------------------------- 1 | # `jest-mock-scheduler` 2 | 3 | Jest matchers and utilities for testing the `scheduler` package. 4 | 5 | This package is experimental. APIs may change between releases. -------------------------------------------------------------------------------- /packages/jest-mock-scheduler/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('scheduler/unstable_mock'); 4 | -------------------------------------------------------------------------------- /packages/jest-react/README.md: -------------------------------------------------------------------------------- 1 | # `jest-react` 2 | 3 | Jest matchers and utilities for testing React Test Renderer. -------------------------------------------------------------------------------- /packages/jest-react/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | export * from './src/JestReact'; 11 | -------------------------------------------------------------------------------- /packages/jest-react/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/jest-react.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/jest-react.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/legacy-events/EventSystemFlags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export type EventSystemFlags = number; 11 | 12 | export const PLUGIN_EVENT_SYSTEM = 1; 13 | export const RESPONDER_EVENT_SYSTEM = 1 << 1; 14 | export const IS_PASSIVE = 1 << 2; 15 | export const IS_ACTIVE = 1 << 3; 16 | export const PASSIVE_NOT_SUPPORTED = 1 << 4; 17 | export const IS_REPLAYED = 1 << 5; 18 | -------------------------------------------------------------------------------- /packages/legacy-events/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "legacy-events", 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-art/Circle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const Circle = require('./npm/Circle'); 13 | 14 | module.exports = Circle; 15 | -------------------------------------------------------------------------------- /packages/react-art/README.md: -------------------------------------------------------------------------------- 1 | # React ART 2 | 3 | React ART is a JavaScript library for drawing vector graphics using [React](https://github.com/facebook/react/). 4 | 5 | It provides declarative and reactive bindings to the [ART library](https://github.com/sebmarkbage/art/). 6 | 7 | Using the same declarative API you can render the output to either Canvas, SVG or VML (IE8). 8 | -------------------------------------------------------------------------------- /packages/react-art/Rectangle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const Rectangle = require('./npm/Rectangle'); 13 | 14 | module.exports = Rectangle; 15 | -------------------------------------------------------------------------------- /packages/react-art/Wedge.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const Wedge = require('./npm/Wedge'); 13 | 14 | module.exports = Wedge; 15 | -------------------------------------------------------------------------------- /packages/react-art/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactART = require('./src/ReactART'); 13 | 14 | module.exports = ReactART; 15 | -------------------------------------------------------------------------------- /packages/react-art/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-art.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-art.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-cache/README.md: -------------------------------------------------------------------------------- 1 | # react-cache 2 | 3 | A basic cache for React applications. It also serves as a reference for more 4 | advanced caching implementations. 5 | 6 | This package is meant to be used alongside yet-to-be-released, experimental 7 | React features. It's unlikely to be useful in any other context. 8 | 9 | **Do not use in a real application.** We're publishing this early for 10 | demonstration purposes. 11 | 12 | **Use it at your own risk.** 13 | 14 | # No, Really, It Is Unstable 15 | 16 | The API ~~may~~ will change wildly between versions. 17 | -------------------------------------------------------------------------------- /packages/react-cache/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | export * from './src/ReactCache'; 13 | -------------------------------------------------------------------------------- /packages/react-cache/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-cache.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-cache.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-cache/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "react-cache", 4 | "description": "A basic cache for React applications", 5 | "version": "2.0.0-alpha.0", 6 | "repository": { 7 | "type" : "git", 8 | "url" : "https://github.com/facebook/react.git", 9 | "directory": "packages/react-cache" 10 | }, 11 | "files": [ 12 | "LICENSE", 13 | "README.md", 14 | "build-info.json", 15 | "index.js", 16 | "cjs/", 17 | "umd/" 18 | ], 19 | "peerDependencies": { 20 | "react": "^16.3.0-alpha.1" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/react-debug-tools/README.md: -------------------------------------------------------------------------------- 1 | # react-debug-tools 2 | 3 | This is an experimental package for debugging React renderers. 4 | 5 | **Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.** 6 | 7 | **Use it at your own risk.** 8 | -------------------------------------------------------------------------------- /packages/react-debug-tools/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const ReactDebugTools = require('./src/ReactDebugTools'); 11 | 12 | // This is hacky but makes it work with both Rollup and Jest. 13 | module.exports = ReactDebugTools.default || ReactDebugTools; 14 | -------------------------------------------------------------------------------- /packages/react-debug-tools/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-debug-tools.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-debug-tools.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-debug-tools/src/ReactDebugTools.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import {inspectHooks, inspectHooksOfFiber} from './ReactDebugHooks'; 11 | 12 | export {inspectHooks, inspectHooksOfFiber}; 13 | -------------------------------------------------------------------------------- /packages/react-devtools-core/backend.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist/backend'); 2 | -------------------------------------------------------------------------------- /packages/react-devtools-core/standalone.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist/standalone'); 2 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/chrome/README.md: -------------------------------------------------------------------------------- 1 | # The Chrome extension 2 | 3 | The source code for this extension has moved to `shells/webextension`. 4 | 5 | Modify the source code there and then rebuild this extension by running `node build` from this directory or `yarn run build:extension:chrome` from the root directory. 6 | 7 | ## Testing in Chrome 8 | 9 | You can test a local build of the web extension like so: 10 | 11 | 1. Build the extension: `node build` 12 | 1. Follow the on-screen instructions. 13 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/chrome/deploy.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const deploy = require('../deploy'); 6 | 7 | const main = async () => await deploy('chrome'); 8 | 9 | main(); 10 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/chrome/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-devtools-experimental-chrome", 3 | "alias": ["react-devtools-experimental-chrome"], 4 | "files": ["index.html", "ReactDevTools.zip"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/chrome/test.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const chromeLaunch = require('chrome-launch'); 6 | const {resolve} = require('path'); 7 | 8 | const EXTENSION_PATH = resolve('./chrome/build/unpacked'); 9 | const START_URL = 'https://facebook.github.io/react/'; 10 | 11 | chromeLaunch(START_URL, { 12 | args: [`--load-extension=${EXTENSION_PATH}`], 13 | }); 14 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/deploy.chrome.html: -------------------------------------------------------------------------------- 1 |
    2 |
  1. download extension
  2. 3 |
  3. Double-click to extract
  4. 4 |
  5. Navigate to chrome://extensions/
  6. 5 |
  7. Enable "Developer mode"
  8. 6 |
  9. Click "LOAD UNPACKED"
  10. 7 |
  11. Select extracted extension folder (ReactDevTools)
  12. 8 |
-------------------------------------------------------------------------------- /packages/react-devtools-extensions/deploy.firefox.html: -------------------------------------------------------------------------------- 1 |
    2 |
  1. download extension
  2. 3 |
  3. Extract/unzip
  4. 4 |
  5. Visit about:debugging
  6. 5 |
  7. Click "Load Temporary Add-on"
  8. 6 |
  9. Select the manifest.json file inside of the extracted extension folder (ReactDevTools)
  10. 7 |
-------------------------------------------------------------------------------- /packages/react-devtools-extensions/firefox/deploy.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const deploy = require('../deploy'); 6 | 7 | const main = async () => await deploy('firefox'); 8 | 9 | main(); 10 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/firefox/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-devtools-experimental-firefox", 3 | "alias": ["react-devtools-experimental-firefox"], 4 | "files": ["index.html", "ReactDevTools.zip"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/128-deadcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/128-deadcode.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/128-development.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/128-development.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/128-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/128-disabled.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/128-outdated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/128-outdated.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/128-production.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/128-production.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/128-unminified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/128-unminified.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/16-deadcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/16-deadcode.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/16-development.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/16-development.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/16-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/16-disabled.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/16-outdated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/16-outdated.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/16-production.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/16-production.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/16-unminified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/16-unminified.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/32-deadcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/32-deadcode.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/32-development.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/32-development.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/32-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/32-disabled.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/32-outdated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/32-outdated.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/32-production.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/32-production.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/32-unminified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/32-unminified.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/48-deadcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/48-deadcode.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/48-development.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/48-development.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/48-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/48-disabled.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/48-outdated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/48-outdated.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/48-production.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/48-production.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/icons/48-unminified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools-extensions/icons/48-unminified.png -------------------------------------------------------------------------------- /packages/react-devtools-extensions/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/popups/disabled.html: -------------------------------------------------------------------------------- 1 | 2 | 17 |

18 | This page doesn’t appear to be using React. 19 |
20 | If this seems wrong, follow the troubleshooting instructions. 21 |

22 | -------------------------------------------------------------------------------- /packages/react-devtools-extensions/popups/production.html: -------------------------------------------------------------------------------- 1 | 2 | 17 |

18 | This page is using the production build of React. ✅ 19 |
20 | Open the developer tools, and "Components" and "Profiler" tabs will appear to the right. 21 |

22 | -------------------------------------------------------------------------------- /packages/react-devtools-inline/backend.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist/backend'); 2 | -------------------------------------------------------------------------------- /packages/react-devtools-inline/frontend.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist/frontend'); 2 | -------------------------------------------------------------------------------- /packages/react-devtools-inline/src/constants.js: -------------------------------------------------------------------------------- 1 | /** @flow */ 2 | 3 | export const MESSAGE_TYPE_GET_SAVED_PREFERENCES = 4 | 'React::DevTools::getSavedPreferences'; 5 | export const MESSAGE_TYPE_SAVED_PREFERENCES = 6 | 'React::DevTools::savedPreferences'; 7 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "react-devtools-shared", 4 | "version": "0.0.0", 5 | "devDependencies": { 6 | "react-15": "npm:react@^15", 7 | "react-dom-15": "npm:react-dom@^15" 8 | }, 9 | "dependencies": { 10 | "@babel/runtime": "^7.0.0", 11 | "@reach/menu-button": "^0.1.17", 12 | "@reach/tooltip": "^0.2.2", 13 | "clipboard-js": "^0.3.6", 14 | "events": "^3.0.0", 15 | "local-storage-fallback": "^4.1.1", 16 | "lodash.throttle": "^4.1.1", 17 | "memoize-one": "^3.1.1", 18 | "react-virtualized-auto-sizer": "^1.0.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/__tests__/__mocks__/cssMock.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/__tests__/setupEnv.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // DevTools stores preferences between sessions in localStorage 4 | if (!global.hasOwnProperty('localStorage')) { 5 | global.localStorage = require('local-storage-fallback').default; 6 | } 7 | 8 | // Mimic the global we set with Webpack's DefinePlugin 9 | global.__DEV__ = process.env.NODE_ENV !== 'production'; 10 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import type {FrontendBridge} from 'react-devtools-shared/src/bridge'; 11 | 12 | type Shell = {| 13 | connect: (callback: Function) => void, 14 | onReload: (reloadFn: Function) => void, 15 | |}; 16 | 17 | export function initDevTools(shell: Shell) { 18 | shell.connect((bridge: FrontendBridge) => { 19 | // TODO ... 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/ButtonIcon.css: -------------------------------------------------------------------------------- 1 | .ButtonIcon { 2 | width: 1rem; 3 | height: 1rem; 4 | fill: currentColor; 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/Badge.css: -------------------------------------------------------------------------------- 1 | .Badge { 2 | display: inline-block; 3 | background-color: var(--color-component-badge-background); 4 | color: var(--color-text); 5 | padding: 0.125rem 0.25rem; 6 | line-height: normal; 7 | border-radius: 0.125rem; 8 | margin-right: 0.25rem; 9 | font-family: var(--font-family-monospace); 10 | font-size: var(--font-size-monospace-small); 11 | } 12 | 13 | .ExtraLabel { 14 | font-family: var(--font-family-monospace); 15 | font-size: var(--font-size-monospace-small); 16 | color: var(--color-component-badge-count); 17 | } 18 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/EditableName.css: -------------------------------------------------------------------------------- 1 | .Input { 2 | flex: 0 1 auto; 3 | padding: 1px; 4 | box-shadow: 0px 1px 3px transparent; 5 | } 6 | .Input:focus { 7 | color: var(--color-text); 8 | box-shadow: 0px 1px 3px var(--color-shadow); 9 | } -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/ExpandCollapseToggle.css: -------------------------------------------------------------------------------- 1 | .ExpandCollapseToggle { 2 | flex: 0 0 1rem; 3 | width: 1rem; 4 | height: 1rem; 5 | padding: 0; 6 | color: var(--color-expand-collapse-toggle); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/HocBadges.css: -------------------------------------------------------------------------------- 1 | .HocBadges { 2 | padding: 0.125rem 0.25rem; 3 | user-select: none; 4 | } 5 | 6 | .Badge { 7 | display: inline-block; 8 | background-color: var(--color-component-badge-background); 9 | color: var(--color-text); 10 | padding: 0.125rem 0.25rem; 11 | line-height: normal; 12 | border-radius: 0.125rem; 13 | margin-right: 0.25rem; 14 | font-family: var(--font-family-monospace); 15 | font-size: var(--font-size-monospace-small); 16 | } 17 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/NativeStyleEditor/AutoSizeInput.css: -------------------------------------------------------------------------------- 1 | .Input { 2 | width: 0; 3 | min-width: 0.5rem; 4 | flex: 1 1 auto; 5 | border: none; 6 | background: transparent; 7 | outline: none; 8 | padding: 0; 9 | border: none; 10 | font-family: var(--font-family-monospace); 11 | font-size: var(--font-size-monospace-normal); 12 | } 13 | 14 | .Input:focus { 15 | border-color: var(--color-border); 16 | } 17 | 18 | .HiddenDiv { 19 | position: absolute; 20 | top: 0; 21 | left: 0; 22 | visibility: hidden; 23 | height: 0; 24 | overflow: scroll; 25 | white-space: pre; 26 | } 27 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/NativeStyleEditor/types.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import type { 11 | Layout as LayoutBackend, 12 | Style as StyleBackend, 13 | } from 'react-devtools-shared/src/backend/NativeStyleEditor/types'; 14 | 15 | export type Layout = LayoutBackend; 16 | export type Style = StyleBackend; 17 | export type StyleAndLayout = {| 18 | layout: LayoutBackend | null, 19 | style: StyleBackend | null, 20 | |}; 21 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/SelectedTreeHighlight.css: -------------------------------------------------------------------------------- 1 | .Active, 2 | .Inactive { 3 | position: absolute; 4 | left: 0; 5 | width: 100%; 6 | z-index: 0; 7 | pointer-events: none; 8 | } 9 | 10 | .Active { 11 | background-color: var(--color-selected-tree-highlight-active); 12 | } 13 | 14 | .Inactive { 15 | background-color: var(--color-selected-tree-highlight-inactive); 16 | } 17 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Components/TreeFocusedContext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import {createContext} from 'react'; 11 | 12 | const TreeFocusedContext = createContext(false); 13 | 14 | export default TreeFocusedContext; 15 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/ErrorBoundary.css: -------------------------------------------------------------------------------- 1 | .ErrorBoundary { 2 | height: 100%; 3 | width: 100%; 4 | background-color: white; 5 | color: red; 6 | padding: 0.5rem; 7 | overflow: auto; 8 | } 9 | 10 | .Header { 11 | font-size: var(--font-size-sans-large); 12 | font-weight: bold; 13 | } 14 | 15 | .Stack { 16 | margin-top: 0.5rem; 17 | white-space: pre-wrap; 18 | font-family: var(--font-family-monospace); 19 | font-size: var(--font-size-monospace-small); 20 | background-color: hsl(0, 100%, 97%); 21 | border: 1px solid hsl(0, 100%, 92%); 22 | border-radius: 0.25rem; 23 | padding: 0.5rem; 24 | } 25 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Icon.css: -------------------------------------------------------------------------------- 1 | .Icon { 2 | width: 1rem; 3 | height: 1rem; 4 | fill: currentColor; 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/CommitFlamegraph.css: -------------------------------------------------------------------------------- 1 | .Container { 2 | width: 100%; 3 | flex: 1; 4 | padding: 0.5rem; 5 | } 6 | 7 | .PatternPath { 8 | stroke: var(--color-commit-did-not-render-pattern); 9 | stroke-width: 1; 10 | } 11 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/CommitRanked.css: -------------------------------------------------------------------------------- 1 | .Container { 2 | width: 100%; 3 | flex: 1; 4 | padding: 0.5rem; 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/Interactions.css: -------------------------------------------------------------------------------- 1 | .Container { 2 | width: 100%; 3 | flex: 1; 4 | padding: 0.5rem; 5 | } 6 | 7 | .FocusTarget:focus { 8 | outline: none; 9 | } 10 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/NoCommitData.css: -------------------------------------------------------------------------------- 1 | .NoCommitData { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | justify-content: center; 8 | } 9 | 10 | .Header { 11 | font-size: var(--font-size-sans-large); 12 | margin-bottom: 0.5rem; 13 | } 14 | 15 | .FilterMessage { 16 | display: flex; 17 | align-items: center; 18 | } 19 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.css: -------------------------------------------------------------------------------- 1 | .NoInteractions { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | justify-content: center; 8 | } 9 | 10 | .Header { 11 | font-size: var(--font-size-sans-large); 12 | } 13 | 14 | .Link { 15 | color: var(--color-button); 16 | } 17 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/RootSelector.css: -------------------------------------------------------------------------------- 1 | .Spacer { 2 | flex: 1; 3 | } 4 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitList.css: -------------------------------------------------------------------------------- 1 | .List { 2 | /** 3 | * The decision to suppress the default (horizontal) scroll bars is intentional. 4 | * The snapshot selector is small enough that the scrollbar renders it essentially useless. 5 | * There are two alternative navigation mechanisms (arrow keys and arrow buttons). 6 | * If necessary, we could also expand the click-and-drag mechanism to scroll. 7 | */ 8 | overflow-x: hidden !important; 9 | } 10 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitListItem.css: -------------------------------------------------------------------------------- 1 | .Outer { 2 | user-select: none; 3 | cursor: pointer; 4 | border-bottom: 3px solid transparent; 5 | padding-top: 4px; 6 | padding-bottom: 1px; 7 | display: flex; 8 | align-items: flex-end; 9 | } 10 | 11 | .Inner { 12 | width: 100%; 13 | min-height: 5px; 14 | background-color: var(--color-commit-did-not-render-fill); 15 | color: var(--color-commit-did-not-render-fill-text); 16 | } 17 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Profiler/constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export const barWidthThreshold = 2; 11 | export const interactionCommitSize = 10; 12 | export const interactionLabelWidth = 200; 13 | export const maxBarWidth = 30; 14 | export const minBarWidth = 5; 15 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/ReactLogo.css: -------------------------------------------------------------------------------- 1 | .ReactLogo { 2 | width: 1.75rem; 3 | height: 1.75rem; 4 | margin: 0 0.75rem 0 0.25rem; 5 | color: var(--color-button-active); 6 | } 7 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/Tooltip.css: -------------------------------------------------------------------------------- 1 | .Tooltip { 2 | border: none; 3 | border-radius: 0.25rem; 4 | padding: 0.25rem 0.5rem; 5 | font-family: var(--font-family-sans); 6 | font-size: 12px; 7 | background-color: var(--color-tooltip-background); 8 | color: var(--color-tooltip-text); 9 | 10 | /* Make sure this is above the DevTools, which are above the Overlay */ 11 | z-index: 10000002; 12 | } 13 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/devtools/views/WarnIfLegacyBackendDetected.css: -------------------------------------------------------------------------------- 1 | .Command { 2 | background-color: var(--color-dimmest); 3 | padding: 0.25rem 0.5rem; 4 | display: block; 5 | border-radius: 0.125rem; 6 | } 7 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/node_modules/react-window/dist/index.cjs.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../src'; 4 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/node_modules/react-window/dist/index.esm.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export * from '../src'; 4 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/node_modules/react-window/src/areEqual.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import shallowDiffers from './shallowDiffers'; 4 | 5 | // Custom comparison function for React.memo(). 6 | // It knows to compare individual style props and ignore the wrapper object. 7 | // See https://reactjs.org/docs/react-api.html#reactmemo 8 | export default function areEqual( 9 | prevProps: Object, 10 | nextProps: Object 11 | ): boolean { 12 | const { style: prevStyle, ...prevRest } = prevProps; 13 | const { style: nextStyle, ...nextRest } = nextProps; 14 | 15 | return ( 16 | !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest) 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/node_modules/react-window/src/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export { default as VariableSizeGrid } from './VariableSizeGrid'; 4 | export { default as VariableSizeList } from './VariableSizeList'; 5 | export { default as FixedSizeGrid } from './FixedSizeGrid'; 6 | export { default as FixedSizeList } from './FixedSizeList'; 7 | 8 | export { default as areEqual } from './areEqual'; 9 | export { default as shouldComponentUpdate } from './shouldComponentUpdate'; 10 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/node_modules/react-window/src/shallowDiffers.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | // Pulled from react-compat 4 | // https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349 5 | export default function shallowDiffers(prev: Object, next: Object): boolean { 6 | for (let attribute in prev) { 7 | if (!(attribute in next)) { 8 | return true; 9 | } 10 | } 11 | for (let attribute in next) { 12 | if (prev[attribute] !== next[attribute]) { 13 | return true; 14 | } 15 | } 16 | return false; 17 | } 18 | -------------------------------------------------------------------------------- /packages/react-devtools-shared/src/node_modules/react-window/src/shouldComponentUpdate.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import areEqual from './areEqual'; 4 | import shallowDiffers from './shallowDiffers'; 5 | 6 | // Custom shouldComponentUpdate for class components. 7 | // It knows to compare individual style props and ignore the wrapper object. 8 | // See https://reactjs.org/docs/react-component.html#shouldcomponentupdate 9 | export default function shouldComponentUpdate( 10 | nextProps: Object, 11 | nextState: Object 12 | ): boolean { 13 | return ( 14 | !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState) 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/README.md: -------------------------------------------------------------------------------- 1 | Harness for testing local changes to the `react-devtools-inline` and `react-devtools-shared` packages. 2 | 3 | ## Development 4 | 5 | This target should be run in parallel with the `react-devtools-inline` package. The first step then is to watch for changes to that target: 6 | ```sh 7 | cd packages/react-devtools-inline 8 | 9 | yarn start 10 | ``` 11 | 12 | Next, watch for changes to the test harness: 13 | ```sh 14 | cd packages/react-devtools-shell 15 | 16 | yarn start 17 | ``` 18 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-devtools-experimental", 3 | "alias": ["react-devtools-experimental"], 4 | "files": ["index.html", "dist"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/src/app/InspectableElements/CustomObject.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import React from 'react'; 11 | 12 | class Custom { 13 | _number = 42; 14 | get number() { 15 | return this._number; 16 | } 17 | } 18 | 19 | export default function CustomObject() { 20 | return ; 21 | } 22 | 23 | function ChildComponent(props: any) { 24 | return null; 25 | } 26 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/src/app/InspectableElements/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import InspectableElements from './InspectableElements'; 11 | 12 | export default InspectableElements; 13 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/src/app/ToDoList/List.css: -------------------------------------------------------------------------------- 1 | .Input { 2 | font-size: 1rem; 3 | padding: 0.25rem; 4 | } 5 | 6 | .IconButton { 7 | padding: 0.25rem; 8 | border: none; 9 | background: none; 10 | cursor: pointer; 11 | } 12 | 13 | .List { 14 | margin: 0.5rem 0 0; 15 | padding: 0; 16 | } 17 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/src/app/ToDoList/ListItem.css: -------------------------------------------------------------------------------- 1 | .ListItem { 2 | list-style-type: none; 3 | } 4 | 5 | .Input { 6 | cursor: pointer; 7 | } 8 | 9 | .Label { 10 | cursor: pointer; 11 | padding: 0.25rem; 12 | color: #555; 13 | } 14 | .Label:hover { 15 | color: #000; 16 | } 17 | 18 | .IconButton { 19 | padding: 0.25rem; 20 | border: none; 21 | background: none; 22 | cursor: pointer; 23 | } 24 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/src/app/ToDoList/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import List from './List'; 11 | 12 | export default List; 13 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/src/app/Toggle/index.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from 'react'; 2 | 3 | export default function Toggle() { 4 | const [show, setShow] = useState(false); 5 | return ( 6 | <> 7 |

Toggle

8 |
9 | <> 10 | 11 | {show && ' '} 12 | {show && Hello} 13 | 14 |
15 | 16 | ); 17 | } 18 | 19 | function Greeting({children}) { 20 | return

{children}

; 21 | } 22 | -------------------------------------------------------------------------------- /packages/react-devtools-shell/src/app/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | /* GitHub.com frontend fonts */ 3 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, 4 | sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; 5 | font-size: 14px; 6 | line-height: 1.5; 7 | } 8 | 9 | h1 { 10 | font-size: 1.5rem; 11 | font-weight: bold; 12 | margin-bottom: 0.5rem; 13 | } 14 | -------------------------------------------------------------------------------- /packages/react-devtools/icons/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/packages/react-devtools/icons/icon128.png -------------------------------------------------------------------------------- /packages/react-devtools/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | const {connectToDevTools} = require('react-devtools-core/backend'); 11 | 12 | // Connect immediately with default options. 13 | // If you need more control, use `react-devtools-core` directly instead of `react-devtools`. 14 | connectToDevTools(); 15 | -------------------------------------------------------------------------------- /packages/react-dom/index.fb.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const ReactDOMFB = require('./src/client/ReactDOMFB'); 11 | 12 | // TODO: decide on the top-level export form. 13 | // This is hacky but makes it work with both Rollup and Jest. 14 | module.exports = ReactDOMFB.default || ReactDOMFB; 15 | -------------------------------------------------------------------------------- /packages/react-dom/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactDOM = require('./src/client/ReactDOM'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactDOM.default || ReactDOM; 17 | -------------------------------------------------------------------------------- /packages/react-dom/npm/server.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./server.node'); 4 | -------------------------------------------------------------------------------- /packages/react-dom/npm/server.node.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-dom-server.node.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-dom-server.node.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-dom/server.browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactDOMServer = require('./src/server/ReactDOMServerBrowser'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest 16 | module.exports = ReactDOMServer.default || ReactDOMServer; 17 | -------------------------------------------------------------------------------- /packages/react-dom/server.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./server.node'); 13 | -------------------------------------------------------------------------------- /packages/react-dom/server.node.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactDOMServer = require('./src/server/ReactDOMServerNode'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest 16 | module.exports = ReactDOMServer.default || ReactDOMServer; 17 | -------------------------------------------------------------------------------- /packages/react-dom/src/client/getActiveElement.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export default function getActiveElement(doc: ?Document): ?Element { 11 | doc = doc || (typeof document !== 'undefined' ? document : undefined); 12 | if (typeof doc === 'undefined') { 13 | return null; 14 | } 15 | try { 16 | return doc.activeElement || doc.body; 17 | } catch (e) { 18 | return doc.body; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/react-dom/src/events/SyntheticCompositionEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | import SyntheticEvent from 'legacy-events/SyntheticEvent'; 9 | 10 | /** 11 | * @interface Event 12 | * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents 13 | */ 14 | const SyntheticCompositionEvent = SyntheticEvent.extend({ 15 | data: null, 16 | }); 17 | 18 | export default SyntheticCompositionEvent; 19 | -------------------------------------------------------------------------------- /packages/react-dom/src/events/SyntheticDragEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | import SyntheticMouseEvent from './SyntheticMouseEvent'; 9 | 10 | /** 11 | * @interface DragEvent 12 | * @see http://www.w3.org/TR/DOM-Level-3-Events/ 13 | */ 14 | const SyntheticDragEvent = SyntheticMouseEvent.extend({ 15 | dataTransfer: null, 16 | }); 17 | 18 | export default SyntheticDragEvent; 19 | -------------------------------------------------------------------------------- /packages/react-dom/src/events/SyntheticFocusEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | import SyntheticUIEvent from './SyntheticUIEvent'; 9 | 10 | /** 11 | * @interface FocusEvent 12 | * @see http://www.w3.org/TR/DOM-Level-3-Events/ 13 | */ 14 | const SyntheticFocusEvent = SyntheticUIEvent.extend({ 15 | relatedTarget: null, 16 | }); 17 | 18 | export default SyntheticFocusEvent; 19 | -------------------------------------------------------------------------------- /packages/react-dom/src/events/SyntheticInputEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | import SyntheticEvent from 'legacy-events/SyntheticEvent'; 9 | 10 | /** 11 | * @interface Event 12 | * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 13 | * /#events-inputevents 14 | */ 15 | const SyntheticInputEvent = SyntheticEvent.extend({ 16 | data: null, 17 | }); 18 | 19 | export default SyntheticInputEvent; 20 | -------------------------------------------------------------------------------- /packages/react-dom/src/events/SyntheticUIEvent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | import SyntheticEvent from 'legacy-events/SyntheticEvent'; 9 | 10 | const SyntheticUIEvent = SyntheticEvent.extend({ 11 | view: null, 12 | detail: null, 13 | }); 14 | 15 | export default SyntheticUIEvent; 16 | -------------------------------------------------------------------------------- /packages/react-dom/src/server/ReactDOMFizzServerFormatConfig.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import {convertStringToBuffer} from 'react-stream/src/ReactFizzHostConfig'; 11 | 12 | export function formatChunk(type: string, props: Object): Uint8Array { 13 | let str = '<' + type + '>'; 14 | if (typeof props.children === 'string') { 15 | str += props.children; 16 | } 17 | str += ''; 18 | return convertStringToBuffer(str); 19 | } 20 | -------------------------------------------------------------------------------- /packages/react-dom/src/server/quoteAttributeValueForBrowser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | import escapeTextForBrowser from './escapeTextForBrowser'; 9 | 10 | /** 11 | * Escapes attribute value to prevent scripting attacks. 12 | * 13 | * @param {*} value Value to escape. 14 | * @return {string} An escaped string. 15 | */ 16 | function quoteAttributeValueForBrowser(value) { 17 | return '"' + escapeTextForBrowser(value) + '"'; 18 | } 19 | 20 | export default quoteAttributeValueForBrowser; 21 | -------------------------------------------------------------------------------- /packages/react-dom/src/shared/HTMLNodeType.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | /** 11 | * HTML nodeType values that represent the type of the node 12 | */ 13 | 14 | export const ELEMENT_NODE = 1; 15 | export const TEXT_NODE = 3; 16 | export const COMMENT_NODE = 8; 17 | export const DOCUMENT_NODE = 9; 18 | export const DOCUMENT_FRAGMENT_NODE = 11; 19 | -------------------------------------------------------------------------------- /packages/react-dom/src/shared/checkReact.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import React from 'react'; 11 | import invariant from 'shared/invariant'; 12 | 13 | invariant( 14 | React, 15 | 'ReactDOM was loaded before React. Make sure you load ' + 16 | 'the React package before loading ReactDOM.', 17 | ); 18 | -------------------------------------------------------------------------------- /packages/react-dom/src/shared/voidElementTags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | import omittedCloseTags from './omittedCloseTags'; 9 | 10 | // For HTML, certain tags cannot have children. This has the same purpose as 11 | // `omittedCloseTags` except that `menuitem` should still have its closing tag. 12 | 13 | const voidElementTags = { 14 | menuitem: true, 15 | ...omittedCloseTags, 16 | }; 17 | 18 | export default voidElementTags; 19 | -------------------------------------------------------------------------------- /packages/react-dom/test-utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactTestUtils = require('./src/test-utils/ReactTestUtils'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactTestUtils.default || ReactTestUtils; 17 | -------------------------------------------------------------------------------- /packages/react-dom/unstable-fizz.browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactDOMFizzServerBrowser = require('./src/server/ReactDOMFizzServerBrowser'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest 16 | module.exports = ReactDOMFizzServerBrowser.default || ReactDOMFizzServerBrowser; 17 | -------------------------------------------------------------------------------- /packages/react-dom/unstable-fizz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./unstable-fizz.node'); 13 | -------------------------------------------------------------------------------- /packages/react-dom/unstable-fizz.node.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactDOMFizzServerNode = require('./src/server/ReactDOMFizzServerNode'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest 16 | module.exports = ReactDOMFizzServerNode.default || ReactDOMFizzServerNode; 17 | -------------------------------------------------------------------------------- /packages/react-dom/unstable-native-dependencies.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/unstable-native-dependencies/ReactDOMUnstableNativeDependencies'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/README.md: -------------------------------------------------------------------------------- 1 | # `react-interactions` 2 | 3 | This package is experimental. It is intended for use with the experimental React 4 | flags for internal testing. -------------------------------------------------------------------------------- /packages/react-interactions/accessibility/focus-control.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/FocusControl'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/accessibility/focus-list.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/FocusList'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/accessibility/focus-manager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/FocusManager'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/accessibility/focus-table.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/FocusTable'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/accessibility/tabbable-scope.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/TabbableScope'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/context-menu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/ContextMenu'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/drag.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Drag'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/focus.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Focus'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/hover.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Hover'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/input.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Input'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/keyboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Keyboard'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/press-legacy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/PressLegacy'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/press.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Press'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/scroll.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Scroll'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/swipe.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Swipe'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/events/tap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('./src/dom/Tap'); 13 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/drag.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/drag.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/drag.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/focus.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/focus.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/focus.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/hover.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/hover.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/hover.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/input.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/input.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/input.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/keyboard.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/keyboard.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/keyboard.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/press-legacy.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/press-legacy.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/press-legacy.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/press.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/press.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/press.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/scroll.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/scroll.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/scroll.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/swipe.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/swipe.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/swipe.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-interactions/npm/tap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-interactions-events/tap.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-interactions-events/tap.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-is/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | export * from './src/ReactIs'; 13 | -------------------------------------------------------------------------------- /packages/react-is/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-is.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-is.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-is/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-is", 3 | "version": "16.9.0", 4 | "description": "Brand checking of React Elements.", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/facebook/react.git", 9 | "directory": "packages/react-is" 10 | }, 11 | "keywords": [ 12 | "react" 13 | ], 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/facebook/react/issues" 17 | }, 18 | "homepage": "https://reactjs.org/", 19 | "files": [ 20 | "LICENSE", 21 | "README.md", 22 | "build-info.json", 23 | "index.js", 24 | "cjs/", 25 | "umd/" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /packages/react-native-renderer/fabric.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactFabric = require('./src/ReactFabric'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactFabric.default || ReactFabric; 17 | -------------------------------------------------------------------------------- /packages/react-native-renderer/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactNativeRenderer = require('./src/ReactNativeRenderer'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactNativeRenderer.default || ReactNativeRenderer; 17 | -------------------------------------------------------------------------------- /packages/react-native-renderer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-renderer", 3 | "version": "16.0.0", 4 | "private": true, 5 | "repository": { 6 | "type" : "git", 7 | "url" : "https://github.com/facebook/react.git", 8 | "directory": "packages/react-native-renderer" 9 | }, 10 | "dependencies": { 11 | "object-assign": "^4.1.1", 12 | "prop-types": "^15.6.2", 13 | "scheduler": "^0.11.0" 14 | }, 15 | "peerDependencies": { 16 | "react": "^16.0.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/ReactNativeEventPluginOrder.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | const ReactNativeEventPluginOrder = [ 11 | 'ResponderEventPlugin', 12 | 'ReactNativeBridgeEventPlugin', 13 | ]; 14 | 15 | export default ReactNativeEventPluginOrder; 16 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/BatchedBridge.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const BatchedBridge = { 11 | registerCallableModule: jest.fn(), 12 | }; 13 | 14 | module.exports = BatchedBridge; 15 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/ExceptionsManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | module.exports = { 11 | handleException: jest.fn(), 12 | }; 13 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/Platform.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 'use strict'; 8 | 9 | module.exports = { 10 | OS: 'ios', 11 | }; 12 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/RCTEventEmitter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const RCTEventEmitter = { 11 | register: jest.fn(), 12 | }; 13 | 14 | module.exports = RCTEventEmitter; 15 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/ReactFiberErrorDialog.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | module.exports = { 11 | showErrorDialog: jest.fn(), 12 | }; 13 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | 'use strict'; 11 | 12 | // Noop 13 | 14 | // TODO #10932517: Move all initialization callers back into react-native 15 | 16 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/TextInputState.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | // Mock of the Native Hooks 11 | // TODO: Should this move into the components themselves? E.g. focusable 12 | 13 | const TextInputState = {}; 14 | 15 | module.exports = TextInputState; 16 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/deepFreezeAndThrowOnMutationInDev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | // TODO: move into react or fbjs 11 | 12 | const deepFreezeAndThrowOnMutationInDev = function() {}; 13 | 14 | module.exports = deepFreezeAndThrowOnMutationInDev; 15 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/flattenStyle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | // TODO: Move flattenStyle into react 11 | 12 | const flattenStyle = function() {}; 13 | 14 | module.exports = flattenStyle; 15 | -------------------------------------------------------------------------------- /packages/react-native-renderer/src/__tests__/__snapshots__/ReactNativeEvents-test.internal.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`fails if unknown/unsupported event types are dispatched 1`] = ` 4 | " {} 5 | View null" 6 | `; 7 | 8 | exports[`handles events 1`] = ` 9 | " {} 10 | View {\\"foo\\":\\"outer\\"} 11 | View {\\"foo\\":\\"inner\\"}" 12 | `; 13 | -------------------------------------------------------------------------------- /packages/react-noop-renderer/README.md: -------------------------------------------------------------------------------- 1 | # `react-noop-renderer` 2 | 3 | This package is the renderer we use for debugging [Fiber](https://github.com/facebook/react/issues/6170). 4 | It is not intended to be used directly. 5 | -------------------------------------------------------------------------------- /packages/react-noop-renderer/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactNoop = require('./src/ReactNoop'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactNoop.default || ReactNoop; 17 | -------------------------------------------------------------------------------- /packages/react-noop-renderer/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-noop-renderer.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-noop-renderer.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-noop-renderer/npm/persistent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-noop-renderer-persistent.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-noop-renderer-persistent.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-noop-renderer/npm/server.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-noop-renderer-server.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-noop-renderer-server.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-noop-renderer/persistent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactNoopPersistent = require('./src/ReactNoopPersistent'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactNoopPersistent.default || ReactNoopPersistent; 17 | -------------------------------------------------------------------------------- /packages/react-noop-renderer/server.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactNoopServer = require('./src/ReactNoopServer'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactNoopServer.default || ReactNoopServer; 17 | -------------------------------------------------------------------------------- /packages/react-reconciler/inline.art.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFiberReconciler'; 12 | -------------------------------------------------------------------------------- /packages/react-reconciler/inline.dom-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFiberReconciler'; 12 | -------------------------------------------------------------------------------- /packages/react-reconciler/inline.dom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFiberReconciler'; 12 | -------------------------------------------------------------------------------- /packages/react-reconciler/inline.fabric.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFiberReconciler'; 12 | -------------------------------------------------------------------------------- /packages/react-reconciler/inline.fire.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFiberReconciler'; 12 | -------------------------------------------------------------------------------- /packages/react-reconciler/inline.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFiberReconciler'; 12 | -------------------------------------------------------------------------------- /packages/react-reconciler/inline.test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFiberReconciler'; 12 | -------------------------------------------------------------------------------- /packages/react-reconciler/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-reconciler.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-reconciler.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-reconciler/npm/persistent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-reconciler-persistent.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-reconciler-persistent.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-reconciler/npm/reflection.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-reconciler-reflection.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-reconciler-reflection.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-reconciler/persistent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | // This is the same export as in index.js, 11 | // with persistent reconciler flags turned on. 12 | const ReactFiberReconciler = require('./src/ReactFiberReconciler'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactFiberReconciler.default || ReactFiberReconciler; 17 | -------------------------------------------------------------------------------- /packages/react-reconciler/reflection.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | export * from './src/ReactFiberTreeReflection'; 13 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/ReactFiberErrorDialog.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import type {CapturedError} from './ReactCapturedValue'; 11 | 12 | // This module is forked in different environments. 13 | // By default, return `true` to log errors to the console. 14 | // Forks can return `false` if this isn't desirable. 15 | export function showErrorDialog(capturedError: CapturedError): boolean { 16 | return true; 17 | } 18 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/ReactFiberInstrumentation.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | // This lets us hook into Fiber to debug what it's doing. 11 | // See https://github.com/facebook/react/pull/8033. 12 | // This is not part of the public API, not even for React DevTools. 13 | // You may only inject a debugTool if you work on React Fiber itself. 14 | const ReactFiberInstrumentation = { 15 | debugTool: null, 16 | }; 17 | 18 | module.exports = ReactFiberInstrumentation; 19 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/ReactTypeOfMode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export type TypeOfMode = number; 11 | 12 | export const NoMode = 0b0000; 13 | export const StrictMode = 0b0001; 14 | // TODO: Remove BatchedMode and ConcurrentMode by reading from the root 15 | // tag instead 16 | export const BatchedMode = 0b0010; 17 | export const ConcurrentMode = 0b0100; 18 | export const ProfileMode = 0b1000; 19 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/__tests__/__snapshots__/ReactHooks-test.internal.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ReactHooks works with ReactDOMServer calls inside a component 1`] = `"

hello

0

bye

"`; 4 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/forks/ReactFiberHostConfig.art.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-art/src/ReactARTHostConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/forks/ReactFiberHostConfig.dom-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-dom/src/client/ReactDOMHostConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/forks/ReactFiberHostConfig.dom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-dom/src/client/ReactDOMHostConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/forks/ReactFiberHostConfig.fabric.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-native-renderer/src/ReactFabricHostConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/forks/ReactFiberHostConfig.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-native-renderer/src/ReactNativeHostConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/forks/ReactFiberHostConfig.test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-test-renderer/src/ReactTestHostConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-reconciler/src/maxSigned31BitInt.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | // Max 31 bit integer. The max integer size in V8 for 32-bit systems. 11 | // Math.pow(2, 30) - 1 12 | // 0b111111111111111111111111111111 13 | export default 1073741823; 14 | -------------------------------------------------------------------------------- /packages/react-refresh/README.md: -------------------------------------------------------------------------------- 1 | # react-refresh 2 | 3 | This is an experimental package for hot reloading. 4 | 5 | **Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.** 6 | 7 | **Use it at your own risk.** 8 | -------------------------------------------------------------------------------- /packages/react-refresh/babel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const ReactFreshBabelPlugin = require('./src/ReactFreshBabelPlugin'); 11 | 12 | // This is hacky but makes it work with both Rollup and Jest. 13 | module.exports = ReactFreshBabelPlugin.default || ReactFreshBabelPlugin; 14 | -------------------------------------------------------------------------------- /packages/react-refresh/npm/babel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-refresh-babel.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-refresh-babel.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-refresh/npm/runtime.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-refresh-runtime.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-refresh-runtime.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-refresh/runtime.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const ReactFreshRuntime = require('./src/ReactFreshRuntime'); 11 | 12 | // This is hacky but makes it work with both Rollup and Jest. 13 | module.exports = ReactFreshRuntime.default || ReactFreshRuntime; 14 | -------------------------------------------------------------------------------- /packages/react-stream/README.md: -------------------------------------------------------------------------------- 1 | # react-stream 2 | 3 | This is an experimental package for creating custom React streaming server renderers. 4 | 5 | **Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.** 6 | 7 | **Use it at your own risk.** 8 | 9 | ## API 10 | 11 | ```js 12 | var Renderer = require('react-stream'); 13 | 14 | var HostConfig = { 15 | // You'll need to implement some methods here. 16 | // See below for more information and examples. 17 | }; 18 | 19 | var MyRenderer = Renderer(HostConfig); 20 | 21 | var RendererPublicAPI = { 22 | }; 23 | 24 | module.exports = RendererPublicAPI; 25 | ``` 26 | -------------------------------------------------------------------------------- /packages/react-stream/inline.dom-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFizzStreamer'; 12 | -------------------------------------------------------------------------------- /packages/react-stream/inline.dom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This file intentionally does *not* have the Flow annotation. 9 | // Don't add it. See `./inline-typed.js` for an explanation. 10 | 11 | export * from './src/ReactFizzStreamer'; 12 | -------------------------------------------------------------------------------- /packages/react-stream/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-stream.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-stream.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-stream/src/forks/ReactFizzFormatConfig.dom-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-dom/src/server/ReactDOMFizzServerFormatConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-stream/src/forks/ReactFizzFormatConfig.dom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from 'react-dom/src/server/ReactDOMFizzServerFormatConfig'; 11 | -------------------------------------------------------------------------------- /packages/react-stream/src/forks/ReactFizzHostConfig.dom-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from '../ReactFizzHostConfigBrowser'; 11 | -------------------------------------------------------------------------------- /packages/react-stream/src/forks/ReactFizzHostConfig.dom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export * from '../ReactFizzHostConfigNode'; 11 | -------------------------------------------------------------------------------- /packages/react-test-renderer/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactTestRenderer = require('./src/ReactTestRenderer'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactTestRenderer.default || ReactTestRenderer; 17 | -------------------------------------------------------------------------------- /packages/react-test-renderer/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-test-renderer.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-test-renderer.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-test-renderer/npm/shallow.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react-test-renderer-shallow.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react-test-renderer-shallow.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-test-renderer/shallow.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const ReactShallowRenderer = require('./src/ReactShallowRenderer'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = ReactShallowRenderer.default || ReactShallowRenderer; 17 | -------------------------------------------------------------------------------- /packages/react/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | const React = require('./src/React'); 13 | 14 | // TODO: decide on the top-level export form. 15 | // This is hacky but makes it work with both Rollup and Jest. 16 | module.exports = React.default || React; 17 | -------------------------------------------------------------------------------- /packages/react/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/react.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/react.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react/src/IsSomeRendererActing.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | /** 11 | * Used by act() to track whether you're inside an act() scope. 12 | */ 13 | 14 | const IsSomeRendererActing = { 15 | current: (false: boolean), 16 | }; 17 | export default IsSomeRendererActing; 18 | -------------------------------------------------------------------------------- /packages/react/src/ReactCreateRef.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * @flow 7 | */ 8 | 9 | import type {RefObject} from 'shared/ReactTypes'; 10 | 11 | // an immutable object with a single mutable value 12 | export function createRef(): RefObject { 13 | const refObject = { 14 | current: null, 15 | }; 16 | if (__DEV__) { 17 | Object.seal(refObject); 18 | } 19 | return refObject; 20 | } 21 | -------------------------------------------------------------------------------- /packages/react/src/ReactCurrentBatchConfig.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import type {SuspenseConfig} from 'react-reconciler/src/ReactFiberSuspenseConfig'; 11 | 12 | /** 13 | * Keeps track of the current batch's configuration such as how long an update 14 | * should suspend for if it needs to. 15 | */ 16 | const ReactCurrentBatchConfig = { 17 | suspense: (null: null | SuspenseConfig), 18 | }; 19 | 20 | export default ReactCurrentBatchConfig; 21 | -------------------------------------------------------------------------------- /packages/react/src/ReactCurrentDispatcher.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import type {Dispatcher} from 'react-reconciler/src/ReactFiberHooks'; 11 | 12 | /** 13 | * Keeps track of the current dispatcher. 14 | */ 15 | const ReactCurrentDispatcher = { 16 | /** 17 | * @internal 18 | * @type {ReactComponent} 19 | */ 20 | current: (null: null | Dispatcher), 21 | }; 22 | 23 | export default ReactCurrentDispatcher; 24 | -------------------------------------------------------------------------------- /packages/react/src/__tests__/testDefinitions/PropTypes.d.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | /** 9 | * TypeScript Definition File for React. 10 | * 11 | * Full type definitions are not yet officially supported. These are mostly 12 | * just helpers for the unit test. 13 | */ 14 | 15 | declare module 'prop-types' { 16 | export let string : any; 17 | } 18 | -------------------------------------------------------------------------------- /packages/react/src/forks/ReactCurrentDispatcher.www.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | export default require('ReactCurrentDispatcher'); 9 | -------------------------------------------------------------------------------- /packages/react/src/forks/ReactCurrentOwner.www.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | export default require('ReactCurrentOwner'); 9 | -------------------------------------------------------------------------------- /packages/scheduler/README.md: -------------------------------------------------------------------------------- 1 | # `scheduler` 2 | 3 | This is a package for cooperative scheduling in a browser environment. It is currently used internally by React, but we plan to make it more generic. 4 | 5 | The public API for this package is not yet finalized. 6 | 7 | ### Thanks 8 | 9 | The React team thanks [Anton Podviaznikov](https://podviaznikov.com/) for donating the `scheduler` package name. 10 | -------------------------------------------------------------------------------- /packages/scheduler/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | export * from './src/Scheduler'; 11 | -------------------------------------------------------------------------------- /packages/scheduler/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/scheduler.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/scheduler.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/scheduler/npm/tracing-profiling.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/scheduler-tracing.profiling.min.js'); 5 | } else { 6 | module.exports = require('./cjs/scheduler-tracing.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/scheduler/npm/tracing.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/scheduler-tracing.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/scheduler-tracing.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/scheduler/npm/unstable_mock.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/scheduler-unstable_mock.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/scheduler-unstable_mock.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/scheduler/src/SchedulerFeatureFlags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export const enableSchedulerDebugging = false; 10 | export const enableIsInputPending = false; 11 | export const enableMessageLoopImplementation = true; 12 | export const enableProfiling = __PROFILE__; 13 | -------------------------------------------------------------------------------- /packages/scheduler/src/SchedulerHostConfig.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | throw new Error('This module must be shimmed by a specific build.'); 11 | -------------------------------------------------------------------------------- /packages/scheduler/src/SchedulerPriorities.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export type PriorityLevel = 0 | 1 | 2 | 3 | 4 | 5; 11 | 12 | // TODO: Use symbols? 13 | export const NoPriority = 0; 14 | export const ImmediatePriority = 1; 15 | export const UserBlockingPriority = 2; 16 | export const NormalPriority = 3; 17 | export const LowPriority = 4; 18 | export const IdlePriority = 5; 19 | -------------------------------------------------------------------------------- /packages/scheduler/src/forks/SchedulerFeatureFlags.www.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export const { 10 | enableIsInputPending, 11 | enableSchedulerDebugging, 12 | enableProfiling: enableProfilingFeatureFlag, 13 | } = require('SchedulerFeatureFlags'); 14 | 15 | export const enableProfiling = __PROFILE__ && enableProfilingFeatureFlag; 16 | export const enableMessageLoopImplementation = true; 17 | -------------------------------------------------------------------------------- /packages/scheduler/tracing.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | export * from './src/Tracing'; 13 | export * from './src/TracingSubscriptions'; 14 | -------------------------------------------------------------------------------- /packages/scheduler/unstable_mock.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | export * from './src/Scheduler'; 11 | 12 | export { 13 | unstable_flushAllWithoutAsserting, 14 | unstable_flushNumberOfYields, 15 | unstable_flushExpired, 16 | unstable_clearYields, 17 | unstable_flushUntilNextPaint, 18 | unstable_flushAll, 19 | unstable_yieldValue, 20 | unstable_advanceTime, 21 | } from './src/SchedulerHostConfig.js'; 22 | -------------------------------------------------------------------------------- /packages/shared/ExecutionEnvironment.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export const canUseDOM: boolean = !!( 11 | typeof window !== 'undefined' && 12 | typeof window.document !== 'undefined' && 13 | typeof window.document.createElement !== 'undefined' 14 | ); 15 | -------------------------------------------------------------------------------- /packages/shared/ReactError.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | // Do not require this module directly! Use normal `invariant` calls with 10 | // template literal strings. The messages will be converted to ReactError during 11 | // build, and in production they will be minified. 12 | 13 | function ReactError(error) { 14 | error.name = 'Invariant Violation'; 15 | return error; 16 | } 17 | 18 | export default ReactError; 19 | -------------------------------------------------------------------------------- /packages/shared/ReactRootTags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export type RootTag = 0 | 1 | 2; 11 | 12 | export const LegacyRoot = 0; 13 | export const BatchedRoot = 1; 14 | export const ConcurrentRoot = 2; 15 | -------------------------------------------------------------------------------- /packages/shared/ReactVersion.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | // TODO: this is special because it gets imported during build. 11 | module.exports = '16.9.0'; 12 | -------------------------------------------------------------------------------- /packages/shared/endsWith.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | export default function endsWith(subject: string, search: string): boolean { 11 | const length = subject.length; 12 | return subject.substring(length - search.length, length) === search; 13 | } 14 | -------------------------------------------------------------------------------- /packages/shared/forks/ReactFeatureFlags.readonly.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This is only used by bundle tests so they can *read* the default feature flags. 9 | // It lets us determine whether we're running in Fire mode without making tests internal. 10 | const ReactFeatureFlags = require('../ReactFeatureFlags'); 11 | // Forbid writes because this wouldn't work with bundle tests. 12 | module.exports = Object.freeze({...ReactFeatureFlags}); 13 | -------------------------------------------------------------------------------- /packages/shared/forks/lowPriorityWarningWithoutStack.www.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This "lowPriorityWarning" is an external module 9 | export default require('lowPriorityWarning'); 10 | -------------------------------------------------------------------------------- /packages/shared/forks/object-assign.umd.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | import React from 'react'; 11 | 12 | const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; 13 | 14 | export default ReactInternals.assign; 15 | -------------------------------------------------------------------------------- /packages/shared/forks/warningWithoutStack.www.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | export default require('warning'); 9 | -------------------------------------------------------------------------------- /packages/shared/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "shared", 4 | "version": "0.0.0" 5 | } 6 | -------------------------------------------------------------------------------- /packages/use-subscription/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 10 | 'use strict'; 11 | 12 | export * from './src/useSubscription'; 13 | -------------------------------------------------------------------------------- /packages/use-subscription/npm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./cjs/use-subscription.production.min.js'); 5 | } else { 6 | module.exports = require('./cjs/use-subscription.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/use-subscription/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "use-subscription", 3 | "description": "Reusable hooks", 4 | "version": "1.0.0", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/facebook/react.git", 8 | "directory": "packages/use-subscription" 9 | }, 10 | "files": [ 11 | "LICENSE", 12 | "README.md", 13 | "build-info.json", 14 | "index.js", 15 | "cjs/" 16 | ], 17 | "peerDependencies": { 18 | "react": "^16.8.0" 19 | }, 20 | "devDependencies": { 21 | "rxjs": "^5.5.6" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /scripts/authors: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Generate an AUTHORS file based on the output of git shortlog. It uses ABC 4 | # order, strips out leading spaces and numbers, then filters out specific 5 | # authors. 6 | 7 | git shortlog -se \ 8 | | perl -spe 's/^\s+\d+\s+//' \ 9 | | sed -e '/^CommitSyncScript.*$/d' \ 10 | > AUTHORS 11 | -------------------------------------------------------------------------------- /scripts/bench/.gitignore: -------------------------------------------------------------------------------- 1 | react-dom.production.min.js 2 | react.production.min.js 3 | -------------------------------------------------------------------------------- /scripts/bench/benchmarks/hacker-news/build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const {join} = require('path'); 4 | 5 | async function build(reactPath, asyncCopyTo) { 6 | // copy the UMD bundles 7 | await asyncCopyTo( 8 | join(reactPath, 'build', 'dist', 'react.production.min.js'), 9 | join(__dirname, 'react.production.min.js') 10 | ); 11 | await asyncCopyTo( 12 | join(reactPath, 'build', 'dist', 'react-dom.production.min.js'), 13 | join(__dirname, 'react-dom.production.min.js') 14 | ); 15 | } 16 | 17 | module.exports = build; 18 | -------------------------------------------------------------------------------- /scripts/bench/benchmarks/hacker-news/grayarrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/scripts/bench/benchmarks/hacker-news/grayarrow.gif -------------------------------------------------------------------------------- /scripts/bench/benchmarks/hacker-news/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ephem/react-lightyear/f1696d7585708ff790108473061f7c3dd97b28d2/scripts/bench/benchmarks/hacker-news/logo.png -------------------------------------------------------------------------------- /scripts/bench/benchmarks/pe-class-components/build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const {join} = require('path'); 4 | 5 | async function build(reactPath, asyncCopyTo) { 6 | // copy the UMD bundles 7 | await asyncCopyTo( 8 | join(reactPath, 'build', 'dist', 'react.production.min.js'), 9 | join(__dirname, 'react.production.min.js') 10 | ); 11 | await asyncCopyTo( 12 | join(reactPath, 'build', 'dist', 'react-dom.production.min.js'), 13 | join(__dirname, 'react-dom.production.min.js') 14 | ); 15 | } 16 | 17 | module.exports = build; 18 | -------------------------------------------------------------------------------- /scripts/bench/benchmarks/pe-functional-components/build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const {join} = require('path'); 4 | 5 | async function build(reactPath, asyncCopyTo) { 6 | // copy the UMD bundles 7 | await asyncCopyTo( 8 | join(reactPath, 'build', 'dist', 'react.production.min.js'), 9 | join(__dirname, 'react.production.min.js') 10 | ); 11 | await asyncCopyTo( 12 | join(reactPath, 'build', 'dist', 'react-dom.production.min.js'), 13 | join(__dirname, 'react-dom.production.min.js') 14 | ); 15 | } 16 | 17 | module.exports = build; 18 | -------------------------------------------------------------------------------- /scripts/bench/benchmarks/pe-no-components/build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const {join} = require('path'); 4 | 5 | async function build(reactPath, asyncCopyTo) { 6 | // copy the UMD bundles 7 | await asyncCopyTo( 8 | join(reactPath, 'build', 'dist', 'react.production.min.js'), 9 | join(__dirname, 'react.production.min.js') 10 | ); 11 | await asyncCopyTo( 12 | join(reactPath, 'build', 'dist', 'react-dom.production.min.js'), 13 | join(__dirname, 'react-dom.production.min.js') 14 | ); 15 | } 16 | 17 | module.exports = build; 18 | -------------------------------------------------------------------------------- /scripts/bench/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-benchmark", 3 | "version": "0.0.1", 4 | "main": "runner.js", 5 | "scripts": { 6 | "start": "node runner.js" 7 | }, 8 | "dependencies": { 9 | "chalk": "^2.1.0", 10 | "chrome-launcher": "^0.10.5", 11 | "cli-table": "^0.3.1", 12 | "http-server": "^0.10.0", 13 | "http2": "^3.3.6", 14 | "lighthouse": "^3.2.1", 15 | "mime": "^1.3.6", 16 | "minimist": "^1.2.0", 17 | "ncp": "^2.0.0", 18 | "nodegit": "^0.18.3", 19 | "rimraf": "^2.6.1", 20 | "stats-analysis": "^2.0.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /scripts/circleci/add_build_info_json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | node ./scripts/release/ci-add-build-info-json.js 6 | -------------------------------------------------------------------------------- /scripts/circleci/bench.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | npm run bench -------------------------------------------------------------------------------- /scripts/circleci/check_license.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Make sure we don't introduce accidental references to PATENTS. 6 | EXPECTED='scripts/circleci/check_license.sh' 7 | ACTUAL=$(git grep -l PATENTS) 8 | 9 | if [ "$EXPECTED" != "$ACTUAL" ]; then 10 | echo "PATENTS crept into some new files?" 11 | diff -u <(echo "$EXPECTED") <(echo "$ACTUAL") || true 12 | exit 1 13 | fi 14 | -------------------------------------------------------------------------------- /scripts/circleci/check_minified_errors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Ensure errors are minified in production 4 | 5 | OUT=$(git --no-pager grep -n --untracked --no-exclude-standard 'FIXME (minify-errors-in-prod)' -- './build/*') 6 | 7 | if [ "$OUT" != "" ]; then 8 | echo "$OUT"; 9 | echo -e "\n"; 10 | echo "Detected an unminified error message in the production build. User-facing errors message must have a corresponding error code in scripts/error-codes/codes.json." 11 | exit 1 12 | fi 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /scripts/circleci/check_modules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Make sure we don't introduce accidental @providesModule annotations. 6 | EXPECTED='scripts/rollup/wrappers.js' 7 | ACTUAL=$(git grep -l @providesModule -- './*.js' ':!scripts/rollup/shims/*.js') 8 | 9 | # Colors 10 | red=$'\e[1;31m' 11 | end=$'\e[0m' 12 | 13 | if [ "$EXPECTED" != "$ACTUAL" ]; then 14 | printf "%s\n" "${red}ERROR: @providesModule crept into some new files?${end}" 15 | diff -u <(echo "$EXPECTED") <(echo "$ACTUAL") || true 16 | exit 1 17 | fi 18 | -------------------------------------------------------------------------------- /scripts/circleci/pack_and_store_artifact.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Compress build directory into a single tarball for easy download 6 | tar -zcvf ./build.tgz ./build 7 | 8 | # NPM pack all modules to ensure we archive the correct set of files 9 | cd ./build/node_modules 10 | for dir in ./* ; do 11 | npm pack "$dir" 12 | done 13 | 14 | # Compress packed modules into a single tarball for easy download by the publish script 15 | tar -zcvf ../../node_modules.tgz ./*.tgz 16 | -------------------------------------------------------------------------------- /scripts/circleci/set_up_github_keys.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ -n "$GITHUB_TOKEN" ]; then 6 | 7 | GH_PAGES_DIR=$(pwd)/../react-gh-pages 8 | echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc 9 | git config --global user.name "Circle CI" 10 | git config --global user.email "circle@reactjs.org" 11 | 12 | fi 13 | -------------------------------------------------------------------------------- /scripts/circleci/test_coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | yarn test --coverage --maxWorkers=2 6 | if [ -z "$CI_PULL_REQUEST" ]; then 7 | ./node_modules/.bin/coveralls < ./coverage/lcov.info 8 | fi 9 | 10 | # TODO: should we also track prod code coverage somehow? 11 | # yarn test-prod --coverage 12 | -------------------------------------------------------------------------------- /scripts/circleci/test_print_warnings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | WARNINGS=$(node scripts/print-warnings/print-warnings.js) 6 | echo "$WARNINGS" 7 | test ! -z "$WARNINGS" 8 | -------------------------------------------------------------------------------- /scripts/circleci/update_package_versions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | node ./scripts/release/ci-update-package-versions.js 6 | -------------------------------------------------------------------------------- /scripts/error-codes/Types.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | */ 9 | 'use strict'; 10 | 11 | /*:: export type ErrorMap = { [id: string]: string; }; */ 12 | 13 | -------------------------------------------------------------------------------- /scripts/eslint-rules/README.md: -------------------------------------------------------------------------------- 1 | # Custom ESLint Rules 2 | 3 | This is a dummy npm package that allows us to treat it as an `eslint-plugin`. It's not actually published, nor are the rules here useful for users of React. If you want to lint your React code, try . 4 | 5 | **If you modify this rule, you must re-run `npm install ./eslint-rules` for it to take effect.** 6 | -------------------------------------------------------------------------------- /scripts/eslint-rules/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | rules: { 5 | 'no-primitive-constructors': require('./no-primitive-constructors'), 6 | 'no-to-warn-dev-within-to-throw': require('./no-to-warn-dev-within-to-throw'), 7 | 'warning-and-invariant-args': require('./warning-and-invariant-args'), 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /scripts/eslint-rules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-plugin-react-internal", 3 | "version": "0.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /scripts/git/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # To enable this hook, symlink or copy this file to .git/hooks/pre-commit. 4 | 5 | # Redirect output to stderr. 6 | exec 1>&2 7 | 8 | git diff --cached --name-only --diff-filter=ACMRTUB | \ 9 | grep '\.js$' | \ 10 | xargs ./node_modules/.bin/eslint -- 11 | -------------------------------------------------------------------------------- /scripts/jest/config.source-persistent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const baseConfig = require('./config.base'); 4 | 5 | module.exports = Object.assign({}, baseConfig, { 6 | modulePathIgnorePatterns: [ 7 | ...baseConfig.modulePathIgnorePatterns, 8 | 'packages/react-devtools-shared', 9 | 'ReactIncrementalPerf', 10 | 'ReactIncrementalUpdatesMinimalism', 11 | 'ReactIncrementalTriangle', 12 | 'ReactIncrementalReflection', 13 | 'forwardRef', 14 | ], 15 | setupFiles: [ 16 | ...baseConfig.setupFiles, 17 | require.resolve('./setupTests.persistent.js'), 18 | require.resolve('./setupHostConfigs.js'), 19 | ], 20 | }); 21 | -------------------------------------------------------------------------------- /scripts/jest/config.source.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const baseConfig = require('./config.base'); 4 | 5 | module.exports = Object.assign({}, baseConfig, { 6 | modulePathIgnorePatterns: [ 7 | ...baseConfig.modulePathIgnorePatterns, 8 | 'packages/react-devtools-shared', 9 | ], 10 | setupFiles: [ 11 | ...baseConfig.setupFiles, 12 | require.resolve('./setupHostConfigs.js'), 13 | ], 14 | }); 15 | -------------------------------------------------------------------------------- /scripts/jest/dont-run-jest-directly.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | throw new Error("Don't run `jest` directly. Run `yarn test` instead."); 4 | -------------------------------------------------------------------------------- /scripts/jest/noHaste.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | getHasteName() { 5 | // We never want Haste. 6 | return null; 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /scripts/jest/setupTests.build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | jest.mock('scheduler', () => require.requireActual('scheduler/unstable_mock')); 4 | jest.mock('scheduler/src/SchedulerHostConfig', () => 5 | require.requireActual('scheduler/src/forks/SchedulerHostConfig.mock.js') 6 | ); 7 | -------------------------------------------------------------------------------- /scripts/jest/setupTests.persistent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | jest.mock('react-noop-renderer', () => 4 | require.requireActual('react-noop-renderer/persistent') 5 | ); 6 | 7 | global.__PERSISTENT__ = true; 8 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.js", 3 | "parserOptions": { 4 | "ecmaVersion": 2017, 5 | "ecmaFeatures": { 6 | "experimentalObjectRestSpread": true, 7 | "jsx": true 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/benchmarks/Recursive.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react'); 4 | 5 | module.exports = function Recursive({depth, maxDepth = 1, siblings = 1}) { 6 | if (depth >= maxDepth) { 7 | return null; 8 | } 9 | 10 | let Siblings = []; 11 | 12 | for (let i = 0; i < siblings; i += 1) { 13 | Siblings.push( 14 |
15 |
{depth + '.' + i}
16 | 17 |
18 | ); 19 | } 20 | 21 | return
{Siblings}
; 22 | }; 23 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/benchmarks/balanced-tree (4-4)/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react'); 4 | const Recursive = require('../Recursive'); 5 | 6 | module.exports = ; 7 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/benchmarks/balanced-tree (4-6)/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react'); 4 | const Recursive = require('../Recursive'); 5 | 6 | module.exports = ; 7 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/benchmarks/deep-tree (500)/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react'); 4 | const Recursive = require('../Recursive'); 5 | 6 | module.exports = ; 7 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/benchmarks/deep-tree (5000)/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react'); 4 | const Recursive = require('../Recursive'); 5 | 6 | module.exports = ; 7 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/benchmarks/wide-tree (500)/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react'); 4 | const Recursive = require('../Recursive'); 5 | 6 | module.exports = ; 7 | -------------------------------------------------------------------------------- /scripts/lightyear-benchmarks/benchmarks/wide-tree (5000)/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react'); 4 | const Recursive = require('../Recursive'); 5 | 6 | module.exports = ; 7 | -------------------------------------------------------------------------------- /scripts/perf-counters/Makefile: -------------------------------------------------------------------------------- 1 | build/jsc-perf: src/* 2 | mkdir -p build 3 | g++ -std=c++11 -I/usr/include/webkitgtk-1.0/ -ljavascriptcoregtk-1.0 src/jsc-perf.cpp src/hardware-counter.cpp src/thread-local.cpp -o build/jsc-perf 4 | -------------------------------------------------------------------------------- /scripts/perf-counters/README.md: -------------------------------------------------------------------------------- 1 | # perf-counters 2 | 3 | Lightweight bindings to Linux perf event counters. 4 | 5 | ``` 6 | $ node 7 | > var PerfCounters = require('perf-counters'); 8 | > PerfCounters.init(); 9 | > var start = PerfCounters.getCounters(); console.log('test'); var end = PerfCounters.getCounters(); 10 | test 11 | > start 12 | { instructions: 1382, loads: 421, stores: 309 } 13 | > end 14 | { instructions: 647633, loads: 195771, stores: 133246 } 15 | > 16 | ``` 17 | -------------------------------------------------------------------------------- /scripts/perf-counters/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "perfcounters", 5 | "sources": [ 6 | "src/hardware-counter.cpp", 7 | "src/perf-counters.cpp", 8 | "src/thread-local.cpp", 9 | ], 10 | "cflags": [ 11 | "-Wno-sign-compare", 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /scripts/perf-counters/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('bindings')('perfcounters'); 4 | -------------------------------------------------------------------------------- /scripts/perf-counters/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "perf-counters", 3 | "version": "0.1.2", 4 | "description": "Lightweight bindings to Linux perf event counters.", 5 | "main": "index.js", 6 | "license": "MIT", 7 | "dependencies": { 8 | "bindings": "^1.2.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /scripts/print-warnings/README.md: -------------------------------------------------------------------------------- 1 | We use this script to extract all messages from `warning()` calls. They don't get substituted with anything in the source or the build. We only do this so we can have a copy of these messages in our internal repository and can spot accidental changes to them. 2 | -------------------------------------------------------------------------------- /scripts/release/.gitignore: -------------------------------------------------------------------------------- 1 | .progress-estimator -------------------------------------------------------------------------------- /scripts/release/create-canary-commands/confirm-automated-testing.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const clear = require('clear'); 6 | const {confirm} = require('../utils'); 7 | const theme = require('../theme'); 8 | 9 | const run = async () => { 10 | clear(); 11 | 12 | console.log( 13 | theme.caution( 14 | 'This script does not run any automated tests.' + 15 | 'You should run them manually before creating a canary release.' 16 | ) 17 | ); 18 | 19 | await confirm('Do you want to proceed?'); 20 | 21 | clear(); 22 | }; 23 | 24 | module.exports = run; 25 | -------------------------------------------------------------------------------- /scripts/release/create-canary-commands/update-version-numbers.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const {logPromise, updateVersionsForCanary} = require('../utils'); 6 | const theme = require('../theme'); 7 | 8 | module.exports = async ({reactVersion, tempDirectory, version}) => { 9 | return logPromise( 10 | updateVersionsForCanary(tempDirectory, reactVersion, version), 11 | theme`Updating version numbers ({version ${version}})` 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /scripts/release/prepare-canary-commands/parse-params.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const commandLineArgs = require('command-line-args'); 6 | 7 | const paramDefinitions = [ 8 | { 9 | name: 'build', 10 | type: Number, 11 | description: 12 | 'Circle CI build identifier (e.g. https://circleci.com/gh/facebook/react/)', 13 | }, 14 | { 15 | name: 'skipTests', 16 | type: Boolean, 17 | description: 'Skip automated fixture tests.', 18 | defaultValue: false, 19 | }, 20 | ]; 21 | 22 | module.exports = () => { 23 | const params = commandLineArgs(paramDefinitions); 24 | 25 | return params; 26 | }; 27 | -------------------------------------------------------------------------------- /scripts/release/prepare-stable-commands/get-latest-canary-version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const {execRead, logPromise} = require('../utils'); 6 | 7 | const run = async () => { 8 | const version = await execRead('npm info react@canary version'); 9 | 10 | return version; 11 | }; 12 | 13 | module.exports = async params => { 14 | return logPromise(run(params), 'Determining latest canary release version'); 15 | }; 16 | -------------------------------------------------------------------------------- /scripts/release/publish-commands/prompt-for-otp.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const prompt = require('prompt-promise'); 6 | const theme = require('../theme'); 7 | 8 | const run = async () => { 9 | while (true) { 10 | const otp = await prompt('NPM 2-factor auth code: '); 11 | prompt.done(); 12 | 13 | if (otp) { 14 | return otp; 15 | } else { 16 | console.log(); 17 | console.log(theme.error`Two-factor auth is required to publish.`); 18 | // (Ask again.) 19 | } 20 | } 21 | }; 22 | 23 | module.exports = run; 24 | -------------------------------------------------------------------------------- /scripts/rollup/plugins/sizes-plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 'use strict'; 8 | 9 | const gzip = require('gzip-size'); 10 | 11 | module.exports = function sizes(options) { 12 | return { 13 | name: 'scripts/rollup/plugins/sizes-plugin', 14 | ongenerate(bundle, obj) { 15 | const size = Buffer.byteLength(obj.code); 16 | const gzipSize = gzip.sync(obj.code); 17 | 18 | options.getSize(size, gzipSize); 19 | }, 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /scripts/rollup/shims/facebook-www/ReactBrowserEventEmitter_DO_NOT_USE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const { 11 | __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, 12 | } = require('ReactDOM-fb'); 13 | 14 | module.exports = 15 | __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactBrowserEventEmitter; 16 | -------------------------------------------------------------------------------- /scripts/rollup/shims/facebook-www/ReactDOMComponentTree_DO_NOT_USE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const { 11 | __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, 12 | } = require('ReactDOM-fb'); 13 | 14 | module.exports = 15 | __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDOMComponentTree; 16 | -------------------------------------------------------------------------------- /scripts/rollup/shims/facebook-www/ReactInstanceMap_DO_NOT_USE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const { 11 | __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, 12 | } = require('ReactDOM-fb'); 13 | 14 | module.exports = 15 | __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactInstanceMap; 16 | -------------------------------------------------------------------------------- /scripts/rollup/shims/facebook-www/findDOMNode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow 8 | * @format 9 | */ 10 | 11 | 'use strict'; 12 | 13 | const {findDOMNode} = require('ReactDOM-fb'); 14 | 15 | module.exports = findDOMNode; 16 | -------------------------------------------------------------------------------- /scripts/rollup/shims/facebook-www/renderSubtreeIntoContainer_DO_NOT_USE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const ReactDOM = require('ReactDOM-fb'); 11 | 12 | module.exports = ReactDOM.unstable_renderSubtreeIntoContainer; 13 | -------------------------------------------------------------------------------- /scripts/rollup/shims/react-native/ReactFeatureFlags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | const ReactFeatureFlags = { 14 | debugRenderPhaseSideEffects: false, 15 | }; 16 | 17 | module.exports = ReactFeatureFlags; 18 | -------------------------------------------------------------------------------- /scripts/rollup/shims/react-native/ReactNative.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | * @flow 9 | */ 10 | 11 | 'use strict'; 12 | 13 | import type {ReactNativeType} from './ReactNativeTypes'; 14 | 15 | let ReactNative; 16 | 17 | if (__DEV__) { 18 | ReactNative = require('../implementations/ReactNativeRenderer-dev'); 19 | } else { 20 | ReactNative = require('../implementations/ReactNativeRenderer-prod'); 21 | } 22 | 23 | module.exports = (ReactNative: ReactNativeType); 24 | -------------------------------------------------------------------------------- /scripts/rollup/validate/eslintignore: -------------------------------------------------------------------------------- 1 | # Don't validate noop renderer bundle. 2 | # Unlike others, it currently uses ES6 syntax (generators). 3 | # We also don't use or publish it. 4 | **/react-noop-renderer/** 5 | JestReact-prod.js 6 | JestReact-dev.js 7 | **/jest-react/** -------------------------------------------------------------------------------- /scripts/tasks/linc.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | const runESLint = require('../eslint'); 11 | 12 | console.log('Linting changed files...'); 13 | 14 | if (runESLint({onlyChanged: true})) { 15 | console.log('Lint passed for changed files.'); 16 | } else { 17 | console.log('Lint failed for changed files.'); 18 | process.exit(1); 19 | } 20 | --------------------------------------------------------------------------------