From 31365d50f5b6608b57c159f890fa45c078490743 Mon Sep 17 00:00:00 2001 From: Julianda Date: Sat, 23 Mar 2019 15:32:00 +0700 Subject: [PATCH 01/35] Update users.json (#1648) * Update users.json * Update users.json --- packages/homepage/content/users.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/homepage/content/users.json b/packages/homepage/content/users.json index 06c5d85b4b7..109e0f7c0fc 100644 --- a/packages/homepage/content/users.json +++ b/packages/homepage/content/users.json @@ -88,5 +88,12 @@ "link": "http://shippr.be/", "logoURL": "https://pbs.twimg.com/profile_images/840144326592155648/lTex6aF7_400x400.jpg" + }, + { + "name": “Biwabit”, + "link": "https://biwabit.com/“, + "logoURL": + "https://camo.githubusercontent.com/6189e097cc3051cee0bba10b909d9d8e1c9ae6d2/68747470733a2f2f626977616269742e636f6d2f6c6f676f2f6f6666696369616c2d6c6f676f2d77686974652e737667" } + ] From 653aa0d59e5606804be47a707ad170ffb7dc21b1 Mon Sep 17 00:00:00 2001 From: Sara Vieira Date: Sat, 23 Mar 2019 09:42:03 +0100 Subject: [PATCH 02/35] Fix users.json --- packages/homepage/content/users.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/homepage/content/users.json b/packages/homepage/content/users.json index 109e0f7c0fc..a2dfa3dff5c 100644 --- a/packages/homepage/content/users.json +++ b/packages/homepage/content/users.json @@ -90,7 +90,7 @@ "https://pbs.twimg.com/profile_images/840144326592155648/lTex6aF7_400x400.jpg" }, { - "name": “Biwabit”, + "name": "Biwabit", "link": "https://biwabit.com/“, "logoURL": "https://camo.githubusercontent.com/6189e097cc3051cee0bba10b909d9d8e1c9ae6d2/68747470733a2f2f626977616269742e636f6d2f6c6f676f2f6f6666696369616c2d6c6f676f2d77686974652e737667" From b6d7c958efe78feba8aae1cd1086c678c76dcee5 Mon Sep 17 00:00:00 2001 From: Sara Vieira Date: Sat, 23 Mar 2019 09:54:05 +0100 Subject: [PATCH 03/35] Remove weird quotes --- packages/homepage/content/users.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/homepage/content/users.json b/packages/homepage/content/users.json index a2dfa3dff5c..5f78a370ed2 100644 --- a/packages/homepage/content/users.json +++ b/packages/homepage/content/users.json @@ -91,9 +91,7 @@ }, { "name": "Biwabit", - "link": "https://biwabit.com/“, - "logoURL": - "https://camo.githubusercontent.com/6189e097cc3051cee0bba10b909d9d8e1c9ae6d2/68747470733a2f2f626977616269742e636f6d2f6c6f676f2f6f6666696369616c2d6c6f676f2d77686974652e737667" + "link": "http:///biwabit.com/", + "logoURL": "https://camo.githubusercontent.com/6189e097cc3051cee0bba10b909d9d8e1c9ae6d2/68747470733a2f2f626977616269742e636f6d2f6c6f676f2f6f6666696369616c2d6c6f676f2d77686974652e737667" } - ] From cd55319a93ccd01faa43f56f5b27891728cc1d5f Mon Sep 17 00:00:00 2001 From: Bogdan Luca Date: Sun, 24 Mar 2019 15:36:21 +0200 Subject: [PATCH 04/35] Update console-feed to 2.8.6. (#1649) --- yarn.lock | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 359d861ca10..3636cc02a71 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6670,8 +6670,9 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" console-feed@^2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/console-feed/-/console-feed-2.8.5.tgz#d91c360faf79c73fbc774fc5175b9ebbe6e1ebb4" + version "2.8.6" + resolved "https://registry.yarnpkg.com/console-feed/-/console-feed-2.8.6.tgz#f9a3506c10ba236022bc5a3fb440eac354e8faa1" + integrity sha512-dRuCCXhLGlZb6aQsRZPOodHTs1/dMPk0JMGdvu36GldtB4IwqQaqipd2YypQ3kMnaq5l6Y4NXBavicm4tkazCg== dependencies: emotion "^9.1.1" emotion-theming "^9.0.0" From 965cd409e3f312e9508e0082012168872505bbde Mon Sep 17 00:00:00 2001 From: Ives van Hoorne Date: Mon, 25 Mar 2019 12:17:43 +0100 Subject: [PATCH 05/35] Move codesandbox.dev to codesandbox.test --- package.json | 2 +- packages/app/scripts/start.js | 4 ++-- packages/common/package.json | 2 +- packages/common/src/utils/host.ts | 2 +- packages/common/src/utils/url-generator.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c989aec3d13..dee6660ba2c 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "start:dynamic": "lerna run dev --scope dynamic-pages --stream", "start:home": "lerna run start --scope homepage --stream", "start:test": "lerna run start:test --scope app --stream", - "start:dev_api": "yarn build:deps && (lerna run start --parallel --scope codesandbox-api & lerna run start:dev_api --scope app --stream)", + "start:dev_api": "lerna run start:dev_api --scope app --stream", "test": "lerna run test --ignore codesandbox-browserfs", "test:integrations": "lerna exec --scope app --stream -- yarn test:integrations", "test:jest-lite": "lerna exec --scope app --stream -- yarn run test jest-lite --watch --coverage", diff --git a/packages/app/scripts/start.js b/packages/app/scripts/start.js index bf0690a0332..041f7e8692d 100644 --- a/packages/app/scripts/start.js +++ b/packages/app/scripts/start.js @@ -258,7 +258,7 @@ function runDevServer(port, protocol, index) { // Enable HTTPS if the HTTPS environment variable is set to 'true' https: protocol === 'https', // contentBase: paths.staticPath, - host: process.env.LOCAL_SERVER ? 'localhost' : 'codesandbox.dev', + host: process.env.LOCAL_SERVER ? 'localhost' : 'codesandbox.test', disableHostCheck: !process.env.LOCAL_SERVER, contentBase: false, clientLogLevel: 'warning', @@ -266,7 +266,7 @@ function runDevServer(port, protocol, index) { proxy: { '/public/vscode-extensions/**': { target: `${protocol}://${ - process.env.LOCAL_SERVER ? 'localhost:3000' : 'codesandbox.dev' + process.env.LOCAL_SERVER ? 'localhost:3000' : 'codesandbox.test' }`, bypass: req => { if (req.method === 'HEAD') { diff --git a/packages/common/package.json b/packages/common/package.json index 5f29cabb054..e670e11f74b 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "jest", "clean": "rimraf lib && yarn rimraf node_modules/@types/react-native", - "start": "yarn clean && (yarn tsc --watch & yarn babel src --out-dir lib --watch & yarn cpx \"src/**/*.{css,svg,png,jpg}\" lib --watch)", + "start": "(yarn tsc --watch & yarn babel src --out-dir lib --watch & yarn cpx \"src/**/*.{css,svg,png,jpg}\" lib --watch)", "build:dev": "yarn clean && yarn tsc && yarn babel src --out-dir lib && yarn cpx \"src/**/*.{css,svg,png,jpg}\" lib" }, "dependencies": { diff --git a/packages/common/src/utils/host.ts b/packages/common/src/utils/host.ts index e1fff6af16a..0ab59c57350 100644 --- a/packages/common/src/utils/host.ts +++ b/packages/common/src/utils/host.ts @@ -6,7 +6,7 @@ export default () => { } if (process.env.NODE_ENV === 'development') { - return 'https://codesandbox.dev'; + return 'https://codesandbox.test'; } if ('STAGING_BRANCH' in process.env) { diff --git a/packages/common/src/utils/url-generator.ts b/packages/common/src/utils/url-generator.ts index 0af990aa7be..1e6fb8a8207 100644 --- a/packages/common/src/utils/url-generator.ts +++ b/packages/common/src/utils/url-generator.ts @@ -21,7 +21,7 @@ export const host = () => { if (process.env.LOCAL_SERVER) { return 'localhost:3000'; } - return 'codesandbox.dev'; + return 'codesandbox.test'; }; export const protocolAndHost = () => `${location.protocol}//${host()}`; From 8dbcecab41cfcb9cb94c19f68a1a4caf4b55044b Mon Sep 17 00:00:00 2001 From: Ives van Hoorne Date: Mon, 25 Mar 2019 12:32:32 +0100 Subject: [PATCH 06/35] Remove prepare script of browserfs --- standalone-packages/codesandbox-browserfs/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/standalone-packages/codesandbox-browserfs/package.json b/standalone-packages/codesandbox-browserfs/package.json index e29aee4a124..0e4c42348f5 100644 --- a/standalone-packages/codesandbox-browserfs/package.json +++ b/standalone-packages/codesandbox-browserfs/package.json @@ -111,7 +111,6 @@ "test:prepare": "npm-run-all build:scripts script:make_fixture_loader script:make_test_launcher test:build script:make_zip_fixtures script:make_http_index", "test": "npm-run-all test:prepare test:karma", "watch-test": "npm-run-all test:prepare --parallel watch:scripts test:watch test:karma", - "prepare": "npm run dist", "docs": "typedoc --mode modules --out doc --excludePrivate --readme src/DOCS.md --name BrowserFS --module umd --ignoreCompilerErrors src", "install-dependencies": "yarn" }, From 87737a180f750d0bb9ed45d37174ed4a9d1e71c7 Mon Sep 17 00:00:00 2001 From: Ives van Hoorne Date: Mon, 25 Mar 2019 13:35:58 +0100 Subject: [PATCH 07/35] Use warmup for the new packager --- .../app/src/sandbox/npm/fetch-dependencies.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/app/src/sandbox/npm/fetch-dependencies.js b/packages/app/src/sandbox/npm/fetch-dependencies.js index df537f3a556..442e3f0c333 100644 --- a/packages/app/src/sandbox/npm/fetch-dependencies.js +++ b/packages/app/src/sandbox/npm/fetch-dependencies.js @@ -18,14 +18,25 @@ const VERSION = 1; const BUCKET_URL = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test' - ? 'https://prod-packager-packages.codesandbox.io' + ? 'https://d1jyvh0kxilfa7.cloudfront.net' : 'https://dev-packager-packages.codesandbox.io'; +const NEW_PACKAGER_URL = + 'https://aiwi8rnkp5.execute-api.eu-west-1.amazonaws.com/prod/packages'; + const PACKAGER_URL = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test' - ? 'https://aiwi8rnkp5.execute-api.eu-west-1.amazonaws.com/prod/packages' + ? 'https://drq28qbjmc.execute-api.eu-west-1.amazonaws.com/prod/packages' : 'https://xi5p9f7czk.execute-api.eu-west-1.amazonaws.com/dev/packages'; +function warmupPackager(url: string, method = 'GET') { + fetch(url, { + method, + }) + .then(() => {}) + .catch(() => {}); +} + function callApi(url: string, method = 'GET') { return fetch(url, { method, @@ -111,6 +122,7 @@ async function getDependencies(dependencies: Object) { const bucketDependencyUrl = dependenciesToBucketPath(absoluteDependencies); setScreen({ type: 'loading', text: 'Downloading Dependencies...' }); + warmupPackager(`${NEW_PACKAGER_URL}/${dependencyUrl}`, 'POST'); try { const bucketManifest = await callApi( `${BUCKET_URL}/${bucketDependencyUrl}` From 8f067eb7be6eff852bd7aed49683da880da4c5c7 Mon Sep 17 00:00:00 2001 From: Ives van Hoorne Date: Mon, 25 Mar 2019 18:49:46 +0100 Subject: [PATCH 08/35] Reduce shadow size for container loading screen --- standalone-packages/sse-loading-screen/src/Cube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standalone-packages/sse-loading-screen/src/Cube.js b/standalone-packages/sse-loading-screen/src/Cube.js index 4abada0d57e..d7195d786e5 100644 --- a/standalone-packages/sse-loading-screen/src/Cube.js +++ b/standalone-packages/sse-loading-screen/src/Cube.js @@ -18,7 +18,7 @@ const SHADOW_SIZE = (() => { return 100; } - return 150; + return 100; })(); const getContainerAnimation = (offset: number) => { From c6758b23f7416d371b4d2212ffb8766bf0db96eb Mon Sep 17 00:00:00 2001 From: Ives van Hoorne Date: Mon, 25 Mar 2019 21:22:28 +0100 Subject: [PATCH 09/35] Extract common to a lib (#1653) Allows homepage and dynamic-pages to work standalone --- .yarnrc | 2 +- package.json | 2 +- packages/app/config/webpack.common.js | 4 +- packages/app/package.json | 3 +- .../app/src/app/components/Alert/index.js | 2 +- .../CodeEditor/CodeMirror/elements.js | 2 +- .../components/CodeEditor/CodeMirror/index.js | 2 +- .../CodeEditor/Configuration/index.tsx | 8 ++-- .../CodeEditor/FilePath/elements.js | 2 +- .../components/CodeEditor/FilePath/index.js | 2 +- .../CodeEditor/FuzzySearch/index.js | 6 +-- .../CodeEditor/ImageViewer/elements.ts | 2 +- .../CodeEditor/ImageViewer/index.tsx | 4 +- .../components/CodeEditor/Monaco/elements.js | 2 +- .../app/components/CodeEditor/Monaco/index.js | 10 ++--- .../CodeEditor/VSCode/Configuration/index.tsx | 8 ++-- .../components/CodeEditor/VSCode/elements.ts | 2 +- .../components/CodeEditor/VSCode/index.tsx | 14 +++---- .../src/app/components/CodeEditor/index.tsx | 16 ++++---- .../src/app/components/CodeEditor/types.js | 2 +- .../src/app/components/CodeEditor/types.ts | 2 +- .../app/components/ContextMenu/elements.js | 2 +- .../src/app/components/ContextMenu/index.js | 2 +- .../app/components/DelayedAnimation/index.js | 2 +- .../DeleteSandboxButton/elements.js | 2 +- .../DeploymentIntegration/DetailInfo/index.js | 4 +- .../app/components/GitProgress/elements.js | 2 +- .../components/HeaderSearchBar/elements.js | 2 +- .../app/components/HeaderSearchBar/index.js | 2 +- .../Integration/DetailInfo/index.js | 6 +-- .../app/components/IntegrationModal/index.js | 6 +-- .../app/src/app/components/Loading/index.js | 4 +- .../app/src/app/components/Overlay/index.js | 2 +- .../DevTools/Console/Input/index.monaco.js | 8 +++- .../Preview/DevTools/Console/Input/index.tsx | 4 +- .../Preview/DevTools/Console/index.tsx | 4 +- .../Preview/DevTools/Problems/index.tsx | 2 +- .../Preview/DevTools/Tabs/index.tsx | 2 +- .../Tests/TestDetails/ErrorDetails/index.tsx | 2 +- .../Tests/TestDetails/TestBlock/index.tsx | 2 +- .../DevTools/Tests/TestDetails/index.tsx | 2 +- .../DevTools/Tests/TestElement/index.tsx | 2 +- .../DevTools/Tests/TestSummary/index.tsx | 2 +- .../app/components/Preview/DevTools/index.tsx | 4 +- .../src/app/components/PrivacyStatus/index.js | 2 +- .../app/components/SandboxList/elements.js | 2 +- .../src/app/components/SandboxList/index.js | 6 +-- .../app/src/app/components/Skeleton/index.js | 4 +- .../app/src/app/components/SubTitle/index.js | 2 +- .../SubscribeForm/CheckoutForm/elements.js | 2 +- .../SubscribeForm/CheckoutForm/index.js | 2 +- .../src/app/components/SubscribeForm/index.js | 2 +- .../app/src/app/components/TextArea/index.js | 2 +- .../app/src/app/components/Title/index.js | 2 +- .../app/components/UploadProgress/elements.js | 2 +- packages/app/src/app/index.js | 14 +++---- .../app/src/app/pages/CLI/Prompt/index.js | 2 +- .../src/app/pages/CliInstructions/elements.js | 2 +- .../src/app/pages/CliInstructions/index.js | 4 +- .../app/pages/Curator/SandboxCard/elements.js | 6 +-- .../app/pages/Curator/SandboxCard/index.js | 7 +++- packages/app/src/app/pages/Curator/index.js | 6 +-- .../CreateNewSandbox/Modal/Template/index.js | 4 +- .../CreateNewSandbox/Modal/elements.js | 4 +- .../Content/CreateNewSandbox/Modal/index.js | 2 +- .../Content/CreateNewSandbox/index.js | 8 ++-- .../Dashboard/Content/SandboxCard/elements.js | 4 +- .../Dashboard/Content/SandboxCard/index.js | 12 +++--- .../Dashboard/Content/SandboxGrid/index.js | 2 +- .../Sandboxes/Filters/FilterOptions/index.js | 2 +- .../Content/routes/CreateTeam/Plan/index.js | 2 +- .../Content/routes/CreateTeam/index.js | 8 ++-- .../routes/TeamView/AddTeamMember/index.js | 6 +-- .../routes/TeamView/RemoveTeamMember/index.js | 4 +- .../Content/routes/TeamView/index.js | 10 ++--- .../FolderEntry/CreateFolderEntry.js | 6 +-- .../SandboxesItem/FolderEntry/index.js | 12 ++++-- .../src/app/pages/Dashboard/Sidebar/index.js | 6 +-- .../app/src/app/pages/Dashboard/elements.js | 2 +- .../Dashboard/utils/get-most-used-template.js | 2 +- packages/app/src/app/pages/GitHub/elements.js | 4 +- packages/app/src/app/pages/GitHub/index.js | 8 ++-- packages/app/src/app/pages/Live/index.js | 6 +-- .../app/src/app/pages/NewSandbox/index.js | 8 ++-- .../PricingModal/Badge/Particles/elements.js | 2 +- .../PricingModal/Badge/Particles/index.js | 2 +- .../pages/Patron/PricingModal/Badge/index.js | 4 +- .../ChangeSubscription/elements.js | 2 +- .../PricingChoice/ThankYou/elements.js | 2 +- .../PricingChoice/ThankYou/index.js | 2 +- .../PricingModal/PricingChoice/elements.js | 2 +- .../PricingModal/PricingChoice/index.js | 6 +-- packages/app/src/app/pages/Patron/index.js | 6 +-- .../Header/UserInfo/ProfileInfo/elements.js | 2 +- .../Header/UserInfo/ProfileInfo/index.js | 8 ++-- .../Header/UserInfo/Stats/Badges/index.js | 12 +++--- .../Profile/Header/UserInfo/Stats/elements.js | 2 +- .../pages/Profile/Header/UserInfo/index.js | 2 +- .../src/app/pages/Profile/Header/elements.js | 4 +- .../app/src/app/pages/Profile/Header/index.js | 2 +- .../app/pages/Profile/Navigation/elements.js | 4 +- .../app/pages/Profile/Sandboxes/elements.js | 4 +- .../src/app/pages/Profile/Sandboxes/index.js | 4 +- .../Profile/Showcase/SandboxInfo/elements.js | 2 +- .../Profile/Showcase/SandboxInfo/index.js | 4 +- .../src/app/pages/Profile/Showcase/index.js | 8 ++-- .../app/src/app/pages/Profile/elements.js | 2 +- packages/app/src/app/pages/Profile/index.js | 6 +-- .../Content/Preview/DevTools/Navigator.js | 2 +- .../Editor/Content/Preview/elements.js | 2 +- .../Sandbox/Editor/Content/Preview/index.js | 6 +-- .../Sandbox/Editor/Content/Tabs/index.js | 8 +++- .../pages/Sandbox/Editor/Content/elements.js | 2 +- .../app/pages/Sandbox/Editor/Content/index.js | 6 +-- .../Sandbox/Editor/Header/Action/elements.ts | 2 +- .../Editor/Header/CollectionInfo/index.js | 4 +- .../pages/Sandbox/Editor/Header/Logo/index.js | 2 +- .../Editor/Header/UpdateFound/index.js | 2 +- .../pages/Sandbox/Editor/Header/elements.ts | 2 +- .../app/pages/Sandbox/Editor/Header/index.tsx | 11 +++-- .../pages/Sandbox/Editor/Navigation/index.js | 14 +++---- .../Sandbox/Editor/Workspace/Chat/index.js | 4 +- .../Editor/Workspace/CreateRepo/index.js | 6 +-- .../Dependencies/AddResource/index.js | 4 +- .../Dependencies/AddVersion/index.js | 2 +- .../Editor/Workspace/Dependencies/index.js | 4 +- .../DirectoryEntry/DirectoryChildren/index.js | 2 +- .../Entry/EditIcons/elements.js | 2 +- .../DirectoryEntry/Entry/EditIcons/index.js | 2 +- .../Entry/EntryIcons/GetIconURL.js | 14 +++---- .../Entry/EntryTitleInput/index.js | 2 +- .../Files/DirectoryEntry/Entry/index.js | 2 +- .../Sandbox/Editor/Workspace/Files/index.js | 2 +- .../Editor/Workspace/Git/Changes/index.js | 4 +- .../Sandbox/Editor/Workspace/Git/index.js | 10 ++--- .../Editor/Workspace/OpenedTabs/SaveIcon.js | 4 +- .../Editor/Workspace/OpenedTabs/index.js | 2 +- .../Sandbox/Editor/Workspace/Project/index.js | 14 +++---- .../Editor/Workspace/SSEDownNotice/index.js | 2 +- .../Editor/Workspace/SandboxActions/index.js | 4 +- .../Versions/PublishFields/elements.js | 2 +- .../Workspace/Versions/PublishFields/index.js | 6 +-- .../Sandbox/Editor/Workspace/elements.js | 2 +- .../pages/Sandbox/Editor/Workspace/index.js | 2 +- .../items/ConfigurationFiles/index.js | 10 ++--- .../Editor/Workspace/items/Live/LiveInfo.js | 10 ++--- .../Editor/Workspace/items/Live/User.js | 2 +- .../Editor/Workspace/items/More/index.tsx | 6 +-- .../items/Server/EnvVars/EnvModal.js | 4 +- .../Editor/Workspace/items/Server/index.js | 4 +- .../app/src/app/pages/Sandbox/Editor/index.js | 6 +-- .../Sandbox/Editor/utils/get-vscode-theme.js | 4 +- .../app/pages/Sandbox/QuickActions/Keys.js | 2 +- .../app/pages/Sandbox/QuickActions/index.js | 4 +- .../DependencyHit/elements.js | 4 +- .../SearchDependencies/DependencyHit/index.js | 2 +- .../RawAutoComplete/index.js | 2 +- .../pages/Sandbox/SearchDependencies/index.js | 2 +- .../pages/Sandbox/SignOutNoticeModal/index.js | 4 +- .../Sandbox/ZenModeIntroductionModal/index.js | 4 +- packages/app/src/app/pages/Sandbox/index.js | 8 ++-- .../app/src/app/pages/Search/Filters/index.js | 2 +- .../app/src/app/pages/Search/Results/index.js | 2 +- .../SandboxCard/SandboxInfo/elements.js | 2 +- .../Search/SandboxCard/SandboxInfo/index.js | 2 +- .../app/pages/Search/SandboxCard/elements.js | 4 +- .../src/app/pages/Search/SandboxCard/index.js | 4 +- packages/app/src/app/pages/Search/elements.js | 2 +- packages/app/src/app/pages/Search/index.js | 6 +-- .../src/app/pages/common/LikeHeart/index.tsx | 8 ++-- .../Modals/Changelog/Dashboard/index.js | 4 +- .../common/Modals/DeploymentModal/elements.js | 4 +- .../common/Modals/DeploymentModal/index.js | 6 +-- .../common/Modals/FeedbackModal/Feedback.js | 8 ++-- .../common/Modals/ForkServerModal/index.js | 2 +- .../common/Modals/LiveSessionEnded/index.js | 4 +- .../Modals/MoveSandboxFolderModal/index.js | 4 +- .../pages/common/Modals/NewSandbox/index.js | 2 +- .../common/Modals/PickSandboxModal/index.js | 6 +-- .../PreferencesModal/Appearance/index.js | 16 ++++---- .../Modals/PreferencesModal/Badges/index.js | 4 +- .../PreferencesModal/KeyMapping/index.js | 2 +- .../PreferencesModal/SideNavigation/index.js | 2 +- .../PreferencesModal/VSCodePlaceholder.js | 4 +- .../Modals/PreferencesModal/elements.js | 2 +- .../common/Modals/ShareModal/elements.js | 2 +- .../pages/common/Modals/ShareModal/getCode.js | 4 +- .../pages/common/Modals/ShareModal/index.js | 4 +- .../AddFileToSandboxButton/elements.js | 2 +- .../DeleteFileButton/elements.js | 2 +- .../FilesList/elements.js | 2 +- .../StorageManagementModal/FilesList/index.js | 2 +- .../Navigation/Notifications/elements.js | 2 +- .../Notifications/notifications/TeamInvite.js | 4 +- .../app/pages/common/Navigation/elements.js | 4 +- .../src/app/pages/common/Navigation/index.js | 8 ++-- .../src/app/pages/common/NotFound/index.js | 4 +- .../Notifications/Notification/elements.js | 2 +- .../app/pages/common/Notifications/index.js | 2 +- .../pages/common/ShowcasePreview/elements.js | 2 +- .../app/pages/common/ShowcasePreview/index.js | 2 +- .../app/src/app/pages/common/SignIn/index.js | 4 +- .../app/pages/common/SignInButton/index.js | 4 +- .../pages/common/UserMenu/Menu/elements.js | 2 +- .../app/pages/common/UserMenu/Menu/index.js | 6 +-- .../src/app/pages/common/UserMenu/elements.js | 2 +- .../src/app/pages/common/UserMenu/index.js | 2 +- .../src/app/pages/common/ZeitAuth/index.js | 4 +- packages/app/src/app/pages/index.js | 4 +- packages/app/src/app/store/actions.js | 7 +++- packages/app/src/app/store/factories.js | 2 +- .../app/store/modules/deployment/actions.js | 2 +- .../src/app/store/modules/editor/actions.js | 4 +- .../src/app/store/modules/editor/getters.js | 9 ++-- .../app/src/app/store/modules/editor/index.js | 2 +- .../app/src/app/store/modules/editor/utils.js | 2 +- .../src/app/store/modules/files/actions.js | 6 +-- .../app/src/app/store/modules/live/actions.js | 2 +- .../app/store/modules/preferences/getters.js | 2 +- .../app/store/modules/preferences/index.js | 2 +- .../store/modules/preferences/sequences.js | 2 +- .../src/app/store/modules/workspace/items.js | 2 +- .../app/store/modules/workspace/sequences.js | 2 +- .../app/src/app/store/providers/Connection.js | 2 +- .../app/src/app/store/providers/FSSync.ts | 6 +-- packages/app/src/app/store/providers/Jwt.js | 2 +- .../app/store/providers/KeybindingManager.js | 5 ++- .../app/src/app/store/providers/Router.js | 4 +- .../app/src/app/store/providers/Socket.js | 2 +- .../create-react-app-typescript/index.js | 2 +- .../create-zip/create-react-app/index.js | 2 +- .../providers/Utils/create-zip/full/index.js | 2 +- .../store/providers/Utils/create-zip/index.js | 6 +-- .../Utils/create-zip/preact-cli/index.js | 2 +- .../Utils/create-zip/svelte/index.js | 2 +- .../Utils/create-zip/vue-cli/index.js | 2 +- .../src/app/store/providers/Utils/index.js | 2 +- packages/app/src/app/store/sequences.js | 2 +- .../app/src/app/store/utils/main-module.js | 4 +- .../app/store/utils/parse-configurations.js | 6 +-- .../app/store/utils/resolve-module-wrapped.js | 5 ++- packages/app/src/app/utils/analytics.js | 4 +- packages/app/src/app/utils/get-type.js | 2 +- packages/app/src/app/utils/prettify.js | 2 +- packages/app/src/app/utils/test/render.js | 2 +- .../extensionHostWorker/common/global.ts | 2 +- .../common/type-downloader.ts | 2 +- .../workers/ext-host-worker.ts | 4 +- .../workers/generic-worker.ts | 4 +- .../app/src/embed/components/App/index.js | 16 ++++---- .../app/src/embed/components/Content/index.js | 19 ++++++--- .../src/embed/components/EditorLink/index.js | 6 +-- .../app/src/embed/components/Files/index.js | 4 +- .../src/embed/components/Header/elements.js | 2 +- .../app/src/embed/components/Header/index.js | 9 ++-- .../app/src/embed/components/Sidebar/index.js | 4 +- packages/app/src/embed/index.js | 8 ++-- packages/app/src/embed/library.js | 2 +- packages/app/src/sandbox/compile-old.js | 2 +- packages/app/src/sandbox/compile.ts | 12 +++--- packages/app/src/sandbox/eval/cache.ts | 2 +- packages/app/src/sandbox/eval/index.js | 2 +- packages/app/src/sandbox/eval/manager.ts | 8 ++-- .../src/sandbox/eval/npm/fetch-npm-module.ts | 2 +- .../sandbox/eval/presets/angular-cli/index.js | 2 +- .../eval/presets/create-react-app/index.js | 2 +- .../src/sandbox/eval/presets/dojo/index.js | 2 +- .../app/src/sandbox/eval/tests/jest-lite.js | 2 +- .../app/src/sandbox/eval/transpiled-module.ts | 4 +- .../sandbox/eval/transpilers/babel/index.js | 2 +- .../transpilers/babel/worker/babel-worker.js | 2 +- .../eval/transpilers/babel/worker/evaluate.js | 2 +- .../eval/transpilers/babel/worker/index.js | 2 +- .../transpilers/sass/worker/sass-worker.js | 4 +- .../sandbox/eval/transpilers/vue/loader.js | 2 +- .../eval/transpilers/worker-transpiler.js | 2 +- packages/app/src/sandbox/index.js | 10 ++--- .../app/src/sandbox/npm/fetch-dependencies.js | 4 +- packages/codesandbox-api/package.json | 4 +- packages/codesandbox-api/tsconfig.json | 3 +- packages/common/package.json | 21 ++++++++-- packages/common/src/utils/global.ts | 6 ++- packages/dynamic-pages/components/Modal.js | 2 +- .../dynamic-pages/components/PageContainer.js | 4 +- packages/dynamic-pages/next.config.js | 10 +++++ packages/dynamic-pages/now.json | 9 ++++ packages/dynamic-pages/package.json | 10 ++++- packages/dynamic-pages/pages/_app.js | 6 +-- packages/dynamic-pages/pages/profile/index.js | 4 +- .../pages/user-sandboxes/index.js | 4 +- .../screens/Profile/Badges/index.js | 6 +-- .../dynamic-pages/screens/Profile/Editing.js | 2 +- .../dynamic-pages/screens/Profile/Modal.js | 2 +- .../dynamic-pages/screens/Profile/NotFound.js | 2 +- .../dynamic-pages/screens/Profile/sidebar.js | 2 +- packages/dynamic-pages/utils/openSandbox.js | 2 +- packages/homepage/gatsby-node.js | 2 +- packages/homepage/package.json | 2 + packages/homepage/src/components/Footer.js | 2 +- .../homepage/src/components/PageContainer.js | 4 +- .../src/components/StickyNavigation.js | 4 +- packages/homepage/src/components/layout.js | 6 +-- packages/homepage/src/pages/explore.js | 13 +++--- packages/homepage/src/pages/react-hooks.js | 2 +- .../src/screens/explore/Modal/index.js | 4 +- .../src/screens/explore/SandboxModal.js | 17 ++++---- .../screens/explore/_SandboxModal.elements.js | 6 +-- .../src/screens/home/Animation/Background.js | 2 +- .../src/screens/home/Animation/Cubes.js | 2 +- .../src/screens/home/Animation/Title.js | 2 +- .../src/screens/home/Animation/index.js | 8 ++-- .../src/screens/home/CycleFeature/index.js | 6 +-- .../src/screens/home/ExtraFeatures/index.js | 4 +- .../src/screens/home/Frameworks/index.js | 12 +++--- .../home/NPMFeature/EmbedAnimation/index.js | 2 +- .../home/NPMFeature/SearchInput/Input.js | 2 +- .../src/screens/home/NPMFeature/index.js | 6 +-- .../homepage/src/screens/home/Patron/index.js | 6 +-- .../screens/home/RecentPublications/index.js | 2 +- .../homepage/src/screens/home/Users/index.js | 2 +- packages/homepage/src/utils/algolia.js | 2 +- packages/node-services/src/child_process.ts | 6 +-- packages/node-services/src/net.ts | 4 +- .../sandbox-hooks/errors/sandbox-error.js | 2 +- .../transformers/raw-react-component-error.js | 2 +- yarn.lock | 41 +++++++++++++++++-- 326 files changed, 770 insertions(+), 639 deletions(-) create mode 100644 packages/dynamic-pages/now.json diff --git a/.yarnrc b/.yarnrc index 19daacaa082..8b137891791 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1 +1 @@ -workspaces-experimental true + diff --git a/package.json b/package.json index dee6660ba2c..a725062ae5a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build:prod": "lerna run build --scope homepage --stream && lerna run build --scope app --stream && gulp", "build:embed": "lerna run build:embed --scope app --stream && gulp", "build:clean": "lerna run build:clean --scope app --scope homepage && rimraf www", - "build:deps": "lerna run build:dev --scope codesandbox-api && lerna run build:dev --scope common && lerna run build:dev --scope vscode-textmate --scope codesandbox-browserfs --scope node-services && lerna run build:dev --scope sse-hooks", + "build:deps": "lerna run build:dev --scope codesandbox-api && lerna run build:dev --scope @codesandbox/common && lerna run build:dev --scope vscode-textmate --scope codesandbox-browserfs --scope node-services && lerna run build:dev --scope sse-hooks", "build:dynamic": "lerna run build --scope dynamic-pages --stream", "start": "yarn build:deps && lerna run start --scope app --stream", "start:fast": "lerna run start --scope app --stream", diff --git a/packages/app/config/webpack.common.js b/packages/app/config/webpack.common.js index 48f77bd38ce..4168e98d751 100644 --- a/packages/app/config/webpack.common.js +++ b/packages/app/config/webpack.common.js @@ -7,8 +7,8 @@ const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const HappyPack = require('happypack'); const WatchMissingNodeModulesPlugin = require('../scripts/utils/WatchMissingNodeModulesPlugin'); -const env = require('common/lib/config/env'); -const getHost = require('common/lib/utils/host'); +const env = require('@codesandbox/common/lib/config/env'); +const getHost = require('@codesandbox/common/lib/utils/host'); const babelDev = require('./babel.dev'); const babelProd = require('./babel.prod'); diff --git a/packages/app/package.json b/packages/app/package.json index 4c9071dc7f1..7f2ffa1840a 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -159,7 +159,7 @@ "cerebral": "^4.0.0", "circular-json": "^0.4.0", "codemirror": "^5.27.4", - "codesandbox-api": "^0.0.20", + "codesandbox-api": "^0.0.22", "codesandbox-import-utils": "2.1.1", "color": "^0.11.4", "compare-versions": "^3.1.0", @@ -247,7 +247,6 @@ "sha1": "^1.1.1", "shelljs": "^0.7.8", "shortid": "^2.2.8", - "socket.io-client": "^2.1.1", "store": "^2.0.12", "string-replace-loader": "^2.1.1", "styled-components": "^4.1.2", diff --git a/packages/app/src/app/components/Alert/index.js b/packages/app/src/app/components/Alert/index.js index 8b5902ff566..bb258a4dacd 100644 --- a/packages/app/src/app/components/Alert/index.js +++ b/packages/app/src/app/components/Alert/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { Container, Title, Text, Buttons } from './elements'; function Alert({ title, body, onCancel, onDelete }) { diff --git a/packages/app/src/app/components/CodeEditor/CodeMirror/elements.js b/packages/app/src/app/components/CodeEditor/CodeMirror/elements.js index 8fb44dbfd81..a81068b527a 100644 --- a/packages/app/src/app/components/CodeEditor/CodeMirror/elements.js +++ b/packages/app/src/app/components/CodeEditor/CodeMirror/elements.js @@ -1,5 +1,5 @@ import styled, { css, keyframes } from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; const fadeInAnimation = keyframes` 0% { background-color: #374140; } diff --git a/packages/app/src/app/components/CodeEditor/CodeMirror/index.js b/packages/app/src/app/components/CodeEditor/CodeMirror/index.js index 0e6b8be507d..57b8d04eeff 100644 --- a/packages/app/src/app/components/CodeEditor/CodeMirror/index.js +++ b/packages/app/src/app/components/CodeEditor/CodeMirror/index.js @@ -4,7 +4,7 @@ import * as React from 'react'; import CodeMirror from 'codemirror'; import { withTheme } from 'styled-components'; -import type { ModuleError, Module } from 'common/lib/types'; +import type { ModuleError, Module } from '@codesandbox/common/lib/types'; import { getCodeMirror } from 'app/utils/codemirror'; import 'codemirror/addon/dialog/dialog'; diff --git a/packages/app/src/app/components/CodeEditor/Configuration/index.tsx b/packages/app/src/app/components/CodeEditor/Configuration/index.tsx index ea7d4a4c88f..ec7b5484780 100644 --- a/packages/app/src/app/components/CodeEditor/Configuration/index.tsx +++ b/packages/app/src/app/components/CodeEditor/Configuration/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { TextOperation } from 'ot'; -import { Module } from 'common/lib/types'; -import getUI from 'common/lib/templates/configuration/ui'; +import { Module } from '@codesandbox/common/lib/types'; +import getUI from '@codesandbox/common/lib/templates/configuration/ui'; import getType from 'app/utils/get-type'; import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons'; -import Tooltip from 'common/lib/components/Tooltip'; -import { ConfigurationFile } from 'common/lib/templates/configuration/types'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; +import { ConfigurationFile } from '@codesandbox/common/lib/templates/configuration/types'; import CodeIcon from 'react-icons/lib/md/code'; diff --git a/packages/app/src/app/components/CodeEditor/FilePath/elements.js b/packages/app/src/app/components/CodeEditor/FilePath/elements.js index 8ed90616a07..dc040024190 100644 --- a/packages/app/src/app/components/CodeEditor/FilePath/elements.js +++ b/packages/app/src/app/components/CodeEditor/FilePath/elements.js @@ -1,7 +1,7 @@ import styled from 'styled-components'; import ChevronLeft from 'react-icons/lib/md/chevron-left'; import ExitZen from 'react-icons/lib/md/fullscreen-exit'; -import { withTooltip } from 'common/lib/components/Tooltip'; +import { withTooltip } from '@codesandbox/common/lib/components/Tooltip'; export const Container = styled.div` background-color: rgba(0, 0, 0, 0.3); diff --git a/packages/app/src/app/components/CodeEditor/FilePath/index.js b/packages/app/src/app/components/CodeEditor/FilePath/index.js index cb49a361eab..7d5f0ba8720 100644 --- a/packages/app/src/app/components/CodeEditor/FilePath/index.js +++ b/packages/app/src/app/components/CodeEditor/FilePath/index.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { getModulePath } from 'common/lib/sandbox/modules'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons'; import getType from 'app/utils/get-type'; diff --git a/packages/app/src/app/components/CodeEditor/FuzzySearch/index.js b/packages/app/src/app/components/CodeEditor/FuzzySearch/index.js index 11bc6f88d5b..3205b24ad7a 100644 --- a/packages/app/src/app/components/CodeEditor/FuzzySearch/index.js +++ b/packages/app/src/app/components/CodeEditor/FuzzySearch/index.js @@ -2,11 +2,11 @@ import * as React from 'react'; import { sortBy, groupBy, flatten } from 'lodash-es'; import Downshift from 'downshift'; import matchSorter from 'match-sorter'; -import { getModulePath } from 'common/lib/sandbox/modules'; -import Input from 'common/lib/components/Input'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; +import Input from '@codesandbox/common/lib/components/Input'; import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons'; import getType from 'app/utils/get-type'; -import { ESC } from 'common/lib/utils/keycodes'; +import { ESC } from '@codesandbox/common/lib/utils/keycodes'; import { Container, InputContainer, diff --git a/packages/app/src/app/components/CodeEditor/ImageViewer/elements.ts b/packages/app/src/app/components/CodeEditor/ImageViewer/elements.ts index 7626225b25d..3d465e573c0 100644 --- a/packages/app/src/app/components/CodeEditor/ImageViewer/elements.ts +++ b/packages/app/src/app/components/CodeEditor/ImageViewer/elements.ts @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import Centered from 'common/lib/components/flex/Centered'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; export const Container = styled(Centered)` height: 100%; diff --git a/packages/app/src/app/components/CodeEditor/ImageViewer/index.tsx b/packages/app/src/app/components/CodeEditor/ImageViewer/index.tsx index ac52e5b32d8..89d24180656 100644 --- a/packages/app/src/app/components/CodeEditor/ImageViewer/index.tsx +++ b/packages/app/src/app/components/CodeEditor/ImageViewer/index.tsx @@ -1,7 +1,7 @@ // @flow import React from 'react'; -import Input from 'common/lib/components/Input'; -import { Button } from 'common/lib/components/Button'; +import Input from '@codesandbox/common/lib/components/Input'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { Container, Title, SubTitle, Image, MaxWidth } from './elements'; import { Props } from '../types'; diff --git a/packages/app/src/app/components/CodeEditor/Monaco/elements.js b/packages/app/src/app/components/CodeEditor/Monaco/elements.js index 5ccc6afaa7f..0b352ad7431 100644 --- a/packages/app/src/app/components/CodeEditor/Monaco/elements.js +++ b/packages/app/src/app/components/CodeEditor/Monaco/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; export const Container = styled.div` width: 100%; diff --git a/packages/app/src/app/components/CodeEditor/Monaco/index.js b/packages/app/src/app/components/CodeEditor/Monaco/index.js index 6545fdf2553..dc9cf1651d0 100644 --- a/packages/app/src/app/components/CodeEditor/Monaco/index.js +++ b/packages/app/src/app/components/CodeEditor/Monaco/index.js @@ -4,20 +4,20 @@ import { TextOperation } from 'ot'; import { debounce } from 'lodash-es'; import { join, dirname } from 'path'; import { withTheme } from 'styled-components'; -import { getModulePath } from 'common/lib/sandbox/modules'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; import { listen } from 'codesandbox-api'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; import type { Module, Sandbox, ModuleError, ModuleCorrection, Directory, -} from 'common/lib/types'; -import { getTextOperation } from 'common/lib/utils/diff'; +} from '@codesandbox/common/lib/types'; +import { getTextOperation } from '@codesandbox/common/lib/utils/diff'; -import delay from 'common/lib/utils/delay'; +import delay from '@codesandbox/common/lib/utils/delay'; /* eslint-disable import/no-webpack-loader-syntax */ import LinterWorker from 'worker-loader?publicPath=/&name=monaco-linter.[hash:8].worker.js!./workers/linter'; diff --git a/packages/app/src/app/components/CodeEditor/VSCode/Configuration/index.tsx b/packages/app/src/app/components/CodeEditor/VSCode/Configuration/index.tsx index 73e2dd6c16a..d530dcbe1cd 100644 --- a/packages/app/src/app/components/CodeEditor/VSCode/Configuration/index.tsx +++ b/packages/app/src/app/components/CodeEditor/VSCode/Configuration/index.tsx @@ -1,15 +1,15 @@ // @flow import React from 'react'; import { TextOperation } from 'ot'; -import { Module } from 'common/lib/types'; -import getUI from 'common/lib/templates/configuration/ui'; +import { Module } from '@codesandbox/common/lib/types'; +import getUI from '@codesandbox/common/lib/templates/configuration/ui'; import getType from 'app/utils/get-type'; import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import { Props as EditorProps, Editor } from '../../types'; import { Container, Title, Description } from './elements'; -import { ConfigurationFile } from 'common/lib/templates/configuration/types'; +import { ConfigurationFile } from '@codesandbox/common/lib/templates/configuration/types'; type Disposable = { dispose: () => void; diff --git a/packages/app/src/app/components/CodeEditor/VSCode/elements.ts b/packages/app/src/app/components/CodeEditor/VSCode/elements.ts index af8228b246c..2851d1193c9 100644 --- a/packages/app/src/app/components/CodeEditor/VSCode/elements.ts +++ b/packages/app/src/app/components/CodeEditor/VSCode/elements.ts @@ -1,5 +1,5 @@ import styled, { createGlobalStyle } from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; export const Container = styled.div` width: 100%; diff --git a/packages/app/src/app/components/CodeEditor/VSCode/index.tsx b/packages/app/src/app/components/CodeEditor/VSCode/index.tsx index 9dd5324752f..ee0f79761d9 100644 --- a/packages/app/src/app/components/CodeEditor/VSCode/index.tsx +++ b/packages/app/src/app/components/CodeEditor/VSCode/index.tsx @@ -4,22 +4,22 @@ import { render } from 'react-dom'; import { ThemeProvider } from 'styled-components'; import { TextOperation } from 'ot'; import { debounce } from 'lodash-es'; -import { getModulePath, resolveModule } from 'common/lib/sandbox/modules'; +import { getModulePath, resolveModule } from '@codesandbox/common/lib/sandbox/modules'; import { listen } from 'codesandbox-api'; import prettify from 'app/src/app/utils/prettify'; -import DEFAULT_PRETTIER_CONFIG from 'common/lib/prettify-default-config'; -import getUI from 'common/lib/templates/configuration/ui'; +import DEFAULT_PRETTIER_CONFIG from '@codesandbox/common/lib/prettify-default-config'; +import getUI from '@codesandbox/common/lib/templates/configuration/ui'; -import getTemplate from 'common/lib/templates'; -import theme from 'common/lib/theme'; +import getTemplate from '@codesandbox/common/lib/templates'; +import theme from '@codesandbox/common/lib/theme'; import { Module, Sandbox, ModuleError, ModuleCorrection, -} from 'common/lib/types'; -import { getTextOperation } from 'common/lib/utils/diff'; +} from '@codesandbox/common/lib/types'; +import { getTextOperation } from '@codesandbox/common/lib/utils/diff'; /* eslint-disable import/no-webpack-loader-syntax */ // @ts-ignore diff --git a/packages/app/src/app/components/CodeEditor/index.tsx b/packages/app/src/app/components/CodeEditor/index.tsx index a6727f9fc2e..5dd05dfe25c 100644 --- a/packages/app/src/app/components/CodeEditor/index.tsx +++ b/packages/app/src/app/components/CodeEditor/index.tsx @@ -2,14 +2,14 @@ import React from 'react'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; import Loadable from 'app/utils/Loadable'; -import getUI from 'common/lib/templates/configuration/ui'; -import Centered from 'common/lib/components/flex/Centered'; -import Margin from 'common/lib/components/spacing/Margin'; -import isImage from 'common/lib/utils/is-image'; -import getDefinition from 'common/lib/templates'; -import { Sandbox } from 'common/lib/types'; -import { getModulePath } from 'common/lib/sandbox/modules'; -import Tooltip from 'common/lib/components/Tooltip'; +import getUI from '@codesandbox/common/lib/templates/configuration/ui'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import isImage from '@codesandbox/common/lib/utils/is-image'; +import getDefinition from '@codesandbox/common/lib/templates'; +import { Sandbox } from '@codesandbox/common/lib/types'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import UIIcon from 'react-icons/lib/md/dvr'; import QuestionIcon from 'react-icons/lib/go/question'; diff --git a/packages/app/src/app/components/CodeEditor/types.js b/packages/app/src/app/components/CodeEditor/types.js index 578f87b4b9d..ef76dacb67a 100644 --- a/packages/app/src/app/components/CodeEditor/types.js +++ b/packages/app/src/app/components/CodeEditor/types.js @@ -5,7 +5,7 @@ import type { Sandbox, ModuleError, ModuleCorrection, -} from 'common/lib/types'; +} from '@codesandbox/common/lib/types'; export type Settings = { autoCompleteEnabled: boolean, diff --git a/packages/app/src/app/components/CodeEditor/types.ts b/packages/app/src/app/components/CodeEditor/types.ts index 3261d0355d8..bb4d2ec52e5 100644 --- a/packages/app/src/app/components/CodeEditor/types.ts +++ b/packages/app/src/app/components/CodeEditor/types.ts @@ -5,7 +5,7 @@ import { Sandbox, ModuleError, ModuleCorrection, -} from 'common/lib/types'; +} from '@codesandbox/common/lib/types'; export type Settings = { autoCompleteEnabled: boolean; diff --git a/packages/app/src/app/components/ContextMenu/elements.js b/packages/app/src/app/components/ContextMenu/elements.js index 8312251f9f6..2ae4fa25932 100644 --- a/packages/app/src/app/components/ContextMenu/elements.js +++ b/packages/app/src/app/components/ContextMenu/elements.js @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { animated } from 'react-spring/renderprops'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; export const Container = styled(animated.div)` position: fixed; diff --git a/packages/app/src/app/components/ContextMenu/index.js b/packages/app/src/app/components/ContextMenu/index.js index ece878f512e..e50f92aeeba 100644 --- a/packages/app/src/app/components/ContextMenu/index.js +++ b/packages/app/src/app/components/ContextMenu/index.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { Spring } from 'react-spring/renderprops'; -import Portal from 'common/lib/components/Portal'; +import Portal from '@codesandbox/common/lib/components/Portal'; import { Container, Item, ItemContainer } from './elements'; diff --git a/packages/app/src/app/components/DelayedAnimation/index.js b/packages/app/src/app/components/DelayedAnimation/index.js index ce22bae6e23..968ac294d32 100644 --- a/packages/app/src/app/components/DelayedAnimation/index.js +++ b/packages/app/src/app/components/DelayedAnimation/index.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export default styled.div` ${props => delayEffect(props.delay || 0)}; diff --git a/packages/app/src/app/components/DeleteSandboxButton/elements.js b/packages/app/src/app/components/DeleteSandboxButton/elements.js index eda310f0b39..b887d20c976 100644 --- a/packages/app/src/app/components/DeleteSandboxButton/elements.js +++ b/packages/app/src/app/components/DeleteSandboxButton/elements.js @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components'; import DeleteIcon from 'react-icons/lib/md/delete'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; export const DeleteSandboxButton = styled(props => ( diff --git a/packages/app/src/app/components/DeploymentIntegration/DetailInfo/index.js b/packages/app/src/app/components/DeploymentIntegration/DetailInfo/index.js index b6b575ef64e..a0378398384 100644 --- a/packages/app/src/app/components/DeploymentIntegration/DetailInfo/index.js +++ b/packages/app/src/app/components/DeploymentIntegration/DetailInfo/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import Margin from 'common/lib/components/spacing/Margin'; -import { Button } from 'common/lib/components/Button'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { Details, Info } from './elements'; diff --git a/packages/app/src/app/components/GitProgress/elements.js b/packages/app/src/app/components/GitProgress/elements.js index 974f249e071..a00f0f4c34e 100644 --- a/packages/app/src/app/components/GitProgress/elements.js +++ b/packages/app/src/app/components/GitProgress/elements.js @@ -1,6 +1,6 @@ import styled, { keyframes } from 'styled-components'; -import delayInEffect from 'common/lib/utils/animation/delay-effect'; +import delayInEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; import OpaqueLogo from 'app/components/OpaqueLogo'; import GitHubLogo from 'app/components/GitHubLogo'; import Cube from './Cube'; diff --git a/packages/app/src/app/components/HeaderSearchBar/elements.js b/packages/app/src/app/components/HeaderSearchBar/elements.js index da8c1a18c08..70a1199a955 100644 --- a/packages/app/src/app/components/HeaderSearchBar/elements.js +++ b/packages/app/src/app/components/HeaderSearchBar/elements.js @@ -1,6 +1,6 @@ import styled from 'styled-components'; import SearchIcon from 'react-icons/lib/go/search'; -import Relative from 'common/lib/components/Relative'; +import Relative from '@codesandbox/common/lib/components/Relative'; export const Container = styled(Relative)` display: flex; diff --git a/packages/app/src/app/components/HeaderSearchBar/index.js b/packages/app/src/app/components/HeaderSearchBar/index.js index 7a0b4019ca8..60ebef9198c 100644 --- a/packages/app/src/app/components/HeaderSearchBar/index.js +++ b/packages/app/src/app/components/HeaderSearchBar/index.js @@ -1,6 +1,6 @@ import React from 'react'; import history from 'app/utils/history'; -import { searchUrl } from 'common/lib/utils/url-generator'; +import { searchUrl } from '@codesandbox/common/lib/utils/url-generator'; import { Container, diff --git a/packages/app/src/app/components/Integration/DetailInfo/index.js b/packages/app/src/app/components/Integration/DetailInfo/index.js index ca32c0bc462..13aa0574ae3 100644 --- a/packages/app/src/app/components/Integration/DetailInfo/index.js +++ b/packages/app/src/app/components/Integration/DetailInfo/index.js @@ -1,8 +1,8 @@ import React from 'react'; import CrossIcon from 'react-icons/lib/md/clear'; -import Margin from 'common/lib/components/spacing/Margin'; -import Tooltip from 'common/lib/components/Tooltip'; -import { Button } from 'common/lib/components/Button'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { Details, Heading, Info, Action } from './elements'; diff --git a/packages/app/src/app/components/IntegrationModal/index.js b/packages/app/src/app/components/IntegrationModal/index.js index 771c91a3a7e..88c3a4d7288 100644 --- a/packages/app/src/app/components/IntegrationModal/index.js +++ b/packages/app/src/app/components/IntegrationModal/index.js @@ -1,8 +1,8 @@ import React from 'react'; -import Centered from 'common/lib/components/flex/Centered'; -import Margin from 'common/lib/components/spacing/Margin'; -import Relative from 'common/lib/components/Relative'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import Relative from '@codesandbox/common/lib/components/Relative'; import { Container, diff --git a/packages/app/src/app/components/Loading/index.js b/packages/app/src/app/components/Loading/index.js index 47c623eb4aa..7783e7ebeb0 100644 --- a/packages/app/src/app/components/Loading/index.js +++ b/packages/app/src/app/components/Loading/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import Logo from 'common/lib/components/Logo'; -import Centered from 'common/lib/components/flex/Centered'; +import Logo from '@codesandbox/common/lib/components/Logo'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import { LogoContainer } from './elements'; diff --git a/packages/app/src/app/components/Overlay/index.js b/packages/app/src/app/components/Overlay/index.js index e8566c7e1d7..2f150615651 100644 --- a/packages/app/src/app/components/Overlay/index.js +++ b/packages/app/src/app/components/Overlay/index.js @@ -2,7 +2,7 @@ import React from 'react'; import { observer } from 'mobx-react'; import { Transition, animated, config } from 'react-spring/renderprops'; -import track from 'common/lib/utils/analytics'; +import track from '@codesandbox/common/lib/utils/analytics'; class OverlayComponent extends React.Component { state = { diff --git a/packages/app/src/app/components/Preview/DevTools/Console/Input/index.monaco.js b/packages/app/src/app/components/Preview/DevTools/Console/Input/index.monaco.js index 210f8780e3b..6c156d5a5bc 100644 --- a/packages/app/src/app/components/Preview/DevTools/Console/Input/index.monaco.js +++ b/packages/app/src/app/components/Preview/DevTools/Console/Input/index.monaco.js @@ -3,12 +3,16 @@ import React from 'react'; import styled from 'styled-components'; import ChevronRight from 'react-icons/lib/md/chevron-right'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import MonacoEditor from 'app/components/CodeEditor/Monaco/MonacoReactComponent'; import defineTheme from 'app/components/CodeEditor/Monaco/define-theme'; -import { ARROW_UP, ARROW_DOWN, ENTER } from 'common/lib/utils/keycodes'; +import { + ARROW_UP, + ARROW_DOWN, + ENTER, +} from '@codesandbox/common/lib/utils/keycodes'; import { IconContainer } from './elements'; diff --git a/packages/app/src/app/components/Preview/DevTools/Console/Input/index.tsx b/packages/app/src/app/components/Preview/DevTools/Console/Input/index.tsx index e4c57d6b89f..dcf2df2ef02 100644 --- a/packages/app/src/app/components/Preview/DevTools/Console/Input/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Console/Input/index.tsx @@ -4,11 +4,11 @@ import CodeMirror from 'codemirror'; import styled from 'styled-components'; import ChevronRight from 'react-icons/lib/md/chevron-right'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import { getCodeMirror } from 'app/utils/codemirror'; -import { ARROW_UP, ARROW_DOWN, ENTER } from 'common/lib/utils/keycodes'; +import { ARROW_UP, ARROW_DOWN, ENTER } from '@codesandbox/common/lib/utils/keycodes'; import { IconContainer, CodeMirrorContainer } from './elements'; diff --git a/packages/app/src/app/components/Preview/DevTools/Console/index.tsx b/packages/app/src/app/components/Preview/DevTools/Console/index.tsx index 0a27cd4e531..3576464680a 100644 --- a/packages/app/src/app/components/Preview/DevTools/Console/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Console/index.tsx @@ -7,12 +7,12 @@ import update from 'immutability-helper'; import ClearIcon from 'react-icons/lib/md/clear-all'; import { Decode, Console as ConsoleFeed } from 'console-feed'; -import Select from 'common/lib/components/Select'; +import Select from '@codesandbox/common/lib/components/Select'; import Input from './Input'; import { Container, Messages, inspectorTheme, FilterInput } from './elements'; import { DevToolProps } from '..'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; export type IMessage = { type: 'message' | 'command' | 'return'; diff --git a/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx b/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx index d881f544080..695c5e37e38 100644 --- a/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { listen, dispatch, actions } from 'codesandbox-api'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import FileIcon from 'react-icons/lib/md/insert-drive-file'; import { Console } from 'console-feed'; diff --git a/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx index 6f9d2c7eed8..61700fbdf94 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { IViewType } from '..'; import { Actions, Container, Tabs } from './elements'; diff --git a/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/ErrorDetails/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/ErrorDetails/index.tsx index 29c07598cdd..d4df83394fa 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/ErrorDetails/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/ErrorDetails/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import styled from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import ansiHTML from 'ansi-html'; import { TestError } from '../../'; diff --git a/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/TestBlock/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/TestBlock/index.tsx index 7b81445f19f..fe4171447dd 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/TestBlock/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/TestBlock/index.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import FileIcon from 'react-icons/lib/md/insert-drive-file'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { Test } from '../../'; import { BlockHeader, Container, Actions } from './elements'; diff --git a/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/index.tsx index 485a4bebf3c..41cb559b89c 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tests/TestDetails/index.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import FileIcon from 'react-icons/lib/md/insert-drive-file'; import PlayIcon from 'react-icons/lib/go/playback-play'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { File, Status } from '../'; import { diff --git a/packages/app/src/app/components/Preview/DevTools/Tests/TestElement/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tests/TestElement/index.tsx index 71817994de7..c2214f5ca23 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tests/TestElement/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tests/TestElement/index.tsx @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import PlayIcon from 'react-icons/lib/go/playback-play'; import FileIcon from 'react-icons/lib/md/insert-drive-file'; diff --git a/packages/app/src/app/components/Preview/DevTools/Tests/TestSummary/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tests/TestSummary/index.tsx index 2200eb86039..92c177622d5 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tests/TestSummary/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tests/TestSummary/index.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import PlayIcon from 'react-icons/lib/go/playback-play'; import SyncIcon from 'react-icons/lib/go/sync'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { File, Test, Status } from '../'; diff --git a/packages/app/src/app/components/Preview/DevTools/index.tsx b/packages/app/src/app/components/Preview/DevTools/index.tsx index 6e26fd42a90..790ca9a883f 100644 --- a/packages/app/src/app/components/Preview/DevTools/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/index.tsx @@ -4,7 +4,7 @@ import { TweenMax, Elastic } from 'gsap'; import store from 'store/dist/store.modern'; import FaAngleUp from 'react-icons/lib/fa/angle-up'; -import { TemplateType } from 'common/lib/templates'; +import { TemplateType } from '@codesandbox/common/lib/templates'; import console from './Console'; import tests from './Tests'; @@ -12,7 +12,7 @@ import problems from './Problems'; import terminal from './Terminal'; import { Container, Header, ContentContainer } from './elements'; -import { ViewConfig } from 'common/lib/templates/template'; +import { ViewConfig } from '@codesandbox/common/lib/templates/template'; import Tabs, { ITabPosition } from './Tabs'; function unFocus(document, window) { diff --git a/packages/app/src/app/components/PrivacyStatus/index.js b/packages/app/src/app/components/PrivacyStatus/index.js index bd33fce0125..798f9af2877 100644 --- a/packages/app/src/app/components/PrivacyStatus/index.js +++ b/packages/app/src/app/components/PrivacyStatus/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { StyledUnlisted, StyledPrivate, Icon } from './elements'; diff --git a/packages/app/src/app/components/SandboxList/elements.js b/packages/app/src/app/components/SandboxList/elements.js index 620ddb22059..2b7157110e5 100644 --- a/packages/app/src/app/components/SandboxList/elements.js +++ b/packages/app/src/app/components/SandboxList/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export const HeaderTitle = styled.th` font-weight: 400; diff --git a/packages/app/src/app/components/SandboxList/index.js b/packages/app/src/app/components/SandboxList/index.js index 2ed355d09a4..14746126f88 100644 --- a/packages/app/src/app/components/SandboxList/index.js +++ b/packages/app/src/app/components/SandboxList/index.js @@ -1,9 +1,9 @@ import * as React from 'react'; import moment from 'moment'; import { Link } from 'react-router-dom'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; -import getIcon from 'common/lib/templates/icons'; -import { SmallSandbox } from 'common/lib/types'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; +import getIcon from '@codesandbox/common/lib/templates/icons'; +import { SmallSandbox } from '@codesandbox/common/lib/types'; import FullHeartIcon from 'react-icons/lib/fa/heart'; import EyeIcon from 'react-icons/lib/fa/eye'; diff --git a/packages/app/src/app/components/Skeleton/index.js b/packages/app/src/app/components/Skeleton/index.js index 37c9ebd82a7..72f9d982a0c 100644 --- a/packages/app/src/app/components/Skeleton/index.js +++ b/packages/app/src/app/components/Skeleton/index.js @@ -1,9 +1,9 @@ import React from 'react'; -import Fullscreen from 'common/lib/components/flex/Fullscreen'; +import Fullscreen from '@codesandbox/common/lib/components/flex/Fullscreen'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; -import Centered from 'common/lib/components/flex/Centered'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; function Skeleton({ titles }) { return ( diff --git a/packages/app/src/app/components/SubTitle/index.js b/packages/app/src/app/components/SubTitle/index.js index b8231ad7d42..006ded9f087 100644 --- a/packages/app/src/app/components/SubTitle/index.js +++ b/packages/app/src/app/components/SubTitle/index.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export default styled.h2` ${props => props.delay != null && delayEffect(props.delay || 0)}; diff --git a/packages/app/src/app/components/SubscribeForm/CheckoutForm/elements.js b/packages/app/src/app/components/SubscribeForm/CheckoutForm/elements.js index 88f4e442524..5a76fae4676 100644 --- a/packages/app/src/app/components/SubscribeForm/CheckoutForm/elements.js +++ b/packages/app/src/app/components/SubscribeForm/CheckoutForm/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import Input from 'common/lib/components/Input'; +import Input from '@codesandbox/common/lib/components/Input'; export const CardContainer = styled.div` background-color: rgba(0, 0, 0, 0.3); diff --git a/packages/app/src/app/components/SubscribeForm/CheckoutForm/index.js b/packages/app/src/app/components/SubscribeForm/CheckoutForm/index.js index 95bcaf20fdb..1f75a90704b 100644 --- a/packages/app/src/app/components/SubscribeForm/CheckoutForm/index.js +++ b/packages/app/src/app/components/SubscribeForm/CheckoutForm/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { injectStripe, CardElement } from 'react-stripe-elements'; import reportError from 'app/utils/error'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { CardContainer, NameInput, ErrorText, Label } from './elements'; diff --git a/packages/app/src/app/components/SubscribeForm/index.js b/packages/app/src/app/components/SubscribeForm/index.js index e3c875bd71d..20a39c622c9 100644 --- a/packages/app/src/app/components/SubscribeForm/index.js +++ b/packages/app/src/app/components/SubscribeForm/index.js @@ -1,6 +1,6 @@ import React from 'react'; import { StripeProvider, Elements } from 'react-stripe-elements'; -import { STRIPE_API_KEY } from 'common/lib/utils/config'; +import { STRIPE_API_KEY } from '@codesandbox/common/lib/utils/config'; import CheckoutForm from './CheckoutForm'; import { Container } from './elements'; diff --git a/packages/app/src/app/components/TextArea/index.js b/packages/app/src/app/components/TextArea/index.js index 89f2d679c82..2ffe8b618dd 100644 --- a/packages/app/src/app/components/TextArea/index.js +++ b/packages/app/src/app/components/TextArea/index.js @@ -1,3 +1,3 @@ -import Input from 'common/lib/components/Input'; +import Input from '@codesandbox/common/lib/components/Input'; export default Input.withComponent('textarea'); diff --git a/packages/app/src/app/components/Title/index.js b/packages/app/src/app/components/Title/index.js index 2ff031198f6..56c0e221712 100644 --- a/packages/app/src/app/components/Title/index.js +++ b/packages/app/src/app/components/Title/index.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export default styled.h1` ${props => props.delay != null && delayEffect(props.delay || 0)}; diff --git a/packages/app/src/app/components/UploadProgress/elements.js b/packages/app/src/app/components/UploadProgress/elements.js index b7d8aa4f785..b3affe738d2 100644 --- a/packages/app/src/app/components/UploadProgress/elements.js +++ b/packages/app/src/app/components/UploadProgress/elements.js @@ -1,6 +1,6 @@ import styled, { keyframes } from 'styled-components'; -import delayInEffect from 'common/lib/utils/animation/delay-effect'; +import delayInEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; import OpaqueLogo from 'app/components/OpaqueLogo'; import LocalLogo from 'react-icons/lib/md/laptop'; import Cube from './Cube'; diff --git a/packages/app/src/app/index.js b/packages/app/src/app/index.js index 7355a2f46b6..7eb63772f88 100644 --- a/packages/app/src/app/index.js +++ b/packages/app/src/app/index.js @@ -6,15 +6,15 @@ import { ApolloProvider } from 'react-apollo'; import { Provider } from 'mobx-react'; import history from 'app/utils/history'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; import { client } from 'app/graphql/client'; -import VERSION from 'common/lib/version'; -import registerServiceWorker from 'common/lib/registerServiceWorker'; -import requirePolyfills from 'common/lib/load-dynamic-polyfills'; +import VERSION from '@codesandbox/common/lib/version'; +import registerServiceWorker from '@codesandbox/common/lib/registerServiceWorker'; +import requirePolyfills from '@codesandbox/common/lib/load-dynamic-polyfills'; import 'normalize.css'; -import 'common/lib/global.css'; -import theme from 'common/lib/theme'; -import { isSafari } from 'common/lib/utils/platform'; +import '@codesandbox/common/lib/global.css'; +import theme from '@codesandbox/common/lib/theme'; +import { isSafari } from '@codesandbox/common/lib/utils/platform'; // eslint-disable-next-line import * as child_process from 'node-services/lib/child_process'; diff --git a/packages/app/src/app/pages/CLI/Prompt/index.js b/packages/app/src/app/pages/CLI/Prompt/index.js index 9619b2da481..3e2c9269a1a 100644 --- a/packages/app/src/app/pages/CLI/Prompt/index.js +++ b/packages/app/src/app/pages/CLI/Prompt/index.js @@ -2,7 +2,7 @@ import React from 'react'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { Container, Buttons, TokenContainer } from './elements'; diff --git a/packages/app/src/app/pages/CliInstructions/elements.js b/packages/app/src/app/pages/CliInstructions/elements.js index 661b51b7c47..1d95fef47f0 100644 --- a/packages/app/src/app/pages/CliInstructions/elements.js +++ b/packages/app/src/app/pages/CliInstructions/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import Centered from 'common/lib/components/flex/Centered'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; export const Container = styled.div` height: 100%; diff --git a/packages/app/src/app/pages/CliInstructions/index.js b/packages/app/src/app/pages/CliInstructions/index.js index 986ba376c9b..983de084573 100644 --- a/packages/app/src/app/pages/CliInstructions/index.js +++ b/packages/app/src/app/pages/CliInstructions/index.js @@ -5,8 +5,8 @@ import { inject } from 'mobx-react'; import Navigation from 'app/pages/common/Navigation'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Margin from 'common/lib/components/spacing/Margin'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; import { Container, Content, Code } from './elements'; diff --git a/packages/app/src/app/pages/Curator/SandboxCard/elements.js b/packages/app/src/app/pages/Curator/SandboxCard/elements.js index 139a454989c..513aa1335ec 100644 --- a/packages/app/src/app/pages/Curator/SandboxCard/elements.js +++ b/packages/app/src/app/pages/Curator/SandboxCard/elements.js @@ -1,8 +1,8 @@ // @ts-check import styled from 'styled-components'; -import fadeIn from 'common/lib/utils/animation/fade-in'; -import Tooltip from 'common/lib/components/Tooltip'; -import { Button } from 'common/lib/components/Button'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; +import { Button } from '@codesandbox/common/lib/components/Button'; export const PADDING = 32; diff --git a/packages/app/src/app/pages/Curator/SandboxCard/index.js b/packages/app/src/app/pages/Curator/SandboxCard/index.js index 943bd1fe6bb..272d6d6a644 100644 --- a/packages/app/src/app/pages/Curator/SandboxCard/index.js +++ b/packages/app/src/app/pages/Curator/SandboxCard/index.js @@ -1,13 +1,16 @@ // @ts-check /* eslint-disable react/prefer-stateless-function */ import React from 'react'; -import { sandboxUrl, profileUrl } from 'common/lib/utils/url-generator'; +import { + sandboxUrl, + profileUrl, +} from '@codesandbox/common/lib/utils/url-generator'; import { observer } from 'mobx-react'; import EyeIcon from 'react-icons/lib/fa/eye'; import GithubIcon from 'react-icons/lib/fa/github'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; import { Container, diff --git a/packages/app/src/app/pages/Curator/index.js b/packages/app/src/app/pages/Curator/index.js index 2edd386b053..baa2d894a9d 100644 --- a/packages/app/src/app/pages/Curator/index.js +++ b/packages/app/src/app/pages/Curator/index.js @@ -11,9 +11,9 @@ import 'react-day-picker/lib/style.css'; import Navigation from 'app/pages/common/Navigation'; import SubTitle from 'app/components/SubTitle'; -import { Button } from 'common/lib/components/Button'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Margin from 'common/lib/components/spacing/Margin'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; import DelayedAnimation from 'app/components/DelayedAnimation'; import SandboxCard from './SandboxCard'; diff --git a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/Template/index.js b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/Template/index.js index 86bd197c7f1..f2f6a5c6be5 100644 --- a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/Template/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/Template/index.js @@ -1,7 +1,7 @@ import React from 'react'; -import getIcon from 'common/lib/templates/icons'; +import getIcon from '@codesandbox/common/lib/templates/icons'; -import { ENTER } from 'common/lib/utils/keycodes'; +import { ENTER } from '@codesandbox/common/lib/utils/keycodes'; import { Container, IconContainer, Title, SubTitle } from './elements'; export default ({ template, subtitle, width, selectTemplate, small }) => { diff --git a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/elements.js b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/elements.js index aeac3b92d35..61042d4180b 100644 --- a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/elements.js +++ b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/elements.js @@ -1,6 +1,6 @@ import styled, { css } from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; -import delayOutEffect from 'common/lib/utils/animation/delay-out-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; +import delayOutEffect from '@codesandbox/common/lib/utils/animation/delay-out-effect'; export const Container = styled.main` transition: 0.3s ease all; diff --git a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/index.js b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/index.js index 4743c0428bc..e09b13fda81 100644 --- a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import * as templates from 'common/lib/templates'; +import * as templates from '@codesandbox/common/lib/templates'; import { chunk, sortBy } from 'lodash-es'; import GithubLogo from 'react-icons/lib/go/mark-github'; diff --git a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/index.js b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/index.js index 5fb4f06ff38..6fe0315569b 100644 --- a/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/index.js @@ -3,10 +3,10 @@ import { Spring } from 'react-spring/renderprops'; import { inject } from 'mobx-react'; import { ThemeProvider } from 'styled-components'; import history from 'app/utils/history'; -import { ESC, ENTER } from 'common/lib/utils/keycodes'; -import theme from 'common/lib/theme'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; -import Portal from 'common/lib/components/Portal'; +import { ESC, ENTER } from '@codesandbox/common/lib/utils/keycodes'; +import theme from '@codesandbox/common/lib/theme'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; +import Portal from '@codesandbox/common/lib/components/Portal'; import { ButtonsContainer, diff --git a/packages/app/src/app/pages/Dashboard/Content/SandboxCard/elements.js b/packages/app/src/app/pages/Dashboard/Content/SandboxCard/elements.js index 860a2324ede..643443777c8 100644 --- a/packages/app/src/app/pages/Dashboard/Content/SandboxCard/elements.js +++ b/packages/app/src/app/pages/Dashboard/Content/SandboxCard/elements.js @@ -1,7 +1,7 @@ // @ts-check import styled from 'styled-components'; -import fadeIn from 'common/lib/utils/animation/fade-in'; -import Tooltip from 'common/lib/components/Tooltip'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import ContextMenu from 'app/components/ContextMenu'; import MoreInfoIcon from './KebabIcon'; diff --git a/packages/app/src/app/pages/Dashboard/Content/SandboxCard/index.js b/packages/app/src/app/pages/Dashboard/Content/SandboxCard/index.js index 3f9a32d4f8a..58e92eb212a 100644 --- a/packages/app/src/app/pages/Dashboard/Content/SandboxCard/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/SandboxCard/index.js @@ -2,7 +2,7 @@ /* eslint-disable react/prefer-stateless-function */ import React from 'react'; import history from 'app/utils/history'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; import { DragSource } from 'react-dnd'; import { getEmptyImage } from 'react-dnd-html5-backend'; import { Mutation } from 'react-apollo'; @@ -11,12 +11,12 @@ import TrashIcon from 'react-icons/lib/md/delete'; import Unlisted from 'react-icons/lib/md/insert-link'; import Private from 'react-icons/lib/md/lock'; -import Input from 'common/lib/components/Input'; -import getTemplate from 'common/lib/templates'; -import theme from 'common/lib/theme'; -import track from 'common/lib/utils/analytics'; +import Input from '@codesandbox/common/lib/components/Input'; +import getTemplate from '@codesandbox/common/lib/templates'; +import theme from '@codesandbox/common/lib/theme'; +import track from '@codesandbox/common/lib/utils/analytics'; -import { ESC, ENTER } from 'common/lib/utils/keycodes'; +import { ESC, ENTER } from '@codesandbox/common/lib/utils/keycodes'; import { RENAME_SANDBOX_MUTATION } from '../../queries'; import { diff --git a/packages/app/src/app/pages/Dashboard/Content/SandboxGrid/index.js b/packages/app/src/app/pages/Dashboard/Content/SandboxGrid/index.js index 829acb15d97..548278511ac 100644 --- a/packages/app/src/app/pages/Dashboard/Content/SandboxGrid/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/SandboxGrid/index.js @@ -5,7 +5,7 @@ import moment from 'moment'; import { uniq } from 'lodash-es'; import { basename } from 'path'; -import track from 'common/lib/utils/analytics'; +import track from '@codesandbox/common/lib/utils/analytics'; import Grid from 'react-virtualized/dist/commonjs/Grid'; import Column from 'react-virtualized/dist/commonjs/Table/Column'; import Table from 'react-virtualized/dist/commonjs/Table'; diff --git a/packages/app/src/app/pages/Dashboard/Content/Sandboxes/Filters/FilterOptions/index.js b/packages/app/src/app/pages/Dashboard/Content/Sandboxes/Filters/FilterOptions/index.js index 3e708584ea1..2be9b7a95a6 100644 --- a/packages/app/src/app/pages/Dashboard/Content/Sandboxes/Filters/FilterOptions/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/Sandboxes/Filters/FilterOptions/index.js @@ -1,6 +1,6 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import * as templates from 'common/lib/templates'; +import * as templates from '@codesandbox/common/lib/templates'; import { orderBy } from 'lodash-es'; import OverlayComponent from 'app/components/Overlay'; diff --git a/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/Plan/index.js b/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/Plan/index.js index 11070b51eb3..b46c81a3749 100644 --- a/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/Plan/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/Plan/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import { Container, Name, Points, CheckBox } from './elements'; diff --git a/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/index.js b/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/index.js index c62c17974e0..102e6705459 100644 --- a/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/routes/CreateTeam/index.js @@ -1,11 +1,11 @@ import React from 'react'; import { Mutation } from 'react-apollo'; -import Input from 'common/lib/components/Input'; -import { Button } from 'common/lib/components/Button'; -import track from 'common/lib/utils/analytics'; +import Input from '@codesandbox/common/lib/components/Input'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import track from '@codesandbox/common/lib/utils/analytics'; import history from 'app/utils/history'; -import { teamOverviewUrl } from 'common/lib/utils/url-generator'; +import { teamOverviewUrl } from '@codesandbox/common/lib/utils/url-generator'; import { Container, Description, HeaderContainer } from '../../elements'; import { diff --git a/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/AddTeamMember/index.js b/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/AddTeamMember/index.js index efe94eb2d2c..4bfaa42c67b 100644 --- a/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/AddTeamMember/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/AddTeamMember/index.js @@ -4,9 +4,9 @@ import styled from 'styled-components'; import { Mutation } from 'react-apollo'; -import Input from 'common/lib/components/Input'; -import { Button } from 'common/lib/components/Button'; -import track from 'common/lib/utils/analytics'; +import Input from '@codesandbox/common/lib/components/Input'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import track from '@codesandbox/common/lib/utils/analytics'; import { INVITE_TO_TEAM } from '../../../../queries'; diff --git a/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/RemoveTeamMember/index.js b/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/RemoveTeamMember/index.js index be58898daff..8ac2bcb7027 100644 --- a/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/RemoveTeamMember/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/RemoveTeamMember/index.js @@ -1,9 +1,9 @@ import React from 'react'; import { Mutation } from 'react-apollo'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import history from 'app/utils/history'; -import { dashboardUrl } from 'common/lib/utils/url-generator'; +import { dashboardUrl } from '@codesandbox/common/lib/utils/url-generator'; import { REMOVE_FROM_TEAM, LEAVE_TEAM } from '../../../../queries'; diff --git a/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/index.js b/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/index.js index c76617f8996..fce375c3650 100644 --- a/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/index.js +++ b/packages/app/src/app/pages/Dashboard/Content/routes/TeamView/index.js @@ -3,11 +3,11 @@ import { Query, Mutation } from 'react-apollo'; import { inject, Observer } from 'mobx-react'; import { sortBy } from 'lodash-es'; -import { UserWithAvatar } from 'common/lib/components/UserWithAvatar'; -import { Button } from 'common/lib/components/Button'; -import AutosizeTextArea from 'common/lib/components/AutosizeTextArea'; -import Margin from 'common/lib/components/spacing/Margin'; -import track from 'common/lib/utils/analytics'; +import { UserWithAvatar } from '@codesandbox/common/lib/components/UserWithAvatar'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import AutosizeTextArea from '@codesandbox/common/lib/components/AutosizeTextArea'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import track from '@codesandbox/common/lib/utils/analytics'; import { Container, HeaderContainer, Description } from '../../elements'; import { diff --git a/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/CreateFolderEntry.js b/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/CreateFolderEntry.js index ef3609be103..d5db7226e1b 100644 --- a/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/CreateFolderEntry.js +++ b/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/CreateFolderEntry.js @@ -2,9 +2,9 @@ import React from 'react'; import { Mutation } from 'react-apollo'; import AddFolderIcon from 'react-icons/lib/md/create-new-folder'; -import Input from 'common/lib/components/Input'; -import track from 'common/lib/utils/analytics'; -import { ESC } from 'common/lib/utils/keycodes'; +import Input from '@codesandbox/common/lib/components/Input'; +import track from '@codesandbox/common/lib/utils/analytics'; +import { ESC } from '@codesandbox/common/lib/utils/keycodes'; import { CreateDirectoryContainer, diff --git a/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/index.js b/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/index.js index bb6d55a0eba..261e0ecdd7d 100644 --- a/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/index.js +++ b/packages/app/src/app/pages/Dashboard/Sidebar/SandboxesItem/FolderEntry/index.js @@ -8,18 +8,22 @@ import TrashIcon from 'react-icons/lib/md/delete'; import { Mutation } from 'react-apollo'; import { DropTarget, DragSource } from 'react-dnd'; import { inject, observer } from 'mobx-react'; -import track from 'common/lib/utils/analytics'; +import track from '@codesandbox/common/lib/utils/analytics'; import { client } from 'app/graphql/client'; import { Animate as ReactShow } from 'react-show'; import { join, dirname } from 'path'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import ContextMenu from 'app/components/ContextMenu'; -import Input from 'common/lib/components/Input'; -import { ARROW_LEFT, ARROW_RIGHT, ESC } from 'common/lib/utils/keycodes'; +import Input from '@codesandbox/common/lib/components/Input'; +import { + ARROW_LEFT, + ARROW_RIGHT, + ESC, +} from '@codesandbox/common/lib/utils/keycodes'; import { Container, AnimatedChevron, IconContainer } from './elements'; diff --git a/packages/app/src/app/pages/Dashboard/Sidebar/index.js b/packages/app/src/app/pages/Dashboard/Sidebar/index.js index e0e6a40d205..fc7fc1e73df 100644 --- a/packages/app/src/app/pages/Dashboard/Sidebar/index.js +++ b/packages/app/src/app/pages/Dashboard/Sidebar/index.js @@ -3,12 +3,12 @@ import history from 'app/utils/history'; import { inject, observer } from 'mobx-react'; import { Route } from 'react-router-dom'; import { Query } from 'react-apollo'; -import Input from 'common/lib/components/Input'; -import { Button } from 'common/lib/components/Button'; +import Input from '@codesandbox/common/lib/components/Input'; +import { Button } from '@codesandbox/common/lib/components/Button'; import TimeIcon from 'react-icons/lib/md/access-time'; import PeopleIcon from 'react-icons/lib/md/people'; -import { teamOverviewUrl } from 'common/lib/utils/url-generator'; +import { teamOverviewUrl } from '@codesandbox/common/lib/utils/url-generator'; import Item from './Item'; import SandboxesItem from './SandboxesItem'; diff --git a/packages/app/src/app/pages/Dashboard/elements.js b/packages/app/src/app/pages/Dashboard/elements.js index 128ce50a710..80914e579bb 100644 --- a/packages/app/src/app/pages/Dashboard/elements.js +++ b/packages/app/src/app/pages/Dashboard/elements.js @@ -1,5 +1,5 @@ import styled, { css } from 'styled-components'; -import Logo from 'common/lib/components/Logo'; +import Logo from '@codesandbox/common/lib/components/Logo'; export const Container = styled.div` height: 100%; diff --git a/packages/app/src/app/pages/Dashboard/utils/get-most-used-template.js b/packages/app/src/app/pages/Dashboard/utils/get-most-used-template.js index 2b964b05987..a802bc26b05 100644 --- a/packages/app/src/app/pages/Dashboard/utils/get-most-used-template.js +++ b/packages/app/src/app/pages/Dashboard/utils/get-most-used-template.js @@ -1,5 +1,5 @@ import { countBy } from 'lodash-es'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; export default function getMostUsedTemplate(sandboxes) { const countedByTemplates = countBy(sandboxes, s => s.source.template); diff --git a/packages/app/src/app/pages/GitHub/elements.js b/packages/app/src/app/pages/GitHub/elements.js index 746a6a717c0..6f13619ad81 100644 --- a/packages/app/src/app/pages/GitHub/elements.js +++ b/packages/app/src/app/pages/GitHub/elements.js @@ -1,6 +1,6 @@ import styled from 'styled-components'; -import Input from 'common/lib/components/Input'; -import Centered from 'common/lib/components/flex/Centered'; +import Input from '@codesandbox/common/lib/components/Input'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; export const Container = styled.div` height: 100%; diff --git a/packages/app/src/app/pages/GitHub/index.js b/packages/app/src/app/pages/GitHub/index.js index bb9a5a26dd9..4d87cca5647 100644 --- a/packages/app/src/app/pages/GitHub/index.js +++ b/packages/app/src/app/pages/GitHub/index.js @@ -5,14 +5,14 @@ import { inject } from 'mobx-react'; import Navigation from 'app/pages/common/Navigation'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Margin from 'common/lib/components/spacing/Margin'; -import { Button } from 'common/lib/components/Button'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { gitHubToSandboxUrl, protocolAndHost, gitHubRepoPattern, -} from 'common/lib/utils/url-generator'; +} from '@codesandbox/common/lib/utils/url-generator'; import { Container, diff --git a/packages/app/src/app/pages/Live/index.js b/packages/app/src/app/pages/Live/index.js index 940dd49eeb8..c91337a4e52 100644 --- a/packages/app/src/app/pages/Live/index.js +++ b/packages/app/src/app/pages/Live/index.js @@ -3,14 +3,14 @@ import { inject, observer } from 'mobx-react'; import { Link } from 'react-router-dom'; import Navigation from 'app/pages/common/Navigation'; -import Fullscreen from 'common/lib/components/flex/Fullscreen'; +import Fullscreen from '@codesandbox/common/lib/components/flex/Fullscreen'; import QuickActions from 'app/pages/Sandbox/QuickActions'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; -import Centered from 'common/lib/components/flex/Centered'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import Skeleton from 'app/components/Skeleton'; -import Padding from 'common/lib/components/spacing/Padding'; +import Padding from '@codesandbox/common/lib/components/spacing/Padding'; import SignInButton from 'app/pages/common/SignInButton'; import Editor from '../Sandbox/Editor'; diff --git a/packages/app/src/app/pages/NewSandbox/index.js b/packages/app/src/app/pages/NewSandbox/index.js index 27108b8b207..d46b4162e4c 100644 --- a/packages/app/src/app/pages/NewSandbox/index.js +++ b/packages/app/src/app/pages/NewSandbox/index.js @@ -3,11 +3,11 @@ import { inject } from 'mobx-react'; import Navigation from 'app/pages/common/Navigation'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Centered from 'common/lib/components/flex/Centered'; -import Margin from 'common/lib/components/spacing/Margin'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; import history from 'app/utils/history'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; import NewSandboxModal from '../Dashboard/Content/CreateNewSandbox/Modal'; diff --git a/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/elements.js b/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/elements.js index 6836fb0c7a9..66e29829474 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/elements.js +++ b/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/elements.js @@ -1,5 +1,5 @@ import styled, { css, keyframes } from 'styled-components'; -import badges from 'common/lib/utils/badges/patron-info'; +import badges from '@codesandbox/common/lib/utils/badges/patron-info'; const particleAnimation = (deg: number) => keyframes` 0% { diff --git a/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/index.js b/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/index.js index 96915b6e3fb..fa597060358 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/index.js +++ b/packages/app/src/app/pages/Patron/PricingModal/Badge/Particles/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { forEach } from 'lodash-es'; -import badges from 'common/lib/utils/badges/patron-info'; +import badges from '@codesandbox/common/lib/utils/badges/patron-info'; import { Particle } from './elements'; const classNameRegex = /\shide/g; diff --git a/packages/app/src/app/pages/Patron/PricingModal/Badge/index.js b/packages/app/src/app/pages/Patron/PricingModal/Badge/index.js index 60a1d9051f9..0730835e4fc 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/Badge/index.js +++ b/packages/app/src/app/pages/Patron/PricingModal/Badge/index.js @@ -1,7 +1,7 @@ import React from 'react'; -import Relative from 'common/lib/components/Relative'; -import badges from 'common/lib/utils/badges/patron-info'; +import Relative from '@codesandbox/common/lib/components/Relative'; +import badges from '@codesandbox/common/lib/utils/badges/patron-info'; import './animations.css'; import Particles from './Particles'; diff --git a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ChangeSubscription/elements.js b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ChangeSubscription/elements.js index 17c3cd3126d..0970ecedeae 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ChangeSubscription/elements.js +++ b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ChangeSubscription/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; export const SmallText = styled.div` text-align: center; diff --git a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/elements.js b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/elements.js index 62bc18341e9..067c91fdfaa 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/elements.js +++ b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import delay from 'common/lib/utils/animation/delay-effect'; +import delay from '@codesandbox/common/lib/utils/animation/delay-effect'; export const Title = styled.div` ${delay(0)} transition: 0.3s ease all; diff --git a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/index.js b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/index.js index 6ea1f81545b..11ada6461ad 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/index.js +++ b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/ThankYou/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import Margin from 'common/lib/components/spacing/Margin'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; import { Title, SubTitle } from './elements'; diff --git a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/elements.js b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/elements.js index 6218ae5d789..5dbc0be765d 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/elements.js +++ b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import Input from 'common/lib/components/Input'; +import Input from '@codesandbox/common/lib/components/Input'; import SignInButton from 'app/pages/common/SignInButton'; export const Container = styled.div` diff --git a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/index.js b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/index.js index 74b996a872a..e793e3f838f 100644 --- a/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/index.js +++ b/packages/app/src/app/pages/Patron/PricingModal/PricingChoice/index.js @@ -2,10 +2,10 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; import moment from 'moment'; -import Centered from 'common/lib/components/flex/Centered'; -import Relative from 'common/lib/components/Relative'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Relative from '@codesandbox/common/lib/components/Relative'; import SubscribeForm from 'app/components/SubscribeForm'; -import badges from 'common/lib/utils/badges/patron-info'; +import badges from '@codesandbox/common/lib/utils/badges/patron-info'; import Range from './Range'; import ChangeSubscription from './ChangeSubscription'; diff --git a/packages/app/src/app/pages/Patron/index.js b/packages/app/src/app/pages/Patron/index.js index ff27e460b07..f96d21c210e 100644 --- a/packages/app/src/app/pages/Patron/index.js +++ b/packages/app/src/app/pages/Patron/index.js @@ -3,9 +3,9 @@ import { inject } from 'mobx-react'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Margin from 'common/lib/components/spacing/Margin'; -import Centered from 'common/lib/components/flex/Centered'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import Navigation from 'app/pages/common/Navigation'; diff --git a/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/elements.js b/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/elements.js index 8df8e428a70..c9a2645fe0e 100644 --- a/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/elements.js +++ b/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/elements.js @@ -1,6 +1,6 @@ import styled from 'styled-components'; import GithubIcon from 'react-icons/lib/go/mark-github'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export const ProfileImage = styled.img` border-radius: 2px; diff --git a/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/index.js b/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/index.js index 7542410601d..08a331435f3 100644 --- a/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/index.js +++ b/packages/app/src/app/pages/Profile/Header/UserInfo/ProfileInfo/index.js @@ -1,10 +1,10 @@ import React from 'react'; -import Row from 'common/lib/components/flex/Row'; -import Column from 'common/lib/components/flex/Column'; +import Row from '@codesandbox/common/lib/components/flex/Row'; +import Column from '@codesandbox/common/lib/components/flex/Column'; -import Margin from 'common/lib/components/spacing/Margin'; -import { PatronStar } from 'common/lib/components/PatronStar'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import { PatronStar } from '@codesandbox/common/lib/components/PatronStar'; import { ProfileImage, Name, Username, IconWrapper } from './elements'; diff --git a/packages/app/src/app/pages/Profile/Header/UserInfo/Stats/Badges/index.js b/packages/app/src/app/pages/Profile/Header/UserInfo/Stats/Badges/index.js index 6983fefa2c2..43753352f94 100644 --- a/packages/app/src/app/pages/Profile/Header/UserInfo/Stats/Badges/index.js +++ b/packages/app/src/app/pages/Profile/Header/UserInfo/Stats/Badges/index.js @@ -1,17 +1,19 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import Margin from 'common/lib/components/spacing/Margin'; -import Badge from 'common/lib/utils/badges/Badge'; -import ContributorsBadge from 'common/lib/components/ContributorsBadge'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import Badge from '@codesandbox/common/lib/utils/badges/Badge'; +import ContributorsBadge from '@codesandbox/common/lib/components/ContributorsBadge'; -import { patronUrl } from 'common/lib/utils/url-generator'; +import { patronUrl } from '@codesandbox/common/lib/utils/url-generator'; function Badges({ badges, username }) { return ( - {badges.map(badge => )} + {badges.map(badge => ( + + ))} - this.props.signals.editor.togglePreviewContent({})} /> + + this.props.signals.editor.togglePreviewContent({}) + } + /> diff --git a/packages/app/src/app/pages/Sandbox/Editor/Content/elements.js b/packages/app/src/app/pages/Sandbox/Editor/Content/elements.js index 6d90a5504ac..5dbdd8442f7 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Content/elements.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Content/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import fadeIn from 'common/lib/utils/animation/fade-in'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; export const FullSize = styled.div` height: 100%; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Content/index.js b/packages/app/src/app/pages/Sandbox/Editor/Content/index.js index e6682c11af9..919155025a4 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Content/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Content/index.js @@ -6,9 +6,9 @@ import { reaction } from 'mobx'; import { TextOperation } from 'ot'; import { inject, observer } from 'mobx-react'; -import getTemplateDefinition from 'common/lib/templates'; -import type { ModuleError } from 'common/lib/types'; -import { getPreviewTabs } from 'common/lib/templates/devtools'; +import getTemplateDefinition from '@codesandbox/common/lib/templates'; +import type { ModuleError } from '@codesandbox/common/lib/types'; +import { getPreviewTabs } from '@codesandbox/common/lib/templates/devtools'; import SplitPane from 'react-split-pane'; import CodeEditor from 'app/components/CodeEditor'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Header/Action/elements.ts b/packages/app/src/app/pages/Sandbox/Editor/Header/Action/elements.ts index 8d2232d5790..fbe15487620 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Header/Action/elements.ts +++ b/packages/app/src/app/pages/Sandbox/Editor/Header/Action/elements.ts @@ -1,6 +1,6 @@ import styled, { keyframes, css } from 'styled-components'; import { Link } from 'react-router-dom'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; const blink = keyframes` // @ts-ignore; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Header/CollectionInfo/index.js b/packages/app/src/app/pages/Sandbox/Editor/Header/CollectionInfo/index.js index 5973f94a9df..0d34a17a31a 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Header/CollectionInfo/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Header/CollectionInfo/index.js @@ -5,8 +5,8 @@ import Media from 'react-media'; import { Spring } from 'react-spring/renderprops'; -import track from 'common/lib/utils/analytics'; -import { ESC } from 'common/lib/utils/keycodes'; +import track from '@codesandbox/common/lib/utils/analytics'; +import { ESC } from '@codesandbox/common/lib/utils/keycodes'; import { Container, SandboxName, SandboxInput, FolderName } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Header/Logo/index.js b/packages/app/src/app/pages/Sandbox/Editor/Header/Logo/index.js index 5a8ae205395..d100ae7deff 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Header/Logo/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Header/Logo/index.js @@ -1,6 +1,6 @@ import * as React from 'react'; -import LogoIcon from 'common/lib/components/Logo'; +import LogoIcon from '@codesandbox/common/lib/components/Logo'; import { Container } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Header/UpdateFound/index.js b/packages/app/src/app/pages/Sandbox/Editor/Header/UpdateFound/index.js index b219b28133f..748ab14ced0 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Header/UpdateFound/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Header/UpdateFound/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import RefreshIcon from 'react-icons/lib/md/refresh'; import { UpdateContainer, UpdateMessage } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Header/elements.ts b/packages/app/src/app/pages/Sandbox/Editor/Header/elements.ts index cb265bdff4c..85e60b6615c 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Header/elements.ts +++ b/packages/app/src/app/pages/Sandbox/Editor/Header/elements.ts @@ -1,6 +1,6 @@ import styled from 'styled-components'; // @ts-ignore -import Dashboard from '-!svg-react-loader!common/lib/icons/dashboard.svg'; +import Dashboard from '-!svg-react-loader!@codesandbox/common/lib/icons/dashboard.svg'; import { Link } from 'react-router-dom'; export const Container = styled.div<{ zenMode: boolean }>` diff --git a/packages/app/src/app/pages/Sandbox/Editor/Header/index.tsx b/packages/app/src/app/pages/Sandbox/Editor/Header/index.tsx index 147a75a305b..0064962135f 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Header/index.tsx +++ b/packages/app/src/app/pages/Sandbox/Editor/Header/index.tsx @@ -6,16 +6,19 @@ import PlusIcon from 'react-icons/lib/go/plus'; import SettingsIcon from 'react-icons/lib/md/settings'; import ShareIcon from 'react-icons/lib/md/share'; import SaveIcon from 'react-icons/lib/md/save'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import SignInButton from 'app/pages/common/SignInButton'; import { saveAllModules } from 'app/store/modules/editor/utils'; -import { patronUrl, dashboardUrl } from 'common/lib/utils/url-generator'; +import { + patronUrl, + dashboardUrl, +} from '@codesandbox/common/lib/utils/url-generator'; // @ts-ignore -import PatronBadge from '-!svg-react-loader!common/lib/utils/badges/svg/patron-4.svg'; // eslint-disable-line import/no-webpack-loader-syntax -import Margin from 'common/lib/components/spacing/Margin'; +import PatronBadge from '-!svg-react-loader!@codesandbox/common/lib/utils/badges/svg/patron-4.svg'; // eslint-disable-line import/no-webpack-loader-syntax +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; import LikeHeart from 'app/pages/common/LikeHeart'; import UserMenu from 'app/pages/common/UserMenu'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Navigation/index.js b/packages/app/src/app/pages/Sandbox/Editor/Navigation/index.js index d8a5177f910..b6b4b1916f0 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Navigation/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Navigation/index.js @@ -5,14 +5,14 @@ import PlusIcon from 'react-icons/lib/go/plus'; import ServerIcon from 'react-icons/lib/go/server'; import getWorkspaceItems from 'app/store/modules/workspace/items'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; -import InfoIcon from '-!svg-react-loader!common/lib/icons/sandbox.svg'; -import GitHubIcon from '-!svg-react-loader!common/lib/icons/github.svg'; -import LiveIcon from '-!svg-react-loader!common/lib/icons/live.svg'; -import FilesIcon from '-!svg-react-loader!common/lib/icons/file.svg'; -import RocketIcon from '-!svg-react-loader!common/lib/icons/rocket.svg'; -import ConfigurationIcon from '-!svg-react-loader!common/lib/icons/cog.svg'; +import InfoIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/sandbox.svg'; +import GitHubIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/github.svg'; +import LiveIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/live.svg'; +import FilesIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/file.svg'; +import RocketIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/rocket.svg'; +import ConfigurationIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/cog.svg'; import { Container, IconContainer } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Chat/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Chat/index.js index fd5294ff394..10c59a9142d 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Chat/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Chat/index.js @@ -3,8 +3,8 @@ import styled from 'styled-components'; import { sortBy, takeRight } from 'lodash-es'; import { inject, observer } from 'mobx-react'; -import AutosizeTextArea from 'common/lib/components/AutosizeTextArea'; -import { ENTER } from 'common/lib/utils/keycodes'; +import AutosizeTextArea from '@codesandbox/common/lib/components/AutosizeTextArea'; +import { ENTER } from '@codesandbox/common/lib/utils/keycodes'; const Container = styled.div` min-height: 200px; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/CreateRepo/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/CreateRepo/index.js index 5c86d7fc9bb..182cc300612 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/CreateRepo/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/CreateRepo/index.js @@ -1,9 +1,9 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import Margin from 'common/lib/components/spacing/Margin'; -import Input from 'common/lib/components/Input'; -import { Button } from 'common/lib/components/Button'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import Input from '@codesandbox/common/lib/components/Input'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { WorkspaceSubtitle, WorkspaceInputContainer } from '../elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddResource/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddResource/index.js index c46442a8b91..e8e6576c077 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddResource/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddResource/index.js @@ -1,7 +1,7 @@ import React from 'react'; -import { Button } from 'common/lib/components/Button'; -import { ENTER } from 'common/lib/utils/keycodes'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import { ENTER } from '@codesandbox/common/lib/utils/keycodes'; import { WorkspaceInputContainer } from '../../elements'; import { ButtonContainer } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddVersion/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddVersion/index.js index 5a5a083430b..e12543824c2 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddVersion/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/AddVersion/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { inject } from 'mobx-react'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { ButtonContainer } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/index.js index 7165e3ec69c..a58e5d18702 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies/index.js @@ -2,8 +2,8 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; -import Margin from 'common/lib/components/spacing/Margin'; -import getDefinition from 'common/lib/templates'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import getDefinition from '@codesandbox/common/lib/templates'; import { WorkspaceSubtitle } from '../elements'; import AddVersion from './AddVersion'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/DirectoryChildren/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/DirectoryChildren/index.js index f6d5cae7514..fa90951ab35 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/DirectoryChildren/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/DirectoryChildren/index.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; import { sortBy } from 'lodash-es'; -import { HIDDEN_DIRECTORIES } from 'common/lib/templates/constants/files'; +import { HIDDEN_DIRECTORIES } from '@codesandbox/common/lib/templates/constants/files'; import validateTitle from '../validateTitle'; import ModuleEntry from './ModuleEntry'; import DirectoryEntry from '../'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/elements.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/elements.js index bf4915eddd9..ca1a97d8e6e 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/elements.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import fadeIn from 'common/lib/utils/animation/fade-in'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; export const Container = styled.div` display: flex; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/index.js index 5002a0bf81e..b2d05f34721 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/index.js @@ -7,7 +7,7 @@ import AddDirectoryIcon from 'react-icons/lib/md/create-new-folder'; import UploadFileIcon from 'react-icons/lib/md/file-upload'; import DownloadIcon from 'react-icons/lib/md/file-download'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { Icon } from '../../../../elements'; import { Container } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons/GetIconURL.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons/GetIconURL.js index d11a091d6f2..340a26c8b06 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons/GetIconURL.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons/GetIconURL.js @@ -1,10 +1,10 @@ -import folderSvg from 'common/lib/components/icons/folder.svg'; -import folderOpenSvg from 'common/lib/components/icons/folder-open.svg'; -import faviconSvg from 'common/lib/components/icons/favicon.svg'; -import fileSvg from 'common/lib/components/icons/file.svg'; -import imageSvg from 'common/lib/components/icons/image.svg'; -import codesandboxSvg from 'common/lib/components/icons/codesandbox.svg'; -import nowSvg from 'common/lib/components/icons/now.svg'; +import folderSvg from '@codesandbox/common/lib/components/icons/folder.svg'; +import folderOpenSvg from '@codesandbox/common/lib/components/icons/folder-open.svg'; +import faviconSvg from '@codesandbox/common/lib/components/icons/favicon.svg'; +import fileSvg from '@codesandbox/common/lib/components/icons/file.svg'; +import imageSvg from '@codesandbox/common/lib/components/icons/image.svg'; +import codesandboxSvg from '@codesandbox/common/lib/components/icons/codesandbox.svg'; +import nowSvg from '@codesandbox/common/lib/components/icons/now.svg'; function imageExists(url) { return new Promise((resolve, reject) => { diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryTitleInput/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryTitleInput/index.js index 61c42818bb8..384a411c3b6 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryTitleInput/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryTitleInput/index.js @@ -1,6 +1,6 @@ import * as React from 'react'; -import { ESC, ENTER } from 'common/lib/utils/keycodes'; +import { ESC, ENTER } from '@codesandbox/common/lib/utils/keycodes'; import { InputContainer } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/index.js index 568a8867350..e1b6af2ba82 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/index.js @@ -8,7 +8,7 @@ import EditIcon from 'react-icons/lib/go/pencil'; import DeleteIcon from 'react-icons/lib/go/trashcan'; import UploadFileIcon from 'react-icons/lib/md/file-upload'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import { EntryContainer } from '../../../elements'; import EntryTitle from './EntryTitle'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/index.js index fafbfc4fc76..8260ef8059a 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/index.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; -import { getModulePath } from 'common/lib/sandbox/modules'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; import DirectoryEntry from './DirectoryEntry/index'; import EditIcons from './DirectoryEntry/Entry/EditIcons'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/Changes/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/Changes/index.js index 775ea3be650..2b572266e5e 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/Changes/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/Changes/index.js @@ -1,12 +1,12 @@ import React from 'react'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import AddedIcon from 'react-icons/lib/go/diff-added'; import ModifiedIcon from 'react-icons/lib/go/diff-modified'; import RemovedIcon from 'react-icons/lib/go/diff-removed'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { ChangeContainer, Entry } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/index.js index 94f46884b68..2468523a96f 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Git/index.js @@ -1,11 +1,11 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import Margin from 'common/lib/components/spacing/Margin'; -import GithubBadge from 'common/lib/components/GithubBadge'; -import { githubRepoUrl } from 'common/lib/utils/url-generator'; -import { Button } from 'common/lib/components/Button'; -import Input, { TextArea } from 'common/lib/components/Input'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import GithubBadge from '@codesandbox/common/lib/components/GithubBadge'; +import { githubRepoUrl } from '@codesandbox/common/lib/utils/url-generator'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Input, { TextArea } from '@codesandbox/common/lib/components/Input'; import TotalChanges from './TotalChanges'; import { WorkspaceSubtitle, WorkspaceInputContainer } from '../elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/SaveIcon.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/SaveIcon.js index 34bd625cb0e..4f6434834f0 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/SaveIcon.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/SaveIcon.js @@ -1,7 +1,7 @@ import React from 'react'; import styled, { css } from 'styled-components'; -import Tooltip from 'common/lib/components/Tooltip'; -import fadeIn from 'common/lib/utils/animation/fade-in'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; import Save from 'react-icons/lib/md/save'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/index.js index 65adb1d97b0..5b8c1849eda 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/index.js @@ -3,7 +3,7 @@ import { inject, observer } from 'mobx-react'; import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons'; import getType from 'app/utils/get-type'; -import { getModulePath } from 'common/lib/sandbox/modules'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; import { saveAllModules } from 'app/store/modules/editor/utils'; import CrossIcon from 'react-icons/lib/md/clear'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Project/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Project/index.js index 973e95af774..e6bb51a3926 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Project/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Project/index.js @@ -5,20 +5,20 @@ import { sandboxUrl, githubRepoUrl, profileUrl, -} from 'common/lib/utils/url-generator'; +} from '@codesandbox/common/lib/utils/url-generator'; import TeamIcon from 'react-icons/lib/md/people'; -import { UserWithAvatar } from 'common/lib/components/UserWithAvatar'; +import { UserWithAvatar } from '@codesandbox/common/lib/components/UserWithAvatar'; import Stats from 'app/pages/common/Stats'; import PrivacyStatus from 'app/components/PrivacyStatus'; -import GithubBadge from 'common/lib/components/GithubBadge'; +import GithubBadge from '@codesandbox/common/lib/components/GithubBadge'; import EditableTags from 'app/components/EditableTags'; -import Tags from 'common/lib/components/Tags'; -import Switch from 'common/lib/components/Switch'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tags from '@codesandbox/common/lib/components/Tags'; +import Switch from '@codesandbox/common/lib/components/Switch'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; -import getTemplateDefinition from 'common/lib/templates'; +import getTemplateDefinition from '@codesandbox/common/lib/templates'; import { WorkspaceInputContainer } from '../elements'; import { diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/SSEDownNotice/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/SSEDownNotice/index.js index 617c22d171f..c2724312670 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/SSEDownNotice/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/SSEDownNotice/index.js @@ -1,6 +1,6 @@ import React from 'react'; import { observer, inject } from 'mobx-react'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; import { Container } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/SandboxActions/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/SandboxActions/index.js index 42b39764796..5705fdf268a 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/SandboxActions/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/SandboxActions/index.js @@ -1,9 +1,9 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; import TrashIcon from 'react-icons/lib/fa/trash'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { WorkspaceInputContainer, WorkspaceSubtitle } from '../elements'; import { PrivacySelect, PatronMessage, CenteredText } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/elements.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/elements.js index 833907e97b0..f03f67dbb07 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/elements.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import fadeIn from 'common/lib/utils/animation/fade-in'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; export const Inputs = styled.div` margin-bottom: 1rem; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/index.js index 31309a0b11d..6426cbc8e9a 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/Versions/PublishFields/index.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { Button } from 'common/lib/components/Button'; -import Relative from 'common/lib/components/Relative'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Relative from '@codesandbox/common/lib/components/Relative'; -import { DOT, BACKSPACE } from 'common/lib/utils/keycodes'; +import { DOT, BACKSPACE } from '@codesandbox/common/lib/utils/keycodes'; import { WorkspaceInputContainer } from '../../elements'; import { Inputs, Dot, ErrorMessage } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/elements.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/elements.js index 67e0dea3407..bffd798b1d2 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/elements.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import fadeIn from 'common/lib/utils/animation/fade-in'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; export const getContainerStyles = props => { const { theme } = props; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/index.js index 2a8ead001d8..67276f7fd7c 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/index.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; -import VERSION from 'common/lib/version'; +import VERSION from '@codesandbox/common/lib/version'; import getWorkspaceItems from 'app/store/modules/workspace/items'; import SocialInfo from 'app/components/SocialInfo'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/ConfigurationFiles/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/ConfigurationFiles/index.js index 84a3df338e3..879cdb3ac6a 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/ConfigurationFiles/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/ConfigurationFiles/index.js @@ -1,15 +1,15 @@ import React from 'react'; -import getDefinition from 'common/lib/templates'; -import getUI from 'common/lib/templates/configuration/ui'; -import { Module, Configuration } from 'common/lib/types'; -import { resolveModule } from 'common/lib/sandbox/modules'; +import getDefinition from '@codesandbox/common/lib/templates'; +import getUI from '@codesandbox/common/lib/templates/configuration/ui'; +import { Module, Configuration } from '@codesandbox/common/lib/types'; +import { resolveModule } from '@codesandbox/common/lib/sandbox/modules'; import { inject, observer } from 'mobx-react'; import BookIcon from 'react-icons/lib/md/library-books'; import UIIcon from 'react-icons/lib/md/dvr'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { Description, WorkspaceSubtitle } from '../../elements'; import { diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/LiveInfo.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/LiveInfo.js index 922f95e055f..f2382a5c51d 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/LiveInfo.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/LiveInfo.js @@ -4,12 +4,12 @@ import { inject, observer } from 'mobx-react'; import { sortBy } from 'lodash-es'; import RecordIcon from 'react-icons/lib/md/fiber-manual-record'; -import Input from 'common/lib/components/Input'; -import Margin from 'common/lib/components/spacing/Margin'; -import delay from 'common/lib/utils/animation/delay-effect'; -import Switch from 'common/lib/components/Switch'; +import Input from '@codesandbox/common/lib/components/Input'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import delay from '@codesandbox/common/lib/utils/animation/delay-effect'; +import Switch from '@codesandbox/common/lib/components/Switch'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import AddIcon from 'react-icons/lib/md/add'; import RemoveIcon from 'react-icons/lib/md/remove'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/User.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/User.js index 81719fde8d6..2e20de7eedb 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/User.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/User.js @@ -2,7 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import { observer } from 'mobx-react'; -import delay from 'common/lib/utils/animation/delay-effect'; +import delay from '@codesandbox/common/lib/utils/animation/delay-effect'; const Status = styled.div` font-size: 0.75rem; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/More/index.tsx b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/More/index.tsx index e8bf56af580..a6953325fa0 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/More/index.tsx +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/More/index.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import SignInButton from 'app/pages/common/SignInButton'; -import Margin from 'common/lib/components/spacing/Margin'; -import track from 'common/lib/utils/analytics'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import track from '@codesandbox/common/lib/utils/analytics'; import { Description } from '../../elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/EnvVars/EnvModal.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/EnvVars/EnvModal.js index e340bf21ff9..0a9c9596e7e 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/EnvVars/EnvModal.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/EnvVars/EnvModal.js @@ -1,8 +1,8 @@ import React from 'react'; import styled from 'styled-components'; -import Input from 'common/lib/components/Input'; -import { Button } from 'common/lib/components/Button'; +import Input from '@codesandbox/common/lib/components/Input'; +import { Button } from '@codesandbox/common/lib/components/Button'; const InputContainer = styled.div` display: flex; diff --git a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/index.js b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/index.js index bca141907f6..f48ab2c4f37 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Server/index.js @@ -5,8 +5,8 @@ import { dispatch } from 'codesandbox-api'; import { inject, observer } from 'mobx-react'; import PowerIcon from 'react-icons/lib/md/power-settings-new'; -import Margin from 'common/lib/components/spacing/Margin'; -import { Button } from 'common/lib/components/Button'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { Description, WorkspaceInputContainer } from '../../elements'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/index.js b/packages/app/src/app/pages/Sandbox/Editor/index.js index 1c2344e87dd..0b776af321d 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/index.js +++ b/packages/app/src/app/pages/Sandbox/Editor/index.js @@ -3,9 +3,9 @@ import SplitPane from 'react-split-pane'; import { inject, observer } from 'mobx-react'; import styled, { ThemeProvider } from 'styled-components'; -import Fullscreen from 'common/lib/components/flex/Fullscreen'; -import getTemplateDefinition from 'common/lib/templates'; -import codesandbox from 'common/lib/themes/codesandbox.json'; +import Fullscreen from '@codesandbox/common/lib/components/flex/Fullscreen'; +import getTemplateDefinition from '@codesandbox/common/lib/templates'; +import codesandbox from '@codesandbox/common/lib/themes/codesandbox.json'; import { Container } from './elements'; import Workspace from './Workspace'; diff --git a/packages/app/src/app/pages/Sandbox/Editor/utils/get-vscode-theme.js b/packages/app/src/app/pages/Sandbox/Editor/utils/get-vscode-theme.js index 432c81f85a2..2e2221f1bb9 100644 --- a/packages/app/src/app/pages/Sandbox/Editor/utils/get-vscode-theme.js +++ b/packages/app/src/app/pages/Sandbox/Editor/utils/get-vscode-theme.js @@ -1,8 +1,8 @@ import JSON from 'json5'; -import codesandbox from 'common/lib/themes/codesandbox.json'; +import codesandbox from '@codesandbox/common/lib/themes/codesandbox.json'; -import themes from 'common/lib/themes'; +import themes from '@codesandbox/common/lib/themes'; const editorBackground = 'editor.background'; const editorForeground = 'editor.foreground'; diff --git a/packages/app/src/app/pages/Sandbox/QuickActions/Keys.js b/packages/app/src/app/pages/Sandbox/QuickActions/Keys.js index 821b7a077cb..829661955c4 100644 --- a/packages/app/src/app/pages/Sandbox/QuickActions/Keys.js +++ b/packages/app/src/app/pages/Sandbox/QuickActions/Keys.js @@ -1,6 +1,6 @@ import React from 'react'; import styled from 'styled-components'; -import { formatKey } from 'common/lib/utils/keybindings'; +import { formatKey } from '@codesandbox/common/lib/utils/keybindings'; type Props = { bindings: Array, diff --git a/packages/app/src/app/pages/Sandbox/QuickActions/index.js b/packages/app/src/app/pages/Sandbox/QuickActions/index.js index 9dc6f2c3e50..bb2456d2ffb 100644 --- a/packages/app/src/app/pages/Sandbox/QuickActions/index.js +++ b/packages/app/src/app/pages/Sandbox/QuickActions/index.js @@ -3,9 +3,9 @@ import { inject, observer } from 'mobx-react'; import Downshift from 'downshift'; import genie from 'geniejs'; -import { ESC } from 'common/lib/utils/keycodes'; +import { ESC } from '@codesandbox/common/lib/utils/keycodes'; -import Input from 'common/lib/components/Input'; +import Input from '@codesandbox/common/lib/components/Input'; import Keys from './Keys'; import { diff --git a/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/elements.js b/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/elements.js index fcd9f76b76a..2b5ec79dafe 100644 --- a/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/elements.js +++ b/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/elements.js @@ -1,6 +1,6 @@ import styled from 'styled-components'; -import Select from 'common/lib/components/Select'; -import { UserWithAvatar } from 'common/lib/components/UserWithAvatar'; +import Select from '@codesandbox/common/lib/components/Select'; +import { UserWithAvatar } from '@codesandbox/common/lib/components/UserWithAvatar'; export const Container = styled.div` display: flex; diff --git a/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/index.js b/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/index.js index d94ea14f1ad..28614493aff 100644 --- a/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/index.js +++ b/packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/index.js @@ -4,7 +4,7 @@ import SearchIcon from 'react-icons/lib/go/search'; import { Highlight } from 'react-instantsearch/dom'; import compareVersions from 'compare-versions'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import GitHubLogo from 'app/components/GitHubLogo'; import formatDownloads from '../formatDownloads'; diff --git a/packages/app/src/app/pages/Sandbox/SearchDependencies/RawAutoComplete/index.js b/packages/app/src/app/pages/Sandbox/SearchDependencies/RawAutoComplete/index.js index 654efa5f25b..1f4fe477322 100644 --- a/packages/app/src/app/pages/Sandbox/SearchDependencies/RawAutoComplete/index.js +++ b/packages/app/src/app/pages/Sandbox/SearchDependencies/RawAutoComplete/index.js @@ -3,7 +3,7 @@ import Downshift from 'downshift'; import { Pagination } from 'react-instantsearch/dom'; -import { ENTER, ARROW_RIGHT } from 'common/lib/utils/keycodes'; +import { ENTER, ARROW_RIGHT } from '@codesandbox/common/lib/utils/keycodes'; import DependencyHit from '../DependencyHit'; import { AutoCompleteInput, SuggestionInput } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/SearchDependencies/index.js b/packages/app/src/app/pages/Sandbox/SearchDependencies/index.js index a0a0482b62f..0e8068562ac 100644 --- a/packages/app/src/app/pages/Sandbox/SearchDependencies/index.js +++ b/packages/app/src/app/pages/Sandbox/SearchDependencies/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { InstantSearch, Configure, PoweredBy } from 'react-instantsearch/dom'; import { connectAutoComplete } from 'react-instantsearch/connectors'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import 'app/pages/Search/search.css'; import './dependencies.css'; diff --git a/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js b/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js index f192df122e8..e62bd786571 100644 --- a/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js +++ b/packages/app/src/app/pages/Sandbox/SignOutNoticeModal/index.js @@ -1,8 +1,8 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import { Button } from 'common/lib/components/Button'; -import Row from 'common/lib/components/flex/Row'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Row from '@codesandbox/common/lib/components/flex/Row'; import { Container, Heading, Explanation } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/ZenModeIntroductionModal/index.js b/packages/app/src/app/pages/Sandbox/ZenModeIntroductionModal/index.js index cf29f893907..f3bc58ddc52 100644 --- a/packages/app/src/app/pages/Sandbox/ZenModeIntroductionModal/index.js +++ b/packages/app/src/app/pages/Sandbox/ZenModeIntroductionModal/index.js @@ -1,8 +1,8 @@ import React from 'react'; import { inject } from 'mobx-react'; -import { Button } from 'common/lib/components/Button'; -import Row from 'common/lib/components/flex/Row'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Row from '@codesandbox/common/lib/components/flex/Row'; import { Container, Heading, Explanation } from './elements'; diff --git a/packages/app/src/app/pages/Sandbox/index.js b/packages/app/src/app/pages/Sandbox/index.js index a1065256f00..4f34fe9d997 100644 --- a/packages/app/src/app/pages/Sandbox/index.js +++ b/packages/app/src/app/pages/Sandbox/index.js @@ -3,13 +3,13 @@ import { inject, observer } from 'mobx-react'; import { Link } from 'react-router-dom'; import QuickActions from 'app/pages/Sandbox/QuickActions'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import NotFound from 'app/pages/common/NotFound'; import Navigation from 'app/pages/common/Navigation'; import Title from 'app/components/Title'; -import Centered from 'common/lib/components/flex/Centered'; -import Fullscreen from 'common/lib/components/flex/Fullscreen'; -import Padding from 'common/lib/components/spacing/Padding'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Fullscreen from '@codesandbox/common/lib/components/flex/Fullscreen'; +import Padding from '@codesandbox/common/lib/components/spacing/Padding'; import Skeleton from 'app/components/Skeleton'; import GithubIntegration from 'app/src/app/pages/common/GithubIntegration'; diff --git a/packages/app/src/app/pages/Search/Filters/index.js b/packages/app/src/app/pages/Search/Filters/index.js index f66e472716f..fb3b91966a4 100644 --- a/packages/app/src/app/pages/Search/Filters/index.js +++ b/packages/app/src/app/pages/Search/Filters/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; import Filter from './Filter'; import { Container } from './elements'; diff --git a/packages/app/src/app/pages/Search/Results/index.js b/packages/app/src/app/pages/Search/Results/index.js index 2b2dab16cf9..b427ab20311 100644 --- a/packages/app/src/app/pages/Search/Results/index.js +++ b/packages/app/src/app/pages/Search/Results/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { Hits, Pagination } from 'react-instantsearch/dom'; -import Centered from 'common/lib/components/flex/Centered'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import ResultInfo from '../ResultInfo'; import SandboxCard from '../SandboxCard'; diff --git a/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/elements.js b/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/elements.js index cc2ed55b49f..ea9ccbc4587 100644 --- a/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/elements.js +++ b/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import { UserWithAvatar } from 'common/lib/components/UserWithAvatar'; +import { UserWithAvatar } from '@codesandbox/common/lib/components/UserWithAvatar'; export const CenteredText = styled.div` display: inline-flex; diff --git a/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/index.js b/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/index.js index 2063abbfe1c..c99c0c82229 100644 --- a/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/index.js +++ b/packages/app/src/app/pages/Search/SandboxCard/SandboxInfo/index.js @@ -5,7 +5,7 @@ import FullHeartIcon from 'react-icons/lib/fa/heart'; import EyeIcon from 'react-icons/lib/fa/eye'; import ForkIcon from 'react-icons/lib/go/repo-forked'; -import GithubBadge from 'common/lib/components/GithubBadge'; +import GithubBadge from '@codesandbox/common/lib/components/GithubBadge'; import Stat from './Stat'; import { CenteredText, UpdatedAt, Stats, StyledUser } from './elements'; diff --git a/packages/app/src/app/pages/Search/SandboxCard/elements.js b/packages/app/src/app/pages/Search/SandboxCard/elements.js index 40bd0ae3fd3..47b4c823ece 100644 --- a/packages/app/src/app/pages/Search/SandboxCard/elements.js +++ b/packages/app/src/app/pages/Search/SandboxCard/elements.js @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { Link } from 'react-router-dom'; -import Row from 'common/lib/components/flex/Row'; -import getTemplateDefinition from 'common/lib/templates'; +import Row from '@codesandbox/common/lib/components/flex/Row'; +import getTemplateDefinition from '@codesandbox/common/lib/templates'; export const Container = styled.div` transition: 0.3s ease all; diff --git a/packages/app/src/app/pages/Search/SandboxCard/index.js b/packages/app/src/app/pages/Search/SandboxCard/index.js index 5bbf9680d7d..83724e5bd01 100644 --- a/packages/app/src/app/pages/Search/SandboxCard/index.js +++ b/packages/app/src/app/pages/Search/SandboxCard/index.js @@ -1,9 +1,9 @@ import React from 'react'; import { Highlight } from 'react-instantsearch/dom'; -import Tags from 'common/lib/components/Tags'; +import Tags from '@codesandbox/common/lib/components/Tags'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; import SandboxInfo from './SandboxInfo'; diff --git a/packages/app/src/app/pages/Search/elements.js b/packages/app/src/app/pages/Search/elements.js index ab9f8e9b6a5..892fa20c1bb 100644 --- a/packages/app/src/app/pages/Search/elements.js +++ b/packages/app/src/app/pages/Search/elements.js @@ -1,6 +1,6 @@ import styled from 'styled-components'; import Title from 'app/components/Title'; -import Row from 'common/lib/components/flex/Row'; +import Row from '@codesandbox/common/lib/components/flex/Row'; export const Content = styled.div` margin-top: 5%; diff --git a/packages/app/src/app/pages/Search/index.js b/packages/app/src/app/pages/Search/index.js index fa20a03ff6e..d114067cd14 100644 --- a/packages/app/src/app/pages/Search/index.js +++ b/packages/app/src/app/pages/Search/index.js @@ -3,15 +3,15 @@ import { inject } from 'mobx-react'; import { InstantSearch, SearchBox, PoweredBy } from 'react-instantsearch/dom'; import qs from 'qs'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Margin from 'common/lib/components/spacing/Margin'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; import Navigation from 'app/pages/common/Navigation'; import { ALGOLIA_API_KEY, ALGOLIA_APPLICATION_ID, ALGOLIA_DEFAULT_INDEX, -} from 'common/lib/utils/config'; +} from '@codesandbox/common/lib/utils/config'; import 'instantsearch.css/themes/reset.css'; import './search.css'; diff --git a/packages/app/src/app/pages/common/LikeHeart/index.tsx b/packages/app/src/app/pages/common/LikeHeart/index.tsx index 6065827cf66..8f07f80d533 100644 --- a/packages/app/src/app/pages/common/LikeHeart/index.tsx +++ b/packages/app/src/app/pages/common/LikeHeart/index.tsx @@ -2,14 +2,14 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; // @ts-ignore -import HeartIcon from '-!svg-react-loader!common/lib/icons/heart-open.svg'; // eslint-disable-line import/no-webpack-loader-syntax +import HeartIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/heart-open.svg'; // eslint-disable-line import/no-webpack-loader-syntax // @ts-ignore -import FullHeartIcon from '-!svg-react-loader!common/lib/icons/heart.svg'; // eslint-disable-line import/no-webpack-loader-syntax +import FullHeartIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/heart.svg'; // eslint-disable-line import/no-webpack-loader-syntax -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import { Container } from './elements'; -import { Sandbox } from 'common/lib/types'; +import { Sandbox } from '@codesandbox/common/lib/types'; const MaybeTooltip = ({ loggedIn, disableTooltip, title, children }) => loggedIn && !disableTooltip ? ( diff --git a/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.js b/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.js index 3279697c77f..7a43958c6db 100644 --- a/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.js +++ b/packages/app/src/app/pages/common/Modals/Changelog/Dashboard/index.js @@ -1,9 +1,9 @@ import React from 'react'; import { inject } from 'mobx-react'; import { Link } from 'react-router-dom'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; // Inline styles because styled-components didn't load the styles const titleStyles = { diff --git a/packages/app/src/app/pages/common/Modals/DeploymentModal/elements.js b/packages/app/src/app/pages/common/Modals/DeploymentModal/elements.js index 09a6cd67d02..4b7783e4226 100644 --- a/packages/app/src/app/pages/common/Modals/DeploymentModal/elements.js +++ b/packages/app/src/app/pages/common/Modals/DeploymentModal/elements.js @@ -1,6 +1,6 @@ import styled, { keyframes } from 'styled-components'; -import delayInEffect from 'common/lib/utils/animation/delay-effect'; -import delayOutEffect from 'common/lib/utils/animation/delay-out-effect'; +import delayInEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; +import delayOutEffect from '@codesandbox/common/lib/utils/animation/delay-out-effect'; import NowLogo from 'app/components/NowLogo'; import OpaqueLogo from 'app/components/OpaqueLogo'; import Cube from './Cube'; diff --git a/packages/app/src/app/pages/common/Modals/DeploymentModal/index.js b/packages/app/src/app/pages/common/Modals/DeploymentModal/index.js index 27bf5de8cd9..ee7ef94f722 100644 --- a/packages/app/src/app/pages/common/Modals/DeploymentModal/index.js +++ b/packages/app/src/app/pages/common/Modals/DeploymentModal/index.js @@ -2,9 +2,9 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; import ZeitIntegration from 'app/pages/common/ZeitIntegration'; -import { Button } from 'common/lib/components/Button'; -import Centered from 'common/lib/components/flex/Centered'; -import Margin from 'common/lib/components/spacing/Margin'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; import IntegrationModal from 'app/components/IntegrationModal'; import { diff --git a/packages/app/src/app/pages/common/Modals/FeedbackModal/Feedback.js b/packages/app/src/app/pages/common/Modals/FeedbackModal/Feedback.js index d7a25fcbdc8..86dbe027707 100644 --- a/packages/app/src/app/pages/common/Modals/FeedbackModal/Feedback.js +++ b/packages/app/src/app/pages/common/Modals/FeedbackModal/Feedback.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; -import Margin from 'common/lib/components/spacing/Margin'; -import { Button } from 'common/lib/components/Button'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import { Button } from '@codesandbox/common/lib/components/Button'; -import AutosizeTextArea from 'common/lib/components/AutosizeTextArea'; -import Input from 'common/lib/components/Input'; +import AutosizeTextArea from '@codesandbox/common/lib/components/AutosizeTextArea'; +import Input from '@codesandbox/common/lib/components/Input'; import pushToAirtable from 'app/store/utils/pushToAirtable'; import { EmojiButton } from './elements'; diff --git a/packages/app/src/app/pages/common/Modals/ForkServerModal/index.js b/packages/app/src/app/pages/common/Modals/ForkServerModal/index.js index e5e966bcc1a..a83299ec992 100644 --- a/packages/app/src/app/pages/common/Modals/ForkServerModal/index.js +++ b/packages/app/src/app/pages/common/Modals/ForkServerModal/index.js @@ -1,6 +1,6 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import getTemplateDefinition from 'common/lib/templates'; +import getTemplateDefinition from '@codesandbox/common/lib/templates'; import SignInButton from 'app/pages/common/SignInButton'; import { Container, Heading, Explanation } from '../elements'; diff --git a/packages/app/src/app/pages/common/Modals/LiveSessionEnded/index.js b/packages/app/src/app/pages/common/Modals/LiveSessionEnded/index.js index 6fe7f493a49..4028075c37b 100644 --- a/packages/app/src/app/pages/common/Modals/LiveSessionEnded/index.js +++ b/packages/app/src/app/pages/common/Modals/LiveSessionEnded/index.js @@ -1,8 +1,8 @@ import React from 'react'; import { inject } from 'mobx-react'; -import { Button } from 'common/lib/components/Button'; -import Row from 'common/lib/components/flex/Row'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Row from '@codesandbox/common/lib/components/flex/Row'; import { Container } from './elements'; import { Heading, Explanation } from '../elements'; diff --git a/packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/index.js b/packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/index.js index 81c4b7fddb2..04ffdf6e5c7 100644 --- a/packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/index.js +++ b/packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/index.js @@ -1,8 +1,8 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; import { basename } from 'path'; -import track from 'common/lib/utils/analytics'; -import { Button } from 'common/lib/components/Button'; +import track from '@codesandbox/common/lib/utils/analytics'; +import { Button } from '@codesandbox/common/lib/components/Button'; import ChevronRight from 'react-icons/lib/md/chevron-right'; import DirectoryPicker from './DirectoryPicker'; diff --git a/packages/app/src/app/pages/common/Modals/NewSandbox/index.js b/packages/app/src/app/pages/common/Modals/NewSandbox/index.js index f4a047b7cc2..d95ac5ee2a8 100644 --- a/packages/app/src/app/pages/common/Modals/NewSandbox/index.js +++ b/packages/app/src/app/pages/common/Modals/NewSandbox/index.js @@ -1,6 +1,6 @@ import React from 'react'; import history from 'app/utils/history'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; import NewSandboxModal from '../../../Dashboard/Content/CreateNewSandbox/Modal'; diff --git a/packages/app/src/app/pages/common/Modals/PickSandboxModal/index.js b/packages/app/src/app/pages/common/Modals/PickSandboxModal/index.js index 0ac5ac8161c..68f4028c90f 100644 --- a/packages/app/src/app/pages/common/Modals/PickSandboxModal/index.js +++ b/packages/app/src/app/pages/common/Modals/PickSandboxModal/index.js @@ -1,9 +1,9 @@ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; -import { Button } from 'common/lib/components/Button'; -import Row from 'common/lib/components/flex/Row'; -import Input, { TextArea } from 'common/lib/components/Input'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Row from '@codesandbox/common/lib/components/flex/Row'; +import Input, { TextArea } from '@codesandbox/common/lib/components/Input'; import { Container } from '../LiveSessionEnded/elements'; import { Heading, Explanation } from '../elements'; diff --git a/packages/app/src/app/pages/common/Modals/PreferencesModal/Appearance/index.js b/packages/app/src/app/pages/common/Modals/PreferencesModal/Appearance/index.js index ee1c4262c6b..1acf7f43e54 100644 --- a/packages/app/src/app/pages/common/Modals/PreferencesModal/Appearance/index.js +++ b/packages/app/src/app/pages/common/Modals/PreferencesModal/Appearance/index.js @@ -1,8 +1,8 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import themes from 'common/lib/themes'; +import themes from '@codesandbox/common/lib/themes'; -import PreferenceText from 'common/lib/components/Preference/PreferenceText'; +import PreferenceText from '@codesandbox/common/lib/components/Preference/PreferenceText'; import { Title, SubContainer, @@ -127,12 +127,12 @@ function EditorSettings({ store, signals }) { {'"'} as your color theme. - Developer: Generate Color Scheme From Current Settings' diff --git a/packages/app/src/app/pages/common/Modals/PreferencesModal/Badges/index.js b/packages/app/src/app/pages/common/Modals/PreferencesModal/Badges/index.js index a31c870378b..eb9b33bc343 100644 --- a/packages/app/src/app/pages/common/Modals/PreferencesModal/Badges/index.js +++ b/packages/app/src/app/pages/common/Modals/PreferencesModal/Badges/index.js @@ -1,8 +1,8 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import Margin from 'common/lib/components/spacing/Margin'; -import Badge from 'common/lib/utils/badges/Badge'; +import Margin from '@codesandbox/common/lib/components/spacing/Margin'; +import Badge from '@codesandbox/common/lib/utils/badges/Badge'; import { Title } from '../elements'; function Badges({ store, signals }) { diff --git a/packages/app/src/app/pages/common/Modals/PreferencesModal/KeyMapping/index.js b/packages/app/src/app/pages/common/Modals/PreferencesModal/KeyMapping/index.js index 978d0b8991c..c08a2572e97 100644 --- a/packages/app/src/app/pages/common/Modals/PreferencesModal/KeyMapping/index.js +++ b/packages/app/src/app/pages/common/Modals/PreferencesModal/KeyMapping/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; -import { KEYBINDINGS } from 'common/lib/utils/keybindings'; +import { KEYBINDINGS } from '@codesandbox/common/lib/utils/keybindings'; import { Title, SubDescription, diff --git a/packages/app/src/app/pages/common/Modals/PreferencesModal/SideNavigation/index.js b/packages/app/src/app/pages/common/Modals/PreferencesModal/SideNavigation/index.js index e10828ac494..5bb94db72fe 100644 --- a/packages/app/src/app/pages/common/Modals/PreferencesModal/SideNavigation/index.js +++ b/packages/app/src/app/pages/common/Modals/PreferencesModal/SideNavigation/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import Relative from 'common/lib/components/Relative'; +import Relative from '@codesandbox/common/lib/components/Relative'; import SocialInfo from 'app/components/SocialInfo'; import { diff --git a/packages/app/src/app/pages/common/Modals/PreferencesModal/VSCodePlaceholder.js b/packages/app/src/app/pages/common/Modals/PreferencesModal/VSCodePlaceholder.js index 6c690a03248..414e4eb6c95 100644 --- a/packages/app/src/app/pages/common/Modals/PreferencesModal/VSCodePlaceholder.js +++ b/packages/app/src/app/pages/common/Modals/PreferencesModal/VSCodePlaceholder.js @@ -3,8 +3,8 @@ import { observer, inject } from 'mobx-react'; import { Route } from 'react-router-dom'; import vscode from 'app/vscode'; -import { Button } from 'common/lib/components/Button'; -import { editorUrl } from 'common/lib/utils/url-generator'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import { editorUrl } from '@codesandbox/common/lib/utils/url-generator'; const VSCodePlaceholder = ({ children, store, signals, hideTitle }) => { if (store.preferences.settings.experimentVSCode) { diff --git a/packages/app/src/app/pages/common/Modals/PreferencesModal/elements.js b/packages/app/src/app/pages/common/Modals/PreferencesModal/elements.js index 9960b4f3da1..53e7609789f 100644 --- a/packages/app/src/app/pages/common/Modals/PreferencesModal/elements.js +++ b/packages/app/src/app/pages/common/Modals/PreferencesModal/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import Preference from 'common/lib/components/Preference'; +import Preference from '@codesandbox/common/lib/components/Preference'; export const SubContainer = styled.div` color: ${props => props.theme.white}; diff --git a/packages/app/src/app/pages/common/Modals/ShareModal/elements.js b/packages/app/src/app/pages/common/Modals/ShareModal/elements.js index 87b5601adec..4c366073f34 100644 --- a/packages/app/src/app/pages/common/Modals/ShareModal/elements.js +++ b/packages/app/src/app/pages/common/Modals/ShareModal/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import Preference from 'common/lib/components/Preference'; +import Preference from '@codesandbox/common/lib/components/Preference'; export const FilesContainer = styled.div` max-height: 300px; diff --git a/packages/app/src/app/pages/common/Modals/ShareModal/getCode.js b/packages/app/src/app/pages/common/Modals/ShareModal/getCode.js index 3c47958b7c6..6002707eba3 100644 --- a/packages/app/src/app/pages/common/Modals/ShareModal/getCode.js +++ b/packages/app/src/app/pages/common/Modals/ShareModal/getCode.js @@ -1,10 +1,10 @@ -import { getModulePath } from 'common/lib/sandbox/modules'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; import { optionsToParameterizedUrl, protocolAndHost, sandboxUrl, embedUrl, -} from 'common/lib/utils/url-generator'; +} from '@codesandbox/common/lib/utils/url-generator'; export const BUTTON_URL = `${ process.env.CODESANDBOX_HOST diff --git a/packages/app/src/app/pages/common/Modals/ShareModal/index.js b/packages/app/src/app/pages/common/Modals/ShareModal/index.js index 1ccfdb43874..0d675ed80c7 100644 --- a/packages/app/src/app/pages/common/Modals/ShareModal/index.js +++ b/packages/app/src/app/pages/common/Modals/ShareModal/index.js @@ -2,8 +2,8 @@ import React, { Fragment } from 'react'; import { inject, observer } from 'mobx-react'; import Files from 'embed/components/Files'; import QRCode from 'qrcode.react'; -import track from 'common/lib/utils/analytics'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import track from '@codesandbox/common/lib/utils/analytics'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; import Title from './Title'; import { diff --git a/packages/app/src/app/pages/common/Modals/StorageManagementModal/AddFileToSandboxButton/elements.js b/packages/app/src/app/pages/common/Modals/StorageManagementModal/AddFileToSandboxButton/elements.js index 17b2d0b453e..f5bdd20c91d 100644 --- a/packages/app/src/app/pages/common/Modals/StorageManagementModal/AddFileToSandboxButton/elements.js +++ b/packages/app/src/app/pages/common/Modals/StorageManagementModal/AddFileToSandboxButton/elements.js @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components'; import AddIcon from 'react-icons/lib/md/add'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; export const AddFileToSandboxButton = styled(props => ( diff --git a/packages/app/src/app/pages/common/Modals/StorageManagementModal/DeleteFileButton/elements.js b/packages/app/src/app/pages/common/Modals/StorageManagementModal/DeleteFileButton/elements.js index 86541e2b79a..76d5924268d 100644 --- a/packages/app/src/app/pages/common/Modals/StorageManagementModal/DeleteFileButton/elements.js +++ b/packages/app/src/app/pages/common/Modals/StorageManagementModal/DeleteFileButton/elements.js @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components'; import DeleteIcon from 'react-icons/lib/md/delete'; -import Tooltip from 'common/lib/components/Tooltip'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; export const DeleteFileButton = styled(props => ( diff --git a/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/elements.js b/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/elements.js index dcbec5cac00..628c93098b4 100644 --- a/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/elements.js +++ b/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/elements.js @@ -1,5 +1,5 @@ import styled, { css } from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export const HeaderTitle = styled.th` font-weight: 400; diff --git a/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/index.js b/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/index.js index 8308459d0ee..e6c724faf3e 100644 --- a/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/index.js +++ b/packages/app/src/app/pages/common/Modals/StorageManagementModal/FilesList/index.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import moment from 'moment'; import { sortBy, isEmpty } from 'lodash-es'; import filesize from 'filesize'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import DeleteFileButton from '../DeleteFileButton'; import AddFileToSandboxButton from '../AddFileToSandboxButton'; import { diff --git a/packages/app/src/app/pages/common/Navigation/Notifications/elements.js b/packages/app/src/app/pages/common/Navigation/Notifications/elements.js index 5ec654e7064..b02f947e051 100644 --- a/packages/app/src/app/pages/common/Navigation/Notifications/elements.js +++ b/packages/app/src/app/pages/common/Navigation/Notifications/elements.js @@ -1,5 +1,5 @@ import styled, { css } from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export const Container = styled.div` overflow: hidden; diff --git a/packages/app/src/app/pages/common/Navigation/Notifications/notifications/TeamInvite.js b/packages/app/src/app/pages/common/Navigation/Notifications/notifications/TeamInvite.js index ca899683608..bde9988a55b 100644 --- a/packages/app/src/app/pages/common/Navigation/Notifications/notifications/TeamInvite.js +++ b/packages/app/src/app/pages/common/Navigation/Notifications/notifications/TeamInvite.js @@ -3,8 +3,8 @@ import styled, { css } from 'styled-components'; import { inject } from 'mobx-react'; import { Mutation } from 'react-apollo'; import history from 'app/utils/history'; -import { teamOverviewUrl } from 'common/lib/utils/url-generator'; -import track from 'common/lib/utils/analytics'; +import { teamOverviewUrl } from '@codesandbox/common/lib/utils/url-generator'; +import track from '@codesandbox/common/lib/utils/analytics'; import { NotificationContainer, NotificationImage as Image } from '../elements'; import { diff --git a/packages/app/src/app/pages/common/Navigation/elements.js b/packages/app/src/app/pages/common/Navigation/elements.js index 99b7ad9e773..b90cd5fd5bb 100644 --- a/packages/app/src/app/pages/common/Navigation/elements.js +++ b/packages/app/src/app/pages/common/Navigation/elements.js @@ -1,6 +1,6 @@ import styled, { css } from 'styled-components'; -import Logo from 'common/lib/components/Logo'; -import Row from 'common/lib/components/flex/Row'; +import Logo from '@codesandbox/common/lib/components/Logo'; +import Row from '@codesandbox/common/lib/components/flex/Row'; export const LogoWithBorder = styled(Logo)` padding-right: 1rem; diff --git a/packages/app/src/app/pages/common/Navigation/index.js b/packages/app/src/app/pages/common/Navigation/index.js index 4624824ea17..59f4aa93187 100644 --- a/packages/app/src/app/pages/common/Navigation/index.js +++ b/packages/app/src/app/pages/common/Navigation/index.js @@ -6,15 +6,15 @@ import { patronUrl, searchUrl, exploreUrl, -} from 'common/lib/utils/url-generator'; +} from '@codesandbox/common/lib/utils/url-generator'; import SearchIcon from 'react-icons/lib/go/search'; import PlusIcon from 'react-icons/lib/go/plus'; import BellIcon from 'react-icons/lib/md/notifications'; import FlameIcon from 'react-icons/lib/go/flame'; -import Row from 'common/lib/components/flex/Row'; -import Tooltip from 'common/lib/components/Tooltip'; -import PatronBadge from '-!svg-react-loader!common/lib/utils/badges/svg/patron-4.svg'; // eslint-disable-line import/no-webpack-loader-syntax +import Row from '@codesandbox/common/lib/components/flex/Row'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; +import PatronBadge from '-!svg-react-loader!@codesandbox/common/lib/utils/badges/svg/patron-4.svg'; // eslint-disable-line import/no-webpack-loader-syntax import HeaderSearchBar from 'app/components/HeaderSearchBar'; import OverlayComponent from 'app/components/Overlay'; import Notifications from './Notifications'; diff --git a/packages/app/src/app/pages/common/NotFound/index.js b/packages/app/src/app/pages/common/NotFound/index.js index 70eea906eec..63babe5e84c 100644 --- a/packages/app/src/app/pages/common/NotFound/index.js +++ b/packages/app/src/app/pages/common/NotFound/index.js @@ -2,8 +2,8 @@ import React from 'react'; import { inject } from 'mobx-react'; -import { Button } from 'common/lib/components/Button'; -import { newSandboxWizard } from 'common/lib/utils/url-generator'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import { newSandboxWizard } from '@codesandbox/common/lib/utils/url-generator'; import { Container, Title, SubTitle, Buttons } from './elements'; diff --git a/packages/app/src/app/pages/common/Notifications/Notification/elements.js b/packages/app/src/app/pages/common/Notifications/Notification/elements.js index e398b18ab17..5916e1cc85b 100644 --- a/packages/app/src/app/pages/common/Notifications/Notification/elements.js +++ b/packages/app/src/app/pages/common/Notifications/Notification/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; export const Container = styled.div` position: relative; diff --git a/packages/app/src/app/pages/common/Notifications/index.js b/packages/app/src/app/pages/common/Notifications/index.js index b8a60c70b3f..12d01fa82b0 100644 --- a/packages/app/src/app/pages/common/Notifications/index.js +++ b/packages/app/src/app/pages/common/Notifications/index.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; import { Transition } from 'react-spring/renderprops'; -import Portal from 'common/lib/components/Portal'; +import Portal from '@codesandbox/common/lib/components/Portal'; import Notification from './Notification'; diff --git a/packages/app/src/app/pages/common/ShowcasePreview/elements.js b/packages/app/src/app/pages/common/ShowcasePreview/elements.js index a24b69cb385..c96003527aa 100644 --- a/packages/app/src/app/pages/common/ShowcasePreview/elements.js +++ b/packages/app/src/app/pages/common/ShowcasePreview/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export const Container = styled.div` position: relative; diff --git a/packages/app/src/app/pages/common/ShowcasePreview/index.js b/packages/app/src/app/pages/common/ShowcasePreview/index.js index 29e10d4597d..865e9c00a74 100644 --- a/packages/app/src/app/pages/common/ShowcasePreview/index.js +++ b/packages/app/src/app/pages/common/ShowcasePreview/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import Preview from 'common/lib/components/Preview'; +import Preview from '@codesandbox/common/lib/components/Preview'; import { parseConfigurations } from 'app/store/utils/parse-configurations'; import { mainModule } from 'app/store/utils/main-module'; diff --git a/packages/app/src/app/pages/common/SignIn/index.js b/packages/app/src/app/pages/common/SignIn/index.js index bea8940445c..be814cc38eb 100644 --- a/packages/app/src/app/pages/common/SignIn/index.js +++ b/packages/app/src/app/pages/common/SignIn/index.js @@ -1,13 +1,13 @@ import React from 'react'; -import Centered from 'common/lib/components/flex/Centered'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import Title from 'app/components/Title'; import { protocolAndHost, signInUrl, newSandboxUrl, -} from 'common/lib/utils/url-generator'; +} from '@codesandbox/common/lib/utils/url-generator'; // This route is supposed to be opened in a new window, after signing in with // Github. It should return a postMessage to the parent diff --git a/packages/app/src/app/pages/common/SignInButton/index.js b/packages/app/src/app/pages/common/SignInButton/index.js index a6ce27b47de..b482a57677e 100644 --- a/packages/app/src/app/pages/common/SignInButton/index.js +++ b/packages/app/src/app/pages/common/SignInButton/index.js @@ -2,8 +2,8 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; import GithubIcon from 'react-icons/lib/go/mark-github'; -import { Button } from 'common/lib/components/Button'; -import Row from 'common/lib/components/flex/Row'; +import { Button } from '@codesandbox/common/lib/components/Button'; +import Row from '@codesandbox/common/lib/components/flex/Row'; function SignInButton(props) { const { signals } = props; diff --git a/packages/app/src/app/pages/common/UserMenu/Menu/elements.js b/packages/app/src/app/pages/common/UserMenu/Menu/elements.js index ea7bc3d52ae..83f34af6b62 100644 --- a/packages/app/src/app/pages/common/UserMenu/Menu/elements.js +++ b/packages/app/src/app/pages/common/UserMenu/Menu/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import delayEffect from 'common/lib/utils/animation/delay-effect'; +import delayEffect from '@codesandbox/common/lib/utils/animation/delay-effect'; export const Container = styled.div` position: absolute; diff --git a/packages/app/src/app/pages/common/UserMenu/Menu/index.js b/packages/app/src/app/pages/common/UserMenu/Menu/index.js index 1287e072de5..d80e9384193 100644 --- a/packages/app/src/app/pages/common/UserMenu/Menu/index.js +++ b/packages/app/src/app/pages/common/UserMenu/Menu/index.js @@ -12,10 +12,10 @@ import { patronUrl, curatorUrl, dashboardUrl, -} from 'common/lib/utils/url-generator'; -import PatronBadge from 'common/lib/utils/badges/PatronBadge'; +} from '@codesandbox/common/lib/utils/url-generator'; +import PatronBadge from '@codesandbox/common/lib/utils/badges/PatronBadge'; import InfoIcon from 'app/pages/Sandbox/Editor/Navigation/InfoIcon'; -import track from 'common/lib/utils/analytics'; +import track from '@codesandbox/common/lib/utils/analytics'; import { Container, Item, Icon, Separator } from './elements'; import FeedbackIcon from './FeedbackIcon'; diff --git a/packages/app/src/app/pages/common/UserMenu/elements.js b/packages/app/src/app/pages/common/UserMenu/elements.js index e17c10bd965..9717a92edda 100644 --- a/packages/app/src/app/pages/common/UserMenu/elements.js +++ b/packages/app/src/app/pages/common/UserMenu/elements.js @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import Row from 'common/lib/components/flex/Row'; +import Row from '@codesandbox/common/lib/components/flex/Row'; export const ClickableContainer = styled(Row)` cursor: pointer; diff --git a/packages/app/src/app/pages/common/UserMenu/index.js b/packages/app/src/app/pages/common/UserMenu/index.js index c62778e0ee4..38806463d31 100644 --- a/packages/app/src/app/pages/common/UserMenu/index.js +++ b/packages/app/src/app/pages/common/UserMenu/index.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { inject, observer } from 'mobx-react'; import HoverMenu from 'app/components/HoverMenu'; -import Relative from 'common/lib/components/Relative'; +import Relative from '@codesandbox/common/lib/components/Relative'; import Menu from './Menu'; import { ClickableContainer, ProfileImage } from './elements'; diff --git a/packages/app/src/app/pages/common/ZeitAuth/index.js b/packages/app/src/app/pages/common/ZeitAuth/index.js index eb83604c990..3e65ebd8c0b 100644 --- a/packages/app/src/app/pages/common/ZeitAuth/index.js +++ b/packages/app/src/app/pages/common/ZeitAuth/index.js @@ -1,13 +1,13 @@ import React from 'react'; -import Centered from 'common/lib/components/flex/Centered'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import Title from 'app/components/Title'; import { protocolAndHost, signInUrl, newSandboxUrl, -} from 'common/lib/utils/url-generator'; +} from '@codesandbox/common/lib/utils/url-generator'; export default class ZeitSignIn extends React.PureComponent { constructor(props) { diff --git a/packages/app/src/app/pages/index.js b/packages/app/src/app/pages/index.js index 7a10a7fcd7e..38337b2b7d9 100644 --- a/packages/app/src/app/pages/index.js +++ b/packages/app/src/app/pages/index.js @@ -4,11 +4,11 @@ import { inject, observer } from 'mobx-react'; import Loadable from 'app/utils/Loadable'; import { Route, Switch, Redirect } from 'react-router-dom'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; import Notifications from 'app/pages/common/Notifications'; import { DragDropContext } from 'react-dnd'; -import send, { DNT } from 'common/lib/utils/analytics'; +import send, { DNT } from '@codesandbox/common/lib/utils/analytics'; import Modals from './common/Modals'; import Sandbox from './Sandbox'; diff --git a/packages/app/src/app/store/actions.js b/packages/app/src/app/store/actions.js index 1a9e5031ebd..d84f516d8a4 100644 --- a/packages/app/src/app/store/actions.js +++ b/packages/app/src/app/store/actions.js @@ -1,7 +1,10 @@ import axios from 'axios'; -import { generateFileFromSandbox } from 'common/lib/templates/configuration/package-json'; -import track, { identify, setUserId } from 'common/lib/utils/analytics'; +import { generateFileFromSandbox } from '@codesandbox/common/lib/templates/configuration/package-json'; +import track, { + identify, + setUserId, +} from '@codesandbox/common/lib/utils/analytics'; import { parseConfigurations } from './utils/parse-configurations'; import { mainModule, defaultOpenedModule } from './utils/main-module'; diff --git a/packages/app/src/app/store/factories.js b/packages/app/src/app/store/factories.js index 81a84c5af14..46f89aec99d 100644 --- a/packages/app/src/app/store/factories.js +++ b/packages/app/src/app/store/factories.js @@ -1,7 +1,7 @@ import { sequence, parallel } from 'cerebral'; import { set, when } from 'cerebral/operators'; import { state, props } from 'cerebral/tags'; -import trackAnalytics from 'common/lib/utils/analytics'; +import trackAnalytics from '@codesandbox/common/lib/utils/analytics'; import * as actions from './actions'; import { initializeNotifications } from './modules/user-notifications/sequences'; diff --git a/packages/app/src/app/store/modules/deployment/actions.js b/packages/app/src/app/store/modules/deployment/actions.js index 700a0abff10..55d1583be07 100644 --- a/packages/app/src/app/store/modules/deployment/actions.js +++ b/packages/app/src/app/store/modules/deployment/actions.js @@ -1,5 +1,5 @@ import { omit } from 'lodash-es'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; export function createZip({ utils, state }) { const sandboxId = state.get('editor.currentId'); diff --git a/packages/app/src/app/store/modules/editor/actions.js b/packages/app/src/app/store/modules/editor/actions.js index d3534dd41b2..ee49a20feeb 100644 --- a/packages/app/src/app/store/modules/editor/actions.js +++ b/packages/app/src/app/store/modules/editor/actions.js @@ -1,9 +1,9 @@ import { fromPairs, toPairs, sortBy, mapValues } from 'lodash-es'; -import slugify from 'common/lib/utils/slugify'; +import slugify from '@codesandbox/common/lib/utils/slugify'; import { clone } from 'mobx-state-tree'; import { dispatch } from 'codesandbox-api'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; import { getTemplate as computeTemplate } from 'codesandbox-import-utils/lib/create-sandbox/templates'; function sortObjectByKeys(object) { diff --git a/packages/app/src/app/store/modules/editor/getters.js b/packages/app/src/app/store/modules/editor/getters.js index ebe64c22ab8..8edf90db1af 100644 --- a/packages/app/src/app/store/modules/editor/getters.js +++ b/packages/app/src/app/store/modules/editor/getters.js @@ -1,7 +1,10 @@ import { dirname } from 'path'; -import { generateFileFromSandbox } from 'common/lib/templates/configuration/package-json'; -import getTemplate from 'common/lib/templates'; -import { getModulePath, getDirectoryPath } from 'common/lib/sandbox/modules'; +import { generateFileFromSandbox } from '@codesandbox/common/lib/templates/configuration/package-json'; +import getTemplate from '@codesandbox/common/lib/templates'; +import { + getModulePath, + getDirectoryPath, +} from '@codesandbox/common/lib/sandbox/modules'; import { parseConfigurations } from '../../utils/parse-configurations'; import { mainModule as getMainModule } from '../../utils/main-module'; diff --git a/packages/app/src/app/store/modules/editor/index.js b/packages/app/src/app/store/modules/editor/index.js index 6e23797e854..2ad08ab6178 100644 --- a/packages/app/src/app/store/modules/editor/index.js +++ b/packages/app/src/app/store/modules/editor/index.js @@ -1,5 +1,5 @@ import { Module } from 'cerebral'; -import themes from 'common/lib/themes'; +import themes from '@codesandbox/common/lib/themes'; import model from './model'; import * as sequences from './sequences'; import { diff --git a/packages/app/src/app/store/modules/editor/utils.js b/packages/app/src/app/store/modules/editor/utils.js index 26076a024e1..3b226702725 100644 --- a/packages/app/src/app/store/modules/editor/utils.js +++ b/packages/app/src/app/store/modules/editor/utils.js @@ -1,4 +1,4 @@ -import track from 'common/lib/utils/analytics'; +import track from '@codesandbox/common/lib/utils/analytics'; export function saveAllModules(store, signals) { const sandbox = store.editor.currentSandbox; diff --git a/packages/app/src/app/store/modules/files/actions.js b/packages/app/src/app/store/modules/files/actions.js index 390d0902e77..6c444e00381 100644 --- a/packages/app/src/app/store/modules/files/actions.js +++ b/packages/app/src/app/store/modules/files/actions.js @@ -1,10 +1,10 @@ import { clone } from 'mobx-state-tree'; -import { getModulePath } from 'common/lib/sandbox/modules'; -import getDefinition from 'common/lib/templates'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; +import getDefinition from '@codesandbox/common/lib/templates'; import { chunk } from 'lodash-es'; import { MAX_FILE_SIZE } from 'codesandbox-import-utils/lib/is-text'; import denormalize from 'codesandbox-import-utils/lib/utils/files/denormalize'; -import track from 'common/lib/utils/analytics'; +import track from '@codesandbox/common/lib/utils/analytics'; import { resolveModuleWrapped, diff --git a/packages/app/src/app/store/modules/live/actions.js b/packages/app/src/app/store/modules/live/actions.js index 184c7b5f3c9..fde23ffe5db 100644 --- a/packages/app/src/app/store/modules/live/actions.js +++ b/packages/app/src/app/store/modules/live/actions.js @@ -1,7 +1,7 @@ import { TextOperation } from 'ot'; import { camelizeKeys } from 'humps'; -import { getTextOperation } from 'common/lib/utils/diff'; +import { getTextOperation } from '@codesandbox/common/lib/utils/diff'; export function createRoom({ api, props }) { const id = props.sandboxId; diff --git a/packages/app/src/app/store/modules/preferences/getters.js b/packages/app/src/app/store/modules/preferences/getters.js index 753ebb9c114..e2e8e6b1087 100644 --- a/packages/app/src/app/store/modules/preferences/getters.js +++ b/packages/app/src/app/store/modules/preferences/getters.js @@ -1,4 +1,4 @@ -import { KEYBINDINGS } from 'common/lib/utils/keybindings'; +import { KEYBINDINGS } from '@codesandbox/common/lib/utils/keybindings'; export function keybindings() { const userBindings = this.settings.keybindings; diff --git a/packages/app/src/app/store/modules/preferences/index.js b/packages/app/src/app/store/modules/preferences/index.js index ba7691b3e17..8e7db406df6 100644 --- a/packages/app/src/app/store/modules/preferences/index.js +++ b/packages/app/src/app/store/modules/preferences/index.js @@ -1,5 +1,5 @@ import { Module } from 'cerebral'; -import { isIOS } from 'common/lib/utils/platform'; +import { isIOS } from '@codesandbox/common/lib/utils/platform'; import model from './model'; import * as sequences from './sequences'; diff --git a/packages/app/src/app/store/modules/preferences/sequences.js b/packages/app/src/app/store/modules/preferences/sequences.js index 8724c3b1f70..6341a4ae952 100644 --- a/packages/app/src/app/store/modules/preferences/sequences.js +++ b/packages/app/src/app/store/modules/preferences/sequences.js @@ -1,7 +1,7 @@ import { set, when, toggle, equals } from 'cerebral/operators'; import { state, props } from 'cerebral/tags'; import { getZeitUserDetails } from 'app/store/sequences'; -import track from 'common/lib/utils/analytics'; +import track from '@codesandbox/common/lib/utils/analytics'; import { setVimExtensionEnabled } from 'app/vscode/initializers'; import * as actions from './actions'; import { setKeybindings, startKeybindings } from '../../actions'; diff --git a/packages/app/src/app/store/modules/workspace/items.js b/packages/app/src/app/store/modules/workspace/items.js index 6658d11e410..59d2e240195 100644 --- a/packages/app/src/app/store/modules/workspace/items.js +++ b/packages/app/src/app/store/modules/workspace/items.js @@ -1,4 +1,4 @@ -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; const PROJECT = { id: 'project', diff --git a/packages/app/src/app/store/modules/workspace/sequences.js b/packages/app/src/app/store/modules/workspace/sequences.js index e0c2d41d54f..423031822ed 100644 --- a/packages/app/src/app/store/modules/workspace/sequences.js +++ b/packages/app/src/app/store/modules/workspace/sequences.js @@ -1,6 +1,6 @@ import { set, when, push } from 'cerebral/operators'; import { state, props } from 'cerebral/tags'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; import * as actions from './actions'; import { ensureOwnedEditable, closeModal, openModal } from '../../sequences'; import { updateSandboxPackage } from './../editor/sequences'; diff --git a/packages/app/src/app/store/providers/Connection.js b/packages/app/src/app/store/providers/Connection.js index 5eee5faaa49..39e76d01221 100644 --- a/packages/app/src/app/store/providers/Connection.js +++ b/packages/app/src/app/store/providers/Connection.js @@ -1,5 +1,5 @@ import { Provider } from 'cerebral'; -import addListener from 'common/lib/connection-manager'; +import addListener from '@codesandbox/common/lib/connection-manager'; const listeners = {}; diff --git a/packages/app/src/app/store/providers/FSSync.ts b/packages/app/src/app/store/providers/FSSync.ts index 64d8c04da4d..391f966db60 100644 --- a/packages/app/src/app/store/providers/FSSync.ts +++ b/packages/app/src/app/store/providers/FSSync.ts @@ -1,8 +1,8 @@ import { Provider } from 'cerebral'; -import { getAbsoluteDependencies } from 'common/lib/utils/dependencies'; -import { protocolAndHost } from 'common/lib/utils/url-generator'; +import { getAbsoluteDependencies } from '@codesandbox/common/lib/utils/dependencies'; +import { protocolAndHost } from '@codesandbox/common/lib/utils/url-generator'; -import { getGlobal } from 'common/lib/utils/global'; +import { getGlobal } from '@codesandbox/common/lib/utils/global'; const global = getGlobal() as Window & { BrowserFS: any }; diff --git a/packages/app/src/app/store/providers/Jwt.js b/packages/app/src/app/store/providers/Jwt.js index d909c8e257d..ae819642513 100644 --- a/packages/app/src/app/store/providers/Jwt.js +++ b/packages/app/src/app/store/providers/Jwt.js @@ -1,6 +1,6 @@ import { Provider } from 'cerebral'; import store from 'store/dist/store.modern'; -import { identify, resetUserId } from 'common/lib/utils/analytics'; +import { identify, resetUserId } from '@codesandbox/common/lib/utils/analytics'; export default Provider({ get() { diff --git a/packages/app/src/app/store/providers/KeybindingManager.js b/packages/app/src/app/store/providers/KeybindingManager.js index cbf3366413c..daca1846ead 100644 --- a/packages/app/src/app/store/providers/KeybindingManager.js +++ b/packages/app/src/app/store/providers/KeybindingManager.js @@ -1,5 +1,8 @@ import { Provider } from 'cerebral'; -import { KEYBINDINGS, normalizeKey } from 'common/lib/utils/keybindings'; +import { + KEYBINDINGS, + normalizeKey, +} from '@codesandbox/common/lib/utils/keybindings'; const isIOS = typeof navigator !== 'undefined' && diff --git a/packages/app/src/app/store/providers/Router.js b/packages/app/src/app/store/providers/Router.js index 8a15c5d24e3..8cd5926a2f7 100644 --- a/packages/app/src/app/store/providers/Router.js +++ b/packages/app/src/app/store/providers/Router.js @@ -1,6 +1,6 @@ import { Provider } from 'cerebral'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; -import { getSandboxOptions } from 'common/lib/url'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; +import { getSandboxOptions } from '@codesandbox/common/lib/url'; import history from '../../utils/history'; export default Provider({ diff --git a/packages/app/src/app/store/providers/Socket.js b/packages/app/src/app/store/providers/Socket.js index 1cfde56337a..503c358ab90 100644 --- a/packages/app/src/app/store/providers/Socket.js +++ b/packages/app/src/app/store/providers/Socket.js @@ -1,6 +1,6 @@ import { Provider } from 'cerebral'; import { Socket } from 'phoenix'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; let socket = null; const debug = _debug('cs:socket'); diff --git a/packages/app/src/app/store/providers/Utils/create-zip/create-react-app-typescript/index.js b/packages/app/src/app/store/providers/Utils/create-zip/create-react-app-typescript/index.js index 3f392b90312..98204d4abfc 100644 --- a/packages/app/src/app/store/providers/Utils/create-zip/create-react-app-typescript/index.js +++ b/packages/app/src/app/store/providers/Utils/create-zip/create-react-app-typescript/index.js @@ -1,4 +1,4 @@ -import type { Sandbox, Module, Directory } from 'common/lib/types'; +import type { Sandbox, Module, Directory } from '@codesandbox/common/lib/types'; import files from 'buffer-loader!./files.zip'; // eslint-disable-line import/no-webpack-loader-syntax import { createFile, createDirectoryWithFiles } from '../'; diff --git a/packages/app/src/app/store/providers/Utils/create-zip/create-react-app/index.js b/packages/app/src/app/store/providers/Utils/create-zip/create-react-app/index.js index 2288cea6069..b282a35a4f8 100644 --- a/packages/app/src/app/store/providers/Utils/create-zip/create-react-app/index.js +++ b/packages/app/src/app/store/providers/Utils/create-zip/create-react-app/index.js @@ -1,4 +1,4 @@ -import type { Sandbox, Module, Directory } from 'common/lib/types'; +import type { Sandbox, Module, Directory } from '@codesandbox/common/lib/types'; import files from 'buffer-loader!./files.zip'; // eslint-disable-line import/no-webpack-loader-syntax import { getResourceTag, diff --git a/packages/app/src/app/store/providers/Utils/create-zip/full/index.js b/packages/app/src/app/store/providers/Utils/create-zip/full/index.js index ab7888b7031..e888884e001 100644 --- a/packages/app/src/app/store/providers/Utils/create-zip/full/index.js +++ b/packages/app/src/app/store/providers/Utils/create-zip/full/index.js @@ -1,4 +1,4 @@ -import type { Sandbox, Module, Directory } from 'common/lib/types'; +import type { Sandbox, Module, Directory } from '@codesandbox/common/lib/types'; import { createFile, createDirectoryWithFiles } from '../'; export default async function createZip( diff --git a/packages/app/src/app/store/providers/Utils/create-zip/index.js b/packages/app/src/app/store/providers/Utils/create-zip/index.js index b52dbf8d042..b9d903ce905 100644 --- a/packages/app/src/app/store/providers/Utils/create-zip/index.js +++ b/packages/app/src/app/store/providers/Utils/create-zip/index.js @@ -2,15 +2,15 @@ import JSZip from 'jszip'; import { saveAs } from 'file-saver'; -import type { Sandbox, Module, Directory } from 'common/lib/types'; +import type { Sandbox, Module, Directory } from '@codesandbox/common/lib/types'; import { react, reactTs, vue, preact, svelte, -} from 'common/lib/templates/index'; -import { resolveModule } from 'common/lib/sandbox/modules'; +} from '@codesandbox/common/lib/templates/index'; +import { resolveModule } from '@codesandbox/common/lib/sandbox/modules'; export const BLOB_ID = 'blob-url://'; diff --git a/packages/app/src/app/store/providers/Utils/create-zip/preact-cli/index.js b/packages/app/src/app/store/providers/Utils/create-zip/preact-cli/index.js index 64a01d74800..8861d356135 100644 --- a/packages/app/src/app/store/providers/Utils/create-zip/preact-cli/index.js +++ b/packages/app/src/app/store/providers/Utils/create-zip/preact-cli/index.js @@ -1,4 +1,4 @@ -import type { Sandbox, Module, Directory } from 'common/lib/types'; +import type { Sandbox, Module, Directory } from '@codesandbox/common/lib/types'; import files from 'buffer-loader!./files.zip'; // eslint-disable-line import/no-webpack-loader-syntax import { diff --git a/packages/app/src/app/store/providers/Utils/create-zip/svelte/index.js b/packages/app/src/app/store/providers/Utils/create-zip/svelte/index.js index 0d779ae54d2..9e3303a34d1 100644 --- a/packages/app/src/app/store/providers/Utils/create-zip/svelte/index.js +++ b/packages/app/src/app/store/providers/Utils/create-zip/svelte/index.js @@ -1,4 +1,4 @@ -import type { Sandbox, Module, Directory } from 'common/lib/types'; +import type { Sandbox, Module, Directory } from '@codesandbox/common/lib/types'; import files from 'buffer-loader!./files.zip'; // eslint-disable-line import/no-webpack-loader-syntax import { createFile, createPackageJSON, createDirectoryWithFiles } from '../'; diff --git a/packages/app/src/app/store/providers/Utils/create-zip/vue-cli/index.js b/packages/app/src/app/store/providers/Utils/create-zip/vue-cli/index.js index f275bc16c13..97857eb4717 100644 --- a/packages/app/src/app/store/providers/Utils/create-zip/vue-cli/index.js +++ b/packages/app/src/app/store/providers/Utils/create-zip/vue-cli/index.js @@ -1,4 +1,4 @@ -import type { Sandbox, Module, Directory } from 'common/lib/types'; +import type { Sandbox, Module, Directory } from '@codesandbox/common/lib/types'; import files from 'buffer-loader!./files.zip'; // eslint-disable-line import/no-webpack-loader-syntax import { createFile, createDirectoryWithFiles } from '../'; diff --git a/packages/app/src/app/store/providers/Utils/index.js b/packages/app/src/app/store/providers/Utils/index.js index 568d1ca3820..0131d49a2d5 100644 --- a/packages/app/src/app/store/providers/Utils/index.js +++ b/packages/app/src/app/store/providers/Utils/index.js @@ -1,5 +1,5 @@ import { Provider } from 'cerebral'; -import { resolveModule } from 'common/lib/sandbox/modules'; +import { resolveModule } from '@codesandbox/common/lib/sandbox/modules'; import { isEqual } from 'lodash-es'; import prettify from 'app/utils/prettify'; diff --git a/packages/app/src/app/store/sequences.js b/packages/app/src/app/store/sequences.js index ec34405ca86..d87a37f8209 100644 --- a/packages/app/src/app/store/sequences.js +++ b/packages/app/src/app/store/sequences.js @@ -2,7 +2,7 @@ import { sequence } from 'cerebral'; import { when, push, unset, set, equals } from 'cerebral/operators'; import { state, props } from 'cerebral/tags'; -import getTemplateDefinition from 'common/lib/templates'; +import getTemplateDefinition from '@codesandbox/common/lib/templates'; import * as actions from './actions'; import * as factories from './factories'; diff --git a/packages/app/src/app/store/utils/main-module.js b/packages/app/src/app/store/utils/main-module.js index e12b8a0b5b4..d3f5269703f 100644 --- a/packages/app/src/app/store/utils/main-module.js +++ b/packages/app/src/app/store/utils/main-module.js @@ -1,6 +1,6 @@ // @flow -import type { Sandbox } from 'common/lib/types'; -import getDefinition from 'common/lib/templates'; +import type { Sandbox } from '@codesandbox/common/lib/types'; +import getDefinition from '@codesandbox/common/lib/templates'; import { resolveModuleWrapped } from './resolve-module-wrapped'; diff --git a/packages/app/src/app/store/utils/parse-configurations.js b/packages/app/src/app/store/utils/parse-configurations.js index c744a62a0da..2107995bc8e 100644 --- a/packages/app/src/app/store/utils/parse-configurations.js +++ b/packages/app/src/app/store/utils/parse-configurations.js @@ -1,8 +1,8 @@ // @flow -import type { Sandbox } from 'common/lib/types'; +import type { Sandbox } from '@codesandbox/common/lib/types'; -import getDefinition from 'common/lib/templates'; -import parse from 'common/lib/templates/configuration/parse'; +import getDefinition from '@codesandbox/common/lib/templates'; +import parse from '@codesandbox/common/lib/templates/configuration/parse'; import { resolveModuleWrapped } from './resolve-module-wrapped'; export function parseConfigurations(sandbox: Sandbox) { diff --git a/packages/app/src/app/store/utils/resolve-module-wrapped.js b/packages/app/src/app/store/utils/resolve-module-wrapped.js index 3e775113df8..5984f71f1d1 100644 --- a/packages/app/src/app/store/utils/resolve-module-wrapped.js +++ b/packages/app/src/app/store/utils/resolve-module-wrapped.js @@ -1,4 +1,7 @@ -import { resolveModule, resolveDirectory } from 'common/lib/sandbox/modules'; +import { + resolveModule, + resolveDirectory, +} from '@codesandbox/common/lib/sandbox/modules'; export const resolveModuleWrapped = sandbox => (path: string) => { try { diff --git a/packages/app/src/app/utils/analytics.js b/packages/app/src/app/utils/analytics.js index 335d8f31284..6869490bf21 100644 --- a/packages/app/src/app/utils/analytics.js +++ b/packages/app/src/app/utils/analytics.js @@ -1,6 +1,6 @@ // @flow -import _debug from 'common/lib/utils/debug'; -import type { CurrentUser } from 'common/lib/types'; +import _debug from '@codesandbox/common/lib/utils/debug'; +import type { CurrentUser } from '@codesandbox/common/lib/types'; const debug = _debug('cs:analytics'); diff --git a/packages/app/src/app/utils/get-type.js b/packages/app/src/app/utils/get-type.js index 410dc8012f8..c79c98c9225 100644 --- a/packages/app/src/app/utils/get-type.js +++ b/packages/app/src/app/utils/get-type.js @@ -1,5 +1,5 @@ /* @flow */ -import isImage from 'common/lib/utils/is-image'; +import isImage from '@codesandbox/common/lib/utils/is-image'; const svgRegex = /\.svg$/; diff --git a/packages/app/src/app/utils/prettify.js b/packages/app/src/app/utils/prettify.js index 41348b10c13..d82d38dc2d5 100644 --- a/packages/app/src/app/utils/prettify.js +++ b/packages/app/src/app/utils/prettify.js @@ -1,6 +1,6 @@ /* eslint-disable no-console */ -import DEFAULT_PRETTIER_CONFIG from 'common/lib/prettify-default-config'; +import DEFAULT_PRETTIER_CONFIG from '@codesandbox/common/lib/prettify-default-config'; import { lineAndColumnToIndex, indexToLineAndColumn, diff --git a/packages/app/src/app/utils/test/render.js b/packages/app/src/app/utils/test/render.js index 085cb68e1fc..f49dc0b2498 100644 --- a/packages/app/src/app/utils/test/render.js +++ b/packages/app/src/app/utils/test/render.js @@ -3,7 +3,7 @@ import renderer from 'react-test-renderer'; import 'jest-styled-components'; import { ThemeProvider } from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; export default Component => { const tree = renderer diff --git a/packages/app/src/app/vscode/extensionHostWorker/common/global.ts b/packages/app/src/app/vscode/extensionHostWorker/common/global.ts index 2006840c862..cf3b10b5d82 100644 --- a/packages/app/src/app/vscode/extensionHostWorker/common/global.ts +++ b/packages/app/src/app/vscode/extensionHostWorker/common/global.ts @@ -1,5 +1,5 @@ import { EventEmitter } from 'events'; -import requirePolyfills from 'common/lib/load-dynamic-polyfills'; +import requirePolyfills from '@codesandbox/common/lib/load-dynamic-polyfills'; const ctx: any = self as any; declare var __DEV__: boolean; diff --git a/packages/app/src/app/vscode/extensionHostWorker/common/type-downloader.ts b/packages/app/src/app/vscode/extensionHostWorker/common/type-downloader.ts index 8bd32633a67..b9ccae5e265 100644 --- a/packages/app/src/app/vscode/extensionHostWorker/common/type-downloader.ts +++ b/packages/app/src/app/vscode/extensionHostWorker/common/type-downloader.ts @@ -1,4 +1,4 @@ -import { getGlobal, commonPostMessage } from 'common/lib/utils/global'; +import { getGlobal, commonPostMessage } from '@codesandbox/common/lib/utils/global'; import { IModule, IManager, diff --git a/packages/app/src/app/vscode/extensionHostWorker/workers/ext-host-worker.ts b/packages/app/src/app/vscode/extensionHostWorker/workers/ext-host-worker.ts index 1c308036c14..0b270e1178f 100644 --- a/packages/app/src/app/vscode/extensionHostWorker/workers/ext-host-worker.ts +++ b/packages/app/src/app/vscode/extensionHostWorker/workers/ext-host-worker.ts @@ -1,7 +1,7 @@ // This is the base worker that launches the extension host -import _debug from 'common/lib/utils/debug'; -import { commonPostMessage } from 'common/lib/utils/global'; +import _debug from '@codesandbox/common/lib/utils/debug'; +import { commonPostMessage } from '@codesandbox/common/lib/utils/global'; import loader from '../../dev-bootstrap'; import { initializeBrowserFS } from '../common/fs'; import { EXTENSIONS_LOCATION } from '../../constants'; diff --git a/packages/app/src/app/vscode/extensionHostWorker/workers/generic-worker.ts b/packages/app/src/app/vscode/extensionHostWorker/workers/generic-worker.ts index 89525eff3d5..e438287c449 100644 --- a/packages/app/src/app/vscode/extensionHostWorker/workers/generic-worker.ts +++ b/packages/app/src/app/vscode/extensionHostWorker/workers/generic-worker.ts @@ -4,8 +4,8 @@ import { default as Module } from 'node-services/lib/module'; import resolve from 'resolve'; import { basename } from 'path'; -import _debug from 'common/lib/utils/debug'; -import { commonPostMessage } from 'common/lib/utils/global'; +import _debug from '@codesandbox/common/lib/utils/debug'; +import { commonPostMessage } from '@codesandbox/common/lib/utils/global'; import { initializeBrowserFS } from '../common/fs'; diff --git a/packages/app/src/embed/components/App/index.js b/packages/app/src/embed/components/App/index.js index 1e9b1f4905b..601ff1db965 100644 --- a/packages/app/src/embed/components/App/index.js +++ b/packages/app/src/embed/components/App/index.js @@ -3,14 +3,17 @@ import * as React from 'react'; import { ThemeProvider } from 'styled-components'; import { camelizeKeys } from 'humps'; -import getTemplateDefinition from 'common/lib/templates'; -import type { Module, Sandbox } from 'common/lib/types'; -import Centered from 'common/lib/components/flex/Centered'; +import getTemplateDefinition from '@codesandbox/common/lib/templates'; +import type { Module, Sandbox } from '@codesandbox/common/lib/types'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import Title from 'app/components/Title'; import SubTitle from 'app/components/SubTitle'; -import { getSandboxOptions } from 'common/lib/url'; +import { getSandboxOptions } from '@codesandbox/common/lib/url'; -import { findCurrentModule, findMainModule } from 'common/lib/sandbox/modules'; +import { + findCurrentModule, + findMainModule, +} from '@codesandbox/common/lib/sandbox/modules'; import Header from '../Header'; import Content from '../Content'; @@ -88,8 +91,7 @@ export default class App extends React.PureComponent< runOnClick, verticalMode = window.innerWidth < window.innerHeight, tabs, - } = - props.embedOptions || getSandboxOptions(document.location.href); + } = props.embedOptions || getSandboxOptions(document.location.href); this.state = { notFound: false, diff --git a/packages/app/src/embed/components/Content/index.js b/packages/app/src/embed/components/Content/index.js index 5d5066cd0de..b104fc903bc 100644 --- a/packages/app/src/embed/components/Content/index.js +++ b/packages/app/src/embed/components/Content/index.js @@ -1,14 +1,18 @@ // @flow import * as React from 'react'; -import type { Sandbox, Module, ModuleError } from 'common/lib/types'; -import BasePreview from 'common/lib/components/Preview'; +import type { + Sandbox, + Module, + ModuleError, +} from '@codesandbox/common/lib/types'; +import BasePreview from '@codesandbox/common/lib/components/Preview'; import CodeEditor from 'app/components/CodeEditor'; import type { Editor, Settings } from 'app/components/CodeEditor/types'; import Tab from 'app/pages/Sandbox/Editor/Content/Tabs/Tab'; import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons'; import getType from 'app/utils/get-type'; -import getTemplate from 'common/lib/templates'; +import getTemplate from '@codesandbox/common/lib/templates'; import { StyledNotSyncedIcon } from 'app/pages/Sandbox/Editor/Content/Tabs/ModuleTab/elements'; import { @@ -19,9 +23,12 @@ import { import DevTools from 'app/components/Preview/DevTools'; -import { resolveModule, findMainModule } from 'common/lib/sandbox/modules'; -import RunOnClick from 'common/lib/components/RunOnClick'; -import { getPreviewTabs } from 'common/lib/templates/devtools'; +import { + resolveModule, + findMainModule, +} from '@codesandbox/common/lib/sandbox/modules'; +import RunOnClick from '@codesandbox/common/lib/components/RunOnClick'; +import { getPreviewTabs } from '@codesandbox/common/lib/templates/devtools'; import { Container, Tabs, Split } from './elements'; diff --git a/packages/app/src/embed/components/EditorLink/index.js b/packages/app/src/embed/components/EditorLink/index.js index 4c6e2110b3e..c2090fec752 100644 --- a/packages/app/src/embed/components/EditorLink/index.js +++ b/packages/app/src/embed/components/EditorLink/index.js @@ -1,11 +1,11 @@ // @flow import React from 'react'; -import type { Sandbox } from 'common/lib/types'; +import type { Sandbox } from '@codesandbox/common/lib/types'; -import Logo from 'common/lib/components/Logo'; +import Logo from '@codesandbox/common/lib/components/Logo'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; import { Text, EditText } from './elements'; diff --git a/packages/app/src/embed/components/Files/index.js b/packages/app/src/embed/components/Files/index.js index bdbc0645904..4216466041d 100644 --- a/packages/app/src/embed/components/Files/index.js +++ b/packages/app/src/embed/components/Files/index.js @@ -3,9 +3,9 @@ import * as React from 'react'; import { sortBy } from 'lodash-es'; -import type { Module, Directory } from 'common/lib/types'; +import type { Module, Directory } from '@codesandbox/common/lib/types'; -import { isMainModule } from 'common/lib/sandbox/modules'; +import { isMainModule } from '@codesandbox/common/lib/sandbox/modules'; import getType from 'app/utils/get-type'; import File from '../File'; diff --git a/packages/app/src/embed/components/Header/elements.js b/packages/app/src/embed/components/Header/elements.js index d7eee8730bc..a38cb65a43e 100644 --- a/packages/app/src/embed/components/Header/elements.js +++ b/packages/app/src/embed/components/Header/elements.js @@ -1,7 +1,7 @@ // @flow import styled, { css } from 'styled-components'; import MenuIconSVG from 'react-icons/lib/md/menu'; -import { Button as RealButton } from 'common/lib/components/Button'; +import { Button as RealButton } from '@codesandbox/common/lib/components/Button'; import { SIDEBAR_SHOW_SCREEN_SIZE } from '../../util/constants'; diff --git a/packages/app/src/embed/components/Header/index.js b/packages/app/src/embed/components/Header/index.js index 4c78966bb93..b0cab69d33b 100644 --- a/packages/app/src/embed/components/Header/index.js +++ b/packages/app/src/embed/components/Header/index.js @@ -1,11 +1,14 @@ // @flow import * as React from 'react'; -import type { Sandbox } from 'common/lib/types'; +import type { Sandbox } from '@codesandbox/common/lib/types'; import ModeIcons from 'app/components/ModeIcons'; import HeartIcon from 'react-icons/lib/fa/heart-o'; import FullHeartIcon from 'react-icons/lib/fa/heart'; -import Logo from 'common/lib/components/Logo'; -import { sandboxUrl, embedUrl } from 'common/lib/utils/url-generator'; +import Logo from '@codesandbox/common/lib/components/Logo'; +import { + sandboxUrl, + embedUrl, +} from '@codesandbox/common/lib/utils/url-generator'; import LinkIcon from './Link'; diff --git a/packages/app/src/embed/components/Sidebar/index.js b/packages/app/src/embed/components/Sidebar/index.js index a89223ac9a7..48f2e155709 100644 --- a/packages/app/src/embed/components/Sidebar/index.js +++ b/packages/app/src/embed/components/Sidebar/index.js @@ -1,9 +1,9 @@ // @flow import * as React from 'react'; -import type { Sandbox } from 'common/lib/types'; +import type { Sandbox } from '@codesandbox/common/lib/types'; -import Padding from 'common/lib/components/spacing/Padding'; +import Padding from '@codesandbox/common/lib/components/spacing/Padding'; import { EntryContainer } from 'app/pages/Sandbox/Editor/Workspace/elements'; import EditorLink from '../EditorLink'; diff --git a/packages/app/src/embed/index.js b/packages/app/src/embed/index.js index d15ef7dfa2d..4385db9a336 100644 --- a/packages/app/src/embed/index.js +++ b/packages/app/src/embed/index.js @@ -3,13 +3,13 @@ import React from 'react'; import { render } from 'react-dom'; import { ThemeProvider } from 'styled-components'; -import requirePolyfills from 'common/lib/load-dynamic-polyfills'; +import requirePolyfills from '@codesandbox/common/lib/load-dynamic-polyfills'; import 'normalize.css'; import 'app/split-pane.css'; -import theme from 'common/lib/theme'; -import 'common/lib/global.css'; +import theme from '@codesandbox/common/lib/theme'; +import '@codesandbox/common/lib/global.css'; -import codesandbox from 'common/lib/themes/codesandbox.json'; +import codesandbox from '@codesandbox/common/lib/themes/codesandbox.json'; import App from './components/App'; diff --git a/packages/app/src/embed/library.js b/packages/app/src/embed/library.js index 5ae34722243..7ca3264b70c 100644 --- a/packages/app/src/embed/library.js +++ b/packages/app/src/embed/library.js @@ -1,7 +1,7 @@ // @flow import React from 'react'; import { ThemeProvider } from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import App from './components/App'; export default (props: any) => ( diff --git a/packages/app/src/sandbox/compile-old.js b/packages/app/src/sandbox/compile-old.js index a9fcb2faf34..1d81d221328 100644 --- a/packages/app/src/sandbox/compile-old.js +++ b/packages/app/src/sandbox/compile-old.js @@ -1,6 +1,6 @@ import { dispatch, clearErrorTransformers } from 'codesandbox-api'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; import { inject, unmount } from 'sandbox-hooks/react-error-overlay/overlay'; import initializeErrorTransformers from 'sandbox-hooks/errors/transformers'; import { Encode } from 'console-feed/lib/Transform'; diff --git a/packages/app/src/sandbox/compile.ts b/packages/app/src/sandbox/compile.ts index 9ecd7464d87..727df595efc 100644 --- a/packages/app/src/sandbox/compile.ts +++ b/packages/app/src/sandbox/compile.ts @@ -1,11 +1,11 @@ import { dispatch, reattach, clearErrorTransformers } from 'codesandbox-api'; -import { absolute } from 'common/lib/utils/path'; -import _debug from 'common/lib/utils/debug'; -import parseConfigurations from 'common/lib/templates/configuration/parse'; +import { absolute } from '@codesandbox/common/lib/utils/path'; +import _debug from '@codesandbox/common/lib/utils/debug'; +import parseConfigurations from '@codesandbox/common/lib/templates/configuration/parse'; import initializeErrorTransformers from 'sandbox-hooks/errors/transformers'; import { inject, unmount } from 'sandbox-hooks/react-error-overlay/overlay'; -import { isBabel7 } from 'common/lib/utils/is-babel-7'; -import getDefinition, { TemplateType } from 'common/lib/templates/index'; +import { isBabel7 } from '@codesandbox/common/lib/utils/is-babel-7'; +import getDefinition, { TemplateType } from '@codesandbox/common/lib/templates/index'; import getPreset from './eval'; import Manager, { Manifest } from './eval/manager'; @@ -28,7 +28,7 @@ import { consumeCache, saveCache, deleteAPICache } from './eval/cache'; import { showRunOnClick } from './status-screen/run-on-click'; import { Module } from './eval/entities/module'; -import { ParsedConfigurationFiles } from 'common/lib/templates/template'; +import { ParsedConfigurationFiles } from '@codesandbox/common/lib/templates/template'; import TranspiledModule from './eval/transpiled-module'; let initializedResizeListener = false; diff --git a/packages/app/src/sandbox/eval/cache.ts b/packages/app/src/sandbox/eval/cache.ts index 758351140a8..0af580383f7 100644 --- a/packages/app/src/sandbox/eval/cache.ts +++ b/packages/app/src/sandbox/eval/cache.ts @@ -1,6 +1,6 @@ // Responsible for consuming and syncing with the server/local cache import localforage from 'localforage'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; import Manager from './manager'; import { SCRIPT_VERSION } from '../'; diff --git a/packages/app/src/sandbox/eval/index.js b/packages/app/src/sandbox/eval/index.js index 91d0046e296..14e8e661bfc 100644 --- a/packages/app/src/sandbox/eval/index.js +++ b/packages/app/src/sandbox/eval/index.js @@ -12,7 +12,7 @@ import { dojo, custom, reason, -} from 'common/lib/templates'; +} from '@codesandbox/common/lib/templates'; import reactPreset from './presets/create-react-app'; import reactTsPreset from './presets/create-react-app-typescript'; diff --git a/packages/app/src/sandbox/eval/manager.ts b/packages/app/src/sandbox/eval/manager.ts index 88302d5eff3..4fcfef7b44b 100644 --- a/packages/app/src/sandbox/eval/manager.ts +++ b/packages/app/src/sandbox/eval/manager.ts @@ -4,8 +4,8 @@ import { Protocol } from 'codesandbox-api'; import resolve from 'browser-resolve'; import localforage from 'localforage'; -import * as pathUtils from 'common/lib/utils/path'; -import _debug from 'common/lib/utils/debug'; +import * as pathUtils from '@codesandbox/common/lib/utils/path'; +import _debug from '@codesandbox/common/lib/utils/debug'; import DependencyNotFoundError from 'sandbox-hooks/errors/dependency-not-found-error'; import ModuleNotFoundError from 'sandbox-hooks/errors/module-not-found-error'; @@ -26,8 +26,8 @@ import { packageFilter } from './utils/resolve-utils'; import { ignoreNextCache, deleteAPICache } from './cache'; import { shouldTranspile } from './transpilers/babel/check'; -import { getGlobal } from 'common/lib/utils/global'; -import { ParsedConfigurationFiles } from 'common/lib/templates/template'; +import { getGlobal } from '@codesandbox/common/lib/utils/global'; +import { ParsedConfigurationFiles } from '@codesandbox/common/lib/templates/template'; declare var BrowserFS: any; diff --git a/packages/app/src/sandbox/eval/npm/fetch-npm-module.ts b/packages/app/src/sandbox/eval/npm/fetch-npm-module.ts index 6b11d77b113..da10bd5af93 100644 --- a/packages/app/src/sandbox/eval/npm/fetch-npm-module.ts +++ b/packages/app/src/sandbox/eval/npm/fetch-npm-module.ts @@ -1,5 +1,5 @@ // @flow -import * as pathUtils from 'common/lib/utils/path'; +import * as pathUtils from '@codesandbox/common/lib/utils/path'; import resolve from 'browser-resolve'; import DependencyNotFoundError from 'sandbox-hooks/errors/dependency-not-found-error'; diff --git a/packages/app/src/sandbox/eval/presets/angular-cli/index.js b/packages/app/src/sandbox/eval/presets/angular-cli/index.js index 9bd26bbb499..9f40814378f 100644 --- a/packages/app/src/sandbox/eval/presets/angular-cli/index.js +++ b/packages/app/src/sandbox/eval/presets/angular-cli/index.js @@ -1,5 +1,5 @@ // @flow -import { join, absolute } from 'common/lib/utils/path'; +import { join, absolute } from '@codesandbox/common/lib/utils/path'; import Preset from '../'; import angular2Transpiler from '../../transpilers/angular2-template'; diff --git a/packages/app/src/sandbox/eval/presets/create-react-app/index.js b/packages/app/src/sandbox/eval/presets/create-react-app/index.js index 1af277b04be..59af7a66e3a 100644 --- a/packages/app/src/sandbox/eval/presets/create-react-app/index.js +++ b/packages/app/src/sandbox/eval/presets/create-react-app/index.js @@ -1,4 +1,4 @@ -import { isBabel7 } from 'common/lib/utils/is-babel-7'; +import { isBabel7 } from '@codesandbox/common/lib/utils/is-babel-7'; import Preset from '../'; diff --git a/packages/app/src/sandbox/eval/presets/dojo/index.js b/packages/app/src/sandbox/eval/presets/dojo/index.js index e610a4d9e4f..d850918de51 100644 --- a/packages/app/src/sandbox/eval/presets/dojo/index.js +++ b/packages/app/src/sandbox/eval/presets/dojo/index.js @@ -1,4 +1,4 @@ -import { join, absolute } from 'common/lib/utils/path'; +import { join, absolute } from '@codesandbox/common/lib/utils/path'; import Preset from '../'; import typescriptTranspiler from '../../transpilers/typescript'; diff --git a/packages/app/src/sandbox/eval/tests/jest-lite.js b/packages/app/src/sandbox/eval/tests/jest-lite.js index ab2f3ba4687..2933e0798a5 100644 --- a/packages/app/src/sandbox/eval/tests/jest-lite.js +++ b/packages/app/src/sandbox/eval/tests/jest-lite.js @@ -1,6 +1,6 @@ // @flow import { dispatch, actions, listen } from 'codesandbox-api'; -import { react, reactTs } from 'common/lib/templates'; +import { react, reactTs } from '@codesandbox/common/lib/templates'; import expect from 'jest-matchers'; import jestMock from 'jest-mock'; import jestTestHooks from 'jest-circus'; diff --git a/packages/app/src/sandbox/eval/transpiled-module.ts b/packages/app/src/sandbox/eval/transpiled-module.ts index 269632c02cf..fd73140102c 100644 --- a/packages/app/src/sandbox/eval/transpiled-module.ts +++ b/packages/app/src/sandbox/eval/transpiled-module.ts @@ -2,11 +2,11 @@ import { flattenDeep } from 'lodash-es'; import { actions, dispatch } from 'codesandbox-api'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; import hashsum from 'hash-sum'; -import * as pathUtils from 'common/lib/utils/path'; +import * as pathUtils from '@codesandbox/common/lib/utils/path'; import { Module } from './entities/module'; import { SourceMap } from './transpilers/utils/get-source-map'; diff --git a/packages/app/src/sandbox/eval/transpilers/babel/index.js b/packages/app/src/sandbox/eval/transpilers/babel/index.js index 496483b0c78..7c37d046dee 100644 --- a/packages/app/src/sandbox/eval/transpilers/babel/index.js +++ b/packages/app/src/sandbox/eval/transpilers/babel/index.js @@ -1,6 +1,6 @@ // @flow import BabelWorker from 'worker-loader?publicPath=/&name=babel-transpiler.[hash:8].worker.js!./worker/index.js'; -import { isBabel7 } from 'common/lib/utils/is-babel-7'; +import { isBabel7 } from '@codesandbox/common/lib/utils/is-babel-7'; import regexGetRequireStatements from './worker/simple-get-require-statements'; import getBabelConfig from './babel-parser'; diff --git a/packages/app/src/sandbox/eval/transpilers/babel/worker/babel-worker.js b/packages/app/src/sandbox/eval/transpilers/babel/worker/babel-worker.js index 11a3be28ca9..febf8b01dce 100644 --- a/packages/app/src/sandbox/eval/transpilers/babel/worker/babel-worker.js +++ b/packages/app/src/sandbox/eval/transpilers/babel/worker/babel-worker.js @@ -3,7 +3,7 @@ import { flatten } from 'lodash-es'; import codeFrame from 'babel-code-frame'; import macrosPlugin from 'babel-plugin-macros'; -import delay from 'common/lib/utils/delay'; +import delay from '@codesandbox/common/lib/utils/delay'; import dynamicImportPlugin from './plugins/babel-plugin-dynamic-import-node'; import detective from './plugins/babel-plugin-detective'; diff --git a/packages/app/src/sandbox/eval/transpilers/babel/worker/evaluate.js b/packages/app/src/sandbox/eval/transpilers/babel/worker/evaluate.js index 18a7a1878e7..817fbd66ace 100644 --- a/packages/app/src/sandbox/eval/transpilers/babel/worker/evaluate.js +++ b/packages/app/src/sandbox/eval/transpilers/babel/worker/evaluate.js @@ -2,7 +2,7 @@ import resolve from 'browser-resolve'; import hashsum from 'hash-sum'; import { dirname } from 'path'; import type FSType from 'fs'; -import detectOldBrowser from 'common/lib/detect-old-browser'; +import detectOldBrowser from '@codesandbox/common/lib/detect-old-browser'; import evaluateCode from '../../../loaders/eval'; let cache = {}; diff --git a/packages/app/src/sandbox/eval/transpilers/babel/worker/index.js b/packages/app/src/sandbox/eval/transpilers/babel/worker/index.js index 6a12a9bcd53..a58f1b66a08 100644 --- a/packages/app/src/sandbox/eval/transpilers/babel/worker/index.js +++ b/packages/app/src/sandbox/eval/transpilers/babel/worker/index.js @@ -1,4 +1,4 @@ -import loadPolyfills from 'common/lib/load-dynamic-polyfills'; +import loadPolyfills from '@codesandbox/common/lib/load-dynamic-polyfills'; require('app/config/polyfills'); diff --git a/packages/app/src/sandbox/eval/transpilers/sass/worker/sass-worker.js b/packages/app/src/sandbox/eval/transpilers/sass/worker/sass-worker.js index d4bc13ab4dd..2cff38e5df1 100644 --- a/packages/app/src/sandbox/eval/transpilers/sass/worker/sass-worker.js +++ b/packages/app/src/sandbox/eval/transpilers/sass/worker/sass-worker.js @@ -1,7 +1,7 @@ import resolve from 'browser-resolve'; -import { absolute } from 'common/lib/utils/path'; +import { absolute } from '@codesandbox/common/lib/utils/path'; import { extname } from 'path'; -import delay from 'common/lib/utils/delay'; +import delay from '@codesandbox/common/lib/utils/delay'; self.importScripts([ process.env.NODE_ENV === 'production' diff --git a/packages/app/src/sandbox/eval/transpilers/vue/loader.js b/packages/app/src/sandbox/eval/transpilers/vue/loader.js index 37a84066690..71d79e6c15c 100644 --- a/packages/app/src/sandbox/eval/transpilers/vue/loader.js +++ b/packages/app/src/sandbox/eval/transpilers/vue/loader.js @@ -2,7 +2,7 @@ /* eslint-disable import/no-webpack-loader-syntax, prefer-template, no-use-before-define, no-shadow, operator-assignment, no-else-return */ import querystring from 'querystring'; -import { basename, dirname } from 'common/lib/utils/path'; +import { basename, dirname } from '@codesandbox/common/lib/utils/path'; import componentNormalizerRaw from '!raw-loader!./component-normalizer'; import vueHotReloadAPIRaw from '!raw-loader!vue-hot-reload-api'; diff --git a/packages/app/src/sandbox/eval/transpilers/worker-transpiler.js b/packages/app/src/sandbox/eval/transpilers/worker-transpiler.js index 8922eb013d9..92d72f62b0c 100644 --- a/packages/app/src/sandbox/eval/transpilers/worker-transpiler.js +++ b/packages/app/src/sandbox/eval/transpilers/worker-transpiler.js @@ -1,5 +1,5 @@ import type BrowserFS from 'codesandbox-browserfs'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; import Transpiler from './'; import { parseWorkerError } from './utils/worker-error-handler'; diff --git a/packages/app/src/sandbox/index.js b/packages/app/src/sandbox/index.js index 8ded5ce3e7e..b46f49a1988 100644 --- a/packages/app/src/sandbox/index.js +++ b/packages/app/src/sandbox/index.js @@ -1,12 +1,12 @@ import { camelizeKeys } from 'humps'; import { isStandalone, listen, dispatch } from 'codesandbox-api'; -import _debug from 'common/lib/utils/debug'; +import _debug from '@codesandbox/common/lib/utils/debug'; -import registerServiceWorker from 'common/lib/registerServiceWorker'; -import requirePolyfills from 'common/lib/load-dynamic-polyfills'; -import { getModulePath } from 'common/lib/sandbox/modules'; -import { generateFileFromSandbox } from 'common/lib/templates/configuration/package-json'; +import registerServiceWorker from '@codesandbox/common/lib/registerServiceWorker'; +import requirePolyfills from '@codesandbox/common/lib/load-dynamic-polyfills'; +import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; +import { generateFileFromSandbox } from '@codesandbox/common/lib/templates/configuration/package-json'; import setupConsole from 'sandbox-hooks/console'; import setupHistoryListeners from 'sandbox-hooks/url-listeners'; diff --git a/packages/app/src/sandbox/npm/fetch-dependencies.js b/packages/app/src/sandbox/npm/fetch-dependencies.js index 442e3f0c333..0198080ff80 100644 --- a/packages/app/src/sandbox/npm/fetch-dependencies.js +++ b/packages/app/src/sandbox/npm/fetch-dependencies.js @@ -1,6 +1,6 @@ import { actions, dispatch } from 'codesandbox-api'; -import _debug from 'common/lib/utils/debug'; -import { getAbsoluteDependencies } from 'common/lib/utils/dependencies'; +import _debug from '@codesandbox/common/lib/utils/debug'; +import { getAbsoluteDependencies } from '@codesandbox/common/lib/utils/dependencies'; import dependenciesToQuery from './dependencies-to-query'; diff --git a/packages/codesandbox-api/package.json b/packages/codesandbox-api/package.json index abe185acfe6..219e76c581e 100644 --- a/packages/codesandbox-api/package.json +++ b/packages/codesandbox-api/package.json @@ -1,6 +1,6 @@ { "name": "codesandbox-api", - "version": "0.0.20", + "version": "0.0.22", "description": "", "keywords": [], "main": "dist/codesandbox.umd.js", @@ -22,7 +22,7 @@ "lint": "tslint -t codeFrame 'src/**/*.ts' 'test/**/*.ts'", "prebuild": "rimraf dist", "build:clean": "tsc && rollup -c", - "build": "tsc && rollup -c && rimraf compiled && typedoc --out dist/docs --target es6 --theme minimal src", + "build": "tsc && rollup -c && rimraf compiled", "build:dev": "tsc && rollup -c", "start": "nodemon --watch \"src/**/*.ts\" -e ts --exec \"npm run build:clean\"", "test": "jest", diff --git a/packages/codesandbox-api/tsconfig.json b/packages/codesandbox-api/tsconfig.json index 2e67549be07..ed324487b49 100644 --- a/packages/codesandbox-api/tsconfig.json +++ b/packages/codesandbox-api/tsconfig.json @@ -14,5 +14,6 @@ "outDir": "compiled", "typeRoots": ["node_modules/@types", "../../node_modules/@types"] }, - "include": ["src"] + "include": ["src"], + "exclude": ["__tests__"] } diff --git a/packages/common/package.json b/packages/common/package.json index e670e11f74b..d18e82c136d 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,27 +1,40 @@ { - "name": "common", - "version": "1.0.0", - "private": true, + "name": "@codesandbox/common", + "version": "1.0.4", "source": true, + "files": [ + "lib" + ], "scripts": { "test": "jest", "clean": "rimraf lib && yarn rimraf node_modules/@types/react-native", "start": "(yarn tsc --watch & yarn babel src --out-dir lib --watch & yarn cpx \"src/**/*.{css,svg,png,jpg}\" lib --watch)", - "build:dev": "yarn clean && yarn tsc && yarn babel src --out-dir lib && yarn cpx \"src/**/*.{css,svg,png,jpg}\" lib" + "build": "yarn clean && yarn tsc && yarn babel src --out-dir lib && yarn cpx \"src/**/*.{css,svg,png,jpg}\" lib", + "build:dev": "yarn build", + "prepublish": "yarn build" }, "dependencies": { "@babel/plugin-transform-flow-strip-types": "^7.0.0", + "babel-plugin-preval": "^3.0.1", + "codesandbox-api": "^0.0.22", "color": "0.11.4", "error-polyfill": "^0.1.1", + "humps": "CompuIves/humps", "image-extensions": "^1.1.0", "jsonlint": "^1.6.3", + "lodash": "^4.17.11", "memoize-one": "^3.1.1", + "moment": "^2.18.1", "ot": "^0.0.15", "react-icons": "^2.2.7", "react-input-autosize": "^2.2.1", + "react-router-dom": "^4.3.1", "react-spring": "^8.0.18", "react-textarea-autosize": "^6.1.0", "react-tippy": "^0.14.0", + "semver": "^5.6.0", + "sha1": "^1.1.1", + "socket.io-client": "^2.1.1", "styled-components": "^4.1.2" }, "devDependencies": { diff --git a/packages/common/src/utils/global.ts b/packages/common/src/utils/global.ts index ac403b19cce..253c9550b2b 100644 --- a/packages/common/src/utils/global.ts +++ b/packages/common/src/utils/global.ts @@ -10,7 +10,11 @@ export function getGlobal() { return returnedGlobal as Worker & { BrowserFS: any }; } - return global; + if (typeof global !== 'undefined') { + return global; + } + + return {}; } const global = getGlobal(); diff --git a/packages/dynamic-pages/components/Modal.js b/packages/dynamic-pages/components/Modal.js index 42b54cf68b8..eb6453d728b 100644 --- a/packages/dynamic-pages/components/Modal.js +++ b/packages/dynamic-pages/components/Modal.js @@ -1,6 +1,6 @@ import React from 'react'; import styled, { createGlobalStyle } from 'styled-components'; -import { ESC } from 'common/lib/utils/keycodes'; +import { ESC } from '@codesandbox/common/lib/utils/keycodes'; import { Spring, animated } from 'react-spring/renderprops.cjs'; diff --git a/packages/dynamic-pages/components/PageContainer.js b/packages/dynamic-pages/components/PageContainer.js index 5caf2d82c91..53a507e6e43 100644 --- a/packages/dynamic-pages/components/PageContainer.js +++ b/packages/dynamic-pages/components/PageContainer.js @@ -1,7 +1,7 @@ import * as React from 'react'; -import Padding from 'common/lib/components/spacing/Padding'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; +import Padding from '@codesandbox/common/lib/components/spacing/Padding'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; export default ({ children, ...props }) => ( diff --git a/packages/dynamic-pages/next.config.js b/packages/dynamic-pages/next.config.js index 4f07ea622a6..21ec8c7c902 100644 --- a/packages/dynamic-pages/next.config.js +++ b/packages/dynamic-pages/next.config.js @@ -1,6 +1,7 @@ // next.config.js const withCSS = require('@zeit/next-css'); const withTM = require('next-transpile-modules'); +const env = require('@codesandbox/common/lib/config/env'); const dotEnvResult = require('dotenv').config(); @@ -10,9 +11,18 @@ const dotEnvVariables = {}; for (const key of Object.keys(parsedVariables)) { dotEnvVariables[key] = process.env[key]; } +// eslint-disable-next-line +for (const key of Object.keys(env)) { + dotEnvVariables[key] = env[key]; +} module.exports = withCSS( withTM({ + exportPathMap() { + return { + '/profile': { page: '/profile' }, + }; + }, transpileModules: ['common'], webpack(config) { // Further custom configuration here diff --git a/packages/dynamic-pages/now.json b/packages/dynamic-pages/now.json new file mode 100644 index 00000000000..f4843d456f5 --- /dev/null +++ b/packages/dynamic-pages/now.json @@ -0,0 +1,9 @@ +{ + "version": 2, + "builds": [ + { + "src": "./next.config.js", + "use": "@now/next" + } + ] +} diff --git a/packages/dynamic-pages/package.json b/packages/dynamic-pages/package.json index 5218cdb69e8..e5148e24899 100644 --- a/packages/dynamic-pages/package.json +++ b/packages/dynamic-pages/package.json @@ -11,22 +11,30 @@ "format": "prettier --trailing-comma es5 --single-quote --write './**/*.js'" }, "dependencies": { + "@codesandbox/common": "^1.0.3", "@zeit/next-css": "^1.0.1", "airtable": "^0.5.9", + "date-fns": "^1.30.1", "dotenv": "^6.2.0", "express": "^4.16.4", "http-proxy-middleware": "^0.19.1", + "humps": "CompuIves/humps", "isomorphic-unfetch": "^3.0.0", "lodash.throttle": "^4.1.1", "next": "^8.0.3", "next-transpile-modules": "^2.0.0", "react": "16.8.1", "react-dom": "16.8.1", - "react-visibility-sensor": "^5.0.2" + "react-helmet": "^5.2.0", + "react-spring": "^8.0.4", + "react-visibility-sensor": "^5.0.2", + "styled-components": "^4.1.2" }, "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.2.0", "babel-plugin-styled-components": "^1.10.0", + "cross-env": "^5.2.0", + "file-loader": "^3.0.1", "jest": "^24.1.0" }, "jest": { diff --git a/packages/dynamic-pages/pages/_app.js b/packages/dynamic-pages/pages/_app.js index be66545ec66..656b8119f4a 100644 --- a/packages/dynamic-pages/pages/_app.js +++ b/packages/dynamic-pages/pages/_app.js @@ -3,9 +3,9 @@ import App, { Container } from 'next/app'; import Head from 'next/head'; import { ThemeProvider } from 'styled-components'; -import theme from 'common/lib/theme'; -import Navigation from 'common/lib/components/Navigation'; -import Footer from 'common/lib/components/Footer'; +import theme from '@codesandbox/common/lib/theme'; +import Navigation from '@codesandbox/common/lib/components/Navigation'; +import Footer from '@codesandbox/common/lib/components/Footer'; import '../css/typography.css'; import '../css/global.css'; diff --git a/packages/dynamic-pages/pages/profile/index.js b/packages/dynamic-pages/pages/profile/index.js index 7b08501fa78..809da736856 100644 --- a/packages/dynamic-pages/pages/profile/index.js +++ b/packages/dynamic-pages/pages/profile/index.js @@ -1,7 +1,7 @@ import React from 'react'; import Link from 'next/link'; -import FeaturedSandbox from 'common/lib/components/FeaturedSandbox'; -import WideSandbox from 'common/lib/components/WideSandbox'; +import FeaturedSandbox from '@codesandbox/common/lib/components/FeaturedSandbox'; +import WideSandbox from '@codesandbox/common/lib/components/WideSandbox'; import { camelizeKeys } from 'humps'; import openSandbox from '../../utils/openSandbox'; diff --git a/packages/dynamic-pages/pages/user-sandboxes/index.js b/packages/dynamic-pages/pages/user-sandboxes/index.js index 9568f061c2b..eaf1bfa1f2b 100644 --- a/packages/dynamic-pages/pages/user-sandboxes/index.js +++ b/packages/dynamic-pages/pages/user-sandboxes/index.js @@ -1,8 +1,8 @@ import React, { useState, useEffect } from 'react'; -import WideSandbox from 'common/lib/components/WideSandbox'; +import WideSandbox from '@codesandbox/common/lib/components/WideSandbox'; import VisibilitySensor from 'react-visibility-sensor'; import Link from 'next/link'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import fetch from '../../utils/fetch'; import openSandbox from '../../utils/openSandbox'; import PageContainer from '../../components/PageContainer'; diff --git a/packages/dynamic-pages/screens/Profile/Badges/index.js b/packages/dynamic-pages/screens/Profile/Badges/index.js index d3906653925..6ecd684fcdb 100644 --- a/packages/dynamic-pages/screens/Profile/Badges/index.js +++ b/packages/dynamic-pages/screens/Profile/Badges/index.js @@ -1,7 +1,7 @@ import React from 'react'; -import Badge from 'common/lib/utils/badges/Badge'; -import ContributorsBadge from 'common/lib/components/ContributorsBadge'; -import CommunityBadge from 'common/lib/components/CommunityBadges'; +import Badge from '@codesandbox/common/lib/utils/badges/Badge'; +import ContributorsBadge from '@codesandbox/common/lib/components/ContributorsBadge'; +import CommunityBadge from '@codesandbox/common/lib/components/CommunityBadges'; import { H3 } from '../../../components/Typography'; import { BadgeWrapper, BadgeAside } from './elements'; diff --git a/packages/dynamic-pages/screens/Profile/Editing.js b/packages/dynamic-pages/screens/Profile/Editing.js index 5c695950897..444e61c04ab 100644 --- a/packages/dynamic-pages/screens/Profile/Editing.js +++ b/packages/dynamic-pages/screens/Profile/Editing.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { format } from 'date-fns'; -import Input, { TextArea } from 'common/lib/components/Input'; +import Input, { TextArea } from '@codesandbox/common/lib/components/Input'; import calendar from '../../assets/calendar.svg'; import mail from '../../assets/mail.svg'; import twitterLogo from '../../assets/twitter.svg'; diff --git a/packages/dynamic-pages/screens/Profile/Modal.js b/packages/dynamic-pages/screens/Profile/Modal.js index 277924622aa..4fb43fcc3df 100644 --- a/packages/dynamic-pages/screens/Profile/Modal.js +++ b/packages/dynamic-pages/screens/Profile/Modal.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import Modal from '../../components/Modal'; import { Title } from './_sidebar.elements'; diff --git a/packages/dynamic-pages/screens/Profile/NotFound.js b/packages/dynamic-pages/screens/Profile/NotFound.js index a967ada2c44..4734d0b5aad 100644 --- a/packages/dynamic-pages/screens/Profile/NotFound.js +++ b/packages/dynamic-pages/screens/Profile/NotFound.js @@ -1,6 +1,6 @@ import React from 'react'; import styled from 'styled-components'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import PageContainer from '../../components/PageContainer'; const FourOfFourContainer = styled.main` diff --git a/packages/dynamic-pages/screens/Profile/sidebar.js b/packages/dynamic-pages/screens/Profile/sidebar.js index c5594ba6751..8327bc584ac 100644 --- a/packages/dynamic-pages/screens/Profile/sidebar.js +++ b/packages/dynamic-pages/screens/Profile/sidebar.js @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; -import { Button } from 'common/lib/components/Button'; +import { Button } from '@codesandbox/common/lib/components/Button'; import { Forks, Likes, Views } from '../../components/Icons'; import { H3, H4 } from '../../components/Typography'; import Badges from './Badges'; diff --git a/packages/dynamic-pages/utils/openSandbox.js b/packages/dynamic-pages/utils/openSandbox.js index b747edabff2..b3d270f8036 100644 --- a/packages/dynamic-pages/utils/openSandbox.js +++ b/packages/dynamic-pages/utils/openSandbox.js @@ -1,4 +1,4 @@ -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; const openSandbox = id => { const url = sandboxUrl({ id }); diff --git a/packages/homepage/gatsby-node.js b/packages/homepage/gatsby-node.js index 5dc96427737..137d85c49c2 100644 --- a/packages/homepage/gatsby-node.js +++ b/packages/homepage/gatsby-node.js @@ -1,5 +1,5 @@ const { resolve } = require('path'); -const env = require('common/lib/config/env'); +const env = require('@codesandbox/common/lib/config/env'); // Parse date information out of post filename. diff --git a/packages/homepage/package.json b/packages/homepage/package.json index 991cb0d88d0..5869480e541 100644 --- a/packages/homepage/package.json +++ b/packages/homepage/package.json @@ -6,6 +6,7 @@ "author": "Ives van Hoorne ", "dependencies": { "@babel/preset-flow": "^7.0.0", + "@codesandbox/common": "^1.0.3", "algoliasearch": "^3.24.5", "babel-plugin-macros": "^2.4.2", "babel-preset-gatsby": "^0.1.5", @@ -30,6 +31,7 @@ "gatsby-transformer-remark": "^2.1.15", "gatsby-transformer-sharp": "^2.1.9", "gsap": "^1.20.3", + "lodash-es": "^4.17.11", "node-vibrant": "^3.0.0", "react": "^16.8.3", "react-dom": "^16.8.3", diff --git a/packages/homepage/src/components/Footer.js b/packages/homepage/src/components/Footer.js index d7b90226756..7f63ab6f706 100644 --- a/packages/homepage/src/components/Footer.js +++ b/packages/homepage/src/components/Footer.js @@ -3,7 +3,7 @@ import styled from 'styled-components'; import { Link } from 'gatsby'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; import media from '../utils/media'; diff --git a/packages/homepage/src/components/PageContainer.js b/packages/homepage/src/components/PageContainer.js index 42bc6d4be60..e9d5b1b34ae 100644 --- a/packages/homepage/src/components/PageContainer.js +++ b/packages/homepage/src/components/PageContainer.js @@ -1,7 +1,7 @@ import * as React from 'react'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Padding from 'common/lib/components/spacing/Padding'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Padding from '@codesandbox/common/lib/components/spacing/Padding'; export default ({ children, ...props }: { children: React.Node }) => ( diff --git a/packages/homepage/src/components/StickyNavigation.js b/packages/homepage/src/components/StickyNavigation.js index ef62fb18f79..c9edbb78b01 100644 --- a/packages/homepage/src/components/StickyNavigation.js +++ b/packages/homepage/src/components/StickyNavigation.js @@ -1,10 +1,10 @@ import React from 'react'; import styled, { css } from 'styled-components'; -import theme from 'common/lib/theme'; +import theme from '@codesandbox/common/lib/theme'; import { Link } from 'gatsby'; import { Router } from '@reach/router'; -import slugify from 'common/lib/utils/slugify'; +import slugify from '@codesandbox/common/lib/utils/slugify'; import media from '../utils/media'; import getScrollPos from '../utils/scroll'; diff --git a/packages/homepage/src/components/layout.js b/packages/homepage/src/components/layout.js index bee9d97c2e9..44eb53e8222 100644 --- a/packages/homepage/src/components/layout.js +++ b/packages/homepage/src/components/layout.js @@ -1,9 +1,9 @@ import React from 'react'; import { ThemeProvider } from 'styled-components'; -import theme from 'common/lib/theme'; -import Navigation from 'common/lib/components/Navigation'; -import Footer from 'common/lib/components/Footer'; +import theme from '@codesandbox/common/lib/theme'; +import Navigation from '@codesandbox/common/lib/components/Navigation'; +import Footer from '@codesandbox/common/lib/components/Footer'; import '../css/typography.css'; import '../css/global.css'; diff --git a/packages/homepage/src/pages/explore.js b/packages/homepage/src/pages/explore.js index fbaac446f41..dca31a524c4 100644 --- a/packages/homepage/src/pages/explore.js +++ b/packages/homepage/src/pages/explore.js @@ -1,10 +1,13 @@ import React from 'react'; -import getTemplate from 'common/lib/templates'; -import { protocolAndHost } from 'common/lib/utils/url-generator'; -import { ARROW_LEFT, ARROW_RIGHT } from 'common/lib/utils/keycodes'; -import FeaturedSandbox from 'common/lib/components/FeaturedSandbox'; -import WideSandbox from 'common/lib/components/WideSandbox'; +import getTemplate from '@codesandbox/common/lib/templates'; +import { protocolAndHost } from '@codesandbox/common/lib/utils/url-generator'; +import { + ARROW_LEFT, + ARROW_RIGHT, +} from '@codesandbox/common/lib/utils/keycodes'; +import FeaturedSandbox from '@codesandbox/common/lib/components/FeaturedSandbox'; +import WideSandbox from '@codesandbox/common/lib/components/WideSandbox'; import TitleAndMetaTags from '../components/TitleAndMetaTags'; import PageContainer from '../components/PageContainer'; diff --git a/packages/homepage/src/pages/react-hooks.js b/packages/homepage/src/pages/react-hooks.js index 1b2bc941934..df080ea5e8d 100644 --- a/packages/homepage/src/pages/react-hooks.js +++ b/packages/homepage/src/pages/react-hooks.js @@ -1,6 +1,6 @@ import React from 'react'; import { graphql } from 'gatsby'; -import WideSandbox from 'common/lib/components/WideSandbox'; +import WideSandbox from '@codesandbox/common/lib/components/WideSandbox'; import TitleAndMetaTags from '../components/TitleAndMetaTags'; import PageContainer from '../components/PageContainer'; diff --git a/packages/homepage/src/screens/explore/Modal/index.js b/packages/homepage/src/screens/explore/Modal/index.js index d880d2edcf6..6f2125a51f1 100644 --- a/packages/homepage/src/screens/explore/Modal/index.js +++ b/packages/homepage/src/screens/explore/Modal/index.js @@ -1,7 +1,7 @@ import React from 'react'; import styled, { createGlobalStyle } from 'styled-components'; -import Portal from 'common/lib/components/Portal'; -import { ESC } from 'common/lib/utils/keycodes'; +import Portal from '@codesandbox/common/lib/components/Portal'; +import { ESC } from '@codesandbox/common/lib/utils/keycodes'; import { Spring, animated } from 'react-spring/renderprops'; diff --git a/packages/homepage/src/screens/explore/SandboxModal.js b/packages/homepage/src/screens/explore/SandboxModal.js index 4d38f1abde2..325d713a23f 100644 --- a/packages/homepage/src/screens/explore/SandboxModal.js +++ b/packages/homepage/src/screens/explore/SandboxModal.js @@ -1,18 +1,21 @@ import React, { Fragment } from 'react'; import { camelizeKeys } from 'humps'; import { Spring } from 'react-spring/renderprops'; -import getIcon from 'common/lib/templates/icons'; +import getIcon from '@codesandbox/common/lib/templates/icons'; import { profileUrl, githubRepoUrl, protocolAndHost, -} from 'common/lib/utils/url-generator'; -import getTemplate from 'common/lib/templates'; -import GithubBadge from 'common/lib/components/GithubBadge'; +} from '@codesandbox/common/lib/utils/url-generator'; +import getTemplate from '@codesandbox/common/lib/templates'; +import GithubBadge from '@codesandbox/common/lib/components/GithubBadge'; -import Tags from 'common/lib/components/Tags'; -import track from 'common/lib/utils/analytics'; -import { ARROW_LEFT, ARROW_RIGHT } from 'common/lib/utils/keycodes'; +import Tags from '@codesandbox/common/lib/components/Tags'; +import track from '@codesandbox/common/lib/utils/analytics'; +import { + ARROW_LEFT, + ARROW_RIGHT, +} from '@codesandbox/common/lib/utils/keycodes'; import Modal from './Modal'; import EmbedSkeleton from './EmbedSkeleton'; diff --git a/packages/homepage/src/screens/explore/_SandboxModal.elements.js b/packages/homepage/src/screens/explore/_SandboxModal.elements.js index 7d94999e154..4781ef54dee 100644 --- a/packages/homepage/src/screens/explore/_SandboxModal.elements.js +++ b/packages/homepage/src/screens/explore/_SandboxModal.elements.js @@ -1,10 +1,10 @@ import styled, { css } from 'styled-components'; -import { UserWithAvatar } from 'common/lib/components/UserWithAvatar'; +import { UserWithAvatar } from '@codesandbox/common/lib/components/UserWithAvatar'; import RightArrow from 'react-icons/lib/md/keyboard-arrow-right'; import LeftArrow from 'react-icons/lib/md/keyboard-arrow-left'; -import fadeIn from 'common/lib/utils/animation/fade-in'; -import Stats from 'common/lib/components/Stats'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; +import Stats from '@codesandbox/common/lib/components/Stats'; export const Container = styled.div` position: relative; diff --git a/packages/homepage/src/screens/home/Animation/Background.js b/packages/homepage/src/screens/home/Animation/Background.js index 8ac6844d0fa..356a0c12df9 100644 --- a/packages/homepage/src/screens/home/Animation/Background.js +++ b/packages/homepage/src/screens/home/Animation/Background.js @@ -1,6 +1,6 @@ import React from 'react'; import styled from 'styled-components'; -import fadeIn from 'common/lib/utils/animation/fade-in'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; import setupCanvas from './canvas'; diff --git a/packages/homepage/src/screens/home/Animation/Cubes.js b/packages/homepage/src/screens/home/Animation/Cubes.js index 74d5cd6189d..30db5bd48aa 100644 --- a/packages/homepage/src/screens/home/Animation/Cubes.js +++ b/packages/homepage/src/screens/home/Animation/Cubes.js @@ -2,7 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import { TimelineMax, TweenMax, Power2, Power3, Elastic } from 'gsap'; -import fadeIn from 'common/lib/utils/animation/fade-in'; +import fadeIn from '@codesandbox/common/lib/utils/animation/fade-in'; import Cube from '../../../components/Cube'; import media from '../../../utils/media'; diff --git a/packages/homepage/src/screens/home/Animation/Title.js b/packages/homepage/src/screens/home/Animation/Title.js index 49c10a1968d..d78a03fe6ae 100644 --- a/packages/homepage/src/screens/home/Animation/Title.js +++ b/packages/homepage/src/screens/home/Animation/Title.js @@ -2,7 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import { Link } from 'gatsby'; -import { sandboxUrl } from 'common/lib/utils/url-generator'; +import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator'; import media from '../../../utils/media'; import { fadeIn } from '../../../utils/animation'; diff --git a/packages/homepage/src/screens/home/Animation/index.js b/packages/homepage/src/screens/home/Animation/index.js index 2e3d296fa8c..87672f1ad30 100644 --- a/packages/homepage/src/screens/home/Animation/index.js +++ b/packages/homepage/src/screens/home/Animation/index.js @@ -2,9 +2,9 @@ import React from 'react'; import styled from 'styled-components'; import Media from 'react-media'; -import Fullscreen from 'common/lib/components/flex/Fullscreen'; -import Centered from 'common/lib/components/flex/Centered'; -import Relative from 'common/lib/components/Relative'; +import Fullscreen from '@codesandbox/common/lib/components/flex/Fullscreen'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Relative from '@codesandbox/common/lib/components/Relative'; import { angular, @@ -15,7 +15,7 @@ import { parcel, cxjs, dojo, -} from 'common/lib/templates'; +} from '@codesandbox/common/lib/templates'; import Background from './Background'; import HomeTitle from './Title'; diff --git a/packages/homepage/src/screens/home/CycleFeature/index.js b/packages/homepage/src/screens/home/CycleFeature/index.js index d2480d66844..2ee7766b3db 100644 --- a/packages/homepage/src/screens/home/CycleFeature/index.js +++ b/packages/homepage/src/screens/home/CycleFeature/index.js @@ -2,10 +2,10 @@ import React from 'react'; import styled from 'styled-components'; import { TimelineMax, Power2 } from 'gsap'; -import Centered from 'common/lib/components/flex/Centered'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; -import Theme from 'common/lib/theme'; +import Theme from '@codesandbox/common/lib/theme'; import GithubIcon from 'react-icons/lib/go/mark-github'; import BuildIcon from 'react-icons/lib/go/tools'; diff --git a/packages/homepage/src/screens/home/ExtraFeatures/index.js b/packages/homepage/src/screens/home/ExtraFeatures/index.js index fe07fe2fc7b..cf8e26151e2 100644 --- a/packages/homepage/src/screens/home/ExtraFeatures/index.js +++ b/packages/homepage/src/screens/home/ExtraFeatures/index.js @@ -1,8 +1,8 @@ import React from 'react'; import styled from 'styled-components'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Centered from 'common/lib/components/flex/Centered'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import ExternalIcon from 'react-icons/lib/md/launch'; import HotModuleReloading from 'react-icons/lib/md/autorenew'; diff --git a/packages/homepage/src/screens/home/Frameworks/index.js b/packages/homepage/src/screens/home/Frameworks/index.js index 1221bdfead3..9aa4c17bacd 100644 --- a/packages/homepage/src/screens/home/Frameworks/index.js +++ b/packages/homepage/src/screens/home/Frameworks/index.js @@ -1,13 +1,13 @@ import React from 'react'; import styled, { css } from 'styled-components'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Column from 'common/lib/components/flex/Column'; -import Centered from 'common/lib/components/flex/Centered'; -import Padding from 'common/lib/components/spacing/Padding'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Column from '@codesandbox/common/lib/components/flex/Column'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; +import Padding from '@codesandbox/common/lib/components/spacing/Padding'; -import theme from 'common/lib/theme'; -import getIcon from 'common/lib/templates/icons'; +import theme from '@codesandbox/common/lib/theme'; +import getIcon from '@codesandbox/common/lib/templates/icons'; import LoadInView from '../../../components/LoadInView'; import RollingText from '../../../components/RollingText'; diff --git a/packages/homepage/src/screens/home/NPMFeature/EmbedAnimation/index.js b/packages/homepage/src/screens/home/NPMFeature/EmbedAnimation/index.js index 5f4b4989424..b0e738edbee 100644 --- a/packages/homepage/src/screens/home/NPMFeature/EmbedAnimation/index.js +++ b/packages/homepage/src/screens/home/NPMFeature/EmbedAnimation/index.js @@ -2,7 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import { TimelineMax, Power2 } from 'gsap'; -import Relative from 'common/lib/components/Relative'; +import Relative from '@codesandbox/common/lib/components/Relative'; import browserSvg from './browser.svg'; import codesandboxSvg from './codesandbox.svg'; diff --git a/packages/homepage/src/screens/home/NPMFeature/SearchInput/Input.js b/packages/homepage/src/screens/home/NPMFeature/SearchInput/Input.js index c6142917cdb..9d2ba9ad266 100644 --- a/packages/homepage/src/screens/home/NPMFeature/SearchInput/Input.js +++ b/packages/homepage/src/screens/home/NPMFeature/SearchInput/Input.js @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components'; -import Relative from 'common/lib/components/Relative'; +import Relative from '@codesandbox/common/lib/components/Relative'; import SearchIcon from 'react-icons/lib/md/search'; diff --git a/packages/homepage/src/screens/home/NPMFeature/index.js b/packages/homepage/src/screens/home/NPMFeature/index.js index 409ea7d13e0..f1eb937d588 100644 --- a/packages/homepage/src/screens/home/NPMFeature/index.js +++ b/packages/homepage/src/screens/home/NPMFeature/index.js @@ -1,9 +1,9 @@ import React from 'react'; import styled from 'styled-components'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Column from 'common/lib/components/flex/Column'; -import Centered from 'common/lib/components/flex/Centered'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Column from '@codesandbox/common/lib/components/flex/Column'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import SearchIcon from 'react-icons/lib/md/search'; diff --git a/packages/homepage/src/screens/home/Patron/index.js b/packages/homepage/src/screens/home/Patron/index.js index fe2200c878f..96a81070743 100644 --- a/packages/homepage/src/screens/home/Patron/index.js +++ b/packages/homepage/src/screens/home/Patron/index.js @@ -1,10 +1,10 @@ import React from 'react'; import styled from 'styled-components'; -import getBadge from 'common/lib/utils/badges'; +import getBadge from '@codesandbox/common/lib/utils/badges'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; -import Centered from 'common/lib/components/flex/Centered'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; +import Centered from '@codesandbox/common/lib/components/flex/Centered'; import { Heading, SubHeading } from '../../../components/style'; diff --git a/packages/homepage/src/screens/home/RecentPublications/index.js b/packages/homepage/src/screens/home/RecentPublications/index.js index d45d878c164..183e55b51d7 100644 --- a/packages/homepage/src/screens/home/RecentPublications/index.js +++ b/packages/homepage/src/screens/home/RecentPublications/index.js @@ -2,7 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import { StaticQuery, graphql } from 'gatsby'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; import media from '../../../utils/media'; diff --git a/packages/homepage/src/screens/home/Users/index.js b/packages/homepage/src/screens/home/Users/index.js index 0c52f39dfee..befed5dc1ab 100644 --- a/packages/homepage/src/screens/home/Users/index.js +++ b/packages/homepage/src/screens/home/Users/index.js @@ -2,7 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import { StaticQuery, graphql, Link } from 'gatsby'; -import MaxWidth from 'common/lib/components/flex/MaxWidth'; +import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth'; import Companies from '../../../components/Companies'; const Container = styled.div` diff --git a/packages/homepage/src/utils/algolia.js b/packages/homepage/src/utils/algolia.js index 6b1d60ba73d..2ae76ecf3bc 100644 --- a/packages/homepage/src/utils/algolia.js +++ b/packages/homepage/src/utils/algolia.js @@ -3,7 +3,7 @@ import { ALGOLIA_API_KEY, ALGOLIA_APPLICATION_ID, ALGOLIA_DEFAULT_INDEX, -} from 'common/lib/utils/config'; +} from '@codesandbox/common/lib/utils/config'; const client = algoliasearch(ALGOLIA_APPLICATION_ID, ALGOLIA_API_KEY); const index = client.initIndex(ALGOLIA_DEFAULT_INDEX); diff --git a/packages/node-services/src/child_process.ts b/packages/node-services/src/child_process.ts index a7b5f75d5eb..ef4aaa23442 100644 --- a/packages/node-services/src/child_process.ts +++ b/packages/node-services/src/child_process.ts @@ -1,7 +1,7 @@ import { EventEmitter } from 'events'; -import { protocolAndHost } from 'common/lib/utils/url-generator'; -import { commonPostMessage } from 'common/lib/utils/global'; -import _debug from 'common/lib/utils/debug'; +import { protocolAndHost } from '@codesandbox/common/lib/utils/url-generator'; +import { commonPostMessage } from '@codesandbox/common/lib/utils/global'; +import _debug from '@codesandbox/common/lib/utils/debug'; const debug = _debug('cs:node:child_process'); diff --git a/packages/node-services/src/net.ts b/packages/node-services/src/net.ts index 019c34ff8e9..0f512b4ae98 100644 --- a/packages/node-services/src/net.ts +++ b/packages/node-services/src/net.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'events'; -import { commonPostMessage } from 'common/lib/utils/global'; -import { protocolAndHost } from 'common/lib/utils/url-generator'; +import { commonPostMessage } from '@codesandbox/common/lib/utils/global'; +import { protocolAndHost } from '@codesandbox/common/lib/utils/url-generator'; const SOCKET_IDENTIFIER = 'node-socket'; diff --git a/packages/sandbox-hooks/errors/sandbox-error.js b/packages/sandbox-hooks/errors/sandbox-error.js index 3760e294168..8baff1a43e8 100644 --- a/packages/sandbox-hooks/errors/sandbox-error.js +++ b/packages/sandbox-hooks/errors/sandbox-error.js @@ -1,5 +1,5 @@ // @flow -import type { Module } from 'common/lib/types'; +import type { Module } from '@codesandbox/common/lib/types'; type Suggestion = { title: string, diff --git a/packages/sandbox-hooks/errors/transformers/raw-react-component-error.js b/packages/sandbox-hooks/errors/transformers/raw-react-component-error.js index 2b7ceb8d8d1..a2a97694109 100644 --- a/packages/sandbox-hooks/errors/transformers/raw-react-component-error.js +++ b/packages/sandbox-hooks/errors/transformers/raw-react-component-error.js @@ -1,6 +1,6 @@ import { actions, dispatch } from 'codesandbox-api'; -import { basename } from 'common/lib/utils/path'; +import { basename } from '@codesandbox/common/lib/utils/path'; function findRawModule(module) { const rawModule = Array.from(module.dependencies).find( diff --git a/yarn.lock b/yarn.lock index 3636cc02a71..2270cf2b9f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4233,6 +4233,14 @@ babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.2.0: dependencies: cosmiconfig "^4.0.0" +babel-plugin-macros@^2.2.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.5.0.tgz#01f4d3b50ed567a67b80a30b9da066e94f4097b6" + integrity sha512-BWw0lD0kVZAXRD3Od1kMrdmfudqzDzYv2qrN3l2ISR1HVp1EgLKfbOrYV9xmY5k3qx3RIu5uPAUZZZHpo0o5Iw== + dependencies: + cosmiconfig "^5.0.5" + resolve "^1.8.1" + babel-plugin-macros@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.2.tgz#21b1a2e82e2130403c5ff785cba6548e9b644b28" @@ -4314,6 +4322,14 @@ babel-plugin-preval@^1.6.2: babylon "^6.18.0" require-from-string "^2.0.1" +babel-plugin-preval@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/babel-plugin-preval/-/babel-plugin-preval-3.0.1.tgz#a26f9690114a864a54a5cbdf865496ebf541a9c3" + integrity sha512-s8hmTlRSmzcL7cHSIi0s6WxmpOAxfIlWqSVQwBIt7V5bNBaac+8JMZ6kJXLOazMJ8gCIcb5AJgQUgPHvbSYUzw== + dependencies: + babel-plugin-macros "^2.2.2" + require-from-string "^2.0.2" + babel-plugin-react-docgen@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/babel-plugin-react-docgen/-/babel-plugin-react-docgen-1.9.0.tgz#2e79aeed2f93b53a172398f93324fdcf9f02e01f" @@ -6307,6 +6323,11 @@ codesandbox-api@^0.0.19: dependencies: uuid "^3.3.2" +codesandbox-api@^0.0.20: + version "0.0.20" + resolved "https://registry.yarnpkg.com/codesandbox-api/-/codesandbox-api-0.0.20.tgz#174bcd76c9f31521175c6bceabc37da6b1fbc30b" + integrity sha512-jhxZzAmjCKBZad8QWMeueiQVFE87igK6F2DBOEVFFJO6jgTXT8qjuzGYepr+B8bjgo/icN7bc/2xmEMBA63s2w== + codesandbox-import-util-types@^1.2.8: version "1.2.17" resolved "https://registry.yarnpkg.com/codesandbox-import-util-types/-/codesandbox-import-util-types-1.2.17.tgz#376ae6b5872e362dc397d375bd82e903f9c1f247" @@ -7140,7 +7161,7 @@ create-react-context@^0.2.1: fbjs "^0.8.0" gud "^1.0.0" -cross-env@^5.0.1, cross-env@^5.0.5, cross-env@^5.1.3: +cross-env@^5.0.1, cross-env@^5.0.5, cross-env@^5.1.3, cross-env@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2" dependencies: @@ -7647,6 +7668,11 @@ date-fns@^1.27.2: version "1.29.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" +date-fns@^1.30.1: + version "1.30.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" + integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== + date-format@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/date-format/-/date-format-0.0.0.tgz#09206863ab070eb459acea5542cbd856b11966b3" @@ -9606,6 +9632,14 @@ file-loader@^1.1.11: loader-utils "^1.0.2" schema-utils "^0.4.5" +file-loader@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-3.0.1.tgz#f8e0ba0b599918b51adfe45d66d1e771ad560faa" + integrity sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw== + dependencies: + loader-utils "^1.0.2" + schema-utils "^1.0.0" + file-saver@^1.3.3: version "1.3.8" resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-1.3.8.tgz#e68a30c7cb044e2fb362b428469feb291c2e09d8" @@ -15018,7 +15052,7 @@ lockfile@^1.0.4: dependencies: signal-exit "^3.0.2" -lodash-es@^4.17.2, lodash-es@^4.2.1: +lodash-es@^4.17.11, lodash-es@^4.17.2, lodash-es@^4.2.1: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.11.tgz#145ab4a7ac5c5e52a3531fb4f310255a152b4be0" integrity sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q== @@ -20208,7 +20242,7 @@ require-from-string@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" -require-from-string@^2.0.1: +require-from-string@^2.0.1, require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" @@ -20885,6 +20919,7 @@ semver@^5.5.1: semver@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== semver@~5.0.1: version "5.0.3" From 9fda73592596bcdd036a405661ecd929aa2143c5 Mon Sep 17 00:00:00 2001 From: Sara Vieira Date: Mon, 25 Mar 2019 20:39:19 +0000 Subject: [PATCH 10/35] Switch from react-tippy to @tippy.js/react for tooltips (#1584) * chnage to @tippy.js/react * remove uneeded deps * remove old api * remove old api * fix props * small patreon fix * fix ts * fix alignment * fix build * Update path to common --- package.json | 3 +- .../CodeEditor/Configuration/index.tsx | 2 +- .../CodeEditor/FilePath/elements.js | 24 +++++------ .../components/CodeEditor/FilePath/index.js | 5 ++- .../src/app/components/CodeEditor/index.tsx | 8 ++-- .../DeleteSandboxButton/elements.js | 2 +- .../Integration/DetailInfo/index.js | 2 +- .../Preview/DevTools/Problems/index.tsx | 2 +- .../Preview/DevTools/Tabs/index.tsx | 2 +- .../Tests/TestDetails/TestBlock/index.tsx | 2 +- .../DevTools/Tests/TestDetails/index.tsx | 4 +- .../DevTools/Tests/TestElement/index.tsx | 8 ++-- .../DevTools/Tests/TestSummary/index.tsx | 4 +- .../src/app/components/PrivacyStatus/index.js | 4 +- .../app/components/SocialInfo/SpectrumLogo.js | 2 +- .../app/pages/Curator/SandboxCard/elements.js | 7 ---- .../Dashboard/Content/SandboxCard/index.js | 4 +- .../routes/TeamView/RemoveTeamMember/index.js | 4 +- .../Content/Preview/DevTools/Navigator.js | 2 +- .../Sandbox/Editor/Content/Tabs/index.js | 4 +- .../Sandbox/Editor/Header/Action/index.tsx | 7 ++-- .../Editor/Header/UpdateFound/index.js | 4 +- .../pages/Sandbox/Editor/Navigation/index.js | 2 +- .../DirectoryEntry/Entry/EditIcons/index.js | 12 +++--- .../Editor/Workspace/Git/Changes/index.js | 2 +- .../Editor/Workspace/OpenedTabs/SaveIcon.js | 2 +- .../Sandbox/Editor/Workspace/Project/index.js | 4 +- .../items/ConfigurationFiles/index.js | 4 +- .../Editor/Workspace/items/Live/LiveInfo.js | 16 +++---- .../SearchDependencies/DependencyHit/index.js | 6 +-- .../src/app/pages/common/LikeHeart/index.tsx | 2 +- .../AddFileToSandboxButton/elements.js | 2 +- .../DeleteFileButton/elements.js | 2 +- .../src/app/pages/common/Navigation/index.js | 10 ++--- packages/common/package.json | 2 +- .../src/components/CommunityBadges/index.tsx | 2 +- .../components/ContributorsBadge/index.tsx | 2 +- .../src/components/PatronStar/elements.ts | 3 +- .../src/components/PatronStar/index.tsx | 11 +++-- .../src/components/Preference/index.tsx | 2 +- .../components/Preview/Navigator/index.tsx | 7 ++-- packages/common/src/components/Tooltip.tsx | 42 +++++++++---------- packages/common/src/utils/badges/Badge.tsx | 7 +++- yarn.lock | 28 +++++++++---- 44 files changed, 144 insertions(+), 132 deletions(-) diff --git a/package.json b/package.json index a725062ae5a..44eb3bf34c0 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,8 @@ "gulp": "^3.9.1", "lerna": "^2.5.1", "lint-staged": "^5.0.0", - "prettier": "^1.8.2" + "prettier": "^1.8.2", + "typescript": "^3.3.1" }, "dependencies": { "opencollective": "^1.0.3" diff --git a/packages/app/src/app/components/CodeEditor/Configuration/index.tsx b/packages/app/src/app/components/CodeEditor/Configuration/index.tsx index ec7b5484780..7ab6e4f86bd 100644 --- a/packages/app/src/app/components/CodeEditor/Configuration/index.tsx +++ b/packages/app/src/app/components/CodeEditor/Configuration/index.tsx @@ -100,7 +100,7 @@ export default class Configuration extends React.PureComponent /> {config.title} - + diff --git a/packages/app/src/app/components/CodeEditor/FilePath/elements.js b/packages/app/src/app/components/CodeEditor/FilePath/elements.js index dc040024190..864bcf7e095 100644 --- a/packages/app/src/app/components/CodeEditor/FilePath/elements.js +++ b/packages/app/src/app/components/CodeEditor/FilePath/elements.js @@ -1,7 +1,6 @@ import styled from 'styled-components'; import ChevronLeft from 'react-icons/lib/md/chevron-left'; import ExitZen from 'react-icons/lib/md/fullscreen-exit'; -import { withTooltip } from '@codesandbox/common/lib/components/Tooltip'; export const Container = styled.div` background-color: rgba(0, 0, 0, 0.3); @@ -43,19 +42,16 @@ export const FileName = styled.div` flex: 1; `; -export const StyledExitZen = withTooltip( - styled(ExitZen)` - transition: 0.3s ease opacity; +export const StyledExitZen = styled(ExitZen)` + transition: 0.3s ease opacity; - cursor: pointer; - font-size: 1.25rem; + cursor: pointer; + font-size: 1.25rem; - z-index: 10; - opacity: 0.7; + z-index: 10; + opacity: 0.7; - &:hover { - opacity: 1; - } - `, - { title: 'Close Zen Mode', style: { zIndex: 10 } } -); + &:hover { + opacity: 1; + } +`; diff --git a/packages/app/src/app/components/CodeEditor/FilePath/index.js b/packages/app/src/app/components/CodeEditor/FilePath/index.js index 7d5f0ba8720..8d0276c9748 100644 --- a/packages/app/src/app/components/CodeEditor/FilePath/index.js +++ b/packages/app/src/app/components/CodeEditor/FilePath/index.js @@ -1,5 +1,6 @@ import * as React from 'react'; import { getModulePath } from '@codesandbox/common/lib/sandbox/modules'; +import Tooltip from '@codesandbox/common/lib/components/Tooltip'; import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons'; import getType from 'app/utils/get-type'; @@ -60,7 +61,9 @@ export default class FilePath extends React.Component { - + + + ); } diff --git a/packages/app/src/app/components/CodeEditor/index.tsx b/packages/app/src/app/components/CodeEditor/index.tsx index 5dd05dfe25c..f49634fc36c 100644 --- a/packages/app/src/app/components/CodeEditor/index.tsx +++ b/packages/app/src/app/components/CodeEditor/index.tsx @@ -195,7 +195,7 @@ export default class CodeEditor extends React.PureComponent< {config && (getUI(config.type) && !settings.experimentVSCode ? ( - + @@ -210,11 +210,11 @@ export default class CodeEditor extends React.PureComponent< > {config.partialSupportDisclaimer ? ( Partially Supported Config{' '} diff --git a/packages/app/src/app/components/DeleteSandboxButton/elements.js b/packages/app/src/app/components/DeleteSandboxButton/elements.js index b887d20c976..784a13a2b9f 100644 --- a/packages/app/src/app/components/DeleteSandboxButton/elements.js +++ b/packages/app/src/app/components/DeleteSandboxButton/elements.js @@ -4,7 +4,7 @@ import DeleteIcon from 'react-icons/lib/md/delete'; import Tooltip from '@codesandbox/common/lib/components/Tooltip'; export const DeleteSandboxButton = styled(props => ( - + diff --git a/packages/app/src/app/components/Integration/DetailInfo/index.js b/packages/app/src/app/components/Integration/DetailInfo/index.js index 13aa0574ae3..3620c795780 100644 --- a/packages/app/src/app/components/Integration/DetailInfo/index.js +++ b/packages/app/src/app/components/Integration/DetailInfo/index.js @@ -15,7 +15,7 @@ function DetailInfo({ heading, info, signOut, signIn }) { {signOut ? ( - + diff --git a/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx b/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx index 695c5e37e38..cc2d093ae5d 100644 --- a/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Problems/index.tsx @@ -106,7 +106,7 @@ class Problems extends React.PureComponent { {splittedPath.join('/')}/ {fileName} - + this.openFile(file)} /> diff --git a/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx b/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx index 61700fbdf94..4c239708b00 100644 --- a/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx +++ b/packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx @@ -85,7 +85,7 @@ const DevToolTabs = ({ {actions.map(({ title, onClick, Icon }) => (