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.
Files changed (45) hide show
  1. package/changelog.md +25 -0
  2. package/docs/DESIGN_GUIDELINES.md +36 -0
  3. package/frontend/index.html +79 -0
  4. package/frontend/js/api.js +67 -0
  5. package/frontend/js/app.js +1401 -921
  6. package/frontend/js/components/connectionCard.js +3 -4
  7. package/frontend/js/components/emptyState.js +4 -4
  8. package/frontend/js/components/modal.js +239 -30
  9. package/frontend/js/components/queryEditor.js +11 -8
  10. package/frontend/js/components/queryHistoryDetail.js +27 -8
  11. package/frontend/js/components/queryHistoryPanel.js +6 -5
  12. package/frontend/js/components/rowEditorPanel.js +84 -58
  13. package/frontend/js/components/sidebar.js +76 -33
  14. package/frontend/js/components/structureGraph.js +629 -715
  15. package/frontend/js/components/tableDesignerEditor.js +9 -8
  16. package/frontend/js/components/tableDesignerSidebar.js +11 -10
  17. package/frontend/js/components/tableDesignerSqlPreview.js +61 -30
  18. package/frontend/js/lib/mediaTaggingDefaults.js +27 -0
  19. package/frontend/js/router.js +81 -71
  20. package/frontend/js/store.js +3095 -2165
  21. package/frontend/js/views/charts.js +68 -40
  22. package/frontend/js/views/connections.js +5 -17
  23. package/frontend/js/views/data.js +40 -27
  24. package/frontend/js/views/editor.js +172 -177
  25. package/frontend/js/views/mediaTagging.js +861 -0
  26. package/frontend/js/views/overview.js +149 -10
  27. package/frontend/js/views/settings.js +2 -2
  28. package/frontend/js/views/structure.js +74 -70
  29. package/frontend/js/views/tableDesigner.js +7 -2
  30. package/frontend/styles/base.css +73 -1
  31. package/frontend/styles/components.css +105 -105
  32. package/frontend/styles/structure-graph.css +19 -82
  33. package/frontend/styles/tokens.css +2 -0
  34. package/frontend/styles/views.css +823 -30
  35. package/package.json +1 -1
  36. package/server/routes/charts.js +4 -1
  37. package/server/routes/data.js +14 -0
  38. package/server/routes/mediaTagging.js +166 -0
  39. package/server/routes/sql.js +1 -0
  40. package/server/server.js +4 -0
  41. package/server/services/sqlite/dataBrowserService.js +25 -0
  42. package/server/services/sqlite/exportService.js +31 -1
  43. package/server/services/sqlite/mediaTaggingService.js +1689 -0
  44. package/server/services/sqlite/overviewService.js +68 -0
  45. package/server/services/storage/appStateStore.js +321 -2
@@ -55,12 +55,13 @@
55
55
 
56
56
  .top-nav-icon {
57
57
  align-items: center;
58
+ box-sizing: border-box;
58
59
  color: var(--color-primary-container);
59
60
  display: inline-flex;
60
- height: 2rem;
61
+ height: var(--control-height);
61
62
  justify-content: center;
62
63
  transition: background-color var(--transition-fast);
63
- width: 2rem;
64
+ width: var(--control-height);
64
65
  }
65
66
 
66
67
  .top-nav-icon:hover {
@@ -83,6 +84,48 @@
83
84
  min-height: 0;
84
85
  }
85
86
 
87
+ .sidebar-group {
88
+ display: flex;
89
+ flex-direction: column;
90
+ }
91
+
92
+ .sidebar-sublinks {
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: 2px;
96
+ margin: 4px 0 4px var(--spacing-6);
97
+ padding-left: var(--spacing-6);
98
+ border-left: 1px solid rgba(75, 71, 50, 0.15);
99
+ }
100
+
101
+ .sidebar-sublink {
102
+ align-items: center;
103
+ color: rgba(229, 226, 225, 0.35);
104
+ display: flex;
105
+ font-family: var(--font-family-body);
106
+ font-size: 0.6875rem;
107
+ font-weight: 500;
108
+ gap: var(--spacing-3);
109
+ letter-spacing: 0.06em;
110
+ padding: 0.5rem var(--spacing-4);
111
+ text-transform: none;
112
+ transition:
113
+ background-color var(--transition-fast),
114
+ color var(--transition-fast),
115
+ border-color var(--transition-fast);
116
+ }
117
+
118
+ .sidebar-sublink:hover {
119
+ background: var(--color-surface-container);
120
+ color: var(--color-primary-container);
121
+ }
122
+
123
+ .sidebar-sublink.is-active {
124
+ border-left: 2px solid var(--color-primary-container);
125
+ color: var(--color-primary-container);
126
+ background: var(--color-surface-high);
127
+ }
128
+
86
129
  .sidebar-link {
87
130
  align-items: center;
88
131
  color: rgba(229, 226, 225, 0.4);
@@ -189,9 +232,14 @@
189
232
 
190
233
  .toolbar-button {
191
234
  align-items: center;
235
+ box-sizing: border-box;
192
236
  display: inline-flex;
193
237
  gap: var(--spacing-2);
238
+ height: var(--control-height);
194
239
  justify-content: center;
240
+ line-height: 1;
241
+ min-height: var(--control-height);
242
+ padding: 0 var(--control-padding-inline);
195
243
  text-transform: uppercase;
196
244
  transition:
197
245
  background-color var(--transition-fast),
@@ -199,10 +247,6 @@
199
247
  color var(--transition-fast);
200
248
  }
201
249
 
202
- .toolbar-button--primary:hover {
203
- box-shadow: var(--shadow-subtle-glow);
204
- }
205
-
206
250
  .metric-card {
207
251
  background: var(--color-surface-low);
208
252
  display: flex;
@@ -338,10 +382,10 @@
338
382
  display: flex;
339
383
  flex: 0 0 18rem;
340
384
  flex-direction: column;
341
- max-width: 18rem;
385
+ max-width: 18.2rem;
342
386
  min-height: 0;
343
- min-width: 18rem;
344
- width: 18rem;
387
+ min-width: 18.2rem;
388
+ width: 18.2rem;
345
389
  }
346
390
 
347
391
  .table-designer-sidebar__header {
@@ -392,75 +436,21 @@
392
436
  text-transform: uppercase;
393
437
  }
394
438
 
395
- .table-designer-sidebar__new-button,
396
- .table-designer-sidebar__import-button,
397
- .table-designer-preview__copy,
398
- .table-designer-main__secondary,
399
- .table-designer-main__primary {
400
- align-items: center;
401
- border: 1px solid rgba(75, 71, 50, 0.2);
402
- display: inline-flex;
403
- font-family: var(--font-family-headline);
404
- font-size: 0.75rem;
405
- font-weight: 700;
406
- justify-content: center;
407
- letter-spacing: 0.12em;
408
- min-height: 42px;
409
- padding: 0 1rem;
410
- text-transform: uppercase;
411
- transition:
412
- background-color var(--transition-fast),
413
- border-color var(--transition-fast),
414
- color var(--transition-fast),
415
- opacity var(--transition-fast);
416
- }
417
-
418
- .table-designer-sidebar__new-button,
419
- .table-designer-main__primary {
420
- background: var(--color-primary-container);
421
- border-color: rgba(252, 227, 0, 0.35);
422
- color: var(--color-on-primary);
423
- }
424
-
425
- .table-designer-preview__copy,
426
- .table-designer-sidebar__import-button,
427
- .table-designer-main__secondary {
428
- background: var(--color-surface-container-lowest);
429
- color: var(--color-on-surface);
430
- }
431
-
432
- .table-designer-sidebar__new-button:hover,
433
- .table-designer-main__primary:hover {
434
- filter: brightness(1.04);
435
- }
436
-
437
- .table-designer-preview__copy:hover,
438
- .table-designer-sidebar__import-button:hover,
439
- .table-designer-main__secondary:hover {
440
- background: var(--color-surface-highest);
441
- border-color: rgba(252, 227, 0, 0.24);
442
- color: var(--color-primary-container);
443
- }
444
-
445
439
  .table-designer-sidebar__file-input {
446
440
  display: none;
447
441
  }
448
442
 
449
- .table-designer-main__primary.is-disabled,
450
- .table-designer-main__primary:disabled {
451
- cursor: not-allowed;
452
- opacity: 0.45;
453
- }
454
-
455
443
  .table-designer-sidebar__search {
456
444
  align-items: center;
457
445
  background: var(--color-surface-container-lowest);
458
446
  border: 1px solid rgba(75, 71, 50, 0.18);
447
+ box-sizing: border-box;
448
+ min-height: var(--control-height);
459
449
  margin: var(--spacing-4) var(--spacing-3) 0;
460
450
  border-bottom: 1px solid rgba(75, 71, 50, 0.18);
461
451
  display: flex;
462
452
  gap: var(--spacing-3);
463
- padding: 0 var(--spacing-4);
453
+ padding: 0 var(--control-padding-inline);
464
454
  }
465
455
 
466
456
  .table-designer-sidebar__search-input,
@@ -501,7 +491,7 @@ select.table-designer-field {
501
491
  color: var(--color-on-surface);
502
492
  flex: 1;
503
493
  font-size: 0.875rem;
504
- height: 48px;
494
+ height: calc(var(--control-height) - 2px);
505
495
  padding: 0;
506
496
  }
507
497
 
@@ -599,6 +589,14 @@ select.table-designer-field {
599
589
  padding: var(--spacing-5);
600
590
  }
601
591
 
592
+ .table-designer-preview.is-collapsed .table-designer-preview__header {
593
+ border-bottom: none;
594
+ }
595
+
596
+ .table-designer-preview.is-collapsed {
597
+ height: auto;
598
+ }
599
+
602
600
  .table-designer-main__title-row {
603
601
  align-items: center;
604
602
  display: flex;
@@ -626,18 +624,18 @@ select.table-designer-field {
626
624
  gap: var(--spacing-3);
627
625
  }
628
626
 
629
- .table-designer-fill-toggle {
627
+ .table-designer-preview__actions {
630
628
  align-items: center;
629
+ display: flex;
630
+ flex-wrap: wrap;
631
+ gap: var(--spacing-3);
632
+ }
633
+
634
+ .table-designer-fill-toggle {
635
+ background: var(--color-surface-container);
631
636
  border: 1px solid rgba(75, 71, 50, 0.18);
632
637
  color: var(--color-on-surface);
633
- display: inline-flex;
634
638
  gap: 0.75rem;
635
- min-height: 42px;
636
- padding: 0 0.875rem;
637
- }
638
-
639
- .table-designer-fill-toggle input {
640
- accent-color: var(--color-primary-container);
641
639
  }
642
640
 
643
641
  .table-designer-fill-toggle.is-disabled {
@@ -758,14 +756,14 @@ select.table-designer-field {
758
756
  grid-template-columns:
759
757
  minmax(12rem, 1.5fr)
760
758
  minmax(8rem, 0.9fr)
761
- minmax(5.5rem, 0.7fr)
762
- minmax(5.5rem, 0.7fr)
759
+ minmax(6.5rem, 0.9fr)
760
+ minmax(5.5rem, 0.9fr)
763
761
  minmax(6rem, 0.7fr)
764
762
  minmax(10rem, 1fr)
765
763
  minmax(10rem, 1fr)
766
764
  minmax(10rem, 1fr)
767
- 44px;
768
- min-width: 76rem;
765
+ minmax(7rem, max-content);
766
+ min-width: 82rem;
769
767
  padding: var(--spacing-3);
770
768
  }
771
769
 
@@ -788,42 +786,39 @@ select.table-designer-field {
788
786
  }
789
787
 
790
788
  .table-designer-field {
791
- min-height: 42px;
789
+ height: var(--control-height);
790
+ min-height: var(--control-height);
792
791
  padding: 0 0.75rem;
793
792
  }
794
793
 
795
794
  .table-designer-check {
796
- align-items: center;
795
+ background: var(--color-surface-container);
796
+ border: 1px solid rgba(75, 71, 50, 0.18);
797
797
  color: rgba(229, 226, 225, 0.75);
798
- display: inline-flex;
799
798
  font-size: 0.75rem;
800
799
  gap: 0.5rem;
801
- min-height: 42px;
802
800
  }
803
801
 
804
- .table-designer-check input {
805
- accent-color: var(--color-primary-container);
802
+ .table-designer-checkbox-override {
803
+ background: var(--color-surface-container-lowest) !important;
804
+ background-color: var(--color-surface-container-lowest) !important;
805
+ background-image: none !important;
806
+ border: 1px solid rgba(75, 71, 50, 0.18) !important;
806
807
  }
807
808
 
808
- .table-designer-delete {
809
- align-items: center;
810
- background: transparent;
811
- border: 1px solid rgba(75, 71, 50, 0.18);
812
- color: rgba(229, 226, 225, 0.65);
813
- display: inline-flex;
814
- height: 42px;
815
- justify-content: center;
816
- transition:
817
- border-color var(--transition-fast),
818
- color var(--transition-fast),
819
- background-color var(--transition-fast);
820
- width: 42px;
809
+ .table-designer-check input[type='checkbox']:not(:checked),
810
+ .table-designer-fill-toggle input[type='checkbox']:not(:checked),
811
+ .table-designer-checkbox-override input[type='checkbox']:not(:checked) {
812
+ background: transparent !important;
813
+ background-color: transparent !important;
814
+ background-image: none !important;
821
815
  }
822
816
 
823
- .table-designer-delete:hover {
824
- background: rgba(147, 0, 10, 0.18);
825
- border-color: rgba(255, 180, 171, 0.2);
826
- color: var(--color-error);
817
+ .table-designer-check input[type='checkbox']:checked,
818
+ .table-designer-fill-toggle input[type='checkbox']:checked,
819
+ .table-designer-checkbox-override input[type='checkbox']:checked {
820
+ background-color: var(--color-primary-container) !important;
821
+ border-color: var(--color-primary-container) !important;
827
822
  }
828
823
 
829
824
  .table-designer-preview__body {
@@ -894,14 +889,15 @@ select.table-designer-field {
894
889
  align-items: center;
895
890
  background: transparent;
896
891
  border: 0;
892
+ box-sizing: border-box;
897
893
  color: rgba(229, 226, 225, 0.6);
898
894
  display: inline-flex;
899
- height: 2rem;
895
+ height: var(--control-height);
900
896
  justify-content: center;
901
897
  transition:
902
898
  color var(--transition-fast),
903
899
  background-color var(--transition-fast);
904
- width: 2rem;
900
+ width: var(--control-height);
905
901
  }
906
902
 
907
903
  .query-history-icon-button:hover,
@@ -911,14 +907,18 @@ select.table-designer-field {
911
907
  }
912
908
 
913
909
  .query-history-tab {
910
+ align-items: center;
914
911
  background: transparent;
915
912
  border: 0;
916
913
  border-bottom: 1px solid transparent;
917
914
  color: rgba(205, 199, 171, 0.45);
915
+ display: inline-flex;
918
916
  font-family: var(--font-family-mono);
919
917
  font-size: var(--font-size-status);
918
+ height: var(--control-height);
919
+ justify-content: center;
920
920
  letter-spacing: 0.16em;
921
- padding: 0.35rem 0;
921
+ padding: 0 var(--spacing-1);
922
922
  text-transform: uppercase;
923
923
  transition:
924
924
  border-color var(--transition-fast),
@@ -41,99 +41,29 @@
41
41
  justify-content: flex-end;
42
42
  }
43
43
 
44
- .structure-graph__search {
44
+ .structure-graph__toolbar .standard-button,
45
+ .structure-graph__section-header .standard-button {
45
46
  align-items: center;
46
- background: rgba(12, 12, 10, 0.98);
47
- border: 1px solid rgba(138, 123, 52, 0.34);
48
- display: inline-flex;
49
- gap: 0.625rem;
50
- height: 2.75rem;
51
- min-width: min(100%, 22rem);
52
- padding: 0 0.875rem;
53
- transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
54
- }
55
-
56
- .structure-graph__search:focus-within {
57
- border-color: rgba(252, 227, 0, 0.56);
58
- box-shadow: 0 0 0 1px rgba(252, 227, 0, 0.18);
59
- }
60
-
61
- .structure-graph__search.is-miss {
62
- border-color: rgba(255, 180, 171, 0.3);
63
- box-shadow: 0 0 0 1px rgba(255, 180, 171, 0.1);
64
- }
65
-
66
- .structure-graph__search-icon {
67
- color: rgba(244, 239, 232, 0.56);
68
- font-size: 1rem;
69
- }
70
-
71
- .structure-graph__search-input {
72
- -webkit-appearance: none;
73
- appearance: none;
74
- background: transparent;
75
- background-color: transparent !important;
76
- background-image: none !important;
77
- border: 0;
78
- border-color: transparent;
79
- border-radius: 0;
80
- box-shadow: none !important;
81
- color: var(--color-on-surface);
82
- flex: 1;
83
- font-family: var(--font-family-mono);
84
- font-size: 0.75rem;
85
- letter-spacing: 0.12em;
86
- min-width: 0;
87
- outline: 0;
88
- padding: 0;
89
- text-transform: uppercase;
90
- }
91
-
92
- .structure-graph__search-input::placeholder {
93
- color: rgba(231, 223, 189, 0.38);
94
- }
95
-
96
- .structure-graph__search-input::-webkit-search-decoration,
97
- .structure-graph__search-input::-webkit-search-cancel-button,
98
- .structure-graph__search-input::-webkit-search-results-button,
99
- .structure-graph__search-input::-webkit-search-results-decoration {
100
- -webkit-appearance: none;
101
- appearance: none;
102
- }
103
-
104
- .structure-graph__button {
105
- align-items: center;
106
- background: rgba(17, 17, 15, 0.94);
107
- border: 1px solid rgba(138, 123, 52, 0.24);
108
- color: rgba(244, 239, 232, 0.9);
109
47
  display: inline-flex;
48
+ flex-shrink: 0;
110
49
  gap: 0.5rem;
111
- height: 2.75rem;
112
50
  justify-content: center;
113
- padding: 0 0.875rem;
114
- text-transform: uppercase;
115
- transition: background-color var(--transition-fast), color var(--transition-fast),
116
- border-color var(--transition-fast);
117
51
  }
118
52
 
119
- .structure-graph__button:hover {
120
- background: rgba(44, 42, 35, 0.96);
121
- border-color: rgba(252, 227, 0, 0.34);
122
- color: #fff6ae;
53
+ .structure-graph__toolbar .standard-button:hover {
54
+ background: var(--color-surface-container-highest);
123
55
  }
124
56
 
125
- .structure-graph__button.is-active {
126
- background: rgba(252, 227, 0, 0.16);
127
- border-color: rgba(252, 227, 0, 0.4);
128
- color: #fff6ae;
57
+ .structure-graph__toolbar .standard-button.is-active {
58
+ background: rgba(252, 227, 0, 0.12);
59
+ border-color: rgba(252, 227, 0, 0.38);
60
+ color: var(--color-primary-container);
129
61
  }
130
62
 
131
- .structure-graph__button.is-disabled,
132
- .structure-graph__button:disabled {
133
- border-color: rgba(138, 123, 52, 0.16);
63
+ .structure-graph__toolbar .standard-button:disabled,
64
+ .structure-graph__section-header .standard-button:disabled {
65
+ border-color: rgba(75, 71, 50, 0.18);
134
66
  color: rgba(231, 223, 189, 0.34);
135
- cursor: default;
136
- opacity: 0.72;
137
67
  }
138
68
 
139
69
  .structure-graph__workspace {
@@ -290,6 +220,13 @@
290
220
  text-transform: uppercase;
291
221
  }
292
222
 
223
+ .structure-graph__section-header {
224
+ align-items: center;
225
+ display: flex;
226
+ gap: 0.75rem;
227
+ justify-content: space-between;
228
+ }
229
+
293
230
  .structure-graph__column-list {
294
231
  display: flex;
295
232
  flex-direction: column;
@@ -25,6 +25,8 @@
25
25
  --font-size-micro: 9px;
26
26
  --font-size-label: 11px;
27
27
  --font-size-icon: 18px;
28
+ --control-height: 36px;
29
+ --control-padding-inline: 12px;
28
30
  --spacing-1: 4px;
29
31
  --spacing-2: 8px;
30
32
  --spacing-3: 12px;