@pipelex/mthds-ui 0.19.0 → 0.20.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.
@@ -1,346 +0,0 @@
1
- /* ─── StuffViewer component styles ────────────────────────────────────────── */
2
- /* StuffViewer is also exported standalone (used outside GraphViewer — e.g.
3
- * docs pages, embedded previews). The theme tokens are normally applied to
4
- * the GraphViewer container, but when this component is rendered on its own
5
- * those tokens may not be set. The fallbacks below match the dark palette
6
- * from `graphConfig.ts` (DARK_PALETTE_COLORS) so the component always
7
- * renders with valid colors and fonts. */
8
-
9
- .stuff-viewer {
10
- --sv-bg: var(--surface-page, #0a0a0a);
11
- --sv-surface: var(--surface-panel, #111118);
12
- --sv-surface-hover: var(--surface-elevated, rgba(255, 255, 255, 0.06));
13
- --sv-border: var(--border-default, rgba(255, 255, 255, 0.1));
14
- --sv-text: var(--text-default, #e2e8f0);
15
- --sv-text-muted: var(--text-muted, #94a3b8);
16
- --sv-accent: var(--color-accent, #8be9fd);
17
- --sv-success: var(--color-success, #50fa7b);
18
- --sv-success-bg: var(--color-success-bg, rgba(80, 250, 123, 0.15));
19
- --sv-radius: 4px;
20
- --sv-font-sans: var(
21
- --font-sans,
22
- "Inter",
23
- -apple-system,
24
- BlinkMacSystemFont,
25
- "Segoe UI",
26
- sans-serif
27
- );
28
- --sv-font-mono: var(--font-mono, "JetBrains Mono", "Monaco", "Menlo", monospace);
29
-
30
- font-family: var(--sv-font-sans);
31
- color: var(--sv-text);
32
- display: flex;
33
- flex-direction: column;
34
- height: 100%;
35
- }
36
-
37
- /* ─── Header ─────────────────────────────────────────────────────────────── */
38
-
39
- .stuff-viewer-header {
40
- display: flex;
41
- flex-direction: column;
42
- gap: 2px;
43
- padding: 12px 16px 8px;
44
- border-bottom: 1px solid var(--sv-border);
45
- flex-shrink: 0;
46
- }
47
-
48
- .stuff-viewer-title {
49
- font-size: 14px;
50
- font-weight: 600;
51
- color: var(--sv-text);
52
- margin: 0;
53
- }
54
-
55
- .stuff-viewer-subtitle {
56
- font-size: 12px;
57
- color: var(--sv-text-muted);
58
- margin: 0;
59
- }
60
-
61
- /* ─── Toolbar: tabs + action buttons ─────────────────────────────────────── */
62
-
63
- .stuff-viewer-toolbar {
64
- display: flex;
65
- justify-content: space-between;
66
- align-items: center;
67
- padding: 8px 16px;
68
- gap: 8px;
69
- flex-shrink: 0;
70
- }
71
-
72
- .stuff-viewer-tabs {
73
- display: flex;
74
- gap: 4px;
75
- }
76
-
77
- .stuff-viewer-tab {
78
- padding: 5px 10px;
79
- border-radius: var(--sv-radius);
80
- cursor: pointer;
81
- font-size: 12px;
82
- font-weight: 500;
83
- background: var(--sv-surface-hover);
84
- color: var(--sv-text-muted);
85
- border: none;
86
- transition:
87
- background 0.15s,
88
- color 0.15s;
89
- }
90
-
91
- .stuff-viewer-tab:hover {
92
- background: var(--sv-border);
93
- color: var(--sv-text);
94
- }
95
-
96
- .stuff-viewer-tab--active {
97
- background: var(--sv-accent);
98
- color: var(--text-on-accent, #0e0e0e);
99
- }
100
-
101
- /* ─── Action buttons ─────────────────────────────────────────────────────── */
102
-
103
- .stuff-viewer-actions {
104
- display: flex;
105
- gap: 4px;
106
- }
107
-
108
- .stuff-viewer-action-btn {
109
- display: flex;
110
- align-items: center;
111
- justify-content: center;
112
- width: 28px;
113
- height: 28px;
114
- border-radius: var(--sv-radius);
115
- cursor: pointer;
116
- background: var(--sv-surface-hover);
117
- color: var(--sv-text-muted);
118
- border: none;
119
- transition:
120
- background 0.15s,
121
- color 0.15s;
122
- }
123
-
124
- .stuff-viewer-action-btn:hover {
125
- background: var(--sv-border);
126
- color: var(--sv-text);
127
- }
128
-
129
- .stuff-viewer-action-btn--copied {
130
- background: var(--sv-success-bg);
131
- color: var(--sv-success);
132
- }
133
-
134
- .stuff-viewer-action-btn svg {
135
- width: 14px;
136
- height: 14px;
137
- fill: currentColor;
138
- }
139
-
140
- /* ─── Content area ───────────────────────────────────────────────────────── */
141
-
142
- .stuff-viewer-content {
143
- flex: 1;
144
- overflow: auto;
145
- padding: 12px 16px 16px;
146
- min-height: 0;
147
- }
148
-
149
- /* Pre-formatted text (JSON and Pretty tabs) */
150
- .stuff-viewer-pre {
151
- font-family: var(--sv-font-mono);
152
- font-size: 11px;
153
- line-height: 1.5;
154
- white-space: pre-wrap;
155
- word-wrap: break-word;
156
- margin: 0;
157
- color: var(--sv-text-muted);
158
- }
159
-
160
- .stuff-viewer-pre--nowrap {
161
- white-space: pre;
162
- word-wrap: normal;
163
- line-height: 1;
164
- overflow-x: auto;
165
- padding-right: 20px;
166
- }
167
-
168
- /* HTML content */
169
- .stuff-viewer-html {
170
- font-family: var(--sv-font-sans);
171
- font-size: 11px;
172
- color: var(--sv-text-muted);
173
- line-height: 1.5;
174
- }
175
-
176
- .stuff-viewer-html table {
177
- border-collapse: collapse;
178
- width: 100%;
179
- }
180
-
181
- .stuff-viewer-html th,
182
- .stuff-viewer-html td {
183
- border: 1px solid var(--sv-border);
184
- padding: 8px 12px;
185
- text-align: left;
186
- }
187
-
188
- .stuff-viewer-html th {
189
- background: var(--sv-surface-hover);
190
- color: var(--sv-text);
191
- font-weight: 600;
192
- }
193
-
194
- .stuff-viewer-html tr:hover {
195
- background: var(--sv-surface-hover);
196
- }
197
-
198
- .stuff-viewer-html a {
199
- color: var(--sv-accent);
200
- text-decoration: none;
201
- }
202
-
203
- .stuff-viewer-html a:hover {
204
- text-decoration: underline;
205
- }
206
-
207
- .stuff-viewer-html ul {
208
- list-style: none;
209
- padding-left: 0;
210
- margin: 0;
211
- }
212
-
213
- /* Native `Html` concept — rendered in a sandboxed iframe so the document's own
214
- <style>/layout is faithful and isolated from the host. White backdrop because
215
- these documents (invoices, quotes, reports) are authored for print/light. */
216
- .stuff-viewer-html-frame {
217
- width: 100%;
218
- height: 100%;
219
- min-height: 480px;
220
- border: none;
221
- border-radius: var(--sv-radius);
222
- background: #fff;
223
- }
224
-
225
- /* PDF embed */
226
- .stuff-viewer-pdf {
227
- min-height: 400px;
228
- height: 100%;
229
- }
230
-
231
- .stuff-viewer-pdf embed {
232
- width: 100%;
233
- height: 100%;
234
- min-height: 500px;
235
- border: none;
236
- }
237
-
238
- /* Image content */
239
- .stuff-viewer-image {
240
- display: flex;
241
- justify-content: center;
242
- align-items: center;
243
- min-height: 200px;
244
- }
245
-
246
- .stuff-viewer-image img {
247
- max-width: 100%;
248
- max-height: 70vh;
249
- object-fit: contain;
250
- }
251
-
252
- /* Local file fallback (file:// URLs that can't render inline) */
253
- .stuff-viewer-local-file {
254
- display: flex;
255
- align-items: center;
256
- gap: 12px;
257
- padding: 16px;
258
- border-radius: 6px;
259
- background: var(--sv-surface);
260
- border: 1px solid var(--sv-border);
261
- }
262
-
263
- /* Clickable variant — used when an open-externally action is bound (e.g. PDF
264
- fallback in hosts that can't render <embed type="application/pdf">). */
265
- button.stuff-viewer-local-file--button {
266
- width: 100%;
267
- text-align: left;
268
- font: inherit;
269
- color: inherit;
270
- cursor: pointer;
271
- transition:
272
- background 0.15s ease,
273
- border-color 0.15s ease;
274
- }
275
-
276
- button.stuff-viewer-local-file--button:hover {
277
- background: var(--sv-surface-hover, var(--sv-surface));
278
- border-color: var(--sv-accent, var(--sv-border));
279
- }
280
-
281
- button.stuff-viewer-local-file--button:focus-visible {
282
- outline: 2px solid var(--sv-accent, var(--sv-border));
283
- outline-offset: 2px;
284
- }
285
-
286
- .stuff-viewer-local-file-icon {
287
- flex-shrink: 0;
288
- width: 32px;
289
- height: 32px;
290
- color: var(--sv-text-muted);
291
- }
292
-
293
- .stuff-viewer-local-file-icon svg {
294
- width: 100%;
295
- height: 100%;
296
- fill: currentColor;
297
- }
298
-
299
- .stuff-viewer-local-file-info {
300
- flex: 1;
301
- min-width: 0;
302
- }
303
-
304
- .stuff-viewer-local-file-name {
305
- font-family: var(--sv-font-mono);
306
- font-size: 12px;
307
- color: var(--sv-text);
308
- overflow: hidden;
309
- text-overflow: ellipsis;
310
- white-space: nowrap;
311
- }
312
-
313
- .stuff-viewer-local-file-hint {
314
- font-size: 11px;
315
- color: var(--sv-text-muted);
316
- margin-top: 2px;
317
- }
318
-
319
- /* Placeholder for missing data */
320
- .stuff-viewer-placeholder {
321
- color: var(--sv-text-muted);
322
- font-style: italic;
323
- font-size: 13px;
324
- }
325
-
326
- .stuff-viewer-error {
327
- border: 1px solid var(--color-status-failed, #ff5555);
328
- border-radius: 6px;
329
- padding: 12px;
330
- background: rgba(255, 85, 85, 0.08);
331
- }
332
-
333
- .stuff-viewer-error-title {
334
- color: var(--color-status-failed, #ff5555);
335
- font-weight: 600;
336
- font-size: 13px;
337
- margin-bottom: 4px;
338
- }
339
-
340
- .stuff-viewer-error-detail {
341
- color: var(--sv-text-muted);
342
- font-family: var(--font-mono, monospace);
343
- font-size: 12px;
344
- white-space: pre-wrap;
345
- word-break: break-word;
346
- }