sqlite-hub 0.7.0 → 0.9.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/changelog.md +25 -0
- package/docs/DESIGN_GUIDELINES.md +36 -0
- package/frontend/index.html +79 -0
- package/frontend/js/api.js +67 -0
- package/frontend/js/app.js +1401 -921
- package/frontend/js/components/connectionCard.js +3 -4
- package/frontend/js/components/emptyState.js +4 -4
- package/frontend/js/components/modal.js +239 -30
- package/frontend/js/components/queryEditor.js +11 -8
- package/frontend/js/components/queryHistoryDetail.js +27 -8
- package/frontend/js/components/queryHistoryPanel.js +6 -5
- package/frontend/js/components/rowEditorPanel.js +84 -58
- package/frontend/js/components/sidebar.js +76 -33
- package/frontend/js/components/structureGraph.js +629 -715
- package/frontend/js/components/tableDesignerEditor.js +9 -8
- package/frontend/js/components/tableDesignerSidebar.js +11 -10
- package/frontend/js/components/tableDesignerSqlPreview.js +61 -30
- package/frontend/js/lib/mediaTaggingDefaults.js +27 -0
- package/frontend/js/router.js +81 -71
- package/frontend/js/store.js +3095 -2165
- package/frontend/js/views/charts.js +68 -40
- package/frontend/js/views/connections.js +5 -17
- package/frontend/js/views/data.js +40 -27
- package/frontend/js/views/editor.js +172 -177
- package/frontend/js/views/mediaTagging.js +861 -0
- package/frontend/js/views/overview.js +149 -10
- package/frontend/js/views/settings.js +2 -2
- package/frontend/js/views/structure.js +74 -70
- package/frontend/js/views/tableDesigner.js +7 -2
- package/frontend/styles/base.css +73 -1
- package/frontend/styles/components.css +105 -105
- package/frontend/styles/structure-graph.css +19 -82
- package/frontend/styles/tokens.css +2 -0
- package/frontend/styles/views.css +823 -30
- package/package.json +1 -1
- package/server/routes/charts.js +4 -1
- package/server/routes/data.js +14 -0
- package/server/routes/mediaTagging.js +166 -0
- package/server/routes/sql.js +1 -0
- package/server/server.js +4 -0
- package/server/services/sqlite/dataBrowserService.js +25 -0
- package/server/services/sqlite/exportService.js +31 -1
- package/server/services/sqlite/mediaTaggingService.js +1689 -0
- package/server/services/sqlite/overviewService.js +68 -0
- package/server/services/storage/appStateStore.js +321 -2
package/changelog.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
# v0.9.0
|
|
2
|
+
|
|
3
|
+
- tagging view
|
|
4
|
+
- filtered out the create, update, delete queries from the chart section
|
|
5
|
+
|
|
6
|
+
# v0.8.8
|
|
7
|
+
|
|
8
|
+
- modal window fix in delete query
|
|
9
|
+
- csv export filename based on query name
|
|
10
|
+
- unsaved query history tab
|
|
11
|
+
|
|
12
|
+
# v0.8.7
|
|
13
|
+
|
|
14
|
+
- UX fixes
|
|
15
|
+
- fixing a lot of the vibe slop
|
|
16
|
+
- trying to build reuseable components
|
|
17
|
+
|
|
18
|
+
# v0.8.0
|
|
19
|
+
|
|
20
|
+
- DDL copy button
|
|
21
|
+
- open in charts button in query details
|
|
22
|
+
- clear makes editor active
|
|
23
|
+
- UI fixes
|
|
24
|
+
- Overview improvement
|
|
25
|
+
|
|
1
26
|
# v0.7.0
|
|
2
27
|
|
|
3
28
|
- hide query history, hide editor
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# SQLite Hub UI Rules for Codex
|
|
2
|
+
|
|
3
|
+
Follow these rules exactly when creating or modifying UI controls.
|
|
4
|
+
|
|
5
|
+
1. Reuse existing shared components before creating anything new.
|
|
6
|
+
2. Use exactly one semantic main class per control.
|
|
7
|
+
3. Never combine multiple button-style classes on the same element.
|
|
8
|
+
4. View-specific classes may change layout, width, spacing, or position only.
|
|
9
|
+
5. View-specific classes must not redefine the base style of shared components.
|
|
10
|
+
6. The standard height for interactive controls is `36px`.
|
|
11
|
+
7. The source of truth for control height is `--control-height` in `frontend/styles/tokens.css`.
|
|
12
|
+
8. Controls in the same row must have the same height.
|
|
13
|
+
9. All regular buttons must use one of these classes only: `standard-button`, `signature-button`, `delete-button`.
|
|
14
|
+
10. Use `standard-button` for normal actions.
|
|
15
|
+
11. Use `signature-button` only for the primary yellow CTA in a context.
|
|
16
|
+
12. Use `delete-button` only for destructive actions.
|
|
17
|
+
13. `signature-button` must keep its hover state and chamfered corner.
|
|
18
|
+
14. All visible clickable buttons must have a hover state.
|
|
19
|
+
15. Disabled states must come from the shared component, not from local view CSS.
|
|
20
|
+
16. All reusable checkboxes must use `standard-checkbox`.
|
|
21
|
+
17. Do not build feature-specific checkbox shells or checkbox base styles.
|
|
22
|
+
18. Inputs and selects must follow the shared base rules in `frontend/styles/base.css`.
|
|
23
|
+
19. Ghost or transparent inputs must not use a white background, including unfocused state.
|
|
24
|
+
20. When a new control pattern appears in multiple places, promote it to a shared component first, then migrate existing usages.
|
|
25
|
+
|
|
26
|
+
## Source of Truth
|
|
27
|
+
|
|
28
|
+
- `frontend/styles/tokens.css`
|
|
29
|
+
- `frontend/styles/base.css`
|
|
30
|
+
- `frontend/index.html`
|
|
31
|
+
|
|
32
|
+
## Default Decision Rules
|
|
33
|
+
|
|
34
|
+
- Prefer reuse over invention.
|
|
35
|
+
- Prefer migration over local override.
|
|
36
|
+
- Prefer shared component updates over per-view fixes.
|
package/frontend/index.html
CHANGED
|
@@ -85,6 +85,85 @@
|
|
|
85
85
|
},
|
|
86
86
|
};
|
|
87
87
|
</script>
|
|
88
|
+
<style type="text/tailwindcss">
|
|
89
|
+
@layer components {
|
|
90
|
+
.signature-button {
|
|
91
|
+
@apply inline-flex items-center justify-center gap-2 h-[var(--control-height)] min-h-[var(--control-height)] border border-primary-container bg-primary-container px-[var(--control-padding-inline)] font-headline text-xs font-bold uppercase tracking-[0.16em] text-on-primary transition-all;
|
|
92
|
+
box-shadow: 0 0 18px -10px rgba(252, 227, 0, 0.7);
|
|
93
|
+
clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.signature-button:hover {
|
|
97
|
+
@apply -translate-y-px bg-primary-fixed text-on-primary;
|
|
98
|
+
border-color: rgba(252, 227, 0, 0.55);
|
|
99
|
+
box-shadow: 0 0 24px -8px rgba(252, 227, 0, 0.92);
|
|
100
|
+
filter: brightness(1.03);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.signature-button:disabled,
|
|
104
|
+
.signature-button[aria-disabled="true"] {
|
|
105
|
+
@apply cursor-not-allowed opacity-45;
|
|
106
|
+
box-shadow: none;
|
|
107
|
+
filter: none;
|
|
108
|
+
transform: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.signature-button .material-symbols-outlined {
|
|
112
|
+
@apply text-base;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.standard-button {
|
|
116
|
+
@apply inline-flex items-center justify-center gap-2 h-[var(--control-height)] min-h-[var(--control-height)] border border-outline-variant/20 bg-surface-container px-[var(--control-padding-inline)] font-mono text-[10px] font-bold uppercase tracking-[0.16em] text-on-surface transition-colors;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.standard-button:hover {
|
|
120
|
+
@apply bg-surface-container-highest text-primary-container;
|
|
121
|
+
border-color: rgba(252, 227, 0, 0.24);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.standard-button.is-active {
|
|
125
|
+
@apply bg-surface-container-high text-primary-container;
|
|
126
|
+
border-color: rgba(252, 227, 0, 0.3);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.standard-button:disabled,
|
|
130
|
+
.standard-button[aria-disabled="true"] {
|
|
131
|
+
@apply cursor-not-allowed opacity-40;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.standard-button .material-symbols-outlined {
|
|
135
|
+
@apply text-base;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.standard-checkbox {
|
|
139
|
+
@apply inline-flex w-full items-center gap-3 min-h-[var(--control-height)] border border-outline-variant/10 bg-surface-container-lowest px-[var(--control-padding-inline)] text-sm text-on-surface;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.standard-checkbox input[type="checkbox"] {
|
|
143
|
+
@apply m-0 rounded-none border-outline bg-surface-container-lowest text-primary-container focus:ring-primary-container;
|
|
144
|
+
accent-color: var(--color-primary-container);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.standard-checkbox.is-disabled,
|
|
148
|
+
.standard-checkbox:has(input:disabled) {
|
|
149
|
+
@apply opacity-45;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.delete-button {
|
|
153
|
+
@apply inline-flex items-center justify-center gap-2 h-[var(--control-height)] min-h-[var(--control-height)] border border-error/25 bg-error-container/10 px-[var(--control-padding-inline)] font-mono text-[10px] font-bold uppercase tracking-[0.16em] text-error transition-all;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.delete-button:hover {
|
|
157
|
+
@apply -translate-y-px border-error bg-error-container/20 text-error;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.delete-button:disabled,
|
|
161
|
+
.delete-button[aria-disabled="true"] {
|
|
162
|
+
@apply cursor-not-allowed opacity-45;
|
|
163
|
+
transform: none;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
</style>
|
|
88
167
|
<link href="styles/tokens.css" rel="stylesheet" />
|
|
89
168
|
<link href="styles/base.css" rel="stylesheet" />
|
|
90
169
|
<link href="styles/layout.css" rel="stylesheet" />
|
package/frontend/js/api.js
CHANGED
|
@@ -283,6 +283,66 @@ export function saveTableDesignerDraft(payload) {
|
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
export function getMediaTaggingState() {
|
|
287
|
+
return request("/api/media-tagging");
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export function previewMediaTaggingConfig(payload) {
|
|
291
|
+
return request("/api/media-tagging/preview", {
|
|
292
|
+
method: "POST",
|
|
293
|
+
body: payload,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export function saveMediaTaggingConfig(payload) {
|
|
298
|
+
return request("/api/media-tagging/config", {
|
|
299
|
+
method: "POST",
|
|
300
|
+
body: payload,
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export function createMediaTaggingTagTable(payload) {
|
|
305
|
+
return request("/api/media-tagging/tag-table/create", {
|
|
306
|
+
method: "POST",
|
|
307
|
+
body: payload,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export function createMediaTaggingMappingTable(payload) {
|
|
312
|
+
return request("/api/media-tagging/mapping-table/create", {
|
|
313
|
+
method: "POST",
|
|
314
|
+
body: payload,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export function createMediaTag(payload) {
|
|
319
|
+
return request("/api/media-tagging/tags", {
|
|
320
|
+
method: "POST",
|
|
321
|
+
body: payload,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export function deleteMediaTag(payload) {
|
|
326
|
+
return request("/api/media-tagging/tags/delete", {
|
|
327
|
+
method: "POST",
|
|
328
|
+
body: payload,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export function applyMediaTagging(payload) {
|
|
333
|
+
return request("/api/media-tagging/apply", {
|
|
334
|
+
method: "POST",
|
|
335
|
+
body: payload,
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export function skipMediaTagging(payload) {
|
|
340
|
+
return request("/api/media-tagging/skip", {
|
|
341
|
+
method: "POST",
|
|
342
|
+
body: payload,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
286
346
|
export function getDataTables() {
|
|
287
347
|
return request("/api/data");
|
|
288
348
|
}
|
|
@@ -311,6 +371,13 @@ export function getDataTable(tableName, options = {}) {
|
|
|
311
371
|
return request(`/api/data/${encodeURIComponent(tableName)}${query ? `?${query}` : ""}`);
|
|
312
372
|
}
|
|
313
373
|
|
|
374
|
+
export function getDataTableRow(tableName, payload) {
|
|
375
|
+
return request(`/api/data/${encodeURIComponent(tableName)}/row`, {
|
|
376
|
+
method: "POST",
|
|
377
|
+
body: payload,
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
|
|
314
381
|
export function updateDataTableRow(tableName, payload) {
|
|
315
382
|
return request(`/api/data/${encodeURIComponent(tableName)}/rows`, {
|
|
316
383
|
method: "PATCH",
|