dbwatcher 1.0.0 → 1.1.1

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +81 -210
  3. data/app/assets/config/dbwatcher_manifest.js +15 -0
  4. data/app/assets/javascripts/dbwatcher/alpine_registrations.js +39 -0
  5. data/app/assets/javascripts/dbwatcher/auto_init.js +23 -0
  6. data/app/assets/javascripts/dbwatcher/components/base.js +141 -0
  7. data/app/assets/javascripts/dbwatcher/components/changes_table_hybrid.js +1008 -0
  8. data/app/assets/javascripts/dbwatcher/components/diagrams.js +449 -0
  9. data/app/assets/javascripts/dbwatcher/components/summary.js +234 -0
  10. data/app/assets/javascripts/dbwatcher/core/alpine_store.js +138 -0
  11. data/app/assets/javascripts/dbwatcher/core/api_client.js +162 -0
  12. data/app/assets/javascripts/dbwatcher/core/component_loader.js +70 -0
  13. data/app/assets/javascripts/dbwatcher/core/component_registry.js +94 -0
  14. data/app/assets/javascripts/dbwatcher/dbwatcher.js +120 -0
  15. data/app/assets/javascripts/dbwatcher/services/mermaid.js +315 -0
  16. data/app/assets/javascripts/dbwatcher/services/mermaid_service.js +199 -0
  17. data/app/assets/javascripts/dbwatcher/vendor/date-fns-browser.js +99 -0
  18. data/app/assets/javascripts/dbwatcher/vendor/lodash.min.js +140 -0
  19. data/app/assets/javascripts/dbwatcher/vendor/tabulator.min.js +3 -0
  20. data/app/assets/stylesheets/dbwatcher/application.css +423 -0
  21. data/app/assets/stylesheets/dbwatcher/application.scss +15 -0
  22. data/app/assets/stylesheets/dbwatcher/components/_badges.scss +38 -0
  23. data/app/assets/stylesheets/dbwatcher/components/_compact_table.scss +162 -0
  24. data/app/assets/stylesheets/dbwatcher/components/_diagrams.scss +51 -0
  25. data/app/assets/stylesheets/dbwatcher/components/_forms.scss +27 -0
  26. data/app/assets/stylesheets/dbwatcher/components/_navigation.scss +55 -0
  27. data/app/assets/stylesheets/dbwatcher/core/_base.scss +34 -0
  28. data/app/assets/stylesheets/dbwatcher/core/_variables.scss +47 -0
  29. data/app/assets/stylesheets/dbwatcher/vendor/tabulator.min.css +2 -0
  30. data/app/controllers/dbwatcher/api/v1/sessions_controller.rb +64 -0
  31. data/app/controllers/dbwatcher/base_controller.rb +8 -2
  32. data/app/controllers/dbwatcher/dashboard_controller.rb +8 -0
  33. data/app/controllers/dbwatcher/sessions_controller.rb +25 -10
  34. data/app/helpers/dbwatcher/component_helper.rb +29 -0
  35. data/app/helpers/dbwatcher/diagram_helper.rb +110 -0
  36. data/app/helpers/dbwatcher/session_helper.rb +3 -2
  37. data/app/views/dbwatcher/sessions/_changes_tab.html.erb +265 -0
  38. data/app/views/dbwatcher/sessions/_diagrams_tab.html.erb +166 -0
  39. data/app/views/dbwatcher/sessions/_session_header.html.erb +11 -0
  40. data/app/views/dbwatcher/sessions/_summary_tab.html.erb +88 -0
  41. data/app/views/dbwatcher/sessions/_tab_navigation.html.erb +12 -0
  42. data/app/views/dbwatcher/sessions/changes.html.erb +21 -0
  43. data/app/views/dbwatcher/sessions/components/changes/_filters.html.erb +44 -0
  44. data/app/views/dbwatcher/sessions/components/changes/_table_list.html.erb +96 -0
  45. data/app/views/dbwatcher/sessions/diagrams.html.erb +21 -0
  46. data/app/views/dbwatcher/sessions/index.html.erb +14 -10
  47. data/app/views/dbwatcher/sessions/shared/_layout.html.erb +8 -0
  48. data/app/views/dbwatcher/sessions/shared/_navigation.html.erb +35 -0
  49. data/app/views/dbwatcher/sessions/shared/_session_header.html.erb +25 -0
  50. data/app/views/dbwatcher/sessions/show.html.erb +3 -346
  51. data/app/views/dbwatcher/sessions/summary.html.erb +21 -0
  52. data/app/views/layouts/dbwatcher/application.html.erb +125 -247
  53. data/bin/compile_scss +49 -0
  54. data/config/routes.rb +26 -0
  55. data/lib/dbwatcher/configuration.rb +102 -8
  56. data/lib/dbwatcher/engine.rb +17 -7
  57. data/lib/dbwatcher/services/analyzers/session_data_processor.rb +98 -0
  58. data/lib/dbwatcher/services/analyzers/table_summary_builder.rb +202 -0
  59. data/lib/dbwatcher/services/api/base_api_service.rb +100 -0
  60. data/lib/dbwatcher/services/api/changes_data_service.rb +112 -0
  61. data/lib/dbwatcher/services/api/diagram_data_service.rb +145 -0
  62. data/lib/dbwatcher/services/api/summary_data_service.rb +158 -0
  63. data/lib/dbwatcher/services/base_service.rb +64 -0
  64. data/lib/dbwatcher/services/diagram_analyzers/base_analyzer.rb +162 -0
  65. data/lib/dbwatcher/services/diagram_analyzers/foreign_key_analyzer.rb +354 -0
  66. data/lib/dbwatcher/services/diagram_analyzers/inferred_relationship_analyzer.rb +502 -0
  67. data/lib/dbwatcher/services/diagram_analyzers/model_association_analyzer.rb +603 -0
  68. data/lib/dbwatcher/services/diagram_data/attribute.rb +154 -0
  69. data/lib/dbwatcher/services/diagram_data/dataset.rb +280 -0
  70. data/lib/dbwatcher/services/diagram_data/entity.rb +180 -0
  71. data/lib/dbwatcher/services/diagram_data/relationship.rb +188 -0
  72. data/lib/dbwatcher/services/diagram_data/relationship_params.rb +55 -0
  73. data/lib/dbwatcher/services/diagram_data.rb +65 -0
  74. data/lib/dbwatcher/services/diagram_error_handler.rb +239 -0
  75. data/lib/dbwatcher/services/diagram_generator.rb +154 -0
  76. data/lib/dbwatcher/services/diagram_strategies/base_diagram_strategy.rb +149 -0
  77. data/lib/dbwatcher/services/diagram_strategies/class_diagram_strategy.rb +49 -0
  78. data/lib/dbwatcher/services/diagram_strategies/erd_diagram_strategy.rb +52 -0
  79. data/lib/dbwatcher/services/diagram_strategies/flowchart_diagram_strategy.rb +52 -0
  80. data/lib/dbwatcher/services/diagram_system.rb +69 -0
  81. data/lib/dbwatcher/services/diagram_type_registry.rb +164 -0
  82. data/lib/dbwatcher/services/mermaid_syntax/base_builder.rb +127 -0
  83. data/lib/dbwatcher/services/mermaid_syntax/cardinality_mapper.rb +90 -0
  84. data/lib/dbwatcher/services/mermaid_syntax/class_diagram_builder.rb +140 -0
  85. data/lib/dbwatcher/services/mermaid_syntax/class_diagram_helper.rb +48 -0
  86. data/lib/dbwatcher/services/mermaid_syntax/erd_builder.rb +116 -0
  87. data/lib/dbwatcher/services/mermaid_syntax/flowchart_builder.rb +109 -0
  88. data/lib/dbwatcher/services/mermaid_syntax/sanitizer.rb +118 -0
  89. data/lib/dbwatcher/services/mermaid_syntax_builder.rb +155 -0
  90. data/lib/dbwatcher/storage/api/concerns/table_analyzer.rb +15 -128
  91. data/lib/dbwatcher/storage/api/session_api.rb +47 -0
  92. data/lib/dbwatcher/storage/base_storage.rb +7 -0
  93. data/lib/dbwatcher/version.rb +1 -1
  94. data/lib/dbwatcher.rb +58 -1
  95. metadata +94 -2
@@ -0,0 +1,423 @@
1
+ /**
2
+ * DBWatcher Application Styles
3
+ * Compiled CSS for all components
4
+ * Generated at 2025-07-04 17:05:33 +0700
5
+ */
6
+
7
+ /**
8
+ * DBWatcher Application Styles
9
+ * Main stylesheet that imports all components
10
+ */
11
+ /**
12
+ * DBWatcher CSS Variables
13
+ * Core color scheme and layout dimensions
14
+ */
15
+ :root {
16
+ /* Brand colors */
17
+ --navy-dark: #00285D;
18
+ --blue-light: #96C1E7;
19
+ --blue-medium: #6CADDF;
20
+ --gold-dark: #D4A11E;
21
+ --gold-light: #FFC758;
22
+ /* Layout dimensions for diagram container */
23
+ --header-height: 64px;
24
+ --tab-bar-height: 32px;
25
+ --toolbar-height: 56px;
26
+ --footer-height: 0px;
27
+ /* Gray scale */
28
+ --gray-50: #f9fafb;
29
+ --gray-100: #f3f3f3;
30
+ --gray-200: #e8e8e8;
31
+ --gray-300: #d1d5db;
32
+ --gray-400: #c8c8c8;
33
+ --gray-500: #6b7280;
34
+ --gray-600: #4b5563;
35
+ --gray-700: #374151;
36
+ --gray-800: #1f2937;
37
+ --gray-900: #111827;
38
+ /* Border colors */
39
+ --border-light: #f0f0f0;
40
+ --border-medium: #e8e8e8;
41
+ --border-dark: #d1d5db;
42
+ /* Status colors */
43
+ --status-insert: #10b981;
44
+ --status-update: #6CADDF;
45
+ --status-delete: #ef4444;
46
+ --status-select: #6b7280;
47
+ /* Highlight colors */
48
+ --highlight-change: rgba(255, 199, 88, 0.3);
49
+ --highlight-new: rgba(16, 185, 129, 0.2);
50
+ --highlight-deleted: rgba(239, 68, 68, 0.2);
51
+ }
52
+
53
+ /**
54
+ * Base Styles
55
+ * Scrollbars, splitters, and utility styles
56
+ */
57
+ /* Splitter */
58
+ .splitter {
59
+ width: 4px;
60
+ background: var(--border-medium);
61
+ cursor: col-resize;
62
+ }
63
+
64
+ .splitter:hover {
65
+ background: var(--blue-medium);
66
+ }
67
+
68
+ /* Scrollbar styling */
69
+ ::-webkit-scrollbar {
70
+ width: 8px;
71
+ height: 8px;
72
+ }
73
+
74
+ ::-webkit-scrollbar-track {
75
+ background: var(--gray-100);
76
+ }
77
+
78
+ ::-webkit-scrollbar-thumb {
79
+ background: var(--gray-400);
80
+ border-radius: 4px;
81
+ }
82
+
83
+ ::-webkit-scrollbar-thumb:hover {
84
+ background: var(--blue-medium);
85
+ }
86
+
87
+ /**
88
+ * Compact Table Styles
89
+ * Core table styling for DBWatcher data tables
90
+ */
91
+ .compact-table {
92
+ font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
93
+ font-size: 12px;
94
+ line-height: 1.2;
95
+ width: 100%;
96
+ border-collapse: separate;
97
+ border-spacing: 0;
98
+ }
99
+
100
+ .compact-table th {
101
+ padding: 4px 8px;
102
+ font-weight: 500;
103
+ text-transform: none;
104
+ font-size: 11px;
105
+ background: var(--gray-100);
106
+ border-bottom: 2px solid var(--border-medium);
107
+ border-right: 1px solid var(--border-medium);
108
+ position: sticky;
109
+ top: 0;
110
+ z-index: 10;
111
+ text-align: left;
112
+ height: 32px;
113
+ }
114
+
115
+ /* Enhanced sticky header styling */
116
+ .compact-table th.sticky-left-0 {
117
+ position: sticky;
118
+ left: 0;
119
+ z-index: 20;
120
+ box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.05);
121
+ }
122
+
123
+ .compact-table th.sticky-left-1 {
124
+ position: sticky;
125
+ left: 60px;
126
+ /* Width of Index column */
127
+ z-index: 19;
128
+ box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.05);
129
+ }
130
+
131
+ .compact-table th.sticky-left-2 {
132
+ position: sticky;
133
+ left: 108px;
134
+ /* Width of Index + Op columns (60px + 48px) */
135
+ z-index: 18;
136
+ box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.05);
137
+ }
138
+
139
+ .compact-table td {
140
+ padding: 2px 8px;
141
+ border-right: 1px solid var(--border-light);
142
+ border-bottom: 1px solid var(--border-light);
143
+ overflow: hidden;
144
+ text-overflow: ellipsis;
145
+ white-space: nowrap;
146
+ vertical-align: top;
147
+ }
148
+
149
+ /* Enhanced sticky cell styling */
150
+ .compact-table td.sticky-left-0 {
151
+ position: sticky;
152
+ left: 0;
153
+ background: white;
154
+ z-index: 5;
155
+ box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.05);
156
+ }
157
+
158
+ .compact-table td.sticky-left-1 {
159
+ position: sticky;
160
+ left: 60px;
161
+ /* Width of Index column */
162
+ background: white;
163
+ z-index: 4;
164
+ box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.05);
165
+ }
166
+
167
+ .compact-table td.sticky-left-2 {
168
+ position: sticky;
169
+ left: 108px;
170
+ /* Width of Index + Op columns (60px + 48px) */
171
+ background: white;
172
+ z-index: 3;
173
+ box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.05);
174
+ }
175
+
176
+ /* Special cell formatting */
177
+ .compact-table td.highlight-change {
178
+ background-color: var(--highlight-change);
179
+ }
180
+
181
+ .compact-table td.highlight-new {
182
+ color: #047857;
183
+ }
184
+
185
+ .compact-table td.highlight-deleted {
186
+ color: #b91c1c;
187
+ }
188
+
189
+ /* Row styles */
190
+ .compact-table tr:hover td:not(.sticky-left-0):not(.sticky-left-1):not(.sticky-left-2) {
191
+ background-color: rgba(243, 244, 246, 0.7);
192
+ }
193
+
194
+ .compact-table tr:hover td.sticky-left-0,
195
+ .compact-table tr:hover td.sticky-left-1,
196
+ .compact-table tr:hover td.sticky-left-2 {
197
+ background-color: var(--gray-50);
198
+ }
199
+
200
+ .compact-table tr.selected td:not(.sticky-left-0):not(.sticky-left-1):not(.sticky-left-2) {
201
+ background-color: rgba(230, 243, 255, 0.7);
202
+ }
203
+
204
+ .compact-table tr.selected td.sticky-left-0,
205
+ .compact-table tr.selected td.sticky-left-1,
206
+ .compact-table tr.selected td.sticky-left-2 {
207
+ background-color: #e6f3ff;
208
+ }
209
+
210
+ /* Smart column width distribution */
211
+ .compact-table th,
212
+ .compact-table td {
213
+ overflow: hidden;
214
+ text-overflow: ellipsis;
215
+ white-space: nowrap;
216
+ }
217
+
218
+ /* Fixed widths for sticky columns only */
219
+ .compact-table th:first-child,
220
+ .compact-table td:first-child {
221
+ width: 60px;
222
+ min-width: 60px;
223
+ max-width: 60px;
224
+ }
225
+
226
+ .compact-table th:nth-child(2),
227
+ .compact-table td:nth-child(2) {
228
+ width: 48px;
229
+ min-width: 48px;
230
+ max-width: 48px;
231
+ text-align: center;
232
+ }
233
+
234
+ .compact-table th:nth-child(3),
235
+ .compact-table td:nth-child(3) {
236
+ width: 160px;
237
+ min-width: 160px;
238
+ max-width: 160px;
239
+ font-family: monospace;
240
+ font-size: 11px;
241
+ }
242
+
243
+ /* Font styling for specific column types */
244
+ .compact-table .text-right {
245
+ font-family: monospace;
246
+ }
247
+
248
+ /* Highlight colors */
249
+ .highlight-change {
250
+ background: var(--highlight-change);
251
+ }
252
+
253
+ .highlight-new {
254
+ background: var(--highlight-new);
255
+ }
256
+
257
+ .highlight-deleted {
258
+ background: var(--highlight-deleted);
259
+ }
260
+
261
+ /**
262
+ * Navigation Styles
263
+ * Sidebar, tabs, and navigation controls
264
+ */
265
+ /* Sidebar styles */
266
+ .sidebar-item {
267
+ font-size: 13px;
268
+ padding: 6px 12px;
269
+ display: flex;
270
+ align-items: center;
271
+ gap: 8px;
272
+ border-radius: 3px;
273
+ transition: all 0.15s;
274
+ }
275
+
276
+ .sidebar-item:hover {
277
+ background: rgba(108, 173, 223, 0.1);
278
+ color: var(--blue-medium);
279
+ }
280
+
281
+ .sidebar-item.active {
282
+ background: var(--navy-dark);
283
+ color: white;
284
+ }
285
+
286
+ /* Tab styles */
287
+ .tab-bar {
288
+ background: var(--gray-100);
289
+ border-bottom: 1px solid var(--border-medium);
290
+ display: flex;
291
+ align-items: center;
292
+ height: 32px;
293
+ font-size: 12px;
294
+ }
295
+
296
+ .tab-item {
297
+ padding: 0 16px;
298
+ height: 100%;
299
+ display: flex;
300
+ align-items: center;
301
+ border-right: 1px solid var(--border-medium);
302
+ cursor: pointer;
303
+ transition: all 0.15s;
304
+ }
305
+
306
+ .tab-item:hover {
307
+ background: var(--border-medium);
308
+ }
309
+
310
+ .tab-item.active {
311
+ background: white;
312
+ color: var(--navy-dark);
313
+ font-weight: 500;
314
+ }
315
+
316
+ /**
317
+ * Form Controls
318
+ * Input fields, selects, buttons
319
+ */
320
+ /* Compact form controls */
321
+ .compact-input {
322
+ padding: 3px 8px;
323
+ font-size: 12px;
324
+ border: 1px solid var(--border-dark);
325
+ border-radius: 3px;
326
+ }
327
+
328
+ .compact-select {
329
+ padding: 3px 24px 3px 8px;
330
+ font-size: 12px;
331
+ border: 1px solid var(--border-dark);
332
+ border-radius: 3px;
333
+ background-size: 16px;
334
+ }
335
+
336
+ .compact-button {
337
+ padding: 4px 12px;
338
+ font-size: 12px;
339
+ border-radius: 3px;
340
+ font-weight: 500;
341
+ }
342
+
343
+ /**
344
+ * Status Badges
345
+ * Operation and status indicators
346
+ */
347
+ /* Status badges */
348
+ .badge-insert {
349
+ background: var(--status-insert);
350
+ color: white;
351
+ }
352
+
353
+ .badge-update {
354
+ background: var(--status-update);
355
+ color: white;
356
+ }
357
+
358
+ .badge-delete {
359
+ background: var(--status-delete);
360
+ color: white;
361
+ }
362
+
363
+ .badge-select {
364
+ background: var(--status-select);
365
+ color: white;
366
+ }
367
+
368
+ .badge {
369
+ padding: 1px 6px;
370
+ font-size: 10px;
371
+ border-radius: 3px;
372
+ font-weight: 500;
373
+ text-transform: uppercase;
374
+ display: inline-block;
375
+ width: 18px;
376
+ height: 18px;
377
+ line-height: 18px;
378
+ text-align: center;
379
+ }
380
+
381
+ /**
382
+ * Diagram Component Styles
383
+ */
384
+ .diagram-code-view {
385
+ position: relative;
386
+ height: 100%;
387
+ }
388
+
389
+ .diagram-code-view pre {
390
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
391
+ tab-size: 2;
392
+ }
393
+
394
+ .diagram-code-view pre.large-content {
395
+ max-height: calc(100vh - 220px);
396
+ overflow-y: auto;
397
+ border-width: 1px;
398
+ border-color: theme("colors.gray.300");
399
+ }
400
+
401
+ [x-ref="diagramContainer"] .mermaid {
402
+ overflow: auto;
403
+ max-height: calc(100vh - 180px);
404
+ }
405
+
406
+ pre[x-ref="codeContainer"]::-webkit-scrollbar {
407
+ width: 8px;
408
+ height: 8px;
409
+ }
410
+
411
+ pre[x-ref="codeContainer"]::-webkit-scrollbar-track {
412
+ background: theme("colors.gray.100");
413
+ border-radius: 4px;
414
+ }
415
+
416
+ pre[x-ref="codeContainer"]::-webkit-scrollbar-thumb {
417
+ background: theme("colors.gray.400");
418
+ border-radius: 4px;
419
+ }
420
+
421
+ pre[x-ref="codeContainer"]::-webkit-scrollbar-thumb:hover {
422
+ background: theme("colors.gray.500");
423
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * DBWatcher Application Styles
3
+ * Main stylesheet that imports all components
4
+ */
5
+
6
+ // Core styles
7
+ @import "core/variables";
8
+ @import "core/base";
9
+
10
+ // Component styles
11
+ @import "components/compact_table";
12
+ @import "components/navigation";
13
+ @import "components/forms";
14
+ @import "components/badges";
15
+ @import "components/diagrams";
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Status Badges
3
+ * Operation and status indicators
4
+ */
5
+
6
+ /* Status badges */
7
+ .badge-insert {
8
+ background: var(--status-insert);
9
+ color: white;
10
+ }
11
+
12
+ .badge-update {
13
+ background: var(--status-update);
14
+ color: white;
15
+ }
16
+
17
+ .badge-delete {
18
+ background: var(--status-delete);
19
+ color: white;
20
+ }
21
+
22
+ .badge-select {
23
+ background: var(--status-select);
24
+ color: white;
25
+ }
26
+
27
+ .badge {
28
+ padding: 1px 6px;
29
+ font-size: 10px;
30
+ border-radius: 3px;
31
+ font-weight: 500;
32
+ text-transform: uppercase;
33
+ display: inline-block;
34
+ width: 18px;
35
+ height: 18px;
36
+ line-height: 18px;
37
+ text-align: center;
38
+ }
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Compact Table Styles
3
+ * Core table styling for DBWatcher data tables
4
+ */
5
+
6
+ .compact-table {
7
+ font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
8
+ font-size: 12px;
9
+ line-height: 1.2;
10
+ width: 100%;
11
+ border-collapse: separate;
12
+ border-spacing: 0;
13
+ }
14
+
15
+ .compact-table th {
16
+ padding: 4px 8px;
17
+ font-weight: 500;
18
+ text-transform: none;
19
+ font-size: 11px;
20
+ background: var(--gray-100);
21
+ border-bottom: 2px solid var(--border-medium);
22
+ border-right: 1px solid var(--border-medium);
23
+ position: sticky;
24
+ top: 0;
25
+ z-index: 10;
26
+ text-align: left;
27
+ height: 32px;
28
+ }
29
+
30
+ /* Enhanced sticky header styling */
31
+ .compact-table th.sticky-left-0 {
32
+ position: sticky;
33
+ left: 0;
34
+ z-index: 20;
35
+ box-shadow: 2px 0px 3px rgba(0,0,0,0.05);
36
+ }
37
+
38
+ .compact-table th.sticky-left-1 {
39
+ position: sticky;
40
+ left: 60px; /* Width of Index column */
41
+ z-index: 19;
42
+ box-shadow: 2px 0px 3px rgba(0,0,0,0.05);
43
+ }
44
+
45
+ .compact-table th.sticky-left-2 {
46
+ position: sticky;
47
+ left: 108px; /* Width of Index + Op columns (60px + 48px) */
48
+ z-index: 18;
49
+ box-shadow: 2px 0px 3px rgba(0,0,0,0.05);
50
+ }
51
+
52
+ .compact-table td {
53
+ padding: 2px 8px;
54
+ border-right: 1px solid var(--border-light);
55
+ border-bottom: 1px solid var(--border-light);
56
+ overflow: hidden;
57
+ text-overflow: ellipsis;
58
+ white-space: nowrap;
59
+ vertical-align: top;
60
+ }
61
+
62
+ /* Enhanced sticky cell styling */
63
+ .compact-table td.sticky-left-0 {
64
+ position: sticky;
65
+ left: 0;
66
+ background: white;
67
+ z-index: 5;
68
+ box-shadow: 2px 0px 3px rgba(0,0,0,0.05);
69
+ }
70
+
71
+ .compact-table td.sticky-left-1 {
72
+ position: sticky;
73
+ left: 60px; /* Width of Index column */
74
+ background: white;
75
+ z-index: 4;
76
+ box-shadow: 2px 0px 3px rgba(0,0,0,0.05);
77
+ }
78
+
79
+ .compact-table td.sticky-left-2 {
80
+ position: sticky;
81
+ left: 108px; /* Width of Index + Op columns (60px + 48px) */
82
+ background: white;
83
+ z-index: 3;
84
+ box-shadow: 2px 0px 3px rgba(0,0,0,0.05);
85
+ }
86
+
87
+ /* Special cell formatting */
88
+ .compact-table td.highlight-change {
89
+ background-color: var(--highlight-change);
90
+ }
91
+
92
+ .compact-table td.highlight-new {
93
+ color: #047857;
94
+ }
95
+
96
+ .compact-table td.highlight-deleted {
97
+ color: #b91c1c;
98
+ }
99
+
100
+ /* Row styles */
101
+ .compact-table tr:hover td:not(.sticky-left-0):not(.sticky-left-1):not(.sticky-left-2) {
102
+ background-color: rgba(243, 244, 246, 0.7);
103
+ }
104
+
105
+ .compact-table tr:hover td.sticky-left-0,
106
+ .compact-table tr:hover td.sticky-left-1,
107
+ .compact-table tr:hover td.sticky-left-2 {
108
+ background-color: var(--gray-50);
109
+ }
110
+
111
+ .compact-table tr.selected td:not(.sticky-left-0):not(.sticky-left-1):not(.sticky-left-2) {
112
+ background-color: rgba(230, 243, 255, 0.7);
113
+ }
114
+
115
+ .compact-table tr.selected td.sticky-left-0,
116
+ .compact-table tr.selected td.sticky-left-1,
117
+ .compact-table tr.selected td.sticky-left-2 {
118
+ background-color: #e6f3ff;
119
+ }
120
+
121
+ /* Smart column width distribution */
122
+ .compact-table th,
123
+ .compact-table td {
124
+ overflow: hidden;
125
+ text-overflow: ellipsis;
126
+ white-space: nowrap;
127
+ }
128
+
129
+ /* Fixed widths for sticky columns only */
130
+ .compact-table th:first-child,
131
+ .compact-table td:first-child {
132
+ width: 60px;
133
+ min-width: 60px;
134
+ max-width: 60px;
135
+ }
136
+
137
+ .compact-table th:nth-child(2),
138
+ .compact-table td:nth-child(2) {
139
+ width: 48px;
140
+ min-width: 48px;
141
+ max-width: 48px;
142
+ text-align: center;
143
+ }
144
+
145
+ .compact-table th:nth-child(3),
146
+ .compact-table td:nth-child(3) {
147
+ width: 160px;
148
+ min-width: 160px;
149
+ max-width: 160px;
150
+ font-family: monospace;
151
+ font-size: 11px;
152
+ }
153
+
154
+ /* Font styling for specific column types */
155
+ .compact-table .text-right {
156
+ font-family: monospace;
157
+ }
158
+
159
+ /* Highlight colors */
160
+ .highlight-change { background: var(--highlight-change); }
161
+ .highlight-new { background: var(--highlight-new); }
162
+ .highlight-deleted { background: var(--highlight-deleted); }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Diagram Component Styles
3
+ */
4
+
5
+ // Code view styles
6
+ .diagram-code-view {
7
+ position: relative;
8
+ height: 100%;
9
+
10
+ pre {
11
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
12
+ tab-size: 2;
13
+
14
+ &.large-content {
15
+ max-height: calc(100vh - 220px);
16
+ overflow-y: auto;
17
+ border-width: 1px;
18
+ border-color: theme('colors.gray.300');
19
+ }
20
+ }
21
+ }
22
+
23
+ // Mermaid diagram container
24
+ [x-ref="diagramContainer"] {
25
+ .mermaid {
26
+ overflow: auto;
27
+ max-height: calc(100vh - 180px);
28
+ }
29
+ }
30
+
31
+ // Code container scrollbar styling
32
+ pre[x-ref="codeContainer"] {
33
+ &::-webkit-scrollbar {
34
+ width: 8px;
35
+ height: 8px;
36
+ }
37
+
38
+ &::-webkit-scrollbar-track {
39
+ background: theme('colors.gray.100');
40
+ border-radius: 4px;
41
+ }
42
+
43
+ &::-webkit-scrollbar-thumb {
44
+ background: theme('colors.gray.400');
45
+ border-radius: 4px;
46
+
47
+ &:hover {
48
+ background: theme('colors.gray.500');
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Form Controls
3
+ * Input fields, selects, buttons
4
+ */
5
+
6
+ /* Compact form controls */
7
+ .compact-input {
8
+ padding: 3px 8px;
9
+ font-size: 12px;
10
+ border: 1px solid var(--border-dark);
11
+ border-radius: 3px;
12
+ }
13
+
14
+ .compact-select {
15
+ padding: 3px 24px 3px 8px;
16
+ font-size: 12px;
17
+ border: 1px solid var(--border-dark);
18
+ border-radius: 3px;
19
+ background-size: 16px;
20
+ }
21
+
22
+ .compact-button {
23
+ padding: 4px 12px;
24
+ font-size: 12px;
25
+ border-radius: 3px;
26
+ font-weight: 500;
27
+ }