euv-ui 0.45.0

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
/// Exact VS Code `Eva Light Bold` editor background (`#EBEEF5`).
pub const EVA_LIGHT_BG: u32 = 0xEBEEF5;
/// Exact VS Code `Eva Light Bold` header / tab strip background (`#E1E4EB`).
pub const EVA_LIGHT_HEADER_BG: u32 = 0xE1E4EB;
/// Exact VS Code `Eva Light Bold` border color (`#CED1D7`).
pub const EVA_LIGHT_BORDER: u32 = 0xCED1D7;
/// Exact VS Code `Eva Light Bold` foreground text (`#5D5D5F`).
pub const EVA_LIGHT_FG: u32 = 0x5D5D5F;
/// Exact VS Code `Eva Light Bold` line number color (`#B3B3B4`).
pub const EVA_LIGHT_LINE_NUM: u32 = 0xB3B3B4;
/// Exact VS Code `Eva Light Bold` active / highlighted line background (`#E3E6ED`).
pub const EVA_LIGHT_LINE_HL: u32 = 0xE3E6ED;
/// Exact VS Code `Eva Light Bold` comment foreground (`#A9A9AA`, italic).
pub const EVA_LIGHT_COMMENT: u32 = 0xA9A9AA;
/// Exact VS Code `Eva Light Bold` storage keyword foreground (`#7C4DFF`, bold).
pub const EVA_LIGHT_KEYWORD: u32 = 0x7C4DFF;
/// Exact VS Code `Eva Light Bold` control-flow keyword foreground (`#C838C6`, bold).
pub const EVA_LIGHT_CONTROL: u32 = 0xC838C6;
/// Exact VS Code `Eva Light Bold` operator foreground (`#00BEC4`).
pub const EVA_LIGHT_OPERATOR: u32 = 0x00BEC4;
/// Exact VS Code `Eva Light Bold` string literal foreground (`#53A053`).
pub const EVA_LIGHT_STRING: u32 = 0x53A053;
/// Exact VS Code `Eva Light Bold` numeric constant foreground (`#FF6D12`).
pub const EVA_LIGHT_NUMBER: u32 = 0xFF6D12;
/// Exact VS Code `Eva Light Bold` language constant / boolean foreground (`#C838C6`, bold).
pub const EVA_LIGHT_CONSTANT: u32 = 0xC838C6;
/// Exact VS Code `Eva Light Bold` function / macro / attribute foreground (`#437AED`, bold).
pub const EVA_LIGHT_FUNCTION: u32 = 0x437AED;
/// Exact VS Code `Eva Light Bold` user type / struct / trait foreground (`#00BEC4`).
pub const EVA_LIGHT_TYPE: u32 = 0x00BEC4;
/// Exact VS Code `Eva Light Bold` primitive / numeric type foreground (`#EF8ED8`).
pub const EVA_LIGHT_PRIMITIVE: u32 = 0xEF8ED8;
/// Exact VS Code `Eva Light Bold` parameter / bold markup foreground (`#F0AA0B`).
pub const EVA_LIGHT_PARAM: u32 = 0xF0AA0B;
/// Exact VS Code `Eva Light Bold` property / Result / heading foreground (`#CD6069`).
pub const EVA_LIGHT_PROPERTY: u32 = 0xCD6069;
/// Exact VS Code `Eva Light Bold` punctuation foreground (`#A0A1A7`).
pub const EVA_LIGHT_PUNCT: u32 = 0xA0A1A7;
/// Exact VS Code `Eva Light Bold` inline code background (`#E5E8EF`).
pub const EVA_LIGHT_INLINE_CODE_BG: u32 = 0xE5E8EF;
/// Exact VS Code `Eva Light Bold` inline code foreground (`#53A053`).
pub const EVA_LIGHT_INLINE_CODE_FG: u32 = 0x53A053;
/// Exact VS Code `Eva Light Bold` blockquote background (`#E0E3E9`).
pub const EVA_LIGHT_QUOTE_BG: u32 = 0xE0E3E9;
/// Exact VS Code `Eva Light Bold` blockquote border (`#598DEF`).
pub const EVA_LIGHT_QUOTE_BORDER: u32 = 0x598DEF;
/// Exact VS Code `Eva Light Bold` hyperlink foreground (`#4D91F8`).
pub const EVA_LIGHT_LINK: u32 = 0x4D91F8;
/// Exact VS Code `Eva Light Bold` diff inserted line foreground (`#44C145`).
pub const EVA_LIGHT_DIFF_ADD: u32 = 0x44C145;
/// Exact VS Code `Eva Light Bold` diff deleted line foreground (`#F14C4C`).
pub const EVA_LIGHT_DIFF_DEL: u32 = 0xF14C4C;
/// Exact VS Code `Eva Dark Bold` editor background (`#282C34`).
pub const EVA_DARK_BG: u32 = 0x282C34;
/// Exact VS Code `Eva Dark Bold` header / tab strip background (`#21252B`).
pub const EVA_DARK_HEADER_BG: u32 = 0x21252B;
/// Exact VS Code `Eva Dark Bold` border color (`#343A46`).
pub const EVA_DARK_BORDER: u32 = 0x343A46;
/// Exact VS Code `Eva Dark Bold` foreground text (`#B0B7C3`).
pub const EVA_DARK_FG: u32 = 0xB0B7C3;
/// Exact VS Code `Eva Dark Bold` line number color (`#535773`).
pub const EVA_DARK_LINE_NUM: u32 = 0x535773;
/// Exact VS Code `Eva Dark Bold` active / highlighted line background (`#2F323C`).
pub const EVA_DARK_LINE_HL: u32 = 0x2F323C;
/// Exact VS Code `Eva Dark Bold` comment foreground (`#676E95`, italic).
pub const EVA_DARK_COMMENT: u32 = 0x676E95;
/// Exact VS Code `Eva Dark Bold` storage keyword foreground (`#A78CFA`, bold).
pub const EVA_DARK_KEYWORD: u32 = 0xA78CFA;
/// Exact VS Code `Eva Dark Bold` control-flow keyword foreground (`#CF68E1`, bold).
pub const EVA_DARK_CONTROL: u32 = 0xCF68E1;
/// Exact VS Code `Eva Dark Bold` operator foreground (`#56B7C3`).
pub const EVA_DARK_OPERATOR: u32 = 0x56B7C3;
/// Exact VS Code `Eva Dark Bold` string literal foreground (`#98C379`).
pub const EVA_DARK_STRING: u32 = 0x98C379;
/// Exact VS Code `Eva Dark Bold` numeric constant foreground (`#FF9070`).
pub const EVA_DARK_NUMBER: u32 = 0xFF9070;
/// Exact VS Code `Eva Dark Bold` language constant / boolean foreground (`#CF68E1`, bold).
pub const EVA_DARK_CONSTANT: u32 = 0xCF68E1;
/// Exact VS Code `Eva Dark Bold` function / macro / attribute foreground (`#6495EE`, bold).
pub const EVA_DARK_FUNCTION: u32 = 0x6495EE;
/// Exact VS Code `Eva Dark Bold` user type / struct / trait foreground (`#56B7C3`).
pub const EVA_DARK_TYPE: u32 = 0x56B7C3;
/// Exact VS Code `Eva Dark Bold` primitive / numeric type foreground (`#FF6AB3`).
pub const EVA_DARK_PRIMITIVE: u32 = 0xFF6AB3;
/// Exact VS Code `Eva Dark Bold` parameter / bold markup foreground (`#E4BF7F`).
pub const EVA_DARK_PARAM: u32 = 0xE4BF7F;
/// Exact VS Code `Eva Dark Bold` property / Result / heading foreground (`#E06C75`).
pub const EVA_DARK_PROPERTY: u32 = 0xE06C75;
/// Exact VS Code `Eva Dark Bold` punctuation foreground (`#79859D`).
pub const EVA_DARK_PUNCT: u32 = 0x79859D;
/// Exact VS Code `Eva Dark Bold` inline code background (`#181A1F`).
pub const EVA_DARK_INLINE_CODE_BG: u32 = 0x181A1F;
/// Exact VS Code `Eva Dark Bold` inline code foreground (`#98C379`).
pub const EVA_DARK_INLINE_CODE_FG: u32 = 0x98C379;
/// Exact VS Code `Eva Dark Bold` blockquote background (`#31353C`).
pub const EVA_DARK_QUOTE_BG: u32 = 0x31353C;
/// Exact VS Code `Eva Dark Bold` blockquote border (`#4283F5`).
pub const EVA_DARK_QUOTE_BORDER: u32 = 0x4283F5;
/// Exact VS Code `Eva Dark Bold` hyperlink foreground (`#4283F5`).
pub const EVA_DARK_LINK: u32 = 0x4283F5;
/// Exact VS Code `Eva Dark Bold` diff inserted line foreground (`#4EC150`).
pub const EVA_DARK_DIFF_ADD: u32 = 0x4EC150;
/// Exact VS Code `Eva Dark Bold` diff deleted line foreground (`#F14C4C`).
pub const EVA_DARK_DIFF_DEL: u32 = 0xF14C4C;

pub(crate) const CODE_DOT_RED: u32 = 0xFF5F56;
pub(crate) const CODE_DOT_YELLOW: u32 = 0xFFBD2E;
pub(crate) const CODE_DOT_GREEN: u32 = 0x27C93F;
pub(crate) const CODE_DEFAULT_LANG: &str = "text";
pub(crate) const CODE_LANG_RUST: &str = "rust";
pub(crate) const CODE_LANG_DIFF: &str = "diff";
pub(crate) const CODE_LANG_JSON: &str = "json";
pub(crate) const CODE_LANG_TOML: &str = "toml";
pub(crate) const CODE_LANG_YAML: &str = "yaml";
pub(crate) const CODE_LANG_HTTP: &str = "http";
pub(crate) const CODE_LANG_MERMAID: &str = "mermaid";
pub(crate) const CODE_LANG_MATH: &str = "math";
pub(crate) const CODE_LANG_LATEX: &str = "latex";
pub(crate) const CODE_HINT_FN: &str = "fn ";
pub(crate) const CODE_HINT_LET: &str = "let ";
pub(crate) const CODE_HINT_IMPL: &str = "impl ";
pub(crate) const CODE_HINT_PUB: &str = "pub ";
pub(crate) const CODE_HINT_GET: &str = "GET ";
pub(crate) const CODE_HINT_POST: &str = "POST ";
pub(crate) const CODE_BTN_COPY: &str = "Copy";
pub(crate) const CODE_BTN_COPIED: &str = "Copied";
pub(crate) const CODE_BTN_FULLSCREEN: &str = "Fullscreen";
pub(crate) const CODE_BTN_CLOSE: &str = "Close";
pub(crate) const CODE_FULLSCREEN_OVERLAY_NAME: &str = "EuvCodeBlockFullscreen";
pub(crate) const CODE_THEME_LABEL_LIGHT: &str = "Eva Light Bold";
pub(crate) const CODE_THEME_LABEL_DARK: &str = "Eva Dark Bold";
pub(crate) const CODE_DEFAULT_MAX_HEIGHT: f32 = 360.0;
pub(crate) const CODE_FONT_SIZE: f32 = 12.5;
pub(crate) const CODE_MODAL_FONT_SIZE: f32 = 13.5;
pub(crate) const CODE_GUTTER_WIDTH: f32 = 38.0;
pub(crate) const MD_ALERT_LABEL_NOTE: &str = "NOTE";
pub(crate) const MD_ALERT_LABEL_TIP: &str = "TIP";
pub(crate) const MD_ALERT_LABEL_IMPORTANT: &str = "IMPORTANT";
pub(crate) const MD_ALERT_LABEL_WARNING: &str = "WARNING";
pub(crate) const MD_ALERT_LABEL_CAUTION: &str = "CAUTION";
pub(crate) const MD_ALERT_TAG_NOTE: &str = "[!NOTE]";
pub(crate) const MD_ALERT_TAG_TIP: &str = "[!TIP]";
pub(crate) const MD_ALERT_TAG_IMPORTANT: &str = "[!IMPORTANT]";
pub(crate) const MD_ALERT_TAG_WARNING: &str = "[!WARNING]";
pub(crate) const MD_ALERT_TAG_CAUTION: &str = "[!CAUTION]";
pub(crate) const MD_CALLOUT_FENCE: &str = ":::";
pub(crate) const MD_CALLOUT_NOTE: &str = "note";
pub(crate) const MD_CALLOUT_TIP: &str = "tip";
pub(crate) const MD_CALLOUT_IMPORTANT: &str = "important";
pub(crate) const MD_CALLOUT_WARNING: &str = "warning";
pub(crate) const MD_CALLOUT_DANGER: &str = "danger";
pub(crate) const MD_CALLOUT_CAUTION: &str = "caution";
pub(crate) const MD_CHECKBOX_ON: &str = "[x]";
pub(crate) const MD_CHECKBOX_OFF: &str = "[ ]";
pub(crate) const MD_DETAILS_OPEN_TAG: &str = "<details";
pub(crate) const MD_DETAILS_CLOSE_TAG: &str = "</details>";
pub(crate) const MD_SUMMARY_OPEN_TAG: &str = "<summary>";
pub(crate) const MD_SUMMARY_CLOSE_TAG: &str = "</summary>";
pub(crate) const MD_DETAILS_DEFAULT_SUMMARY: &str = "Details";
pub(crate) const MD_IMAGE_BADGE: &str = "IMAGE";
pub(crate) const MD_MATH_BADGE: &str = "MATH";
pub(crate) const MD_FOOTNOTES_TITLE: &str = "Footnotes";
pub(crate) const MD_KBD_OPEN: &str = "<kbd>";
pub(crate) const MD_KBD_CLOSE: &str = "</kbd>";
pub(crate) const MD_MARK_OPEN: &str = "<mark>";
pub(crate) const MD_MARK_CLOSE: &str = "</mark>";
pub(crate) const MD_SUP_OPEN: &str = "<sup>";
pub(crate) const MD_SUP_CLOSE: &str = "</sup>";
pub(crate) const MD_SUB_OPEN: &str = "<sub>";
pub(crate) const MD_SUB_CLOSE: &str = "</sub>";
pub(crate) const MD_SCHEME_HTTP: &str = "http://";
pub(crate) const MD_SCHEME_HTTPS: &str = "https://";
pub(crate) const MD_SCHEME_MAILTO: &str = "mailto:";
pub(crate) const MD_LATEX_FRAC: &str = "frac";
pub(crate) const MD_LATEX_SQRT: &str = "sqrt";
pub(crate) const MD_LATEX_TEXT: &str = "text";
pub(crate) const MD_LATEX_MATHRM: &str = "mathrm";
pub(crate) const MD_LATEX_MATHBF: &str = "mathbf";
pub(crate) const MD_LATEX_MATHIT: &str = "mathit";
pub(crate) const MD_LATEX_LEFT: &str = "left";
pub(crate) const MD_LATEX_RIGHT: &str = "right";
pub(crate) const MD_TABLE_COL_MIN_WIDTH: f32 = 120.0;
pub(crate) const MD_HIGHLIGHT_LIGHT_BG: u32 = 0xFEF08A;
pub(crate) const MD_HIGHLIGHT_DARK_BG: u32 = 0x854D0E;
pub(crate) const MD_HIGHLIGHT_LIGHT_FG: u32 = 0x1E293B;
pub(crate) const MD_HIGHLIGHT_DARK_FG: u32 = 0xFEF9C3;

pub(crate) const MD_EMOJI_MAX_LEN: usize = 18;

pub(crate) const MD_EMOJI_TABLE: &[(&str, &str)] = &[
    ("+1", "👍"),
    ("100", "💯"),
    ("art", "🎨"),
    ("book", "📖"),
    ("bug", "🐛"),
    ("bulb", "💡"),
    ("chart", "📊"),
    ("check", "✅"),
    ("clock", "⏱️"),
    ("fire", "🔥"),
    ("gear", "⚙️"),
    ("globe", "🌐"),
    ("heart", "❤️"),
    ("info", "ℹ️"),
    ("information_source", "ℹ️"),
    ("link", "🔗"),
    ("lock", "🔒"),
    ("memo", "📝"),
    ("package", "📦"),
    ("rocket", "🚀"),
    ("shield", "🛡️"),
    ("sparkles", "✨"),
    ("star", "⭐"),
    ("tada", "🎉"),
    ("thumbsup", "👍"),
    ("warning", "⚠️"),
    ("white_check_mark", "✅"),
    ("wrench", "🔧"),
    ("x", "❌"),
    ("zap", "⚡"),
];

pub(crate) const MD_LATEX_SYMBOLS: &[(&str, &str)] = &[
    ("Delta", "Δ"),
    ("Gamma", "Γ"),
    ("Lambda", "Λ"),
    ("Leftarrow", "⇐"),
    ("Leftrightarrow", "⇔"),
    ("Omega", "Ω"),
    ("Phi", "Φ"),
    ("Pi", "Π"),
    ("Psi", "Ψ"),
    ("Rightarrow", "⇒"),
    ("Sigma", "Σ"),
    ("Theta", "Θ"),
    ("Xi", "Ξ"),
    ("alpha", "α"),
    ("angle", "∠"),
    ("approx", "≈"),
    ("beta", "β"),
    ("cap", "∩"),
    ("cdot", "·"),
    ("cdots", "⋯"),
    ("chi", "χ"),
    ("cup", "∪"),
    ("degree", "°"),
    ("delta", "δ"),
    ("div", "÷"),
    ("dots", "…"),
    ("emptyset", "∅"),
    ("epsilon", "ε"),
    ("equiv", "≡"),
    ("eta", "η"),
    ("exists", "∃"),
    ("forall", "∀"),
    ("gamma", "γ"),
    ("ge", "≥"),
    ("geq", "≥"),
    ("iff", "⇔"),
    ("iiint", "∭"),
    ("iint", "∬"),
    ("in", "∈"),
    ("infty", "∞"),
    ("int", "∫"),
    ("iota", "ι"),
    ("kappa", "κ"),
    ("lambda", "λ"),
    ("land", "∧"),
    ("ldots", "…"),
    ("le", "≤"),
    ("leftarrow", "←"),
    ("leftrightarrow", "↔"),
    ("leq", "≤"),
    ("lor", "∨"),
    ("mapsto", "↦"),
    ("mp", "∓"),
    ("mu", "μ"),
    ("nabla", "∇"),
    ("ne", "≠"),
    ("neg", "¬"),
    ("neq", "≠"),
    ("notin", "∉"),
    ("nu", "ν"),
    ("oint", "∮"),
    ("omega", "ω"),
    ("oplus", "⊕"),
    ("otimes", "⊗"),
    ("parallel", "∥"),
    ("partial", "∂"),
    ("perp", "⊥"),
    ("phi", "φ"),
    ("pi", "π"),
    ("pm", "±"),
    ("prod", "∏"),
    ("propto", "∝"),
    ("psi", "ψ"),
    ("qquad", "    "),
    ("quad", "  "),
    ("rho", "ρ"),
    ("rightarrow", "→"),
    ("sigma", "σ"),
    ("sim", "∼"),
    ("simeq", "≃"),
    ("subset", "⊂"),
    ("subseteq", "⊆"),
    ("sum", "∑"),
    ("supset", "⊃"),
    ("supseteq", "⊇"),
    ("tau", "τ"),
    ("theta", "θ"),
    ("times", "×"),
    ("to", "→"),
    ("upsilon", "υ"),
    ("varepsilon", "ε"),
    ("varnothing", "∅"),
    ("varphi", "ϕ"),
    ("xi", "ξ"),
    ("zeta", "ζ"),
];

pub(crate) const KW_FN: &str = "fn";
pub(crate) const KW_LET: &str = "let";
pub(crate) const KW_MUT: &str = "mut";
pub(crate) const KW_PUB: &str = "pub";
pub(crate) const KW_MOD: &str = "mod";
pub(crate) const KW_STRUCT: &str = "struct";
pub(crate) const KW_ENUM: &str = "enum";
pub(crate) const KW_TRAIT: &str = "trait";
pub(crate) const KW_IMPL: &str = "impl";
pub(crate) const KW_CONST: &str = "const";
pub(crate) const KW_STATIC: &str = "static";
pub(crate) const KW_TYPE: &str = "type";
pub(crate) const KW_REF: &str = "ref";
pub(crate) const KW_ASYNC: &str = "async";
pub(crate) const KW_FUNCTION: &str = "function";
pub(crate) const KW_CLASS: &str = "class";
pub(crate) const KW_INTERFACE: &str = "interface";
pub(crate) const KW_VAR: &str = "var";
pub(crate) const KW_DEF: &str = "def";
pub(crate) const KW_LAMBDA: &str = "lambda";
pub(crate) const KW_LOCAL: &str = "local";
pub(crate) const KW_TABLE: &str = "table";
pub(crate) const KW_CREATE: &str = "create";
pub(crate) const KW_CTRL_USE: &str = "use";
pub(crate) const KW_CTRL_FOR: &str = "for";
pub(crate) const KW_CTRL_IN: &str = "in";
pub(crate) const KW_CTRL_WHILE: &str = "while";
pub(crate) const KW_CTRL_LOOP: &str = "loop";
pub(crate) const KW_CTRL_IF: &str = "if";
pub(crate) const KW_CTRL_ELSE: &str = "else";
pub(crate) const KW_CTRL_MATCH: &str = "match";
pub(crate) const KW_CTRL_RETURN: &str = "return";
pub(crate) const KW_CTRL_BREAK: &str = "break";
pub(crate) const KW_CTRL_CONTINUE: &str = "continue";
pub(crate) const KW_CTRL_WHERE: &str = "where";
pub(crate) const KW_CTRL_AS: &str = "as";
pub(crate) const KW_CTRL_MOVE: &str = "move";
pub(crate) const KW_CTRL_AWAIT: &str = "await";
pub(crate) const KW_CTRL_UNSAFE: &str = "unsafe";
pub(crate) const KW_CTRL_EXTERN: &str = "extern";
pub(crate) const KW_CTRL_CRATE: &str = "crate";
pub(crate) const KW_CTRL_SUPER: &str = "super";
pub(crate) const KW_CTRL_SELF: &str = "self";
pub(crate) const KW_CTRL_SELF_UPPER: &str = "Self";
pub(crate) const KW_CTRL_DYN: &str = "dyn";
pub(crate) const KW_CTRL_EXPORT: &str = "export";
pub(crate) const KW_CTRL_IMPORT: &str = "import";
pub(crate) const KW_CTRL_FROM: &str = "from";
pub(crate) const KW_CTRL_DEFAULT: &str = "default";
pub(crate) const KW_CTRL_NEW: &str = "new";
pub(crate) const KW_CTRL_TRY: &str = "try";
pub(crate) const KW_CTRL_CATCH: &str = "catch";
pub(crate) const KW_CTRL_THROW: &str = "throw";
pub(crate) const KW_CTRL_FINALLY: &str = "finally";
pub(crate) const KW_CTRL_SWITCH: &str = "switch";
pub(crate) const KW_CTRL_CASE: &str = "case";
pub(crate) const KW_CTRL_WITH: &str = "with";
pub(crate) const KW_CTRL_YIELD: &str = "yield";
pub(crate) const KW_CTRL_PASS: &str = "pass";
pub(crate) const KW_CTRL_ELIF: &str = "elif";
pub(crate) const KW_CTRL_AND: &str = "and";
pub(crate) const KW_CTRL_OR: &str = "or";
pub(crate) const KW_CTRL_NOT: &str = "not";
pub(crate) const KW_CTRL_SELECT: &str = "select";
pub(crate) const KW_CTRL_INSERT: &str = "insert";
pub(crate) const KW_CTRL_UPDATE: &str = "update";
pub(crate) const KW_CTRL_DELETE: &str = "delete";
pub(crate) const KW_CTRL_ECHO: &str = "echo";
pub(crate) const KW_CTRL_THEN: &str = "then";
pub(crate) const KW_CTRL_FI: &str = "fi";
pub(crate) const KW_CTRL_DONE: &str = "done";
pub(crate) const KW_CTRL_DO: &str = "do";
pub(crate) const KW_CONST_TRUE: &str = "true";
pub(crate) const KW_CONST_FALSE: &str = "false";
pub(crate) const KW_CONST_NONE: &str = "None";
pub(crate) const KW_CONST_SOME: &str = "Some";
pub(crate) const KW_CONST_OK: &str = "Ok";
pub(crate) const KW_CONST_ERR: &str = "Err";
pub(crate) const KW_CONST_NULL: &str = "null";
pub(crate) const KW_CONST_UNDEFINED: &str = "undefined";
pub(crate) const KW_CONST_NAN: &str = "NaN";
pub(crate) const KW_CONST_INFINITY: &str = "Infinity";
pub(crate) const KW_CONST_TRUE_PY: &str = "True";
pub(crate) const KW_CONST_FALSE_PY: &str = "False";
pub(crate) const KW_PRIM_BOOL: &str = "bool";
pub(crate) const KW_PRIM_CHAR: &str = "char";
pub(crate) const KW_PRIM_STR: &str = "str";
pub(crate) const KW_PRIM_U8: &str = "u8";
pub(crate) const KW_PRIM_U16: &str = "u16";
pub(crate) const KW_PRIM_U32: &str = "u32";
pub(crate) const KW_PRIM_U64: &str = "u64";
pub(crate) const KW_PRIM_U128: &str = "u128";
pub(crate) const KW_PRIM_USIZE: &str = "usize";
pub(crate) const KW_PRIM_I8: &str = "i8";
pub(crate) const KW_PRIM_I16: &str = "i16";
pub(crate) const KW_PRIM_I32: &str = "i32";
pub(crate) const KW_PRIM_I64: &str = "i64";
pub(crate) const KW_PRIM_I128: &str = "i128";
pub(crate) const KW_PRIM_ISIZE: &str = "isize";
pub(crate) const KW_PRIM_F32: &str = "f32";
pub(crate) const KW_PRIM_F64: &str = "f64";
pub(crate) const KW_PRIM_NUMBER: &str = "number";
pub(crate) const KW_PRIM_STRING: &str = "string";
pub(crate) const KW_PRIM_BOOLEAN: &str = "boolean";
pub(crate) const KW_PRIM_VOID: &str = "void";
pub(crate) const KW_PRIM_ANY: &str = "any";
pub(crate) const KW_RES_RESULT: &str = "Result";
pub(crate) const KW_RES_OPTION: &str = "Option";
pub(crate) const CODE_BYTE_SLASH: u8 = b'/';
pub(crate) const CODE_BYTE_DQUOTE: u8 = b'"';
pub(crate) const CODE_BYTE_SQUOTE: u8 = b'\'';
pub(crate) const CODE_BYTE_BACKTICK: u8 = b'`';
pub(crate) const CODE_BYTE_BACKSLASH: u8 = b'\\';
pub(crate) const CODE_BYTE_SPACE: u8 = b' ';
pub(crate) const CODE_BYTE_COLON: u8 = b':';
pub(crate) const CODE_BYTE_DOT: u8 = b'.';
pub(crate) const CODE_BYTE_UNDERSCORE: u8 = b'_';
pub(crate) const CODE_BYTE_BANG: u8 = b'!';
pub(crate) const CODE_BYTE_LPAREN: u8 = b'(';
pub(crate) const CODE_BYTE_HASH: u8 = b'#';
pub(crate) const CODE_BYTE_TILDE: u8 = b'~';
pub(crate) const MD_BYTE_PIPE: u8 = b'|';
pub(crate) const MD_BYTE_DASH: u8 = b'-';
pub(crate) const MD_BYTE_STAR: u8 = b'*';
pub(crate) const MD_BYTE_PLUS: u8 = b'+';
pub(crate) const MD_BYTE_NEWLINE: u8 = b'\n';
pub(crate) const MD_BYTE_DOLLAR: u8 = b'$';
pub(crate) const MD_BYTE_EQ: u8 = b'=';
pub(crate) const MD_BYTE_LT: u8 = b'<';
pub(crate) const MD_BYTE_CARET: u8 = b'^';
pub(crate) const MD_BYTE_LBRACKET: u8 = b'[';

pub(crate) const MD_INLINE_TRIGGER_LUT: [bool; 256] = {
    let mut lut: [bool; 256] = [false; 256];
    lut[CODE_BYTE_BACKSLASH as usize] = true;
    lut[MD_BYTE_NEWLINE as usize] = true;
    lut[CODE_BYTE_BACKTICK as usize] = true;
    lut[MD_BYTE_DOLLAR as usize] = true;
    lut[MD_BYTE_STAR as usize] = true;
    lut[CODE_BYTE_UNDERSCORE as usize] = true;
    lut[CODE_BYTE_TILDE as usize] = true;
    lut[MD_BYTE_EQ as usize] = true;
    lut[MD_BYTE_LT as usize] = true;
    lut[MD_BYTE_CARET as usize] = true;
    lut[CODE_BYTE_BANG as usize] = true;
    lut[MD_BYTE_LBRACKET as usize] = true;
    lut[CODE_BYTE_COLON as usize] = true;
    lut
};

pub(crate) const MD_ESCAPABLE_BYTE_LUT: [bool; 256] = {
    let mut lut: [bool; 256] = [false; 256];
    lut[b'\\' as usize] = true;
    lut[b'`' as usize] = true;
    lut[b'*' as usize] = true;
    lut[b'_' as usize] = true;
    lut[b'{' as usize] = true;
    lut[b'}' as usize] = true;
    lut[b'[' as usize] = true;
    lut[b']' as usize] = true;
    lut[b'(' as usize] = true;
    lut[b')' as usize] = true;
    lut[b'#' as usize] = true;
    lut[b'+' as usize] = true;
    lut[b'-' as usize] = true;
    lut[b'.' as usize] = true;
    lut[b'!' as usize] = true;
    lut[b'~' as usize] = true;
    lut[b'^' as usize] = true;
    lut[b'=' as usize] = true;
    lut[b'$' as usize] = true;
    lut[b':' as usize] = true;
    lut[b'<' as usize] = true;
    lut[b'>' as usize] = true;
    lut
};