From cef47cbc01b3c41ef4bfe3cdf7abd09c34e4a9c2 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 20 Sep 2019 11:51:03 +0100 Subject: [PATCH] Rename experimental react-ui => react-interactions (#16842) --- .../README.md | 2 +- .../accessibility/focus-table.js | 0 .../accessibility/src/FocusTable.js | 6 +-- .../accessibility/src/TabFocus.js | 6 +-- .../accessibility/src/TabbableScope.js | 0 .../src/__tests__/FocusTable-test.internal.js | 2 +- .../src/__tests__/TabFocus-test.internal.js | 2 +- .../__tests__/TabbableScope-test.internal.js | 0 .../accessibility/tab-focus.js | 0 .../accessibility/tabbable-scope.js | 0 .../events/README.md | 0 .../events/context-menu.js | 0 .../events/docs/ContextMenu.md | 0 .../events/docs/Focus.md | 0 .../events/docs/FocusWithin.md | 0 .../events/docs/Hover.md | 0 .../events/docs/Press.md | 0 .../events/drag.js | 0 .../events/focus.js | 0 .../events/hover.js | 0 .../events/input.js | 0 .../events/keyboard.js | 0 .../events/press-legacy.js | 0 .../events/press.js | 0 .../events/scroll.js | 0 .../events/src/dom/ContextMenu.js | 0 .../events/src/dom/Drag.js | 0 .../events/src/dom/Focus.js | 0 .../events/src/dom/Hover.js | 0 .../events/src/dom/Input.js | 0 .../events/src/dom/Keyboard.js | 0 .../events/src/dom/Press.js | 4 +- .../events/src/dom/PressLegacy.js | 0 .../events/src/dom/Scroll.js | 0 .../events/src/dom/Swipe.js | 0 .../events/src/dom/Tap.js | 0 .../__tests__/ContextMenu-test.internal.js | 3 +- .../src/dom/__tests__/Drag-test.internal.js | 2 +- .../src/dom/__tests__/Focus-test.internal.js | 4 +- .../__tests__/FocusWithin-test.internal.js | 5 +- .../src/dom/__tests__/Hover-test.internal.js | 4 +- .../src/dom/__tests__/Input-test.internal.js | 4 +- .../dom/__tests__/Keyboard-test.internal.js | 2 +- .../MixedResponders-test-internal.js | 10 ++-- .../src/dom/__tests__/Press-test.internal.js | 2 +- .../__tests__/PressLegacy-test.internal.js | 5 +- .../src/dom/__tests__/Scroll-test.internal.js | 2 +- .../src/dom/__tests__/Tap-test.internal.js | 2 +- .../events/src/dom/shared/index.js | 0 .../src/dom/testing-library/domEnvironment.js | 0 .../dom/testing-library/domEventSequences.js | 0 .../src/dom/testing-library/domEvents.js | 0 .../events/src/dom/testing-library/index.js | 0 .../events/src/rn/Press.js | 0 .../events/swipe.js | 0 .../events/tap.js | 0 packages/react-interactions/npm/drag.js | 7 +++ packages/react-interactions/npm/focus.js | 7 +++ packages/react-interactions/npm/hover.js | 7 +++ packages/react-interactions/npm/input.js | 7 +++ packages/react-interactions/npm/keyboard.js | 7 +++ .../react-interactions/npm/press-legacy.js | 7 +++ packages/react-interactions/npm/press.js | 7 +++ packages/react-interactions/npm/scroll.js | 7 +++ packages/react-interactions/npm/swipe.js | 7 +++ packages/react-interactions/npm/tap.js | 7 +++ .../package.json | 2 +- .../src/__tests__/ReactScope-test.internal.js | 5 +- packages/react-ui/npm/drag.js | 7 --- packages/react-ui/npm/focus.js | 7 --- packages/react-ui/npm/hover.js | 7 --- packages/react-ui/npm/input.js | 7 --- packages/react-ui/npm/keyboard.js | 7 --- packages/react-ui/npm/press-legacy.js | 7 --- packages/react-ui/npm/press.js | 7 --- packages/react-ui/npm/scroll.js | 7 --- packages/react-ui/npm/swipe.js | 7 --- packages/react-ui/npm/tap.js | 7 --- scripts/rollup/bundles.js | 48 ++++++++++--------- scripts/rollup/modules.js | 4 +- scripts/shared/pathsByLanguageVersion.js | 4 +- 81 files changed, 139 insertions(+), 131 deletions(-) rename packages/{react-ui => react-interactions}/README.md (82%) rename packages/{react-ui => react-interactions}/accessibility/focus-table.js (100%) rename packages/{react-ui => react-interactions}/accessibility/src/FocusTable.js (96%) rename packages/{react-ui => react-interactions}/accessibility/src/TabFocus.js (95%) rename packages/{react-ui => react-interactions}/accessibility/src/TabbableScope.js (100%) rename packages/{react-ui => react-interactions}/accessibility/src/__tests__/FocusTable-test.internal.js (98%) rename packages/{react-ui => react-interactions}/accessibility/src/__tests__/TabFocus-test.internal.js (99%) rename packages/{react-ui => react-interactions}/accessibility/src/__tests__/TabbableScope-test.internal.js (100%) rename packages/{react-ui => react-interactions}/accessibility/tab-focus.js (100%) rename packages/{react-ui => react-interactions}/accessibility/tabbable-scope.js (100%) rename packages/{react-ui => react-interactions}/events/README.md (100%) rename packages/{react-ui => react-interactions}/events/context-menu.js (100%) rename packages/{react-ui => react-interactions}/events/docs/ContextMenu.md (100%) rename packages/{react-ui => react-interactions}/events/docs/Focus.md (100%) rename packages/{react-ui => react-interactions}/events/docs/FocusWithin.md (100%) rename packages/{react-ui => react-interactions}/events/docs/Hover.md (100%) rename packages/{react-ui => react-interactions}/events/docs/Press.md (100%) rename packages/{react-ui => react-interactions}/events/drag.js (100%) rename packages/{react-ui => react-interactions}/events/focus.js (100%) rename packages/{react-ui => react-interactions}/events/hover.js (100%) rename packages/{react-ui => react-interactions}/events/input.js (100%) rename packages/{react-ui => react-interactions}/events/keyboard.js (100%) rename packages/{react-ui => react-interactions}/events/press-legacy.js (100%) rename packages/{react-ui => react-interactions}/events/press.js (100%) rename packages/{react-ui => react-interactions}/events/scroll.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/ContextMenu.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Drag.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Focus.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Hover.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Input.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Keyboard.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Press.js (97%) rename packages/{react-ui => react-interactions}/events/src/dom/PressLegacy.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Scroll.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Swipe.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/Tap.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/ContextMenu-test.internal.js (98%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Drag-test.internal.js (98%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Focus-test.internal.js (98%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/FocusWithin-test.internal.js (98%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Hover-test.internal.js (98%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Input-test.internal.js (99%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Keyboard-test.internal.js (99%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/MixedResponders-test-internal.js (96%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Press-test.internal.js (99%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/PressLegacy-test.internal.js (99%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Scroll-test.internal.js (98%) rename packages/{react-ui => react-interactions}/events/src/dom/__tests__/Tap-test.internal.js (99%) rename packages/{react-ui => react-interactions}/events/src/dom/shared/index.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/testing-library/domEnvironment.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/testing-library/domEventSequences.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/testing-library/domEvents.js (100%) rename packages/{react-ui => react-interactions}/events/src/dom/testing-library/index.js (100%) rename packages/{react-ui => react-interactions}/events/src/rn/Press.js (100%) rename packages/{react-ui => react-interactions}/events/swipe.js (100%) rename packages/{react-ui => react-interactions}/events/tap.js (100%) create mode 100644 packages/react-interactions/npm/drag.js create mode 100644 packages/react-interactions/npm/focus.js create mode 100644 packages/react-interactions/npm/hover.js create mode 100644 packages/react-interactions/npm/input.js create mode 100644 packages/react-interactions/npm/keyboard.js create mode 100644 packages/react-interactions/npm/press-legacy.js create mode 100644 packages/react-interactions/npm/press.js create mode 100644 packages/react-interactions/npm/scroll.js create mode 100644 packages/react-interactions/npm/swipe.js create mode 100644 packages/react-interactions/npm/tap.js rename packages/{react-ui => react-interactions}/package.json (96%) delete mode 100644 packages/react-ui/npm/drag.js delete mode 100644 packages/react-ui/npm/focus.js delete mode 100644 packages/react-ui/npm/hover.js delete mode 100644 packages/react-ui/npm/input.js delete mode 100644 packages/react-ui/npm/keyboard.js delete mode 100644 packages/react-ui/npm/press-legacy.js delete mode 100644 packages/react-ui/npm/press.js delete mode 100644 packages/react-ui/npm/scroll.js delete mode 100644 packages/react-ui/npm/swipe.js delete mode 100644 packages/react-ui/npm/tap.js diff --git a/packages/react-ui/README.md b/packages/react-interactions/README.md similarity index 82% rename from packages/react-ui/README.md rename to packages/react-interactions/README.md index 09fe6c8e8bbef..2326ed26c5acc 100644 --- a/packages/react-ui/README.md +++ b/packages/react-interactions/README.md @@ -1,4 +1,4 @@ -# `react-ui` +# `react-interactions` This package is experimental. It is intended for use with the experimental React flags for internal testing. \ No newline at end of file diff --git a/packages/react-ui/accessibility/focus-table.js b/packages/react-interactions/accessibility/focus-table.js similarity index 100% rename from packages/react-ui/accessibility/focus-table.js rename to packages/react-interactions/accessibility/focus-table.js diff --git a/packages/react-ui/accessibility/src/FocusTable.js b/packages/react-interactions/accessibility/src/FocusTable.js similarity index 96% rename from packages/react-ui/accessibility/src/FocusTable.js rename to packages/react-interactions/accessibility/src/FocusTable.js index bae0520d7dbd0..b0714eb78ea91 100644 --- a/packages/react-ui/accessibility/src/FocusTable.js +++ b/packages/react-interactions/accessibility/src/FocusTable.js @@ -8,11 +8,11 @@ */ import type {ReactScopeMethods} from 'shared/ReactTypes'; -import type {KeyboardEvent} from 'react-ui/events/keyboard'; +import type {KeyboardEvent} from 'react-interactions/events/keyboard'; import React from 'react'; -import {tabFocusableImpl} from 'react-ui/accessibility/tabbable-scope'; -import {useKeyboard} from 'react-ui/events/keyboard'; +import {tabFocusableImpl} from 'react-interactions/accessibility/tabbable-scope'; +import {useKeyboard} from 'react-interactions/events/keyboard'; type FocusCellProps = { children?: React.Node, diff --git a/packages/react-ui/accessibility/src/TabFocus.js b/packages/react-interactions/accessibility/src/TabFocus.js similarity index 95% rename from packages/react-ui/accessibility/src/TabFocus.js rename to packages/react-interactions/accessibility/src/TabFocus.js index 812def1c00bf4..98ab4c812f07a 100644 --- a/packages/react-ui/accessibility/src/TabFocus.js +++ b/packages/react-interactions/accessibility/src/TabFocus.js @@ -8,11 +8,11 @@ */ import type {ReactScopeMethods} from 'shared/ReactTypes'; -import type {KeyboardEvent} from 'react-ui/events/keyboard'; +import type {KeyboardEvent} from 'react-interactions/events/keyboard'; import React from 'react'; -import {TabbableScope} from 'react-ui/accessibility/tabbable-scope'; -import {useKeyboard} from 'react-ui/events/keyboard'; +import {TabbableScope} from 'react-interactions/accessibility/tabbable-scope'; +import {useKeyboard} from 'react-interactions/events/keyboard'; type TabFocusControllerProps = { children: React.Node, diff --git a/packages/react-ui/accessibility/src/TabbableScope.js b/packages/react-interactions/accessibility/src/TabbableScope.js similarity index 100% rename from packages/react-ui/accessibility/src/TabbableScope.js rename to packages/react-interactions/accessibility/src/TabbableScope.js diff --git a/packages/react-ui/accessibility/src/__tests__/FocusTable-test.internal.js b/packages/react-interactions/accessibility/src/__tests__/FocusTable-test.internal.js similarity index 98% rename from packages/react-ui/accessibility/src/__tests__/FocusTable-test.internal.js rename to packages/react-interactions/accessibility/src/__tests__/FocusTable-test.internal.js index 28e011fbd2ecf..65f412518bc36 100644 --- a/packages/react-ui/accessibility/src/__tests__/FocusTable-test.internal.js +++ b/packages/react-interactions/accessibility/src/__tests__/FocusTable-test.internal.js @@ -7,7 +7,7 @@ * @flow */ -import {createEventTarget} from 'react-ui/events/src/dom/testing-library'; +import {createEventTarget} from 'react-interactions/events/src/dom/testing-library'; let React; let ReactFeatureFlags; diff --git a/packages/react-ui/accessibility/src/__tests__/TabFocus-test.internal.js b/packages/react-interactions/accessibility/src/__tests__/TabFocus-test.internal.js similarity index 99% rename from packages/react-ui/accessibility/src/__tests__/TabFocus-test.internal.js rename to packages/react-interactions/accessibility/src/__tests__/TabFocus-test.internal.js index 9a43205fb69bb..06f7aebae80ac 100644 --- a/packages/react-ui/accessibility/src/__tests__/TabFocus-test.internal.js +++ b/packages/react-interactions/accessibility/src/__tests__/TabFocus-test.internal.js @@ -7,7 +7,7 @@ * @flow */ -import {createEventTarget} from 'react-ui/events/src/dom/testing-library'; +import {createEventTarget} from 'react-interactions/events/src/dom/testing-library'; let React; let ReactFeatureFlags; diff --git a/packages/react-ui/accessibility/src/__tests__/TabbableScope-test.internal.js b/packages/react-interactions/accessibility/src/__tests__/TabbableScope-test.internal.js similarity index 100% rename from packages/react-ui/accessibility/src/__tests__/TabbableScope-test.internal.js rename to packages/react-interactions/accessibility/src/__tests__/TabbableScope-test.internal.js diff --git a/packages/react-ui/accessibility/tab-focus.js b/packages/react-interactions/accessibility/tab-focus.js similarity index 100% rename from packages/react-ui/accessibility/tab-focus.js rename to packages/react-interactions/accessibility/tab-focus.js diff --git a/packages/react-ui/accessibility/tabbable-scope.js b/packages/react-interactions/accessibility/tabbable-scope.js similarity index 100% rename from packages/react-ui/accessibility/tabbable-scope.js rename to packages/react-interactions/accessibility/tabbable-scope.js diff --git a/packages/react-ui/events/README.md b/packages/react-interactions/events/README.md similarity index 100% rename from packages/react-ui/events/README.md rename to packages/react-interactions/events/README.md diff --git a/packages/react-ui/events/context-menu.js b/packages/react-interactions/events/context-menu.js similarity index 100% rename from packages/react-ui/events/context-menu.js rename to packages/react-interactions/events/context-menu.js diff --git a/packages/react-ui/events/docs/ContextMenu.md b/packages/react-interactions/events/docs/ContextMenu.md similarity index 100% rename from packages/react-ui/events/docs/ContextMenu.md rename to packages/react-interactions/events/docs/ContextMenu.md diff --git a/packages/react-ui/events/docs/Focus.md b/packages/react-interactions/events/docs/Focus.md similarity index 100% rename from packages/react-ui/events/docs/Focus.md rename to packages/react-interactions/events/docs/Focus.md diff --git a/packages/react-ui/events/docs/FocusWithin.md b/packages/react-interactions/events/docs/FocusWithin.md similarity index 100% rename from packages/react-ui/events/docs/FocusWithin.md rename to packages/react-interactions/events/docs/FocusWithin.md diff --git a/packages/react-ui/events/docs/Hover.md b/packages/react-interactions/events/docs/Hover.md similarity index 100% rename from packages/react-ui/events/docs/Hover.md rename to packages/react-interactions/events/docs/Hover.md diff --git a/packages/react-ui/events/docs/Press.md b/packages/react-interactions/events/docs/Press.md similarity index 100% rename from packages/react-ui/events/docs/Press.md rename to packages/react-interactions/events/docs/Press.md diff --git a/packages/react-ui/events/drag.js b/packages/react-interactions/events/drag.js similarity index 100% rename from packages/react-ui/events/drag.js rename to packages/react-interactions/events/drag.js diff --git a/packages/react-ui/events/focus.js b/packages/react-interactions/events/focus.js similarity index 100% rename from packages/react-ui/events/focus.js rename to packages/react-interactions/events/focus.js diff --git a/packages/react-ui/events/hover.js b/packages/react-interactions/events/hover.js similarity index 100% rename from packages/react-ui/events/hover.js rename to packages/react-interactions/events/hover.js diff --git a/packages/react-ui/events/input.js b/packages/react-interactions/events/input.js similarity index 100% rename from packages/react-ui/events/input.js rename to packages/react-interactions/events/input.js diff --git a/packages/react-ui/events/keyboard.js b/packages/react-interactions/events/keyboard.js similarity index 100% rename from packages/react-ui/events/keyboard.js rename to packages/react-interactions/events/keyboard.js diff --git a/packages/react-ui/events/press-legacy.js b/packages/react-interactions/events/press-legacy.js similarity index 100% rename from packages/react-ui/events/press-legacy.js rename to packages/react-interactions/events/press-legacy.js diff --git a/packages/react-ui/events/press.js b/packages/react-interactions/events/press.js similarity index 100% rename from packages/react-ui/events/press.js rename to packages/react-interactions/events/press.js diff --git a/packages/react-ui/events/scroll.js b/packages/react-interactions/events/scroll.js similarity index 100% rename from packages/react-ui/events/scroll.js rename to packages/react-interactions/events/scroll.js diff --git a/packages/react-ui/events/src/dom/ContextMenu.js b/packages/react-interactions/events/src/dom/ContextMenu.js similarity index 100% rename from packages/react-ui/events/src/dom/ContextMenu.js rename to packages/react-interactions/events/src/dom/ContextMenu.js diff --git a/packages/react-ui/events/src/dom/Drag.js b/packages/react-interactions/events/src/dom/Drag.js similarity index 100% rename from packages/react-ui/events/src/dom/Drag.js rename to packages/react-interactions/events/src/dom/Drag.js diff --git a/packages/react-ui/events/src/dom/Focus.js b/packages/react-interactions/events/src/dom/Focus.js similarity index 100% rename from packages/react-ui/events/src/dom/Focus.js rename to packages/react-interactions/events/src/dom/Focus.js diff --git a/packages/react-ui/events/src/dom/Hover.js b/packages/react-interactions/events/src/dom/Hover.js similarity index 100% rename from packages/react-ui/events/src/dom/Hover.js rename to packages/react-interactions/events/src/dom/Hover.js diff --git a/packages/react-ui/events/src/dom/Input.js b/packages/react-interactions/events/src/dom/Input.js similarity index 100% rename from packages/react-ui/events/src/dom/Input.js rename to packages/react-interactions/events/src/dom/Input.js diff --git a/packages/react-ui/events/src/dom/Keyboard.js b/packages/react-interactions/events/src/dom/Keyboard.js similarity index 100% rename from packages/react-ui/events/src/dom/Keyboard.js rename to packages/react-interactions/events/src/dom/Keyboard.js diff --git a/packages/react-ui/events/src/dom/Press.js b/packages/react-interactions/events/src/dom/Press.js similarity index 97% rename from packages/react-ui/events/src/dom/Press.js rename to packages/react-interactions/events/src/dom/Press.js index 92c9280371e93..7f1f4136aae72 100644 --- a/packages/react-ui/events/src/dom/Press.js +++ b/packages/react-interactions/events/src/dom/Press.js @@ -10,8 +10,8 @@ import type {PointerType} from 'shared/ReactDOMTypes'; import React from 'react'; -import {useTap} from 'react-ui/events/tap'; -import {useKeyboard} from 'react-ui/events/keyboard'; +import {useTap} from 'react-interactions/events/tap'; +import {useKeyboard} from 'react-interactions/events/keyboard'; const emptyObject = {}; diff --git a/packages/react-ui/events/src/dom/PressLegacy.js b/packages/react-interactions/events/src/dom/PressLegacy.js similarity index 100% rename from packages/react-ui/events/src/dom/PressLegacy.js rename to packages/react-interactions/events/src/dom/PressLegacy.js diff --git a/packages/react-ui/events/src/dom/Scroll.js b/packages/react-interactions/events/src/dom/Scroll.js similarity index 100% rename from packages/react-ui/events/src/dom/Scroll.js rename to packages/react-interactions/events/src/dom/Scroll.js diff --git a/packages/react-ui/events/src/dom/Swipe.js b/packages/react-interactions/events/src/dom/Swipe.js similarity index 100% rename from packages/react-ui/events/src/dom/Swipe.js rename to packages/react-interactions/events/src/dom/Swipe.js diff --git a/packages/react-ui/events/src/dom/Tap.js b/packages/react-interactions/events/src/dom/Tap.js similarity index 100% rename from packages/react-ui/events/src/dom/Tap.js rename to packages/react-interactions/events/src/dom/Tap.js diff --git a/packages/react-ui/events/src/dom/__tests__/ContextMenu-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/ContextMenu-test.internal.js similarity index 98% rename from packages/react-ui/events/src/dom/__tests__/ContextMenu-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/ContextMenu-test.internal.js index 935ff277f807c..f052bda523fb4 100644 --- a/packages/react-ui/events/src/dom/__tests__/ContextMenu-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/ContextMenu-test.internal.js @@ -28,7 +28,8 @@ function initializeModules(hasPointerEvents) { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - useContextMenu = require('react-ui/events/context-menu').useContextMenu; + useContextMenu = require('react-interactions/events/context-menu') + .useContextMenu; } const forcePointerEvents = true; diff --git a/packages/react-ui/events/src/dom/__tests__/Drag-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Drag-test.internal.js similarity index 98% rename from packages/react-ui/events/src/dom/__tests__/Drag-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Drag-test.internal.js index add315eddf0dc..23d88c97e8f47 100644 --- a/packages/react-ui/events/src/dom/__tests__/Drag-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Drag-test.internal.js @@ -23,7 +23,7 @@ describe('Drag event responder', () => { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - useDrag = require('react-ui/events/drag').useDrag; + useDrag = require('react-interactions/events/drag').useDrag; container = document.createElement('div'); document.body.appendChild(container); diff --git a/packages/react-ui/events/src/dom/__tests__/Focus-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Focus-test.internal.js similarity index 98% rename from packages/react-ui/events/src/dom/__tests__/Focus-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Focus-test.internal.js index 8eb1003c1f5d2..e2f683bb6c31c 100644 --- a/packages/react-ui/events/src/dom/__tests__/Focus-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Focus-test.internal.js @@ -24,8 +24,8 @@ function initializeModules(hasPointerEvents) { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - FocusResponder = require('react-ui/events/focus').FocusResponder; - useFocus = require('react-ui/events/focus').useFocus; + FocusResponder = require('react-interactions/events/focus').FocusResponder; + useFocus = require('react-interactions/events/focus').useFocus; } const forcePointerEvents = true; diff --git a/packages/react-ui/events/src/dom/__tests__/FocusWithin-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/FocusWithin-test.internal.js similarity index 98% rename from packages/react-ui/events/src/dom/__tests__/FocusWithin-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/FocusWithin-test.internal.js index 7c80352d54538..d9808ce691a6e 100644 --- a/packages/react-ui/events/src/dom/__tests__/FocusWithin-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/FocusWithin-test.internal.js @@ -24,8 +24,9 @@ const initializeModules = hasPointerEvents => { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - FocusWithinResponder = require('react-ui/events/focus').FocusWithinResponder; - useFocusWithin = require('react-ui/events/focus').useFocusWithin; + FocusWithinResponder = require('react-interactions/events/focus') + .FocusWithinResponder; + useFocusWithin = require('react-interactions/events/focus').useFocusWithin; }; const forcePointerEvents = true; diff --git a/packages/react-ui/events/src/dom/__tests__/Hover-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Hover-test.internal.js similarity index 98% rename from packages/react-ui/events/src/dom/__tests__/Hover-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Hover-test.internal.js index ad015e19301b8..6ea168f242df3 100644 --- a/packages/react-ui/events/src/dom/__tests__/Hover-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Hover-test.internal.js @@ -25,8 +25,8 @@ function initializeModules(hasPointerEvents) { ReactFeatureFlags.enableUserBlockingEvents = true; React = require('react'); ReactDOM = require('react-dom'); - HoverResponder = require('react-ui/events/hover').HoverResponder; - useHover = require('react-ui/events/hover').useHover; + HoverResponder = require('react-interactions/events/hover').HoverResponder; + useHover = require('react-interactions/events/hover').useHover; } const forcePointerEvents = true; diff --git a/packages/react-ui/events/src/dom/__tests__/Input-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Input-test.internal.js similarity index 99% rename from packages/react-ui/events/src/dom/__tests__/Input-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Input-test.internal.js index d1168a3810129..5cd8b8524c7d6 100644 --- a/packages/react-ui/events/src/dom/__tests__/Input-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Input-test.internal.js @@ -39,8 +39,8 @@ const modulesInit = () => { React = require('react'); ReactDOM = require('react-dom'); Scheduler = require('scheduler'); - InputResponder = require('react-ui/events/input').InputResponder; - useInput = require('react-ui/events/input').useInput; + InputResponder = require('react-interactions/events/input').InputResponder; + useInput = require('react-interactions/events/input').useInput; }; describe('Input event responder', () => { diff --git a/packages/react-ui/events/src/dom/__tests__/Keyboard-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Keyboard-test.internal.js similarity index 99% rename from packages/react-ui/events/src/dom/__tests__/Keyboard-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Keyboard-test.internal.js index 45ab5a894c497..f45ff9df9be43 100644 --- a/packages/react-ui/events/src/dom/__tests__/Keyboard-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Keyboard-test.internal.js @@ -22,7 +22,7 @@ function initializeModules(hasPointerEvents) { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - useKeyboard = require('react-ui/events/keyboard').useKeyboard; + useKeyboard = require('react-interactions/events/keyboard').useKeyboard; } describe('Keyboard responder', () => { diff --git a/packages/react-ui/events/src/dom/__tests__/MixedResponders-test-internal.js b/packages/react-interactions/events/src/dom/__tests__/MixedResponders-test-internal.js similarity index 96% rename from packages/react-ui/events/src/dom/__tests__/MixedResponders-test-internal.js rename to packages/react-interactions/events/src/dom/__tests__/MixedResponders-test-internal.js index 7ae66a49a5f32..2071abe7b0a10 100644 --- a/packages/react-ui/events/src/dom/__tests__/MixedResponders-test-internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/MixedResponders-test-internal.js @@ -35,7 +35,7 @@ describe('mixing responders with the heritage event system', () => { }); it('should properly only flush sync once when the event systems are mixed', () => { - const useTap = require('react-ui/events/tap').useTap; + const useTap = require('react-interactions/events/tap').useTap; const ref = React.createRef(); let renderCounts = 0; @@ -104,7 +104,7 @@ describe('mixing responders with the heritage event system', () => { }); it('should properly flush sync when the event systems are mixed with unstable_flushDiscreteUpdates', () => { - const useTap = require('react-ui/events/tap').useTap; + const useTap = require('react-interactions/events/tap').useTap; const ref = React.createRef(); let renderCounts = 0; @@ -177,7 +177,7 @@ describe('mixing responders with the heritage event system', () => { 'event systems', async () => { const {useState} = React; - const useTap = require('react-ui/events/tap').useTap; + const useTap = require('react-interactions/events/tap').useTap; const button = React.createRef(); @@ -237,8 +237,8 @@ describe('mixing responders with the heritage event system', () => { it('is async for non-input events', () => { ReactFeatureFlags.debugRenderPhaseSideEffectsForStrictMode = false; ReactFeatureFlags.enableUserBlockingEvents = true; - const useTap = require('react-ui/events/tap').useTap; - const useInput = require('react-ui/events/input').useInput; + const useTap = require('react-interactions/events/tap').useTap; + const useInput = require('react-interactions/events/input').useInput; const root = ReactDOM.unstable_createRoot(container); let input; diff --git a/packages/react-ui/events/src/dom/__tests__/Press-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Press-test.internal.js similarity index 99% rename from packages/react-ui/events/src/dom/__tests__/Press-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Press-test.internal.js index 1bd0e176109f3..2b64b8b80a454 100644 --- a/packages/react-ui/events/src/dom/__tests__/Press-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Press-test.internal.js @@ -28,7 +28,7 @@ function initializeModules(hasPointerEvents) { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - usePress = require('react-ui/events/press').usePress; + usePress = require('react-interactions/events/press').usePress; } const pointerTypesTable = [['mouse'], ['touch']]; diff --git a/packages/react-ui/events/src/dom/__tests__/PressLegacy-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/PressLegacy-test.internal.js similarity index 99% rename from packages/react-ui/events/src/dom/__tests__/PressLegacy-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/PressLegacy-test.internal.js index a69c1ce6f16af..cca2a4333bca4 100644 --- a/packages/react-ui/events/src/dom/__tests__/PressLegacy-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/PressLegacy-test.internal.js @@ -28,8 +28,9 @@ function initializeModules(hasPointerEvents) { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - PressResponder = require('react-ui/events/press-legacy').PressResponder; - usePress = require('react-ui/events/press-legacy').usePress; + PressResponder = require('react-interactions/events/press-legacy') + .PressResponder; + usePress = require('react-interactions/events/press-legacy').usePress; } function removePressMoveStrings(eventString) { diff --git a/packages/react-ui/events/src/dom/__tests__/Scroll-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Scroll-test.internal.js similarity index 98% rename from packages/react-ui/events/src/dom/__tests__/Scroll-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Scroll-test.internal.js index 5d08145cccb24..daff0d382be15 100644 --- a/packages/react-ui/events/src/dom/__tests__/Scroll-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Scroll-test.internal.js @@ -26,7 +26,7 @@ const initializeModules = hasPointerEvents => { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - useScroll = require('react-ui/events/scroll').useScroll; + useScroll = require('react-interactions/events/scroll').useScroll; }; describe.each(table)('Scroll responder', hasPointerEvents => { diff --git a/packages/react-ui/events/src/dom/__tests__/Tap-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Tap-test.internal.js similarity index 99% rename from packages/react-ui/events/src/dom/__tests__/Tap-test.internal.js rename to packages/react-interactions/events/src/dom/__tests__/Tap-test.internal.js index 74cea783f4bd6..f1312b94f0ec3 100644 --- a/packages/react-ui/events/src/dom/__tests__/Tap-test.internal.js +++ b/packages/react-interactions/events/src/dom/__tests__/Tap-test.internal.js @@ -29,7 +29,7 @@ function initializeModules(hasPointerEvents) { ReactFeatureFlags.enableFlareAPI = true; React = require('react'); ReactDOM = require('react-dom'); - useTap = require('react-ui/events/tap').useTap; + useTap = require('react-interactions/events/tap').useTap; } const coordinatesInside = {x: 51, y: 51}; diff --git a/packages/react-ui/events/src/dom/shared/index.js b/packages/react-interactions/events/src/dom/shared/index.js similarity index 100% rename from packages/react-ui/events/src/dom/shared/index.js rename to packages/react-interactions/events/src/dom/shared/index.js diff --git a/packages/react-ui/events/src/dom/testing-library/domEnvironment.js b/packages/react-interactions/events/src/dom/testing-library/domEnvironment.js similarity index 100% rename from packages/react-ui/events/src/dom/testing-library/domEnvironment.js rename to packages/react-interactions/events/src/dom/testing-library/domEnvironment.js diff --git a/packages/react-ui/events/src/dom/testing-library/domEventSequences.js b/packages/react-interactions/events/src/dom/testing-library/domEventSequences.js similarity index 100% rename from packages/react-ui/events/src/dom/testing-library/domEventSequences.js rename to packages/react-interactions/events/src/dom/testing-library/domEventSequences.js diff --git a/packages/react-ui/events/src/dom/testing-library/domEvents.js b/packages/react-interactions/events/src/dom/testing-library/domEvents.js similarity index 100% rename from packages/react-ui/events/src/dom/testing-library/domEvents.js rename to packages/react-interactions/events/src/dom/testing-library/domEvents.js diff --git a/packages/react-ui/events/src/dom/testing-library/index.js b/packages/react-interactions/events/src/dom/testing-library/index.js similarity index 100% rename from packages/react-ui/events/src/dom/testing-library/index.js rename to packages/react-interactions/events/src/dom/testing-library/index.js diff --git a/packages/react-ui/events/src/rn/Press.js b/packages/react-interactions/events/src/rn/Press.js similarity index 100% rename from packages/react-ui/events/src/rn/Press.js rename to packages/react-interactions/events/src/rn/Press.js diff --git a/packages/react-ui/events/swipe.js b/packages/react-interactions/events/swipe.js similarity index 100% rename from packages/react-ui/events/swipe.js rename to packages/react-interactions/events/swipe.js diff --git a/packages/react-ui/events/tap.js b/packages/react-interactions/events/tap.js similarity index 100% rename from packages/react-ui/events/tap.js rename to packages/react-interactions/events/tap.js diff --git a/packages/react-interactions/npm/drag.js b/packages/react-interactions/npm/drag.js new file mode 100644 index 0000000000000..fa844823e8ad7 --- /dev/null +++ b/packages/react-interactions/npm/drag.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/drag.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/drag.development.js'); +} diff --git a/packages/react-interactions/npm/focus.js b/packages/react-interactions/npm/focus.js new file mode 100644 index 0000000000000..9a3a56e9a26d1 --- /dev/null +++ b/packages/react-interactions/npm/focus.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/focus.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/focus.development.js'); +} diff --git a/packages/react-interactions/npm/hover.js b/packages/react-interactions/npm/hover.js new file mode 100644 index 0000000000000..6ac666f7e0c6e --- /dev/null +++ b/packages/react-interactions/npm/hover.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/hover.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/hover.development.js'); +} diff --git a/packages/react-interactions/npm/input.js b/packages/react-interactions/npm/input.js new file mode 100644 index 0000000000000..82c5aadf6e29b --- /dev/null +++ b/packages/react-interactions/npm/input.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/input.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/input.development.js'); +} diff --git a/packages/react-interactions/npm/keyboard.js b/packages/react-interactions/npm/keyboard.js new file mode 100644 index 0000000000000..323da79398e7b --- /dev/null +++ b/packages/react-interactions/npm/keyboard.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/keyboard.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/keyboard.development.js'); +} diff --git a/packages/react-interactions/npm/press-legacy.js b/packages/react-interactions/npm/press-legacy.js new file mode 100644 index 0000000000000..f98feaa1f1f31 --- /dev/null +++ b/packages/react-interactions/npm/press-legacy.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/press-legacy.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/press-legacy.development.js'); +} diff --git a/packages/react-interactions/npm/press.js b/packages/react-interactions/npm/press.js new file mode 100644 index 0000000000000..9476dfceac6e9 --- /dev/null +++ b/packages/react-interactions/npm/press.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/press.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/press.development.js'); +} diff --git a/packages/react-interactions/npm/scroll.js b/packages/react-interactions/npm/scroll.js new file mode 100644 index 0000000000000..0cb8db03587ae --- /dev/null +++ b/packages/react-interactions/npm/scroll.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/scroll.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/scroll.development.js'); +} diff --git a/packages/react-interactions/npm/swipe.js b/packages/react-interactions/npm/swipe.js new file mode 100644 index 0000000000000..acd514d10c319 --- /dev/null +++ b/packages/react-interactions/npm/swipe.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/swipe.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/swipe.development.js'); +} diff --git a/packages/react-interactions/npm/tap.js b/packages/react-interactions/npm/tap.js new file mode 100644 index 0000000000000..0a096a2fa6057 --- /dev/null +++ b/packages/react-interactions/npm/tap.js @@ -0,0 +1,7 @@ +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-interactions-events/tap.production.min.js'); +} else { + module.exports = require('./cjs/react-interactions-events/tap.development.js'); +} diff --git a/packages/react-ui/package.json b/packages/react-interactions/package.json similarity index 96% rename from packages/react-ui/package.json rename to packages/react-interactions/package.json index 0e297734f101e..fe926f849c1ec 100644 --- a/packages/react-ui/package.json +++ b/packages/react-interactions/package.json @@ -1,5 +1,5 @@ { - "name": "react-ui", + "name": "react-interactions", "private": true, "description": "React is a JavaScript library for building user interfaces.", "keywords": [ diff --git a/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js b/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js index 3bb77586871e9..ac686350d99b1 100644 --- a/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js @@ -9,7 +9,7 @@ 'use strict'; -import {createEventTarget} from 'react-ui/events/src/dom/testing-library'; +import {createEventTarget} from 'react-interactions/events/src/dom/testing-library'; let React; let ReactFeatureFlags; @@ -204,7 +204,8 @@ describe('ReactScope', () => { let onKeyDown = jest.fn(); const TestScope = React.unstable_createScope((type, props) => true); const ref = React.createRef(); - const useKeyboard = require('react-ui/events/keyboard').useKeyboard; + const useKeyboard = require('react-interactions/events/keyboard') + .useKeyboard; let Component = () => { const listener = useKeyboard({ onKeyDown, diff --git a/packages/react-ui/npm/drag.js b/packages/react-ui/npm/drag.js deleted file mode 100644 index b8376c79d4d0d..0000000000000 --- a/packages/react-ui/npm/drag.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/drag.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/drag.development.js'); -} diff --git a/packages/react-ui/npm/focus.js b/packages/react-ui/npm/focus.js deleted file mode 100644 index 81f9a96bbbd10..0000000000000 --- a/packages/react-ui/npm/focus.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/focus.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/focus.development.js'); -} diff --git a/packages/react-ui/npm/hover.js b/packages/react-ui/npm/hover.js deleted file mode 100644 index eb7166195cb6e..0000000000000 --- a/packages/react-ui/npm/hover.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/hover.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/hover.development.js'); -} diff --git a/packages/react-ui/npm/input.js b/packages/react-ui/npm/input.js deleted file mode 100644 index 5c1f6aaeaa827..0000000000000 --- a/packages/react-ui/npm/input.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/input.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/input.development.js'); -} diff --git a/packages/react-ui/npm/keyboard.js b/packages/react-ui/npm/keyboard.js deleted file mode 100644 index a95620f7829b7..0000000000000 --- a/packages/react-ui/npm/keyboard.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/keyboard.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/keyboard.development.js'); -} diff --git a/packages/react-ui/npm/press-legacy.js b/packages/react-ui/npm/press-legacy.js deleted file mode 100644 index 85f7f03474fe3..0000000000000 --- a/packages/react-ui/npm/press-legacy.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/press-legacy.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/press-legacy.development.js'); -} diff --git a/packages/react-ui/npm/press.js b/packages/react-ui/npm/press.js deleted file mode 100644 index 5acc454be8082..0000000000000 --- a/packages/react-ui/npm/press.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/press.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/press.development.js'); -} diff --git a/packages/react-ui/npm/scroll.js b/packages/react-ui/npm/scroll.js deleted file mode 100644 index 7e9cb0a8a5d95..0000000000000 --- a/packages/react-ui/npm/scroll.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/scroll.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/scroll.development.js'); -} diff --git a/packages/react-ui/npm/swipe.js b/packages/react-ui/npm/swipe.js deleted file mode 100644 index 57ca821fb9aaa..0000000000000 --- a/packages/react-ui/npm/swipe.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/swipe.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/swipe.development.js'); -} diff --git a/packages/react-ui/npm/tap.js b/packages/react-ui/npm/tap.js deleted file mode 100644 index aa24c1d683e74..0000000000000 --- a/packages/react-ui/npm/tap.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-ui-events/tap.production.min.js'); -} else { - module.exports = require('./cjs/react-ui-events/tap.development.js'); -} diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index cddfefc2d466b..382290c3a9462 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -505,7 +505,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/context-menu', + entry: 'react-interactions/events/context-menu', global: 'ReactEventsContextMenu', externals: ['react'], }, @@ -520,7 +520,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/drag', + entry: 'react-interactions/events/drag', global: 'ReactEventsDrag', externals: ['react'], }, @@ -535,7 +535,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/focus', + entry: 'react-interactions/events/focus', global: 'ReactEventsFocus', externals: ['react'], }, @@ -550,7 +550,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/hover', + entry: 'react-interactions/events/hover', global: 'ReactEventsHover', externals: ['react'], }, @@ -565,7 +565,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/input', + entry: 'react-interactions/events/input', global: 'ReactEventsInput', externals: ['react'], }, @@ -580,7 +580,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/keyboard', + entry: 'react-interactions/events/keyboard', global: 'ReactEventsKeyboard', externals: ['react'], }, @@ -595,9 +595,13 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/press', + entry: 'react-interactions/events/press', global: 'ReactEventsPress', - externals: ['react', 'react-ui/events/tap', 'react-ui/events/keyboard'], + externals: [ + 'react', + 'react-interactions/events/tap', + 'react-interactions/events/keyboard', + ], }, { @@ -610,7 +614,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/press-legacy', + entry: 'react-interactions/events/press-legacy', global: 'ReactEventsPressLegacy', externals: ['react'], }, @@ -625,7 +629,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/scroll', + entry: 'react-interactions/events/scroll', global: 'ReactEventsScroll', externals: ['react'], }, @@ -640,7 +644,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/swipe', + entry: 'react-interactions/events/swipe', global: 'ReactEventsSwipe', externals: ['react'], }, @@ -655,7 +659,7 @@ const bundles = [ FB_WWW_PROD, ], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/events/tap', + entry: 'react-interactions/events/tap', global: 'ReactEventsTap', externals: ['react'], }, @@ -665,40 +669,40 @@ const bundles = [ { bundleTypes: [NODE_DEV, NODE_PROD, FB_WWW_DEV, FB_WWW_PROD], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/accessibility/focus-table', + entry: 'react-interactions/accessibility/focus-table', global: 'ReactFocusTable', externals: [ 'react', - 'react-ui/events/keyboard', - 'react-ui/accessibility/tabbable-scope', + 'react-interactions/events/keyboard', + 'react-interactions/accessibility/tabbable-scope', ], }, { bundleTypes: [NODE_DEV, NODE_PROD, FB_WWW_DEV, FB_WWW_PROD], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/accessibility/tab-focus', + entry: 'react-interactions/accessibility/tab-focus', global: 'ReactTabFocus', externals: [ 'react', - 'react-ui/events/keyboard', - 'react-ui/accessibility/tabbable-scope', + 'react-interactions/events/keyboard', + 'react-interactions/accessibility/tabbable-scope', ], }, { bundleTypes: [NODE_DEV, NODE_PROD, FB_WWW_DEV, FB_WWW_PROD], moduleType: NON_FIBER_RENDERER, - entry: 'react-ui/accessibility/tabbable-scope', + entry: 'react-interactions/accessibility/tabbable-scope', global: 'ReactTabbableScope', externals: ['react'], }, ]; const fbBundleExternalsMap = { - 'react-ui/events/keyboard': 'ReactEventsKeyboard', - 'react-ui/events/tap': 'ReactEventsTap', - 'react-ui/accessibility/tabbable-scope': 'ReactTabbableScope', + 'react-interactions/events/keyboard': 'ReactEventsKeyboard', + 'react-interactions/events/tap': 'ReactEventsTap', + 'react-interactions/accessibility/tabbable-scope': 'ReactTabbableScope', }; // Based on deep-freeze by substack (public domain) diff --git a/scripts/rollup/modules.js b/scripts/rollup/modules.js index 42f2a85e71adc..fe09b951bb2cd 100644 --- a/scripts/rollup/modules.js +++ b/scripts/rollup/modules.js @@ -23,8 +23,8 @@ const importSideEffects = Object.freeze({ const knownGlobals = Object.freeze({ react: 'React', 'react-dom': 'ReactDOM', - 'react-ui/events/keyboard': 'ReactEventsKeyboard', - 'react-ui/events/tap': 'ReactEventsTap', + 'react-interactions/events/keyboard': 'ReactEventsKeyboard', + 'react-interactions/events/tap': 'ReactEventsTap', scheduler: 'Scheduler', 'scheduler/tracing': 'SchedulerTracing', 'scheduler/unstable_mock': 'SchedulerMock', diff --git a/scripts/shared/pathsByLanguageVersion.js b/scripts/shared/pathsByLanguageVersion.js index 6fa691b3713ba..f901558466026 100644 --- a/scripts/shared/pathsByLanguageVersion.js +++ b/scripts/shared/pathsByLanguageVersion.js @@ -12,8 +12,8 @@ const esNextPaths = [ 'packages/*/*.js', // Source files 'packages/*/src/**/*.js', - 'packages/react-ui/**/*.js', - 'packages/react-ui/**/*.js', + 'packages/react-interactions/**/*.js', + 'packages/react-interactions/**/*.js', 'packages/legacy-events/**/*.js', 'packages/shared/**/*.js', // Shims and Flow environment