db-player 0.0.0-stage → 0.5.0
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/README.md +58 -2
- package/bin/db-player.mjs +149 -0
- package/dist/client/apple-touch-icon.png +0 -0
- package/dist/client/assets/EmptyState-B_8ZzjRf.js +2 -0
- package/dist/client/assets/c._connectionId-BZL6Wtb-.js +1 -0
- package/dist/client/assets/index-DJsmqZro.js +136 -0
- package/dist/client/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/client/assets/routes-C7xdclgQ.js +1 -0
- package/dist/client/assets/styles-CdkLyHdd.css +1681 -0
- package/dist/client/assets/t._tabId-DJ7LAi8J.js +1 -0
- package/dist/client/favicon-32.png +0 -0
- package/dist/client/favicon.svg +1 -0
- package/dist/server/assets/EmptyState-D1iyQsG1.js +366 -0
- package/dist/server/assets/_tanstack-start-manifest_v-BeN-d5V7.js +38 -0
- package/dist/server/assets/c._connectionId-4zi7Sa20.js +19 -0
- package/dist/server/assets/createServerRpc-F6SI7pt8.js +11 -0
- package/dist/server/assets/empty-plugin-adapters-BiGySXWX.js +4 -0
- package/dist/server/assets/fns-DNn8Qat1.js +321 -0
- package/dist/server/assets/layout-pJu_-O4s.js +36 -0
- package/dist/server/assets/router-DJFCq-RN.js +4140 -0
- package/dist/server/assets/routes-Bk_zy8AX.js +24 -0
- package/dist/server/assets/start-Bai9AeXo.js +3 -0
- package/dist/server/assets/store-Bb9KDsJx.js +827 -0
- package/dist/server/assets/t._tabId-Cf1urQNG.js +4 -0
- package/dist/server/assets/theme-EhZN9QoB.js +32 -0
- package/dist/server/server.js +7788 -0
- package/package.json +73 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=()=>null;export{e as component};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="14" fill="#0a0a0a"/><rect x="15" y="11" width="12" height="6" rx="3" fill="#ef4444"/><rect x="15" y="20" width="24" height="6" rx="3" fill="#f97316"/><rect x="15" y="29" width="36" height="6" rx="3" fill="#eab308"/><rect x="15" y="38" width="24" height="6" rx="3" fill="#22c55e"/><rect x="15" y="47" width="12" height="6" rx="3" fill="#3b82f6"/></svg>
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { n as TSS_SERVER_FUNCTION, r as getServerFnById, t as createServerFn } from "../server.js";
|
|
2
|
+
import { D as folderInputSchema, E as connectionInputSchema, O as newTabTargetSchema, k as tabIdSchema } from "./store-Bb9KDsJx.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { queryOptions, replaceEqualDeep } from "@tanstack/react-query";
|
|
6
|
+
// node_modules/.pnpm/@tanstack+start-server-core@1.169.45/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
|
|
7
|
+
var createSsrRpc = (functionId) => {
|
|
8
|
+
const url = "/_serverFn/" + functionId;
|
|
9
|
+
const serverFnMeta = { id: functionId };
|
|
10
|
+
const fn = async (...args) => {
|
|
11
|
+
return (await getServerFnById(functionId, { origin: "server" }))(...args);
|
|
12
|
+
};
|
|
13
|
+
return Object.assign(fn, {
|
|
14
|
+
url,
|
|
15
|
+
serverFnMeta,
|
|
16
|
+
[TSS_SERVER_FUNCTION]: true
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
// src/server/fns.ts
|
|
20
|
+
var id = z.object({ id: z.string().min(1) });
|
|
21
|
+
var tableRef = z.object({
|
|
22
|
+
connectionId: z.string().min(1),
|
|
23
|
+
database: z.string().min(1),
|
|
24
|
+
table: z.string().min(1)
|
|
25
|
+
});
|
|
26
|
+
var rowValues = z.record(z.string(), z.unknown());
|
|
27
|
+
var getFolders = createServerFn({ method: "GET" }).handler(createSsrRpc("634f3409d91d2b2ec5ba00788a94c382eb93cab66cf6b49891f7eead0fbb9182"));
|
|
28
|
+
var createFolder = createServerFn({ method: "POST" }).validator(folderInputSchema).handler(createSsrRpc("03eb98b874238c23634e5fc9e71f5d53314d0ab69c11829b7971701ebc508f72"));
|
|
29
|
+
var updateFolder = createServerFn({ method: "POST" }).validator(z.object({
|
|
30
|
+
id: z.string(),
|
|
31
|
+
input: folderInputSchema
|
|
32
|
+
})).handler(createSsrRpc("2050f94e262efc7c529cf12274981cb5c05e860ad2bf60da8966046a5f457d2e"));
|
|
33
|
+
var deleteFolder = createServerFn({ method: "POST" }).validator(id).handler(createSsrRpc("16fd5781384c1f93d3afdf5b6a541a6117b15f2c5e18a8aefcd0bdf28ca55b0b"));
|
|
34
|
+
var getConnections = createServerFn({ method: "GET" }).handler(createSsrRpc("0949098bce5c7148161de9d6ddbe7e4973798cc05d21e8e027e36bf87753c40a"));
|
|
35
|
+
var createConnection = createServerFn({ method: "POST" }).validator(connectionInputSchema).handler(createSsrRpc("6fca880e9b4ef5d91a80c82901ca8b3fd8b5181cf1c883bac1c6a121e27c335d"));
|
|
36
|
+
var updateConnection = createServerFn({ method: "POST" }).validator(z.object({
|
|
37
|
+
id: z.string(),
|
|
38
|
+
input: connectionInputSchema
|
|
39
|
+
})).handler(createSsrRpc("75a494c070a10bd81ac73b9aed1ccdf3e7290a2b43d95b085c215e2674fab8cb"));
|
|
40
|
+
var moveConnection = createServerFn({ method: "POST" }).validator(z.object({
|
|
41
|
+
id: z.string(),
|
|
42
|
+
folderId: z.string().nullable()
|
|
43
|
+
})).handler(createSsrRpc("aeb0522b74187ad0ec040a2192c6e74f06adc37a7df8416a9012382092419df0"));
|
|
44
|
+
var deleteConnection = createServerFn({ method: "POST" }).validator(id).handler(createSsrRpc("1633b2cf6898640ebba8cf9722be336f9eda371d1776565097b385499a216fbc"));
|
|
45
|
+
var testConnection = createServerFn({ method: "POST" }).validator(z.object({
|
|
46
|
+
id: z.string().nullable(),
|
|
47
|
+
input: connectionInputSchema
|
|
48
|
+
})).handler(createSsrRpc("9f324d4386ecc476a85f82b62ef478bb98d03e493f4a41fd28f7327a8d629c46"));
|
|
49
|
+
var getDatabases = createServerFn({ method: "GET" }).validator(z.object({ connectionId: z.string() })).handler(createSsrRpc("645566f0ce3185abc28e6295e49d3c4d224c46ede42adb9ecce3041358adc0af"));
|
|
50
|
+
var getSqlSchema = createServerFn({ method: "GET" }).validator(z.object({ connectionId: z.string() })).handler(createSsrRpc("b52b98b8308d4af0a9f0539a42b0292dd0544fa3e361300b97b9d6f315367d97"));
|
|
51
|
+
var getTables = createServerFn({ method: "GET" }).validator(z.object({
|
|
52
|
+
connectionId: z.string(),
|
|
53
|
+
database: z.string()
|
|
54
|
+
})).handler(createSsrRpc("3310d4286a458f34d73b536ba3f9b7423fe6e47933aa6849139c4a91fc0cc6be"));
|
|
55
|
+
var getTableSchema = createServerFn({ method: "GET" }).validator(tableRef).handler(createSsrRpc("33e77cff9e2aa8226829c8c4d45df747e5675f4f1d1b3bd618b8299f6ffdad20"));
|
|
56
|
+
var getRows = createServerFn({ method: "GET" }).validator(tableRef.extend({
|
|
57
|
+
limit: z.number().int().min(1).max(1e3),
|
|
58
|
+
offset: z.number().int().min(0),
|
|
59
|
+
orderBy: z.object({
|
|
60
|
+
column: z.string(),
|
|
61
|
+
direction: z.enum(["asc", "desc"])
|
|
62
|
+
}).optional(),
|
|
63
|
+
where: z.string().optional()
|
|
64
|
+
})).handler(createSsrRpc("314ac6ccbab55bcac95ef2d0be89f321218bf82b3a63194327359a75cfc9f6a6"));
|
|
65
|
+
var updateRow = createServerFn({ method: "POST" }).validator(tableRef.extend({
|
|
66
|
+
key: rowValues,
|
|
67
|
+
changes: rowValues
|
|
68
|
+
})).handler(createSsrRpc("10262f6e87bb981e71a85fd9ee035f2aa633f6ecd9c6a3aa681da12504cba0b8"));
|
|
69
|
+
var insertRow = createServerFn({ method: "POST" }).validator(tableRef.extend({ values: rowValues })).handler(createSsrRpc("a6ecdf5ad31d541d6843eebdc610e599ae824562f80c2aba4b022de845e31e94"));
|
|
70
|
+
var deleteRows = createServerFn({ method: "POST" }).validator(tableRef.extend({ keys: z.array(rowValues).min(1) })).handler(createSsrRpc("d778a31432c784b4573380b5641deec6bbc78d24b6d112a0252a213b7212f677"));
|
|
71
|
+
var runQuery = createServerFn({ method: "POST" }).validator(z.object({
|
|
72
|
+
connectionId: z.string(),
|
|
73
|
+
database: z.string().min(1).nullable(),
|
|
74
|
+
sql: z.string().min(1)
|
|
75
|
+
})).handler(createSsrRpc("8d02b91de7eb27632a3aa6b913e7c76fb3a93976ce8084a630289b46737c2d8b"));
|
|
76
|
+
var getWorkspace = createServerFn({ method: "GET" }).handler(createSsrRpc("c758a636ba19f09a8e00934cec93c4a0066ab3960ddd267a4604c55e6b263345"));
|
|
77
|
+
var openTab = createServerFn({ method: "POST" }).validator(z.object({
|
|
78
|
+
target: newTabTargetSchema,
|
|
79
|
+
sql: z.string().optional(),
|
|
80
|
+
after: tabIdSchema.optional()
|
|
81
|
+
})).handler(createSsrRpc("1499e5ed0049948e758a130ee221a6318fc746dcc9a5e5ab4561e566afd8f2de"));
|
|
82
|
+
var closeTabs = createServerFn({ method: "POST" }).validator(z.object({
|
|
83
|
+
ids: z.array(tabIdSchema).min(1),
|
|
84
|
+
prefer: tabIdSchema.optional()
|
|
85
|
+
})).handler(createSsrRpc("98f22935ca1cf21c2abfa7394b822c97bacfce9fa95af9b648e5968dd3a5802f"));
|
|
86
|
+
var reorderTabs = createServerFn({ method: "POST" }).validator(z.object({ ids: z.array(tabIdSchema) })).handler(createSsrRpc("4ca277bc1c50513ef9773dae2477d6941ecc41cd1e8e29efb63e4a2bac8fbc85"));
|
|
87
|
+
var setActiveTab = createServerFn({ method: "POST" }).validator(z.object({ id: tabIdSchema })).handler(createSsrRpc("92749f267c42bd41f2b6cd3986b502a3fa07706b44d38fc532c3568e4b2020d9"));
|
|
88
|
+
var updateTabDraft = createServerFn({ method: "POST" }).validator(z.object({
|
|
89
|
+
id: tabIdSchema,
|
|
90
|
+
sql: z.string()
|
|
91
|
+
})).handler(createSsrRpc("5114ad2b791ceff1aead3f5c5d57e592af17191f9c18019060c78308cf52c957"));
|
|
92
|
+
var setTabDatabase = createServerFn({ method: "POST" }).validator(z.object({
|
|
93
|
+
id: tabIdSchema,
|
|
94
|
+
database: z.string().min(1).nullable()
|
|
95
|
+
})).handler(createSsrRpc("c1a24e094a4e8fc2be3638cfd66bcf27a0bdaf537ff39d3db1560964f6a759cb"));
|
|
96
|
+
var getMcpToken = createServerFn({ method: "GET" }).handler(createSsrRpc("4505d15ff5746b14927bd920d419c7b8e76becd66b26b7287ec40c6c44f09cb0"));
|
|
97
|
+
var regenerateMcpToken = createServerFn({ method: "POST" }).handler(createSsrRpc("a06ef376b93fd52a19824c2859014e953683838c588fc94a1189a10abafe027e"));
|
|
98
|
+
// src/lib/queries.ts
|
|
99
|
+
var foldersQuery = () => queryOptions({
|
|
100
|
+
queryKey: ["folders"],
|
|
101
|
+
queryFn: () => getFolders(),
|
|
102
|
+
staleTime: Infinity
|
|
103
|
+
});
|
|
104
|
+
var connectionsQuery = () => queryOptions({
|
|
105
|
+
queryKey: ["connections"],
|
|
106
|
+
queryFn: () => getConnections(),
|
|
107
|
+
staleTime: Infinity
|
|
108
|
+
});
|
|
109
|
+
/** Tabs stay alive while hidden, so their data is only refetched when it is invalidated. */
|
|
110
|
+
var TAB_DATA = {
|
|
111
|
+
staleTime: Infinity,
|
|
112
|
+
gcTime: 36e5
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Fetches and `setQueryData` both pass through here. A response that left the server before a newer
|
|
116
|
+
* write committed arrives with a lower revision and is dropped. An equal revision is accepted: an
|
|
117
|
+
* optimistic edit keeps the revision it started from, so the server's snapshot at that revision is
|
|
118
|
+
* what rolls a failed write back.
|
|
119
|
+
*/
|
|
120
|
+
function newerWorkspace(prev, next) {
|
|
121
|
+
const older = prev;
|
|
122
|
+
const incoming = next;
|
|
123
|
+
return older && incoming.revision < older.revision ? older : replaceEqualDeep(older, incoming);
|
|
124
|
+
}
|
|
125
|
+
var workspaceQuery = () => queryOptions({
|
|
126
|
+
queryKey: ["workspace"],
|
|
127
|
+
queryFn: () => getWorkspace(),
|
|
128
|
+
staleTime: Infinity,
|
|
129
|
+
structuralSharing: newerWorkspace
|
|
130
|
+
});
|
|
131
|
+
var databasesQuery = (connectionId) => queryOptions({
|
|
132
|
+
queryKey: ["databases", connectionId],
|
|
133
|
+
queryFn: () => getDatabases({ data: { connectionId } }),
|
|
134
|
+
retry: false,
|
|
135
|
+
...TAB_DATA
|
|
136
|
+
});
|
|
137
|
+
var tablesQuery = (connectionId, database) => queryOptions({
|
|
138
|
+
queryKey: [
|
|
139
|
+
"tables",
|
|
140
|
+
connectionId,
|
|
141
|
+
database
|
|
142
|
+
],
|
|
143
|
+
queryFn: () => getTables({ data: {
|
|
144
|
+
connectionId,
|
|
145
|
+
database
|
|
146
|
+
} }),
|
|
147
|
+
retry: false,
|
|
148
|
+
...TAB_DATA
|
|
149
|
+
});
|
|
150
|
+
var schemaQuery = (connectionId, database, table) => queryOptions({
|
|
151
|
+
queryKey: [
|
|
152
|
+
"schema",
|
|
153
|
+
connectionId,
|
|
154
|
+
database,
|
|
155
|
+
table
|
|
156
|
+
],
|
|
157
|
+
queryFn: () => getTableSchema({ data: {
|
|
158
|
+
connectionId,
|
|
159
|
+
database,
|
|
160
|
+
table
|
|
161
|
+
} }),
|
|
162
|
+
retry: false,
|
|
163
|
+
...TAB_DATA
|
|
164
|
+
});
|
|
165
|
+
var rowsQuery = (params) => queryOptions({
|
|
166
|
+
queryKey: [
|
|
167
|
+
"rows",
|
|
168
|
+
params.connectionId,
|
|
169
|
+
params.database,
|
|
170
|
+
params.table,
|
|
171
|
+
params
|
|
172
|
+
],
|
|
173
|
+
queryFn: () => getRows({ data: params }),
|
|
174
|
+
retry: false,
|
|
175
|
+
...TAB_DATA
|
|
176
|
+
});
|
|
177
|
+
var sqlSchemaQuery = (connectionId) => queryOptions({
|
|
178
|
+
queryKey: ["sqlSchema", connectionId],
|
|
179
|
+
queryFn: () => getSqlSchema({ data: { connectionId } }),
|
|
180
|
+
staleTime: 6e5,
|
|
181
|
+
retry: false
|
|
182
|
+
});
|
|
183
|
+
var mcpTokenQuery = () => queryOptions({
|
|
184
|
+
queryKey: ["mcp-token"],
|
|
185
|
+
queryFn: () => getMcpToken(),
|
|
186
|
+
staleTime: Infinity,
|
|
187
|
+
retry: false
|
|
188
|
+
});
|
|
189
|
+
// src/components/ui/icons.tsx
|
|
190
|
+
function Icon({ children, size = 14 }) {
|
|
191
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
192
|
+
width: size,
|
|
193
|
+
height: size,
|
|
194
|
+
viewBox: "0 0 16 16",
|
|
195
|
+
fill: "none",
|
|
196
|
+
stroke: "currentColor",
|
|
197
|
+
strokeWidth: "1.4",
|
|
198
|
+
strokeLinecap: "round",
|
|
199
|
+
strokeLinejoin: "round",
|
|
200
|
+
"aria-hidden": true,
|
|
201
|
+
style: { flexShrink: 0 },
|
|
202
|
+
children
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
var ChevronRight = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
206
|
+
...p,
|
|
207
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 3.5 4.5 4.5L6 12.5" })
|
|
208
|
+
});
|
|
209
|
+
var ChevronLeft = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
210
|
+
...p,
|
|
211
|
+
children: /* @__PURE__ */ jsx("path", { d: "M10 3.5 5.5 8l4.5 4.5" })
|
|
212
|
+
});
|
|
213
|
+
var ArrowUp = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
214
|
+
...p,
|
|
215
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 13V3.5M4 7l4-4 4 4" })
|
|
216
|
+
});
|
|
217
|
+
var ArrowDown = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
218
|
+
...p,
|
|
219
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 3v9.5M4 9l4 4 4-4" })
|
|
220
|
+
});
|
|
221
|
+
var Plus = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
222
|
+
...p,
|
|
223
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 3v10M3 8h10" })
|
|
224
|
+
});
|
|
225
|
+
var Dots = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
226
|
+
...p,
|
|
227
|
+
children: [
|
|
228
|
+
/* @__PURE__ */ jsx("circle", {
|
|
229
|
+
cx: "3.5",
|
|
230
|
+
cy: "8",
|
|
231
|
+
r: ".6"
|
|
232
|
+
}),
|
|
233
|
+
/* @__PURE__ */ jsx("circle", {
|
|
234
|
+
cx: "8",
|
|
235
|
+
cy: "8",
|
|
236
|
+
r: ".6"
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ jsx("circle", {
|
|
239
|
+
cx: "12.5",
|
|
240
|
+
cy: "8",
|
|
241
|
+
r: ".6"
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
});
|
|
245
|
+
var Database = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
246
|
+
...p,
|
|
247
|
+
children: [/* @__PURE__ */ jsx("ellipse", {
|
|
248
|
+
cx: "8",
|
|
249
|
+
cy: "4",
|
|
250
|
+
rx: "5",
|
|
251
|
+
ry: "2"
|
|
252
|
+
}), /* @__PURE__ */ jsx("path", { d: "M3 4v8c0 1.1 2.2 2 5 2s5-.9 5-2V4M3 8c0 1.1 2.2 2 5 2s5-.9 5-2" })]
|
|
253
|
+
});
|
|
254
|
+
var Table = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
255
|
+
...p,
|
|
256
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
257
|
+
x: "2.5",
|
|
258
|
+
y: "3",
|
|
259
|
+
width: "11",
|
|
260
|
+
height: "10",
|
|
261
|
+
rx: "1"
|
|
262
|
+
}), /* @__PURE__ */ jsx("path", { d: "M2.5 6.5h11M6.5 3v10" })]
|
|
263
|
+
});
|
|
264
|
+
var Terminal = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
265
|
+
...p,
|
|
266
|
+
children: /* @__PURE__ */ jsx("path", { d: "m3 5 3 3-3 3M8 12h5" })
|
|
267
|
+
});
|
|
268
|
+
var Refresh = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
269
|
+
...p,
|
|
270
|
+
children: /* @__PURE__ */ jsx("path", { d: "M13 8a5 5 0 1 1-1.5-3.5M13 3v2.5h-2.5" })
|
|
271
|
+
});
|
|
272
|
+
var Trash = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
273
|
+
...p,
|
|
274
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.5 8.5h6l.5-8.5" })
|
|
275
|
+
});
|
|
276
|
+
var Play = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
277
|
+
...p,
|
|
278
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5 3.5v9l7-4.5z" })
|
|
279
|
+
});
|
|
280
|
+
var PanelLeft = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
281
|
+
...p,
|
|
282
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
283
|
+
x: "2",
|
|
284
|
+
y: "3",
|
|
285
|
+
width: "12",
|
|
286
|
+
height: "10",
|
|
287
|
+
rx: "1.5"
|
|
288
|
+
}), /* @__PURE__ */ jsx("path", { d: "M6 3v10" })]
|
|
289
|
+
});
|
|
290
|
+
var Settings = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
291
|
+
...p,
|
|
292
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
293
|
+
cx: "8",
|
|
294
|
+
cy: "8",
|
|
295
|
+
r: "2"
|
|
296
|
+
}), /* @__PURE__ */ jsx("path", { d: "M8 1.8v1.6M8 12.6v1.6M1.8 8h1.6M12.6 8h1.6M3.6 3.6l1.1 1.1M11.3 11.3l1.1 1.1M3.6 12.4l1.1-1.1M11.3 4.7l1.1-1.1" })]
|
|
297
|
+
});
|
|
298
|
+
var Key = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
299
|
+
...p,
|
|
300
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
301
|
+
cx: "5.5",
|
|
302
|
+
cy: "10.5",
|
|
303
|
+
r: "2.5"
|
|
304
|
+
}), /* @__PURE__ */ jsx("path", { d: "m7.3 8.7 5.2-5.2M10.5 5.5l1.5 1.5" })]
|
|
305
|
+
});
|
|
306
|
+
var FolderPlus = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
307
|
+
...p,
|
|
308
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M2 4.5A1.5 1.5 0 0 1 3.5 3h2.8l1.4 1.5h4.8A1.5 1.5 0 0 1 14 6v5.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 11.5z" }), /* @__PURE__ */ jsx("path", { d: "M8 7v3M6.5 8.5h3" })]
|
|
309
|
+
});
|
|
310
|
+
var Close = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
311
|
+
...p,
|
|
312
|
+
children: /* @__PURE__ */ jsx("path", { d: "m4 4 8 8M12 4l-8 8" })
|
|
313
|
+
});
|
|
314
|
+
var Copy = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
315
|
+
...p,
|
|
316
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
317
|
+
x: "5.5",
|
|
318
|
+
y: "5.5",
|
|
319
|
+
width: "8",
|
|
320
|
+
height: "8",
|
|
321
|
+
rx: "1.5"
|
|
322
|
+
}), /* @__PURE__ */ jsx("path", { d: "M10.5 5.5v-1A1.5 1.5 0 0 0 9 3H4.5A1.5 1.5 0 0 0 3 4.5V9a1.5 1.5 0 0 0 1.5 1.5h1" })]
|
|
323
|
+
});
|
|
324
|
+
var Eye = (p) => /* @__PURE__ */ jsxs(Icon, {
|
|
325
|
+
...p,
|
|
326
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M1.5 8S4 3.5 8 3.5 14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z" }), /* @__PURE__ */ jsx("circle", {
|
|
327
|
+
cx: "8",
|
|
328
|
+
cy: "8",
|
|
329
|
+
r: "1.8"
|
|
330
|
+
})]
|
|
331
|
+
});
|
|
332
|
+
var EyeOff = (p) => /* @__PURE__ */ jsx(Icon, {
|
|
333
|
+
...p,
|
|
334
|
+
children: /* @__PURE__ */ jsx("path", { d: "M2.5 2.5l11 11M6.4 4a6.3 6.3 0 0 1 1.6-.5c4 0 6.5 4.5 6.5 4.5a11 11 0 0 1-2 2.5M4 5.3A11 11 0 0 0 1.5 8S4 12.5 8 12.5c.8 0 1.5-.2 2.1-.4M6.6 6.6a1.8 1.8 0 0 0 2.8 2.2" })
|
|
335
|
+
});
|
|
336
|
+
// src/components/EmptyState.tsx
|
|
337
|
+
function EmptyState({ icon, title, hint, danger, action }) {
|
|
338
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
339
|
+
className: "x98rzlu x78zum5 xdt5ytf x6s0dn4 xl56j7k x1mbf7id xlcnwv1 x2b8uid",
|
|
340
|
+
children: [
|
|
341
|
+
icon ? /* @__PURE__ */ jsx("div", {
|
|
342
|
+
...{
|
|
343
|
+
0: { className: "x78zum5 x6s0dn4 xl56j7k x100vrsf x1vqgdyp x1kj4sgy x1tviuuy x14fh20 xr11lhz xmkeg23 x1y0btm7 xpa2s8g" },
|
|
344
|
+
1: { className: "x78zum5 x6s0dn4 xl56j7k x100vrsf x1vqgdyp x1kj4sgy x14fh20 xr11lhz xmkeg23 x1y0btm7 xpa2s8g xb0vdwp" }
|
|
345
|
+
}[!!danger << 0],
|
|
346
|
+
children: icon
|
|
347
|
+
}) : null,
|
|
348
|
+
/* @__PURE__ */ jsx("div", {
|
|
349
|
+
className: "x19u1y1h x1s688f",
|
|
350
|
+
children: title
|
|
351
|
+
}),
|
|
352
|
+
/* @__PURE__ */ jsx("div", {
|
|
353
|
+
...{
|
|
354
|
+
0: { className: "xqtwvag x1tviuuy x1lr1uin x1evy7pa x13faqbe" },
|
|
355
|
+
1: { className: "xqtwvag x1lr1uin x1evy7pa x13faqbe xb0vdwp" }
|
|
356
|
+
}[!!danger << 0],
|
|
357
|
+
children: hint
|
|
358
|
+
}),
|
|
359
|
+
action ? /* @__PURE__ */ jsx("div", {
|
|
360
|
+
className: "xw7zv1a",
|
|
361
|
+
children: action
|
|
362
|
+
}) : null
|
|
363
|
+
]
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
export { workspaceQuery as A, regenerateMcpToken as B, databasesQuery as C, schemaQuery as D, rowsQuery as E, deleteFolder as F, testConnection as G, runQuery as H, deleteRows as I, updateRow as J, updateConnection as K, insertRow as L, createConnection as M, createFolder as N, sqlSchemaQuery as O, deleteConnection as P, moveConnection as R, connectionsQuery as S, mcpTokenQuery as T, setActiveTab as U, reorderTabs as V, setTabDatabase as W, createSsrRpc as X, updateTabDraft as Y, Refresh as _, ChevronRight as a, Terminal as b, Database as c, EyeOff as d, FolderPlus as f, Plus as g, Play as h, ChevronLeft as i, closeTabs as j, tablesQuery as k, Dots as l, PanelLeft as m, ArrowDown as n, Close as o, Key as p, updateFolder as q, ArrowUp as r, Copy as s, EmptyState as t, Eye as u, Settings as v, foldersQuery as w, Trash as x, Table as y, openTab as z };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// \0tanstack-start-manifest:v
|
|
2
|
+
var tsrStartManifest = () => ({ routes: {
|
|
3
|
+
__root__: {
|
|
4
|
+
filePath: "/home/runner/work/db-player/db-player/src/routes/__root.tsx",
|
|
5
|
+
children: [
|
|
6
|
+
"/",
|
|
7
|
+
"/mcp",
|
|
8
|
+
"/c/$connectionId",
|
|
9
|
+
"/t/$tabId"
|
|
10
|
+
],
|
|
11
|
+
preloads: [
|
|
12
|
+
"/assets/index-DJsmqZro.js",
|
|
13
|
+
"/assets/rolldown-runtime-XKyaHtl9.js",
|
|
14
|
+
"/assets/EmptyState-B_8ZzjRf.js"
|
|
15
|
+
],
|
|
16
|
+
scripts: [{ attrs: {
|
|
17
|
+
type: "module",
|
|
18
|
+
async: !0,
|
|
19
|
+
src: "/assets/index-DJsmqZro.js"
|
|
20
|
+
} }]
|
|
21
|
+
},
|
|
22
|
+
"/": {
|
|
23
|
+
filePath: "/home/runner/work/db-player/db-player/src/routes/index.tsx",
|
|
24
|
+
children: void 0,
|
|
25
|
+
preloads: ["/assets/routes-C7xdclgQ.js"]
|
|
26
|
+
},
|
|
27
|
+
"/c/$connectionId": {
|
|
28
|
+
filePath: "/home/runner/work/db-player/db-player/src/routes/c.$connectionId.tsx",
|
|
29
|
+
children: ["/c/$connectionId/sql", "/c/$connectionId/$database/$table"],
|
|
30
|
+
preloads: ["/assets/c._connectionId-BZL6Wtb-.js"]
|
|
31
|
+
},
|
|
32
|
+
"/t/$tabId": {
|
|
33
|
+
filePath: "/home/runner/work/db-player/db-player/src/routes/t.$tabId.tsx",
|
|
34
|
+
children: void 0,
|
|
35
|
+
preloads: ["/assets/t._tabId-DJ7LAi8J.js"]
|
|
36
|
+
}
|
|
37
|
+
} });
|
|
38
|
+
export { tsrStartManifest };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { S as connectionsQuery, t as EmptyState, y as Table } from "./EmptyState-D1iyQsG1.js";
|
|
2
|
+
import { n as Route } from "./router-DJFCq-RN.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useQuery } from "@tanstack/react-query";
|
|
5
|
+
// src/routes/c.$connectionId.tsx?tsr-split=component
|
|
6
|
+
/** A connection with no tab: the workbench shows its Explorer and this prompt. */
|
|
7
|
+
function ConnectionHome() {
|
|
8
|
+
const { connectionId } = Route.useParams();
|
|
9
|
+
if (!useQuery(connectionsQuery()).data?.find((c) => c.id === connectionId)) return /* @__PURE__ */ jsx(EmptyState, {
|
|
10
|
+
title: "Connection not found",
|
|
11
|
+
hint: "It may have been deleted."
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ jsx(EmptyState, {
|
|
14
|
+
icon: /* @__PURE__ */ jsx(Table, { size: 16 }),
|
|
15
|
+
title: "Select a table",
|
|
16
|
+
hint: "Pick a table in the explorer to open it in a tab, or start a SQL tab."
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { ConnectionHome as component };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { n as TSS_SERVER_FUNCTION } from "../server.js";
|
|
2
|
+
// node_modules/.pnpm/@tanstack+start-server-core@1.169.45/node_modules/@tanstack/start-server-core/dist/esm/createServerRpc.js
|
|
3
|
+
var createServerRpc = (serverFnMeta, splitImportFn) => {
|
|
4
|
+
const url = "/_serverFn/" + serverFnMeta.id;
|
|
5
|
+
return Object.assign(splitImportFn, {
|
|
6
|
+
url,
|
|
7
|
+
serverFnMeta,
|
|
8
|
+
[TSS_SERVER_FUNCTION]: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
export { createServerRpc as t };
|