-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,661 additions
and
1,780 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,34 +14,36 @@ | |
"dependencies": { | ||
"@arrow-js/core": "1.0.0-alpha.10", | ||
"@astrojs/check": "^0.7.0", | ||
"@astrojs/react": "^3.5.0", | ||
"@astrojs/tailwind": "^5.1.0", | ||
"@astrojs/react": "^3.6.2", | ||
"@astrojs/tailwind": "^5.1.2", | ||
"@monaco-editor/react": "^4.6.0", | ||
"@nanostores/persistent": "^0.10.1", | ||
"astro": "^4.9.3", | ||
"daisyui": "^4.12.2", | ||
"@nanostores/persistent": "^0.10.2", | ||
"astro": "^4.16.7", | ||
"daisyui": "^4.12.13", | ||
"dts-bundle-generator": "^9.5.1", | ||
"flex-splitter-directive": "^0.5.1", | ||
"js-beautify": "^1.15.1", | ||
"nanostores": "^0.10.3", | ||
"pako": "^2.1.0", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"tailwindcss": "^3.4.4", | ||
"tailwindcss": "^3.4.14", | ||
"tippy.js": "^6.3.7", | ||
"typescript": "^5.4.5", | ||
"wrangler": "^3.66.0" | ||
"typescript": "^5.6.3", | ||
"wrangler": "^3.83.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.14.2", | ||
"@types/js-beautify": "^1.14.3", | ||
"@types/node": "^20.17.0", | ||
"@types/pako": "^2.0.3", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@types/react": "^18.3.12", | ||
"@types/react-dom": "^18.3.1", | ||
"@types/toastify-js": "^1.12.3", | ||
"dprint": "^0.45.1", | ||
"kaplay": "^3000.1.17", | ||
"monaco-editor": "^0.48.0", | ||
"vite": "^5.2.13", | ||
"vite-plugin-static-copy": "^1.0.5" | ||
"monaco-editor": "^0.52.0", | ||
"vite": "^5.4.10", | ||
"vite-plugin-static-copy": "^1.0.6" | ||
}, | ||
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { js_beautify } from "js-beautify"; | ||
import { $editorInstance } from "../stores"; | ||
|
||
export const format = () => { | ||
const codeValue = $editorInstance.get()?.getValue(); | ||
const formattedCode = js_beautify(codeValue ?? "", { | ||
indent_size: 4, | ||
indent_char: " ", | ||
}); | ||
|
||
$editorInstance.get()?.setValue(formattedCode); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./format.ts"; | ||
export * from "./save.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import kaboomJsFile from "../../../kaplay/dist/kaboom.js?raw"; | ||
import { $version } from "../../stores"; | ||
|
||
const versions = { | ||
v4000: | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/kaplay.js", | ||
v3001: "https://cdn.jsdelivr.net/npm/[email protected]", | ||
const versions: Record<string, string> = { | ||
v4000: "https://unpkg.com/kaplay@next/dist/kaplay.js", | ||
v3001: "https://unpkg.com/kaplay@latest/dist/kaplay.js", | ||
}; | ||
|
||
export const wrapCode = (code: any) => { | ||
const version = $version.get(); | ||
|
||
return ` | ||
<!DOCTYPE html> | ||
<head> | ||
|
@@ -28,11 +28,10 @@ body { | |
} | ||
</style> | ||
</head> | ||
<body> | ||
<script> | ||
${kaboomJsFile} | ||
</script> | ||
<script src="${versions[version]}"></script> | ||
<body> | ||
<script type="module"> | ||
${code} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/// <reference path="../.astro/types.d.ts" /> | ||
/// <reference types="astro/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
"./dist/**", | ||
"./node_modules/**" | ||
] | ||
} | ||
} |