refactor(web): remove typescript

This commit is contained in:
Ali BARIN
2024-02-27 15:23:23 +00:00
parent 636870a075
commit b3ae2d2748
337 changed files with 2067 additions and 4997 deletions

View File

@@ -1,11 +1,5 @@
import * as React from 'react';
import { JSONTree } from 'react-json-tree';
import type { IJSONObject } from 'types';
type JSONViewerProps = {
data: IJSONObject;
};
const theme = {
scheme: 'inspector',
author: 'Alexander Kuznetsov (alexkuz@gmail.com)',
@@ -36,16 +30,14 @@ const theme = {
// base0C - Support, Regular Expressions, Escape Characters, Markup Quotes
base0C: '#86c1b9',
// base0D - Functions, Methods, Attribute IDs, Headings
base0D: '#d73a49', // key
base0D: '#d73a49',
// base0E - Keywords, Storage, Selector, Markup Italic, Diff Changed
base0E: '#EC31C0',
// base0F - Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>
base0F: '#a16946',
};
function JSONViewer(props: JSONViewerProps) {
function JSONViewer(props) {
const { data } = props;
return (
<JSONTree
hideRoot
@@ -56,5 +48,4 @@ function JSONViewer(props: JSONViewerProps) {
/>
);
}
export default JSONViewer;

View File

@@ -1,5 +1,4 @@
import GlobalStyles from '@mui/material/GlobalStyles';
export const jsonViewerStyles = (
<GlobalStyles
styles={(theme) => ({
@@ -16,17 +15,14 @@ export const jsonViewerStyles = (
'var(--indentguide-size) var(--indentguide-style) var(--indentguide-color)',
'--indentguide-active':
'var(--indentguide-size) var(--indentguide-style) var(--indentguide-color-active)',
/* Types colors */
'--string-color': theme.palette.text.secondary,
'--number-color': theme.palette.text.primary,
'--boolean-color': theme.palette.text.primary,
'--null-color': theme.palette.text.primary,
'--property-color': theme.palette.text.primary,
/* Collapsed node preview */
'--preview-color': theme.palette.text.primary,
/* Search highlight color */
'--highlight-color': '#6fb3d2',
},