Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into draft/goofy-leftpad
Browse files Browse the repository at this point in the history
danilowoz authored Aug 11, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents ebfa6f3 + 3c63ef8 commit ea06516
Showing 37 changed files with 249 additions and 117 deletions.
18 changes: 13 additions & 5 deletions .codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -11,15 +11,15 @@
],
"tasks": {
"docs": {
"name": "Docs",
"name": "Website: docs",
"command": "yarn dev:docs"
},
"landing": {
"name": "Landing page",
"name": "Website: landing page",
"command": "yarn dev:landing"
},
"theme": {
"name": "Theme",
"name": "Website: theme",
"command": "yarn dev:theme"
},
"storybook": {
@@ -36,8 +36,16 @@
"command": "yarn build"
},
"build:client": {
"name": "Build client",
"command": "yarn workspace @codesandbox/sandpack-client build"
"name": "Build: client",
"command": "yarn workspace @codesandbox/sandpack-client build",
},
"build:themes": {
"name": "Build: themes",
"command": "yarn workspace @codesandbox/sandpack-themes build",
},
"build:react": {
"name": "Build: react",
"command": "yarn workspace @codesandbox/sandpack-react build",
},
"format": {
"name": "Format Workspace",
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,48 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.5](https://github.com/codesandbox/sandpack/compare/v1.3.4...v1.3.5) (2022-08-10)

**Note:** Version bump only for package sandpack





## [1.3.4](https://github.com/codesandbox/sandpack/compare/v1.3.3...v1.3.4) (2022-08-05)


### Bug Fixes

* **themes:** tweak error surface contrast ([#548](https://github.com/codesandbox/sandpack/issues/548)) ([d9120c9](https://github.com/codesandbox/sandpack/commit/d9120c9f42bc5ab75619332cb44197e5e8d43b13))
* **website:** ui tweaks ([b07c378](https://github.com/codesandbox/sandpack/commit/b07c378d04f5441ecea8b9718ddb0d494c0aa60e))





## [1.3.3](https://github.com/codesandbox/sandpack/compare/v1.3.2...v1.3.3) (2022-08-04)


### Bug Fixes

* **syntax highlight:** default json to javascript ([f6b29e5](https://github.com/codesandbox/sandpack/commit/f6b29e5c8cb9c1caabba97f62974b357be04330f))





## [1.3.2](https://github.com/codesandbox/sandpack/compare/v1.3.1...v1.3.2) (2022-07-29)


### Bug Fixes

* **client:** update bundler ([bb6d9c1](https://github.com/codesandbox/sandpack/commit/bb6d9c175568b26f51a11b84e44ceba7fcf3d74c))





## [1.3.1](https://github.com/codesandbox/sandpack/compare/v1.3.0...v1.3.1) (2022-07-25)

**Note:** Version bump only for package sandpack
2 changes: 1 addition & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -19,4 +19,4 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
};
48 changes: 24 additions & 24 deletions cypress/snapshots.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'
import "./commands";

// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -21,5 +21,5 @@
"message": "chore: [skip ci] bump packages"
}
},
"version": "1.3.1"
"version": "1.3.5"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
"scripts": {
"lint": "eslint '**/*.ts?(x)' --fix",
"format:check": "prettier --check '**/*.{ts,tsx}'",
"format": "prettier --write '**/*.{ts,tsx}'",
"format": "prettier --write '**/*.{ts,tsx,js,jsx}'",
"test": "TEST_ENV=true jest sandpack-react sandpack-client",
"cy:open": "cypress open",
"cy:run": "cypress run",
2 changes: 1 addition & 1 deletion sandpack-client/.bundler
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Manually generated file to trigger new releases based on the bundler changes.
// The following value is the commit hash from codesandbox-client
1db0af43f6309cacd0a53440d24dcc5b336e9f5a1
5712eae0c97f625d9390fa71266280a88e4f9fad
11 changes: 11 additions & 0 deletions sandpack-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.2](https://github.com/codesandbox/sandpack/compare/v1.3.1...v1.3.2) (2022-07-29)


### Bug Fixes

* **client:** update bundler ([bb6d9c1](https://github.com/codesandbox/sandpack/commit/bb6d9c175568b26f51a11b84e44ceba7fcf3d74c))





## [1.2.2](https://github.com/codesandbox/sandpack/compare/v1.2.1...v1.2.2) (2022-06-29)


2 changes: 1 addition & 1 deletion sandpack-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codesandbox/sandpack-client",
"version": "1.2.2",
"version": "1.3.2",
"description": "",
"keywords": [],
"repository": {
2 changes: 1 addition & 1 deletion sandpack-react/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from "@storybook/addons";

addons.setConfig({
showPanel: false,
showPanel: false,
});
38 changes: 38 additions & 0 deletions sandpack-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.5](https://github.com/codesandbox/sandpack/compare/v1.3.4...v1.3.5) (2022-08-10)

**Note:** Version bump only for package @codesandbox/sandpack-react





## [1.3.4](https://github.com/codesandbox/sandpack/compare/v1.3.3...v1.3.4) (2022-08-05)


### Bug Fixes

* **themes:** tweak error surface contrast ([#548](https://github.com/codesandbox/sandpack/issues/548)) ([d9120c9](https://github.com/codesandbox/sandpack/commit/d9120c9f42bc5ab75619332cb44197e5e8d43b13))





## [1.3.3](https://github.com/codesandbox/sandpack/compare/v1.3.2...v1.3.3) (2022-08-04)


### Bug Fixes

* **syntax highlight:** default json to javascript ([f6b29e5](https://github.com/codesandbox/sandpack/commit/f6b29e5c8cb9c1caabba97f62974b357be04330f))





## [1.3.2](https://github.com/codesandbox/sandpack/compare/v1.3.1...v1.3.2) (2022-07-29)

**Note:** Version bump only for package @codesandbox/sandpack-react





## [1.3.1](https://github.com/codesandbox/sandpack/compare/v1.3.0...v1.3.1) (2022-07-25)

**Note:** Version bump only for package @codesandbox/sandpack-react
6 changes: 3 additions & 3 deletions sandpack-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codesandbox/sandpack-react",
"version": "1.3.1",
"version": "1.3.5",
"description": "",
"keywords": [],
"repository": {
@@ -48,7 +48,7 @@
"@codemirror/matchbrackets": "^0.19.3",
"@codemirror/state": "^0.19.6",
"@codemirror/view": "^0.19.32",
"@codesandbox/sandpack-client": "^1.2.2",
"@codesandbox/sandpack-client": "^1.3.2",
"@react-hook/intersection-observer": "^3.1.1",
"@stitches/core": "^1.2.6",
"codesandbox-import-util-types": "^2.2.3",
@@ -59,7 +59,7 @@
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@codesandbox/sandpack-themes": "^1.0.0",
"@codesandbox/sandpack-themes": "^1.3.4",
"@storybook/addon-actions": "^6.1.9",
"@storybook/addon-essentials": "^6.1.9",
"@storybook/addon-knobs": "^6.1.9",
1 change: 1 addition & 0 deletions sandpack-react/src/components/CodeEditor/utils.ts
Original file line number Diff line number Diff line change
@@ -174,6 +174,7 @@ export const getLanguageFromFile = (
switch (extension) {
case "js":
case "jsx":
case "json":
return "javascript";
case "ts":
case "tsx":
8 changes: 4 additions & 4 deletions sandpack-react/src/styles/__snapshots__/styles.test.ts.snap
Original file line number Diff line number Diff line change
@@ -155,14 +155,14 @@ Object {
"base": "#808080",
"clickable": "#999999",
"disabled": "#4D4D4D",
"error": "#EA3323",
"errorSurface": "#FCF1F0",
"error": "#FFB4A6",
"errorSurface": "#690000",
"hover": "#C5C5C5",
"surface1": "#151515",
"surface2": "#252525",
"surface3": "#2F2F2F",
"warning": "#6A4516",
"warningSurface": "#FEF2C0",
"warning": "#E7C400",
"warningSurface": "#3A3000",
},
"font": Object {
"body": "-apple-system, BlinkMacSystemFont, \\"Segoe UI\\", Roboto, Helvetica, Arial, sans-serif, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\", \\"Segoe UI Symbol\\"",
8 changes: 7 additions & 1 deletion sandpack-react/src/themes/ExternalThemes.stories.tsx
Original file line number Diff line number Diff line change
@@ -7,5 +7,11 @@ import { Sandpack } from "../";
const stories = storiesOf("presets/Themes (external)", module);

Object.entries(allThemes).forEach(([themeName, value]) =>
stories.add(themeName, () => <Sandpack theme={value} />)
stories.add(themeName, () => (
<Sandpack
options={{ showInlineErrors: true }}
template="react"
theme={value}
/>
))
);
8 changes: 4 additions & 4 deletions sandpack-react/src/themes/index.ts
Original file line number Diff line number Diff line change
@@ -54,10 +54,10 @@ export const defaultDark: SandpackTheme = {
hover: "#C5C5C5",
accent: "#E5E5E5",

error: "#EA3323",
errorSurface: "#FCF1F0",
warning: "#6A4516",
warningSurface: "#FEF2C0",
error: "#FFB4A6",
errorSurface: "#690000",
warning: "#E7C400",
warningSurface: "#3A3000",
},
syntax: {
plain: "#FFFFFF",
11 changes: 11 additions & 0 deletions sandpack-themes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.4](https://github.com/codesandbox/sandpack/compare/v1.3.3...v1.3.4) (2022-08-05)


### Bug Fixes

* **themes:** tweak error surface contrast ([#548](https://github.com/codesandbox/sandpack/issues/548)) ([d9120c9](https://github.com/codesandbox/sandpack/commit/d9120c9f42bc5ab75619332cb44197e5e8d43b13))





# [1.0.0](https://github.com/codesandbox/sandpack/compare/v0.19.10...v1.0.0) (2022-05-25)


2 changes: 1 addition & 1 deletion sandpack-themes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codesandbox/sandpack-themes",
"version": "1.0.0",
"version": "1.3.4",
"description": "",
"keywords": [],
"repository": {
4 changes: 2 additions & 2 deletions sandpack-themes/src/aquaBlue.ts
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ export const aquaBlue: SandpackTheme = {

accent: "#2e7692",

error: "#ffcdca",
errorSurface: "#811e18",
error: "#811e18",
errorSurface: "#ffcdca",
},

syntax: {
3 changes: 0 additions & 3 deletions sandpack-themes/src/githubLight.ts
Original file line number Diff line number Diff line change
@@ -5,14 +5,11 @@ export const githubLight: SandpackTheme = {
surface1: "#ffffff",
surface2: "#F3F3F3",
surface3: "#f5f5f5",

clickable: "#959da5",
base: "#24292e",
disabled: "#d1d4d8",
hover: "#24292e",

accent: "#24292e",

error: "#811e18",
errorSurface: "#ffcdca",
},
7 changes: 2 additions & 5 deletions sandpack-themes/src/monokaiPro.ts
Original file line number Diff line number Diff line change
@@ -5,16 +5,13 @@ export const monokaiPro: SandpackTheme = {
surface1: "#2D2A2E",
surface2: "#444344",
surface3: "#484747",

clickable: "#939293",
base: "#C1C0C1",
disabled: "#444344",
hover: "#FCFCFA",

accent: "#FFD866",

error: "#811e18",
errorSurface: "#ffcdca",
error: "#ffcdca",
errorSurface: "#c24038",
},
syntax: {
plain: "rgb(252, 252, 250)",
4 changes: 2 additions & 2 deletions sandpack-themes/src/nightOwl.ts
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@ export const nightOwl: SandpackTheme = {
disabled: "#4D4D4D",
hover: "#c5e4fd",
accent: "#c5e4fd",
error: "#811e18",
errorSurface: "#ffcdca",
error: "#ffcdca",
errorSurface: "#811e18",
},
syntax: {
plain: "#d6deeb",
4 changes: 2 additions & 2 deletions sandpack-themes/src/sandpackDark.ts
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@ export const sandpackDark: SandpackTheme = {
disabled: "#4D4D4D",
hover: "#C5C5C5",
accent: "#90e86f",
error: "#b08df8",
errorSurface: "#dac1fb",
error: "#E1CFF8",
errorSurface: "#b08df8",
},
syntax: {
plain: "#f0fdaf",
2 changes: 1 addition & 1 deletion scripts/sizebot/sizebot.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sandpack-react":{"gzip":177839,"assets":[{"name":"0","size":535016},{"name":"main","size":530634},{"name":"@codesandbox/sandpack-react","size":64051},{"name":"@code-hike/classer","size":1354},{"name":"@codesandbox/sandpack-client","size":8415},{"name":"@stitches/core","size":16685},{"name":"@codemirror/state","size":35779},{"name":"@codemirror/view","size":171187},{"name":"@codemirror/closebrackets","size":6625},{"name":"@codemirror/matchbrackets","size":4066},{"name":"@codemirror/commands","size":24738},{"name":"@codemirror/comment","size":4726},{"name":"@codemirror/gutter","size":10559},{"name":"@codemirror/highlight","size":12576},{"name":"@codemirror/history","size":8939},{"name":"@react-hook/intersection-observer","size":2536},{"name":"@codemirror/lang-css","size":10854},{"name":"@codemirror/lang-javascript","size":6493},{"name":"@codemirror/lang-html","size":15443},{"name":"@codemirror/lang-markdown","size":9602},{"name":"@codemirror/text","size":13773},{"name":"style-mod","size":2618},{"name":"@codemirror/rangeset","size":16198},{"name":"w3c-keyname","size":1963},{"name":"@lezer/common","size":34307},{"name":"@codemirror/language","size":19778},{"name":"@react-hook/passive-layout-effect","size":191},{"name":"@lezer/css","size":9509},{"name":"@lezer/html","size":12213},{"name":"@lezer/javascript","size":54863},{"name":"@codemirror/autocomplete","size":34953},{"name":"@lezer/markdown","size":43319},{"name":"@lezer/lr","size":31274},{"name":"@codemirror/tooltip","size":14316},{"name":"lodash.isequal","size":18521},{"name":"lz-string","size":9259},{"name":"react-devtools-inline","size":842468},{"name":"codesandbox-import-utils","size":2590},{"name":"package-build-stats","size":487},{"name":"intersection-observer","size":12825},{"name":"react-is","size":2244}]},"sandpack-client":{"gzip":7223,"assets":[{"name":"main","size":20629},{"name":"@codesandbox/sandpack-client","size":8415},{"name":"codesandbox-import-utils","size":2590},{"name":"lodash.isequal","size":18521},{"name":"package-build-stats","size":487}]}}
{"sandpack-react":{"gzip":177871,"assets":[{"name":"0","size":535016},{"name":"main","size":530554},{"name":"@codesandbox/sandpack-react","size":64062},{"name":"@code-hike/classer","size":1354},{"name":"@codesandbox/sandpack-client","size":8415},{"name":"@stitches/core","size":16685},{"name":"@codemirror/state","size":35779},{"name":"@codemirror/view","size":171187},{"name":"@codemirror/closebrackets","size":6625},{"name":"@codemirror/matchbrackets","size":4066},{"name":"@codemirror/commands","size":24738},{"name":"@codemirror/comment","size":4726},{"name":"@codemirror/gutter","size":10559},{"name":"@codemirror/highlight","size":12576},{"name":"@codemirror/history","size":8939},{"name":"@react-hook/intersection-observer","size":2536},{"name":"@codemirror/lang-css","size":10854},{"name":"@codemirror/lang-javascript","size":6493},{"name":"@codemirror/lang-html","size":15443},{"name":"@codemirror/lang-markdown","size":9602},{"name":"@codemirror/text","size":13773},{"name":"style-mod","size":2618},{"name":"@codemirror/rangeset","size":16198},{"name":"w3c-keyname","size":1861},{"name":"@lezer/common","size":34307},{"name":"@codemirror/language","size":19778},{"name":"@react-hook/passive-layout-effect","size":191},{"name":"@lezer/css","size":9509},{"name":"@lezer/html","size":12213},{"name":"@lezer/javascript","size":54863},{"name":"@codemirror/autocomplete","size":34953},{"name":"@lezer/markdown","size":43319},{"name":"@lezer/lr","size":31274},{"name":"@codemirror/tooltip","size":14316},{"name":"lodash.isequal","size":18521},{"name":"lz-string","size":9259},{"name":"react-devtools-inline","size":842468},{"name":"codesandbox-import-utils","size":2590},{"name":"package-build-stats","size":487},{"name":"intersection-observer","size":12825},{"name":"react-is","size":2244}]},"sandpack-client":{"gzip":7223,"assets":[{"name":"main","size":20629},{"name":"@codesandbox/sandpack-client","size":8415},{"name":"codesandbox-import-utils","size":2590},{"name":"lodash.isequal","size":18521},{"name":"package-build-stats","size":487}]}}
3 changes: 2 additions & 1 deletion snapshots.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{}
{
}
Loading

0 comments on commit ea06516

Please sign in to comment.