Rename ReactPlayground to Playground

This commit is contained in:
2024-01-09 11:47:00 +08:00
parent 087b632610
commit f9d0cc2611
28 changed files with 25 additions and 25 deletions

View File

@@ -2,7 +2,7 @@ import { editor, IPosition, Selection } from 'monaco-editor'
import ScrollType = editor.ScrollType
import { Monaco } from '@monaco-editor/react'
import { getWorker, MonacoJsxSyntaxHighlight } from 'monaco-jsx-syntax-highlight'
import { createATA, TypeHelper } from '@/components/ReactPlayground/CodeEditor/Editor/ata'
import { createATA, TypeHelper } from '@/components/Playground/CodeEditor/Editor/ata'
export const useEditor = () => {
const doOpenEditor = (

View File

@@ -1,11 +1,11 @@
import React from 'react'
import { editor, Selection } from 'monaco-editor'
import MonacoEditor, { Monaco } from '@monaco-editor/react'
import '@/components/ReactPlayground/CodeEditor/Editor/editor.scss'
import { IEditorOptions, IFiles, ITheme } from '@/components/ReactPlayground/shared'
import { fileNameToLanguage } from '@/components/ReactPlayground/files'
import { useEditor, useTypesProgress } from '@/components/ReactPlayground/CodeEditor/Editor/hooks'
import { MonacoEditorConfig } from '@/components/ReactPlayground/CodeEditor/Editor/monacoConfig'
import '@/components/Playground/CodeEditor/Editor/editor.scss'
import { IEditorOptions, IFiles, ITheme } from '@/components/Playground/shared'
import { fileNameToLanguage } from '@/components/Playground/files'
import { useEditor, useTypesProgress } from '@/components/Playground/CodeEditor/Editor/hooks'
import { MonacoEditorConfig } from '@/components/Playground/CodeEditor/Editor/monacoConfig'
interface EditorProps {
files?: IFiles

View File

@@ -1,8 +1,8 @@
import React from 'react'
import '@/components/ReactPlayground/CodeEditor/FileSelector/file-selector.scss'
import { IFiles } from '@/components/ReactPlayground/shared'
import { ENTRY_FILE_NAME, IMPORT_MAP_FILE_NAME } from '@/components/ReactPlayground/files'
import Item from '@/components/ReactPlayground/CodeEditor/FileSelector/Item'
import '@/components/Playground/CodeEditor/FileSelector/file-selector.scss'
import { IFiles } from '@/components/Playground/shared'
import { ENTRY_FILE_NAME, IMPORT_MAP_FILE_NAME } from '@/components/Playground/files'
import Item from '@/components/Playground/CodeEditor/FileSelector/Item'
import HideScrollbar, { HideScrollbarElement } from '@/components/common/HideScrollbar'
import FlexBox from '@/components/common/FlexBox'

View File

@@ -1,10 +1,10 @@
import React from 'react'
import _ from 'lodash'
import '@/components/ReactPlayground/CodeEditor/code-editor.scss'
import { IEditorOptions, IFiles, ITheme } from '@/components/ReactPlayground/shared'
import { fileNameToLanguage } from '@/components/ReactPlayground/files'
import FileSelector from '@/components/ReactPlayground/CodeEditor/FileSelector'
import Editor from '@/components/ReactPlayground/CodeEditor/Editor'
import '@/components/Playground/CodeEditor/code-editor.scss'
import { IEditorOptions, IFiles, ITheme } from '@/components/Playground/shared'
import { fileNameToLanguage } from '@/components/Playground/files'
import FileSelector from '@/components/Playground/CodeEditor/FileSelector'
import Editor from '@/components/Playground/CodeEditor/Editor'
import FitFullscreen from '@/components/common/FitFullscreen'
import FlexBox from '@/components/common/FlexBox'

View File

@@ -1,9 +1,9 @@
import { strFromU8, strToU8, unzlibSync, zlibSync } from 'fflate'
import importMap from '@/components/ReactPlayground/template/import-map.json?raw'
import AppCss from '@/components/ReactPlayground/template/src/App.css?raw'
import App from '@/components/ReactPlayground/template/src/App.tsx?raw'
import main from '@/components/ReactPlayground/template/src/main.tsx?raw'
import { ICustomFiles, IFiles, IImportMap } from '@/components/ReactPlayground/shared'
import importMap from '@/components/Playground/template/import-map.json?raw'
import AppCss from '@/components/Playground/template/src/App.css?raw'
import App from '@/components/Playground/template/src/App.tsx?raw'
import main from '@/components/Playground/template/src/main.tsx?raw'
import { ICustomFiles, IFiles, IImportMap } from '@/components/Playground/shared'
export const MAIN_FILE_NAME = 'App.tsx'
export const IMPORT_MAP_FILE_NAME = 'import-map.json'

View File

@@ -1,5 +1,5 @@
import React from 'react'
import { IPlayground } from '@/components/ReactPlayground/shared'
import { IPlayground } from '@/components/Playground/shared'
const ReactPlayground: React.FC<IPlayground> = () => {
return <></>

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,4 +1,4 @@
import { ITheme } from '@/components/ReactPlayground/shared'
import { ITheme } from '@/components/Playground/shared'
const STORAGE_DARK_THEME = 'react-playground-prefer-dark'

View File

@@ -1,7 +1,7 @@
import React from 'react'
import CodeEditor from '@/components/ReactPlayground/CodeEditor'
import { initFiles } from '@/components/ReactPlayground/files'
import { IFiles } from '@/components/ReactPlayground/shared'
import CodeEditor from '@/components/Playground/CodeEditor'
import { initFiles } from '@/components/Playground/files'
import { IFiles } from '@/components/Playground/shared'
const OnlineEditor: React.FC = () => {
const [files, setFiles] = useState<IFiles>(initFiles)