-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from x0k/monorepo
Monorepo
- Loading branch information
Showing
127 changed files
with
8,062 additions
and
492 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
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,42 @@ | ||
import { defineConfig } from "astro/config"; | ||
import { fileURLToPath } from "node:url"; | ||
|
||
import mdx from "@astrojs/mdx"; | ||
import svelte from "@astrojs/svelte"; | ||
import tailwind from "@astrojs/tailwind"; | ||
import icon from "astro-icon"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: "https://x0k.github.io", | ||
base: "/ppp", | ||
integrations: [tailwind(), icon(), mdx(), svelte()], | ||
vite: { | ||
resolve: { | ||
alias: { | ||
"@": fileURLToPath(new URL("./src", import.meta.url)), | ||
}, | ||
}, | ||
worker: { | ||
format: "es", | ||
}, | ||
build: { | ||
rollupOptions: { | ||
external: ["sharp"], | ||
}, | ||
}, | ||
}, | ||
markdown: { | ||
shikiConfig: { | ||
wrap: true, | ||
theme: "dracula", | ||
}, | ||
}, | ||
i18n: { | ||
defaultLocale: "en", | ||
locales: ["en", "ru"], | ||
fallback: { | ||
ru: "en", | ||
}, | ||
}, | ||
}); |
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,38 @@ | ||
{ | ||
"name": "ppp", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"check": "astro check", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"dependencies": { | ||
"@astrojs/check": "^0.7.0", | ||
"@astrojs/mdx": "^3.1.0", | ||
"@astrojs/svelte": "^5.5.0", | ||
"@astrojs/tailwind": "^5.1.0", | ||
"@xterm/addon-fit": "^0.10.0", | ||
"@xterm/xterm": "^5.5.0", | ||
"astro": "^4.10.2", | ||
"astro-icon": "^1.1.0", | ||
"monaco-editor": "^0.49.0", | ||
"monaco-vim": "^0.4.1", | ||
"tailwindcss": "^3.4.4", | ||
"libs": "workspace:*", | ||
"testing": "workspace:*", | ||
"design-patterns-factory": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@iconify-json/lucide": "^1.1.191", | ||
"@iconify/svelte": "^4.0.2", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"@types/color": "^3.0.6", | ||
"color": "^4.2.3", | ||
"daisyui": "^4.12.2", | ||
"svelte": "5.0.0-next.133" | ||
} | ||
} |
File renamed without changes
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
File renamed without changes.
File renamed without changes.
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,26 @@ | ||
import { mount } from "svelte"; | ||
|
||
import type { TestData, TestRunnerFactory } from "testing"; | ||
|
||
import Editor, { type Props } from "@/components/editor/editor.svelte"; | ||
import type { Language } from "@/lib/languages"; | ||
|
||
export function mountEditor<L extends Language, I, O>( | ||
testsData: TestData<I, O>[], | ||
runtimes: Record< | ||
L, | ||
{ initialValue: string; testRunnerFactory: TestRunnerFactory<I, O> } | ||
> | ||
) { | ||
const element = document.getElementById("editor-placeholder")!; | ||
const props = { | ||
contentId: element.dataset.contentId!, | ||
testsData, | ||
runtimes, | ||
} satisfies Props<L, I, O>; | ||
mount(Editor, { | ||
target: element.parentElement!, | ||
// @ts-expect-error svelte types are wrong | ||
props, | ||
}); | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/components/editor/panel/tests.svelte → .../src/components/editor/panel/tests.svelte
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
File renamed without changes.
File renamed without changes.
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,19 @@ | ||
--- | ||
import { Icon } from "astro-icon/components"; | ||
export interface Props { | ||
title: string; | ||
} | ||
const { title } = Astro.props; | ||
--- | ||
|
||
<div class="flex flex-col gap-3"> | ||
<div class="collapse outline outline-1"> | ||
<input type="checkbox" /> | ||
<div class="flex items-center gap-1 collapse-title"> | ||
<Icon name="lucide:lightbulb" />{title} | ||
</div> | ||
<div class="collapse-content"><slot /></div> | ||
</div> | ||
</div> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.