docit 0.6.0 → 0.7.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.
@@ -2,563 +2,13 @@
2
2
 
3
3
  module Docit
4
4
  module UI
5
+ # Stylesheet for the System Map UI. The CSS lives in assets/system.css so it
6
+ # can be edited and linted as a real stylesheet; it is read once and inlined
7
+ # into the page by SystemRenderer.
5
8
  module SystemStyles
6
- def self.css
7
- <<~CSS
8
- /* ───────── Theme tokens ─────────
9
- Light is the default. [data-theme="dark"] on <html> overrides.
10
- Accent hues (ember / dusk / method / status) are shared by both
11
- themes — only the neutrals (surface, text, border) flip. */
12
- :root {
13
- /* Shared accents — identical in both themes */
14
- --ember: #ea6a2e; --dusk: #7c4ddb;
15
- --success: #1a9e4b; --info: #2563eb; --warning: #d97706; --danger: #dc2626;
16
- --teal: #0d9488; --pink: #db2777; --amber: #d97706;
17
-
18
- /* Light neutrals (default) */
19
- --void: #f6f7f9; /* app background */
20
- --text: #1a1f2e; /* primary text */
21
- --smoke: #475067; /* secondary text */
22
- --haze: #6b7488; /* tertiary / labels */
23
- --border: #e3e6ec; /* hairlines */
24
-
25
- --bg-solid: #ffffff; /* opaque surfaces (nodes, code) */
26
- --bg-glass: rgba(255,255,255,0.86);
27
- --bg-control: #ffffff;
28
- --bg-panel: #ffffff;
29
- --bg-card: #ffffff;
30
- --bg-card-grad-1: #ffffff;
31
- --bg-card-grad-2: #f6f7f9;
32
- --bg-option-hover: rgba(15,23,42,0.04);
33
- --grid-dot: rgba(15,23,42,0.05);
34
- --stripe-bg-light: #fafbfc;
35
- --stripe-card-bg: #ffffff;
36
- --stripe-bg-sidebar: #fafbfc;
37
- --bg-code: #f4f5f7; /* inline + block code surface */
38
-
39
- color-scheme: light;
40
- }
41
-
42
- [data-theme="dark"] {
43
- --void: #0f1117;
44
- --text: #f2f0ec;
45
- --smoke: #a8b4c8;
46
- --haze: #7a8fb5;
47
- --border: #2a3347;
48
-
49
- --bg-solid: #161b28;
50
- --bg-glass: rgba(15,17,23,0.96);
51
- --bg-control: rgba(26,31,46,0.86);
52
- --bg-panel: rgba(15,17,23,0.97);
53
- --bg-card: rgba(26,31,46,0.6);
54
- --bg-card-grad-1: rgba(26,31,46,0.8);
55
- --bg-card-grad-2: rgba(15,17,23,0.6);
56
- --bg-option-hover: rgba(42,51,71,0.3);
57
- --grid-dot: rgba(168,180,200,0.06);
58
- --stripe-bg-light: rgba(15,17,23,.4);
59
- --stripe-card-bg: rgba(26,31,46,.4);
60
- --stripe-bg-sidebar: rgba(15,17,23,.6);
61
- --bg-code: rgba(26,31,46,.8);
62
-
63
- color-scheme: dark;
64
- }
65
- *, *::before, *::after { box-sizing: border-box; }
66
- html, body { margin: 0; min-height: 100%; background: var(--void); color: var(--text); }
67
- body { overflow: hidden; font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
68
- button, input, select { font: inherit; }
69
-
70
- /* Inline icon alignment — SVG glyphs sit centered on the text baseline. */
71
- .btn-icon, .tip-icon, .welcome-icon {
72
- display: inline-flex; align-items: center; justify-content: center;
73
- }
74
- .btn-icon svg { vertical-align: middle; }
75
-
76
- /* Shell */
77
- .system-shell { display: grid; grid-template-rows: auto 1fr; height: calc(100vh - 37px); min-height: 640px; }
78
-
79
- /* Toolbar */
80
- .system-toolbar {
81
- display: flex; align-items: center; gap: 8px; padding: 10px 16px; flex-wrap: wrap;
82
- border-bottom: 1px solid var(--border); background: var(--bg-glass);
83
- backdrop-filter: blur(16px) saturate(150%);
84
- }
85
- .toolbar-group { display: flex; align-items: center; gap: 6px; }
86
- .toolbar-brand { margin-right: auto; gap: 10px; }
87
- .toolbar-filters { gap: 6px; }
88
- .toolbar-zoom { gap: 4px; padding: 0 6px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
89
- .toolbar-actions { gap: 6px; }
90
- .toolbar-info { gap: 8px; margin-left: 4px; }
91
-
92
- .brand-mark {
93
- width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
94
- background: linear-gradient(135deg, rgba(245,121,58,.18), rgba(139,92,246,.14));
95
- border: 1px solid rgba(245,121,58,.28); color: var(--ember); font-size: 14px;
96
- }
97
- .toolbar-title { min-width: 170px; }
98
- .toolbar-title strong {
99
- display: block; font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
100
- font-size: 14px; letter-spacing: 0;
101
- }
102
- .toolbar-title span { color: var(--haze); font-size: 11px; }
103
- .stat-pill { color: var(--haze); font-size: 11px; font-family: monospace; }
104
-
105
- .control {
106
- height: 32px; border: 1px solid var(--border); border-radius: 8px;
107
- background: var(--bg-control); color: var(--text); padding: 0 10px; outline: none;
108
- font-size: 12px; min-width: 0;
109
- }
110
- .control:focus { border-color: rgba(245,121,58,.6); box-shadow: 0 0 0 2px rgba(245,121,58,.12); }
111
- input.control { width: 160px; }
112
- select.control { width: 120px; }
113
-
114
- .system-btn {
115
- height: 32px; border: 1px solid rgba(168,180,200,.2); border-radius: 8px;
116
- background: var(--bg-card); color: var(--smoke); padding: 0 10px;
117
- cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px;
118
- transition: all 120ms ease;
119
- }
120
- .system-btn:hover { background: var(--bg-option-hover); color: var(--text); }
121
- .system-btn.active { background: rgba(245,121,58,.15); color: var(--ember); border-color: rgba(245,121,58,.4); }
122
- .icon-btn { width: 32px; justify-content: center; padding: 0; font-size: 16px; font-weight: 700; }
123
- .btn-icon { font-size: 13px; }
124
- .zoom-label { font-size: 11px; color: var(--haze); font-family: monospace; min-width: 38px; text-align: center; }
125
-
126
- /* Body */
127
- .system-body { display: grid; grid-template-columns: 1fr 400px; min-height: 0; overflow: hidden; }
128
-
129
- /* Canvas */
130
- .canvas-wrap {
131
- position: relative; height: 100%; min-height: 0; overflow: hidden; cursor: grab;
132
- background:
133
- radial-gradient(circle at 25px 25px, var(--grid-dot) 1px, transparent 1px),
134
- radial-gradient(ellipse 800px 600px at 30% 20%, rgba(245,121,58,.04), transparent 60%),
135
- radial-gradient(ellipse 700px 500px at 70% 80%, rgba(139,92,246,.04), transparent 60%),
136
- var(--void);
137
- background-size: 30px 30px, auto, auto, auto;
138
- }
139
- .canvas-wrap.panning,
140
- .canvas-wrap:active { cursor: grabbing; }
141
- .canvas { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
142
- .canvas svg { display: block; width: 100%; height: 100%; overflow: visible; }
143
-
144
- /* Nodes — hover & interaction */
145
- .canvas svg .node { cursor: grab; transition: filter 180ms ease; }
146
- .canvas svg .node:active { cursor: grabbing; }
147
- .canvas svg .node:hover rect:first-of-type {
148
- stroke-opacity: 0.7 !important;
149
- filter: drop-shadow(0 6px 16px rgba(15,23,42,0.14));
150
- }
151
- [data-theme="dark"] .canvas svg .node:hover rect:first-of-type {
152
- filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
153
- }
154
- .canvas svg .node.selected rect:first-of-type {
155
- filter: drop-shadow(0 8px 24px rgba(245,121,58,0.18));
156
- }
157
- .canvas svg .swimlane { pointer-events: none; }
158
- .canvas svg path[marker-end] { transition: opacity 180ms ease, stroke-width 180ms ease; }
159
- .canvas svg path[marker-end]:hover { opacity: 1 !important; stroke-width: 2.2 !important; }
160
-
161
- /* Legend */
162
- .legend {
163
- position: absolute; bottom: 16px; left: 16px; z-index: 10;
164
- background: var(--bg-glass); border: 1px solid var(--border); border-radius: 12px;
165
- backdrop-filter: blur(12px); max-width: 200px; overflow: hidden;
166
- transition: max-height 200ms ease;
167
- }
168
- .legend.collapsed .legend-content { display: none; }
169
- .legend-toggle {
170
- display: block; width: 100%; padding: 8px 12px; border: 0; background: transparent;
171
- color: var(--haze); font-size: 11px; font-family: monospace; cursor: pointer; text-align: left;
172
- }
173
- .legend-toggle:hover { color: var(--text); }
174
- .legend-content { padding: 0 12px 10px; }
175
- .legend-section { margin-bottom: 8px; }
176
- .legend-heading { font-size: 10px; color: var(--haze); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; font-family: monospace; }
177
- .legend-item { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 11px; color: var(--smoke); }
178
- .legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
179
- .legend-line { width: 16px; height: 2px; border-radius: 1px; background: var(--haze); flex-shrink: 0; }
180
-
181
- /* Panel */
182
- .panel {
183
- border-left: 1px solid var(--border); background: var(--bg-panel);
184
- overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
185
- scrollbar-color: var(--border) transparent;
186
- }
187
-
188
- .panel-welcome {
189
- margin: 20px 16px; padding: 24px 20px; border: 1px solid var(--border); border-radius: 16px;
190
- background: linear-gradient(145deg, var(--bg-card-grad-1), var(--bg-card-grad-2));
191
- text-align: center;
192
- }
193
- .welcome-icon {
194
- width: 48px; height: 48px; border-radius: 14px; display: inline-grid; place-items: center;
195
- background: linear-gradient(135deg, rgba(245,121,58,.15), rgba(139,92,246,.12));
196
- border: 1px solid rgba(245,121,58,.25); color: var(--ember); font-size: 22px; margin-bottom: 14px;
197
- }
198
- .panel-welcome h2 {
199
- margin: 0 0 8px; font-family: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
200
- font-size: 17px; font-weight: 700;
201
- }
202
- .panel-welcome p { margin: 0 0 18px; color: var(--haze); font-size: 13px; line-height: 1.5; }
203
- .welcome-tips { text-align: left; }
204
- .tip {
205
- display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
206
- border-bottom: 1px solid rgba(42,51,71,.5); font-size: 12px; color: var(--smoke); line-height: 1.4;
207
- }
208
- .tip:last-child { border-bottom: 0; }
209
- .tip-icon { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }
210
- .tip strong { color: var(--ember); }
211
-
212
- .panel-empty, .panel-section {
213
- margin: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card);
214
- }
215
- .panel-empty { padding: 20px; color: var(--haze); font-size: 13px; line-height: 1.5; }
216
-
217
- .panel-section { overflow: hidden; }
218
- .panel-section h2 {
219
- margin: 0; padding: 16px 18px 6px;
220
- font-family: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
221
- font-size: 15px; letter-spacing: 0; font-weight: 700;
222
- }
223
- .panel-section h3 {
224
- margin: 0; padding: 12px 18px 4px; font-size: 12px; color: var(--haze);
225
- text-transform: uppercase; letter-spacing: .04em; font-family: monospace;
226
- }
227
- .panel-section dl { margin: 0; padding: 6px 18px 18px; }
228
- .panel-section dt {
229
- margin-top: 14px; color: var(--haze); font-size: 11px; font-family: monospace;
230
- text-transform: uppercase; letter-spacing: .04em;
231
- }
232
- .panel-section dd { margin: 4px 0 0; color: var(--smoke); font-size: 13px; word-break: break-word; line-height: 1.5; }
233
- .panel-section pre {
234
- overflow-x: auto; margin: 0; padding: 12px; border-radius: 8px; background: var(--bg-solid);
235
- color: var(--smoke); font-size: 11px; white-space: pre-wrap; line-height: 1.5;
236
- }
237
-
238
- /* Node detail in panel */
239
- .node-detail-header {
240
- display: flex; align-items: center; gap: 10px; padding: 16px 18px;
241
- border-bottom: 1px solid var(--border);
242
- }
243
- .node-detail-badge {
244
- width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
245
- font-size: 16px; flex-shrink: 0;
246
- }
247
- .node-detail-title { font-size: 15px; font-weight: 700; word-break: break-word; }
248
- .node-detail-type { font-size: 11px; color: var(--haze); font-family: monospace; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
249
- .node-fact {
250
- display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px;
251
- background: rgba(168,180,200,.1); color: var(--smoke); font-family: monospace; font-weight: 600;
252
- }
9
+ CSS = File.read(File.join(__dir__, "assets", "system.css")).freeze
253
10
 
254
- /* Edge line in panel */
255
- .edge-line {
256
- display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
257
- border-bottom: 1px solid var(--border); padding: 8px 0; font-size: 12px;
258
- }
259
- .edge-line:last-child { border-bottom: 0; }
260
- .edge-line-info { color: var(--smoke); line-height: 1.4; }
261
- .edge-line-type { font-weight: 600; color: var(--text); }
262
- .edge-line button {
263
- flex-shrink: 0; border: 0; background: transparent; color: var(--ember);
264
- cursor: pointer; font-size: 11px; padding: 2px 4px;
265
- }
266
- .edge-line button:hover { text-decoration: underline; }
267
-
268
- /* Connection items in detail panel */
269
- .connection-item {
270
- display: flex; align-items: flex-start; gap: 8px; padding: 8px 0;
271
- border-bottom: 1px solid var(--border); font-size: 12px;
272
- }
273
- .connection-item:last-child { border-bottom: 0; }
274
- .connection-arrow { font-size: 14px; flex-shrink: 0; margin-top: 1px; font-weight: 600; }
275
- .connection-info { flex: 1; min-width: 0; }
276
- .connection-verb { display: block; color: var(--smoke); font-size: 11px; line-height: 1.4; }
277
- .connection-label { display: block; color: var(--text); font-weight: 600; font-size: 12px; word-break: break-word; }
278
- .connection-type { color: var(--haze); font-size: 10px; font-family: monospace; }
279
- .connection-remove {
280
- flex-shrink: 0; width: 20px; height: 20px; border: 0; border-radius: 4px;
281
- background: transparent; color: var(--haze); cursor: pointer; font-size: 14px;
282
- display: grid; place-items: center; opacity: 0; transition: opacity 120ms;
283
- }
284
- .connection-item:hover .connection-remove { opacity: 1; }
285
- .connection-remove:hover { color: var(--ember); background: rgba(245,121,58,.1); }
286
-
287
- /* Controller detail — action list */
288
- .action-summary {
289
- padding: 10px 0; border-bottom: 1px solid var(--border);
290
- }
291
- .action-summary:last-child { border-bottom: 0; }
292
- .action-summary-name {
293
- font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px;
294
- display: flex; align-items: center; gap: 6px;
295
- }
296
- .action-doc-badge {
297
- font-size: 9px; font-weight: 700; font-family: monospace;
298
- padding: 1px 5px; border-radius: 3px;
299
- background: rgba(52,199,89,.12); color: #34c759; border: 1px solid rgba(52,199,89,.2);
300
- text-transform: uppercase; letter-spacing: .04em;
301
- }
302
- .action-summary-route {
303
- margin: 4px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
304
- }
305
- .action-summary-desc {
306
- font-size: 12px; color: var(--smoke); line-height: 1.4; margin: 4px 0;
307
- }
308
- .action-summary-responses {
309
- display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap;
310
- }
311
- .response-code {
312
- font-size: 10px; font-family: monospace; font-weight: 600;
313
- padding: 1px 6px; border-radius: 3px;
314
- background: rgba(168,180,200,.08); color: var(--haze); border: 1px solid rgba(168,180,200,.12);
315
- }
316
- .response-code[data-status^="2"] { background: rgba(52,199,89,.1); color: #34c759; border-color: rgba(52,199,89,.2); }
317
- .response-code[data-status^="4"] { background: rgba(255,79,79,.1); color: #ff4f4f; border-color: rgba(255,79,79,.2); }
318
- .response-code[data-status^="5"] { background: rgba(255,179,64,.1); color: #ffb340; border-color: rgba(255,179,64,.2); }
319
-
320
- /* Toast */
321
- .toast {
322
- position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px;
323
- border: 1px solid rgba(245,121,58,.25); border-radius: 999px; background: var(--bg-glass);
324
- color: var(--ember); font-size: 12px; opacity: 0; pointer-events: none;
325
- transition: opacity 180ms ease; backdrop-filter: blur(8px); z-index: 100;
326
- }
327
- .toast.visible { opacity: 1; }
328
-
329
- /* ───────── API documentation view ─────────
330
- A real docs layout: sticky resource nav on the left, a readable
331
- single-column reference on the right. Reads light-first. */
332
- .stripe-docs-wrap {
333
- display: grid; grid-template-columns: 260px minmax(0, 1fr) 400px;
334
- height: 100%; min-height: 0; overflow: hidden; background: var(--void);
335
- }
336
- .mono { font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
337
-
338
- .stripe-sidebar {
339
- border-right: 1px solid var(--border); background: var(--stripe-bg-sidebar);
340
- padding: 28px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 26px;
341
- scrollbar-width: thin; scrollbar-color: var(--border) transparent;
342
- }
343
- .stripe-sidebar-group { display: flex; flex-direction: column; gap: 2px; }
344
- .stripe-sidebar-heading {
345
- font-size: 11px; font-weight: 700; color: var(--text); letter-spacing: .02em;
346
- margin-bottom: 8px; padding-left: 10px;
347
- }
348
- .stripe-sidebar-item {
349
- display: flex; align-items: center; justify-content: space-between; gap: 8px;
350
- padding: 7px 10px; border-radius: 8px; font-size: 12.5px; color: var(--smoke);
351
- text-decoration: none; transition: background 120ms ease, color 120ms ease; cursor: pointer;
352
- border-left: 2px solid transparent;
353
- }
354
- .stripe-sidebar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
355
- .stripe-sidebar-item:hover { background: var(--bg-option-hover); color: var(--text); }
356
- .stripe-sidebar-item.active {
357
- background: var(--bg-option-hover); color: var(--ember); font-weight: 600;
358
- border-left: 2px solid var(--ember); border-radius: 0 8px 8px 0;
359
- }
360
- .stripe-sidebar-badge {
361
- font-size: 8px; font-weight: 800; font-family: "SF Mono", ui-monospace, monospace;
362
- padding: 2px 5px; border-radius: 4px; letter-spacing: .03em; flex-shrink: 0;
363
- }
364
-
365
- .stripe-content {
366
- padding: 44px 48px; overflow-y: auto; scroll-behavior: smooth; height: 100%;
367
- scrollbar-width: thin; scrollbar-color: var(--border) transparent;
368
- }
369
- .stripe-controller-block {
370
- margin-bottom: 64px; border-bottom: 1px solid var(--border); padding-bottom: 48px;
371
- }
372
- .stripe-controller-block:last-child { border-bottom: 0; margin-bottom: 24px; }
373
- .stripe-controller-header {
374
- display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
375
- margin-bottom: 4px; flex-wrap: wrap;
376
- }
377
- .stripe-controller-kicker {
378
- font-size: 11px; font-weight: 700; color: var(--ember); text-transform: uppercase;
379
- letter-spacing: .08em; margin-bottom: 4px;
380
- }
381
- .stripe-controller-title {
382
- margin: 0; font-family: "Sora", -apple-system, sans-serif; font-size: 26px;
383
- font-weight: 800; color: var(--text); letter-spacing: -0.01em;
384
- }
385
- .stripe-controller-file {
386
- font-size: 11px; color: var(--haze); font-family: "SF Mono", ui-monospace, monospace;
387
- padding: 4px 8px; background: var(--bg-option-hover); border-radius: 6px; white-space: nowrap;
388
- }
389
- .stripe-controller-sub { margin: 0 0 24px; color: var(--haze); font-size: 13px; }
390
- .stripe-controller-sub .mono { color: var(--smoke); }
391
-
392
- .stripe-controller-aside { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
393
- .stripe-coverage {
394
- font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
395
- border: 1px solid; white-space: nowrap;
396
- }
397
-
398
- /* ───────── Right-hand detail panel ─────────
399
- Fills the third column: endpoint request/response on click. */
400
- .stripe-detail {
401
- position: relative; border-left: 1px solid var(--border); background: var(--bg-panel);
402
- overflow-y: auto; height: 100%; min-height: 0;
403
- scrollbar-width: thin; scrollbar-color: var(--border) transparent;
404
- }
405
- .stripe-detail-close {
406
- position: absolute; top: 14px; right: 14px; z-index: 2;
407
- width: 28px; height: 28px; display: none; align-items: center; justify-content: center;
408
- border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card);
409
- color: var(--haze); cursor: pointer;
410
- }
411
- .stripe-detail-close:hover { color: var(--text); background: var(--bg-option-hover); }
412
- .stripe-detail-body { padding: 28px 24px; }
413
-
414
- .stripe-detail-empty {
415
- display: flex; flex-direction: column; align-items: center; justify-content: center;
416
- text-align: center; min-height: 60vh; color: var(--haze); gap: 14px;
417
- }
418
- .stripe-detail-empty-icon {
419
- width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
420
- background: var(--bg-option-hover); color: var(--haze);
421
- }
422
- .stripe-detail-empty p { margin: 0; font-size: 13px; line-height: 1.5; max-width: 240px; }
423
- .stripe-detail-empty strong { color: var(--smoke); }
424
-
425
- /* Detail header */
426
- .detail-kicker { font-size: 11px; font-weight: 700; color: var(--ember); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
427
- .detail-title {
428
- margin: 0 0 14px; font-family: "Sora", -apple-system, sans-serif; font-size: 19px;
429
- font-weight: 700; color: var(--text); line-height: 1.3;
430
- }
431
- .detail-endpoint-line {
432
- display: flex; align-items: center; gap: 10px; font-family: "SF Mono", ui-monospace, monospace;
433
- font-size: 12.5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
434
- background: var(--bg-solid); margin-bottom: 18px; flex-wrap: wrap;
435
- }
436
- .detail-endpoint-line .verb { font-weight: 800; letter-spacing: .03em; }
437
- .detail-endpoint-line .path { color: var(--text); word-break: break-all; }
438
- .detail-desc { font-size: 13.5px; line-height: 1.65; color: var(--smoke); margin-bottom: 22px; }
439
-
440
- /* Detail sections (Parameters, Request, Responses) */
441
- .detail-section { margin-bottom: 24px; }
442
- .detail-section-title {
443
- font-size: 11px; font-weight: 700; color: var(--haze); text-transform: uppercase;
444
- letter-spacing: .06em; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
445
- }
446
- .detail-param {
447
- display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--border);
448
- }
449
- .detail-param:last-child { border-bottom: 0; }
450
- .detail-param-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
451
- .detail-param-name { font-family: "SF Mono", ui-monospace, monospace; font-size: 12px; font-weight: 700; color: var(--text); }
452
- .detail-param-type { font-family: "SF Mono", ui-monospace, monospace; font-size: 11px; color: var(--info); }
453
- .detail-chip {
454
- font-size: 9px; font-weight: 800; font-family: "SF Mono", ui-monospace, monospace;
455
- padding: 1px 5px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em;
456
- }
457
- .detail-chip.req { background: rgba(220,38,38,.1); color: var(--danger); }
458
- .detail-chip.loc { background: var(--bg-option-hover); color: var(--haze); }
459
- .detail-param-desc { font-size: 12px; color: var(--smoke); line-height: 1.45; }
460
-
461
- .detail-code {
462
- margin: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px;
463
- background: var(--bg-code); color: var(--smoke); overflow-x: auto;
464
- font-family: "SF Mono", ui-monospace, monospace; font-size: 11.5px; line-height: 1.6; white-space: pre;
465
- }
466
-
467
- .detail-response { padding: 9px 0; border-bottom: 1px solid var(--border); }
468
- .detail-response:last-child { border-bottom: 0; }
469
- .detail-response-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
470
- .detail-response-desc { font-size: 12px; color: var(--smoke); line-height: 1.45; }
471
-
472
- .detail-error { color: var(--warning); font-size: 13px; line-height: 1.5; }
473
-
474
- /* Slide-over drawer on narrow screens */
475
- @media (max-width: 1100px) {
476
- .stripe-docs-wrap { grid-template-columns: 240px minmax(0, 1fr); }
477
- .stripe-detail {
478
- position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 88vw); z-index: 200;
479
- transform: translateX(100%); transition: transform 220ms ease;
480
- box-shadow: -8px 0 32px rgba(15,23,42,0.18);
481
- }
482
- .stripe-detail.open { transform: translateX(0); }
483
- .stripe-detail-close { display: inline-flex; }
484
- }
485
-
486
- .stripe-endpoint-card {
487
- background: var(--stripe-card-bg); border: 1px solid var(--border); border-radius: 14px;
488
- margin-bottom: 20px; padding: 24px 26px; transition: border-color 150ms, box-shadow 150ms;
489
- scroll-margin-top: 24px; cursor: pointer;
490
- }
491
- .stripe-endpoint-card:hover {
492
- border-color: var(--haze);
493
- box-shadow: 0 4px 20px rgba(15,23,42,0.06);
494
- }
495
- .stripe-endpoint-card.detail-active {
496
- border-color: var(--ember);
497
- box-shadow: 0 4px 20px rgba(234,106,46,0.10);
498
- }
499
- .stripe-endpoint-header {
500
- display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 16px;
501
- }
502
- .stripe-endpoint-title-wrap { min-width: 0; }
503
- .stripe-endpoint-kicker {
504
- display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
505
- font-size: 11px; color: var(--haze);
506
- }
507
- .stripe-endpoint-title {
508
- margin: 0; font-family: "Sora", -apple-system, sans-serif; font-size: 18px;
509
- font-weight: 700; color: var(--text); letter-spacing: -0.005em; line-height: 1.3;
510
- }
511
- .stripe-endpoint-card .stripe-endpoint-explain { flex-shrink: 0; }
512
-
513
- .stripe-endpoint-meta {
514
- display: inline-flex; align-items: center; gap: 10px;
515
- font-family: "SF Mono", ui-monospace, monospace; font-size: 12.5px;
516
- padding: 9px 14px; background: var(--bg-solid); border: 1px solid var(--border); border-radius: 9px;
517
- margin-bottom: 18px;
518
- }
519
- .stripe-endpoint-verb { font-weight: 800; letter-spacing: .03em; }
520
- .stripe-endpoint-path { color: var(--text); }
521
-
522
- .stripe-endpoint-desc {
523
- color: var(--smoke); font-size: 14px; line-height: 1.65; margin-bottom: 22px; max-width: 70ch;
524
- }
525
- .stripe-endpoint-desc--empty { color: var(--haze); font-style: italic; }
526
-
527
- .stripe-relations-title {
528
- font-size: 11px; font-weight: 700; color: var(--haze); text-transform: uppercase;
529
- letter-spacing: .06em; margin-bottom: 10px;
530
- }
531
- .stripe-relations-grid {
532
- display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
533
- }
534
- .stripe-relation-card {
535
- background: var(--stripe-bg-light); border: 1px solid var(--border); border-radius: 10px;
536
- padding: 10px 12px; display: flex; align-items: center; gap: 10px; transition: all 120ms;
537
- cursor: pointer;
538
- }
539
- .stripe-relation-card:hover {
540
- border-color: var(--ember); background: var(--bg-option-hover);
541
- }
542
- .stripe-relation-icon {
543
- width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0;
544
- }
545
- .stripe-relation-text { min-width: 0; display: flex; flex-direction: column; }
546
- .stripe-relation-name {
547
- font-size: 12px; font-weight: 600; color: var(--text);
548
- overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
549
- }
550
- .stripe-relation-type {
551
- font-size: 10px; color: var(--haze); font-family: "SF Mono", ui-monospace, monospace;
552
- }
553
-
554
- /* Responsive */
555
- @media (max-width: 980px) {
556
- body { overflow: auto; }
557
- .system-body { grid-template-columns: 1fr; }
558
- .panel { min-height: 320px; border-left: 0; border-top: 1px solid var(--border); }
559
- input.control { width: 120px; }
560
- .toolbar-zoom { display: none; }
561
- }
11
+ def self.css
562
12
  CSS
563
13
  end
564
14
  end
data/lib/docit/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Docit
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - S13G
@@ -79,6 +79,8 @@ files:
79
79
  - lib/docit/system_graph/node.rb
80
80
  - lib/docit/system_graph/rails_analyzer.rb
81
81
  - lib/docit/system_graph/source_scanner.rb
82
+ - lib/docit/ui/assets/system.css
83
+ - lib/docit/ui/assets/system.js
82
84
  - lib/docit/ui/base_renderer.rb
83
85
  - lib/docit/ui/scalar_renderer.rb
84
86
  - lib/docit/ui/swagger_renderer.rb