euv-ui 0.49.4

Cross-platform UI component library and 17-scheme design system for the euv framework with pixel-consistent rendering across Web, Android, iOS, iPadOS, macOS, Windows, and Linux.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
use super::*;

/// Resolved VS Code `Eva Light Bold` / `Eva Dark Bold` color palette for `EuvCodeBlock` and Markdown syntax chrome.
#[derive(Clone, Copy, Data, Debug, Eq, PartialEq)]
pub struct CodeThemePalette {
    /// Theme name (`"Eva Light Bold"` or `"Eva Dark Bold"`).
    pub(crate) theme_name: &'static str,
    /// Editor surface background.
    #[get(type(copy))]
    pub(crate) background: Color,
    /// Header / tab bar background.
    #[get(type(copy))]
    pub(crate) header_bg: Color,
    /// Crisp container border color.
    #[get(type(copy))]
    pub(crate) border: Color,
    /// Default code foreground.
    #[get(type(copy))]
    pub(crate) foreground: Color,
    /// Line number gutter foreground.
    #[get(type(copy))]
    pub(crate) line_number: Color,
    /// Highlighted line background.
    #[get(type(copy))]
    pub(crate) line_highlight: Color,
    /// Comment token color.
    #[get(type(copy))]
    pub(crate) comment: Color,
    /// Storage keyword / modifier token color.
    #[get(type(copy))]
    pub(crate) keyword: Color,
    /// Control-flow keyword token color.
    #[get(type(copy))]
    pub(crate) control: Color,
    /// Operator token color.
    #[get(type(copy))]
    pub(crate) operator: Color,
    /// String literal token color.
    #[get(type(copy))]
    pub(crate) string: Color,
    /// Numeric literal token color.
    #[get(type(copy))]
    pub(crate) number: Color,
    /// Language constant / boolean token color.
    #[get(type(copy))]
    pub(crate) constant: Color,
    /// Function / macro / attribute token color.
    #[get(type(copy))]
    pub(crate) function: Color,
    /// User type / trait / struct token color.
    #[get(type(copy))]
    pub(crate) ty: Color,
    /// Built-in primitive / numeric type token color.
    #[get(type(copy))]
    pub(crate) primitive: Color,
    /// Property / heading token color.
    #[get(type(copy))]
    pub(crate) property: Color,
    /// Punctuation token color.
    #[get(type(copy))]
    pub(crate) punctuation: Color,
    /// Inline code chip background.
    #[get(type(copy))]
    pub(crate) inline_code_bg: Color,
    /// Inline code chip foreground.
    #[get(type(copy))]
    pub(crate) inline_code_fg: Color,
    /// Blockquote surface background.
    #[get(type(copy))]
    pub(crate) quote_bg: Color,
    /// Blockquote left accent border.
    #[get(type(copy))]
    pub(crate) quote_border: Color,
    /// Hyperlink foreground color.
    #[get(type(copy))]
    pub(crate) link: Color,
    /// Diff insertion foreground color.
    #[get(type(copy))]
    pub(crate) diff_add: Color,
    /// Diff deletion foreground color.
    #[get(type(copy))]
    pub(crate) diff_del: Color,
}

/// Single syntax-highlighted span within a source code line.
#[derive(Clone, Data, Debug, Eq, New, PartialEq)]
pub struct CodeSpan {
    /// Raw text slice of the token.
    pub(crate) text: String,
    /// Semantic token classification.
    #[get(type(copy))]
    pub(crate) kind: CodeTokenKind,
}

/// Single item inside an `EuvMarkdownList` supporting nesting, child Markdown blocks, and interactive GFM checkboxes.
#[derive(Clone, Data, Debug, Eq, New, PartialEq)]
pub struct EuvMarkdownListItem {
    /// Item text (may include inline Markdown syntax).
    pub(crate) text: String,
    /// Nesting indentation level (`0` = top level).
    #[get(type(copy))]
    pub(crate) depth: usize,
    /// Optional GFM task checklist state (`Some(true)` checked, `Some(false)` unchecked, `None` normal item).
    #[get(skip)]
    pub(crate) checked: Option<bool>,
    /// Optional recursively parsed child Markdown blocks (for example indented fenced code blocks or nested callouts).
    #[new(skip)]
    pub(crate) children: Vec<EuvMarkdownBlock>,
}

/// Single term and definition entry inside an `EuvMarkdownDefList`.
#[derive(Clone, Data, Debug, Eq, New, PartialEq)]
pub struct EuvMarkdownDefItem {
    /// Defined term header.
    pub(crate) term: String,
    /// One or more definition descriptions for the term.
    pub(crate) definitions: Vec<String>,
}

/// Single parsed footnote definition rendered at the bottom of `EuvMarkdown`.
#[derive(Clone, Data, Debug, Eq, New, PartialEq)]
pub struct EuvMarkdownFootnote {
    /// Footnote identifier (e.g. `"1"` or `"perf"`).
    pub(crate) id: String,
    /// Footnote Markdown description text.
    pub(crate) content: String,
}

/// VS Code `Eva Light Bold` / `Eva Dark Bold` syntax-highlighted native code block with H+V scrolling, line numbers, fullscreen modal, selectable text, and animated copy action.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvCodeBlock {
    /// Source code text to display and highlight.
    pub(crate) code: String,
    /// Active theme tokens controlling Light (`Eva Light Bold`) vs Dark (`Eva Dark Bold`) palette selection.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional language tag (e.g. `"rust"`, `"typescript"`, `"json"`, `"bash"`). Auto-detected when empty.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) language: String,
    /// Optional filename displayed in the header bar (e.g. `"src/main.rs"`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) filename: Option<String>,
    /// Whether to display the left line-number gutter (`true` by default for multi-line blocks or via builder).
    #[new(skip)]
    #[get(type(copy))]
    pub(crate) show_line_numbers: bool,
    /// Optional 1-based line numbers rendered with Eva line-highlight tint.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) highlight_lines: Vec<usize>,
    /// Maximum inline viewport height in logical pixels used by `Fixed` and `AutoExpandWidth` modes (`0.0` defaults to `360.0`).
    #[new(skip)]
    #[get(type(copy))]
    #[prop(custom)]
    pub(crate) max_height: f32,
    /// Inline width and height sizing mode (`EuvCodeBlockSizeMode::AutoExpand` by default).
    #[new(skip)]
    #[get(type(copy))]
    #[prop(custom)]
    pub(crate) size_mode: EuvCodeBlockSizeMode,
    /// Optional text selection and copy mode for code lines (`None` defaults to `TextSelectMode::SelectAndCopy`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional callback invoked with the raw code when the user clicks Copy.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_copy: Option<MarkdownStrCallback>,
}

/// Native Markdown heading component (`H1`–`H6`) with typographic scale and optional accent rule.
#[derive(Clone, Data, Debug, New, Props)]
pub struct EuvMarkdownHeading {
    /// Heading level (`1..=6`).
    #[get(type(copy))]
    pub(crate) level: u8,
    /// Heading text content.
    pub(crate) text: String,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
}

/// Native Markdown inline code pill styled with exact VS Code Eva inline-code colors.
#[derive(Clone, Data, Debug, New, Props)]
pub struct EuvMarkdownInlineCode {
    /// Inline code snippet.
    pub(crate) code: String,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
}

/// Native Markdown display math block (`$$...$$`) with rich Unicode mathematical formatting.
#[derive(Clone, Data, Debug, New, Props)]
pub struct EuvMarkdownMath {
    /// Raw LaTeX/math expression body.
    pub(crate) expression: String,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
}

/// Native Markdown rich inline paragraph supporting bold, italic, bold-italic, strikethrough, highlight, sup/sub, inline code, math, footnotes, images, links, hard breaks, and `<kbd>` caps.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdownParagraph {
    /// Parsed inline spans to flow cleanly inside the paragraph.
    pub(crate) inlines: Vec<EuvMarkdownInline>,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix used when resolving local image URLs (e.g. `"./"` or `"../"`).
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Optional callback invoked when a user taps a Markdown hyperlink.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
}

/// Native Markdown blockquote and GitHub-flavored Alert callout (`NOTE`, `TIP`, `IMPORTANT`, `WARNING`, `CAUTION`).
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdownQuote {
    /// Semantic quote or alert variant.
    #[get(type(copy))]
    pub(crate) kind: EuvMarkdownAlertKind,
    /// Text lines rendered inside the quote body.
    pub(crate) lines: Vec<String>,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional custom callout header title (for example from `::: warning Title`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) title: Option<String>,
    /// Pre-parsed nested child Markdown blocks rendered inside the callout body.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) children: Vec<EuvMarkdownBlock>,
    /// Inline sizing mode forwarded to nested `EuvCodeBlock` blocks inside the callout.
    #[new(skip)]
    #[get(type(copy))]
    #[prop(custom)]
    pub(crate) code_block_size_mode: EuvCodeBlockSizeMode,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix forwarded to inline images inside the callout.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Optional link-click callback propagated to paragraphs inside the callout.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
    /// Optional copy callback propagated to nested `EuvCodeBlock` blocks inside the callout.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_copy: Option<MarkdownStrCallback>,
    /// Optional task-toggle callback propagated to nested checklists inside the callout.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_toggle_task: Option<Rc<dyn Fn(usize, bool)>>,
}

/// Native Markdown unordered, ordered, nested, and interactive GFM task-checklist component.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdownList {
    /// Whether list items render with ordinal numbering (`1.`, `2.`, ...).
    #[get(type(copy))]
    pub(crate) ordered: bool,
    /// List items to render.
    pub(crate) items: Vec<EuvMarkdownListItem>,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Starting ordinal index for ordered lists (`0` defaults to `1`).
    #[new(skip)]
    #[get(type(copy))]
    #[prop(custom)]
    pub(crate) start: usize,
    /// Inline sizing mode forwarded to nested `EuvCodeBlock` blocks inside list items.
    #[new(skip)]
    #[get(type(copy))]
    #[prop(custom)]
    pub(crate) code_block_size_mode: EuvCodeBlockSizeMode,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix forwarded to inline images inside list items.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Optional link-click handler for hyperlinks inside list items.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
    /// Optional copy callback propagated to nested `EuvCodeBlock` blocks inside list items.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_copy: Option<MarkdownStrCallback>,
    /// Optional callback invoked with `(item_index, next_checked)` when toggling a task item.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_toggle_task: Option<Rc<dyn Fn(usize, bool)>>,
}

/// Native GFM Markdown table with column alignment (`Left`, `Center`, `Right`), horizontal scroll on narrow viewports, tinted header, and zebra striping.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdownTable {
    /// Column header titles.
    pub(crate) headers: Vec<String>,
    /// Column horizontal alignments.
    pub(crate) alignments: Vec<EuvMarkdownAlign>,
    /// Data rows.
    pub(crate) rows: Vec<Vec<String>>,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix forwarded to inline images inside table cells.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Optional link-click handler for links inside table cells.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
}

/// Native Markdown definition list rendering bold terms and indented descriptions.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdownDefList {
    /// Term and definition entries.
    pub(crate) items: Vec<EuvMarkdownDefItem>,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix forwarded to inline images inside definitions.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Optional link-click handler for links inside definitions.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
}

/// Native Markdown footnotes footer section rendering numbered `[^id]` entries.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdownFootnotes {
    /// Ordered footnote entries.
    pub(crate) footnotes: Vec<EuvMarkdownFootnote>,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix forwarded to inline images inside footnotes.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Optional link-click handler for links inside footnotes.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
}

/// Native Markdown thematic horizontal divider (`---`).
#[derive(Clone, Copy, Data, Debug, New, Props)]
pub struct EuvMarkdownDivider {
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
}

/// Native Markdown image figure loading and rendering real decoded RGBA8 pixels with optional alt caption.
#[derive(Clone, Data, Debug, New, Props)]
pub struct EuvMarkdownImage {
    /// Accessible alt / caption text.
    pub(crate) alt: String,
    /// Image URL or local asset path.
    pub(crate) url: String,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional relative asset base prefix used when resolving local image URLs (e.g. `"./"` or `"../"`).
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
}

/// Native Markdown collapsible `<details><summary>` disclosure block supporting rich nested Markdown content.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdownDetails {
    /// Always-visible disclosure header.
    pub(crate) summary: String,
    /// Collapsible content lines.
    pub(crate) body: Vec<String>,
    /// Reactive expanded state signal.
    #[get(type(copy))]
    pub(crate) open: Signal<bool>,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional explicit text selection and copy mode (`None` inherits from ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix forwarded to nested Markdown blocks.
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Default inline sizing mode forwarded to fenced `EuvCodeBlock` blocks inside expanded details (`EuvCodeBlockSizeMode::AutoExpand` by default).
    #[new(skip)]
    #[get(type(copy))]
    #[prop(custom)]
    pub(crate) code_block_size_mode: EuvCodeBlockSizeMode,
    /// Optional link-click handler inside expanded details.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
    /// Optional code copy handler inside expanded details.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_copy: Option<MarkdownStrCallback>,
    /// Optional task toggle handler inside expanded details.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_toggle_task: Option<Rc<dyn Fn(usize, bool)>>,
}

/// Complete GitHub-Flavored & Extended Markdown native document renderer composing every Markdown component, native vector `EuvMermaid`, and Eva-themed `EuvCodeBlock`.
#[derive(Clone, CustomDebug, Data, New, Props)]
pub struct EuvMarkdown {
    /// Raw Markdown source text.
    pub(crate) source: String,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional unified container/text style override (supports `text_select` via `style! { text_select: ... }`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) style: Option<Style>,
    /// Optional explicit text selection and copy mode (`None` inherits from `style` or ancestors, defaulting to `TextSelectMode::None`).
    #[new(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) text_select: Option<TextSelectMode>,
    /// Optional relative asset base prefix used when resolving local Markdown image URLs (e.g. `"./"` or `"../"`).
    #[new(skip)]
    #[prop(custom)]
    pub(crate) asset_base: String,
    /// Default inline sizing mode forwarded to fenced `EuvCodeBlock` blocks (`EuvCodeBlockSizeMode::AutoExpand` by default).
    #[new(skip)]
    #[get(type(copy))]
    #[prop(custom)]
    pub(crate) code_block_size_mode: EuvCodeBlockSizeMode,
    /// Optional link-click handler receiving the destination URL.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_link: Option<MarkdownStrCallback>,
    /// Optional code-block copy handler receiving the copied code.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_copy: Option<MarkdownStrCallback>,
    /// Optional interactive task-checkbox toggle handler receiving `(index, checked)`.
    #[new(skip)]
    #[debug(skip)]
    #[get(skip)]
    #[prop(custom)]
    pub(crate) on_toggle_task: Option<Rc<dyn Fn(usize, bool)>>,
}