Skip to content

Commit 7a06986

Browse files
committed
Merge branch 'master' of github.com:codesandbox/codesandbox-client into cleanup/components/base
2 parents f3bcffe + 2d3b25c commit 7a06986

File tree

580 files changed

+27448
-12178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

580 files changed

+27448
-12178
lines changed

.all-contributorsrc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,43 @@
15491549
"contributions": [
15501550
"doc"
15511551
]
1552+
},
1553+
{
1554+
"login": "akash-joshi",
1555+
"name": "Akash Joshi",
1556+
"avatar_url": "https://avatars0.githubusercontent.com/u/22196279?v=4",
1557+
"profile": "http://akashj.com",
1558+
"contributions": [
1559+
"code"
1560+
]
1561+
},
1562+
{
1563+
"login": "layershifter",
1564+
"name": "Oleksandr Fediashov",
1565+
"avatar_url": "https://avatars0.githubusercontent.com/u/14183168?v=4",
1566+
"profile": "https://twitter.com/layershifter",
1567+
"contributions": [
1568+
"bug",
1569+
"code"
1570+
]
1571+
},
1572+
{
1573+
"login": "tehnuge",
1574+
"name": "John D.",
1575+
"avatar_url": "https://avatars1.githubusercontent.com/u/1928236?v=4",
1576+
"profile": "https://github.com/tehnuge",
1577+
"contributions": [
1578+
"code"
1579+
]
1580+
},
1581+
{
1582+
"login": "NinoMaj",
1583+
"name": "Nino",
1584+
"avatar_url": "https://avatars0.githubusercontent.com/u/20380632?v=4",
1585+
"profile": "https://github.com/NinoMaj",
1586+
"contributions": [
1587+
"doc"
1588+
]
15521589
}
15531590
],
15541591
"contributorsPerLine": 7,

.circleci/config.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ aliases:
2727

2828
- &restore_deps_cache
2929
keys:
30-
- v36-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
31-
- v36-dependency-cache-{{ .Branch }}
32-
- v36-dependency-cache
30+
- v37-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
31+
- v37-dependency-cache-{{ .Branch }}
32+
- v37-dependency-cache
3333

3434
- &save_deps_cache
35-
key: v36-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
35+
key: v37-dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
3636
paths:
3737
- node_modules
3838
- packages/app/node_modules
@@ -53,51 +53,51 @@ aliases:
5353

5454
- &restore_standalone_deps_cache
5555
keys:
56-
- v36-standalone-dependency-cache-{{ .Branch }}-{{ checksum
56+
- v37-standalone-dependency-cache-{{ .Branch }}-{{ checksum
5757
"standalone-packages/codesandbox-browserfs/yarn.lock" }}
58-
- v36-standalone-dependency-cache-{{ .Branch }}
59-
- v36-standalone-dependency-cache
58+
- v37-standalone-dependency-cache-{{ .Branch }}
59+
- v37-standalone-dependency-cache
6060

6161
- &save_standalone_deps_cache
6262
key:
63-
v36-standalone-dependency-cache-{{ .Branch }}-{{ checksum
63+
v37-standalone-dependency-cache-{{ .Branch }}-{{ checksum
6464
"standalone-packages/codesandbox-browserfs/yarn.lock" }}
6565
paths:
6666
- standalone-packages/codesandbox-browserfs/node_modules
6767

6868
- &restore_prod_homepage_cache
69-
key: v36-prod-homepage-build-cache-master
69+
key: v37-prod-homepage-build-cache-master
7070

7171
- &restore_prod_result
7272
key:
73-
v36-prod-build-result-{{ .Environment.CIRCLE_BRANCH
73+
v37-prod-build-result-{{ .Environment.CIRCLE_BRANCH
7474
}}-{{.Environment.CIRCLE_SHA1 }}
7575

7676
- &save_prod_build_cache
7777
key:
78-
v36-prod-build-cache-{{ .Environment.CIRCLE_BRANCH
78+
v37-prod-build-cache-{{ .Environment.CIRCLE_BRANCH
7979
}}-{{.Environment.CIRCLE_SHA1 }}
8080
paths:
8181
- packages/app/node_modules/.cache
8282

8383
- &restore_prod_build_cache
8484
keys:
85-
- v36-prod-build-cache-{{ .Environment.CIRCLE_BRANCH
85+
- v37-prod-build-cache-{{ .Environment.CIRCLE_BRANCH
8686
}}-{{.Environment.CIRCLE_SHA1 }}
87-
- v36-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-
88-
- v36-prod-build-cache-master-
87+
- v37-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-
88+
- v37-prod-build-cache-master-
8989

9090
# To persist the images built by sharp
9191
- &save_prod_homepage_cache
9292
key:
93-
v36-prod-homepage-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{
93+
v37-prod-homepage-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{
9494
.Environment.CIRCLE_SHA1 }}
9595
paths:
9696
- ./packages/homepage/public
9797

9898
- &save_prod_result
9999
key:
100-
v36-prod-build-result-{{ .Environment.CIRCLE_BRANCH }}-{{
100+
v37-prod-build-result-{{ .Environment.CIRCLE_BRANCH }}-{{
101101
.Environment.CIRCLE_SHA1 }}
102102
paths:
103103
- ./www
@@ -143,14 +143,14 @@ commands:
143143
steps:
144144
- restore_cache:
145145
keys:
146-
- v36-source-cache-{{ .Branch }}-{{ .Revision }}
147-
- v36-source-cache-{{ .Branch }}-
148-
- v36-source-cache-
146+
- v37-source-cache-{{ .Branch }}-{{ .Revision }}
147+
- v37-source-cache-{{ .Branch }}-
148+
- v37-source-cache-
149149

150150
- checkout
151151

152152
- save_cache:
153-
key: v36-source-cache-{{ .Branch }}-{{ .Revision }}
153+
key: v37-source-cache-{{ .Branch }}-{{ .Revision }}
154154
paths:
155155
- '.git'
156156
build_deps:

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ Thanks goes to these wonderful people
252252
<td align="center"><a href="http://anuraghazra.github.io"><img src="https://avatars3.githubusercontent.com/u/35374649?v=4" width="100px;" alt=""/><br /><sub><b>Anurag Hazra</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=anuraghazra" title="Code">💻</a></td>
253253
<td align="center"><a href="https://github.com/johansenja"><img src="https://avatars1.githubusercontent.com/u/43235608?v=4" width="100px;" alt=""/><br /><sub><b>johansenja</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=johansenja" title="Documentation">📖</a></td>
254254
<td align="center"><a href="https://shodipoayomide.com"><img src="https://avatars2.githubusercontent.com/u/20538832?v=4" width="100px;" alt=""/><br /><sub><b>Shodipo Ayomide</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=Developerayo" title="Documentation">📖</a></td>
255+
<td align="center"><a href="http://akashj.com"><img src="https://avatars0.githubusercontent.com/u/22196279?v=4" width="100px;" alt=""/><br /><sub><b>Akash Joshi</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=akash-joshi" title="Code">💻</a></td>
256+
<td align="center"><a href="https://twitter.com/layershifter"><img src="https://avatars0.githubusercontent.com/u/14183168?v=4" width="100px;" alt=""/><br /><sub><b>Oleksandr Fediashov</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/issues?q=author%3Alayershifter" title="Bug reports">🐛</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=layershifter" title="Code">💻</a></td>
257+
<td align="center"><a href="https://github.com/tehnuge"><img src="https://avatars1.githubusercontent.com/u/1928236?v=4" width="100px;" alt=""/><br /><sub><b>John D.</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=tehnuge" title="Code">💻</a></td>
258+
</tr>
259+
<tr>
260+
<td align="center"><a href="https://github.com/NinoMaj"><img src="https://avatars0.githubusercontent.com/u/20380632?v=4" width="100px;" alt=""/><br /><sub><b>Nino</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=NinoMaj" title="Documentation">📖</a></td>
255261
</tr>
256262
</table>
257263

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
"start:dynamic": "lerna run dev --scope dynamic-pages --stream",
5555
"start:fast": "cross-env NODE_ENV=development concurrently --raw \"cd packages/app && yarn start\" \"cd packages/common && yarn start\" \"cd packages/components && yarn start\"",
5656
"start:hot": "cross-env NODE_ENV=development APP_ONLY=true concurrently --raw \"cd packages/app && yarn start\" \"cd packages/common && yarn start\" \"cd packages/components && yarn start\"",
57-
"start:fast:stream": "cross-env STAGING_API=1 NODE_ENV=development concurrently --raw \"cd packages/app && yarn start\" \"cd packages/common && yarn start\" \"cd packages/components && yarn start\"",
57+
"start:fast:stream": "cross-env ENDPOINT=https://codesandbox.stream NODE_ENV=development concurrently --raw \"cd packages/app && yarn start\" \"cd packages/common && yarn start\" \"cd packages/components && yarn start\"",
58+
"start:fast:local": "cross-env ENDPOINT=http://localhost:4000 NODE_ENV=development concurrently --raw \"cd packages/app && yarn start\" \"cd packages/common && yarn start\" \"cd packages/components && yarn start\"",
5859
"start:home": "yarn build:deps && yarn start:home:fast",
5960
"start:home:fast": "cd packages/homepage && yarn start",
6061
"start:overmind": "yarn build:deps && concurrently \"lerna run start --scope app --stream\" \"overmind-devtools\"",
@@ -76,7 +77,7 @@
7677
},
7778
"devDependencies": {
7879
"all-contributors-cli": "^6.9.2",
79-
"babel-eslint": "^10.0.2",
80+
"babel-eslint": "10.0.2",
8081
"concurrently": "^4.1.0",
8182
"cross-env": "^6.0.0",
8283
"eslint": "5.16.0",
@@ -94,7 +95,7 @@
9495
"lint-staged": "^9.2.5",
9596
"prettier": "1.19.1",
9697
"pretty-quick": "^2.0.1",
97-
"typescript": "3.7.4",
98+
"typescript": "3.9.2",
9899
"username": "^5.1.0"
99100
},
100101
"husky": {

packages/@styled-system/css/dist/index.esm.js renamed to packages/@styled-system/css/dist/index.js

Lines changed: 75 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
11
/* eslint-disable */
2+
'use strict';
3+
4+
exports.__esModule = true;
5+
exports['default'] = exports.css = exports.responsive = exports.get = void 0;
6+
7+
function _extends() {
8+
_extends =
9+
Object.assign ||
10+
function(target) {
11+
for (var i = 1; i < arguments.length; i++) {
12+
var source = arguments[i];
13+
for (var key in source) {
14+
if (Object.prototype.hasOwnProperty.call(source, key)) {
15+
target[key] = source[key];
16+
}
17+
}
18+
}
19+
return target;
20+
};
21+
return _extends.apply(this, arguments);
22+
}
223

324
// based on https://github.com/developit/dlv
4-
export var get = function get(obj, key, def, p, undef) {
25+
var get = function get(obj, key, def, p, undef) {
526
key = key && key.split ? key.split('.') : [key];
627

728
for (p = 0; p < key.length; p++) {
@@ -10,10 +31,16 @@ export var get = function get(obj, key, def, p, undef) {
1031

1132
return obj === undef ? def : obj;
1233
};
13-
const defaultBreakpoints = [40, 52, 64].map(function(n) {
34+
35+
exports.get = get;
36+
var defaultBreakpoints = [40, 52, 64].map(function(n) {
1437
return n + 'em';
1538
});
16-
const aliases = {
39+
var defaultTheme = {
40+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
41+
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72],
42+
};
43+
var aliases = {
1744
bg: 'backgroundColor',
1845
m: 'margin',
1946
mt: 'marginTop',
@@ -30,14 +57,14 @@ const aliases = {
3057
px: 'paddingX',
3158
py: 'paddingY',
3259
};
33-
const multiples = {
60+
var multiples = {
3461
marginX: ['marginLeft', 'marginRight'],
3562
marginY: ['marginTop', 'marginBottom'],
3663
paddingX: ['paddingLeft', 'paddingRight'],
3764
paddingY: ['paddingTop', 'paddingBottom'],
3865
size: ['width', 'height'],
3966
};
40-
const scales = {
67+
var scales = {
4168
color: 'colors',
4269
backgroundColor: 'colors',
4370
borderColor: 'colors',
@@ -111,18 +138,18 @@ const scales = {
111138
stroke: 'colors',
112139
};
113140

114-
const positiveOrNegative = function positiveOrNegative(scale, value) {
141+
var positiveOrNegative = function positiveOrNegative(scale, value) {
115142
if (typeof value !== 'number' || value >= 0) {
116143
return get(scale, value, value);
117144
}
118145

119-
const absolute = Math.abs(value);
120-
const n = get(scale, absolute, absolute);
146+
var absolute = Math.abs(value);
147+
var n = get(scale, absolute, absolute);
121148
if (typeof n === 'string') return '-' + n;
122149
return n * -1;
123150
};
124151

125-
const transforms = [
152+
var transforms = [
126153
'margin',
127154
'marginTop',
128155
'marginRight',
@@ -135,25 +162,27 @@ const transforms = [
135162
'left',
136163
'right',
137164
].reduce(function(acc, curr) {
138-
let _extends2;
165+
var _extends2;
139166

140-
return {
141-
...acc,
142-
...((_extends2 = {}), (_extends2[curr] = positiveOrNegative), _extends2),
143-
};
167+
return _extends(
168+
{},
169+
acc,
170+
((_extends2 = {}), (_extends2[curr] = positiveOrNegative), _extends2)
171+
);
144172
}, {});
145-
export var responsive = function responsive(styles) {
173+
174+
var responsive = function responsive(styles) {
146175
return function(theme) {
147-
const next = {};
148-
const breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
149-
const mediaQueries = [null].concat(
176+
var next = {};
177+
var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
178+
var mediaQueries = [null].concat(
150179
breakpoints.map(function(n) {
151180
return '@media screen and (min-width: ' + n + ')';
152181
})
153182
);
154183

155-
for (const key in styles) {
156-
const value =
184+
for (var key in styles) {
185+
var value =
157186
typeof styles[key] === 'function' ? styles[key](theme) : styles[key];
158187
if (value == null) continue;
159188

@@ -162,8 +191,8 @@ export var responsive = function responsive(styles) {
162191
continue;
163192
}
164193

165-
for (let i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
166-
const media = mediaQueries[i];
194+
for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
195+
var media = mediaQueries[i];
167196

168197
if (!media) {
169198
next[key] = value[i];
@@ -179,25 +208,28 @@ export var responsive = function responsive(styles) {
179208
return next;
180209
};
181210
};
182-
export var css = function css(args) {
211+
212+
exports.responsive = responsive;
213+
214+
var css = function css(args) {
183215
return function(props) {
184216
if (props === void 0) {
185217
props = {};
186218
}
187219

188-
const theme = props.theme || props;
220+
var theme = props.theme || props;
189221

190-
let result = {};
191-
const obj = typeof args === 'function' ? args(theme) : args;
192-
const styles = responsive(obj)(theme);
222+
var result = {};
223+
var obj = typeof args === 'function' ? args(theme) : args;
224+
var styles = responsive(obj)(theme);
193225

194-
for (const key in styles) {
195-
const x = styles[key];
196-
const val = typeof x === 'function' ? x(theme) : x;
226+
for (var key in styles) {
227+
var x = styles[key];
228+
var val = typeof x === 'function' ? x(theme) : x;
197229

198230
if (key === 'variant') {
199-
const variant = css(get(theme, val))(theme);
200-
result = { ...result, ...variant };
231+
var variant = css(get(theme, val))(theme);
232+
result = _extends({}, result, {}, variant);
201233
continue;
202234
}
203235

@@ -206,16 +238,16 @@ export var css = function css(args) {
206238
continue;
207239
}
208240

209-
const prop = get(aliases, key, key);
210-
const scaleName = get(scales, prop);
211-
const scale = get(theme, scaleName, get(theme, prop, {}));
212-
const transform = get(transforms, prop, get);
213-
const value = transform(scale, val, val);
241+
var prop = get(aliases, key, key);
242+
var scaleName = get(scales, prop);
243+
var scale = get(theme, scaleName, get(theme, prop, {}));
244+
var transform = get(transforms, prop, get);
245+
var value = transform(scale, val, val);
214246

215247
if (multiples[prop]) {
216-
const dirs = multiples[prop];
248+
var dirs = multiples[prop];
217249

218-
for (let i = 0; i < dirs.length; i++) {
250+
for (var i = 0; i < dirs.length; i++) {
219251
result[dirs[i]] = value;
220252
}
221253
} else {
@@ -226,4 +258,7 @@ export var css = function css(args) {
226258
return result;
227259
};
228260
};
229-
export default css;
261+
262+
exports.css = css;
263+
var _default = css;
264+
exports['default'] = _default;

0 commit comments

Comments
 (0)