docsui-cli 0.0.59

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 (49) hide show
  1. package/README.md +279 -0
  2. package/dist/commands/add.d.ts +5 -0
  3. package/dist/commands/add.js +254 -0
  4. package/dist/commands/doctor.d.ts +5 -0
  5. package/dist/commands/doctor.js +250 -0
  6. package/dist/commands/init.d.ts +5 -0
  7. package/dist/commands/init.js +548 -0
  8. package/dist/commands/list.d.ts +5 -0
  9. package/dist/commands/list.js +84 -0
  10. package/dist/commands/mcp.d.ts +3 -0
  11. package/dist/commands/mcp.js +1562 -0
  12. package/dist/commands/new.d.ts +5 -0
  13. package/dist/commands/new.js +113 -0
  14. package/dist/commands/remove.d.ts +5 -0
  15. package/dist/commands/remove.js +134 -0
  16. package/dist/commands/save.d.ts +5 -0
  17. package/dist/commands/save.js +60 -0
  18. package/dist/commands/update.d.ts +5 -0
  19. package/dist/commands/update.js +247 -0
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.js +88 -0
  22. package/dist/latex-to-primitives.d.ts +59 -0
  23. package/dist/latex-to-primitives.js +1019 -0
  24. package/dist/lib/component-registry.d.ts +33 -0
  25. package/dist/lib/component-registry.js +843 -0
  26. package/dist/lib/css-tokens.d.ts +8 -0
  27. package/dist/lib/css-tokens.js +294 -0
  28. package/dist/metadata.d.ts +1 -0
  29. package/dist/metadata.js +4 -0
  30. package/dist/symbol-map.d.ts +30 -0
  31. package/dist/symbol-map.js +1607 -0
  32. package/dist/utils/detect-structure.d.ts +16 -0
  33. package/dist/utils/detect-structure.js +58 -0
  34. package/dist/utils/fetch-component.d.ts +13 -0
  35. package/dist/utils/fetch-component.js +81 -0
  36. package/dist/utils/get-config.d.ts +14 -0
  37. package/dist/utils/get-config.js +19 -0
  38. package/dist/utils/install-deps.d.ts +3 -0
  39. package/dist/utils/install-deps.js +23 -0
  40. package/dist/utils/save-mdx-page.d.ts +35 -0
  41. package/dist/utils/save-mdx-page.js +44 -0
  42. package/dist/utils/scan-mdx.d.ts +20 -0
  43. package/dist/utils/scan-mdx.js +106 -0
  44. package/dist/utils/telemetry.d.ts +3 -0
  45. package/dist/utils/telemetry.js +42 -0
  46. package/dist/utils/write-component.d.ts +7 -0
  47. package/dist/utils/write-component.js +25 -0
  48. package/dist/webview-bundle.js +3478 -0
  49. package/package.json +94 -0
@@ -0,0 +1,1607 @@
1
+ const SYMBOL_MAP = [
2
+ // ── Composition ─────────────────────────────────────────────────────────────
3
+ {
4
+ name: "expression / compose / group",
5
+ category: "composition",
6
+ symbols: [],
7
+ latex: [],
8
+ component: "Expr",
9
+ usage: '<Expr>x <Pow exp="2">dx</Pow></Expr>',
10
+ description: "Inline composition wrapper \u2014 groups text, symbols, and components into a single node"
11
+ },
12
+ // ── Arithmetic ──────────────────────────────────────────────────────────────
13
+ {
14
+ name: "plus / addition / unary plus",
15
+ category: "arithmetic",
16
+ symbols: ["+"],
17
+ latex: ["+"],
18
+ component: "Plus",
19
+ usage: "<Plus />",
20
+ description: "Plus sign +"
21
+ },
22
+ {
23
+ name: "minus / subtraction / unary minus",
24
+ category: "arithmetic",
25
+ symbols: ["\u2212", "-"],
26
+ latex: ["-"],
27
+ component: "Minus",
28
+ usage: "<Minus />",
29
+ description: "Minus sign \u2212 (U+2212, not a hyphen)"
30
+ },
31
+ {
32
+ name: "multiply / multiplication",
33
+ category: "arithmetic",
34
+ symbols: ["\xD7"],
35
+ latex: ["\\times"],
36
+ component: "Mul",
37
+ usage: "<Mul />",
38
+ description: "Multiplication sign \xD7 (inline)"
39
+ },
40
+ {
41
+ name: "divide / division slash / inline division",
42
+ category: "arithmetic",
43
+ symbols: ["/"],
44
+ latex: ["/"],
45
+ component: "Div",
46
+ usage: "<Div />",
47
+ description: "Division slash / (inline a/b context)"
48
+ },
49
+ {
50
+ name: "modulus / remainder / programming modulus",
51
+ category: "arithmetic",
52
+ symbols: ["%"],
53
+ latex: ["\\%"],
54
+ component: "Modulus",
55
+ usage: "<Modulus />",
56
+ description: "Modulus operator % (programming) \u2014 use Percent for math percent"
57
+ },
58
+ {
59
+ name: "fraction",
60
+ category: "arithmetic",
61
+ symbols: ["a/b", "\xBD", "\xBE"],
62
+ latex: ["\\frac{a}{b}", "\\tfrac{a}{b}"],
63
+ component: "Frac",
64
+ usage: '<Frac num="a" den="b" />',
65
+ description: "Vertical fraction with dividing line"
66
+ },
67
+ {
68
+ name: "power / exponent / superscript",
69
+ category: "arithmetic",
70
+ symbols: ["x\xB2", "x\u207F", "e\u02E3", "2\xB3"],
71
+ latex: ["x^{n}", "x^2", "e^x"],
72
+ component: "Pow",
73
+ usage: '<Pow exp="2">x</Pow>',
74
+ description: "Raised exponent \u2014 base as children, exponent as exp prop"
75
+ },
76
+ {
77
+ name: "subscript",
78
+ category: "arithmetic",
79
+ symbols: ["x\u2099", "a\u1D62", "x\u2080"],
80
+ latex: ["x_{n}", "a_i", "x_0"],
81
+ component: "Sub",
82
+ usage: '<Sub sub="n">x</Sub>',
83
+ description: "Lowered subscript \u2014 base as children, subscript as sub prop"
84
+ },
85
+ {
86
+ name: "square root",
87
+ category: "arithmetic",
88
+ symbols: ["\u221Ax", "\u221A(a+b)"],
89
+ latex: ["\\sqrt{x}", "\\sqrt{a+b}"],
90
+ component: "Sqrt",
91
+ usage: "<Sqrt>x</Sqrt>",
92
+ description: "Square root with overbar"
93
+ },
94
+ {
95
+ name: "nth root / cube root",
96
+ category: "arithmetic",
97
+ symbols: ["\u207F\u221Ax", "\u221Bx", "\u221Cx"],
98
+ latex: ["\\sqrt[n]{x}", "\\sqrt[3]{x}"],
99
+ component: "Sqrt",
100
+ usage: '<Sqrt n="3">x</Sqrt>',
101
+ description: "Nth root \u2014 index as n prop"
102
+ },
103
+ {
104
+ name: "absolute value",
105
+ category: "arithmetic",
106
+ symbols: ["|x|", "|a \u2212 b|"],
107
+ latex: ["\\left|x\\right|", "\\abs{x}"],
108
+ component: "Abs",
109
+ usage: "<Abs>x</Abs>",
110
+ description: "Absolute value bars"
111
+ },
112
+ {
113
+ name: "parentheses / grouping",
114
+ category: "arithmetic",
115
+ symbols: ["(a+b)", "(expr)"],
116
+ latex: ["\\left(a+b\\right)"],
117
+ component: "Paren",
118
+ usage: "<Paren>a + b</Paren>",
119
+ description: "Auto-sized parentheses"
120
+ },
121
+ {
122
+ name: "infinity",
123
+ category: "arithmetic",
124
+ symbols: ["\u221E"],
125
+ latex: ["\\infty"],
126
+ component: "Inf",
127
+ usage: "<Inf />",
128
+ description: "Infinity symbol \u221E"
129
+ },
130
+ {
131
+ name: "degree symbol",
132
+ category: "arithmetic",
133
+ symbols: ["90\xB0", "180\xB0"],
134
+ latex: ["90^\\circ"],
135
+ component: "Deg",
136
+ usage: "<Deg>90</Deg>",
137
+ description: "Degree symbol as superscript"
138
+ },
139
+ {
140
+ name: "division / obelus",
141
+ category: "school",
142
+ symbols: ["\xF7"],
143
+ latex: ["\\div"],
144
+ component: "Division",
145
+ usage: "<Division />",
146
+ description: "Division sign \xF7 (elementary math)"
147
+ },
148
+ {
149
+ name: "multiplication / times",
150
+ category: "school",
151
+ symbols: ["\xD7"],
152
+ latex: ["\\times"],
153
+ component: "Times",
154
+ usage: "<Times />",
155
+ description: "Multiplication cross \xD7"
156
+ },
157
+ {
158
+ name: "percent",
159
+ category: "school",
160
+ symbols: ["%"],
161
+ latex: ["\\%"],
162
+ component: "Percent",
163
+ usage: "<Percent />",
164
+ description: "Percent sign %"
165
+ },
166
+ {
167
+ name: "per mille / per thousand",
168
+ category: "school",
169
+ symbols: ["\u2030"],
170
+ latex: ["\\permille"],
171
+ component: "Permille",
172
+ usage: "<Permille />",
173
+ description: "Per mille sign \u2030"
174
+ },
175
+ {
176
+ name: "proportion",
177
+ category: "school",
178
+ symbols: ["\u2237", "a:b = c:d"],
179
+ latex: ["\\propto", "::"],
180
+ component: "Proportion",
181
+ usage: "<Proportion />",
182
+ description: "Proportion symbol \u2237 (a:b \u2237 c:d)"
183
+ },
184
+ {
185
+ name: "ratio",
186
+ category: "school",
187
+ symbols: ["\u2236"],
188
+ latex: [":"],
189
+ component: "Ratio",
190
+ usage: "<Ratio />",
191
+ description: "Ratio colon \u2236"
192
+ },
193
+ {
194
+ name: "plus or minus",
195
+ category: "arithmetic",
196
+ symbols: ["\xB1"],
197
+ latex: ["\\pm"],
198
+ component: "PlusMinus",
199
+ usage: "<PlusMinus />",
200
+ description: "Plus-minus sign \xB1"
201
+ },
202
+ {
203
+ name: "minus or plus",
204
+ category: "arithmetic",
205
+ symbols: ["\u2213"],
206
+ latex: ["\\mp"],
207
+ component: "MinusPlus",
208
+ usage: "<MinusPlus />",
209
+ description: "Minus-plus sign \u2213"
210
+ },
211
+ // ── Calculus ─────────────────────────────────────────────────────────────────
212
+ {
213
+ name: "integral / indefinite integral",
214
+ category: "calculus",
215
+ symbols: ["\u222B", "\u222Bf(x)dx"],
216
+ latex: ["\\int f(x)\\,dx"],
217
+ component: "Integral",
218
+ usage: "<Integral>f(x) dx</Integral>",
219
+ description: "Integral sign with integrand as children"
220
+ },
221
+ {
222
+ name: "definite integral / bounded integral",
223
+ category: "calculus",
224
+ symbols: ["\u222B\u2090\u1D47", "\u222B\u2080\xB9"],
225
+ latex: ["\\int_a^b f(x)\\,dx"],
226
+ component: "Integral",
227
+ usage: '<Integral from="a" to="b">f(x) dx</Integral>',
228
+ description: "Integral with lower and upper bounds"
229
+ },
230
+ {
231
+ name: "contour integral / line integral",
232
+ category: "calculus",
233
+ symbols: ["\u222E"],
234
+ latex: ["\\oint"],
235
+ component: "ContourIntegral",
236
+ usage: "<ContourIntegral>f dz</ContourIntegral>",
237
+ description: "Closed curve integral \u222E"
238
+ },
239
+ {
240
+ name: "double integral",
241
+ category: "calculus",
242
+ symbols: ["\u222C"],
243
+ latex: ["\\iint"],
244
+ component: "DoubleInt",
245
+ usage: "<DoubleInt />",
246
+ description: "Double integral \u222C"
247
+ },
248
+ {
249
+ name: "triple integral",
250
+ category: "calculus",
251
+ symbols: ["\u222D"],
252
+ latex: ["\\iiint"],
253
+ component: "TripleInt",
254
+ usage: "<TripleInt />",
255
+ description: "Triple integral \u222D"
256
+ },
257
+ {
258
+ name: "summation / sigma notation",
259
+ category: "calculus",
260
+ symbols: ["\u2211", "\u03A3"],
261
+ latex: ["\\sum_{i=0}^{n}"],
262
+ component: "Sum",
263
+ usage: '<Sum from="i=0" to="n">a\u1D62</Sum>',
264
+ description: "Summation with index bounds"
265
+ },
266
+ {
267
+ name: "product notation / pi notation",
268
+ category: "calculus",
269
+ symbols: ["\u220F", "\u03A0"],
270
+ latex: ["\\prod_{i=1}^{n}"],
271
+ component: "Prod",
272
+ usage: '<Prod from="i=1" to="n">a\u1D62</Prod>',
273
+ description: "Product with index bounds"
274
+ },
275
+ {
276
+ name: "limit",
277
+ category: "calculus",
278
+ symbols: ["lim", "lim_{x\u21920}"],
279
+ latex: ["\\lim_{x \\to 0}"],
280
+ component: "Lim",
281
+ usage: '<Lim sub="x \u2192 0">f(x)</Lim>',
282
+ description: "Limit with subscript condition"
283
+ },
284
+ {
285
+ name: "derivative / first derivative",
286
+ category: "calculus",
287
+ symbols: ["dy/dx", "d/dx", "f\u2032"],
288
+ latex: ["\\frac{d}{dx}", "\\frac{dy}{dx}"],
289
+ component: "Deriv",
290
+ usage: '<Deriv of="y" by="x" />',
291
+ description: "Leibniz derivative notation"
292
+ },
293
+ {
294
+ name: "partial derivative",
295
+ category: "calculus",
296
+ symbols: ["\u2202f/\u2202x", "\u2202/\u2202x"],
297
+ latex: ["\\frac{\\partial f}{\\partial x}"],
298
+ component: "PDeriv",
299
+ usage: '<PDeriv of="f" by="x" />',
300
+ description: "Partial derivative \u2202f/\u2202x"
301
+ },
302
+ {
303
+ name: "nabla / gradient / del",
304
+ category: "calculus",
305
+ symbols: ["\u2207", "\u2207f", "grad f"],
306
+ latex: ["\\nabla", "\\nabla f"],
307
+ component: "Nabla",
308
+ usage: "<Nabla />",
309
+ description: "Nabla / del operator \u2207"
310
+ },
311
+ {
312
+ name: "Laplacian",
313
+ category: "calculus",
314
+ symbols: ["\u2207\xB2", "\u0394", "\u25B2"],
315
+ latex: ["\\nabla^2", "\\Delta", "\\laplacian"],
316
+ component: "Laplacian",
317
+ usage: "<Laplacian />",
318
+ description: "Laplace operator \u2207\xB2"
319
+ },
320
+ {
321
+ name: "differential / upright d",
322
+ category: "calculus",
323
+ symbols: ["dx", "dt", "dV"],
324
+ latex: ["\\,dx", "\\mathrm{d}x"],
325
+ component: "Differential",
326
+ usage: "<Differential />x",
327
+ description: "Upright roman d for differentials"
328
+ },
329
+ {
330
+ name: "overbrace with label",
331
+ category: "calculus",
332
+ symbols: ["\u23DE"],
333
+ latex: ["\\overbrace{x+y}^{n}"],
334
+ component: "Overbrace",
335
+ usage: '<Overbrace label="n terms">x + y + z</Overbrace>',
336
+ description: "Curly brace above expression with annotation"
337
+ },
338
+ {
339
+ name: "underbrace with label",
340
+ category: "calculus",
341
+ symbols: ["\u23DF"],
342
+ latex: ["\\underbrace{x+y}_{n}"],
343
+ component: "Underbrace",
344
+ usage: '<Underbrace label="n terms">x + y + z</Underbrace>',
345
+ description: "Curly brace below expression with annotation"
346
+ },
347
+ // ── Trigonometry ─────────────────────────────────────────────────────────────
348
+ {
349
+ name: "sine",
350
+ category: "trig",
351
+ symbols: ["sin", "sin \u03B8"],
352
+ latex: ["\\sin\\theta"],
353
+ component: "Sin",
354
+ usage: "<Sin /><Theta />",
355
+ description: "Sine function"
356
+ },
357
+ {
358
+ name: "cosine",
359
+ category: "trig",
360
+ symbols: ["cos", "cos \u03B8"],
361
+ latex: ["\\cos\\theta"],
362
+ component: "Cos",
363
+ usage: "<Cos /><Theta />",
364
+ description: "Cosine function"
365
+ },
366
+ {
367
+ name: "tangent",
368
+ category: "trig",
369
+ symbols: ["tan", "tan \u03B8"],
370
+ latex: ["\\tan\\theta"],
371
+ component: "Tan",
372
+ usage: "<Tan /><Theta />",
373
+ description: "Tangent function"
374
+ },
375
+ {
376
+ name: "arcsine / inverse sine",
377
+ category: "trig",
378
+ symbols: ["arcsin", "sin\u207B\xB9"],
379
+ latex: ["\\arcsin", "\\sin^{-1}"],
380
+ component: "ArcSin",
381
+ usage: "<ArcSin />",
382
+ description: "Inverse sine function"
383
+ },
384
+ {
385
+ name: "arccosine / inverse cosine",
386
+ category: "trig",
387
+ symbols: ["arccos", "cos\u207B\xB9"],
388
+ latex: ["\\arccos", "\\cos^{-1}"],
389
+ component: "ArcCos",
390
+ usage: "<ArcCos />",
391
+ description: "Inverse cosine function"
392
+ },
393
+ {
394
+ name: "arctangent / inverse tangent",
395
+ category: "trig",
396
+ symbols: ["arctan", "tan\u207B\xB9"],
397
+ latex: ["\\arctan", "\\tan^{-1}"],
398
+ component: "ArcTan",
399
+ usage: "<ArcTan />",
400
+ description: "Inverse tangent function"
401
+ },
402
+ {
403
+ name: "logarithm",
404
+ category: "trig",
405
+ symbols: ["log", "log\u2082", "log\u2081\u2080"],
406
+ latex: ["\\log", "\\log_2"],
407
+ component: "Log",
408
+ usage: "<Log />",
409
+ description: "Logarithm function"
410
+ },
411
+ {
412
+ name: "natural logarithm",
413
+ category: "trig",
414
+ symbols: ["ln", "ln x"],
415
+ latex: ["\\ln x"],
416
+ component: "Ln",
417
+ usage: "<Ln />",
418
+ description: "Natural logarithm ln"
419
+ },
420
+ // ── Algebra & Combinatorics ───────────────────────────────────────────────────
421
+ {
422
+ name: "factorial",
423
+ category: "algebra",
424
+ symbols: ["n!", "5!"],
425
+ latex: ["n!", "5!"],
426
+ component: "Factorial",
427
+ usage: "<Factorial>n</Factorial>",
428
+ description: "Factorial n!"
429
+ },
430
+ {
431
+ name: "binomial coefficient / n choose k",
432
+ category: "algebra",
433
+ symbols: ["C(n,k)", "\u207FC\u2096", "(n k)"],
434
+ latex: ["\\binom{n}{k}", "\\C{n}{k}"],
435
+ component: "Choose",
436
+ usage: '<Choose n="n" k="k" />',
437
+ description: "Binomial coefficient C(n,k)"
438
+ },
439
+ {
440
+ name: "floor function",
441
+ category: "algebra",
442
+ symbols: ["\u230Ax\u230B"],
443
+ latex: ["\\lfloor x \\rfloor", "\\floor{x}"],
444
+ component: "Floor",
445
+ usage: "<Floor>x</Floor>",
446
+ description: "Floor function \u230Ax\u230B"
447
+ },
448
+ {
449
+ name: "ceiling function",
450
+ category: "algebra",
451
+ symbols: ["\u2308x\u2309"],
452
+ latex: ["\\lceil x \\rceil", "\\ceil{x}"],
453
+ component: "Ceil",
454
+ usage: "<Ceil>x</Ceil>",
455
+ description: "Ceiling function \u2308x\u2309"
456
+ },
457
+ {
458
+ name: "modulo",
459
+ category: "algebra",
460
+ symbols: ["mod", "a mod n"],
461
+ latex: ["a \\bmod n", "a \\mod n"],
462
+ component: "Mod",
463
+ usage: "<Mod>n</Mod>",
464
+ description: "Modulo operation"
465
+ },
466
+ // ── Set Theory ──────────────────────────────────────────────────────────────
467
+ {
468
+ name: "element of / in",
469
+ category: "sets",
470
+ symbols: ["\u2208", "x \u2208 A"],
471
+ latex: ["\\in"],
472
+ component: "In",
473
+ usage: "<In />",
474
+ description: "Element of \u2208"
475
+ },
476
+ {
477
+ name: "not element of",
478
+ category: "sets",
479
+ symbols: ["\u2209"],
480
+ latex: ["\\notin"],
481
+ component: "NotIn",
482
+ usage: "<NotIn />",
483
+ description: "Not element of \u2209"
484
+ },
485
+ {
486
+ name: "subset",
487
+ category: "sets",
488
+ symbols: ["\u2282", "A \u2282 B"],
489
+ latex: ["\\subset"],
490
+ component: "Subset",
491
+ usage: "<Subset />",
492
+ description: "Subset \u2282"
493
+ },
494
+ {
495
+ name: "proper subset / strict subset",
496
+ category: "sets",
497
+ symbols: ["\u228A"],
498
+ latex: ["\\subsetneq"],
499
+ component: "ProperSubset",
500
+ usage: "<ProperSubset />",
501
+ description: "Proper subset \u228A (not equal)"
502
+ },
503
+ {
504
+ name: "union",
505
+ category: "sets",
506
+ symbols: ["\u222A", "A \u222A B"],
507
+ latex: ["\\cup"],
508
+ component: "Union",
509
+ usage: "<Union />",
510
+ description: "Set union \u222A"
511
+ },
512
+ {
513
+ name: "intersection",
514
+ category: "sets",
515
+ symbols: ["\u2229", "A \u2229 B"],
516
+ latex: ["\\cap"],
517
+ component: "Intersect",
518
+ usage: "<Intersect />",
519
+ description: "Set intersection \u2229"
520
+ },
521
+ {
522
+ name: "big union / indexed union",
523
+ category: "sets",
524
+ symbols: ["\u22C3", "\u22C3\u1D62 A\u1D62"],
525
+ latex: ["\\bigcup_{i}"],
526
+ component: "BigUnion",
527
+ usage: '<BigUnion from="i=1" to="n">A\u1D62</BigUnion>',
528
+ description: "N-ary union over index"
529
+ },
530
+ {
531
+ name: "big intersection / indexed intersection",
532
+ category: "sets",
533
+ symbols: ["\u22C2", "\u22C2\u1D62 A\u1D62"],
534
+ latex: ["\\bigcap_{i}"],
535
+ component: "BigIntersect",
536
+ usage: '<BigIntersect from="i=1" to="n">A\u1D62</BigIntersect>',
537
+ description: "N-ary intersection over index"
538
+ },
539
+ {
540
+ name: "empty set",
541
+ category: "sets",
542
+ symbols: ["\u2205", "{}"],
543
+ latex: ["\\emptyset", "\\varnothing"],
544
+ component: "Empty",
545
+ usage: "<Empty />",
546
+ description: "Empty set \u2205"
547
+ },
548
+ {
549
+ name: "natural numbers",
550
+ category: "sets",
551
+ symbols: ["\u2115"],
552
+ latex: ["\\mathbb{N}"],
553
+ component: "NN",
554
+ usage: "<NN />",
555
+ description: "Set of natural numbers \u2115"
556
+ },
557
+ {
558
+ name: "integers",
559
+ category: "sets",
560
+ symbols: ["\u2124"],
561
+ latex: ["\\mathbb{Z}"],
562
+ component: "ZZ",
563
+ usage: "<ZZ />",
564
+ description: "Set of integers \u2124"
565
+ },
566
+ {
567
+ name: "real numbers",
568
+ category: "sets",
569
+ symbols: ["\u211D"],
570
+ latex: ["\\mathbb{R}"],
571
+ component: "RR",
572
+ usage: "<RR />",
573
+ description: "Set of real numbers \u211D"
574
+ },
575
+ {
576
+ name: "complex numbers",
577
+ category: "sets",
578
+ symbols: ["\u2102"],
579
+ latex: ["\\mathbb{C}"],
580
+ component: "CC",
581
+ usage: "<CC />",
582
+ description: "Set of complex numbers \u2102"
583
+ },
584
+ // ── Logic ────────────────────────────────────────────────────────────────────
585
+ {
586
+ name: "logical and / conjunction",
587
+ category: "logic",
588
+ symbols: ["\u2227", "AND", "p \u2227 q"],
589
+ latex: ["\\land", "\\wedge"],
590
+ component: "And",
591
+ usage: "<And />",
592
+ description: "Logical AND \u2227"
593
+ },
594
+ {
595
+ name: "logical or / disjunction",
596
+ category: "logic",
597
+ symbols: ["\u2228", "OR", "p \u2228 q"],
598
+ latex: ["\\lor", "\\vee"],
599
+ component: "Or",
600
+ usage: "<Or />",
601
+ description: "Logical OR \u2228"
602
+ },
603
+ {
604
+ name: "logical not / negation",
605
+ category: "logic",
606
+ symbols: ["\xAC", "NOT", "~p"],
607
+ latex: ["\\lnot", "\\neg"],
608
+ component: "Not",
609
+ usage: "<Not />",
610
+ description: "Logical NOT \xAC"
611
+ },
612
+ {
613
+ name: "implies / conditional",
614
+ category: "logic",
615
+ symbols: ["\u27F9", "\u2192", "p \u2192 q"],
616
+ latex: ["\\Rightarrow", "\\implies"],
617
+ component: "Implies",
618
+ usage: "<Implies />",
619
+ description: "Implication \u27F9"
620
+ },
621
+ {
622
+ name: "if and only if / biconditional",
623
+ category: "logic",
624
+ symbols: ["\u27FA", "\u2194", "p \u2194 q"],
625
+ latex: ["\\Leftrightarrow", "\\iff"],
626
+ component: "Iff",
627
+ usage: "<Iff />",
628
+ description: "Biconditional \u27FA"
629
+ },
630
+ {
631
+ name: "for all / universal quantifier",
632
+ category: "logic",
633
+ symbols: ["\u2200", "\u2200x"],
634
+ latex: ["\\forall"],
635
+ component: "ForAll",
636
+ usage: "<ForAll />",
637
+ description: "Universal quantifier \u2200"
638
+ },
639
+ {
640
+ name: "there exists / existential quantifier",
641
+ category: "logic",
642
+ symbols: ["\u2203", "\u2203x"],
643
+ latex: ["\\exists"],
644
+ component: "Exists",
645
+ usage: "<Exists />",
646
+ description: "Existential quantifier \u2203"
647
+ },
648
+ {
649
+ name: "therefore",
650
+ category: "logic",
651
+ symbols: ["\u2234"],
652
+ latex: ["\\therefore"],
653
+ component: "Therefore",
654
+ usage: "<Therefore />",
655
+ description: "Therefore \u2234"
656
+ },
657
+ {
658
+ name: "because / since",
659
+ category: "logic",
660
+ symbols: ["\u2235"],
661
+ latex: ["\\because"],
662
+ component: "Because",
663
+ usage: "<Because />",
664
+ description: "Because \u2235"
665
+ },
666
+ {
667
+ name: "end of proof / QED",
668
+ category: "logic",
669
+ symbols: ["\u220E", "\u25A1", "QED"],
670
+ latex: ["\\qed", "\\blacksquare"],
671
+ component: "QED",
672
+ usage: "<QED />",
673
+ description: "End of proof \u220E"
674
+ },
675
+ // ── Linear Algebra ────────────────────────────────────────────────────────────
676
+ {
677
+ name: "vector",
678
+ category: "linear-algebra",
679
+ symbols: ["v\u20D7", "\u2192v", "bold v"],
680
+ latex: ["\\vec{v}", "\\mathbf{v}"],
681
+ component: "Vec",
682
+ usage: "<Vec>v</Vec>",
683
+ description: "Vector notation with arrow"
684
+ },
685
+ {
686
+ name: "norm / magnitude",
687
+ category: "linear-algebra",
688
+ symbols: ["\u2016v\u2016", "|v|"],
689
+ latex: ["\\|v\\|", "\\norm{v}"],
690
+ component: "Norm",
691
+ usage: "<Norm>v</Norm>",
692
+ description: "Norm / magnitude \u2016v\u2016"
693
+ },
694
+ {
695
+ name: "determinant",
696
+ category: "linear-algebra",
697
+ symbols: ["det(A)", "|A|"],
698
+ latex: ["\\det(A)", "\\det A"],
699
+ component: "Det",
700
+ usage: "<Det>A</Det>",
701
+ description: "Determinant of a matrix"
702
+ },
703
+ {
704
+ name: "transpose",
705
+ category: "linear-algebra",
706
+ symbols: ["A\u1D40", "A^T"],
707
+ latex: ["A^T", "A^\\top"],
708
+ component: "Transpose",
709
+ usage: "<Transpose>A</Transpose>",
710
+ description: "Matrix transpose A\u1D40"
711
+ },
712
+ {
713
+ name: "matrix",
714
+ category: "linear-algebra",
715
+ symbols: ["[a\u1D62\u2C7C]", "2\xD72 matrix"],
716
+ latex: ["\\begin{pmatrix}...\\end{pmatrix}"],
717
+ component: "Matrix",
718
+ usage: '<Matrix rows={[["a","b"],["c","d"]]} />',
719
+ description: "Matrix with rows array"
720
+ },
721
+ {
722
+ name: "dot product",
723
+ category: "linear-algebra",
724
+ symbols: ["\xB7", "u\xB7v"],
725
+ latex: ["\\cdot", "u \\cdot v"],
726
+ component: "Dot",
727
+ usage: "<Dot />",
728
+ description: "Dot product \xB7"
729
+ },
730
+ {
731
+ name: "cross product",
732
+ category: "linear-algebra",
733
+ symbols: ["\xD7", "u\xD7v"],
734
+ latex: ["\\times", "u \\times v"],
735
+ component: "Cross",
736
+ usage: "<Cross />",
737
+ description: "Cross product \xD7"
738
+ },
739
+ // ── Probability & Statistics ──────────────────────────────────────────────────
740
+ {
741
+ name: "probability",
742
+ category: "probability",
743
+ symbols: ["P(A)", "Pr(A)"],
744
+ latex: ["P(A)", "\\Pr(A)"],
745
+ component: "Prob",
746
+ usage: "<Prob>A</Prob>",
747
+ description: "Probability P(A)"
748
+ },
749
+ {
750
+ name: "conditional probability",
751
+ category: "probability",
752
+ symbols: ["P(A|B)"],
753
+ latex: ["P(A|B)", "P(A \\mid B)"],
754
+ component: "CondProb",
755
+ usage: "<CondProb event={<>A</>} given={<>B</>} />",
756
+ description: "Conditional probability P(A|B)"
757
+ },
758
+ {
759
+ name: "expected value / expectation",
760
+ category: "probability",
761
+ symbols: ["E[X]", "\u{1D53C}[X]"],
762
+ latex: ["\\mathbb{E}[X]", "\\E[X]"],
763
+ component: "Expected",
764
+ usage: "<Expected>X</Expected>",
765
+ description: "Expected value E[X]"
766
+ },
767
+ {
768
+ name: "variance",
769
+ category: "probability",
770
+ symbols: ["Var(X)", "\u03C3\xB2"],
771
+ latex: ["\\text{Var}(X)", "\\sigma^2"],
772
+ component: "Variance",
773
+ usage: "<Variance>X</Variance>",
774
+ description: "Variance Var(X)"
775
+ },
776
+ {
777
+ name: "standard deviation",
778
+ category: "probability",
779
+ symbols: ["\u03C3", "std(X)"],
780
+ latex: ["\\sigma", "\\text{std}(X)"],
781
+ component: "StdDev",
782
+ usage: "<StdDev>X</StdDev>",
783
+ description: "Standard deviation \u03C3"
784
+ },
785
+ // ── Greek Letters ─────────────────────────────────────────────────────────────
786
+ {
787
+ name: "alpha",
788
+ category: "greek",
789
+ symbols: ["\u03B1"],
790
+ latex: ["\\alpha"],
791
+ component: "Alpha",
792
+ usage: "<Alpha />",
793
+ description: "Lowercase Greek alpha \u03B1"
794
+ },
795
+ {
796
+ name: "beta",
797
+ category: "greek",
798
+ symbols: ["\u03B2"],
799
+ latex: ["\\beta"],
800
+ component: "Beta",
801
+ usage: "<Beta />",
802
+ description: "Lowercase Greek beta \u03B2"
803
+ },
804
+ {
805
+ name: "gamma / Gamma",
806
+ category: "greek",
807
+ symbols: ["\u03B3", "\u0393"],
808
+ latex: ["\\gamma", "\\Gamma"],
809
+ component: "Gamma / GammaU",
810
+ usage: "<Gamma /> or <GammaU />",
811
+ description: "Greek gamma \u03B3 / \u0393"
812
+ },
813
+ {
814
+ name: "delta / Delta",
815
+ category: "greek",
816
+ symbols: ["\u03B4", "\u0394"],
817
+ latex: ["\\delta", "\\Delta"],
818
+ component: "GDelta / DeltaU",
819
+ usage: "<GDelta /> or <DeltaU />",
820
+ description: "Greek delta \u03B4 / \u0394"
821
+ },
822
+ {
823
+ name: "epsilon / varepsilon",
824
+ category: "greek",
825
+ symbols: ["\u03B5", "\u03F5"],
826
+ latex: ["\\epsilon", "\\varepsilon"],
827
+ component: "Epsilon / Varepsilon",
828
+ usage: "<Epsilon /> or <Varepsilon />",
829
+ description: "Greek epsilon \u03B5"
830
+ },
831
+ {
832
+ name: "theta / Theta",
833
+ category: "greek",
834
+ symbols: ["\u03B8", "\u0398"],
835
+ latex: ["\\theta", "\\Theta"],
836
+ component: "Theta / ThetaU",
837
+ usage: "<Theta /> or <ThetaU />",
838
+ description: "Greek theta \u03B8 / \u0398"
839
+ },
840
+ {
841
+ name: "lambda / Lambda",
842
+ category: "greek",
843
+ symbols: ["\u03BB", "\u039B"],
844
+ latex: ["\\lambda", "\\Lambda"],
845
+ component: "Lambda / LambdaU",
846
+ usage: "<Lambda /> or <LambdaU />",
847
+ description: "Greek lambda \u03BB / \u039B"
848
+ },
849
+ {
850
+ name: "mu",
851
+ category: "greek",
852
+ symbols: ["\u03BC"],
853
+ latex: ["\\mu"],
854
+ component: "Mu",
855
+ usage: "<Mu />",
856
+ description: "Greek mu \u03BC (mean, micro)"
857
+ },
858
+ {
859
+ name: "pi / Pi",
860
+ category: "greek",
861
+ symbols: ["\u03C0", "\u03A0"],
862
+ latex: ["\\pi", "\\Pi"],
863
+ component: "PiSym / PiU",
864
+ usage: "<PiSym /> or <PiU />",
865
+ description: "Greek pi \u03C0 / \u03A0"
866
+ },
867
+ {
868
+ name: "sigma / Sigma",
869
+ category: "greek",
870
+ symbols: ["\u03C3", "\u03A3"],
871
+ latex: ["\\sigma", "\\Sigma"],
872
+ component: "SigmaSym / SigmaU",
873
+ usage: "<SigmaSym /> or <SigmaU />",
874
+ description: "Greek sigma \u03C3 / \u03A3"
875
+ },
876
+ {
877
+ name: "phi / Phi / varphi",
878
+ category: "greek",
879
+ symbols: ["\u03C6", "\u03D5", "\u03A6"],
880
+ latex: ["\\phi", "\\varphi", "\\Phi"],
881
+ component: "Phi / PhiU / Varphi",
882
+ usage: "<Phi /> or <PhiU /> or <Varphi />",
883
+ description: "Greek phi \u03C6 / \u03A6"
884
+ },
885
+ {
886
+ name: "omega / Omega",
887
+ category: "greek",
888
+ symbols: ["\u03C9", "\u03A9"],
889
+ latex: ["\\omega", "\\Omega"],
890
+ component: "Omega / OmegaU",
891
+ usage: "<Omega /> or <OmegaU />",
892
+ description: "Greek omega \u03C9 / \u03A9"
893
+ },
894
+ // ── Relations ────────────────────────────────────────────────────────────────
895
+ {
896
+ name: "less than or equal",
897
+ category: "relations",
898
+ symbols: ["\u2264", "\u2A7D"],
899
+ latex: ["\\leq", "\\le"],
900
+ component: "Leq",
901
+ usage: "<Leq />",
902
+ description: "Less than or equal \u2264"
903
+ },
904
+ {
905
+ name: "greater than or equal",
906
+ category: "relations",
907
+ symbols: ["\u2265", "\u2A7E"],
908
+ latex: ["\\geq", "\\ge"],
909
+ component: "Geq",
910
+ usage: "<Geq />",
911
+ description: "Greater than or equal \u2265"
912
+ },
913
+ {
914
+ name: "not equal",
915
+ category: "relations",
916
+ symbols: ["\u2260"],
917
+ latex: ["\\neq", "\\ne"],
918
+ component: "Neq",
919
+ usage: "<Neq />",
920
+ description: "Not equal \u2260"
921
+ },
922
+ {
923
+ name: "approximately equal",
924
+ category: "relations",
925
+ symbols: ["\u2248"],
926
+ latex: ["\\approx"],
927
+ component: "Approx",
928
+ usage: "<Approx />",
929
+ description: "Approximately equal \u2248"
930
+ },
931
+ {
932
+ name: "equivalent / identical to",
933
+ category: "relations",
934
+ symbols: ["\u2261"],
935
+ latex: ["\\equiv"],
936
+ component: "Equiv",
937
+ usage: "<Equiv />",
938
+ description: "Equivalent / congruent mod n \u2261"
939
+ },
940
+ {
941
+ name: "proportional to",
942
+ category: "relations",
943
+ symbols: ["\u221D"],
944
+ latex: ["\\propto"],
945
+ component: "Propto",
946
+ usage: "<Propto />",
947
+ description: "Proportional to \u221D"
948
+ },
949
+ // ── Definition & Equality ────────────────────────────────────────────────────
950
+ {
951
+ name: "defined as / assignment",
952
+ category: "definition",
953
+ symbols: [":=", "\u225C", "\u225D"],
954
+ latex: [":=", "\\triangleq", "\\eqdef"],
955
+ component: "DefEq / DefinedAs",
956
+ usage: "<DefEq /> or <DefinedAs />",
957
+ description: "Definition equals := or \u225C"
958
+ },
959
+ {
960
+ name: "approaches / limit definition",
961
+ category: "definition",
962
+ symbols: ["\u2250"],
963
+ latex: ["\\doteq"],
964
+ component: "Approaches",
965
+ usage: "<Approaches />",
966
+ description: "Approaches / equals at limit \u2250"
967
+ },
968
+ {
969
+ name: "corresponds to",
970
+ category: "definition",
971
+ symbols: ["\u2259"],
972
+ latex: ["\\corresponds"],
973
+ component: "Corresponds",
974
+ usage: "<Corresponds />",
975
+ description: "Corresponds to \u2259"
976
+ },
977
+ // ── Arrows ───────────────────────────────────────────────────────────────────
978
+ {
979
+ name: "right arrow / tends to",
980
+ category: "arrows",
981
+ symbols: ["\u2192"],
982
+ latex: ["\\to", "\\rightarrow"],
983
+ component: "Arrow",
984
+ usage: "<Arrow />",
985
+ description: "Right arrow \u2192"
986
+ },
987
+ {
988
+ name: "left arrow",
989
+ category: "arrows",
990
+ symbols: ["\u2190"],
991
+ latex: ["\\leftarrow", "\\gets"],
992
+ component: "LeftArrow",
993
+ usage: "<LeftArrow />",
994
+ description: "Left arrow \u2190"
995
+ },
996
+ {
997
+ name: "long right arrow / maps to",
998
+ category: "arrows",
999
+ symbols: ["\u27F6", "\u21A6"],
1000
+ latex: ["\\longrightarrow", "\\mapsto"],
1001
+ component: "LongRightArrow / MapsTo",
1002
+ usage: "<LongRightArrow /> or <MapsTo />",
1003
+ description: "Long right arrow or maps to"
1004
+ },
1005
+ {
1006
+ name: "double right arrow / implies arrow",
1007
+ category: "arrows",
1008
+ symbols: ["\u21D2"],
1009
+ latex: ["\\Rightarrow"],
1010
+ component: "DoubleRightArrow",
1011
+ usage: "<DoubleRightArrow />",
1012
+ description: "Double right arrow \u21D2"
1013
+ },
1014
+ {
1015
+ name: "equilibrium / reversible reaction",
1016
+ category: "arrows",
1017
+ symbols: ["\u21CC"],
1018
+ latex: ["\\rightleftharpoons"],
1019
+ component: "EquilibriumArrow",
1020
+ usage: "<EquilibriumArrow />",
1021
+ description: "Equilibrium / reversible arrow \u21CC"
1022
+ },
1023
+ // ── Accents ──────────────────────────────────────────────────────────────────
1024
+ {
1025
+ name: "bar / mean / overline",
1026
+ category: "accents",
1027
+ symbols: ["x\u0304", "\u0101"],
1028
+ latex: ["\\bar{x}", "\\overline{x}"],
1029
+ component: "Bar",
1030
+ usage: "<Bar>x</Bar>",
1031
+ description: "Overline / mean x\u0304"
1032
+ },
1033
+ {
1034
+ name: "hat / estimate",
1035
+ category: "accents",
1036
+ symbols: ["x\u0302", "\u0177"],
1037
+ latex: ["\\hat{x}", "\\widehat{x}"],
1038
+ component: "Hat",
1039
+ usage: "<Hat>x</Hat>",
1040
+ description: "Hat accent x\u0302 (estimate or unit vector)"
1041
+ },
1042
+ {
1043
+ name: "tilde",
1044
+ category: "accents",
1045
+ symbols: ["x\u0303"],
1046
+ latex: ["\\tilde{x}", "\\widetilde{x}"],
1047
+ component: "Tilde",
1048
+ usage: "<Tilde>x</Tilde>",
1049
+ description: "Tilde accent x\u0303"
1050
+ },
1051
+ {
1052
+ name: "dot / first time derivative",
1053
+ category: "accents",
1054
+ symbols: ["\u1E8B", "\u1E59"],
1055
+ latex: ["\\dot{x}"],
1056
+ component: "DotAccent",
1057
+ usage: "<DotAccent>x</DotAccent>",
1058
+ description: "Single dot (Newton notation \u1E8B)"
1059
+ },
1060
+ {
1061
+ name: "double dot / second time derivative",
1062
+ category: "accents",
1063
+ symbols: ["\u1E8D", "r\u0308"],
1064
+ latex: ["\\ddot{x}"],
1065
+ component: "DDot",
1066
+ usage: "<DDot>x</DDot>",
1067
+ description: "Double dot (Newton notation \u1E8D)"
1068
+ },
1069
+ {
1070
+ name: "prime / derivative shorthand",
1071
+ category: "accents",
1072
+ symbols: ["f\u2032", "y\u2032", "f\u2033"],
1073
+ latex: ["f'", "f''", "f^{\\prime}"],
1074
+ component: "PrimeOf / Prime",
1075
+ usage: "<PrimeOf>f</PrimeOf> or f<Prime />",
1076
+ description: "Prime notation f\u2032"
1077
+ },
1078
+ // ── Brackets ─────────────────────────────────────────────────────────────────
1079
+ {
1080
+ name: "curly brace grouping",
1081
+ category: "brackets",
1082
+ symbols: ["{x}", "{a+b}"],
1083
+ latex: ["\\left\\{ x \\right\\}", "\\{a+b\\}"],
1084
+ component: "Brace",
1085
+ usage: "<Brace>x + y</Brace>",
1086
+ description: "Curly brace grouping \u2014 scales to match content height"
1087
+ },
1088
+ {
1089
+ name: "angle brackets / inner product",
1090
+ category: "brackets",
1091
+ symbols: ["\u27E8u,v\u27E9", "\u27E8x\u27E9"],
1092
+ latex: ["\\langle u,v \\rangle", "\\inner{u}{v}"],
1093
+ component: "AngleBracket",
1094
+ usage: "<AngleBracket>u, v</AngleBracket>",
1095
+ description: "Angle brackets \u27E8 \u27E9"
1096
+ },
1097
+ {
1098
+ name: "interval notation",
1099
+ category: "brackets",
1100
+ symbols: ["[a,b]", "(a,b)", "[a,b)", "(a,b]"],
1101
+ latex: ["[a,b]", "(a,b)"],
1102
+ component: "Interval",
1103
+ usage: '<Interval a="0" b="1" leftOpen rightOpen />',
1104
+ description: "Interval [a,b] with open/closed ends"
1105
+ },
1106
+ {
1107
+ name: "double bracket / Iverson bracket",
1108
+ category: "brackets",
1109
+ symbols: ["\u27E6P\u27E7"],
1110
+ latex: ["\\llbracket P \\rrbracket"],
1111
+ component: "DoubleBracket",
1112
+ usage: "<DoubleBracket>P</DoubleBracket>",
1113
+ description: "Iverson bracket \u27E6P\u27E7 = 1 if P true"
1114
+ },
1115
+ {
1116
+ name: "Dirac bra-ket",
1117
+ category: "physics",
1118
+ symbols: ["\u27E8\u03C8|\u03C6\u27E9", "\u27E8\u03C8|", "|\u03C6\u27E9"],
1119
+ latex: ["\\langle\\psi|\\phi\\rangle"],
1120
+ component: "BraKet / Bra / Ket",
1121
+ usage: "<BraKet bra={<Psi />} ket={<Phi />} />",
1122
+ description: "Dirac notation \u27E8\u03C8|\u03C6\u27E9"
1123
+ },
1124
+ // ── Geometry ─────────────────────────────────────────────────────────────────
1125
+ {
1126
+ name: "angle",
1127
+ category: "geometry",
1128
+ symbols: ["\u2220ABC", "\u2220A"],
1129
+ latex: ["\\angle ABC"],
1130
+ component: "Angle",
1131
+ usage: "<Angle>ABC</Angle>",
1132
+ description: "Angle symbol \u2220ABC"
1133
+ },
1134
+ {
1135
+ name: "measured angle",
1136
+ category: "geometry",
1137
+ symbols: ["\u2221ABC"],
1138
+ latex: ["\\measuredangle ABC"],
1139
+ component: "MeasuredAngle",
1140
+ usage: "<MeasuredAngle />",
1141
+ description: "Measured angle \u2221 (arc with rays)"
1142
+ },
1143
+ {
1144
+ name: "triangle",
1145
+ category: "geometry",
1146
+ symbols: ["\u25B3ABC"],
1147
+ latex: ["\\triangle ABC"],
1148
+ component: "Triangle",
1149
+ usage: "<Triangle>ABC</Triangle>",
1150
+ description: "Triangle \u25B3ABC"
1151
+ },
1152
+ {
1153
+ name: "parallel",
1154
+ category: "geometry",
1155
+ symbols: ["\u2225", "AB \u2225 CD"],
1156
+ latex: ["\\parallel"],
1157
+ component: "Parallel",
1158
+ usage: "<Parallel />",
1159
+ description: "Parallel lines \u2225"
1160
+ },
1161
+ {
1162
+ name: "perpendicular",
1163
+ category: "geometry",
1164
+ symbols: ["\u22A5", "AB \u22A5 CD"],
1165
+ latex: ["\\perp"],
1166
+ component: "Perpendicular",
1167
+ usage: "<Perpendicular />",
1168
+ description: "Perpendicular \u22A5"
1169
+ },
1170
+ {
1171
+ name: "line segment",
1172
+ category: "geometry",
1173
+ symbols: ["AB\u0304"],
1174
+ latex: ["\\overline{AB}"],
1175
+ component: "Segment",
1176
+ usage: "<Segment>AB</Segment>",
1177
+ description: "Line segment with overbar AB\u0304"
1178
+ },
1179
+ {
1180
+ name: "diameter",
1181
+ category: "geometry",
1182
+ symbols: ["\u2300", "\u230050mm"],
1183
+ latex: ["\\diameter"],
1184
+ component: "Diameter",
1185
+ usage: "<Diameter />",
1186
+ description: "Diameter symbol \u2300"
1187
+ },
1188
+ {
1189
+ name: "congruent",
1190
+ category: "geometry",
1191
+ symbols: ["\u2245", "\u25B3ABC \u2245 \u25B3DEF"],
1192
+ latex: ["\\cong"],
1193
+ component: "GeoCong",
1194
+ usage: "<GeoCong />",
1195
+ description: "Congruent \u2245"
1196
+ },
1197
+ {
1198
+ name: "similar",
1199
+ category: "geometry",
1200
+ symbols: ["\u223C", "\u25B3ABC \u223C \u25B3DEF"],
1201
+ latex: ["\\sim"],
1202
+ component: "GeoSim",
1203
+ usage: "<GeoSim />",
1204
+ description: "Similar \u223C"
1205
+ },
1206
+ // ── Physics ──────────────────────────────────────────────────────────────────
1207
+ {
1208
+ name: "h-bar / reduced Planck constant",
1209
+ category: "physics",
1210
+ symbols: ["\u210F"],
1211
+ latex: ["\\hbar"],
1212
+ component: "HBar",
1213
+ usage: "<HBar />",
1214
+ description: "Reduced Planck constant \u210F"
1215
+ },
1216
+ {
1217
+ name: "Angstrom",
1218
+ category: "physics",
1219
+ symbols: ["\xC5"],
1220
+ latex: ["\\text{\xC5}", "\\angstrom"],
1221
+ component: "Angstrom",
1222
+ usage: "<Angstrom />",
1223
+ description: "\xC5ngstr\xF6m unit \xC5"
1224
+ },
1225
+ {
1226
+ name: "convolution",
1227
+ category: "operators",
1228
+ symbols: ["\u2217", "f\u2217g"],
1229
+ latex: ["f * g", "f \\ast g"],
1230
+ component: "Convo",
1231
+ usage: "<Convo />",
1232
+ description: "Convolution operator \u2217"
1233
+ },
1234
+ {
1235
+ name: "direct sum",
1236
+ category: "operators",
1237
+ symbols: ["\u2295"],
1238
+ latex: ["\\oplus"],
1239
+ component: "DirectSum",
1240
+ usage: "<DirectSum />",
1241
+ description: "Direct sum \u2295"
1242
+ },
1243
+ // ── Script Letters ────────────────────────────────────────────────────────────
1244
+ {
1245
+ name: "Laplace transform",
1246
+ category: "script",
1247
+ symbols: ["\u2112{f}"],
1248
+ latex: ["\\mathcal{L}"],
1249
+ component: "ScriptL",
1250
+ usage: "<ScriptL />",
1251
+ description: "Script L \u2014 Laplace transform \u2112"
1252
+ },
1253
+ {
1254
+ name: "Fourier transform",
1255
+ category: "script",
1256
+ symbols: ["\u2131{f}"],
1257
+ latex: ["\\mathcal{F}"],
1258
+ component: "ScriptF",
1259
+ usage: "<ScriptF />",
1260
+ description: "Script F \u2014 Fourier transform \u2131"
1261
+ },
1262
+ {
1263
+ name: "Big-O notation",
1264
+ category: "script",
1265
+ symbols: ["\u{1D4AA}(n)", "O(n log n)"],
1266
+ latex: ["\\mathcal{O}(n)"],
1267
+ component: "ScriptO",
1268
+ usage: "<ScriptO />(n)",
1269
+ description: "Script O \u2014 complexity notation \u{1D4AA}"
1270
+ },
1271
+ {
1272
+ name: "Hilbert space",
1273
+ category: "script",
1274
+ symbols: ["\u210B"],
1275
+ latex: ["\\mathcal{H}"],
1276
+ component: "ScriptH",
1277
+ usage: "<ScriptH />",
1278
+ description: "Script H \u2014 Hilbert space \u210B"
1279
+ },
1280
+ {
1281
+ name: "script ell / ell-p spaces",
1282
+ category: "script",
1283
+ symbols: ["\u2113", "\u2113\xB2", "\u2113\u1D56"],
1284
+ latex: ["\\ell"],
1285
+ component: "ScriptEll",
1286
+ usage: "<ScriptEll />",
1287
+ description: "Script ell \u2113 (length, sequence spaces)"
1288
+ },
1289
+ // ── Chemistry ────────────────────────────────────────────────────────────────
1290
+ {
1291
+ name: "chemical equilibrium arrow",
1292
+ category: "chemistry",
1293
+ symbols: ["\u21CC"],
1294
+ latex: ["\\rightleftharpoons"],
1295
+ component: "ChemEquilibrium",
1296
+ usage: "<ChemEquilibrium />",
1297
+ description: "Chemical equilibrium \u21CC"
1298
+ },
1299
+ {
1300
+ name: "reaction arrow",
1301
+ category: "chemistry",
1302
+ symbols: ["\u27F6"],
1303
+ latex: ["\\longrightarrow"],
1304
+ component: "ReactionArrow",
1305
+ usage: "<ReactionArrow />",
1306
+ description: "Forward reaction arrow \u27F6"
1307
+ },
1308
+ {
1309
+ name: "gas product marker",
1310
+ category: "chemistry",
1311
+ symbols: ["\u2191"],
1312
+ latex: ["\\uparrow"],
1313
+ component: "GasMarker",
1314
+ usage: "<GasMarker />",
1315
+ description: "Gas evolves \u2191"
1316
+ },
1317
+ {
1318
+ name: "precipitate marker",
1319
+ category: "chemistry",
1320
+ symbols: ["\u2193"],
1321
+ latex: ["\\downarrow"],
1322
+ component: "PrecipitateMarker",
1323
+ usage: "<PrecipitateMarker />",
1324
+ description: "Precipitate forms \u2193"
1325
+ },
1326
+ {
1327
+ name: "single bond",
1328
+ category: "chemistry",
1329
+ symbols: ["\u2014", "C\u2014H"],
1330
+ latex: ["-", "\\text{\u2014}"],
1331
+ component: "SingleBond",
1332
+ usage: "C<SingleBond />H",
1333
+ description: "Single covalent bond \u2014"
1334
+ },
1335
+ {
1336
+ name: "double bond",
1337
+ category: "chemistry",
1338
+ symbols: ["\u2550", "C\u2550O"],
1339
+ latex: ["=", "\\text{\u2550}"],
1340
+ component: "DoubleBond",
1341
+ usage: "C<DoubleBond />O",
1342
+ description: "Double covalent bond \u2550"
1343
+ },
1344
+ {
1345
+ name: "triple bond",
1346
+ category: "chemistry",
1347
+ symbols: ["\u2261", "N\u2261N"],
1348
+ latex: ["\\equiv", "\\text{\u2261}"],
1349
+ component: "TripleBond",
1350
+ usage: "N<TripleBond />N",
1351
+ description: "Triple covalent bond \u2261"
1352
+ },
1353
+ // ── Dots ─────────────────────────────────────────────────────────────────────
1354
+ {
1355
+ name: "horizontal dots / centered dots",
1356
+ category: "dots",
1357
+ symbols: ["\u22EF", "1 + 2 + \u22EF + n"],
1358
+ latex: ["\\cdots"],
1359
+ component: "CDots",
1360
+ usage: "<CDots /> or <CDots count={5} />",
1361
+ description: "Centered horizontal dots \u2014 count prop controls number of dots (default 3)"
1362
+ },
1363
+ {
1364
+ name: "vertical dots",
1365
+ category: "dots",
1366
+ symbols: ["\u22EE"],
1367
+ latex: ["\\vdots"],
1368
+ component: "VDots",
1369
+ usage: "<VDots />",
1370
+ description: "Vertical dots \u22EE (in matrices)"
1371
+ },
1372
+ {
1373
+ name: "diagonal dots",
1374
+ category: "dots",
1375
+ symbols: ["\u22F1"],
1376
+ latex: ["\\ddots"],
1377
+ component: "DDots",
1378
+ usage: "<DDots />",
1379
+ description: "Diagonal dots \u22F1 (in matrices)"
1380
+ },
1381
+ {
1382
+ name: "baseline ellipsis",
1383
+ category: "dots",
1384
+ symbols: ["\u2026", "1, 2, \u2026, n"],
1385
+ latex: ["\\ldots"],
1386
+ component: "LDots",
1387
+ usage: "<LDots />",
1388
+ description: "Baseline ellipsis \u2026"
1389
+ },
1390
+ // ── CS / Asymptotic Notation ─────────────────────────────────────────────────
1391
+ {
1392
+ name: "Big-O / worst-case complexity",
1393
+ category: "cs",
1394
+ symbols: ["O", "O(n)", "O(log n)"],
1395
+ latex: ["O(n)", "\\mathcal{O}(n)"],
1396
+ component: "BigO",
1397
+ usage: "<BigO />(n)",
1398
+ description: "Big-O upper bound \u2014 worst-case complexity"
1399
+ },
1400
+ {
1401
+ name: "Big-Theta / tight complexity bound",
1402
+ category: "cs",
1403
+ symbols: ["\u0398", "\u0398(n)"],
1404
+ latex: ["\\Theta(n)"],
1405
+ component: "BigTheta",
1406
+ usage: "<BigTheta />(n)",
1407
+ description: "Big-Theta tight bound \u2014 exact asymptotic complexity"
1408
+ },
1409
+ {
1410
+ name: "Big-Omega / best-case complexity",
1411
+ category: "cs",
1412
+ symbols: ["\u03A9", "\u03A9(n)"],
1413
+ latex: ["\\Omega(n)"],
1414
+ component: "BigOmega",
1415
+ usage: "<BigOmega />(n)",
1416
+ description: "Big-Omega lower bound \u2014 best-case complexity"
1417
+ },
1418
+ {
1419
+ name: "little-o / strict upper bound",
1420
+ category: "cs",
1421
+ symbols: ["\u{1D45C}", "o(n)"],
1422
+ latex: ["o(n)"],
1423
+ component: "LittleO",
1424
+ usage: "<LittleO />(n)",
1425
+ description: "little-o strict upper bound \u2014 f grows strictly slower than g"
1426
+ },
1427
+ {
1428
+ name: "little-omega / strict lower bound",
1429
+ category: "cs",
1430
+ symbols: ["\u03C9", "\u03C9(n)"],
1431
+ latex: ["\\omega(n)"],
1432
+ component: "LittleOmega",
1433
+ usage: "<LittleOmega />(n)",
1434
+ description: "little-omega strict lower bound \u2014 f grows strictly faster than g"
1435
+ },
1436
+ // ── Misc ─────────────────────────────────────────────────────────────────────
1437
+ {
1438
+ name: "aleph / cardinality of infinite sets",
1439
+ category: "misc",
1440
+ symbols: ["\u2135", "\u2135\u2080", "\u2135\u2081"],
1441
+ latex: ["\\aleph_0", "\\aleph_1"],
1442
+ component: "Aleph",
1443
+ usage: "<Aleph />",
1444
+ description: "Aleph \u2135 (infinite cardinal)"
1445
+ },
1446
+ // ── Geometry 2D (Visual SVG) ─────────────────────────────────────────────────
1447
+ {
1448
+ name: "geometry scene / coordinate plane",
1449
+ category: "geometry",
1450
+ symbols: [],
1451
+ latex: [],
1452
+ component: "FigScene",
1453
+ usage: "<FigScene width={400} height={300} xRange={[-5,5]} yRange={[-5,5]} showGrid showAxes>\n {/* FigPoint, FigVector, FigCircle \u2026 */}\n</FigScene>",
1454
+ description: "SVG coordinate plane that wraps all Fig* visual primitives. Provides grid lines, axes, and a coordinate transform."
1455
+ },
1456
+ {
1457
+ name: "geometry point",
1458
+ category: "geometry",
1459
+ symbols: [],
1460
+ latex: [],
1461
+ component: "FigPoint",
1462
+ usage: '<FigPoint x={2} y={1} label="A" />',
1463
+ description: "Filled dot at world coordinates with an optional label."
1464
+ },
1465
+ {
1466
+ name: "geometry vector / arrow",
1467
+ category: "geometry",
1468
+ symbols: ["\u2192"],
1469
+ latex: ["\\vec{v}"],
1470
+ component: "FigVector",
1471
+ usage: '<FigVector fromX={0} fromY={0} toX={3} toY={4} label="v" />',
1472
+ description: "Directed arrow from one world point to another with an arrowhead."
1473
+ },
1474
+ {
1475
+ name: "geometry line",
1476
+ category: "geometry",
1477
+ symbols: [],
1478
+ latex: [],
1479
+ component: "FigLine",
1480
+ usage: "<FigLine x1={-2} y1={-1} x2={2} y2={1} dashed />",
1481
+ description: "Straight line segment between two world points. Supports dashed style."
1482
+ },
1483
+ {
1484
+ name: "geometry segment with ticks",
1485
+ category: "geometry",
1486
+ symbols: [],
1487
+ latex: [],
1488
+ component: "FigSegment",
1489
+ usage: '<FigSegment x1={0} y1={0} x2={3} y2={0} label="c" tickMarks />',
1490
+ description: "Line segment with optional midpoint label and equal-length tick marks."
1491
+ },
1492
+ {
1493
+ name: "geometry circle",
1494
+ category: "geometry",
1495
+ symbols: ["\u25CB"],
1496
+ latex: ["\\bigcirc"],
1497
+ component: "FigCircle",
1498
+ usage: "<FigCircle cx={0} cy={0} r={2} />",
1499
+ description: "Circle at a world center with a world-unit radius."
1500
+ },
1501
+ {
1502
+ name: "geometry arc",
1503
+ category: "geometry",
1504
+ symbols: ["\u2312"],
1505
+ latex: ["\\overset{\\frown}{AB}"],
1506
+ component: "FigArc",
1507
+ usage: "<FigArc cx={0} cy={0} r={2} startDeg={0} endDeg={90} />",
1508
+ description: "Partial arc between two degree angles (counter-clockwise from positive x-axis)."
1509
+ },
1510
+ {
1511
+ name: "geometry angle arc",
1512
+ category: "geometry",
1513
+ symbols: ["\u2220"],
1514
+ latex: ["\\angle"],
1515
+ component: "FigAngle",
1516
+ usage: '<FigAngle vertex={{x:0,y:0}} from={{x:1,y:0}} to={{x:0,y:1}} label="\u03B8" />',
1517
+ description: "Arc sweep showing the angle at a vertex between two direction rays."
1518
+ },
1519
+ {
1520
+ name: "geometry polygon",
1521
+ category: "geometry",
1522
+ symbols: [],
1523
+ latex: [],
1524
+ component: "FigPolygon",
1525
+ usage: '<FigPolygon points={[[0,0],[3,0],[1.5,2]]} fill="currentColor" opacity={0.15} />',
1526
+ description: "Closed polygon from an array of world-coordinate [x,y] vertices."
1527
+ },
1528
+ {
1529
+ name: "geometry label / text",
1530
+ category: "geometry",
1531
+ symbols: [],
1532
+ latex: [],
1533
+ component: "FigLabel",
1534
+ usage: "<FigLabel x={1} y={2}>A</FigLabel>",
1535
+ description: "Arbitrary text positioned at a world coordinate inside FigScene."
1536
+ }
1537
+ ];
1538
+ function searchSymbols(query) {
1539
+ const q = query.toLowerCase().trim();
1540
+ return SYMBOL_MAP.filter((e) => {
1541
+ return e.name.toLowerCase().includes(q) || e.component.toLowerCase().includes(q) || e.latex.some((l) => l.toLowerCase().includes(q)) || e.symbols.some((s) => s.toLowerCase().includes(q)) || e.description.toLowerCase().includes(q) || e.category.toLowerCase().includes(q);
1542
+ });
1543
+ }
1544
+ function symbolsByCategory(category) {
1545
+ return SYMBOL_MAP.filter((e) => e.category === category);
1546
+ }
1547
+ const CATEGORIES_LIST = [
1548
+ ...new Set(SYMBOL_MAP.map((e) => e.category))
1549
+ ];
1550
+ function formatEntry(e) {
1551
+ const sym = e.symbols.join(" / ");
1552
+ const latex = e.latex.slice(0, 2).join(" or ");
1553
+ return `${sym.padEnd(16)} \u2192 ${e.usage.padEnd(48)} (was: ${latex})`;
1554
+ }
1555
+ function buildMathStandard() {
1556
+ const lines = [
1557
+ "MATH \u2014 use primitive components only, never $ signs or LaTeX strings.",
1558
+ "SYMBOL MAP \u2014 for every mathematical symbol, use the component shown:",
1559
+ ""
1560
+ ];
1561
+ for (const cat of CATEGORIES_LIST) {
1562
+ const entries = symbolsByCategory(cat);
1563
+ if (entries.length === 0) continue;
1564
+ lines.push(
1565
+ `\u2500\u2500 ${cat.toUpperCase().replace(/-/g, " ")} ${"\u2500".repeat(Math.max(0, 60 - cat.length))}`
1566
+ );
1567
+ for (const e of entries) {
1568
+ lines.push(` ${formatEntry(e)}`);
1569
+ }
1570
+ lines.push("");
1571
+ }
1572
+ lines.push(
1573
+ "COMPOSING NESTED EXPRESSIONS \u2014 wrap complex sub-expressions in {<span>...</span>}:",
1574
+ ' <Frac num={<span><Pow exp="2">x</Pow> + 1</span>} den="2a" />',
1575
+ ' <Integral from="0" to={<Inf />}><Pow exp={<span>\u2212<Pow exp="2">x</Pow></span>}>e</Pow> dx</Integral>',
1576
+ "",
1577
+ "PIECEWISE FUNCTIONS:",
1578
+ " <Cases>",
1579
+ ' <Case expr="x" when="x \u2265 0" />',
1580
+ ' <Case expr={<span>\u2212x</span>} when="x < 0" />',
1581
+ " </Cases>",
1582
+ "",
1583
+ "SOLUTION BLOCKS:",
1584
+ ' <Solution title="Solve: 2x + 4 = 10">',
1585
+ ' <SolutionStep reason="Subtract 4">2x = 6</SolutionStep>',
1586
+ ' <SolutionStep reason="Divide by 2" highlight>x = 3</SolutionStep>',
1587
+ " <SolutionAnswer>x = 3</SolutionAnswer>",
1588
+ " </Solution>",
1589
+ "",
1590
+ "STRICT RULES",
1591
+ "- NEVER use $...$ or $$...$$",
1592
+ "- NEVER use <InlineMath>, <BlockMath>, <Math>, <ME>, <BME>",
1593
+ "- NEVER use raw HTML tags",
1594
+ "- NEVER invent component names not in the symbol map above",
1595
+ "- NEVER use # (h1) headings \u2014 start with ##",
1596
+ "- String props: plain text. Nested primitives: {<span>...</span>}"
1597
+ );
1598
+ return lines.join("\n");
1599
+ }
1600
+ export {
1601
+ CATEGORIES_LIST,
1602
+ SYMBOL_MAP,
1603
+ buildMathStandard,
1604
+ formatEntry,
1605
+ searchSymbols,
1606
+ symbolsByCategory
1607
+ };