Rename ReactPlayground to Playground
This commit is contained in:
@@ -2,7 +2,7 @@ import { editor, IPosition, Selection } from 'monaco-editor'
|
|||||||
import ScrollType = editor.ScrollType
|
import ScrollType = editor.ScrollType
|
||||||
import { Monaco } from '@monaco-editor/react'
|
import { Monaco } from '@monaco-editor/react'
|
||||||
import { getWorker, MonacoJsxSyntaxHighlight } from 'monaco-jsx-syntax-highlight'
|
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 = () => {
|
export const useEditor = () => {
|
||||||
const doOpenEditor = (
|
const doOpenEditor = (
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { editor, Selection } from 'monaco-editor'
|
import { editor, Selection } from 'monaco-editor'
|
||||||
import MonacoEditor, { Monaco } from '@monaco-editor/react'
|
import MonacoEditor, { Monaco } from '@monaco-editor/react'
|
||||||
import '@/components/ReactPlayground/CodeEditor/Editor/editor.scss'
|
import '@/components/Playground/CodeEditor/Editor/editor.scss'
|
||||||
import { IEditorOptions, IFiles, ITheme } from '@/components/ReactPlayground/shared'
|
import { IEditorOptions, IFiles, ITheme } from '@/components/Playground/shared'
|
||||||
import { fileNameToLanguage } from '@/components/ReactPlayground/files'
|
import { fileNameToLanguage } from '@/components/Playground/files'
|
||||||
import { useEditor, useTypesProgress } from '@/components/ReactPlayground/CodeEditor/Editor/hooks'
|
import { useEditor, useTypesProgress } from '@/components/Playground/CodeEditor/Editor/hooks'
|
||||||
import { MonacoEditorConfig } from '@/components/ReactPlayground/CodeEditor/Editor/monacoConfig'
|
import { MonacoEditorConfig } from '@/components/Playground/CodeEditor/Editor/monacoConfig'
|
||||||
|
|
||||||
interface EditorProps {
|
interface EditorProps {
|
||||||
files?: IFiles
|
files?: IFiles
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import '@/components/ReactPlayground/CodeEditor/FileSelector/file-selector.scss'
|
import '@/components/Playground/CodeEditor/FileSelector/file-selector.scss'
|
||||||
import { IFiles } from '@/components/ReactPlayground/shared'
|
import { IFiles } from '@/components/Playground/shared'
|
||||||
import { ENTRY_FILE_NAME, IMPORT_MAP_FILE_NAME } from '@/components/ReactPlayground/files'
|
import { ENTRY_FILE_NAME, IMPORT_MAP_FILE_NAME } from '@/components/Playground/files'
|
||||||
import Item from '@/components/ReactPlayground/CodeEditor/FileSelector/Item'
|
import Item from '@/components/Playground/CodeEditor/FileSelector/Item'
|
||||||
import HideScrollbar, { HideScrollbarElement } from '@/components/common/HideScrollbar'
|
import HideScrollbar, { HideScrollbarElement } from '@/components/common/HideScrollbar'
|
||||||
import FlexBox from '@/components/common/FlexBox'
|
import FlexBox from '@/components/common/FlexBox'
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import '@/components/ReactPlayground/CodeEditor/code-editor.scss'
|
import '@/components/Playground/CodeEditor/code-editor.scss'
|
||||||
import { IEditorOptions, IFiles, ITheme } from '@/components/ReactPlayground/shared'
|
import { IEditorOptions, IFiles, ITheme } from '@/components/Playground/shared'
|
||||||
import { fileNameToLanguage } from '@/components/ReactPlayground/files'
|
import { fileNameToLanguage } from '@/components/Playground/files'
|
||||||
import FileSelector from '@/components/ReactPlayground/CodeEditor/FileSelector'
|
import FileSelector from '@/components/Playground/CodeEditor/FileSelector'
|
||||||
import Editor from '@/components/ReactPlayground/CodeEditor/Editor'
|
import Editor from '@/components/Playground/CodeEditor/Editor'
|
||||||
import FitFullscreen from '@/components/common/FitFullscreen'
|
import FitFullscreen from '@/components/common/FitFullscreen'
|
||||||
import FlexBox from '@/components/common/FlexBox'
|
import FlexBox from '@/components/common/FlexBox'
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import { strFromU8, strToU8, unzlibSync, zlibSync } from 'fflate'
|
import { strFromU8, strToU8, unzlibSync, zlibSync } from 'fflate'
|
||||||
import importMap from '@/components/ReactPlayground/template/import-map.json?raw'
|
import importMap from '@/components/Playground/template/import-map.json?raw'
|
||||||
import AppCss from '@/components/ReactPlayground/template/src/App.css?raw'
|
import AppCss from '@/components/Playground/template/src/App.css?raw'
|
||||||
import App from '@/components/ReactPlayground/template/src/App.tsx?raw'
|
import App from '@/components/Playground/template/src/App.tsx?raw'
|
||||||
import main from '@/components/ReactPlayground/template/src/main.tsx?raw'
|
import main from '@/components/Playground/template/src/main.tsx?raw'
|
||||||
import { ICustomFiles, IFiles, IImportMap } from '@/components/ReactPlayground/shared'
|
import { ICustomFiles, IFiles, IImportMap } from '@/components/Playground/shared'
|
||||||
|
|
||||||
export const MAIN_FILE_NAME = 'App.tsx'
|
export const MAIN_FILE_NAME = 'App.tsx'
|
||||||
export const IMPORT_MAP_FILE_NAME = 'import-map.json'
|
export const IMPORT_MAP_FILE_NAME = 'import-map.json'
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { IPlayground } from '@/components/ReactPlayground/shared'
|
import { IPlayground } from '@/components/Playground/shared'
|
||||||
|
|
||||||
const ReactPlayground: React.FC<IPlayground> = () => {
|
const ReactPlayground: React.FC<IPlayground> = () => {
|
||||||
return <></>
|
return <></>
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,4 +1,4 @@
|
|||||||
import { ITheme } from '@/components/ReactPlayground/shared'
|
import { ITheme } from '@/components/Playground/shared'
|
||||||
|
|
||||||
const STORAGE_DARK_THEME = 'react-playground-prefer-dark'
|
const STORAGE_DARK_THEME = 'react-playground-prefer-dark'
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import CodeEditor from '@/components/ReactPlayground/CodeEditor'
|
import CodeEditor from '@/components/Playground/CodeEditor'
|
||||||
import { initFiles } from '@/components/ReactPlayground/files'
|
import { initFiles } from '@/components/Playground/files'
|
||||||
import { IFiles } from '@/components/ReactPlayground/shared'
|
import { IFiles } from '@/components/Playground/shared'
|
||||||
|
|
||||||
const OnlineEditor: React.FC = () => {
|
const OnlineEditor: React.FC = () => {
|
||||||
const [files, setFiles] = useState<IFiles>(initFiles)
|
const [files, setFiles] = useState<IFiles>(initFiles)
|
||||||
|
|||||||
Reference in New Issue
Block a user