dAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJw b z_^v8bbg` SAn{I*4bH$u(RZ6*x UhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=p C^ S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk( $?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU ^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvh CL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c 70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397* _cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111a H}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*I cmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU &68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-= A= yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v #ix45EVrcEhr>!NMhprl $InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~ &^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7< 4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}sc Zlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+ 9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2 `1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M =hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S( O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/packages/playground-nextjs/app/globals.css b/packages/playground-nextjs/app/globals.css new file mode 100644 index 0000000..ce5b176 --- /dev/null +++ b/packages/playground-nextjs/app/globals.css @@ -0,0 +1,76 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --primary: 221.2 83.2% 53.3%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 221.2 83.2% 53.3%; + + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --primary: 217.2 91.2% 59.8%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 224.3 76.3% 48%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/packages/playground-nextjs/app/layout.tsx b/packages/playground-nextjs/app/layout.tsx new file mode 100644 index 0000000..c002620 --- /dev/null +++ b/packages/playground-nextjs/app/layout.tsx @@ -0,0 +1,33 @@ +import type { Metadata } from 'next' +import { Inter } from 'next/font/google' +import { ThemeProvider } from '@/components/biz/theme-provider' + +import './globals.css' + +const inter = Inter({ subsets: ['latin'] }) + +export const metadata: Metadata = { + title: 'TiSQLEditor', + description: 'TiSQLEditor Playground' +} + +export default function RootLayout({ + children +}: Readonly<{ + children: React.ReactNode +}>) { + return ( + + + + {children} + + + + ) +} diff --git a/packages/playground-nextjs/app/page.tsx b/packages/playground-nextjs/app/page.tsx new file mode 100644 index 0000000..c76c2db --- /dev/null +++ b/packages/playground-nextjs/app/page.tsx @@ -0,0 +1,7 @@ +export default function Home() { + return ( ++ Home + + ) +} diff --git a/packages/playground-nextjs/app/playground/editor-panel/actions.tsx b/packages/playground-nextjs/app/playground/editor-panel/actions.tsx new file mode 100644 index 0000000..7db4dbc --- /dev/null +++ b/packages/playground-nextjs/app/playground/editor-panel/actions.tsx @@ -0,0 +1,83 @@ +'use client' + +import Link from 'next/link' +import { GithubIcon, PlayIcon, RotateCwIcon } from 'lucide-react' +import { useMutation } from '@tanstack/react-query' + +import { useEditorCacheContext } from '@tidbcloud/tisqleditor-react' +import { SqlStatement } from '@tidbcloud/codemirror-extension-sql-parser' + +import { ModeToggle } from '@/components/biz/theme-toggle' +import { Button } from '@/components/ui/button' +import { useFilesContext } from '@/contexts/files-context' +import { useStatementContext } from '@/contexts/statement-context' + +export function EditorActions() { + const { + state: { activeFileId } + } = useFilesContext() + const { runStatement, setRunResult } = useStatementContext() + const cacheCtx = useEditorCacheContext() + + async function handleRunSQL() { + if (activeFileId === null) return + + const activeEditor = cacheCtx.getEditor(activeFileId) + if (!activeEditor) return + + let targetStatement: SqlStatement | undefined + const curStatements = activeEditor.getCurStatements() + if (curStatements[0].content === '') { + targetStatement = activeEditor.getNearbyStatement() + } else { + targetStatement = curStatements.at(-1) + } + + if (targetStatement) { + setRunResult({ statement: targetStatement.content, status: 'running' }) + try { + const res = await runStatement(activeFileId, targetStatement) + console.log('res:', res) + setRunResult(res) + } catch (error: any) { + console.log('error:', error) + setRunResult({ + statement: targetStatement.content, + status: 'error', + message: error.message ?? 'unknown error' + }) + } + } + } + + const runSQLMut = useMutation({ + mutationFn: handleRunSQL + }) + + return ( ++ + ++ ) +} diff --git a/packages/playground-nextjs/app/playground/editor-panel/editor.tsx b/packages/playground-nextjs/app/playground/editor-panel/editor.tsx new file mode 100644 index 0000000..48866c6 --- /dev/null +++ b/packages/playground-nextjs/app/playground/editor-panel/editor.tsx @@ -0,0 +1,170 @@ +'use client' + +import { useMemo, useRef } from 'react' +import { useTheme } from 'next-themes' + +import { EditorView, placeholder } from '@codemirror/view' +import { EditorState } from '@codemirror/state' +import { SQLConfig } from '@codemirror/lang-sql' + +import { SQLEditor } from '@tidbcloud/tisqleditor-react' +import { saveHelper } from '@tidbcloud/codemirror-extension-save-helper' +import { bbedit, oneDark } from '@tidbcloud/codemirror-extension-themes' +import { curSqlGutter } from '@tidbcloud/codemirror-extension-cur-sql-gutter' +import { + useDbLinter as checkUseDbLinter, + fullWidthCharLinter +} from '@tidbcloud/codemirror-extension-linters' +import { sqlAutoCompletion } from '@tidbcloud/codemirror-extension-sql-autocomplete' +import { + aiWidget, + isUnifiedMergeViewActive +} from '@tidbcloud/codemirror-extension-ai-widget' +import { getCurDatabase } from '@tidbcloud/codemirror-extension-cur-sql' + +import { useFilesContext } from '@/contexts/files-context' +import { SchemaRes, useSchemaContext } from '@/contexts/schema-context' +import { useChatContext } from '@/contexts/chat-context' + +function convertSchemaToSQLConfig(dbList: SchemaRes): SQLConfig { + const schema: any = {} + const tables: any[] = [] + + dbList.forEach((d) => { + const db = d.name + tables.push({ + label: db, + type: 'database' + }) + d.tables.forEach((t: any) => { + const table = t.name + tables.push({ label: table, type: 'table' }) + + const columns = t.columns.map((c: any) => ({ + label: c.col, + type: c.data_type + })) + tables.push(...columns) + + schema[`${db}.${table}`] = columns + schema[table] = columns + }) + }) + + return { schema, tables } +} + +// wholly shit! +// when I use `export function Editor`, and dynamic load this file, next.js still reports prerender error, `ReferenceError: navigator is not defined` after running `pnpm build`. +// full code: +// const MyEditor = dynamic(() => import("./editor").then((mod) => mod.Editor), { +// ssr: false, +// }); +// build logs: https://vercel.com/baurines-projects/tisqleditor/5Y4HjQY6xeDYVCBCaBrpLxawdYPD?filter=errors +// +// then I export Editor as default, aka `export default function Editor`, then, the error is dismissed, can't understand it totally. +// full code: +// const MyEditor = dynamic(() => import("./editor")), { +// ssr: false, +// }); +export default function Editor() { + const { + api: { saveFile }, + state: { activeFileId, openedFiles } + } = useFilesContext() + + const { resolvedTheme } = useTheme() + const isDark = resolvedTheme === 'dark' + + const { schema } = useSchemaContext() + const sqlConfig = useMemo( + () => convertSchemaToSQLConfig(schema ?? []), + [schema] + ) + const getDbListRef = useRef<() => string[]>() + getDbListRef.current = () => { + return schema?.map((d) => d.name) || [] + } + + const chatCtx = useChatContext() + + const activeFile = useMemo( + () => openedFiles.find((f) => f.id === activeFileId), + [activeFileId, openedFiles] + ) + + const extraExts = useMemo(() => { + if (activeFile && activeFile.status === 'loaded') { + return [ + saveHelper({ + save: (view: EditorView) => { + saveFile(activeFile.id, view.state.doc.toString()) + } + }), + sqlAutoCompletion(), + curSqlGutter({ + whenHide: (view) => { + return isUnifiedMergeViewActive(view.state) + } + }), + checkUseDbLinter({ + whenDisable: (_view) => { + return false + } + }), + fullWidthCharLinter(), + aiWidget({ + chat(view, chatId, req) { + const db = getCurDatabase(view.state) + req['extra']['db'] = db + return chatCtx.chat(chatId, { ...req }) + }, + cancelChat: chatCtx.cancelChat, + onEvent(_view, type, payload) { + chatCtx.onEvent(type, payload) + }, + getDbList: getDbListRef.current! + }) + ] + } + return [] + }, [activeFile]) + + if (!activeFile) { + return ( ++ + ++ ) + } + + if (activeFile.status === 'loading') { + return ( ++ TiSQLEditor +
++ ) + } + + return ( + + ) +} diff --git a/packages/playground-nextjs/app/playground/editor-panel/index.tsx b/packages/playground-nextjs/app/playground/editor-panel/index.tsx new file mode 100644 index 0000000..5786bdd --- /dev/null +++ b/packages/playground-nextjs/app/playground/editor-panel/index.tsx @@ -0,0 +1,22 @@ +import dynamic from 'next/dynamic' + +import { EditorActions } from './actions' +import { OpenedFilesTabs } from './opened-files' + +const Editor = dynamic(() => import('./editor'), { + ssr: false +}) + +export function EditorPanel() { + return ( + ++ ) +} diff --git a/packages/playground-nextjs/app/playground/editor-panel/opened-files.tsx b/packages/playground-nextjs/app/playground/editor-panel/opened-files.tsx new file mode 100644 index 0000000..cfbc5c6 --- /dev/null +++ b/packages/playground-nextjs/app/playground/editor-panel/opened-files.tsx @@ -0,0 +1,90 @@ +'use client' + +import { XIcon } from 'lucide-react' + +import { useEditorCacheContext } from '@tidbcloud/tisqleditor-react' + +import { Button } from '@/components/ui/button' +import { IFile, useFilesContext } from '@/contexts/files-context' + +export function OpenedFilesTabs() { + const { + api: { saveFile }, + state: { openedFiles, setOpenedFiles, activeFileId, setActiveFileId } + } = useFilesContext() + const cacheCtx = useEditorCacheContext() + + function handleCloseFile(file: IFile) { + const next = openedFiles.filter((f) => f.id !== file.id) + setOpenedFiles(next) + + // save if changed + const editorInst = cacheCtx.getEditor(file.id) + if (editorInst) { + const editorDoc = editorInst.editorView.state.doc.toString() + if (editorDoc !== file.content) { + saveFile(file.id, editorDoc) + } + } + + // cleanup + cacheCtx.deleteEditor(file.id) + + // close active file + if (activeFileId === file.id) { + if (next.length > 0) { + setActiveFileId(next[0].id) + } else { + // setActiveFileId(null) + setActiveFileId('') + } + } + } + + function handleSwitchFile(file: IFile) { + if (activeFileId === file.id) return + + setActiveFileId(file.id) + + // save pre file if changed + if (activeFileId) { + const preFile = openedFiles.find((f) => f.id === activeFileId) + const editorInst = cacheCtx.getEditor(activeFileId) + if (preFile && editorInst) { + const editorDoc = editorInst.editorView.state.doc.toString() + if (editorDoc !== preFile.content) { + saveFile(preFile.id, editorDoc) + } + } + } + } + + return ( ++++ + +++ + {openedFiles.map((f) => ( ++ ) +} diff --git a/packages/playground-nextjs/app/playground/files-panel/actions.tsx b/packages/playground-nextjs/app/playground/files-panel/actions.tsx new file mode 100644 index 0000000..5d61eb3 --- /dev/null +++ b/packages/playground-nextjs/app/playground/files-panel/actions.tsx @@ -0,0 +1,266 @@ +'use client' + +import { useEffect, useMemo, useState } from 'react' +import { MinusIcon, PencilIcon, PlusIcon, RotateCwIcon } from 'lucide-react' +import dayjs from 'dayjs' +import { useMutation, useQueryClient } from '@tanstack/react-query' + +import { useFilesContext } from '@/contexts/files-context' +import { Button } from '@/components/ui/button' +import { + AlertDialog, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger +} from '@/components/ui/alert-dialog' +import { + Dialog, + DialogContent, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger +} from '@/components/ui/dialog' +import { Input } from '@/components/ui/input' +import { cn } from '@/lib/utils' +import { useFilesQuery } from '@/hooks/use-files-loader' + +function AddFileButton() { + const { + state: { setAllFiles }, + api: { addFile } + } = useFilesContext() + + async function handleAddFile() { + const f = await addFile( + `file-${dayjs().format('MMDDHHmmss')}`, + '-- use {dbName};' + ) + setAllFiles((pre) => [...pre, { ...f }]) + } + + const queryClient = useQueryClient() + const addFileMut = useMutation({ + mutationFn: handleAddFile, + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: ['sql_files'] }) + } + }) + + return ( + + ) +} + +function RenameFileDialog() { + const { + state: { allFiles, setAllFiles, activeFileId, setOpenedFiles }, + api: { renameFile } + } = useFilesContext() + + const oriFileName = useMemo( + () => allFiles.find((f) => f.id === activeFileId)?.name ?? '', + [allFiles, activeFileId] + ) + const [newFileName, setNewFileName] = useState('') + useEffect(() => { + setNewFileName(oriFileName) + }, [oriFileName]) + + async function handleRenameFile() { + if (!activeFileId || newFileName === oriFileName) { + return + } + await renameFile(activeFileId, newFileName) + setAllFiles((pre) => { + const next = [...pre] + const target = next.find((f) => f.id === activeFileId) + target!.name = newFileName + return next + }) + setOpenedFiles((pre) => { + const pos = pre.findIndex((f) => f.id === activeFileId) + if (pos >= 0) { + const next = [...pre] + next[pos].name = newFileName + return next + } + return pre + }) + } + + const queryClient = useQueryClient() + const renameFileMut = useMutation({ + mutationFn: handleRenameFile, + onSuccess: () => { + setOpen(false) + queryClient.invalidateQueries({ queryKey: ['sql_files'] }) + } + }) + + const [open, setOpen] = useState(false) + + return ( + + ) +} + +function DelFileAlertDialog() { + const { + state: { + allFiles, + setAllFiles, + activeFileId, + setActiveFileId, + openedFiles, + setOpenedFiles + }, + api: { delFile } + } = useFilesContext() + + const fileName = useMemo( + () => allFiles.find((f) => f.id === activeFileId)?.name ?? '', + [allFiles, activeFileId] + ) + + async function handleDeleteFile() { + if (!activeFileId) { + return + } + await delFile(activeFileId) + setAllFiles((pre) => pre.filter((f) => f.id !== activeFileId)) + + const nextOpenedFiles = openedFiles.filter((f) => f.id !== activeFileId) + setOpenedFiles(nextOpenedFiles) + + setActiveFileId(nextOpenedFiles[0]?.id ?? null) + } + + const queryClient = useQueryClient() + const delFileMut = useMutation({ + mutationFn: handleDeleteFile, + onSuccess: () => { + setOpen(false) + queryClient.invalidateQueries({ queryKey: ['sql_files'] }) + } + }) + + const [open, setOpen] = useState(false) + + return ( +handleSwitchFile(f)} + > ++ ))} + ++ {f.name} +
+ ++ + ) +} + +function ReloadButton() { + const { isFetching, refetch } = useFilesQuery() + + return ( + + ) +} + +export function FilesActions() { + return ( ++ + ++ ++ ++ Are you sure to delete {fileName}? + ++ This action cannot be undone. This will permanently delete your SQL + file and remove your data from our servers. + ++ +Cancel + + +++ ) +} diff --git a/packages/playground-nextjs/app/playground/files-panel/index.tsx b/packages/playground-nextjs/app/playground/files-panel/index.tsx new file mode 100644 index 0000000..e186186 --- /dev/null +++ b/packages/playground-nextjs/app/playground/files-panel/index.tsx @@ -0,0 +1,11 @@ +import { FilesActions } from './actions' +import { FilesList } from './list' + +export default function FilesPanel() { + return ( ++ + + + ++ ) +} diff --git a/packages/playground-nextjs/app/playground/files-panel/list.tsx b/packages/playground-nextjs/app/playground/files-panel/list.tsx new file mode 100644 index 0000000..9ca51a5 --- /dev/null +++ b/packages/playground-nextjs/app/playground/files-panel/list.tsx @@ -0,0 +1,76 @@ +'use client' + +import { useEffect } from 'react' + +import { IFile, useFilesContext } from '@/contexts/files-context' +import { Skeleton } from '@/components/ui/skeleton' +import { useFilesQuery } from '@/hooks/use-files-loader' + +export function FilesList() { + const { + state: { + allFiles, + openedFiles, + setOpenedFiles, + activeFileId, + setActiveFileId + }, + api: { openFile } + } = useFilesContext() + + const { isLoading } = useFilesQuery() + + useEffect(() => { + if (activeFileId === null && allFiles.length > 0) { + handleOpenFile(allFiles[0]) + } + }, [allFiles, activeFileId]) + + async function handleOpenFile(file: IFile) { + setActiveFileId(file.id) + + const opened = openedFiles.find((f) => f.id === file.id) + if (!opened) { + setOpenedFiles((pre) => [...pre, { ...file, status: 'loading' }]) + const f = await openFile(file.id) + setOpenedFiles((pre) => { + const pos = pre.findIndex((f) => f.id === file.id) + if (pos >= 0) { + const next = pre.concat() + next.splice(pos, 1, { ...f, status: 'loaded' }) + return next + } + return pre + }) + } + } + + if (isLoading) { + return ( ++ + ++ ) + } + + return ( ++ + + + + {allFiles.map((f) => ( +
+ ) +} diff --git a/packages/playground-nextjs/app/playground/left-panel.tsx b/packages/playground-nextjs/app/playground/left-panel.tsx new file mode 100644 index 0000000..0a7c318 --- /dev/null +++ b/packages/playground-nextjs/app/playground/left-panel.tsx @@ -0,0 +1,31 @@ +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' + +import FilesPanel from './files-panel' +import { SchemaPanel } from './schema-panel' + +export function LeftPanel() { + return ( +- + handleOpenFile(f)} + title={f.name} + > + {f.name} + +
+ ))} +++ ) +} diff --git a/packages/playground-nextjs/app/playground/page.tsx b/packages/playground-nextjs/app/playground/page.tsx new file mode 100644 index 0000000..bc63891 --- /dev/null +++ b/packages/playground-nextjs/app/playground/page.tsx @@ -0,0 +1,27 @@ +import { Panels } from './panels' +import { QueryProvider } from '@/contexts/query-provider' +import { StatementProvider } from '@/contexts/statement-context-provider' +import { SchemaProvider } from '@/contexts/schema-context-provider' +import { FilesProvider } from '@/contexts/files-context-provider' +import { ChatProvider } from '@/contexts/chat-context-provider' +import { EditorProvider } from '@/contexts/editor-cache-provider' + +export default function Page() { + return ( +++ ++ TiSQLEditor Playground +
++++ ++ +SQL Files +Schemas ++ ++ + ++ + + ) +} diff --git a/packages/playground-nextjs/app/playground/panels.tsx b/packages/playground-nextjs/app/playground/panels.tsx new file mode 100644 index 0000000..5d91193 --- /dev/null +++ b/packages/playground-nextjs/app/playground/panels.tsx @@ -0,0 +1,34 @@ +import { + ResizableHandle, + ResizablePanel, + ResizablePanelGroup +} from '@/components/ui/resizable' +import { LeftPanel } from './left-panel' +import { EditorPanel } from './editor-panel' +import { ResultPanel } from './result-panel' + +export function Panels() { + return ( ++ ++ ++ ++ ++ ++ ++ + + ) +} diff --git a/packages/playground-nextjs/app/playground/result-panel.tsx b/packages/playground-nextjs/app/playground/result-panel.tsx new file mode 100644 index 0000000..b985a0f --- /dev/null +++ b/packages/playground-nextjs/app/playground/result-panel.tsx @@ -0,0 +1,86 @@ +'use client' + +import { + Table, + TableBody, + TableCaption, + TableCell, + TableHead, + TableHeader, + TableRow +} from '@/components/ui/table' + +import { useStatementContext } from '@/contexts/statement-context' + +export function ResultPanel() { + const { runResult } = useStatementContext() + + if (runResult.status === 'error') { + return ( ++ + ++ + + + ++ ++ + ++ + + + ++ ++ ) + } + + if (runResult.status === 'running') { + return ( ++
++ {runResult.statement} +
+Query Failed: {runResult.message}
+++ ) + } + + if (runResult.rowCount === 0) { + return ( ++
++ {runResult.statement} +
+Running
+++ ) + } + + if (runResult.rowCount > 0) { + return ( ++
++ {runResult.statement} +
+Query OK
+++ ) + } + + return null +} diff --git a/packages/playground-nextjs/app/playground/schema-panel/actions.tsx b/packages/playground-nextjs/app/playground/schema-panel/actions.tsx new file mode 100644 index 0000000..8cdd1cd --- /dev/null +++ b/packages/playground-nextjs/app/playground/schema-panel/actions.tsx @@ -0,0 +1,31 @@ +'use client' + +import { RotateCwIcon } from 'lucide-react' + +import { Button } from '@/components/ui/button' +import { cn } from '@/lib/utils' +import { useSchemaQuery } from '@/hooks/use-schema-loader' + +function ReloadButton() { + const { isFetching, refetch } = useSchemaQuery() + + return ( + + ) +} + +export function SchemaActions() { + return ( ++
+Show at most 10 results here + ++ + ++ {Object.keys(runResult.types).map((h) => ( + +{h} + ))} ++ {runResult.rows.slice(0, 10).map((row: any, idx: any) => ( + ++ {row.map((item: any, c_idx: any) => ( + + ))} +{item} + ))} +++ ) +} diff --git a/packages/playground-nextjs/app/playground/schema-panel/index.tsx b/packages/playground-nextjs/app/playground/schema-panel/index.tsx new file mode 100644 index 0000000..c597f52 --- /dev/null +++ b/packages/playground-nextjs/app/playground/schema-panel/index.tsx @@ -0,0 +1,11 @@ +import { SchemaActions } from './actions' +import { SchemaTree } from './schema-tree' + +export function SchemaPanel() { + return ( ++ ++ ) +} diff --git a/packages/playground-nextjs/app/playground/schema-panel/schema-tree.tsx b/packages/playground-nextjs/app/playground/schema-panel/schema-tree.tsx new file mode 100644 index 0000000..ef8a1fa --- /dev/null +++ b/packages/playground-nextjs/app/playground/schema-panel/schema-tree.tsx @@ -0,0 +1,55 @@ +'use client' + +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger +} from '@/components/ui/accordion' +import { Skeleton } from '@/components/ui/skeleton' +import { useSchemaContext } from '@/contexts/schema-context' +import { useSchemaQuery } from '@/hooks/use-schema-loader' + +export function SchemaTree() { + const { schema } = useSchemaContext() + const { isLoading } = useSchemaQuery() + + if (isLoading) { + return ( ++ + ++ ) + } + + return ( ++ + + + + {schema?.map((s) => ( + + ) +} diff --git a/packages/playground-nextjs/components.json b/packages/playground-nextjs/components.json new file mode 100644 index 0000000..fa674c9 --- /dev/null +++ b/packages/playground-nextjs/components.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "default", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "tailwind.config.ts", + "css": "app/globals.css", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils" + } +} diff --git a/packages/playground-nextjs/components/biz/dynamic-editor-example.tsx b/packages/playground-nextjs/components/biz/dynamic-editor-example.tsx new file mode 100644 index 0000000..fb79f8b --- /dev/null +++ b/packages/playground-nextjs/components/biz/dynamic-editor-example.tsx @@ -0,0 +1,11 @@ +import dynamic from 'next/dynamic' + +// https://dev.to/vvo/how-to-solve-window-is-not-defined-errors-in-react-and-next-js-5f97 +// use dynamic load to resolve compile error when running `next build` + +export const DynamicEditorExample = dynamic( + () => import('./editor-example').then((mod) => mod.EditorExample), + { + ssr: false + } +) diff --git a/packages/playground-nextjs/components/biz/editor-example.tsx b/packages/playground-nextjs/components/biz/editor-example.tsx new file mode 100644 index 0000000..5e3c4a0 --- /dev/null +++ b/packages/playground-nextjs/components/biz/editor-example.tsx @@ -0,0 +1,203 @@ +'use client' + +import { useEffect, useMemo, useState } from 'react' +import { EditorView } from '@codemirror/view' +import { Extension } from '@codemirror/state' + +import { SQLEditor } from '@tidbcloud/tisqleditor-react' +import { saveHelper } from '@tidbcloud/codemirror-extension-save-helper' +import { bbedit, oneDark } from '@tidbcloud/codemirror-extension-themes' +import { curSqlGutter } from '@tidbcloud/codemirror-extension-cur-sql-gutter' +import { + useDbLinter as checkUseDbLinter, + fullWidthCharLinter +} from '@tidbcloud/codemirror-extension-linters' +import { sqlAutoCompletion } from '@tidbcloud/codemirror-extension-sql-autocomplete' +import { + aiWidget, + isUnifiedMergeViewActive +} from '@tidbcloud/codemirror-extension-ai-widget' +import { + onDocChange, + onSelectionChange +} from '@tidbcloud/codemirror-extension-events' + +import { useTheme } from 'next-themes' + +import { Toaster } from '@/components/ui/toaster' +import { useToast } from '@/components/ui/use-toast' +import { delay } from '@/lib/delay' +import { setLocalStorageItem } from '@/lib/env-vars' +import { cn } from '@/lib/utils' + +const DOC_1 = `USE game;` +const DOC_2 = `-- USE game;` +const DOC_3 = `-- USE gameï¼›` +const DOC_4 = `-- press cmd+s to save content` +const DOC_5 = ` +SELECT + name, + average_playtime_forever +FROM + games +ORDER BY + average_playtime_forever DESC +LIMIT + 10; +` + +const ALL_EXAMPLES = [ + 'ai-widget', + 'sql-autocomplete', + 'cur-sql-gutter', + 'use-db-linter', + 'full-width-char-linter', + 'save-helper', + 'events' +] + +const THEME_EXTS: { [key: string]: Extension } = { + light: bbedit, + bbedit: bbedit, + dark: oneDark, + oneDark: oneDark +} + +const EXAMPLE_DOCS: { [key: string]: string } = { + 'use-db-linter': DOC_2, + 'full-width-char-linter': DOC_3, + 'save-helper': DOC_4 +} + +export function EditorExample({ + example = '', + theme = '', + withSelect = false +}: { + example?: string + theme?: string + withSelect?: boolean +}) { + const { setTheme: setAppTheme } = useTheme() + + useEffect(() => { + setAppTheme(theme === 'oneDark' || theme === 'dark' ? 'dark' : 'light') + }, [theme, setAppTheme]) + + const [output, setOutput] = useState('') + + const { toast } = useToast() + + const exampleArr = useMemo(() => { + let exampleArr = example.split(',') + if (exampleArr.includes('all')) { + exampleArr = ALL_EXAMPLES + } + return [...new Set(exampleArr)] + }, [example]) + + useEffect(() => { + setOutput('') + }, [exampleArr]) + + const showOutputBox = exampleArr.includes('events') + + const exts: { [key: string]: Extension } = useMemo( + () => ({ + 'ai-widget': aiWidget({ + chat: async () => { + await delay(2000) + return { + status: 'success', + message: + 'select * from test;\n-- the data is mocked, replace by your own api when using' + } + }, + cancelChat: () => {}, + getDbList: () => { + return ['test1', 'test2'] + } + }), + 'sql-autocomplete': sqlAutoCompletion(), + 'cur-sql-gutter': curSqlGutter({ + whenHide(view) { + return isUnifiedMergeViewActive(view.state) + } + }), + 'use-db-linter': checkUseDbLinter(), + 'full-width-char-linter': fullWidthCharLinter(), + 'save-helper': saveHelper({ + save: (view: EditorView) => { + toast({ description: 'Doc has saved to local storage.' }) + setLocalStorageItem( + 'example.save_helper.doc', + view.state.doc.toString() + ) + } + }), + events: [ + onDocChange((_view, content) => { + const s = `Doc changes, current doc:\n\n${content}` + console.log(s) + setOutput(s) + }), + onSelectionChange((view, sels) => { + if (sels.length === 0 || sels[0].from === sels[0].to) { + return + } + const s = `Selection changes, select from ${sels[0].from} to ${ + sels[0].to + }\nSelected content:\n${view.state.sliceDoc( + sels[0].from, + sels[0].to + )}` + console.log(s) + setOutput(s) + }) + ] + }), + [toast] + ) + + const extraExts = useMemo(() => { + return exampleArr.map((item) => exts[item]).filter((ex) => !!ex) + }, [exampleArr, exts]) + + const doc = useMemo(() => { + let str = exampleArr + .map((item) => EXAMPLE_DOCS[item]) + .filter((s) => !!s) + .join('\n') + if (str === '') { + str = DOC_1 + } + return [str, DOC_5].join('\n') + }, [exampleArr]) + + return ( ++ + ))} +{s.name} ++ ++ {s.tables.map((t) => ( + ++ + ))} +{t.name} ++ {t.columns.map((col) => ( + +{col.col}+ ))} +++ ) +} diff --git a/packages/playground-nextjs/components/biz/theme-provider.tsx b/packages/playground-nextjs/components/biz/theme-provider.tsx new file mode 100644 index 0000000..cb8c4c3 --- /dev/null +++ b/packages/playground-nextjs/components/biz/theme-provider.tsx @@ -0,0 +1,8 @@ +'use client' + +import { ThemeProvider as NextThemesProvider } from 'next-themes' +import { type ThemeProviderProps } from 'next-themes/dist/types' + +export function ThemeProvider({ children, ...props }: ThemeProviderProps) { + return+ + {showOutputBox && ( + ++ )} + +++{output}
++ {children} +} diff --git a/packages/playground-nextjs/components/biz/theme-toggle.tsx b/packages/playground-nextjs/components/biz/theme-toggle.tsx new file mode 100644 index 0000000..6bf1fce --- /dev/null +++ b/packages/playground-nextjs/components/biz/theme-toggle.tsx @@ -0,0 +1,40 @@ +'use client' + +import * as React from 'react' +import { MoonIcon, SunIcon } from 'lucide-react' +import { useTheme } from 'next-themes' + +import { Button } from '@/components/ui/button' +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger +} from '@/components/ui/dropdown-menu' + +export function ModeToggle() { + const { setTheme } = useTheme() + + return ( ++ + ) +} diff --git a/packages/playground-nextjs/components/ui/accordion.tsx b/packages/playground-nextjs/components/ui/accordion.tsx new file mode 100644 index 0000000..6f6079b --- /dev/null +++ b/packages/playground-nextjs/components/ui/accordion.tsx @@ -0,0 +1,58 @@ +'use client' + +import * as React from 'react' +import * as AccordionPrimitive from '@radix-ui/react-accordion' +import { ChevronDown } from 'lucide-react' + +import { cn } from '@/lib/utils' + +const Accordion = AccordionPrimitive.Root + +const AccordionItem = React.forwardRef< + React.ElementRef+ + ++ +setTheme('light')}> + Light + +setTheme('dark')}> + Dark + +setTheme('system')}> + System + +, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AccordionItem.displayName = 'AccordionItem' + +const AccordionTrigger = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + +)) +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName + +const AccordionContent = React.forwardRef< + React.ElementRefsvg]:rotate-180', + className + )} + {...props} + > + {children} + ++ , + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + +)) + +AccordionContent.displayName = AccordionPrimitive.Content.displayName + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/packages/playground-nextjs/components/ui/alert-dialog.tsx b/packages/playground-nextjs/components/ui/alert-dialog.tsx new file mode 100644 index 0000000..ab74973 --- /dev/null +++ b/packages/playground-nextjs/components/ui/alert-dialog.tsx @@ -0,0 +1,141 @@ +'use client' + +import * as React from 'react' +import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog' + +import { cn } from '@/lib/utils' +import { buttonVariants } from '@/components/ui/button' + +const AlertDialog = AlertDialogPrimitive.Root + +const AlertDialogTrigger = AlertDialogPrimitive.Trigger + +const AlertDialogPortal = AlertDialogPrimitive.Portal + +const AlertDialogOverlay = React.forwardRef< + React.ElementRef{children}+, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName + +const AlertDialogContent = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + +)) +AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName + +const AlertDialogHeader = ({ + className, + ...props +}: React.HTMLAttributes+ + ) => ( + +) +AlertDialogHeader.displayName = 'AlertDialogHeader' + +const AlertDialogFooter = ({ + className, + ...props +}: React.HTMLAttributes ) => ( + +) +AlertDialogFooter.displayName = 'AlertDialogFooter' + +const AlertDialogTitle = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName + +const AlertDialogDescription = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AlertDialogDescription.displayName = + AlertDialogPrimitive.Description.displayName + +const AlertDialogAction = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName + +const AlertDialogCancel = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel +} diff --git a/packages/playground-nextjs/components/ui/button.tsx b/packages/playground-nextjs/components/ui/button.tsx new file mode 100644 index 0000000..123b28e --- /dev/null +++ b/packages/playground-nextjs/components/ui/button.tsx @@ -0,0 +1,57 @@ +import * as React from 'react' +import { Slot } from '@radix-ui/react-slot' +import { cva, type VariantProps } from 'class-variance-authority' + +import { cn } from '@/lib/utils' + +const buttonVariants = cva( + 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', + { + variants: { + variant: { + default: + 'bg-primary text-primary-foreground shadow hover:bg-primary/90', + destructive: + 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', + outline: + 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground', + secondary: + 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80', + ghost: 'hover:bg-accent hover:text-accent-foreground', + link: 'text-primary underline-offset-4 hover:underline' + }, + size: { + default: 'h-9 px-4 py-2', + sm: 'h-8 rounded-md px-3 text-xs', + lg: 'h-10 rounded-md px-8', + icon: 'h-9 w-9' + } + }, + defaultVariants: { + variant: 'default', + size: 'default' + } + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes , + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef ( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : 'button' + return ( + + ) + } +) +Button.displayName = 'Button' + +export { Button, buttonVariants } diff --git a/packages/playground-nextjs/components/ui/dialog.tsx b/packages/playground-nextjs/components/ui/dialog.tsx new file mode 100644 index 0000000..5509e2d --- /dev/null +++ b/packages/playground-nextjs/components/ui/dialog.tsx @@ -0,0 +1,122 @@ +'use client' + +import * as React from 'react' +import * as DialogPrimitive from '@radix-ui/react-dialog' +import { X } from 'lucide-react' + +import { cn } from '@/lib/utils' + +const Dialog = DialogPrimitive.Root + +const DialogTrigger = DialogPrimitive.Trigger + +const DialogPortal = DialogPrimitive.Portal + +const DialogClose = DialogPrimitive.Close + +const DialogOverlay = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName + +const DialogContent = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + +)) +DialogContent.displayName = DialogPrimitive.Content.displayName + +const DialogHeader = ({ + className, + ...props +}: React.HTMLAttributes+ + {children} + ++ ++ Close + ) => ( + +) +DialogHeader.displayName = 'DialogHeader' + +const DialogFooter = ({ + className, + ...props +}: React.HTMLAttributes ) => ( + +) +DialogFooter.displayName = 'DialogFooter' + +const DialogTitle = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogTitle.displayName = DialogPrimitive.Title.displayName + +const DialogDescription = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogDescription.displayName = DialogPrimitive.Description.displayName + +export { + Dialog, + DialogPortal, + DialogOverlay, + DialogClose, + DialogTrigger, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription +} diff --git a/packages/playground-nextjs/components/ui/dropdown-menu.tsx b/packages/playground-nextjs/components/ui/dropdown-menu.tsx new file mode 100644 index 0000000..b074412 --- /dev/null +++ b/packages/playground-nextjs/components/ui/dropdown-menu.tsx @@ -0,0 +1,200 @@ +'use client' + +import * as React from 'react' +import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu' +import { Check, ChevronRight, Circle } from 'lucide-react' + +import { cn } from '@/lib/utils' + +const DropdownMenu = DropdownMenuPrimitive.Root + +const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger + +const DropdownMenuGroup = DropdownMenuPrimitive.Group + +const DropdownMenuPortal = DropdownMenuPrimitive.Portal + +const DropdownMenuSub = DropdownMenuPrimitive.Sub + +const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup + +const DropdownMenuSubTrigger = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef & { + inset?: boolean + } +>(({ className, inset, children, ...props }, ref) => ( + + {children} + +)) +DropdownMenuSubTrigger.displayName = + DropdownMenuPrimitive.SubTrigger.displayName + +const DropdownMenuSubContent = React.forwardRef< + React.ElementRef+ , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DropdownMenuSubContent.displayName = + DropdownMenuPrimitive.SubContent.displayName + +const DropdownMenuContent = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, sideOffset = 4, ...props }, ref) => ( + + +)) +DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName + +const DropdownMenuItem = React.forwardRef< + React.ElementRef+ , + React.ComponentPropsWithoutRef & { + inset?: boolean + } +>(({ className, inset, ...props }, ref) => ( + +)) +DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName + +const DropdownMenuCheckboxItem = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, children, checked, ...props }, ref) => ( + + + +)) +DropdownMenuCheckboxItem.displayName = + DropdownMenuPrimitive.CheckboxItem.displayName + +const DropdownMenuRadioItem = React.forwardRef< + React.ElementRef+ + + {children} ++ , + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + +)) +DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName + +const DropdownMenuLabel = React.forwardRef< + React.ElementRef+ + + {children} ++ , + React.ComponentPropsWithoutRef & { + inset?: boolean + } +>(({ className, inset, ...props }, ref) => ( + +)) +DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName + +const DropdownMenuSeparator = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName + +const DropdownMenuShortcut = ({ + className, + ...props +}: React.HTMLAttributes ) => { + return ( + + ) +} +DropdownMenuShortcut.displayName = 'DropdownMenuShortcut' + +export { + DropdownMenu, + DropdownMenuTrigger, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuCheckboxItem, + DropdownMenuRadioItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuShortcut, + DropdownMenuGroup, + DropdownMenuPortal, + DropdownMenuSub, + DropdownMenuSubContent, + DropdownMenuSubTrigger, + DropdownMenuRadioGroup +} diff --git a/packages/playground-nextjs/components/ui/input.tsx b/packages/playground-nextjs/components/ui/input.tsx new file mode 100644 index 0000000..d52138b --- /dev/null +++ b/packages/playground-nextjs/components/ui/input.tsx @@ -0,0 +1,25 @@ +import * as React from 'react' + +import { cn } from '@/lib/utils' + +export interface InputProps + extends React.InputHTMLAttributes {} + +const Input = React.forwardRef ( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = 'Input' + +export { Input } diff --git a/packages/playground-nextjs/components/ui/resizable.tsx b/packages/playground-nextjs/components/ui/resizable.tsx new file mode 100644 index 0000000..16b1b2d --- /dev/null +++ b/packages/playground-nextjs/components/ui/resizable.tsx @@ -0,0 +1,45 @@ +'use client' + +import { GripVertical } from 'lucide-react' +import * as ResizablePrimitive from 'react-resizable-panels' + +import { cn } from '@/lib/utils' + +const ResizablePanelGroup = ({ + className, + ...props +}: React.ComponentProps ) => ( + +) + +const ResizablePanel = ResizablePrimitive.Panel + +const ResizableHandle = ({ + withHandle, + className, + ...props +}: React.ComponentProps & { + withHandle?: boolean +}) => ( + div]:rotate-90', + className + )} + {...props} + > + {withHandle && ( + +) + +export { ResizablePanelGroup, ResizablePanel, ResizableHandle } diff --git a/packages/playground-nextjs/components/ui/select.tsx b/packages/playground-nextjs/components/ui/select.tsx new file mode 100644 index 0000000..b7e2546 --- /dev/null +++ b/packages/playground-nextjs/components/ui/select.tsx @@ -0,0 +1,160 @@ +'use client' + +import * as React from 'react' +import * as SelectPrimitive from '@radix-ui/react-select' +import { Check, ChevronDown, ChevronUp } from 'lucide-react' + +import { cn } from '@/lib/utils' + +const Select = SelectPrimitive.Root + +const SelectGroup = SelectPrimitive.Group + +const SelectValue = SelectPrimitive.Value + +const SelectTrigger = React.forwardRef< + React.ElementRef++ )} ++ , + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + span]:line-clamp-1', + className + )} + {...props} + > + {children} + +)) +SelectTrigger.displayName = SelectPrimitive.Trigger.displayName + +const SelectScrollUpButton = React.forwardRef< + React.ElementRef+ ++ , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + +)) +SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName + +const SelectScrollDownButton = React.forwardRef< + React.ElementRef+ , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + +)) +SelectScrollDownButton.displayName = + SelectPrimitive.ScrollDownButton.displayName + +const SelectContent = React.forwardRef< + React.ElementRef+ , + React.ComponentPropsWithoutRef +>(({ className, children, position = 'popper', ...props }, ref) => ( + + +)) +SelectContent.displayName = SelectPrimitive.Content.displayName + +const SelectLabel = React.forwardRef< + React.ElementRef+ ++ + {children} + ++ , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SelectLabel.displayName = SelectPrimitive.Label.displayName + +const SelectItem = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + +)) +SelectItem.displayName = SelectPrimitive.Item.displayName + +const SelectSeparator = React.forwardRef< + React.ElementRef+ + + ++ {children} +, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SelectSeparator.displayName = SelectPrimitive.Separator.displayName + +export { + Select, + SelectGroup, + SelectValue, + SelectTrigger, + SelectContent, + SelectLabel, + SelectItem, + SelectSeparator, + SelectScrollUpButton, + SelectScrollDownButton +} diff --git a/packages/playground-nextjs/components/ui/skeleton.tsx b/packages/playground-nextjs/components/ui/skeleton.tsx new file mode 100644 index 0000000..c23a30d --- /dev/null +++ b/packages/playground-nextjs/components/ui/skeleton.tsx @@ -0,0 +1,15 @@ +import { cn } from '@/lib/utils' + +function Skeleton({ + className, + ...props +}: React.HTMLAttributes ) { + return ( + + ) +} + +export { Skeleton } diff --git a/packages/playground-nextjs/components/ui/table.tsx b/packages/playground-nextjs/components/ui/table.tsx new file mode 100644 index 0000000..893974f --- /dev/null +++ b/packages/playground-nextjs/components/ui/table.tsx @@ -0,0 +1,117 @@ +import * as React from 'react' + +import { cn } from '@/lib/utils' + +const Table = React.forwardRef< + HTMLTableElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + ++)) +Table.displayName = 'Table' + +const TableHeader = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes+
+>(({ className, ...props }, ref) => ( + +)) +TableHeader.displayName = 'TableHeader' + +const TableBody = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableBody.displayName = 'TableBody' + +const TableFooter = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + tr]:last:border-b-0', + className + )} + {...props} + /> +)) +TableFooter.displayName = 'TableFooter' + +const TableRow = React.forwardRef< + HTMLTableRowElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableRow.displayName = 'TableRow' + +const TableHead = React.forwardRef< + HTMLTableCellElement, + React.ThHTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableHead.displayName = 'TableHead' + +const TableCell = React.forwardRef< + HTMLTableCellElement, + React.TdHTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableCell.displayName = 'TableCell' + +const TableCaption = React.forwardRef< + HTMLTableCaptionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableCaption.displayName = 'TableCaption' + +export { + Table, + TableHeader, + TableBody, + TableFooter, + TableHead, + TableRow, + TableCell, + TableCaption +} diff --git a/packages/playground-nextjs/components/ui/tabs.tsx b/packages/playground-nextjs/components/ui/tabs.tsx new file mode 100644 index 0000000..0a9f086 --- /dev/null +++ b/packages/playground-nextjs/components/ui/tabs.tsx @@ -0,0 +1,55 @@ +'use client' + +import * as React from 'react' +import * as TabsPrimitive from '@radix-ui/react-tabs' + +import { cn } from '@/lib/utils' + +const Tabs = TabsPrimitive.Root + +const TabsList = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsList.displayName = TabsPrimitive.List.displayName + +const TabsTrigger = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsTrigger.displayName = TabsPrimitive.Trigger.displayName + +const TabsContent = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsContent.displayName = TabsPrimitive.Content.displayName + +export { Tabs, TabsList, TabsTrigger, TabsContent } diff --git a/packages/playground-nextjs/components/ui/toast.tsx b/packages/playground-nextjs/components/ui/toast.tsx new file mode 100644 index 0000000..90549a0 --- /dev/null +++ b/packages/playground-nextjs/components/ui/toast.tsx @@ -0,0 +1,129 @@ +'use client' + +import * as React from 'react' +import * as ToastPrimitives from '@radix-ui/react-toast' +import { cva, type VariantProps } from 'class-variance-authority' +import { X } from 'lucide-react' + +import { cn } from '@/lib/utils' + +const ToastProvider = ToastPrimitives.Provider + +const ToastViewport = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +ToastViewport.displayName = ToastPrimitives.Viewport.displayName + +const toastVariants = cva( + 'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full', + { + variants: { + variant: { + default: 'border bg-background text-foreground', + destructive: + 'destructive group border-destructive bg-destructive text-destructive-foreground' + } + }, + defaultVariants: { + variant: 'default' + } + } +) + +const Toast = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef & + VariantProps +>(({ className, variant, ...props }, ref) => { + return ( + + ) +}) +Toast.displayName = ToastPrimitives.Root.displayName + +const ToastAction = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +ToastAction.displayName = ToastPrimitives.Action.displayName + +const ToastClose = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + +)) +ToastClose.displayName = ToastPrimitives.Close.displayName + +const ToastTitle = React.forwardRef< + React.ElementRef+ , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +ToastTitle.displayName = ToastPrimitives.Title.displayName + +const ToastDescription = React.forwardRef< + React.ElementRef , + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +ToastDescription.displayName = ToastPrimitives.Description.displayName + +type ToastProps = React.ComponentPropsWithoutRef + +type ToastActionElement = React.ReactElement + +export { + type ToastProps, + type ToastActionElement, + ToastProvider, + ToastViewport, + Toast, + ToastTitle, + ToastDescription, + ToastClose, + ToastAction +} diff --git a/packages/playground-nextjs/components/ui/toaster.tsx b/packages/playground-nextjs/components/ui/toaster.tsx new file mode 100644 index 0000000..8fbf8b8 --- /dev/null +++ b/packages/playground-nextjs/components/ui/toaster.tsx @@ -0,0 +1,35 @@ +'use client' + +import { + Toast, + ToastClose, + ToastDescription, + ToastProvider, + ToastTitle, + ToastViewport +} from '@/components/ui/toast' +import { useToast } from '@/components/ui/use-toast' + +export function Toaster() { + const { toasts } = useToast() + + return ( + + {toasts.map(function ({ id, title, description, action, ...props }) { + return ( + + ) +} diff --git a/packages/playground-nextjs/components/ui/use-toast.ts b/packages/playground-nextjs/components/ui/use-toast.ts new file mode 100644 index 0000000..46a10df --- /dev/null +++ b/packages/playground-nextjs/components/ui/use-toast.ts @@ -0,0 +1,191 @@ +'use client' + +// Inspired by react-hot-toast library +import * as React from 'react' + +import type { ToastActionElement, ToastProps } from '@/components/ui/toast' + +const TOAST_LIMIT = 1 +const TOAST_REMOVE_DELAY = 1000000 + +type ToasterToast = ToastProps & { + id: string + title?: React.ReactNode + description?: React.ReactNode + action?: ToastActionElement +} + +const actionTypes = { + ADD_TOAST: 'ADD_TOAST', + UPDATE_TOAST: 'UPDATE_TOAST', + DISMISS_TOAST: 'DISMISS_TOAST', + REMOVE_TOAST: 'REMOVE_TOAST' +} as const + +let count = 0 + +function genId() { + count = (count + 1) % Number.MAX_SAFE_INTEGER + return count.toString() +} + +type ActionType = typeof actionTypes + +type Action = + | { + type: ActionType['ADD_TOAST'] + toast: ToasterToast + } + | { + type: ActionType['UPDATE_TOAST'] + toast: Partial+ + ) + })} ++ {title &&+ {action} +{title} } + {description && ( +{description} + )} ++ + + } + | { + type: ActionType['DISMISS_TOAST'] + toastId?: ToasterToast['id'] + } + | { + type: ActionType['REMOVE_TOAST'] + toastId?: ToasterToast['id'] + } + +interface State { + toasts: ToasterToast[] +} + +const toastTimeouts = new Map >() + +const addToRemoveQueue = (toastId: string) => { + if (toastTimeouts.has(toastId)) { + return + } + + const timeout = setTimeout(() => { + toastTimeouts.delete(toastId) + dispatch({ + type: 'REMOVE_TOAST', + toastId: toastId + }) + }, TOAST_REMOVE_DELAY) + + toastTimeouts.set(toastId, timeout) +} + +export const reducer = (state: State, action: Action): State => { + switch (action.type) { + case 'ADD_TOAST': + return { + ...state, + toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT) + } + + case 'UPDATE_TOAST': + return { + ...state, + toasts: state.toasts.map((t) => + t.id === action.toast.id ? { ...t, ...action.toast } : t + ) + } + + case 'DISMISS_TOAST': { + const { toastId } = action + + // ! Side effects ! - This could be extracted into a dismissToast() action, + // but I'll keep it here for simplicity + if (toastId) { + addToRemoveQueue(toastId) + } else { + state.toasts.forEach((toast) => { + addToRemoveQueue(toast.id) + }) + } + + return { + ...state, + toasts: state.toasts.map((t) => + t.id === toastId || toastId === undefined + ? { + ...t, + open: false + } + : t + ) + } + } + case 'REMOVE_TOAST': + if (action.toastId === undefined) { + return { + ...state, + toasts: [] + } + } + return { + ...state, + toasts: state.toasts.filter((t) => t.id !== action.toastId) + } + } +} + +const listeners: Array<(state: State) => void> = [] + +let memoryState: State = { toasts: [] } + +function dispatch(action: Action) { + memoryState = reducer(memoryState, action) + listeners.forEach((listener) => { + listener(memoryState) + }) +} + +type Toast = Omit + +function toast({ ...props }: Toast) { + const id = genId() + + const update = (props: ToasterToast) => + dispatch({ + type: 'UPDATE_TOAST', + toast: { ...props, id } + }) + const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id }) + + dispatch({ + type: 'ADD_TOAST', + toast: { + ...props, + id, + open: true, + onOpenChange: (open) => { + if (!open) dismiss() + } + } + }) + + return { + id: id, + dismiss, + update + } +} + +function useToast() { + const [state, setState] = React.useState (memoryState) + + React.useEffect(() => { + listeners.push(setState) + return () => { + const index = listeners.indexOf(setState) + if (index > -1) { + listeners.splice(index, 1) + } + } + }, [state]) + + return { + ...state, + toast, + dismiss: (toastId?: string) => dispatch({ type: 'DISMISS_TOAST', toastId }) + } +} + +export { useToast, toast } diff --git a/packages/playground-nextjs/contexts/chat-context-provider.tsx b/packages/playground-nextjs/contexts/chat-context-provider.tsx new file mode 100644 index 0000000..d12b13c --- /dev/null +++ b/packages/playground-nextjs/contexts/chat-context-provider.tsx @@ -0,0 +1,43 @@ +'use client' + +import { useMemo } from 'react' +import { ChatReq, EventType } from '@tidbcloud/codemirror-extension-ai-widget' + +import { cancelChat, chat2data, refineSql } from '@/api/tidbcloud/chat-api' +import { ChatContext } from './chat-context' + +function chat(chatId: string, req: ChatReq) { + if (req.refContent === '') { + return chat2data(chatId, { + database: req.extra?.db ?? '', + question: req.prompt + }) + } + return refineSql(chatId, { + database: req.extra?.db ?? '', + feedback: req.prompt, + sql: req.refContent + }) +} + +function onEvent(event: EventType, payload?: {}) { + console.log('event:', event) + console.log('payload:', payload) +} + +export function ChatProvider(props: { children: React.ReactNode }) { + const ctxValue = useMemo( + () => ({ + chat, + cancelChat, + onEvent + }), + [] + ) + + return ( + + {props.children} + + ) +} diff --git a/packages/playground-nextjs/contexts/chat-context.tsx b/packages/playground-nextjs/contexts/chat-context.tsx new file mode 100644 index 0000000..f900169 --- /dev/null +++ b/packages/playground-nextjs/contexts/chat-context.tsx @@ -0,0 +1,25 @@ +import { createContext, useContext } from 'react' + +import { + ChatReq, + ChatRes, + EventType +} from '@tidbcloud/codemirror-extension-ai-widget' + +type ChatCtxValue = { + chat: (chatId: string, req: ChatReq) => Promise+ cancelChat: (chatId: string) => void + onEvent: (event: EventType, payload?: {}) => void +} + +export const ChatContext = createContext (null) + +export const useChatContext = () => { + const context = useContext(ChatContext) + + if (!context) { + throw new Error('useChatContext must be used within a provider') + } + + return context +} diff --git a/packages/playground-nextjs/contexts/editor-cache-provider.tsx b/packages/playground-nextjs/contexts/editor-cache-provider.tsx new file mode 100644 index 0000000..7ece78d --- /dev/null +++ b/packages/playground-nextjs/contexts/editor-cache-provider.tsx @@ -0,0 +1,8 @@ +'use client' + +import React from 'react' +import { EditorCacheProvider } from '@tidbcloud/tisqleditor-react' + +export function EditorProvider(props: { children: React.ReactNode }) { + return {props.children} +} diff --git a/packages/playground-nextjs/contexts/files-context-provider.tsx b/packages/playground-nextjs/contexts/files-context-provider.tsx new file mode 100644 index 0000000..835d976 --- /dev/null +++ b/packages/playground-nextjs/contexts/files-context-provider.tsx @@ -0,0 +1,55 @@ +'use client' + +import React, { useMemo } from 'react' +import { + addFile, + delFile, + loadFiles, + openFile, + renameFile, + saveFile +} from '@/api/mock/files-api' +import { useFilesLoader } from '@/hooks/use-files-loader' +import { IFile, FilesContext } from './files-context' + +//---------------------------------------------- + +function FilesLoader() { + useFilesLoader() + return null +} + +export function FilesProvider(props: { children: React.ReactNode }) { + const [allFiles, setAllFiles] = React.useState([]) + const [openedFiles, setOpenedFiles] = React.useState ([]) + const [activeFileId, setActiveFileId] = React.useState (null) + + const ctxValue = useMemo( + () => ({ + api: { + loadFiles, + openFile, + addFile, + delFile, + renameFile, + saveFile + }, + state: { + allFiles, + setAllFiles, + openedFiles, + setOpenedFiles, + activeFileId, + setActiveFileId + } + }), + [allFiles, openedFiles, activeFileId] + ) + + return ( + + + ) +} diff --git a/packages/playground-nextjs/contexts/files-context.tsx b/packages/playground-nextjs/contexts/files-context.tsx new file mode 100644 index 0000000..1921eb3 --- /dev/null +++ b/packages/playground-nextjs/contexts/files-context.tsx @@ -0,0 +1,45 @@ +import { createContext, useContext } from 'react' + +export interface IFile { + id: string + name: string + content: string + status?: 'loading' | 'loaded' +} + +interface IFilesAPI { + loadFiles(): Promise+ {props.children} + // only return id and name, content is empty + openFile(id: string): Promise // return id, name and content + addFile(name: string, content?: string): Promise + delFile(id: string): Promise + renameFile(id: string, name: string): Promise + saveFile(id: string, content: string): Promise +} + +interface IFilesState { + allFiles: IFile[] // file content is empty + setAllFiles: (files: IFile[] | ((prevState: IFile[]) => IFile[])) => void + + openedFiles: IFile[] // file content is not empty + setOpenedFiles: (files: IFile[] | ((prevState: IFile[]) => IFile[])) => void + + activeFileId: string | null + setActiveFileId: (id: string | null) => void +} + +type FilesCtxValue = { + api: IFilesAPI + state: IFilesState +} + +export const FilesContext = createContext (null) + +export const useFilesContext = () => { + const context = useContext(FilesContext) + + if (!context) { + throw new Error('useFilesContext must be used within a provider') + } + + return context +} diff --git a/packages/playground-nextjs/contexts/query-provider.tsx b/packages/playground-nextjs/contexts/query-provider.tsx new file mode 100644 index 0000000..6261a3f --- /dev/null +++ b/packages/playground-nextjs/contexts/query-provider.tsx @@ -0,0 +1,21 @@ +'use client' + +import React from 'react' + +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + refetchOnWindowFocus: false + } + } +}) + +export function QueryProvider(props: { children: React.ReactNode }) { + return ( + + {props.children} + + ) +} diff --git a/packages/playground-nextjs/contexts/schema-context-provider.tsx b/packages/playground-nextjs/contexts/schema-context-provider.tsx new file mode 100644 index 0000000..b47f2be --- /dev/null +++ b/packages/playground-nextjs/contexts/schema-context-provider.tsx @@ -0,0 +1,28 @@ +'use client' + +import React, { useMemo } from 'react' + +import { getSchema } from '@/api/tidbcloud/schema-api' +import { SchemaContext, SchemaRes } from './schema-context' +import { useSchemaLoader } from '@/hooks/use-schema-loader' + +function SchemaLoader() { + useSchemaLoader() + return null +} + +export function SchemaProvider(props: { children: React.ReactNode }) { + const [schema, setSchema] = React.useState(null) + + const ctxValue = useMemo( + () => ({ loadSchema: getSchema, schema, setSchema }), + [schema] + ) + + return ( + + + ) +} diff --git a/packages/playground-nextjs/contexts/schema-context.ts b/packages/playground-nextjs/contexts/schema-context.ts new file mode 100644 index 0000000..941c1ed --- /dev/null +++ b/packages/playground-nextjs/contexts/schema-context.ts @@ -0,0 +1,34 @@ +import { createContext, useContext } from 'react' + +export type SchemaRes = { + name: string + tables: { + name: string + columns: { + col: string + data_type: string + nullable: boolean + }[] + }[] +}[] + +type SchemaCtxValue = { + // api + loadSchema: () => Promise+ {props.children} + + + // state + schema: SchemaRes | null + setSchema: (schema: SchemaRes | null) => void +} + +export const SchemaContext = createContext (null) + +export const useSchemaContext = () => { + const context = useContext(SchemaContext) + + if (!context) { + throw new Error('useSchemaContext must be used within a provider') + } + + return context +} diff --git a/packages/playground-nextjs/contexts/statement-context-provider.tsx b/packages/playground-nextjs/contexts/statement-context-provider.tsx new file mode 100644 index 0000000..e397dba --- /dev/null +++ b/packages/playground-nextjs/contexts/statement-context-provider.tsx @@ -0,0 +1,27 @@ +'use client' + +import React, { useMemo } from 'react' + +import { SqlStatement } from '@tidbcloud/codemirror-extension-sql-parser' + +import { runSQL } from '@/api/tidbcloud/statement-api' +import { StatementContext } from './statement-context' + +export function StatementProvider(props: { children: React.ReactNode }) { + const [runResult, setRunResult] = React.useState ({}) + + const runStatement = (_fileId: string, statement: SqlStatement) => { + return runSQL({ database: statement.database, sql: statement.content }) + } + + const ctxValue = useMemo( + () => ({ runStatement, runResult, setRunResult }), + [runStatement, runResult] + ) + + return ( + + {props.children} + + ) +} diff --git a/packages/playground-nextjs/contexts/statement-context.ts b/packages/playground-nextjs/contexts/statement-context.ts new file mode 100644 index 0000000..7d3c584 --- /dev/null +++ b/packages/playground-nextjs/contexts/statement-context.ts @@ -0,0 +1,22 @@ +import { createContext, useContext } from 'react' +import { SqlStatement } from '@tidbcloud/codemirror-extension-sql-parser' + +type StatementCtxValue = { + runStatement: (fileId: string, statements: SqlStatement) => Promise+ + // state + runResult: any + setRunResult: (result: any | ((prev: any) => any)) => void +} + +export const StatementContext = createContext (null) + +export const useStatementContext = () => { + const context = useContext(StatementContext) + + if (!context) { + throw new Error('useStatementContext must be used within a provider') + } + + return context +} diff --git a/packages/playground-nextjs/hooks/use-files-loader.ts b/packages/playground-nextjs/hooks/use-files-loader.ts new file mode 100644 index 0000000..41976dd --- /dev/null +++ b/packages/playground-nextjs/hooks/use-files-loader.ts @@ -0,0 +1,26 @@ +import { useEffect } from 'react' +import { useQuery } from '@tanstack/react-query' +import { useFilesContext } from '@/contexts/files-context' + +export function useFilesQuery() { + const { + api: { loadFiles } + } = useFilesContext() + + return useQuery({ + queryKey: ['sql_files'], + queryFn: loadFiles + }) +} + +export function useFilesLoader() { + const { + state: { setAllFiles } + } = useFilesContext() + + const query = useFilesQuery() + + useEffect(() => { + setAllFiles(query.data ?? []) + }, [query.data]) +} diff --git a/packages/playground-nextjs/hooks/use-schema-loader.ts b/packages/playground-nextjs/hooks/use-schema-loader.ts new file mode 100644 index 0000000..be54dd8 --- /dev/null +++ b/packages/playground-nextjs/hooks/use-schema-loader.ts @@ -0,0 +1,22 @@ +import { useEffect } from 'react' +import { useQuery } from '@tanstack/react-query' +import { useSchemaContext } from '@/contexts/schema-context' + +export function useSchemaQuery() { + const { loadSchema } = useSchemaContext() + + return useQuery({ + queryKey: ['db_schema'], + queryFn: loadSchema + }) +} + +export function useSchemaLoader() { + const { setSchema } = useSchemaContext() + + const query = useSchemaQuery() + + useEffect(() => { + setSchema(query.data ?? null) + }, [query.data]) +} diff --git a/packages/playground-nextjs/lib/delay.ts b/packages/playground-nextjs/lib/delay.ts new file mode 100644 index 0000000..9c70749 --- /dev/null +++ b/packages/playground-nextjs/lib/delay.ts @@ -0,0 +1,3 @@ +export function delay(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)) +} diff --git a/packages/playground-nextjs/lib/env-vars.ts b/packages/playground-nextjs/lib/env-vars.ts new file mode 100644 index 0000000..08e7f39 --- /dev/null +++ b/packages/playground-nextjs/lib/env-vars.ts @@ -0,0 +1,13 @@ +const keyPrefix = (process.env.NEXT_PUBLIC_STORAGE_KEY_PREFIX ?? 'v1') + '.' + +export function getLocalStorageItem(key: string) { + return localStorage.getItem(keyPrefix + key) +} + +export function setLocalStorageItem(key: string, val: string) { + localStorage.setItem(keyPrefix + key, val) +} + +export function removeLocalStorageItem(key: string) { + localStorage.removeItem(keyPrefix + key) +} diff --git a/packages/playground-nextjs/lib/utils.ts b/packages/playground-nextjs/lib/utils.ts new file mode 100644 index 0000000..d32b0fe --- /dev/null +++ b/packages/playground-nextjs/lib/utils.ts @@ -0,0 +1,6 @@ +import { type ClassValue, clsx } from 'clsx' +import { twMerge } from 'tailwind-merge' + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/packages/playground-nextjs/next.config.mjs b/packages/playground-nextjs/next.config.mjs new file mode 100644 index 0000000..3288b99 --- /dev/null +++ b/packages/playground-nextjs/next.config.mjs @@ -0,0 +1,25 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + images: { + remotePatterns: [ + { + protocol: "https", + hostname: "avatars.githubusercontent.com", + port: "", + pathname: "/**", + }, + ], + }, + async redirects() { + return [ + // Basic redirect + { + source: "/", + destination: "/playground", + permanent: true, + }, + ]; + }, +}; + +export default nextConfig; diff --git a/packages/playground-nextjs/package.json b/packages/playground-nextjs/package.json new file mode 100644 index 0000000..416a9ef --- /dev/null +++ b/packages/playground-nextjs/package.json @@ -0,0 +1,58 @@ +{ + "name": "tisqleditor-nextjs", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@codemirror/lang-sql": "^6.7.0", + "@codemirror/state": "^6.4.1", + "@codemirror/view": "^6.28.4", + "@radix-ui/react-accordion": "^1.2.0", + "@radix-ui/react-alert-dialog": "^1.1.1", + "@radix-ui/react-dialog": "^1.1.1", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-select": "^2.1.1", + "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-tabs": "^1.1.0", + "@radix-ui/react-toast": "^1.2.1", + "@tanstack/react-query": "^5.51.11", + "@tidbcloud/codemirror-extension-ai-widget": "^0.0.6", + "@tidbcloud/codemirror-extension-cur-sql": "^0.0.6", + "@tidbcloud/codemirror-extension-cur-sql-gutter": "^0.0.6", + "@tidbcloud/codemirror-extension-events": "^0.0.6", + "@tidbcloud/codemirror-extension-linters": "^0.0.6", + "@tidbcloud/codemirror-extension-save-helper": "^0.0.6", + "@tidbcloud/codemirror-extension-sql-autocomplete": "^0.0.6", + "@tidbcloud/codemirror-extension-sql-parser": "^0.0.6", + "@tidbcloud/codemirror-extension-themes": "^0.0.6", + "@tidbcloud/serverless": "^0.2.0", + "@tidbcloud/tisqleditor-react": "^0.0.6", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "dayjs": "^1.11.12", + "lucide-react": "^0.408.0", + "next": "14.2.5", + "next-themes": "^0.3.0", + "react": "^18", + "react-dom": "^18", + "react-resizable-panels": "^2.0.22", + "tailwind-merge": "^2.4.0", + "tailwindcss-animate": "^1.0.7" + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "eslint": "^8", + "eslint-config-next": "14.2.5", + "postcss": "^8", + "tailwindcss": "^3.4.1", + "typescript": "^5" + }, + "packageManager": "pnpm@9.5.0+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903" +} diff --git a/packages/playground-nextjs/postcss.config.mjs b/packages/playground-nextjs/postcss.config.mjs new file mode 100644 index 0000000..1a69fd2 --- /dev/null +++ b/packages/playground-nextjs/postcss.config.mjs @@ -0,0 +1,8 @@ +/** @type {import('postcss-load-config').Config} */ +const config = { + plugins: { + tailwindcss: {}, + }, +}; + +export default config; diff --git a/packages/playground-nextjs/public/next.svg b/packages/playground-nextjs/public/next.svg new file mode 100644 index 0000000..5174b28 --- /dev/null +++ b/packages/playground-nextjs/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/playground-nextjs/public/vercel.svg b/packages/playground-nextjs/public/vercel.svg new file mode 100644 index 0000000..d2f8422 --- /dev/null +++ b/packages/playground-nextjs/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/playground-nextjs/tailwind.config.ts b/packages/playground-nextjs/tailwind.config.ts new file mode 100644 index 0000000..5454a36 --- /dev/null +++ b/packages/playground-nextjs/tailwind.config.ts @@ -0,0 +1,80 @@ +import type { Config } from 'tailwindcss' + +const config = { + darkMode: ['class'], + content: [ + './pages/**/*.{ts,tsx}', + './components/**/*.{ts,tsx}', + './app/**/*.{ts,tsx}', + './src/**/*.{ts,tsx}' + ], + prefix: '', + theme: { + container: { + center: true, + padding: '2rem', + screens: { + '2xl': '1400px' + } + }, + extend: { + colors: { + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))' + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))' + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))' + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))' + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))' + }, + popover: { + DEFAULT: 'hsl(var(--popover))', + foreground: 'hsl(var(--popover-foreground))' + }, + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))' + } + }, + borderRadius: { + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)' + }, + keyframes: { + 'accordion-down': { + from: { height: '0' }, + to: { height: 'var(--radix-accordion-content-height)' } + }, + 'accordion-up': { + from: { height: 'var(--radix-accordion-content-height)' }, + to: { height: '0' } + } + }, + animation: { + 'accordion-down': 'accordion-down 0.2s ease-out', + 'accordion-up': 'accordion-up 0.2s ease-out' + } + } + }, + plugins: [require('tailwindcss-animate')] +} satisfies Config + +export default config diff --git a/packages/playground-nextjs/tsconfig.json b/packages/playground-nextjs/tsconfig.json new file mode 100644 index 0000000..2c145a2 --- /dev/null +++ b/packages/playground-nextjs/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2020", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} From 570c8e88f2ebb4919d0fe795aa33eb78167d4fc1 Mon Sep 17 00:00:00 2001 From: baurine <2008.hbl@gmail.com> Date: Wed, 31 Jul 2024 17:53:58 +0800 Subject: [PATCH 4/8] chore: update deps --- packages/playground-nextjs/package.json | 48 +- pnpm-lock.yaml | 1132 +++++++++++++++++++++++ 2 files changed, 1156 insertions(+), 24 deletions(-) diff --git a/packages/playground-nextjs/package.json b/packages/playground-nextjs/package.json index 416a9ef..7395c78 100644 --- a/packages/playground-nextjs/package.json +++ b/packages/playground-nextjs/package.json @@ -1,7 +1,7 @@ { - "name": "tisqleditor-nextjs", - "version": "0.1.0", + "name": "@tidbcloud/tisqleditor-playground-nextjs", "private": true, + "version": "0.0.1", "scripts": { "dev": "next dev", "build": "next build", @@ -9,18 +9,19 @@ "lint": "next lint" }, "dependencies": { - "@codemirror/lang-sql": "^6.7.0", + "@codemirror/lang-sql": "^6.6.4", "@codemirror/state": "^6.4.1", - "@codemirror/view": "^6.28.4", + "@codemirror/view": "^6.26.3", "@radix-ui/react-accordion": "^1.2.0", - "@radix-ui/react-alert-dialog": "^1.1.1", - "@radix-ui/react-dialog": "^1.1.1", - "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-alert-dialog": "^1.0.5", + "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-dropdown-menu": "^2.0.6", + "@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-select": "^2.1.1", - "@radix-ui/react-slot": "^1.1.0", - "@radix-ui/react-tabs": "^1.1.0", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.2.1", - "@tanstack/react-query": "^5.51.11", + "@tanstack/react-query": "^5.45.1", "@tidbcloud/codemirror-extension-ai-widget": "^0.0.6", "@tidbcloud/codemirror-extension-cur-sql": "^0.0.6", "@tidbcloud/codemirror-extension-cur-sql-gutter": "^0.0.6", @@ -34,25 +35,24 @@ "@tidbcloud/tisqleditor-react": "^0.0.6", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", - "dayjs": "^1.11.12", + "dayjs": "^1.11.11", "lucide-react": "^0.408.0", "next": "14.2.5", "next-themes": "^0.3.0", - "react": "^18", - "react-dom": "^18", - "react-resizable-panels": "^2.0.22", - "tailwind-merge": "^2.4.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-resizable-panels": "^2.0.19", + "tailwind-merge": "^2.3.0", "tailwindcss-animate": "^1.0.7" }, "devDependencies": { - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "eslint": "^8", + "@types/node": "^20.14.2", + "@types/react": "^18.2.66", + "@types/react-dom": "^18.2.22", + "eslint": "^8.57.0", "eslint-config-next": "14.2.5", - "postcss": "^8", - "tailwindcss": "^3.4.1", - "typescript": "^5" - }, - "packageManager": "pnpm@9.5.0+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903" + "postcss": "^8.4.38", + "tailwindcss": "^3.4.4", + "typescript": "^5.2.2" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d6afe3..07045aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -510,6 +510,139 @@ importers: specifier: ^5.2.0 version: 5.3.0(@types/node@20.14.2) + packages/playground-nextjs: + dependencies: + '@codemirror/lang-sql': + specifier: ^6.6.4 + version: 6.6.4(@codemirror/view@6.26.3) + '@codemirror/state': + specifier: ^6.4.1 + version: 6.4.1 + '@codemirror/view': + specifier: ^6.26.3 + version: 6.26.3 + '@radix-ui/react-accordion': + specifier: ^1.2.0 + version: 1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-alert-dialog': + specifier: ^1.0.5 + version: 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-dialog': + specifier: ^1.0.5 + version: 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-dropdown-menu': + specifier: ^2.0.6 + version: 2.0.6(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-icons': + specifier: ^1.3.0 + version: 1.3.0(react@18.3.1) + '@radix-ui/react-select': + specifier: ^2.1.1 + version: 2.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': + specifier: ^1.0.2 + version: 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-tabs': + specifier: ^1.0.4 + version: 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-toast': + specifier: ^1.2.1 + version: 1.2.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@tanstack/react-query': + specifier: ^5.45.1 + version: 5.45.1(react@18.3.1) + '@tidbcloud/codemirror-extension-ai-widget': + specifier: ^0.0.6 + version: link:../extensions/ai-widget + '@tidbcloud/codemirror-extension-cur-sql': + specifier: ^0.0.6 + version: link:../extensions/cur-sql + '@tidbcloud/codemirror-extension-cur-sql-gutter': + specifier: ^0.0.6 + version: link:../extensions/cur-sql-gutter + '@tidbcloud/codemirror-extension-events': + specifier: ^0.0.6 + version: link:../extensions/events + '@tidbcloud/codemirror-extension-linters': + specifier: ^0.0.6 + version: link:../extensions/linters + '@tidbcloud/codemirror-extension-save-helper': + specifier: ^0.0.6 + version: link:../extensions/save-helper + '@tidbcloud/codemirror-extension-sql-autocomplete': + specifier: ^0.0.6 + version: link:../extensions/sql-autocomplete + '@tidbcloud/codemirror-extension-sql-parser': + specifier: ^0.0.6 + version: link:../extensions/sql-parser + '@tidbcloud/codemirror-extension-themes': + specifier: ^0.0.6 + version: link:../extensions/themes + '@tidbcloud/serverless': + specifier: ^0.2.0 + version: 0.2.0 + '@tidbcloud/tisqleditor-react': + specifier: ^0.0.6 + version: link:../react + class-variance-authority: + specifier: ^0.7.0 + version: 0.7.0 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + dayjs: + specifier: ^1.11.11 + version: 1.11.11 + lucide-react: + specifier: ^0.408.0 + version: 0.408.0(react@18.3.1) + next: + specifier: 14.2.5 + version: 14.2.5(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-themes: + specifier: ^0.3.0 + version: 0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: + specifier: ^18.2.0 + version: 18.3.1 + react-dom: + specifier: ^18.2.0 + version: 18.3.1(react@18.3.1) + react-resizable-panels: + specifier: ^2.0.19 + version: 2.0.19(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tailwind-merge: + specifier: ^2.3.0 + version: 2.3.0 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.4) + devDependencies: + '@types/node': + specifier: ^20.14.2 + version: 20.14.2 + '@types/react': + specifier: ^18.2.66 + version: 18.3.3 + '@types/react-dom': + specifier: ^18.2.22 + version: 18.3.0 + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-config-next: + specifier: 14.2.5 + version: 14.2.5(eslint@8.57.0)(typescript@5.4.5) + postcss: + specifier: ^8.4.38 + version: 8.4.40 + tailwindcss: + specifier: ^3.4.4 + version: 3.4.4 + typescript: + specifier: ^5.2.2 + version: 5.4.5 + packages/react: dependencies: '@tidbcloud/tisqleditor': @@ -1622,6 +1755,66 @@ packages: '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + '@next/env@14.2.5': + resolution: {integrity: sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA==} + + '@next/eslint-plugin-next@14.2.5': + resolution: {integrity: sha512-LY3btOpPh+OTIpviNojDpUdIbHW9j0JBYBjsIp8IxtDFfYFyORvw3yNq6N231FVqQA7n7lwaf7xHbVJlA1ED7g==} + + '@next/swc-darwin-arm64@14.2.5': + resolution: {integrity: sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@next/swc-darwin-x64@14.2.5': + resolution: {integrity: sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@next/swc-linux-arm64-gnu@14.2.5': + resolution: {integrity: sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@next/swc-linux-arm64-musl@14.2.5': + resolution: {integrity: sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@next/swc-linux-x64-gnu@14.2.5': + resolution: {integrity: sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@next/swc-linux-x64-musl@14.2.5': + resolution: {integrity: sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@next/swc-win32-arm64-msvc@14.2.5': + resolution: {integrity: sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@next/swc-win32-ia32-msvc@14.2.5': + resolution: {integrity: sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@next/swc-win32-x64-msvc@14.2.5': + resolution: {integrity: sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2336,6 +2529,9 @@ packages: cpu: [x64] os: [win32] + '@rushstack/eslint-patch@1.10.4': + resolution: {integrity: sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA==} + '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -2345,6 +2541,12 @@ packages: '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + + '@swc/helpers@0.5.5': + resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} + '@tanstack/query-core@5.45.0': resolution: {integrity: sha512-RVfIZQmFUTdjhSAAblvueimfngYyfN6HlwaJUPK71PKd7yi43Vs1S/rdimmZedPWX/WGppcq/U1HOj7O7FwYxw==} @@ -2393,6 +2595,10 @@ packages: '@types/react-dom': optional: true + '@tidbcloud/serverless@0.2.0': + resolution: {integrity: sha512-UGmMa9hYeRVcmDjsUE/vNYbsiS4PGHU2M9Y+DFyMUu6gRMxXOfda6rTTnuHQ5OzUsbk6AfV4gtJoEUWvmpBpJw==} + engines: {node: '>=16'} + '@tootallnate/once@2.0.0': resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -2433,6 +2639,9 @@ packages: '@types/jsdom@20.0.1': resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} + '@types/json5@0.0.29': + resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} @@ -2490,10 +2699,24 @@ packages: typescript: optional: true + '@typescript-eslint/parser@7.2.0': + resolution: {integrity: sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/scope-manager@7.13.0': resolution: {integrity: sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@7.2.0': + resolution: {integrity: sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==} + engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/type-utils@7.13.0': resolution: {integrity: sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A==} engines: {node: ^18.18.0 || >=20.0.0} @@ -2508,6 +2731,10 @@ packages: resolution: {integrity: sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@7.2.0': + resolution: {integrity: sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==} + engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/typescript-estree@7.13.0': resolution: {integrity: sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -2517,6 +2744,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@7.2.0': + resolution: {integrity: sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@7.13.0': resolution: {integrity: sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==} engines: {node: ^18.18.0 || >=20.0.0} @@ -2527,6 +2763,10 @@ packages: resolution: {integrity: sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@7.2.0': + resolution: {integrity: sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==} + engines: {node: ^16.0.0 || >=18.0.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2673,6 +2913,9 @@ packages: resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==} engines: {node: '>=10'} + aria-query@5.1.3: + resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} + aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} @@ -2680,14 +2923,34 @@ packages: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} + array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} + engines: {node: '>= 0.4'} + array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + array.prototype.findlast@1.2.5: + resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} + engines: {node: '>= 0.4'} + + array.prototype.findlastindex@1.2.5: + resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} + engines: {node: '>= 0.4'} + array.prototype.flat@1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} + array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + + array.prototype.tosorted@1.1.4: + resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} + engines: {node: '>= 0.4'} + arraybuffer.prototype.slice@1.0.3: resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} engines: {node: '>= 0.4'} @@ -2696,6 +2959,9 @@ packages: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} + ast-types-flow@0.0.8: + resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -2710,6 +2976,13 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axe-core@4.10.0: + resolution: {integrity: sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==} + engines: {node: '>=4'} + + axobject-query@3.1.1: + resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} + babel-jest@29.7.0: resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2785,6 +3058,10 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -2857,6 +3134,9 @@ packages: resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} engines: {node: '>=18'} + client-only@0.0.1: + resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + cliui@6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} @@ -2977,6 +3257,9 @@ packages: resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} engines: {node: '>= 0.1.90'} + damerau-levenshtein@1.0.8: + resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} + data-urls@3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} @@ -3003,6 +3286,14 @@ packages: de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.3.5: resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} engines: {node: '>=6.0'} @@ -3031,6 +3322,10 @@ packages: babel-plugin-macros: optional: true + deep-equal@2.2.3: + resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} + engines: {node: '>= 0.4'} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -3082,6 +3377,10 @@ packages: dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -3116,6 +3415,10 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} + engines: {node: '>=10.13.0'} + enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -3139,6 +3442,13 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-get-iterator@1.1.3: + resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} + + es-iterator-helpers@1.0.19: + resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} + engines: {node: '>= 0.4'} + es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} @@ -3180,6 +3490,62 @@ packages: engines: {node: '>=6.0'} hasBin: true + eslint-config-next@14.2.5: + resolution: {integrity: sha512-zogs9zlOiZ7ka+wgUnmcM0KBEDjo4Jis7kxN1jvC0N4wynQ2MIx/KBkg4mVF63J5EK4W0QMCn7xO3vNisjaAoA==} + peerDependencies: + eslint: ^7.23.0 || ^8.0.0 + typescript: '>=3.3.1' + peerDependenciesMeta: + typescript: + optional: true + + eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + + eslint-import-resolver-typescript@3.6.1: + resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '*' + eslint-plugin-import: '*' + + eslint-module-utils@2.8.1: + resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + + eslint-plugin-import@2.29.1: + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + + eslint-plugin-jsx-a11y@6.9.0: + resolution: {integrity: sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g==} + engines: {node: '>=4.0'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint-plugin-react-hooks@4.6.2: resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} engines: {node: '>=10'} @@ -3191,6 +3557,12 @@ packages: peerDependencies: eslint: '>=7' + eslint-plugin-react@7.35.0: + resolution: {integrity: sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3404,6 +3776,9 @@ packages: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} + get-tsconfig@4.7.6: + resolution: {integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3412,6 +3787,11 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + glob@10.4.1: resolution: {integrity: sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==} engines: {node: '>=16 || 14 >=14.18'} @@ -3568,6 +3948,10 @@ packages: invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + is-array-buffer@3.0.4: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} @@ -3575,6 +3959,10 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} @@ -3605,6 +3993,9 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -3621,10 +4012,18 @@ packages: resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} engines: {node: '>=6'} + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + is-negative-zero@2.0.3: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} @@ -3652,6 +4051,10 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + is-shared-array-buffer@1.0.3: resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} engines: {node: '>= 0.4'} @@ -3680,9 +4083,17 @@ packages: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-weakset@2.0.3: + resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + engines: {node: '>= 0.4'} + is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -3717,6 +4128,13 @@ packages: resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} engines: {node: '>=8'} + iterator.prototype@1.1.2: + resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + + jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} + jackspeak@3.4.0: resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==} engines: {node: '>=14'} @@ -3904,6 +4322,10 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -3912,6 +4334,10 @@ packages: jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsx-ast-utils@3.3.5: + resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} + engines: {node: '>=4.0'} + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -3927,6 +4353,13 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + language-subtag-registry@0.3.23: + resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} + + language-tags@1.0.9: + resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} + engines: {node: '>=0.10'} + leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -3997,6 +4430,11 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lucide-react@0.408.0: + resolution: {integrity: sha512-8kETAAeWmOvtGIr7HPHm51DXoxlfkNncQ5FZWXR+abX8saQwMYXANWIkUstaYtcKSo/imOe/q+tVFA8ANzdSVA==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -4057,6 +4495,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.4: resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} engines: {node: '>=16 || 14 >=14.17'} @@ -4065,6 +4507,9 @@ packages: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} @@ -4090,6 +4535,30 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + next-themes@0.3.0: + resolution: {integrity: sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==} + peerDependencies: + react: ^16.8 || ^17 || ^18 + react-dom: ^16.8 || ^17 || ^18 + + next@14.2.5: + resolution: {integrity: sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA==} + engines: {node: '>=18.17.0'} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 + react: ^18.2.0 + react-dom: ^18.2.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + '@playwright/test': + optional: true + sass: + optional: true + node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} @@ -4129,6 +4598,10 @@ packages: object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + object-is@1.1.6: + resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} + engines: {node: '>= 0.4'} + object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} @@ -4137,6 +4610,22 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} + object.entries@1.1.8: + resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} + engines: {node: '>= 0.4'} + + object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} + engines: {node: '>= 0.4'} + + object.groupby@1.0.3: + resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} + engines: {node: '>= 0.4'} + + object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + engines: {node: '>= 0.4'} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -4297,6 +4786,10 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + postcss@8.4.38: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} @@ -4335,6 +4828,9 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} + prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} @@ -4363,6 +4859,9 @@ packages: peerDependencies: react: ^18.3.1 + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} @@ -4446,6 +4945,10 @@ packages: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} + reflect.getprototypeof@1.0.6: + resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} + engines: {node: '>= 0.4'} + regenerate-unicode-properties@10.1.1: resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} engines: {node: '>=4'} @@ -4493,6 +4996,9 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve.exports@2.0.2: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} @@ -4501,6 +5007,10 @@ packages: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true + resolve@2.0.0-next.5: + resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true + restore-cursor@4.0.0: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4656,9 +5166,17 @@ packages: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} + stop-iteration-iterator@1.0.0: + resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} + engines: {node: '>= 0.4'} + stream-transform@2.1.3: resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} @@ -4679,6 +5197,16 @@ packages: resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==} engines: {node: '>=18'} + string.prototype.includes@2.0.0: + resolution: {integrity: sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==} + + string.prototype.matchall@4.0.11: + resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} + engines: {node: '>= 0.4'} + + string.prototype.repeat@1.0.0: + resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + string.prototype.trim@1.2.9: resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} engines: {node: '>= 0.4'} @@ -4725,6 +5253,19 @@ packages: style-mod@4.1.2: resolution: {integrity: sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==} + styled-jsx@5.1.1: + resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} @@ -4762,6 +5303,10 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -4820,6 +5365,9 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} @@ -5057,6 +5605,14 @@ packages: which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + which-builtin-type@1.1.4: + resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} @@ -6626,6 +7182,39 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 + '@next/env@14.2.5': {} + + '@next/eslint-plugin-next@14.2.5': + dependencies: + glob: 10.3.10 + + '@next/swc-darwin-arm64@14.2.5': + optional: true + + '@next/swc-darwin-x64@14.2.5': + optional: true + + '@next/swc-linux-arm64-gnu@14.2.5': + optional: true + + '@next/swc-linux-arm64-musl@14.2.5': + optional: true + + '@next/swc-linux-x64-gnu@14.2.5': + optional: true + + '@next/swc-linux-x64-musl@14.2.5': + optional: true + + '@next/swc-win32-arm64-msvc@14.2.5': + optional: true + + '@next/swc-win32-ia32-msvc@14.2.5': + optional: true + + '@next/swc-win32-x64-msvc@14.2.5': + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -7296,6 +7885,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.18.0': optional: true + '@rushstack/eslint-patch@1.10.4': {} + '@sinclair/typebox@0.27.8': {} '@sinonjs/commons@3.0.1': @@ -7306,6 +7897,13 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 + '@swc/counter@0.1.3': {} + + '@swc/helpers@0.5.5': + dependencies: + '@swc/counter': 0.1.3 + tslib: 2.6.3 + '@tanstack/query-core@5.45.0': {} '@tanstack/react-query@5.45.1(react@18.3.1)': @@ -7349,6 +7947,8 @@ snapshots: '@types/react': 18.3.3 '@types/react-dom': 18.3.0 + '@tidbcloud/serverless@0.2.0': {} + '@tootallnate/once@2.0.0': {} '@types/aria-query@5.0.4': {} @@ -7401,6 +8001,8 @@ snapshots: '@types/tough-cookie': 4.0.5 parse5: 7.1.2 + '@types/json5@0.0.29': {} + '@types/minimist@1.2.5': {} '@types/node@12.20.55': {} @@ -7465,11 +8067,29 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/scope-manager': 7.2.0 + '@typescript-eslint/types': 7.2.0 + '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.2.0 + debug: 4.3.5 + eslint: 8.57.0 + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@7.13.0': dependencies: '@typescript-eslint/types': 7.13.0 '@typescript-eslint/visitor-keys': 7.13.0 + '@typescript-eslint/scope-manager@7.2.0': + dependencies: + '@typescript-eslint/types': 7.2.0 + '@typescript-eslint/visitor-keys': 7.2.0 + '@typescript-eslint/type-utils@7.13.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) @@ -7484,6 +8104,8 @@ snapshots: '@typescript-eslint/types@7.13.0': {} + '@typescript-eslint/types@7.2.0': {} + '@typescript-eslint/typescript-estree@7.13.0(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 7.13.0 @@ -7499,6 +8121,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@7.2.0(typescript@5.4.5)': + dependencies: + '@typescript-eslint/types': 7.2.0 + '@typescript-eslint/visitor-keys': 7.2.0 + debug: 4.3.5 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@7.13.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -7515,6 +8152,11 @@ snapshots: '@typescript-eslint/types': 7.13.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@7.2.0': + dependencies: + '@typescript-eslint/types': 7.2.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@vitejs/plugin-react@4.3.1(vite@5.3.0(@types/node@20.14.2))': @@ -7685,6 +8327,10 @@ snapshots: dependencies: tslib: 2.6.3 + aria-query@5.1.3: + dependencies: + deep-equal: 2.2.3 + aria-query@5.3.0: dependencies: dequal: 2.0.3 @@ -7694,8 +8340,35 @@ snapshots: call-bind: 1.0.7 is-array-buffer: 3.0.4 + array-includes@3.1.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + is-string: 1.0.7 + array-union@2.1.0: {} + array.prototype.findlast@1.2.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-shim-unscopables: 1.0.2 + + array.prototype.findlastindex@1.2.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-shim-unscopables: 1.0.2 + array.prototype.flat@1.3.2: dependencies: call-bind: 1.0.7 @@ -7703,6 +8376,21 @@ snapshots: es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 + array.prototype.flatmap@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-shim-unscopables: 1.0.2 + + array.prototype.tosorted@1.1.4: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-shim-unscopables: 1.0.2 + arraybuffer.prototype.slice@1.0.3: dependencies: array-buffer-byte-length: 1.0.1 @@ -7716,6 +8404,8 @@ snapshots: arrify@1.0.1: {} + ast-types-flow@0.0.8: {} + asynckit@0.4.0: {} autoprefixer@10.4.19(postcss@8.4.38): @@ -7732,6 +8422,12 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 + axe-core@4.10.0: {} + + axobject-query@3.1.1: + dependencies: + deep-equal: 2.2.3 + babel-jest@29.7.0(@babel/core@7.24.7): dependencies: '@babel/core': 7.24.7 @@ -7846,6 +8542,10 @@ snapshots: buffer-from@1.1.2: {} + busboy@1.6.0: + dependencies: + streamsearch: 1.1.0 + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -7921,6 +8621,8 @@ snapshots: slice-ansi: 5.0.0 string-width: 7.1.0 + client-only@0.0.1: {} + cliui@6.0.0: dependencies: string-width: 4.2.3 @@ -8043,6 +8745,8 @@ snapshots: csv-stringify: 5.6.5 stream-transform: 2.1.3 + damerau-levenshtein@1.0.8: {} + data-urls@3.0.2: dependencies: abab: 2.0.6 @@ -8075,6 +8779,10 @@ snapshots: de-indent@1.0.2: {} + debug@3.2.7: + dependencies: + ms: 2.1.2 + debug@4.3.5: dependencies: ms: 2.1.2 @@ -8090,6 +8798,27 @@ snapshots: dedent@1.5.3: {} + deep-equal@2.2.3: + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 + es-get-iterator: 1.1.3 + get-intrinsic: 1.2.4 + is-arguments: 1.1.1 + is-array-buffer: 3.0.4 + is-date-object: 1.0.5 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.3 + isarray: 2.0.5 + object-is: 1.1.6 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.2 + side-channel: 1.0.6 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.2 + which-typed-array: 1.1.15 + deep-is@0.1.4: {} deepmerge@4.3.1: {} @@ -8130,6 +8859,10 @@ snapshots: dlv@1.1.3: {} + doctrine@2.1.0: + dependencies: + esutils: 2.0.3 + doctrine@3.0.0: dependencies: esutils: 2.0.3 @@ -8154,6 +8887,11 @@ snapshots: emoji-regex@9.2.2: {} + enhanced-resolve@5.17.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -8220,6 +8958,35 @@ snapshots: es-errors@1.3.0: {} + es-get-iterator@1.1.3: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + is-arguments: 1.1.1 + is-map: 2.0.3 + is-set: 2.0.3 + is-string: 1.0.7 + isarray: 2.0.5 + stop-iteration-iterator: 1.0.0 + + es-iterator-helpers@1.0.19: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.3 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + iterator.prototype: 1.1.2 + safe-array-concat: 1.1.2 + es-object-atoms@1.0.0: dependencies: es-errors: 1.3.0 @@ -8282,6 +9049,107 @@ snapshots: optionalDependencies: source-map: 0.6.1 + eslint-config-next@14.2.5(eslint@8.57.0)(typescript@5.4.5): + dependencies: + '@next/eslint-plugin-next': 14.2.5 + '@rushstack/eslint-patch': 1.10.4 + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) + eslint-plugin-react: 7.35.0(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - eslint-import-resolver-webpack + - supports-color + + eslint-import-resolver-node@0.3.9: + dependencies: + debug: 3.2.7 + is-core-module: 2.13.1 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 4.3.5 + enhanced-resolve: 5.17.1 + eslint: 8.57.0 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.6 + is-core-module: 2.13.1 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.13.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + + eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): + dependencies: + aria-query: 5.1.3 + array-includes: 3.1.8 + array.prototype.flatmap: 1.3.2 + ast-types-flow: 0.0.8 + axe-core: 4.10.0 + axobject-query: 3.1.1 + damerau-levenshtein: 1.0.8 + emoji-regex: 9.2.2 + es-iterator-helpers: 1.0.19 + eslint: 8.57.0 + hasown: 2.0.2 + jsx-ast-utils: 3.3.5 + language-tags: 1.0.9 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + safe-regex-test: 1.0.3 + string.prototype.includes: 2.0.0 + eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -8290,6 +9158,28 @@ snapshots: dependencies: eslint: 8.57.0 + eslint-plugin-react@7.35.0(eslint@8.57.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlast: 1.2.5 + array.prototype.flatmap: 1.3.2 + array.prototype.tosorted: 1.1.4 + doctrine: 2.1.0 + es-iterator-helpers: 1.0.19 + eslint: 8.57.0 + estraverse: 5.3.0 + hasown: 2.0.2 + jsx-ast-utils: 3.3.5 + minimatch: 3.1.2 + object.entries: 1.1.8 + object.fromentries: 2.0.8 + object.values: 1.2.0 + prop-types: 15.8.1 + resolve: 2.0.0-next.5 + semver: 6.3.1 + string.prototype.matchall: 4.0.11 + string.prototype.repeat: 1.0.0 + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 @@ -8593,6 +9483,10 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 + get-tsconfig@4.7.6: + dependencies: + resolve-pkg-maps: 1.0.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -8601,6 +9495,14 @@ snapshots: dependencies: is-glob: 4.0.3 + glob@10.3.10: + dependencies: + foreground-child: 3.2.0 + jackspeak: 2.3.6 + minimatch: 9.0.4 + minipass: 7.1.2 + path-scurry: 1.11.1 + glob@10.4.1: dependencies: foreground-child: 3.2.0 @@ -8748,6 +9650,11 @@ snapshots: dependencies: loose-envify: 1.4.0 + is-arguments@1.1.1: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + is-array-buffer@3.0.4: dependencies: call-bind: 1.0.7 @@ -8755,6 +9662,10 @@ snapshots: is-arrayish@0.2.1: {} + is-async-function@2.0.0: + dependencies: + has-tostringtag: 1.0.2 + is-bigint@1.0.4: dependencies: has-bigints: 1.0.2 @@ -8784,6 +9695,10 @@ snapshots: is-extglob@2.1.1: {} + is-finalizationregistry@1.0.2: + dependencies: + call-bind: 1.0.7 + is-fullwidth-code-point@3.0.0: {} is-fullwidth-code-point@4.0.0: {} @@ -8794,10 +9709,16 @@ snapshots: is-generator-fn@2.1.0: {} + is-generator-function@1.0.10: + dependencies: + has-tostringtag: 1.0.2 + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 + is-map@2.0.3: {} + is-negative-zero@2.0.3: {} is-number-object@1.0.7: @@ -8817,6 +9738,8 @@ snapshots: call-bind: 1.0.7 has-tostringtag: 1.0.2 + is-set@2.0.3: {} + is-shared-array-buffer@1.0.3: dependencies: call-bind: 1.0.7 @@ -8841,10 +9764,17 @@ snapshots: dependencies: which-typed-array: 1.1.15 + is-weakmap@2.0.2: {} + is-weakref@1.0.2: dependencies: call-bind: 1.0.7 + is-weakset@2.0.3: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + is-windows@1.0.2: {} isarray@2.0.5: {} @@ -8892,6 +9822,20 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 + iterator.prototype@1.1.2: + dependencies: + define-properties: 1.2.1 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.6 + set-function-name: 2.0.2 + + jackspeak@2.3.6: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + jackspeak@3.4.0: dependencies: '@isaacs/cliui': 8.0.2 @@ -9279,12 +10223,23 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + json5@1.0.2: + dependencies: + minimist: 1.2.8 + json5@2.2.3: {} jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 + jsx-ast-utils@3.3.5: + dependencies: + array-includes: 3.1.8 + array.prototype.flat: 1.3.2 + object.assign: 4.1.5 + object.values: 1.2.0 + keyv@4.5.4: dependencies: json-buffer: 3.0.1 @@ -9295,6 +10250,12 @@ snapshots: kleur@4.1.5: {} + language-subtag-registry@0.3.23: {} + + language-tags@1.0.9: + dependencies: + language-subtag-registry: 0.3.23 + leven@3.1.0: {} levn@0.4.1: @@ -9378,6 +10339,10 @@ snapshots: dependencies: yallist: 3.1.1 + lucide-react@0.408.0(react@18.3.1): + dependencies: + react: 18.3.1 + lz-string@1.5.0: {} magic-string@0.30.10: @@ -9435,6 +10400,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@9.0.3: + dependencies: + brace-expansion: 2.0.1 + minimatch@9.0.4: dependencies: brace-expansion: 2.0.1 @@ -9445,6 +10414,8 @@ snapshots: is-plain-obj: 1.1.0 kind-of: 6.0.3 + minimist@1.2.8: {} + minipass@7.1.2: {} mixme@0.5.10: {} @@ -9463,6 +10434,36 @@ snapshots: natural-compare@1.4.0: {} + next-themes@0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + next@14.2.5(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@next/env': 14.2.5 + '@swc/helpers': 0.5.5 + busboy: 1.6.0 + caniuse-lite: 1.0.30001633 + graceful-fs: 4.2.11 + postcss: 8.4.31 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.24.7)(react@18.3.1) + optionalDependencies: + '@next/swc-darwin-arm64': 14.2.5 + '@next/swc-darwin-x64': 14.2.5 + '@next/swc-linux-arm64-gnu': 14.2.5 + '@next/swc-linux-arm64-musl': 14.2.5 + '@next/swc-linux-x64-gnu': 14.2.5 + '@next/swc-linux-x64-musl': 14.2.5 + '@next/swc-win32-arm64-msvc': 14.2.5 + '@next/swc-win32-ia32-msvc': 14.2.5 + '@next/swc-win32-x64-msvc': 14.2.5 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + node-int64@0.4.0: {} node-releases@2.0.14: {} @@ -9494,6 +10495,11 @@ snapshots: object-inspect@1.13.1: {} + object-is@1.1.6: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + object-keys@1.1.1: {} object.assign@4.1.5: @@ -9503,6 +10509,31 @@ snapshots: has-symbols: 1.0.3 object-keys: 1.1.1 + object.entries@1.1.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + object.fromentries@2.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + + object.groupby@1.0.3: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + + object.values@1.2.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -9635,6 +10666,12 @@ snapshots: postcss-value-parser@4.2.0: {} + postcss@8.4.31: + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.1 + source-map-js: 1.2.0 + postcss@8.4.38: dependencies: nanoid: 3.3.7 @@ -9677,6 +10714,12 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 + prop-types@15.8.1: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + pseudomap@1.0.2: {} psl@1.9.0: {} @@ -9697,6 +10740,8 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 + react-is@16.13.1: {} + react-is@17.0.2: {} react-is@18.3.1: {} @@ -9784,6 +10829,16 @@ snapshots: indent-string: 4.0.0 strip-indent: 3.0.0 + reflect.getprototypeof@1.0.6: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + which-builtin-type: 1.1.4 + regenerate-unicode-properties@10.1.1: dependencies: regenerate: 1.4.2 @@ -9830,6 +10885,8 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + resolve.exports@2.0.2: {} resolve@1.22.8: @@ -9838,6 +10895,12 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + resolve@2.0.0-next.5: + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + restore-cursor@4.0.0: dependencies: onetime: 5.1.2 @@ -10012,10 +11075,16 @@ snapshots: dependencies: escape-string-regexp: 2.0.0 + stop-iteration-iterator@1.0.0: + dependencies: + internal-slot: 1.0.7 + stream-transform@2.1.3: dependencies: mixme: 0.5.10 + streamsearch@1.1.0: {} + string-argv@0.3.2: {} string-length@4.0.2: @@ -10041,6 +11110,31 @@ snapshots: get-east-asian-width: 1.2.0 strip-ansi: 7.1.0 + string.prototype.includes@2.0.0: + dependencies: + define-properties: 1.2.1 + es-abstract: 1.23.3 + + string.prototype.matchall@4.0.11: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + regexp.prototype.flags: 1.5.2 + set-function-name: 2.0.2 + side-channel: 1.0.6 + + string.prototype.repeat@1.0.0: + dependencies: + define-properties: 1.2.1 + es-abstract: 1.23.3 + string.prototype.trim@1.2.9: dependencies: call-bind: 1.0.7 @@ -10084,6 +11178,13 @@ snapshots: style-mod@4.1.2: {} + styled-jsx@5.1.1(@babel/core@7.24.7)(react@18.3.1): + dependencies: + client-only: 0.0.1 + react: 18.3.1 + optionalDependencies: + '@babel/core': 7.24.7 + sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -10145,6 +11246,8 @@ snapshots: transitivePeerDependencies: - ts-node + tapable@2.2.1: {} + term-size@2.2.1: {} test-exclude@6.0.0: @@ -10196,6 +11299,13 @@ snapshots: ts-interface-checker@0.1.13: {} + tsconfig-paths@3.15.0: + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.8 + strip-bom: 3.0.0 + tslib@2.6.3: {} tty-table@4.2.3: @@ -10402,6 +11512,28 @@ snapshots: is-string: 1.0.7 is-symbol: 1.0.4 + which-builtin-type@1.1.4: + dependencies: + function.prototype.name: 1.1.6 + has-tostringtag: 1.0.2 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.0.2 + is-generator-function: 1.0.10 + is-regex: 1.1.4 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.2 + which-typed-array: 1.1.15 + + which-collection@1.0.2: + dependencies: + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.3 + which-module@2.0.1: {} which-pm@2.0.0: From 1cd29c8b2d17538546da26542b979dc0b205de85 Mon Sep 17 00:00:00 2001 From: baurine <2008.hbl@gmail.com> Date: Wed, 31 Jul 2024 17:57:06 +0800 Subject: [PATCH 5/8] chore: update README --- packages/playground-nextjs/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/playground-nextjs/README.md b/packages/playground-nextjs/README.md index b48894d..defc79c 100644 --- a/packages/playground-nextjs/README.md +++ b/packages/playground-nextjs/README.md @@ -1,4 +1,16 @@ -Next.js version for TiSQLEditor playground. +# TiSQLEditor Playground (NextJS version) + +## Try it + +- [Full Featured Playground](https://tisqleditor.vercel.app/) +- [Simple Example](https://tisqleditor.vercel.app/examples) + +## Tech Stack + +- nextjs +- tailwindcss +- shadcn ui +- react-query ## Getting Started From f9f5ebe48e74e131f0fe28171ea4e0973d77b69b Mon Sep 17 00:00:00 2001 From: baurine <2008.hbl@gmail.com> Date: Wed, 31 Jul 2024 18:03:59 +0800 Subject: [PATCH 6/8] chore: update script --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index e08a26f..a778dc7 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,10 @@ "prepare": "husky", "dev": "pnpm -r --parallel dev", "dev:playground": "pnpm --filter @tidbcloud/tisqleditor-playground... --parallel dev", + "dev:playground-nextjs": "pnpm --filter @tidbcloud/tisqleditor-playground-nextjs... --parallel dev", "build": "pnpm -r build", "build:playground": "pnpm --filter @tidbcloud/tisqleditor-playground... run build", + "build:playground-nextjs": "pnpm --filter @tidbcloud/tisqleditor-playground-nextjs... run build", "test": "jest", "release": "changeset publish" }, From 10262d1d318d6ba9eec0ae8b3cab6b5bcf1527ad Mon Sep 17 00:00:00 2001 From: baurine <2008.hbl@gmail.com> Date: Wed, 31 Jul 2024 18:04:11 +0800 Subject: [PATCH 7/8] chore: set defaultSize for panel --- packages/playground-nextjs/app/playground/panels.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/playground-nextjs/app/playground/panels.tsx b/packages/playground-nextjs/app/playground/panels.tsx index 5d91193..21da12c 100644 --- a/packages/playground-nextjs/app/playground/panels.tsx +++ b/packages/playground-nextjs/app/playground/panels.tsx @@ -10,13 +10,13 @@ import { ResultPanel } from './result-panel' export function Panels() { return ( - + - + From a2fb960b66cb691cc2ac9f85ba48e0a5124e3394 Mon Sep 17 00:00:00 2001 From: baurine <2008.hbl@gmail.com> Date: Wed, 31 Jul 2024 18:16:04 +0800 Subject: [PATCH 8/8] chore: fix build --- packages/playground-nextjs/package.json | 20 +++++++++---------- pnpm-lock.yaml | 26 ++++++++++++------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/playground-nextjs/package.json b/packages/playground-nextjs/package.json index 7395c78..06af497 100644 --- a/packages/playground-nextjs/package.json +++ b/packages/playground-nextjs/package.json @@ -22,17 +22,17 @@ "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.2.1", "@tanstack/react-query": "^5.45.1", - "@tidbcloud/codemirror-extension-ai-widget": "^0.0.6", - "@tidbcloud/codemirror-extension-cur-sql": "^0.0.6", - "@tidbcloud/codemirror-extension-cur-sql-gutter": "^0.0.6", - "@tidbcloud/codemirror-extension-events": "^0.0.6", - "@tidbcloud/codemirror-extension-linters": "^0.0.6", - "@tidbcloud/codemirror-extension-save-helper": "^0.0.6", - "@tidbcloud/codemirror-extension-sql-autocomplete": "^0.0.6", - "@tidbcloud/codemirror-extension-sql-parser": "^0.0.6", - "@tidbcloud/codemirror-extension-themes": "^0.0.6", + "@tidbcloud/codemirror-extension-ai-widget": "workspace:^", + "@tidbcloud/codemirror-extension-cur-sql": "workspace:^", + "@tidbcloud/codemirror-extension-cur-sql-gutter": "workspace:^", + "@tidbcloud/codemirror-extension-events": "workspace:^", + "@tidbcloud/codemirror-extension-linters": "workspace:^", + "@tidbcloud/codemirror-extension-save-helper": "workspace:^", + "@tidbcloud/codemirror-extension-sql-autocomplete": "workspace:^", + "@tidbcloud/codemirror-extension-sql-parser": "workspace:^", + "@tidbcloud/codemirror-extension-themes": "workspace:^", "@tidbcloud/serverless": "^0.2.0", - "@tidbcloud/tisqleditor-react": "^0.0.6", + "@tidbcloud/tisqleditor-react": "workspace:^", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "dayjs": "^1.11.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07045aa..7dcab03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -552,37 +552,37 @@ importers: specifier: ^5.45.1 version: 5.45.1(react@18.3.1) '@tidbcloud/codemirror-extension-ai-widget': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/ai-widget '@tidbcloud/codemirror-extension-cur-sql': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/cur-sql '@tidbcloud/codemirror-extension-cur-sql-gutter': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/cur-sql-gutter '@tidbcloud/codemirror-extension-events': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/events '@tidbcloud/codemirror-extension-linters': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/linters '@tidbcloud/codemirror-extension-save-helper': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/save-helper '@tidbcloud/codemirror-extension-sql-autocomplete': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/sql-autocomplete '@tidbcloud/codemirror-extension-sql-parser': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/sql-parser '@tidbcloud/codemirror-extension-themes': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../extensions/themes '@tidbcloud/serverless': specifier: ^0.2.0 version: 0.2.0 '@tidbcloud/tisqleditor-react': - specifier: ^0.0.6 + specifier: workspace:^ version: link:../react class-variance-authority: specifier: ^0.7.0 @@ -9057,7 +9057,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -9081,7 +9081,7 @@ snapshots: enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.13.1 @@ -9103,7 +9103,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5