@cubud/wen 1.0.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.
@@ -0,0 +1,654 @@
1
+ /* GitHub Dark syntax-highlighting theme (highlight.js 11.9.0), vendored and
2
+ scoped to the editor so it never leaks into a consumer's global stylesheet.
3
+ Source: github.com/highlightjs/highlight.js — MIT, theme by @Hirse. */
4
+ .wen-editor-root pre code.hljs { display: block; overflow-x: auto; padding: 1em; }
5
+ .wen-editor-root code.hljs { padding: 3px 5px; }
6
+ .wen-editor-root .hljs { color: #c9d1d9; background: #0d1117; }
7
+ .wen-editor-root .hljs-doctag,
8
+ .wen-editor-root .hljs-keyword,
9
+ .wen-editor-root .hljs-meta .hljs-keyword,
10
+ .wen-editor-root .hljs-template-tag,
11
+ .wen-editor-root .hljs-template-variable,
12
+ .wen-editor-root .hljs-type,
13
+ .wen-editor-root .hljs-variable.language_ { color: #ff7b72; }
14
+ .wen-editor-root .hljs-title,
15
+ .wen-editor-root .hljs-title.class_,
16
+ .wen-editor-root .hljs-title.class_.inherited__,
17
+ .wen-editor-root .hljs-title.function_ { color: #d2a8ff; }
18
+ .wen-editor-root .hljs-attr,
19
+ .wen-editor-root .hljs-attribute,
20
+ .wen-editor-root .hljs-literal,
21
+ .wen-editor-root .hljs-meta,
22
+ .wen-editor-root .hljs-number,
23
+ .wen-editor-root .hljs-operator,
24
+ .wen-editor-root .hljs-selector-attr,
25
+ .wen-editor-root .hljs-selector-class,
26
+ .wen-editor-root .hljs-selector-id,
27
+ .wen-editor-root .hljs-variable { color: #79c0ff; }
28
+ .wen-editor-root .hljs-meta .hljs-string,
29
+ .wen-editor-root .hljs-regexp,
30
+ .wen-editor-root .hljs-string { color: #a5d6ff; }
31
+ .wen-editor-root .hljs-built_in,
32
+ .wen-editor-root .hljs-symbol { color: #ffa657; }
33
+ .wen-editor-root .hljs-code,
34
+ .wen-editor-root .hljs-comment,
35
+ .wen-editor-root .hljs-formula { color: #8b949e; }
36
+ .wen-editor-root .hljs-name,
37
+ .wen-editor-root .hljs-quote,
38
+ .wen-editor-root .hljs-selector-pseudo,
39
+ .wen-editor-root .hljs-selector-tag { color: #7ee787; }
40
+ .wen-editor-root .hljs-subst { color: #c9d1d9; }
41
+ .wen-editor-root .hljs-section { color: #1f6feb; font-weight: 700; }
42
+ .wen-editor-root .hljs-bullet { color: #f2cc60; }
43
+ .wen-editor-root .hljs-emphasis { color: #c9d1d9; font-style: italic; }
44
+ .wen-editor-root .hljs-strong { color: #c9d1d9; font-weight: 700; }
45
+ .wen-editor-root .hljs-addition { color: #aff5b4; background-color: #033a16; }
46
+ .wen-editor-root .hljs-deletion { color: #ffdcd7; background-color: #67060c; }
47
+
48
+ :root {
49
+ --wen-bg: #ffffff;
50
+ --wen-surface: #f9fafb;
51
+ --wen-surface-hover: #f3f4f6;
52
+ --wen-border: #e5e7eb;
53
+ --wen-text-main: #1f2937;
54
+ --wen-text-muted: #6b7280;
55
+ --wen-accent: #0f172a;
56
+ --wen-accent-text: #ffffff;
57
+ --wen-danger: #ef4444;
58
+ --wen-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
59
+ --wen-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
60
+ --wen-radius: 8px;
61
+ --wen-radius-sm: 4px;
62
+ --wen-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
63
+ }
64
+
65
+ .wen-editor-wrapper {
66
+ background: var(--wen-bg);
67
+ border: 1px solid var(--wen-border);
68
+ border-radius: var(--wen-radius);
69
+ box-shadow: var(--wen-shadow);
70
+ display: flex;
71
+ flex-direction: column;
72
+ font-family: var(--wen-font-sans);
73
+ color: var(--wen-text-main);
74
+ }
75
+
76
+ .wen-toolbar {
77
+ display: flex;
78
+ flex-wrap: wrap;
79
+ gap: 0.25rem;
80
+ padding: 0.5rem;
81
+ background: var(--wen-surface);
82
+ border-bottom: 1px solid var(--wen-border);
83
+ align-items: center;
84
+ border-top-left-radius: calc(var(--wen-radius) - 1px);
85
+ border-top-right-radius: calc(var(--wen-radius) - 1px);
86
+ }
87
+
88
+ .wen-toolbar-btn {
89
+ background: transparent;
90
+ border: 1px solid transparent;
91
+ padding: 0.35rem 0.6rem;
92
+ cursor: pointer;
93
+ font-family: var(--wen-font-sans);
94
+ font-size: 0.85rem;
95
+ color: var(--wen-text-muted);
96
+ border-radius: var(--wen-radius-sm);
97
+ transition: all 0.15s ease;
98
+ }
99
+
100
+ .wen-toolbar-btn:hover { background: var(--wen-surface-hover); color: var(--wen-text-main); }
101
+ .wen-toolbar-btn.is-active { background: var(--wen-accent); color: var(--wen-accent-text); }
102
+ .wen-toolbar-divider { width: 1px; height: 1.25rem; background: var(--wen-border); margin: 0 0.25rem; }
103
+
104
+ .wen-editor-root { padding: 1.5rem; min-height: 300px; outline: none; line-height: 1.6; }
105
+ .wen-editor-root p, .wen-editor-root h1, .wen-editor-root h2, .wen-editor-root h3 { margin-top: 0; margin-bottom: 1rem; }
106
+ .wen-editor-root h1, .wen-editor-root h2 { font-weight: 600; color: var(--wen-text-main); }
107
+ /* Inline code (e.g. `const x = 1`) */
108
+ .wen-editor-root p code {
109
+ background: var(--wen-surface);
110
+ color: var(--wen-text-main);
111
+ padding: 0.2em 0.4em;
112
+ border-radius: var(--wen-radius-sm);
113
+ font-family: var(--wen-font-mono);
114
+ font-size: 0.9em;
115
+ border: 1px solid var(--wen-border);
116
+ }
117
+
118
+ /* Block code (Syntax Highlighted) */
119
+ .wen-editor-root pre {
120
+ background: #0d1117; /* GitHub Dark background */
121
+ color: #c9d1d9; /* GitHub Dark text */
122
+ padding: 1rem;
123
+ border-radius: var(--wen-radius);
124
+ font-family: var(--wen-font-mono);
125
+ font-size: 0.9rem;
126
+ overflow-x: auto;
127
+ margin: 1.5rem 0;
128
+ }
129
+
130
+ .wen-editor-root pre code {
131
+ background: transparent;
132
+ color: inherit;
133
+ padding: 0;
134
+ border: none;
135
+ font-size: inherit;
136
+ }
137
+ .wen-editor-root blockquote { border-left: 3px solid var(--wen-border); margin-left: 0; padding-left: 1rem; font-style: italic; color: var(--wen-text-muted); }
138
+
139
+ /* Utility Modals (Link/Image) must always sit absolute top */
140
+ .wen-modal-overlay {
141
+ position: fixed;
142
+ top: 0; left: 0; right: 0; bottom: 0;
143
+ background: rgba(0, 0, 0, 0.6);
144
+ z-index: 99999 !important; /* Wins the z-index battle */
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ }
149
+
150
+ .wen-modal {
151
+ background: var(--wen-bg);
152
+ padding: 1.5rem;
153
+ border-radius: var(--wen-radius);
154
+ box-shadow: 0 10px 30px rgba(0,0,0,0.5);
155
+ width: 350px;
156
+ display: flex;
157
+ flex-direction: column;
158
+ gap: 1rem;
159
+ border: 1px solid var(--wen-border);
160
+ color: var(--wen-text-main);
161
+ font-family: var(--wen-font-sans);
162
+ }
163
+
164
+ .wen-modal strong {
165
+ font-size: 1.1rem;
166
+ }
167
+
168
+ .wen-modal input {
169
+ padding: 0.5rem;
170
+ border-radius: var(--wen-radius-sm);
171
+ border: 1px solid var(--wen-border);
172
+ background: var(--wen-surface);
173
+ color: var(--wen-text-main);
174
+ font-family: var(--wen-font-mono);
175
+ outline: none;
176
+ }
177
+
178
+ .wen-modal input:focus {
179
+ border-color: #3b82f6;
180
+ }
181
+
182
+ .wen-modal-actions {
183
+ display: flex;
184
+ justify-content: flex-end;
185
+ gap: 0.5rem;
186
+ }
187
+
188
+ .wen-modal-cancel, .wen-modal-submit {
189
+ padding: 0.4rem 0.8rem;
190
+ border-radius: var(--wen-radius-sm);
191
+ cursor: pointer;
192
+ border: none;
193
+ font-weight: 600;
194
+ }
195
+
196
+ .wen-modal-cancel {
197
+ background: transparent;
198
+ color: var(--wen-text-muted);
199
+ }
200
+
201
+ .wen-modal-cancel:hover {
202
+ background: var(--wen-surface);
203
+ color: var(--wen-text-main);
204
+ }
205
+
206
+ .wen-modal-submit {
207
+ background: #3b82f6;
208
+ color: white;
209
+ }
210
+
211
+ .wen-modal-submit:hover {
212
+ background: #2563eb;
213
+ }
214
+
215
+ /* Disabled Toolbar Buttons */
216
+ .wen-toolbar-btn:disabled {
217
+ opacity: 0.4;
218
+ cursor: not-allowed;
219
+ background: transparent !important;
220
+ color: var(--wen-text-muted) !important;
221
+ }
222
+
223
+ /* Table Architecture */
224
+ .wen-editor-root .tableWrapper {
225
+ overflow-x: auto;
226
+ margin: 1.5rem 0;
227
+ border: 1px solid var(--wen-border);
228
+ border-radius: var(--wen-radius-sm);
229
+ }
230
+
231
+ /* Bulletproof: Target ALL tables inside the editor */
232
+ .wen-editor-root table {
233
+ border-collapse: collapse;
234
+ table-layout: fixed;
235
+ width: 100%;
236
+ margin: 0;
237
+ overflow: hidden;
238
+ }
239
+
240
+ .wen-editor-root table td,
241
+ .wen-editor-root table th {
242
+ min-width: 1em;
243
+ border: 1px solid #cbd5e1; /* Darker, crisp slate border */
244
+ padding: 0.5rem;
245
+ vertical-align: top;
246
+ box-sizing: border-box;
247
+ position: relative;
248
+ }
249
+
250
+ .wen-editor-root table th {
251
+ font-weight: 600;
252
+ text-align: left;
253
+ background-color: var(--wen-surface);
254
+ color: var(--wen-text-main);
255
+ }
256
+
257
+ .wen-editor-root table p {
258
+ margin: 0;
259
+ }
260
+
261
+ /* Task Lists (Checklists) */
262
+ .wen-editor-root ul[data-type="taskList"] {
263
+ list-style: none;
264
+ padding: 0;
265
+ }
266
+
267
+ .wen-editor-root ul[data-type="taskList"] li {
268
+ display: flex;
269
+ align-items: flex-start;
270
+ margin-bottom: 0.5rem;
271
+ }
272
+
273
+ .wen-editor-root ul[data-type="taskList"] li > label {
274
+ margin-right: 0.5rem;
275
+ user-select: none;
276
+ margin-top: 0.15rem; /* Optical alignment with text */
277
+ }
278
+
279
+ .wen-editor-root ul[data-type="taskList"] li > label input[type="checkbox"] {
280
+ cursor: pointer;
281
+ }
282
+
283
+ .wen-editor-root ul[data-type="taskList"] li > div {
284
+ flex: 1;
285
+ }
286
+
287
+ .wen-editor-root ul[data-type="taskList"] li p {
288
+ margin: 0;
289
+ }
290
+
291
+ /* GitHub Flavored Alerts (Admonitions) */
292
+ .wen-editor-root .wen-github-alert {
293
+ border-left: 4px solid var(--wen-border);
294
+ padding: 0.75rem 1rem;
295
+ margin: 1.5rem 0;
296
+ border-radius: 0 var(--wen-radius-sm) var(--wen-radius-sm) 0;
297
+ font-style: normal; /* Overrides standard blockquote italic */
298
+ color: var(--wen-text-main);
299
+ }
300
+
301
+ .wen-editor-root .wen-github-alert p:last-child {
302
+ margin-bottom: 0;
303
+ }
304
+
305
+ /* Background Tints & Border Colors */
306
+ .wen-editor-root .wen-github-alert-note { border-left-color: #0969da; background-color: rgba(9, 105, 218, 0.05); }
307
+ .wen-editor-root .wen-github-alert-tip { border-left-color: #1a7f37; background-color: rgba(26, 127, 55, 0.05); }
308
+ .wen-editor-root .wen-github-alert-important { border-left-color: #8250df; background-color: rgba(130, 80, 223, 0.05); }
309
+ .wen-editor-root .wen-github-alert-warning { border-left-color: #bf8700; background-color: rgba(191, 135, 0, 0.05); }
310
+ .wen-editor-root .wen-github-alert-caution { border-left-color: #cf222e; background-color: rgba(207, 34, 46, 0.05); }
311
+
312
+ /* The [!TAG] Badge styling */
313
+ .wen-editor-root .wen-github-alert-badge {
314
+ display: inline-block;
315
+ font-weight: 600;
316
+ font-size: 0.9em;
317
+ font-family: var(--wen-font-mono);
318
+ }
319
+
320
+ .wen-editor-root .wen-github-alert-badge-note { color: #0969da; }
321
+ .wen-editor-root .wen-github-alert-badge-tip { color: #1a7f37; }
322
+ .wen-editor-root .wen-github-alert-badge-important { color: #8250df; }
323
+ .wen-editor-root .wen-github-alert-badge-warning { color: #bf8700; }
324
+ .wen-editor-root .wen-github-alert-badge-caution { color: #cf222e; }
325
+
326
+ /* Rich Recursive Modal */
327
+ .wen-rich-modal-overlay {
328
+ position: fixed; top: 0; left: 0; right: 0; bottom: 0;
329
+ background: rgba(0,0,0,0.7); z-index: 9999;
330
+ display: flex; align-items: center; justify-content: center;
331
+ }
332
+
333
+ .wen-rich-modal {
334
+ width: 90vw; height: 90vh; background: #fff;
335
+ border-radius: var(--wen-radius); display: flex; flex-direction: column;
336
+ overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
337
+ }
338
+
339
+ .wen-rich-modal-header {
340
+ padding: 1rem 1.5rem; background: #1e1e1e; color: white;
341
+ display: flex; justify-content: space-between; align-items: center;
342
+ }
343
+
344
+ .wen-rich-modal-body {
345
+ flex: 1; min-height: 0; display: flex; flex-direction: column;
346
+ background: var(--wen-bg);
347
+ }
348
+
349
+ .wen-rich-modal-body .wen-editor-wrapper {
350
+ height: 100%; border: none;
351
+ }/* Prevent width + padding horizontal blowouts */
352
+ .wen-yaml-block *, .wen-yaml-block *::before, .wen-yaml-block *::after {
353
+ box-sizing: border-box;
354
+ }
355
+
356
+ .wen-yaml-block { border: 1px solid var(--wen-border); border-radius: var(--wen-radius); margin: 1.5rem 0; background: var(--wen-bg); }
357
+ .wen-yaml-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--wen-border); padding: 0.5rem 1rem; background: var(--wen-surface); border-top-left-radius: calc(var(--wen-radius) - 1px); border-top-right-radius: calc(var(--wen-radius) - 1px); }
358
+ .wen-yaml-title { font-size: 0.85rem; font-weight: 600; color: var(--wen-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
359
+ .wen-yaml-toggle-btn { background: var(--wen-bg); border: 1px solid var(--wen-border); color: var(--wen-text-muted); cursor: pointer; font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: var(--wen-radius-sm); }
360
+ .wen-yaml-toggle-btn:hover { background: var(--wen-surface-hover); color: var(--wen-text-main); }
361
+
362
+ /* Collapsible Container Logic */
363
+ .wen-yaml-visual-container { position: relative; display: block; }
364
+ .wen-yaml-view-visual { padding: 0.5rem !important; }
365
+ .wen-yaml-view-raw, .wen-yaml-error-state { display: none; padding: 1rem; }
366
+ .wen-yaml-view-raw.active, .wen-yaml-error-state.active { display: block; }
367
+ .wen-yaml-visual-container.is-collapsed .wen-yaml-view-visual { max-height: 220px; overflow: hidden; }
368
+ .wen-yaml-fade { display: none; }
369
+ .wen-yaml-visual-container.is-collapsed .wen-yaml-fade { display: block; position: absolute; bottom: 33px; left: 0; right: 0; height: 60px; background: linear-gradient(transparent, var(--wen-bg)); pointer-events: none; z-index: 5; }
370
+ .wen-yaml-expand-btn { display: none; width: 100%; background: var(--wen-surface); border: none; border-top: 1px solid var(--wen-border); padding: 0.5rem; color: var(--wen-text-muted); cursor: pointer; font-size: 0.8rem; text-align: center; font-weight: 600; transition: background 0.15s; border-bottom-left-radius: calc(var(--wen-radius) - 1px); border-bottom-right-radius: calc(var(--wen-radius) - 1px); }
371
+ .wen-yaml-expand-btn:hover { color: var(--wen-text-main); background: var(--wen-border); }
372
+ .wen-yaml-visual-container.needs-collapse .wen-yaml-expand-btn { display: block; }
373
+
374
+ .wen-yaml-raw-input { width: 100%; min-height: 150px; border: 1px solid var(--wen-border); border-radius: var(--wen-radius-sm); padding: 0.75rem; font-family: var(--wen-font-mono); font-size: 0.9rem; color: var(--wen-text-main); background: var(--wen-surface); resize: vertical; outline: none; }
375
+ .wen-yaml-error-state { color: var(--wen-danger); background: #fef2f2; border-top: 1px solid #fecaca; font-size: 0.9rem; }
376
+
377
+ /* Hierarchical Vertical Layout */
378
+ .wen-type-object, .wen-type-array { display: flex; flex-direction: column; width: 100%; background: rgba(0, 0, 0, 0.02); border-radius: var(--wen-radius-sm); padding: 0.5rem; border: 1px solid rgba(0,0,0,0.05); }
379
+ .wen-row, .wen-array-item { display: flex; flex-direction: column; margin-bottom: 0.5rem; transition: background 0.15s ease; border-radius: var(--wen-radius-sm); }
380
+ .wen-row-top { display: flex; align-items: flex-start; width: 100%; padding: 0.2rem; }
381
+ .wen-row:hover > .wen-row-top, .wen-array-item:hover > .wen-row-top { background: var(--wen-surface); border-radius: var(--wen-radius-sm); }
382
+
383
+ /* Precise Typography Alignment */
384
+ .wen-key-wrap {
385
+ display: flex;
386
+ align-items: baseline; /* Aligns the input text and colon perfectly on the bottom edge */
387
+ width: 140px;
388
+ flex-shrink: 0;
389
+ padding: 0; /* Strip any old wrap padding */
390
+ }
391
+
392
+ /* Force identical box models for inputs and textareas */
393
+ .wen-key, .wen-val {
394
+ padding: 0;
395
+ margin: 0;
396
+ font-size: 0.9rem;
397
+ font-family: var(--wen-font-sans);
398
+ line-height: 1.5;
399
+ border: none;
400
+ background: transparent;
401
+ outline: none;
402
+ }
403
+
404
+ .wen-key {
405
+ width: 100%;
406
+ font-weight: 600;
407
+ color: var(--wen-text-muted);
408
+ }
409
+
410
+ .wen-val {
411
+ flex-grow: 1;
412
+ color: var(--wen-text-main);
413
+ resize: none;
414
+ }
415
+
416
+ .wen-colon {
417
+ margin: 0 0.5rem 0 0;
418
+ padding: 0;
419
+ color: var(--wen-text-muted);
420
+ font-weight: bold;
421
+ font-size: 0.9rem;
422
+ line-height: 1.5;
423
+ }
424
+
425
+ /* Italic Placeholders */
426
+ .wen-key::placeholder,
427
+ .wen-val::placeholder {
428
+ font-style: italic;
429
+ opacity: 0.6;
430
+ font-weight: normal;
431
+ }
432
+
433
+ .wen-key:focus { color: var(--wen-text-main); }
434
+
435
+ /* Primitives sit on the same line, complex drops below */
436
+ .wen-val-wrap { flex-grow: 1; min-width: 0; display: flex; align-items: flex-start; }
437
+ .wen-complex-wrap { padding-left: 1rem; width: 100%; margin-top: 0.25rem; }
438
+ .wen-type-primitive { display: flex; align-items: flex-start; gap: 0.5rem; width: 100%; }
439
+
440
+ /* The Action Buttons */
441
+ .wen-type-controls { display: flex; gap: 0.25rem; opacity: 0; transition: opacity 0.2s; }
442
+ .wen-row:hover .wen-type-controls, .wen-array-item:hover .wen-type-controls { opacity: 1; }
443
+ .wen-type-controls button { background: var(--wen-bg); border: 1px solid var(--wen-border); border-radius: var(--wen-radius-sm); cursor: pointer; padding: 0.2rem 0.4rem; font-size: 0.8rem; color: var(--wen-text-muted); }
444
+ .wen-type-controls button:hover { background: var(--wen-surface-hover); color: var(--wen-text-main); }
445
+
446
+ .wen-bullet { color: var(--wen-text-muted); font-weight: bold; padding-top: 0.2rem; width: 24px; text-align: center; }
447
+
448
+ /* Refined Add/Delete UI */
449
+ .wen-btn-delete { background: transparent; border: none; color: var(--wen-text-muted); font-size: 1.25rem; cursor: pointer; opacity: 0; padding: 0 0.5rem; margin-left: auto; }
450
+ .wen-row:hover > .wen-row-top > .wen-btn-delete, .wen-array-item:hover > .wen-row-top > .wen-btn-delete { opacity: 1; }
451
+ .wen-btn-delete:hover { color: var(--wen-danger); }
452
+
453
+ .wen-btn-add { background: transparent; border: 1px dashed var(--wen-border); color: var(--wen-text-muted); cursor: pointer; text-align: left; font-weight: 500; padding: 0.4rem 0.75rem; font-family: var(--wen-font-sans); transition: all 0.15s ease; border-radius: var(--wen-radius-sm); font-size: 0.85rem; margin-top: 0.25rem; width: 100%; }
454
+ .wen-btn-add:hover { color: var(--wen-text-main); background: var(--wen-surface); border-color: #cbd5e1; }.wen-component-block *, .wen-component-block *::before, .wen-component-block *::after {
455
+ box-sizing: border-box;
456
+ }
457
+
458
+ .wen-component-block {
459
+ border: 2px solid var(--wen-accent);
460
+ border-radius: var(--wen-radius);
461
+ margin: 1.5rem 0;
462
+ background: var(--wen-bg);
463
+ }
464
+
465
+ .wen-component-header {
466
+ display: flex;
467
+ justify-content: space-between;
468
+ align-items: center;
469
+ border-bottom: 2px solid var(--wen-accent);
470
+ padding: 0.5rem 1rem;
471
+ background: var(--wen-accent);
472
+ color: var(--wen-accent-text);
473
+ border-top-left-radius: calc(var(--wen-radius) - 2px);
474
+ border-top-right-radius: calc(var(--wen-radius) - 2px);
475
+ }
476
+
477
+ .wen-component-title { font-size: 0.85rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; }
478
+ .wen-component-toggle-btn { background: var(--wen-bg); border: none; color: var(--wen-text-main); cursor: pointer; font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: var(--wen-radius-sm); font-weight: 600; }
479
+
480
+ .wen-component-view-visual, .wen-component-view-raw { display: none; padding: 1rem; }
481
+ .wen-component-view-visual.active, .wen-component-view-raw.active { display: block; }
482
+
483
+ .wen-component-raw-input { width: 100%; min-height: 200px; border: 1px solid var(--wen-border); border-radius: var(--wen-radius-sm); padding: 0.75rem; font-family: var(--wen-font-mono); font-size: 0.9rem; background: #1e1e1e; color: #d4d4d4; resize: vertical; outline: none; }
484
+
485
+ .wen-wireframe { border: 1px dashed var(--wen-border); border-radius: var(--wen-radius-sm); background: var(--wen-surface); padding: 1rem; }
486
+ .wen-wireframe-header { color: var(--wen-text-main); font-size: 1.1rem; margin-bottom: 0.75rem; font-family: var(--wen-font-mono); }
487
+ .wen-prop-val { color: var(--wen-accent); }
488
+ .wen-component-error { color: var(--wen-danger); font-weight: bold; }
489
+
490
+ .wen-wireframe-props {
491
+ padding: 0.5rem; background: var(--wen-surface);
492
+ border-bottom: 1px solid var(--wen-border);
493
+ display: flex; flex-wrap: wrap; gap: 0.5rem;
494
+ }
495
+
496
+ .wen-wireframe-prop {
497
+ background: var(--wen-bg); border: 1px solid var(--wen-border);
498
+ padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem;
499
+ font-family: var(--wen-font-mono); display: flex; align-items: center; gap: 0.25rem;
500
+ }
501
+
502
+ .wen-prop-key { color: #8b5cf6; font-weight: bold; }
503
+
504
+ /* The Editable Attribute Input */
505
+ .wen-prop-val-input {
506
+ background: transparent; border: none; border-bottom: 1px dashed #cbd5e1;
507
+ color: #10b981; font-family: inherit; font-size: inherit; outline: none;
508
+ min-width: 60px; padding: 0 0.2rem; transition: border-color 0.2s;
509
+ }
510
+ .wen-prop-val-input:focus { border-bottom-color: #10b981; }
511
+
512
+ .wen-wireframe-content { padding: 1rem; }
513
+
514
+ /* Live Markdown Preview Box */
515
+ .wen-wireframe-preview-box {
516
+ background: #ffffff;
517
+ border: 1px solid #cbd5e1;
518
+ border-radius: var(--wen-radius-sm);
519
+ padding: 1rem;
520
+ margin-bottom: 0.75rem;
521
+ max-height: 250px;
522
+ overflow-y: auto;
523
+ box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
524
+ }
525
+
526
+ .wen-wireframe-preview {
527
+ font-size: 0.9rem;
528
+ color: #334155;
529
+ font-family: var(--wen-font-sans);
530
+ line-height: 1.5;
531
+ }
532
+
533
+ /* Reset typography inside the preview so headers don't blow out */
534
+ .wen-wireframe-preview h1,
535
+ .wen-wireframe-preview h2,
536
+ .wen-wireframe-preview h3,
537
+ .wen-wireframe-preview h4 {
538
+ margin-top: 0;
539
+ margin-bottom: 0.5rem;
540
+ font-weight: 600;
541
+ line-height: 1.2;
542
+ }
543
+
544
+ .wen-wireframe-preview h1 { font-size: 1.4em; }
545
+ .wen-wireframe-preview h2 { font-size: 1.2em; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.2rem; }
546
+ .wen-wireframe-preview h3 { font-size: 1.1em; }
547
+ .wen-wireframe-preview p { margin-top: 0; margin-bottom: 0.75rem; }
548
+ .wen-wireframe-preview p:last-child { margin-bottom: 0; }
549
+ .wen-wireframe-preview blockquote { border-left: 3px solid #cbd5e1; margin: 0; padding-left: 1rem; color: #64748b; }
550
+
551
+ /* The WYSIWYG Trigger Button */
552
+ .wen-wireframe-edit-btn {
553
+ background: #3b82f6; color: white; border: none; border-radius: var(--wen-radius-sm);
554
+ padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: bold; cursor: pointer;
555
+ transition: background 0.15s; width: 100%; text-align: left;
556
+ }
557
+ .wen-wireframe-edit-btn:hover { background: #2563eb; }
558
+
559
+ /* The Custom Tag & Markdown Preview Styles */
560
+ .wen-preview-tag {
561
+ font-family: var(--wen-font-mono);
562
+ color: #8b5cf6;
563
+ font-weight: bold;
564
+ font-size: 0.8rem;
565
+ background: rgba(139, 92, 246, 0.1);
566
+ display: inline-block;
567
+ padding: 0.1rem 0.4rem;
568
+ border-radius: 4px;
569
+ margin: 0.25rem 0;
570
+ }
571
+
572
+ .wen-preview-md p:first-child { margin-top: 0; }
573
+ .wen-preview-md p:last-child { margin-bottom: 0; }.wen-mermaid-block {
574
+ border: 2px solid #0d9488;
575
+ border-radius: var(--wen-radius);
576
+ margin: 1.5rem 0;
577
+ background: var(--wen-bg);
578
+ box-sizing: border-box;
579
+ }
580
+
581
+ .wen-mermaid-block *, .wen-mermaid-block *::before, .wen-mermaid-block *::after {
582
+ box-sizing: border-box;
583
+ }
584
+
585
+ .wen-mermaid-header {
586
+ display: flex;
587
+ justify-content: space-between;
588
+ align-items: center;
589
+ border-bottom: 2px solid #0d9488;
590
+ padding: 0.5rem 1rem;
591
+ background: #0d9488;
592
+ color: white;
593
+ border-top-left-radius: calc(var(--wen-radius) - 2px);
594
+ border-top-right-radius: calc(var(--wen-radius) - 2px);
595
+ }
596
+
597
+ .wen-mermaid-title { font-size: 0.85rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; }
598
+ .wen-mermaid-toggle-btn { background: var(--wen-bg); border: none; color: var(--wen-text-main); cursor: pointer; font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: var(--wen-radius-sm); font-weight: 600; transition: background 0.15s; }
599
+ .wen-mermaid-toggle-btn:hover { background: var(--wen-surface-hover); }
600
+
601
+ /* THE FIX: Hard-lock the display states so they cannot both show at once */
602
+ .wen-mermaid-view-visual, .wen-mermaid-view-raw {
603
+ display: none !important;
604
+ padding: 1rem;
605
+ }
606
+ .wen-mermaid-view-visual.active, .wen-mermaid-view-raw.active {
607
+ display: block !important;
608
+ }
609
+
610
+ /* Ensure the SVG scales nicely and forces dark text */
611
+ .wen-mermaid-view-visual {
612
+ text-align: center;
613
+ overflow-x: auto;
614
+ background: var(--wen-surface);
615
+ border-bottom-left-radius: var(--wen-radius);
616
+ border-bottom-right-radius: var(--wen-radius);
617
+ color: #1f2937 !important;
618
+ }
619
+ .wen-mermaid-view-visual svg { max-width: 100%; height: auto !important; color: #1f2937; }
620
+
621
+ .wen-mermaid-raw-input { width: 100%; min-height: 250px; border: 1px solid var(--wen-border); border-radius: var(--wen-radius-sm); padding: 0.75rem; font-family: var(--wen-font-mono); font-size: 0.9rem; background: #1e1e1e; color: #d4d4d4; resize: vertical; outline: none; }
622
+ .wen-mermaid-error { color: var(--wen-danger); font-family: var(--wen-font-mono); font-size: 0.85rem; text-align: left; background: #fef2f2; padding: 1rem; border-radius: var(--wen-radius-sm); border-left: 4px solid var(--wen-danger); white-space: pre-wrap; }.wen-chart-block *, .wen-chart-block *::before, .wen-chart-block *::after {
623
+ box-sizing: border-box;
624
+ }
625
+
626
+ .wen-chart-block {
627
+ border: 2px solid #8250df;
628
+ border-radius: var(--wen-radius);
629
+ margin: 1.5rem 0;
630
+ background: var(--wen-bg);
631
+ box-sizing: border-box;
632
+ }
633
+
634
+ .wen-chart-header {
635
+ display: flex;
636
+ justify-content: space-between;
637
+ align-items: center;
638
+ border-bottom: 2px solid #8250df;
639
+ padding: 0.5rem 1rem;
640
+ background: #8250df;
641
+ color: white;
642
+ border-top-left-radius: calc(var(--wen-radius) - 2px);
643
+ border-top-right-radius: calc(var(--wen-radius) - 2px);
644
+ }
645
+
646
+ .wen-chart-title { font-size: 0.85rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; }
647
+ .wen-chart-toggle-btn { background: var(--wen-bg); border: none; color: var(--wen-text-main); cursor: pointer; font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: var(--wen-radius-sm); font-weight: 600; transition: background 0.15s; }
648
+ .wen-chart-toggle-btn:hover { background: var(--wen-surface-hover); }
649
+
650
+ .wen-chart-view-visual, .wen-chart-view-raw { display: none !important; padding: 1rem; }
651
+ .wen-chart-view-visual.active, .wen-chart-view-raw.active { display: block !important; }
652
+
653
+ .wen-chart-raw-input { width: 100%; min-height: 200px; border: 1px solid var(--wen-border); border-radius: var(--wen-radius-sm); padding: 0.75rem; font-family: var(--wen-font-mono); font-size: 0.9rem; background: #1e1e1e; color: #d4d4d4; resize: vertical; outline: none; white-space: pre; }
654
+ .wen-chart-error { color: var(--wen-danger); font-family: var(--wen-font-mono); font-size: 0.85rem; background: #fef2f2; padding: 1rem; border-radius: var(--wen-radius-sm); border-left: 4px solid var(--wen-danger); }