@mobile-reality/mdma-renderer-vue 0.2.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.
Files changed (92) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +117 -0
  3. package/dist/components/ApprovalGateRenderer.d.ts +40 -0
  4. package/dist/components/ApprovalGateRenderer.d.ts.map +1 -0
  5. package/dist/components/ApprovalGateRenderer.js +48 -0
  6. package/dist/components/ApprovalGateRenderer.js.map +1 -0
  7. package/dist/components/ButtonRenderer.d.ts +40 -0
  8. package/dist/components/ButtonRenderer.d.ts.map +1 -0
  9. package/dist/components/ButtonRenderer.js +28 -0
  10. package/dist/components/ButtonRenderer.js.map +1 -0
  11. package/dist/components/CalloutRenderer.d.ts +40 -0
  12. package/dist/components/CalloutRenderer.d.ts.map +1 -0
  13. package/dist/components/CalloutRenderer.js +39 -0
  14. package/dist/components/CalloutRenderer.js.map +1 -0
  15. package/dist/components/ChartRenderer.d.ts +45 -0
  16. package/dist/components/ChartRenderer.d.ts.map +1 -0
  17. package/dist/components/ChartRenderer.js +66 -0
  18. package/dist/components/ChartRenderer.js.map +1 -0
  19. package/dist/components/CustomRenderer.d.ts +45 -0
  20. package/dist/components/CustomRenderer.d.ts.map +1 -0
  21. package/dist/components/CustomRenderer.js +32 -0
  22. package/dist/components/CustomRenderer.js.map +1 -0
  23. package/dist/components/FormRenderer.d.ts +41 -0
  24. package/dist/components/FormRenderer.d.ts.map +1 -0
  25. package/dist/components/FormRenderer.js +291 -0
  26. package/dist/components/FormRenderer.js.map +1 -0
  27. package/dist/components/MdastRenderer.d.ts +37 -0
  28. package/dist/components/MdastRenderer.d.ts.map +1 -0
  29. package/dist/components/MdastRenderer.js +102 -0
  30. package/dist/components/MdastRenderer.js.map +1 -0
  31. package/dist/components/MdmaBlock.d.ts +36 -0
  32. package/dist/components/MdmaBlock.d.ts.map +1 -0
  33. package/dist/components/MdmaBlock.js +40 -0
  34. package/dist/components/MdmaBlock.js.map +1 -0
  35. package/dist/components/MdmaBlockLoading.d.ts +29 -0
  36. package/dist/components/MdmaBlockLoading.d.ts.map +1 -0
  37. package/dist/components/MdmaBlockLoading.js +30 -0
  38. package/dist/components/MdmaBlockLoading.js.map +1 -0
  39. package/dist/components/MdmaDocument.d.ts +109 -0
  40. package/dist/components/MdmaDocument.d.ts.map +1 -0
  41. package/dist/components/MdmaDocument.js +190 -0
  42. package/dist/components/MdmaDocument.js.map +1 -0
  43. package/dist/components/TableRenderer.d.ts +40 -0
  44. package/dist/components/TableRenderer.d.ts.map +1 -0
  45. package/dist/components/TableRenderer.js +65 -0
  46. package/dist/components/TableRenderer.js.map +1 -0
  47. package/dist/components/TasklistRenderer.d.ts +40 -0
  48. package/dist/components/TasklistRenderer.d.ts.map +1 -0
  49. package/dist/components/TasklistRenderer.js +49 -0
  50. package/dist/components/TasklistRenderer.js.map +1 -0
  51. package/dist/components/ThinkingRenderer.d.ts +45 -0
  52. package/dist/components/ThinkingRenderer.d.ts.map +1 -0
  53. package/dist/components/ThinkingRenderer.js +48 -0
  54. package/dist/components/ThinkingRenderer.js.map +1 -0
  55. package/dist/components/WebhookRenderer.d.ts +40 -0
  56. package/dist/components/WebhookRenderer.d.ts.map +1 -0
  57. package/dist/components/WebhookRenderer.js +41 -0
  58. package/dist/components/WebhookRenderer.js.map +1 -0
  59. package/dist/composables/use-document-store.d.ts +22 -0
  60. package/dist/composables/use-document-store.d.ts.map +1 -0
  61. package/dist/composables/use-document-store.js +84 -0
  62. package/dist/composables/use-document-store.js.map +1 -0
  63. package/dist/context/CustomVariantContext.d.ts +41 -0
  64. package/dist/context/CustomVariantContext.d.ts.map +1 -0
  65. package/dist/context/CustomVariantContext.js +17 -0
  66. package/dist/context/CustomVariantContext.js.map +1 -0
  67. package/dist/context/ElementOverridesContext.d.ts +111 -0
  68. package/dist/context/ElementOverridesContext.d.ts.map +1 -0
  69. package/dist/context/ElementOverridesContext.js +31 -0
  70. package/dist/context/ElementOverridesContext.js.map +1 -0
  71. package/dist/context/MdmaProvider.d.ts +50 -0
  72. package/dist/context/MdmaProvider.d.ts.map +1 -0
  73. package/dist/context/MdmaProvider.js +35 -0
  74. package/dist/context/MdmaProvider.js.map +1 -0
  75. package/dist/index.d.ts +21 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +21 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/renderers/renderer-props.d.ts +51 -0
  80. package/dist/renderers/renderer-props.d.ts.map +1 -0
  81. package/dist/renderers/renderer-props.js +30 -0
  82. package/dist/renderers/renderer-props.js.map +1 -0
  83. package/dist/renderers/renderer-registry.d.ts +18 -0
  84. package/dist/renderers/renderer-registry.d.ts.map +1 -0
  85. package/dist/renderers/renderer-registry.js +52 -0
  86. package/dist/renderers/renderer-registry.js.map +1 -0
  87. package/dist/theme/MdmaThemeProvider.d.ts +152 -0
  88. package/dist/theme/MdmaThemeProvider.d.ts.map +1 -0
  89. package/dist/theme/MdmaThemeProvider.js +169 -0
  90. package/dist/theme/MdmaThemeProvider.js.map +1 -0
  91. package/package.json +60 -0
  92. package/styles.css +1045 -0
package/styles.css ADDED
@@ -0,0 +1,1045 @@
1
+ /* ===== MDMA Theme Tokens =====
2
+ *
3
+ * Every color/radius/size below is driven by a CSS custom property so the look
4
+ * can be themed without touching component markup. The default values encode
5
+ * the built-in *light* theme, so importing this stylesheet with no theme set
6
+ * renders exactly as before — theming is opt-in.
7
+ *
8
+ * How the knobs are set:
9
+ * - No theme → these defaults apply (light).
10
+ * - theme="light|dark" → `data-theme` on the root swaps the palette (below).
11
+ * - theme="auto" → follows `prefers-color-scheme`.
12
+ * - a custom MdmaTheme → `MdmaThemeProvider` writes the public `--mdma-*`
13
+ * tokens inline on the root, overriding these.
14
+ *
15
+ * `--mdma-color-*` names ending without a `-text`/`-bg` suffix that also appear
16
+ * on the `MdmaTheme` TS type are the *public* tokens a custom theme can set.
17
+ * The rest are internal derivations that follow the light/dark palette.
18
+ */
19
+ .mdma-document,
20
+ .mdma-theme-root {
21
+ /* Public palette (mirrors the MdmaTheme `colors` shape) */
22
+ --mdma-color-background: #ffffff;
23
+ --mdma-color-surface: #f8f9fa;
24
+ --mdma-color-text: #333333;
25
+ --mdma-color-text-muted: #666666;
26
+ --mdma-color-border: #e0e0e0;
27
+ --mdma-color-primary: #6c5ce7;
28
+ --mdma-color-on-primary: #ffffff;
29
+ --mdma-color-secondary: #dfe6e9;
30
+ --mdma-color-on-secondary: #2d3436;
31
+ --mdma-color-danger: #e74c3c;
32
+ --mdma-color-on-danger: #ffffff;
33
+ --mdma-color-info: #3498db;
34
+ --mdma-color-info-bg: #ebf5fb;
35
+ --mdma-color-warning: #f39c12;
36
+ --mdma-color-warning-bg: #fef9e7;
37
+ --mdma-color-error: #e74c3c;
38
+ --mdma-color-error-bg: #fdedec;
39
+ --mdma-color-success: #27ae60;
40
+ --mdma-color-success-bg: #eafaf1;
41
+
42
+ /* Internal derivations (follow the palette; not on the public TS type) */
43
+ --mdma-color-heading: #1a1a2e;
44
+ --mdma-color-text-subtle: #555555;
45
+ --mdma-color-border-subtle: #f0f0f0;
46
+ --mdma-color-primary-hover: color-mix(in srgb, var(--mdma-color-primary) 85%, #000000);
47
+ --mdma-color-secondary-hover: color-mix(in srgb, var(--mdma-color-secondary) 88%, #000000);
48
+ --mdma-color-danger-hover: color-mix(in srgb, var(--mdma-color-danger) 84%, #000000);
49
+ --mdma-color-input-bg: #fafafa;
50
+ --mdma-color-focus-ring: color-mix(in srgb, var(--mdma-color-primary) 22%, transparent);
51
+ --mdma-color-info-text: #1a5276;
52
+ --mdma-color-warning-text: #7d6608;
53
+ --mdma-color-error-text: #78281f;
54
+ --mdma-color-success-text: #1e8449;
55
+ --mdma-color-code-bg: #1e1e2e;
56
+ --mdma-color-code-text: #e0e0e0;
57
+ --mdma-color-inline-code-bg: #f0f0f5;
58
+ --mdma-color-inline-code-text: #c0392b;
59
+ --mdma-color-loading-bg: #ffffff;
60
+ --mdma-color-loading-border: #c4bfff;
61
+ --mdma-color-loading-accent: #6c63ff;
62
+ --mdma-color-loading-text: #8b82d4;
63
+ --mdma-color-table-header-bg: #f8f9fa;
64
+ --mdma-color-row-hover: #f8f9fa;
65
+ --mdma-color-blockquote-bg: #f8f8ff;
66
+ --mdma-color-chart-bg: rgba(255, 255, 255, 0.02);
67
+ --mdma-color-chart-border: rgba(108, 92, 231, 0.15);
68
+ --mdma-color-chart-label: #a29bfe;
69
+ --mdma-color-chart-axis: #636e72;
70
+ --mdma-color-chart-legend: #b2bec3;
71
+ --mdma-color-chart-tooltip-bg: #1a1a2e;
72
+ --mdma-color-unknown-bg: #fff3cd;
73
+ --mdma-color-unknown-border: #ffc107;
74
+ --mdma-color-unknown-text: #856404;
75
+
76
+ /* Radius / spacing / font-size scales (mirror the MdmaTheme numeric tokens) */
77
+ --mdma-radius-sm: 6px;
78
+ --mdma-radius-md: 10px;
79
+ --mdma-spacing-xs: 4px;
80
+ --mdma-spacing-sm: 8px;
81
+ --mdma-spacing-md: 12px;
82
+ --mdma-spacing-lg: 16px;
83
+ --mdma-font-size-small: 13px;
84
+ --mdma-font-size-body: 14px;
85
+ --mdma-font-size-label: 15px;
86
+ --mdma-font-size-title: 18px;
87
+ }
88
+
89
+ /* ===== Built-in dark palette ===== */
90
+ .mdma-document[data-theme="dark"],
91
+ .mdma-theme-root[data-theme="dark"] {
92
+ --mdma-color-background: #151a26;
93
+ --mdma-color-surface: #1c2333;
94
+ --mdma-color-text: #e5e7eb;
95
+ --mdma-color-text-muted: #9ca3af;
96
+ --mdma-color-border: #2a3140;
97
+ --mdma-color-primary: #8b7ff0;
98
+ --mdma-color-on-primary: #ffffff;
99
+ --mdma-color-secondary: #2a3140;
100
+ --mdma-color-on-secondary: #e5e7eb;
101
+ --mdma-color-danger: #ef4444;
102
+ --mdma-color-on-danger: #ffffff;
103
+ --mdma-color-info: #5dade2;
104
+ --mdma-color-info-bg: #16283a;
105
+ --mdma-color-warning: #f5b041;
106
+ --mdma-color-warning-bg: #2a2412;
107
+ --mdma-color-error: #ef4444;
108
+ --mdma-color-error-bg: #2a1717;
109
+ --mdma-color-success: #2ecc71;
110
+ --mdma-color-success-bg: #12251a;
111
+
112
+ --mdma-color-heading: #f3f4f6;
113
+ --mdma-color-text-subtle: #cbd0d8;
114
+ --mdma-color-border-subtle: #232a38;
115
+ --mdma-color-primary-hover: color-mix(in srgb, var(--mdma-color-primary) 80%, #ffffff);
116
+ --mdma-color-secondary-hover: color-mix(in srgb, var(--mdma-color-secondary) 78%, #ffffff);
117
+ --mdma-color-danger-hover: color-mix(in srgb, var(--mdma-color-danger) 80%, #ffffff);
118
+ --mdma-color-input-bg: #10141d;
119
+ --mdma-color-focus-ring: color-mix(in srgb, var(--mdma-color-primary) 35%, transparent);
120
+ --mdma-color-info-text: #aed6f1;
121
+ --mdma-color-warning-text: #f8c471;
122
+ --mdma-color-error-text: #f5b7b1;
123
+ --mdma-color-success-text: #a9dfbf;
124
+ --mdma-color-code-bg: #0d1017;
125
+ --mdma-color-code-text: #e0e0e0;
126
+ --mdma-color-inline-code-bg: #232a38;
127
+ --mdma-color-inline-code-text: #f19999;
128
+ --mdma-color-loading-bg: #1c2333;
129
+ --mdma-color-loading-border: #3a3466;
130
+ --mdma-color-loading-accent: #8b7ff0;
131
+ --mdma-color-loading-text: #a29bfe;
132
+ --mdma-color-table-header-bg: #1c2333;
133
+ --mdma-color-row-hover: #1c2333;
134
+ --mdma-color-blockquote-bg: #1c2333;
135
+ --mdma-color-chart-bg: rgba(255, 255, 255, 0.02);
136
+ --mdma-color-chart-border: rgba(162, 155, 254, 0.2);
137
+ --mdma-color-chart-label: #a29bfe;
138
+ --mdma-color-chart-axis: #9ca3af;
139
+ --mdma-color-chart-legend: #b2bec3;
140
+ --mdma-color-chart-tooltip-bg: #0d1017;
141
+ --mdma-color-unknown-bg: #2a2412;
142
+ --mdma-color-unknown-border: #b7950b;
143
+ --mdma-color-unknown-text: #f8c471;
144
+ }
145
+
146
+ /* theme="auto" — same dark palette, gated on the OS preference. */
147
+ @media (prefers-color-scheme: dark) {
148
+ .mdma-document[data-theme="auto"],
149
+ .mdma-theme-root[data-theme="auto"] {
150
+ --mdma-color-background: #151a26;
151
+ --mdma-color-surface: #1c2333;
152
+ --mdma-color-text: #e5e7eb;
153
+ --mdma-color-text-muted: #9ca3af;
154
+ --mdma-color-border: #2a3140;
155
+ --mdma-color-primary: #8b7ff0;
156
+ --mdma-color-on-primary: #ffffff;
157
+ --mdma-color-secondary: #2a3140;
158
+ --mdma-color-on-secondary: #e5e7eb;
159
+ --mdma-color-danger: #ef4444;
160
+ --mdma-color-on-danger: #ffffff;
161
+ --mdma-color-info: #5dade2;
162
+ --mdma-color-info-bg: #16283a;
163
+ --mdma-color-warning: #f5b041;
164
+ --mdma-color-warning-bg: #2a2412;
165
+ --mdma-color-error: #ef4444;
166
+ --mdma-color-error-bg: #2a1717;
167
+ --mdma-color-success: #2ecc71;
168
+ --mdma-color-success-bg: #12251a;
169
+
170
+ --mdma-color-heading: #f3f4f6;
171
+ --mdma-color-text-subtle: #cbd0d8;
172
+ --mdma-color-border-subtle: #232a38;
173
+ --mdma-color-primary-hover: color-mix(in srgb, var(--mdma-color-primary) 80%, #ffffff);
174
+ --mdma-color-secondary-hover: color-mix(in srgb, var(--mdma-color-secondary) 78%, #ffffff);
175
+ --mdma-color-danger-hover: color-mix(in srgb, var(--mdma-color-danger) 80%, #ffffff);
176
+ --mdma-color-input-bg: #10141d;
177
+ --mdma-color-focus-ring: color-mix(in srgb, var(--mdma-color-primary) 35%, transparent);
178
+ --mdma-color-info-text: #aed6f1;
179
+ --mdma-color-warning-text: #f8c471;
180
+ --mdma-color-error-text: #f5b7b1;
181
+ --mdma-color-success-text: #a9dfbf;
182
+ --mdma-color-code-bg: #0d1017;
183
+ --mdma-color-code-text: #e0e0e0;
184
+ --mdma-color-inline-code-bg: #232a38;
185
+ --mdma-color-inline-code-text: #f19999;
186
+ --mdma-color-loading-bg: #1c2333;
187
+ --mdma-color-loading-border: #3a3466;
188
+ --mdma-color-loading-accent: #8b7ff0;
189
+ --mdma-color-loading-text: #a29bfe;
190
+ --mdma-color-table-header-bg: #1c2333;
191
+ --mdma-color-row-hover: #1c2333;
192
+ --mdma-color-blockquote-bg: #1c2333;
193
+ --mdma-color-chart-bg: rgba(255, 255, 255, 0.02);
194
+ --mdma-color-chart-border: rgba(162, 155, 254, 0.2);
195
+ --mdma-color-chart-label: #a29bfe;
196
+ --mdma-color-chart-axis: #9ca3af;
197
+ --mdma-color-chart-legend: #b2bec3;
198
+ --mdma-color-chart-tooltip-bg: #0d1017;
199
+ --mdma-color-unknown-bg: #2a2412;
200
+ --mdma-color-unknown-border: #b7950b;
201
+ --mdma-color-unknown-text: #f8c471;
202
+ }
203
+ }
204
+
205
+ /* ===== MDMA Document ===== */
206
+ .mdma-document {
207
+ max-width: 720px;
208
+ margin: 0 auto;
209
+ color: var(--mdma-color-text);
210
+ font-size: var(--mdma-font-size-body);
211
+ }
212
+
213
+ /* ===== Entrance animation for all MDMA children ===== */
214
+ @keyframes mdma-fade-in-up {
215
+ from {
216
+ opacity: 0;
217
+ transform: translateY(8px);
218
+ }
219
+ to {
220
+ opacity: 1;
221
+ transform: translateY(0);
222
+ }
223
+ }
224
+
225
+ .mdma-document > * {
226
+ animation: mdma-fade-in-up 0.3s ease-out both;
227
+ }
228
+
229
+ /* ===== MDMA Block Loading Skeleton ===== */
230
+ @keyframes mdma-loading-enter {
231
+ from {
232
+ opacity: 0;
233
+ transform: translateY(12px) scale(0.97);
234
+ }
235
+ to {
236
+ opacity: 1;
237
+ transform: translateY(0) scale(1);
238
+ }
239
+ }
240
+
241
+ .mdma-block-loading {
242
+ position: relative;
243
+ overflow: hidden;
244
+ background: var(--mdma-color-loading-bg);
245
+ border: 1px dashed var(--mdma-color-loading-border);
246
+ border-radius: var(--mdma-radius-md);
247
+ padding: 28px 24px;
248
+ margin-bottom: 20px;
249
+ min-height: 80px;
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: center;
253
+ animation: mdma-loading-enter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
254
+ }
255
+
256
+ .mdma-block-loading-shimmer {
257
+ position: absolute;
258
+ inset: 0;
259
+ background: linear-gradient(
260
+ 90deg,
261
+ transparent 0%,
262
+ rgba(108, 99, 255, 0.05) 30%,
263
+ rgba(108, 99, 255, 0.1) 50%,
264
+ rgba(108, 99, 255, 0.05) 70%,
265
+ transparent 100%
266
+ );
267
+ animation: mdma-shimmer 2s ease-in-out infinite;
268
+ }
269
+
270
+ @keyframes mdma-shimmer {
271
+ 0% {
272
+ transform: translateX(-100%);
273
+ }
274
+ 100% {
275
+ transform: translateX(100%);
276
+ }
277
+ }
278
+
279
+ .mdma-block-loading-content {
280
+ position: relative;
281
+ display: flex;
282
+ align-items: center;
283
+ gap: 10px;
284
+ color: var(--mdma-color-loading-text);
285
+ font-size: 13px;
286
+ }
287
+
288
+ .mdma-block-loading-icon {
289
+ width: 18px;
290
+ height: 18px;
291
+ border: 2px solid rgba(108, 99, 255, 0.2);
292
+ border-top-color: var(--mdma-color-loading-accent);
293
+ border-radius: 50%;
294
+ animation: mdma-spin 0.8s linear infinite;
295
+ }
296
+
297
+ @keyframes mdma-spin {
298
+ to {
299
+ transform: rotate(360deg);
300
+ }
301
+ }
302
+
303
+ .mdma-block-loading-text {
304
+ font-style: italic;
305
+ }
306
+
307
+ /* ===== Rendered component entrance (replacing loading skeleton) ===== */
308
+ @keyframes mdma-component-enter {
309
+ from {
310
+ opacity: 0;
311
+ transform: scale(0.98);
312
+ }
313
+ to {
314
+ opacity: 1;
315
+ transform: scale(1);
316
+ }
317
+ }
318
+
319
+ .mdma-form,
320
+ .mdma-tasklist,
321
+ .mdma-table,
322
+ .mdma-callout,
323
+ .mdma-approval-gate,
324
+ .mdma-webhook,
325
+ .mdma-button,
326
+ .mdma-thinking {
327
+ animation: mdma-component-enter 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
328
+ }
329
+
330
+ /* ===== Markdown content entrance ===== */
331
+ .mdma-markdown-content {
332
+ margin-bottom: 12px;
333
+ animation: mdma-fade-in-up 0.25s ease-out both;
334
+ }
335
+
336
+ .mdma-markdown-content h1,
337
+ .mdma-markdown-content h2,
338
+ .mdma-markdown-content h3,
339
+ .mdma-markdown-content h4,
340
+ .mdma-markdown-content h5,
341
+ .mdma-markdown-content h6 {
342
+ margin: 16px 0 8px;
343
+ font-weight: 600;
344
+ line-height: 1.3;
345
+ color: var(--mdma-color-heading);
346
+ }
347
+
348
+ .mdma-markdown-content h1 {
349
+ font-size: 1.8em;
350
+ }
351
+ .mdma-markdown-content h2 {
352
+ font-size: 1.4em;
353
+ }
354
+ .mdma-markdown-content h3 {
355
+ font-size: 1.15em;
356
+ }
357
+ .mdma-markdown-content h4 {
358
+ font-size: 1em;
359
+ }
360
+
361
+ .mdma-markdown-content p {
362
+ margin: 0 0 10px;
363
+ line-height: 1.65;
364
+ }
365
+
366
+ .mdma-markdown-content ul,
367
+ .mdma-markdown-content ol {
368
+ margin: 0 0 10px;
369
+ padding-left: 24px;
370
+ }
371
+
372
+ .mdma-markdown-content li {
373
+ margin-bottom: 4px;
374
+ }
375
+
376
+ .mdma-markdown-content li.mdast-task-item {
377
+ list-style: none;
378
+ margin-left: -24px;
379
+ display: flex;
380
+ align-items: baseline;
381
+ gap: 6px;
382
+ }
383
+
384
+ .mdma-markdown-content blockquote {
385
+ margin: 0 0 10px;
386
+ padding: 8px 16px;
387
+ border-left: 3px solid var(--mdma-color-primary);
388
+ background: var(--mdma-color-blockquote-bg);
389
+ color: var(--mdma-color-text-subtle);
390
+ }
391
+
392
+ .mdma-markdown-content blockquote p:last-child {
393
+ margin-bottom: 0;
394
+ }
395
+
396
+ .mdma-markdown-content pre.mdast-code-block {
397
+ margin: 0 0 10px;
398
+ padding: 12px 16px;
399
+ background: var(--mdma-color-code-bg);
400
+ color: var(--mdma-color-code-text);
401
+ border-radius: var(--mdma-radius-sm);
402
+ overflow-x: auto;
403
+ font-size: 13px;
404
+ line-height: 1.5;
405
+ }
406
+
407
+ .mdma-markdown-content pre.mdast-code-block code {
408
+ background: none;
409
+ padding: 0;
410
+ font-size: inherit;
411
+ color: inherit;
412
+ }
413
+
414
+ .mdma-markdown-content code.mdast-inline-code {
415
+ background: var(--mdma-color-inline-code-bg);
416
+ padding: 2px 6px;
417
+ border-radius: 3px;
418
+ font-size: 0.9em;
419
+ color: var(--mdma-color-inline-code-text);
420
+ }
421
+
422
+ .mdma-markdown-content hr {
423
+ margin: 16px 0;
424
+ border: none;
425
+ border-top: 1px solid var(--mdma-color-border);
426
+ }
427
+
428
+ .mdma-markdown-content a {
429
+ color: var(--mdma-color-primary);
430
+ text-decoration: none;
431
+ }
432
+
433
+ .mdma-markdown-content a:hover {
434
+ text-decoration: underline;
435
+ }
436
+
437
+ .mdma-markdown-content img {
438
+ max-width: 100%;
439
+ height: auto;
440
+ border-radius: var(--mdma-radius-sm);
441
+ }
442
+
443
+ .mdma-markdown-content table.mdast-table {
444
+ width: 100%;
445
+ border-collapse: collapse;
446
+ margin: 0 0 10px;
447
+ font-size: 14px;
448
+ }
449
+
450
+ .mdma-markdown-content table.mdast-table th,
451
+ .mdma-markdown-content table.mdast-table td {
452
+ padding: 8px 12px;
453
+ border: 1px solid var(--mdma-color-border);
454
+ text-align: left;
455
+ }
456
+
457
+ .mdma-markdown-content table.mdast-table th {
458
+ background: var(--mdma-color-table-header-bg);
459
+ font-weight: 600;
460
+ }
461
+
462
+ .mdma-markdown-content table.mdast-table tbody tr:hover {
463
+ background: var(--mdma-color-row-hover);
464
+ }
465
+
466
+ .mdma-markdown-content strong {
467
+ font-weight: 600;
468
+ }
469
+
470
+ .mdma-markdown-content em {
471
+ font-style: italic;
472
+ }
473
+
474
+ .mdma-markdown-content del {
475
+ text-decoration: line-through;
476
+ color: var(--mdma-color-text-muted);
477
+ }
478
+
479
+ /* ===== Form ===== */
480
+ .mdma-form {
481
+ background: var(--mdma-color-background);
482
+ border: 1px solid var(--mdma-color-border);
483
+ border-radius: var(--mdma-radius-md);
484
+ padding: 24px;
485
+ margin-bottom: 20px;
486
+ }
487
+
488
+ .mdma-form-label {
489
+ font-size: var(--mdma-font-size-title);
490
+ font-weight: 600;
491
+ margin-bottom: 16px;
492
+ color: var(--mdma-color-heading);
493
+ }
494
+
495
+ .mdma-form-field {
496
+ margin-bottom: var(--mdma-spacing-lg);
497
+ }
498
+
499
+ .mdma-form-field label {
500
+ display: block;
501
+ font-size: 13px;
502
+ font-weight: 600;
503
+ color: var(--mdma-color-text-subtle);
504
+ margin-bottom: var(--mdma-spacing-xs);
505
+ }
506
+
507
+ .mdma-form-field input[type="text"],
508
+ .mdma-form-field input[type="email"],
509
+ .mdma-form-field input[type="password"],
510
+ .mdma-form-field input[type="number"],
511
+ .mdma-form-field input[type="datetime"],
512
+ .mdma-form-field input[type="datetime-local"],
513
+ .mdma-form-field select,
514
+ .mdma-form-field textarea {
515
+ width: 100%;
516
+ padding: 8px 12px;
517
+ font-size: 14px;
518
+ border: 1px solid var(--mdma-color-border);
519
+ border-radius: var(--mdma-radius-sm);
520
+ background: var(--mdma-color-input-bg);
521
+ color: var(--mdma-color-text);
522
+ transition: border-color 0.15s, box-shadow 0.15s;
523
+ outline: none;
524
+ }
525
+
526
+ .mdma-form-field input:focus,
527
+ .mdma-form-field select:focus,
528
+ .mdma-form-field textarea:focus {
529
+ border-color: var(--mdma-color-primary);
530
+ box-shadow: 0 0 0 3px var(--mdma-color-focus-ring);
531
+ }
532
+
533
+ .mdma-form-field textarea {
534
+ min-height: 80px;
535
+ resize: vertical;
536
+ }
537
+
538
+ .mdma-form-field input[type="checkbox"] {
539
+ width: auto;
540
+ margin-right: 8px;
541
+ accent-color: var(--mdma-color-primary);
542
+ }
543
+
544
+ .mdma-input-wrapper {
545
+ display: flex;
546
+ align-items: center;
547
+ position: relative;
548
+ }
549
+
550
+ .mdma-input-wrapper input,
551
+ .mdma-input-wrapper textarea {
552
+ flex: 1;
553
+ padding-right: 36px;
554
+ }
555
+
556
+ .mdma-sensitive-toggle {
557
+ position: absolute;
558
+ right: 8px;
559
+ top: 50%;
560
+ transform: translateY(-50%);
561
+ background: none;
562
+ border: none;
563
+ cursor: pointer;
564
+ font-size: 11px;
565
+ font-weight: 600;
566
+ letter-spacing: 0.04em;
567
+ color: var(--mdma-color-primary);
568
+ padding: 2px 4px;
569
+ opacity: 0.7;
570
+ transition: opacity 0.15s;
571
+ }
572
+
573
+ .mdma-sensitive-toggle:hover {
574
+ opacity: 1;
575
+ }
576
+
577
+ /* File inputs stack their file list below, so the wrapper is a column, not an overlay row. */
578
+ .mdma-input--file {
579
+ flex-direction: column;
580
+ align-items: flex-start;
581
+ gap: 8px;
582
+ }
583
+
584
+ .mdma-input--file input[type="file"] {
585
+ padding-right: 0;
586
+ }
587
+
588
+ .mdma-form-submit {
589
+ margin-top: 8px;
590
+ padding: 8px 20px;
591
+ font-size: 14px;
592
+ font-weight: 600;
593
+ color: var(--mdma-color-on-primary);
594
+ background: var(--mdma-color-primary);
595
+ border: none;
596
+ border-radius: var(--mdma-radius-sm);
597
+ cursor: pointer;
598
+ transition: background 0.15s;
599
+ }
600
+
601
+ .mdma-form-submit:hover {
602
+ background: var(--mdma-color-primary-hover);
603
+ }
604
+
605
+ /* ===== Button ===== */
606
+ .mdma-button {
607
+ display: inline-block;
608
+ padding: 10px 24px;
609
+ font-size: 14px;
610
+ font-weight: 600;
611
+ border: none;
612
+ border-radius: var(--mdma-radius-sm);
613
+ cursor: pointer;
614
+ transition: background 0.15s, transform 0.1s;
615
+ margin-bottom: 20px;
616
+ }
617
+
618
+ .mdma-button:active {
619
+ transform: scale(0.98);
620
+ }
621
+
622
+ .mdma-button--primary {
623
+ background: var(--mdma-color-primary);
624
+ color: var(--mdma-color-on-primary);
625
+ }
626
+
627
+ .mdma-button--primary:hover {
628
+ background: var(--mdma-color-primary-hover);
629
+ }
630
+
631
+ .mdma-button--secondary {
632
+ background: var(--mdma-color-secondary);
633
+ color: var(--mdma-color-on-secondary);
634
+ }
635
+
636
+ .mdma-button--secondary:hover {
637
+ background: var(--mdma-color-secondary-hover);
638
+ }
639
+
640
+ .mdma-button--danger {
641
+ background: var(--mdma-color-danger);
642
+ color: var(--mdma-color-on-danger);
643
+ }
644
+
645
+ .mdma-button--danger:hover {
646
+ background: var(--mdma-color-danger-hover);
647
+ }
648
+
649
+ /* ===== Tasklist ===== */
650
+ .mdma-tasklist {
651
+ background: var(--mdma-color-background);
652
+ border: 1px solid var(--mdma-color-border);
653
+ border-radius: var(--mdma-radius-md);
654
+ padding: 24px;
655
+ margin-bottom: 20px;
656
+ }
657
+
658
+ .mdma-tasklist-label {
659
+ font-size: var(--mdma-font-size-title);
660
+ font-weight: 600;
661
+ margin-bottom: 12px;
662
+ color: var(--mdma-color-heading);
663
+ }
664
+
665
+ .mdma-tasklist-items {
666
+ list-style: none;
667
+ }
668
+
669
+ .mdma-tasklist-item {
670
+ padding: 8px 0;
671
+ border-bottom: 1px solid var(--mdma-color-border-subtle);
672
+ }
673
+
674
+ .mdma-tasklist-item:last-child {
675
+ border-bottom: none;
676
+ }
677
+
678
+ .mdma-tasklist-item label {
679
+ display: flex;
680
+ align-items: center;
681
+ gap: 8px;
682
+ cursor: pointer;
683
+ font-size: 14px;
684
+ color: var(--mdma-color-text);
685
+ }
686
+
687
+ .mdma-tasklist-item input[type="checkbox"] {
688
+ accent-color: var(--mdma-color-primary);
689
+ width: 16px;
690
+ height: 16px;
691
+ }
692
+
693
+ .mdma-tasklist-item input[type="checkbox"]:checked + span {
694
+ text-decoration: line-through;
695
+ color: var(--mdma-color-text-muted);
696
+ }
697
+
698
+ /* ===== Table ===== */
699
+ .mdma-table {
700
+ background: var(--mdma-color-background);
701
+ border: 1px solid var(--mdma-color-border);
702
+ border-radius: var(--mdma-radius-md);
703
+ padding: 24px;
704
+ margin-bottom: 20px;
705
+ overflow-x: auto;
706
+ }
707
+
708
+ .mdma-table-label {
709
+ font-size: var(--mdma-font-size-title);
710
+ font-weight: 600;
711
+ margin-bottom: 12px;
712
+ color: var(--mdma-color-heading);
713
+ }
714
+
715
+ .mdma-table table {
716
+ width: 100%;
717
+ border-collapse: collapse;
718
+ }
719
+
720
+ .mdma-table th {
721
+ text-align: left;
722
+ padding: 10px 12px;
723
+ font-size: 12px;
724
+ font-weight: 600;
725
+ text-transform: uppercase;
726
+ letter-spacing: 0.5px;
727
+ color: var(--mdma-color-text-muted);
728
+ background: var(--mdma-color-table-header-bg);
729
+ border-bottom: 2px solid var(--mdma-color-border);
730
+ }
731
+
732
+ .mdma-table td {
733
+ padding: 10px 12px;
734
+ font-size: 14px;
735
+ border-bottom: 1px solid var(--mdma-color-border-subtle);
736
+ color: var(--mdma-color-text);
737
+ }
738
+
739
+ .mdma-table tr:hover td {
740
+ background: var(--mdma-color-row-hover);
741
+ }
742
+
743
+ .mdma-table-empty {
744
+ text-align: center;
745
+ padding: 20px;
746
+ color: var(--mdma-color-text-muted);
747
+ font-style: italic;
748
+ }
749
+
750
+ /* ===== Callout ===== */
751
+ .mdma-callout {
752
+ border-radius: var(--mdma-radius-md);
753
+ padding: 16px 20px;
754
+ margin-bottom: 20px;
755
+ position: relative;
756
+ border-left: 4px solid;
757
+ }
758
+
759
+ .mdma-callout--info {
760
+ background: var(--mdma-color-info-bg);
761
+ border-left-color: var(--mdma-color-info);
762
+ color: var(--mdma-color-info-text);
763
+ }
764
+
765
+ .mdma-callout--warning {
766
+ background: var(--mdma-color-warning-bg);
767
+ border-left-color: var(--mdma-color-warning);
768
+ color: var(--mdma-color-warning-text);
769
+ }
770
+
771
+ .mdma-callout--error {
772
+ background: var(--mdma-color-error-bg);
773
+ border-left-color: var(--mdma-color-error);
774
+ color: var(--mdma-color-error-text);
775
+ }
776
+
777
+ .mdma-callout--success {
778
+ background: var(--mdma-color-success-bg);
779
+ border-left-color: var(--mdma-color-success);
780
+ color: var(--mdma-color-success-text);
781
+ }
782
+
783
+ .mdma-callout-title {
784
+ display: block;
785
+ font-size: 14px;
786
+ font-weight: 700;
787
+ margin-bottom: 4px;
788
+ }
789
+
790
+ .mdma-callout-content {
791
+ font-size: 14px;
792
+ line-height: 1.5;
793
+ }
794
+
795
+ .mdma-callout-dismiss {
796
+ position: absolute;
797
+ top: 8px;
798
+ right: 12px;
799
+ background: none;
800
+ border: none;
801
+ font-size: 18px;
802
+ cursor: pointer;
803
+ color: inherit;
804
+ opacity: 0.6;
805
+ }
806
+
807
+ .mdma-callout-dismiss:hover {
808
+ opacity: 1;
809
+ }
810
+
811
+ /* ===== Approval Gate ===== */
812
+ .mdma-approval-gate {
813
+ background: var(--mdma-color-background);
814
+ border: 2px solid var(--mdma-color-border);
815
+ border-radius: var(--mdma-radius-md);
816
+ padding: 24px;
817
+ margin-bottom: 20px;
818
+ }
819
+
820
+ .mdma-approval-gate--pending {
821
+ border-color: var(--mdma-color-warning);
822
+ }
823
+
824
+ .mdma-approval-gate--approved {
825
+ border-color: var(--mdma-color-success);
826
+ background: var(--mdma-color-success-bg);
827
+ }
828
+
829
+ .mdma-approval-gate--denied {
830
+ border-color: var(--mdma-color-error);
831
+ background: var(--mdma-color-error-bg);
832
+ }
833
+
834
+ .mdma-approval-gate-title {
835
+ font-size: 16px;
836
+ font-weight: 600;
837
+ margin-bottom: 8px;
838
+ color: var(--mdma-color-heading);
839
+ }
840
+
841
+ .mdma-approval-gate-description {
842
+ font-size: 14px;
843
+ color: var(--mdma-color-text-subtle);
844
+ margin-bottom: 12px;
845
+ }
846
+
847
+ .mdma-approval-gate-status {
848
+ font-size: 13px;
849
+ color: var(--mdma-color-text-muted);
850
+ margin-bottom: 16px;
851
+ }
852
+
853
+ .mdma-approval-gate-status strong {
854
+ text-transform: uppercase;
855
+ letter-spacing: 0.5px;
856
+ }
857
+
858
+ .mdma-approval-gate--pending .mdma-approval-gate-status strong {
859
+ color: var(--mdma-color-warning);
860
+ }
861
+ .mdma-approval-gate--approved .mdma-approval-gate-status strong {
862
+ color: var(--mdma-color-success);
863
+ }
864
+ .mdma-approval-gate--denied .mdma-approval-gate-status strong {
865
+ color: var(--mdma-color-error);
866
+ }
867
+
868
+ .mdma-approval-gate-actions {
869
+ display: flex;
870
+ gap: 10px;
871
+ }
872
+
873
+ /* ===== Webhook ===== */
874
+ .mdma-webhook {
875
+ display: flex;
876
+ align-items: center;
877
+ gap: 10px;
878
+ padding: 12px 16px;
879
+ background: var(--mdma-color-background);
880
+ border: 1px solid var(--mdma-color-border);
881
+ border-radius: 8px;
882
+ margin-bottom: 20px;
883
+ font-size: 13px;
884
+ }
885
+
886
+ .mdma-webhook-label {
887
+ font-weight: 600;
888
+ color: var(--mdma-color-text);
889
+ }
890
+
891
+ .mdma-webhook-status {
892
+ padding: 2px 8px;
893
+ border-radius: 4px;
894
+ font-size: 12px;
895
+ font-weight: 500;
896
+ }
897
+
898
+ .mdma-webhook-status--idle {
899
+ background: var(--mdma-color-surface);
900
+ color: var(--mdma-color-text-muted);
901
+ }
902
+ .mdma-webhook-status--executing {
903
+ background: #ffeaa7;
904
+ color: #6b5900;
905
+ }
906
+ .mdma-webhook-status--success {
907
+ background: #55efc4;
908
+ color: #00473e;
909
+ }
910
+ .mdma-webhook-status--error {
911
+ background: #fab1a0;
912
+ color: #6b1900;
913
+ }
914
+
915
+ /* ===== Unknown Component ===== */
916
+ .mdma-unknown-component {
917
+ padding: 12px 16px;
918
+ background: var(--mdma-color-unknown-bg);
919
+ border: 1px solid var(--mdma-color-unknown-border);
920
+ border-radius: 8px;
921
+ color: var(--mdma-color-unknown-text);
922
+ font-size: 13px;
923
+ margin-bottom: 20px;
924
+ }
925
+
926
+ .mdma-chart {
927
+ background: var(--mdma-color-chart-bg);
928
+ border: 1px solid var(--mdma-color-chart-border);
929
+ border-radius: 14px;
930
+ padding: 18px;
931
+ margin-bottom: 20px;
932
+ animation: mdma-component-enter 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
933
+ }
934
+
935
+ .mdma-chart-label {
936
+ font-size: 14px;
937
+ font-weight: 700;
938
+ color: var(--mdma-color-chart-label);
939
+ margin-bottom: 12px;
940
+ }
941
+
942
+ .mdma-chart--empty {
943
+ min-height: 80px;
944
+ display: flex;
945
+ flex-direction: column;
946
+ }
947
+
948
+ .mdma-chart-empty {
949
+ flex: 1;
950
+ display: flex;
951
+ align-items: center;
952
+ justify-content: center;
953
+ color: var(--mdma-color-text-muted);
954
+ font-size: 13px;
955
+ font-style: italic;
956
+ }
957
+
958
+ /* recharts overrides for MDMA theme */
959
+ .mdma-chart .recharts-text {
960
+ fill: var(--mdma-color-chart-axis);
961
+ }
962
+
963
+ .mdma-chart .recharts-legend-item-text {
964
+ color: var(--mdma-color-chart-legend) !important;
965
+ font-size: 12px;
966
+ }
967
+
968
+ .mdma-chart .recharts-default-tooltip {
969
+ background: var(--mdma-color-chart-tooltip-bg) !important;
970
+ border: 1px solid rgba(162, 155, 254, 0.3) !important;
971
+ border-radius: 8px !important;
972
+ }
973
+ /* ─── Thinking Component (basic) ─────────────────────────────────────────── */
974
+
975
+ .mdma-thinking {
976
+ background: var(--mdma-color-background);
977
+ border: 1px solid var(--mdma-color-border);
978
+ border-radius: var(--mdma-radius-md);
979
+ margin: 16px 0;
980
+ overflow: hidden;
981
+ }
982
+
983
+ .mdma-thinking-summary {
984
+ display: flex;
985
+ align-items: center;
986
+ gap: 8px;
987
+ padding: 12px 16px;
988
+ cursor: pointer;
989
+ font-size: 14px;
990
+ font-weight: 600;
991
+ color: var(--mdma-color-text-subtle);
992
+ user-select: none;
993
+ list-style: none;
994
+ }
995
+
996
+ .mdma-thinking-summary::-webkit-details-marker {
997
+ display: none;
998
+ }
999
+
1000
+ .mdma-thinking-summary::after {
1001
+ content: "\25B6";
1002
+ font-size: 10px;
1003
+ margin-left: auto;
1004
+ transition: transform 0.2s;
1005
+ color: var(--mdma-color-text-muted);
1006
+ }
1007
+
1008
+ .mdma-thinking[open] .mdma-thinking-summary::after {
1009
+ transform: rotate(90deg);
1010
+ }
1011
+
1012
+ .mdma-thinking-indicator {
1013
+ display: inline-block;
1014
+ width: 8px;
1015
+ height: 8px;
1016
+ border-radius: 50%;
1017
+ background: var(--mdma-color-primary);
1018
+ animation: mdma-thinking-pulse 1.5s ease-in-out infinite;
1019
+ }
1020
+
1021
+ @keyframes mdma-thinking-pulse {
1022
+ 0%,
1023
+ 100% {
1024
+ opacity: 1;
1025
+ transform: scale(1);
1026
+ }
1027
+ 50% {
1028
+ opacity: 0.4;
1029
+ transform: scale(0.8);
1030
+ }
1031
+ }
1032
+
1033
+ .mdma-thinking-label {
1034
+ flex: 1;
1035
+ }
1036
+
1037
+ .mdma-thinking-content {
1038
+ padding: 0 16px 16px;
1039
+ font-size: 13px;
1040
+ line-height: 1.6;
1041
+ color: var(--mdma-color-text-subtle);
1042
+ white-space: pre-wrap;
1043
+ border-top: 1px solid var(--mdma-color-border-subtle);
1044
+ padding-top: 12px;
1045
+ }