20 Commits

Author SHA1 Message Date
47d9aa22d8 Merge pull request #20 from FatttSnake/release/1.0.2
v1.0.2
2024-10-09 22:41:47 +08:00
e601a96288 Build(package.json): Update version from 1.0.2-SNAPSHOT to 1.0.2 2024-10-09 22:40:03 +08:00
d63473b3e3 Merge pull request #19 from FatttSnake/refactor/readme
Update README
2024-10-09 22:38:12 +08:00
e2cedef75c Refactor(README): Update requires 2024-10-09 22:34:09 +08:00
361e225244 Merge pull request #18 from FatttSnake/refactor/compiler
Change esbuild transform and compile target to es2015
2024-09-30 16:53:36 +08:00
aad0b9eb3b Merge pull request #17 from FatttSnake/fix/style
Fixed incorrect style that card content exceeds card size
2024-09-30 16:51:42 +08:00
96a9714cdd Refactor(compiler): Change esbuild transform and compile target to es2015 2024-09-30 16:47:06 +08:00
3812ffd18f Style(ToolCard): Fixed incorrect style that card content exceeds card size 2024-09-20 11:53:57 +08:00
6f0ebfe358 Merge pull request #16 from FatttSnake/prepare/1.0.1
Update version from 1.0.1-SNAPSHOT to 1.0.2-SNAPSHOT
2024-09-19 16:44:47 +08:00
0d3dd30591 Merge pull request #15 from FatttSnake/release/1.0.1
v1.0.1
2024-09-19 16:42:16 +08:00
ac8d21c063 Build(package.json): Update version from 1.0.1 to 1.0.2-SNAPSHOT 2024-09-19 16:38:50 +08:00
ebaa4d8851 Build(package.json): Update version from 1.0.1-SNAPSHOT to 1.0.1 2024-09-19 16:37:43 +08:00
86cee4eaa5 Merge pull request #14 from FatttSnake/refactor/editor
Fix draggable mask incorrect style
2024-09-19 13:59:52 +08:00
768f9bce0f Style(CodePage): Fix draggable mask incorrect style 2024-09-19 13:58:43 +08:00
eb4107a7fd Merge pull request #13 from FatttSnake/refactor/editor
Fix "net::ERR_INSUFFICIENT_RESOURCES" exception
2024-09-19 10:00:36 +08:00
264534f479 Fix(Management): Fix base and template management unable to jump file 2024-09-19 09:59:04 +08:00
c2f6b5d49e Fix(editor): Fix "net::ERR_INSUFFICIENT_RESOURCES" exception when the editor loads a large number of libraries 2024-09-19 09:45:24 +08:00
4570a59455 Merge pull request #3 from FatttSnake/1.0.0
v1.0.0
2024-09-06 15:17:40 +08:00
FatttSnake
d0121b126b Merge pull request 'v1.0-230926' (#27) from dev into master
Reviewed-on: FatttSnake/fatweb-ui#27
2023-09-26 11:06:04 +08:00
FatttSnake
5eaae8eef7 Merge pull request 'Merge from dev branch to master' (#2) from dev into master
Reviewed-on: FatttSnake/fatweb-ui#2
2023-09-04 23:26:46 +08:00
13 changed files with 42 additions and 13 deletions

View File

@@ -24,7 +24,7 @@ This project is a front-end web UI of Oxygen Toolbox and needs to be used with t
# Requires
- Web Server (e.g. Nginx, Apache httpd)
- [API of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-api) (v1.0.0 and later versions)
- [API of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-api) (v1.0.0 or later versions)
# Related projects

View File

@@ -24,7 +24,7 @@
# 环境要求
- Web 服务器(如 Nginx, Apache httpd
- [API of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-api) (v1.0.0 更高版本)
- [API of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-api) (v1.0.0 更高版本)
# 关联项目

View File

@@ -2,7 +2,7 @@
"name": "oxygen-ui",
"private": true,
"type": "module",
"version": "1.0.1-SNAPSHOT",
"version": "1.0.2",
"description": "Oxygen Toolbox browser version",
"author": {
"name": "FatttSnake",

View File

@@ -78,6 +78,7 @@
.author {
display: flex;
margin-top: auto;
padding-top: 8px;
flex-direction: row;
justify-content: end;
padding-bottom: 10px;

View File

@@ -6,6 +6,7 @@
width: 100%;
.root-content {
position: relative;
width: 100%;
height: 100%;

View File

@@ -13,7 +13,7 @@
> .card-box, > div {
width: 180px;
height: 290px;
min-height: 290px;
flex: 0 0 auto;
}
@@ -102,7 +102,7 @@
> .card-box, > div {
width: 180px;
height: 290px;
min-height: 290px;
flex: 0 0 auto;
}
}

View File

@@ -28,7 +28,7 @@
> div {
width: 180px;
height: 290px;
min-height: 290px;
flex: 0 0 auto;
}

View File

@@ -70,7 +70,7 @@
> div {
width: 180px;
height: 290px;
min-height: 290px;
flex: 0 0 auto;
}

View File

@@ -36,6 +36,31 @@ export const createATA = async (): Promise<TypeHelper> => {
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const ts = await import('https://esm.sh/typescript@5.3.3')
const maxConcurrentRequests = 50
let activeRequests = 0
const requestQueue: Array<() => void> = []
const fetchWithQueue = (input: RequestInfo | URL, init?: RequestInit | undefined) =>
new Promise<Response>((resolve, reject) => {
const attemptRequest = () => {
if (activeRequests < maxConcurrentRequests) {
activeRequests++
fetch(input, init)
.then((response) => resolve(response))
.catch((error) => reject(error))
.finally(() => {
activeRequests--
if (requestQueue.length > 0) {
requestQueue.shift()?.()
}
})
} else {
requestQueue.push(attemptRequest)
}
}
attemptRequest()
})
const ata = setupTypeAcquisition({
projectName: 'monaco-ts',
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -43,7 +68,7 @@ export const createATA = async (): Promise<TypeHelper> => {
logger: console,
fetcher: (input, init) => {
try {
return fetch(input, init)
return fetchWithQueue(input, init)
} catch (error) {
console.error('Error fetching data:', error)
}
@@ -92,6 +117,7 @@ export const createATA = async (): Promise<TypeHelper> => {
}
return {
// eslint-disable-next-line @typescript-eslint/no-misused-promises
acquireType,
addListener,
removeListener,

View File

@@ -12,8 +12,8 @@ export const useEditor = () => {
const selection = input.options ? input.options.selection : null
if (selection) {
if (
typeof selection.endLineNumber === 'number' &&
typeof selection.endColumn === 'number'
typeof selection?.endLineNumber === 'number' &&
typeof selection?.endColumn === 'number'
) {
editor.setSelection(selection)
editor.revealRangeInCenter(selection, ScrollType.Immediate)

View File

@@ -57,7 +57,7 @@ class Compiler {
transform = async (code: string, loader: Loader) => {
await this.waitInit()
return esbuild.transform(code, { loader })
return esbuild.transform(code, { loader, target: 'es2015' })
}
compile = async (files: IFiles, importMap: IImportMap, entryPoint: string) => {
@@ -66,6 +66,7 @@ class Compiler {
bundle: true,
entryPoints: [entryPoint],
format: 'esm',
target: 'es2015',
metafile: true,
write: false,
plugins: [this.fileResolverPlugin(files, importMap)]

View File

@@ -1100,7 +1100,7 @@ const Base = () => {
<Playground.CodeEditor
files={editingFiles[editingBaseId]}
selectedFileName={editingFileName}
onSelectedFileChange={() => {}}
onSelectedFileChange={setEditingFileName}
onChangeFileContent={handleOnChangeFileContent}
showFileSelector={false}
tsconfig={tsconfig}

View File

@@ -1044,7 +1044,7 @@ const Template = () => {
<Playground.CodeEditor
files={editingFiles[editingTemplateId]}
selectedFileName={editingFileName}
onSelectedFileChange={() => {}}
onSelectedFileChange={setEditingFileName}
onChangeFileContent={handleOnChangeFileContent}
showFileSelector={false}
tsconfig={tsconfig}