@hienlh/ppm 0.13.72 → 0.13.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/http-api.md +1 -1
- package/dist/web/assets/{audio-preview-BSxUhOcE.js → audio-preview-twszgh6m.js} +1 -1
- package/dist/web/assets/{chat-tab-C7cQFuCE.js → chat-tab-ClW604Oj.js} +3 -3
- package/dist/web/assets/code-editor-CP0Sidni.js +10 -0
- package/dist/web/assets/{conflict-editor-C5zdbpR6.js → conflict-editor-Cjj4IcSV.js} +1 -1
- package/dist/web/assets/{database-viewer-LxK8iNza.js → database-viewer-Ct8Xe9xA.js} +1 -1
- package/dist/web/assets/{diff-viewer-BjkXOjl9.js → diff-viewer-C8Ee5PH_.js} +1 -1
- package/dist/web/assets/{docx-preview-DP6RSIBZ.js → docx-preview-5GXTCC95.js} +1 -1
- package/dist/web/assets/{extension-webview-CBtARJbA.js → extension-webview-3jX64E_M.js} +1 -1
- package/dist/web/assets/{git-log-panel-BCGywZjD.js → git-log-panel-D-6gt7Pv.js} +1 -1
- package/dist/web/assets/{glide-data-grid-P39hoLVJ.js → glide-data-grid-DndbR9Co.js} +1 -1
- package/dist/web/assets/{image-preview-BXnw19Ss.js → image-preview-f92bkvIy.js} +1 -1
- package/dist/web/assets/{index-D39gAvQS.js → index-BeEfCJbj.js} +3 -3
- package/dist/web/assets/keybindings-store-wnX691Lw.js +1 -0
- package/dist/web/assets/{markdown-renderer-DIZ9ZEgA.js → markdown-renderer-Cj104shG.js} +1 -1
- package/dist/web/assets/notification-store-D_Lxdo_k.js +1 -0
- package/dist/web/assets/{pdf-preview-wn5Y1nWN.js → pdf-preview-BDigPZWf.js} +1 -1
- package/dist/web/assets/{port-forwarding-tab-Dw95F7ed.js → port-forwarding-tab-c6uH6Kor.js} +1 -1
- package/dist/web/assets/{postgres-viewer-CYu65424.js → postgres-viewer-CMVqKks2.js} +1 -1
- package/dist/web/assets/{settings-tab-D3WPn1-j.js → settings-tab-CRjzY9lj.js} +1 -1
- package/dist/web/assets/{sql-query-editor-Ca3oVRX_.js → sql-query-editor-C5zeUzXt.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-B_LiamyO.js → sqlite-viewer-Re80qgfe.js} +1 -1
- package/dist/web/assets/{system-monitor-tab-BGGwcAnr.js → system-monitor-tab-CbaoNKga.js} +1 -1
- package/dist/web/assets/{terminal-tab-Ykn8Q01b.js → terminal-tab-BP6-eJeb.js} +1 -1
- package/dist/web/assets/{video-preview-BSyVoRAz.js → video-preview-BxW3CCRd.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/src/services/postgres.service.ts +22 -3
- package/src/web/components/editor/code-editor.tsx +56 -3
- package/dist/web/assets/code-editor-CgOXGuFE.js +0 -8
- package/dist/web/assets/keybindings-store-NVJWQgzX.js +0 -1
- package/dist/web/assets/notification-store-C0UtpgVR.js +0 -1
|
@@ -448,12 +448,17 @@ export const CodeEditor = memo(function CodeEditor({ metadata, tabId }: CodeEdit
|
|
|
448
448
|
let stmtLines: string[] = [];
|
|
449
449
|
let dollarBlock = false; // Track DO $$ ... $$ blocks
|
|
450
450
|
|
|
451
|
-
|
|
451
|
+
// Transaction block tracking: group BEGIN...COMMIT into single Run Transaction
|
|
452
|
+
const txPattern = /^(BEGIN|COMMIT|ROLLBACK|END)(;|\s|$)/i;
|
|
453
|
+
let txBlockStartLine = -1;
|
|
454
|
+
let txBlockStmts: string[] = [];
|
|
455
|
+
|
|
456
|
+
const addLens = (line: number, stmt: string, title = "\u25B7 Run") => {
|
|
452
457
|
const trimmed = stmt.trim();
|
|
453
458
|
if (!trimmed || trimmed.startsWith("--")) return;
|
|
454
459
|
lenses.push({
|
|
455
460
|
range: { startLineNumber: line, startColumn: 1, endLineNumber: line, endColumn: 1 },
|
|
456
|
-
command: { id: cmdId, title
|
|
461
|
+
command: { id: cmdId, title, arguments: [trimmed] },
|
|
457
462
|
});
|
|
458
463
|
};
|
|
459
464
|
|
|
@@ -472,11 +477,38 @@ export const CodeEditor = memo(function CodeEditor({ metadata, tabId }: CodeEdit
|
|
|
472
477
|
|
|
473
478
|
// Only split on ; when NOT inside a $$ block
|
|
474
479
|
if (!dollarBlock && trimmed.endsWith(";")) {
|
|
475
|
-
|
|
480
|
+
const stmt = stmtLines.join("\n").trim();
|
|
481
|
+
const isTxStart = /^BEGIN(;|\s|$)/i.test(stmt);
|
|
482
|
+
const isTxEnd = /^(COMMIT|ROLLBACK|END)(;|\s|$)/i.test(stmt);
|
|
483
|
+
|
|
484
|
+
if (txBlockStartLine === -1 && isTxStart) {
|
|
485
|
+
// Start collecting transaction block
|
|
486
|
+
txBlockStartLine = stmtStartLine;
|
|
487
|
+
txBlockStmts = [stmt];
|
|
488
|
+
} else if (txBlockStartLine > -1) {
|
|
489
|
+
txBlockStmts.push(stmt);
|
|
490
|
+
// Individual Run for non-tx-control statements inside block
|
|
491
|
+
if (!isTxEnd && !txPattern.test(stmt)) {
|
|
492
|
+
addLens(stmtStartLine, stmt);
|
|
493
|
+
}
|
|
494
|
+
if (isTxEnd) {
|
|
495
|
+
// Complete block — add Run Transaction at BEGIN line
|
|
496
|
+
addLens(txBlockStartLine, txBlockStmts.join("\n"), "\u25B7 Run Transaction");
|
|
497
|
+
txBlockStartLine = -1;
|
|
498
|
+
txBlockStmts = [];
|
|
499
|
+
}
|
|
500
|
+
} else {
|
|
501
|
+
addLens(stmtStartLine, stmt);
|
|
502
|
+
}
|
|
503
|
+
|
|
476
504
|
stmtStartLine = -1;
|
|
477
505
|
stmtLines = [];
|
|
478
506
|
}
|
|
479
507
|
}
|
|
508
|
+
// Unclosed transaction block — still offer Run Transaction
|
|
509
|
+
if (txBlockStartLine > -1 && txBlockStmts.length > 1) {
|
|
510
|
+
addLens(txBlockStartLine, txBlockStmts.join("\n"), "\u25B7 Run Transaction");
|
|
511
|
+
}
|
|
480
512
|
if (stmtStartLine > 0 && stmtLines.join("").trim()) {
|
|
481
513
|
addLens(stmtStartLine, stmtLines.join("\n"));
|
|
482
514
|
}
|
|
@@ -484,6 +516,27 @@ export const CodeEditor = memo(function CodeEditor({ metadata, tabId }: CodeEdit
|
|
|
484
516
|
},
|
|
485
517
|
});
|
|
486
518
|
codeLensDisposable.current.push(provider);
|
|
519
|
+
|
|
520
|
+
// Folding ranges for BEGIN...COMMIT/ROLLBACK/END blocks
|
|
521
|
+
const foldingProvider = monaco.languages.registerFoldingRangeProvider("sql", {
|
|
522
|
+
provideFoldingRanges: (model: MonacoType.editor.ITextModel) => {
|
|
523
|
+
if (model !== thisModel) return [];
|
|
524
|
+
const ranges: MonacoType.languages.FoldingRange[] = [];
|
|
525
|
+
const lineCount = model.getLineCount();
|
|
526
|
+
const beginStack: number[] = [];
|
|
527
|
+
for (let i = 1; i <= lineCount; i++) {
|
|
528
|
+
const line = model.getLineContent(i).trim();
|
|
529
|
+
if (/^BEGIN(;|\s|$)/i.test(line)) {
|
|
530
|
+
beginStack.push(i);
|
|
531
|
+
} else if (/^(COMMIT|ROLLBACK|END)(;|\s|$)/i.test(line) && beginStack.length > 0) {
|
|
532
|
+
const startLine = beginStack.pop()!;
|
|
533
|
+
ranges.push({ start: startLine, end: i, kind: monaco.languages.FoldingRangeKind.Region });
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return ranges;
|
|
537
|
+
},
|
|
538
|
+
});
|
|
539
|
+
codeLensDisposable.current.push(foldingProvider);
|
|
487
540
|
}
|
|
488
541
|
}
|
|
489
542
|
}, [sqlSchemaInfo]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-renderer-DIZ9ZEgA.js","assets/rolldown-runtime-FhOqtrmT.js","assets/index-D39gAvQS.js","assets/vendor-mermaid-CsBwn--q.js","assets/vendor-ui-UXCWAcmi.js","assets/vendor-markdown-0Mxgxy0L.js","assets/input-DSELw5zU.js","assets/utils-Bs_TFEQf.js","assets/createLucideIcon-BjHrJDVb.js","assets/x-WwAMX3EB.js","assets/settings-store-DRbccx1s.js","assets/react-BXxixfbh.js","assets/api-client-DG9qwosT.js","assets/eye-off-BacF7RVS.js","assets/ai-settings-section-D0VMZ4aE.js","assets/chevron-down-BMo4cBth.js","assets/globe-CQ8NAYvi.js","assets/trash-2-DkIfBY8d.js","assets/refresh-cw-CRD2qr4U.js","assets/api-settings-Byph7lae.js","assets/database-Dc8mr-dP.js","assets/chevron-right-CD8e6Aj4.js","assets/search-D90WJ5fo.js","assets/panel-store-DlvwzOll.js","assets/project-store-CpC02pIv.js","assets/tab-store-Bdw8DIbZ.js","assets/index-fyMt5gpO.css","assets/csv-preview-CwEbP_iZ.js","assets/lib-D4YDpYv4.js","assets/arrow-down-D825m4vm.js","assets/arrow-up-Rcw6_KKu.js","assets/csv-parser-B_TuHmnd.js","assets/image-preview-BXnw19Ss.js","assets/file-exclamation-point-B__2Hrd6.js","assets/use-blob-url-CBi0HMq5.js","assets/pdf-preview-wn5Y1nWN.js","assets/video-preview-BSyVoRAz.js","assets/audio-preview-BSxUhOcE.js","assets/docx-preview-DP6RSIBZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{b as t,x as n}from"./vendor-markdown-0Mxgxy0L.js";import"./vendor-ui-UXCWAcmi.js";import{t as r}from"./createLucideIcon-BjHrJDVb.js";import{t as i}from"./database-Dc8mr-dP.js";import{t as a}from"./chevron-right-CD8e6Aj4.js";import{a as o,l as s,n as c,o as l,r as u,s as d,t as f}from"./input-DSELw5zU.js";import{t as p}from"./code-DiNmA3eR.js";import{i as m,r as h}from"./trash-2-DkIfBY8d.js";import{t as ee}from"./file-exclamation-point-B__2Hrd6.js";import{i as g,r as te,t as _}from"./glide-data-grid-P39hoLVJ.js";import{t as ne}from"./shield-check-DeIMQtEj.js";import{t as re}from"./shield-off-D4jBmG5E.js";import{t as v}from"./table-DCYlHUNQ.js";import{t as y}from"./text-wrap-B3mYv9Yo.js";import{t as b}from"./x-WwAMX3EB.js";import{i as ie,t as x}from"./api-client-DG9qwosT.js";import{n as ae}from"./settings-store-DRbccx1s.js";import{K as S}from"./vendor-mermaid-CsBwn--q.js";import{t as C}from"./utils-Bs_TFEQf.js";import{t as oe}from"./panel-store-DlvwzOll.js";import{n as w}from"./project-store-CpC02pIv.js";import{t as se}from"./tab-store-Bdw8DIbZ.js";import{H as T,O as E,X as ce,_ as le,at as ue,ct as D,d as O,et as k,f as de,ft as fe,h as A,it as j,l as M,lt as N,m as P,o as pe,ot as F,p as me,rt as he,s as ge,st as I,tt as L,u as _e,v as ve}from"./index-D39gAvQS.js";import"./data-grid-types-CO_3iSwd.js";import{n as ye,t as be}from"./use-monaco-theme-CKmBga-e.js";var xe=r(`redo-2`,[[`path`,{d:`m15 14 5-5-5-5`,key:`12vg1m`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`,key:`6uklza`}]]),R=e(n(),1),z=t(),Se={ts:I,tsx:I,js:I,jsx:I,py:I,rs:I,go:I,html:I,css:I,scss:I,json:D,md:F,txt:F,yaml:ue,yml:ue};function B(e,t){return t?he:Se[e.split(`.`).pop()?.toLowerCase()??``]??j}function Ce(e,t){let n=[],r=e,i=``;for(let e=0;e<t.length;e++){let a=t[e],o=t.slice(0,e+1).join(`/`),s=r.find(e=>e.name===a);if(n.push({name:a,fullPath:o,node:s??null,siblings:r,parentPath:i}),s?.children)i=s.path,r=s.children;else{for(let r=e+1;r<t.length;r++)n.push({name:t[r],fullPath:t.slice(0,r+1).join(`/`),node:null,siblings:[],parentPath:t.slice(0,r).join(`/`)});break}}return n}function V(e){return[...e].sort((e,t)=>e.type===t.type?e.name.localeCompare(t.name):e.type===`directory`?-1:1)}function we({filePath:e,projectName:t,tabId:n,className:r}){let i=E(e=>e.tree),{updateTab:o,openTab:s}=se(le(e=>({updateTab:e.updateTab,openTab:e.openTab}))),c=w(e=>e.projects.find(e=>e.name===t)?.path??``),l=(0,R.useRef)(null),{prefixParts:u,relativePath:d}=(0,R.useMemo)(()=>{let t=e.startsWith(`/`)?e.slice(1):e,n=c.startsWith(`/`)?c.slice(1):c;if(n&&t.startsWith(n+`/`)){let e=t.slice(n.length+1);return{prefixParts:n.split(`/`),relativePath:e}}return{prefixParts:[],relativePath:t}},[e,c]),f=(0,R.useMemo)(()=>Ce(i,d.split(`/`).filter(Boolean)),[i,d]);(0,R.useEffect)(()=>{l.current&&(l.current.scrollLeft=l.current.scrollWidth)},[f]);function p(e,r){let i=C(e);r.metaKey||r.ctrlKey?s({type:`editor`,title:i,metadata:{filePath:e,projectName:t},projectId:t,closable:!0}):o(n,{title:i,metadata:{filePath:e,projectName:t}})}return(0,z.jsxs)(`div`,{ref:l,className:r,children:[u.map((e,t)=>(0,z.jsxs)(`div`,{className:`flex items-center shrink-0`,children:[t>0&&(0,z.jsx)(a,{className:`size-3 text-muted-foreground shrink-0 mx-0.5`}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground px-1 py-0.5`,children:e})]},`prefix-${t}`)),f.map((e,n)=>(0,z.jsxs)(`div`,{className:`flex items-center shrink-0`,children:[(n>0||u.length>0)&&(0,z.jsx)(a,{className:`size-3 text-muted-foreground shrink-0 mx-0.5`}),(0,z.jsx)(Te,{segment:e,isLast:n===f.length-1,projectName:t,onFileClick:p})]},e.fullPath))]})}function Te({segment:e,isLast:t,projectName:n,onFileClick:r}){let i=E(e=>e.loadChildren),a=E(e=>e.loadedPaths),o=(0,R.useMemo)(()=>V(e.siblings),[e.siblings]),s=a.has(e.parentPath);function c(t){if(t&&!s){let t=e.parentPath.split(`/`).filter(Boolean);(async()=>{for(let e=0;e<=t.length;e++)await i(n,t.slice(0,e).join(`/`))})()}}return(0,z.jsxs)(M,{onOpenChange:c,children:[(0,z.jsx)(A,{asChild:!0,children:(0,z.jsx)(`button`,{type:`button`,className:`text-xs px-1 py-0.5 rounded hover:bg-muted transition-colors truncate max-w-[120px] ${t?`text-foreground font-medium`:`text-muted-foreground`}`,children:e.name})}),(0,z.jsx)(_e,{align:`start`,className:`max-h-[300px] p-1`,children:o.length===0?(0,z.jsx)(O,{disabled:!0,className:`text-xs text-muted-foreground`,children:`Loading…`}):o.map(t=>(0,z.jsx)(H,{node:t,projectName:n,activePath:e.fullPath,onFileClick:r},t.path))})]})}function H({node:e,projectName:t,activePath:n,onFileClick:r}){let i=B(e.name,e.type===`directory`),a=e.path===n,o=E(e=>e.loadChildren),s=E(e=>e.loadedPaths);if(e.type===`directory`){let c=e.children??[],l=s.has(e.path);function u(n){n&&!l&&o(t,e.path)}return(0,z.jsxs)(de,{onOpenChange:u,children:[(0,z.jsxs)(P,{className:`text-xs gap-1.5 ${a?`bg-muted`:``}`,children:[(0,z.jsx)(i,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,z.jsx)(me,{className:`max-h-[300px] overflow-y-auto p-1`,children:c.length===0?(0,z.jsx)(O,{disabled:!0,className:`text-xs text-muted-foreground`,children:`Loading…`}):V(c).map(e=>(0,z.jsx)(H,{node:e,projectName:t,activePath:n,onFileClick:r},e.path))})]})}return(0,z.jsxs)(O,{className:`text-xs gap-1.5 cursor-pointer ${a?`bg-muted`:``}`,onSelect:e=>{},onClick:t=>{r(e.path,t)},children:[(0,z.jsx)(i,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`truncate`,children:e.name})]})}function U({active:e,onClick:t,icon:n,label:r}){return(0,z.jsxs)(`button`,{type:`button`,onClick:t,className:`flex items-center gap-1 px-2 py-1 rounded text-xs transition-colors ${e?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:[(0,z.jsx)(n,{className:`size-3`}),(0,z.jsx)(`span`,{className:`hidden sm:inline`,children:r})]})}function Ee({ext:e,mdMode:t,onMdModeChange:n,csvMode:r,onCsvModeChange:i,wordWrap:a,onToggleWordWrap:o,filePath:s,projectName:c,className:l}){return(0,z.jsxs)(`div`,{className:l,children:[(e===`md`||e===`mdx`)&&n&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(U,{active:t===`edit`,onClick:()=>n(`edit`),icon:p,label:`Edit`}),(0,z.jsx)(U,{active:t===`preview`,onClick:()=>n(`preview`),icon:h,label:`Preview`})]}),e===`csv`&&i&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(U,{active:r===`table`,onClick:()=>i(`table`),icon:v,label:`Table`}),(0,z.jsx)(U,{active:r===`raw`,onClick:()=>i(`raw`),icon:p,label:`Raw`})]}),(0,z.jsx)(U,{active:a,onClick:o,icon:y,label:`Wrap`}),s&&c&&(0,z.jsx)(U,{active:!1,onClick:()=>ve(c,s),icon:m,label:`Download`})]})}function De({open:e,defaultName:t,content:n,onSave:r,onCancel:i}){let[a,p]=(0,R.useState)(t),[m,h]=(0,R.useState)(!1),[ee,g]=(0,R.useState)(``),te=w(e=>e.activeProject),_=(0,R.useCallback)(()=>{let e=a.trim();if(!e){g(`Filename cannot be empty`);return}if(/[/\\]/.test(e)){g(`Filename cannot contain / or \\`);return}g(``),h(!0)},[a]),ne=(0,R.useCallback)(e=>{let t=e.includes(`\\`)?`\\`:`/`;r(e.endsWith(t)?`${e}${a.trim()}`:`${e}${t}${a.trim()}`,n)},[a,n,r]);return m?(0,z.jsx)(ge,{open:!0,mode:`folder`,root:te?.path,title:`Save "${a.trim()}" to...`,onSelect:ne,onCancel:()=>h(!1)}):(0,z.jsx)(c,{open:e,onOpenChange:e=>{e||i()},children:(0,z.jsxs)(u,{className:`sm:max-w-md`,children:[(0,z.jsx)(l,{children:(0,z.jsx)(d,{children:`Save As`})}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2 py-2`,children:[(0,z.jsx)(`label`,{className:`text-sm text-muted-foreground`,children:`Filename`}),(0,z.jsx)(f,{value:a,onChange:e=>{p(e.target.value),g(``)},onKeyDown:e=>{e.key===`Enter`&&_()},placeholder:`e.g. my-file.ts`,autoFocus:!0}),ee&&(0,z.jsx)(`p`,{className:`text-xs text-destructive`,children:ee})]}),(0,z.jsxs)(o,{children:[(0,z.jsx)(s,{variant:`outline`,onClick:i,children:`Cancel`}),(0,z.jsx)(s,{onClick:_,children:`Choose Folder...`})]})]})})}var W=typeof window<`u`&&window.isSecureContext,G=[`(`,`)`,`{`,`}`,`[`,`]`,`<`,`>`,`;`,`:`,`=`,`"`,`'`,"`",`/`,`\\`,`_`,`#`],K=`px-2 py-1.5 rounded text-xs min-w-[36px] min-h-[32px] bg-surface-elevated text-text-primary active:bg-primary active:text-primary-foreground transition-colors select-none`,Oe=`px-3 py-1.5 rounded text-xs font-mono min-w-[36px] min-h-[32px] bg-surface-elevated text-text-primary active:bg-primary active:text-primary-foreground transition-colors select-none`,q=`w-px h-5 bg-border mx-0.5 shrink-0`;function ke({editorRef:e,readOnly:t}){let n=(0,R.useCallback)(()=>e.current,[e]),r=(0,R.useCallback)(e=>{let t=n();if(!t)return;t.focus();let r=t.getSelection();r&&t.executeEdits(`mobile-toolbar`,[{range:r,text:e}])},[n]),[i,a]=(0,R.useState)(!1),o=(0,R.useRef)(null),s=(0,R.useCallback)(async()=>{try{let e=await navigator.clipboard.readText();e&&r(e)}catch{}},[r]),c=(0,R.useCallback)(()=>{a(!0),requestAnimationFrame(()=>o.current?.focus())},[]),l=(0,R.useCallback)(e=>{e.preventDefault();let t=e.clipboardData.getData(`text/plain`);t&&(a(!1),r(t))},[r]),u=(0,R.useCallback)(()=>{let e=n();e&&(e.focus(),e.trigger(`mobile-toolbar`,`undo`,null))},[n]),d=(0,R.useCallback)(()=>{let e=n();e&&(e.focus(),e.trigger(`mobile-toolbar`,`redo`,null))},[n]),f=(0,R.useCallback)(()=>{let e=n();e&&(e.focus(),e.trigger(`mobile-toolbar`,`tab`,null))},[n]);return t?null:(0,z.jsxs)(`div`,{className:`shrink-0 border-t border-border bg-surface`,children:[!W&&i&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5 border-b border-border bg-muted/50`,children:[(0,z.jsx)(`textarea`,{ref:o,onPaste:l,placeholder:`Long-press here → Paste`,className:`flex-1 h-8 rounded border border-border bg-background text-foreground text-xs px-2 py-1.5 resize-none focus:outline-none focus:ring-1 focus:ring-primary`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>a(!1),className:`p-1.5 rounded text-muted-foreground active:bg-muted transition-colors`,children:(0,z.jsx)(b,{size:14})})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1.5 overflow-x-auto`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:W?s:c,className:K,title:`Paste`,children:(0,z.jsx)(fe,{size:14})}),(0,z.jsx)(`button`,{type:`button`,onClick:u,className:K,title:`Undo`,children:(0,z.jsx)(T,{size:14})}),(0,z.jsx)(`button`,{type:`button`,onClick:d,className:K,title:`Redo`,children:(0,z.jsx)(xe,{size:14})}),(0,z.jsx)(`div`,{className:q}),(0,z.jsx)(`button`,{type:`button`,onClick:f,className:Oe,children:`Tab`}),(0,z.jsx)(`div`,{className:q}),G.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>r(e),className:Oe,children:e},e))]})]})}var J=(0,R.lazy)(()=>S(()=>import(`./markdown-renderer-DIZ9ZEgA.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]))),Ae=(0,R.lazy)(()=>S(()=>import(`./csv-preview-CwEbP_iZ.js`).then(e=>({default:e.CsvPreview})),__vite__mapDeps([27,1,4,5,28,29,8,30,31]))),je=(0,R.lazy)(()=>S(()=>import(`./image-preview-BXnw19Ss.js`).then(e=>({default:e.ImagePreview})),__vite__mapDeps([32,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,33,34]))),Me=(0,R.lazy)(()=>S(()=>import(`./pdf-preview-wn5Y1nWN.js`).then(e=>({default:e.PdfPreview})),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,33]))),Ne=(0,R.lazy)(()=>S(()=>import(`./video-preview-BSyVoRAz.js`).then(e=>({default:e.VideoPreview})),__vite__mapDeps([36,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,33,34]))),Pe=(0,R.lazy)(()=>S(()=>import(`./audio-preview-BSxUhOcE.js`).then(e=>({default:e.AudioPreview})),__vite__mapDeps([37,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,33,34]))),Fe=(0,R.lazy)(()=>S(()=>import(`./docx-preview-DP6RSIBZ.js`).then(e=>({default:e.DocxPreview})),__vite__mapDeps([38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,33]))),Ie=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`]),Le=new Set([`mp4`,`webm`,`mov`,`ogg`,`avi`,`mkv`]),Re=new Set([`mp3`,`wav`,`flac`,`aac`,`m4a`,`wma`]),ze=new Set([`db`,`sqlite`,`sqlite3`]);function Be(e){return e.split(`.`).pop()?.toLowerCase()??``}function Ve(e){return{js:`javascript`,jsx:`javascript`,ts:`typescript`,tsx:`typescript`,py:`python`,html:`html`,css:`css`,scss:`scss`,json:`json`,md:`markdown`,mdx:`markdown`,yaml:`yaml`,yml:`yaml`,sh:`shell`,bash:`shell`,sql:`sql`}[Be(e)]??`plaintext`}var He=(0,R.memo)(function({metadata:e,tabId:t}){let n=e?.filePath,r=e?.projectName,a=e?.inlineContent,o=e?.inlineLanguage,[s,c]=(0,R.useState)(a??null),[l,u]=(0,R.useState)(`utf-8`),[d,f]=(0,R.useState)(!0),[p,m]=(0,R.useState)(null),[h,_]=(0,R.useState)(!1),v=(0,R.useRef)(null),y=(0,R.useRef)(``),b=(0,R.useRef)(null),{tabs:S,updateTab:w}=se(le(e=>({tabs:e.tabs,updateTab:e.updateTab}))),{wordWrap:T,toggleWordWrap:E}=ae(le(e=>({wordWrap:e.wordWrap,toggleWordWrap:e.toggleWordWrap}))),ue=be(),D=e?.isUntitled===!0,O=e?.unsavedContent,[de,fe]=(0,R.useState)(!1),A=S.find(e=>e.id===t),j=n?Be(n):``,M=Ie.has(j),N=j===`pdf`,P=j===`docx`,F=Le.has(j),me=Re.has(j),he=ze.has(j),ge=j===`md`||j===`mdx`,I=j===`csv`,L=j===`sql`,[_e,ve]=(0,R.useState)(`preview`),[xe,Se]=(0,R.useState)(`table`),{connections:B,cachedTables:Ce,refreshTables:V,updateConnection:Te}=pe(),[H,U]=(0,R.useState)(()=>{if(!L||!n)return null;let e=localStorage.getItem(`ppm:sql-conn:${n}`);return e?Number(e):null}),W=(0,R.useRef)(null),G=(0,R.useRef)(null),K=(0,R.useMemo)(()=>B.find(e=>e.id===H)??null,[B,H]),Oe=a!=null&&(o===`json`||o===`xml`),[q,J]=(0,R.useState)(!1),He=(0,R.useCallback)(()=>{if(a)if(q)c(a),J(!1);else{let e=a.trimStart();if(o===`json`)try{c(JSON.stringify(JSON.parse(e),null,2)),J(!0)}catch{}else if(o===`xml`){let t=0;c(e.replace(/(>)(<)(\/*)/g,`$1
|
|
3
|
-
$2$3`).split(`
|
|
4
|
-
`).map(e=>{let n=e.trim();n.startsWith(`</`)&&(t=Math.max(0,t-1));let r=` `.repeat(t)+n;return n.startsWith(`<`)&&!n.startsWith(`</`)&&!n.endsWith(`/>`)&&!n.includes(`</`)&&t++,r}).join(`
|
|
5
|
-
`)),J(!0)}}},[a,o,q]),Y=(0,R.useCallback)(e=>{U(e),n&&localStorage.setItem(`ppm:sql-conn:${n}`,String(e)),V(e).catch(()=>{})},[n,V]),Z=(0,R.useMemo)(()=>{if(!L||!H)return;let e=(Ce.get(H)??[]).map(e=>({name:e.tableName,schema:e.schemaName}));if(e.length!==0)return{tables:e,getColumns:async(e,t)=>x.get(`/api/db/connections/${H}/schema?table=${encodeURIComponent(e)}${t?`&schema=${encodeURIComponent(t)}`:``}`)}},[L,H,Ce]);(0,R.useEffect)(()=>{if(!(!W.current||!Z))return G.current?.dispose(),te(),G.current=W.current.languages.registerCompletionItemProvider(`sql`,g(W.current,Z)),()=>{G.current?.dispose()}},[Z]);let Ge=se(e=>e.openTab),[Ke,qe]=(0,R.useState)(null),[Je,Ye]=(0,R.useState)(null),[Xe,Ze]=(0,R.useState)(!1),[Qe,$e]=(0,R.useState)(``),et=(0,R.useCallback)(async e=>{if(K){Ze(!0),Ye(null),$e(e);try{qe(await x.post(`/api/db/connections/${K.id}/query`,{sql:e}))}catch(e){Ye(e.message),qe(null)}finally{Ze(!1)}}},[K]),tt=(0,R.useCallback)(()=>{!K||!Qe||Ge({type:`database`,title:`${K.name} · Query`,projectId:null,closable:!0,metadata:{connectionId:K.id,connectionName:K.name,dbType:K.type,initialSql:Qe}})},[K,Ge,Qe]),nt=(0,R.useCallback)(()=>{if(!b.current||!K)return;let e=b.current,t=e.getSelection();et(t&&!t.isEmpty()?e.getModel()?.getValueInRange(t)??e.getValue():e.getValue())},[K,et]),rt=typeof window<`u`&&`ontouchstart`in window,it=(0,R.useRef)(null),[at,ot]=(0,R.useState)(null);(0,R.useEffect)(()=>{if(!rt)return;let e=window.visualViewport;if(!e)return;let t=()=>{let t=it.current;if(!t)return;let n=t.getBoundingClientRect().top;ot(e.height-Math.max(0,n))};return e.addEventListener(`resize`,t),e.addEventListener(`scroll`,t),()=>{e.removeEventListener(`resize`,t),e.removeEventListener(`scroll`,t)}},[rt]);let Q=(0,R.useRef)([]),st=(0,R.useRef)(et);st.current=et,(0,R.useEffect)(()=>()=>{Q.current.forEach(e=>e.dispose()),Q.current=[]},[]),(0,R.useEffect)(()=>{he&&t&&w(t,{type:`sqlite`})},[he,t,w]);let $=n?/^(\/|[A-Za-z]:[/\\])/.test(n):!1;(0,R.useEffect)(()=>{if(a!=null){f(!1);return}if(D){c(O??``),y.current=O??``,f(!1),O&&_(!0);return}if(!n||!$&&!r)return;if(M||N||P||F||me){f(!1);return}f(!0),m(null);let e=$?`/api/fs/read?path=${encodeURIComponent(n)}`:`${ie(r)}/files/read?path=${encodeURIComponent(n)}`;return x.get(e).then(e=>{c(e.content),e.encoding&&u(e.encoding),y.current=e.content,f(!1)}).catch(e=>{m(e instanceof Error?e.message:`Failed to load file`),f(!1)}),()=>{v.current&&clearTimeout(v.current)}},[n,r,M,N,P,$,D]);let ct=(0,R.useRef)(h);ct.current=h,(0,R.useEffect)(()=>{if(!n||!r||a!=null||D)return;let e=e=>{let t=e.detail;if(t.projectName!==r||t.path!==n||ct.current)return;let i=$?`/api/fs/read?path=${encodeURIComponent(n)}`:`${ie(r)}/files/read?path=${encodeURIComponent(n)}`;x.get(i).then(e=>{e.content!==y.current&&(c(e.content),y.current=e.content,e.encoding&&u(e.encoding))}).catch(()=>{})};return window.addEventListener(`file:changed`,e),()=>window.removeEventListener(`file:changed`,e)},[n,r,$,a,D]),(0,R.useEffect)(()=>{if(!A||a!=null)return;let t=D?`Untitled-${e?.untitledNumber??1}`:n?C(n):`Untitled`,r=h?`${t} \u25CF`:t;A.title!==r&&w(A.id,{title:r})},[h]);let lt=(0,R.useCallback)(async e=>{if(n&&!(!$&&!r))try{$?await x.put(`/api/fs/write`,{path:n,content:e}):await x.put(`${ie(r)}/files/write`,{path:n,content:e}),_(!1)}catch{}},[n,r,$]);function ut(n){let r=n??``;c(r),y.current=r,_(!0),v.current&&clearTimeout(v.current),D?v.current=setTimeout(()=>{t&&w(t,{metadata:{...e,unsavedContent:y.current}})},2e3):v.current=setTimeout(()=>lt(y.current),1e3)}let dt=(0,R.useCallback)(async(e,n)=>{try{if(v.current&&clearTimeout(v.current),await x.put(`/api/fs/write`,{path:e,content:n}),t){let{closeTab:n,openTab:r}=oe.getState();n(t),r({type:`editor`,title:C(e),projectId:null,metadata:{filePath:e},closable:!0})}_(!1),fe(!1)}catch{}},[t]),ft=e?.lineNumber,pt=(0,R.useCallback)((e,t)=>{if(b.current=e,W.current=t,ft&&ft>0&&setTimeout(()=>{e.revealLineInCenter(ft),e.setPosition({lineNumber:ft,column:1}),e.focus()},100),D&&e.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KeyS,()=>fe(!0)),e.addCommand(t.KeyMod.Alt|t.KeyCode.KeyZ,()=>ae.getState().toggleWordWrap()),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0,noSuggestionDiagnostics:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0,noSuggestionDiagnostics:!0}),Z&&(G.current?.dispose(),G.current=t.languages.registerCompletionItemProvider(`sql`,g(t,Z))),L){Q.current.forEach(e=>e.dispose()),Q.current=[];let n=e.getModel(),r=e.addCommand(0,(e,t)=>{t&&st.current(t)});if(r&&n){let e=t.languages.registerCodeLensProvider(`sql`,{provideCodeLenses:e=>{if(e!==n)return{lenses:[],dispose:()=>{}};let t=[],i=e.getValue().split(`
|
|
6
|
-
`),a=-1,o=[],s=!1,c=(e,n)=>{let i=n.trim();!i||i.startsWith(`--`)||t.push({range:{startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1},command:{id:r,title:`▷ Run`,arguments:[i]}})};for(let e=0;e<i.length;e++){let t=i[e].trim();if(a===-1){if(!t||t.startsWith(`--`))continue;a=e+1,o=[]}o.push(i[e]),(t.match(/\$\$/g)||[]).length%2==1&&(s=!s),!s&&t.endsWith(`;`)&&(c(a,o.join(`
|
|
7
|
-
`)),a=-1,o=[])}return a>0&&o.join(``).trim()&&c(a,o.join(`
|
|
8
|
-
`)),{lenses:t,dispose:()=>{}}}});Q.current.push(e)}}},[Z]);if(!a&&!D&&(!n||!$&&!r))return(0,z.jsx)(`div`,{className:`flex items-center justify-center h-full text-text-secondary text-sm`,children:`No file selected.`});if(d)return(0,z.jsxs)(`div`,{className:`flex items-center justify-center h-full gap-2 text-text-secondary`,children:[(0,z.jsx)(k,{className:`size-5 animate-spin`}),(0,z.jsx)(`span`,{className:`text-sm`,children:`Loading file...`})]});if(p)return(0,z.jsx)(`div`,{className:`flex items-center justify-center h-full text-error text-sm`,children:p});if(M)return(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(X,{}),children:(0,z.jsx)(je,{filePath:n,projectName:r})});if(N)return(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(X,{}),children:(0,z.jsx)(Me,{filePath:n,projectName:r})});if(P)return(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(X,{}),children:(0,z.jsx)(Fe,{filePath:n,projectName:r})});if(F)return(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(X,{}),children:(0,z.jsx)(Ne,{filePath:n,projectName:r})});if(me)return(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(X,{}),children:(0,z.jsx)(Pe,{filePath:n,projectName:r})});if(l===`base64`)return(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary`,children:[(0,z.jsx)(ee,{className:`size-10 text-text-subtle`}),(0,z.jsx)(`p`,{className:`text-sm`,children:`This file is a binary format and cannot be displayed.`}),(0,z.jsx)(`p`,{className:`text-xs text-text-subtle`,children:n})]});let mt=L?(0,z.jsxs)(`div`,{className:`shrink-0 flex items-center gap-1 px-2 border-l border-border`,children:[(0,z.jsx)(i,{className:`size-3 text-muted-foreground`}),(0,z.jsxs)(`select`,{value:H??``,onChange:e=>{let t=Number(e.target.value);t&&Y(t)},className:`h-5 text-[10px] bg-transparent border border-border rounded px-1 text-foreground outline-none max-w-[140px]`,title:`Select connection for autocomplete`,children:[(0,z.jsx)(`option`,{value:``,children:`Connection…`}),B.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,z.jsx)(`button`,{type:`button`,onClick:nt,disabled:!K,className:`p-0.5 rounded text-muted-foreground hover:text-primary disabled:opacity-30 transition-colors`,title:`Run SQL`,children:(0,z.jsx)(ce,{className:`size-3.5`})}),K&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>Te(K.id,{readonly:K.readonly?0:1}),className:`flex items-center gap-0.5 px-1 py-0.5 rounded text-[10px] transition-colors ${K.readonly?`text-muted-foreground hover:text-foreground`:`bg-destructive/15 text-destructive`}`,title:K.readonly?`Readonly — click to allow writes`:`WRITE mode — click to enable readonly`,children:K.readonly?(0,z.jsx)(ne,{className:`size-3`}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(re,{className:`size-3`}),(0,z.jsx)(`span`,{className:`font-medium`,children:`WRITE`})]})})]}):null;return(0,z.jsxs)(`div`,{ref:it,className:`flex flex-col h-full w-full overflow-hidden`,style:at?{height:`${at}px`,maxHeight:`${at}px`}:void 0,children:[a!=null&&Oe&&(0,z.jsx)(`div`,{className:`flex items-center h-7 border-b border-border bg-background shrink-0 px-2 gap-2`,children:(0,z.jsx)(`button`,{type:`button`,onClick:He,className:`text-[10px] px-2 py-0.5 rounded border border-border hover:bg-muted transition-colors text-foreground`,children:q?`Raw`:`Beautify`})}),n&&r&&t&&(0,z.jsxs)(`div`,{className:`hidden md:flex items-center h-7 border-b border-border bg-background shrink-0`,children:[(0,z.jsx)(we,{filePath:n,projectName:r,tabId:t,className:`flex items-center flex-1 min-w-0 overflow-x-auto scrollbar-none px-2 gap-0.5`}),mt,(0,z.jsx)(Ee,{ext:j,mdMode:_e,onMdModeChange:ve,csvMode:xe,onCsvModeChange:Se,wordWrap:T,onToggleWordWrap:E,filePath:n,projectName:r,className:`shrink-0 flex items-center gap-1 px-2`})]}),L&&(!r||!t)&&(0,z.jsxs)(`div`,{className:`hidden md:flex items-center h-7 border-b border-border bg-background shrink-0 px-2`,children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground truncate flex-1`,children:n?C(n):`SQL`}),mt]}),I&&xe===`table`?(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,z.jsx)(k,{className:`size-5 animate-spin text-text-subtle`})}),children:(0,z.jsx)(Ae,{content:s??``,onContentChange:ut,wordWrap:T})}):ge&&_e===`preview`?(0,z.jsx)(We,{content:s??``}):(0,z.jsx)(`div`,{className:`flex-1 overflow-hidden min-h-0`,children:(0,z.jsx)(ye,{height:`100%`,language:o??Ve(n??``),value:s??``,onChange:a==null?ut:void 0,onMount:pt,theme:ue,options:{fontSize:13,fontFamily:`Menlo, Monaco, Consolas, monospace`,wordWrap:T?`on`:`off`,minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbers:`on`,folding:!0,bracketPairColorization:{enabled:!0},readOnly:a!=null},loading:(0,z.jsx)(k,{className:`size-5 animate-spin text-text-subtle`})})}),L&&(Ke||Je||Xe)&&(0,z.jsx)(Ue,{result:Ke,error:Je,loading:Xe,connName:K?.name,onClose:()=>{qe(null),Ye(null),Ze(!1)},onOpenInTab:tt}),rt&&(0,z.jsx)(ke,{editorRef:b,readOnly:a!=null}),de&&(0,z.jsx)(De,{open:de,defaultName:`Untitled-${e?.untitledNumber??1}`,content:y.current,onSave:dt,onCancel:()=>fe(!1)})]})}),Y=()=>{};function Ue({result:e,error:t,loading:n,connName:r,onClose:a,onOpenInTab:o}){let s=(0,R.useMemo)(()=>e?.changeType===`select`&&e.rows.length>0?{columns:e.columns,rows:e.rows,total:e.rows.length,limit:e.rows.length}:null,[e]),c=(0,R.useMemo)(()=>(e?.columns??[]).map(e=>({name:e,type:`text`,nullable:!0,pk:!1,defaultValue:null})),[e?.columns]),[l,u]=(0,R.useState)(250),d=(0,R.useCallback)(e=>{e.preventDefault();let t=e.clientY,n=l,r=e=>u(Math.max(80,n+(t-e.clientY))),i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)},[l]);return(0,z.jsxs)(`div`,{className:`shrink-0 border-t border-border flex flex-col`,style:{height:l},children:[(0,z.jsx)(`div`,{onMouseDown:d,className:`shrink-0 h-1.5 cursor-row-resize bg-border/50 hover:bg-primary/30 flex items-center justify-center transition-colors`,children:(0,z.jsx)(L,{className:`size-3 text-muted-foreground/50`})}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1 bg-muted/50 border-b border-border shrink-0`,children:[(0,z.jsx)(i,{className:`size-3 text-muted-foreground`}),(0,z.jsxs)(`span`,{className:`text-xs font-medium text-foreground truncate flex-1`,children:[r?`${r} · Results`:`Query Results`,e?.executionTimeMs!=null&&(0,z.jsxs)(`span`,{className:`text-muted-foreground ml-1.5 font-normal`,children:[e.executionTimeMs,`ms`]})]}),(0,z.jsxs)(`button`,{type:`button`,onClick:o,title:`Open in DB Viewer tab`,className:`flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] text-muted-foreground hover:text-foreground hover:bg-muted transition-colors`,children:[(0,z.jsx)(N,{className:`size-3`}),(0,z.jsx)(`span`,{className:`hidden sm:inline`,children:`Open in Tab`})]}),(0,z.jsx)(`button`,{type:`button`,onClick:a,title:`Close results`,className:`p-0.5 rounded text-muted-foreground hover:text-foreground transition-colors`,children:(0,z.jsx)(b,{className:`size-3`})})]}),(0,z.jsxs)(`div`,{className:`flex-1 overflow-hidden min-h-0`,children:[n&&(0,z.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,z.jsx)(k,{className:`size-4 animate-spin text-muted-foreground`})}),t&&(0,z.jsx)(`div`,{className:`px-3 py-2 text-xs text-destructive bg-destructive/5`,children:t}),e?.changeType===`modify`&&(0,z.jsxs)(`div`,{className:`px-3 py-2 text-xs text-green-500`,children:[e.rowsAffected,` row(s) affected`]}),s&&(0,z.jsx)(_,{columns:s.columns,rows:s.rows,total:s.total,limit:s.limit,schema:c,loading:!1,page:1,onPageChange:Y,onCellUpdate:Y,orderBy:null,orderDir:`ASC`,onToggleSort:Y,connectionName:r}),e?.changeType===`select`&&e.rows.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:`No results`})]})]})}function X(){return(0,z.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,z.jsx)(k,{className:`size-5 animate-spin text-text-subtle`})})}function We({content:e}){return(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`div`,{className:`animate-pulse h-4 bg-muted rounded m-4`}),children:(0,z.jsx)(J,{content:e,className:`flex-1 overflow-auto p-4`})})}export{He as CodeEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./vendor-markdown-0Mxgxy0L.js";import"./api-client-DG9qwosT.js";import{D as e}from"./index-D39gAvQS.js";export{e as useKeybindingsStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./vendor-markdown-0Mxgxy0L.js";import"./api-client-DG9qwosT.js";import{P as e}from"./index-D39gAvQS.js";export{e as useNotificationStore};
|