diff --git a/lykiadb-playground/.eslintrc.json b/lykiadb-playground/.eslintrc.json deleted file mode 100644 index bffb357a..00000000 --- a/lykiadb-playground/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/lykiadb-playground/.gitignore b/lykiadb-playground/.gitignore deleted file mode 100644 index fd3dbb57..00000000 --- a/lykiadb-playground/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/lykiadb-playground/Cargo.toml b/lykiadb-playground/Cargo.toml deleted file mode 100644 index 84b09dda..00000000 --- a/lykiadb-playground/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "lykiadb-playground" -version = "0.1.0" -license = "MIT OR Apache-2.0" - - -[lib] -crate-type = ["cdylib"] - -[dependencies] -lykiadb-lang = { path = "../lykiadb-lang" } -wasm-bindgen="0.2.92" -serde = { version = "1.0.188", features=["derive", "rc"] } -serde-wasm-bindgen = "0.6.5" -rustc-hash = "1.1.0" \ No newline at end of file diff --git a/lykiadb-playground/README.md b/lykiadb-playground/README.md deleted file mode 100644 index c4033664..00000000 --- a/lykiadb-playground/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/lykiadb-playground/app/favicon.ico b/lykiadb-playground/app/favicon.ico deleted file mode 100644 index 718d6fea..00000000 Binary files a/lykiadb-playground/app/favicon.ico and /dev/null differ diff --git a/lykiadb-playground/app/globals.css b/lykiadb-playground/app/globals.css deleted file mode 100644 index d0c38fe2..00000000 --- a/lykiadb-playground/app/globals.css +++ /dev/null @@ -1,68 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 240 10% 3.9%; - --card: 0 0% 100%; - --card-foreground: 240 10% 3.9%; - --popover: 0 0% 100%; - --popover-foreground: 240 10% 3.9%; - --primary: 240 5.9% 10%; - --primary-foreground: 0 0% 98%; - --secondary: 240 4.8% 95.9%; - --secondary-foreground: 240 5.9% 10%; - --muted: 240 4.8% 95.9%; - --muted-foreground: 240 3.8% 46.1%; - --accent: 240 4.8% 95.9%; - --accent-foreground: 240 5.9% 10%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; - --border: 240 5.9% 90%; - --input: 240 5.9% 90%; - --ring: 240 10% 3.9%; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; - --radius: 0.5rem; - } - .dark { - --background: 240 10% 3.9%; - --foreground: 0 0% 98%; - --card: 240 10% 3.9%; - --card-foreground: 0 0% 98%; - --popover: 240 10% 3.9%; - --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 240 5.9% 10%; - --secondary: 240 3.7% 15.9%; - --secondary-foreground: 0 0% 98%; - --muted: 240 3.7% 15.9%; - --muted-foreground: 240 5% 64.9%; - --accent: 240 3.7% 15.9%; - --accent-foreground: 0 0% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; - --border: 240 3.7% 15.9%; - --input: 240 3.7% 15.9%; - --ring: 240 4.9% 83.9%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; - } -} - -@layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } -} diff --git a/lykiadb-playground/app/layout.tsx b/lykiadb-playground/app/layout.tsx deleted file mode 100644 index 3f6f17d3..00000000 --- a/lykiadb-playground/app/layout.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; -import "./globals.css"; - -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - title: "LykiaDB Playground", - description: "A simple Next.js app to play with LykiaDB", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - {children} - - ); -} diff --git a/lykiadb-playground/app/lyqlSyntax.scss b/lykiadb-playground/app/lyqlSyntax.scss deleted file mode 100644 index 7f6042f0..00000000 --- a/lykiadb-playground/app/lyqlSyntax.scss +++ /dev/null @@ -1,42 +0,0 @@ -.cm-{ - $font-size: 16px; - $font-family: 'JetBrains Mono', monospace; - &gutters, &editor { - font-size: $font-size; - font-family: $font-family; - border: none!important; - } - - &line { - font-size: $font-size; - font-family: $font-family; - line-height: 1.5; - height: 100%; - width: 100%; - } - - &string { - color:rgb(17, 198, 0) - } - - &number, - &boolean, - &null-undefined { - color:rgb(94, 145, 255) - } - &identifier { - color:#bbdf06; - text-decoration: underline - } - &keyword{ - color: rgb(122, 255, 228); - font-weight: bold; - } - &sqlkeyword{ - color: #027e44; - font-weight: bold; - } - &symbol { - color: grey - } -} \ No newline at end of file diff --git a/lykiadb-playground/app/main.tsx b/lykiadb-playground/app/main.tsx deleted file mode 100644 index b7792e1e..00000000 --- a/lykiadb-playground/app/main.tsx +++ /dev/null @@ -1,160 +0,0 @@ -"use client" - -import * as React from "react" -import { - CodeIcon, -} from "lucide-react" - -import { cn } from "@/lib/utils" - -import { - ResizableHandle, - ResizablePanel, - ResizablePanelGroup, -} from "@/components/ui/resizable" -import { Separator } from "@/components/ui/separator" -import { - Tabs, - TabsContent, - TabsList, - TabsTrigger, -} from "@/components/ui/tabs" -import { TooltipProvider } from "@/components/ui/tooltip" -import { Nav } from "./nav" - -import CodeMirror from '@uiw/react-codemirror'; -import JsonView from '@uiw/react-json-view'; -import init, { parse, tokenize } from "../pkg/index"; -import { lyql } from "./parser"; -import "./lyqlSyntax.scss"; - -await init(); - -const MainView = ({ - defaultLayout = [20, 32, 48], - defaultCollapsed = false, - navCollapsedSize = 4 -}) => { - - const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed) - - const [code, setCode] = React.useState(`SELECT { 'name': user.name } from users;`); - - const [ast, setAst] = React.useState({}); - - - function updateCode(code: string) { - setCode(code) - try { - const parsed = parse(code); - if (parsed) setAst(parsed); - } - catch (e) { - console.error(e); - } - } - - return ( - - { - document.cookie = `react-resizable-panels:layout:main=${JSON.stringify( - sizes - )}` - }} - className="h-full max-h-[800px] items-stretch" - > - { - setIsCollapsed(true) - document.cookie = `react-resizable-panels:collapsed=${JSON.stringify( - true - )}` - }} - onResize={() => { - setIsCollapsed(false) - document.cookie = `react-resizable-panels:collapsed=${JSON.stringify( - false - )}` - }} - className={cn( - isCollapsed && - "min-w-[50px] transition-all duration-300 ease-in-out" - )} - > -
-
- -