sqlite-hub 0.9.6 → 0.9.8

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.
@@ -4,6 +4,11 @@ import { renderQueryHistoryDetail } from './components/queryHistoryDetail.js';
4
4
  import { renderQueryHistoryListItem } from './components/queryHistoryPanel.js';
5
5
  import { renderSidebar } from './components/sidebar.js';
6
6
  import { renderStatusBar } from './components/statusBar.js';
7
+ import {
8
+ renderTableDesignerFeedback,
9
+ renderTableDesignerReferenceColumnOptions,
10
+ } from './components/tableDesignerEditor.js';
11
+ import { renderTableDesignerSqlPreview } from './components/tableDesignerSqlPreview.js';
7
12
  import {
8
13
  mountStructureGraph,
9
14
  teardownStructureGraph,
@@ -344,6 +349,84 @@ function syncMediaTaggingTagSearchUi(input) {
344
349
  return true;
345
350
  }
346
351
 
352
+ function syncTableDesignerReferenceColumnOptions(sourceNode, state) {
353
+ if (
354
+ !(sourceNode instanceof HTMLSelectElement) ||
355
+ sourceNode.dataset.bind !== 'table-designer-column-field' ||
356
+ sourceNode.dataset.field !== 'referencesTable'
357
+ ) {
358
+ return true;
359
+ }
360
+
361
+ const rowNode = sourceNode.closest('.table-designer-grid__row');
362
+ const referenceColumnSelect = rowNode?.querySelector(
363
+ '[data-bind="table-designer-column-field"][data-field="referencesColumn"]',
364
+ );
365
+ const column = state.tableDesigner.draft?.columns.find(item => item.id === sourceNode.dataset.columnId);
366
+
367
+ if (!(referenceColumnSelect instanceof HTMLSelectElement) || !column) {
368
+ return false;
369
+ }
370
+
371
+ replaceChildrenFromRenderedMarkup(
372
+ referenceColumnSelect,
373
+ renderTableDesignerReferenceColumnOptions(
374
+ state.tableDesigner.draft,
375
+ state.tableDesigner.tables ?? [],
376
+ column.referencesTable,
377
+ column.referencesColumn,
378
+ ),
379
+ );
380
+ referenceColumnSelect.value = column.referencesColumn ?? '';
381
+ return true;
382
+ }
383
+
384
+ function syncTableDesignerDraftUi(sourceNode) {
385
+ const state = getState();
386
+ const draft = state.tableDesigner.draft;
387
+
388
+ if (state.route.name !== 'tableDesigner' || !draft) {
389
+ return false;
390
+ }
391
+
392
+ let synced = syncTableDesignerReferenceColumnOptions(sourceNode, state);
393
+
394
+ const saveButton = shellRefs.view.querySelector('[data-table-designer-save-button]');
395
+ if (saveButton instanceof HTMLButtonElement) {
396
+ saveButton.disabled = !draft.canSave;
397
+ } else {
398
+ synced = false;
399
+ }
400
+
401
+ const feedbackNode = shellRefs.view.querySelector('[data-table-designer-feedback]');
402
+ if (feedbackNode instanceof HTMLElement) {
403
+ replaceChildrenFromRenderedMarkup(
404
+ feedbackNode,
405
+ renderTableDesignerFeedback(draft, state.tableDesigner.saveError),
406
+ );
407
+ } else {
408
+ synced = false;
409
+ }
410
+
411
+ const previewNode = shellRefs.view.querySelector('.table-designer-workspace__bottom');
412
+ if (previewNode instanceof HTMLElement) {
413
+ previewNode.classList.toggle('is-collapsed', !state.tableDesigner.sqlPreviewVisible);
414
+ replaceChildrenFromRenderedMarkup(
415
+ previewNode,
416
+ renderTableDesignerSqlPreview(draft, state.tableDesigner.sqlPreviewVisible),
417
+ );
418
+ } else {
419
+ synced = false;
420
+ }
421
+
422
+ if (synced) {
423
+ lastRenderedMainMarkup = renderTableDesignerView(state).main;
424
+ lastRenderedPanelMarkup = '';
425
+ }
426
+
427
+ return synced;
428
+ }
429
+
347
430
  function syncDataRowSelectionUi(selectedRowIndex = null) {
348
431
  if (getState().route.name !== 'data') {
349
432
  return false;
@@ -1655,7 +1738,10 @@ document.addEventListener('input', event => {
1655
1738
  }
1656
1739
 
1657
1740
  if (bindNode.dataset.bind === 'table-designer-field') {
1658
- if (bindNode instanceof HTMLInputElement && bindNode.type === 'checkbox') {
1741
+ if (
1742
+ (bindNode instanceof HTMLInputElement && bindNode.type === 'checkbox') ||
1743
+ bindNode instanceof HTMLSelectElement
1744
+ ) {
1659
1745
  return;
1660
1746
  }
1661
1747
 
@@ -1664,6 +1750,10 @@ document.addEventListener('input', event => {
1664
1750
  }
1665
1751
 
1666
1752
  if (bindNode.dataset.bind === 'table-designer-column-field') {
1753
+ if (bindNode instanceof HTMLSelectElement) {
1754
+ return;
1755
+ }
1756
+
1667
1757
  updateCurrentTableDesignerColumnField(bindNode.dataset.columnId, bindNode.dataset.field, bindNode.value);
1668
1758
  return;
1669
1759
  }
@@ -1768,11 +1858,33 @@ document.addEventListener('change', event => {
1768
1858
  return;
1769
1859
  }
1770
1860
 
1861
+ if (bindNode instanceof HTMLSelectElement) {
1862
+ updateCurrentTableDesignerField(bindNode.dataset.field, bindNode.value, { notify: false });
1863
+
1864
+ if (!syncTableDesignerDraftUi(bindNode)) {
1865
+ renderApp(getState());
1866
+ }
1867
+
1868
+ return;
1869
+ }
1870
+
1771
1871
  updateCurrentTableDesignerField(bindNode.dataset.field, bindNode.value);
1772
1872
  return;
1773
1873
  }
1774
1874
 
1775
1875
  if (bindNode.dataset.bind === 'table-designer-column-field') {
1876
+ if (bindNode instanceof HTMLSelectElement) {
1877
+ updateCurrentTableDesignerColumnField(bindNode.dataset.columnId, bindNode.dataset.field, bindNode.value, {
1878
+ notify: false,
1879
+ });
1880
+
1881
+ if (!syncTableDesignerDraftUi(bindNode)) {
1882
+ renderApp(getState());
1883
+ }
1884
+
1885
+ return;
1886
+ }
1887
+
1776
1888
  updateCurrentTableDesignerColumnField(bindNode.dataset.columnId, bindNode.dataset.field, bindNode.value);
1777
1889
  return;
1778
1890
  }
@@ -55,8 +55,33 @@ function getReferencedColumns(draft, catalogTables, referencesTable) {
55
55
  );
56
56
  }
57
57
 
58
+ export function renderTableDesignerReferenceColumnOptions(
59
+ draft,
60
+ catalogTables,
61
+ referencesTable,
62
+ selectedValue
63
+ ) {
64
+ const referenceColumns = getReferencedColumns(draft, catalogTables, referencesTable);
65
+
66
+ return [
67
+ '<option value="">No FK column</option>',
68
+ referenceColumns
69
+ .map((name) =>
70
+ [
71
+ '<option value="',
72
+ escapeHtml(name),
73
+ '" ',
74
+ name === selectedValue ? "selected" : "",
75
+ ">",
76
+ escapeHtml(name),
77
+ "</option>",
78
+ ].join("")
79
+ )
80
+ .join(""),
81
+ ].join("");
82
+ }
83
+
58
84
  function renderColumnRow(column, draft, catalogTables) {
59
- const referenceColumns = getReferencedColumns(draft, catalogTables, column.referencesTable);
60
85
  const typeOptions = draft.supportedTypes
61
86
  .map((type) =>
62
87
  [
@@ -83,19 +108,12 @@ function renderColumnRow(column, draft, catalogTables) {
83
108
  ].join("")
84
109
  )
85
110
  .join("");
86
- const referenceColumnOptions = referenceColumns
87
- .map((name) =>
88
- [
89
- '<option value="',
90
- escapeHtml(name),
91
- '" ',
92
- name === column.referencesColumn ? "selected" : "",
93
- ">",
94
- escapeHtml(name),
95
- "</option>",
96
- ].join("")
97
- )
98
- .join("");
111
+ const referenceColumnOptions = renderTableDesignerReferenceColumnOptions(
112
+ draft,
113
+ catalogTables,
114
+ column.referencesTable,
115
+ column.referencesColumn
116
+ );
99
117
 
100
118
  const columnId = escapeHtml(column.id);
101
119
 
@@ -141,7 +159,7 @@ function renderColumnRow(column, draft, catalogTables) {
141
159
  "</select>",
142
160
  '<select class="table-designer-field" data-bind="table-designer-column-field" data-column-id="',
143
161
  columnId,
144
- '" data-field="referencesColumn"><option value="">No FK column</option>',
162
+ '" data-field="referencesColumn">',
145
163
  referenceColumnOptions,
146
164
  "</select>",
147
165
  '<button class="delete-button" data-action="remove-table-designer-column" data-column-id="',
@@ -202,6 +220,26 @@ function renderFillToggle(draft) {
202
220
  `;
203
221
  }
204
222
 
223
+ export function renderTableDesignerFeedback(draft, saveError) {
224
+ const validationItems = (draft?.validationErrors ?? []).map((message) => ({
225
+ title: message,
226
+ }));
227
+ const warningItems = draft?.warnings ?? [];
228
+
229
+ return [
230
+ saveError
231
+ ? `
232
+ <div class="table-designer-main__error">
233
+ <div class="table-designer-main__error-code">${escapeHtml(saveError.code)}</div>
234
+ <div class="table-designer-main__error-text">${escapeHtml(saveError.message)}</div>
235
+ </div>
236
+ `
237
+ : "",
238
+ renderWarningList(validationItems, "table-designer-banner is-validation", "Validation", "alert"),
239
+ renderWarningList(warningItems, "table-designer-banner is-warning", "Warnings", "alert"),
240
+ ].join("");
241
+ }
242
+
205
243
  export function renderTableDesignerEditor(state) {
206
244
  const draft = state.tableDesigner.draft;
207
245
 
@@ -228,10 +266,6 @@ export function renderTableDesignerEditor(state) {
228
266
  `;
229
267
  }
230
268
 
231
- const validationItems = (draft.validationErrors ?? []).map((message) => ({
232
- title: message,
233
- }));
234
- const warningItems = draft.warnings ?? [];
235
269
  const catalogTables = state.tableDesigner.tables ?? [];
236
270
  const visibleColumns = draft.columns.filter((column) => !column.deleted);
237
271
  const saveLabel =
@@ -286,6 +320,7 @@ export function renderTableDesignerEditor(state) {
286
320
  <button
287
321
  class="standard-button"
288
322
  data-action="save-table-designer"
323
+ data-table-designer-save-button
289
324
  ${draft.canSave ? "" : "disabled"}
290
325
  type="button"
291
326
  >
@@ -294,23 +329,9 @@ export function renderTableDesignerEditor(state) {
294
329
  </div>
295
330
  </header>
296
331
 
297
- ${
298
- state.tableDesigner.saveError
299
- ? `
300
- <div class="table-designer-main__error">
301
- <div class="table-designer-main__error-code">${escapeHtml(
302
- state.tableDesigner.saveError.code
303
- )}</div>
304
- <div class="table-designer-main__error-text">${escapeHtml(
305
- state.tableDesigner.saveError.message
306
- )}</div>
307
- </div>
308
- `
309
- : ""
310
- }
311
-
312
- ${renderWarningList(validationItems, "table-designer-banner is-validation", "Validation", "alert")}
313
- ${renderWarningList(warningItems, "table-designer-banner is-warning", "Warnings", "alert")}
332
+ <div data-table-designer-feedback>
333
+ ${renderTableDesignerFeedback(draft, state.tableDesigner.saveError)}
334
+ </div>
314
335
 
315
336
  <section class="table-designer-main__section">
316
337
  <div class="table-designer-main__section-header">
@@ -2856,7 +2856,7 @@ export function setTableDesignerSqlPreviewVisibility(visible) {
2856
2856
  emitChange();
2857
2857
  }
2858
2858
 
2859
- export function updateCurrentTableDesignerField(field, value) {
2859
+ export function updateCurrentTableDesignerField(field, value, options = {}) {
2860
2860
  if (!state.tableDesigner.draft) {
2861
2861
  return;
2862
2862
  }
@@ -2868,10 +2868,13 @@ export function updateCurrentTableDesignerField(field, value) {
2868
2868
  getTableDesignerContext(),
2869
2869
  );
2870
2870
  state.tableDesigner.saveError = null;
2871
- emitChange();
2871
+
2872
+ if (options.notify !== false) {
2873
+ emitChange();
2874
+ }
2872
2875
  }
2873
2876
 
2874
- export function updateCurrentTableDesignerColumnField(columnId, field, value) {
2877
+ export function updateCurrentTableDesignerColumnField(columnId, field, value, options = {}) {
2875
2878
  if (!state.tableDesigner.draft) {
2876
2879
  return;
2877
2880
  }
@@ -2884,7 +2887,10 @@ export function updateCurrentTableDesignerColumnField(columnId, field, value) {
2884
2887
  getTableDesignerContext(),
2885
2888
  );
2886
2889
  state.tableDesigner.saveError = null;
2887
- emitChange();
2890
+
2891
+ if (options.notify !== false) {
2892
+ emitChange();
2893
+ }
2888
2894
  }
2889
2895
 
2890
2896
  export function addCurrentTableDesignerColumn() {
@@ -131,6 +131,7 @@ img {
131
131
 
132
132
  .font-headline {
133
133
  font-family: var(--font-family-headline);
134
+ word-break: break-all;
134
135
  }
135
136
 
136
137
  .font-body {
@@ -1,346 +1,348 @@
1
1
  .structure-graph {
2
- background: var(--color-surface-container);
3
- border: 1px solid rgba(138, 123, 52, 0.26);
4
- display: flex;
5
- flex-direction: column;
6
- height: 100%;
7
- min-height: 0;
8
- overflow: hidden;
2
+ background: var(--color-surface-container);
3
+ border: 1px solid rgba(138, 123, 52, 0.26);
4
+ display: flex;
5
+ flex-direction: column;
6
+ height: 100%;
7
+ min-height: 0;
8
+ overflow: hidden;
9
9
  }
10
10
 
11
11
  .structure-graph__toolbar {
12
- align-items: center;
13
- background: linear-gradient(
14
- to bottom,
15
- rgba(45, 43, 37, 0.97),
16
- rgba(23, 23, 20, 0.96)
17
- );
18
- border-bottom: 1px solid rgba(138, 123, 52, 0.24);
19
- display: flex;
20
- flex-wrap: wrap;
21
- gap: 1rem;
22
- justify-content: space-between;
23
- padding: 1rem 1.25rem;
12
+ align-items: center;
13
+ background: linear-gradient(to bottom, rgba(45, 43, 37, 0.97), rgba(23, 23, 20, 0.96));
14
+ border-bottom: 1px solid rgba(138, 123, 52, 0.24);
15
+ display: flex;
16
+ flex-wrap: wrap;
17
+ gap: 1rem;
18
+ justify-content: space-between;
19
+ padding: 1rem 1.25rem;
24
20
  }
25
21
 
26
22
  .structure-graph__toolbar-main {
27
- align-items: center;
28
- display: flex;
29
- flex: 1 1 20rem;
30
- flex-wrap: wrap;
31
- gap: 0.875rem;
32
- min-width: 0;
23
+ align-items: center;
24
+ display: flex;
25
+ flex: 1 1 20rem;
26
+ flex-wrap: wrap;
27
+ gap: 0.875rem;
28
+ min-width: 0;
33
29
  }
34
30
 
35
31
  .structure-graph__toolbar-actions {
36
- align-items: center;
37
- display: flex;
38
- flex: 0 0 auto;
39
- flex-wrap: wrap;
40
- gap: 0.625rem;
41
- justify-content: flex-end;
32
+ align-items: center;
33
+ display: flex;
34
+ flex: 0 0 auto;
35
+ flex-wrap: wrap;
36
+ gap: 0.625rem;
37
+ justify-content: flex-end;
42
38
  }
43
39
 
44
40
  .structure-graph__toolbar .standard-button,
45
41
  .structure-graph__section-header .standard-button {
46
- align-items: center;
47
- display: inline-flex;
48
- flex-shrink: 0;
49
- gap: 0.5rem;
50
- justify-content: center;
42
+ align-items: center;
43
+ display: inline-flex;
44
+ flex-shrink: 0;
45
+ gap: 0.5rem;
46
+ justify-content: center;
51
47
  }
52
48
 
53
49
  .structure-graph__toolbar .standard-button:hover {
54
- background: var(--color-surface-container-highest);
50
+ background: var(--color-surface-container-highest);
55
51
  }
56
52
 
57
53
  .structure-graph__toolbar .standard-button.is-active {
58
- background: var(--primary-alpha-12);
59
- border-color: rgb(var(--rgb-primary) / 0.38);
60
- color: var(--color-primary-container);
54
+ background: var(--primary-alpha-12);
55
+ border-color: rgb(var(--rgb-primary) / 0.38);
56
+ color: var(--color-primary-container);
61
57
  }
62
58
 
63
59
  .structure-graph__toolbar .standard-button:disabled,
64
60
  .structure-graph__section-header .standard-button:disabled {
65
- border-color: var(--border-medium);
66
- color: rgba(231, 223, 189, 0.34);
61
+ border-color: var(--border-medium);
62
+ color: rgba(231, 223, 189, 0.34);
67
63
  }
68
64
 
69
65
  .structure-graph__workspace {
70
- display: grid;
71
- flex: 1;
72
- grid-template-columns: minmax(0, 1fr) 26rem;
73
- min-height: 0;
66
+ display: grid;
67
+ flex: 1;
68
+ grid-template-columns: minmax(0, 1fr) 26rem;
69
+ min-height: 0;
74
70
  }
75
71
 
76
72
  .structure-graph.is-inspector-hidden .structure-graph__workspace {
77
- grid-template-columns: minmax(0, 1fr);
73
+ grid-template-columns: minmax(0, 1fr);
78
74
  }
79
75
 
80
76
  .structure-graph__canvas-shell {
81
- background:
82
- linear-gradient(rgba(138, 123, 52, 0.09) 1px, transparent 1px),
83
- linear-gradient(90deg, rgba(138, 123, 52, 0.08) 1px, transparent 1px),
84
- radial-gradient(circle at top left, rgb(var(--rgb-primary) / 0.14), transparent 30%),
85
- radial-gradient(circle at bottom right, rgba(45, 250, 255, 0.1), transparent 24%),
86
- linear-gradient(to bottom, rgba(27, 27, 24, 0.99), rgba(9, 10, 11, 0.99));
87
- background-size: 28px 28px, 28px 28px, auto, auto, auto;
88
- min-height: 0;
89
- overflow: hidden;
90
- position: relative;
77
+ background:
78
+ linear-gradient(rgba(138, 123, 52, 0.09) 1px, transparent 1px),
79
+ linear-gradient(90deg, rgba(138, 123, 52, 0.08) 1px, transparent 1px),
80
+ radial-gradient(circle at top left, rgb(var(--rgb-primary) / 0.14), transparent 30%),
81
+ radial-gradient(circle at bottom right, rgba(45, 250, 255, 0.1), transparent 24%),
82
+ linear-gradient(to bottom, rgba(27, 27, 24, 0.99), rgba(9, 10, 11, 0.99));
83
+ background-size:
84
+ 28px 28px,
85
+ 28px 28px,
86
+ auto,
87
+ auto,
88
+ auto;
89
+ min-height: 0;
90
+ overflow: hidden;
91
+ position: relative;
91
92
  }
92
93
 
93
94
  .structure-graph__canvas {
94
- inset: 0;
95
- position: absolute;
95
+ inset: 0;
96
+ position: absolute;
96
97
  }
97
98
 
98
99
  .structure-graph__empty {
99
- align-items: center;
100
- color: rgba(231, 223, 189, 0.58);
101
- display: flex;
102
- flex-direction: column;
103
- gap: 0.625rem;
104
- inset: 0;
105
- justify-content: center;
106
- padding: 2rem;
107
- position: absolute;
108
- text-align: center;
100
+ align-items: center;
101
+ color: rgba(231, 223, 189, 0.58);
102
+ display: flex;
103
+ flex-direction: column;
104
+ gap: 0.625rem;
105
+ inset: 0;
106
+ justify-content: center;
107
+ padding: 2rem;
108
+ position: absolute;
109
+ text-align: center;
109
110
  }
110
111
 
111
112
  .structure-graph__empty-icon {
112
- color: rgb(var(--rgb-primary) / 0.42);
113
- font-size: 2.25rem;
113
+ color: rgb(var(--rgb-primary) / 0.42);
114
+ font-size: 2.25rem;
114
115
  }
115
116
 
116
117
  .structure-graph__inspector {
117
- background: linear-gradient(to bottom, rgba(26, 25, 23, 0.98), rgba(11, 11, 10, 0.99));
118
- border-left: 1px solid rgba(138, 123, 52, 0.24);
119
- height: 100%;
120
- min-height: 0;
121
- overflow-y: auto;
122
- overflow-x: hidden;
118
+ background: linear-gradient(to bottom, rgba(26, 25, 23, 0.98), rgba(11, 11, 10, 0.99));
119
+ border-left: 1px solid rgba(138, 123, 52, 0.24);
120
+ height: 100%;
121
+ min-height: 0;
122
+ overflow-y: auto;
123
+ overflow-x: hidden;
123
124
  }
124
125
 
125
126
  .structure-graph.is-inspector-hidden .structure-graph__inspector {
126
- display: none;
127
+ display: none;
127
128
  }
128
129
 
129
130
  .structure-graph__panel {
130
- display: flex;
131
- flex-direction: column;
132
- gap: 1.25rem;
133
- min-height: 100%;
134
- padding: 1.25rem;
131
+ display: flex;
132
+ flex-direction: column;
133
+ gap: 1.25rem;
134
+ min-height: 100%;
135
+ padding: 1.25rem;
135
136
  }
136
137
 
137
138
  .structure-graph__panel.is-empty {
138
- align-items: center;
139
- justify-content: center;
140
- text-align: center;
139
+ align-items: center;
140
+ justify-content: center;
141
+ text-align: center;
141
142
  }
142
143
 
143
144
  .structure-graph__eyebrow {
144
- color: rgba(231, 223, 189, 0.62);
145
- font-family: var(--font-family-mono);
146
- font-size: 0.625rem;
147
- letter-spacing: 0.2em;
148
- text-transform: uppercase;
145
+ color: rgba(231, 223, 189, 0.62);
146
+ font-family: var(--font-family-mono);
147
+ font-size: 0.625rem;
148
+ letter-spacing: 0.2em;
149
+ text-transform: uppercase;
149
150
  }
150
151
 
151
152
  .structure-graph__title {
152
- color: var(--color-primary-container);
153
- font-family: var(--font-family-headline);
154
- font-size: 2rem;
155
- font-weight: 900;
156
- letter-spacing: -0.04em;
157
- line-height: 1;
158
- text-transform: uppercase;
153
+ color: var(--color-primary-container);
154
+ font-family: var(--font-family-headline);
155
+ font-size: 2rem;
156
+ font-weight: 900;
157
+ letter-spacing: -0.04em;
158
+ line-height: 1;
159
+ text-transform: uppercase;
160
+ word-break: break-all;
159
161
  }
160
162
 
161
163
  .structure-graph__subtitle {
162
- color: rgba(231, 223, 189, 0.62);
163
- font-family: var(--font-family-mono);
164
- font-size: 0.625rem;
165
- letter-spacing: 0.18em;
166
- text-transform: uppercase;
164
+ color: rgba(231, 223, 189, 0.62);
165
+ font-family: var(--font-family-mono);
166
+ font-size: 0.625rem;
167
+ letter-spacing: 0.18em;
168
+ text-transform: uppercase;
167
169
  }
168
170
 
169
171
  .structure-graph__summary {
170
- display: grid;
171
- gap: 0.75rem;
172
- grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
172
+ display: grid;
173
+ gap: 0.75rem;
174
+ grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
173
175
  }
174
176
 
175
177
  .structure-graph__summary-card {
176
- background: rgba(15, 15, 13, 0.94);
177
- border: 1px solid rgba(138, 123, 52, 0.26);
178
- display: flex;
179
- align-items: center;
180
- justify-content: space-between;
181
- gap: 0.75rem;
182
- min-height: 0;
183
- padding: 0.625rem 0.75rem;
178
+ background: rgba(15, 15, 13, 0.94);
179
+ border: 1px solid rgba(138, 123, 52, 0.26);
180
+ display: flex;
181
+ align-items: center;
182
+ justify-content: space-between;
183
+ gap: 0.75rem;
184
+ min-height: 0;
185
+ padding: 0.625rem 0.75rem;
184
186
  }
185
187
 
186
188
  .structure-graph__summary-label {
187
- color: rgba(231, 223, 189, 0.52);
188
- flex: 1;
189
- font-family: var(--font-family-mono);
190
- font-size: 0.5625rem;
191
- letter-spacing: 0.18em;
192
- text-transform: uppercase;
189
+ color: rgba(231, 223, 189, 0.52);
190
+ flex: 1;
191
+ font-family: var(--font-family-mono);
192
+ font-size: 0.5625rem;
193
+ letter-spacing: 0.18em;
194
+ text-transform: uppercase;
193
195
  }
194
196
 
195
197
  .structure-graph__summary-value {
196
- color: var(--color-primary-container);
197
- flex: 0 0 auto;
198
- font-family: var(--font-family-mono);
199
- font-size: 0.6875rem;
200
- font-weight: 700;
201
- letter-spacing: 0.14em;
202
- text-transform: uppercase;
198
+ color: var(--color-primary-container);
199
+ flex: 0 0 auto;
200
+ font-family: var(--font-family-mono);
201
+ font-size: 0.6875rem;
202
+ font-weight: 700;
203
+ letter-spacing: 0.14em;
204
+ text-transform: uppercase;
203
205
  }
204
206
 
205
207
  .structure-graph__section {
206
- background: rgba(15, 15, 13, 0.84);
207
- border: 1px solid rgba(138, 123, 52, 0.22);
208
- display: flex;
209
- flex-direction: column;
210
- gap: 0.875rem;
211
- padding: 1rem;
208
+ background: rgba(15, 15, 13, 0.84);
209
+ border: 1px solid rgba(138, 123, 52, 0.22);
210
+ display: flex;
211
+ flex-direction: column;
212
+ gap: 0.875rem;
213
+ padding: 1rem;
212
214
  }
213
215
 
214
216
  .structure-graph__section-title {
215
- color: var(--color-primary-container);
216
- font-family: var(--font-family-mono);
217
- font-size: 0.625rem;
218
- font-weight: 700;
219
- letter-spacing: 0.18em;
220
- text-transform: uppercase;
217
+ color: var(--color-primary-container);
218
+ font-family: var(--font-family-mono);
219
+ font-size: 0.625rem;
220
+ font-weight: 700;
221
+ letter-spacing: 0.18em;
222
+ text-transform: uppercase;
221
223
  }
222
224
 
223
225
  .structure-graph__section-header {
224
- align-items: center;
225
- display: flex;
226
- gap: 0.75rem;
227
- justify-content: space-between;
226
+ align-items: center;
227
+ display: flex;
228
+ gap: 0.75rem;
229
+ justify-content: space-between;
228
230
  }
229
231
 
230
232
  .structure-graph__column-list {
231
- display: flex;
232
- flex-direction: column;
233
- gap: 0.625rem;
233
+ display: flex;
234
+ flex-direction: column;
235
+ gap: 0.625rem;
234
236
  }
235
237
 
236
238
  .structure-graph__column-row {
237
- align-items: flex-start;
238
- display: grid;
239
- gap: 0.75rem;
240
- grid-template-columns: minmax(0, 1fr) auto;
239
+ align-items: flex-start;
240
+ display: grid;
241
+ gap: 0.75rem;
242
+ grid-template-columns: minmax(0, 1fr) auto;
241
243
  }
242
244
 
243
245
  .structure-graph__column-name {
244
- color: var(--color-on-surface);
245
- font-family: var(--font-family-mono);
246
- font-size: 0.75rem;
247
- min-width: 0;
248
- overflow-wrap: anywhere;
246
+ color: var(--color-on-surface);
247
+ font-family: var(--font-family-mono);
248
+ font-size: 0.75rem;
249
+ min-width: 0;
250
+ overflow-wrap: anywhere;
249
251
  }
250
252
 
251
253
  .structure-graph__column-type {
252
- color: rgba(231, 223, 189, 0.58);
253
- font-family: var(--font-family-mono);
254
- font-size: 0.625rem;
255
- letter-spacing: 0.14em;
256
- text-transform: uppercase;
254
+ color: rgba(231, 223, 189, 0.58);
255
+ font-family: var(--font-family-mono);
256
+ font-size: 0.625rem;
257
+ letter-spacing: 0.14em;
258
+ text-transform: uppercase;
257
259
  }
258
260
 
259
261
  .structure-graph__column-flags {
260
- display: flex;
261
- flex-wrap: wrap;
262
- gap: 0.375rem;
263
- justify-content: flex-end;
262
+ display: flex;
263
+ flex-wrap: wrap;
264
+ gap: 0.375rem;
265
+ justify-content: flex-end;
264
266
  }
265
267
 
266
268
  .structure-graph__flag {
267
- background: rgba(39, 38, 34, 0.94);
268
- border: 1px solid rgba(138, 123, 52, 0.24);
269
- color: rgba(244, 239, 232, 0.82);
270
- font-family: var(--font-family-mono);
271
- font-size: 0.5625rem;
272
- letter-spacing: 0.14em;
273
- padding: 0.125rem 0.375rem;
274
- text-transform: uppercase;
269
+ background: rgba(39, 38, 34, 0.94);
270
+ border: 1px solid rgba(138, 123, 52, 0.24);
271
+ color: rgba(244, 239, 232, 0.82);
272
+ font-family: var(--font-family-mono);
273
+ font-size: 0.5625rem;
274
+ letter-spacing: 0.14em;
275
+ padding: 0.125rem 0.375rem;
276
+ text-transform: uppercase;
275
277
  }
276
278
 
277
279
  .structure-graph__flag.is-key {
278
- background: var(--primary-alpha-18);
279
- border-color: rgb(var(--rgb-primary) / 0.34);
280
- color: #fff6ae;
280
+ background: var(--primary-alpha-18);
281
+ border-color: rgb(var(--rgb-primary) / 0.34);
282
+ color: #fff6ae;
281
283
  }
282
284
 
283
285
  .structure-graph__flag.is-link {
284
- background: rgba(45, 250, 255, 0.14);
285
- border-color: rgba(45, 250, 255, 0.28);
286
- color: #9ffcff;
286
+ background: rgba(45, 250, 255, 0.14);
287
+ border-color: rgba(45, 250, 255, 0.28);
288
+ color: #9ffcff;
287
289
  }
288
290
 
289
291
  .structure-graph__flag.is-nullable {
290
- color: rgba(231, 223, 189, 0.58);
292
+ color: rgba(231, 223, 189, 0.58);
291
293
  }
292
294
 
293
295
  .structure-graph__list {
294
- display: flex;
295
- flex-direction: column;
296
- gap: 0.5rem;
296
+ display: flex;
297
+ flex-direction: column;
298
+ gap: 0.5rem;
297
299
  }
298
300
 
299
301
  .structure-graph__list-item {
300
- align-items: center;
301
- color: rgb(var(--rgb-on-surface) / 0.82);
302
- display: flex;
303
- justify-content: space-between;
304
- gap: 0.75rem;
302
+ align-items: center;
303
+ color: rgb(var(--rgb-on-surface) / 0.82);
304
+ display: flex;
305
+ justify-content: space-between;
306
+ gap: 0.75rem;
305
307
  }
306
308
 
307
309
  .structure-graph__list-item-label {
308
- color: rgba(231, 223, 189, 0.62);
309
- font-family: var(--font-family-mono);
310
- font-size: 0.625rem;
311
- letter-spacing: 0.14em;
312
- text-transform: uppercase;
310
+ color: rgba(231, 223, 189, 0.62);
311
+ font-family: var(--font-family-mono);
312
+ font-size: 0.625rem;
313
+ letter-spacing: 0.14em;
314
+ text-transform: uppercase;
313
315
  }
314
316
 
315
317
  .structure-graph__ddl {
316
- color: rgba(244, 239, 232, 0.78);
317
- font-family: var(--font-family-mono);
318
- font-size: 0.6875rem;
319
- line-height: 1.65;
320
- margin: 0;
321
- max-height: 18rem;
322
- overflow: auto;
323
- white-space: pre-wrap;
318
+ color: rgba(244, 239, 232, 0.78);
319
+ font-family: var(--font-family-mono);
320
+ font-size: 0.6875rem;
321
+ line-height: 1.65;
322
+ margin: 0;
323
+ max-height: 18rem;
324
+ overflow: auto;
325
+ white-space: pre-wrap;
324
326
  }
325
327
 
326
328
  .structure-entry--graph-active {
327
- border-color: rgb(var(--rgb-primary) / 0.44);
328
- box-shadow: inset 0 0 0 1px var(--primary-alpha-18);
329
+ border-color: rgb(var(--rgb-primary) / 0.44);
330
+ box-shadow: inset 0 0 0 1px var(--primary-alpha-18);
329
331
  }
330
332
 
331
333
  .structure-entry--graph-related {
332
- border-color: rgba(45, 250, 255, 0.34);
334
+ border-color: rgba(45, 250, 255, 0.34);
333
335
  }
334
336
 
335
337
  @media (max-width: 1279px) {
336
- .structure-graph__workspace {
337
- grid-template-columns: minmax(0, 1fr);
338
- grid-template-rows: minmax(28rem, 1fr) auto;
339
- }
340
-
341
- .structure-graph__inspector {
342
- border-left: 0;
343
- border-top: 1px solid var(--border-medium);
344
- max-height: 28rem;
345
- }
338
+ .structure-graph__workspace {
339
+ grid-template-columns: minmax(0, 1fr);
340
+ grid-template-rows: minmax(28rem, 1fr) auto;
341
+ }
342
+
343
+ .structure-graph__inspector {
344
+ border-left: 0;
345
+ border-top: 1px solid var(--border-medium);
346
+ max-height: 28rem;
347
+ }
346
348
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqlite-hub",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "description": "SQLite-only local management app backend and SPA shell",
5
5
  "main": "server/server.js",
6
6
  "bin": {