@haklex/rich-renderer-mermaid 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +46 -0
- package/dist/MermaidEditRenderer.d.ts +4 -0
- package/dist/MermaidEditRenderer.d.ts.map +1 -0
- package/dist/MermaidRenderer.d.ts +5 -0
- package/dist/MermaidRenderer.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +2542 -0
- package/dist/mermaid-theme.d.ts +8 -0
- package/dist/mermaid-theme.d.ts.map +1 -0
- package/dist/rich-renderer-mermaid.css +398 -0
- package/dist/styles.css.d.ts +42 -0
- package/dist/styles.css.d.ts.map +1 -0
- package/dist/useMermaidRender.d.ts +10 -0
- package/dist/useMermaidRender.d.ts.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid-theme.d.ts","sourceRoot":"","sources":["../src/mermaid-theme.ts"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvC;AAED,eAAO,MAAM,UAAU,EAAE,kBAsIxB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,kBAsIvB,CAAA"}
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
@keyframes _36yqie5 {
|
|
2
|
+
to {
|
|
3
|
+
transform: rotate(360deg);
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
._36yqie0 {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
margin: 1rem 0;
|
|
11
|
+
position: relative;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
cursor: grab;
|
|
14
|
+
}
|
|
15
|
+
._36yqie0:active {
|
|
16
|
+
cursor: grabbing;
|
|
17
|
+
}
|
|
18
|
+
._36yqie0 img {
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
height: auto;
|
|
21
|
+
}
|
|
22
|
+
._36yqie1 {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 8px;
|
|
25
|
+
right: 8px;
|
|
26
|
+
padding: 2px 8px;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
font-size: 0.75rem;
|
|
29
|
+
color: var(--rc-text-secondary);
|
|
30
|
+
background-color: color-mix(in srgb, var(--rc-bg) 80%, transparent);
|
|
31
|
+
backdrop-filter: blur(4px);
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transition: opacity 0.2s;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
z-index: 2;
|
|
36
|
+
}
|
|
37
|
+
._36yqie1:hover {
|
|
38
|
+
color: var(--rc-text);
|
|
39
|
+
background-color: color-mix(in srgb, var(--rc-bg) 95%, transparent);
|
|
40
|
+
}
|
|
41
|
+
._36yqie0:hover ._36yqie1 {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
}
|
|
44
|
+
._36yqie2 {
|
|
45
|
+
position: absolute;
|
|
46
|
+
bottom: 8px;
|
|
47
|
+
right: 8px;
|
|
48
|
+
display: flex;
|
|
49
|
+
gap: 2px;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transition: opacity 0.2s;
|
|
52
|
+
z-index: 2;
|
|
53
|
+
}
|
|
54
|
+
._36yqie0:hover ._36yqie2 {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
}
|
|
57
|
+
._36yqie3 {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
width: 28px;
|
|
62
|
+
height: 28px;
|
|
63
|
+
border-radius: 0.25rem;
|
|
64
|
+
border: none;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
color: var(--rc-text-secondary);
|
|
67
|
+
background-color: color-mix(in srgb, var(--rc-bg) 80%, transparent);
|
|
68
|
+
backdrop-filter: blur(4px);
|
|
69
|
+
transition: color 0.15s, background-color 0.15s;
|
|
70
|
+
}
|
|
71
|
+
._36yqie3:hover {
|
|
72
|
+
color: var(--rc-text);
|
|
73
|
+
background-color: color-mix(in srgb, var(--rc-bg) 95%, transparent);
|
|
74
|
+
}
|
|
75
|
+
._36yqie4 {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
min-height: 80px;
|
|
80
|
+
color: var(--rc-text-secondary);
|
|
81
|
+
font-size: 0.875rem;
|
|
82
|
+
}
|
|
83
|
+
._36yqie4::after {
|
|
84
|
+
content: "";
|
|
85
|
+
display: inline-block;
|
|
86
|
+
width: 16px;
|
|
87
|
+
height: 16px;
|
|
88
|
+
margin-left: 8px;
|
|
89
|
+
border: 2px solid currentColor;
|
|
90
|
+
border-right-color: transparent;
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
animation: _36yqie5 0.6s linear infinite;
|
|
93
|
+
}
|
|
94
|
+
._36yqie6 {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
min-height: 50px;
|
|
99
|
+
padding: 0.75rem 1rem;
|
|
100
|
+
border-radius: 0.5rem;
|
|
101
|
+
background-color: color-mix(in srgb, var(--rc-alert-caution) 10%, transparent);
|
|
102
|
+
color: var(--rc-alert-caution);
|
|
103
|
+
font-size: 0.875rem;
|
|
104
|
+
}
|
|
105
|
+
._36yqie7._36yqie7 {
|
|
106
|
+
padding: 0;
|
|
107
|
+
gap: 0;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
width: calc(100vw - 2rem);
|
|
112
|
+
height: min(680px, 85vh);
|
|
113
|
+
border-radius: 0.5rem;
|
|
114
|
+
}
|
|
115
|
+
._36yqie8 {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: space-between;
|
|
119
|
+
padding: 0 1rem;
|
|
120
|
+
height: 48px;
|
|
121
|
+
border-bottom: 1px solid var(--rc-border);
|
|
122
|
+
flex-shrink: 0;
|
|
123
|
+
}
|
|
124
|
+
._36yqie9 {
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
gap: 0.75rem;
|
|
128
|
+
}
|
|
129
|
+
._36yqiea {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: 4px;
|
|
133
|
+
}
|
|
134
|
+
._36yqieb {
|
|
135
|
+
width: 1px;
|
|
136
|
+
height: 16px;
|
|
137
|
+
background-color: var(--rc-border);
|
|
138
|
+
flex-shrink: 0;
|
|
139
|
+
}
|
|
140
|
+
._36yqiec {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
gap: 0.5rem;
|
|
144
|
+
font-size: 0.875rem;
|
|
145
|
+
font-weight: 500;
|
|
146
|
+
color: var(--rc-text);
|
|
147
|
+
}
|
|
148
|
+
._36yqied {
|
|
149
|
+
padding: 0.25rem 0.5rem;
|
|
150
|
+
font-size: 0.75rem;
|
|
151
|
+
color: var(--rc-text-secondary);
|
|
152
|
+
background: none;
|
|
153
|
+
border: none;
|
|
154
|
+
border-radius: 0.375rem;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
transition: color 0.15s, background-color 0.15s;
|
|
157
|
+
}
|
|
158
|
+
._36yqied:hover {
|
|
159
|
+
color: var(--rc-text);
|
|
160
|
+
background-color: color-mix(in srgb, var(--rc-text) 5%, transparent);
|
|
161
|
+
}
|
|
162
|
+
._36yqiee {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
background-color: color-mix(in srgb, var(--rc-text) 5%, transparent);
|
|
166
|
+
border-radius: 0.375rem;
|
|
167
|
+
padding: 2px;
|
|
168
|
+
margin-right: 4px;
|
|
169
|
+
}
|
|
170
|
+
._36yqief {
|
|
171
|
+
display: inline-flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
justify-content: center;
|
|
174
|
+
padding: 4px;
|
|
175
|
+
border-radius: 0.25rem;
|
|
176
|
+
border: none;
|
|
177
|
+
background: none;
|
|
178
|
+
cursor: pointer;
|
|
179
|
+
color: var(--rc-text-secondary);
|
|
180
|
+
transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
|
|
181
|
+
}
|
|
182
|
+
._36yqief:hover {
|
|
183
|
+
color: var(--rc-text);
|
|
184
|
+
}
|
|
185
|
+
._36yqieg {
|
|
186
|
+
background-color: var(--rc-bg);
|
|
187
|
+
color: var(--rc-text);
|
|
188
|
+
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
|
189
|
+
}
|
|
190
|
+
._36yqieh {
|
|
191
|
+
display: inline-flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
width: 28px;
|
|
195
|
+
height: 28px;
|
|
196
|
+
border-radius: 0.25rem;
|
|
197
|
+
border: none;
|
|
198
|
+
background: none;
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
color: var(--rc-text-secondary);
|
|
201
|
+
transition: color 0.15s, background-color 0.15s;
|
|
202
|
+
}
|
|
203
|
+
._36yqieh:hover {
|
|
204
|
+
color: var(--rc-text);
|
|
205
|
+
background-color: color-mix(in srgb, var(--rc-text) 5%, transparent);
|
|
206
|
+
}
|
|
207
|
+
._36yqiei {
|
|
208
|
+
display: flex;
|
|
209
|
+
flex: 1;
|
|
210
|
+
min-height: 0;
|
|
211
|
+
}
|
|
212
|
+
._36yqiej {
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
border-right: 1px solid var(--rc-border);
|
|
216
|
+
}
|
|
217
|
+
._36yqiek {
|
|
218
|
+
width: 50%;
|
|
219
|
+
}
|
|
220
|
+
._36yqiel {
|
|
221
|
+
flex: 1;
|
|
222
|
+
}
|
|
223
|
+
._36yqiem {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
padding: 0 0.75rem;
|
|
227
|
+
height: 32px;
|
|
228
|
+
border-bottom: 1px solid var(--rc-border);
|
|
229
|
+
background-color: color-mix(in srgb, var(--rc-text) 2%, transparent);
|
|
230
|
+
flex-shrink: 0;
|
|
231
|
+
font-size: 0.6875rem;
|
|
232
|
+
font-weight: 500;
|
|
233
|
+
color: var(--rc-text-secondary);
|
|
234
|
+
text-transform: uppercase;
|
|
235
|
+
letter-spacing: 0.05em;
|
|
236
|
+
}
|
|
237
|
+
._36yqien {
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
flex: 1;
|
|
241
|
+
}
|
|
242
|
+
._36yqieo {
|
|
243
|
+
display: flex;
|
|
244
|
+
flex: 1;
|
|
245
|
+
min-height: 0;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
position: relative;
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
cursor: grab;
|
|
251
|
+
}
|
|
252
|
+
._36yqieo:active {
|
|
253
|
+
cursor: grabbing;
|
|
254
|
+
}
|
|
255
|
+
._36yqieo:hover ._36yqie2 {
|
|
256
|
+
opacity: 1;
|
|
257
|
+
}
|
|
258
|
+
._36yqieo img {
|
|
259
|
+
max-width: 100%;
|
|
260
|
+
height: auto;
|
|
261
|
+
}
|
|
262
|
+
._36yqiep {
|
|
263
|
+
font-size: 0.875rem;
|
|
264
|
+
color: color-mix(in srgb, var(--rc-text-secondary) 50%, transparent);
|
|
265
|
+
}
|
|
266
|
+
._36yqieq {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
align-items: center;
|
|
270
|
+
gap: 0.75rem;
|
|
271
|
+
max-width: 320px;
|
|
272
|
+
text-align: center;
|
|
273
|
+
}
|
|
274
|
+
._36yqier {
|
|
275
|
+
display: inline-flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
justify-content: center;
|
|
278
|
+
width: 32px;
|
|
279
|
+
height: 32px;
|
|
280
|
+
border-radius: 0.375rem;
|
|
281
|
+
background-color: color-mix(in srgb, var(--rc-alert-caution) 10%, transparent);
|
|
282
|
+
color: var(--rc-alert-caution);
|
|
283
|
+
}
|
|
284
|
+
._36yqies {
|
|
285
|
+
font-size: 0.875rem;
|
|
286
|
+
font-weight: 500;
|
|
287
|
+
color: var(--rc-text);
|
|
288
|
+
}
|
|
289
|
+
._36yqiet {
|
|
290
|
+
font-size: 0.75rem;
|
|
291
|
+
color: var(--rc-text-secondary);
|
|
292
|
+
line-height: 1.5;
|
|
293
|
+
display: -webkit-box;
|
|
294
|
+
-webkit-line-clamp: 3;
|
|
295
|
+
-webkit-box-orient: vertical;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
}
|
|
298
|
+
._36yqieu {
|
|
299
|
+
position: relative;
|
|
300
|
+
display: flex;
|
|
301
|
+
flex: 1;
|
|
302
|
+
min-height: 0;
|
|
303
|
+
overflow: hidden;
|
|
304
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
305
|
+
font-size: 0.8125rem;
|
|
306
|
+
line-height: 1.25rem;
|
|
307
|
+
}
|
|
308
|
+
._36yqiev {
|
|
309
|
+
flex-shrink: 0;
|
|
310
|
+
width: 40px;
|
|
311
|
+
overflow: hidden;
|
|
312
|
+
user-select: none;
|
|
313
|
+
border-right: 1px solid var(--rc-border);
|
|
314
|
+
background-color: color-mix(in srgb, var(--rc-text) 2%, transparent);
|
|
315
|
+
padding: 0.75rem 0;
|
|
316
|
+
}
|
|
317
|
+
._36yqiew {
|
|
318
|
+
padding: 0 0.5rem;
|
|
319
|
+
text-align: right;
|
|
320
|
+
line-height: 1.25rem;
|
|
321
|
+
color: color-mix(in srgb, var(--rc-text-secondary) 40%, transparent);
|
|
322
|
+
}
|
|
323
|
+
._36yqiex {
|
|
324
|
+
flex: 1;
|
|
325
|
+
resize: none;
|
|
326
|
+
background-color: transparent;
|
|
327
|
+
padding: 0.75rem;
|
|
328
|
+
color: var(--rc-text);
|
|
329
|
+
outline: none;
|
|
330
|
+
border: none;
|
|
331
|
+
line-height: 1.25rem;
|
|
332
|
+
font-family: inherit;
|
|
333
|
+
font-size: inherit;
|
|
334
|
+
tab-size: 2;
|
|
335
|
+
}
|
|
336
|
+
._36yqiex::placeholder {
|
|
337
|
+
color: color-mix(in srgb, var(--rc-text-secondary) 40%, transparent);
|
|
338
|
+
}
|
|
339
|
+
._36yqiey {
|
|
340
|
+
display: flex;
|
|
341
|
+
align-items: center;
|
|
342
|
+
justify-content: flex-end;
|
|
343
|
+
padding: 0 1rem;
|
|
344
|
+
height: 44px;
|
|
345
|
+
border-top: 1px solid var(--rc-border);
|
|
346
|
+
flex-shrink: 0;
|
|
347
|
+
background-color: color-mix(in srgb, var(--rc-text) 1.5%, transparent);
|
|
348
|
+
}
|
|
349
|
+
._36yqiez {
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
gap: 0.5rem;
|
|
353
|
+
}
|
|
354
|
+
._36yqie10 {
|
|
355
|
+
width: 6px;
|
|
356
|
+
height: 6px;
|
|
357
|
+
border-radius: 50%;
|
|
358
|
+
background-color: var(--rc-alert-tip);
|
|
359
|
+
}
|
|
360
|
+
._36yqie11 {
|
|
361
|
+
font-size: 0.6875rem;
|
|
362
|
+
color: var(--rc-text-secondary);
|
|
363
|
+
}
|
|
364
|
+
._36yqie12 {
|
|
365
|
+
display: flex;
|
|
366
|
+
align-items: center;
|
|
367
|
+
gap: 0.5rem;
|
|
368
|
+
}
|
|
369
|
+
._36yqie13 {
|
|
370
|
+
padding: 0.25rem 0.75rem;
|
|
371
|
+
border-radius: 0.375rem;
|
|
372
|
+
font-size: 0.75rem;
|
|
373
|
+
font-weight: 500;
|
|
374
|
+
cursor: pointer;
|
|
375
|
+
height: 28px;
|
|
376
|
+
transition: background-color 0.15s, border-color 0.15s;
|
|
377
|
+
}
|
|
378
|
+
._36yqie14 {
|
|
379
|
+
background-color: transparent;
|
|
380
|
+
color: var(--rc-text-secondary);
|
|
381
|
+
border: 1px solid var(--rc-border);
|
|
382
|
+
}
|
|
383
|
+
._36yqie14:hover {
|
|
384
|
+
background-color: color-mix(in srgb, var(--rc-text) 4%, transparent);
|
|
385
|
+
}
|
|
386
|
+
._36yqie15 {
|
|
387
|
+
background-color: var(--rc-text);
|
|
388
|
+
color: var(--rc-bg);
|
|
389
|
+
border: 1px solid transparent;
|
|
390
|
+
}
|
|
391
|
+
._36yqie15:hover {
|
|
392
|
+
background-color: color-mix(in srgb, var(--rc-text) 85%, transparent);
|
|
393
|
+
}
|
|
394
|
+
@media (min-width: 640px) {
|
|
395
|
+
._36yqie7._36yqie7 {
|
|
396
|
+
max-width: 64rem;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const mermaidContainer: string;
|
|
2
|
+
export declare const mermaidEditHint: string;
|
|
3
|
+
export declare const zoomControls: string;
|
|
4
|
+
export declare const zoomBtn: string;
|
|
5
|
+
export declare const mermaidLoading: string;
|
|
6
|
+
export declare const mermaidError: string;
|
|
7
|
+
declare const _editorPopup: string;
|
|
8
|
+
export { _editorPopup as editorPopup };
|
|
9
|
+
export declare const editorHeader: string;
|
|
10
|
+
export declare const editorHeaderLeft: string;
|
|
11
|
+
export declare const editorHeaderRight: string;
|
|
12
|
+
export declare const editorSep: string;
|
|
13
|
+
export declare const editorTitle: string;
|
|
14
|
+
export declare const editorTplBtn: string;
|
|
15
|
+
export declare const editorViewToggle: string;
|
|
16
|
+
export declare const editorViewItem: string;
|
|
17
|
+
export declare const editorViewItemActive: string;
|
|
18
|
+
export declare const editorIconBtn: string;
|
|
19
|
+
export declare const editorBody: string;
|
|
20
|
+
export declare const editorPane: string;
|
|
21
|
+
export declare const editorPaneHalf: string;
|
|
22
|
+
export declare const editorPaneFull: string;
|
|
23
|
+
export declare const editorPaneLabel: string;
|
|
24
|
+
export declare const editorPreviewPane: string;
|
|
25
|
+
export declare const editorPreviewWrap: string;
|
|
26
|
+
export declare const editorPreviewEmpty: string;
|
|
27
|
+
export declare const editorPreviewErrorWrap: string;
|
|
28
|
+
export declare const editorPreviewErrorIcon: string;
|
|
29
|
+
export declare const editorPreviewErrorTitle: string;
|
|
30
|
+
export declare const editorPreviewErrorMsg: string;
|
|
31
|
+
export declare const codeEditor: string;
|
|
32
|
+
export declare const codeGutter: string;
|
|
33
|
+
export declare const codeGutterLine: string;
|
|
34
|
+
export declare const codeArea: string;
|
|
35
|
+
export declare const editorFooter: string;
|
|
36
|
+
export declare const footerStatus: string;
|
|
37
|
+
export declare const footerStatusDot: string;
|
|
38
|
+
export declare const footerStatusText: string;
|
|
39
|
+
export declare const footerActions: string;
|
|
40
|
+
export declare const footerBtnCancel: string;
|
|
41
|
+
export declare const footerBtnSave: string;
|
|
42
|
+
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,QAW3B,CAAA;AAOF,eAAO,MAAM,eAAe,QAuB1B,CAAA;AAEF,eAAO,MAAM,YAAY,QAcvB,CAAA;AAEF,eAAO,MAAM,OAAO,QAiBlB,CAAA;AAEF,eAAO,MAAM,cAAc,QAOzB,CAAA;AAkBF,eAAO,MAAM,YAAY,QAUvB,CAAA;AAIF,QAAA,MAAM,YAAY,QAAY,CAAA;AAgB9B,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,CAAA;AAEtC,eAAO,MAAM,YAAY,QAQvB,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAI3B,CAAA;AAEF,eAAO,MAAM,iBAAiB,QAI5B,CAAA;AAEF,eAAO,MAAM,SAAS,QAKpB,CAAA;AAEF,eAAO,MAAM,WAAW,QAOtB,CAAA;AAEF,eAAO,MAAM,YAAY,QAavB,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAO3B,CAAA;AAEF,eAAO,MAAM,cAAc,QAczB,CAAA;AAEF,eAAO,MAAM,oBAAoB,QAI/B,CAAA;AAEF,eAAO,MAAM,aAAa,QAgBxB,CAAA;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAA;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAA;AAEF,eAAO,MAAM,cAAc,QAA0B,CAAA;AACrD,eAAO,MAAM,cAAc,QAAqB,CAAA;AAEhD,eAAO,MAAM,eAAe,QAa1B,CAAA;AAEF,eAAO,MAAM,iBAAiB,QAI5B,CAAA;AAEF,eAAO,MAAM,iBAAiB,QAY5B,CAAA;AAWF,eAAO,MAAM,kBAAkB,QAG7B,CAAA;AAEF,eAAO,MAAM,sBAAsB,QAOjC,CAAA;AAEF,eAAO,MAAM,sBAAsB,QASjC,CAAA;AAEF,eAAO,MAAM,uBAAuB,QAIlC,CAAA;AAEF,eAAO,MAAM,qBAAqB,QAQhC,CAAA;AAIF,eAAO,MAAM,UAAU,QAUrB,CAAA;AAEF,eAAO,MAAM,UAAU,QAQrB,CAAA;AAEF,eAAO,MAAM,cAAc,QAKzB,CAAA;AAEF,eAAO,MAAM,QAAQ,QAenB,CAAA;AAIF,eAAO,MAAM,YAAY,QASvB,CAAA;AAEF,eAAO,MAAM,YAAY,QAIvB,CAAA;AAEF,eAAO,MAAM,eAAe,QAK1B,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAG3B,CAAA;AAEF,eAAO,MAAM,aAAa,QAIxB,CAAA;AAYF,eAAO,MAAM,eAAe,QAU1B,CAAA;AAEF,eAAO,MAAM,aAAa,QAUxB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColorScheme } from '@haklex/rich-editor';
|
|
2
|
+
export declare function useMermaidRender(content: string, preferredColorScheme?: ColorScheme): {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: string;
|
|
5
|
+
imgSrc: string;
|
|
6
|
+
svg: string;
|
|
7
|
+
width: number | undefined;
|
|
8
|
+
height: number | undefined;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useMermaidRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMermaidRender.d.ts","sourceRoot":"","sources":["../src/useMermaidRender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAMtD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,oBAAoB,CAAC,EAAE,WAAW;;;;;;;EAqFnC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@haklex/rich-renderer-mermaid",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Mermaid diagram renderer",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"./style.css": "./dist/rich-renderer-mermaid.css"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/index.mjs",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"lucide-react": "^0.574.0",
|
|
20
|
+
"mermaid": "^11.4.1",
|
|
21
|
+
"react-zoom-pan-pinch": "^3.7.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "^19.0.0",
|
|
25
|
+
"@types/react-dom": "^19.0.0",
|
|
26
|
+
"@vanilla-extract/css": "^1.17.1",
|
|
27
|
+
"@vanilla-extract/vite-plugin": "^4.0.20",
|
|
28
|
+
"react": "19.2.4",
|
|
29
|
+
"react-dom": "19.2.4",
|
|
30
|
+
"typescript": "^5.9.0",
|
|
31
|
+
"vite": "^7.3.1",
|
|
32
|
+
"vite-plugin-dts": "^4.5.0",
|
|
33
|
+
"@haklex/rich-editor": "0.0.1",
|
|
34
|
+
"@haklex/rich-editor-ui": "0.0.1",
|
|
35
|
+
"@haklex/rich-style-token": "0.0.1"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": ">=19",
|
|
39
|
+
"react-dom": ">=19",
|
|
40
|
+
"@haklex/rich-editor": "0.0.1",
|
|
41
|
+
"@haklex/rich-editor-ui": "0.0.1",
|
|
42
|
+
"@haklex/rich-style-token": "0.0.1"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "vite build",
|
|
49
|
+
"dev:build": "vite build --watch"
|
|
50
|
+
},
|
|
51
|
+
"types": "./dist/index.d.ts"
|
|
52
|
+
}
|