Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 06931b2

Browse files
committed
ts / ci
1 parent caf677c commit 06931b2

File tree

10 files changed

+394
-407
lines changed

10 files changed

+394
-407
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# default tmp dir
99
/tmp
1010
/dist
11+
/build
1112

1213
# Composer
1314
/vendor

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Only ReactJS integration, together with MUI styling - but no further `@ui-schema
44

55
See [ui-schema/react-codemirror repo](https://github.com/ui-schema/react-codemirror) for more information.
66

7-
[![Run on CodeSandbox](https://img.shields.io/badge/run%20on%20CodeSandbox-blue?labelColor=fff&logoColor=505050&style=for-the-badge&logo=codesandbox)](https://codesandbox.io/s/github/ui-schema/demo-mui-kit-codemirror/tree/master/?autoresize=1&fontsize=12&hidenavigation=1&module=%2Fsrc%2Fpages%2FPageSimpleForm.tsx)
7+
[![Run on CodeSandbox](https://img.shields.io/badge/run%20on%20CodeSandbox-blue?labelColor=fff&logoColor=505050&style=for-the-badge&logo=codesandbox)](https://codesandbox.io/s/github/ui-schema/demo-mui-kit-codemirror/tree/main/?autoresize=1&fontsize=12&hidenavigation=1&module=%2Fsrc%2FDemoEditor.tsx)
88

9-
[![Run on StackBlitz](https://img.shields.io/badge/run%20on%20StackBlitz-blue?labelColor=fff&logoColor=505050&style=for-the-badge&logo=stackblitz)](https://stackblitz.com/github/ui-schema/demo-mui-kit-codemirror)
9+
[![Run on StackBlitz](https://img.shields.io/badge/run%20on%20StackBlitz-blue?labelColor=fff&logoColor=505050&style=for-the-badge&logo=stackblitz)](https://stackblitz.com/github/ui-schema/demo-mui-kit-codemirror?file=src%2FDemoEditor.tsx,src%2FCustomCodeMirror.tsx)
1010

1111
[![Clone on Repl.it](https://img.shields.io/badge/clone%20on%20repl.it-grey?labelColor=fff&style=for-the-badge&logo=replit)](https://repl.it/github/ui-schema/demo-mui-kit-codemirror)
1212

package-lock.json

Lines changed: 9 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"@mui/icons-material": "5.10.6",
2626
"@mui/lab": "5.0.0-alpha.102",
2727
"@mui/material": "5.10.8",
28-
"@types/react": "18.0.21",
29-
"@types/react-dom": "18.0.6",
28+
"@types/react": "^18.0.21",
29+
"@types/react-dom": "^18.0.6",
3030
"@ui-schema/kit-codemirror": "0.0.1",
3131
"immutable": "4.1.0",
3232
"react": "18.2.0",
@@ -37,12 +37,13 @@
3737
"react-router-dom": "6.4.2",
3838
"react-uid": "2.3.2",
3939
"scheduler": "0.23.0",
40-
"styled-components": "5.3.6"
40+
"styled-components": "5.3.6",
41+
"typescript": "^4.8.4"
4142
},
4243
"scripts": {
4344
"start": "react-scripts start",
4445
"build": "react-scripts build",
45-
"test": "react-scripts test --env=jsdom",
46+
"test": "react-scripts test --env=jsdom --passWithNoTests",
4647
"eject": "react-scripts eject"
4748
},
4849
"devDependencies": {

src/App.tsx

Lines changed: 126 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,139 @@
1-
import React from 'react';
2-
import { StyledEngineProvider, ThemeProvider } from '@mui/material/styles';
3-
import CssBaseline from '@mui/material/CssBaseline';
4-
import { DemoEditor } from './DemoEditor';
5-
import { createTheme } from '@mui/material/styles';
1+
import React from 'react'
2+
import { StyledEngineProvider, ThemeProvider } from '@mui/material/styles'
3+
import CssBaseline from '@mui/material/CssBaseline'
4+
import { DemoEditor } from './DemoEditor'
5+
import { createTheme } from '@mui/material/styles'
66

77
const headingFont =
8-
'"Playfair Display", Didot, Georgia, "Times New Roman", Times, serif';
8+
'"Playfair Display", Didot, Georgia, "Times New Roman", Times, serif'
99
const headingBody =
10-
'Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif';
10+
'Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif'
1111
const universal = {
12-
palette: {
13-
contrastThreshold: 2,
14-
},
15-
breakpoints: {
16-
values: {
17-
xs: 0,
18-
sm: 543,
19-
md: 768,
20-
lg: 1180,
21-
xl: 1920,
22-
},
23-
},
24-
typography: {
25-
fontSize: 14,
26-
h1: {
27-
fontFamily: headingFont,
28-
fontSize: '2.45rem',
29-
},
30-
h2: {
31-
fontFamily: headingFont,
32-
fontSize: '2.115rem',
33-
},
34-
h3: {
35-
fontFamily: headingFont,
36-
fontSize: '1.95rem',
37-
},
38-
h4: {
39-
fontFamily: headingFont,
40-
fontSize: '1.75rem',
41-
},
42-
h5: {
43-
fontFamily: headingFont,
44-
fontSize: '1.615rem',
45-
},
46-
h6: {
47-
fontFamily: headingFont,
48-
fontSize: '1.25rem',
49-
},
50-
body1: {
51-
fontFamily: headingBody,
52-
fontSize: '1.0125rem',
53-
letterSpacing: '0.0195em',
54-
},
55-
body2: {
56-
fontFamily: headingBody,
57-
fontSize: '0.95rem',
58-
letterSpacing: '0.021em',
59-
},
60-
subtitle1: {
61-
fontFamily: headingFont,
62-
fontSize: '1.25rem',
12+
palette: {
13+
contrastThreshold: 2,
14+
},
15+
breakpoints: {
16+
values: {
17+
xs: 0,
18+
sm: 543,
19+
md: 768,
20+
lg: 1180,
21+
xl: 1920,
22+
},
6323
},
64-
subtitle2: {
65-
fontFamily: headingFont,
66-
fontSize: '1rem',
24+
typography: {
25+
fontSize: 14,
26+
h1: {
27+
fontFamily: headingFont,
28+
fontSize: '2.45rem',
29+
},
30+
h2: {
31+
fontFamily: headingFont,
32+
fontSize: '2.115rem',
33+
},
34+
h3: {
35+
fontFamily: headingFont,
36+
fontSize: '1.95rem',
37+
},
38+
h4: {
39+
fontFamily: headingFont,
40+
fontSize: '1.75rem',
41+
},
42+
h5: {
43+
fontFamily: headingFont,
44+
fontSize: '1.615rem',
45+
},
46+
h6: {
47+
fontFamily: headingFont,
48+
fontSize: '1.25rem',
49+
},
50+
body1: {
51+
fontFamily: headingBody,
52+
fontSize: '1.0125rem',
53+
letterSpacing: '0.0195em',
54+
},
55+
body2: {
56+
fontFamily: headingBody,
57+
fontSize: '0.95rem',
58+
letterSpacing: '0.021em',
59+
},
60+
subtitle1: {
61+
fontFamily: headingFont,
62+
fontSize: '1.25rem',
63+
},
64+
subtitle2: {
65+
fontFamily: headingFont,
66+
fontSize: '1rem',
67+
},
6768
},
68-
},
69-
/*shape: {
70-
borderRadius: 0,
71-
},*/
72-
};
69+
/*shape: {
70+
borderRadius: 0,
71+
},*/
72+
}
7373

7474
const customTheme = createTheme({
75-
...universal,
76-
palette: {
77-
...universal.palette,
78-
mode: 'dark',
79-
primary: {
80-
main: '#05aeca',
81-
},
82-
secondary: {
83-
light: '#adf3e8',
84-
main: '#4ee3d7',
85-
dark: '#266e62',
86-
},
87-
background: {
88-
paper: '#13181c',
89-
default: '#010203',
90-
},
91-
text: {
92-
primary: '#c6c4c4',
93-
secondary: '#acc9c5',
94-
},
95-
info: {
96-
main: '#1872b9',
97-
},
98-
error: {
99-
main: '#9d190f',
100-
//main: '#b71c10',
101-
},
102-
warning: {
103-
main: '#d54600',
104-
},
105-
action: {
106-
hoverOpacity: 0.2,
107-
},
108-
},
109-
components: {
110-
MuiPaper: {
111-
styleOverrides: { root: { backgroundImage: 'unset' } },
75+
...universal,
76+
palette: {
77+
...universal.palette,
78+
mode: 'dark',
79+
primary: {
80+
main: '#05aeca',
81+
},
82+
secondary: {
83+
light: '#adf3e8',
84+
main: '#4ee3d7',
85+
dark: '#266e62',
86+
},
87+
background: {
88+
paper: '#13181c',
89+
default: '#010203',
90+
},
91+
text: {
92+
primary: '#c6c4c4',
93+
secondary: '#acc9c5',
94+
},
95+
info: {
96+
main: '#1872b9',
97+
},
98+
error: {
99+
main: '#9d190f',
100+
//main: '#b71c10',
101+
},
102+
warning: {
103+
main: '#d54600',
104+
},
105+
action: {
106+
hoverOpacity: 0.2,
107+
},
112108
},
113-
MuiInputLabel: {
114-
styleOverrides: {
115-
root: {
116-
//variant: '#6431f7',
117-
'&$focused': {
118-
color: '#7649f6',
119-
},
120-
'&$error': {
121-
color: '#b71c10',
122-
},
123-
},
124-
},
109+
components: {
110+
MuiPaper: {
111+
styleOverrides: {root: {backgroundImage: 'unset'}},
112+
},
113+
MuiInputLabel: {
114+
styleOverrides: {
115+
root: {
116+
//variant: '#6431f7',
117+
'&$focused': {
118+
color: '#7649f6',
119+
},
120+
'&$error': {
121+
color: '#b71c10',
122+
},
123+
},
124+
},
125+
},
125126
},
126-
},
127-
});
127+
})
128128

129129
export const App: React.ComponentType<{}> = () => {
130-
return (
131-
<StyledEngineProvider injectFirst>
132-
<ThemeProvider theme={customTheme}>
133-
<CssBaseline />
130+
return (
131+
<StyledEngineProvider injectFirst>
132+
<ThemeProvider theme={customTheme}>
133+
<CssBaseline/>
134134

135-
<DemoEditor />
136-
</ThemeProvider>
137-
</StyledEngineProvider>
138-
);
139-
};
135+
<DemoEditor/>
136+
</ThemeProvider>
137+
</StyledEngineProvider>
138+
)
139+
}

0 commit comments

Comments
 (0)